vue-data-ui 3.25.5 → 3.25.7

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 (210) hide show
  1. package/dist/{BaseDraggableDialog-BM_R41j8.js → BaseDraggableDialog-Gm4Q30j0.js} +1 -1
  2. package/dist/{BaseIcon-t83PDe9k.js → BaseIcon-D8R6_sKH.js} +5 -5
  3. package/dist/{BaseLegendToggle-__JnV08B.js → BaseLegendToggle-CXQrLjd-.js} +1 -1
  4. package/dist/{BaseZoomControls-Xo16vFa4.js → BaseZoomControls-BTzjVDPM.js} +1 -1
  5. package/dist/{ColorPicker-Bn3MY7eL.js → ColorPicker-CUy15T72.js} +1 -1
  6. package/dist/{DataTable-COIO9gi4.js → DataTable-oiM9uWrQ.js} +1 -1
  7. package/dist/{HillActions-Cl-dNBZR.js → HillActions-Dn8aKOVJ.js} +1 -1
  8. package/dist/{NonSvgPenAndPaper-KXRhcsxM.js → NonSvgPenAndPaper-DFXjpRyl.js} +2 -2
  9. package/dist/{PackageVersion-M2Ws-VwJ.js → PackageVersion-UfoQuPMf.js} +1 -1
  10. package/dist/{PenAndPaper-BgH3m_LP.js → PenAndPaper-KFzKlvbi.js} +2 -2
  11. package/dist/{SlicerPreview-GvsdvE-h.js → SlicerPreview-B6iHOC9L.js} +1 -1
  12. package/dist/{UserOptions-f3Q0nqrj.js → UserOptions-2x4VklMW.js} +1 -1
  13. package/dist/components/vue-ui-3d-bar.js +1 -1
  14. package/dist/components/vue-ui-accordion.js +1 -1
  15. package/dist/components/vue-ui-age-pyramid.js +1 -1
  16. package/dist/components/vue-ui-annotator.js +1 -1
  17. package/dist/components/vue-ui-bullet.js +1 -1
  18. package/dist/components/vue-ui-bump.js +1 -1
  19. package/dist/components/vue-ui-candlestick.js +1 -1
  20. package/dist/components/vue-ui-carousel-table.js +1 -1
  21. package/dist/components/vue-ui-chestnut.js +1 -1
  22. package/dist/components/vue-ui-chord.js +1 -1
  23. package/dist/components/vue-ui-circle-pack.js +1 -1
  24. package/dist/components/vue-ui-cursor.js +1 -1
  25. package/dist/components/vue-ui-dag.js +1 -1
  26. package/dist/components/vue-ui-dashboard.js +1 -1
  27. package/dist/components/vue-ui-digits.js +1 -1
  28. package/dist/components/vue-ui-donut-evolution.js +1 -1
  29. package/dist/components/vue-ui-donut.js +1 -1
  30. package/dist/components/vue-ui-dumbbell.js +1 -1
  31. package/dist/components/vue-ui-flow.js +1 -1
  32. package/dist/components/vue-ui-funnel.js +1 -1
  33. package/dist/components/vue-ui-galaxy.js +1 -1
  34. package/dist/components/vue-ui-gauge.js +1 -1
  35. package/dist/components/vue-ui-geo.js +1 -1
  36. package/dist/components/vue-ui-gizmo.js +1 -1
  37. package/dist/components/vue-ui-heatmap.js +1 -1
  38. package/dist/components/vue-ui-hill.js +1 -1
  39. package/dist/components/vue-ui-history-plot.js +1 -1
  40. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  41. package/dist/components/vue-ui-icon.js +1 -1
  42. package/dist/components/vue-ui-kpi.js +1 -1
  43. package/dist/components/vue-ui-label.js +1 -1
  44. package/dist/components/vue-ui-mini-loader.js +1 -1
  45. package/dist/components/vue-ui-molecule.js +1 -1
  46. package/dist/components/vue-ui-mood-radar.js +1 -1
  47. package/dist/components/vue-ui-nested-donuts.js +1 -1
  48. package/dist/components/vue-ui-onion.js +1 -1
  49. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  50. package/dist/components/vue-ui-quadrant.js +1 -1
  51. package/dist/components/vue-ui-quick-chart.js +1 -1
  52. package/dist/components/vue-ui-radar.js +1 -1
  53. package/dist/components/vue-ui-rating.js +1 -1
  54. package/dist/components/vue-ui-relation-circle.js +1 -1
  55. package/dist/components/vue-ui-ridgeline.js +1 -1
  56. package/dist/components/vue-ui-rings.js +1 -1
  57. package/dist/components/vue-ui-scatter.js +1 -1
  58. package/dist/components/vue-ui-skeleton.js +1 -1
  59. package/dist/components/vue-ui-smiley.js +1 -1
  60. package/dist/components/vue-ui-spark-trend.js +1 -1
  61. package/dist/components/vue-ui-sparkbar.js +1 -1
  62. package/dist/components/vue-ui-sparkgauge.js +1 -1
  63. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  64. package/dist/components/vue-ui-sparkline.js +1 -1
  65. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  66. package/dist/components/vue-ui-stackbar.js +1 -1
  67. package/dist/components/vue-ui-stackline.js +1 -1
  68. package/dist/components/vue-ui-strip-plot.js +1 -1
  69. package/dist/components/vue-ui-table-heatmap.js +1 -1
  70. package/dist/components/vue-ui-table-sparkline.js +1 -1
  71. package/dist/components/vue-ui-table.js +1 -1
  72. package/dist/components/vue-ui-thermometer.js +1 -1
  73. package/dist/components/vue-ui-timer.js +1 -1
  74. package/dist/components/vue-ui-tiremarks.js +1 -1
  75. package/dist/components/vue-ui-treemap.js +1 -1
  76. package/dist/components/vue-ui-vertical-bar.js +1 -1
  77. package/dist/components/vue-ui-waffle.js +1 -1
  78. package/dist/components/vue-ui-wheel.js +1 -1
  79. package/dist/components/vue-ui-word-cloud.js +1 -1
  80. package/dist/components/vue-ui-world.js +1 -1
  81. package/dist/components/vue-ui-xy-canvas.js +1 -1
  82. package/dist/components/vue-ui-xy.js +1 -1
  83. package/dist/{package-ta2JoIjx.js → package-B-3S5q00.js} +1 -1
  84. package/dist/{render-common-bvOuxfN3.js → render-common-CAXK7ycr.js} +1 -1
  85. package/dist/ssr/vue-ui-donut.js +1 -1
  86. package/dist/ssr/vue-ui-xy.js +1 -1
  87. package/dist/ssr.js +2 -2
  88. package/dist/style.css +1 -1
  89. package/dist/types/vue-data-ui.d.ts +10 -0
  90. package/dist/{useConfig-C_mX5pOZ.js → useConfig-CIQZ6_r7.js} +11 -1
  91. package/dist/{useObjectBindings-uXpBcVyo.js → useObjectBindings---mHNfbS.js} +2 -2
  92. package/dist/utils.js +1 -1
  93. package/dist/{vue-data-ui-BjdCpsRV.js → vue-data-ui-DlWT702n.js} +70 -70
  94. package/dist/vue-data-ui.js +71 -71
  95. package/dist/vue-ui-3d-bar-DbOk2kpM.js +1831 -0
  96. package/dist/{vue-ui-accordion-DRf3NQyH.js → vue-ui-accordion-BSmBUjwZ.js} +2 -2
  97. package/dist/vue-ui-age-pyramid-C7_mGIRk.js +1293 -0
  98. package/dist/{vue-ui-annotator-DZ0O8Xa5.js → vue-ui-annotator-CTQHAPho.js} +676 -676
  99. package/dist/vue-ui-bullet-CDy_dkYz.js +702 -0
  100. package/dist/{vue-ui-bump-DoHnD1Xy.js → vue-ui-bump-DP24leiD.js} +380 -380
  101. package/dist/vue-ui-candlestick-kJLmYaR7.js +1859 -0
  102. package/dist/{vue-ui-carousel-table-k1cBJ1i1.js → vue-ui-carousel-table-BQzAQDw6.js} +2 -2
  103. package/dist/vue-ui-chestnut-DnnRp3Kl.js +2016 -0
  104. package/dist/vue-ui-chord-DO15ZDCS.js +1347 -0
  105. package/dist/vue-ui-circle-pack-DYTllMPV.js +1635 -0
  106. package/dist/{vue-ui-cursor-CQWLyEx0.js → vue-ui-cursor-CtViSjNp.js} +2 -2
  107. package/dist/{vue-ui-dag-BqlsutMj.js → vue-ui-dag-NXtGYzqg.js} +792 -792
  108. package/dist/{vue-ui-dashboard-Be3MmkgS.js → vue-ui-dashboard-D3_4QohV.js} +67 -67
  109. package/dist/{vue-ui-digits-BqdfbcKX.js → vue-ui-digits-CB09pLQx.js} +2 -2
  110. package/dist/vue-ui-donut-evolution-DhrtxvAd.js +1552 -0
  111. package/dist/{vue-ui-donut-gzGZ42uH.js → vue-ui-donut-eysaEyTy.js} +2 -2
  112. package/dist/vue-ui-donut-yTE6D8yV.js +2415 -0
  113. package/dist/vue-ui-dumbbell-CmGIeULQ.js +1533 -0
  114. package/dist/vue-ui-flow-qYAq3Rmn.js +1217 -0
  115. package/dist/vue-ui-funnel-CLAii4wi.js +749 -0
  116. package/dist/vue-ui-galaxy-BVX-o2f-.js +1085 -0
  117. package/dist/vue-ui-gauge-D76-4Z_0.js +934 -0
  118. package/dist/{vue-ui-geo-Ca8kPYr-.js → vue-ui-geo-BQ7-UnuG.js} +429 -429
  119. package/dist/{vue-ui-gizmo-wUqHJICb.js → vue-ui-gizmo-C47zjcs-.js} +2 -2
  120. package/dist/vue-ui-heatmap-XJef60IZ.js +1558 -0
  121. package/dist/{vue-ui-hill-D6Y9Xy2K.js → vue-ui-hill-D5BYGPXB.js} +470 -470
  122. package/dist/vue-ui-history-plot-D-d-1ZiM.js +1698 -0
  123. package/dist/{vue-ui-horizontal-bar-3on3-H3B.js → vue-ui-horizontal-bar-BgFHi6_7.js} +511 -511
  124. package/dist/{vue-ui-kpi-CUpRRIUf.js → vue-ui-kpi-Cb8QJeaj.js} +2 -2
  125. package/dist/{vue-ui-label-DR2qUZOG.js → vue-ui-label-ClMQ5Gez.js} +1 -1
  126. package/dist/{vue-ui-mini-loader-D8W-fERs.js → vue-ui-mini-loader-DtPOVIkK.js} +1 -1
  127. package/dist/vue-ui-molecule-BzwMl-in.js +929 -0
  128. package/dist/{vue-ui-mood-radar-TW251icr.js → vue-ui-mood-radar-BUR_YCcr.js} +376 -376
  129. package/dist/vue-ui-nested-donuts-BEB4nfsD.js +1503 -0
  130. package/dist/vue-ui-onion-CG6myK7a.js +1235 -0
  131. package/dist/{vue-ui-parallel-coordinate-plot-RM25bxtf.js → vue-ui-parallel-coordinate-plot-CSO4johj.js} +407 -407
  132. package/dist/vue-ui-quadrant-CKav0I6g.js +1967 -0
  133. package/dist/{vue-ui-quick-chart-Cswm3_eI.js → vue-ui-quick-chart-BAQNS9_2.js} +4 -4
  134. package/dist/vue-ui-radar-ClPAgf5I.js +1374 -0
  135. package/dist/vue-ui-rating-CWFMoYpE.js +359 -0
  136. package/dist/vue-ui-relation-circle-Da2MhrVe.js +905 -0
  137. package/dist/vue-ui-ridgeline-D7gFs8yR.js +1630 -0
  138. package/dist/vue-ui-rings-DkDJ0k5b.js +1252 -0
  139. package/dist/vue-ui-scatter-yv4JzJID.js +2405 -0
  140. package/dist/{vue-ui-skeleton-D_u8EWeW.js → vue-ui-skeleton-oFnh5zWs.js} +698 -698
  141. package/dist/vue-ui-smiley-DJVusLnp.js +376 -0
  142. package/dist/vue-ui-spark-trend-IqZWPvSB.js +457 -0
  143. package/dist/vue-ui-sparkbar-_FW47iYj.js +401 -0
  144. package/dist/vue-ui-sparkgauge--2vk2Y23.js +268 -0
  145. package/dist/vue-ui-sparkhistogram-CFEIPa5n.js +589 -0
  146. package/dist/{vue-ui-sparkline-9qkNNZG6.js → vue-ui-sparkline-Cs9CJR6W.js} +511 -511
  147. package/dist/vue-ui-sparkstackbar-Cvbue77A.js +738 -0
  148. package/dist/vue-ui-stackbar-C5ANS2hd.js +2355 -0
  149. package/dist/vue-ui-stackline-7yajJFW4.js +2469 -0
  150. package/dist/vue-ui-strip-plot-BT6Eqhup.js +1740 -0
  151. package/dist/vue-ui-table-CiccGbRB.js +1352 -0
  152. package/dist/{vue-ui-table-heatmap-XmDK1aHJ.js → vue-ui-table-heatmap-DnP3pzh2.js} +2 -2
  153. package/dist/vue-ui-table-sparkline-Bp7RiZh4.js +738 -0
  154. package/dist/{vue-ui-thermometer-CLx3SPRv.js → vue-ui-thermometer-CawumQKP.js} +192 -192
  155. package/dist/{vue-ui-timer-BDWUNb6t.js → vue-ui-timer-CXinMW7q.js} +153 -153
  156. package/dist/vue-ui-tiremarks-BnI2uhki.js +540 -0
  157. package/dist/vue-ui-treemap-DTlFbfD6.js +1733 -0
  158. package/dist/vue-ui-waffle-CjgRkQAp.js +1621 -0
  159. package/dist/vue-ui-wheel-B02tiG0p.js +873 -0
  160. package/dist/vue-ui-word-cloud-BZnCOMHx.js +1710 -0
  161. package/dist/{vue-ui-world-C2atz4Xm.js → vue-ui-world-DO2VZ-T-.js} +524 -524
  162. package/dist/vue-ui-xy-BC9GVdWE.js +5283 -0
  163. package/dist/{vue-ui-xy-CpA0W6zM.js → vue-ui-xy-CD6BiP_g.js} +2 -2
  164. package/dist/vue-ui-xy-canvas-DANPuyf4.js +1824 -0
  165. package/dist/{vue_ui_age_pyramid-BY6c-oX_.js → vue_ui_age_pyramid-B2R66DgQ.js} +15 -6
  166. package/package.json +1 -1
  167. package/dist/vue-ui-3d-bar-C0aLR6lw.js +0 -1831
  168. package/dist/vue-ui-age-pyramid-DUcB3lYs.js +0 -1243
  169. package/dist/vue-ui-bullet-DIOCMF2H.js +0 -702
  170. package/dist/vue-ui-candlestick-Cf8TYPl5.js +0 -1859
  171. package/dist/vue-ui-chestnut-BMAuaeif.js +0 -2016
  172. package/dist/vue-ui-chord-DCe2iPjk.js +0 -1347
  173. package/dist/vue-ui-circle-pack-Eb5hS_z3.js +0 -1635
  174. package/dist/vue-ui-donut-CuQVKuZa.js +0 -2415
  175. package/dist/vue-ui-donut-evolution-DckruxZ9.js +0 -1552
  176. package/dist/vue-ui-dumbbell-BYU-hh2E.js +0 -1531
  177. package/dist/vue-ui-flow-DLRcNDLc.js +0 -1217
  178. package/dist/vue-ui-funnel-DjoqNN1U.js +0 -749
  179. package/dist/vue-ui-galaxy-BhR4IOra.js +0 -1085
  180. package/dist/vue-ui-gauge-Cq161Kwp.js +0 -934
  181. package/dist/vue-ui-heatmap-Bl5ymvi9.js +0 -1555
  182. package/dist/vue-ui-history-plot-CvVjsdCL.js +0 -1698
  183. package/dist/vue-ui-molecule-BExVLLgE.js +0 -929
  184. package/dist/vue-ui-nested-donuts-CWzJKr3S.js +0 -1503
  185. package/dist/vue-ui-onion-VaYZQK5i.js +0 -1235
  186. package/dist/vue-ui-quadrant-Dmtwow7n.js +0 -1967
  187. package/dist/vue-ui-radar-C3GYthqu.js +0 -1374
  188. package/dist/vue-ui-rating-CBdDXL80.js +0 -359
  189. package/dist/vue-ui-relation-circle-BA0qy0kp.js +0 -905
  190. package/dist/vue-ui-ridgeline-C5skjBTe.js +0 -1630
  191. package/dist/vue-ui-rings-BJ8yEQMw.js +0 -1252
  192. package/dist/vue-ui-scatter-DXg8ESgr.js +0 -2405
  193. package/dist/vue-ui-smiley-DQOp87rr.js +0 -376
  194. package/dist/vue-ui-spark-trend-CjCufXof.js +0 -457
  195. package/dist/vue-ui-sparkbar-BniEM15a.js +0 -401
  196. package/dist/vue-ui-sparkgauge-BtyCrqTQ.js +0 -268
  197. package/dist/vue-ui-sparkhistogram-DQdn3PW1.js +0 -589
  198. package/dist/vue-ui-sparkstackbar-BXQlOdOk.js +0 -738
  199. package/dist/vue-ui-stackbar-CkjicNDv.js +0 -2355
  200. package/dist/vue-ui-stackline-BB1IZta8.js +0 -2469
  201. package/dist/vue-ui-strip-plot-DGLGuH6e.js +0 -1740
  202. package/dist/vue-ui-table-BXz_HY2g.js +0 -1352
  203. package/dist/vue-ui-table-sparkline-MTEw3imE.js +0 -738
  204. package/dist/vue-ui-tiremarks-DoaypTC-.js +0 -540
  205. package/dist/vue-ui-treemap-Bv7PgpiC.js +0 -1733
  206. package/dist/vue-ui-waffle-z2DhvSAx.js +0 -1621
  207. package/dist/vue-ui-wheel-DYLBJuFb.js +0 -873
  208. package/dist/vue-ui-word-cloud-CbpEhSdL.js +0 -1710
  209. package/dist/vue-ui-xy-B3DQ6t46.js +0 -5283
  210. package/dist/vue-ui-xy-canvas-CJefORWc.js +0 -1824
