vue-data-ui 2.12.6 → 2.12.7-beta.0

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 (109) hide show
  1. package/dist/{Arrow-Bd9ZVBnX.js → Arrow-CmqjRRUl.js} +1 -1
  2. package/dist/BaseDraggableDialog-BMlyvt7E.js +180 -0
  3. package/dist/{BaseIcon-CNbwMh_-.js → BaseIcon-CZdMutjs.js} +1 -1
  4. package/dist/{ColorPicker-B_FoQwtO.js → ColorPicker-DvVKgyAl.js} +23 -24
  5. package/dist/{DataTable-Rajdtaf6.js → DataTable-Cv9CIz-a.js} +11 -11
  6. package/dist/{Legend-BxtDQCIv.js → Legend-DFunFf8i.js} +8 -8
  7. package/dist/NonSvgPenAndPaper-pVuHj6_A.js +467 -0
  8. package/dist/PackageVersion-CLY-udAA.js +10 -0
  9. package/dist/{PenAndPaper-BkP3J-Ft.js → PenAndPaper-B9na2mbr.js} +8 -10
  10. package/dist/RecursiveCircles-Dn3TGoL6.js +96 -0
  11. package/dist/RecursiveLabels-NTMB9w5C.js +49 -0
  12. package/dist/RecursiveLinks-ld_gDZH4.js +64 -0
  13. package/dist/{Shape-C69a0f29.js → Shape-D3w9qas1.js} +2 -2
  14. package/dist/{Slicer-7qFdY-bT.js → Slicer-ncY8krrM.js} +2 -2
  15. package/dist/SparkTooltip-CwThutH2.js +68 -0
  16. package/dist/{Title-CzaCeCOm.js → Title-B5qqUI3M.js} +2 -2
  17. package/dist/Tooltip-C9rxJ-Ru.js +149 -0
  18. package/dist/{usePrinter-C5bLp34h.js → UserOptions-Ddy6CuLC.js} +172 -231
  19. package/dist/{dom-to-png-Bm0D0yPL.js → dom-to-png-DDlooC9r.js} +1 -1
  20. package/dist/{img-BN9AzqUr.js → img-m9g7lR5d.js} +1 -1
  21. package/dist/{index-BFzQMJda.js → index-BiHmNd1-.js} +21 -21
  22. package/dist/{pdf-uTbs813M.js → pdf-BqM953uL.js} +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/useChartAccessibility-9icAAmYg.js +12 -0
  25. package/dist/useMouse-AicQS8Vf.js +13 -0
  26. package/dist/{useNestedProp-v7KPpwuP.js → useNestedProp-tRqS0ZAM.js} +1 -1
  27. package/dist/{usePanZoom-CUkkqW81.js → usePanZoom-BQMvRXEQ.js} +16 -17
  28. package/dist/usePrinter-CRCbl1WG.js +53 -0
  29. package/dist/vClickOutside-C6WiFswA.js +13 -0
  30. package/dist/{vue-data-ui-D1k8FeRp.js → vue-data-ui-D9uTDt73.js} +63 -63
  31. package/dist/vue-data-ui.js +19 -19
  32. package/dist/{vue-ui-3d-bar-DoklA4DT.js → vue-ui-3d-bar-rtuSc8FS.js} +397 -402
  33. package/dist/{vue-ui-accordion-BUz4JIIX.js → vue-ui-accordion-CmCs2yR2.js} +3 -3
  34. package/dist/{vue-ui-age-pyramid-4kyBq-Dy.js → vue-ui-age-pyramid-BrzMSiyu.js} +215 -218
  35. package/dist/{vue-ui-annotator-Bq1ZeFfb.js → vue-ui-annotator-CYxmTpf6.js} +2 -2
  36. package/dist/{vue-ui-bullet-DU10avvA.js → vue-ui-bullet-D25qNQfb.js} +137 -140
  37. package/dist/{vue-ui-candlestick-BI1t3flz.js → vue-ui-candlestick-BuerNa-r.js} +265 -271
  38. package/dist/{vue-ui-carousel-table-VowLf_oc.js → vue-ui-carousel-table-aN0HLsOO.js} +137 -137
  39. package/dist/{vue-ui-chestnut-BHjV3d94.js → vue-ui-chestnut-oUj2ocsZ.js} +397 -400
  40. package/dist/{vue-ui-chord-CPr7r-2_.js → vue-ui-chord-C4evlXYB.js} +356 -365
  41. package/dist/vue-ui-circle-pack-CWrNiKTY.js +656 -0
  42. package/dist/{vue-ui-cursor-C9teAbVI.js → vue-ui-cursor-DgpSttlt.js} +2 -2
  43. package/dist/{vue-ui-dashboard-CwDYB8tP.js → vue-ui-dashboard-BN2ha1Eh.js} +62 -62
  44. package/dist/{vue-ui-digits-CHmkL0hn.js → vue-ui-digits-BhjAxXgm.js} +2 -2
  45. package/dist/vue-ui-donut-D3_z61HI.js +1291 -0
  46. package/dist/vue-ui-donut-evolution-oKtmZPx4.js +864 -0
  47. package/dist/{vue-ui-dumbbell-DTKLLd1N.js → vue-ui-dumbbell-C8Lokx-F.js} +265 -270
  48. package/dist/{vue-ui-flow-BLBhsU2n.js → vue-ui-flow-BVRkH0PS.js} +291 -300
  49. package/dist/{vue-ui-funnel-CIrWdeBk.js → vue-ui-funnel-DFxcmAB5.js} +216 -219
  50. package/dist/{vue-ui-galaxy-ByhKyIV4.js → vue-ui-galaxy-CGE0hlBC.js} +227 -235
  51. package/dist/{vue-ui-gauge-BbfBMpng.js → vue-ui-gauge-B48eMvOR.js} +240 -243
  52. package/dist/{vue-ui-gizmo-BM-_QfHM.js → vue-ui-gizmo-zTKNpjvv.js} +57 -58
  53. package/dist/{vue-ui-heatmap-BA4z4hsw.js → vue-ui-heatmap-UNfTt8SM.js} +239 -242
  54. package/dist/{vue-ui-history-plot-8vM_IUy8.js → vue-ui-history-plot-CbCWmvtg.js} +257 -262
  55. package/dist/{vue-ui-kpi-D57QLK6A.js → vue-ui-kpi-Drf_lrlh.js} +29 -30
  56. package/dist/{vue-ui-mini-loader-CR4c-xJQ.js → vue-ui-mini-loader-DU3G6BVs.js} +2 -2
  57. package/dist/vue-ui-molecule-B5MOXYEA.js +580 -0
  58. package/dist/{vue-ui-mood-radar-Brc9cxoD.js → vue-ui-mood-radar-CC_CVLvn.js} +180 -186
  59. package/dist/{vue-ui-nested-donuts-W3Z5F--L.js → vue-ui-nested-donuts-D_H962kk.js} +366 -374
  60. package/dist/{vue-ui-onion-BNBlGNlF.js → vue-ui-onion-P8k6T724.js} +252 -258
  61. package/dist/{vue-ui-parallel-coordinate-plot-B5G3jyvg.js → vue-ui-parallel-coordinate-plot-B5Los0vX.js} +296 -303
  62. package/dist/{vue-ui-quadrant-CUy9mVIA.js → vue-ui-quadrant-B3wzCTxK.js} +402 -409
  63. package/dist/{vue-ui-quick-chart-D4_8mRXU.js → vue-ui-quick-chart-oucj6hXk.js} +611 -616
  64. package/dist/{vue-ui-radar-BUk56jGL.js → vue-ui-radar-Cjqlyu6d.js} +270 -277
  65. package/dist/{vue-ui-rating-B9TQl5KP.js → vue-ui-rating-gryk_h_6.js} +2 -2
  66. package/dist/vue-ui-relation-circle-ielvWC-1.js +525 -0
  67. package/dist/{vue-ui-ridgeline-Cl06bGom.js → vue-ui-ridgeline-Dydqo68b.js} +321 -326
  68. package/dist/{vue-ui-rings-B6bpFlFp.js → vue-ui-rings-BRBXektJ.js} +262 -269
  69. package/dist/{vue-ui-scatter--WUuVw5G.js → vue-ui-scatter-Df-BM7Ts.js} +372 -379
  70. package/dist/{vue-ui-skeleton-B_YI7Yuc.js → vue-ui-skeleton-CbYQYRvD.js} +19 -19
  71. package/dist/{vue-ui-smiley-Bbam2fDz.js → vue-ui-smiley-BfHaQMaW.js} +2 -2
  72. package/dist/{vue-ui-spark-trend-DavXuwGt.js → vue-ui-spark-trend-z3fUChs_.js} +114 -117
  73. package/dist/{vue-ui-sparkbar-9N1FU9-J.js → vue-ui-sparkbar-ChtFIugH.js} +104 -106
  74. package/dist/{vue-ui-sparkgauge-_9ntq4EK.js → vue-ui-sparkgauge-DtpODCww.js} +72 -74
  75. package/dist/{vue-ui-sparkhistogram-BEzOV4HV.js → vue-ui-sparkhistogram-C3XnYiXI.js} +83 -86
  76. package/dist/vue-ui-sparkline-CoL8jiX8.js +459 -0
  77. package/dist/{vue-ui-sparkstackbar-BSWcs3v0.js → vue-ui-sparkstackbar-CYk3mZJH.js} +102 -105
  78. package/dist/{vue-ui-stackbar-gG5BLlAr.js → vue-ui-stackbar-D9LGbuG5.js} +433 -437
  79. package/dist/{vue-ui-strip-plot-BJouRmxh.js → vue-ui-strip-plot-C5r1Ee2R.js} +245 -252
  80. package/dist/{vue-ui-table-D9Ry8s4N.js → vue-ui-table-DBaT_TfA.js} +3 -3
  81. package/dist/{vue-ui-table-heatmap-Bizzpi31.js → vue-ui-table-heatmap-CYW4YfKN.js} +93 -94
  82. package/dist/{vue-ui-table-sparkline-Dg54Ovs2.js → vue-ui-table-sparkline-Di0MYR4p.js} +212 -212
  83. package/dist/{vue-ui-thermometer-6MSdF_Gm.js → vue-ui-thermometer-BF1btHY2.js} +154 -157
  84. package/dist/{vue-ui-timer-ByaKokk8.js → vue-ui-timer-D9FfRWN5.js} +180 -181
  85. package/dist/vue-ui-tiremarks-CQ0lk8fJ.js +341 -0
  86. package/dist/vue-ui-treemap-1Lx7YRtc.js +947 -0
  87. package/dist/{vue-ui-vertical-bar-CE4oBwBv.js → vue-ui-vertical-bar-DdVVQ1ED.js} +397 -403
  88. package/dist/{vue-ui-waffle-DNEEnY_G.js → vue-ui-waffle-BhnuPiRD.js} +317 -324
  89. package/dist/vue-ui-wheel-BIjJ0fg8.js +335 -0
  90. package/dist/vue-ui-word-cloud-3-r8HwO_.js +642 -0
  91. package/dist/{vue-ui-world-Brhq17TE.js → vue-ui-world-CPIGEswq.js} +430 -442
  92. package/dist/{vue-ui-xy-K2G7QQxG.js → vue-ui-xy-9e_epIN4.js} +845 -846
  93. package/dist/vue-ui-xy-canvas-DcGgQ7s4.js +1206 -0
  94. package/package.json +6 -6
  95. package/dist/BaseDraggableDialog-Bzwlfmy1.js +0 -186
  96. package/dist/PackageVersion-BjrblLPQ.js +0 -10
  97. package/dist/Tooltip-CWmRmhJr.js +0 -158
  98. package/dist/useChartAccessibility-BWojgys7.js +0 -13
  99. package/dist/vue-ui-circle-pack-D_jYpsuD.js +0 -659
  100. package/dist/vue-ui-donut-WRUDvvZa.js +0 -1292
  101. package/dist/vue-ui-donut-evolution-BQxV5D_L.js +0 -871
  102. package/dist/vue-ui-molecule-Bq69N7rC.js +0 -782
  103. package/dist/vue-ui-relation-circle-T6aTibIU.js +0 -528
  104. package/dist/vue-ui-sparkline-D__GCUAz.js +0 -519
  105. package/dist/vue-ui-tiremarks-Z8pjUT1g.js +0 -344
  106. package/dist/vue-ui-treemap-pRJ3be5l.js +0 -956
  107. package/dist/vue-ui-wheel-DWPYZxdT.js +0 -338
  108. package/dist/vue-ui-word-cloud-DAR7R8F8.js +0 -648
  109. package/dist/vue-ui-xy-canvas-ml44sPHS.js +0 -1673
