vue-data-ui 3.22.0 → 3.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/dist/{Arrow-_pDGXl76.js → Arrow-BGhJI-qh.js} +1 -1
  2. package/dist/{BaseDraggableDialog-O8jn9Lvi.js → BaseDraggableDialog-a9xCKjW-.js} +2 -2
  3. package/dist/{BaseIcon-CWXbczu_.js → BaseIcon-DEtwcvEH.js} +1 -1
  4. package/dist/{BaseLegendToggle-CUYal8mC.js → BaseLegendToggle-B-lM0iV1.js} +1 -1
  5. package/dist/{BaseZoomControls-JwSGzoKi.js → BaseZoomControls-BjjT6vtB.js} +2 -2
  6. package/dist/{ColorPicker-CCqmzGGo.js → ColorPicker-DMLahA2S.js} +2 -2
  7. package/dist/{DataTable-G9aclxhk.js → DataTable-DJZgdnIn.js} +2 -2
  8. package/dist/{Legend-CAStwHdx.js → Legend-BVDhEEsC.js} +2 -2
  9. package/dist/{NonSvgPenAndPaper-BLy8zMox.js → NonSvgPenAndPaper-Dwq_M6Bz.js} +13 -13
  10. package/dist/{PackageVersion-DxBQctV8.js → PackageVersion-_Dwp4NUr.js} +1 -1
  11. package/dist/{PenAndPaper-z1woaB1V.js → PenAndPaper-DJIIG6dv.js} +13 -13
  12. package/dist/{Shape-BubavoqO.js → Shape-C5OvuwII.js} +1 -1
  13. package/dist/{Slicer-JCOpjPU7.js → Slicer-ClR833cP.js} +2 -2
  14. package/dist/{SlicerPreview-BA_RDgVn.js → SlicerPreview-CAhqG_ZQ.js} +12 -12
  15. package/dist/{SparkTooltip-DMFXQmFi.js → SparkTooltip-DTzo8Sah.js} +6 -6
  16. package/dist/{Title-DH6G8_cZ.js → Title-CVYf1f8m.js} +1 -1
  17. package/dist/{Tooltip-979Ytd8R.js → Tooltip-BmGCBJuU.js} +1 -1
  18. package/dist/{UserOptions-rx9hUnOy.js → UserOptions-xqbNpHi2.js} +2 -2
  19. package/dist/components/arrow.js +1 -1
  20. package/dist/components/vue-ui-3d-bar.js +1 -1
  21. package/dist/components/vue-ui-accordion.js +1 -1
  22. package/dist/components/vue-ui-age-pyramid.js +1 -1
  23. package/dist/components/vue-ui-annotator.js +1 -1
  24. package/dist/components/vue-ui-bullet.js +1 -1
  25. package/dist/components/vue-ui-bump.js +1 -1
  26. package/dist/components/vue-ui-candlestick.js +1 -1
  27. package/dist/components/vue-ui-carousel-table.js +1 -1
  28. package/dist/components/vue-ui-chestnut.js +1 -1
  29. package/dist/components/vue-ui-chord.js +1 -1
  30. package/dist/components/vue-ui-circle-pack.js +1 -1
  31. package/dist/components/vue-ui-cursor.js +1 -1
  32. package/dist/components/vue-ui-dag.js +1 -1
  33. package/dist/components/vue-ui-dashboard.js +1 -1
  34. package/dist/components/vue-ui-digits.js +1 -1
  35. package/dist/components/vue-ui-donut-evolution.js +1 -1
  36. package/dist/components/vue-ui-donut.js +1 -1
  37. package/dist/components/vue-ui-dumbbell.js +1 -1
  38. package/dist/components/vue-ui-flow.js +1 -1
  39. package/dist/components/vue-ui-funnel.js +1 -1
  40. package/dist/components/vue-ui-galaxy.js +1 -1
  41. package/dist/components/vue-ui-gauge.js +1 -1
  42. package/dist/components/vue-ui-geo.js +1 -1
  43. package/dist/components/vue-ui-gizmo.js +1 -1
  44. package/dist/components/vue-ui-heatmap.js +1 -1
  45. package/dist/components/vue-ui-history-plot.js +1 -1
  46. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  47. package/dist/components/vue-ui-icon.js +1 -1
  48. package/dist/components/vue-ui-kpi.js +1 -1
  49. package/dist/components/vue-ui-mini-loader.js +1 -1
  50. package/dist/components/vue-ui-molecule.js +1 -1
  51. package/dist/components/vue-ui-mood-radar.js +1 -1
  52. package/dist/components/vue-ui-nested-donuts.js +1 -1
  53. package/dist/components/vue-ui-onion.js +1 -1
  54. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  55. package/dist/components/vue-ui-quadrant.js +1 -1
  56. package/dist/components/vue-ui-quick-chart.js +1 -1
  57. package/dist/components/vue-ui-radar.js +1 -1
  58. package/dist/components/vue-ui-rating.js +1 -1
  59. package/dist/components/vue-ui-relation-circle.js +1 -1
  60. package/dist/components/vue-ui-ridgeline.js +1 -1
  61. package/dist/components/vue-ui-rings.js +1 -1
  62. package/dist/components/vue-ui-scatter.js +1 -1
  63. package/dist/components/vue-ui-skeleton.js +1 -1
  64. package/dist/components/vue-ui-smiley.js +1 -1
  65. package/dist/components/vue-ui-spark-trend.js +1 -1
  66. package/dist/components/vue-ui-sparkbar.js +1 -1
  67. package/dist/components/vue-ui-sparkgauge.js +1 -1
  68. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  69. package/dist/components/vue-ui-sparkline.js +1 -1
  70. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  71. package/dist/components/vue-ui-stackbar.js +1 -1
  72. package/dist/components/vue-ui-stackline.js +1 -1
  73. package/dist/components/vue-ui-strip-plot.js +1 -1
  74. package/dist/components/vue-ui-table-heatmap.js +1 -1
  75. package/dist/components/vue-ui-table-sparkline.js +1 -1
  76. package/dist/components/vue-ui-table.js +1 -1
  77. package/dist/components/vue-ui-thermometer.js +1 -1
  78. package/dist/components/vue-ui-timer.js +1 -1
  79. package/dist/components/vue-ui-tiremarks.js +1 -1
  80. package/dist/components/vue-ui-treemap.js +1 -1
  81. package/dist/components/vue-ui-vertical-bar.js +1 -1
  82. package/dist/components/vue-ui-waffle.js +1 -1
  83. package/dist/components/vue-ui-wheel.js +1 -1
  84. package/dist/components/vue-ui-word-cloud.js +1 -1
  85. package/dist/components/vue-ui-world.js +1 -1
  86. package/dist/components/vue-ui-xy-canvas.js +1 -1
  87. package/dist/components/vue-ui-xy.js +1 -1
  88. package/dist/{dom-to-png-CtV3uxDJ.js → dom-to-png-rjAIVHxa.js} +1 -1
  89. package/dist/exposedLib-CffbQxjN.js +19 -0
  90. package/dist/{img-C_RNNswI.js → img-BCAOkqfM.js} +1 -1
  91. package/dist/{labelUtils-Bycs-017.js → labelUtils-C0D1tjig.js} +1 -1
  92. package/dist/{lib-AJRHFE5U.js → lib-CXicicWN.js} +155 -126
  93. package/dist/{package-0oRlvBuX.js → package-CfgH43C9.js} +1 -1
  94. package/dist/{pdf-CdX23zf1.js → pdf-ChYv2jb6.js} +1 -1
  95. package/dist/{render-common-DSiH7qj-.js → render-common-B_81qHQA.js} +2 -2
  96. package/dist/ssr/vue-ui-donut.js +1 -1
  97. package/dist/ssr/vue-ui-xy.js +1 -1
  98. package/dist/ssr.js +2 -2
  99. package/dist/style.css +1 -1
  100. package/dist/types/vue-data-ui.d.ts +3 -8
  101. package/dist/{useAutoSizeLabelsInsideViewbox-kjVKQz36.js → useAutoSizeLabelsInsideViewbox-B4-0yo3K.js} +1 -1
  102. package/dist/{useConfig-Br1uzq_L.js → useConfig-C10cdg45.js} +2 -0
  103. package/dist/{useNestedProp-DtcXIg7n.js → useNestedProp-APyFoLCQ.js} +1 -1
  104. package/dist/{useObjectBindings-CxQ6A5pi.js → useObjectBindings-DSBOFB88.js} +1 -1
  105. package/dist/{usePrinter-6n2MzVyV.js → usePrinter-Dng0UK-G.js} +2 -2
  106. package/dist/utils.js +3 -3
  107. package/dist/{vue-data-ui-DoViN_4r.js → vue-data-ui-DyFtIu5x.js} +68 -68
  108. package/dist/vue-data-ui.js +72 -72
  109. package/dist/vue-ui-3d-bar-BONLasZK.js +1757 -0
  110. package/dist/{vue-ui-accordion-HvsT8_RM.js → vue-ui-accordion-Ck_u5Nro.js} +4 -4
  111. package/dist/vue-ui-age-pyramid-CESMhEwG.js +1238 -0
  112. package/dist/{vue-ui-annotator-7s5ly6XJ.js → vue-ui-annotator-DvpCTv7j.js} +60 -60
  113. package/dist/{vue-ui-bullet-B-bWGz6d.js → vue-ui-bullet-qdXPXPxt.js} +23 -23
  114. package/dist/{vue-ui-bump-DM-hF-AK.js → vue-ui-bump-LMO0-JMK.js} +400 -400
  115. package/dist/{vue-ui-candlestick-BfOvntqR.js → vue-ui-candlestick-ByWgbxR_.js} +50 -50
  116. package/dist/vue-ui-carousel-table-Clv65OZW.js +455 -0
  117. package/dist/vue-ui-chestnut-Dbxtt0EO.js +2010 -0
  118. package/dist/vue-ui-chord-DsCYzzLp.js +1391 -0
  119. package/dist/{vue-ui-circle-pack-BBaRLELd.js → vue-ui-circle-pack-DUn2l2nz.js} +44 -44
  120. package/dist/{vue-ui-cursor-DWlKtcab.js → vue-ui-cursor-CElckzVJ.js} +61 -61
  121. package/dist/{vue-ui-dag-BAKU4jBj.js → vue-ui-dag-B7a6P_58.js} +18 -18
  122. package/dist/{vue-ui-dashboard-DE4R55nU.js → vue-ui-dashboard-CuYXrIHK.js} +70 -70
  123. package/dist/{vue-ui-digits-B416Mj46.js → vue-ui-digits-CiRRs9Yh.js} +4 -4
  124. package/dist/{vue-ui-donut-BugVAUHv.js → vue-ui-donut-PedJo3bO.js} +474 -474
  125. package/dist/{vue-ui-donut-BuGSF4pM.js → vue-ui-donut-_EtEQwAW.js} +160 -160
  126. package/dist/vue-ui-donut-evolution-C9mV62bb.js +1510 -0
  127. package/dist/vue-ui-dumbbell-byV_cZ7p.js +1530 -0
  128. package/dist/{vue-ui-flow-BoEP6hmg.js → vue-ui-flow-DOLqQ6P4.js} +43 -43
  129. package/dist/vue-ui-funnel-CInvdUuT.js +777 -0
  130. package/dist/{vue-ui-galaxy-CB5F8Q-u.js → vue-ui-galaxy-DOeb6bP3.js} +301 -301
  131. package/dist/vue-ui-gauge-m2OemLTk.js +920 -0
  132. package/dist/{vue-ui-geo-BAy4kNv-.js → vue-ui-geo-CGw4_HqU.js} +22 -22
  133. package/dist/{vue-ui-gizmo-DjA8cqcl.js → vue-ui-gizmo-CavNggei.js} +4 -4
  134. package/dist/{vue-ui-heatmap-CMlxUI7Q.js → vue-ui-heatmap-BgBgDRa_.js} +95 -95
  135. package/dist/vue-ui-history-plot-jc1aVr7r.js +1554 -0
  136. package/dist/{vue-ui-horizontal-bar-XgzEVwOK.js → vue-ui-horizontal-bar-BkV41pJi.js} +264 -264
  137. package/dist/{vue-ui-kpi-B5Lu5U1S.js → vue-ui-kpi-DZAJA0gO.js} +4 -4
  138. package/dist/{vue-ui-mini-loader-CyYpLcrt.js → vue-ui-mini-loader-C29a9zHr.js} +3 -3
  139. package/dist/{vue-ui-molecule-DzpgAmZn.js → vue-ui-molecule-E7a7X-Tz.js} +181 -181
  140. package/dist/{vue-ui-mood-radar-DMgYQtOw.js → vue-ui-mood-radar-ww9uHX-0.js} +29 -29
  141. package/dist/{vue-ui-nested-donuts-BHX0QqvR.js → vue-ui-nested-donuts-BNvpHhXK.js} +211 -211
  142. package/dist/{vue-ui-onion-CYh7tdS0.js → vue-ui-onion-Cis7D9N3.js} +34 -34
  143. package/dist/{vue-ui-parallel-coordinate-plot-BTaG92hV.js → vue-ui-parallel-coordinate-plot-BnVXfomm.js} +40 -40
  144. package/dist/vue-ui-quadrant-DQ8rrBHV.js +1978 -0
  145. package/dist/{vue-ui-quick-chart-CHSUGLTx.js → vue-ui-quick-chart-B1xUyqD7.js} +358 -358
  146. package/dist/vue-ui-radar-D0y4BN8E.js +1281 -0
  147. package/dist/{vue-ui-rating-BoBLJm55.js → vue-ui-rating-DKurps0a.js} +34 -34
  148. package/dist/vue-ui-relation-circle-aanEwlBG.js +924 -0
  149. package/dist/{vue-ui-ridgeline-q_UhtM4M.js → vue-ui-ridgeline-DS_llqb5.js} +219 -219
  150. package/dist/{vue-ui-rings-VOjUZu2b.js → vue-ui-rings-CILfFp-q.js} +36 -36
  151. package/dist/{vue-ui-scatter-DETMofE2.js → vue-ui-scatter-CQqdNOLR.js} +75 -75
  152. package/dist/{vue-ui-skeleton-D36VILNm.js → vue-ui-skeleton-DpjFm7_n.js} +42 -42
  153. package/dist/{vue-ui-smiley-CPbUSUTQ.js → vue-ui-smiley-BKQMu9Dw.js} +17 -17
  154. package/dist/{vue-ui-spark-trend-XpEbgNeK.js → vue-ui-spark-trend-xsg-hyHs.js} +92 -92
  155. package/dist/{vue-ui-sparkbar-Dq1hnBhL.js → vue-ui-sparkbar-BwpOy0xT.js} +78 -78
  156. package/dist/{vue-ui-sparkgauge-CbAakuhB.js → vue-ui-sparkgauge-DgTkRohs.js} +38 -38
  157. package/dist/vue-ui-sparkhistogram-D72VDOlh.js +560 -0
  158. package/dist/vue-ui-sparkline-WG-oYip8.js +1547 -0
  159. package/dist/{vue-ui-sparkstackbar-OprYrGQQ.js → vue-ui-sparkstackbar-BqAeq4Lb.js} +162 -162
  160. package/dist/{vue-ui-stackbar-Bt0FKlf7.js → vue-ui-stackbar-CVIF37k7.js} +67 -67
  161. package/dist/vue-ui-stackline-DX1AYpur.js +2398 -0
  162. package/dist/{vue-ui-strip-plot-DdzflSOm.js → vue-ui-strip-plot--fR31p0x.js} +49 -49
  163. package/dist/{vue-ui-table-BZbLau0d.js → vue-ui-table-DSE4d-Dx.js} +87 -87
  164. package/dist/{vue-ui-table-heatmap-DX80uRHe.js → vue-ui-table-heatmap-DKE7y65s.js} +17 -17
  165. package/dist/vue-ui-table-sparkline-KOk0iH56.js +712 -0
  166. package/dist/vue-ui-thermometer-FQvSBV4T.js +763 -0
  167. package/dist/{vue-ui-timer-smc39MBP.js → vue-ui-timer-BsSpuP2_.js} +6 -6
  168. package/dist/{vue-ui-tiremarks-MwPUc9H4.js → vue-ui-tiremarks-f85yEqZh.js} +19 -19
  169. package/dist/vue-ui-treemap-DdSJEMp-.js +1587 -0
  170. package/dist/vue-ui-waffle-BHsayx6v.js +1362 -0
  171. package/dist/{vue-ui-wheel-VQ5Sc_Kt.js → vue-ui-wheel-DerItN6D.js} +51 -51
  172. package/dist/{vue-ui-word-cloud-BqsUdsCY.js → vue-ui-word-cloud-DV-qLV17.js} +27 -27
  173. package/dist/{vue-ui-world-Dq9I3omC.js → vue-ui-world-DhH-_2IC.js} +445 -445
  174. package/dist/{vue-ui-xy-BRITAMZZ.js → vue-ui-xy-CuAsNLLv.js} +162 -162
  175. package/dist/{vue-ui-xy-D4D9tjiY.js → vue-ui-xy-DMoj6Y3F.js} +537 -534
  176. package/dist/{vue-ui-xy-canvas-CYQF5hVa.js → vue-ui-xy-canvas-CrzY1ni9.js} +65 -65
  177. package/package.json +2 -2
  178. package/dist/exposedLib-BJbE_A8E.js +0 -19
  179. package/dist/vue-ui-3d-bar-BUEcrSrc.js +0 -1757
  180. package/dist/vue-ui-age-pyramid-Zw5otO78.js +0 -1238
  181. package/dist/vue-ui-carousel-table-CrmVyfym.js +0 -455
  182. package/dist/vue-ui-chestnut-BQq65pNh.js +0 -2010
  183. package/dist/vue-ui-chord-BA2jFRMP.js +0 -1391
  184. package/dist/vue-ui-donut-evolution-C6fXP7QH.js +0 -1510
  185. package/dist/vue-ui-dumbbell-1K5kOirf.js +0 -1530
  186. package/dist/vue-ui-funnel-CheSqvyj.js +0 -777
  187. package/dist/vue-ui-gauge-Cjtovl1s.js +0 -920
  188. package/dist/vue-ui-history-plot-PkrNUPpp.js +0 -1554
  189. package/dist/vue-ui-quadrant-C00cEk5o.js +0 -1978
  190. package/dist/vue-ui-radar-jNxRTIur.js +0 -1281
  191. package/dist/vue-ui-relation-circle-Ne_rI2jS.js +0 -924
  192. package/dist/vue-ui-sparkhistogram-DpPjIA7n.js +0 -560
  193. package/dist/vue-ui-sparkline-DLay6Hog.js +0 -1513
  194. package/dist/vue-ui-stackline-CrUTz-k1.js +0 -2398
  195. package/dist/vue-ui-table-sparkline-C3_J575b.js +0 -707
  196. package/dist/vue-ui-thermometer-Bo32hwAO.js +0 -763
  197. package/dist/vue-ui-treemap-BNG7Zc04.js +0 -1587
  198. package/dist/vue-ui-waffle-D-9Ny9vN.js +0 -1362
