vue-data-ui 3.22.8 → 3.22.9

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