@@ -0,0 +1,947 @@
1
+ import { defineAsyncComponent as K, useSlots as Tt, onMounted as at, computed as b, ref as $, shallowRef as V, watch as Ot, onBeforeUnmount as _t, createElementBlock as y, openBlock as v, unref as d, normalizeStyle as L, 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 nt, withModifiers as _e, mergeProps as st, createTextVNode as ye, toDisplayString as ee, nextTick as It } from "vue";
2
+ import { u as Nt, c as ut, t as zt, p as S, a as At, b as Ft, o as Pt, e as Rt, d as me, i as be, f as ie, X as Lt, l as rt, G as it, x as ct, q as Mt, r as Dt, y as Vt } from "./index-BiHmNd1-.js";
3
+ import { t as Bt, u as Ht } from "./useResponsive-JZ9xq-JV.js";
4
+ import { u as dt } from "./useNestedProp-tRqS0ZAM.js";
5
+ import { u as Ut } from "./usePrinter-CRCbl1WG.js";
6
+ import { u as Wt } from "./useUserOptionState-BIvW1Kz7.js";
7
+ import { u as Et } from "./useChartAccessibility-9icAAmYg.js";
8
+ import Gt from "./BaseIcon-CZdMutjs.js";
9
+ import qt from "./Title-B5qqUI3M.js";
10
+ import Xt from "./Legend-DFunFf8i.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 } = Se(r), c = n.length, g = n.map((m) => m.normalizedValue || 0).reduce((m, x) => m + x, 0), p = g / i, B = 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], M = w + x.normalizedValue / p, A = {
74
+ x0: z,
75
+ y0: w,
76
+ x1: z + p,
77
+ y1: M
78
+ }, N = Object.assign({}, x, A);
79
+ w = M, C.push(N);
80
+ }
81
+ return C;
82
+ } else {
83
+ for (let m = 0; m < c; m += 1) {
84
+ const x = n[m], M = z + x.normalizedValue / B, A = {
85
+ x0: z,
86
+ y0: w,
87
+ x1: M,
88
+ y1: w + B
89
+ }, N = Object.assign({}, x, A);
90
+ z = M, C.push(N);
91
+ }
92
+ return C;
93
+ }
94
+ }
95
+ function Qt(n) {
96
+ const r = Se(n), s = r.width, i = r.height;
97
+ return Math.min(s, i);
98
+ }
99
+ function eo(n, r) {
100
+ const s = n.length, i = n.map((p) => p.value ?? 0).reduce((p, B) => p + B, 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 Se(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 to(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 B = Qt(c), z = u[0], w = u.slice(1, p);
126
+ if (Yt(h, z, B)) {
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 = oo(c, m), M = pt(h, c), A = g.concat(M);
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 = eo(
144
+ n.children,
145
+ Jt(n)
146
+ ), s = to(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 oo(n, r) {
153
+ const { width: s, height: i, xOffset: u, yOffset: h } = Se(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 lo = ["id"], ao = {
173
+ key: 4,
174
+ class: "vue-ui-treemap-breadcrumbs",
175
+ "data-dom-to-png-ignore": ""
176
+ }, no = ["tabindex", "onClick", "onKeydown", "data-last-crumb", "onMouseenter", "onFocus"], so = { class: "vue-ui-treemap-crumb-unit" }, uo = { class: "vue-ui-treemap-crumb-unit-label" }, ro = {
177
+ key: 0,
178
+ style: { width: "24px", display: "flex", "align-items": "center" }
179
+ }, io = {
180
+ key: 0,
181
+ class: "vue-ui-treemap-crumb-unit-arrow"
182
+ }, co = ["xmlns", "viewBox"], vo = { key: 0 }, ho = ["id"], po = ["stop-color"], fo = ["stop-color"], go = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width", "onClick", "onMouseenter"], yo = ["x", "y", "height", "width"], mo = {
183
+ style: { width: "100%", height: "100%" },
184
+ class: "vue-ui-treemap-cell"
185
+ }, bo = {
186
+ key: 6,
187
+ class: "vue-data-ui-watermark"
188
+ }, ko = ["onClick"], wo = { key: 0 }, Co = { key: 1 }, $o = ["innerHTML"], xo = {
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-Cv9CIz-a.js")), u = K(() => import("./PenAndPaper-B9na2mbr.js")), h = K(() => import("./vue-ui-accordion-CmCs2yR2.js")), c = K(() => import("./vue-ui-skeleton-CbYQYRvD.js")), g = K(() => import("./Tooltip-C9rxJ-Ru.js")), p = K(() => import("./UserOptions-Ddy6CuLC.js")), B = K(() => import("./PackageVersion-CLY-udAA.js")), { vue_ui_treemap: z } = Nt(), w = n, C = s, m = Tt();
207
+ at(() => {
208
+ m["chart-background"] && console.warn("VueUiTreemap does not support the #chart-background slot.");
209
+ });
210
+ const x = b(() => !!w.dataset && w.dataset.length), M = b(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), A = $(ut()), N = $(!1), ke = $(""), te = $(!1), Ie = $(0), F = $([]), se = V(null), Ne = V(null), ze = V(null), Ae = V(null), Fe = V(null), Pe = $(0), Re = $(0), Le = $(0), t = b({
211
+ get: () => Be(),
212
+ set: (e) => e
213
+ }), { userOptionsVisible: we, setUserOptionsVisibility: Me, keepUserOptionState: De } = Wt({ config: t.value }), { svgRef: Ve } = Et({ config: t.value.style.chart.title });
214
+ function Be() {
215
+ const e = dt({
216
+ userConfig: w.config,
217
+ defaultConfig: z
218
+ });
219
+ return e.theme ? {
220
+ ...dt({
221
+ userConfig: At.vue_ui_treemap[e.theme] || w.config,
222
+ defaultConfig: e
223
+ }),
224
+ customPalette: zt[e.theme] || S
225
+ } : e;
226
+ }
227
+ Ot(() => w.config, (e) => {
228
+ t.value = Be(), we.value = !t.value.userOptions.showOnChartHover, Pe.value += 1, Re.value += 1, Le.value += 1, P.value.showTable = t.value.table.show, P.value.showTooltip = t.value.style.chart.tooltip.show;
229
+ }, { deep: !0 });
230
+ const { isPrinting: He, isImaging: Ue, generatePdf: We, generateImage: Ee } = Ut({
231
+ elementId: `treemap_${A.value}`,
232
+ fileName: t.value.style.chart.title.text || "vue-ui-treemap",
233
+ options: t.value.userOptions.print
234
+ }), gt = b(() => t.value.userOptions.show && !t.value.style.chart.title.text), ce = b(() => Ft(t.value.customPalette)), P = $({
235
+ showTable: t.value.table.show,
236
+ showTooltip: t.value.style.chart.tooltip.show
237
+ }), H = $({
238
+ height: t.value.style.chart.height,
239
+ width: t.value.style.chart.width
240
+ }), q = b(() => ({
241
+ bottom: H.value.height - t.value.style.chart.padding.bottom,
242
+ height: H.value.height - t.value.style.chart.padding.top - t.value.style.chart.padding.bottom,
243
+ left: t.value.style.chart.padding.left,
244
+ right: H.value.width - t.value.style.chart.padding.right,
245
+ top: t.value.style.chart.padding.top,
246
+ vbHeight: H.value.height,
247
+ vbWidth: H.value.width,
248
+ width: H.value.width - t.value.style.chart.padding.left - t.value.style.chart.padding.right
249
+ }));
250
+ function Ge(e) {
251
+ e.forEach((l, o) => {
252
+ l.id = ut(), l.color = me(l.color) || ce.value[o] || S[o] || S[o % S.length], l.children && (l.children.forEach((a) => {
253
+ a.parentId = l.id, a.color = l.color;
254
+ }), Ge(l.children));
255
+ });
256
+ }
257
+ const U = V(w.dataset), W = V(null), oe = V(null);
258
+ at(() => {
259
+ yt();
260
+ });
261
+ function yt() {
262
+ if (Pt(w.dataset) && Rt({
263
+ componentName: "VueUiTreemap",
264
+ type: "dataset"
265
+ }), Ge(U.value), t.value.responsive) {
266
+ const e = Bt(() => {
267
+ const { width: l, height: o } = Ht({
268
+ chart: se.value,
269
+ title: t.value.style.chart.title.text ? Ne.value : null,
270
+ legend: t.value.style.chart.legend.show ? ze.value : null,
271
+ source: Ae.value,
272
+ noTitle: Fe.value
273
+ });
274
+ requestAnimationFrame(() => {
275
+ H.value.width = l, H.value.height = o;
276
+ });
277
+ });
278
+ W.value && (oe.value && W.value.unobserve(oe.value), W.value.disconnect()), W.value = new ResizeObserver(e), oe.value = se.value.parentNode, W.value.observe(oe.value);
279
+ }
280
+ }
281
+ _t(() => {
282
+ W.value && (oe.value && W.value.unobserve(oe.value), W.value.disconnect());
283
+ });
284
+ const le = $(U.value), ue = b(() => le.value.map((e, l) => ({
285
+ ...e,
286
+ color: me(e.color) || ce.value[l] || S[l] || S[l % S.length]
287
+ })).filter((e) => !F.value.includes(e.id))), ae = b(() => U.value.filter((e) => !F.value.includes(e.id)).map((e) => e.value || 0).reduce((e, l) => e + l, 0)), qe = b({
288
+ get() {
289
+ let e = [...ue.value];
290
+ return t.value.style.chart.layout.sorted && (e = [...ue.value].sort((l, o) => o.value - l.value)), e.map((l) => ({
291
+ ...l
292
+ }));
293
+ },
294
+ set(e) {
295
+ return e;
296
+ }
297
+ });
298
+ function Xe(e, l) {
299
+ return e.value / l;
300
+ }
301
+ function mt(e, l, o) {
302
+ const a = t.value.style.chart.layout.rects.colorRatio - Xe(l, o);
303
+ return rt(e, a < 0 ? 0 : a);
304
+ }
305
+ function je(e, l, o, a) {
306
+ return e.map((f, G) => {
307
+ const fe = mt(me(l) || ce.value[G] || S[G] || S[G % S.length], f, a), xt = Xe(f, a);
308
+ return {
309
+ ...f,
310
+ color: fe,
311
+ proportion: xt,
312
+ parentName: o,
313
+ children: f.children ? je(f.children, fe, f.name, a) : void 0
314
+ };
315
+ });
316
+ }
317
+ const re = b(() => Zt(
318
+ qe.value.map((e, l) => {
319
+ const o = e.children ? e.children.reduce((a, f) => a + f.value, 0) : e.value;
320
+ return {
321
+ value: e.value,
322
+ id: e.id,
323
+ children: e.children ? je(e.children.sort((a, f) => f.value - a.value), e.color, e.name, o) : void 0,
324
+ color: e.color,
325
+ name: e.name
326
+ };
327
+ }),
328
+ { x0: q.value.left * 2, y0: q.value.top, x1: q.value.width, y1: q.value.height }
329
+ ));
330
+ function Ye({ y0: e, y1: l }) {
331
+ return l - e <= 0 ? 1e-4 : l - e;
332
+ }
333
+ function Ke({ x0: e, x1: l }) {
334
+ return l - e <= 0 ? 1e-4 : l - e;
335
+ }
336
+ function X(e) {
337
+ const l = t.value.style.chart.layout.labels.fontSize * (e.proportion * 2 > 1 ? 1 : e.proportion * 2);
338
+ return l < t.value.style.chart.layout.labels.minFontSize ? t.value.style.chart.layout.labels.minFontSize : l;
339
+ }
340
+ function bt(e) {
341
+ te.value = e, Ie.value += 1;
342
+ }
343
+ const ne = b(() => ({
344
+ startX: 0,
345
+ startY: 0,
346
+ width: q.value.vbWidth,
347
+ height: q.value.vbHeight
348
+ }));
349
+ function j(e, l = U.value) {
350
+ for (const o of l) {
351
+ if (o.id === e)
352
+ return o;
353
+ if (o.children) {
354
+ const a = j(e, o.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(e) {
363
+ if (!e) {
364
+ le.value = U.value.slice(), C("selectDatapoint", void 0), I.value = [];
365
+ return;
366
+ }
367
+ const l = j(e.id);
368
+ if (l && l.children?.length)
369
+ I.value.push(l.id), le.value = l.children.slice(), C("selectDatapoint", e);
370
+ else if (e.parentId) {
371
+ I.value.push(e.parentId);
372
+ const o = j(e.parentId);
373
+ le.value = o.children.slice(), C("selectDatapoint", e);
374
+ } else if (I.value.length > 0) {
375
+ I.value.pop();
376
+ const o = I.value[I.value.length - 1];
377
+ if (o) {
378
+ const a = j(o);
379
+ le.value = a.children.slice();
380
+ } else
381
+ le.value = U.value.slice(), I.value = [], C("selectDatapoint", void 0);
382
+ }
383
+ }
384
+ function kt(e) {
385
+ return !!(j(e.id)?.children?.length || e.parentId);
386
+ }
387
+ const E = b(() => {
388
+ const e = [
389
+ { id: null, label: "All" }
390
+ ];
391
+ if (I.value.length > 0) {
392
+ let l = j(I.value[I.value.length - 1]);
393
+ const o = [];
394
+ for (; l; )
395
+ o.unshift(l), l = l.parentId ? j(l.parentId) : null;
396
+ for (const a of o)
397
+ e.push({
398
+ id: a.id,
399
+ label: a.name,
400
+ node: a
401
+ });
402
+ }
403
+ return e;
404
+ }), R = V(null), Ze = b(() => U.value.map((e, l) => ({
405
+ ...e,
406
+ color: me(e.color) || ce.value[l] || S[l] || S[l % S.length],
407
+ shape: "square"
408
+ })).sort((e, l) => l.value - e.value).map((e, l) => ({
409
+ ...e,
410
+ proportion: e.value / U.value.map((o) => o.value).reduce((o, a) => o + a, 0),
411
+ opacity: F.value.includes(e.id) ? 0.5 : 1
412
+ }))), wt = b(() => ({
413
+ cy: "treemap-div-legend",
414
+ backgroundColor: t.value.style.chart.legend.backgroundColor,
415
+ color: t.value.style.chart.legend.color,
416
+ fontSize: t.value.style.chart.legend.fontSize,
417
+ paddingBottom: 12,
418
+ fontWeight: t.value.style.chart.legend.bold ? "bold" : ""
419
+ }));
420
+ function Je(e) {
421
+ R.value = null, F.value.includes(e.id) ? F.value = F.value.filter((l) => l !== e.id) : F.value.length < w.dataset.length - 1 && F.value.push(e.id), C("selectLegend", qe.value);
422
+ }
423
+ const Ce = $(null);
424
+ function Ct({ datapoint: e, seriesIndex: l }) {
425
+ R.value = e, Ce.value = { datapoint: e, seriesIndex: l, config: t.value, series: ue.value };
426
+ const o = t.value.style.chart.tooltip.customFormat;
427
+ if (ct(o) && Vt(() => o({
428
+ seriesIndex: l,
429
+ datapoint: e,
430
+ series: ue.value,
431
+ config: t.value
432
+ })))
433
+ ke.value = o({
434
+ seriesIndex: l,
435
+ datapoint: e,
436
+ series: ue.value,
437
+ config: t.value
438
+ });
439
+ else {
440
+ let a = "";
441
+ a += `<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.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="${e.color}"/></svg>`, a += `<b>${be(
442
+ t.value.style.chart.layout.labels.formatter,
443
+ e.value,
444
+ ie({
445
+ p: t.value.style.chart.layout.labels.prefix,
446
+ v: e.value,
447
+ s: t.value.style.chart.layout.labels.suffix,
448
+ r: t.value.style.chart.tooltip.roundingValue
449
+ }),
450
+ { datapoint: e, seriesIndex: l }
451
+ )}</b>`, ke.value = `<div>${a}</div>`;
452
+ }
453
+ N.value = !0;
454
+ }
455
+ const D = b(() => {
456
+ const e = re.value.map((o) => ({
457
+ name: o.name,
458
+ color: o.color
459
+ })), l = re.value.map((o) => o.value);
460
+ return { head: e, body: l };
461
+ });
462
+ function Qe() {
463
+ It(() => {
464
+ const e = D.value.head.map((a, f) => [[
465
+ a.name
466
+ ], [D.value.body[f]], [isNaN(D.value.body[f] / ae.value) ? "-" : D.value.body[f] / ae.value * 100]]), l = [[t.value.style.chart.title.text], [t.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(e), o = Mt(l);
467
+ Dt({ csvContent: o, title: t.value.style.chart.title.text || "vue-ui-treemap" });
468
+ });
469
+ }
470
+ const ve = b(() => {
471
+ const e = [
472
+ t.value.table.columnNames.series,
473
+ t.value.table.columnNames.value,
474
+ t.value.table.columnNames.percentage
475
+ ], l = D.value.head.map((f, G) => {
476
+ const fe = be(
477
+ t.value.style.chart.layout.labels.formatter,
478
+ D.value.body[G],
479
+ ie({
480
+ p: t.value.style.chart.layout.labels.prefix,
481
+ v: D.value.body[G],
482
+ s: t.value.style.chart.layout.labels.suffix,
483
+ r: t.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(D.value.body[G] / ae.value) ? "-" : ie({
494
+ v: D.value.body[G] / ae.value * 100,
495
+ s: "%",
496
+ r: t.value.table.td.roundingPercentage
497
+ })
498
+ ];
499
+ }), o = {
500
+ th: {
501
+ backgroundColor: t.value.table.th.backgroundColor,
502
+ color: t.value.table.th.color,
503
+ outline: t.value.table.th.outline
504
+ },
505
+ td: {
506
+ backgroundColor: t.value.table.td.backgroundColor,
507
+ color: t.value.table.td.color,
508
+ outline: t.value.table.td.outline
509
+ },
510
+ breakpoint: t.value.table.responsiveBreakpoint
511
+ };
512
+ return {
513
+ colNames: [
514
+ t.value.table.columnNames.series,
515
+ t.value.table.columnNames.value
516
+ ],
517
+ head: e,
518
+ body: l,
519
+ config: o
520
+ };
521
+ });
522
+ function $t() {
523
+ return re.value;
524
+ }
525
+ function et() {
526
+ P.value.showTable = !P.value.showTable;
527
+ }
528
+ function tt() {
529
+ P.value.showTooltip = !P.value.showTooltip;
530
+ }
531
+ const he = $(!1);
532
+ function $e() {
533
+ he.value = !he.value;
534
+ }
535
+ const pe = $(null);
536
+ function ot(e) {
537
+ pe.value = e;
538
+ }
539
+ function lt() {
540
+ pe.value = null;
541
+ }
542
+ return r({
543
+ getData: $t,
544
+ generateCsv: Qe,
545
+ generateImage: Ee,
546
+ generatePdf: We,
547
+ toggleTable: et,
548
+ toggleTooltip: tt,
549
+ toggleAnnotator: $e
550
+ }), (e, l) => (v(), y("div", {
551
+ ref_key: "treemapChart",
552
+ ref: se,
553
+ class: xe(`vue-ui-treemap ${te.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${t.value.useCssAnimation ? "" : "vue-ui-dna"}`),
554
+ style: L(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive ? "height: 100%;" : ""} text-align:center;background:${t.value.style.chart.backgroundColor}`),
555
+ id: `treemap_${A.value}`,
556
+ onMouseenter: l[3] || (l[3] = () => d(Me)(!0)),
557
+ onMouseleave: l[4] || (l[4] = () => d(Me)(!1))
558
+ }, [
559
+ t.value.userOptions.buttons.annotator ? (v(), Z(d(u), {
560
+ key: 0,
561
+ svgRef: d(Ve),
562
+ backgroundColor: t.value.style.chart.backgroundColor,
563
+ color: t.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: Fe,
571
+ class: "vue-data-ui-no-title-space",
572
+ style: "height:36px; width: 100%;background:transparent"
573
+ }, null, 512)) : O("", !0),
574
+ t.value.style.chart.title.text ? (v(), y("div", {
575
+ key: 2,
576
+ ref_key: "chartTitle",
577
+ ref: Ne,
578
+ style: L(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)
579
+ }, [
580
+ (v(), Z(qt, {
581
+ key: `title_${Pe.value}`,
582
+ config: {
583
+ title: {
584
+ cy: "treemap-div-title",
585
+ ...t.value.style.chart.title
586
+ },
587
+ subtitle: {
588
+ cy: "treemap-div-subtitle",
589
+ ...t.value.style.chart.title.subtitle
590
+ }
591
+ }
592
+ }, null, 8, ["config"]))
593
+ ], 4)) : O("", !0),
594
+ t.value.userOptions.show && x.value && (d(De) || d(we)) ? (v(), Z(d(p), {
595
+ ref: "details",
596
+ key: `user_option_${Ie.value}`,
597
+ backgroundColor: t.value.style.chart.backgroundColor,
598
+ color: t.value.style.chart.color,
599
+ isPrinting: d(He),
600
+ isImaging: d(Ue),
601
+ uid: A.value,
602
+ hasTooltip: t.value.userOptions.buttons.tooltip && t.value.style.chart.tooltip.show,
603
+ hasPdf: t.value.userOptions.buttons.pdf,
604
+ hasXls: t.value.userOptions.buttons.csv,
605
+ hasImg: t.value.userOptions.buttons.img,
606
+ hasTable: t.value.userOptions.buttons.table,
607
+ hasFullscreen: t.value.userOptions.buttons.fullscreen,
608
+ isFullscreen: te.value,
609
+ isTooltip: P.value.showTooltip,
610
+ titles: { ...t.value.userOptions.buttonTitles },
611
+ chartElement: se.value,
612
+ position: t.value.userOptions.position,
613
+ hasAnnotator: t.value.userOptions.buttons.annotator,
614
+ isAnnotation: he.value,
615
+ onToggleFullscreen: bt,
616
+ onGeneratePdf: d(We),
617
+ onGenerateCsv: Qe,
618
+ onGenerateImage: d(Ee),
619
+ onToggleTable: et,
620
+ onToggleTooltip: tt,
621
+ onToggleAnnotator: $e,
622
+ style: L({
623
+ visibility: d(De) ? d(we) ? "visible" : "hidden" : "visible"
624
+ })
625
+ }, St({ _: 2 }, [
626
+ e.$slots.menuIcon ? {
627
+ name: "menuIcon",
628
+ fn: T(({ isOpen: o, color: a }) => [
629
+ k(e.$slots, "menuIcon", J(Q({ isOpen: o, color: a })), void 0, !0)
630
+ ]),
631
+ key: "0"
632
+ } : void 0,
633
+ e.$slots.optionTooltip ? {
634
+ name: "optionTooltip",
635
+ fn: T(() => [
636
+ k(e.$slots, "optionTooltip", {}, void 0, !0)
637
+ ]),
638
+ key: "1"
639
+ } : void 0,
640
+ e.$slots.optionPdf ? {
641
+ name: "optionPdf",
642
+ fn: T(() => [
643
+ k(e.$slots, "optionPdf", {}, void 0, !0)
644
+ ]),
645
+ key: "2"
646
+ } : void 0,
647
+ e.$slots.optionCsv ? {
648
+ name: "optionCsv",
649
+ fn: T(() => [
650
+ k(e.$slots, "optionCsv", {}, void 0, !0)
651
+ ]),
652
+ key: "3"
653
+ } : void 0,
654
+ e.$slots.optionImg ? {
655
+ name: "optionImg",
656
+ fn: T(() => [
657
+ k(e.$slots, "optionImg", {}, void 0, !0)
658
+ ]),
659
+ key: "4"
660
+ } : void 0,
661
+ e.$slots.optionTable ? {
662
+ name: "optionTable",
663
+ fn: T(() => [
664
+ k(e.$slots, "optionTable", {}, void 0, !0)
665
+ ]),
666
+ key: "5"
667
+ } : void 0,
668
+ e.$slots.optionFullscreen ? {
669
+ name: "optionFullscreen",
670
+ fn: T(({ toggleFullscreen: o, isFullscreen: a }) => [
671
+ k(e.$slots, "optionFullscreen", J(Q({ toggleFullscreen: o, isFullscreen: a })), void 0, !0)
672
+ ]),
673
+ key: "6"
674
+ } : void 0,
675
+ e.$slots.optionAnnotator ? {
676
+ name: "optionAnnotator",
677
+ fn: T(({ toggleAnnotator: o, isAnnotator: a }) => [
678
+ k(e.$slots, "optionAnnotator", J(Q({ toggleAnnotator: o, isAnnotator: a })), void 0, !0)
679
+ ]),
680
+ key: "7"
681
+ } : void 0
682
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : O("", !0),
683
+ E.value.length > 1 ? (v(), y("nav", ao, [
684
+ (v(!0), y(ge, null, Oe(E.value, (o, a) => (v(), y("span", {
685
+ role: "button",
686
+ tabindex: a < E.value.length - 1 ? 0 : void 0,
687
+ key: o.id || "root",
688
+ onClick: (f) => a === E.value.length - 1 ? () => {
689
+ } : de(o.node),
690
+ onKeydown: [
691
+ nt(_e((f) => a === E.value.length - 1 ? void 0 : de(o.node), ["prevent"]), ["enter"]),
692
+ nt(_e((f) => a === E.value.length - 1 ? void 0 : de(o.node), ["prevent"]), ["space"])
693
+ ],
694
+ class: "vue-ui-treemap-crumb",
695
+ "data-last-crumb": a === E.value.length - 1,
696
+ style: L({
697
+ color: t.value.style.chart.color
698
+ }),
699
+ onMouseenter: (f) => ot(a),
700
+ onMouseleave: lt,
701
+ onFocus: (f) => ot(a),
702
+ onBlur: lt
703
+ }, [
704
+ _("span", so, [
705
+ _("span", uo, [
706
+ k(e.$slots, "breadcrumb-label", st({ ref_for: !0 }, { crumb: o, isRoot: a === 0, isFocus: pe.value === a }), () => [
707
+ a === 0 ? (v(), y("div", ro, [
708
+ Te(Gt, {
709
+ name: pe.value === 0 ? "homeFilled" : "home",
710
+ stroke: t.value.style.chart.color
711
+ }, null, 8, ["name", "stroke"])
712
+ ])) : (v(), y(ge, { key: 1 }, [
713
+ ye(ee(o.label), 1)
714
+ ], 64))
715
+ ], !0)
716
+ ]),
717
+ a < E.value.length - 1 ? (v(), y("span", io, [
718
+ k(e.$slots, "breadcrumb-arrow", {}, () => [
719
+ l[5] || (l[5] = ye(" › "))
720
+ ], !0)
721
+ ])) : O("", !0)
722
+ ])
723
+ ], 44, no))), 128))
724
+ ])) : O("", !0),
725
+ x.value ? (v(), y("svg", {
726
+ key: 5,
727
+ ref_key: "svgRef",
728
+ ref: Ve,
729
+ xmlns: d(Lt),
730
+ 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 }),
731
+ viewBox: `${ne.value.startX} ${ne.value.startY} ${ne.value.width <= 0 ? 10 : ne.value.width} ${ne.value.height <= 0 ? 10 : ne.value.height}`,
732
+ style: L(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)
733
+ }, [
734
+ Te(d(B)),
735
+ (v(!0), y(ge, null, Oe(re.value, (o, a) => (v(), y("g", null, [
736
+ t.value.style.chart.layout.rects.gradient.show ? (v(), y("defs", vo, [
737
+ _("radialGradient", {
738
+ id: `tgrad_${o.id}`,
739
+ gradientTransform: "translate(-1, -1.000001) scale(2, 2)"
740
+ }, [
741
+ _("stop", {
742
+ offset: "18%",
743
+ "stop-color": o.color
744
+ }, null, 8, po),
745
+ _("stop", {
746
+ offset: "100%",
747
+ "stop-color": d(rt)(o.color, t.value.style.chart.layout.rects.gradient.intensity / 100)
748
+ }, null, 8, fo)
749
+ ], 8, ho)
750
+ ])) : O("", !0)
751
+ ]))), 256)),
752
+ (v(!0), y(ge, null, Oe(re.value, (o, a) => (v(), y("g", null, [
753
+ _("rect", {
754
+ x: o.x0,
755
+ y: o.y0,
756
+ height: Ye(o),
757
+ width: Ke(o),
758
+ fill: M.value ? o.color : t.value.style.chart.layout.rects.gradient.show ? `url(#tgrad_${o.id})` : o.color,
759
+ rx: t.value.style.chart.layout.rects.borderRadius,
760
+ stroke: R.value && R.value.id === o.id ? t.value.style.chart.layout.rects.selected.stroke : t.value.style.chart.layout.rects.stroke,
761
+ "stroke-width": R.value && R.value.id === o.id ? t.value.style.chart.layout.rects.selected.strokeWidth : t.value.style.chart.layout.rects.strokeWidth,
762
+ onClick: _e((f) => de(o), ["stop"]),
763
+ onMouseenter: () => Ct({
764
+ datapoint: o,
765
+ seriesIndex: a
766
+ }),
767
+ onMouseleave: l[0] || (l[0] = (f) => {
768
+ R.value = null, N.value = !1;
769
+ }),
770
+ style: L(`opacity:${R.value ? R.value.id === o.id ? 1 : t.value.style.chart.layout.rects.selected.unselectedOpacity : 1}`),
771
+ class: xe([
772
+ "vue-ui-treemap-rect",
773
+ kt(o) ? "vue-data-ui-zoom-plus" : Y.value ? "vue-data-ui-zoom-minus" : ""
774
+ ])
775
+ }, null, 46, go),
776
+ (v(), y("foreignObject", {
777
+ x: o.x0,
778
+ y: o.y0,
779
+ height: Ye(o),
780
+ width: Ke(o),
781
+ class: "vue-ui-treemap-cell-foreignObject"
782
+ }, [
783
+ _("div", mo, [
784
+ t.value.style.chart.layout.labels.showDefaultLabels && (o.proportion > t.value.style.chart.layout.labels.hideUnderProportion || Y.value) ? (v(), y("div", {
785
+ key: 0,
786
+ class: "vue-ui-treemap-cell-default",
787
+ style: L(`width:calc(100% - ${X(o) / 1.5}px);text-align:left;line-height:${X(o) < 14 ? 14 : X(o)}px;padding:${X(o) / 3}px; color:${d(it)(o.color)}`)
788
+ }, [
789
+ _("span", {
790
+ style: L(`width:100%;font-size:${X(o)}px;`)
791
+ }, ee(o.name), 5),
792
+ l[6] || (l[6] = _("br", null, null, -1)),
793
+ _("span", {
794
+ style: L(`width:100%;font-size:${X(o)}px;`)
795
+ }, ee(d(be)(
796
+ t.value.style.chart.layout.labels.formatter,
797
+ o.value,
798
+ d(ie)({
799
+ p: t.value.style.chart.layout.labels.prefix,
800
+ v: o.value,
801
+ s: t.value.style.chart.layout.labels.suffix,
802
+ r: t.value.style.chart.layout.labels.rounding
803
+ }),
804
+ { datapoint: o }
805
+ )), 5)
806
+ ], 4)) : O("", !0),
807
+ k(e.$slots, "rect", st({ ref_for: !0 }, {
808
+ rect: o,
809
+ shouldShow: o.proportion > t.value.style.chart.layout.labels.hideUnderProportion || Y.value,
810
+ fontSize: X(o),
811
+ isZoom: Y.value,
812
+ textColor: d(it)(o.color)
813
+ }), void 0, !0)
814
+ ])
815
+ ], 8, yo))
816
+ ]))), 256)),
817
+ k(e.$slots, "svg", J(Q({ svg: q.value, isZoom: Y.value, rect: R.value, config: t.value })), void 0, !0)
818
+ ], 14, co)) : O("", !0),
819
+ e.$slots.watermark ? (v(), y("div", bo, [
820
+ k(e.$slots, "watermark", J(Q({ isPrinting: d(He) || d(Ue) })), void 0, !0)
821
+ ])) : O("", !0),
822
+ x.value ? O("", !0) : (v(), Z(d(c), {
823
+ key: 7,
824
+ config: {
825
+ type: "treemap",
826
+ style: {
827
+ backgroundColor: t.value.style.chart.backgroundColor,
828
+ treemap: {
829
+ color: "#CCCCCC"
830
+ }
831
+ }
832
+ }
833
+ }, null, 8, ["config"])),
834
+ _("div", {
835
+ ref_key: "chartLegend",
836
+ ref: ze
837
+ }, [
838
+ t.value.style.chart.legend.show ? (v(), Z(Xt, {
839
+ key: `legend_${Le.value}`,
840
+ legendSet: Ze.value,
841
+ config: wt.value,
842
+ id: `treemap_legend_${A.value}`,
843
+ onClickMarker: l[1] || (l[1] = ({ legend: o }) => Je(o))
844
+ }, {
845
+ item: T(({ legend: o, index: a }) => [
846
+ _("div", {
847
+ onClick: (f) => Je(o),
848
+ style: L(`opacity:${F.value.includes(o.id) ? 0.5 : 1}`)
849
+ }, [
850
+ ye(ee(o.name) + ": " + ee(d(be)(
851
+ t.value.style.chart.layout.labels.formatter,
852
+ o.value,
853
+ d(ie)({
854
+ p: t.value.style.chart.layout.labels.prefix,
855
+ v: o.value,
856
+ s: t.value.style.chart.layout.labels.suffix,
857
+ r: t.value.style.chart.legend.roundingValue
858
+ }),
859
+ { datapoint: o }
860
+ )) + " ", 1),
861
+ F.value.includes(o.id) ? (v(), y("span", Co, " ( - % ) ")) : (v(), y("span", wo, " (" + ee(isNaN(o.value / ae.value) ? "-" : (o.value / ae.value * 100).toFixed(t.value.style.chart.legend.roundingPercentage)) + "%) ", 1))
862
+ ], 12, ko)
863
+ ]),
864
+ _: 1
865
+ }, 8, ["legendSet", "config", "id"])) : k(e.$slots, "legend", {
866
+ key: 1,
867
+ legend: Ze.value
868
+ }, void 0, !0)
869
+ ], 512),
870
+ e.$slots.source ? (v(), y("div", {
871
+ key: 8,
872
+ ref_key: "source",
873
+ ref: Ae,
874
+ dir: "auto"
875
+ }, [
876
+ k(e.$slots, "source", {}, void 0, !0)
877
+ ], 512)) : O("", !0),
878
+ Te(d(g), {
879
+ show: P.value.showTooltip && N.value,
880
+ backgroundColor: t.value.style.chart.tooltip.backgroundColor,
881
+ color: t.value.style.chart.tooltip.color,
882
+ fontSize: t.value.style.chart.tooltip.fontSize,
883
+ borderRadius: t.value.style.chart.tooltip.borderRadius,
884
+ borderColor: t.value.style.chart.tooltip.borderColor,
885
+ borderWidth: t.value.style.chart.tooltip.borderWidth,
886
+ backgroundOpacity: t.value.style.chart.tooltip.backgroundOpacity,
887
+ position: t.value.style.chart.tooltip.position,
888
+ offsetY: t.value.style.chart.tooltip.offsetY,
889
+ parent: se.value,
890
+ content: ke.value,
891
+ isFullscreen: te.value,
892
+ isCustom: d(ct)(t.value.style.chart.tooltip.customFormat)
893
+ }, {
894
+ "tooltip-before": T(() => [
895
+ k(e.$slots, "tooltip-before", J(Q({ ...Ce.value })), void 0, !0)
896
+ ]),
897
+ "tooltip-after": T(() => [
898
+ k(e.$slots, "tooltip-after", J(Q({ ...Ce.value })), void 0, !0)
899
+ ]),
900
+ _: 3
901
+ }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
902
+ x.value ? (v(), Z(d(h), {
903
+ key: 9,
904
+ hideDetails: "",
905
+ config: {
906
+ open: P.value.showTable,
907
+ maxHeight: 1e4,
908
+ body: {
909
+ backgroundColor: t.value.style.chart.backgroundColor,
910
+ color: t.value.style.chart.color
911
+ },
912
+ head: {
913
+ backgroundColor: t.value.style.chart.backgroundColor,
914
+ color: t.value.style.chart.color
915
+ }
916
+ }
917
+ }, {
918
+ content: T(() => [
919
+ (v(), Z(d(i), {
920
+ key: `table_${Re.value}`,
921
+ colNames: ve.value.colNames,
922
+ head: ve.value.head,
923
+ body: ve.value.body,
924
+ config: ve.value.config,
925
+ title: `${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text ? ` : ${t.value.style.chart.title.subtitle.text}` : ""}`,
926
+ onClose: l[2] || (l[2] = (o) => P.value.showTable = !1)
927
+ }, {
928
+ th: T(({ th: o }) => [
929
+ _("div", {
930
+ innerHTML: o,
931
+ style: { display: "flex", "align-items": "center" }
932
+ }, null, 8, $o)
933
+ ]),
934
+ td: T(({ td: o }) => [
935
+ ye(ee(o.name || o), 1)
936
+ ]),
937
+ _: 1
938
+ }, 8, ["colNames", "head", "body", "config", "title"]))
939
+ ]),
940
+ _: 1
941
+ }, 8, ["config"])) : O("", !0)
942
+ ], 46, lo));
943
+ }
944
+ }, Lo = /* @__PURE__ */ jt(xo, [["__scopeId", "data-v-ee01f95d"]]);
945
+ export {
946
+ Lo as default
947
+ };