vue-data-ui 2.16.5 → 2.16.6

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 (92) hide show
  1. package/README.md +2 -2
  2. package/dist/{Arrow-D9B36pfx.js → Arrow-DCqxVwey.js} +1 -1
  3. package/dist/{BaseDraggableDialog-DloHiD4h.js → BaseDraggableDialog-6DIKXIBU.js} +2 -2
  4. package/dist/{BaseIcon-DJab5OQD.js → BaseIcon-Bn996RXm.js} +1 -1
  5. package/dist/{ColorPicker-Br0rMnNb.js → ColorPicker-OFfLkKNb.js} +2 -2
  6. package/dist/{DataTable-B6MXw9cG.js → DataTable-CHBLjKtZ.js} +2 -2
  7. package/dist/{Legend-DoxQwq_u.js → Legend-nBXoxXJH.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-DhbyLXKW.js → NonSvgPenAndPaper-Cls2idJS.js} +3 -3
  9. package/dist/{PackageVersion-DCreTQN4.js → PackageVersion-Bg_9KCU-.js} +1 -1
  10. package/dist/{PenAndPaper-BS60tkQN.js → PenAndPaper-BPTpbnay.js} +3 -3
  11. package/dist/{Shape-CrstrfQ9.js → Shape-Bnf512BA.js} +1 -1
  12. package/dist/{Slicer-Bd0AkciG.js → Slicer-BrqtJG2E.js} +2 -2
  13. package/dist/{SparkTooltip-B4j_rvhG.js → SparkTooltip-C-rLATAw.js} +1 -1
  14. package/dist/{Title-BQLtfM0P.js → Title-Gi81VwUM.js} +1 -1
  15. package/dist/{Tooltip-5JmGL7sR.js → Tooltip-CJxVw7-T.js} +1 -1
  16. package/dist/{UserOptions-DMGkAAIO.js → UserOptions-CBEK6_jo.js} +137 -129
  17. package/dist/{dom-to-png-g3Q8kjna.js → dom-to-png-CRHNL8VU.js} +1 -1
  18. package/dist/img-BgOg8opa.js +27 -0
  19. package/dist/{index-CZNLCg7T.js → index-DvIXJm6t.js} +1 -1
  20. package/dist/{pdf-DJVOD0cz.js → pdf-DhTxBrbJ.js} +1 -1
  21. package/dist/style.css +1 -1
  22. package/dist/types/vue-data-ui.d.cts +2 -2
  23. package/dist/types/vue-data-ui.d.ts +2 -2
  24. package/dist/{useNestedProp-BcPDA6Xr.js → useNestedProp-DrYHm61t.js} +1 -1
  25. package/dist/{usePrinter-ButWuZVm.js → usePrinter-CWnXbGMb.js} +2 -2
  26. package/dist/{vue-data-ui-BB8Upnjm.js → vue-data-ui-B8EWlMIK.js} +63 -63
  27. package/dist/vue-data-ui.js +1 -1
  28. package/dist/{vue-ui-3d-bar-o8P0DCbz.js → vue-ui-3d-bar-CtlB4p7i.js} +42 -41
  29. package/dist/{vue-ui-accordion-CO4hmfuX.js → vue-ui-accordion-D55kCO5G.js} +3 -3
  30. package/dist/{vue-ui-age-pyramid-C9T5bAEl.js → vue-ui-age-pyramid-DSshyUn-.js} +39 -38
  31. package/dist/{vue-ui-annotator-CyOygaxE.js → vue-ui-annotator-DQSMv_k2.js} +2 -2
  32. package/dist/{vue-ui-bullet-CPT1jdcz.js → vue-ui-bullet-FeScjj7q.js} +23 -22
  33. package/dist/{vue-ui-candlestick-BfZTMGE0.js → vue-ui-candlestick-Drupgyoi.js} +100 -99
  34. package/dist/{vue-ui-carousel-table-Bam9qqkj.js → vue-ui-carousel-table-BTZQRZfO.js} +17 -16
  35. package/dist/{vue-ui-chestnut-BAIMBFaQ.js → vue-ui-chestnut-DLWjPwRL.js} +64 -63
  36. package/dist/{vue-ui-chord-92E1yKdu.js → vue-ui-chord-BgLbFBT9.js} +87 -86
  37. package/dist/{vue-ui-circle-pack-DxXPqA7Z.js → vue-ui-circle-pack-VXcRh2gy.js} +31 -30
  38. package/dist/{vue-ui-cursor-Bvy_o8wb.js → vue-ui-cursor-DWmfnM25.js} +2 -2
  39. package/dist/{vue-ui-dashboard--QRCkp7q.js → vue-ui-dashboard-CGIocEHj.js} +62 -62
  40. package/dist/{vue-ui-digits-Dl8RHLvt.js → vue-ui-digits-BgQch3Fc.js} +2 -2
  41. package/dist/{vue-ui-donut-BxSTOFDt.js → vue-ui-donut-B59bCV5_.js} +74 -73
  42. package/dist/{vue-ui-donut-evolution-DNzTtWnJ.js → vue-ui-donut-evolution-CI8qBIQd.js} +44 -43
  43. package/dist/{vue-ui-dumbbell-D01p3t3P.js → vue-ui-dumbbell-CXv7sk88.js} +9 -8
  44. package/dist/{vue-ui-flow-BMvaRn7E.js → vue-ui-flow-DxF0ELtv.js} +9 -8
  45. package/dist/{vue-ui-funnel-Bd_3wouw.js → vue-ui-funnel-Bco8rqF8.js} +20 -19
  46. package/dist/{vue-ui-galaxy-D4HJH1qq.js → vue-ui-galaxy-CaPJwwOj.js} +22 -21
  47. package/dist/{vue-ui-gauge-CgIlk2pu.js → vue-ui-gauge-D7arhDmb.js} +8 -7
  48. package/dist/{vue-ui-gizmo-C1-QYvsn.js → vue-ui-gizmo-Dwli-Mip.js} +3 -3
  49. package/dist/{vue-ui-heatmap-tUn_BlSp.js → vue-ui-heatmap-Cyn-ahGO.js} +10 -9
  50. package/dist/{vue-ui-history-plot-TfVRzyIK.js → vue-ui-history-plot-C2AEToqx.js} +27 -26
  51. package/dist/{vue-ui-kpi-BuL8MAMD.js → vue-ui-kpi-DKDibSdl.js} +3 -3
  52. package/dist/{vue-ui-mini-loader-DIeG36P8.js → vue-ui-mini-loader-B8OVutUx.js} +2 -2
  53. package/dist/{vue-ui-molecule-8RJNzWIw.js → vue-ui-molecule-BVSrqIGw.js} +22 -21
  54. package/dist/{vue-ui-mood-radar-DftzG_Bi.js → vue-ui-mood-radar-DvlyS3RN.js} +9 -8
  55. package/dist/{vue-ui-nested-donuts-B9JC_0xK.js → vue-ui-nested-donuts-D9ssSus6.js} +89 -88
  56. package/dist/{vue-ui-onion-DTjaH-Bu.js → vue-ui-onion-Buu4VX3u.js} +40 -39
  57. package/dist/{vue-ui-parallel-coordinate-plot-DwqfVqFB.js → vue-ui-parallel-coordinate-plot-DFLUvhxD.js} +29 -28
  58. package/dist/{vue-ui-quadrant-Cv3VWA6d.js → vue-ui-quadrant-BMC7NBGd.js} +90 -89
  59. package/dist/{vue-ui-quick-chart-imc0KrbF.js → vue-ui-quick-chart-DB9RKUkb.js} +59 -58
  60. package/dist/{vue-ui-radar-kNySclk1.js → vue-ui-radar-68NMPxxQ.js} +26 -25
  61. package/dist/{vue-ui-rating-DBhEbgwD.js → vue-ui-rating-swH9kRr3.js} +2 -2
  62. package/dist/{vue-ui-relation-circle-BJQhS0aG.js → vue-ui-relation-circle-CT-EdSjO.js} +11 -10
  63. package/dist/{vue-ui-ridgeline-Bhd1Uwm8.js → vue-ui-ridgeline-DftROPaX.js} +10 -9
  64. package/dist/{vue-ui-rings-C_IT2mi0.js → vue-ui-rings-M-9dPI5D.js} +45 -44
  65. package/dist/{vue-ui-scatter-i8XZreWa.js → vue-ui-scatter-CsGhaFJh.js} +44 -43
  66. package/dist/{vue-ui-skeleton-D9B8DY_k.js → vue-ui-skeleton-BAOt2neL.js} +3 -3
  67. package/dist/{vue-ui-smiley-gmdnUWcW.js → vue-ui-smiley-7_kIgPg-.js} +2 -2
  68. package/dist/{vue-ui-spark-trend-DOF3vl8_.js → vue-ui-spark-trend-DHlQQpwz.js} +3 -3
  69. package/dist/{vue-ui-sparkbar-BVOVq3dA.js → vue-ui-sparkbar-BnHhzuKf.js} +3 -3
  70. package/dist/{vue-ui-sparkgauge-DVO2Z0Rg.js → vue-ui-sparkgauge-WtfkCK8g.js} +3 -3
  71. package/dist/{vue-ui-sparkhistogram-CbV86a2i.js → vue-ui-sparkhistogram-B2u4XLVd.js} +4 -4
  72. package/dist/{vue-ui-sparkline-jDNAVZu-.js → vue-ui-sparkline-DKIyUlSm.js} +3 -3
  73. package/dist/{vue-ui-sparkstackbar-auT8CUXm.js → vue-ui-sparkstackbar-BLGz2qIb.js} +3 -3
  74. package/dist/{vue-ui-stackbar-DmO02We2.js → vue-ui-stackbar-BDpMsTYe.js} +11 -10
  75. package/dist/{vue-ui-strip-plot-B25s87lj.js → vue-ui-strip-plot-5qDcYPnR.js} +22 -21
  76. package/dist/{vue-ui-table-B4xbQdK_.js → vue-ui-table-Bg5HIQ3O.js} +3 -3
  77. package/dist/{vue-ui-table-heatmap-DI57VcvH.js → vue-ui-table-heatmap-DmjNy1q1.js} +26 -25
  78. package/dist/{vue-ui-table-sparkline-DRgsZztN.js → vue-ui-table-sparkline-CnkJkBk5.js} +8 -7
  79. package/dist/{vue-ui-thermometer-DkeT5DV_.js → vue-ui-thermometer-RlD-9mJf.js} +30 -29
  80. package/dist/{vue-ui-timer-uon_DLeH.js → vue-ui-timer-Bes74INL.js} +5 -5
  81. package/dist/{vue-ui-tiremarks-BV0qXRF2.js → vue-ui-tiremarks-DiLS3akQ.js} +29 -28
  82. package/dist/vue-ui-treemap-BG1Omm38.js +953 -0
  83. package/dist/{vue-ui-vertical-bar-CkLS_DGb.js → vue-ui-vertical-bar-CwqQyZFX.js} +39 -38
  84. package/dist/{vue-ui-waffle-B2XiLGQx.js → vue-ui-waffle-Ce3T4BPp.js} +10 -9
  85. package/dist/{vue-ui-wheel-BR1DDpKU.js → vue-ui-wheel-6B0WTkf2.js} +34 -33
  86. package/dist/{vue-ui-word-cloud-BvOT6hu2.js → vue-ui-word-cloud-ByYZCOh7.js} +42 -41
  87. package/dist/{vue-ui-world-BeP91MNX.js → vue-ui-world-B9PxVO4n.js} +8 -7
  88. package/dist/{vue-ui-xy-BaR-ZDba.js → vue-ui-xy-DtJ7qJib.js} +69 -68
  89. package/dist/{vue-ui-xy-canvas-B4ZmECCK.js → vue-ui-xy-canvas-S6YpFgzs.js} +131 -130
  90. package/package.json +1 -1
  91. package/dist/img-CTC5DLKL.js +0 -20
  92. package/dist/vue-ui-treemap-DzJsjtz7.js +0 -952
