vue-data-ui 3.9.12 → 3.9.13

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 (164) hide show
  1. package/dist/{Arrow-Cbn8f8m4.js → Arrow-f1dKmuRH.js} +1 -1
  2. package/dist/{BaseDraggableDialog-C167SnU0.js → BaseDraggableDialog-CAJxIF6g.js} +2 -2
  3. package/dist/{BaseIcon-r3_sTK1A.js → BaseIcon-4i3dd7Ty.js} +1 -1
  4. package/dist/{BaseZoomControls-D8N7fb-c.js → BaseZoomControls-C0H509ZF.js} +6 -6
  5. package/dist/{ColorPicker-Bq2C5Dll.js → ColorPicker-B9oF4-O6.js} +8 -8
  6. package/dist/{DataTable-DNeCys3I.js → DataTable-WrXCJkfE.js} +2 -2
  7. package/dist/{Legend-Dxz13z4E.js → Legend-D6z73edh.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-ZnkWbBri.js → NonSvgPenAndPaper-7clRuQVF.js} +11 -11
  9. package/dist/{PackageVersion-BpArR90N.js → PackageVersion-D3cMhAlf.js} +1 -1
  10. package/dist/{PenAndPaper-CsqBamFZ.js → PenAndPaper-DxIUvoQ8.js} +17 -17
  11. package/dist/{Shape-_iTOIp3x.js → Shape-DAHhCEdg.js} +1 -1
  12. package/dist/{Slicer-DBYna_by.js → Slicer-Bn8azYkD.js} +70 -70
  13. package/dist/{SlicerPreview-pHjYklxh.js → SlicerPreview-oV3dMuV1.js} +2 -2
  14. package/dist/{SparkTooltip-BaSHhfes.js → SparkTooltip-D7iYVquk.js} +3 -3
  15. package/dist/{Title-DFtCaCah.js → Title-BhURirpm.js} +1 -1
  16. package/dist/{Tooltip-B79qvriT.js → Tooltip-TDyKgLB6.js} +1 -1
  17. package/dist/{UserOptions-B-2A_KRb.js → UserOptions-CzJWRC4s.js} +2 -2
  18. package/dist/components/arrow.js +1 -1
  19. package/dist/components/vue-ui-3d-bar.js +1 -1
  20. package/dist/components/vue-ui-accordion.js +1 -1
  21. package/dist/components/vue-ui-age-pyramid.js +1 -1
  22. package/dist/components/vue-ui-annotator.js +1 -1
  23. package/dist/components/vue-ui-bullet.js +1 -1
  24. package/dist/components/vue-ui-candlestick.js +1 -1
  25. package/dist/components/vue-ui-carousel-table.js +1 -1
  26. package/dist/components/vue-ui-chestnut.js +1 -1
  27. package/dist/components/vue-ui-chord.js +1 -1
  28. package/dist/components/vue-ui-circle-pack.js +1 -1
  29. package/dist/components/vue-ui-cursor.js +1 -1
  30. package/dist/components/vue-ui-dag.js +1 -1
  31. package/dist/components/vue-ui-dashboard.js +1 -1
  32. package/dist/components/vue-ui-digits.js +1 -1
  33. package/dist/components/vue-ui-donut-evolution.js +1 -1
  34. package/dist/components/vue-ui-donut.js +1 -1
  35. package/dist/components/vue-ui-dumbbell.js +1 -1
  36. package/dist/components/vue-ui-flow.js +1 -1
  37. package/dist/components/vue-ui-funnel.js +1 -1
  38. package/dist/components/vue-ui-galaxy.js +1 -1
  39. package/dist/components/vue-ui-gauge.js +1 -1
  40. package/dist/components/vue-ui-geo.js +1 -1
  41. package/dist/components/vue-ui-gizmo.js +1 -1
  42. package/dist/components/vue-ui-heatmap.js +1 -1
  43. package/dist/components/vue-ui-history-plot.js +1 -1
  44. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  45. package/dist/components/vue-ui-icon.js +1 -1
  46. package/dist/components/vue-ui-kpi.js +1 -1
  47. package/dist/components/vue-ui-mini-loader.js +1 -1
  48. package/dist/components/vue-ui-molecule.js +1 -1
  49. package/dist/components/vue-ui-mood-radar.js +1 -1
  50. package/dist/components/vue-ui-nested-donuts.js +1 -1
  51. package/dist/components/vue-ui-onion.js +1 -1
  52. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  53. package/dist/components/vue-ui-quadrant.js +1 -1
  54. package/dist/components/vue-ui-quick-chart.js +1 -1
  55. package/dist/components/vue-ui-radar.js +1 -1
  56. package/dist/components/vue-ui-rating.js +1 -1
  57. package/dist/components/vue-ui-relation-circle.js +1 -1
  58. package/dist/components/vue-ui-ridgeline.js +1 -1
  59. package/dist/components/vue-ui-rings.js +1 -1
  60. package/dist/components/vue-ui-scatter.js +1 -1
  61. package/dist/components/vue-ui-skeleton.js +1 -1
  62. package/dist/components/vue-ui-smiley.js +1 -1
  63. package/dist/components/vue-ui-spark-trend.js +1 -1
  64. package/dist/components/vue-ui-sparkbar.js +1 -1
  65. package/dist/components/vue-ui-sparkgauge.js +1 -1
  66. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  67. package/dist/components/vue-ui-sparkline.js +1 -1
  68. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  69. package/dist/components/vue-ui-stackbar.js +1 -1
  70. package/dist/components/vue-ui-stackline.js +1 -1
  71. package/dist/components/vue-ui-strip-plot.js +1 -1
  72. package/dist/components/vue-ui-table-heatmap.js +1 -1
  73. package/dist/components/vue-ui-table-sparkline.js +1 -1
  74. package/dist/components/vue-ui-table.js +1 -1
  75. package/dist/components/vue-ui-thermometer.js +1 -1
  76. package/dist/components/vue-ui-timer.js +1 -1
  77. package/dist/components/vue-ui-tiremarks.js +1 -1
  78. package/dist/components/vue-ui-treemap.js +1 -1
  79. package/dist/components/vue-ui-vertical-bar.js +1 -1
  80. package/dist/components/vue-ui-waffle.js +1 -1
  81. package/dist/components/vue-ui-wheel.js +1 -1
  82. package/dist/components/vue-ui-word-cloud.js +1 -1
  83. package/dist/components/vue-ui-world.js +1 -1
  84. package/dist/components/vue-ui-xy-canvas.js +1 -1
  85. package/dist/components/vue-ui-xy.js +1 -1
  86. package/dist/{dom-to-png-Cm7R2Zu2.js → dom-to-png-C2K57N1M.js} +1 -1
  87. package/dist/{img-BJzUSmkm.js → img-DKigoPDs.js} +1 -1
  88. package/dist/labelUtils-PMU3ZGCb.js +30 -0
  89. package/dist/{lib-W9waxHL3.js → lib-BwysEpWI.js} +81 -77
  90. package/dist/{pdf-BJR-8Moh.js → pdf-BHGnVnBG.js} +1 -1
  91. package/dist/style.css +1 -1
  92. package/dist/types/vue-data-ui.d.ts +20 -0
  93. package/dist/{useAutoSizeLabelsInsideViewbox-DAdqpHf1.js → useAutoSizeLabelsInsideViewbox-DO2dxQ78.js} +1 -1
  94. package/dist/{useNestedProp-D-jUHecl.js → useNestedProp--5lL-kf1.js} +209 -197
  95. package/dist/{usePrinter-DhoMn87n.js → usePrinter-BJzHDpYF.js} +2 -2
  96. package/dist/{vue-data-ui-Dw19CYml.js → vue-data-ui-DE3O1T8n.js} +67 -67
  97. package/dist/vue-data-ui.js +83 -83
  98. package/dist/{vue-ui-3d-bar-Bv7Tft_r.js → vue-ui-3d-bar-CVvhPzdH.js} +6 -6
  99. package/dist/{vue-ui-accordion-B6BX2vhq.js → vue-ui-accordion-tQNKwbVi.js} +3 -3
  100. package/dist/{vue-ui-age-pyramid-C6NjJlg4.js → vue-ui-age-pyramid-DxTHqM7w.js} +25 -25
  101. package/dist/{vue-ui-annotator-DB6dpuUU.js → vue-ui-annotator-Da5aL57a.js} +7 -7
  102. package/dist/{vue-ui-bullet-BLGvme53.js → vue-ui-bullet-DhpTML7L.js} +22 -22
  103. package/dist/{vue-ui-candlestick-DBG1mW60.js → vue-ui-candlestick-BDOKQqMm.js} +85 -85
  104. package/dist/{vue-ui-carousel-table-BYnItN48.js → vue-ui-carousel-table-BW6bKPsX.js} +13 -13
  105. package/dist/{vue-ui-chestnut-DV6f4SNc.js → vue-ui-chestnut-Cc-lke6P.js} +31 -31
  106. package/dist/{vue-ui-chord-DRleP2O8.js → vue-ui-chord-CB6w31Ex.js} +8 -8
  107. package/dist/{vue-ui-circle-pack-BCrMaFWw.js → vue-ui-circle-pack-CfihOmNV.js} +6 -6
  108. package/dist/{vue-ui-cursor-j10t3UEX.js → vue-ui-cursor-Dnpe76BQ.js} +3 -3
  109. package/dist/{vue-ui-dag-y0oqslGj.js → vue-ui-dag-Dq3hKon7.js} +7 -7
  110. package/dist/{vue-ui-dashboard-mBGF94l6.js → vue-ui-dashboard-eMwyGsuD.js} +68 -68
  111. package/dist/{vue-ui-digits-DQz1eJc-.js → vue-ui-digits-B5QhIbFD.js} +2 -2
  112. package/dist/vue-ui-donut-D3---CiY.js +2082 -0
  113. package/dist/{vue-ui-donut-evolution-hkHICgry.js → vue-ui-donut-evolution-C6H1Vr6m.js} +8 -8
  114. package/dist/{vue-ui-dumbbell-BVPZwi0X.js → vue-ui-dumbbell-L1p0npq4.js} +33 -33
  115. package/dist/{vue-ui-flow-BNeKU-KR.js → vue-ui-flow-CgAIlvZF.js} +38 -38
  116. package/dist/{vue-ui-funnel-VorM1bT0.js → vue-ui-funnel-CpgqO34n.js} +6 -6
  117. package/dist/{vue-ui-galaxy-DKkviRQr.js → vue-ui-galaxy-DAi1I2Cr.js} +316 -291
  118. package/dist/{vue-ui-gauge-BNaWVi-e.js → vue-ui-gauge-DY78U-uO.js} +7 -7
  119. package/dist/{vue-ui-geo-_R5mjj-u.js → vue-ui-geo-Befu6fkT.js} +7 -7
  120. package/dist/{vue-ui-gizmo-AQFQccea.js → vue-ui-gizmo-BM_oOeYY.js} +3 -3
  121. package/dist/{vue-ui-heatmap-BKX1bPY5.js → vue-ui-heatmap-C_ze3bzX.js} +108 -108
  122. package/dist/{vue-ui-history-plot-BNX8B2jr.js → vue-ui-history-plot-C-_zpLPH.js} +50 -50
  123. package/dist/{vue-ui-horizontal-bar-B6VyEs1p.js → vue-ui-horizontal-bar-DvLMeP44.js} +47 -47
  124. package/dist/{vue-ui-kpi-BnCqocoi.js → vue-ui-kpi-IcOqABQz.js} +3 -3
  125. package/dist/{vue-ui-mini-loader-Dzqusv9i.js → vue-ui-mini-loader-DxlOXn6v.js} +2 -2
  126. package/dist/{vue-ui-molecule-PtnhkQLr.js → vue-ui-molecule-N938wMMB.js} +5 -5
  127. package/dist/{vue-ui-mood-radar-DxSVU35A.js → vue-ui-mood-radar-D1hHnpLB.js} +7 -7
  128. package/dist/{vue-ui-nested-donuts-BY8C1axg.js → vue-ui-nested-donuts-DeTGEb4T.js} +597 -595
  129. package/dist/{vue-ui-onion-XJAcsPVV.js → vue-ui-onion-BwY998zT.js} +376 -332
  130. package/dist/{vue-ui-parallel-coordinate-plot-CDWIZbgp.js → vue-ui-parallel-coordinate-plot-B4v3AheY.js} +43 -43
  131. package/dist/{vue-ui-quadrant-DY9GXVYY.js → vue-ui-quadrant-4f1p9gSO.js} +8 -8
  132. package/dist/{vue-ui-quick-chart-Y73WB5GW.js → vue-ui-quick-chart-CGbEBTS1.js} +52 -52
  133. package/dist/{vue-ui-radar-Deup68ga.js → vue-ui-radar-B15r4HoM.js} +57 -57
  134. package/dist/{vue-ui-rating-BciQHmzs.js → vue-ui-rating-CaRZVE71.js} +2 -2
  135. package/dist/{vue-ui-relation-circle-C0W3aPaO.js → vue-ui-relation-circle-CFEL1uYt.js} +7 -7
  136. package/dist/{vue-ui-ridgeline-D9z3_hRf.js → vue-ui-ridgeline-LGH61-xE.js} +8 -8
  137. package/dist/{vue-ui-rings-CT3gLUkS.js → vue-ui-rings-DNdUdKax.js} +270 -246
  138. package/dist/{vue-ui-scatter-DiLSOZGs.js → vue-ui-scatter-Duxs0Ie_.js} +8 -8
  139. package/dist/{vue-ui-skeleton-D_2C5A85.js → vue-ui-skeleton-UoBAzUyN.js} +3 -3
  140. package/dist/{vue-ui-smiley-C0Bqip2_.js → vue-ui-smiley-BhpJbcM8.js} +2 -2
  141. package/dist/{vue-ui-spark-trend-C05f4Fn6.js → vue-ui-spark-trend-2c75iF9Y.js} +96 -96
  142. package/dist/{vue-ui-sparkbar-CjYaG0Ae.js → vue-ui-sparkbar-B2E5nzBF.js} +3 -3
  143. package/dist/{vue-ui-sparkgauge-AKIy8PYI.js → vue-ui-sparkgauge-DFkpaMkk.js} +13 -13
  144. package/dist/{vue-ui-sparkhistogram-nWWgx7iD.js → vue-ui-sparkhistogram-K6lo-KnY.js} +4 -4
  145. package/dist/{vue-ui-sparkline-CGMDNQpH.js → vue-ui-sparkline-CsByZZt4.js} +11 -11
  146. package/dist/{vue-ui-sparkstackbar-C3vjYPrM.js → vue-ui-sparkstackbar-ByUb6nk-.js} +3 -3
  147. package/dist/{vue-ui-stackbar-BQiLC89h.js → vue-ui-stackbar-D7SnQvr4.js} +41 -41
  148. package/dist/{vue-ui-stackline-DPV5Amgq.js → vue-ui-stackline-BnRxf3k_.js} +130 -130
  149. package/dist/{vue-ui-strip-plot-CFGml25d.js → vue-ui-strip-plot-CJWXdisu.js} +28 -28
  150. package/dist/{vue-ui-table-DySeXTmp.js → vue-ui-table-BHWwypkc.js} +27 -27
  151. package/dist/{vue-ui-table-heatmap-CDnzIKGy.js → vue-ui-table-heatmap-DvHKKwJA.js} +12 -12
  152. package/dist/{vue-ui-table-sparkline-DbEj6x4N.js → vue-ui-table-sparkline-uK0q-dO9.js} +11 -11
  153. package/dist/{vue-ui-thermometer-BeiT4slQ.js → vue-ui-thermometer-Bxn0JNeJ.js} +31 -31
  154. package/dist/{vue-ui-timer-RWg45QKc.js → vue-ui-timer-7o5Jrxf3.js} +5 -5
  155. package/dist/{vue-ui-tiremarks-B4_W_mWX.js → vue-ui-tiremarks-DHoUaHOe.js} +6 -6
  156. package/dist/{vue-ui-treemap-fq9-enBk.js → vue-ui-treemap-B_4cIAAI.js} +51 -51
  157. package/dist/{vue-ui-waffle-BRcWupew.js → vue-ui-waffle-CddfqNWD.js} +381 -352
  158. package/dist/{vue-ui-wheel-DziR9q2I.js → vue-ui-wheel-CGYJA-33.js} +6 -6
  159. package/dist/{vue-ui-word-cloud-C6i_7Q6Y.js → vue-ui-word-cloud-oszTieHn.js} +32 -32
  160. package/dist/{vue-ui-world-Dvn1JWi9.js → vue-ui-world-DQjHEyKe.js} +31 -31
  161. package/dist/{vue-ui-xy-2ui0juKl.js → vue-ui-xy-D5A8tR-O.js} +9 -9
  162. package/dist/{vue-ui-xy-canvas-9tgX_s2v.js → vue-ui-xy-canvas-Bzd8pZdH.js} +100 -100
  163. package/package.json +1 -1
  164. package/dist/vue-ui-donut-A_IFB9JR.js +0 -2078