@@ -0,0 +1,1635 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { $ as t, Ct as n, D as r, Jt as i, Lt as a, Pt as o, S as s, W as c, X as l, Y as u, Yt as d, Zt as f, i as p, jt as m, nt as ee, q as h, r as g, t as te, w as ne } from "./lib-Dql7cqyA.js";
3
+ import { n as re, t as ie } from "./useHints-Dq_w2E8B.js";
4
+ import { t as ae } from "./useConfig-CIQZ6_r7.js";
5
+ import { t as oe } from "./usePrinter-DISD7q5m.js";
6
+ import { n as se, t as ce } from "./BaseScanner-DZvpgOjM.js";
7
+ import { t as le } from "./useNestedProp-Chvyfpl-.js";
8
+ import { t as ue } from "./useThemeCheck-C43Tcqmk.js";
9
+ import { t as de } from "./useChartExport-iwOqiIWX.js";
10
+ import { t as fe } from "./useTransitions-g_zBREk2.js";
11
+ import { t as pe } from "./img-DhGApYG0.js";
12
+ import { n as me } from "./Title-CPHi-evi.js";
13
+ import { t as he } from "./_plugin-vue_export-helper-B3ysoDQm.js";
14
+ import { l as ge, t as _e } from "./useResponsive-ZtArZtUf.js";
15
+ import { t as ve } from "./DefGrad-DVBqDjhO.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 "./usePanZoom-CYU3B4T3.js";
20
+ import { t as Ce } from "./vue_ui_circle_pack-DZC_rdfn.js";
21
+ import { Fragment as _, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createSlots as we, createTextVNode as Te, createVNode as Ee, defineAsyncComponent as C, guardReactiveProps as w, mergeProps as De, nextTick as Oe, normalizeClass as T, normalizeProps as E, normalizeStyle as ke, onBeforeUnmount as Ae, onMounted as je, openBlock as D, ref as O, renderList as Me, renderSlot as k, resolveDynamicComponent as Ne, toDisplayString as A, toRefs as Pe, unref as j, useCssVars as Fe, watch as Ie, withCtx as M } from "vue";
22
+ //#region src/packCircles.js
23
+ function Le(e, t = 0) {
24
+ let n = e.reduce((e, { x: n, r }) => Math.min(e, n - r - t), Infinity), r = e.reduce((e, { x: n, r }) => Math.max(e, n + r + t), -Infinity), i = e.reduce((e, { y: n, r }) => Math.min(e, n - r - t), Infinity), a = e.reduce((e, { y: n, r }) => Math.max(e, n + r + t), -Infinity);
25
+ return [
26
+ n,
27
+ i,
28
+ r - n,
29
+ a - i
30
+ ];
31
+ }
32
+ function Re(e, t, n) {
33
+ let r = e._, i = e.next._, a = r.r + i.r, o = (r.x * i.r + i.x * r.r) / a, s = (r.y * i.r + i.y * r.r) / a;
34
+ return Math.max(Math.abs(o * n), Math.abs(s * t));
35
+ }
36
+ function ze(e, t, n) {
37
+ let r = Re, i = e.length;
38
+ if (!i) return e;
39
+ e.sort((e, t) => t.r - e.r);
40
+ let a, o, s;
41
+ if (a = e[0], a.x = 0, a.y = 0, !(i > 1)) return e;
42
+ if (o = e[1], a.x = -o.r, o.x = a.r, o.y = 0, !(i > 2)) return He(e, n, t), e;
43
+ Be(o, a, s = e[2]), a = new Ye(a), o = new Ye(o), s = new Ye(s), a.next = s.previous = o, o.next = a.previous = s, s.next = o.previous = a;
44
+ packLoop: for (let c = 3; c < i; ++c) {
45
+ Be(a._, o._, s = e[c]), s = new Ye(s);
46
+ let i = o.next, l = a.previous, u = o._.r, d = a._.r;
47
+ do
48
+ if (u <= d) {
49
+ if (Ve(i._, s._)) {
50
+ o = i, a.next = o, o.previous = a, --c;
51
+ continue packLoop;
52
+ }
53
+ u += i._.r, i = i.next;
54
+ } else {
55
+ if (Ve(l._, s._)) {
56
+ a = l, a.next = o, o.previous = a, --c;
57
+ continue packLoop;
58
+ }
59
+ d += l._.r, l = l.previous;
60
+ }
61
+ while (i !== l.next);
62
+ s.previous = a, s.next = o, a.next = o.previous = o = s;
63
+ let f = a, p = r(a, n, t), m = a.next;
64
+ for (; m !== o;) {
65
+ let e = r(m, n, t);
66
+ e < p && (f = m, p = e), m = m.next;
67
+ }
68
+ a = f, o = a.next;
69
+ }
70
+ return He(e, n, t), Ge(e, n, t), e;
71
+ }
72
+ function Be(e, t, n) {
73
+ let r = e.x - t.x, i = e.y - t.y, a = r * r + i * i;
74
+ if (a) {
75
+ let o = (t.r + n.r) ** 2, s = (e.r + n.r) ** 2;
76
+ if (o > s) {
77
+ let t = (a + s - o) / (2 * a), c = Math.sqrt(Math.max(0, s / a - t * t));
78
+ n.x = e.x - t * r - c * i, n.y = e.y - t * i + c * r;
79
+ } else {
80
+ let e = (a + o - s) / (2 * a), c = Math.sqrt(Math.max(0, o / a - e * e));
81
+ n.x = t.x + e * r - c * i, n.y = t.y + e * i + c * r;
82
+ }
83
+ } else n.x = t.x + n.r, n.y = t.y;
84
+ }
85
+ function Ve(e, t) {
86
+ let n = e.r + t.r - 1e-6, r = t.x - e.x, i = t.y - e.y;
87
+ return n > 0 && n * n > r * r + i * i;
88
+ }
89
+ function He(e, t, n) {
90
+ if (e.length < 4) return;
91
+ let r = e[0].r, i = e.findIndex((e) => e.r < r * .6), a = i === -1 ? Math.min(e.length, 12) : i, o = e.slice(0, Math.max(3, a));
92
+ for (let t = 0; t < 80; t += 1) {
93
+ let t = !1;
94
+ for (let n = 0; n < o.length; n += 1) {
95
+ let r = o[n], i = .06 * (1 - n / Math.max(1, o.length)), a = r.x * (1 - i), s = r.y * (1 - i);
96
+ Ue(r, a, s, e, n) && (r.x = a, r.y = s, t = !0);
97
+ }
98
+ if (We(o), !t) break;
99
+ }
100
+ let s = o.reduce((e, t) => e + t.x, 0) / o.length, c = o.reduce((e, t) => e + t.y, 0) / o.length;
101
+ for (let t of e) t.x -= s, t.y -= c;
102
+ }
103
+ function Ue(e, t, n, r) {
104
+ let i = e.x, a = e.y;
105
+ e.x = t, e.y = n;
106
+ for (let t of r) if (t !== e && Ve(e, t)) return e.x = i, e.y = a, !1;
107
+ return e.x = i, e.y = a, !0;
108
+ }
109
+ function We(e) {
110
+ for (let t = 0; t < 6; t += 1) {
111
+ let t = !1;
112
+ for (let n = 0; n < e.length - 1; n += 1) for (let r = n + 1; r < e.length; r += 1) {
113
+ let i = e[n], a = e[r], o = a.x - i.x, s = a.y - i.y, c = Math.sqrt(o * o + s * s) || 1e-6, l = i.r + a.r;
114
+ if (c < l) {
115
+ let e = (l - c) / 2, n = o / c, r = s / c;
116
+ i.x -= n * e, i.y -= r * e, a.x += n * e, a.y += r * e, t = !0;
117
+ }
118
+ }
119
+ if (!t) break;
120
+ }
121
+ }
122
+ function Ge(e, t, n) {
123
+ if (e.length < 6) return;
124
+ let r = e[0].r, i = e.findIndex((e) => e.r <= r * .45);
125
+ if (i !== -1) for (let r = i; r < e.length; r += 1) {
126
+ let i = e[r], a = Ke(i, e.slice(0, r), t, n);
127
+ a && (i.x = a.x, i.y = a.y);
128
+ }
129
+ }
130
+ function Ke(e, t, n, r) {
131
+ if (t.length < 2) return null;
132
+ let i = null, a = Infinity;
133
+ for (let o = 0; o < t.length - 1; o += 1) for (let s = o + 1; s < t.length; s += 1) {
134
+ let c = t[o], l = t[s], u = qe(c, l, e.r);
135
+ for (let o of u) {
136
+ if (!o) continue;
137
+ let s = {
138
+ ...e,
139
+ x: o.x,
140
+ y: o.y
141
+ };
142
+ if (!N(s, t)) continue;
143
+ let c = Je(s, t, n, r);
144
+ c < a && (a = c, i = o);
145
+ }
146
+ }
147
+ return i;
148
+ }
149
+ function qe(e, t, n) {
150
+ let r = e.r + n, i = t.r + n, a = t.x - e.x, o = t.y - e.y, s = a * a + o * o, c = Math.sqrt(s);
151
+ if (!c || c > r + i || c < Math.abs(r - i)) return [];
152
+ let l = (r * r - i * i + s) / (2 * c), u = r * r - l * l;
153
+ if (u < 0) return [];
154
+ let d = Math.sqrt(u), f = a / c, p = o / c, m = e.x + l * f, ee = e.y + l * p, h = -p * d, g = f * d;
155
+ return [{
156
+ x: m + h,
157
+ y: ee + g
158
+ }, {
159
+ x: m - h,
160
+ y: ee - g
161
+ }];
162
+ }
163
+ function N(e, t) {
164
+ for (let n of t) if (Ve(n, e)) return !1;
165
+ return !0;
166
+ }
167
+ function Je(e, t, n, r) {
168
+ let i = e.x / Math.max(1, n), a = e.y / Math.max(1, r), o = i * i + a * a, s = [];
169
+ for (let n of t) {
170
+ let t = e.x - n.x, r = e.y - n.y, i = Math.sqrt(t * t + r * r) - (e.r + n.r);
171
+ s.push(i);
172
+ }
173
+ s.sort((e, t) => e - t);
174
+ let c = s[0] ?? 0, l = s[1] ?? c, u = s[2] ?? l;
175
+ return c * 8 + l * 4 + u * 2 + o * e.r * 12;
176
+ }
177
+ var Ye = class {
178
+ constructor(e) {
179
+ this._ = e, this.next = null, this.previous = null;
180
+ }
181
+ }, Xe = /* @__PURE__ */ e({ default: () => _t }), Ze = ["id"], Qe = ["id"], $e = [
182
+ "xmlns",
183
+ "aria-describedby",
184
+ "viewBox"
185
+ ], et = [
186
+ "x",
187
+ "y",
188
+ "width",
189
+ "height"
190
+ ], tt = { key: 0 }, nt = [
191
+ "x",
192
+ "y",
193
+ "width",
194
+ "height",
195
+ "stroke",
196
+ "stroke-width",
197
+ "fill",
198
+ "rx",
199
+ "onMouseenter",
200
+ "onMouseout",
201
+ "onClick"
202
+ ], rt = [
203
+ "x",
204
+ "y",
205
+ "width",
206
+ "height",
207
+ "stroke",
208
+ "stroke-width",
209
+ "fill",
210
+ "rx"
211
+ ], it = [
212
+ "x",
213
+ "y",
214
+ "width",
215
+ "height",
216
+ "fill",
217
+ "rx"
218
+ ], at = [
219
+ "transform",
220
+ "font-size",
221
+ "fill",
222
+ "font-weight"
223
+ ], ot = [
224
+ "transform",
225
+ "font-size",
226
+ "fill",
227
+ "font-weight"
228
+ ], st = {
229
+ key: 1,
230
+ style: { pointerEvents: "none" }
231
+ }, ct = [
232
+ "stroke",
233
+ "stroke-width",
234
+ "stroke-dasharray",
235
+ "opacity",
236
+ "d"
237
+ ], lt = [
238
+ "x",
239
+ "y",
240
+ "width",
241
+ "height",
242
+ "rx",
243
+ "ry",
244
+ "fill",
245
+ "stroke",
246
+ "stroke-width",
247
+ "filter"
248
+ ], ut = [
249
+ "fill",
250
+ "x",
251
+ "y",
252
+ "rx",
253
+ "width",
254
+ "height"
255
+ ], dt = [
256
+ "transform",
257
+ "font-size",
258
+ "fill",
259
+ "font-family"
260
+ ], ft = ["dy"], pt = {
261
+ key: 0,
262
+ style: {
263
+ position: "absolute",
264
+ top: "100%",
265
+ left: "0",
266
+ width: "100%"
267
+ },
268
+ "data-dom-to-png-ignore": "",
269
+ "aria-hidden": "true"
270
+ }, mt = {
271
+ key: 5,
272
+ class: "vue-data-ui-watermark"
273
+ }, ht = {
274
+ key: 6,
275
+ "data-dom-to-png-ignore": "",
276
+ class: "reset-wrapper"
277
+ }, gt = { style: {
278
+ display: "flex",
279
+ "align-items": "center"
280
+ } }, _t = /*#__PURE__*/ he({
281
+ __name: "vue-ui-circle-pack",
282
+ props: {
283
+ config: {
284
+ type: Object,
285
+ default() {
286
+ return {};
287
+ }
288
+ },
289
+ dataset: {
290
+ type: Array,
291
+ default() {
292
+ return [];
293
+ }
294
+ }
295
+ },
296
+ emits: ["selectDatapoint", "copyAlt"],
297
+ setup(e, { expose: he, emit: Re }) {
298
+ Fe((e) => ({ b5587190: lr.value }));
299
+ let Be = C(() => import("./Tooltip-hhrkQ3Lk.js")), Ve = C(() => import("./BaseIcon-D8R6_sKH.js").then((e) => e.n)), He = C(() => import("./vue-ui-accordion-BSmBUjwZ.js").then((e) => e.n)), Ue = C(() => import("./DataTable-oiM9uWrQ.js")), We = C(() => import("./UserOptions-2x4VklMW.js").then((e) => e.n)), Ge = C(() => import("./PenAndPaper-KFzKlvbi.js").then((e) => e.t)), Ke = C(() => import("./PackageVersion-UfoQuPMf.js").then((e) => e.t)), qe = C(() => import("./BaseDraggableDialog-Gm4Q30j0.js").then((e) => e.n)), N = e, Je = Re, { vue_ui_circle_pack: Ye } = ae(), { isThemeValid: Xe, warnInvalidTheme: _t } = ue(), vt = v(() => !!N.dataset && N.dataset.length), P = O(h()), F = O(null), yt = O(null), bt = O(null), xt = O(0), St = O(0), Ct = O(0), wt = O(null), I = O(null), Tt = O(null), Et = O(!1), Dt = O(""), L = O(null), R = O(null), Ot = O({
300
+ x: 0,
301
+ y: 0
302
+ }), kt = O("pointer"), At = O(!1), z = O(Lt()), B = v(() => z.value.style.chart.circles.labels), V = v(() => z.value.style.chart.circles), H = v(() => z.value.style.chart);
303
+ re({
304
+ config: () => z.value,
305
+ dataset: () => N.dataset,
306
+ component: "VueUiCirclePack",
307
+ rules: [
308
+ ie.emptyArray,
309
+ {
310
+ test: (e) => e.length === 1 && (!e[0].children || e[0]?.children.length === 0),
311
+ message: [
312
+ "👀 The dataset only has a single series. Consider:",
313
+ "",
314
+ "▶️ Using a value display instead of a chart component, or using VueUiKpi."
315
+ ]
316
+ },
317
+ {
318
+ test: (e) => e.length === 1 && e[0]?.children && e[0]?.children.length < 6,
319
+ message: [
320
+ "👀 The number of datapoints is probably too low for this type of chart. Consider:",
321
+ "",
322
+ "▶️ Using VueUiDonut or VueUiWaffle instead."
323
+ ]
324
+ }
325
+ ]
326
+ });
327
+ let { transitionEnabled: U } = fe({
328
+ config: () => z.value.transitions,
329
+ dataset: () => N.dataset
330
+ }), W = v(() => z.value.userOptions.useCursorPointer), jt = v(() => f({
331
+ defaultConfig: {
332
+ userOptions: { show: !1 },
333
+ table: { show: !1 },
334
+ style: { chart: {
335
+ backgroundColor: "#99999930",
336
+ circles: {
337
+ stroke: "#6A6A6A",
338
+ labels: {
339
+ name: { show: !1 },
340
+ value: { show: !1 }
341
+ }
342
+ }
343
+ } }
344
+ },
345
+ userConfig: z.value.skeletonConfig ?? {}
346
+ })), { loading: Mt, FINAL_DATASET: Nt } = se({
347
+ ...Pe(N),
348
+ FINAL_CONFIG: z,
349
+ prepareConfig: Lt,
350
+ skeletonDataset: N.config?.skeletonDataset ?? [
351
+ {
352
+ name: "_",
353
+ value: 13,
354
+ color: "#F2F2F2"
355
+ },
356
+ {
357
+ name: "_",
358
+ value: 8,
359
+ color: "#DBDBDB"
360
+ },
361
+ {
362
+ name: "_",
363
+ value: 5,
364
+ color: "#ADADAD"
365
+ },
366
+ {
367
+ name: "_",
368
+ value: 3,
369
+ color: "#969696"
370
+ },
371
+ {
372
+ name: "_",
373
+ value: 2,
374
+ color: "#808080"
375
+ },
376
+ {
377
+ name: "_",
378
+ value: 1,
379
+ color: "#696969"
380
+ }
381
+ ],
382
+ skeletonConfig: f({
383
+ defaultConfig: z.value,
384
+ userConfig: jt.value
385
+ })
386
+ }), { svgRef: G } = xe({ config: H.value.title }), { userOptionsVisible: Pt, setUserOptionsVisibility: Ft, keepUserOptionState: It } = be({ config: z.value });
387
+ function Lt() {
388
+ let e = le({
389
+ userConfig: N.config,
390
+ defaultConfig: Ye
391
+ }), t = e.theme;
392
+ if (!t) return e;
393
+ if (!Xe.value(e)) return _t(e), e;
394
+ let n = le({
395
+ userConfig: Ce[t] || N.config,
396
+ defaultConfig: e
397
+ }), r = le({
398
+ userConfig: N.config,
399
+ defaultConfig: n
400
+ });
401
+ return {
402
+ ...r,
403
+ customPalette: r.customPalette.length ? r.customPalette : d[t] || a
404
+ };
405
+ }
406
+ Ie(() => N.config, (e) => {
407
+ z.value = Lt(), Pt.value = !z.value.userOptions.showOnChartHover, sn(), xt.value += 1, St.value += 1, K.value.showTable = z.value.table.show, K.value.showTooltip = H.value.tooltip.show, K.value.showZoom = H.value.zoom?.show ?? !1;
408
+ }, { deep: !0 });
409
+ let { isPrinting: Rt, isImaging: zt, generatePdf: Bt, generateImage: Vt } = oe({
410
+ elementId: `vue-ui-circle-pack_${P.value}`,
411
+ fileName: H.value.title.text || "vue-ui-circle-pack",
412
+ options: z.value.userOptions.print
413
+ }), Ht = v(() => z.value.userOptions.show && !H.value.title.text), K = O({
414
+ showTable: z.value.table.show,
415
+ showTooltip: H.value.tooltip.show,
416
+ showZoom: H.value.zoom?.show ?? !1
417
+ });
418
+ Ie(z, () => {
419
+ K.value = {
420
+ showTable: z.value.table.show,
421
+ showTooltip: H.value.tooltip.show,
422
+ showZoom: H.value.zoom?.show ?? !1
423
+ };
424
+ }, { immediate: !0 });
425
+ let q = O({
426
+ h: 10,
427
+ w: 10
428
+ }), Ut = O([
429
+ 0,
430
+ 0,
431
+ 100,
432
+ 100
433
+ ]), Wt = O({
434
+ x: 0,
435
+ y: 0,
436
+ width: 100,
437
+ height: 100
438
+ }), Gt = v(() => z.value.debug), Kt = v(() => {
439
+ let e = z.value.style?.chart || {};
440
+ return e.dimensions && typeof e.dimensions.width == "number" ? e.dimensions.width : typeof e.width == "number" ? e.width : 300;
441
+ }), qt = v(() => {
442
+ let e = z.value.style?.chart || {};
443
+ return e.dimensions && typeof e.dimensions.height == "number" ? e.dimensions.height : typeof e.height == "number" ? e.height : 300;
444
+ }), J = O([]), Y = O([]), X = O(null), Z = O(null);
445
+ function Jt(e, t) {
446
+ q.value = {
447
+ w: e,
448
+ h: t
449
+ };
450
+ let n = ln.value.map(Yt);
451
+ if (!n.length) {
452
+ let n = {
453
+ x: 0,
454
+ y: 0,
455
+ width: e,
456
+ height: t
457
+ };
458
+ J.value = [], Y.value = [], Ut.value = [
459
+ n.x,
460
+ n.y,
461
+ n.width,
462
+ n.height
463
+ ], Wt.value = { ...n }, Tn(n);
464
+ return;
465
+ }
466
+ let r = ze(n, t, e), [i, a, o, s] = Le(r, 1), c = Math.min(o ? e / o : 1, s ? t / s : 1), l = (e - o * c) / 2, u = (t - s * c) / 2, d = r.map((e) => ({
467
+ ...e,
468
+ x: (e.x - i) * c + l,
469
+ y: (e.y - a) * c + u,
470
+ r: e.r * c
471
+ }));
472
+ J.value = tn(d), Y.value = J.value;
473
+ let f = In({
474
+ x: 0,
475
+ y: 0,
476
+ width: e,
477
+ height: t
478
+ });
479
+ Ut.value = [
480
+ f.x,
481
+ f.y,
482
+ f.width,
483
+ f.height
484
+ ], Wt.value = { ...f }, Tn(f);
485
+ }
486
+ function Yt(e) {
487
+ return {
488
+ ...e,
489
+ children: Array.isArray(e.children) ? e.children.map(Yt) : []
490
+ };
491
+ }
492
+ function Xt(e) {
493
+ let t = Number(e?.value);
494
+ return Number.isFinite(t) && t > 0 ? t : Array.isArray(e?.children) ? e.children.reduce((e, t) => e + Xt(t), 0) : 0;
495
+ }
496
+ function Zt(e, t) {
497
+ let n = d[z.value.theme || "default"] || a, r = cn.value.length ? cn.value : n.length ? n : a;
498
+ return s(e.color) || r[t % r.length] || a[t % a.length];
499
+ }
500
+ function Qt(e) {
501
+ return !Array.isArray(e.children) || !e.children.length ? 1 : e.children.reduce((e, t) => e + Qt(t), 0);
502
+ }
503
+ function $t(e, t = null, n = 0, r = []) {
504
+ return Array.isArray(e) ? e.map((e, i) => {
505
+ let a = Xt(e);
506
+ if (!Number.isFinite(a) || a <= 0) return null;
507
+ let o = h(), c = [...r, i], l = c.reduce((e, t, n) => e + t + n, 0), u = e.color || t?.color ? s(e.color || t?.color) : Zt(e, l), d = $t(e.children, {
508
+ id: o,
509
+ name: e.name,
510
+ color: u,
511
+ rootId: t?.rootId ?? o
512
+ }, n + 1, c);
513
+ return {
514
+ ...e,
515
+ value: a,
516
+ r: a,
517
+ id: o,
518
+ color: u,
519
+ depth: n,
520
+ parentId: t?.id ?? null,
521
+ parentName: t?.name ?? null,
522
+ rootId: t?.rootId ?? o,
523
+ hasChildren: d.length > 0,
524
+ childCount: d.length,
525
+ leafCount: d.length ? Qt({ children: d }) : 1,
526
+ hierarchyPath: c,
527
+ children: d
528
+ };
529
+ }).filter(Boolean) : [];
530
+ }
531
+ function en(e) {
532
+ if (!Array.isArray(e.children) || !e.children.length) return [];
533
+ let t = e.r * 2;
534
+ if (!t) return [];
535
+ let n = ze(e.children.map(Yt), t, t), [r, i, a, o] = Le(n, 1), s = Math.min(a ? t / a : 1, o ? t / o : 1) * .9, c = a * s, l = o * s, u = e.x - c / 2, d = e.y - l / 2;
536
+ return n.map((e) => ({
537
+ ...e,
538
+ x: (e.x - r) * s + u,
539
+ y: (e.y - i) * s + d,
540
+ r: e.r * s
541
+ }));
542
+ }
543
+ function tn(e) {
544
+ let t = [];
545
+ return e.forEach((e) => {
546
+ let n = en(e);
547
+ t.push({
548
+ ...e,
549
+ children: n
550
+ }), t.push(...tn(n));
551
+ }), t;
552
+ }
553
+ function nn(e, t) {
554
+ return !e || !t || !Array.isArray(e.hierarchyPath) || !Array.isArray(t.hierarchyPath) || e.hierarchyPath.length <= t.hierarchyPath.length ? !1 : t.hierarchyPath.every((t, n) => e.hierarchyPath[n] === t);
555
+ }
556
+ function rn(e) {
557
+ return e.hasChildren ? B.value.parents.show : B.value.children.show;
558
+ }
559
+ function an() {
560
+ if (!z.value.responsive || !F.value) return;
561
+ let e = ge(() => {
562
+ let { width: e, height: t } = _e({
563
+ chart: F.value,
564
+ title: H.value.title.text ? yt.value : null,
565
+ legend: null,
566
+ source: wt.value,
567
+ noTitle: bt.value
568
+ });
569
+ requestAnimationFrame(() => {
570
+ !e || !t || (G.value && (G.value.setAttribute("width", e), G.value.setAttribute("height", t)), Jt(e, t));
571
+ });
572
+ });
573
+ X.value && (Z.value && X.value.unobserve(Z.value), X.value.disconnect()), X.value = new ResizeObserver(e), Z.value = F.value.parentNode || F.value, Z.value && X.value.observe(Z.value), e();
574
+ }
575
+ function on() {
576
+ X.value && (Z.value && X.value.unobserve(Z.value), X.value.disconnect(), X.value = null, Z.value = null);
577
+ }
578
+ async function sn() {
579
+ o(N.dataset) && ee({
580
+ componentName: "VueUiCirclePack",
581
+ type: "dataset",
582
+ debug: Gt.value
583
+ });
584
+ let e = Kt.value, t = qt.value;
585
+ Jt(e, t), z.value.responsive ? an() : on();
586
+ }
587
+ je(sn), Ae(() => {
588
+ on();
589
+ }), Ie(() => Nt.value, async (e) => {
590
+ await sn();
591
+ }, { deep: !0 });
592
+ let cn = v(() => ne(z.value.customPalette)), ln = v(() => $t(Nt.value)), un = v(() => J.value.length ? Math.max(...J.value.map((e) => e.r)) : 0);
593
+ function dn(e, t) {
594
+ return un.value ? t / un.value * e : 0;
595
+ }
596
+ function fn(e, t) {
597
+ z.value.events.datapointLeave && z.value.events.datapointLeave({
598
+ datapoint: e,
599
+ seriesIndex: t
600
+ }), (kt.value !== "keyboard" || L.value?.id !== e?.id) && (Et.value = !1, L.value = null, R.value = null, kt.value = "pointer");
601
+ }
602
+ function pn(e, t) {
603
+ Je("selectDatapoint", e), z.value.events.datapointClick && z.value.events.datapointClick({
604
+ datapoint: e,
605
+ seriesIndex: t
606
+ });
607
+ }
608
+ let mn = O(null), hn = O(!1);
609
+ function gn(e, t, r = "pointer") {
610
+ L.value = e, R.value = t, kt.value = r, z.value.events.datapointEnter && z.value.events.datapointEnter({
611
+ datapoint: e,
612
+ seriesIndex: t
613
+ }), mn.value = {
614
+ datapoint: e,
615
+ seriesIndex: t,
616
+ config: z.value,
617
+ series: Y.value
618
+ }, Et.value = !0;
619
+ let i = H.value.tooltip.customFormat;
620
+ if (hn.value = !1, n(i)) try {
621
+ let n = i({
622
+ seriesIndex: t,
623
+ datapoint: e,
624
+ series: Y.value,
625
+ config: z.value
626
+ });
627
+ typeof n == "string" && (Dt.value = n, hn.value = !0);
628
+ } catch {
629
+ console.warn("Custom format cannot be applied."), hn.value = !1;
630
+ }
631
+ if (!hn.value) {
632
+ let t = "";
633
+ t += `
634
+ <div style="display:flex;align-items:center;gap:4px;">
635
+ <svg viewBox="0 0 10 10" height="${H.value.tooltip.fontSize}" width="${H.value.tooltip.fontSize}">
636
+ <circle
637
+ cx="5"
638
+ cy="5"
639
+ r="5"
640
+ fill="${V.value.gradient.show ? `url(#${e.id})` : e.color}"
641
+ />
642
+ </svg>
643
+ <span>${e.name}: <b>${_n(e)}</b></span>
644
+ </div>
645
+ `, Dt.value = t;
646
+ }
647
+ }
648
+ function _n(e) {
649
+ return p(B.value.value.formatter, e.value, l({
650
+ p: B.value.value.prefix,
651
+ v: e.value,
652
+ s: B.value.value.suffix,
653
+ r: B.value.value.rounding
654
+ }));
655
+ }
656
+ function vn(e) {
657
+ if (!e) return 0;
658
+ let t = _n(e), n = e.r / (t.length || 1) * (t.length === 1 ? 1 : 2);
659
+ return Math.min(e.r / 2.5, n);
660
+ }
661
+ let Q = O(!1);
662
+ function yn(e) {
663
+ Q.value = e, Ct.value += 1;
664
+ }
665
+ let bn = O(!1);
666
+ function xn() {
667
+ bn.value = !bn.value;
668
+ }
669
+ let Sn = v(() => !bn.value && K.value.showZoom), { viewBox: $, resetZoom: Cn, isZoom: wn, setInitialViewBox: Tn } = Se(G, {
670
+ x: 0,
671
+ y: 0,
672
+ width: Math.max(10, q.value.w),
673
+ height: Math.max(10, q.value.h)
674
+ }, H.value.zoom?.speed ?? 1, Sn);
675
+ function En(e, t, n = 0) {
676
+ return !(e.x + e.width + n < t.x || t.x + t.width + n < e.x || e.y + e.height + n < t.y || t.y + t.height + n < e.y);
677
+ }
678
+ function Dn(e, t, n = 0) {
679
+ let r = Math.min(Math.max(t.x, e.x - n), e.x + e.width + n), i = Math.min(Math.max(t.y, e.y - n), e.y + e.height + n), a = t.x - r, o = t.y - i;
680
+ return a * a + o * o <= t.r * t.r;
681
+ }
682
+ function On(e, t, n = 1) {
683
+ let r = Math.max(4 * n, Math.min(t.width, t.height) * .01);
684
+ return {
685
+ ...e,
686
+ x: Math.min(Math.max(e.x, t.x + r), t.x + t.width - e.width - r),
687
+ y: Math.min(Math.max(e.y, t.y + r), t.y + t.height - e.height - r)
688
+ };
689
+ }
690
+ function kn(e) {
691
+ let t = [e.name];
692
+ return B.value.value.show && t.push(_n(e)), t.filter(Boolean);
693
+ }
694
+ function An(e, t, n, r, i) {
695
+ let a = e.x, o = e.y;
696
+ return {
697
+ right: {
698
+ x: a + e.r + i,
699
+ y: o - n / 2,
700
+ anchorX: a + e.r,
701
+ anchorY: o
702
+ },
703
+ left: {
704
+ x: a - e.r - i - t,
705
+ y: o - n / 2,
706
+ anchorX: a - e.r,
707
+ anchorY: o
708
+ },
709
+ top: {
710
+ x: a - t / 2,
711
+ y: o - e.r - i - n,
712
+ anchorX: a,
713
+ anchorY: o - e.r
714
+ },
715
+ bottom: {
716
+ x: a - t / 2,
717
+ y: o + e.r + i,
718
+ anchorX: a,
719
+ anchorY: o + e.r
720
+ },
721
+ topRight: {
722
+ x: a + e.r * .7 + i,
723
+ y: o - e.r * .7 - i - n,
724
+ anchorX: a + e.r * .7,
725
+ anchorY: o - e.r * .7
726
+ },
727
+ topLeft: {
728
+ x: a - e.r * .7 - i - t,
729
+ y: o - e.r * .7 - i - n,
730
+ anchorX: a - e.r * .7,
731
+ anchorY: o - e.r * .7
732
+ },
733
+ bottomRight: {
734
+ x: a + e.r * .7 + i,
735
+ y: o + e.r * .7 + i,
736
+ anchorX: a + e.r * .7,
737
+ anchorY: o + e.r * .7
738
+ },
739
+ bottomLeft: {
740
+ x: a - e.r * .7 - i - t,
741
+ y: o + e.r * .7 + i,
742
+ anchorX: a - e.r * .7,
743
+ anchorY: o + e.r * .7
744
+ }
745
+ }[r];
746
+ }
747
+ function jn(e, t) {
748
+ let n = [], r = t.get(e.parentId);
749
+ for (; r;) n.push(r), r = t.get(r.parentId);
750
+ return n;
751
+ }
752
+ function Mn(e, t, n, r, i, a) {
753
+ let o = e.x, s = e.y, c = t || e, l = a * .6, u = {
754
+ right: {
755
+ x: c.x + c.r + a,
756
+ y: s - r / 2
757
+ },
758
+ left: {
759
+ x: c.x - c.r - a - n,
760
+ y: s - r / 2
761
+ },
762
+ top: {
763
+ x: o - n / 2,
764
+ y: c.y - c.r - a - r
765
+ },
766
+ bottom: {
767
+ x: o - n / 2,
768
+ y: c.y + c.r + a
769
+ },
770
+ topRight: {
771
+ x: c.x + c.r + a,
772
+ y: c.y - c.r - a - r - l
773
+ },
774
+ topLeft: {
775
+ x: c.x - c.r - a - n,
776
+ y: c.y - c.r - a - r - l
777
+ },
778
+ bottomRight: {
779
+ x: c.x + c.r + a,
780
+ y: c.y + c.r + a + l
781
+ },
782
+ bottomLeft: {
783
+ x: c.x - c.r - a - n,
784
+ y: c.y + c.r + a + l
785
+ }
786
+ }[i], d = u.x + n / 2, f = u.y + r / 2, p = Math.atan2(f - s, d - o);
787
+ return {
788
+ ...u,
789
+ anchorX: o + Math.cos(p) * e.r,
790
+ anchorY: s + Math.sin(p) * e.r
791
+ };
792
+ }
793
+ function Nn(e, t = {}) {
794
+ let { clamp: n = !0, scale: r = 1 } = t;
795
+ if (!J.value.length || !q.value.w || !q.value.h || !H.value.parentTooltips.show) return [];
796
+ let i = Math.max(8, H.value.parentTooltips.fontSizeRatio * 10) * r, a = i * 1.25, o = i * .75, s = i * .55, c = Math.max(8 * r, Math.min(e.width, e.height) * .025), l = Math.max(2 * r, Math.min(e.width, e.height) * .006), u = [
797
+ "right",
798
+ "left",
799
+ "top",
800
+ "bottom",
801
+ "topRight",
802
+ "topLeft",
803
+ "bottomRight",
804
+ "bottomLeft"
805
+ ], d = [], f = new Map(J.value.map((e) => [e.id, e]));
806
+ return J.value.filter((e) => e.hasChildren && e.name).sort((e, t) => t.r - e.r).forEach((t) => {
807
+ let p = jn(t, f).at(-1), m = kn(t), ee = m.reduce((e, t) => Math.max(e, String(t).length), 0), h = Math.max(i * 5, ee * i * .62 + o * 2), g = m.length * a + s * 2, te = p ? u.map((e) => Mn(t, p, h, g, e, c)) : [], ne = u.map((e) => An(t, h, g, e, c)), re = [...te, ...ne].map((t) => {
808
+ let i = n ? On({
809
+ x: t.x,
810
+ y: t.y,
811
+ width: h,
812
+ height: g
813
+ }, e, r) : {
814
+ x: t.x,
815
+ y: t.y,
816
+ width: h,
817
+ height: g
818
+ };
819
+ return {
820
+ ...i,
821
+ anchorX: t.anchorX,
822
+ anchorY: t.anchorY,
823
+ lineX: i.x + i.width / 2,
824
+ lineY: i.y + i.height / 2
825
+ };
826
+ }).find((e) => !d.some((t) => En(e, t, l)) && !J.value.some((t) => Dn(e, t, l)));
827
+ re && d.push({
828
+ ...re,
829
+ datapoint: t,
830
+ id: `parent_tooltip_${t.id}`,
831
+ color: t.color,
832
+ lines: m,
833
+ fontSize: i,
834
+ lineHeight: a,
835
+ paddingX: o,
836
+ paddingY: s,
837
+ scale: r
838
+ });
839
+ }), d;
840
+ }
841
+ function Pn(e) {
842
+ let t = Wt.value;
843
+ if (!t.width || !t.height || !e.width || !e.height) return 1;
844
+ let n = Math.min(e.width / t.width, e.height / t.height);
845
+ return Number.isFinite(n) && n > 0 ? n : 1;
846
+ }
847
+ let Fn = v(() => Nn($.value, {
848
+ clamp: !0,
849
+ scale: Pn($.value)
850
+ }));
851
+ function In(e) {
852
+ let t = Nn(e, { clamp: !1 });
853
+ if (!t.length) return e;
854
+ let n = Math.min(e.x, ...t.map((e) => e.x)), r = Math.min(e.y, ...t.map((e) => e.y)), i = Math.max(e.x + e.width, ...t.map((e) => e.x + e.width)), a = Math.max(e.y + e.height, ...t.map((e) => e.y + e.height)), o = Math.max(8, Math.min(e.width, e.height) * .025);
855
+ return {
856
+ x: n - o,
857
+ y: r - o,
858
+ width: i - n + o * 2,
859
+ height: a - r + o * 2
860
+ };
861
+ }
862
+ function Ln(e) {
863
+ let t = [];
864
+ function n(e, r = 0, i = "") {
865
+ e.forEach((e) => {
866
+ t.push({
867
+ name: e.name,
868
+ value: e.value,
869
+ color: e.color,
870
+ parentName: i,
871
+ depth: r
872
+ }), Array.isArray(e.children) && e.children.length && n(e.children, r + 1, e.name);
873
+ });
874
+ }
875
+ return n(e), t;
876
+ }
877
+ let Rn = v(() => {
878
+ let e = Ln(ln.value);
879
+ return {
880
+ head: Y.value.map((e) => ({
881
+ name: e.name,
882
+ value: e.value,
883
+ color: e.color
884
+ })).toSorted((e, t) => t.value - e.value),
885
+ body: e.map((e) => e.value),
886
+ hierarchy: e
887
+ };
888
+ }), zn = v(() => Ln(ln.value).map((e) => ({
889
+ ...e,
890
+ name: `${"- ".repeat(e.depth)}${e.name}`
891
+ })));
892
+ function Bn(e = null) {
893
+ Oe(() => {
894
+ let n = zn.value.map((e) => [
895
+ [e.name],
896
+ [e.parentName || ""],
897
+ [e.depth],
898
+ [e.value]
899
+ ]), i = [
900
+ [H.value.title.text],
901
+ [H.value.title.subtitle.text],
902
+ [
903
+ [z.value.table.columnNames.datapoint],
904
+ ["Parent"],
905
+ ["Depth"],
906
+ [z.value.table.columnNames.value]
907
+ ]
908
+ ].concat(n), a = r(i);
909
+ e ? e(a) : t({
910
+ csvContent: a,
911
+ title: H.value.title.text || "vue-ui-circle-pack"
912
+ });
913
+ });
914
+ }
915
+ let Vn = v(() => {
916
+ let e = [
917
+ z.value.table.columnNames.datapoint,
918
+ z.value.table.columnNames.parent,
919
+ z.value.table.columnNames.depth,
920
+ z.value.table.columnNames.value
921
+ ], t = Rn.value.hierarchy.map((e) => {
922
+ let t = l({
923
+ p: B.value.value.prefix,
924
+ v: e.value,
925
+ s: B.value.value.suffix,
926
+ r: B.value.value.rounding
927
+ });
928
+ return [
929
+ {
930
+ color: e.color,
931
+ name: `${" ".repeat(e.depth)}${e.name}`
932
+ },
933
+ e.parentName ?? "",
934
+ e.depth ?? 0,
935
+ t
936
+ ];
937
+ }), n = {
938
+ th: {
939
+ backgroundColor: z.value.table.th.backgroundColor,
940
+ color: z.value.table.th.color,
941
+ outline: z.value.table.th.outline
942
+ },
943
+ td: {
944
+ backgroundColor: z.value.table.td.backgroundColor,
945
+ color: z.value.table.td.color,
946
+ outline: z.value.table.td.outline
947
+ },
948
+ breakpoint: z.value.table.responsiveBreakpoint
949
+ };
950
+ return {
951
+ colNames: [
952
+ z.value.table.columnNames.datapoint,
953
+ z.value.table.columnNames.parent,
954
+ z.value.table.columnNames.depth,
955
+ z.value.table.columnNames.value
956
+ ],
957
+ head: e,
958
+ body: t,
959
+ config: n
960
+ };
961
+ });
962
+ function Hn() {
963
+ K.value.showTable = !K.value.showTable;
964
+ }
965
+ function Un() {
966
+ K.value.showTooltip = !K.value.showTooltip;
967
+ }
968
+ function Wn() {
969
+ K.value.showZoom = !K.value.showZoom;
970
+ }
971
+ function Gn() {
972
+ return ln.value;
973
+ }
974
+ async function Kn({ scale: e = 2 } = {}) {
975
+ if (!F.value) return;
976
+ let { width: t, height: n } = F.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await pe({
977
+ domElement: F.value,
978
+ base64: !0,
979
+ img: !0,
980
+ scale: e
981
+ });
982
+ return {
983
+ imageUri: i,
984
+ base64: a,
985
+ title: H.value.title.text,
986
+ width: t,
987
+ height: n,
988
+ aspectRatio: r
989
+ };
990
+ }
991
+ let qn = v(() => {
992
+ let e = z.value.table.useDialog && !z.value.table.show, t = K.value.showTable;
993
+ return {
994
+ component: e ? qe : He,
995
+ title: `${H.value.title.text}${H.value.title.subtitle.text ? `: ${H.value.title.subtitle.text}` : ""}`,
996
+ props: e ? {
997
+ backgroundColor: z.value.table.th.backgroundColor,
998
+ color: z.value.table.th.color,
999
+ headerColor: z.value.table.th.color,
1000
+ headerBg: z.value.table.th.backgroundColor,
1001
+ isFullscreen: Q.value,
1002
+ fullscreenParent: F.value,
1003
+ forcedWidth: Math.min(500, window.innerWidth * .8),
1004
+ isCursorPointer: W.value
1005
+ } : {
1006
+ hideDetails: !0,
1007
+ config: {
1008
+ open: t,
1009
+ maxHeight: 1e4,
1010
+ body: {
1011
+ backgroundColor: H.value.backgroundColor,
1012
+ color: H.value.color
1013
+ },
1014
+ head: {
1015
+ backgroundColor: H.value.backgroundColor,
1016
+ color: H.value.color
1017
+ }
1018
+ }
1019
+ }
1020
+ };
1021
+ });
1022
+ Ie(() => K.value.showTable, (e) => {
1023
+ z.value.table.show || (e && z.value.table.useDialog && I.value ? I.value.open() : I.value && "close" in I.value && I.value.close());
1024
+ });
1025
+ function Jn() {
1026
+ K.value.showTable = !1, Tt.value && Tt.value.setTableIconState(!1);
1027
+ }
1028
+ let Yn = v(() => H.value.backgroundColor), Xn = v(() => H.value.title), { isCallbackImaging: Zn, isCallbackSvg: Qn, generateSvg: $n, onGenerateImage: er } = de({
1029
+ svg: G,
1030
+ title: Xn,
1031
+ legend: null,
1032
+ legendItems: null,
1033
+ backgroundColor: Yn,
1034
+ getSvgCallback: () => z.value.userOptions.callbacks.svg,
1035
+ generateImage: Vt
1036
+ });
1037
+ async function tr() {
1038
+ if (Je("copyAlt", {
1039
+ config: z.value,
1040
+ dataset: ln.value,
1041
+ flattenedDataset: Y.value
1042
+ }), !z.value.userOptions.callbacks.altCopy) {
1043
+ console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1044
+ return;
1045
+ }
1046
+ await Promise.resolve(z.value.userOptions.callbacks.altCopy({
1047
+ config: z.value,
1048
+ dataset: ln.value,
1049
+ flattenedDataset: Y.value
1050
+ }));
1051
+ }
1052
+ function nr(e) {
1053
+ if (!Number.isFinite(e) || !G.value) return;
1054
+ let t = J.value[e];
1055
+ if (!t) return;
1056
+ let n = i(t.x, t.y, G.value);
1057
+ n && (Ot.value = n);
1058
+ }
1059
+ function rr() {
1060
+ if (R.value !== null) {
1061
+ let e = J.value[R.value];
1062
+ e && fn(e, R.value);
1063
+ }
1064
+ R.value = null, kt.value = "pointer", Et.value = !1, L.value = null;
1065
+ }
1066
+ function ir() {
1067
+ R.value = null, At.value = !0;
1068
+ }
1069
+ function ar() {
1070
+ rr(), At.value = !1;
1071
+ }
1072
+ function or(e, t) {
1073
+ let n = J.value.length;
1074
+ return n ? e === null || e < 0 || e >= n ? t === "next" ? 0 : n - 1 : t === "previous" ? (e - 1 + n) % n : (e + 1) % n : null;
1075
+ }
1076
+ function sr(e) {
1077
+ if (!G.value || bn.value || document.activeElement !== G.value || !J.value.length) return;
1078
+ let t = ["ArrowLeft", "ArrowUp"].includes(e.key), n = ["ArrowRight", "ArrowDown"].includes(e.key), r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
1079
+ if (!t && !n && !r && !i) return;
1080
+ if (e.preventDefault(), e.stopPropagation(), i) {
1081
+ rr();
1082
+ return;
1083
+ }
1084
+ if (r) {
1085
+ if (R.value === null) return;
1086
+ let e = J.value[R.value];
1087
+ if (!e) return;
1088
+ pn(e, R.value);
1089
+ return;
1090
+ }
1091
+ let a = R.value;
1092
+ a === null || a < 0 || a >= J.value.length ? a = n ? 0 : J.value.length - 1 : n ? a = or(a, "next") : t && (a = or(a, "previous"));
1093
+ let o = J.value[a];
1094
+ o && (R.value = a, nr(a), gn(o, a, "keyboard"));
1095
+ }
1096
+ let cr = v(() => ({
1097
+ headers: Vn.value?.colNames ?? [],
1098
+ rows: Vn.value?.body?.map((e) => [e[0]?.name ?? "", e[1]]) ?? []
1099
+ })), lr = v(() => H.value.color);
1100
+ return he({
1101
+ getData: Gn,
1102
+ getImage: Kn,
1103
+ generateCsv: Bn,
1104
+ generatePdf: Bt,
1105
+ generateImage: Vt,
1106
+ generateSvg: $n,
1107
+ toggleTable: Hn,
1108
+ toggleAnnotator: xn,
1109
+ toggleFullscreen: yn,
1110
+ copyAlt: tr,
1111
+ toggleZoom: Wn,
1112
+ resetZoom: Cn
1113
+ }), (e, t) => (D(), x("div", {
1114
+ id: `vue-ui-circle-pack_${P.value}`,
1115
+ class: T(`vue-data-ui-component vue-ui-circle-pack ${Q.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${j(Mt) ? "loading" : ""}`),
1116
+ ref_key: "circlePackChart",
1117
+ ref: F,
1118
+ style: ke(`font-family:${z.value.style.fontFamily};text-align:center;background:${H.value.backgroundColor};`),
1119
+ onMouseenter: t[2] ||= () => j(Ft)(!0),
1120
+ onMouseleave: t[3] ||= () => j(Ft)(!1)
1121
+ }, [
1122
+ S("div", {
1123
+ id: `chart-instructions-${P.value}`,
1124
+ class: "sr-only"
1125
+ }, [S("p", null, A(z.value.a11y.translations.keyboardNavigation), 1)], 8, Qe),
1126
+ cr.value?.rows?.length ? (D(), y(ye, {
1127
+ key: 0,
1128
+ uid: P.value,
1129
+ head: cr.value.headers,
1130
+ body: cr.value.rows,
1131
+ notice: z.value.a11y.translations.tableAvailable,
1132
+ caption: z.value.a11y.translations.tableCaption
1133
+ }, null, 8, [
1134
+ "uid",
1135
+ "head",
1136
+ "body",
1137
+ "notice",
1138
+ "caption"
1139
+ ])) : b("", !0),
1140
+ z.value.userOptions.buttons.annotator ? (D(), y(j(Ge), {
1141
+ key: 1,
1142
+ svgRef: j(G),
1143
+ backgroundColor: H.value.backgroundColor,
1144
+ color: H.value.color,
1145
+ active: bn.value,
1146
+ scale: un.value / 100,
1147
+ isCursorPointer: W.value,
1148
+ palette: z.value.userOptions.annotatorPalette,
1149
+ onClose: xn
1150
+ }, {
1151
+ "annotator-action-close": M(() => [k(e.$slots, "annotator-action-close", {}, void 0, !0)]),
1152
+ "annotator-action-color": M(({ color: t }) => [k(e.$slots, "annotator-action-color", E(w({ color: t })), void 0, !0)]),
1153
+ "annotator-action-draw": M(({ mode: t }) => [k(e.$slots, "annotator-action-draw", E(w({ mode: t })), void 0, !0)]),
1154
+ "annotator-action-undo": M(({ disabled: t }) => [k(e.$slots, "annotator-action-undo", E(w({ disabled: t })), void 0, !0)]),
1155
+ "annotator-action-redo": M(({ disabled: t }) => [k(e.$slots, "annotator-action-redo", E(w({ disabled: t })), void 0, !0)]),
1156
+ "annotator-action-delete": M(({ disabled: t }) => [k(e.$slots, "annotator-action-delete", E(w({ disabled: t })), void 0, !0)]),
1157
+ _: 3
1158
+ }, 8, [
1159
+ "svgRef",
1160
+ "backgroundColor",
1161
+ "color",
1162
+ "active",
1163
+ "scale",
1164
+ "isCursorPointer",
1165
+ "palette"
1166
+ ])) : b("", !0),
1167
+ k(e.$slots, "userConfig", {}, void 0, !0),
1168
+ Ht.value ? (D(), x("div", {
1169
+ key: 2,
1170
+ ref_key: "noTitle",
1171
+ ref: bt,
1172
+ class: "vue-data-ui-no-title-space",
1173
+ style: "height:36px; width: 100%;background:transparent"
1174
+ }, null, 512)) : b("", !0),
1175
+ H.value.title.text ? (D(), x("div", {
1176
+ key: 3,
1177
+ ref_key: "chartTitle",
1178
+ ref: yt,
1179
+ style: "width:100%;background:transparent;padding-bottom:12px"
1180
+ }, [(D(), y(me, {
1181
+ key: `title_${xt.value}`,
1182
+ config: {
1183
+ title: {
1184
+ cy: "donut-div-title",
1185
+ ...H.value.title
1186
+ },
1187
+ subtitle: {
1188
+ cy: "donut-div-subtitle",
1189
+ ...H.value.title.subtitle
1190
+ }
1191
+ }
1192
+ }, null, 8, ["config"]))], 512)) : b("", !0),
1193
+ z.value.userOptions.show && vt.value && (j(It) || j(Pt)) ? (D(), y(j(We), {
1194
+ ref_key: "userOptionsRef",
1195
+ ref: Tt,
1196
+ key: `user_option_${Ct.value}`,
1197
+ backgroundColor: H.value.backgroundColor,
1198
+ color: H.value.color,
1199
+ isPrinting: j(Rt),
1200
+ isImaging: j(zt),
1201
+ uid: P.value,
1202
+ hasTooltip: z.value.userOptions.buttons.tooltip,
1203
+ isTooltip: K.value.showTooltip,
1204
+ hasLabel: !1,
1205
+ hasPdf: z.value.userOptions.buttons.pdf,
1206
+ hasImg: z.value.userOptions.buttons.img,
1207
+ hasSvg: z.value.userOptions.buttons.svg,
1208
+ hasXls: z.value.userOptions.buttons.csv,
1209
+ hasTable: z.value.userOptions.buttons.table,
1210
+ hasFullscreen: z.value.userOptions.buttons.fullscreen,
1211
+ hasAltCopy: z.value.userOptions.buttons.altCopy,
1212
+ isFullscreen: Q.value,
1213
+ chartElement: F.value,
1214
+ position: z.value.userOptions.position,
1215
+ callbacks: z.value.userOptions.callbacks,
1216
+ printScale: z.value.userOptions.print.scale,
1217
+ titles: { ...z.value.userOptions.buttonTitles },
1218
+ hasAnnotator: z.value.userOptions.buttons.annotator,
1219
+ isAnnotation: bn.value,
1220
+ tableDialog: z.value.table.useDialog,
1221
+ isCursorPointer: W.value,
1222
+ hasZoom: z.value.userOptions.buttons.zoom,
1223
+ isZoom: K.value.showZoom,
1224
+ onToggleFullscreen: yn,
1225
+ onGeneratePdf: j(Bt),
1226
+ onGenerateCsv: Bn,
1227
+ onGenerateImage: j(er),
1228
+ onGenerateSvg: j($n),
1229
+ onToggleTable: Hn,
1230
+ onToggleTooltip: Un,
1231
+ onToggleAnnotator: xn,
1232
+ onToggleZoom: Wn,
1233
+ onCopyAlt: tr,
1234
+ style: ke({ visibility: j(It) ? j(Pt) ? "visible" : "hidden" : "visible" })
1235
+ }, we({ _: 2 }, [
1236
+ e.$slots.menuIcon ? {
1237
+ name: "menuIcon",
1238
+ fn: M(({ isOpen: t, color: n }) => [k(e.$slots, "menuIcon", E(w({
1239
+ isOpen: t,
1240
+ color: n
1241
+ })), void 0, !0)]),
1242
+ key: "0"
1243
+ } : void 0,
1244
+ e.$slots.optionTooltip ? {
1245
+ name: "optionTooltip",
1246
+ fn: M(() => [k(e.$slots, "optionTooltip", {}, void 0, !0)]),
1247
+ key: "1"
1248
+ } : void 0,
1249
+ e.$slots.optionPdf ? {
1250
+ name: "optionPdf",
1251
+ fn: M(() => [k(e.$slots, "optionPdf", {}, void 0, !0)]),
1252
+ key: "2"
1253
+ } : void 0,
1254
+ e.$slots.optionCsv ? {
1255
+ name: "optionCsv",
1256
+ fn: M(() => [k(e.$slots, "optionCsv", {}, void 0, !0)]),
1257
+ key: "3"
1258
+ } : void 0,
1259
+ e.$slots.optionImg ? {
1260
+ name: "optionImg",
1261
+ fn: M(() => [k(e.$slots, "optionImg", {}, void 0, !0)]),
1262
+ key: "4"
1263
+ } : void 0,
1264
+ e.$slots.optionSvg ? {
1265
+ name: "optionSvg",
1266
+ fn: M(() => [k(e.$slots, "optionSvg", {}, void 0, !0)]),
1267
+ key: "5"
1268
+ } : void 0,
1269
+ e.$slots.optionTable ? {
1270
+ name: "optionTable",
1271
+ fn: M(() => [k(e.$slots, "optionTable", {}, void 0, !0)]),
1272
+ key: "6"
1273
+ } : void 0,
1274
+ e.$slots.optionFullscreen ? {
1275
+ name: "optionFullscreen",
1276
+ fn: M(({ toggleFullscreen: t, isFullscreen: n }) => [k(e.$slots, "optionFullscreen", E(w({
1277
+ toggleFullscreen: t,
1278
+ isFullscreen: n
1279
+ })), void 0, !0)]),
1280
+ key: "7"
1281
+ } : void 0,
1282
+ e.$slots.optionAnnotator ? {
1283
+ name: "optionAnnotator",
1284
+ fn: M(({ toggleAnnotator: t, isAnnotator: n }) => [k(e.$slots, "optionAnnotator", E(w({
1285
+ toggleAnnotator: t,
1286
+ isAnnotator: n
1287
+ })), void 0, !0)]),
1288
+ key: "8"
1289
+ } : void 0,
1290
+ e.$slots.optionZoom ? {
1291
+ name: "optionZoom",
1292
+ fn: M(({ toggleZoom: t, isZoomLocked: n }) => [k(e.$slots, "optionZoom", E(w({
1293
+ toggleZoom: t,
1294
+ isZoomLocked: n
1295
+ })), void 0, !0)]),
1296
+ key: "9"
1297
+ } : void 0,
1298
+ e.$slots.optionAltCopy ? {
1299
+ name: "optionAltCopy",
1300
+ fn: M(({ altCopy: t }) => [k(e.$slots, "optionAltCopy", E(w({ altCopy: t })), void 0, !0)]),
1301
+ key: "10"
1302
+ } : void 0,
1303
+ e.$slots["custom-menu-before"] ? {
1304
+ name: "custom-menu-before",
1305
+ fn: M(() => [k(e.$slots, "custom-menu-before", {}, void 0, !0)]),
1306
+ key: "11"
1307
+ } : void 0,
1308
+ e.$slots["custom-menu-after"] ? {
1309
+ name: "custom-menu-after",
1310
+ fn: M(() => [k(e.$slots, "custom-menu-after", {}, void 0, !0)]),
1311
+ key: "12"
1312
+ } : void 0
1313
+ ]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.isTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.callbacks.printScale.titles.hasAnnotator.isAnnotation.tableDialog.isCursorPointer.hasZoom.isZoom.onGeneratePdf.onGenerateImage.onGenerateSvg.style".split("."))) : b("", !0),
1314
+ S("div", { class: T({
1315
+ "vue-ui-circle-pack-svg-container": !0,
1316
+ "not-responsive": !z.value.responsive
1317
+ }) }, [(D(), x("svg", {
1318
+ ref_key: "svgRef",
1319
+ ref: G,
1320
+ xmlns: j(te),
1321
+ "aria-describedby": `chart-instructions-${P.value}`,
1322
+ viewBox: `${j($).x} ${j($).y} ${j($).width} ${j($).height}`,
1323
+ preserveAspectRatio: "xMidYMid meet",
1324
+ class: T({
1325
+ "vue-data-ui-fullscreen--on": Q.value,
1326
+ "vue-data-ui-fulscreen--off": !Q.value,
1327
+ "not-responsive": !z.value.responsive,
1328
+ "vue-data-ui-no-transition": !j(U)
1329
+ }),
1330
+ style: ke(`display:block;${z.value.responsive ? "width:100%;height:auto" : "height:100%;"};overflow:${K.value.showZoom ? "hidden" : "visible"};background:transparent;color:${H.value.color};background:${H.value.backgroundColor};`),
1331
+ tabindex: "0",
1332
+ onFocus: ir,
1333
+ onBlur: ar,
1334
+ onKeydown: sr
1335
+ }, [
1336
+ Ee(j(Ke)),
1337
+ e.$slots["chart-background"] ? (D(), x("foreignObject", {
1338
+ key: 0,
1339
+ x: j($).x,
1340
+ y: j($).y,
1341
+ width: q.value.w,
1342
+ height: q.value.h,
1343
+ style: { pointerEvents: "none" }
1344
+ }, [k(e.$slots, "chart-background", {}, void 0, !0)], 8, et)) : b("", !0),
1345
+ (D(!0), x(_, null, Me(J.value, (t, n) => (D(), x(_, { key: t.id }, [
1346
+ S("defs", null, [Ee(ve, {
1347
+ t: "radial",
1348
+ id: t.id,
1349
+ fy: "30%",
1350
+ stops: [
1351
+ [
1352
+ "10%",
1353
+ j(m)(t.color, V.value.gradient.intensity / 100),
1354
+ 1
1355
+ ],
1356
+ [
1357
+ "90%",
1358
+ j(u)(t.color, .1),
1359
+ 1
1360
+ ],
1361
+ [
1362
+ "100%",
1363
+ t.color,
1364
+ 1
1365
+ ]
1366
+ ]
1367
+ }, null, 8, ["id", "stops"])]),
1368
+ e.$slots.pattern ? (D(), x("g", tt, [S("defs", null, [k(e.$slots, "pattern", De({ ref_for: !0 }, {
1369
+ ...t,
1370
+ patternId: `pattern_${P.value}_${t.id}`
1371
+ }), void 0, !0)])])) : b("", !0),
1372
+ S("rect", {
1373
+ class: T({ "vue-data-ui-transition": j(U) }),
1374
+ x: t.x - t.r,
1375
+ y: t.y - t.r,
1376
+ width: t.r * 2,
1377
+ height: t.r * 2,
1378
+ stroke: V.value.stroke,
1379
+ "vector-effect": "non-scaling-stroke",
1380
+ "stroke-width": V.value.strokeWidth * (un.value || 1) / 100,
1381
+ fill: V.value.gradient.show ? `url(#${t.id})` : t.color,
1382
+ rx: t.r,
1383
+ onMouseenter: (e) => gn(t, n, "pointer"),
1384
+ onMouseout: (e) => fn(t, n),
1385
+ onClick: (e) => pn(t, n)
1386
+ }, null, 42, nt),
1387
+ e.$slots.pattern ? (D(), x("rect", {
1388
+ key: 1,
1389
+ class: T({ "vue-data-ui-transition": j(U) }),
1390
+ x: t.x - t.r,
1391
+ y: t.y - t.r,
1392
+ width: t.r * 2,
1393
+ height: t.r * 2,
1394
+ stroke: V.value.stroke,
1395
+ "vector-effect": "non-scaling-stroke",
1396
+ "stroke-width": V.value.strokeWidth * (un.value || 1) / 100,
1397
+ fill: `url(#pattern_${P.value}_${t.id})`,
1398
+ rx: t.r,
1399
+ style: { pointerEvents: "none" }
1400
+ }, null, 10, rt)) : b("", !0)
1401
+ ], 64))), 128)),
1402
+ (D(!0), x(_, null, Me(J.value, (e, t) => (D(), x(_, { key: e.id }, [e.hasChildren ? b("", !0) : (D(), x("rect", {
1403
+ key: 0,
1404
+ class: T({ "vue-data-ui-transition": j(U) }),
1405
+ x: e.x - e.r,
1406
+ y: e.y - e.r,
1407
+ width: e.r * 2,
1408
+ height: e.r * 2,
1409
+ stroke: "none",
1410
+ fill: L.value && L.value.id === e.id ? V.value.gradient.show ? `url(#${e.id})` : e.color : "transparent",
1411
+ rx: e.r,
1412
+ style: ke({
1413
+ filter: L.value && L.value.id === e.id ? `drop-shadow(0px 0px 6px ${V.value.selectedShadowColor})` : "none",
1414
+ opacity: +!!L.value,
1415
+ pointerEvents: "none"
1416
+ })
1417
+ }, null, 14, it))], 64))), 128)),
1418
+ (D(!0), x(_, null, Me(J.value, (t, n) => (D(), x(_, { key: `cl_${t.id}` }, [e.$slots["data-label"] && rn(t) ? k(e.$slots, "data-label", De({ ref_for: !0 }, {
1419
+ ...t,
1420
+ createTSpans: j(c),
1421
+ fontSize: {
1422
+ name: t.r / 3 * B.value.name.fontSizeRatio,
1423
+ value: vn(t) * B.value.value.fontSizeRatio
1424
+ },
1425
+ color: B.value.name.color ? B.value.name.color : j(g)(t.color)
1426
+ }), void 0, !0, 0) : (D(), x(_, { key: 1 }, [B.value.name.show && t.name && rn(t) ? (D(), x("text", {
1427
+ key: 0,
1428
+ style: { pointerEvents: "none" },
1429
+ class: T({ "vue-data-ui-transition": j(U) }),
1430
+ transform: `translate(${t.x}, ${t.y + dn(t.r, B.value.name.offsetY) - t.r / 10})`,
1431
+ "font-size": t.r / 3 * B.value.name.fontSizeRatio,
1432
+ fill: B.value.name.color === "auto" ? j(g)(t.color) : B.value.name.color,
1433
+ "font-weight": B.value.name.bold ? "bold" : "normal",
1434
+ "text-anchor": "middle"
1435
+ }, A(t.name), 11, at)) : b("", !0), B.value.value.show && rn(t) ? (D(), x("text", {
1436
+ key: 1,
1437
+ class: T({ "vue-data-ui-transition": j(U) }),
1438
+ style: {
1439
+ pointerEvents: "none",
1440
+ transition: "opacity 0.2s ease-in-out"
1441
+ },
1442
+ transform: `translate(${t.x}, ${t.y + dn(t.r, B.value.value.offsetY) + t.r / 2.5})`,
1443
+ "font-size": vn(t) * B.value.value.fontSizeRatio,
1444
+ fill: B.value.value.color === "auto" ? j(g)(t.color) : B.value.value.color,
1445
+ "font-weight": B.value.value.bold ? "bold" : "normal",
1446
+ "text-anchor": "middle"
1447
+ }, A(_n(t)), 11, ot)) : b("", !0)], 64)), k(e.$slots, "circle", De({ ref_for: !0 }, {
1448
+ ...t,
1449
+ showLabel: rn(t),
1450
+ isSelected: L.value?.id === t.id,
1451
+ isDescendantOfSelected: nn(t, L.value),
1452
+ uid: `${n}_${P.value}`
1453
+ }), void 0, !0)], 64))), 128)),
1454
+ Fn.value.length && H.value.parentTooltips.show ? (D(), x("g", st, [(D(!0), x(_, null, Me(Fn.value, (t) => (D(), x("g", { key: `tltp_${t.id}` }, [
1455
+ S("path", {
1456
+ class: T({ "vue-data-ui-transition": j(U) }),
1457
+ stroke: H.value.parentTooltips.link.useSerieColor ? t.color : H.value.parentTooltips.link.stroke,
1458
+ "vector-effect": "non-scaling-stroke",
1459
+ "stroke-width": H.value.parentTooltips.link.strokeWidth,
1460
+ "stroke-linecap": "round",
1461
+ "stroke-dasharray": H.value.parentTooltips.link.strokeDasharray,
1462
+ opacity: H.value.parentTooltips.link.opacity,
1463
+ d: `M${t.anchorX}, ${t.anchorY} ${t.lineX}, ${t.lineY}`
1464
+ }, null, 10, ct),
1465
+ S("rect", {
1466
+ class: T({ "vue-data-ui-transition": j(U) }),
1467
+ x: t.x,
1468
+ y: t.y,
1469
+ width: t.width,
1470
+ height: t.height,
1471
+ rx: Math.max(3 * t.scale, t.fontSize / 2.5) * H.value.parentTooltips.borderRadiusRatio,
1472
+ ry: Math.max(3 * t.scale, t.fontSize / 2.5) * H.value.parentTooltips.borderRadiusRatio,
1473
+ fill: H.value.parentTooltips.backgroundColor,
1474
+ stroke: H.value.parentTooltips.useSerieColor ? t.color : H.value.parentTooltips.stroke,
1475
+ "vector-effect": "non-scaling-stroke",
1476
+ "stroke-width": H.value.parentTooltips.strokeWidth,
1477
+ filter: H.value.parentTooltips.filter
1478
+ }, null, 10, lt),
1479
+ k(e.$slots, "parent-tooltip", De({ ref_for: !0 }, { ...t }), () => [S("rect", {
1480
+ class: T({ "vue-data-ui-transition": j(U) }),
1481
+ fill: t.color,
1482
+ x: t.x + t.paddingX * 1.3 - t.fontSize * .35,
1483
+ y: t.y + t.paddingY + t.lineHeight / 2 - t.fontSize * .35,
1484
+ rx: t.fontSize * .35,
1485
+ width: t.fontSize * .7,
1486
+ height: t.fontSize * .7
1487
+ }, null, 10, ut), S("text", {
1488
+ class: T({ "vue-data-ui-transition": j(U) }),
1489
+ transform: `translate(${t.x + t.paddingX + t.fontSize}, ${t.y + t.paddingY + t.fontSize})`,
1490
+ "font-size": t.fontSize,
1491
+ fill: H.value.parentTooltips.color,
1492
+ "font-family": z.value.style.fontFamily,
1493
+ "text-anchor": "start"
1494
+ }, [(D(!0), x(_, null, Me(t.lines, (e, n) => (D(), x("tspan", {
1495
+ key: `${t.id}_${n}`,
1496
+ x: 0,
1497
+ dy: n === 0 ? 0 : t.lineHeight
1498
+ }, A(e), 9, ft))), 128))], 10, dt)], !0)
1499
+ ]))), 128))])) : b("", !0),
1500
+ k(e.$slots, "svg", { svg: {
1501
+ drawingArea: { ...j($) },
1502
+ width: q.value.w,
1503
+ height: q.value.h,
1504
+ isPrintingImg: j(Rt) || j(zt) || j(Zn),
1505
+ isPrintingSvg: j(Qn)
1506
+ } }, void 0, !0)
1507
+ ], 46, $e)), e.$slots.hint ? (D(), x("div", pt, [k(e.$slots, "hint", E(w({
1508
+ hint: z.value.a11y.translations.keyboardNavigation,
1509
+ isVisible: At.value
1510
+ })), void 0, !0)])) : b("", !0)], 2),
1511
+ e.$slots.watermark ? (D(), x("div", mt, [k(e.$slots, "watermark", E(w({ isPrinting: j(Rt) || j(zt) || j(Zn) || j(Qn) })), void 0, !0)])) : b("", !0),
1512
+ j(wn) ? (D(), x("div", ht, [k(e.$slots, "reset-action", { reset: j(Cn) }, () => [S("button", {
1513
+ "data-cy-reset": "",
1514
+ tabindex: "0",
1515
+ role: "button",
1516
+ class: "vue-data-ui-refresh-button",
1517
+ style: ke({
1518
+ background: H.value.backgroundColor,
1519
+ cursor: W.value ? "pointer" : "default"
1520
+ }),
1521
+ onClick: t[0] ||= (e) => j(Cn)(!0)
1522
+ }, [Ee(j(Ve), {
1523
+ name: "refresh",
1524
+ stroke: H.value.color
1525
+ }, null, 8, ["stroke"])], 4)], !0)])) : b("", !0),
1526
+ e.$slots.source ? (D(), x("div", {
1527
+ key: 7,
1528
+ ref_key: "source",
1529
+ ref: wt,
1530
+ dir: "auto"
1531
+ }, [k(e.$slots, "source", {}, void 0, !0)], 512)) : b("", !0),
1532
+ Ee(j(Be), {
1533
+ teleportTo: H.value.tooltip.teleportTo,
1534
+ show: K.value.showTooltip && Et.value,
1535
+ backgroundColor: H.value.tooltip.backgroundColor,
1536
+ color: H.value.tooltip.color,
1537
+ fontSize: H.value.tooltip.fontSize,
1538
+ borderRadius: H.value.tooltip.borderRadius,
1539
+ borderColor: H.value.tooltip.borderColor,
1540
+ borderWidth: H.value.tooltip.borderWidth,
1541
+ backgroundOpacity: H.value.tooltip.backgroundOpacity,
1542
+ position: H.value.tooltip.position,
1543
+ offsetX: H.value.tooltip.offsetX,
1544
+ offsetY: H.value.tooltip.offsetY,
1545
+ parent: F.value,
1546
+ content: Dt.value,
1547
+ isCustom: hn.value,
1548
+ isFullscreen: Q.value,
1549
+ smooth: H.value.tooltip.smooth,
1550
+ backdropFilter: H.value.tooltip.backdropFilter,
1551
+ smoothForce: H.value.tooltip.smoothForce,
1552
+ smoothSnapThreshold: H.value.tooltip.smoothSnapThrehsold,
1553
+ isA11yMode: kt.value === "keyboard",
1554
+ a11yPosition: Ot.value
1555
+ }, {
1556
+ "tooltip-before": M(() => [k(e.$slots, "tooltip-before", E(w({ ...mn.value })), void 0, !0)]),
1557
+ tooltip: M(() => [k(e.$slots, "tooltip", E(w({ ...mn.value })), void 0, !0)]),
1558
+ "tooltip-after": M(() => [k(e.$slots, "tooltip-after", E(w({ ...mn.value })), void 0, !0)]),
1559
+ _: 3
1560
+ }, 8, [
1561
+ "teleportTo",
1562
+ "show",
1563
+ "backgroundColor",
1564
+ "color",
1565
+ "fontSize",
1566
+ "borderRadius",
1567
+ "borderColor",
1568
+ "borderWidth",
1569
+ "backgroundOpacity",
1570
+ "position",
1571
+ "offsetX",
1572
+ "offsetY",
1573
+ "parent",
1574
+ "content",
1575
+ "isCustom",
1576
+ "isFullscreen",
1577
+ "smooth",
1578
+ "backdropFilter",
1579
+ "smoothForce",
1580
+ "smoothSnapThreshold",
1581
+ "isA11yMode",
1582
+ "a11yPosition"
1583
+ ]),
1584
+ vt.value && z.value.userOptions.buttons.table ? (D(), y(Ne(qn.value.component), De({ key: 8 }, qn.value.props, {
1585
+ ref_key: "tableUnit",
1586
+ ref: I,
1587
+ onClose: Jn
1588
+ }), we({
1589
+ content: M(() => [(D(), y(j(Ue), {
1590
+ key: `table_${St.value}`,
1591
+ colNames: Vn.value.colNames,
1592
+ head: Vn.value.head,
1593
+ body: Vn.value.body,
1594
+ config: Vn.value.config,
1595
+ title: z.value.table.useDialog ? "" : qn.value.title,
1596
+ withCloseButton: !z.value.table.useDialog,
1597
+ isCursorPointer: W.value,
1598
+ onClose: Jn
1599
+ }, {
1600
+ th: M(({ th: e }) => [S("div", gt, A(e), 1)]),
1601
+ td: M(({ td: e }) => [Te(A(e.name || e), 1)]),
1602
+ _: 1
1603
+ }, 8, [
1604
+ "colNames",
1605
+ "head",
1606
+ "body",
1607
+ "config",
1608
+ "title",
1609
+ "withCloseButton",
1610
+ "isCursorPointer"
1611
+ ]))]),
1612
+ _: 2
1613
+ }, [z.value.table.useDialog ? {
1614
+ name: "title",
1615
+ fn: M(() => [Te(A(qn.value.title), 1)]),
1616
+ key: "0"
1617
+ } : void 0, z.value.table.useDialog ? {
1618
+ name: "actions",
1619
+ fn: M(() => [S("button", {
1620
+ tabindex: "0",
1621
+ class: "vue-ui-user-options-button",
1622
+ onClick: t[1] ||= (e) => Bn(z.value.userOptions.callbacks.csv),
1623
+ style: ke({ cursor: W.value ? "pointer" : "default" })
1624
+ }, [Ee(j(Ve), {
1625
+ name: "fileCsv",
1626
+ stroke: qn.value.props.color
1627
+ }, null, 8, ["stroke"])], 4)]),
1628
+ key: "1"
1629
+ } : void 0]), 1040)) : b("", !0),
1630
+ k(e.$slots, "skeleton", {}, () => [j(Mt) ? (D(), y(ce, { key: 0 })) : b("", !0)], !0)
1631
+ ], 46, Ze));
1632
+ }
1633
+ }, [["__scopeId", "data-v-6cf025f4"]]);
1634
+ //#endregion
1635
+ export { Xe as n, _t as t };