vue-data-ui 3.23.1 → 3.23.2

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