@@ -0,0 +1,1587 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { Ct as t, Et as n, G as r, H as i, J as a, K as o, S as s, Ut as c, Vt as l, X as u, Z as d, gt as f, i as ee, it as te, kt as p, r as ne, t as re, x as ie, y as m } from "./lib-CXicicWN.js";
3
+ import { t as ae } from "./useConfig-C10cdg45.js";
4
+ import { t as oe } from "./usePrinter-Dng0UK-G.js";
5
+ import { n as se, t as ce } from "./BaseScanner-DZvpgOjM.js";
6
+ import { t as le } from "./useSvgExport-SVIsDot8.js";
7
+ import { t as ue } from "./useNestedProp-APyFoLCQ.js";
8
+ import { t as de } from "./useThemeCheck-C43Tcqmk.js";
9
+ import { t as fe } from "./img-BCAOkqfM.js";
10
+ import { n as pe } from "./Title-CVYf1f8m.js";
11
+ import { t as me } from "./_plugin-vue_export-helper-B3ysoDQm.js";
12
+ import { c as he } from "./canvas-lib-BOP_HS11.js";
13
+ import { t as ge } from "./useResponsive-BfnK0KxU.js";
14
+ import { t as _e } from "./BaseIcon-DEtwcvEH.js";
15
+ import { t as ve } from "./BaseLegendToggle-B-lM0iV1.js";
16
+ import { t as ye } from "./A11yDataTable-DdRsVULz.js";
17
+ import { t as be } from "./useUserOptionState-DK-_1ddE.js";
18
+ import { t as xe } from "./useChartAccessibility-DYqac8yF.js";
19
+ import { t as Se } from "./Legend-BVDhEEsC.js";
20
+ import { t as Ce } from "./vue_ui_treemap-DoEtkRN6.js";
21
+ import { Fragment as we, Teleport as Te, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createSlots as Ee, createTextVNode as De, createVNode as Oe, defineAsyncComponent as b, guardReactiveProps as x, mergeProps as ke, nextTick as Ae, normalizeClass as je, normalizeProps as S, normalizeStyle as C, onBeforeUnmount as Me, onMounted as Ne, openBlock as w, ref as T, renderList as Pe, renderSlot as E, resolveDynamicComponent as Fe, shallowRef as D, toDisplayString as Ie, toRefs as Le, unref as O, useSlots as Re, watch as ze, withCtx as k, withKeys as Be, withModifiers as Ve } from "vue";
22
+ //#region src/treemap.js
23
+ function He(e, t) {
24
+ let n = e.length;
25
+ if (n === 0) throw Error(`Max aspect ratio cannot be computed: ${e} is an empty array`);
26
+ {
27
+ let r = Infinity, i = -Infinity, a = 0;
28
+ for (let t = 0; t < n; t += 1) {
29
+ let n = e[t].normalizedValue;
30
+ n < r && (r = n), n > i && (i = n), a += n;
31
+ }
32
+ return Math.max(t ** 2 * i / a ** 2, a ** 2 / (t ** 2 * r));
33
+ }
34
+ }
35
+ function Ue(e) {
36
+ let { xOffset: t, yOffset: n, width: r, height: i } = e;
37
+ return {
38
+ x0: t,
39
+ y0: n,
40
+ x1: t + r,
41
+ y1: n + i
42
+ };
43
+ }
44
+ function We(e, t, n) {
45
+ if (e.length === 0) return !0;
46
+ {
47
+ let r = e.concat(t);
48
+ return He(e, n) >= He(r, n);
49
+ }
50
+ }
51
+ function Ge(e) {
52
+ let t = [], n = e.length;
53
+ for (let r = 0; r < n; r += 1) {
54
+ let n = e[r], i = n.length;
55
+ for (let e = 0; e < i; e += 1) t.push(n[e]);
56
+ }
57
+ return t;
58
+ }
59
+ function Ke(e, t) {
60
+ return $e({
61
+ ...t,
62
+ children: e
63
+ });
64
+ }
65
+ function qe(e) {
66
+ return (e.x1 - e.x0) * (e.y1 - e.y0);
67
+ }
68
+ function Je(e, t) {
69
+ let { width: n, height: r, xOffset: i, yOffset: a } = Ze(t), o = e.length, s = e.map((e) => e.normalizedValue || 0).reduce((e, t) => e + t, 0), c = s / r, l = s / n, u = i, d = a, f = [];
70
+ if (n >= r) {
71
+ for (let t = 0; t < o; t += 1) {
72
+ let n = e[t], r = d + n.normalizedValue / c, i = {
73
+ x0: u,
74
+ y0: d,
75
+ x1: u + c,
76
+ y1: r
77
+ }, a = Object.assign({}, n, i);
78
+ d = r, f.push(a);
79
+ }
80
+ return f;
81
+ } else {
82
+ for (let t = 0; t < o; t += 1) {
83
+ let n = e[t], r = u + n.normalizedValue / l, i = {
84
+ x0: u,
85
+ y0: d,
86
+ x1: r,
87
+ y1: d + l
88
+ }, a = Object.assign({}, n, i);
89
+ u = r, f.push(a);
90
+ }
91
+ return f;
92
+ }
93
+ }
94
+ function Ye(e) {
95
+ let t = Ze(e), n = t.width, r = t.height;
96
+ return Math.min(n, r);
97
+ }
98
+ function Xe(e, t) {
99
+ let n = e.length, r = t / e.map((e) => e.value ?? 0).reduce((e, t) => e + t, 0), i = [], a, o;
100
+ for (let t = 0; t < n; t += 1) o = e[t], a = Object.assign({}, o, { normalizedValue: o.value * (r || 0) }), i.push(a);
101
+ return i;
102
+ }
103
+ function Ze(e) {
104
+ let { x0: t, y0: n, x1: r, y1: i } = e;
105
+ return {
106
+ xOffset: t,
107
+ yOffset: n,
108
+ width: r - t,
109
+ height: i - n
110
+ };
111
+ }
112
+ function Qe(e, t, n, r) {
113
+ let i = e, a = t, o = n, s = r;
114
+ for (;;) {
115
+ let e = i.length;
116
+ if (e === 0) {
117
+ let e = Je(a, o);
118
+ return s.concat(e);
119
+ }
120
+ let t = Ye(o), n = i[0], r = i.slice(1, e);
121
+ if (We(a, n, t)) {
122
+ let e = a.concat(n);
123
+ i = r, a = e, o = o, s = s;
124
+ } else {
125
+ let e = a.length, t = 0;
126
+ for (let n = 0; n < e; n += 1) t += a[n].normalizedValue;
127
+ let n = A(o, t), r = Je(a, o), c = s.concat(r);
128
+ i = i, a = [], o = n, s = c;
129
+ }
130
+ }
131
+ }
132
+ function $e(e) {
133
+ if (e.children === void 0 || !e.children.length) return [e];
134
+ {
135
+ let t = Qe(Xe(e.children, qe(e)), [], e, []), n = t.length, r = [];
136
+ for (let e = 0; e < n; e += 1) r.push($e(t[e]));
137
+ return Ge(r);
138
+ }
139
+ }
140
+ function A(e, t) {
141
+ let { width: n, height: r, xOffset: i, yOffset: a } = Ze(e);
142
+ if (n >= r) {
143
+ let e = t / r, o = n - e;
144
+ return Ue({
145
+ xOffset: i + e,
146
+ yOffset: a,
147
+ width: o,
148
+ height: r
149
+ });
150
+ } else {
151
+ let e = t / n, o = r - e;
152
+ return Ue({
153
+ xOffset: i,
154
+ yOffset: a + e,
155
+ width: n,
156
+ height: o
157
+ });
158
+ }
159
+ }
160
+ //#endregion
161
+ //#region src/components/vue-ui-treemap.vue
162
+ var j = /* @__PURE__ */ e({ default: () => Ct }), et = ["id"], tt = ["id"], nt = ["id"], rt = [
163
+ "tabindex",
164
+ "onClick",
165
+ "onKeydown",
166
+ "data-last-crumb",
167
+ "onMouseenter",
168
+ "onFocus"
169
+ ], it = { class: "vue-ui-treemap-crumb-unit" }, at = { class: "vue-ui-treemap-crumb-unit-label" }, ot = {
170
+ key: 0,
171
+ style: {
172
+ width: "24px",
173
+ display: "flex",
174
+ "align-items": "center"
175
+ }
176
+ }, st = {
177
+ key: 0,
178
+ class: "vue-ui-treemap-crumb-unit-arrow"
179
+ }, ct = { style: { position: "relative" } }, lt = [
180
+ "xmlns",
181
+ "aria-describedby",
182
+ "viewBox"
183
+ ], ut = { key: 0 }, dt = ["id"], ft = ["stop-color"], pt = ["stop-color"], mt = [
184
+ "x",
185
+ "y",
186
+ "height",
187
+ "width",
188
+ "fill",
189
+ "rx",
190
+ "stroke",
191
+ "stroke-width",
192
+ "onClick",
193
+ "onMouseenter",
194
+ "onMouseleave"
195
+ ], ht = ["innerHTML"], gt = [
196
+ "x",
197
+ "y",
198
+ "height",
199
+ "width"
200
+ ], _t = {
201
+ style: {
202
+ width: "100%",
203
+ height: "100%"
204
+ },
205
+ class: "vue-ui-treemap-cell"
206
+ }, vt = {
207
+ key: 0,
208
+ style: {
209
+ position: "absolute",
210
+ top: "100%",
211
+ left: "0",
212
+ width: "100%"
213
+ },
214
+ "data-dom-to-png-ignore": "",
215
+ "aria-hidden": "true"
216
+ }, yt = {
217
+ key: 6,
218
+ class: "vue-data-ui-watermark"
219
+ }, bt = ["id"], xt = ["onClick"], St = ["innerHTML"], Ct = /*#__PURE__*/ me({
220
+ __name: "vue-ui-treemap",
221
+ props: {
222
+ config: {
223
+ type: Object,
224
+ default() {
225
+ return {};
226
+ }
227
+ },
228
+ dataset: {
229
+ type: Array,
230
+ default() {
231
+ return [];
232
+ }
233
+ }
234
+ },
235
+ emits: [
236
+ "selectLegend",
237
+ "selectDatapoint",
238
+ "copyAlt"
239
+ ],
240
+ setup(e, { expose: me, emit: He }) {
241
+ let Ue = b(() => import("./DataTable-DJZgdnIn.js")), We = b(() => import("./PenAndPaper-DJIIG6dv.js").then((e) => e.t)), Ge = b(() => import("./vue-ui-accordion-Ck_u5Nro.js").then((e) => e.n)), qe = b(() => import("./Tooltip-BmGCBJuU.js")), Je = b(() => import("./UserOptions-xqbNpHi2.js").then((e) => e.n)), Ye = b(() => import("./PackageVersion-_Dwp4NUr.js").then((e) => e.t)), Xe = b(() => import("./BaseDraggableDialog-a9xCKjW-.js").then((e) => e.n)), { vue_ui_treemap: Ze } = ae(), { isThemeValid: Qe, warnInvalidTheme: $e } = de(), A = e, j = He, Ct = Re();
242
+ Ne(() => {
243
+ Ct["chart-background"] && console.warn("VueUiTreemap does not support the #chart-background slot.");
244
+ });
245
+ let wt = h(() => !!A.dataset && A.dataset.length), Tt = h(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), M = T(i()), Et = T(!1), Dt = T(""), Ot = T(!1), kt = T(0), N = T([]), P = D(null), At = D(null), jt = D(null), Mt = D(null), Nt = D(null), Pt = T(0), Ft = T(0), It = T(0), F = T([]), Lt = T(null), Rt = T(!1), zt = T(null), Bt = T(null), Vt = T(null), Ht = T(/* @__PURE__ */ new Map()), Ut = T(!1), Wt = T(!1), I = T(null), Gt = T({
246
+ x: 0,
247
+ y: 0
248
+ }), Kt = T("pointer"), qt = T(!1), L = T(en()), R = h(() => L.value.userOptions.useCursorPointer), Jt = h(() => c({
249
+ defaultConfig: {
250
+ userOptions: { show: !1 },
251
+ style: { chart: {
252
+ backgroundColor: "#999999",
253
+ layout: {
254
+ labels: { showDefaultLabels: !1 },
255
+ rects: { stroke: "#6A6A6A" }
256
+ },
257
+ legend: { backgroundColor: "transparent" }
258
+ } }
259
+ },
260
+ userConfig: L.value.skeletonConfig ?? {}
261
+ })), { loading: z, FINAL_DATASET: Yt, manualLoading: Xt } = se({
262
+ ...Le(A),
263
+ FINAL_CONFIG: L,
264
+ prepareConfig: en,
265
+ skeletonDataset: A.config?.skeletonDataset ?? [{
266
+ name: "_",
267
+ value: 53,
268
+ color: "#CACACA90",
269
+ children: [
270
+ {
271
+ name: "_",
272
+ value: 21
273
+ },
274
+ {
275
+ name: "_",
276
+ value: 13
277
+ },
278
+ {
279
+ name: "_",
280
+ value: 8
281
+ },
282
+ {
283
+ name: "_",
284
+ value: 5
285
+ },
286
+ {
287
+ name: "_",
288
+ value: 3
289
+ },
290
+ {
291
+ name: "_",
292
+ value: 2
293
+ },
294
+ {
295
+ name: "_",
296
+ value: 1
297
+ }
298
+ ]
299
+ }],
300
+ skeletonConfig: c({
301
+ defaultConfig: L.value,
302
+ userConfig: Jt.value
303
+ })
304
+ }), { userOptionsVisible: Zt, setUserOptionsVisibility: Qt, keepUserOptionState: $t } = be({ config: L.value }), { svgRef: B } = xe({ config: L.value.style.chart.title });
305
+ function en() {
306
+ let e = ue({
307
+ userConfig: A.config,
308
+ defaultConfig: Ze
309
+ }), t = e.theme;
310
+ if (!t) return e;
311
+ if (!Qe.value(e)) return $e(e), e;
312
+ let n = ue({
313
+ userConfig: Ce[t] || A.config,
314
+ defaultConfig: e
315
+ }), r = ue({
316
+ userConfig: A.config,
317
+ defaultConfig: n
318
+ });
319
+ return {
320
+ ...r,
321
+ customPalette: r.customPalette.length ? r.customPalette : l[t] || p
322
+ };
323
+ }
324
+ ze(() => A.config, (e) => {
325
+ z.value || (L.value = en()), Zt.value = !L.value.userOptions.showOnChartHover, Pt.value += 1, Ft.value += 1, It.value += 1, V.value.showTable = L.value.table.show, V.value.showTooltip = L.value.style.chart.tooltip.show;
326
+ }, { deep: !0 });
327
+ let { isPrinting: tn, isImaging: nn, generatePdf: rn, generateImage: an } = oe({
328
+ elementId: `treemap_${M.value}`,
329
+ fileName: L.value.style.chart.title.text || "vue-ui-treemap",
330
+ options: L.value.userOptions.print
331
+ }), on = h(() => L.value.userOptions.show && !L.value.style.chart.title.text), sn = h(() => ie(L.value.customPalette)), V = T({
332
+ showTable: L.value.table.show,
333
+ showTooltip: L.value.style.chart.tooltip.show
334
+ });
335
+ ze(L, () => {
336
+ V.value = {
337
+ showTable: L.value.table.show,
338
+ showTooltip: L.value.style.chart.tooltip.show
339
+ };
340
+ }, { immediate: !0 });
341
+ let cn = T({
342
+ height: L.value.style.chart.height,
343
+ width: L.value.style.chart.width
344
+ });
345
+ function ln(e) {
346
+ let t = P.value, n = cn.value.height;
347
+ return !t || !n ? e : e * (n / t.getBoundingClientRect().height);
348
+ }
349
+ function un() {
350
+ if (!Lt.value || Z.value.length <= 1) return 0;
351
+ let e = Lt.value, t = getComputedStyle(e);
352
+ return ln(e.offsetHeight + parseFloat(t.marginTop || "0") + parseFloat(t.marginBottom || "0") + parseFloat(t.paddingTop || "0") + parseFloat(t.paddingBottom || "0"));
353
+ }
354
+ let H = h(() => {
355
+ let e = L.value.style.chart.padding, t = cn.value.width, n = cn.value.height, r = un(), i = e.left, a = t - e.right, o = e.top, s = n - e.bottom - r;
356
+ return {
357
+ left: i,
358
+ top: o,
359
+ right: a,
360
+ bottom: s,
361
+ width: a - i,
362
+ height: Math.max(0, s - o),
363
+ vbWidth: t,
364
+ vbHeight: n - r,
365
+ offsetY: r
366
+ };
367
+ }), U = T(o(Yt.value)), W = T(U.value), dn = D(/* @__PURE__ */ new Map());
368
+ ze([U, () => L.value], () => {
369
+ Vt.value = null, Ht.value = /* @__PURE__ */ new Map();
370
+ }, { deep: !0 }), ze(() => N.value, () => {
371
+ Vt.value = null, Ht.value = /* @__PURE__ */ new Map(), hn(), It.value += 1, Ft.value += 1;
372
+ }, { deep: !0 }), ze([() => cn.value.width, () => cn.value.height], () => {
373
+ Ht.value = /* @__PURE__ */ new Map();
374
+ });
375
+ function fn(e) {
376
+ Array.isArray(e) && e.forEach((e, t) => {
377
+ e.id ||= i(), e.sourceColor === void 0 && (e.sourceColor = m(e.color) || null);
378
+ let n = e.sourceColor || dn.value.get(e.id) || sn.value[t] || p[t] || p[t % p.length];
379
+ n = m(n), dn.value.set(e.id, n), e.color = n, pn(e, n);
380
+ });
381
+ }
382
+ function pn(e, t) {
383
+ Array.isArray(e.children) && e.children.forEach((n) => {
384
+ n.id ||= i(), n.parentId = e.id, n.sourceColor === void 0 && (n.sourceColor = m(n.color) || null);
385
+ let r = n.sourceColor || t;
386
+ n.color = r, pn(n, r);
387
+ });
388
+ }
389
+ function mn(e) {
390
+ let t = X(e);
391
+ for (; t?.parentId;) t = X(t.parentId);
392
+ return t?.id ?? null;
393
+ }
394
+ function hn() {
395
+ let e = U.value.filter((e) => !N.value.includes(e.id));
396
+ if (!F.value.length) {
397
+ W.value = e;
398
+ return;
399
+ }
400
+ let t = F.value[F.value.length - 1], n = X(t);
401
+ if (!n) {
402
+ F.value = [], W.value = e;
403
+ return;
404
+ }
405
+ let r = mn(n.id);
406
+ if (r && N.value.includes(r)) {
407
+ F.value = [], W.value = e;
408
+ return;
409
+ }
410
+ W.value = [n];
411
+ }
412
+ ze(() => Yt.value, () => {
413
+ U.value = o(Yt.value), fn(U.value), hn(), It.value += 1, Ft.value += 1;
414
+ }, {
415
+ deep: !0,
416
+ immediate: !0,
417
+ flush: "post"
418
+ });
419
+ let G = D(null), gn = D(null);
420
+ Ne(() => {
421
+ Rt.value = !0, vn();
422
+ });
423
+ let _n = h(() => L.value.debug);
424
+ function vn() {
425
+ if (n(A.dataset) && u({
426
+ componentName: "VueUiTreemap",
427
+ type: "dataset",
428
+ debug: _n.value
429
+ }), fn(U.value), n(A.dataset) || (Xt.value = L.value.loading), L.value.responsive) {
430
+ let e = he(() => {
431
+ let { width: e, height: t } = ge({
432
+ chart: P.value,
433
+ title: L.value.style.chart.title.text ? At.value : null,
434
+ legend: L.value.style.chart.legend.show ? jt.value : null,
435
+ source: Mt.value,
436
+ noTitle: Nt.value
437
+ });
438
+ requestAnimationFrame(() => {
439
+ cn.value.width = e, cn.value.height = t - 12;
440
+ });
441
+ });
442
+ G.value && (gn.value && G.value.unobserve(gn.value), G.value.disconnect()), G.value = new ResizeObserver(e), gn.value = P.value.parentNode, G.value.observe(gn.value);
443
+ }
444
+ }
445
+ Me(() => {
446
+ G.value && (gn.value && G.value.unobserve(gn.value), G.value.disconnect());
447
+ });
448
+ let yn = h(() => W.value.map((e, t) => ({
449
+ ...e,
450
+ color: m(e.color) || sn.value[t] || p[t] || p[t % p.length]
451
+ })).filter((e) => !N.value.includes(e.id))), bn = h(() => U.value.filter((e) => !N.value.includes(e.id)).map((e) => e.value || 0).reduce((e, t) => e + t, 0)), xn = h({
452
+ get() {
453
+ let e = [...yn.value];
454
+ return L.value.style.chart.layout.sorted && (e = [...yn.value].sort((e, t) => t.value - e.value)), e.map((e) => ({ ...e }));
455
+ },
456
+ set(e) {
457
+ return e;
458
+ }
459
+ });
460
+ function Sn(e, t) {
461
+ return e.value / t;
462
+ }
463
+ function Cn(e, n, r) {
464
+ let i = L.value.style.chart.layout.rects.colorRatio - Sn(n, r);
465
+ return t(e, i < 0 ? 0 : i);
466
+ }
467
+ function wn(e) {
468
+ return Array.isArray(e.children) && e.children.length > 0;
469
+ }
470
+ function Tn(e) {
471
+ return [...e].sort((e, t) => {
472
+ let n = wn(e), r = wn(t);
473
+ if (n !== r) return n - r;
474
+ let i = Number(e.value) || 0;
475
+ return (Number(t.value) || 0) - i;
476
+ });
477
+ }
478
+ function En(e, t, n, r, i) {
479
+ return Tn(e).map((e, a) => {
480
+ let o = e.sourceColor || m(e.color) || m(t) || sn.value[a] || p[a] || p[a % p.length], s = e.sourceColor ? e.sourceColor : Cn(o, e, r), c = Sn(e, r), l = i ?? e.parentId ?? e.id, u = Array.isArray(e.children) && e.children.length && e.children.reduce((e, t) => e + (Number(t.value) || 0), 0) || 1;
481
+ return {
482
+ ...e,
483
+ color: s,
484
+ proportion: c,
485
+ parentName: n,
486
+ rootId: l,
487
+ children: Array.isArray(e.children) && e.children.length ? En(e.children, o, e.name, u, l) : void 0
488
+ };
489
+ });
490
+ }
491
+ function Dn(e) {
492
+ let t = jn(e), n = On(e), r = t * .55, i = t * .55, a = t * 1.05, o = t * 1.05, s = t * .35, c = n ? a + o + s : t * .45, l = e.x0 + r, u = e.x1 - r, d = e.y0 + c, f = e.y1 - i;
493
+ return u <= l || f <= d ? null : {
494
+ x0: l,
495
+ y0: d,
496
+ x1: u,
497
+ y1: f
498
+ };
499
+ }
500
+ function On(e) {
501
+ let { height: t, lineHeight: n, width: r } = yr(e);
502
+ return t >= n && r > 6;
503
+ }
504
+ function kn(e, t, n = 0, r = null) {
505
+ if (!Array.isArray(e) || !e.length) return [];
506
+ let i = e.map((e) => {
507
+ let { children: t, ...n } = e;
508
+ return { ...n };
509
+ }), a = new Map(e.map((e) => [e.id, Array.isArray(e.children) ? e.children : []])), o = new Map(e.map((e) => [e.id, e])), s = Ke(i, t), c = [];
510
+ for (let e of s) {
511
+ let t = a.get(e.id) || [], i = o.get(e.id), s = {
512
+ ...e,
513
+ depth: n,
514
+ parentId: r ?? e.parentId ?? null,
515
+ color: i?.color ?? e.color ?? null,
516
+ children: t,
517
+ isVisibleNode: !0,
518
+ showLabel: On(e)
519
+ };
520
+ if (c.push(s), t.length) {
521
+ let r = Dn(s);
522
+ r && c.push(...kn(t, r, n + 1, e.id));
523
+ }
524
+ }
525
+ return c;
526
+ }
527
+ let An = h(() => {
528
+ let e = W.value.length ? W.value : xn.value, t = e.map((e) => Number(e.value) || 0).reduce((e, t) => e + t, 0) || 1;
529
+ return kn(e.map((e, n) => {
530
+ let r = e.children ? e.children.reduce((e, t) => e + (Number(t.value) || 0), 0) : e.value, { children: a, ...o } = e, s = e.sourceColor || m(e.color) || dn.value.get(e.id) || sn.value[n] || p[n] || p[n % p.length], c = e.sourceColor ? e.sourceColor : Cn(s, e, t);
531
+ return {
532
+ ...o,
533
+ id: e.id || i(),
534
+ parentId: e.parentId ?? null,
535
+ name: e.name,
536
+ value: e.value,
537
+ color: c,
538
+ proportion: (Number(e.value) || 0) / t,
539
+ children: Array.isArray(e.children) && e.children.length ? En(e.children, s, e.name, r || 1) : void 0
540
+ };
541
+ }), {
542
+ x0: H.value.left,
543
+ y0: H.value.top,
544
+ x1: H.value.left + H.value.width,
545
+ y1: H.value.top + H.value.height
546
+ });
547
+ }), K = h(() => An.value);
548
+ function q({ y0: e, y1: t }) {
549
+ return t - e <= 0 ? 1e-4 : t - e;
550
+ }
551
+ function J({ x0: e, x1: t }) {
552
+ return t - e <= 0 ? 1e-4 : t - e;
553
+ }
554
+ function jn(e) {
555
+ let t = L.value.style.chart.layout.labels, n = t.fontSize, r = t.minFontSize, i = t.fontSize * 2, a = .6, o = e.proportion;
556
+ typeof o == "number" && isFinite(o) || (o = Math.max(1e-6, J(e) * q(e)) / Math.max(1e-6, H.value.width * H.value.height));
557
+ let s = a + (1 - a) * Math.min(1, Math.max(0, o)) ** .5, c = .9 ** Math.max(0, Number(e.depth) || 0), l = n * s * c, u = Math.max(1e-4, Math.min(J(e), q(e)));
558
+ return l = Math.min(l, u * .9), l = Math.min(l, i), l = Math.max(r, l), l;
559
+ }
560
+ function Mn(e) {
561
+ Ot.value = e, kt.value += 1;
562
+ }
563
+ let Y = h(() => ({
564
+ startX: 0,
565
+ startY: 0,
566
+ width: H.value.vbWidth,
567
+ height: H.value.vbHeight
568
+ }));
569
+ function X(e, t = U.value) {
570
+ for (let n of t) {
571
+ if (n.id === e) return n;
572
+ if (n.children) {
573
+ let t = X(e, n.children);
574
+ if (t) return t;
575
+ }
576
+ }
577
+ return null;
578
+ }
579
+ function Nn(e) {
580
+ let t = [], n = X(e);
581
+ for (; n && n.parentId;) {
582
+ let e = X(n.parentId);
583
+ if (!e) break;
584
+ t.unshift(e.id), n = e;
585
+ }
586
+ return t;
587
+ }
588
+ let Pn = h(() => F.value.length > 0);
589
+ function Fn() {
590
+ W.value = U.value.slice(), F.value = [], j("selectDatapoint", void 0);
591
+ }
592
+ function In() {
593
+ return F.value[F.value.length - 1] ?? null;
594
+ }
595
+ function Ln(e, t, n) {
596
+ F.value = [...Nn(e.id), e.id], W.value = [e], L.value.events.datapointClick && L.value.events.datapointClick({
597
+ datapoint: t ?? e,
598
+ seriesIndex: n
599
+ }), j("selectDatapoint", t ?? e);
600
+ }
601
+ function Rn(e, t) {
602
+ let n = In();
603
+ if (!n) {
604
+ Fn();
605
+ return;
606
+ }
607
+ let r = X(n);
608
+ if (!r?.parentId) {
609
+ L.value.events.datapointClick && L.value.events.datapointClick({
610
+ datapoint: e,
611
+ seriesIndex: t
612
+ }), Fn();
613
+ return;
614
+ }
615
+ let i = X(r.parentId);
616
+ if (!i) {
617
+ Fn();
618
+ return;
619
+ }
620
+ F.value = [...Nn(i.id), i.id], W.value = [i], L.value.events.datapointClick && L.value.events.datapointClick({
621
+ datapoint: e,
622
+ seriesIndex: t
623
+ }), j("selectDatapoint", e);
624
+ }
625
+ function zn(e, t) {
626
+ if (!e) {
627
+ Fn();
628
+ return;
629
+ }
630
+ let n = X(e.id);
631
+ if (n) {
632
+ if (In() === n.id) {
633
+ Rn(e, t);
634
+ return;
635
+ }
636
+ Ln(n, e, t);
637
+ }
638
+ }
639
+ function Bn(e) {
640
+ return e ? In() === e.id : !1;
641
+ }
642
+ let Z = h(() => {
643
+ let e = [{
644
+ id: null,
645
+ label: "All"
646
+ }];
647
+ if (F.value.length > 0) {
648
+ let t = X(F.value[F.value.length - 1]), n = [];
649
+ for (; t;) n.unshift(t), t = t.parentId ? X(t.parentId) : null;
650
+ for (let t of n) e.push({
651
+ id: t.id,
652
+ label: t.name,
653
+ node: t
654
+ });
655
+ }
656
+ return e;
657
+ }), Q = D(null), Vn = h(() => U.value.map((e, t) => ({
658
+ ...e,
659
+ color: m(e.color) || sn.value[t] || p[t] || p[t % p.length],
660
+ shape: "square"
661
+ })).sort((e, t) => t.value - e.value).map((e, t) => {
662
+ let n = e.value / U.value.map((e) => e.value).reduce((e, t) => e + t, 0);
663
+ return {
664
+ ...e,
665
+ proportion: n,
666
+ isSegregated: N.value.includes(e.id),
667
+ segregate: () => Gn(e),
668
+ opacity: N.value.includes(e.id) ? .5 : 1,
669
+ display: `${e.name}${L.value.style.chart.legend.showPercentage || L.value.style.chart.legend.showValue ? ": " : ""}${L.value.style.chart.legend.showValue ? ee(L.value.style.chart.layout.labels.formatter, e.value, r({
670
+ p: L.value.style.chart.layout.labels.prefix,
671
+ v: e.value,
672
+ s: L.value.style.chart.layout.labels.suffix,
673
+ r: L.value.style.chart.legend.roundingValue
674
+ }), { datapoint: e }) : ""}${L.value.style.chart.legend.showPercentage ? N.value.includes(e.id) ? `${L.value.style.chart.legend.showValue ? " (" : ""}- %${L.value.style.chart.legend.showValue ? ")" : ""}` : `${L.value.style.chart.legend.showValue ? " (" : ""}${isNaN(e.value / bn.value) ? "-" : (e.value / bn.value * 100).toFixed(L.value.style.chart.legend.roundingPercentage)}%${L.value.style.chart.legend.showValue ? ")" : ""}` : ""}`
675
+ };
676
+ })), Hn = h(() => ({
677
+ cy: "treemap-div-legend",
678
+ backgroundColor: L.value.style.chart.legend.backgroundColor,
679
+ color: L.value.style.chart.legend.color,
680
+ fontSize: L.value.style.chart.legend.fontSize,
681
+ paddingBottom: 12,
682
+ fontWeight: L.value.style.chart.legend.bold ? "bold" : ""
683
+ })), Un = h(() => N.value.length === Vn.value.length);
684
+ function Wn() {
685
+ N.value.length ? N.value = [] : Vn.value.forEach((e) => {
686
+ N.value.push(e.id);
687
+ }), j("selectLegend", U.value.filter((e) => !N.value.includes(e.id)));
688
+ }
689
+ function Gn(e) {
690
+ Q.value = null, N.value.includes(e.id) ? N.value = N.value.filter((t) => t !== e.id) : N.value.length < A.dataset.length - 1 && N.value.push(e.id), j("selectLegend", U.value.filter((e) => !N.value.includes(e.id)));
691
+ }
692
+ function Kn(e) {
693
+ return U.value.length ? U.value.find((t) => t.name === e) || (L.value.debug && console.warn(`VueUiTreemap - Series name not found "${e}"`), null) : (L.value.debug && console.warn("VueUiTreemap - There are no series to show."), null);
694
+ }
695
+ function qn(e) {
696
+ let t = Kn(e);
697
+ t !== null && N.value.includes(t.id) && Gn({ id: t.id });
698
+ }
699
+ function Jn(e) {
700
+ let t = Kn(e);
701
+ t !== null && (N.value.includes(t.id) || Gn({ id: t.id }));
702
+ }
703
+ function Yn({ datapoint: e, seriesIndex: t }) {
704
+ Q.value = null, Et.value = !1, I.value = null, Kt.value = "pointer", L.value.events.datapointLeave && L.value.events.datapointLeave({
705
+ datapoint: e,
706
+ seriesIndex: t
707
+ });
708
+ }
709
+ let Xn = T(null);
710
+ function Zn({ datapoint: e, seriesIndex: t, triggerMode: n = "pointer" }) {
711
+ if (Un.value) return;
712
+ L.value.events.datapointEnter && L.value.events.datapointEnter({
713
+ datapoint: e,
714
+ seriesIndex: t
715
+ }), I.value = t, Kt.value = n, Q.value = e, Xn.value = {
716
+ datapoint: e,
717
+ seriesIndex: t,
718
+ config: L.value,
719
+ series: yn.value
720
+ };
721
+ let i = L.value.style.chart.tooltip.customFormat;
722
+ if (f(i) && te(() => i({
723
+ seriesIndex: t,
724
+ datapoint: e,
725
+ series: yn.value,
726
+ config: L.value
727
+ }))) Dt.value = i({
728
+ seriesIndex: t,
729
+ datapoint: e,
730
+ series: yn.value,
731
+ config: L.value
732
+ });
733
+ else {
734
+ let n = "";
735
+ n += `<div style="width:100%;text-align:center;border-bottom:1px solid ${L.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`, n += `<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>`, n += `<b>${ee(L.value.style.chart.layout.labels.formatter, e.value, r({
736
+ p: L.value.style.chart.layout.labels.prefix,
737
+ v: e.value,
738
+ s: L.value.style.chart.layout.labels.suffix,
739
+ r: L.value.style.chart.tooltip.roundingValue
740
+ }), {
741
+ datapoint: e,
742
+ seriesIndex: t
743
+ })}</b>`, Dt.value = `<div>${n}</div>`;
744
+ }
745
+ Et.value = !0;
746
+ }
747
+ let $ = h(() => ({
748
+ head: K.value.map((e) => ({
749
+ name: e.name,
750
+ color: e.color
751
+ })),
752
+ body: K.value.map((e) => e.value)
753
+ }));
754
+ function Qn(e = null) {
755
+ Ae(() => {
756
+ let t = $.value.head.map((e, t) => [
757
+ [e.name],
758
+ [$.value.body[t]],
759
+ [isNaN($.value.body[t] / bn.value) ? "-" : $.value.body[t] / bn.value * 100]
760
+ ]), n = s([
761
+ [L.value.style.chart.title.text],
762
+ [L.value.style.chart.title.subtitle.text],
763
+ [
764
+ [""],
765
+ ["val"],
766
+ ["%"]
767
+ ]
768
+ ].concat(t));
769
+ e ? e(n) : a({
770
+ csvContent: n,
771
+ title: L.value.style.chart.title.text || "vue-ui-treemap"
772
+ });
773
+ });
774
+ }
775
+ let $n = h(() => {
776
+ let e = [
777
+ L.value.table.columnNames.series,
778
+ L.value.table.columnNames.value,
779
+ L.value.table.columnNames.percentage
780
+ ], t = $.value.head.map((e, t) => {
781
+ let n = ee(L.value.style.chart.layout.labels.formatter, $.value.body[t], r({
782
+ p: L.value.style.chart.layout.labels.prefix,
783
+ v: $.value.body[t],
784
+ s: L.value.style.chart.layout.labels.suffix,
785
+ r: L.value.table.td.roundingValue
786
+ }));
787
+ return [
788
+ {
789
+ color: e.color,
790
+ name: e.name,
791
+ shape: "square"
792
+ },
793
+ n,
794
+ isNaN($.value.body[t] / bn.value) ? "-" : r({
795
+ v: $.value.body[t] / bn.value * 100,
796
+ s: "%",
797
+ r: L.value.table.td.roundingPercentage
798
+ })
799
+ ];
800
+ }), n = {
801
+ th: {
802
+ backgroundColor: L.value.table.th.backgroundColor,
803
+ color: L.value.table.th.color,
804
+ outline: L.value.table.th.outline
805
+ },
806
+ td: {
807
+ backgroundColor: L.value.table.td.backgroundColor,
808
+ color: L.value.table.td.color,
809
+ outline: L.value.table.td.outline
810
+ },
811
+ breakpoint: L.value.table.responsiveBreakpoint
812
+ };
813
+ return {
814
+ colNames: [L.value.table.columnNames.series, L.value.table.columnNames.value],
815
+ head: e,
816
+ body: t,
817
+ config: n
818
+ };
819
+ });
820
+ function er() {
821
+ return K.value;
822
+ }
823
+ function tr() {
824
+ V.value.showTable = !V.value.showTable;
825
+ }
826
+ function nr() {
827
+ V.value.showTooltip = !V.value.showTooltip;
828
+ }
829
+ let rr = T(!1);
830
+ function ir() {
831
+ rr.value = !rr.value;
832
+ }
833
+ let ar = T(null);
834
+ function or(e) {
835
+ ar.value = e;
836
+ }
837
+ function sr() {
838
+ ar.value = null;
839
+ }
840
+ async function cr({ scale: e = 2 } = {}) {
841
+ if (!P.value) return;
842
+ let { width: t, height: n } = P.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await fe({
843
+ domElement: P.value,
844
+ base64: !0,
845
+ img: !0,
846
+ scale: e
847
+ });
848
+ return {
849
+ imageUri: i,
850
+ base64: a,
851
+ title: L.value.style.chart.title.text,
852
+ width: t,
853
+ height: n,
854
+ aspectRatio: r
855
+ };
856
+ }
857
+ let lr = h(() => {
858
+ let e = L.value.table.useDialog && !L.value.table.show, t = V.value.showTable;
859
+ return {
860
+ component: e ? Xe : Ge,
861
+ title: `${L.value.style.chart.title.text}${L.value.style.chart.title.subtitle.text ? `: ${L.value.style.chart.title.subtitle.text}` : ""}`,
862
+ props: e ? {
863
+ backgroundColor: L.value.table.th.backgroundColor,
864
+ color: L.value.table.th.color,
865
+ headerColor: L.value.table.th.color,
866
+ headerBg: L.value.table.th.backgroundColor,
867
+ isFullscreen: Ot.value,
868
+ fullscreenParent: P.value,
869
+ forcedWidth: Math.min(800, window.innerWidth * .8),
870
+ isCursorPointer: R.value
871
+ } : {
872
+ hideDetails: !0,
873
+ config: {
874
+ open: t,
875
+ maxHeight: 1e4,
876
+ body: {
877
+ backgroundColor: L.value.style.chart.backgroundColor,
878
+ color: L.value.style.chart.color
879
+ },
880
+ head: {
881
+ backgroundColor: L.value.style.chart.backgroundColor,
882
+ color: L.value.style.chart.color
883
+ }
884
+ }
885
+ }
886
+ };
887
+ });
888
+ ze(() => V.value.showTable, (e) => {
889
+ L.value.table.show || (e && L.value.table.useDialog && zt.value ? zt.value.open() : "close" in zt.value && zt.value.close());
890
+ });
891
+ function ur() {
892
+ V.value.showTable = !1, Bt.value && Bt.value.setTableIconState(!1);
893
+ }
894
+ let dr = h(() => Vn.value.map((e) => ({
895
+ ...e,
896
+ name: e.display
897
+ }))), fr = h(() => L.value.style.chart.backgroundColor), pr = h(() => L.value.style.chart.legend), { exportSvg: mr, getSvg: hr } = le({
898
+ svg: B,
899
+ title: h(() => L.value.style.chart.title),
900
+ legend: pr,
901
+ legendItems: dr,
902
+ backgroundColor: fr
903
+ });
904
+ async function gr({ isCb: e }) {
905
+ Wt.value = !0, await Ae();
906
+ try {
907
+ if (e) {
908
+ let { blob: e, url: t, text: n, dataUrl: r } = await hr();
909
+ await Promise.resolve(L.value.userOptions.callbacks.svg({
910
+ blob: e,
911
+ url: t,
912
+ text: n,
913
+ dataUrl: r
914
+ }));
915
+ } else await Promise.resolve(mr());
916
+ } finally {
917
+ Wt.value = !1;
918
+ }
919
+ }
920
+ function _r(e) {
921
+ if (e?.stage === "start") {
922
+ Ut.value = !0;
923
+ return;
924
+ }
925
+ if (e?.stage === "end") {
926
+ Ut.value = !1;
927
+ return;
928
+ }
929
+ an();
930
+ }
931
+ function vr(e) {
932
+ let t = jn(e);
933
+ return {
934
+ fontSize: t,
935
+ paddingX: Math.max(t * .5, 4),
936
+ paddingTop: Math.max(t * .5, 4),
937
+ lineHeight: t * 1.1
938
+ };
939
+ }
940
+ function yr(e) {
941
+ let { paddingX: t, paddingTop: n, lineHeight: r } = vr(e);
942
+ return {
943
+ x: e.x0 + t,
944
+ y: e.y0 + n,
945
+ width: Math.max(J(e) - t * 2, 0),
946
+ height: Math.max(q(e) - n * 2, 0),
947
+ lineHeight: r
948
+ };
949
+ }
950
+ function br(e) {
951
+ return ne(e.color ?? L.value.style.chart.backgroundColor);
952
+ }
953
+ function xr(e, t) {
954
+ let { fontSize: n, lineHeight: i } = vr(e), a = Dr(e), o = Or(e);
955
+ if (a <= 0 || o <= 0) return [];
956
+ let s = Math.max(Math.floor(o / Math.max(i, 1)), 1), c = ee(L.value.style.chart.layout.labels.formatter, e.value, r({
957
+ p: L.value.style.chart.layout.labels.prefix,
958
+ v: e.value,
959
+ s: L.value.style.chart.layout.labels.suffix,
960
+ r: L.value.style.chart.tooltip.roundingValue
961
+ }), {
962
+ datapoint: e,
963
+ seriesIndex: t
964
+ }), l = Math.ceil(n * .2), u = Math.ceil(n * 1.4), d = Math.max(a - u - l, 0);
965
+ if (d <= 0) return [];
966
+ if (Array.isArray(e.children) && e.children.length) {
967
+ let t = Er(`${e.name} (${c})`, d, n, 500);
968
+ return t ? [t] : [];
969
+ }
970
+ let f = [], te = Er(`${e.name}`, d, n, 500);
971
+ if (te && f.push(te), s >= 2) {
972
+ let e = Er(c, d, n, 400);
973
+ e && f.push(e);
974
+ }
975
+ return f.slice(0, s);
976
+ }
977
+ function Sr({ rect: e, seriesIndex: t, isTitle: n }) {
978
+ if (!e || !L.value.style.chart.layout.labels.showDefaultLabels || !On(e)) return "";
979
+ let { fontSize: r } = vr(e), i = br(e), a = xr(e, t), o = yr(e);
980
+ if (!a.length || o.width <= 0 || o.height <= 0) return "";
981
+ let s = `treemap_clip_${M.value}_${e.id}_${e.depth}_${t}`;
982
+ return `
983
+ <g>
984
+ <defs>
985
+ <clipPath id="${s}" clipPathUnits="userSpaceOnUse">
986
+ <rect
987
+ x="${o.x}"
988
+ y="${o.y}"
989
+ width="${Math.max(o.width, 0)}"
990
+ height="${Math.max(o.height, 0)}"
991
+ />
992
+ </clipPath>
993
+ </defs>
994
+ <g clip-path="url(#${s})">
995
+ ${a.map((e, t) => {
996
+ let n = o.y + o.lineHeight * t;
997
+ return `
998
+ <text
999
+ x="${o.x}"
1000
+ y="${n}"
1001
+ fill="${i}"
1002
+ font-size="${r}"
1003
+ font-family="${L.value.style.fontFamily}"
1004
+ font-weight="${t === 0 ? 500 : 400}"
1005
+ text-anchor="start"
1006
+ dominant-baseline="text-before-edge"
1007
+ >
1008
+ ${d(e)}
1009
+ </text>
1010
+ `;
1011
+ }).join("")}
1012
+ </g>
1013
+ </g>
1014
+ `;
1015
+ }
1016
+ let Cr;
1017
+ function wr() {
1018
+ return Cr ||= document.createElement("canvas"), Cr.getContext("2d");
1019
+ }
1020
+ function Tr(e, t, n = 400) {
1021
+ let r = wr();
1022
+ return r ? (r.font = `${n} ${t}px ${L.value.style.fontFamily}`, r.measureText(String(e)).width) : e.length * t * .6;
1023
+ }
1024
+ function Er(e, t, n, r = 400) {
1025
+ let i = String(e ?? "");
1026
+ if (!i.length || t <= 0) return "";
1027
+ if (Tr(i, n, r) <= t) return i;
1028
+ if (Tr("…", n, r) > t) return "";
1029
+ let a = 0, o = i.length, s = "";
1030
+ for (; a <= o;) {
1031
+ let e = Math.floor((a + o) / 2), c = `${i.slice(0, e)}…`;
1032
+ Tr(c, n, r) <= t ? (s = c, a = e + 1) : o = e - 1;
1033
+ }
1034
+ return s || "…";
1035
+ }
1036
+ function Dr(e) {
1037
+ return yr(e).width;
1038
+ }
1039
+ function Or(e) {
1040
+ return yr(e).height;
1041
+ }
1042
+ function kr(e) {
1043
+ let t = L.value.style.chart.layout.rects.borderRadius, n = J(e), r = q(e);
1044
+ return Math.min(t, Math.min(n, r) / 6);
1045
+ }
1046
+ async function Ar() {
1047
+ if (j("copyAlt", {
1048
+ config: L.value,
1049
+ dataset: K.value
1050
+ }), !L.value.userOptions.callbacks.altCopy) {
1051
+ console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1052
+ return;
1053
+ }
1054
+ await Promise.resolve(L.value.userOptions.callbacks.altCopy({
1055
+ config: L.value,
1056
+ dataset: K.value
1057
+ }));
1058
+ }
1059
+ function jr() {
1060
+ I.value = null, qt.value = !0;
1061
+ }
1062
+ function Mr() {
1063
+ I.value = null, Kt.value = "pointer", Et.value = !1, Q.value = null, qt.value = !1;
1064
+ }
1065
+ function Nr(e) {
1066
+ if (!B.value || rr.value || document.activeElement !== B.value || !K.value.length || Un.value) return;
1067
+ let t = ["ArrowLeft", "ArrowUp"].includes(e.key), n = ["ArrowRight", "ArrowDown"].includes(e.key), r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
1068
+ if (!t && !n && !r && !i) return;
1069
+ if (e.preventDefault(), e.stopPropagation(), i) {
1070
+ I.value = null, Kt.value = "pointer", Et.value = !1, Q.value = null;
1071
+ return;
1072
+ }
1073
+ if (r) {
1074
+ if (I.value === null) return;
1075
+ let e = K.value[I.value];
1076
+ if (!e) return;
1077
+ zn(e, I.value);
1078
+ return;
1079
+ }
1080
+ let a = I.value, o = Q.value ? K.value.findIndex((e) => e.id === Q.value.id) : null, s = a !== null && a >= 0 && a < K.value.length, c = o !== null && o >= 0 && o < K.value.length;
1081
+ s ? n ? (a += 1, a >= K.value.length && (a = 0)) : t && (--a, a < 0 && (a = K.value.length - 1)) : c ? (a = n ? o + 1 : o - 1, a >= K.value.length && (a = 0), a < 0 && (a = K.value.length - 1)) : a = n ? 0 : K.value.length - 1;
1082
+ let l = K.value[a];
1083
+ l && (Pr(a), Zn({
1084
+ datapoint: l,
1085
+ seriesIndex: a,
1086
+ triggerMode: "keyboard"
1087
+ }));
1088
+ }
1089
+ function Pr(e) {
1090
+ if (!Number.isFinite(e) || !B.value) return;
1091
+ let t = K.value[e];
1092
+ if (!t) return;
1093
+ let n = t.x0 + J(t) / 2, r = t.y0 + q(t) / 2, i = B.value.getBoundingClientRect();
1094
+ Gt.value = {
1095
+ x: i.left + (n - Y.value.startX) / Y.value.width * i.width,
1096
+ y: i.top + (r - Y.value.startY) / Y.value.height * i.height
1097
+ };
1098
+ }
1099
+ let Fr = h(() => ({
1100
+ headers: $n.value?.colNames ?? [],
1101
+ rows: $n.value?.body ?? []
1102
+ }));
1103
+ return me({
1104
+ getData: er,
1105
+ getImage: cr,
1106
+ generateCsv: Qn,
1107
+ generateImage: an,
1108
+ generateSvg: gr,
1109
+ generatePdf: rn,
1110
+ hideSeries: Jn,
1111
+ showSeries: qn,
1112
+ toggleTable: tr,
1113
+ toggleTooltip: nr,
1114
+ toggleAnnotator: ir,
1115
+ toggleFullscreen: Mn,
1116
+ copyAlt: Ar
1117
+ }), (e, n) => (w(), v("div", {
1118
+ ref_key: "treemapChart",
1119
+ ref: P,
1120
+ class: je(`vue-data-ui-component vue-ui-treemap ${Ot.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${L.value.useCssAnimation ? "" : "vue-ui-dna"}`),
1121
+ style: C(`font-family:${L.value.style.fontFamily};width:100%; ${L.value.responsive ? "height: 100%;" : ""} text-align:center;background:${L.value.style.chart.backgroundColor}`),
1122
+ id: `treemap_${M.value}`,
1123
+ onMouseenter: n[2] ||= () => O(Qt)(!0),
1124
+ onMouseleave: n[3] ||= () => O(Qt)(!1)
1125
+ }, [
1126
+ y("div", {
1127
+ id: `chart-instructions-${M.value}`,
1128
+ class: "sr-only"
1129
+ }, [y("p", null, Ie(L.value.a11y.translations.keyboardNavigation), 1)], 8, tt),
1130
+ Fr.value?.rows?.length ? (w(), g(ye, {
1131
+ key: 0,
1132
+ uid: M.value,
1133
+ head: Fr.value.headers,
1134
+ body: Fr.value.rows,
1135
+ notice: L.value.a11y.translations.tableAvailable,
1136
+ caption: L.value.a11y.translations.tableCaption
1137
+ }, null, 8, [
1138
+ "uid",
1139
+ "head",
1140
+ "body",
1141
+ "notice",
1142
+ "caption"
1143
+ ])) : _("", !0),
1144
+ L.value.userOptions.buttons.annotator ? (w(), g(O(We), {
1145
+ key: 1,
1146
+ svgRef: O(B),
1147
+ backgroundColor: L.value.style.chart.backgroundColor,
1148
+ color: L.value.style.chart.color,
1149
+ active: rr.value,
1150
+ isCursorPointer: R.value,
1151
+ onClose: ir
1152
+ }, {
1153
+ "annotator-action-close": k(() => [E(e.$slots, "annotator-action-close", {}, void 0, !0)]),
1154
+ "annotator-action-color": k(({ color: t }) => [E(e.$slots, "annotator-action-color", S(x({ color: t })), void 0, !0)]),
1155
+ "annotator-action-draw": k(({ mode: t }) => [E(e.$slots, "annotator-action-draw", S(x({ mode: t })), void 0, !0)]),
1156
+ "annotator-action-undo": k(({ disabled: t }) => [E(e.$slots, "annotator-action-undo", S(x({ disabled: t })), void 0, !0)]),
1157
+ "annotator-action-redo": k(({ disabled: t }) => [E(e.$slots, "annotator-action-redo", S(x({ disabled: t })), void 0, !0)]),
1158
+ "annotator-action-delete": k(({ disabled: t }) => [E(e.$slots, "annotator-action-delete", S(x({ disabled: t })), void 0, !0)]),
1159
+ _: 3
1160
+ }, 8, [
1161
+ "svgRef",
1162
+ "backgroundColor",
1163
+ "color",
1164
+ "active",
1165
+ "isCursorPointer"
1166
+ ])) : _("", !0),
1167
+ on.value ? (w(), v("div", {
1168
+ key: 2,
1169
+ ref_key: "noTitle",
1170
+ ref: Nt,
1171
+ class: "vue-data-ui-no-title-space",
1172
+ style: "height:36px; width: 100%;background:transparent"
1173
+ }, null, 512)) : _("", !0),
1174
+ L.value.style.chart.title.text ? (w(), v("div", {
1175
+ key: 3,
1176
+ ref_key: "chartTitle",
1177
+ ref: At,
1178
+ style: C(`width:100%;background:${L.value.style.chart.backgroundColor};padding-bottom:6px`)
1179
+ }, [(w(), g(pe, {
1180
+ key: `title_${Pt.value}`,
1181
+ config: {
1182
+ title: {
1183
+ cy: "treemap-div-title",
1184
+ ...L.value.style.chart.title
1185
+ },
1186
+ subtitle: {
1187
+ cy: "treemap-div-subtitle",
1188
+ ...L.value.style.chart.title.subtitle
1189
+ }
1190
+ }
1191
+ }, null, 8, ["config"]))], 4)) : _("", !0),
1192
+ y("div", { id: `legend-top-${M.value}` }, null, 8, nt),
1193
+ L.value.userOptions.show && wt.value && (O($t) || O(Zt)) ? (w(), g(O(Je), {
1194
+ ref_key: "userOptionsRef",
1195
+ ref: Bt,
1196
+ key: `user_option_${kt.value}`,
1197
+ backgroundColor: L.value.style.chart.backgroundColor,
1198
+ color: L.value.style.chart.color,
1199
+ isPrinting: O(tn),
1200
+ isImaging: O(nn),
1201
+ uid: M.value,
1202
+ hasTooltip: L.value.userOptions.buttons.tooltip && L.value.style.chart.tooltip.show,
1203
+ hasPdf: L.value.userOptions.buttons.pdf,
1204
+ hasXls: L.value.userOptions.buttons.csv,
1205
+ hasImg: L.value.userOptions.buttons.img,
1206
+ hasSvg: L.value.userOptions.buttons.svg,
1207
+ hasTable: L.value.userOptions.buttons.table,
1208
+ hasFullscreen: L.value.userOptions.buttons.fullscreen,
1209
+ hasAltCopy: L.value.userOptions.buttons.altCopy,
1210
+ isFullscreen: Ot.value,
1211
+ isTooltip: V.value.showTooltip,
1212
+ titles: { ...L.value.userOptions.buttonTitles },
1213
+ chartElement: P.value,
1214
+ position: L.value.userOptions.position,
1215
+ hasAnnotator: L.value.userOptions.buttons.annotator,
1216
+ isAnnotation: rr.value,
1217
+ callbacks: L.value.userOptions.callbacks,
1218
+ printScale: L.value.userOptions.print.scale,
1219
+ tableDialog: L.value.table.useDialog,
1220
+ isCursorPointer: R.value,
1221
+ onToggleFullscreen: Mn,
1222
+ onGeneratePdf: O(rn),
1223
+ onGenerateCsv: Qn,
1224
+ onGenerateImage: _r,
1225
+ onGenerateSvg: gr,
1226
+ onToggleTable: tr,
1227
+ onToggleTooltip: nr,
1228
+ onToggleAnnotator: ir,
1229
+ onCopyAlt: Ar,
1230
+ style: C({ visibility: O($t) ? O(Zt) ? "visible" : "hidden" : "visible" })
1231
+ }, Ee({ _: 2 }, [
1232
+ e.$slots.menuIcon ? {
1233
+ name: "menuIcon",
1234
+ fn: k(({ isOpen: t, color: n }) => [E(e.$slots, "menuIcon", S(x({
1235
+ isOpen: t,
1236
+ color: n
1237
+ })), void 0, !0)]),
1238
+ key: "0"
1239
+ } : void 0,
1240
+ e.$slots.optionTooltip ? {
1241
+ name: "optionTooltip",
1242
+ fn: k(() => [E(e.$slots, "optionTooltip", {}, void 0, !0)]),
1243
+ key: "1"
1244
+ } : void 0,
1245
+ e.$slots.optionPdf ? {
1246
+ name: "optionPdf",
1247
+ fn: k(() => [E(e.$slots, "optionPdf", {}, void 0, !0)]),
1248
+ key: "2"
1249
+ } : void 0,
1250
+ e.$slots.optionCsv ? {
1251
+ name: "optionCsv",
1252
+ fn: k(() => [E(e.$slots, "optionCsv", {}, void 0, !0)]),
1253
+ key: "3"
1254
+ } : void 0,
1255
+ e.$slots.optionImg ? {
1256
+ name: "optionImg",
1257
+ fn: k(() => [E(e.$slots, "optionImg", {}, void 0, !0)]),
1258
+ key: "4"
1259
+ } : void 0,
1260
+ e.$slots.optionSvg ? {
1261
+ name: "optionSvg",
1262
+ fn: k(() => [E(e.$slots, "optionSvg", {}, void 0, !0)]),
1263
+ key: "5"
1264
+ } : void 0,
1265
+ e.$slots.optionTable ? {
1266
+ name: "optionTable",
1267
+ fn: k(() => [E(e.$slots, "optionTable", {}, void 0, !0)]),
1268
+ key: "6"
1269
+ } : void 0,
1270
+ e.$slots.optionFullscreen ? {
1271
+ name: "optionFullscreen",
1272
+ fn: k(({ toggleFullscreen: t, isFullscreen: n }) => [E(e.$slots, "optionFullscreen", S(x({
1273
+ toggleFullscreen: t,
1274
+ isFullscreen: n
1275
+ })), void 0, !0)]),
1276
+ key: "7"
1277
+ } : void 0,
1278
+ e.$slots.optionAnnotator ? {
1279
+ name: "optionAnnotator",
1280
+ fn: k(({ toggleAnnotator: t, isAnnotator: n }) => [E(e.$slots, "optionAnnotator", S(x({
1281
+ toggleAnnotator: t,
1282
+ isAnnotator: n
1283
+ })), void 0, !0)]),
1284
+ key: "8"
1285
+ } : void 0,
1286
+ e.$slots.optionAltCopy ? {
1287
+ name: "optionAltCopy",
1288
+ fn: k(({ altCopy: t }) => [E(e.$slots, "optionAltCopy", S(x({ altCopy: t })), void 0, !0)]),
1289
+ key: "9"
1290
+ } : void 0,
1291
+ e.$slots["custom-menu-before"] ? {
1292
+ name: "custom-menu-before",
1293
+ fn: k(() => [E(e.$slots, "custom-menu-before", {}, void 0, !0)]),
1294
+ key: "10"
1295
+ } : void 0,
1296
+ e.$slots["custom-menu-after"] ? {
1297
+ name: "custom-menu-after",
1298
+ fn: k(() => [E(e.$slots, "custom-menu-after", {}, void 0, !0)]),
1299
+ key: "11"
1300
+ } : void 0
1301
+ ]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.style".split("."))) : _("", !0),
1302
+ Z.value.length > 1 ? (w(), v("nav", {
1303
+ key: 5,
1304
+ class: "vue-ui-treemap-breadcrumbs",
1305
+ "data-dom-to-png-ignore": "",
1306
+ ref_key: "breadcrumbsNav",
1307
+ ref: Lt
1308
+ }, [(w(!0), v(we, null, Pe(Z.value, (t, r) => (w(), v("span", {
1309
+ role: "button",
1310
+ tabindex: r < Z.value.length - 1 ? 0 : void 0,
1311
+ key: t.id || "root",
1312
+ onClick: (e) => r === Z.value.length - 1 ? () => {} : zn(t.node),
1313
+ onKeydown: [Be(Ve((e) => r === Z.value.length - 1 ? void 0 : zn(t.node), ["prevent"]), ["enter"]), Be(Ve((e) => r === Z.value.length - 1 ? void 0 : zn(t.node), ["prevent"]), ["space"])],
1314
+ class: "vue-ui-treemap-crumb",
1315
+ "data-last-crumb": r === Z.value.length - 1,
1316
+ style: C({
1317
+ color: L.value.style.chart.color,
1318
+ cursor: R.value ? "pointer" : "default"
1319
+ }),
1320
+ onMouseenter: (e) => or(r),
1321
+ onMouseleave: sr,
1322
+ onFocus: (e) => or(r),
1323
+ onBlur: sr
1324
+ }, [y("span", it, [y("span", at, [E(e.$slots, "breadcrumb-label", ke({ ref_for: !0 }, {
1325
+ crumb: t,
1326
+ isRoot: r === 0,
1327
+ isFocus: ar.value === r
1328
+ }), () => [r === 0 ? (w(), v("div", ot, [Oe(_e, {
1329
+ name: ar.value === 0 ? "homeFilled" : "home",
1330
+ stroke: L.value.style.chart.color
1331
+ }, null, 8, ["name", "stroke"])])) : (w(), v(we, { key: 1 }, [De(Ie(t.label), 1)], 64))], !0)]), r < Z.value.length - 1 ? (w(), v("span", st, [E(e.$slots, "breadcrumb-arrow", {}, () => [n[4] ||= De(" › ", -1)], !0)])) : _("", !0)])], 44, rt))), 128))], 512)) : _("", !0),
1332
+ y("div", ct, [(w(), v("svg", {
1333
+ ref_key: "svgRef",
1334
+ ref: B,
1335
+ xmlns: O(re),
1336
+ "aria-describedby": `chart-instructions-${M.value}`,
1337
+ class: je({
1338
+ "vue-data-ui-fullscreen--on": Ot.value,
1339
+ "vue-data-ui-fulscreen--off": !Ot.value,
1340
+ "vue-data-ui-zoom-plus": !Pn.value,
1341
+ "vue-data-ui-zoom-minus": Pn.value,
1342
+ loading: O(z)
1343
+ }),
1344
+ viewBox: `${Y.value.startX} ${Y.value.startY} ${Y.value.width <= 0 ? 10 : Y.value.width} ${Y.value.height <= 0 ? 10 : Y.value.height}`,
1345
+ style: C(`max-width:100%; overflow: hidden; background:transparent;color:${L.value.style.chart.color}`),
1346
+ tabindex: "0",
1347
+ onFocus: jr,
1348
+ onBlur: Mr,
1349
+ onKeydown: Nr
1350
+ }, [
1351
+ Oe(O(Ye)),
1352
+ (w(!0), v(we, null, Pe(K.value, (e, n) => (w(), v("g", { key: `tgrad_${e.id}` }, [L.value.style.chart.layout.rects.gradient.show ? (w(), v("defs", ut, [y("radialGradient", {
1353
+ id: `tgrad_${e.id}`,
1354
+ gradientTransform: "translate(-1, -1.000001) scale(2, 2)"
1355
+ }, [y("stop", {
1356
+ offset: "18%",
1357
+ "stop-color": e.color
1358
+ }, null, 8, ft), y("stop", {
1359
+ offset: "100%",
1360
+ "stop-color": O(t)(e.color, L.value.style.chart.layout.rects.gradient.intensity / 100)
1361
+ }, null, 8, pt)], 8, dt)])) : _("", !0)]))), 128)),
1362
+ y("g", null, [
1363
+ (w(!0), v(we, null, Pe(K.value, (e, t) => (w(), v("g", { key: `rect_${e.id}_${e.depth}` }, [y("rect", {
1364
+ x: e.x0,
1365
+ y: e.y0,
1366
+ height: q(e),
1367
+ width: J(e),
1368
+ fill: Tt.value ? e.color ?? L.value.style.chart.backgroundColor : L.value.style.chart.layout.rects.gradient.show ? Un.value ? L.value.style.chart.backgroundColor : `url(#tgrad_${e.id})` : e.color ?? L.value.style.chart.backgroundColor,
1369
+ rx: kr(e),
1370
+ stroke: Q.value && Q.value.id === e.id ? L.value.style.chart.layout.rects.selected.stroke : L.value.style.chart.layout.rects.stroke,
1371
+ "stroke-width": Q.value && Q.value.id === e.id ? L.value.style.chart.layout.rects.selected.strokeWidth : L.value.style.chart.layout.rects.strokeWidth,
1372
+ onClick: Ve((n) => zn(e, t), ["stop"]),
1373
+ onMouseenter: () => Zn({
1374
+ datapoint: e,
1375
+ seriesIndex: t,
1376
+ triggerMode: "pointer"
1377
+ }),
1378
+ onMouseleave: (n) => Yn({
1379
+ datapoint: e,
1380
+ seriesIndex: t
1381
+ }),
1382
+ style: C(`opacity:${Q.value ? Q.value.id === e.id ? 1 : L.value.style.chart.layout.rects.selected.unselectedOpacity : 1}`),
1383
+ class: je(["vue-ui-treemap-rect", Bn(e) ? "vue-data-ui-zoom-minus" : "vue-data-ui-zoom-plus"])
1384
+ }, null, 46, mt)]))), 128)),
1385
+ (w(!0), v(we, null, Pe(K.value, (t, n) => (w(), v("g", { key: `label_${t.id}_${t.depth}` }, [!e.$slots.rect && !O(z) && L.value.style.chart.layout.labels.showDefaultLabels && !Un.value && t.showLabel ? (w(), v("g", {
1386
+ key: 0,
1387
+ style: { "pointer-events": "none" },
1388
+ innerHTML: Sr({
1389
+ rect: t,
1390
+ seriesIndex: n,
1391
+ isTitle: !!(t.children && t.children.length)
1392
+ })
1393
+ }, null, 8, ht)) : _("", !0)]))), 128)),
1394
+ (w(!0), v(we, null, Pe(K.value, (t, n) => (w(), v("g", { key: `slot_${t.id}_${t.depth}` }, [(w(), v("foreignObject", {
1395
+ x: t.x0,
1396
+ y: t.y0,
1397
+ height: q(t),
1398
+ width: J(t),
1399
+ class: "vue-ui-treemap-cell-foreignObject",
1400
+ style: { "pointer-events": "none" }
1401
+ }, [y("div", _t, [O(z) ? _("", !0) : E(e.$slots, "rect", ke({
1402
+ key: 0,
1403
+ ref_for: !0
1404
+ }, {
1405
+ rect: {
1406
+ ...t,
1407
+ height: q(t),
1408
+ width: J(t),
1409
+ isSelected: Q.value ? Q.value.id === t.id : !0
1410
+ },
1411
+ shouldShow: t.proportion > L.value.style.chart.layout.labels.hideUnderProportion || Pn.value,
1412
+ fontSize: jn(t),
1413
+ isZoom: Pn.value,
1414
+ textColor: O(ne)(t.color)
1415
+ }), void 0, !0)])], 8, gt))]))), 128))
1416
+ ]),
1417
+ E(e.$slots, "svg", S(x({
1418
+ svg: H.value,
1419
+ isZoom: Pn.value,
1420
+ rect: Q.value,
1421
+ config: L.value,
1422
+ isPrintingImg: O(tn) || O(nn) || Ut.value,
1423
+ isPrintingSvg: Wt.value
1424
+ })), void 0, !0)
1425
+ ], 46, lt)), e.$slots.hint ? (w(), v("div", vt, [E(e.$slots, "hint", S(x({
1426
+ hint: L.value.a11y.translations.keyboardNavigation,
1427
+ isVisible: qt.value
1428
+ })), void 0, !0)])) : _("", !0)]),
1429
+ e.$slots.watermark ? (w(), v("div", yt, [E(e.$slots, "watermark", S(x({ isPrinting: O(tn) || O(nn) || Ut.value || Wt.value })), void 0, !0)])) : _("", !0),
1430
+ y("div", { id: `legend-bottom-${M.value}` }, null, 8, bt),
1431
+ Rt.value && (L.value.style.chart.legend.show || e.$slots.legend) ? (w(), g(Te, {
1432
+ key: 7,
1433
+ to: L.value.style.chart.legend.position === "top" ? `#legend-top-${M.value}` : `#legend-bottom-${M.value}`
1434
+ }, [y("div", {
1435
+ ref_key: "chartLegend",
1436
+ ref: jt
1437
+ }, [E(e.$slots, "legend", { legend: Vn.value }, () => [L.value.style.chart.legend.show ? (w(), g(Se, {
1438
+ key: `legend_${It.value}`,
1439
+ legendSet: Vn.value,
1440
+ config: Hn.value,
1441
+ id: `treemap_legend_${M.value}`,
1442
+ isCursorPointer: R.value,
1443
+ onClickMarker: n[0] ||= ({ legend: e }) => Gn(e)
1444
+ }, {
1445
+ item: k(({ legend: e, index: t }) => [O(z) ? _("", !0) : (w(), v("div", {
1446
+ key: 0,
1447
+ onClick: (t) => Gn(e),
1448
+ style: C(`opacity:${N.value.includes(e.id) ? .5 : 1}`)
1449
+ }, Ie(e.display), 13, xt))]),
1450
+ legendToggle: k(() => [Vn.value.length > 2 && L.value.style.chart.legend.selectAllToggle.show && !O(z) ? (w(), g(ve, {
1451
+ key: 0,
1452
+ backgroundColor: L.value.style.chart.legend.selectAllToggle.backgroundColor,
1453
+ color: L.value.style.chart.legend.selectAllToggle.color,
1454
+ fontSize: L.value.style.chart.legend.fontSize,
1455
+ checked: N.value.length > 0,
1456
+ isCursorPointer: R.value,
1457
+ onToggle: Wn
1458
+ }, null, 8, [
1459
+ "backgroundColor",
1460
+ "color",
1461
+ "fontSize",
1462
+ "checked",
1463
+ "isCursorPointer"
1464
+ ])) : _("", !0)]),
1465
+ _: 1
1466
+ }, 8, [
1467
+ "legendSet",
1468
+ "config",
1469
+ "id",
1470
+ "isCursorPointer"
1471
+ ])) : _("", !0)], !0)], 512)], 8, ["to"])) : _("", !0),
1472
+ e.$slots.source ? (w(), v("div", {
1473
+ key: 8,
1474
+ ref_key: "source",
1475
+ ref: Mt,
1476
+ dir: "auto"
1477
+ }, [E(e.$slots, "source", {}, void 0, !0)], 512)) : _("", !0),
1478
+ Oe(O(qe), {
1479
+ teleportTo: L.value.style.chart.tooltip.teleportTo,
1480
+ show: V.value.showTooltip && Et.value,
1481
+ backgroundColor: L.value.style.chart.tooltip.backgroundColor,
1482
+ color: L.value.style.chart.tooltip.color,
1483
+ fontSize: L.value.style.chart.tooltip.fontSize,
1484
+ borderRadius: L.value.style.chart.tooltip.borderRadius,
1485
+ borderColor: L.value.style.chart.tooltip.borderColor,
1486
+ borderWidth: L.value.style.chart.tooltip.borderWidth,
1487
+ backgroundOpacity: L.value.style.chart.tooltip.backgroundOpacity,
1488
+ position: L.value.style.chart.tooltip.position,
1489
+ offsetX: L.value.style.chart.tooltip.offsetX,
1490
+ offsetY: L.value.style.chart.tooltip.offsetY,
1491
+ parent: P.value,
1492
+ content: Dt.value,
1493
+ isFullscreen: Ot.value,
1494
+ isCustom: O(f)(L.value.style.chart.tooltip.customFormat),
1495
+ smooth: L.value.style.chart.tooltip.smooth,
1496
+ backdropFilter: L.value.style.chart.tooltip.backdropFilter,
1497
+ smoothForce: L.value.style.chart.tooltip.smoothForce,
1498
+ smoothSnapThreshold: L.value.style.chart.tooltip.smoothSnapThreshold,
1499
+ isA11yMode: Kt.value === "keyboard",
1500
+ a11yPosition: Gt.value
1501
+ }, {
1502
+ "tooltip-before": k(() => [E(e.$slots, "tooltip-before", S(x({ ...Xn.value })), void 0, !0)]),
1503
+ tooltip: k(() => [E(e.$slots, "tooltip", S(x({ ...Xn.value })), void 0, !0)]),
1504
+ "tooltip-after": k(() => [E(e.$slots, "tooltip-after", S(x({ ...Xn.value })), void 0, !0)]),
1505
+ _: 3
1506
+ }, 8, [
1507
+ "teleportTo",
1508
+ "show",
1509
+ "backgroundColor",
1510
+ "color",
1511
+ "fontSize",
1512
+ "borderRadius",
1513
+ "borderColor",
1514
+ "borderWidth",
1515
+ "backgroundOpacity",
1516
+ "position",
1517
+ "offsetX",
1518
+ "offsetY",
1519
+ "parent",
1520
+ "content",
1521
+ "isFullscreen",
1522
+ "isCustom",
1523
+ "smooth",
1524
+ "backdropFilter",
1525
+ "smoothForce",
1526
+ "smoothSnapThreshold",
1527
+ "isA11yMode",
1528
+ "a11yPosition"
1529
+ ]),
1530
+ wt.value && L.value.userOptions.buttons.table ? (w(), g(Fe(lr.value.component), ke({ key: 9 }, lr.value.props, {
1531
+ ref_key: "tableUnit",
1532
+ ref: zt,
1533
+ onClose: ur
1534
+ }), Ee({
1535
+ content: k(() => [(w(), g(O(Ue), {
1536
+ key: `table_${Ft.value}`,
1537
+ colNames: $n.value.colNames,
1538
+ head: $n.value.head,
1539
+ body: $n.value.body,
1540
+ config: $n.value.config,
1541
+ title: L.value.table.useDialog ? "" : lr.value.title,
1542
+ withCloseButton: !L.value.table.useDialog,
1543
+ isCursorPointer: R.value,
1544
+ onClose: ur
1545
+ }, {
1546
+ th: k(({ th: e }) => [y("div", {
1547
+ innerHTML: e,
1548
+ style: {
1549
+ display: "flex",
1550
+ "align-items": "center"
1551
+ }
1552
+ }, null, 8, St)]),
1553
+ td: k(({ td: e }) => [De(Ie(e.name || e), 1)]),
1554
+ _: 1
1555
+ }, 8, [
1556
+ "colNames",
1557
+ "head",
1558
+ "body",
1559
+ "config",
1560
+ "title",
1561
+ "withCloseButton",
1562
+ "isCursorPointer"
1563
+ ]))]),
1564
+ _: 2
1565
+ }, [L.value.table.useDialog ? {
1566
+ name: "title",
1567
+ fn: k(() => [De(Ie(lr.value.title), 1)]),
1568
+ key: "0"
1569
+ } : void 0, L.value.table.useDialog ? {
1570
+ name: "actions",
1571
+ fn: k(() => [y("button", {
1572
+ tabindex: "0",
1573
+ class: "vue-ui-user-options-button",
1574
+ onClick: n[1] ||= (e) => Qn(L.value.userOptions.callbacks.csv),
1575
+ style: C({ cursor: R.value ? "pointer" : "default" })
1576
+ }, [Oe(_e, {
1577
+ name: "fileCsv",
1578
+ stroke: lr.value.props.color
1579
+ }, null, 8, ["stroke"])], 4)]),
1580
+ key: "1"
1581
+ } : void 0]), 1040)) : _("", !0),
1582
+ E(e.$slots, "skeleton", {}, () => [O(z) ? (w(), g(ce, { key: 0 })) : _("", !0)], !0)
1583
+ ], 46, et));
1584
+ }
1585
+ }, [["__scopeId", "data-v-d3d40b0c"]]);
1586
+ //#endregion
1587
+ export { j as n, Ct as t };