@@ -0,0 +1,953 @@
1
+ import { defineAsyncComponent as K, useSlots as Tt, onMounted as nt, computed as b, ref as $, shallowRef as B, watch as Ot, onBeforeUnmount as _t, createElementBlock as y, openBlock as v, unref as d, normalizeStyle as M, normalizeClass as xe, createBlock as Z, createCommentVNode as O, createElementVNode as _, createVNode as Te, createSlots as St, withCtx as T, renderSlot as k, normalizeProps as J, guardReactiveProps as Q, Fragment as ge, renderList as Oe, withKeys as st, withModifiers as _e, mergeProps as ut, createTextVNode as ye, toDisplayString as ee, nextTick as It } from "vue";
2
+ import { u as Ft, c as Se, t as Nt, p as S, a as zt, b as At, o as Pt, e as Rt, d as me, i as be, f as ie, X as Lt, l as rt, F as it, x as ct, q as Mt, r as Dt, y as Vt } from "./index-DvIXJm6t.js";
3
+ import { t as Bt, u as Ht } from "./useResponsive-DfdjqQps.js";
4
+ import { u as dt } from "./useNestedProp-DrYHm61t.js";
5
+ import { u as Ut } from "./usePrinter-CWnXbGMb.js";
6
+ import { u as Wt } from "./useUserOptionState-BIvW1Kz7.js";
7
+ import { u as Et } from "./useChartAccessibility-9icAAmYg.js";
8
+ import qt from "./BaseIcon-Bn996RXm.js";
9
+ import Gt from "./Title-Gi81VwUM.js";
10
+ import Xt from "./Legend-nBXoxXJH.js";
11
+ import { _ as jt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
+ function vt(n, r) {
13
+ const s = n.length;
14
+ if (s === 0)
15
+ throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);
16
+ {
17
+ let i = 1 / 0, u = -1 / 0, h = 0;
18
+ for (let g = 0; g < s; g += 1) {
19
+ const p = n[g].normalizedValue;
20
+ p < i && (i = p), p > u && (u = p), h += p;
21
+ }
22
+ return Math.max(
23
+ r ** 2 * u / h ** 2,
24
+ h ** 2 / (r ** 2 * i)
25
+ );
26
+ }
27
+ }
28
+ function ht(n) {
29
+ const { xOffset: r, yOffset: s, width: i, height: u } = n;
30
+ return {
31
+ x0: r,
32
+ y0: s,
33
+ x1: r + i,
34
+ y1: s + u
35
+ };
36
+ }
37
+ function Yt(n, r, s) {
38
+ if (n.length === 0)
39
+ return !0;
40
+ {
41
+ const i = n.concat(r), u = vt(
42
+ n,
43
+ s
44
+ ), h = vt(i, s);
45
+ return u >= h;
46
+ }
47
+ }
48
+ function Kt(n) {
49
+ const r = [], s = n.length;
50
+ for (let i = 0; i < s; i += 1) {
51
+ const u = n[i], h = u.length;
52
+ for (let c = 0; c < h; c += 1)
53
+ r.push(u[c]);
54
+ }
55
+ return r;
56
+ }
57
+ function Zt(n, r) {
58
+ const s = {
59
+ ...r,
60
+ children: n
61
+ };
62
+ return ft(s);
63
+ }
64
+ function Jt(n) {
65
+ return (n.x1 - n.x0) * (n.y1 - n.y0);
66
+ }
67
+ function pt(n, r) {
68
+ const { width: s, height: i, xOffset: u, yOffset: h } = Ie(r), c = n.length, g = n.map((m) => m.normalizedValue || 0).reduce((m, x) => m + x, 0), p = g / i, H = g / s;
69
+ let z = u, w = h;
70
+ const C = [];
71
+ if (s >= i) {
72
+ for (let m = 0; m < c; m += 1) {
73
+ const x = n[m], D = w + x.normalizedValue / p, A = {
74
+ x0: z,
75
+ y0: w,
76
+ x1: z + p,
77
+ y1: D
78
+ }, N = Object.assign({}, x, A);
79
+ w = D, C.push(N);
80
+ }
81
+ return C;
82
+ } else {
83
+ for (let m = 0; m < c; m += 1) {
84
+ const x = n[m], D = z + x.normalizedValue / H, A = {
85
+ x0: z,
86
+ y0: w,
87
+ x1: D,
88
+ y1: w + H
89
+ }, N = Object.assign({}, x, A);
90
+ z = D, C.push(N);
91
+ }
92
+ return C;
93
+ }
94
+ }
95
+ function Qt(n) {
96
+ const r = Ie(n), s = r.width, i = r.height;
97
+ return Math.min(s, i);
98
+ }
99
+ function el(n, r) {
100
+ const s = n.length, i = n.map((p) => p.value ?? 0).reduce((p, H) => p + H, 0), u = r / i, h = [];
101
+ let c, g;
102
+ for (let p = 0; p < s; p += 1)
103
+ g = n[p], c = Object.assign({}, g, {
104
+ normalizedValue: g.value * (u || 0)
105
+ }), h.push(c);
106
+ return h;
107
+ }
108
+ function Ie(n) {
109
+ const { x0: r, y0: s, x1: i, y1: u } = n;
110
+ return {
111
+ xOffset: r,
112
+ yOffset: s,
113
+ width: i - r,
114
+ height: u - s
115
+ };
116
+ }
117
+ function tl(n, r, s, i) {
118
+ let u = n, h = r, c = s, g = i;
119
+ for (; ; ) {
120
+ const p = u.length;
121
+ if (p === 0) {
122
+ const C = pt(h, c);
123
+ return g.concat(C);
124
+ }
125
+ const H = Qt(c), z = u[0], w = u.slice(1, p);
126
+ if (Yt(h, z, H)) {
127
+ const C = h.concat(z);
128
+ u = w, h = C, c = c, g = g;
129
+ } else {
130
+ const C = h.length;
131
+ let m = 0;
132
+ for (let N = 0; N < C; N += 1)
133
+ m += h[N].normalizedValue;
134
+ const x = ll(c, m), D = pt(h, c), A = g.concat(D);
135
+ u = u, h = [], c = x, g = A;
136
+ }
137
+ }
138
+ }
139
+ function ft(n) {
140
+ if (typeof n.children > "u" || !n.children.length)
141
+ return [n];
142
+ {
143
+ const r = el(
144
+ n.children,
145
+ Jt(n)
146
+ ), s = tl(r, [], n, []), i = s.length, u = [];
147
+ for (let c = 0; c < i; c += 1)
148
+ u.push(ft(s[c]));
149
+ return Kt(u);
150
+ }
151
+ }
152
+ function ll(n, r) {
153
+ const { width: s, height: i, xOffset: u, yOffset: h } = Ie(n);
154
+ if (s >= i) {
155
+ const c = r / i, g = s - c, p = {
156
+ xOffset: u + c,
157
+ yOffset: h,
158
+ width: g,
159
+ height: i
160
+ };
161
+ return ht(p);
162
+ } else {
163
+ const c = r / s, g = i - c, p = {
164
+ xOffset: u,
165
+ yOffset: h + c,
166
+ width: s,
167
+ height: g
168
+ };
169
+ return ht(p);
170
+ }
171
+ }
172
+ const ol = ["id"], al = {
173
+ key: 4,
174
+ class: "vue-ui-treemap-breadcrumbs",
175
+ "data-dom-to-png-ignore": ""
176
+ }, nl = ["tabindex", "onClick", "onKeydown", "data-last-crumb", "onMouseenter", "onFocus"], sl = { class: "vue-ui-treemap-crumb-unit" }, ul = { class: "vue-ui-treemap-crumb-unit-label" }, rl = {
177
+ key: 0,
178
+ style: { width: "24px", display: "flex", "align-items": "center" }
179
+ }, il = {
180
+ key: 0,
181
+ class: "vue-ui-treemap-crumb-unit-arrow"
182
+ }, cl = ["xmlns", "viewBox"], dl = { key: 0 }, vl = ["id"], hl = ["stop-color"], pl = ["stop-color"], fl = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width", "onClick", "onMouseenter"], gl = ["x", "y", "height", "width"], yl = {
183
+ style: { width: "100%", height: "100%" },
184
+ class: "vue-ui-treemap-cell"
185
+ }, ml = {
186
+ key: 6,
187
+ class: "vue-data-ui-watermark"
188
+ }, bl = ["onClick"], kl = { key: 0 }, wl = { key: 1 }, Cl = ["innerHTML"], $l = {
189
+ __name: "vue-ui-treemap",
190
+ props: {
191
+ config: {
192
+ type: Object,
193
+ default() {
194
+ return {};
195
+ }
196
+ },
197
+ dataset: {
198
+ type: Array,
199
+ default() {
200
+ return [];
201
+ }
202
+ }
203
+ },
204
+ emits: ["selectLegend", "selectDatapoint"],
205
+ setup(n, { expose: r, emit: s }) {
206
+ const i = K(() => import("./DataTable-CHBLjKtZ.js")), u = K(() => import("./PenAndPaper-BPTpbnay.js")), h = K(() => import("./vue-ui-accordion-D55kCO5G.js")), c = K(() => import("./vue-ui-skeleton-BAOt2neL.js")), g = K(() => import("./Tooltip-CJxVw7-T.js")), p = K(() => import("./UserOptions-CBEK6_jo.js")), H = K(() => import("./PackageVersion-Bg_9KCU-.js")), { vue_ui_treemap: z } = Ft(), w = n, C = s, m = Tt();
207
+ nt(() => {
208
+ m["chart-background"] && console.warn("VueUiTreemap does not support the #chart-background slot.");
209
+ });
210
+ const x = b(() => !!w.dataset && w.dataset.length), D = b(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), A = $(Se()), N = $(!1), ke = $(""), te = $(!1), Fe = $(0), P = $([]), se = B(null), Ne = B(null), ze = B(null), Ae = B(null), Pe = B(null), Re = $(0), Le = $(0), Me = $(0), e = b({
211
+ get: () => He(),
212
+ set: (t) => t
213
+ }), { userOptionsVisible: we, setUserOptionsVisibility: De, keepUserOptionState: Ve } = Wt({ config: e.value }), { svgRef: Be } = Et({ config: e.value.style.chart.title });
214
+ function He() {
215
+ const t = dt({
216
+ userConfig: w.config,
217
+ defaultConfig: z
218
+ });
219
+ return t.theme ? {
220
+ ...dt({
221
+ userConfig: zt.vue_ui_treemap[t.theme] || w.config,
222
+ defaultConfig: t
223
+ }),
224
+ customPalette: Nt[t.theme] || S
225
+ } : t;
226
+ }
227
+ Ot(() => w.config, (t) => {
228
+ e.value = He(), we.value = !e.value.userOptions.showOnChartHover, Re.value += 1, Le.value += 1, Me.value += 1, R.value.showTable = e.value.table.show, R.value.showTooltip = e.value.style.chart.tooltip.show;
229
+ }, { deep: !0 });
230
+ const { isPrinting: Ue, isImaging: We, generatePdf: Ee, generateImage: qe } = Ut({
231
+ elementId: `treemap_${A.value}`,
232
+ fileName: e.value.style.chart.title.text || "vue-ui-treemap",
233
+ options: e.value.userOptions.print
234
+ }), gt = b(() => e.value.userOptions.show && !e.value.style.chart.title.text), ce = b(() => At(e.value.customPalette)), R = $({
235
+ showTable: e.value.table.show,
236
+ showTooltip: e.value.style.chart.tooltip.show
237
+ }), U = $({
238
+ height: e.value.style.chart.height,
239
+ width: e.value.style.chart.width
240
+ }), G = b(() => ({
241
+ bottom: U.value.height - e.value.style.chart.padding.bottom,
242
+ height: U.value.height - e.value.style.chart.padding.top - e.value.style.chart.padding.bottom,
243
+ left: e.value.style.chart.padding.left,
244
+ right: U.value.width - e.value.style.chart.padding.right,
245
+ top: e.value.style.chart.padding.top,
246
+ vbHeight: U.value.height,
247
+ vbWidth: U.value.width,
248
+ width: U.value.width - e.value.style.chart.padding.left - e.value.style.chart.padding.right
249
+ }));
250
+ function Ge(t) {
251
+ t.forEach((o, l) => {
252
+ o.id = Se(), o.color = me(o.color) || ce.value[l] || S[l] || S[l % S.length], o.children && (o.children.forEach((a) => {
253
+ a.parentId = o.id, a.color = o.color;
254
+ }), Ge(o.children));
255
+ });
256
+ }
257
+ const W = B(w.dataset), E = B(null), le = B(null);
258
+ nt(() => {
259
+ yt();
260
+ });
261
+ function yt() {
262
+ if (Pt(w.dataset) && Rt({
263
+ componentName: "VueUiTreemap",
264
+ type: "dataset"
265
+ }), Ge(W.value), e.value.responsive) {
266
+ const t = Bt(() => {
267
+ const { width: o, height: l } = Ht({
268
+ chart: se.value,
269
+ title: e.value.style.chart.title.text ? Ne.value : null,
270
+ legend: e.value.style.chart.legend.show ? ze.value : null,
271
+ source: Ae.value,
272
+ noTitle: Pe.value
273
+ });
274
+ requestAnimationFrame(() => {
275
+ U.value.width = o, U.value.height = l;
276
+ });
277
+ });
278
+ E.value && (le.value && E.value.unobserve(le.value), E.value.disconnect()), E.value = new ResizeObserver(t), le.value = se.value.parentNode, E.value.observe(le.value);
279
+ }
280
+ }
281
+ _t(() => {
282
+ E.value && (le.value && E.value.unobserve(le.value), E.value.disconnect());
283
+ });
284
+ const oe = $(W.value), ue = b(() => oe.value.map((t, o) => ({
285
+ ...t,
286
+ color: me(t.color) || ce.value[o] || S[o] || S[o % S.length]
287
+ })).filter((t) => !P.value.includes(t.id))), ae = b(() => W.value.filter((t) => !P.value.includes(t.id)).map((t) => t.value || 0).reduce((t, o) => t + o, 0)), Xe = b({
288
+ get() {
289
+ let t = [...ue.value];
290
+ return e.value.style.chart.layout.sorted && (t = [...ue.value].sort((o, l) => l.value - o.value)), t.map((o) => ({
291
+ ...o
292
+ }));
293
+ },
294
+ set(t) {
295
+ return t;
296
+ }
297
+ });
298
+ function je(t, o) {
299
+ return t.value / o;
300
+ }
301
+ function mt(t, o, l) {
302
+ const a = e.value.style.chart.layout.rects.colorRatio - je(o, l);
303
+ return rt(t, a < 0 ? 0 : a);
304
+ }
305
+ function Ye(t, o, l, a) {
306
+ return t.map((f, F) => {
307
+ const fe = mt(me(o) || ce.value[F] || S[F] || S[F % S.length], f, a), xt = je(f, a);
308
+ return {
309
+ ...f,
310
+ color: fe,
311
+ proportion: xt,
312
+ parentName: l,
313
+ children: f.children ? Ye(f.children, fe, f.name, a) : void 0
314
+ };
315
+ });
316
+ }
317
+ const re = b(() => Zt(
318
+ Xe.value.map((t, o) => {
319
+ const l = t.children ? t.children.reduce((a, f) => a + f.value, 0) : t.value;
320
+ return {
321
+ value: t.value,
322
+ id: t.id || Se(),
323
+ children: t.children ? Ye(t.children.sort((a, f) => f.value - a.value), t.color, t.name, l) : void 0,
324
+ color: t.color,
325
+ name: t.name
326
+ };
327
+ }),
328
+ { x0: G.value.left * 2, y0: G.value.top, x1: G.value.width, y1: G.value.height }
329
+ ));
330
+ function Ke({ y0: t, y1: o }) {
331
+ return o - t <= 0 ? 1e-4 : o - t;
332
+ }
333
+ function Ze({ x0: t, x1: o }) {
334
+ return o - t <= 0 ? 1e-4 : o - t;
335
+ }
336
+ function X(t) {
337
+ const o = e.value.style.chart.layout.labels.fontSize * (t.proportion * 2 > 1 ? 1 : t.proportion * 2);
338
+ return o < e.value.style.chart.layout.labels.minFontSize ? e.value.style.chart.layout.labels.minFontSize : o;
339
+ }
340
+ function bt(t) {
341
+ te.value = t, Fe.value += 1;
342
+ }
343
+ const ne = b(() => ({
344
+ startX: 0,
345
+ startY: 0,
346
+ width: G.value.vbWidth,
347
+ height: G.value.vbHeight
348
+ }));
349
+ function j(t, o = W.value) {
350
+ for (const l of o) {
351
+ if (l.id === t)
352
+ return l;
353
+ if (l.children) {
354
+ const a = j(t, l.children);
355
+ if (a)
356
+ return a;
357
+ }
358
+ }
359
+ return null;
360
+ }
361
+ const I = $([]), Y = b(() => I.value.length > 0);
362
+ function de(t) {
363
+ if (!t) {
364
+ oe.value = W.value.slice(), C("selectDatapoint", void 0), I.value = [];
365
+ return;
366
+ }
367
+ const o = j(t.id);
368
+ if (o && o.children?.length)
369
+ I.value.push(o.id), oe.value = o.children.slice(), C("selectDatapoint", t);
370
+ else if (t.parentId) {
371
+ I.value.push(t.parentId);
372
+ const l = j(t.parentId);
373
+ oe.value = l.children.slice(), C("selectDatapoint", t);
374
+ } else if (I.value.length > 0) {
375
+ I.value.pop();
376
+ const l = I.value[I.value.length - 1];
377
+ if (l) {
378
+ const a = j(l);
379
+ oe.value = a.children.slice();
380
+ } else
381
+ oe.value = W.value.slice(), I.value = [], C("selectDatapoint", void 0);
382
+ }
383
+ }
384
+ function kt(t) {
385
+ return !!(j(t.id)?.children?.length || t.parentId);
386
+ }
387
+ const q = b(() => {
388
+ const t = [
389
+ { id: null, label: "All" }
390
+ ];
391
+ if (I.value.length > 0) {
392
+ let o = j(I.value[I.value.length - 1]);
393
+ const l = [];
394
+ for (; o; )
395
+ l.unshift(o), o = o.parentId ? j(o.parentId) : null;
396
+ for (const a of l)
397
+ t.push({
398
+ id: a.id,
399
+ label: a.name,
400
+ node: a
401
+ });
402
+ }
403
+ return t;
404
+ }), L = B(null), Je = b(() => W.value.map((t, o) => ({
405
+ ...t,
406
+ color: me(t.color) || ce.value[o] || S[o] || S[o % S.length],
407
+ shape: "square"
408
+ })).sort((t, o) => o.value - t.value).map((t, o) => ({
409
+ ...t,
410
+ proportion: t.value / W.value.map((l) => l.value).reduce((l, a) => l + a, 0),
411
+ opacity: P.value.includes(t.id) ? 0.5 : 1
412
+ }))), wt = b(() => ({
413
+ cy: "treemap-div-legend",
414
+ backgroundColor: e.value.style.chart.legend.backgroundColor,
415
+ color: e.value.style.chart.legend.color,
416
+ fontSize: e.value.style.chart.legend.fontSize,
417
+ paddingBottom: 12,
418
+ fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
419
+ }));
420
+ function Qe(t) {
421
+ L.value = null, P.value.includes(t.id) ? P.value = P.value.filter((o) => o !== t.id) : P.value.length < w.dataset.length - 1 && P.value.push(t.id), C("selectLegend", Xe.value);
422
+ }
423
+ const Ce = $(null);
424
+ function Ct({ datapoint: t, seriesIndex: o }) {
425
+ L.value = t, Ce.value = { datapoint: t, seriesIndex: o, config: e.value, series: ue.value };
426
+ const l = e.value.style.chart.tooltip.customFormat;
427
+ if (ct(l) && Vt(() => l({
428
+ seriesIndex: o,
429
+ datapoint: t,
430
+ series: ue.value,
431
+ config: e.value
432
+ })))
433
+ ke.value = l({
434
+ seriesIndex: o,
435
+ datapoint: t,
436
+ series: ue.value,
437
+ config: e.value
438
+ });
439
+ else {
440
+ let a = "";
441
+ a += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`, a += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${t.color}"/></svg>`, a += `<b>${be(
442
+ e.value.style.chart.layout.labels.formatter,
443
+ t.value,
444
+ ie({
445
+ p: e.value.style.chart.layout.labels.prefix,
446
+ v: t.value,
447
+ s: e.value.style.chart.layout.labels.suffix,
448
+ r: e.value.style.chart.tooltip.roundingValue
449
+ }),
450
+ { datapoint: t, seriesIndex: o }
451
+ )}</b>`, ke.value = `<div>${a}</div>`;
452
+ }
453
+ N.value = !0;
454
+ }
455
+ const V = b(() => {
456
+ const t = re.value.map((l) => ({
457
+ name: l.name,
458
+ color: l.color
459
+ })), o = re.value.map((l) => l.value);
460
+ return { head: t, body: o };
461
+ });
462
+ function et(t = null) {
463
+ It(() => {
464
+ const o = V.value.head.map((f, F) => [[
465
+ f.name
466
+ ], [V.value.body[F]], [isNaN(V.value.body[F] / ae.value) ? "-" : V.value.body[F] / ae.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), a = Mt(l);
467
+ t ? t(a) : Dt({ csvContent: a, title: e.value.style.chart.title.text || "vue-ui-treemap" });
468
+ });
469
+ }
470
+ const ve = b(() => {
471
+ const t = [
472
+ e.value.table.columnNames.series,
473
+ e.value.table.columnNames.value,
474
+ e.value.table.columnNames.percentage
475
+ ], o = V.value.head.map((f, F) => {
476
+ const fe = be(
477
+ e.value.style.chart.layout.labels.formatter,
478
+ V.value.body[F],
479
+ ie({
480
+ p: e.value.style.chart.layout.labels.prefix,
481
+ v: V.value.body[F],
482
+ s: e.value.style.chart.layout.labels.suffix,
483
+ r: e.value.table.td.roundingValue
484
+ })
485
+ );
486
+ return [
487
+ {
488
+ color: f.color,
489
+ name: f.name,
490
+ shape: "square"
491
+ },
492
+ fe,
493
+ isNaN(V.value.body[F] / ae.value) ? "-" : ie({
494
+ v: V.value.body[F] / ae.value * 100,
495
+ s: "%",
496
+ r: e.value.table.td.roundingPercentage
497
+ })
498
+ ];
499
+ }), l = {
500
+ th: {
501
+ backgroundColor: e.value.table.th.backgroundColor,
502
+ color: e.value.table.th.color,
503
+ outline: e.value.table.th.outline
504
+ },
505
+ td: {
506
+ backgroundColor: e.value.table.td.backgroundColor,
507
+ color: e.value.table.td.color,
508
+ outline: e.value.table.td.outline
509
+ },
510
+ breakpoint: e.value.table.responsiveBreakpoint
511
+ };
512
+ return {
513
+ colNames: [
514
+ e.value.table.columnNames.series,
515
+ e.value.table.columnNames.value
516
+ ],
517
+ head: t,
518
+ body: o,
519
+ config: l
520
+ };
521
+ });
522
+ function $t() {
523
+ return re.value;
524
+ }
525
+ function tt() {
526
+ R.value.showTable = !R.value.showTable;
527
+ }
528
+ function lt() {
529
+ R.value.showTooltip = !R.value.showTooltip;
530
+ }
531
+ const he = $(!1);
532
+ function $e() {
533
+ he.value = !he.value;
534
+ }
535
+ const pe = $(null);
536
+ function ot(t) {
537
+ pe.value = t;
538
+ }
539
+ function at() {
540
+ pe.value = null;
541
+ }
542
+ return r({
543
+ getData: $t,
544
+ generateCsv: et,
545
+ generateImage: qe,
546
+ generatePdf: Ee,
547
+ toggleTable: tt,
548
+ toggleTooltip: lt,
549
+ toggleAnnotator: $e
550
+ }), (t, o) => (v(), y("div", {
551
+ ref_key: "treemapChart",
552
+ ref: se,
553
+ class: xe(`vue-ui-treemap ${te.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
554
+ style: M(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height: 100%;" : ""} text-align:center;background:${e.value.style.chart.backgroundColor}`),
555
+ id: `treemap_${A.value}`,
556
+ onMouseenter: o[3] || (o[3] = () => d(De)(!0)),
557
+ onMouseleave: o[4] || (o[4] = () => d(De)(!1))
558
+ }, [
559
+ e.value.userOptions.buttons.annotator ? (v(), Z(d(u), {
560
+ key: 0,
561
+ svgRef: d(Be),
562
+ backgroundColor: e.value.style.chart.backgroundColor,
563
+ color: e.value.style.chart.color,
564
+ active: he.value,
565
+ onClose: $e
566
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : O("", !0),
567
+ gt.value ? (v(), y("div", {
568
+ key: 1,
569
+ ref_key: "noTitle",
570
+ ref: Pe,
571
+ class: "vue-data-ui-no-title-space",
572
+ style: "height:36px; width: 100%;background:transparent"
573
+ }, null, 512)) : O("", !0),
574
+ e.value.style.chart.title.text ? (v(), y("div", {
575
+ key: 2,
576
+ ref_key: "chartTitle",
577
+ ref: Ne,
578
+ style: M(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:6px`)
579
+ }, [
580
+ (v(), Z(Gt, {
581
+ key: `title_${Re.value}`,
582
+ config: {
583
+ title: {
584
+ cy: "treemap-div-title",
585
+ ...e.value.style.chart.title
586
+ },
587
+ subtitle: {
588
+ cy: "treemap-div-subtitle",
589
+ ...e.value.style.chart.title.subtitle
590
+ }
591
+ }
592
+ }, null, 8, ["config"]))
593
+ ], 4)) : O("", !0),
594
+ e.value.userOptions.show && x.value && (d(Ve) || d(we)) ? (v(), Z(d(p), {
595
+ ref: "details",
596
+ key: `user_option_${Fe.value}`,
597
+ backgroundColor: e.value.style.chart.backgroundColor,
598
+ color: e.value.style.chart.color,
599
+ isPrinting: d(Ue),
600
+ isImaging: d(We),
601
+ uid: A.value,
602
+ hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
603
+ hasPdf: e.value.userOptions.buttons.pdf,
604
+ hasXls: e.value.userOptions.buttons.csv,
605
+ hasImg: e.value.userOptions.buttons.img,
606
+ hasTable: e.value.userOptions.buttons.table,
607
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
608
+ isFullscreen: te.value,
609
+ isTooltip: R.value.showTooltip,
610
+ titles: { ...e.value.userOptions.buttonTitles },
611
+ chartElement: se.value,
612
+ position: e.value.userOptions.position,
613
+ hasAnnotator: e.value.userOptions.buttons.annotator,
614
+ isAnnotation: he.value,
615
+ callbacks: e.value.userOptions.callbacks,
616
+ printScale: e.value.userOptions.print.scale,
617
+ onToggleFullscreen: bt,
618
+ onGeneratePdf: d(Ee),
619
+ onGenerateCsv: et,
620
+ onGenerateImage: d(qe),
621
+ onToggleTable: tt,
622
+ onToggleTooltip: lt,
623
+ onToggleAnnotator: $e,
624
+ style: M({
625
+ visibility: d(Ve) ? d(we) ? "visible" : "hidden" : "visible"
626
+ })
627
+ }, St({ _: 2 }, [
628
+ t.$slots.menuIcon ? {
629
+ name: "menuIcon",
630
+ fn: T(({ isOpen: l, color: a }) => [
631
+ k(t.$slots, "menuIcon", J(Q({ isOpen: l, color: a })), void 0, !0)
632
+ ]),
633
+ key: "0"
634
+ } : void 0,
635
+ t.$slots.optionTooltip ? {
636
+ name: "optionTooltip",
637
+ fn: T(() => [
638
+ k(t.$slots, "optionTooltip", {}, void 0, !0)
639
+ ]),
640
+ key: "1"
641
+ } : void 0,
642
+ t.$slots.optionPdf ? {
643
+ name: "optionPdf",
644
+ fn: T(() => [
645
+ k(t.$slots, "optionPdf", {}, void 0, !0)
646
+ ]),
647
+ key: "2"
648
+ } : void 0,
649
+ t.$slots.optionCsv ? {
650
+ name: "optionCsv",
651
+ fn: T(() => [
652
+ k(t.$slots, "optionCsv", {}, void 0, !0)
653
+ ]),
654
+ key: "3"
655
+ } : void 0,
656
+ t.$slots.optionImg ? {
657
+ name: "optionImg",
658
+ fn: T(() => [
659
+ k(t.$slots, "optionImg", {}, void 0, !0)
660
+ ]),
661
+ key: "4"
662
+ } : void 0,
663
+ t.$slots.optionTable ? {
664
+ name: "optionTable",
665
+ fn: T(() => [
666
+ k(t.$slots, "optionTable", {}, void 0, !0)
667
+ ]),
668
+ key: "5"
669
+ } : void 0,
670
+ t.$slots.optionFullscreen ? {
671
+ name: "optionFullscreen",
672
+ fn: T(({ toggleFullscreen: l, isFullscreen: a }) => [
673
+ k(t.$slots, "optionFullscreen", J(Q({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
674
+ ]),
675
+ key: "6"
676
+ } : void 0,
677
+ t.$slots.optionAnnotator ? {
678
+ name: "optionAnnotator",
679
+ fn: T(({ toggleAnnotator: l, isAnnotator: a }) => [
680
+ k(t.$slots, "optionAnnotator", J(Q({ toggleAnnotator: l, isAnnotator: a })), void 0, !0)
681
+ ]),
682
+ key: "7"
683
+ } : void 0
684
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : O("", !0),
685
+ q.value.length > 1 ? (v(), y("nav", al, [
686
+ (v(!0), y(ge, null, Oe(q.value, (l, a) => (v(), y("span", {
687
+ role: "button",
688
+ tabindex: a < q.value.length - 1 ? 0 : void 0,
689
+ key: l.id || "root",
690
+ onClick: (f) => a === q.value.length - 1 ? () => {
691
+ } : de(l.node),
692
+ onKeydown: [
693
+ st(_e((f) => a === q.value.length - 1 ? void 0 : de(l.node), ["prevent"]), ["enter"]),
694
+ st(_e((f) => a === q.value.length - 1 ? void 0 : de(l.node), ["prevent"]), ["space"])
695
+ ],
696
+ class: "vue-ui-treemap-crumb",
697
+ "data-last-crumb": a === q.value.length - 1,
698
+ style: M({
699
+ color: e.value.style.chart.color
700
+ }),
701
+ onMouseenter: (f) => ot(a),
702
+ onMouseleave: at,
703
+ onFocus: (f) => ot(a),
704
+ onBlur: at
705
+ }, [
706
+ _("span", sl, [
707
+ _("span", ul, [
708
+ k(t.$slots, "breadcrumb-label", ut({ ref_for: !0 }, { crumb: l, isRoot: a === 0, isFocus: pe.value === a }), () => [
709
+ a === 0 ? (v(), y("div", rl, [
710
+ Te(qt, {
711
+ name: pe.value === 0 ? "homeFilled" : "home",
712
+ stroke: e.value.style.chart.color
713
+ }, null, 8, ["name", "stroke"])
714
+ ])) : (v(), y(ge, { key: 1 }, [
715
+ ye(ee(l.label), 1)
716
+ ], 64))
717
+ ], !0)
718
+ ]),
719
+ a < q.value.length - 1 ? (v(), y("span", il, [
720
+ k(t.$slots, "breadcrumb-arrow", {}, () => [
721
+ o[5] || (o[5] = ye(" › "))
722
+ ], !0)
723
+ ])) : O("", !0)
724
+ ])
725
+ ], 44, nl))), 128))
726
+ ])) : O("", !0),
727
+ x.value ? (v(), y("svg", {
728
+ key: 5,
729
+ ref_key: "svgRef",
730
+ ref: Be,
731
+ xmlns: d(Lt),
732
+ class: xe({ "vue-data-ui-fullscreen--on": te.value, "vue-data-ui-fulscreen--off": !te.value, "vue-data-ui-zoom-plus": !Y.value, "vue-data-ui-zoom-minus": Y.value }),
733
+ viewBox: `${ne.value.startX} ${ne.value.startY} ${ne.value.width <= 0 ? 10 : ne.value.width} ${ne.value.height <= 0 ? 10 : ne.value.height}`,
734
+ style: M(`max-width:100%; overflow: hidden; background:transparent;color:${e.value.style.chart.color}`)
735
+ }, [
736
+ Te(d(H)),
737
+ (v(!0), y(ge, null, Oe(re.value, (l, a) => (v(), y("g", {
738
+ key: `tgrad_${l.id}`
739
+ }, [
740
+ e.value.style.chart.layout.rects.gradient.show ? (v(), y("defs", dl, [
741
+ _("radialGradient", {
742
+ id: `tgrad_${l.id}`,
743
+ gradientTransform: "translate(-1, -1.000001) scale(2, 2)"
744
+ }, [
745
+ _("stop", {
746
+ offset: "18%",
747
+ "stop-color": l.color
748
+ }, null, 8, hl),
749
+ _("stop", {
750
+ offset: "100%",
751
+ "stop-color": d(rt)(l.color, e.value.style.chart.layout.rects.gradient.intensity / 100)
752
+ }, null, 8, pl)
753
+ ], 8, vl)
754
+ ])) : O("", !0)
755
+ ]))), 128)),
756
+ (v(!0), y(ge, null, Oe(re.value, (l, a) => (v(), y("g", {
757
+ key: `k_${l.id}`
758
+ }, [
759
+ _("rect", {
760
+ x: l.x0,
761
+ y: l.y0,
762
+ height: Ke(l),
763
+ width: Ze(l),
764
+ fill: D.value ? l.color : e.value.style.chart.layout.rects.gradient.show ? `url(#tgrad_${l.id})` : l.color,
765
+ rx: e.value.style.chart.layout.rects.borderRadius,
766
+ stroke: L.value && L.value.id === l.id ? e.value.style.chart.layout.rects.selected.stroke : e.value.style.chart.layout.rects.stroke,
767
+ "stroke-width": L.value && L.value.id === l.id ? e.value.style.chart.layout.rects.selected.strokeWidth : e.value.style.chart.layout.rects.strokeWidth,
768
+ onClick: _e((f) => de(l), ["stop"]),
769
+ onMouseenter: () => Ct({
770
+ datapoint: l,
771
+ seriesIndex: a
772
+ }),
773
+ onMouseleave: o[0] || (o[0] = (f) => {
774
+ L.value = null, N.value = !1;
775
+ }),
776
+ style: M(`opacity:${L.value ? L.value.id === l.id ? 1 : e.value.style.chart.layout.rects.selected.unselectedOpacity : 1}`),
777
+ class: xe([
778
+ "vue-ui-treemap-rect",
779
+ kt(l) ? "vue-data-ui-zoom-plus" : Y.value ? "vue-data-ui-zoom-minus" : ""
780
+ ])
781
+ }, null, 46, fl),
782
+ (v(), y("foreignObject", {
783
+ x: l.x0,
784
+ y: l.y0,
785
+ height: Ke(l),
786
+ width: Ze(l),
787
+ class: "vue-ui-treemap-cell-foreignObject"
788
+ }, [
789
+ _("div", yl, [
790
+ e.value.style.chart.layout.labels.showDefaultLabels && (l.proportion > e.value.style.chart.layout.labels.hideUnderProportion || Y.value) ? (v(), y("div", {
791
+ key: 0,
792
+ class: "vue-ui-treemap-cell-default",
793
+ style: M(`width:calc(100% - ${X(l) / 1.5}px);text-align:left;line-height:${X(l) < 14 ? 14 : X(l)}px;padding:${X(l) / 3}px; color:${d(it)(l.color)}`)
794
+ }, [
795
+ _("span", {
796
+ style: M(`width:100%;font-size:${X(l)}px;`)
797
+ }, ee(l.name), 5),
798
+ o[6] || (o[6] = _("br", null, null, -1)),
799
+ _("span", {
800
+ style: M(`width:100%;font-size:${X(l)}px;`)
801
+ }, ee(d(be)(
802
+ e.value.style.chart.layout.labels.formatter,
803
+ l.value,
804
+ d(ie)({
805
+ p: e.value.style.chart.layout.labels.prefix,
806
+ v: l.value,
807
+ s: e.value.style.chart.layout.labels.suffix,
808
+ r: e.value.style.chart.layout.labels.rounding
809
+ }),
810
+ { datapoint: l }
811
+ )), 5)
812
+ ], 4)) : O("", !0),
813
+ k(t.$slots, "rect", ut({ ref_for: !0 }, {
814
+ rect: l,
815
+ shouldShow: l.proportion > e.value.style.chart.layout.labels.hideUnderProportion || Y.value,
816
+ fontSize: X(l),
817
+ isZoom: Y.value,
818
+ textColor: d(it)(l.color)
819
+ }), void 0, !0)
820
+ ])
821
+ ], 8, gl))
822
+ ]))), 128)),
823
+ k(t.$slots, "svg", J(Q({ svg: G.value, isZoom: Y.value, rect: L.value, config: e.value })), void 0, !0)
824
+ ], 14, cl)) : O("", !0),
825
+ t.$slots.watermark ? (v(), y("div", ml, [
826
+ k(t.$slots, "watermark", J(Q({ isPrinting: d(Ue) || d(We) })), void 0, !0)
827
+ ])) : O("", !0),
828
+ x.value ? O("", !0) : (v(), Z(d(c), {
829
+ key: 7,
830
+ config: {
831
+ type: "treemap",
832
+ style: {
833
+ backgroundColor: e.value.style.chart.backgroundColor,
834
+ treemap: {
835
+ color: "#CCCCCC"
836
+ }
837
+ }
838
+ }
839
+ }, null, 8, ["config"])),
840
+ _("div", {
841
+ ref_key: "chartLegend",
842
+ ref: ze
843
+ }, [
844
+ e.value.style.chart.legend.show ? (v(), Z(Xt, {
845
+ key: `legend_${Me.value}`,
846
+ legendSet: Je.value,
847
+ config: wt.value,
848
+ id: `treemap_legend_${A.value}`,
849
+ onClickMarker: o[1] || (o[1] = ({ legend: l }) => Qe(l))
850
+ }, {
851
+ item: T(({ legend: l, index: a }) => [
852
+ _("div", {
853
+ onClick: (f) => Qe(l),
854
+ style: M(`opacity:${P.value.includes(l.id) ? 0.5 : 1}`)
855
+ }, [
856
+ ye(ee(l.name) + ": " + ee(d(be)(
857
+ e.value.style.chart.layout.labels.formatter,
858
+ l.value,
859
+ d(ie)({
860
+ p: e.value.style.chart.layout.labels.prefix,
861
+ v: l.value,
862
+ s: e.value.style.chart.layout.labels.suffix,
863
+ r: e.value.style.chart.legend.roundingValue
864
+ }),
865
+ { datapoint: l }
866
+ )) + " ", 1),
867
+ P.value.includes(l.id) ? (v(), y("span", wl, " ( - % ) ")) : (v(), y("span", kl, " (" + ee(isNaN(l.value / ae.value) ? "-" : (l.value / ae.value * 100).toFixed(e.value.style.chart.legend.roundingPercentage)) + "%) ", 1))
868
+ ], 12, bl)
869
+ ]),
870
+ _: 1
871
+ }, 8, ["legendSet", "config", "id"])) : k(t.$slots, "legend", {
872
+ key: 1,
873
+ legend: Je.value
874
+ }, void 0, !0)
875
+ ], 512),
876
+ t.$slots.source ? (v(), y("div", {
877
+ key: 8,
878
+ ref_key: "source",
879
+ ref: Ae,
880
+ dir: "auto"
881
+ }, [
882
+ k(t.$slots, "source", {}, void 0, !0)
883
+ ], 512)) : O("", !0),
884
+ Te(d(g), {
885
+ show: R.value.showTooltip && N.value,
886
+ backgroundColor: e.value.style.chart.tooltip.backgroundColor,
887
+ color: e.value.style.chart.tooltip.color,
888
+ fontSize: e.value.style.chart.tooltip.fontSize,
889
+ borderRadius: e.value.style.chart.tooltip.borderRadius,
890
+ borderColor: e.value.style.chart.tooltip.borderColor,
891
+ borderWidth: e.value.style.chart.tooltip.borderWidth,
892
+ backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
893
+ position: e.value.style.chart.tooltip.position,
894
+ offsetY: e.value.style.chart.tooltip.offsetY,
895
+ parent: se.value,
896
+ content: ke.value,
897
+ isFullscreen: te.value,
898
+ isCustom: d(ct)(e.value.style.chart.tooltip.customFormat)
899
+ }, {
900
+ "tooltip-before": T(() => [
901
+ k(t.$slots, "tooltip-before", J(Q({ ...Ce.value })), void 0, !0)
902
+ ]),
903
+ "tooltip-after": T(() => [
904
+ k(t.$slots, "tooltip-after", J(Q({ ...Ce.value })), void 0, !0)
905
+ ]),
906
+ _: 3
907
+ }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
908
+ x.value ? (v(), Z(d(h), {
909
+ key: 9,
910
+ hideDetails: "",
911
+ config: {
912
+ open: R.value.showTable,
913
+ maxHeight: 1e4,
914
+ body: {
915
+ backgroundColor: e.value.style.chart.backgroundColor,
916
+ color: e.value.style.chart.color
917
+ },
918
+ head: {
919
+ backgroundColor: e.value.style.chart.backgroundColor,
920
+ color: e.value.style.chart.color
921
+ }
922
+ }
923
+ }, {
924
+ content: T(() => [
925
+ (v(), Z(d(i), {
926
+ key: `table_${Le.value}`,
927
+ colNames: ve.value.colNames,
928
+ head: ve.value.head,
929
+ body: ve.value.body,
930
+ config: ve.value.config,
931
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
932
+ onClose: o[2] || (o[2] = (l) => R.value.showTable = !1)
933
+ }, {
934
+ th: T(({ th: l }) => [
935
+ _("div", {
936
+ innerHTML: l,
937
+ style: { display: "flex", "align-items": "center" }
938
+ }, null, 8, Cl)
939
+ ]),
940
+ td: T(({ td: l }) => [
941
+ ye(ee(l.name || l), 1)
942
+ ]),
943
+ _: 1
944
+ }, 8, ["colNames", "head", "body", "config", "title"]))
945
+ ]),
946
+ _: 1
947
+ }, 8, ["config"])) : O("", !0)
948
+ ], 46, ol));
949
+ }
950
+ }, Rl = /* @__PURE__ */ jt($l, [["__scopeId", "data-v-3d2858c1"]]);
951
+ export {
952
+ Rl as default
953
+ };