@@ -0,0 +1,2082 @@
1
+ import { computed as g, defineAsyncComponent as Se, useSlots as Hl, shallowRef as Me, ref as k, onMounted as ol, onBeforeUnmount as al, toRefs as Gl, watch as Ne, createElementBlock as i, openBlock as u, normalizeStyle as I, normalizeClass as Nt, createBlock as Pe, createCommentVNode as f, renderSlot as w, createElementVNode as b, createVNode as wt, unref as s, withCtx as C, normalizeProps as ee, guardReactiveProps as te, createSlots as Rt, Fragment as _, renderList as j, mergeProps as Vt, toDisplayString as ke, withDirectives as kt, vShow as Ct, Teleport as jl, resolveDynamicComponent as Wl, createTextVNode as nl, nextTick as ql } from "vue";
2
+ import { o as sl, g as Ut, l as Ql, c as Jl, t as Kl, k as Zl, U as eo, m as ul, j as Ee, a as ge, d as ie, a3 as rl, au as to, X as lo, s as xt, h as oo, a4 as ao, ac as z, a5 as Ce, a6 as A, ar as il, f as no, i as so, a1 as Ht, v as uo, r as ro, y as io, ag as cl, av as co } from "./lib-BwysEpWI.js";
3
+ import { f as vo, b as ho } from "./labelUtils-PMU3ZGCb.js";
4
+ import { t as fo, u as yo } from "./useResponsive-DfdjqQps.js";
5
+ import { u as go, a as Gt } from "./useNestedProp--5lL-kf1.js";
6
+ import { u as po } from "./usePrinter-BJzHDpYF.js";
7
+ import { u as bo, B as mo } from "./BaseScanner-BMpwQAfz.js";
8
+ import { u as wo } from "./useSvgExport-ByUukOZt.js";
9
+ import { u as ko } from "./useThemeCheck-DGJ31Vi5.js";
10
+ import { u as Co } from "./useUserOptionState-BIvW1Kz7.js";
11
+ import { u as xo } from "./useChartAccessibility-9icAAmYg.js";
12
+ import $o from "./img-DKigoPDs.js";
13
+ import { _ as Ao } from "./Shape-DAHhCEdg.js";
14
+ import _o from "./Title-BhURirpm.js";
15
+ import To from "./Legend-D6z73edh.js";
16
+ import { _ as Lo } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
+ function So(tt) {
18
+ const {
19
+ FINAL_CONFIG: lt,
20
+ noGhostDonut: $t,
21
+ svg: Re,
22
+ padding: ot,
23
+ labels_inline_fontSize: At,
24
+ minSize: at,
25
+ findArcMidpoint: _t,
26
+ calcMarkerOffsetX: Tt,
27
+ calcMarkerOffsetY: Lt,
28
+ animatingIndex: St,
29
+ segregated: Mt,
30
+ isSmallArc: Pt
31
+ } = tt;
32
+ return { smallArcLayoutsClassic: g(() => {
33
+ if (lt.value.type !== "classic") return {};
34
+ const Ve = {}, x = $t.value || [];
35
+ if (!x.length) return Ve;
36
+ const D = Re.value.width / 2, L = Re.value.height / 2, Fe = ot.value.top + 16, nt = Re.value.height - ot.value.bottom - 16, Ue = At.value, st = Ue / 3, ut = Ue * 1.5, le = 8, pe = 6, He = D - (at.value + pe), Ge = D + (at.value + pe), rt = !!lt.value.style.chart.layout.curvedMarkers;
37
+ function it({ midX: h, midY: y, bandX: p, bandY: c }) {
38
+ if (!rt)
39
+ return `M ${h} ${y} L ${h} ${c} L ${p} ${c}`;
40
+ const S = p < D ? -1 : 1, V = p - h, M = c - y, ae = Math.sqrt(V * V + M * M) || 1, be = h - D, e = y - L, ne = Math.sqrt(be * be + e * e) || 1, W = be / ne, ce = e / ne, P = ne + 9;
41
+ function me({ x: Be, y: $e }) {
42
+ const K = Be - D, Z = $e - L, Ae = Math.sqrt(K * K + Z * Z) || 1;
43
+ if (Ae >= P) return { x: Be, y: $e };
44
+ const _e = P / Ae;
45
+ return {
46
+ x: D + K * _e,
47
+ y: L + Z * _e
48
+ };
49
+ }
50
+ if (ae < 56) {
51
+ const Be = V / ae;
52
+ let K = -(M / ae), Z = Be;
53
+ const Ae = (h + p) * 0.5, _e = (y + c) * 0.5, gt = Ae + K, Qe = _e + Z, m = (gt - D) * (gt - D) + (Qe - L) * (Qe - L), n = Ae - K, ve = _e - Z;
54
+ (n - D) * (n - D) + (ve - L) * (ve - L) > m && (K = -K, Z = -Z);
55
+ const R = 0.78, H = h + V * R, Dt = y + M * R, O = Math.max(0, Math.min(1, (ae - 18) / 44)), se = O * O * (3 - 2 * O);
56
+ let ue = 2.5 + se * 4, Je = 1 + se * 2.5;
57
+ ue *= 0.9;
58
+ const Xe = {
59
+ x: H + K * ue + W * Je,
60
+ y: Dt + Z * ue + ce * Je
61
+ }, Ke = me(Xe);
62
+ return `M ${h} ${y} Q ${Ke.x} ${Ke.y} ${p} ${c}`;
63
+ }
64
+ let J = ae * 0.34;
65
+ J < 20 && (J = 20), J > 46 && (J = 46);
66
+ let De = ae * 0.46;
67
+ De < 22 && (De = 22), De > 70 && (De = 70);
68
+ const qe = {
69
+ x: h + W * J,
70
+ y: y + ce * J
71
+ }, ht = D + S * Math.max(Math.abs(p - D), P), ft = {
72
+ x: p - S * Math.min(De, Math.abs(ht - p) * 0.75),
73
+ y: c
74
+ }, de = me(qe), yt = me(ft);
75
+ return `M ${h} ${y} C ${de.x} ${de.y} ${yt.x} ${yt.y} ${p} ${c}`;
76
+ }
77
+ function ct(h) {
78
+ const y = String(h ?? "").split(/\n/g), p = Math.max(0, y.length - 1), c = Ue * 1.2, S = p * c;
79
+ return ut + S;
80
+ }
81
+ function dt({ arc: h, index: y }) {
82
+ const { x: p, y: c } = _t(h.path), S = Tt(h).x, V = Lt(h) - 3.5, M = ct(h.name);
83
+ return {
84
+ arc: h,
85
+ index: y,
86
+ midX: p,
87
+ midY: c,
88
+ inlineMarkerX: S,
89
+ inlineMarkerY: V,
90
+ labelHeight: M
91
+ };
92
+ }
93
+ function Ie(h) {
94
+ const { arc: y } = h, p = y.seriesIndex ?? 0;
95
+ return St.value === p || Mt.value.includes(p) ? !1 : Pt(y, p);
96
+ }
97
+ function je(h) {
98
+ const y = h.inlineMarkerY < L, p = h.inlineMarkerX < D;
99
+ return y && p ? "TL" : y && !p ? "TR" : !y && p ? "BL" : "BR";
100
+ }
101
+ function xe(h, y) {
102
+ if (y.startsWith("T")) {
103
+ h.sort((c, S) => c.inlineMarkerY - S.inlineMarkerY || c.index - S.index);
104
+ return;
105
+ }
106
+ h.sort((c, S) => S.inlineMarkerY - c.inlineMarkerY || c.index - S.index);
107
+ }
108
+ function N({ side: h, markerX: y, markerY: p, labelY: c, connectorPath: S }) {
109
+ return {
110
+ side: h,
111
+ labelX: h === "left" ? y - le : y + le,
112
+ labelY: c + st,
113
+ textAnchor: h === "left" ? "end" : "start",
114
+ markerX: y,
115
+ markerY: p,
116
+ connectorPath: S
117
+ };
118
+ }
119
+ function oe({
120
+ candidateList: h,
121
+ side: y,
122
+ bandMarkerX: p,
123
+ startY: c,
124
+ direction: S
125
+ }) {
126
+ let V = c;
127
+ h.forEach((M) => {
128
+ const { index: ae, midX: be, midY: e, labelHeight: ne } = M;
129
+ let W;
130
+ S === "down" ? (W = V, V += ne) : (V -= ne, W = V);
131
+ const ce = W, vt = it({
132
+ midX: be,
133
+ midY: e,
134
+ bandX: p,
135
+ bandY: ce
136
+ });
137
+ Ve[ae] = N({
138
+ side: y,
139
+ markerX: p,
140
+ markerY: ce,
141
+ labelY: W,
142
+ connectorPath: vt
143
+ });
144
+ });
145
+ }
146
+ const We = x.map((h, y) => dt({ arc: h, index: y })).filter(Ie), B = {
147
+ TL: [],
148
+ TR: [],
149
+ BL: [],
150
+ BR: []
151
+ };
152
+ return We.forEach((h) => {
153
+ B[je(h)].push(h);
154
+ }), Object.keys(B).forEach((h) => {
155
+ xe(B[h], h);
156
+ }), oe({
157
+ candidateList: B.TL,
158
+ side: "left",
159
+ bandMarkerX: He,
160
+ startY: Fe,
161
+ direction: "down"
162
+ }), oe({
163
+ candidateList: B.TR,
164
+ side: "right",
165
+ bandMarkerX: Ge,
166
+ startY: Fe,
167
+ direction: "down"
168
+ }), B.BL.length > 1 && oe({
169
+ candidateList: B.BL,
170
+ side: "left",
171
+ bandMarkerX: He,
172
+ startY: nt,
173
+ direction: "up"
174
+ }), B.BR.length > 1 && oe({
175
+ candidateList: B.BR,
176
+ side: "right",
177
+ bandMarkerX: Ge,
178
+ startY: nt,
179
+ direction: "up"
180
+ }), Ve;
181
+ }) };
182
+ }
183
+ const dl = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", layout: { labels: { percentage: { color: "#CCCCCC" }, name: { color: "#CCCCCC" }, hollow: { total: { color: "#CCCCCC", value: { color: "#CCCCCC" } }, average: { color: "#CCCCCC", value: { color: "#CCCCCC" } } } } }, legend: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, title: { color: "#CCCCCC", subtitle: { color: "#757575" } }, tooltip: { backgroundColor: "#1A1A1A", backgroundOpacity: 70, color: "#CCCCCC", borderColor: "#5A5A5A" } } }, table: { th: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, td: { backgroundColor: "#1A1A1A", color: "#CCCCCC" } } }, vl = { style: { chart: { backgroundColor: "#FFF8E1", color: "#424242", layout: { labels: { percentage: { color: "#424242" }, name: { color: "#424242" }, hollow: { total: { color: "#424242", value: { color: "#424242" } }, average: { color: "#424242", value: { color: "#424242" } } } } }, legend: { backgroundColor: "#FFF8E1", color: "#424242" }, title: { color: "#424242", subtitle: { color: "#757575" } }, tooltip: { backgroundColor: "#FFECB3", backgroundOpacity: 30, color: "#424242", borderColor: "#FF8A65" } } }, table: { th: { backgroundColor: "#FFF8E1", color: "#424242" }, td: { backgroundColor: "#FFF8E1", color: "#424242" } } }, hl = { style: { chart: { backgroundColor: "#1E1E1E", color: "#BDBDBD", layout: { labels: { percentage: { color: "#BDBDBD" }, name: { color: "#BDBDBD" }, hollow: { total: { color: "#BDBDBD", value: { color: "#BDBDBD" } }, average: { color: "#BDBDBD", value: { color: "#BDBDBD" } } } } }, legend: { backgroundColor: "#1E1E1E", color: "#BDBDBD" }, title: { color: "#FFF8E1", subtitle: { color: "#BDBDBD" } }, tooltip: { backgroundColor: "#1E1E1E", backgroundOpacity: 30, color: "#FFF8E1", borderColor: "#FF8A65" } } }, table: { th: { backgroundColor: "#1E1E1E", color: "#BDBDBD" }, td: { backgroundColor: "#1E1E1E", color: "#BDBDBD" } } }, fl = { style: { chart: { backgroundColor: "#f6f6fb", color: "#50606C", layout: { labels: { percentage: { color: "#61747E" }, name: { color: "#8A9892" }, hollow: { total: { color: "#8A9892", value: { color: "#61747E" } }, average: { color: "#8A9892", value: { color: "#61747E" } } } } }, legend: { backgroundColor: "#f6f6fb", color: "#61747E" }, title: { color: "#50606C", subtitle: { color: "#718890" } }, tooltip: { backgroundColor: "#f6f6fb", color: "#50606C" } } }, table: { th: { backgroundColor: "#f6f6fb", color: "#50606C" }, td: { backgroundColor: "#f6f6fb", color: "#50606C" } } }, yl = { style: { chart: { backgroundColor: "#1A1A1A", color: "#99AA99", layout: { labels: { percentage: { color: "#AACCAA" }, name: { color: "#99CC99" }, hollow: { total: { color: "#99CC99", value: { color: "#AACCAA" } }, average: { color: "#99CC99", value: { color: "#AACCAA" } } } } }, legend: { backgroundColor: "#1A1A1A", color: "#99AA99" }, title: { color: "#66CC66", subtitle: { color: "#99AA99" } }, tooltip: { backgroundColor: "#2A2F2A", color: "#AACCAA", borderColor: "#66CC66" } } }, table: { th: { backgroundColor: "#1A1A1A", color: "#99AA99" }, td: { backgroundColor: "#1A1A1A", color: "#AACCAA" } } }, gl = { style: { chart: { backgroundColor: "#fbfafa", color: "#8A9892", layout: { labels: { percentage: { color: "#A0AC94" }, name: { color: "#8A9892" }, hollow: { total: { color: "#8A9892", value: { color: "#A0AC94" } }, average: { color: "#8A9892", value: { color: "#A0AC94" } } } } }, legend: { backgroundColor: "#fbfafa", color: "#99AA99" }, title: { color: "#8A9892", subtitle: { color: "#99AA99" } }, tooltip: { backgroundColor: "#fbfafa", color: "#8A9892" } } }, table: { th: { backgroundColor: "#fbfafa", color: "#8F837A" }, td: { backgroundColor: "#fbfafa", color: "#8F837A" } } }, pl = {
184
+ default: {},
185
+ dark: dl,
186
+ celebration: vl,
187
+ celebrationNight: hl,
188
+ concrete: fl,
189
+ hack: yl,
190
+ zen: gl
191
+ }, vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
192
+ __proto__: null,
193
+ celebration: vl,
194
+ celebrationNight: hl,
195
+ concrete: fl,
196
+ dark: dl,
197
+ default: pl,
198
+ hack: yl,
199
+ zen: gl
200
+ }, Symbol.toStringTag, { value: "Module" })), Mo = ["id"], Po = ["id"], Fo = ["xmlns", "viewBox"], Io = ["width", "height"], Do = { key: 1 }, Bo = ["id"], zo = ["stop-color"], Oo = ["offset", "stop-color"], Yo = ["offset", "stop-color"], Eo = ["stop-color"], Xo = { key: 2 }, No = ["id", "cx", "cy"], Ro = ["stop-color", "stop-opacity"], Vo = ["stop-color"], Uo = ["id"], Ho = ["id"], Go = ["id"], jo = ["flood-color"], Wo = ["id"], qo = ["flood-color"], Qo = ["d", "stroke", "filter"], Jo = ["d", "stroke", "filter"], Ko = ["cx", "cy", "r", "fill", "filter"], Zo = { key: 6 }, ea = ["stroke", "d"], ta = ["d", "fill", "stroke", "stroke-width", "filter"], la = { key: 0 }, oa = ["d", "fill", "stroke", "stroke-width", "filter"], aa = { key: 0 }, na = ["stroke", "d"], sa = { key: 0 }, ua = ["d", "stroke", "stroke-width", "filter"], ra = { key: 1 }, ia = ["d", "fill", "stroke", "stroke-width", "filter"], ca = ["d", "fill", "stroke", "stroke-width", "filter"], da = { key: 1 }, va = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], ha = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], fa = { key: 0 }, ya = ["d", "fill", "stroke", "stroke-width"], ga = ["cx", "cy", "r", "stroke"], pa = ["cx", "cy", "r", "fill"], ba = ["cx", "cy", "r"], ma = { key: 0 }, wa = ["d", "stroke", "fill", "onMouseenter", "onMouseleave", "onClick"], ka = { key: 1 }, Ca = ["cx", "cy", "r"], xa = ["x", "y", "fill", "font-size"], $a = ["x", "y", "fill", "font-size"], Aa = ["x", "y", "fill", "font-size"], _a = ["x", "y", "fill", "font-size"], Ta = ["filter", "opacity"], La = { key: 0 }, Sa = ["x", "y"], Ma = { key: 1 }, Pa = ["cx", "cy", "fill", "stroke", "filter", "onClick", "onMouseenter", "onMouseleave"], Fa = ["text-anchor", "x", "y", "onClick", "onMouseenter", "onMouseleave", "innerHTML"], Ia = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave"], Da = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave", "innerHTML"], Ba = ["cx", "cy", "fill", "stroke", "filter", "onClick", "onMouseenter", "onMouseleave"], za = ["text-anchor", "x", "y", "onClick", "onMouseenter", "onMouseleave", "innerHTML"], Oa = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave"], Ya = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave", "innerHTML"], Ea = { key: 2 }, Xa = ["x", "y", "width"], Na = ["x", "y", "width"], Ra = {
201
+ key: 4,
202
+ class: "vue-data-ui-watermark"
203
+ }, Va = ["id"], Ua = ["onClick"], Ha = {
204
+ key: 7,
205
+ class: "vue-ui-donut-hollow"
206
+ }, Ga = ["innerHTML"], ja = {
207
+ __name: "vue-ui-donut",
208
+ props: {
209
+ config: {
210
+ type: Object,
211
+ default() {
212
+ return {};
213
+ }
214
+ },
215
+ dataset: {
216
+ type: Array,
217
+ default() {
218
+ return [];
219
+ }
220
+ }
221
+ },
222
+ emits: ["selectLegend", "selectDatapoint"],
223
+ setup(tt, { expose: lt, emit: $t }) {
224
+ const Re = Se(() => import("./Tooltip-TDyKgLB6.js")), ot = Se(() => import("./BaseIcon-4i3dd7Ty.js")), At = Se(() => import("./vue-ui-accordion-tQNKwbVi.js")), at = Se(() => import("./DataTable-WrXCJkfE.js")), _t = Se(() => import("./PenAndPaper-DxIUvoQ8.js")), Tt = Se(() => import("./UserOptions-CzJWRC4s.js")), Lt = Se(() => import("./PackageVersion-D3cMhAlf.js")), St = Se(() => import("./BaseDraggableDialog-CAJxIF6g.js")), { vue_ui_donut: Mt } = go(), { isThemeValid: Pt, warnInvalidTheme: jt } = ko(), Ve = Hl(), x = tt, D = g({
225
+ get() {
226
+ return !!x.dataset && x.dataset.length;
227
+ },
228
+ set(l) {
229
+ return l;
230
+ }
231
+ }), L = Me(null), Fe = k(null), nt = k(null), Ue = k(null), st = Me(null), ut = Me(null), le = Me(null), pe = Me(null), He = Me(null), Ge = Me(null), rt = k(0), it = k(0), ct = k(0), dt = k(!1), Ie = k(null), je = k(null), xe = g({
232
+ get: () => e.value.style.chart.layout.labels.percentage.fontSize,
233
+ set: (l) => l
234
+ }), N = g({
235
+ get: () => e.value.style.chart.layout.labels.name.fontSize,
236
+ set: (l) => l
237
+ }), oe = g({
238
+ get: () => e.value.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,
239
+ set: (l) => l
240
+ });
241
+ let We = !1;
242
+ const B = () => {
243
+ !e.value.autoSize || We || (We = !0, requestAnimationFrame(() => {
244
+ We = !1;
245
+ const l = e.value, a = Fe.value, t = de.value;
246
+ if (!l.autoSize || !a || !t) return;
247
+ const [o, r, d, $] = t.getAttribute("viewBox").split(" ").map(Number), T = { x: o, y: r, width: d, height: $ }, E = [
248
+ {
249
+ selector: ".vue-data-ui-datalabel-value",
250
+ baseSize: l.style.chart.layout.labels.percentage.fontSize,
251
+ minSize: l.style.chart.layout.labels.percentage.minFontSize,
252
+ sizeRef: xe
253
+ },
254
+ {
255
+ selector: ".vue-data-ui-datalabel-name",
256
+ baseSize: l.style.chart.layout.labels.name.fontSize,
257
+ minSize: l.style.chart.layout.labels.name.minFontSize,
258
+ sizeRef: N
259
+ },
260
+ {
261
+ selector: ".vue-data-ui-datalabel-inline",
262
+ baseSize: l.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,
263
+ minSize: l.style.chart.layout.labels.name.minFontSize,
264
+ sizeRef: oe
265
+ }
266
+ ];
267
+ E.map((G) => a.querySelectorAll(G.selector).length).reduce((G, Ye) => G + Ye, 0) !== 0 && E.forEach(({ selector: G, baseSize: Ye, minSize: Nl, sizeRef: Rl }) => {
268
+ a.querySelectorAll(G).forEach((Vl) => {
269
+ const Ul = no({
270
+ el: Vl,
271
+ bounds: T,
272
+ currentFontSize: Ye,
273
+ minFontSize: Nl,
274
+ attempts: 200,
275
+ padding: 1
276
+ });
277
+ Rl.value = Ul;
278
+ });
279
+ });
280
+ }));
281
+ };
282
+ ol(async () => {
283
+ dt.value = !0, p(), requestAnimationFrame(B);
284
+ });
285
+ let h;
286
+ ol(() => {
287
+ L.value && (h = new ResizeObserver((l) => {
288
+ for (const a of l) {
289
+ const { width: t, height: o } = a.contentRect;
290
+ if (t > 0 && o > 0) {
291
+ B();
292
+ break;
293
+ }
294
+ }
295
+ }), h.observe(L.value.parentElement));
296
+ }), al(() => {
297
+ h?.disconnect();
298
+ }), al(() => {
299
+ le.value && (pe.value && le.value.unobserve(pe.value), le.value.disconnect());
300
+ });
301
+ const y = g(() => !!e.value.debug);
302
+ function p() {
303
+ if (sl(x.dataset) ? (Ut({
304
+ componentName: "VueUiDonut",
305
+ type: "dataset",
306
+ debug: y.value
307
+ }), D.value = !1, ce.value = !0) : (x.dataset.forEach((l, a) => {
308
+ Ql({
309
+ datasetObject: l,
310
+ requiredAttributes: ["name", "values"]
311
+ }).forEach((t) => {
312
+ Ut({
313
+ componentName: "VueUiDonut",
314
+ type: "datasetSerieAttribute",
315
+ property: t,
316
+ index: a,
317
+ debug: y.value
318
+ }), D.value = !1, ce.value = !0;
319
+ });
320
+ }), x.dataset.forEach((l, a) => {
321
+ (!l.name || l.name === "") && Ut({
322
+ componentName: "VueUiDonut",
323
+ type: "datasetAttributeEmpty",
324
+ property: "name",
325
+ index: a,
326
+ debug: y.value
327
+ });
328
+ })), sl(x.dataset) || (ce.value = e.value.loading), e.value.responsive) {
329
+ const l = fo(() => {
330
+ const { width: a, height: t } = yo({
331
+ chart: L.value,
332
+ title: e.value.style.chart.title.text ? st.value : null,
333
+ legend: e.value.style.chart.legend.show ? ut.value : null,
334
+ source: He.value,
335
+ noTitle: Ge.value,
336
+ padding: e.value.autoSize ? void 0 : $e.value
337
+ });
338
+ requestAnimationFrame(() => {
339
+ n.value.width = a, n.value.height = t, B();
340
+ });
341
+ });
342
+ le.value && (pe.value && le.value.unobserve(pe.value), le.value.disconnect()), le.value = new ResizeObserver(l), pe.value = L.value.parentNode, le.value.observe(pe.value);
343
+ }
344
+ }
345
+ const c = k(Jl()), S = k(!1), V = k(""), M = k(null), ae = k(0);
346
+ function be() {
347
+ const l = Gt({
348
+ userConfig: x.config,
349
+ defaultConfig: Mt
350
+ });
351
+ let a = {};
352
+ const t = l.theme;
353
+ if (!t)
354
+ a = l;
355
+ else if (!Pt.value(l))
356
+ jt(l), a = l;
357
+ else {
358
+ const o = Gt({
359
+ userConfig: pl[t] || x.config,
360
+ defaultConfig: l
361
+ });
362
+ a = {
363
+ ...Gt({
364
+ userConfig: x.config,
365
+ defaultConfig: o
366
+ }),
367
+ customPalette: l.customPalette.length ? l.customPalette : so[t] || Ee
368
+ };
369
+ }
370
+ return x.config && Ht(x.config, "events.datapointEnter") ? a.events.datapointEnter = x.config.events.datapointEnter : a.events.datapointEnter = null, x.config && Ht(x.config, "events.datapointLeave") ? a.events.datapointLeave = x.config.events.datapointLeave : a.events.datapointLeave = null, x.config && Ht(x.config, "events.datapointClick") ? a.events.datapointClick = x.config.events.datapointClick : a.events.datapointClick = null, a;
371
+ }
372
+ const e = k(be()), { loading: ne, FINAL_DATASET: W, manualLoading: ce, skeletonDataset: vt } = bo({
373
+ ...Gl(x),
374
+ FINAL_CONFIG: e,
375
+ prepareConfig: be,
376
+ skeletonDataset: [
377
+ {
378
+ name: "",
379
+ values: [3],
380
+ color: "#BABABA"
381
+ },
382
+ {
383
+ name: "",
384
+ values: [2],
385
+ color: "#AAAAAA"
386
+ },
387
+ {
388
+ name: "",
389
+ values: [1],
390
+ color: "#CACACA"
391
+ }
392
+ ],
393
+ skeletonConfig: Kl({
394
+ defaultConfig: e.value,
395
+ userConfig: {
396
+ useCssAnimation: !1,
397
+ table: { show: !1 },
398
+ startAnimation: {
399
+ show: !1
400
+ },
401
+ userOptions: { show: !1 },
402
+ style: {
403
+ chart: {
404
+ backgroundColor: "#99999930",
405
+ layout: {
406
+ labels: {
407
+ dataLabels: { show: !1 },
408
+ hollow: {
409
+ average: { show: !1 },
410
+ total: { show: !1 }
411
+ },
412
+ value: { show: !1 }
413
+ }
414
+ },
415
+ legend: {
416
+ backgroundColor: "transparent",
417
+ showValue: !1,
418
+ showPercentage: !1
419
+ },
420
+ title: {
421
+ color: "#1A1A1A",
422
+ subtitle: {
423
+ color: "#5A5A5A"
424
+ }
425
+ }
426
+ }
427
+ }
428
+ }
429
+ })
430
+ }), P = k(!0), me = k(0), Ft = k(!1);
431
+ let J = null;
432
+ function De(l = 1e3) {
433
+ return new Promise((a) => {
434
+ const t = performance.now();
435
+ function o(r) {
436
+ const d = r - t, $ = Math.min(
437
+ d / l,
438
+ 1
439
+ ), T = cl($);
440
+ me.value = T, $ < 1 ? J = requestAnimationFrame(o) : (me.value = 1, J = null, a());
441
+ }
442
+ J !== null && cancelAnimationFrame(J), me.value = 0, J = requestAnimationFrame(o);
443
+ });
444
+ }
445
+ Ne(
446
+ () => ne.value,
447
+ async (l) => {
448
+ if (l || Ft.value)
449
+ return;
450
+ const a = W.value === vt, t = e.value.startAnimation?.show;
451
+ if (!a && t) {
452
+ Ft.value = !0;
453
+ const o = e.value.startAnimation.durationMs || 1e3;
454
+ await De(o);
455
+ } else
456
+ me.value = 1;
457
+ P.value = !1;
458
+ },
459
+ { immediate: !0 }
460
+ );
461
+ const { userOptionsVisible: qe, setUserOptionsVisibility: ht, keepUserOptionState: ft } = Co({ config: e.value }), { svgRef: de } = xo({ config: e.value.style.chart.title });
462
+ function yt() {
463
+ ht(!0);
464
+ }
465
+ function Be() {
466
+ ht(!1);
467
+ }
468
+ Ne(() => x.config, (l) => {
469
+ ne.value || (e.value = be()), qe.value = !e.value.userOptions.showOnChartHover, p(), rt.value += 1, it.value += 1, ct.value += 1, m.value.dataLabels.show = e.value.style.chart.layout.labels.dataLabels.show, m.value.showTable = e.value.table.show, m.value.showTooltip = e.value.style.chart.tooltip.show, n.value.height = e.value.style.chart.height, n.value.width = e.value.style.chart.width;
470
+ }, { deep: !0 });
471
+ const $e = g(() => {
472
+ const { top: l, right: a, bottom: t, left: o } = e.value.style.chart.padding;
473
+ return {
474
+ css: `padding:${l}px ${a}px ${t}px ${o}px`,
475
+ top: l,
476
+ right: a,
477
+ bottom: t,
478
+ left: o
479
+ };
480
+ }), { isPrinting: K, isImaging: Z, generatePdf: Ae, generateImage: _e } = po({
481
+ elementId: `donut__${c.value}`,
482
+ fileName: e.value.style.chart.title.text || "vue-ui-donut",
483
+ options: e.value.userOptions.print
484
+ }), gt = g(() => e.value.userOptions.show && !e.value.style.chart.title.text), Qe = g(() => Zl(e.value.customPalette)), m = k({
485
+ dataLabels: {
486
+ show: e.value.style.chart.layout.labels.dataLabels.show
487
+ },
488
+ showTable: e.value.table.show,
489
+ showTooltip: e.value.style.chart.tooltip.show
490
+ });
491
+ Ne(e, () => {
492
+ m.value = {
493
+ dataLabels: {
494
+ show: e.value.style.chart.layout.labels.dataLabels.show
495
+ },
496
+ showTable: e.value.table.show,
497
+ showTooltip: e.value.style.chart.tooltip.show
498
+ };
499
+ }, { immediate: !0 });
500
+ const n = k({
501
+ height: e.value.style.chart.height,
502
+ width: e.value.style.chart.width
503
+ }), ve = g(() => {
504
+ if (e.value.pie)
505
+ return F.value;
506
+ const l = e.value.style.chart.layout.donut.strokeWidth / 512, a = Math.min(n.value.width, n.value.height) * l, t = a > F.value ? F.value : a;
507
+ return Math.max(t, 12 * (1 + l));
508
+ }), It = $t, R = g(() => W.value.sort((l, a) => {
509
+ const t = Array.isArray(l.values) ? l.values.reduce((r, d) => r + d, 0) : l.value ?? 0, o = Array.isArray(a.values) ? a.values.reduce((r, d) => r + d, 0) : a.value ?? 0;
510
+ return l.ghost && !a.ghost ? 1 : a.ghost && !l.ghost ? -1 : o - t;
511
+ }).map((l, a) => ({
512
+ name: l.name,
513
+ color: ul(l.color) || Qe.value[a] || Ee[a] || Ee[a % Ee.length],
514
+ value: eo(l.values.reduce((t, o) => t + o, 0)),
515
+ absoluteValues: l.values,
516
+ comment: l.comment || "",
517
+ patternIndex: a,
518
+ seriesIndex: a,
519
+ ghost: !1,
520
+ pattern: `pattern_${c.value}_${a}`
521
+ })));
522
+ Ne(() => x.dataset, (l) => {
523
+ Array.isArray(l) && l.length > 0 && (ce.value = !1);
524
+ }, { immediate: !0 });
525
+ const H = Me(R.value);
526
+ Ne(() => R.value, (l) => {
527
+ H.value = l, requestAnimationFrame(B);
528
+ });
529
+ function Dt() {
530
+ return R.value.map((l) => ({
531
+ name: l.name,
532
+ color: l.color,
533
+ value: l.value
534
+ }));
535
+ }
536
+ const O = k([]), se = k(!1), ue = k(null);
537
+ function Je({ from: l, to: a, duration: t, onUpdate: o, onDone: r, easing: d = cl }) {
538
+ const $ = performance.now();
539
+ function T(E) {
540
+ const X = Math.min((E - $) / t, 1), G = d(X), Ye = l + (a - l) * G;
541
+ o(Ye, X), X < 1 ? requestAnimationFrame(T) : (o(a, 1), r && r());
542
+ }
543
+ requestAnimationFrame(T);
544
+ }
545
+ function Xe(l) {
546
+ const a = R.value.find((r, d) => d === l);
547
+ let o = H.value.find((r, d) => d === l).value;
548
+ if (O.value.includes(l)) {
549
+ let d = function() {
550
+ H.value = H.value.map(
551
+ (T, E) => l === E ? { ...T, value: r } : T
552
+ );
553
+ }, $ = function() {
554
+ se.value = !0, ue.value = l, Je({
555
+ from: o,
556
+ to: r,
557
+ duration: e.value.serieToggleAnimation.durationMs,
558
+ onUpdate: (T, E) => {
559
+ H.value = H.value.map(
560
+ (X, G) => l === G ? { ...X, value: T } : X
561
+ ), requestAnimationFrame(B);
562
+ },
563
+ onDone: () => {
564
+ d(), se.value = !1, ue.value = null;
565
+ }
566
+ });
567
+ };
568
+ O.value = O.value.filter((T) => T !== l);
569
+ const r = a.value;
570
+ e.value.serieToggleAnimation.show && e.value.type === "classic" ? $() : (d(), requestAnimationFrame(B));
571
+ } else if (O.value.length < R.value.length - 1) {
572
+ let r = function() {
573
+ O.value.push(l), H.value = H.value.map(
574
+ ($, T) => l === T ? { ...$, value: 0 } : $
575
+ );
576
+ }, d = function() {
577
+ se.value = !0, ue.value = l, Je({
578
+ from: o,
579
+ to: 0,
580
+ duration: e.value.serieToggleAnimation.durationMs,
581
+ onUpdate: ($, T) => {
582
+ H.value = H.value.map(
583
+ (E, X) => l === X ? { ...E, value: $ } : E
584
+ ), requestAnimationFrame(B);
585
+ },
586
+ onDone: () => {
587
+ r(), requestAnimationFrame(B), se.value = !1, ue.value = null;
588
+ }
589
+ });
590
+ };
591
+ e.value.serieToggleAnimation.show && e.value.type === "classic" ? d() : r();
592
+ }
593
+ It("selectLegend", we.value.map((r) => ({
594
+ name: r.name,
595
+ color: r.color,
596
+ value: r.value
597
+ })));
598
+ }
599
+ function Ke(l) {
600
+ if (!R.value.length)
601
+ return e.value.debug && console.warn("VueUiDonut - There are no series to show."), null;
602
+ const a = R.value.find((t) => t.name === l);
603
+ return a || (e.value.debug && console.warn(`VueUiDonut - Series name not found "${l}"`), null);
604
+ }
605
+ function bl(l) {
606
+ const a = Ke(l);
607
+ a !== null && O.value.includes(a.seriesIndex) && Xe(a.seriesIndex);
608
+ }
609
+ function ml(l) {
610
+ const a = Ke(l);
611
+ a !== null && (O.value.includes(a.seriesIndex) || Xe(a.seriesIndex));
612
+ }
613
+ const wl = g(
614
+ () => W.value.reduce(
615
+ (l, a) => l + a.values.reduce((t, o) => t + o, 0),
616
+ 0
617
+ )
618
+ ), we = g(() => {
619
+ if (P.value && !ne.value) {
620
+ const l = me.value, a = R.value.map((o) => ({
621
+ ...o,
622
+ value: o.value * l,
623
+ color: o.color,
624
+ ghost: !1
625
+ })), t = wl.value * (1 - l);
626
+ return t > 0 && a.push({
627
+ name: "__ghost__",
628
+ value: t,
629
+ color: "transparent",
630
+ ghost: !0
631
+ }), a;
632
+ } else
633
+ return H.value.forEach((l) => {
634
+ if ([null, void 0].includes(l.values))
635
+ return {
636
+ ...l,
637
+ values: []
638
+ };
639
+ }), H.value.map((l, a) => ({
640
+ ...l,
641
+ seriesIndex: a
642
+ })).filter((l, a) => !O.value.includes(a));
643
+ }), Bt = g(() => W.value.map((l, a) => {
644
+ const t = (l.values || []).reduce((r, d) => r + d, 0), o = t / W.value.map((r) => (r.values || []).reduce((d, $) => d + $, 0)).reduce((r, d) => r + d, 0);
645
+ return {
646
+ name: l.name,
647
+ color: ul(l.color) || Qe.value[a] || Ee[a] || Ee[a % Ee.length],
648
+ value: t,
649
+ shape: "circle",
650
+ patternIndex: a,
651
+ proportion: o
652
+ };
653
+ }).map((l, a) => {
654
+ const t = ge(e.value.style.chart.layout.labels.value.formatter, l.value, ie({
655
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
656
+ v: l.value,
657
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
658
+ r: e.value.style.chart.legend.roundingValue
659
+ }), { datapoint: l, index: a }), o = ge(e.value.style.chart.layout.labels.percentage.formatter, qt(l), ie({
660
+ v: qt(l),
661
+ s: "%",
662
+ r: e.value.style.chart.legend.roundingPercentage
663
+ })), r = Et({
664
+ val: t,
665
+ percentage: O.value.includes(a) ? `${Fl(l.proportion * 100)}%` : o,
666
+ showVal: e.value.style.chart.legend.showValue,
667
+ showPercentage: e.value.style.chart.legend.showPercentage
668
+ });
669
+ return {
670
+ ...l,
671
+ opacity: O.value.includes(a) ? 0.5 : 1,
672
+ segregate: () => !se.value && Xe(a),
673
+ isSegregated: O.value.includes(a),
674
+ display: `${l.name}${e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ": " : ""}${r}`
675
+ };
676
+ })), kl = g(() => ({
677
+ cy: "donut-div-legend",
678
+ backgroundColor: e.value.style.chart.legend.backgroundColor,
679
+ color: e.value.style.chart.legend.color,
680
+ fontSize: e.value.style.chart.legend.fontSize,
681
+ paddingBottom: 12,
682
+ fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
683
+ })), F = g(() => {
684
+ const l = e.value.style.chart.layout.donut.radiusRatio, a = Math.max(0.1, Math.min(0.50001, l)), t = Math.min(n.value.width * a, n.value.height * a);
685
+ return Math.max(12, t);
686
+ }), U = g(() => rl({ series: we.value }, n.value.width / 2, n.value.height / 2, F.value, F.value, 1.99999, 2, 1, 360, 105.25, ve.value)), Cl = g(() => Math.abs(we.value.map((l) => l.value).reduce((l, a) => l + a, 0)) > 0), xl = g(() => rl({
687
+ series: [
688
+ {
689
+ value: 1,
690
+ color: e.value.style.chart.layout.donut.emptyFill,
691
+ name: "_",
692
+ seriesIndex: 0,
693
+ patternIndex: -1,
694
+ ghost: !1,
695
+ absoluteValues: [1]
696
+ }
697
+ ]
698
+ }, n.value.width / 2, n.value.height / 2, F.value, F.value, 1.99999, 2, 1, 360, 105.25, ve.value)), re = g(() => U.value.filter((l) => !l.ghost)), v = g(() => {
699
+ const l = Math.max(...we.value.map((t) => t.value)), a = we.value.map((t) => t.value / l);
700
+ return to({
701
+ series: a,
702
+ center: {
703
+ x: n.value.width / 2,
704
+ y: n.value.height / 2
705
+ },
706
+ maxRadius: Math.min(n.value.width, n.value.height) / 3,
707
+ hasGhost: P.value
708
+ });
709
+ });
710
+ function Te(l) {
711
+ return l.x > n.value.width / 2 + 6 ? "start" : l.x < n.value.width / 2 - 6 ? "end" : "middle";
712
+ }
713
+ function $l(l) {
714
+ return l.middlePoint.y > n.value.height / 2 ? z({ initX: l.middlePoint.x, initY: l.middlePoint.y, offset: 100, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y : z({ initX: l.middlePoint.x, initY: l.middlePoint.y, offset: 0, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y - 100;
715
+ }
716
+ function q(l) {
717
+ return l.proportion * 100 > e.value.style.chart.layout.labels.dataLabels.hideUnderValue;
718
+ }
719
+ function Al(l, a) {
720
+ const t = e.value.style.chart.layout.labels.dataLabels.hideUnderValue, o = e.value.style.chart.layout.labels.dataLabels.smallArcClusterThreshold, d = (Tl.value[a] ?? l.proportion ?? 0) * 100;
721
+ return d > t && d <= o;
722
+ }
723
+ const { smallArcLayoutsClassic: Y } = So({
724
+ FINAL_CONFIG: e,
725
+ noGhostDonut: re,
726
+ svg: n,
727
+ padding: $e,
728
+ labels_inline_fontSize: oe,
729
+ minSize: F,
730
+ findArcMidpoint: co,
731
+ calcMarkerOffsetX: A,
732
+ calcMarkerOffsetY: Ce,
733
+ animatingIndex: ue,
734
+ segregated: O,
735
+ isSmallArc: Al
736
+ });
737
+ function Wt(l, a) {
738
+ const t = l.value / _l(a);
739
+ return isNaN(t) ? 0 : ge(
740
+ e.value.style.chart.layout.labels.percentage.formatter,
741
+ t * 100,
742
+ ie({
743
+ v: t * 100,
744
+ s: "%",
745
+ r: e.value.style.chart.layout.labels.percentage.rounding
746
+ }),
747
+ { datapoint: l }
748
+ );
749
+ }
750
+ function _l(l) {
751
+ return [...l].map((a) => a.value).reduce((a, t) => a + t, 0);
752
+ }
753
+ const Q = g(() => we.value.map((l) => l.value).reduce((l, a) => l + a, 0)), Tl = g(() => {
754
+ const l = R.value.reduce((a, t) => a + t.value, 0);
755
+ return l <= 0 ? [] : R.value.map((a) => a.value / l);
756
+ }), zt = g(() => Q.value / we.value.length);
757
+ function qt(l) {
758
+ return se.value ? l.proportion * 100 : l.value / Q.value * 100;
759
+ }
760
+ const Ot = k(null), Ze = k(!1);
761
+ function he({ datapoint: l, seriesIndex: a }) {
762
+ e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: l, seriesIndex: a }), S.value = !1, M.value = null;
763
+ }
764
+ function fe({ datapoint: l, relativeIndex: a, seriesIndex: t, show: o = !1 }) {
765
+ e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: l, seriesIndex: t }), Ot.value = { datapoint: l, seriesIndex: t, config: e.value, series: R.value }, S.value = o, M.value = a;
766
+ let r = "";
767
+ const d = e.value.style.chart.tooltip.customFormat;
768
+ if (Ze.value = !1, io(d))
769
+ try {
770
+ const $ = d({
771
+ seriesIndex: t,
772
+ datapoint: l,
773
+ series: R.value,
774
+ config: e.value
775
+ });
776
+ typeof $ == "string" && (V.value = $, Ze.value = !0);
777
+ } catch {
778
+ console.warn("Custom format cannot be applied."), Ze.value = !1;
779
+ }
780
+ Ze.value || (r += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`, r += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${l.color}"/>${Ve.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${c.value}_${t})"/>` : ""}</svg>`, r += `<b>${Et({
781
+ showVal: e.value.style.chart.tooltip.showValue,
782
+ showPercentage: e.value.style.chart.tooltip.showPercentage,
783
+ val: `<span>${ge(
784
+ e.value.style.chart.layout.labels.value.formatter,
785
+ l.value,
786
+ ie({
787
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
788
+ v: l.value,
789
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
790
+ r: e.value.style.chart.tooltip.roundingValue
791
+ }),
792
+ {
793
+ datapoint: l,
794
+ relativeIndex: a,
795
+ seriesIndex: t
796
+ }
797
+ )}</span>`,
798
+ percentage: ge(
799
+ e.value.style.chart.layout.labels.percentage.formatter,
800
+ l.proportion * 100,
801
+ ie({
802
+ v: l.proportion * 100,
803
+ s: "%",
804
+ r: e.value.style.chart.tooltip.roundingPercentage
805
+ }),
806
+ {
807
+ datapoint: l,
808
+ relativeIndex: a,
809
+ seriesIndex: t
810
+ }
811
+ )
812
+ })}</b></div>`, e.value.style.chart.comments.showInTooltip && l.comment && (r += `<div class="vue-data-ui-tooltip-comment" style="background:${l.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${l.color}">${l.comment}</div>`), V.value = `<div>${r}</div>`);
813
+ }
814
+ function Ll(l, a) {
815
+ const t = Y.value[a];
816
+ if (t)
817
+ return {
818
+ textAnchor: t.textAnchor,
819
+ x: t.labelX,
820
+ y: t.labelY
821
+ };
822
+ const o = A(l, !0, 12);
823
+ return {
824
+ textAnchor: o.anchor,
825
+ x: o.x,
826
+ y: Ce(l)
827
+ };
828
+ }
829
+ function Sl(l, a, t) {
830
+ const { textAnchor: o, x: r } = Ll(l, a), d = bt(l), $ = `
831
+ <tspan
832
+ class="vue-data-ui-datalabel-inline"
833
+ fill="${e.value.style.chart.layout.labels.percentage.color}"
834
+ font-size="${t ? oe.value : xe.value}px"
835
+ style="font-weight:${e.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}"
836
+ >${d}</tspan>
837
+ `, T = String(l.name ?? "").split(/\n/g);
838
+ let E = "";
839
+ return T.forEach((X, G) => {
840
+ G === 0 ? E += `
841
+ <tspan
842
+ class="${t ? "vue-data-ui-datalabel-inline" : "vue-data-ui-datalabel-name"}"
843
+ fill="${e.value.style.chart.layout.labels.name.color}"
844
+ font-size="${t ? oe.value : N.value}px"
845
+ style="font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : ""}"
846
+ >${X}</tspan>
847
+ ` : E += `
848
+ <tspan
849
+ class="${t ? "vue-data-ui-datalabel-inline" : "vue-data-ui-datalabel-name"}"
850
+ x="${r}"
851
+ dy="${(t ? oe.value : N.value) * 1.2}"
852
+ fill="${e.value.style.chart.layout.labels.name.color}"
853
+ font-size="${t ? oe.value : N.value}px"
854
+ style="font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : ""}"
855
+ >${X}</tspan>
856
+ `;
857
+ }), o === "end" ? `${E}${$}` : `${$}${E}`;
858
+ }
859
+ function Ml(l, a) {
860
+ const t = v.value[a].middlePoint, o = Te(t), r = z({
861
+ initX: t.x,
862
+ initY: t.y,
863
+ offset: 42,
864
+ centerX: n.value.width / 2,
865
+ centerY: n.value.height / 2
866
+ }), d = r.x;
867
+ r.y;
868
+ const $ = bt(l), T = `
869
+ <tspan
870
+ class="vue-data-ui-datalabel-value"
871
+ fill="${e.value.style.chart.layout.labels.percentage.color}"
872
+ font-size="${xe.value}px"
873
+ style="font-weight:${e.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"}"
874
+ >${$}</tspan>
875
+ `, E = String(l.name ?? "").split(/\n/g);
876
+ let X = "";
877
+ return E.forEach((G, Ye) => {
878
+ Ye === 0 ? X += `
879
+ <tspan
880
+ class="vue-data-ui-datalabel-name"
881
+ fill="${e.value.style.chart.layout.labels.name.color}"
882
+ font-size="${N.value}px"
883
+ style="font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : "normal"}"
884
+ >${G}</tspan>
885
+ ` : X += `
886
+ <tspan
887
+ class="vue-data-ui-datalabel-name"
888
+ x="${d}"
889
+ dy="${N.value * 1.2}"
890
+ fill="${e.value.style.chart.layout.labels.name.color}"
891
+ font-size="${N.value}px"
892
+ style="font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : "normal"}"
893
+ >${G}</tspan>
894
+ `;
895
+ }), o === "end" ? `${X}${T}` : `${T}${X}`;
896
+ }
897
+ function ze(l) {
898
+ return e.value.useBlurOnHover && ![null, void 0].includes(M.value) && M.value !== l ? `url(#blur_${c.value})` : "";
899
+ }
900
+ function Pl(l) {
901
+ if (!se.value || ue.value === null || l.seriesIndex !== ue.value)
902
+ return 1;
903
+ const a = (l.proportion ?? 0) * 100, t = e.value.style.chart.layout.labels.dataLabels.hideUnderValue, r = e.value.style.chart.layout.labels.dataLabels.smallArcClusterThreshold + 2, d = t;
904
+ return a >= r ? 1 : a <= d ? 0 : (a - d) / (r - d);
905
+ }
906
+ const Le = g(() => {
907
+ const l = we.value.map((t) => ({
908
+ name: t.name,
909
+ color: t.color
910
+ })), a = we.value.map((t) => t.value);
911
+ return { head: l, body: a };
912
+ });
913
+ function Yt(l = null) {
914
+ ql(() => {
915
+ const a = Le.value.head.map((r, d) => [[
916
+ r.name
917
+ ], [Le.value.body[d]], [isNaN(Le.value.body[d] / Q.value) ? "-" : Le.value.body[d] / Q.value * 100]]), t = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(a), o = uo(t);
918
+ l ? l(o) : ro({ csvContent: o, title: e.value.style.chart.title.text || "vue-ui-donut" });
919
+ });
920
+ }
921
+ const pt = g(() => {
922
+ const l = [
923
+ ' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',
924
+ ie({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: Q.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
925
+ "100%"
926
+ ], a = Le.value.head.map((r, d) => [
927
+ {
928
+ color: r.color,
929
+ name: r.name || "-"
930
+ },
931
+ Le.value.body[d],
932
+ isNaN(Le.value.body[d] / Q.value) ? "-" : (Le.value.body[d] / Q.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
933
+ ]), t = {
934
+ th: {
935
+ backgroundColor: e.value.table.th.backgroundColor,
936
+ color: e.value.table.th.color,
937
+ outline: e.value.table.th.outline
938
+ },
939
+ td: {
940
+ backgroundColor: e.value.table.td.backgroundColor,
941
+ color: e.value.table.td.color,
942
+ outline: e.value.table.td.outline
943
+ },
944
+ breakpoint: e.value.table.responsiveBreakpoint
945
+ };
946
+ return {
947
+ colNames: [
948
+ e.value.table.columnNames.series,
949
+ e.value.table.columnNames.value,
950
+ e.value.table.columnNames.percentage
951
+ ],
952
+ head: l,
953
+ body: a,
954
+ config: t
955
+ };
956
+ }), Oe = k(!1);
957
+ function Qt(l) {
958
+ Oe.value = l, ae.value += 1;
959
+ }
960
+ const Jt = g(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent));
961
+ function Fl(l) {
962
+ return vo({
963
+ num: l,
964
+ rounding: e.value.style.chart.legend.roundingPercentage
965
+ });
966
+ }
967
+ function Et({
968
+ val: l,
969
+ percentage: a,
970
+ showVal: t,
971
+ showPercentage: o
972
+ }) {
973
+ const r = e.value.style.chart.layout.labels.dataLabels;
974
+ return ho({
975
+ config: r,
976
+ val: l,
977
+ percentage: a,
978
+ showVal: t,
979
+ showPercentage: o
980
+ });
981
+ }
982
+ function bt(l) {
983
+ return Et({
984
+ val: ge(
985
+ e.value.style.chart.layout.labels.value.formatter,
986
+ l.value,
987
+ ie({
988
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
989
+ v: l.value,
990
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
991
+ r: e.value.style.chart.layout.labels.value.rounding
992
+ }),
993
+ { datapoint: l }
994
+ ),
995
+ percentage: Wt(l, re.value),
996
+ showVal: e.value.style.chart.layout.labels.value.show,
997
+ showPercentage: !0
998
+ });
999
+ }
1000
+ function ye(l, a) {
1001
+ e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: l, seriesIndex: l.seriesIndex }), It("selectDatapoint", { datapoint: l, index: a });
1002
+ }
1003
+ function Kt() {
1004
+ m.value.showTable = !m.value.showTable;
1005
+ }
1006
+ function Zt() {
1007
+ m.value.dataLabels.show = !m.value.dataLabels.show;
1008
+ }
1009
+ function el() {
1010
+ m.value.showTooltip = !m.value.showTooltip;
1011
+ }
1012
+ const mt = k(!1);
1013
+ function Xt() {
1014
+ mt.value = !mt.value;
1015
+ }
1016
+ async function Il({ scale: l = 2 } = {}) {
1017
+ if (!L.value) return;
1018
+ const { width: a, height: t } = L.value.getBoundingClientRect(), o = a / t, { imageUri: r, base64: d } = await $o({ domElement: L.value, base64: !0, img: !0, scale: l });
1019
+ return {
1020
+ imageUri: r,
1021
+ base64: d,
1022
+ title: e.value.style.chart.title.text,
1023
+ width: a,
1024
+ height: t,
1025
+ aspectRatio: o
1026
+ };
1027
+ }
1028
+ function Dl() {
1029
+ if (!Fe.value) return;
1030
+ const { x: l, y: a, width: t, height: o } = Fe.value.getBBox();
1031
+ de.value && de.value.setAttribute("viewBox", `${l} ${a} ${t + Math.min(0, l)} ${o + Math.min(0, a)}`);
1032
+ }
1033
+ const et = g(() => {
1034
+ const l = e.value.table.useDialog && !e.value.table.show, a = m.value.showTable;
1035
+ return {
1036
+ component: l ? St : At,
1037
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
1038
+ props: l ? {
1039
+ backgroundColor: e.value.table.th.backgroundColor,
1040
+ color: e.value.table.th.color,
1041
+ headerColor: e.value.table.th.color,
1042
+ headerBg: e.value.table.th.backgroundColor,
1043
+ isFullscreen: Oe.value,
1044
+ fullscreenParent: L.value,
1045
+ forcedWidth: Math.min(500, window.innerWidth * 0.8)
1046
+ } : {
1047
+ hideDetails: !0,
1048
+ config: {
1049
+ open: a,
1050
+ maxHeight: 1e4,
1051
+ body: {
1052
+ backgroundColor: e.value.style.chart.backgroundColor,
1053
+ color: e.value.style.chart.color
1054
+ },
1055
+ head: {
1056
+ backgroundColor: e.value.style.chart.backgroundColor,
1057
+ color: e.value.style.chart.color
1058
+ }
1059
+ }
1060
+ }
1061
+ };
1062
+ });
1063
+ Ne(() => m.value.showTable, (l) => {
1064
+ e.value.table.show || (l && e.value.table.useDialog && Ie.value ? Ie.value.open() : "close" in Ie.value && Ie.value.close());
1065
+ });
1066
+ function tl() {
1067
+ m.value.showTable = !1, je.value && je.value.setTableIconState(!1);
1068
+ }
1069
+ const Bl = g(() => Bt.value.map((l) => ({
1070
+ ...l,
1071
+ name: l.display
1072
+ }))), zl = g(() => e.value.style.chart.backgroundColor), Ol = g(() => e.value.style.chart.legend), Yl = g(() => e.value.style.chart.title), { exportSvg: El, getSvg: Xl } = wo({
1073
+ svg: de,
1074
+ title: Yl,
1075
+ legend: Ol,
1076
+ legendItems: Bl,
1077
+ backgroundColor: zl
1078
+ });
1079
+ async function ll({ isCb: l }) {
1080
+ if (l) {
1081
+ const { blob: a, url: t, text: o, dataUrl: r } = await Xl();
1082
+ e.value.userOptions.callbacks.svg({ blob: a, url: t, text: o, dataUrl: r });
1083
+ } else
1084
+ El();
1085
+ }
1086
+ return lt({
1087
+ autoSize: Dl,
1088
+ getData: Dt,
1089
+ getImage: Il,
1090
+ generatePdf: Ae,
1091
+ generateCsv: Yt,
1092
+ generateImage: _e,
1093
+ generateSvg: ll,
1094
+ hideSeries: ml,
1095
+ showSeries: bl,
1096
+ toggleTable: Kt,
1097
+ toggleLabels: Zt,
1098
+ toggleTooltip: el,
1099
+ toggleAnnotator: Xt,
1100
+ toggleFullscreen: Qt
1101
+ }), (l, a) => (u(), i("div", {
1102
+ ref_key: "donutChart",
1103
+ ref: L,
1104
+ class: Nt(`vue-data-ui-component vue-ui-donut ${Oe.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
1105
+ style: I(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height:100%;" : ""} text-align:center;background:${e.value.style.chart.backgroundColor}`),
1106
+ id: `donut__${c.value}`,
1107
+ onMouseenter: yt,
1108
+ onMouseleave: Be
1109
+ }, [
1110
+ e.value.userOptions.buttons.annotator && s(de) ? (u(), Pe(s(_t), {
1111
+ key: 0,
1112
+ color: e.value.style.chart.color,
1113
+ backgroundColor: e.value.style.chart.backgroundColor,
1114
+ active: mt.value,
1115
+ svgRef: s(de),
1116
+ onClose: Xt
1117
+ }, {
1118
+ "annotator-action-close": C(() => [
1119
+ w(l.$slots, "annotator-action-close", {}, void 0, !0)
1120
+ ]),
1121
+ "annotator-action-color": C(({ color: t }) => [
1122
+ w(l.$slots, "annotator-action-color", ee(te({ color: t })), void 0, !0)
1123
+ ]),
1124
+ "annotator-action-draw": C(({ mode: t }) => [
1125
+ w(l.$slots, "annotator-action-draw", ee(te({ mode: t })), void 0, !0)
1126
+ ]),
1127
+ "annotator-action-undo": C(({ disabled: t }) => [
1128
+ w(l.$slots, "annotator-action-undo", ee(te({ disabled: t })), void 0, !0)
1129
+ ]),
1130
+ "annotator-action-redo": C(({ disabled: t }) => [
1131
+ w(l.$slots, "annotator-action-redo", ee(te({ disabled: t })), void 0, !0)
1132
+ ]),
1133
+ "annotator-action-delete": C(({ disabled: t }) => [
1134
+ w(l.$slots, "annotator-action-delete", ee(te({ disabled: t })), void 0, !0)
1135
+ ]),
1136
+ _: 3
1137
+ }, 8, ["color", "backgroundColor", "active", "svgRef"])) : f("", !0),
1138
+ w(l.$slots, "userConfig", {}, void 0, !0),
1139
+ gt.value ? (u(), i("div", {
1140
+ key: 1,
1141
+ ref_key: "noTitle",
1142
+ ref: Ge,
1143
+ class: "vue-data-ui-no-title-space",
1144
+ style: "height:36px; width: 100%;background:transparent"
1145
+ }, null, 512)) : f("", !0),
1146
+ e.value.style.chart.title.text ? (u(), i("div", {
1147
+ key: 2,
1148
+ ref_key: "chartTitle",
1149
+ ref: st,
1150
+ style: "width:100%;background:transparent;padding-bottom:24px"
1151
+ }, [
1152
+ (u(), Pe(_o, {
1153
+ key: `title_${rt.value}`,
1154
+ config: {
1155
+ title: {
1156
+ cy: "donut-div-title",
1157
+ ...e.value.style.chart.title
1158
+ },
1159
+ subtitle: {
1160
+ cy: "donut-div-subtitle",
1161
+ ...e.value.style.chart.title.subtitle
1162
+ }
1163
+ }
1164
+ }, null, 8, ["config"]))
1165
+ ], 512)) : f("", !0),
1166
+ b("div", {
1167
+ id: `legend-top-${c.value}`
1168
+ }, null, 8, Po),
1169
+ e.value.userOptions.show && D.value && (s(ft) || s(qe)) ? (u(), Pe(s(Tt), {
1170
+ ref_key: "userOptionsRef",
1171
+ ref: je,
1172
+ key: `user_option_${ae.value}`,
1173
+ backgroundColor: e.value.style.chart.backgroundColor,
1174
+ color: e.value.style.chart.color,
1175
+ isPrinting: s(K),
1176
+ isImaging: s(Z),
1177
+ uid: c.value,
1178
+ hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
1179
+ hasPdf: e.value.userOptions.buttons.pdf,
1180
+ hasImg: e.value.userOptions.buttons.img,
1181
+ hasSvg: e.value.userOptions.buttons.svg,
1182
+ hasXls: e.value.userOptions.buttons.csv,
1183
+ hasTable: e.value.userOptions.buttons.table,
1184
+ hasLabel: e.value.userOptions.buttons.labels,
1185
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
1186
+ isFullscreen: Oe.value,
1187
+ chartElement: L.value,
1188
+ position: e.value.userOptions.position,
1189
+ callbacks: e.value.userOptions.callbacks,
1190
+ isTooltip: m.value.showTooltip,
1191
+ titles: { ...e.value.userOptions.buttonTitles },
1192
+ hasAnnotator: e.value.userOptions.buttons.annotator,
1193
+ isAnnotation: mt.value,
1194
+ printScale: e.value.userOptions.print.scale,
1195
+ tableDialog: e.value.table.useDialog,
1196
+ onToggleFullscreen: Qt,
1197
+ onGeneratePdf: s(Ae),
1198
+ onGenerateCsv: Yt,
1199
+ onGenerateImage: s(_e),
1200
+ onGenerateSvg: ll,
1201
+ onToggleTable: Kt,
1202
+ onToggleLabels: Zt,
1203
+ onToggleTooltip: el,
1204
+ onToggleAnnotator: Xt,
1205
+ style: I({ visibility: s(ft) ? s(qe) ? "visible" : "hidden" : "visible" })
1206
+ }, Rt({ _: 2 }, [
1207
+ l.$slots.menuIcon ? {
1208
+ name: "menuIcon",
1209
+ fn: C(({ isOpen: t, color: o }) => [
1210
+ w(l.$slots, "menuIcon", ee(te({ isOpen: t, color: o })), void 0, !0)
1211
+ ]),
1212
+ key: "0"
1213
+ } : void 0,
1214
+ l.$slots.optionTooltip ? {
1215
+ name: "optionTooltip",
1216
+ fn: C(() => [
1217
+ w(l.$slots, "optionTooltip", {}, void 0, !0)
1218
+ ]),
1219
+ key: "1"
1220
+ } : void 0,
1221
+ l.$slots.optionPdf ? {
1222
+ name: "optionPdf",
1223
+ fn: C(() => [
1224
+ w(l.$slots, "optionPdf", {}, void 0, !0)
1225
+ ]),
1226
+ key: "2"
1227
+ } : void 0,
1228
+ l.$slots.optionCsv ? {
1229
+ name: "optionCsv",
1230
+ fn: C(() => [
1231
+ w(l.$slots, "optionCsv", {}, void 0, !0)
1232
+ ]),
1233
+ key: "3"
1234
+ } : void 0,
1235
+ l.$slots.optionImg ? {
1236
+ name: "optionImg",
1237
+ fn: C(() => [
1238
+ w(l.$slots, "optionImg", {}, void 0, !0)
1239
+ ]),
1240
+ key: "4"
1241
+ } : void 0,
1242
+ l.$slots.optionSvg ? {
1243
+ name: "optionSvg",
1244
+ fn: C(() => [
1245
+ w(l.$slots, "optionSvg", {}, void 0, !0)
1246
+ ]),
1247
+ key: "5"
1248
+ } : void 0,
1249
+ l.$slots.optionTable ? {
1250
+ name: "optionTable",
1251
+ fn: C(() => [
1252
+ w(l.$slots, "optionTable", {}, void 0, !0)
1253
+ ]),
1254
+ key: "6"
1255
+ } : void 0,
1256
+ l.$slots.optionLabels ? {
1257
+ name: "optionLabels",
1258
+ fn: C(() => [
1259
+ w(l.$slots, "optionLabels", {}, void 0, !0)
1260
+ ]),
1261
+ key: "7"
1262
+ } : void 0,
1263
+ l.$slots.optionFullscreen ? {
1264
+ name: "optionFullscreen",
1265
+ fn: C(({ toggleFullscreen: t, isFullscreen: o }) => [
1266
+ w(l.$slots, "optionFullscreen", ee(te({ toggleFullscreen: t, isFullscreen: o })), void 0, !0)
1267
+ ]),
1268
+ key: "8"
1269
+ } : void 0,
1270
+ l.$slots.optionAnnotator ? {
1271
+ name: "optionAnnotator",
1272
+ fn: C(({ toggleAnnotator: t, isAnnotator: o }) => [
1273
+ w(l.$slots, "optionAnnotator", ee(te({ toggleAnnotator: t, isAnnotator: o })), void 0, !0)
1274
+ ]),
1275
+ key: "9"
1276
+ } : void 0
1277
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "chartElement", "position", "callbacks", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "printScale", "tableDialog", "onGeneratePdf", "onGenerateImage", "style"])) : f("", !0),
1278
+ (u(), i("svg", {
1279
+ ref_key: "svgRef",
1280
+ ref: de,
1281
+ xmlns: s(lo),
1282
+ class: Nt({ "vue-data-ui-fullscreen--on": Oe.value, "vue-data-ui-fulscreen--off": !Oe.value, "vue-data-ui-svg": !0 }),
1283
+ viewBox: `0 0 ${n.value.width <= 0 ? 10 : n.value.width} ${n.value.height <= 0 ? 10 : n.value.height}`,
1284
+ style: I(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};${$e.value.css}`)
1285
+ }, [
1286
+ b("g", {
1287
+ ref_key: "G",
1288
+ ref: Fe,
1289
+ class: "vue-data-ui-g"
1290
+ }, [
1291
+ wt(s(Lt)),
1292
+ l.$slots["chart-background"] ? (u(), i("foreignObject", {
1293
+ key: 0,
1294
+ x: 0,
1295
+ y: 0,
1296
+ width: n.value.width <= 0 ? 10 : n.value.width,
1297
+ height: n.value.height <= 0 ? 10 : n.value.height,
1298
+ style: {
1299
+ pointerEvents: "none"
1300
+ }
1301
+ }, [
1302
+ w(l.$slots, "chart-background", {}, void 0, !0)
1303
+ ], 8, Io)) : f("", !0),
1304
+ e.value.type === "classic" && !isNaN(ve.value / F.value) ? (u(), i("defs", Do, [
1305
+ e.value.style.chart.useGradient ? (u(), i("radialGradient", {
1306
+ key: 0,
1307
+ id: `gradient_${c.value}`
1308
+ }, [
1309
+ b("stop", {
1310
+ offset: "0%",
1311
+ "stop-color": s(xt)(e.value.style.chart.backgroundColor, 0),
1312
+ "stop-opacity": "0"
1313
+ }, null, 8, zo),
1314
+ b("stop", {
1315
+ offset: `${(1 - ve.value / F.value) * 100}%`,
1316
+ "stop-color": s(xt)("#FFFFFF", 0),
1317
+ "stop-opacity": "0"
1318
+ }, null, 8, Oo),
1319
+ b("stop", {
1320
+ offset: `${(1 - ve.value / F.value / 2) * 100}%`,
1321
+ "stop-color": s(xt)("#FFFFFF", e.value.style.chart.gradientIntensity)
1322
+ }, null, 8, Yo),
1323
+ b("stop", {
1324
+ offset: "100%",
1325
+ "stop-color": s(xt)(e.value.style.chart.backgroundColor, 0),
1326
+ "stop-opacity": "0"
1327
+ }, null, 8, Eo)
1328
+ ], 8, Bo)) : f("", !0)
1329
+ ])) : f("", !0),
1330
+ e.value.type === "polar" ? (u(), i("defs", Xo, [
1331
+ (u(!0), i(_, null, j(v.value, (t, o) => (u(), i("radialGradient", {
1332
+ id: `polar_gradient_${o}_${c.value}`,
1333
+ cx: (isNaN(t.middlePoint.x / n.value.width * 100) ? 0 : t.middlePoint.x / n.value.width * 100) + "%",
1334
+ cy: (isNaN(t.middlePoint.y / n.value.height * 100) ? 0 : t.middlePoint.y / n.value.height * 100) + "%",
1335
+ r: "62%"
1336
+ }, [
1337
+ b("stop", {
1338
+ offset: "0%",
1339
+ "stop-color": s(oo)(U.value[o].color, 0.05),
1340
+ "stop-opacity": e.value.style.chart.gradientIntensity / 100
1341
+ }, null, 8, Ro),
1342
+ b("stop", {
1343
+ offset: "100%",
1344
+ "stop-color": U.value[o].color
1345
+ }, null, 8, Vo)
1346
+ ], 8, No))), 256))
1347
+ ])) : f("", !0),
1348
+ b("defs", null, [
1349
+ b("filter", {
1350
+ id: `blur_${c.value}`,
1351
+ x: "-50%",
1352
+ y: "-50%",
1353
+ width: "200%",
1354
+ height: "200%"
1355
+ }, [
1356
+ b("feGaussianBlur", {
1357
+ in: "SourceGraphic",
1358
+ stdDeviation: 2,
1359
+ id: `blur_std_${c.value}`
1360
+ }, null, 8, Ho),
1361
+ a[5] || (a[5] = b("feColorMatrix", {
1362
+ type: "saturate",
1363
+ values: "0"
1364
+ }, null, -1))
1365
+ ], 8, Uo),
1366
+ b("filter", {
1367
+ id: `shadow_${c.value}`,
1368
+ "color-interpolation-filters": "sRGB"
1369
+ }, [
1370
+ b("feDropShadow", {
1371
+ dx: "0",
1372
+ dy: "0",
1373
+ stdDeviation: "10",
1374
+ "flood-opacity": "0.5",
1375
+ "flood-color": e.value.style.chart.layout.donut.shadowColor
1376
+ }, null, 8, jo)
1377
+ ], 8, Go),
1378
+ b("filter", {
1379
+ id: `drop_shadow_${c.value}`,
1380
+ "color-interpolation-filters": "sRGB",
1381
+ x: "-50%",
1382
+ y: "-50%",
1383
+ width: "200%",
1384
+ height: "200%"
1385
+ }, [
1386
+ b("feDropShadow", {
1387
+ dx: "0",
1388
+ dy: "0",
1389
+ stdDeviation: "3",
1390
+ "flood-opacity": "1",
1391
+ "flood-color": e.value.style.chart.layout.donut.shadowColor
1392
+ }, null, 8, qo)
1393
+ ], 8, Wo)
1394
+ ]),
1395
+ e.value.type === "classic" ? (u(!0), i(_, { key: 3 }, j(U.value.filter((t) => !t.ghost), (t, o) => (u(), i("g", null, [
1396
+ q(t) && m.value.dataLabels.show ? (u(), i("path", {
1397
+ key: 0,
1398
+ d: s(Y)[o]?.connectorPath || s(ao)(
1399
+ t,
1400
+ { x: n.value.width / 2, y: n.value.height / 2 },
1401
+ 16,
1402
+ 16,
1403
+ !1,
1404
+ !1,
1405
+ ve.value,
1406
+ 12,
1407
+ e.value.style.chart.layout.curvedMarkers
1408
+ ),
1409
+ stroke: t.color,
1410
+ "stroke-width": "1",
1411
+ "stroke-linecap": "round",
1412
+ "stroke-linejoin": "round",
1413
+ fill: "none",
1414
+ filter: ze(o)
1415
+ }, null, 8, Qo)) : f("", !0)
1416
+ ]))), 256)) : f("", !0),
1417
+ e.value.type === "polar" ? (u(!0), i(_, { key: 4 }, j(U.value.filter((t) => !t.ghost), (t, o) => (u(), i("g", null, [
1418
+ q(t) && m.value.dataLabels.show ? (u(), i("path", {
1419
+ key: 0,
1420
+ d: `M ${s(z)({ initX: v.value[o].middlePoint.x, initY: v.value[o].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x},${s(z)({ initX: v.value[o].middlePoint.x, initY: v.value[o].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y} ${v.value[o].middlePoint.x},${v.value[o].middlePoint.y}`,
1421
+ stroke: t.color,
1422
+ "stroke-width": "1",
1423
+ "stroke-linecap": "round",
1424
+ "stroke-linejoin": "round",
1425
+ fill: "none",
1426
+ filter: ze(o),
1427
+ style: I({
1428
+ transition: P.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1429
+ })
1430
+ }, null, 12, Jo)) : f("", !0)
1431
+ ]))), 256)) : f("", !0),
1432
+ e.value.type === "classic" && e.value.style.chart.layout.donut.useShadow ? (u(), i("circle", {
1433
+ key: 5,
1434
+ cx: n.value.width / 2,
1435
+ cy: n.value.height / 2,
1436
+ r: F.value <= 0 ? 10 : F.value,
1437
+ fill: e.value.style.chart.backgroundColor,
1438
+ filter: `url(#shadow_${c.value})`
1439
+ }, null, 8, Ko)) : f("", !0),
1440
+ l.$slots.pattern ? (u(), i("g", Zo, [
1441
+ (u(!0), i(_, null, j(tt.dataset, (t, o) => (u(), i("defs", {
1442
+ key: `pattern-${t.patternIndex}`
1443
+ }, [
1444
+ w(l.$slots, "pattern", Vt({ ref_for: !0 }, { seriesIndex: o, patternId: `pattern_${c.value}_${o}` }), void 0, !0)
1445
+ ]))), 128))
1446
+ ])) : f("", !0),
1447
+ Q.value && e.value.type === "classic" ? (u(), i(_, { key: 7 }, [
1448
+ (u(!0), i(_, null, j(re.value, (t, o) => (u(), i("path", {
1449
+ stroke: e.value.style.chart.backgroundColor,
1450
+ d: t.arcSlice,
1451
+ fill: "#FFFFFF"
1452
+ }, null, 8, ea))), 256)),
1453
+ (u(!0), i(_, null, j(re.value, (t, o) => (u(), i("path", {
1454
+ class: "vue-ui-donut-arc-path",
1455
+ d: t.arcSlice,
1456
+ fill: t.color,
1457
+ stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1458
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth,
1459
+ filter: ze(o)
1460
+ }, null, 8, ta))), 256)),
1461
+ l.$slots.pattern ? (u(), i("g", la, [
1462
+ (u(!0), i(_, null, j(re.value, (t, o) => (u(), i("path", {
1463
+ class: "vue-ui-donut-arc-path",
1464
+ d: t.arcSlice,
1465
+ fill: `url(#${t.pattern})`,
1466
+ stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1467
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth,
1468
+ filter: ze(o)
1469
+ }, null, 8, oa))), 256))
1470
+ ])) : f("", !0)
1471
+ ], 64)) : f("", !0),
1472
+ Q.value && e.value.type === "polar" ? (u(), i(_, { key: 8 }, [
1473
+ U.value.length > 1 ? (u(), i("g", aa, [
1474
+ (u(!0), i(_, null, j(re.value, (t, o) => (u(), i("path", {
1475
+ stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1476
+ d: v.value[o].path,
1477
+ fill: "#FFFFFF",
1478
+ style: I({
1479
+ transition: P.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1480
+ })
1481
+ }, null, 12, na))), 256)),
1482
+ e.value.style.chart.layout.donut.useShadow ? (u(), i("g", sa, [
1483
+ (u(!0), i(_, null, j(re.value, (t, o) => (u(), i("path", {
1484
+ class: "vue-ui-donut-arc-path",
1485
+ d: v.value[o].path,
1486
+ fill: "transparent",
1487
+ stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1488
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth,
1489
+ filter: `url(#drop_shadow_${c.value})`,
1490
+ style: I({
1491
+ transition: P.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1492
+ })
1493
+ }, null, 12, ua))), 256))
1494
+ ])) : f("", !0),
1495
+ l.$slots.pattern ? (u(), i("g", ra, [
1496
+ (u(!0), i(_, null, j(re.value, (t, o) => (u(), i("path", {
1497
+ class: "vue-ui-donut-arc-path",
1498
+ d: v.value[o].path,
1499
+ fill: `url(#${t.pattern})`,
1500
+ stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1501
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth,
1502
+ filter: ze(o),
1503
+ style: I({
1504
+ transition: P.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1505
+ transformOrigin: "center"
1506
+ })
1507
+ }, null, 12, ia))), 256))
1508
+ ])) : f("", !0),
1509
+ (u(!0), i(_, null, j(re.value, (t, o) => (u(), i("path", {
1510
+ class: "vue-ui-donut-arc-path",
1511
+ d: v.value[o].path,
1512
+ fill: e.value.style.chart.useGradient ? `url(#polar_gradient_${o}_${c.value})` : t.color,
1513
+ stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1514
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth,
1515
+ filter: ze(o),
1516
+ style: I({
1517
+ transition: P.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1518
+ })
1519
+ }, null, 12, ca))), 256))
1520
+ ])) : (u(), i("g", da, [
1521
+ l.$slots.pattern ? (u(), i("circle", {
1522
+ key: 0,
1523
+ cx: n.value.width / 2,
1524
+ cy: n.value.height / 2,
1525
+ r: F.value,
1526
+ fill: `url(#pattern_${c.value}_${U.value[0].patternIndex})`,
1527
+ stroke: e.value.style.chart.backgroundColor,
1528
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth
1529
+ }, null, 8, va)) : f("", !0),
1530
+ b("circle", {
1531
+ cx: n.value.width / 2,
1532
+ cy: n.value.height / 2,
1533
+ r: F.value,
1534
+ fill: e.value.style.chart.useGradient ? `url(#polar_gradient_0_${c.value})` : U.value[0].color,
1535
+ stroke: e.value.style.chart.backgroundColor,
1536
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth
1537
+ }, null, 8, ha)
1538
+ ]))
1539
+ ], 64)) : (u(), i(_, { key: 9 }, [
1540
+ e.value.type === "classic" && !Cl.value ? (u(), i("g", fa, [
1541
+ (u(!0), i(_, null, j(xl.value, (t, o) => (u(), i("path", {
1542
+ class: "vue-ui-donut-arc-path",
1543
+ d: t.arcSlice,
1544
+ fill: t.color,
1545
+ stroke: e.value.style.chart.backgroundColor,
1546
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth
1547
+ }, null, 8, ya))), 256))
1548
+ ])) : f("", !0),
1549
+ b("circle", {
1550
+ cx: n.value.width / 2,
1551
+ cy: n.value.height / 2,
1552
+ r: F.value <= 0 ? 10 : F.value,
1553
+ fill: "transparent",
1554
+ stroke: e.value.style.chart.backgroundColor
1555
+ }, null, 8, ga)
1556
+ ], 64)),
1557
+ e.value.style.chart.useGradient && e.value.type === "classic" ? (u(), i("circle", {
1558
+ key: 10,
1559
+ cx: n.value.width / 2,
1560
+ cy: n.value.height / 2,
1561
+ r: (
1562
+ /* This might require adjustments */
1563
+ F.value <= 0 ? 10 : F.value
1564
+ ),
1565
+ fill: `url(#gradient_${c.value})`
1566
+ }, null, 8, pa)) : f("", !0),
1567
+ b("circle", {
1568
+ ref_key: "circle_hollow",
1569
+ ref: Ue,
1570
+ style: { pointerEvents: "none" },
1571
+ fill: "none",
1572
+ cx: n.value.width / 2,
1573
+ cy: n.value.height / 2,
1574
+ r: Math.max(0.1, ve.value * 1.7)
1575
+ }, null, 8, ba),
1576
+ Q.value ? (u(), i(_, { key: 11 }, [
1577
+ U.value.length > 1 || e.value.type === "classic" ? (u(), i("g", ma, [
1578
+ (u(!0), i(_, null, j(U.value.filter((t) => !t.ghost), (t, o) => (u(), i("path", {
1579
+ d: e.value.type === "classic" ? t.arcSlice : v.value[o].path,
1580
+ stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1581
+ fill: M.value === o ? e.value.style.chart.layout.donut.selectedColor : "transparent",
1582
+ onMouseenter: (r) => fe({
1583
+ datapoint: t,
1584
+ relativeIndex: o,
1585
+ seriesIndex: t.seriesIndex,
1586
+ show: !0
1587
+ }),
1588
+ onMouseleave: (r) => he({ datapoint: t, seriesIndex: t.seriesIndex }),
1589
+ onClick: (r) => ye(t, o)
1590
+ }, null, 40, wa))), 256))
1591
+ ])) : (u(), i("g", ka, [
1592
+ b("circle", {
1593
+ cx: n.value.width / 2,
1594
+ cy: n.value.height / 2,
1595
+ r: F.value,
1596
+ fill: "transparent",
1597
+ onMouseenter: a[0] || (a[0] = (t) => fe({
1598
+ datapoint: U.value[0],
1599
+ relativeIndex: 0,
1600
+ seriesIndex: U.value[0].seriesIndex,
1601
+ show: !0
1602
+ })),
1603
+ onMouseleave: a[1] || (a[1] = (t) => he({ datapoint: U.value[0], seriesIndex: U.value[0].seriesIndex })),
1604
+ onClick: a[2] || (a[2] = (t) => ye(U.value[0], l.i))
1605
+ }, null, 40, Ca)
1606
+ ]))
1607
+ ], 64)) : f("", !0),
1608
+ e.value.type === "classic" ? (u(), i("g", {
1609
+ key: 12,
1610
+ ref_key: "G_hollow",
1611
+ ref: nt,
1612
+ class: "vue-data-ui-donut-hollow-labels"
1613
+ }, [
1614
+ e.value.style.chart.layout.labels.hollow.total.show ? (u(), i("text", {
1615
+ key: 0,
1616
+ "text-anchor": "middle",
1617
+ x: n.value.width / 2,
1618
+ y: n.value.height / 2 - (e.value.style.chart.layout.labels.hollow.average.show ? e.value.style.chart.layout.labels.hollow.total.fontSize : 0) + e.value.style.chart.layout.labels.hollow.total.offsetY,
1619
+ fill: e.value.style.chart.layout.labels.hollow.total.color,
1620
+ "font-size": e.value.style.chart.layout.labels.hollow.total.fontSize,
1621
+ style: I(`font-weight:${e.value.style.chart.layout.labels.hollow.total.bold ? "bold" : ""}`)
1622
+ }, ke(e.value.style.chart.layout.labels.hollow.total.text), 13, xa)) : f("", !0),
1623
+ e.value.style.chart.layout.labels.hollow.total.show ? (u(), i("text", {
1624
+ key: 1,
1625
+ "text-anchor": "middle",
1626
+ x: n.value.width / 2,
1627
+ y: n.value.height / 2 + e.value.style.chart.layout.labels.hollow.total.fontSize - (e.value.style.chart.layout.labels.hollow.average.show ? e.value.style.chart.layout.labels.hollow.total.fontSize : 0) + e.value.style.chart.layout.labels.hollow.total.value.offsetY,
1628
+ fill: e.value.style.chart.layout.labels.hollow.total.value.color,
1629
+ "font-size": e.value.style.chart.layout.labels.hollow.total.value.fontSize,
1630
+ style: I(`font-weight:${e.value.style.chart.layout.labels.hollow.total.value.bold ? "bold" : ""}`)
1631
+ }, ke(s(ge)(
1632
+ e.value.style.chart.layout.labels.hollow.total.value.formatter,
1633
+ Q.value,
1634
+ s(ie)({
1635
+ p: e.value.style.chart.layout.labels.hollow.total.value.prefix,
1636
+ v: Q.value,
1637
+ s: e.value.style.chart.layout.labels.hollow.total.value.suffix
1638
+ })
1639
+ )), 13, $a)) : f("", !0),
1640
+ e.value.style.chart.layout.labels.hollow.average.show ? (u(), i("text", {
1641
+ key: 2,
1642
+ "text-anchor": "middle",
1643
+ x: n.value.width / 2,
1644
+ y: n.value.height / 2 + (e.value.style.chart.layout.labels.hollow.total.show ? e.value.style.chart.layout.labels.hollow.average.fontSize : 0) + e.value.style.chart.layout.labels.hollow.average.offsetY,
1645
+ fill: e.value.style.chart.layout.labels.hollow.average.color,
1646
+ "font-size": e.value.style.chart.layout.labels.hollow.average.fontSize,
1647
+ style: I(`font-weight:${e.value.style.chart.layout.labels.hollow.average.bold ? "bold" : ""}`)
1648
+ }, ke(e.value.style.chart.layout.labels.hollow.average.text), 13, Aa)) : f("", !0),
1649
+ e.value.style.chart.layout.labels.hollow.average.show ? (u(), i("text", {
1650
+ key: 3,
1651
+ "text-anchor": "middle",
1652
+ x: n.value.width / 2,
1653
+ y: n.value.height / 2 + (e.value.style.chart.layout.labels.hollow.total.show ? e.value.style.chart.layout.labels.hollow.average.fontSize : 0) + e.value.style.chart.layout.labels.hollow.average.fontSize + e.value.style.chart.layout.labels.hollow.average.value.offsetY,
1654
+ fill: e.value.style.chart.layout.labels.hollow.average.value.color,
1655
+ "font-size": e.value.style.chart.layout.labels.hollow.average.value.fontSize,
1656
+ style: I(`font-weight:${e.value.style.chart.layout.labels.hollow.average.value.bold ? "bold" : ""}`)
1657
+ }, ke(se.value || P.value ? "--" : s(ge)(
1658
+ e.value.style.chart.layout.labels.hollow.average.value.formatter,
1659
+ zt.value,
1660
+ s(ie)({
1661
+ p: e.value.style.chart.layout.labels.hollow.average.value.prefix,
1662
+ v: zt.value,
1663
+ s: e.value.style.chart.layout.labels.hollow.average.value.suffix,
1664
+ r: e.value.style.chart.layout.labels.hollow.average.value.rounding
1665
+ })
1666
+ )), 13, _a)) : f("", !0)
1667
+ ], 512)) : f("", !0),
1668
+ (u(!0), i(_, null, j(re.value.filter((t) => !t.ghost), (t, o) => (u(), i("g", {
1669
+ filter: ze(o),
1670
+ class: Nt({ animated: e.value.useCssAnimation }),
1671
+ key: t.seriesIndex,
1672
+ opacity: Pl(t)
1673
+ }, [
1674
+ e.value.style.chart.layout.labels.dataLabels.useLabelSlots ? (u(), i("g", La, [
1675
+ (u(), i("foreignObject", {
1676
+ x: s(A)(t, !0).anchor === "end" ? s(A)(t).x - 120 : s(A)(t, !0).anchor === "middle" ? s(A)(t).x - 60 : s(A)(t).x,
1677
+ y: s(Ce)(t) - (Jt.value ? 20 : 0),
1678
+ width: "120",
1679
+ height: "60",
1680
+ style: { overflow: "visible" }
1681
+ }, [
1682
+ b("div", null, [
1683
+ w(l.$slots, "dataLabel", Vt({ ref_for: !0 }, {
1684
+ datapoint: t,
1685
+ isBlur: !e.value.useBlurOnHover || [null, void 0].includes(M.value) || M.value === o,
1686
+ isSafari: Jt.value,
1687
+ isVisible: q(t) && m.value.dataLabels.show,
1688
+ textAlign: s(A)(t, !0, 16, !0).anchor,
1689
+ flexAlign: s(A)(t, !0, 16).anchor,
1690
+ percentage: Wt(t, re.value)
1691
+ }), void 0, !0)
1692
+ ])
1693
+ ], 8, Sa))
1694
+ ])) : (u(), i("g", Ma, [
1695
+ e.value.type === "classic" ? (u(), i(_, { key: 0 }, [
1696
+ q(t) && m.value.dataLabels.show ? (u(), i("circle", {
1697
+ key: 0,
1698
+ cx: s(Y)[o]?.markerX ?? s(A)(t).x,
1699
+ cy: s(Y)[o]?.markerY ?? s(Ce)(t) - 3.5,
1700
+ fill: t.color,
1701
+ stroke: e.value.style.chart.backgroundColor,
1702
+ "stroke-width": 1,
1703
+ r: 3,
1704
+ filter: !e.value.useBlurOnHover || [null, void 0].includes(M.value) || M.value === o ? "" : `url(#blur_${c.value})`,
1705
+ onClick: (r) => ye(t, o),
1706
+ onMouseenter: (r) => fe({
1707
+ datapoint: t,
1708
+ relativeIndex: o,
1709
+ seriesIndex: t.seriesIndex,
1710
+ show: !0
1711
+ }),
1712
+ onMouseleave: (r) => he({ datapoint: t, seriesIndex: t.seriesIndex })
1713
+ }, null, 40, Pa)) : f("", !0),
1714
+ e.value.style.chart.layout.labels.dataLabels.oneLine || s(Y)[o] ? kt((u(), i("text", {
1715
+ key: 1,
1716
+ class: "vue-data-ui-datalabel-inline",
1717
+ "text-anchor": s(Y)[o]?.textAnchor || s(A)(t, !0, 12).anchor,
1718
+ x: s(Y)[o]?.labelX ?? s(A)(t, !0, 12).x,
1719
+ y: s(Y)[o]?.labelY ?? s(Ce)(t),
1720
+ onClick: (r) => ye(t, o),
1721
+ onMouseenter: (r) => fe({
1722
+ datapoint: t,
1723
+ relativeIndex: o,
1724
+ seriesIndex: t.seriesIndex,
1725
+ show: !0
1726
+ }),
1727
+ onMouseleave: (r) => he({ datapoint: t, seriesIndex: t.seriesIndex }),
1728
+ innerHTML: Sl(t, o, !!s(Y)[o])
1729
+ }, null, 40, Fa)), [
1730
+ [Ct, q(t) && m.value.dataLabels.show]
1731
+ ]) : (u(), i(_, { key: 2 }, [
1732
+ kt(b("text", {
1733
+ class: "vue-data-ui-datalabel-value",
1734
+ "text-anchor": s(Y)[o]?.textAnchor || s(A)(t, !0, 12).anchor,
1735
+ x: s(Y)[o]?.labelX ?? s(A)(t, !0, 12).x,
1736
+ y: s(Y)[o]?.labelY ?? s(Ce)(t),
1737
+ fill: e.value.style.chart.layout.labels.percentage.color,
1738
+ "font-size": xe.value + "px",
1739
+ style: I(`font-weight:${e.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}`),
1740
+ onClick: (r) => ye(t, o),
1741
+ onMouseenter: (r) => fe({
1742
+ datapoint: t,
1743
+ relativeIndex: o,
1744
+ seriesIndex: t.seriesIndex,
1745
+ show: !0
1746
+ }),
1747
+ onMouseleave: (r) => he({ datapoint: t, seriesIndex: t.seriesIndex })
1748
+ }, ke(bt(t)), 45, Ia), [
1749
+ [Ct, q(t) && m.value.dataLabels.show]
1750
+ ]),
1751
+ kt(b("text", {
1752
+ class: "vue-data-ui-datalabel-name",
1753
+ "text-anchor": s(Y)[o]?.textAnchor || s(A)(t).anchor,
1754
+ x: s(Y)[o]?.labelX ?? s(A)(t, !0, 12).x,
1755
+ y: (s(Y)[o]?.labelY ?? s(Ce)(t)) + N.value * 1.2,
1756
+ fill: e.value.style.chart.layout.labels.name.color,
1757
+ "font-size": N.value + "px",
1758
+ style: I(`font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : ""}`),
1759
+ onClick: (r) => ye(t, o),
1760
+ onMouseenter: (r) => fe({
1761
+ datapoint: t,
1762
+ relativeIndex: o,
1763
+ seriesIndex: t.seriesIndex,
1764
+ show: !0
1765
+ }),
1766
+ onMouseleave: (r) => he({ datapoint: t, seriesIndex: t.seriesIndex }),
1767
+ innerHTML: s(il)({
1768
+ content: t.name,
1769
+ fontSize: N.value,
1770
+ fill: e.value.style.chart.layout.labels.name.color,
1771
+ x: s(Y)[o]?.labelX ?? s(A)(t, !0, 12).x,
1772
+ y: (s(Y)[o]?.labelY ?? s(Ce)(t)) + N.value
1773
+ })
1774
+ }, null, 44, Da), [
1775
+ [Ct, q(t) && m.value.dataLabels.show]
1776
+ ])
1777
+ ], 64))
1778
+ ], 64)) : f("", !0),
1779
+ e.value.type === "polar" ? (u(), i(_, { key: 1 }, [
1780
+ q(t) && m.value.dataLabels.show ? (u(), i("circle", {
1781
+ key: 0,
1782
+ cx: s(z)({ initX: v.value[o].middlePoint.x, initY: v.value[o].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
1783
+ cy: s(z)({ initX: v.value[o].middlePoint.x, initY: v.value[o].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y,
1784
+ fill: t.color,
1785
+ stroke: e.value.style.chart.backgroundColor,
1786
+ "stroke-width": 1,
1787
+ r: 3,
1788
+ filter: !e.value.useBlurOnHover || [null, void 0].includes(M.value) || M.value === o ? "" : `url(#blur_${c.value})`,
1789
+ onClick: (r) => ye(t, o),
1790
+ onMouseenter: (r) => fe({
1791
+ datapoint: t,
1792
+ relativeIndex: o,
1793
+ seriesIndex: t.seriesIndex,
1794
+ show: !0
1795
+ }),
1796
+ onMouseleave: (r) => he({ datapoint: t, seriesIndex: t.seriesIndex }),
1797
+ style: I({
1798
+ transition: P.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1799
+ })
1800
+ }, null, 44, Ba)) : f("", !0),
1801
+ e.value.style.chart.layout.labels.dataLabels.oneLine ? kt((u(), i("text", {
1802
+ key: 1,
1803
+ class: "vue-data-ui-datalabel-inline",
1804
+ "text-anchor": Te(v.value[o].middlePoint),
1805
+ x: s(z)({ initX: v.value[o].middlePoint.x, initY: v.value[o].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
1806
+ y: s(z)({ initX: v.value[o].middlePoint.x, initY: v.value[o].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y,
1807
+ style: I({
1808
+ transition: P.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1809
+ }),
1810
+ onClick: (r) => ye(t, o),
1811
+ onMouseenter: (r) => fe({
1812
+ datapoint: t,
1813
+ relativeIndex: o,
1814
+ seriesIndex: t.seriesIndex,
1815
+ show: !0
1816
+ }),
1817
+ onMouseleave: (r) => he({ datapoint: t, seriesIndex: t.seriesIndex }),
1818
+ innerHTML: Ml(t, o)
1819
+ }, null, 44, za)), [
1820
+ [Ct, q(t) && m.value.dataLabels.show]
1821
+ ]) : (u(), i(_, { key: 2 }, [
1822
+ q(t) && m.value.dataLabels.show ? (u(), i("text", {
1823
+ key: 0,
1824
+ class: "vue-data-ui-datalabel-value",
1825
+ "text-anchor": Te(v.value[o].middlePoint),
1826
+ x: s(z)({ initX: v.value[o].middlePoint.x, initY: v.value[o].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
1827
+ y: s(z)({ initX: v.value[o].middlePoint.x, initY: v.value[o].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y,
1828
+ fill: e.value.style.chart.layout.labels.percentage.color,
1829
+ "font-size": xe.value,
1830
+ style: I({
1831
+ transition: P.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1832
+ fontWeight: e.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"
1833
+ }),
1834
+ onClick: (r) => ye(t, o),
1835
+ onMouseenter: (r) => fe({
1836
+ datapoint: t,
1837
+ relativeIndex: o,
1838
+ seriesIndex: t.seriesIndex,
1839
+ show: !0
1840
+ }),
1841
+ onMouseleave: (r) => he({ datapoint: t, seriesIndex: t.seriesIndex })
1842
+ }, ke(bt(t)), 45, Oa)) : f("", !0),
1843
+ q(t) && m.value.dataLabels.show ? (u(), i("text", {
1844
+ key: 1,
1845
+ class: "vue-data-ui-datalabel-name",
1846
+ "text-anchor": Te(v.value[o].middlePoint),
1847
+ x: s(z)({ initX: v.value[o].middlePoint.x, initY: v.value[o].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
1848
+ y: s(z)({ initX: v.value[o].middlePoint.x, initY: v.value[o].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y + N.value * 1.2,
1849
+ fill: e.value.style.chart.layout.labels.name.color,
1850
+ "font-size": N.value,
1851
+ style: I({
1852
+ transition: P.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1853
+ fontWeight: e.value.style.chart.layout.labels.name.bold ? "bold" : "normal"
1854
+ }),
1855
+ onClick: (r) => ye(t, o),
1856
+ onMouseenter: (r) => fe({
1857
+ datapoint: t,
1858
+ relativeIndex: o,
1859
+ seriesIndex: t.seriesIndex,
1860
+ show: !0
1861
+ }),
1862
+ onMouseleave: (r) => he({ datapoint: t, seriesIndex: t.seriesIndex }),
1863
+ innerHTML: s(il)({
1864
+ content: t.name,
1865
+ fontSize: xe.value,
1866
+ fill: e.value.style.chart.layout.labels.name.color,
1867
+ x: s(z)({ initX: v.value[o].middlePoint.x, initY: v.value[o].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
1868
+ y: s(z)({ initX: v.value[o].middlePoint.x, initY: v.value[o].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y + N.value * 1.2
1869
+ })
1870
+ }, null, 44, Ya)) : f("", !0)
1871
+ ], 64))
1872
+ ], 64)) : f("", !0)
1873
+ ])),
1874
+ m.value.dataLabels.show && e.value.style.chart.comments.show && t.comment ? (u(), i("g", Ea, [
1875
+ q(t) && e.value.type === "classic" ? (u(), i("foreignObject", {
1876
+ key: 0,
1877
+ x: e.value.style.chart.comments.offsetX + (s(A)(t, !0).anchor === "end" ? s(A)(t).x - e.value.style.chart.comments.width : s(A)(t, !0).anchor === "middle" ? s(A)(t).x - e.value.style.chart.comments.width / 2 : s(A)(t).x),
1878
+ y: s(Ce)(t) + 24 + e.value.style.chart.comments.offsetY,
1879
+ width: e.value.style.chart.comments.width,
1880
+ height: "200",
1881
+ style: { overflow: "visible", "pointer-events": "none" }
1882
+ }, [
1883
+ b("div", null, [
1884
+ w(l.$slots, "plot-comment", {
1885
+ plot: { ...t, textAlign: s(A)(t, !0, 16, !0).anchor, flexAlign: s(A)(t, !0, 16).anchor, isFirstLoad: P.value }
1886
+ }, void 0, !0)
1887
+ ])
1888
+ ], 8, Xa)) : f("", !0),
1889
+ q(t) && e.value.type === "polar" ? (u(), i("foreignObject", {
1890
+ key: 1,
1891
+ x: e.value.style.chart.comments.offsetX + (Te(v.value[o].middlePoint) === "end" ? s(z)({ initX: v.value[o].middlePoint.x, initY: v.value[o].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x - e.value.style.chart.comments.width : Te(v.value[o].middlePoint) === "middle" ? s(z)({ initX: v.value[o].middlePoint.x, initY: v.value[o].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x - e.value.style.chart.comments.width / 2 : s(z)({ initX: v.value[o].middlePoint.x, initY: v.value[o].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x),
1892
+ y: $l(v.value[o]) + e.value.style.chart.comments.offsetY,
1893
+ width: e.value.style.chart.comments.width,
1894
+ height: "200",
1895
+ style: I({
1896
+ transition: P.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1897
+ overflow: "visible",
1898
+ pointerEvents: "none"
1899
+ })
1900
+ }, [
1901
+ b("div", null, [
1902
+ w(l.$slots, "plot-comment", {
1903
+ plot: { ...t, textAlign: Te(v.value[o].middlePoint), flexAlign: Te(v.value[o].middlePoint), isFirstLoad: P.value }
1904
+ }, void 0, !0)
1905
+ ])
1906
+ ], 12, Na)) : f("", !0)
1907
+ ])) : f("", !0)
1908
+ ], 10, Ta))), 128)),
1909
+ w(l.$slots, "svg", { svg: n.value }, void 0, !0)
1910
+ ], 512)
1911
+ ], 14, Fo)),
1912
+ l.$slots.watermark ? (u(), i("div", Ra, [
1913
+ w(l.$slots, "watermark", ee(te({ isPrinting: s(K) || s(Z) })), void 0, !0)
1914
+ ])) : f("", !0),
1915
+ b("div", {
1916
+ id: `legend-bottom-${c.value}`
1917
+ }, null, 8, Va),
1918
+ dt.value ? (u(), Pe(jl, {
1919
+ key: 5,
1920
+ to: e.value.style.chart.legend.position === "top" ? `#legend-top-${c.value}` : `#legend-bottom-${c.value}`
1921
+ }, [
1922
+ b("div", {
1923
+ ref_key: "chartLegend",
1924
+ ref: ut
1925
+ }, [
1926
+ e.value.style.chart.legend.show ? (u(), Pe(To, {
1927
+ key: `legend_${ct.value}`,
1928
+ legendSet: Bt.value,
1929
+ config: kl.value,
1930
+ onClickMarker: a[3] || (a[3] = ({ i: t }) => Xe(t))
1931
+ }, Rt({
1932
+ item: C(({ legend: t, index: o }) => [
1933
+ b("div", {
1934
+ style: I(`opacity:${O.value.includes(o) ? 0.5 : 1}`),
1935
+ onClick: (r) => t.segregate()
1936
+ }, ke(t.display), 13, Ua)
1937
+ ]),
1938
+ _: 2
1939
+ }, [
1940
+ l.$slots.pattern ? {
1941
+ name: "legend-pattern",
1942
+ fn: C(({ legend: t, index: o }) => [
1943
+ wt(Ao, {
1944
+ shape: t.shape,
1945
+ radius: 30,
1946
+ stroke: "none",
1947
+ plot: { x: 30, y: 30 },
1948
+ fill: `url(#pattern_${c.value}_${o})`
1949
+ }, null, 8, ["shape", "fill"])
1950
+ ]),
1951
+ key: "0"
1952
+ } : void 0
1953
+ ]), 1032, ["legendSet", "config"])) : f("", !0),
1954
+ w(l.$slots, "legend", { legend: Bt.value }, void 0, !0)
1955
+ ], 512)
1956
+ ], 8, ["to"])) : f("", !0),
1957
+ l.$slots.source ? (u(), i("div", {
1958
+ key: 6,
1959
+ ref_key: "source",
1960
+ ref: He,
1961
+ dir: "auto"
1962
+ }, [
1963
+ w(l.$slots, "source", {}, void 0, !0)
1964
+ ], 512)) : f("", !0),
1965
+ l.$slots.hollow ? (u(), i("div", Ha, [
1966
+ w(l.$slots, "hollow", ee(te({
1967
+ total: Q.value,
1968
+ average: zt.value,
1969
+ dataset: R.value
1970
+ })), void 0, !0)
1971
+ ])) : f("", !0),
1972
+ wt(s(Re), {
1973
+ show: m.value.showTooltip && S.value,
1974
+ backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1975
+ color: e.value.style.chart.tooltip.color,
1976
+ fontSize: e.value.style.chart.tooltip.fontSize,
1977
+ borderRadius: e.value.style.chart.tooltip.borderRadius,
1978
+ borderColor: e.value.style.chart.tooltip.borderColor,
1979
+ borderWidth: e.value.style.chart.tooltip.borderWidth,
1980
+ backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1981
+ position: e.value.style.chart.tooltip.position,
1982
+ offsetY: e.value.style.chart.tooltip.offsetY,
1983
+ parent: L.value,
1984
+ content: V.value,
1985
+ isCustom: Ze.value,
1986
+ isFullscreen: Oe.value,
1987
+ smooth: e.value.style.chart.tooltip.smooth,
1988
+ backdropFilter: e.value.style.chart.tooltip.backdropFilter,
1989
+ smoothForce: e.value.style.chart.tooltip.smoothForce,
1990
+ smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThrehsold
1991
+ }, {
1992
+ "tooltip-before": C(() => [
1993
+ w(l.$slots, "tooltip-before", ee(te({ ...Ot.value })), void 0, !0)
1994
+ ]),
1995
+ "tooltip-after": C(() => [
1996
+ w(l.$slots, "tooltip-after", ee(te({ ...Ot.value })), void 0, !0)
1997
+ ]),
1998
+ _: 3
1999
+ }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
2000
+ D.value && e.value.userOptions.buttons.table ? (u(), Pe(Wl(et.value.component), Vt({ key: 8 }, et.value.props, {
2001
+ ref_key: "tableUnit",
2002
+ ref: Ie,
2003
+ onClose: tl
2004
+ }), Rt({
2005
+ content: C(() => [
2006
+ (u(), Pe(s(at), {
2007
+ key: `table_${it.value}`,
2008
+ colNames: pt.value.colNames,
2009
+ head: pt.value.head,
2010
+ body: pt.value.body,
2011
+ config: pt.value.config,
2012
+ title: e.value.table.useDialog ? "" : et.value.title,
2013
+ withCloseButton: !e.value.table.useDialog,
2014
+ onClose: tl
2015
+ }, {
2016
+ th: C(({ th: t }) => [
2017
+ b("div", {
2018
+ innerHTML: t,
2019
+ style: { display: "flex", "align-items": "center" }
2020
+ }, null, 8, Ga)
2021
+ ]),
2022
+ td: C(({ td: t }) => [
2023
+ nl(ke(t.name ? t.name : isNaN(Number(t)) ? t.includes("%") ? t : s(ge)(
2024
+ e.value.style.chart.layout.labels.percentage.formatter,
2025
+ t,
2026
+ s(ie)({
2027
+ v: t,
2028
+ s: "%",
2029
+ r: e.value.style.chart.layout.labels.percentage.rounding
2030
+ })
2031
+ ) : s(ge)(
2032
+ e.value.style.chart.layout.labels.value.formatter,
2033
+ t,
2034
+ s(ie)({
2035
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
2036
+ v: t,
2037
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
2038
+ r: e.value.style.chart.layout.labels.value.rounding
2039
+ })
2040
+ )), 1)
2041
+ ]),
2042
+ _: 1
2043
+ }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
2044
+ ]),
2045
+ _: 2
2046
+ }, [
2047
+ e.value.table.useDialog ? {
2048
+ name: "title",
2049
+ fn: C(() => [
2050
+ nl(ke(et.value.title), 1)
2051
+ ]),
2052
+ key: "0"
2053
+ } : void 0,
2054
+ e.value.table.useDialog ? {
2055
+ name: "actions",
2056
+ fn: C(() => [
2057
+ b("button", {
2058
+ tabindex: "0",
2059
+ class: "vue-ui-user-options-button",
2060
+ onClick: a[4] || (a[4] = (t) => Yt(e.value.userOptions.callbacks.csv))
2061
+ }, [
2062
+ wt(s(ot), {
2063
+ name: "excel",
2064
+ stroke: et.value.props.color
2065
+ }, null, 8, ["stroke"])
2066
+ ])
2067
+ ]),
2068
+ key: "1"
2069
+ } : void 0
2070
+ ]), 1040)) : f("", !0),
2071
+ s(ne) ? (u(), Pe(mo, { key: 9 })) : f("", !0)
2072
+ ], 46, Mo));
2073
+ }
2074
+ }, Wa = /* @__PURE__ */ Lo(ja, [["__scopeId", "data-v-b3b68a05"]]), hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2075
+ __proto__: null,
2076
+ default: Wa
2077
+ }, Symbol.toStringTag, { value: "Module" }));
2078
+ export {
2079
+ Wa as V,
2080
+ hn as a,
2081
+ vn as v
2082
+ };