vue-data-ui 3.22.13 → 3.23.0

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 (224) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +13 -1
  3. package/dist/{Arrow-DKx74WtM.js → Arrow-o2qHNvrC.js} +1 -1
  4. package/dist/{BaseDraggableDialog-3n8udWmh.js → BaseDraggableDialog-qTnfhLBz.js} +2 -2
  5. package/dist/{BaseIcon-CP5RWnqt.js → BaseIcon-91MZoczJ.js} +4 -3
  6. package/dist/{BaseLegendToggle-DsWphmIb.js → BaseLegendToggle-CtAPwzr2.js} +1 -1
  7. package/dist/{BaseZoomControls-C9_ygNN4.js → BaseZoomControls-rdzlicuz.js} +2 -2
  8. package/dist/{ColorPicker-3N_HVgXs.js → ColorPicker-CIAkdPrj.js} +2 -2
  9. package/dist/{DataTable-DzPEVvSo.js → DataTable-D4tM9s5Y.js} +2 -2
  10. package/dist/HillActions-BWhxHlrj.js +187 -0
  11. package/dist/{Legend-C0xAnJdO.js → Legend-CQTRlzK-.js} +2 -2
  12. package/dist/{NonSvgPenAndPaper-B_mE5UbR.js → NonSvgPenAndPaper-Cawacw1W.js} +19 -19
  13. package/dist/{PackageVersion-B6Hokxw9.js → PackageVersion--QCMh5k_.js} +1 -1
  14. package/dist/{PenAndPaper-CSMVXpg2.js → PenAndPaper-cE4J8-rA.js} +11 -11
  15. package/dist/{Shape-BfnXr1nJ.js → Shape-BPMV94Ij.js} +3 -3
  16. package/dist/{Slicer-C6qNUmZ4.js → Slicer-5yIrdoJv.js} +15 -15
  17. package/dist/SlicerPreview-DvjLV2TW.js +1689 -0
  18. package/dist/{SparkTooltip-uoUiL_P8.js → SparkTooltip-BaYtEKS6.js} +6 -6
  19. package/dist/Title-BODtwViI.js +87 -0
  20. package/dist/{Tooltip-CA1rtSyl.js → Tooltip-CMTGxeYO.js} +1 -1
  21. package/dist/{UserOptions-DzAFK9cY.js → UserOptions-3ujTo3LD.js} +2 -2
  22. package/dist/components/arrow.js +1 -1
  23. package/dist/components/vue-ui-3d-bar.js +1 -1
  24. package/dist/components/vue-ui-accordion.js +1 -1
  25. package/dist/components/vue-ui-age-pyramid.js +1 -1
  26. package/dist/components/vue-ui-annotator.js +1 -1
  27. package/dist/components/vue-ui-bullet.js +1 -1
  28. package/dist/components/vue-ui-bump.js +1 -1
  29. package/dist/components/vue-ui-candlestick.js +1 -1
  30. package/dist/components/vue-ui-carousel-table.js +1 -1
  31. package/dist/components/vue-ui-chestnut.js +1 -1
  32. package/dist/components/vue-ui-chord.js +1 -1
  33. package/dist/components/vue-ui-circle-pack.js +1 -1
  34. package/dist/components/vue-ui-cursor.js +1 -1
  35. package/dist/components/vue-ui-dag.js +1 -1
  36. package/dist/components/vue-ui-dashboard.js +1 -1
  37. package/dist/components/vue-ui-digits.js +1 -1
  38. package/dist/components/vue-ui-donut-evolution.js +1 -1
  39. package/dist/components/vue-ui-donut.js +1 -1
  40. package/dist/components/vue-ui-dumbbell.js +1 -1
  41. package/dist/components/vue-ui-flow.js +1 -1
  42. package/dist/components/vue-ui-funnel.js +1 -1
  43. package/dist/components/vue-ui-galaxy.js +1 -1
  44. package/dist/components/vue-ui-gauge.js +1 -1
  45. package/dist/components/vue-ui-geo.js +1 -1
  46. package/dist/components/vue-ui-gizmo.js +1 -1
  47. package/dist/components/vue-ui-heatmap.js +1 -1
  48. package/dist/components/vue-ui-hill.js +2 -0
  49. package/dist/components/vue-ui-history-plot.js +1 -1
  50. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  51. package/dist/components/vue-ui-icon.js +1 -1
  52. package/dist/components/vue-ui-kpi.js +1 -1
  53. package/dist/components/vue-ui-mini-loader.js +1 -1
  54. package/dist/components/vue-ui-molecule.js +1 -1
  55. package/dist/components/vue-ui-mood-radar.js +1 -1
  56. package/dist/components/vue-ui-nested-donuts.js +1 -1
  57. package/dist/components/vue-ui-onion.js +1 -1
  58. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  59. package/dist/components/vue-ui-quadrant.js +1 -1
  60. package/dist/components/vue-ui-quick-chart.js +1 -1
  61. package/dist/components/vue-ui-radar.js +1 -1
  62. package/dist/components/vue-ui-rating.js +1 -1
  63. package/dist/components/vue-ui-relation-circle.js +1 -1
  64. package/dist/components/vue-ui-ridgeline.js +1 -1
  65. package/dist/components/vue-ui-rings.js +1 -1
  66. package/dist/components/vue-ui-scatter.js +1 -1
  67. package/dist/components/vue-ui-skeleton.js +1 -1
  68. package/dist/components/vue-ui-smiley.js +1 -1
  69. package/dist/components/vue-ui-spark-trend.js +1 -1
  70. package/dist/components/vue-ui-sparkbar.js +1 -1
  71. package/dist/components/vue-ui-sparkgauge.js +1 -1
  72. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  73. package/dist/components/vue-ui-sparkline.js +1 -1
  74. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  75. package/dist/components/vue-ui-stackbar.js +1 -1
  76. package/dist/components/vue-ui-stackline.js +1 -1
  77. package/dist/components/vue-ui-strip-plot.js +1 -1
  78. package/dist/components/vue-ui-table-heatmap.js +1 -1
  79. package/dist/components/vue-ui-table-sparkline.js +1 -1
  80. package/dist/components/vue-ui-table.js +1 -1
  81. package/dist/components/vue-ui-thermometer.js +1 -1
  82. package/dist/components/vue-ui-timer.js +1 -1
  83. package/dist/components/vue-ui-tiremarks.js +1 -1
  84. package/dist/components/vue-ui-treemap.js +1 -1
  85. package/dist/components/vue-ui-vertical-bar.js +1 -1
  86. package/dist/components/vue-ui-waffle.js +1 -1
  87. package/dist/components/vue-ui-wheel.js +1 -1
  88. package/dist/components/vue-ui-word-cloud.js +1 -1
  89. package/dist/components/vue-ui-world.js +1 -1
  90. package/dist/components/vue-ui-xy-canvas.js +1 -1
  91. package/dist/components/vue-ui-xy.js +1 -1
  92. package/dist/{dom-to-png-BdAFKZQg.js → dom-to-png-4tdMNGPX.js} +1 -1
  93. package/dist/exposedLib-DWLRqRhv.js +25 -0
  94. package/dist/{img-Bikk1dGb.js → img-DIQG5q8T.js} +1 -1
  95. package/dist/{labelUtils-BUhssos9.js → labelUtils-C5lnc_xc.js} +1 -1
  96. package/dist/{lib-CFm_J26b.js → lib-BuMGJ_a0.js} +216 -173
  97. package/dist/{package-DmDydylu.js → package-BMc_ZieJ.js} +1 -1
  98. package/dist/{pdf-zmz3l2uy.js → pdf-Cnz4NKM9.js} +1 -1
  99. package/dist/{render-common-BIG8JYGK.js → render-common-Ktg2LZFG.js} +21 -21
  100. package/dist/ssr/vue-ui-donut.js +1 -1
  101. package/dist/ssr/vue-ui-xy.js +1 -1
  102. package/dist/ssr.js +2 -2
  103. package/dist/style.css +1 -1
  104. package/dist/types/vue-data-ui.d.ts +493 -0
  105. package/dist/types/vue-ui-hill.d.ts +90 -0
  106. package/dist/useAutoSizeLabelsInsideViewbox-DvDwcwi_.js +122 -0
  107. package/dist/{useConfig-C0V0eG7L.js → useConfig-BilxnBNr.js} +767 -476
  108. package/dist/useHints-Dq_w2E8B.js +66 -0
  109. package/dist/{useNestedProp-BY6DNN3i.js → useNestedProp--NSEmhOH.js} +1 -1
  110. package/dist/{useObjectBindings-Djwpii4d.js → useObjectBindings-Cwq7NcQz.js} +3 -2
  111. package/dist/{usePrinter-BH-xle1O.js → usePrinter-BFvi4jVy.js} +2 -2
  112. package/dist/useTransitions-g_zBREk2.js +39 -0
  113. package/dist/utils.js +14 -14
  114. package/dist/{vue-data-ui-rkzh6EkO.js → vue-data-ui-EsawKe_W.js} +85 -81
  115. package/dist/vue-data-ui.js +77 -76
  116. package/dist/vue-ui-3d-bar-RSUS2xpL.js +1849 -0
  117. package/dist/{vue-ui-accordion-UA88lv4d.js → vue-ui-accordion-61MlW-Ge.js} +4 -4
  118. package/dist/vue-ui-age-pyramid-CgnPWA93.js +1263 -0
  119. package/dist/vue-ui-annotator-DBRT85HG.js +2913 -0
  120. package/dist/vue-ui-bullet-Bc3-WaN1.js +724 -0
  121. package/dist/{vue-ui-bump-BS7RCf0Z.js → vue-ui-bump-Dvv3iSKr.js} +332 -295
  122. package/dist/{vue-ui-candlestick-BZSGDKrM.js → vue-ui-candlestick-DvvsrIdp.js} +464 -440
  123. package/dist/vue-ui-carousel-table-DtsNVim8.js +463 -0
  124. package/dist/vue-ui-chestnut-ArloORzP.js +2068 -0
  125. package/dist/{vue-ui-chord-D6G7ceE-.js → vue-ui-chord-xX5gWZy8.js} +430 -424
  126. package/dist/vue-ui-circle-pack-D8wykmqg.js +1638 -0
  127. package/dist/{vue-ui-cursor-BpN5MsXM.js → vue-ui-cursor-CxgE6Phh.js} +61 -61
  128. package/dist/{vue-ui-dag-BzgOgXzU.js → vue-ui-dag-C9Sf9vH7.js} +924 -916
  129. package/dist/vue-ui-dashboard-bGmaglAj.js +520 -0
  130. package/dist/{vue-ui-digits-OMPrn8fb.js → vue-ui-digits-DgDE-_Fn.js} +58 -50
  131. package/dist/vue-ui-donut-B_n6wF6B.js +2440 -0
  132. package/dist/{vue-ui-donut-Cp5NbZ1r.js → vue-ui-donut-Bmo149AR.js} +113 -113
  133. package/dist/{vue-ui-donut-evolution-DHVi5rOn.js → vue-ui-donut-evolution-D6vH_hfx.js} +528 -447
  134. package/dist/vue-ui-dumbbell-BX4Ao_wR.js +1582 -0
  135. package/dist/{vue-ui-flow-BusUK3H0.js → vue-ui-flow-Bshw8pT_.js} +415 -407
  136. package/dist/vue-ui-funnel-CjYosIik.js +797 -0
  137. package/dist/vue-ui-galaxy-CvXgy-dy.js +1111 -0
  138. package/dist/vue-ui-gauge-CByT0_vF.js +953 -0
  139. package/dist/{vue-ui-geo-CyFgFKlh.js → vue-ui-geo-C-gSZL2q.js} +378 -363
  140. package/dist/{vue-ui-gizmo-DdeXwCQp.js → vue-ui-gizmo-CJdxyPID.js} +57 -49
  141. package/dist/{vue-ui-heatmap-D8-qJ7fg.js → vue-ui-heatmap-DEEKv8ip.js} +498 -490
  142. package/dist/vue-ui-hill-D7LYAgAL.js +1768 -0
  143. package/dist/{vue-ui-history-plot-C2Aqk2ON.js → vue-ui-history-plot-BhcU94Pt.js} +553 -556
  144. package/dist/vue-ui-horizontal-bar-CfFye5tL.js +1733 -0
  145. package/dist/vue-ui-kpi-DCBnNfTb.js +104 -0
  146. package/dist/vue-ui-mini-loader-CtWpqnLW.js +133 -0
  147. package/dist/vue-ui-molecule-D3igGyOy.js +958 -0
  148. package/dist/{vue-ui-mood-radar-BiOjxFEN.js → vue-ui-mood-radar-sl6DMxqR.js} +349 -341
  149. package/dist/{vue-ui-nested-donuts-Cl1HVvDp.js → vue-ui-nested-donuts-aS4YzaB3.js} +449 -413
  150. package/dist/vue-ui-onion-EhPTZpW_.js +1258 -0
  151. package/dist/vue-ui-parallel-coordinate-plot-DE9wTmQQ.js +1455 -0
  152. package/dist/{vue-ui-quadrant-B21LkUc8.js → vue-ui-quadrant-SaY_RPSE.js} +625 -617
  153. package/dist/vue-ui-quick-chart-CJ9rejnj.js +2389 -0
  154. package/dist/{vue-ui-radar-CyzAyVos.js → vue-ui-radar-CaNen5Fj.js} +356 -310
  155. package/dist/vue-ui-rating--K7rX2an.js +360 -0
  156. package/dist/vue-ui-relation-circle-FLs8vOxQ.js +925 -0
  157. package/dist/vue-ui-ridgeline-Beg5hshN.js +1663 -0
  158. package/dist/{vue-ui-rings-FtcdX8xl.js → vue-ui-rings-BevKD8P-.js} +449 -423
  159. package/dist/{vue-ui-scatter-Cp_-2ahf.js → vue-ui-scatter-CNA7jF-o.js} +721 -702
  160. package/dist/{vue-ui-skeleton-COytVrfN.js → vue-ui-skeleton-B9ZP1w-i.js} +395 -387
  161. package/dist/{vue-ui-smiley-Da2jgkb7.js → vue-ui-smiley-DYnqqk6u.js} +128 -120
  162. package/dist/{vue-ui-spark-trend-DC2KUlEY.js → vue-ui-spark-trend-R0ebpg-G.js} +132 -117
  163. package/dist/{vue-ui-sparkbar-DdxQOFIF.js → vue-ui-sparkbar-DYC3By0v.js} +119 -111
  164. package/dist/{vue-ui-sparkgauge-DTA-fORH.js → vue-ui-sparkgauge-Bw6no-In.js} +76 -68
  165. package/dist/vue-ui-sparkhistogram-DvRKy8rq.js +590 -0
  166. package/dist/{vue-ui-sparkline-DcR_N-zT.js → vue-ui-sparkline-Dz1uzBos.js} +389 -364
  167. package/dist/vue-ui-sparkstackbar-DlnPdZih.js +692 -0
  168. package/dist/vue-ui-stackbar-B-THcavY.js +2350 -0
  169. package/dist/vue-ui-stackline-3dBPoI0h.js +2464 -0
  170. package/dist/{vue-ui-strip-plot-NLCwYvyw.js → vue-ui-strip-plot-ACeYOoHj.js} +505 -484
  171. package/dist/vue-ui-table-heatmap-DVwMqzje.js +364 -0
  172. package/dist/{vue-ui-table-AM9brdwU.js → vue-ui-table-rFy16bp0.js} +512 -504
  173. package/dist/{vue-ui-table-sparkline-BE6DAvur.js → vue-ui-table-sparkline-CABJzK8p.js} +207 -181
  174. package/dist/vue-ui-thermometer-CVQ-H69Q.js +777 -0
  175. package/dist/{vue-ui-timer-BZM5ITG9.js → vue-ui-timer-Bm8LpsnI.js} +66 -58
  176. package/dist/{vue-ui-tiremarks-BCncDpHX.js → vue-ui-tiremarks-DB3f5qiz.js} +127 -119
  177. package/dist/vue-ui-treemap-DP0Sx8Y8.js +1760 -0
  178. package/dist/vue-ui-waffle-iPpdk1Bm.js +1412 -0
  179. package/dist/vue-ui-wheel-BJkEYfLj.js +892 -0
  180. package/dist/{vue-ui-word-cloud-D7R7nhk1.js → vue-ui-word-cloud-B2sxtel9.js} +440 -432
  181. package/dist/{vue-ui-world-DZBt-07p.js → vue-ui-world-BBQZLnzm.js} +343 -335
  182. package/dist/vue-ui-xy-ChZg7AtI.js +1364 -0
  183. package/dist/{vue-ui-xy-CluEZ7lS.js → vue-ui-xy-DZj5DT-q.js} +1633 -1587
  184. package/dist/{vue-ui-xy-canvas-7YSYRdwr.js → vue-ui-xy-canvas-BN2u0bOJ.js} +456 -430
  185. package/dist/vue_ui_hill-dnltu0L-.js +368 -0
  186. package/package.json +2 -2
  187. package/dist/SlicerPreview-Cw6WMVhG.js +0 -1689
  188. package/dist/Title-BuPs74IB.js +0 -87
  189. package/dist/exposedLib-Ciw6TGtP.js +0 -25
  190. package/dist/useAutoSizeLabelsInsideViewbox-C9RNjsGv.js +0 -50
  191. package/dist/useMountedDelay-BAjrhRJb.js +0 -14
  192. package/dist/vue-ui-3d-bar-D5xHEWr1.js +0 -1824
  193. package/dist/vue-ui-age-pyramid-CAJg01c7.js +0 -1246
  194. package/dist/vue-ui-annotator-q3ZKx6ua.js +0 -2905
  195. package/dist/vue-ui-bullet-ByeaWGfI.js +0 -709
  196. package/dist/vue-ui-carousel-table-DO5NRXvX.js +0 -455
  197. package/dist/vue-ui-chestnut-BfeSPeEh.js +0 -2042
  198. package/dist/vue-ui-circle-pack-Cqmlw7AV.js +0 -1610
  199. package/dist/vue-ui-dashboard-DLvGJXJY.js +0 -512
  200. package/dist/vue-ui-donut-ZIRebAWc.js +0 -2418
  201. package/dist/vue-ui-dumbbell-gDYjU2oF.js +0 -1564
  202. package/dist/vue-ui-funnel-BtaYaU0r.js +0 -781
  203. package/dist/vue-ui-galaxy-BMp-HzDh.js +0 -1076
  204. package/dist/vue-ui-gauge-CBou0cFE.js +0 -925
  205. package/dist/vue-ui-horizontal-bar-BuwxI7d1.js +0 -1689
  206. package/dist/vue-ui-kpi-ByxoO01r.js +0 -96
  207. package/dist/vue-ui-mini-loader-D9pprk2c.js +0 -125
  208. package/dist/vue-ui-molecule-BqJJq49_.js +0 -932
  209. package/dist/vue-ui-onion-CRQOxurS.js +0 -1199
  210. package/dist/vue-ui-parallel-coordinate-plot-Dhn18RtR.js +0 -1412
  211. package/dist/vue-ui-quick-chart-DAhSXYnp.js +0 -2443
  212. package/dist/vue-ui-rating-DbxK-ftN.js +0 -352
  213. package/dist/vue-ui-relation-circle-Cb33DMZo.js +0 -917
  214. package/dist/vue-ui-ridgeline-D7aArzQk.js +0 -1627
  215. package/dist/vue-ui-sparkhistogram-D1oFTrvt.js +0 -575
  216. package/dist/vue-ui-sparkstackbar-BlFio0lP.js +0 -674
  217. package/dist/vue-ui-stackbar-Cu13EdVa.js +0 -2322
  218. package/dist/vue-ui-stackline-DKL0o_-3.js +0 -2427
  219. package/dist/vue-ui-table-heatmap-CSI482KG.js +0 -338
  220. package/dist/vue-ui-thermometer-D6Czx7Fb.js +0 -769
  221. package/dist/vue-ui-treemap-BOEYCOdk.js +0 -1727
  222. package/dist/vue-ui-waffle-BrM8IHdG.js +0 -1367
  223. package/dist/vue-ui-wheel-BNsajigQ.js +0 -884
  224. package/dist/vue-ui-xy-Dt_1bSBT.js +0 -1364
@@ -0,0 +1,2440 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { $ as t, Bt as n, D as r, Jt as i, K as a, Kt as o, Mt as s, Pt as c, S as l, Vt as u, X as d, at as ee, b as te, et as f, f as p, h as ne, i as m, j as h, jt as re, kt as ie, ot as ae, p as g, pt as oe, q as se, s as ce, t as le, tt as ue, w as de, xt as fe } from "./lib-BuMGJ_a0.js";
3
+ import { n as pe, t as me } from "./useHints-Dq_w2E8B.js";
4
+ import { t as he } from "./useConfig-BilxnBNr.js";
5
+ import { t as ge } from "./usePrinter-BFvi4jVy.js";
6
+ import { n as _e, t as ve } from "./BaseScanner-DZvpgOjM.js";
7
+ import { t as ye } from "./useSvgExport-Ba9qBr9M.js";
8
+ import { t as be } from "./useNestedProp--NSEmhOH.js";
9
+ import { t as xe } from "./useThemeCheck-C43Tcqmk.js";
10
+ import { t as Se } from "./img-DIQG5q8T.js";
11
+ import { n as Ce } from "./Title-BODtwViI.js";
12
+ import { t as we } from "./Shape-BPMV94Ij.js";
13
+ import { t as Te } from "./_plugin-vue_export-helper-B3ysoDQm.js";
14
+ import { l as Ee, t as De } from "./useResponsive-ZtArZtUf.js";
15
+ import { t as Oe } from "./DefGrad-DVBqDjhO.js";
16
+ import { t as ke } from "./BaseLegendToggle-CtAPwzr2.js";
17
+ import { t as Ae } from "./A11yDataTable-DdRsVULz.js";
18
+ import { t as je } from "./useUserOptionState-DK-_1ddE.js";
19
+ import { t as Me } from "./useChartAccessibility-DYqac8yF.js";
20
+ import { n as Ne, t as Pe } from "./labelUtils-C5lnc_xc.js";
21
+ import { t as Fe } from "./vue_ui_donut-BDGqG07h.js";
22
+ import { t as Ie } from "./Legend-CQTRlzK-.js";
23
+ import { Fragment as _, Teleport as Le, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createSlots as Re, createTextVNode as ze, createVNode as Be, defineAsyncComponent as Ve, guardReactiveProps as C, mergeProps as He, nextTick as Ue, normalizeClass as We, normalizeProps as w, normalizeStyle as T, onBeforeUnmount as Ge, onMounted as Ke, openBlock as E, ref as D, renderList as O, renderSlot as k, resolveDynamicComponent as qe, shallowRef as Je, toDisplayString as Ye, toRefs as Xe, unref as A, useSlots as Ze, vShow as Qe, watch as $e, withCtx as j, withDirectives as et } from "vue";
24
+ //#region src/useSmallArcLayouts.js
25
+ function tt(e) {
26
+ let { FINAL_CONFIG: t, noGhostDonut: n, svg: r, padding: i, labels_inline_fontSize: a, minSize: o, findArcMidpoint: s, calcMarkerOffsetX: c, calcMarkerOffsetY: l, animatingIndex: u, segregated: d, isSmallArc: ee } = e;
27
+ return { smallArcLayoutsClassic: v(() => {
28
+ if (t.value.type !== "classic") return {};
29
+ let e = {}, te = n.value || [];
30
+ if (!te.length) return e;
31
+ let f = r.value.width / 2, p = r.value.height / 2, ne = i.value.top + 16, m = r.value.height - i.value.bottom - 16, h = a.value, re = h / 3, ie = h * 1.5, ae = f - (o.value + 6), g = f + (o.value + 6), oe = !!t.value.style.chart.layout.curvedMarkers;
32
+ function se({ midX: e, midY: t, bandX: n, bandY: r }) {
33
+ if (!oe) return `M ${e} ${t} L ${e} ${r} L ${n} ${r}`;
34
+ let i = n < f ? -1 : 1, a = n - e, o = r - t, s = Math.sqrt(a * a + o * o) || 1, c = e - f, l = t - p, u = Math.sqrt(c * c + l * l) || 1, d = c / u, ee = l / u, te = u + 9;
35
+ function ne({ x: e, y: t }) {
36
+ let n = e - f, r = t - p, i = Math.sqrt(n * n + r * r) || 1;
37
+ if (i >= te) return {
38
+ x: e,
39
+ y: t
40
+ };
41
+ let a = te / i;
42
+ return {
43
+ x: f + n * a,
44
+ y: p + r * a
45
+ };
46
+ }
47
+ if (s < 56) {
48
+ let i = a / s, c = -(o / s), l = i, u = (e + n) * .5, te = (t + r) * .5, m = u + c, h = te + l, re = (m - f) * (m - f) + (h - p) * (h - p), ie = u - c, ae = te - l;
49
+ (ie - f) * (ie - f) + (ae - p) * (ae - p) > re && (c = -c, l = -l);
50
+ let g = .78, oe = e + a * g, se = t + o * g, ce = Math.max(0, Math.min(1, (s - 18) / 44)), le = ce * ce * (3 - 2 * ce), ue = 2.5 + le * 4, de = 1 + le * 2.5;
51
+ ue *= .9;
52
+ let fe = ne({
53
+ x: oe + c * ue + d * de,
54
+ y: se + l * ue + ee * de
55
+ });
56
+ return `M ${e} ${t} Q ${fe.x} ${fe.y} ${n} ${r}`;
57
+ }
58
+ let m = s * .34;
59
+ m < 20 && (m = 20), m > 46 && (m = 46);
60
+ let h = s * .46;
61
+ h < 22 && (h = 22), h > 70 && (h = 70);
62
+ let re = {
63
+ x: e + d * m,
64
+ y: t + ee * m
65
+ }, ie = f + i * Math.max(Math.abs(n - f), te), ae = {
66
+ x: n - i * Math.min(h, Math.abs(ie - n) * .75),
67
+ y: r
68
+ }, g = ne(re), se = ne(ae);
69
+ return `M ${e} ${t} C ${g.x} ${g.y} ${se.x} ${se.y} ${n} ${r}`;
70
+ }
71
+ function ce(e) {
72
+ let t = String(e ?? "").split(/\n/g), n = Math.max(0, t.length - 1) * (h * 1.2);
73
+ return ie + n;
74
+ }
75
+ function le({ arc: e, index: t }) {
76
+ let { x: n, y: r } = s(e.path);
77
+ return {
78
+ arc: e,
79
+ index: t,
80
+ midX: n,
81
+ midY: r,
82
+ inlineMarkerX: c(e).x,
83
+ inlineMarkerY: l(e) - 3.5,
84
+ labelHeight: ce(e.name)
85
+ };
86
+ }
87
+ function ue(e) {
88
+ let { arc: t } = e, n = t.seriesIndex ?? 0;
89
+ return u.value === n || d.value.includes(n) ? !1 : ee(t, n);
90
+ }
91
+ function de(e) {
92
+ let t = e.inlineMarkerY < p, n = e.inlineMarkerX < f;
93
+ return t && n ? "TL" : t && !n ? "TR" : !t && n ? "BL" : "BR";
94
+ }
95
+ function fe(e, t) {
96
+ if (t.startsWith("T")) {
97
+ e.sort((e, t) => e.inlineMarkerY - t.inlineMarkerY || e.index - t.index);
98
+ return;
99
+ }
100
+ e.sort((e, t) => t.inlineMarkerY - e.inlineMarkerY || e.index - t.index);
101
+ }
102
+ function pe({ side: e, markerX: t, markerY: n, labelY: r, connectorPath: i }) {
103
+ return {
104
+ side: e,
105
+ labelX: e === "left" ? t - 8 : t + 8,
106
+ labelY: r + re,
107
+ textAnchor: e === "left" ? "end" : "start",
108
+ markerX: t,
109
+ markerY: n,
110
+ connectorPath: i
111
+ };
112
+ }
113
+ function me({ candidateList: t, side: n, bandMarkerX: r, startY: i, direction: a }) {
114
+ let o = i;
115
+ t.forEach((t) => {
116
+ let { index: i, midX: s, midY: c, labelHeight: l } = t, u;
117
+ a === "down" ? (u = o, o += l) : (o -= l, u = o);
118
+ let d = u, ee = se({
119
+ midX: s,
120
+ midY: c,
121
+ bandX: r,
122
+ bandY: d
123
+ });
124
+ e[i] = pe({
125
+ side: n,
126
+ markerX: r,
127
+ markerY: d,
128
+ labelY: u,
129
+ connectorPath: ee
130
+ });
131
+ });
132
+ }
133
+ let he = te.map((e, t) => le({
134
+ arc: e,
135
+ index: t
136
+ })).filter(ue), ge = {
137
+ TL: [],
138
+ TR: [],
139
+ BL: [],
140
+ BR: []
141
+ };
142
+ return he.forEach((e) => {
143
+ ge[de(e)].push(e);
144
+ }), Object.keys(ge).forEach((e) => {
145
+ fe(ge[e], e);
146
+ }), me({
147
+ candidateList: ge.TL,
148
+ side: "left",
149
+ bandMarkerX: ae,
150
+ startY: ne,
151
+ direction: "down"
152
+ }), me({
153
+ candidateList: ge.TR,
154
+ side: "right",
155
+ bandMarkerX: g,
156
+ startY: ne,
157
+ direction: "down"
158
+ }), ge.BL.length > 1 && me({
159
+ candidateList: ge.BL,
160
+ side: "left",
161
+ bandMarkerX: ae,
162
+ startY: m,
163
+ direction: "up"
164
+ }), ge.BR.length > 1 && me({
165
+ candidateList: ge.BR,
166
+ side: "right",
167
+ bandMarkerX: g,
168
+ startY: m,
169
+ direction: "up"
170
+ }), e;
171
+ }) };
172
+ }
173
+ //#endregion
174
+ //#region src/components/vue-ui-donut.vue
175
+ var nt = /* @__PURE__ */ e({ default: () => gn }), rt = ["id"], it = ["id"], at = ["id"], ot = { style: { position: "relative" } }, st = [
176
+ "xmlns",
177
+ "aria-describedby",
178
+ "viewBox"
179
+ ], ct = ["width", "height"], lt = { key: 1 }, ut = { key: 2 }, dt = ["id"], ft = ["id"], pt = ["id"], mt = ["flood-color"], ht = ["id"], gt = ["flood-color"], _t = [
180
+ "d",
181
+ "stroke",
182
+ "filter"
183
+ ], vt = [
184
+ "d",
185
+ "stroke",
186
+ "filter"
187
+ ], yt = [
188
+ "cx",
189
+ "cy",
190
+ "r",
191
+ "fill",
192
+ "filter"
193
+ ], bt = { key: 6 }, xt = ["stroke", "d"], St = [
194
+ "d",
195
+ "fill",
196
+ "stroke",
197
+ "stroke-width",
198
+ "filter"
199
+ ], Ct = { key: 0 }, wt = [
200
+ "d",
201
+ "fill",
202
+ "stroke",
203
+ "stroke-width",
204
+ "filter"
205
+ ], Tt = { key: 0 }, Et = ["stroke", "d"], Dt = { key: 0 }, Ot = [
206
+ "d",
207
+ "stroke",
208
+ "stroke-width",
209
+ "filter"
210
+ ], kt = { key: 1 }, At = [
211
+ "d",
212
+ "fill",
213
+ "stroke",
214
+ "stroke-width",
215
+ "filter"
216
+ ], jt = [
217
+ "d",
218
+ "fill",
219
+ "stroke",
220
+ "stroke-width",
221
+ "filter"
222
+ ], Mt = { key: 1 }, Nt = [
223
+ "cx",
224
+ "cy",
225
+ "r",
226
+ "fill",
227
+ "stroke",
228
+ "stroke-width"
229
+ ], Pt = [
230
+ "cx",
231
+ "cy",
232
+ "r",
233
+ "fill",
234
+ "stroke",
235
+ "stroke-width"
236
+ ], Ft = { key: 0 }, It = [
237
+ "d",
238
+ "fill",
239
+ "stroke",
240
+ "stroke-width"
241
+ ], Lt = [
242
+ "cx",
243
+ "cy",
244
+ "r",
245
+ "stroke"
246
+ ], Rt = [
247
+ "cx",
248
+ "cy",
249
+ "r",
250
+ "fill"
251
+ ], zt = [
252
+ "cx",
253
+ "cy",
254
+ "r"
255
+ ], Bt = { key: 0 }, Vt = [
256
+ "d",
257
+ "stroke",
258
+ "fill",
259
+ "onMouseenter",
260
+ "onMouseleave",
261
+ "onClick"
262
+ ], Ht = { key: 1 }, Ut = [
263
+ "cx",
264
+ "cy",
265
+ "r"
266
+ ], Wt = [
267
+ "x",
268
+ "y",
269
+ "fill",
270
+ "font-size"
271
+ ], Gt = [
272
+ "x",
273
+ "y",
274
+ "fill",
275
+ "font-size"
276
+ ], Kt = [
277
+ "x",
278
+ "y",
279
+ "fill",
280
+ "font-size"
281
+ ], qt = [
282
+ "x",
283
+ "y",
284
+ "fill",
285
+ "font-size"
286
+ ], Jt = ["filter", "opacity"], Yt = { key: 0 }, Xt = ["x", "y"], Zt = { key: 1 }, Qt = [
287
+ "cx",
288
+ "cy",
289
+ "fill",
290
+ "stroke",
291
+ "filter",
292
+ "onClick",
293
+ "onMouseenter",
294
+ "onMouseleave"
295
+ ], $t = [
296
+ "text-anchor",
297
+ "x",
298
+ "y",
299
+ "onClick",
300
+ "onMouseenter",
301
+ "onMouseleave",
302
+ "innerHTML"
303
+ ], en = [
304
+ "text-anchor",
305
+ "x",
306
+ "y",
307
+ "fill",
308
+ "font-size",
309
+ "onClick",
310
+ "onMouseenter",
311
+ "onMouseleave"
312
+ ], tn = [
313
+ "text-anchor",
314
+ "x",
315
+ "y",
316
+ "fill",
317
+ "font-size",
318
+ "onClick",
319
+ "onMouseenter",
320
+ "onMouseleave",
321
+ "innerHTML"
322
+ ], nn = [
323
+ "cx",
324
+ "cy",
325
+ "fill",
326
+ "stroke",
327
+ "filter",
328
+ "onClick",
329
+ "onMouseenter",
330
+ "onMouseleave"
331
+ ], rn = [
332
+ "text-anchor",
333
+ "x",
334
+ "y",
335
+ "onClick",
336
+ "onMouseenter",
337
+ "onMouseleave",
338
+ "innerHTML"
339
+ ], an = [
340
+ "text-anchor",
341
+ "x",
342
+ "y",
343
+ "fill",
344
+ "font-size",
345
+ "onClick",
346
+ "onMouseenter",
347
+ "onMouseleave"
348
+ ], on = [
349
+ "text-anchor",
350
+ "x",
351
+ "y",
352
+ "fill",
353
+ "font-size",
354
+ "onClick",
355
+ "onMouseenter",
356
+ "onMouseleave",
357
+ "innerHTML"
358
+ ], sn = { key: 2 }, cn = [
359
+ "x",
360
+ "y",
361
+ "width"
362
+ ], ln = [
363
+ "x",
364
+ "y",
365
+ "width"
366
+ ], un = {
367
+ key: 0,
368
+ style: {
369
+ position: "absolute",
370
+ top: "100%",
371
+ left: "0",
372
+ width: "100%"
373
+ },
374
+ "data-dom-to-png-ignore": "",
375
+ "aria-hidden": "true"
376
+ }, dn = {
377
+ key: 5,
378
+ class: "vue-data-ui-watermark"
379
+ }, fn = ["id"], pn = ["onClick"], mn = {
380
+ key: 8,
381
+ class: "vue-ui-donut-hollow"
382
+ }, hn = ["innerHTML"], gn = /*#__PURE__*/ Te({
383
+ __name: "vue-ui-donut",
384
+ props: {
385
+ config: {
386
+ type: Object,
387
+ default() {
388
+ return {};
389
+ }
390
+ },
391
+ dataset: {
392
+ type: Array,
393
+ default() {
394
+ return [];
395
+ }
396
+ }
397
+ },
398
+ emits: [
399
+ "selectLegend",
400
+ "selectDatapoint",
401
+ "copyAlt"
402
+ ],
403
+ setup(e, { expose: Te, emit: nt }) {
404
+ let gn = Ve(() => import("./Tooltip-CMTGxeYO.js")), _n = Ve(() => import("./BaseIcon-91MZoczJ.js").then((e) => e.n)), vn = Ve(() => import("./vue-ui-accordion-61MlW-Ge.js").then((e) => e.n)), yn = Ve(() => import("./DataTable-D4tM9s5Y.js")), bn = Ve(() => import("./PenAndPaper-cE4J8-rA.js").then((e) => e.t)), xn = Ve(() => import("./UserOptions-3ujTo3LD.js").then((e) => e.n)), Sn = Ve(() => import("./PackageVersion--QCMh5k_.js").then((e) => e.t)), Cn = Ve(() => import("./BaseDraggableDialog-qTnfhLBz.js").then((e) => e.n)), { vue_ui_donut: wn } = he(), { isThemeValid: Tn, warnInvalidTheme: En } = xe(), Dn = Ze(), M = e, On = v({
405
+ get() {
406
+ return !!M.dataset && M.dataset.length;
407
+ },
408
+ set(e) {
409
+ return e;
410
+ }
411
+ }), N = Je(null), kn = D(null), An = D(null), jn = D(null), Mn = Je(null), Nn = Je(null), Pn = Je(null), Fn = Je(null), In = Je(null), Ln = Je(null), Rn = D(0), zn = D(0), Bn = D(0), Vn = D(!1), Hn = D(null), Un = D(null), Wn = D(!1), Gn = D(!1), Kn = D(null), qn = D({
412
+ x: 0,
413
+ y: 0
414
+ }), Jn = D("pointer"), Yn = D(!1), Xn = v({
415
+ get: () => L.value.style.chart.layout.labels.percentage.fontSize,
416
+ set: (e) => e
417
+ }), P = v({
418
+ get: () => L.value.style.chart.layout.labels.name.fontSize,
419
+ set: (e) => e
420
+ }), Zn = v({
421
+ get: () => L.value.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,
422
+ set: (e) => e
423
+ }), Qn = !1, $n = () => {
424
+ !L.value.autoSize || Qn || (Qn = !0, requestAnimationFrame(() => {
425
+ Qn = !1;
426
+ let e = L.value, t = kn.value, n = z.value;
427
+ if (!e.autoSize || !t || !n) return;
428
+ let [r, i, a, o] = n.getAttribute("viewBox").split(" ").map(Number), s = {
429
+ x: r,
430
+ y: i,
431
+ width: a,
432
+ height: o
433
+ }, c = [
434
+ {
435
+ selector: ".vue-data-ui-datalabel-value",
436
+ baseSize: e.style.chart.layout.labels.percentage.fontSize,
437
+ minSize: e.style.chart.layout.labels.percentage.minFontSize,
438
+ sizeRef: Xn
439
+ },
440
+ {
441
+ selector: ".vue-data-ui-datalabel-name",
442
+ baseSize: e.style.chart.layout.labels.name.fontSize,
443
+ minSize: e.style.chart.layout.labels.name.minFontSize,
444
+ sizeRef: P
445
+ },
446
+ {
447
+ selector: ".vue-data-ui-datalabel-inline",
448
+ baseSize: e.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,
449
+ minSize: e.style.chart.layout.labels.name.minFontSize,
450
+ sizeRef: Zn
451
+ }
452
+ ];
453
+ c.map((e) => t.querySelectorAll(e.selector).length).reduce((e, t) => e + t, 0) !== 0 && c.forEach(({ selector: e, baseSize: n, minSize: r, sizeRef: i }) => {
454
+ t.querySelectorAll(e).forEach((e) => {
455
+ i.value = ce({
456
+ el: e,
457
+ bounds: s,
458
+ currentFontSize: n,
459
+ minFontSize: r,
460
+ attempts: 200,
461
+ padding: 1
462
+ });
463
+ });
464
+ });
465
+ }));
466
+ };
467
+ Ke(async () => {
468
+ Vn.value = !0, nr(), requestAnimationFrame($n);
469
+ });
470
+ let er;
471
+ Ke(() => {
472
+ N.value && (er = new ResizeObserver((e) => {
473
+ for (let t of e) {
474
+ let { width: e, height: n } = t.contentRect;
475
+ if (e > 0 && n > 0) {
476
+ $n();
477
+ break;
478
+ }
479
+ }
480
+ }), er.observe(N.value.parentElement));
481
+ }), Ge(() => {
482
+ er?.disconnect();
483
+ }), Ge(() => {
484
+ Pn.value && (Fn.value && Pn.value.unobserve(Fn.value), Pn.value.disconnect());
485
+ });
486
+ let tr = v(() => !!L.value.debug);
487
+ function nr() {
488
+ if (re(M.dataset) ? (ue({
489
+ componentName: "VueUiDonut",
490
+ type: "dataset",
491
+ debug: tr.value
492
+ }), On.value = !1, dr.value = !0) : (M.dataset.forEach((e, t) => {
493
+ oe({
494
+ datasetObject: e,
495
+ requiredAttributes: ["name", "values"]
496
+ }).forEach((e) => {
497
+ ue({
498
+ componentName: "VueUiDonut",
499
+ type: "datasetSerieAttribute",
500
+ property: e,
501
+ index: t,
502
+ debug: tr.value
503
+ }), On.value = !1, dr.value = !0;
504
+ });
505
+ }), M.dataset.forEach((e, t) => {
506
+ (!e.name || e.name === "") && ue({
507
+ componentName: "VueUiDonut",
508
+ type: "datasetAttributeEmpty",
509
+ property: "name",
510
+ index: t,
511
+ debug: tr.value
512
+ });
513
+ })), re(M.dataset) || (dr.value = L.value.loading), L.value.responsive) {
514
+ let e = Ee(() => {
515
+ let { width: e, height: t } = De({
516
+ chart: N.value,
517
+ title: L.value.style.chart.title.text ? Mn.value : null,
518
+ legend: L.value.style.chart.legend.show ? Nn.value : null,
519
+ source: In.value,
520
+ noTitle: Ln.value,
521
+ padding: L.value.autoSize ? void 0 : Sr.value
522
+ });
523
+ requestAnimationFrame(() => {
524
+ V.value.width = e, V.value.height = t, $n();
525
+ });
526
+ });
527
+ Pn.value && (Fn.value && Pn.value.unobserve(Fn.value), Pn.value.disconnect()), Pn.value = new ResizeObserver(e), Fn.value = N.value.parentNode, Pn.value.observe(Fn.value);
528
+ }
529
+ }
530
+ let F = D(se()), rr = D(!1), ir = D(""), I = D(null), ar = D(0);
531
+ function or() {
532
+ let e = be({
533
+ userConfig: M.config,
534
+ defaultConfig: wn
535
+ }), t = {}, n = e.theme;
536
+ if (!n) t = e;
537
+ else if (!Tn.value(e)) En(e), t = e;
538
+ else {
539
+ let r = be({
540
+ userConfig: Fe[n] || M.config,
541
+ defaultConfig: e
542
+ });
543
+ t = {
544
+ ...be({
545
+ userConfig: M.config,
546
+ defaultConfig: r
547
+ }),
548
+ customPalette: e.customPalette.length ? e.customPalette : o[n] || c
549
+ };
550
+ }
551
+ return t;
552
+ }
553
+ let L = D(or());
554
+ pe({
555
+ config: () => L.value,
556
+ dataset: () => M.dataset,
557
+ component: "VueUiDonut",
558
+ rules: [
559
+ me.singleSeries,
560
+ me.emptyArray,
561
+ {
562
+ test: (e) => e.length > 6,
563
+ message: [
564
+ "👀 The number of series is > 6. Consider:",
565
+ "",
566
+ "▶️ Grouping small values dynamically into a single \"Other\" series.",
567
+ "",
568
+ "▶️ Using filters to let users choose a maximum number of series to display.",
569
+ "",
570
+ "▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read."
571
+ ]
572
+ }
573
+ ]
574
+ });
575
+ let sr = v(() => L.value.userOptions.useCursorPointer), cr = v(() => i({
576
+ defaultConfig: {
577
+ useCssAnimation: !1,
578
+ table: { show: !1 },
579
+ startAnimation: { show: !1 },
580
+ userOptions: { show: !1 },
581
+ style: { chart: {
582
+ backgroundColor: "#99999930",
583
+ layout: { labels: {
584
+ dataLabels: { show: !1 },
585
+ hollow: {
586
+ average: { show: !1 },
587
+ total: { show: !1 }
588
+ },
589
+ value: { show: !1 }
590
+ } },
591
+ legend: {
592
+ backgroundColor: "transparent",
593
+ showValue: !1,
594
+ showPercentage: !1
595
+ },
596
+ title: {
597
+ color: "#1A1A1A",
598
+ subtitle: { color: "#5A5A5A" }
599
+ }
600
+ } }
601
+ },
602
+ userConfig: L.value.skeletonConfig ?? {}
603
+ })), { loading: lr, FINAL_DATASET: ur, manualLoading: dr, skeletonDataset: fr } = _e({
604
+ ...Xe(M),
605
+ FINAL_CONFIG: L,
606
+ prepareConfig: or,
607
+ skeletonDataset: M.config?.skeletonDataset ?? [
608
+ {
609
+ name: "",
610
+ values: [3],
611
+ color: "#BABABA"
612
+ },
613
+ {
614
+ name: "",
615
+ values: [2],
616
+ color: "#AAAAAA"
617
+ },
618
+ {
619
+ name: "",
620
+ values: [1],
621
+ color: "#CACACA"
622
+ }
623
+ ],
624
+ skeletonConfig: i({
625
+ defaultConfig: L.value,
626
+ userConfig: cr.value
627
+ })
628
+ }), R = D(!0), pr = D(0), mr = D(!1), hr = null;
629
+ function gr(e = 1e3) {
630
+ return new Promise((t) => {
631
+ let n = performance.now();
632
+ function r(i) {
633
+ let a = i - n, o = Math.min(a / e, 1), s = f(o);
634
+ pr.value = s, o < 1 ? hr = requestAnimationFrame(r) : (pr.value = 1, hr = null, t());
635
+ }
636
+ hr !== null && cancelAnimationFrame(hr), pr.value = 0, hr = requestAnimationFrame(r);
637
+ });
638
+ }
639
+ $e(() => lr.value, async (e) => {
640
+ if (e || mr.value) return;
641
+ let t = ur.value === fr, n = L.value.startAnimation?.show;
642
+ !t && n ? (mr.value = !0, await gr(L.value.startAnimation.durationMs || 1e3)) : pr.value = 1, R.value = !1;
643
+ }, { immediate: !0 });
644
+ let { userOptionsVisible: _r, setUserOptionsVisibility: vr, keepUserOptionState: yr } = je({ config: L.value }), { svgRef: z } = Me({ config: L.value.style.chart.title });
645
+ function br() {
646
+ vr(!0);
647
+ }
648
+ function xr() {
649
+ vr(!1);
650
+ }
651
+ $e(() => M.config, (e) => {
652
+ lr.value || (L.value = or()), _r.value = !L.value.userOptions.showOnChartHover, nr(), Rn.value += 1, zn.value += 1, Bn.value += 1, B.value.dataLabels.show = L.value.style.chart.layout.labels.dataLabels.show, B.value.showTable = L.value.table.show, B.value.showTooltip = L.value.style.chart.tooltip.show, V.value.height = L.value.style.chart.height, V.value.width = L.value.style.chart.width;
653
+ }, { deep: !0 });
654
+ let Sr = v(() => {
655
+ let { top: e, right: t, bottom: n, left: r } = L.value.style.chart.padding;
656
+ return {
657
+ css: `padding:${e}px ${t}px ${n}px ${r}px`,
658
+ top: e,
659
+ right: t,
660
+ bottom: n,
661
+ left: r
662
+ };
663
+ }), { isPrinting: Cr, isImaging: wr, generatePdf: Tr, generateImage: Er } = ge({
664
+ elementId: `donut__${F.value}`,
665
+ fileName: L.value.style.chart.title.text || "vue-ui-donut",
666
+ options: L.value.userOptions.print
667
+ }), Dr = v(() => L.value.userOptions.show && !L.value.style.chart.title.text), Or = v(() => de(L.value.customPalette)), B = D({
668
+ dataLabels: { show: L.value.style.chart.layout.labels.dataLabels.show },
669
+ showTable: L.value.table.show,
670
+ showTooltip: L.value.style.chart.tooltip.show
671
+ });
672
+ $e(L, () => {
673
+ B.value = {
674
+ dataLabels: { show: L.value.style.chart.layout.labels.dataLabels.show },
675
+ showTable: L.value.table.show,
676
+ showTooltip: L.value.style.chart.tooltip.show
677
+ };
678
+ }, { immediate: !0 });
679
+ let V = D({
680
+ height: L.value.style.chart.height,
681
+ width: L.value.style.chart.width
682
+ }), kr = v(() => {
683
+ if (L.value.pie) return G.value;
684
+ let e = L.value.style.chart.layout.donut.strokeWidth / 512, t = Math.min(V.value.width, V.value.height) * e, n = t > G.value ? G.value : t;
685
+ return Math.max(n, 12 * (1 + e));
686
+ }), Ar = nt, H = v(() => ur.value.sort((e, t) => {
687
+ let n = Array.isArray(e.values) ? e.values.reduce((e, t) => e + t, 0) : e.value ?? 0, r = Array.isArray(t.values) ? t.values.reduce((e, t) => e + t, 0) : t.value ?? 0;
688
+ return e.ghost && !t.ghost ? 1 : t.ghost && !e.ghost ? -1 : r - n;
689
+ }).map((e, t) => ({
690
+ name: e.name,
691
+ color: l(e.color) || Or.value[t] || c[t] || c[t % c.length],
692
+ value: te(e.values.reduce((e, t) => e + t, 0)),
693
+ absoluteValues: e.values,
694
+ comment: e.comment || "",
695
+ patternIndex: t,
696
+ seriesIndex: t,
697
+ ghost: !1,
698
+ pattern: `pattern_${F.value}_${t}`
699
+ })));
700
+ $e(() => M.dataset, (e) => {
701
+ Array.isArray(e) && e.length > 0 && (dr.value = !1);
702
+ }, { immediate: !0 });
703
+ let U = Je(H.value);
704
+ $e(() => H.value, (e) => {
705
+ U.value = e, requestAnimationFrame($n);
706
+ });
707
+ function jr() {
708
+ return H.value.map((e) => ({
709
+ name: e.name,
710
+ color: e.color,
711
+ value: e.value
712
+ }));
713
+ }
714
+ let W = D([]), Mr = D(!1), Nr = D(null);
715
+ function Pr() {
716
+ Ar("selectLegend", Hr.value.map((e) => ({
717
+ name: e.name,
718
+ color: e.color,
719
+ value: e.value
720
+ })));
721
+ }
722
+ function Fr({ from: e, to: t, duration: n, onUpdate: r, onDone: i, easing: a = f }) {
723
+ let o = performance.now();
724
+ function s(c) {
725
+ let l = Math.min((c - o) / n, 1), u = a(l);
726
+ r(e + (t - e) * u, l), l < 1 ? requestAnimationFrame(s) : (r(t, 1), i && i());
727
+ }
728
+ requestAnimationFrame(s);
729
+ }
730
+ function Ir() {
731
+ W.value.length ? W.value = [] : Ur.value.forEach((e, t) => {
732
+ W.value.push(t);
733
+ }), Pr();
734
+ }
735
+ function Lr(e) {
736
+ let t = H.value.find((t, n) => n === e), n = U.value.find((t, n) => n === e).value;
737
+ if (W.value.includes(e)) {
738
+ W.value = W.value.filter((t) => t !== e);
739
+ let r = t.value;
740
+ function i() {
741
+ U.value = U.value.map((t, n) => e === n ? {
742
+ ...t,
743
+ value: r
744
+ } : t), Pr();
745
+ }
746
+ function a() {
747
+ Mr.value = !0, Nr.value = e, Fr({
748
+ from: n,
749
+ to: r,
750
+ duration: L.value.serieToggleAnimation.durationMs,
751
+ onUpdate: (t, n) => {
752
+ U.value = U.value.map((n, r) => e === r ? {
753
+ ...n,
754
+ value: t
755
+ } : n), requestAnimationFrame($n);
756
+ },
757
+ onDone: () => {
758
+ i(), Mr.value = !1, Nr.value = null;
759
+ }
760
+ });
761
+ }
762
+ L.value.serieToggleAnimation.show && L.value.type === "classic" ? a() : (i(), requestAnimationFrame($n));
763
+ } else if (W.value.length < H.value.length - 1) {
764
+ function t() {
765
+ W.value.push(e), U.value = U.value.map((t, n) => e === n ? {
766
+ ...t,
767
+ value: 0
768
+ } : t), Pr();
769
+ }
770
+ function r() {
771
+ Mr.value = !0, Nr.value = e, Fr({
772
+ from: n,
773
+ to: 0,
774
+ duration: L.value.serieToggleAnimation.durationMs,
775
+ onUpdate: (t, n) => {
776
+ U.value = U.value.map((n, r) => e === r ? {
777
+ ...n,
778
+ value: t
779
+ } : n), requestAnimationFrame($n);
780
+ },
781
+ onDone: () => {
782
+ t(), requestAnimationFrame($n), Mr.value = !1, Nr.value = null;
783
+ }
784
+ });
785
+ }
786
+ L.value.serieToggleAnimation.show && L.value.type === "classic" ? r() : t();
787
+ }
788
+ }
789
+ function Rr(e) {
790
+ return H.value.length ? H.value.find((t) => t.name === e) || (L.value.debug && console.warn(`VueUiDonut - Series name not found "${e}"`), null) : (L.value.debug && console.warn("VueUiDonut - There are no series to show."), null);
791
+ }
792
+ function zr(e) {
793
+ let t = Rr(e);
794
+ t !== null && W.value.includes(t.seriesIndex) && Lr(t.seriesIndex);
795
+ }
796
+ function Br(e) {
797
+ let t = Rr(e);
798
+ t !== null && (W.value.includes(t.seriesIndex) || Lr(t.seriesIndex));
799
+ }
800
+ let Vr = v(() => ur.value.reduce((e, t) => e + t.values.reduce((e, t) => e + t, 0), 0)), Hr = v(() => {
801
+ if (R.value && !lr.value) {
802
+ let e = pr.value, t = H.value.map((t) => ({
803
+ ...t,
804
+ value: t.value * e,
805
+ color: t.color,
806
+ ghost: !1
807
+ })), n = Vr.value * (1 - e);
808
+ return n > 0 && t.push({
809
+ name: "__ghost__",
810
+ value: n,
811
+ color: "transparent",
812
+ ghost: !0
813
+ }), t;
814
+ } else return U.value.forEach((e) => {
815
+ if ([null, void 0].includes(e.values)) return {
816
+ ...e,
817
+ values: []
818
+ };
819
+ }), U.value.map((e, t) => ({
820
+ ...e,
821
+ seriesIndex: t
822
+ })).filter((e, t) => !W.value.includes(t));
823
+ }), Ur = v(() => ur.value.map((e, t) => {
824
+ let n = (e.values || []).reduce((e, t) => e + t, 0), r = n / ur.value.map((e) => (e.values || []).reduce((e, t) => e + t, 0)).reduce((e, t) => e + t, 0);
825
+ return {
826
+ name: e.name,
827
+ color: l(e.color) || Or.value[t] || c[t] || c[t % c.length],
828
+ value: n,
829
+ shape: "circle",
830
+ patternIndex: t,
831
+ proportion: r
832
+ };
833
+ }).map((e, t) => {
834
+ let n = m(L.value.style.chart.layout.labels.value.formatter, e.value, d({
835
+ p: L.value.style.chart.layout.labels.dataLabels.prefix,
836
+ v: e.value,
837
+ s: L.value.style.chart.layout.labels.dataLabels.suffix,
838
+ r: L.value.style.chart.legend.roundingValue
839
+ }), {
840
+ datapoint: e,
841
+ index: t
842
+ }), r = m(L.value.style.chart.layout.labels.percentage.formatter, ei(e), d({
843
+ v: ei(e),
844
+ s: "%",
845
+ r: L.value.style.chart.legend.roundingPercentage
846
+ })), i = gi({
847
+ val: n,
848
+ percentage: W.value.includes(t) ? `${hi(e.proportion * 100)}%` : r,
849
+ showVal: L.value.style.chart.legend.showValue,
850
+ showPercentage: L.value.style.chart.legend.showPercentage,
851
+ config: L.value.style.chart.legend
852
+ });
853
+ return {
854
+ ...e,
855
+ opacity: W.value.includes(t) ? .5 : 1,
856
+ segregate: () => !Mr.value && Lr(t),
857
+ isSegregated: W.value.includes(t),
858
+ display: `${e.name}${L.value.style.chart.legend.showPercentage || L.value.style.chart.legend.showValue ? ": " : ""}${i}`
859
+ };
860
+ })), Wr = v(() => ({
861
+ cy: "donut-div-legend",
862
+ backgroundColor: L.value.style.chart.legend.backgroundColor,
863
+ color: L.value.style.chart.legend.color,
864
+ fontSize: L.value.style.chart.legend.fontSize,
865
+ paddingBottom: 12,
866
+ fontWeight: L.value.style.chart.legend.bold ? "bold" : ""
867
+ })), G = v(() => {
868
+ let e = L.value.style.chart.layout.donut.radiusRatio, t = Math.max(.1, Math.min(.50001, e)), n = Math.min(V.value.width * t, V.value.height * t);
869
+ return Math.max(12, n);
870
+ }), K = v(() => ie({ series: Hr.value }, V.value.width / 2, V.value.height / 2, G.value, G.value, 1.99999, 2, 1, 360, 105.25, kr.value)), Gr = v(() => Math.abs(Hr.value.map((e) => e.value).reduce((e, t) => e + t, 0)) > 0), Kr = v(() => ie({ series: [{
871
+ value: 1,
872
+ color: L.value.style.chart.layout.donut.emptyFill,
873
+ name: "_",
874
+ seriesIndex: 0,
875
+ patternIndex: -1,
876
+ ghost: !1,
877
+ absoluteValues: [1]
878
+ }] }, V.value.width / 2, V.value.height / 2, G.value, G.value, 1.99999, 2, 1, 360, 105.25, kr.value)), q = v(() => K.value.filter((e) => !e.ghost)), J = v(() => {
879
+ let e = Math.max(...Hr.value.map((e) => e.value));
880
+ return h({
881
+ series: Hr.value.map((t) => t.value / e),
882
+ center: {
883
+ x: V.value.width / 2,
884
+ y: V.value.height / 2
885
+ },
886
+ maxRadius: Math.min(V.value.width, V.value.height) / 3,
887
+ hasGhost: R.value
888
+ });
889
+ });
890
+ function qr(e) {
891
+ return e.x > V.value.width / 2 + 6 ? "start" : e.x < V.value.width / 2 - 6 ? "end" : "middle";
892
+ }
893
+ function Jr(e) {
894
+ return e.middlePoint.y > V.value.height / 2 ? s({
895
+ initX: e.middlePoint.x,
896
+ initY: e.middlePoint.y,
897
+ offset: 100,
898
+ centerX: V.value.width / 2,
899
+ centerY: V.value.height / 2
900
+ }).y : s({
901
+ initX: e.middlePoint.x,
902
+ initY: e.middlePoint.y,
903
+ offset: 0,
904
+ centerX: V.value.width / 2,
905
+ centerY: V.value.height / 2
906
+ }).y - 100;
907
+ }
908
+ function Y(e) {
909
+ return e.proportion * 100 > L.value.style.chart.layout.labels.dataLabels.hideUnderValue;
910
+ }
911
+ function Yr(e, t) {
912
+ let n = L.value.style.chart.layout.labels.dataLabels.hideUnderValue, r = L.value.style.chart.layout.labels.dataLabels.smallArcClusterThreshold, i = (Qr.value[t] ?? e.proportion ?? 0) * 100;
913
+ return i > n && i <= r;
914
+ }
915
+ let { smallArcLayoutsClassic: X } = tt({
916
+ FINAL_CONFIG: L,
917
+ noGhostDonut: q,
918
+ svg: V,
919
+ padding: Sr,
920
+ labels_inline_fontSize: Zn,
921
+ minSize: G,
922
+ findArcMidpoint: ee,
923
+ calcMarkerOffsetX: p,
924
+ calcMarkerOffsetY: g,
925
+ animatingIndex: Nr,
926
+ segregated: W,
927
+ isSmallArc: Yr
928
+ });
929
+ function Xr(e, t) {
930
+ let n = e.value / Zr(t);
931
+ return isNaN(n) ? 0 : m(L.value.style.chart.layout.labels.percentage.formatter, n * 100, d({
932
+ v: n * 100,
933
+ s: "%",
934
+ r: L.value.style.chart.layout.labels.percentage.rounding
935
+ }), { datapoint: e });
936
+ }
937
+ function Zr(e) {
938
+ return [...e].map((e) => e.value).reduce((e, t) => e + t, 0);
939
+ }
940
+ let Z = v(() => Hr.value.map((e) => e.value).reduce((e, t) => e + t, 0)), Qr = v(() => {
941
+ let e = H.value.reduce((e, t) => e + t.value, 0);
942
+ return e <= 0 ? [] : H.value.map((t) => t.value / e);
943
+ }), $r = v(() => Z.value / Hr.value.length);
944
+ function ei(e) {
945
+ return Mr.value ? e.proportion * 100 : e.value / Z.value * 100;
946
+ }
947
+ let ti = D(null), ni = D(!1);
948
+ function ri({ datapoint: e, seriesIndex: t }) {
949
+ L.value.events.datapointLeave && L.value.events.datapointLeave({
950
+ datapoint: e,
951
+ seriesIndex: t
952
+ }), rr.value = !1, I.value = null, Kn.value = null, Jn.value = "pointer";
953
+ }
954
+ function Q({ datapoint: e, relativeIndex: t, seriesIndex: n, show: r = !1, triggerMode: i = "pointer" }) {
955
+ L.value.events.datapointEnter && L.value.events.datapointEnter({
956
+ datapoint: e,
957
+ seriesIndex: n
958
+ }), Jn.value = i, Kn.value = t, ti.value = {
959
+ datapoint: e,
960
+ seriesIndex: n,
961
+ config: L.value,
962
+ series: H.value
963
+ }, rr.value = r, I.value = t;
964
+ let a = "", o = L.value.style.chart.tooltip.customFormat;
965
+ if (ni.value = !1, fe(o)) try {
966
+ let t = o({
967
+ seriesIndex: n,
968
+ datapoint: e,
969
+ series: H.value,
970
+ config: L.value
971
+ });
972
+ typeof t == "string" && (ir.value = t, ni.value = !0);
973
+ } catch {
974
+ console.warn("Custom format cannot be applied."), ni.value = !1;
975
+ }
976
+ ni.value || (a += `<div style="width:100%;text-align:center;border-bottom:1px solid ${L.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`, a += `<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="${e.color}"/>${Dn.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${F.value}_${n})"/>` : ""}</svg>`, a += `<b>${gi({
977
+ showVal: L.value.style.chart.tooltip.showValue,
978
+ showPercentage: L.value.style.chart.tooltip.showPercentage,
979
+ val: `<span>${m(L.value.style.chart.layout.labels.value.formatter, e.value, d({
980
+ p: L.value.style.chart.layout.labels.dataLabels.prefix,
981
+ v: e.value,
982
+ s: L.value.style.chart.layout.labels.dataLabels.suffix,
983
+ r: L.value.style.chart.tooltip.roundingValue
984
+ }), {
985
+ datapoint: e,
986
+ relativeIndex: t,
987
+ seriesIndex: n
988
+ })}</span>`,
989
+ percentage: m(L.value.style.chart.layout.labels.percentage.formatter, e.proportion * 100, d({
990
+ v: e.proportion * 100,
991
+ s: "%",
992
+ r: L.value.style.chart.tooltip.roundingPercentage
993
+ }), {
994
+ datapoint: e,
995
+ relativeIndex: t,
996
+ seriesIndex: n
997
+ }),
998
+ config: L.value.style.chart.tooltip
999
+ })}</b></div>`, L.value.style.chart.comments.showInTooltip && e.comment && (a += `<div class="vue-data-ui-tooltip-comment" style="background:${e.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${e.color}">${e.comment}</div>`), ir.value = `<div>${a}</div>`);
1000
+ }
1001
+ function ii(e, t) {
1002
+ let n = X.value[t];
1003
+ if (n) return {
1004
+ textAnchor: n.textAnchor,
1005
+ x: n.labelX,
1006
+ y: n.labelY
1007
+ };
1008
+ let r = p(e, !0, 12);
1009
+ return {
1010
+ textAnchor: r.anchor,
1011
+ x: r.x,
1012
+ y: g(e)
1013
+ };
1014
+ }
1015
+ function ai(e, t, n) {
1016
+ let { textAnchor: r, x: i } = ii(e, t), a = _i(e), o = `
1017
+ <tspan
1018
+ class="vue-data-ui-datalabel-inline"
1019
+ fill="${L.value.style.chart.layout.labels.percentage.color}"
1020
+ font-size="${n ? Zn.value : Xn.value}px"
1021
+ style="font-weight:${L.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}"
1022
+ >${a}</tspan>
1023
+ `, s = String(e.name ?? "").split(/\n/g), c = "";
1024
+ return s.forEach((e, t) => {
1025
+ t === 0 ? c += `
1026
+ <tspan
1027
+ class="${n ? "vue-data-ui-datalabel-inline" : "vue-data-ui-datalabel-name"}"
1028
+ fill="${L.value.style.chart.layout.labels.name.color}"
1029
+ font-size="${n ? Zn.value : P.value}px"
1030
+ style="font-weight:${L.value.style.chart.layout.labels.name.bold ? "bold" : ""}"
1031
+ >${e}</tspan>
1032
+ ` : c += `
1033
+ <tspan
1034
+ class="${n ? "vue-data-ui-datalabel-inline" : "vue-data-ui-datalabel-name"}"
1035
+ x="${i}"
1036
+ dy="${(n ? Zn.value : P.value) * 1.2}"
1037
+ fill="${L.value.style.chart.layout.labels.name.color}"
1038
+ font-size="${n ? Zn.value : P.value}px"
1039
+ style="font-weight:${L.value.style.chart.layout.labels.name.bold ? "bold" : ""}"
1040
+ >${e}</tspan>
1041
+ `;
1042
+ }), r === "end" ? `${L.value.style.chart.layout.labels.name.show ? c : ""}${o}` : `${o}${L.value.style.chart.layout.labels.name.show ? c : ""}`;
1043
+ }
1044
+ function oi(e, t) {
1045
+ let n = J.value[t].middlePoint, r = qr(n), i = s({
1046
+ initX: n.x,
1047
+ initY: n.y,
1048
+ offset: 42,
1049
+ centerX: V.value.width / 2,
1050
+ centerY: V.value.height / 2
1051
+ }), a = i.x;
1052
+ i.y;
1053
+ let o = _i(e), c = `
1054
+ <tspan
1055
+ class="vue-data-ui-datalabel-value"
1056
+ fill="${L.value.style.chart.layout.labels.percentage.color}"
1057
+ font-size="${Xn.value}px"
1058
+ style="font-weight:${L.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"}"
1059
+ >${o}</tspan>
1060
+ `, l = String(e.name ?? "").split(/\n/g), u = "";
1061
+ return l.forEach((e, t) => {
1062
+ t === 0 ? u += `
1063
+ <tspan
1064
+ class="vue-data-ui-datalabel-name"
1065
+ fill="${L.value.style.chart.layout.labels.name.color}"
1066
+ font-size="${P.value}px"
1067
+ style="font-weight:${L.value.style.chart.layout.labels.name.bold ? "bold" : "normal"}"
1068
+ >${e}</tspan>
1069
+ ` : u += `
1070
+ <tspan
1071
+ class="vue-data-ui-datalabel-name"
1072
+ x="${a}"
1073
+ dy="${P.value * 1.2}"
1074
+ fill="${L.value.style.chart.layout.labels.name.color}"
1075
+ font-size="${P.value}px"
1076
+ style="font-weight:${L.value.style.chart.layout.labels.name.bold ? "bold" : "normal"}"
1077
+ >${e}</tspan>
1078
+ `;
1079
+ }), r === "end" ? `${L.value.style.chart.layout.labels.name.show ? u : ""}${c}` : `${c}${L.value.style.chart.layout.labels.name.show ? u : ""}`;
1080
+ }
1081
+ function si(e) {
1082
+ return L.value.useBlurOnHover && ![null, void 0].includes(I.value) && I.value !== e ? `url(#blur_${F.value})` : "";
1083
+ }
1084
+ function ci(e) {
1085
+ if (!Mr.value || Nr.value === null || e.seriesIndex !== Nr.value) return 1;
1086
+ let t = (e.proportion ?? 0) * 100, n = L.value.style.chart.layout.labels.dataLabels.hideUnderValue, r = L.value.style.chart.layout.labels.dataLabels.smallArcClusterThreshold + 2, i = n;
1087
+ return t >= r ? 1 : t <= i ? 0 : (t - i) / (r - i);
1088
+ }
1089
+ let li = v(() => ({
1090
+ head: Hr.value.map((e) => ({
1091
+ name: e.name,
1092
+ color: e.color
1093
+ })),
1094
+ body: Hr.value.map((e) => e.value)
1095
+ }));
1096
+ function ui(e = null) {
1097
+ Ue(() => {
1098
+ let n = li.value.head.map((e, t) => [
1099
+ [e.name],
1100
+ [li.value.body[t]],
1101
+ [isNaN(li.value.body[t] / Z.value) ? "-" : li.value.body[t] / Z.value * 100]
1102
+ ]), i = r([
1103
+ [L.value.style.chart.title.text],
1104
+ [L.value.style.chart.title.subtitle.text],
1105
+ [
1106
+ [""],
1107
+ ["val"],
1108
+ ["%"]
1109
+ ]
1110
+ ].concat(n));
1111
+ e ? e(i) : t({
1112
+ csvContent: i,
1113
+ title: L.value.style.chart.title.text || "vue-ui-donut"
1114
+ });
1115
+ });
1116
+ }
1117
+ let di = v(() => {
1118
+ let e = [
1119
+ " <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>",
1120
+ d({
1121
+ p: L.value.style.chart.layout.labels.dataLabels.prefix,
1122
+ v: Z.value,
1123
+ s: L.value.style.chart.layout.labels.dataLabels.suffix,
1124
+ r: L.value.table.td.roundingValue
1125
+ }),
1126
+ "100%"
1127
+ ], t = li.value.head.map((e, t) => [
1128
+ {
1129
+ color: e.color,
1130
+ name: e.name || "-"
1131
+ },
1132
+ li.value.body[t],
1133
+ isNaN(li.value.body[t] / Z.value) ? "-" : (li.value.body[t] / Z.value * 100).toFixed(L.value.table.td.roundingPercentage) + "%"
1134
+ ]), n = t.map((e) => e.map((e, t) => t === 0 ? e.name : e)), r = {
1135
+ th: {
1136
+ backgroundColor: L.value.table.th.backgroundColor,
1137
+ color: L.value.table.th.color,
1138
+ outline: L.value.table.th.outline
1139
+ },
1140
+ td: {
1141
+ backgroundColor: L.value.table.td.backgroundColor,
1142
+ color: L.value.table.td.color,
1143
+ outline: L.value.table.td.outline
1144
+ },
1145
+ breakpoint: L.value.table.responsiveBreakpoint
1146
+ };
1147
+ return {
1148
+ colNames: [
1149
+ L.value.table.columnNames.series,
1150
+ L.value.table.columnNames.value,
1151
+ L.value.table.columnNames.percentage
1152
+ ],
1153
+ head: e,
1154
+ body: t,
1155
+ a11yBody: n,
1156
+ config: r
1157
+ };
1158
+ }), fi = D(!1);
1159
+ function pi(e) {
1160
+ fi.value = e, ar.value += 1;
1161
+ }
1162
+ let mi = v(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent));
1163
+ function hi(e) {
1164
+ return Ne({
1165
+ num: e,
1166
+ rounding: L.value.style.chart.legend.roundingPercentage
1167
+ });
1168
+ }
1169
+ function gi({ val: e, percentage: t, showVal: n, showPercentage: r, config: i }) {
1170
+ return Pe({
1171
+ config: i,
1172
+ val: e,
1173
+ percentage: t,
1174
+ showVal: n,
1175
+ showPercentage: r
1176
+ });
1177
+ }
1178
+ function _i(e) {
1179
+ return gi({
1180
+ val: m(L.value.style.chart.layout.labels.value.formatter, e.value, d({
1181
+ p: L.value.style.chart.layout.labels.dataLabels.prefix,
1182
+ v: e.value,
1183
+ s: L.value.style.chart.layout.labels.dataLabels.suffix,
1184
+ r: L.value.style.chart.layout.labels.value.rounding
1185
+ }), { datapoint: e }),
1186
+ percentage: Xr(e, q.value),
1187
+ showVal: L.value.style.chart.layout.labels.value.show,
1188
+ showPercentage: L.value.style.chart.layout.labels.percentage.show,
1189
+ config: L.value.style.chart.layout.labels.dataLabels
1190
+ });
1191
+ }
1192
+ function $(e, t) {
1193
+ L.value.events.datapointClick && L.value.events.datapointClick({
1194
+ datapoint: e,
1195
+ seriesIndex: e.seriesIndex
1196
+ }), Ar("selectDatapoint", {
1197
+ datapoint: e,
1198
+ index: t
1199
+ });
1200
+ }
1201
+ function vi() {
1202
+ B.value.showTable = !B.value.showTable;
1203
+ }
1204
+ function yi() {
1205
+ B.value.dataLabels.show = !B.value.dataLabels.show;
1206
+ }
1207
+ function bi() {
1208
+ B.value.showTooltip = !B.value.showTooltip;
1209
+ }
1210
+ let xi = D(!1);
1211
+ function Si() {
1212
+ xi.value = !xi.value;
1213
+ }
1214
+ async function Ci({ scale: e = 2 } = {}) {
1215
+ if (!N.value) return;
1216
+ let { width: t, height: n } = N.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await Se({
1217
+ domElement: N.value,
1218
+ base64: !0,
1219
+ img: !0,
1220
+ scale: e
1221
+ });
1222
+ return {
1223
+ imageUri: i,
1224
+ base64: a,
1225
+ title: L.value.style.chart.title.text,
1226
+ width: t,
1227
+ height: n,
1228
+ aspectRatio: r
1229
+ };
1230
+ }
1231
+ function wi() {
1232
+ if (!kn.value) return;
1233
+ let { x: e, y: t, width: n, height: r } = kn.value.getBBox();
1234
+ z.value && z.value.setAttribute("viewBox", `${e} ${t} ${n + Math.min(0, e)} ${r + Math.min(0, t)}`);
1235
+ }
1236
+ let Ti = v(() => {
1237
+ let e = L.value.table.useDialog && !L.value.table.show, t = B.value.showTable;
1238
+ return {
1239
+ component: e ? Cn : vn,
1240
+ title: `${L.value.style.chart.title.text}${L.value.style.chart.title.subtitle.text ? `: ${L.value.style.chart.title.subtitle.text}` : ""}`,
1241
+ props: e ? {
1242
+ backgroundColor: L.value.table.th.backgroundColor,
1243
+ color: L.value.table.th.color,
1244
+ headerColor: L.value.table.th.color,
1245
+ headerBg: L.value.table.th.backgroundColor,
1246
+ isFullscreen: fi.value,
1247
+ fullscreenParent: N.value,
1248
+ forcedWidth: Math.min(500, window.innerWidth * .8),
1249
+ isCursorPointer: sr.value
1250
+ } : {
1251
+ hideDetails: !0,
1252
+ config: {
1253
+ open: t,
1254
+ maxHeight: 1e4,
1255
+ body: {
1256
+ backgroundColor: L.value.style.chart.backgroundColor,
1257
+ color: L.value.style.chart.color
1258
+ },
1259
+ head: {
1260
+ backgroundColor: L.value.style.chart.backgroundColor,
1261
+ color: L.value.style.chart.color
1262
+ }
1263
+ }
1264
+ }
1265
+ };
1266
+ });
1267
+ $e(() => B.value.showTable, (e) => {
1268
+ L.value.table.show || (e && L.value.table.useDialog && Hn.value ? Hn.value.open() : "close" in Hn.value && Hn.value.close());
1269
+ });
1270
+ function Ei() {
1271
+ B.value.showTable = !1, Un.value && Un.value.setTableIconState(!1);
1272
+ }
1273
+ let Di = v(() => Ur.value.map((e) => ({
1274
+ ...e,
1275
+ name: e.display
1276
+ }))), Oi = v(() => L.value.style.chart.backgroundColor), ki = v(() => L.value.style.chart.legend), { exportSvg: Ai, getSvg: ji } = ye({
1277
+ svg: z,
1278
+ title: v(() => L.value.style.chart.title),
1279
+ legend: ki,
1280
+ legendItems: Di,
1281
+ backgroundColor: Oi
1282
+ });
1283
+ async function Mi({ isCb: e }) {
1284
+ Gn.value = !0, await Ue();
1285
+ try {
1286
+ if (e) {
1287
+ let { blob: e, url: t, text: n, dataUrl: r } = await ji();
1288
+ await Promise.resolve(L.value.userOptions.callbacks.svg({
1289
+ blob: e,
1290
+ url: t,
1291
+ text: n,
1292
+ dataUrl: r
1293
+ }));
1294
+ } else await Promise.resolve(Ai());
1295
+ } finally {
1296
+ Gn.value = !1;
1297
+ }
1298
+ }
1299
+ function Ni(e) {
1300
+ if (e?.stage === "start") {
1301
+ Wn.value = !0;
1302
+ return;
1303
+ }
1304
+ if (e?.stage === "end") {
1305
+ Wn.value = !1;
1306
+ return;
1307
+ }
1308
+ Er();
1309
+ }
1310
+ async function Pi() {
1311
+ if (Ar("copyAlt", {
1312
+ config: L.value,
1313
+ dataset: U.value
1314
+ }), !L.value.userOptions.callbacks.altCopy) {
1315
+ console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1316
+ return;
1317
+ }
1318
+ await Promise.resolve(L.value.userOptions.callbacks.altCopy({
1319
+ config: L.value,
1320
+ dataset: U.value
1321
+ }));
1322
+ }
1323
+ function Fi() {
1324
+ Kn.value = null, Yn.value = !0;
1325
+ }
1326
+ function Ii() {
1327
+ Kn.value = null, Jn.value = "pointer", rr.value = !1, I.value = null, Yn.value = !1;
1328
+ }
1329
+ function Li(e) {
1330
+ if (!z.value || xi.value || document.activeElement !== z.value || !q.value.length) return;
1331
+ let t = ["ArrowLeft", "ArrowUp"].includes(e.key), n = ["ArrowRight", "ArrowDown"].includes(e.key), r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
1332
+ if (!t && !n && !r && !i) return;
1333
+ if (e.preventDefault(), e.stopPropagation(), i) {
1334
+ Kn.value = null, Jn.value = "pointer", rr.value = !1, I.value = null;
1335
+ return;
1336
+ }
1337
+ if (r) {
1338
+ if (Kn.value === null) return;
1339
+ let e = q.value[Kn.value];
1340
+ if (!e) return;
1341
+ $(e, Kn.value);
1342
+ return;
1343
+ }
1344
+ let a = Kn.value, o = I.value, s = a !== null && a >= 0 && a < q.value.length, c = o !== null && o >= 0 && o < q.value.length;
1345
+ s ? n ? (a += 1, a >= q.value.length && (a = 0)) : t && (--a, a < 0 && (a = q.value.length - 1)) : c ? (a = n ? o + 1 : o - 1, a >= q.value.length && (a = 0), a < 0 && (a = q.value.length - 1)) : a = n ? 0 : q.value.length - 1;
1346
+ let l = q.value[a];
1347
+ l && (Kn.value = a, Ri(a), Q({
1348
+ datapoint: l,
1349
+ relativeIndex: a,
1350
+ seriesIndex: l.seriesIndex,
1351
+ show: !0,
1352
+ triggerMode: "keyboard"
1353
+ }));
1354
+ }
1355
+ function Ri(e) {
1356
+ if (!Number.isFinite(e) || !z.value) return;
1357
+ let t = V.value.width / 2, n = V.value.height / 2;
1358
+ if (L.value.type === "classic") {
1359
+ let r = q.value[e];
1360
+ if (!r?.arcSlice) return;
1361
+ let i = ee(r.arcSlice);
1362
+ if (!i) return;
1363
+ t = i.x, n = i.y;
1364
+ } else {
1365
+ let r = J.value[e]?.middlePoint;
1366
+ if (!r) return;
1367
+ t = r.x, n = r.y;
1368
+ }
1369
+ let r = z.value.getBoundingClientRect();
1370
+ qn.value = {
1371
+ x: r.left + t / V.value.width * r.width,
1372
+ y: r.top + n / V.value.height * r.height
1373
+ };
1374
+ }
1375
+ let zi = v(() => ({
1376
+ headers: di.value?.colNames ?? [],
1377
+ rows: di.value?.a11yBody ?? []
1378
+ }));
1379
+ return Te({
1380
+ autoSize: wi,
1381
+ getData: jr,
1382
+ getImage: Ci,
1383
+ generatePdf: Tr,
1384
+ generateCsv: ui,
1385
+ generateImage: Er,
1386
+ generateSvg: Mi,
1387
+ hideSeries: Br,
1388
+ showSeries: zr,
1389
+ toggleTable: vi,
1390
+ toggleLabels: yi,
1391
+ toggleTooltip: bi,
1392
+ toggleAnnotator: Si,
1393
+ toggleFullscreen: pi,
1394
+ copyAlt: Pi
1395
+ }), (t, r) => (E(), x("div", {
1396
+ ref_key: "donutChart",
1397
+ ref: N,
1398
+ class: We(`vue-data-ui-component vue-ui-donut ${fi.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${L.value.useCssAnimation ? "" : "vue-ui-dna"}`),
1399
+ style: T(`font-family:${L.value.style.fontFamily};width:100%; ${L.value.responsive ? "height:100%;" : ""} text-align:center;background:${L.value.style.chart.backgroundColor}`),
1400
+ id: `donut__${F.value}`,
1401
+ onMouseenter: br,
1402
+ onMouseleave: xr
1403
+ }, [
1404
+ S("div", {
1405
+ id: `chart-instructions-${F.value}`,
1406
+ class: "sr-only"
1407
+ }, [S("p", null, Ye(L.value.a11y.translations.keyboardNavigation), 1)], 8, it),
1408
+ zi.value?.rows?.length ? (E(), y(Ae, {
1409
+ key: 0,
1410
+ uid: F.value,
1411
+ head: zi.value.headers,
1412
+ body: zi.value.rows,
1413
+ notice: L.value.a11y.translations.tableAvailable,
1414
+ caption: L.value.a11y.translations.tableCaption
1415
+ }, null, 8, [
1416
+ "uid",
1417
+ "head",
1418
+ "body",
1419
+ "notice",
1420
+ "caption"
1421
+ ])) : b("", !0),
1422
+ L.value.userOptions.buttons.annotator && A(z) ? (E(), y(A(bn), {
1423
+ key: 1,
1424
+ color: L.value.style.chart.color,
1425
+ backgroundColor: L.value.style.chart.backgroundColor,
1426
+ active: xi.value,
1427
+ svgRef: A(z),
1428
+ isCursorPointer: sr.value,
1429
+ onClose: Si
1430
+ }, {
1431
+ "annotator-action-close": j(() => [k(t.$slots, "annotator-action-close", {}, void 0, !0)]),
1432
+ "annotator-action-color": j(({ color: e }) => [k(t.$slots, "annotator-action-color", w(C({ color: e })), void 0, !0)]),
1433
+ "annotator-action-draw": j(({ mode: e }) => [k(t.$slots, "annotator-action-draw", w(C({ mode: e })), void 0, !0)]),
1434
+ "annotator-action-undo": j(({ disabled: e }) => [k(t.$slots, "annotator-action-undo", w(C({ disabled: e })), void 0, !0)]),
1435
+ "annotator-action-redo": j(({ disabled: e }) => [k(t.$slots, "annotator-action-redo", w(C({ disabled: e })), void 0, !0)]),
1436
+ "annotator-action-delete": j(({ disabled: e }) => [k(t.$slots, "annotator-action-delete", w(C({ disabled: e })), void 0, !0)]),
1437
+ _: 3
1438
+ }, 8, [
1439
+ "color",
1440
+ "backgroundColor",
1441
+ "active",
1442
+ "svgRef",
1443
+ "isCursorPointer"
1444
+ ])) : b("", !0),
1445
+ k(t.$slots, "userConfig", {}, void 0, !0),
1446
+ Dr.value ? (E(), x("div", {
1447
+ key: 2,
1448
+ ref_key: "noTitle",
1449
+ ref: Ln,
1450
+ class: "vue-data-ui-no-title-space",
1451
+ style: "height:36px; width: 100%;background:transparent"
1452
+ }, null, 512)) : b("", !0),
1453
+ L.value.style.chart.title.text ? (E(), x("div", {
1454
+ key: 3,
1455
+ ref_key: "chartTitle",
1456
+ ref: Mn,
1457
+ style: "width:100%;background:transparent;padding-bottom:24px"
1458
+ }, [(E(), y(Ce, {
1459
+ key: `title_${Rn.value}`,
1460
+ config: {
1461
+ title: {
1462
+ cy: "donut-div-title",
1463
+ ...L.value.style.chart.title
1464
+ },
1465
+ subtitle: {
1466
+ cy: "donut-div-subtitle",
1467
+ ...L.value.style.chart.title.subtitle
1468
+ }
1469
+ }
1470
+ }, null, 8, ["config"]))], 512)) : b("", !0),
1471
+ S("div", { id: `legend-top-${F.value}` }, null, 8, at),
1472
+ L.value.userOptions.show && On.value && (A(yr) || A(_r)) ? (E(), y(A(xn), {
1473
+ ref_key: "userOptionsRef",
1474
+ ref: Un,
1475
+ key: `user_option_${ar.value}`,
1476
+ backgroundColor: L.value.style.chart.backgroundColor,
1477
+ color: L.value.style.chart.color,
1478
+ isPrinting: A(Cr),
1479
+ isImaging: A(wr),
1480
+ uid: F.value,
1481
+ hasTooltip: L.value.style.chart.tooltip.show && L.value.userOptions.buttons.tooltip,
1482
+ hasPdf: L.value.userOptions.buttons.pdf,
1483
+ hasImg: L.value.userOptions.buttons.img,
1484
+ hasSvg: L.value.userOptions.buttons.svg,
1485
+ hasXls: L.value.userOptions.buttons.csv,
1486
+ hasTable: L.value.userOptions.buttons.table,
1487
+ hasLabel: L.value.userOptions.buttons.labels,
1488
+ hasFullscreen: L.value.userOptions.buttons.fullscreen,
1489
+ hasAltCopy: L.value.userOptions.buttons.altCopy,
1490
+ isFullscreen: fi.value,
1491
+ chartElement: N.value,
1492
+ position: L.value.userOptions.position,
1493
+ callbacks: L.value.userOptions.callbacks,
1494
+ isTooltip: B.value.showTooltip,
1495
+ titles: { ...L.value.userOptions.buttonTitles },
1496
+ hasAnnotator: L.value.userOptions.buttons.annotator,
1497
+ isAnnotation: xi.value,
1498
+ printScale: L.value.userOptions.print.scale,
1499
+ tableDialog: L.value.table.useDialog,
1500
+ isCursorPointer: sr.value,
1501
+ onToggleFullscreen: pi,
1502
+ onGeneratePdf: A(Tr),
1503
+ onGenerateCsv: ui,
1504
+ onGenerateImage: Ni,
1505
+ onGenerateSvg: Mi,
1506
+ onToggleTable: vi,
1507
+ onToggleLabels: yi,
1508
+ onToggleTooltip: bi,
1509
+ onToggleAnnotator: Si,
1510
+ onCopyAlt: Pi,
1511
+ style: T({ visibility: A(yr) ? A(_r) ? "visible" : "hidden" : "visible" })
1512
+ }, Re({ _: 2 }, [
1513
+ t.$slots.menuIcon ? {
1514
+ name: "menuIcon",
1515
+ fn: j(({ isOpen: e, color: n }) => [k(t.$slots, "menuIcon", w(C({
1516
+ isOpen: e,
1517
+ color: n
1518
+ })), void 0, !0)]),
1519
+ key: "0"
1520
+ } : void 0,
1521
+ t.$slots.optionTooltip ? {
1522
+ name: "optionTooltip",
1523
+ fn: j(() => [k(t.$slots, "optionTooltip", {}, void 0, !0)]),
1524
+ key: "1"
1525
+ } : void 0,
1526
+ t.$slots.optionPdf ? {
1527
+ name: "optionPdf",
1528
+ fn: j(() => [k(t.$slots, "optionPdf", {}, void 0, !0)]),
1529
+ key: "2"
1530
+ } : void 0,
1531
+ t.$slots.optionCsv ? {
1532
+ name: "optionCsv",
1533
+ fn: j(() => [k(t.$slots, "optionCsv", {}, void 0, !0)]),
1534
+ key: "3"
1535
+ } : void 0,
1536
+ t.$slots.optionImg ? {
1537
+ name: "optionImg",
1538
+ fn: j(() => [k(t.$slots, "optionImg", {}, void 0, !0)]),
1539
+ key: "4"
1540
+ } : void 0,
1541
+ t.$slots.optionSvg ? {
1542
+ name: "optionSvg",
1543
+ fn: j(() => [k(t.$slots, "optionSvg", {}, void 0, !0)]),
1544
+ key: "5"
1545
+ } : void 0,
1546
+ t.$slots.optionTable ? {
1547
+ name: "optionTable",
1548
+ fn: j(() => [k(t.$slots, "optionTable", {}, void 0, !0)]),
1549
+ key: "6"
1550
+ } : void 0,
1551
+ t.$slots.optionLabels ? {
1552
+ name: "optionLabels",
1553
+ fn: j(() => [k(t.$slots, "optionLabels", {}, void 0, !0)]),
1554
+ key: "7"
1555
+ } : void 0,
1556
+ t.$slots.optionFullscreen ? {
1557
+ name: "optionFullscreen",
1558
+ fn: j(({ toggleFullscreen: e, isFullscreen: n }) => [k(t.$slots, "optionFullscreen", w(C({
1559
+ toggleFullscreen: e,
1560
+ isFullscreen: n
1561
+ })), void 0, !0)]),
1562
+ key: "8"
1563
+ } : void 0,
1564
+ t.$slots.optionAnnotator ? {
1565
+ name: "optionAnnotator",
1566
+ fn: j(({ toggleAnnotator: e, isAnnotator: n }) => [k(t.$slots, "optionAnnotator", w(C({
1567
+ toggleAnnotator: e,
1568
+ isAnnotator: n
1569
+ })), void 0, !0)]),
1570
+ key: "9"
1571
+ } : void 0,
1572
+ t.$slots.optionAltCopy ? {
1573
+ name: "optionAltCopy",
1574
+ fn: j(({ altCopy: e }) => [k(t.$slots, "optionAltCopy", w(C({ altCopy: e })), void 0, !0)]),
1575
+ key: "10"
1576
+ } : void 0,
1577
+ t.$slots["custom-menu-before"] ? {
1578
+ name: "custom-menu-before",
1579
+ fn: j(() => [k(t.$slots, "custom-menu-before", {}, void 0, !0)]),
1580
+ key: "11"
1581
+ } : void 0,
1582
+ t.$slots["custom-menu-after"] ? {
1583
+ name: "custom-menu-after",
1584
+ fn: j(() => [k(t.$slots, "custom-menu-after", {}, void 0, !0)]),
1585
+ key: "12"
1586
+ } : void 0
1587
+ ]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.callbacks.isTooltip.titles.hasAnnotator.isAnnotation.printScale.tableDialog.isCursorPointer.onGeneratePdf.style".split("."))) : b("", !0),
1588
+ S("div", ot, [(E(), x("svg", {
1589
+ ref_key: "svgRef",
1590
+ ref: z,
1591
+ xmlns: A(le),
1592
+ "aria-describedby": `chart-instructions-${F.value}`,
1593
+ class: We({
1594
+ "vue-data-ui-fullscreen--on": fi.value,
1595
+ "vue-data-ui-fulscreen--off": !fi.value,
1596
+ "vue-data-ui-svg": !0
1597
+ }),
1598
+ viewBox: `0 0 ${V.value.width <= 0 ? 10 : V.value.width} ${V.value.height <= 0 ? 10 : V.value.height}`,
1599
+ style: T(`max-width:100%; overflow: visible; background:transparent;color:${L.value.style.chart.color};${Sr.value.css}`),
1600
+ tabindex: "0",
1601
+ onFocus: Fi,
1602
+ onBlur: Ii,
1603
+ onKeydown: Li
1604
+ }, [S("g", {
1605
+ ref_key: "G",
1606
+ ref: kn,
1607
+ class: "vue-data-ui-g"
1608
+ }, [
1609
+ Be(A(Sn)),
1610
+ t.$slots["chart-background"] ? (E(), x("foreignObject", {
1611
+ key: 0,
1612
+ x: 0,
1613
+ y: 0,
1614
+ width: V.value.width <= 0 ? 10 : V.value.width,
1615
+ height: V.value.height <= 0 ? 10 : V.value.height,
1616
+ style: { pointerEvents: "none" }
1617
+ }, [k(t.$slots, "chart-background", {}, void 0, !0)], 8, ct)) : b("", !0),
1618
+ L.value.type === "classic" && !isNaN(kr.value / G.value) ? (E(), x("defs", lt, [L.value.style.chart.useGradient ? (E(), y(Oe, {
1619
+ key: 0,
1620
+ t: "radial",
1621
+ id: `gradient_${F.value}`,
1622
+ stops: [
1623
+ [
1624
+ "0%",
1625
+ A(n)(L.value.style.chart.backgroundColor, 0),
1626
+ 0
1627
+ ],
1628
+ [
1629
+ `${(1 - kr.value / G.value) * 100}%`,
1630
+ A(n)("#FFFFFF", 0),
1631
+ 0
1632
+ ],
1633
+ [
1634
+ `${(1 - kr.value / G.value / 2) * 100}%`,
1635
+ A(n)("#FFFFFF", L.value.style.chart.gradientIntensity),
1636
+ 1
1637
+ ],
1638
+ [
1639
+ "100%",
1640
+ A(n)(L.value.style.chart.backgroundColor, 0),
1641
+ 0
1642
+ ]
1643
+ ]
1644
+ }, null, 8, ["id", "stops"])) : b("", !0)])) : b("", !0),
1645
+ L.value.type === "polar" ? (E(), x("defs", ut, [(E(!0), x(_, null, O(J.value, (e, t) => (E(), y(Oe, {
1646
+ t: "radial",
1647
+ id: `polar_gradient_${t}_${F.value}`,
1648
+ key: `pg_${t}_${F.value}`,
1649
+ cx: (isNaN(e.middlePoint.x / V.value.width * 100) ? 0 : e.middlePoint.x / V.value.width * 100) + "%",
1650
+ cy: (isNaN(e.middlePoint.y / V.value.height * 100) ? 0 : e.middlePoint.y / V.value.height * 100) + "%",
1651
+ r: "62%",
1652
+ stops: [[
1653
+ "0%",
1654
+ A(u)(K.value[t].color, .05),
1655
+ L.value.style.chart.gradientIntensity / 100
1656
+ ], [
1657
+ "100%",
1658
+ K.value[t].color,
1659
+ 1
1660
+ ]]
1661
+ }, null, 8, [
1662
+ "id",
1663
+ "cx",
1664
+ "cy",
1665
+ "stops"
1666
+ ]))), 128))])) : b("", !0),
1667
+ S("defs", null, [
1668
+ S("filter", {
1669
+ id: `blur_${F.value}`,
1670
+ x: "-50%",
1671
+ y: "-50%",
1672
+ width: "200%",
1673
+ height: "200%"
1674
+ }, [S("feGaussianBlur", {
1675
+ in: "SourceGraphic",
1676
+ stdDeviation: 2,
1677
+ id: `blur_std_${F.value}`
1678
+ }, null, 8, ft), r[5] ||= S("feColorMatrix", {
1679
+ type: "saturate",
1680
+ values: "0"
1681
+ }, null, -1)], 8, dt),
1682
+ S("filter", {
1683
+ id: `shadow_${F.value}`,
1684
+ "color-interpolation-filters": "sRGB"
1685
+ }, [S("feDropShadow", {
1686
+ dx: "0",
1687
+ dy: "0",
1688
+ stdDeviation: "10",
1689
+ "flood-opacity": "0.5",
1690
+ "flood-color": L.value.style.chart.layout.donut.shadowColor
1691
+ }, null, 8, mt)], 8, pt),
1692
+ S("filter", {
1693
+ id: `drop_shadow_${F.value}`,
1694
+ "color-interpolation-filters": "sRGB",
1695
+ x: "-50%",
1696
+ y: "-50%",
1697
+ width: "200%",
1698
+ height: "200%"
1699
+ }, [S("feDropShadow", {
1700
+ dx: "0",
1701
+ dy: "0",
1702
+ stdDeviation: "3",
1703
+ "flood-opacity": "1",
1704
+ "flood-color": L.value.style.chart.layout.donut.shadowColor
1705
+ }, null, 8, gt)], 8, ht)
1706
+ ]),
1707
+ L.value.type === "classic" ? (E(!0), x(_, { key: 3 }, O(K.value.filter((e) => !e.ghost), (e, t) => (E(), x("g", null, [Y(e) && B.value.dataLabels.show ? (E(), x("path", {
1708
+ key: 0,
1709
+ d: A(X)[t]?.connectorPath || A(ne)(e, {
1710
+ x: V.value.width / 2,
1711
+ y: V.value.height / 2
1712
+ }, 16, 16, !1, !1, kr.value, 12, L.value.style.chart.layout.curvedMarkers),
1713
+ stroke: e.color,
1714
+ "stroke-width": "1",
1715
+ "stroke-linecap": "round",
1716
+ "stroke-linejoin": "round",
1717
+ fill: "none",
1718
+ filter: si(t)
1719
+ }, null, 8, _t)) : b("", !0)]))), 256)) : b("", !0),
1720
+ L.value.type === "polar" ? (E(!0), x(_, { key: 4 }, O(K.value.filter((e) => !e.ghost), (e, t) => (E(), x("g", null, [Y(e) && B.value.dataLabels.show ? (E(), x("path", {
1721
+ key: 0,
1722
+ d: `M ${A(s)({
1723
+ initX: J.value[t].middlePoint.x,
1724
+ initY: J.value[t].middlePoint.y,
1725
+ offset: 24,
1726
+ centerX: V.value.width / 2,
1727
+ centerY: V.value.height / 2
1728
+ }).x},${A(s)({
1729
+ initX: J.value[t].middlePoint.x,
1730
+ initY: J.value[t].middlePoint.y,
1731
+ offset: 24,
1732
+ centerX: V.value.width / 2,
1733
+ centerY: V.value.height / 2
1734
+ }).y} ${J.value[t].middlePoint.x},${J.value[t].middlePoint.y}`,
1735
+ stroke: e.color,
1736
+ "stroke-width": "1",
1737
+ "stroke-linecap": "round",
1738
+ "stroke-linejoin": "round",
1739
+ fill: "none",
1740
+ filter: si(t),
1741
+ style: T({ transition: R.value || !L.value.serieToggleAnimation.show ? "none" : `all ${L.value.serieToggleAnimation.durationMs}ms ease-in-out` })
1742
+ }, null, 12, vt)) : b("", !0)]))), 256)) : b("", !0),
1743
+ L.value.type === "classic" && L.value.style.chart.layout.donut.useShadow ? (E(), x("circle", {
1744
+ key: 5,
1745
+ cx: V.value.width / 2,
1746
+ cy: V.value.height / 2,
1747
+ r: G.value <= 0 ? 10 : G.value,
1748
+ fill: L.value.style.chart.backgroundColor,
1749
+ filter: `url(#shadow_${F.value})`
1750
+ }, null, 8, yt)) : b("", !0),
1751
+ t.$slots.pattern ? (E(), x("g", bt, [(E(!0), x(_, null, O(e.dataset, (e, n) => (E(), x("defs", { key: `pattern-${e.patternIndex}` }, [k(t.$slots, "pattern", He({ ref_for: !0 }, {
1752
+ seriesIndex: n,
1753
+ patternId: `pattern_${F.value}_${n}`
1754
+ }), void 0, !0)]))), 128))])) : b("", !0),
1755
+ Z.value && L.value.type === "classic" ? (E(), x(_, { key: 7 }, [
1756
+ (E(!0), x(_, null, O(q.value, (e, t) => (E(), x("path", {
1757
+ stroke: L.value.style.chart.backgroundColor,
1758
+ d: e.arcSlice,
1759
+ fill: "#FFFFFF"
1760
+ }, null, 8, xt))), 256)),
1761
+ (E(!0), x(_, null, O(q.value, (e, t) => (E(), x("path", {
1762
+ class: "vue-ui-donut-arc-path",
1763
+ d: e.arcSlice,
1764
+ fill: e.color,
1765
+ stroke: L.value.style.chart.layout.donut.borderColorAuto ? L.value.style.chart.backgroundColor : L.value.style.chart.layout.donut.borderColor,
1766
+ "stroke-width": L.value.style.chart.layout.donut.borderWidth,
1767
+ filter: si(t)
1768
+ }, null, 8, St))), 256)),
1769
+ t.$slots.pattern ? (E(), x("g", Ct, [(E(!0), x(_, null, O(q.value, (e, t) => (E(), x("path", {
1770
+ class: "vue-ui-donut-arc-path",
1771
+ d: e.arcSlice,
1772
+ fill: `url(#${e.pattern})`,
1773
+ stroke: L.value.style.chart.layout.donut.borderColorAuto ? L.value.style.chart.backgroundColor : L.value.style.chart.layout.donut.borderColor,
1774
+ "stroke-width": L.value.style.chart.layout.donut.borderWidth,
1775
+ filter: si(t)
1776
+ }, null, 8, wt))), 256))])) : b("", !0)
1777
+ ], 64)) : b("", !0),
1778
+ Z.value && L.value.type === "polar" ? (E(), x(_, { key: 8 }, [K.value.length > 1 ? (E(), x("g", Tt, [
1779
+ (E(!0), x(_, null, O(q.value, (e, t) => (E(), x("path", {
1780
+ stroke: L.value.style.chart.layout.donut.borderColorAuto ? L.value.style.chart.backgroundColor : L.value.style.chart.layout.donut.borderColor,
1781
+ d: J.value[t].path,
1782
+ fill: "#FFFFFF",
1783
+ style: T({ transition: R.value || !L.value.serieToggleAnimation.show ? "none" : `all ${L.value.serieToggleAnimation.durationMs}ms ease-in-out` })
1784
+ }, null, 12, Et))), 256)),
1785
+ L.value.style.chart.layout.donut.useShadow ? (E(), x("g", Dt, [(E(!0), x(_, null, O(q.value, (e, t) => (E(), x("path", {
1786
+ class: "vue-ui-donut-arc-path",
1787
+ d: J.value[t].path,
1788
+ fill: "transparent",
1789
+ stroke: L.value.style.chart.layout.donut.borderColorAuto ? L.value.style.chart.backgroundColor : L.value.style.chart.layout.donut.borderColor,
1790
+ "stroke-width": L.value.style.chart.layout.donut.borderWidth,
1791
+ filter: `url(#drop_shadow_${F.value})`,
1792
+ style: T({ transition: R.value || !L.value.serieToggleAnimation.show ? "none" : `all ${L.value.serieToggleAnimation.durationMs}ms ease-in-out` })
1793
+ }, null, 12, Ot))), 256))])) : b("", !0),
1794
+ t.$slots.pattern ? (E(), x("g", kt, [(E(!0), x(_, null, O(q.value, (e, t) => (E(), x("path", {
1795
+ class: "vue-ui-donut-arc-path",
1796
+ d: J.value[t].path,
1797
+ fill: `url(#${e.pattern})`,
1798
+ stroke: L.value.style.chart.layout.donut.borderColorAuto ? L.value.style.chart.backgroundColor : L.value.style.chart.layout.donut.borderColor,
1799
+ "stroke-width": L.value.style.chart.layout.donut.borderWidth,
1800
+ filter: si(t),
1801
+ style: T({
1802
+ transition: R.value || !L.value.serieToggleAnimation.show ? "none" : `all ${L.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1803
+ transformOrigin: "center"
1804
+ })
1805
+ }, null, 12, At))), 256))])) : b("", !0),
1806
+ (E(!0), x(_, null, O(q.value, (e, t) => (E(), x("path", {
1807
+ class: "vue-ui-donut-arc-path",
1808
+ d: J.value[t].path,
1809
+ fill: L.value.style.chart.useGradient ? `url(#polar_gradient_${t}_${F.value})` : e.color,
1810
+ stroke: L.value.style.chart.layout.donut.borderColorAuto ? L.value.style.chart.backgroundColor : L.value.style.chart.layout.donut.borderColor,
1811
+ "stroke-width": L.value.style.chart.layout.donut.borderWidth,
1812
+ filter: si(t),
1813
+ style: T({ transition: R.value || !L.value.serieToggleAnimation.show ? "none" : `all ${L.value.serieToggleAnimation.durationMs}ms ease-in-out` })
1814
+ }, null, 12, jt))), 256))
1815
+ ])) : (E(), x("g", Mt, [t.$slots.pattern ? (E(), x("circle", {
1816
+ key: 0,
1817
+ cx: V.value.width / 2,
1818
+ cy: V.value.height / 2,
1819
+ r: G.value,
1820
+ fill: `url(#pattern_${F.value}_${K.value[0].patternIndex})`,
1821
+ stroke: L.value.style.chart.backgroundColor,
1822
+ "stroke-width": L.value.style.chart.layout.donut.borderWidth
1823
+ }, null, 8, Nt)) : b("", !0), S("circle", {
1824
+ cx: V.value.width / 2,
1825
+ cy: V.value.height / 2,
1826
+ r: G.value,
1827
+ fill: L.value.style.chart.useGradient ? `url(#polar_gradient_0_${F.value})` : K.value[0].color,
1828
+ stroke: L.value.style.chart.backgroundColor,
1829
+ "stroke-width": L.value.style.chart.layout.donut.borderWidth
1830
+ }, null, 8, Pt)]))], 64)) : (E(), x(_, { key: 9 }, [L.value.type === "classic" && !Gr.value ? (E(), x("g", Ft, [(E(!0), x(_, null, O(Kr.value, (e, t) => (E(), x("path", {
1831
+ class: "vue-ui-donut-arc-path",
1832
+ d: e.arcSlice,
1833
+ fill: e.color,
1834
+ stroke: L.value.style.chart.backgroundColor,
1835
+ "stroke-width": L.value.style.chart.layout.donut.borderWidth
1836
+ }, null, 8, It))), 256))])) : b("", !0), S("circle", {
1837
+ cx: V.value.width / 2,
1838
+ cy: V.value.height / 2,
1839
+ r: G.value <= 0 ? 10 : G.value,
1840
+ fill: "transparent",
1841
+ stroke: L.value.style.chart.backgroundColor
1842
+ }, null, 8, Lt)], 64)),
1843
+ L.value.style.chart.useGradient && L.value.type === "classic" ? (E(), x("circle", {
1844
+ key: 10,
1845
+ cx: V.value.width / 2,
1846
+ cy: V.value.height / 2,
1847
+ r: G.value <= 0 ? 10 : G.value,
1848
+ fill: `url(#gradient_${F.value})`
1849
+ }, null, 8, Rt)) : b("", !0),
1850
+ S("circle", {
1851
+ ref_key: "circle_hollow",
1852
+ ref: jn,
1853
+ style: { pointerEvents: "none" },
1854
+ fill: "none",
1855
+ cx: V.value.width / 2,
1856
+ cy: V.value.height / 2,
1857
+ r: Math.max(.1, kr.value * 1.7)
1858
+ }, null, 8, zt),
1859
+ Z.value ? (E(), x(_, { key: 11 }, [K.value.length > 1 || L.value.type === "classic" ? (E(), x("g", Bt, [(E(!0), x(_, null, O(K.value.filter((e) => !e.ghost), (e, t) => (E(), x("path", {
1860
+ d: L.value.type === "classic" ? e.arcSlice : J.value[t].path,
1861
+ stroke: L.value.style.chart.layout.donut.borderColorAuto ? L.value.style.chart.backgroundColor : L.value.style.chart.layout.donut.borderColor,
1862
+ fill: I.value === t ? L.value.style.chart.layout.donut.selectedColor : "transparent",
1863
+ onMouseenter: (n) => Q({
1864
+ datapoint: e,
1865
+ relativeIndex: t,
1866
+ seriesIndex: e.seriesIndex,
1867
+ show: !0
1868
+ }),
1869
+ onMouseleave: (t) => ri({
1870
+ datapoint: e,
1871
+ seriesIndex: e.seriesIndex
1872
+ }),
1873
+ onClick: (n) => $(e, t)
1874
+ }, null, 40, Vt))), 256))])) : (E(), x("g", Ht, [S("circle", {
1875
+ cx: V.value.width / 2,
1876
+ cy: V.value.height / 2,
1877
+ r: G.value,
1878
+ fill: "transparent",
1879
+ onMouseenter: r[0] ||= (e) => Q({
1880
+ datapoint: K.value[0],
1881
+ relativeIndex: 0,
1882
+ seriesIndex: K.value[0].seriesIndex,
1883
+ show: !0
1884
+ }),
1885
+ onMouseleave: r[1] ||= (e) => ri({
1886
+ datapoint: K.value[0],
1887
+ seriesIndex: K.value[0].seriesIndex
1888
+ }),
1889
+ onClick: r[2] ||= (e) => $(K.value[0], t.i)
1890
+ }, null, 40, Ut)]))], 64)) : b("", !0),
1891
+ L.value.type === "classic" ? (E(), x("g", {
1892
+ key: 12,
1893
+ ref_key: "G_hollow",
1894
+ ref: An,
1895
+ class: "vue-data-ui-donut-hollow-labels"
1896
+ }, [
1897
+ L.value.style.chart.layout.labels.hollow.total.show ? (E(), x("text", {
1898
+ key: 0,
1899
+ "text-anchor": "middle",
1900
+ x: V.value.width / 2,
1901
+ y: V.value.height / 2 - (L.value.style.chart.layout.labels.hollow.average.show ? L.value.style.chart.layout.labels.hollow.total.fontSize : 0) + L.value.style.chart.layout.labels.hollow.total.offsetY,
1902
+ fill: L.value.style.chart.layout.labels.hollow.total.color,
1903
+ "font-size": L.value.style.chart.layout.labels.hollow.total.fontSize,
1904
+ style: T(`font-weight:${L.value.style.chart.layout.labels.hollow.total.bold ? "bold" : ""}`)
1905
+ }, Ye(L.value.style.chart.layout.labels.hollow.total.text), 13, Wt)) : b("", !0),
1906
+ L.value.style.chart.layout.labels.hollow.total.show ? (E(), x("text", {
1907
+ key: 1,
1908
+ "text-anchor": "middle",
1909
+ x: V.value.width / 2,
1910
+ y: V.value.height / 2 + L.value.style.chart.layout.labels.hollow.total.fontSize - (L.value.style.chart.layout.labels.hollow.average.show ? L.value.style.chart.layout.labels.hollow.total.fontSize : 0) + L.value.style.chart.layout.labels.hollow.total.value.offsetY,
1911
+ fill: L.value.style.chart.layout.labels.hollow.total.value.color,
1912
+ "font-size": L.value.style.chart.layout.labels.hollow.total.value.fontSize,
1913
+ style: T(`font-weight:${L.value.style.chart.layout.labels.hollow.total.value.bold ? "bold" : ""}`)
1914
+ }, Ye(A(m)(L.value.style.chart.layout.labels.hollow.total.value.formatter, Z.value, A(d)({
1915
+ p: L.value.style.chart.layout.labels.hollow.total.value.prefix,
1916
+ v: Z.value,
1917
+ s: L.value.style.chart.layout.labels.hollow.total.value.suffix
1918
+ }))), 13, Gt)) : b("", !0),
1919
+ L.value.style.chart.layout.labels.hollow.average.show ? (E(), x("text", {
1920
+ key: 2,
1921
+ "text-anchor": "middle",
1922
+ x: V.value.width / 2,
1923
+ y: V.value.height / 2 + (L.value.style.chart.layout.labels.hollow.total.show ? L.value.style.chart.layout.labels.hollow.average.fontSize : 0) + L.value.style.chart.layout.labels.hollow.average.offsetY,
1924
+ fill: L.value.style.chart.layout.labels.hollow.average.color,
1925
+ "font-size": L.value.style.chart.layout.labels.hollow.average.fontSize,
1926
+ style: T(`font-weight:${L.value.style.chart.layout.labels.hollow.average.bold ? "bold" : ""}`)
1927
+ }, Ye(L.value.style.chart.layout.labels.hollow.average.text), 13, Kt)) : b("", !0),
1928
+ L.value.style.chart.layout.labels.hollow.average.show ? (E(), x("text", {
1929
+ key: 3,
1930
+ "text-anchor": "middle",
1931
+ x: V.value.width / 2,
1932
+ y: V.value.height / 2 + (L.value.style.chart.layout.labels.hollow.total.show ? L.value.style.chart.layout.labels.hollow.average.fontSize : 0) + L.value.style.chart.layout.labels.hollow.average.fontSize + L.value.style.chart.layout.labels.hollow.average.value.offsetY,
1933
+ fill: L.value.style.chart.layout.labels.hollow.average.value.color,
1934
+ "font-size": L.value.style.chart.layout.labels.hollow.average.value.fontSize,
1935
+ style: T(`font-weight:${L.value.style.chart.layout.labels.hollow.average.value.bold ? "bold" : ""}`)
1936
+ }, Ye(Mr.value || R.value ? "--" : A(m)(L.value.style.chart.layout.labels.hollow.average.value.formatter, A(ae)($r.value), A(d)({
1937
+ p: L.value.style.chart.layout.labels.hollow.average.value.prefix,
1938
+ v: A(ae)($r.value),
1939
+ s: L.value.style.chart.layout.labels.hollow.average.value.suffix,
1940
+ r: L.value.style.chart.layout.labels.hollow.average.value.rounding
1941
+ }))), 13, qt)) : b("", !0)
1942
+ ], 512)) : b("", !0),
1943
+ (E(!0), x(_, null, O(q.value.filter((e) => !e.ghost), (e, n) => (E(), x("g", {
1944
+ filter: si(n),
1945
+ key: e.seriesIndex,
1946
+ opacity: ci(e)
1947
+ }, [L.value.style.chart.layout.labels.dataLabels.useLabelSlots ? (E(), x("g", Yt, [(E(), x("foreignObject", {
1948
+ x: A(p)(e, !0).anchor === "end" ? A(p)(e).x - 120 : A(p)(e, !0).anchor === "middle" ? A(p)(e).x - 60 : A(p)(e).x,
1949
+ y: A(g)(e) - (mi.value ? 20 : 0),
1950
+ width: "120",
1951
+ height: "60",
1952
+ style: { overflow: "visible" }
1953
+ }, [S("div", null, [k(t.$slots, "dataLabel", He({ ref_for: !0 }, {
1954
+ datapoint: e,
1955
+ isBlur: !L.value.useBlurOnHover || [null, void 0].includes(I.value) || I.value === n,
1956
+ isSafari: mi.value,
1957
+ isVisible: Y(e) && B.value.dataLabels.show,
1958
+ textAlign: A(p)(e, !0, 16, !0).anchor,
1959
+ flexAlign: A(p)(e, !0, 16).anchor,
1960
+ percentage: Xr(e, q.value)
1961
+ }), void 0, !0)])], 8, Xt))])) : (E(), x("g", Zt, [L.value.type === "classic" ? (E(), x(_, { key: 0 }, [Y(e) && B.value.dataLabels.show ? (E(), x("circle", {
1962
+ key: 0,
1963
+ cx: A(X)[n]?.markerX ?? A(p)(e).x,
1964
+ cy: A(X)[n]?.markerY ?? A(g)(e) - 3.5,
1965
+ fill: e.color,
1966
+ stroke: L.value.style.chart.backgroundColor,
1967
+ "stroke-width": 1,
1968
+ r: 3,
1969
+ filter: !L.value.useBlurOnHover || [null, void 0].includes(I.value) || I.value === n ? "" : `url(#blur_${F.value})`,
1970
+ onClick: (t) => $(e, n),
1971
+ onMouseenter: (t) => Q({
1972
+ datapoint: e,
1973
+ relativeIndex: n,
1974
+ seriesIndex: e.seriesIndex,
1975
+ show: !0
1976
+ }),
1977
+ onMouseleave: (t) => ri({
1978
+ datapoint: e,
1979
+ seriesIndex: e.seriesIndex
1980
+ })
1981
+ }, null, 40, Qt)) : b("", !0), L.value.style.chart.layout.labels.dataLabels.oneLine || A(X)[n] ? et((E(), x("text", {
1982
+ key: 1,
1983
+ class: "vue-data-ui-datalabel-inline",
1984
+ "text-anchor": A(X)[n]?.textAnchor || A(p)(e, !0, 12).anchor,
1985
+ x: A(X)[n]?.labelX ?? A(p)(e, !0, 12).x,
1986
+ y: A(X)[n]?.labelY ?? A(g)(e),
1987
+ onClick: (t) => $(e, n),
1988
+ onMouseenter: (t) => Q({
1989
+ datapoint: e,
1990
+ relativeIndex: n,
1991
+ seriesIndex: e.seriesIndex,
1992
+ show: !0
1993
+ }),
1994
+ onMouseleave: (t) => ri({
1995
+ datapoint: e,
1996
+ seriesIndex: e.seriesIndex
1997
+ }),
1998
+ innerHTML: ai(e, n, !!A(X)[n])
1999
+ }, null, 40, $t)), [[Qe, Y(e) && B.value.dataLabels.show]]) : (E(), x(_, { key: 2 }, [et(S("text", {
2000
+ class: "vue-data-ui-datalabel-value",
2001
+ "text-anchor": A(X)[n]?.textAnchor || A(p)(e, !0, 12).anchor,
2002
+ x: A(X)[n]?.labelX ?? A(p)(e, !0, 12).x,
2003
+ y: A(X)[n]?.labelY ?? A(g)(e),
2004
+ fill: L.value.style.chart.layout.labels.percentage.color,
2005
+ "font-size": Xn.value + "px",
2006
+ style: T(`font-weight:${L.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}`),
2007
+ onClick: (t) => $(e, n),
2008
+ onMouseenter: (t) => Q({
2009
+ datapoint: e,
2010
+ relativeIndex: n,
2011
+ seriesIndex: e.seriesIndex,
2012
+ show: !0
2013
+ }),
2014
+ onMouseleave: (t) => ri({
2015
+ datapoint: e,
2016
+ seriesIndex: e.seriesIndex
2017
+ })
2018
+ }, Ye(_i(e)), 45, en), [[Qe, Y(e) && B.value.dataLabels.show]]), et(S("text", {
2019
+ class: "vue-data-ui-datalabel-name",
2020
+ "text-anchor": A(X)[n]?.textAnchor || A(p)(e).anchor,
2021
+ x: A(X)[n]?.labelX ?? A(p)(e, !0, 12).x,
2022
+ y: (A(X)[n]?.labelY ?? A(g)(e)) + P.value * 1.2,
2023
+ fill: L.value.style.chart.layout.labels.name.color,
2024
+ "font-size": P.value + "px",
2025
+ style: T(`font-weight:${L.value.style.chart.layout.labels.name.bold ? "bold" : ""}`),
2026
+ onClick: (t) => $(e, n),
2027
+ onMouseenter: (t) => Q({
2028
+ datapoint: e,
2029
+ relativeIndex: n,
2030
+ seriesIndex: e.seriesIndex,
2031
+ show: !0
2032
+ }),
2033
+ onMouseleave: (t) => ri({
2034
+ datapoint: e,
2035
+ seriesIndex: e.seriesIndex
2036
+ }),
2037
+ innerHTML: A(a)({
2038
+ content: e.name,
2039
+ fontSize: P.value,
2040
+ fill: L.value.style.chart.layout.labels.name.color,
2041
+ x: A(X)[n]?.labelX ?? A(p)(e, !0, 12).x,
2042
+ y: (A(X)[n]?.labelY ?? A(g)(e)) + P.value
2043
+ })
2044
+ }, null, 44, tn), [[Qe, Y(e, !0, 12) && B.value.dataLabels.show && L.value.style.chart.layout.labels.name.show]])], 64))], 64)) : b("", !0), L.value.type === "polar" ? (E(), x(_, { key: 1 }, [Y(e) && B.value.dataLabels.show ? (E(), x("circle", {
2045
+ key: 0,
2046
+ cx: A(s)({
2047
+ initX: J.value[n].middlePoint.x,
2048
+ initY: J.value[n].middlePoint.y,
2049
+ offset: 24,
2050
+ centerX: V.value.width / 2,
2051
+ centerY: V.value.height / 2
2052
+ }).x,
2053
+ cy: A(s)({
2054
+ initX: J.value[n].middlePoint.x,
2055
+ initY: J.value[n].middlePoint.y,
2056
+ offset: 24,
2057
+ centerX: V.value.width / 2,
2058
+ centerY: V.value.height / 2
2059
+ }).y,
2060
+ fill: e.color,
2061
+ stroke: L.value.style.chart.backgroundColor,
2062
+ "stroke-width": 1,
2063
+ r: 3,
2064
+ filter: !L.value.useBlurOnHover || [null, void 0].includes(I.value) || I.value === n ? "" : `url(#blur_${F.value})`,
2065
+ onClick: (t) => $(e, n),
2066
+ onMouseenter: (t) => Q({
2067
+ datapoint: e,
2068
+ relativeIndex: n,
2069
+ seriesIndex: e.seriesIndex,
2070
+ show: !0
2071
+ }),
2072
+ onMouseleave: (t) => ri({
2073
+ datapoint: e,
2074
+ seriesIndex: e.seriesIndex
2075
+ }),
2076
+ style: T({ transition: R.value || !L.value.serieToggleAnimation.show ? "none" : `all ${L.value.serieToggleAnimation.durationMs}ms ease-in-out` })
2077
+ }, null, 44, nn)) : b("", !0), L.value.style.chart.layout.labels.dataLabels.oneLine ? et((E(), x("text", {
2078
+ key: 1,
2079
+ class: "vue-data-ui-datalabel-inline",
2080
+ "text-anchor": qr(J.value[n].middlePoint),
2081
+ x: A(s)({
2082
+ initX: J.value[n].middlePoint.x,
2083
+ initY: J.value[n].middlePoint.y,
2084
+ offset: 42,
2085
+ centerX: V.value.width / 2,
2086
+ centerY: V.value.height / 2
2087
+ }).x,
2088
+ y: A(s)({
2089
+ initX: J.value[n].middlePoint.x,
2090
+ initY: J.value[n].middlePoint.y,
2091
+ offset: 42,
2092
+ centerX: V.value.width / 2,
2093
+ centerY: V.value.height / 2
2094
+ }).y,
2095
+ style: T({ transition: R.value || !L.value.serieToggleAnimation.show ? "none" : `all ${L.value.serieToggleAnimation.durationMs}ms ease-in-out` }),
2096
+ onClick: (t) => $(e, n),
2097
+ onMouseenter: (t) => Q({
2098
+ datapoint: e,
2099
+ relativeIndex: n,
2100
+ seriesIndex: e.seriesIndex,
2101
+ show: !0
2102
+ }),
2103
+ onMouseleave: (t) => ri({
2104
+ datapoint: e,
2105
+ seriesIndex: e.seriesIndex
2106
+ }),
2107
+ innerHTML: oi(e, n)
2108
+ }, null, 44, rn)), [[Qe, Y(e) && B.value.dataLabels.show]]) : (E(), x(_, { key: 2 }, [Y(e) && B.value.dataLabels.show ? (E(), x("text", {
2109
+ key: 0,
2110
+ class: "vue-data-ui-datalabel-value",
2111
+ "text-anchor": qr(J.value[n].middlePoint),
2112
+ x: A(s)({
2113
+ initX: J.value[n].middlePoint.x,
2114
+ initY: J.value[n].middlePoint.y,
2115
+ offset: 42,
2116
+ centerX: V.value.width / 2,
2117
+ centerY: V.value.height / 2
2118
+ }).x,
2119
+ y: A(s)({
2120
+ initX: J.value[n].middlePoint.x,
2121
+ initY: J.value[n].middlePoint.y,
2122
+ offset: 42,
2123
+ centerX: V.value.width / 2,
2124
+ centerY: V.value.height / 2
2125
+ }).y,
2126
+ fill: L.value.style.chart.layout.labels.percentage.color,
2127
+ "font-size": Xn.value,
2128
+ style: T({
2129
+ transition: R.value || !L.value.serieToggleAnimation.show ? "none" : `all ${L.value.serieToggleAnimation.durationMs}ms ease-in-out`,
2130
+ fontWeight: L.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"
2131
+ }),
2132
+ onClick: (t) => $(e, n),
2133
+ onMouseenter: (t) => Q({
2134
+ datapoint: e,
2135
+ relativeIndex: n,
2136
+ seriesIndex: e.seriesIndex,
2137
+ show: !0
2138
+ }),
2139
+ onMouseleave: (t) => ri({
2140
+ datapoint: e,
2141
+ seriesIndex: e.seriesIndex
2142
+ })
2143
+ }, Ye(_i(e)), 45, an)) : b("", !0), Y(e, !0, 12) && B.value.dataLabels.show && L.value.style.chart.layout.labels.name.show ? (E(), x("text", {
2144
+ key: 1,
2145
+ class: "vue-data-ui-datalabel-name",
2146
+ "text-anchor": qr(J.value[n].middlePoint),
2147
+ x: A(s)({
2148
+ initX: J.value[n].middlePoint.x,
2149
+ initY: J.value[n].middlePoint.y,
2150
+ offset: 42,
2151
+ centerX: V.value.width / 2,
2152
+ centerY: V.value.height / 2
2153
+ }).x,
2154
+ y: A(s)({
2155
+ initX: J.value[n].middlePoint.x,
2156
+ initY: J.value[n].middlePoint.y,
2157
+ offset: 42,
2158
+ centerX: V.value.width / 2,
2159
+ centerY: V.value.height / 2
2160
+ }).y + P.value * 1.2,
2161
+ fill: L.value.style.chart.layout.labels.name.color,
2162
+ "font-size": P.value,
2163
+ style: T({
2164
+ transition: R.value || !L.value.serieToggleAnimation.show ? "none" : `all ${L.value.serieToggleAnimation.durationMs}ms ease-in-out`,
2165
+ fontWeight: L.value.style.chart.layout.labels.name.bold ? "bold" : "normal"
2166
+ }),
2167
+ onClick: (t) => $(e, n),
2168
+ onMouseenter: (t) => Q({
2169
+ datapoint: e,
2170
+ relativeIndex: n,
2171
+ seriesIndex: e.seriesIndex,
2172
+ show: !0
2173
+ }),
2174
+ onMouseleave: (t) => ri({
2175
+ datapoint: e,
2176
+ seriesIndex: e.seriesIndex
2177
+ }),
2178
+ innerHTML: A(a)({
2179
+ content: e.name,
2180
+ fontSize: P.value,
2181
+ fill: L.value.style.chart.layout.labels.name.color,
2182
+ x: A(s)({
2183
+ initX: J.value[n].middlePoint.x,
2184
+ initY: J.value[n].middlePoint.y,
2185
+ offset: 42,
2186
+ centerX: V.value.width / 2,
2187
+ centerY: V.value.height / 2
2188
+ }).x,
2189
+ y: A(s)({
2190
+ initX: J.value[n].middlePoint.x,
2191
+ initY: J.value[n].middlePoint.y,
2192
+ offset: 42,
2193
+ centerX: V.value.width / 2,
2194
+ centerY: V.value.height / 2
2195
+ }).y + P.value * 1.2
2196
+ })
2197
+ }, null, 44, on)) : b("", !0)], 64))], 64)) : b("", !0)])), B.value.dataLabels.show && L.value.style.chart.comments.show && e.comment ? (E(), x("g", sn, [Y(e) && L.value.type === "classic" ? (E(), x("foreignObject", {
2198
+ key: 0,
2199
+ x: L.value.style.chart.comments.offsetX + (A(p)(e, !0).anchor === "end" ? A(p)(e).x - L.value.style.chart.comments.width : A(p)(e, !0).anchor === "middle" ? A(p)(e).x - L.value.style.chart.comments.width / 2 : A(p)(e).x),
2200
+ y: A(g)(e) + 24 + L.value.style.chart.comments.offsetY,
2201
+ width: L.value.style.chart.comments.width,
2202
+ height: "200",
2203
+ style: {
2204
+ overflow: "visible",
2205
+ "pointer-events": "none"
2206
+ }
2207
+ }, [S("div", null, [k(t.$slots, "plot-comment", { plot: {
2208
+ ...e,
2209
+ textAlign: A(p)(e, !0, 16, !0).anchor,
2210
+ flexAlign: A(p)(e, !0, 16).anchor,
2211
+ isFirstLoad: R.value
2212
+ } }, void 0, !0)])], 8, cn)) : b("", !0), Y(e) && L.value.type === "polar" ? (E(), x("foreignObject", {
2213
+ key: 1,
2214
+ x: L.value.style.chart.comments.offsetX + (qr(J.value[n].middlePoint) === "end" ? A(s)({
2215
+ initX: J.value[n].middlePoint.x,
2216
+ initY: J.value[n].middlePoint.y,
2217
+ offset: 42,
2218
+ centerX: V.value.width / 2,
2219
+ centerY: V.value.height / 2
2220
+ }).x - L.value.style.chart.comments.width : qr(J.value[n].middlePoint) === "middle" ? A(s)({
2221
+ initX: J.value[n].middlePoint.x,
2222
+ initY: J.value[n].middlePoint.y,
2223
+ offset: 42,
2224
+ centerX: V.value.width / 2,
2225
+ centerY: V.value.height / 2
2226
+ }).x - L.value.style.chart.comments.width / 2 : A(s)({
2227
+ initX: J.value[n].middlePoint.x,
2228
+ initY: J.value[n].middlePoint.y,
2229
+ offset: 42,
2230
+ centerX: V.value.width / 2,
2231
+ centerY: V.value.height / 2
2232
+ }).x),
2233
+ y: Jr(J.value[n]) + L.value.style.chart.comments.offsetY,
2234
+ width: L.value.style.chart.comments.width,
2235
+ height: "200",
2236
+ style: T({
2237
+ transition: R.value || !L.value.serieToggleAnimation.show ? "none" : `all ${L.value.serieToggleAnimation.durationMs}ms ease-in-out`,
2238
+ overflow: "visible",
2239
+ pointerEvents: "none"
2240
+ })
2241
+ }, [S("div", null, [k(t.$slots, "plot-comment", { plot: {
2242
+ ...e,
2243
+ textAlign: qr(J.value[n].middlePoint),
2244
+ flexAlign: qr(J.value[n].middlePoint),
2245
+ isFirstLoad: R.value
2246
+ } }, void 0, !0)])], 12, ln)) : b("", !0)])) : b("", !0)], 8, Jt))), 128)),
2247
+ k(t.$slots, "svg", { svg: {
2248
+ ...V.value,
2249
+ datapoints: K.value,
2250
+ isPrintingImg: A(Cr) || A(wr) || Wn.value,
2251
+ isPrintingSvg: Gn.value
2252
+ } }, void 0, !0)
2253
+ ], 512)], 46, st)), t.$slots.hint ? (E(), x("div", un, [k(t.$slots, "hint", w(C({
2254
+ hint: L.value.a11y.translations.keyboardNavigation,
2255
+ isVisible: Yn.value
2256
+ })), void 0, !0)])) : b("", !0)]),
2257
+ t.$slots.watermark ? (E(), x("div", dn, [k(t.$slots, "watermark", w(C({ isPrinting: A(Cr) || A(wr) || Wn.value || Gn.value })), void 0, !0)])) : b("", !0),
2258
+ S("div", { id: `legend-bottom-${F.value}` }, null, 8, fn),
2259
+ Vn.value && (L.value.style.chart.legend.show || t.$slots.legend) ? (E(), y(Le, {
2260
+ key: 6,
2261
+ to: L.value.style.chart.legend.position === "top" ? `#legend-top-${F.value}` : `#legend-bottom-${F.value}`
2262
+ }, [S("div", {
2263
+ ref_key: "chartLegend",
2264
+ ref: Nn
2265
+ }, [k(t.$slots, "legend", { legend: Ur.value }, () => [L.value.style.chart.legend.show ? (E(), y(Ie, {
2266
+ key: `legend_${Bn.value}`,
2267
+ legendSet: Ur.value,
2268
+ config: Wr.value,
2269
+ onClickMarker: r[3] ||= ({ i: e }) => Lr(e),
2270
+ isCursorPointer: sr.value
2271
+ }, Re({
2272
+ item: j(({ legend: e, index: t }) => [S("div", {
2273
+ style: T(`opacity:${W.value.includes(t) ? .5 : 1}`),
2274
+ onClick: (t) => e.segregate()
2275
+ }, Ye(e.display), 13, pn)]),
2276
+ legendToggle: j(() => [Ur.value.length > 2 && L.value.style.chart.legend.selectAllToggle.show && !A(lr) ? (E(), y(ke, {
2277
+ key: 0,
2278
+ backgroundColor: L.value.style.chart.legend.selectAllToggle.backgroundColor,
2279
+ color: L.value.style.chart.legend.selectAllToggle.color,
2280
+ fontSize: L.value.style.chart.legend.fontSize,
2281
+ checked: W.value.length > 0,
2282
+ isCursorPointer: sr.value,
2283
+ onToggle: Ir
2284
+ }, null, 8, [
2285
+ "backgroundColor",
2286
+ "color",
2287
+ "fontSize",
2288
+ "checked",
2289
+ "isCursorPointer"
2290
+ ])) : b("", !0)]),
2291
+ _: 2
2292
+ }, [t.$slots.pattern ? {
2293
+ name: "legend-pattern",
2294
+ fn: j(({ legend: e, index: t }) => [Be(we, {
2295
+ shape: e.shape,
2296
+ radius: 30,
2297
+ stroke: "none",
2298
+ plot: {
2299
+ x: 30,
2300
+ y: 30
2301
+ },
2302
+ fill: `url(#pattern_${F.value}_${t})`
2303
+ }, null, 8, ["shape", "fill"])]),
2304
+ key: "0"
2305
+ } : void 0]), 1032, [
2306
+ "legendSet",
2307
+ "config",
2308
+ "isCursorPointer"
2309
+ ])) : b("", !0)], !0)], 512)], 8, ["to"])) : b("", !0),
2310
+ t.$slots.source ? (E(), x("div", {
2311
+ key: 7,
2312
+ ref_key: "source",
2313
+ ref: In,
2314
+ dir: "auto"
2315
+ }, [k(t.$slots, "source", {}, void 0, !0)], 512)) : b("", !0),
2316
+ t.$slots.hollow ? (E(), x("div", mn, [k(t.$slots, "hollow", w(C({
2317
+ total: Z.value,
2318
+ average: $r.value,
2319
+ dataset: H.value,
2320
+ ...V.value
2321
+ })), void 0, !0)])) : b("", !0),
2322
+ Be(A(gn), {
2323
+ teleportTo: L.value.style.chart.tooltip.teleportTo,
2324
+ show: B.value.showTooltip && rr.value,
2325
+ backgroundColor: L.value.style.chart.tooltip.backgroundColor,
2326
+ color: L.value.style.chart.tooltip.color,
2327
+ fontSize: L.value.style.chart.tooltip.fontSize,
2328
+ borderRadius: L.value.style.chart.tooltip.borderRadius,
2329
+ borderColor: L.value.style.chart.tooltip.borderColor,
2330
+ borderWidth: L.value.style.chart.tooltip.borderWidth,
2331
+ backgroundOpacity: L.value.style.chart.tooltip.backgroundOpacity,
2332
+ position: L.value.style.chart.tooltip.position,
2333
+ offsetX: L.value.style.chart.tooltip.offsetX,
2334
+ offsetY: L.value.style.chart.tooltip.offsetY,
2335
+ parent: N.value,
2336
+ content: ir.value,
2337
+ isCustom: ni.value,
2338
+ isFullscreen: fi.value,
2339
+ smooth: L.value.style.chart.tooltip.smooth,
2340
+ backdropFilter: L.value.style.chart.tooltip.backdropFilter,
2341
+ smoothForce: L.value.style.chart.tooltip.smoothForce,
2342
+ smoothSnapThreshold: L.value.style.chart.tooltip.smoothSnapThrehsold,
2343
+ isA11yMode: Jn.value === "keyboard",
2344
+ a11yPosition: qn.value
2345
+ }, {
2346
+ "tooltip-before": j(() => [k(t.$slots, "tooltip-before", w(C({ ...ti.value })), void 0, !0)]),
2347
+ tooltip: j(() => [k(t.$slots, "tooltip", w(C({ ...ti.value })), void 0, !0)]),
2348
+ "tooltip-after": j(() => [k(t.$slots, "tooltip-after", w(C({ ...ti.value })), void 0, !0)]),
2349
+ _: 3
2350
+ }, 8, [
2351
+ "teleportTo",
2352
+ "show",
2353
+ "backgroundColor",
2354
+ "color",
2355
+ "fontSize",
2356
+ "borderRadius",
2357
+ "borderColor",
2358
+ "borderWidth",
2359
+ "backgroundOpacity",
2360
+ "position",
2361
+ "offsetX",
2362
+ "offsetY",
2363
+ "parent",
2364
+ "content",
2365
+ "isCustom",
2366
+ "isFullscreen",
2367
+ "smooth",
2368
+ "backdropFilter",
2369
+ "smoothForce",
2370
+ "smoothSnapThreshold",
2371
+ "isA11yMode",
2372
+ "a11yPosition"
2373
+ ]),
2374
+ On.value && L.value.userOptions.buttons.table ? (E(), y(qe(Ti.value.component), He({ key: 9 }, Ti.value.props, {
2375
+ ref_key: "tableUnit",
2376
+ ref: Hn,
2377
+ onClose: Ei
2378
+ }), Re({
2379
+ content: j(() => [(E(), y(A(yn), {
2380
+ key: `table_${zn.value}`,
2381
+ colNames: di.value.colNames,
2382
+ head: di.value.head,
2383
+ body: di.value.body,
2384
+ config: di.value.config,
2385
+ title: L.value.table.useDialog ? "" : Ti.value.title,
2386
+ withCloseButton: !L.value.table.useDialog,
2387
+ isCursorPointer: sr.value,
2388
+ onClose: Ei
2389
+ }, {
2390
+ th: j(({ th: e }) => [S("div", {
2391
+ innerHTML: e,
2392
+ style: {
2393
+ display: "flex",
2394
+ "align-items": "center"
2395
+ }
2396
+ }, null, 8, hn)]),
2397
+ td: j(({ td: e }) => [ze(Ye(e.name ? e.name : isNaN(Number(e)) ? e.includes("%") ? e : A(m)(L.value.style.chart.layout.labels.percentage.formatter, e, A(d)({
2398
+ v: e,
2399
+ s: "%",
2400
+ r: L.value.style.chart.layout.labels.percentage.rounding
2401
+ })) : A(m)(L.value.style.chart.layout.labels.value.formatter, e, A(d)({
2402
+ p: L.value.style.chart.layout.labels.dataLabels.prefix,
2403
+ v: e,
2404
+ s: L.value.style.chart.layout.labels.dataLabels.suffix,
2405
+ r: L.value.style.chart.layout.labels.value.rounding
2406
+ }))), 1)]),
2407
+ _: 1
2408
+ }, 8, [
2409
+ "colNames",
2410
+ "head",
2411
+ "body",
2412
+ "config",
2413
+ "title",
2414
+ "withCloseButton",
2415
+ "isCursorPointer"
2416
+ ]))]),
2417
+ _: 2
2418
+ }, [L.value.table.useDialog ? {
2419
+ name: "title",
2420
+ fn: j(() => [ze(Ye(Ti.value.title), 1)]),
2421
+ key: "0"
2422
+ } : void 0, L.value.table.useDialog ? {
2423
+ name: "actions",
2424
+ fn: j(() => [S("button", {
2425
+ tabindex: "0",
2426
+ class: "vue-ui-user-options-button",
2427
+ onClick: r[4] ||= (e) => ui(L.value.userOptions.callbacks.csv),
2428
+ style: T({ cursor: sr.value ? "pointer" : "default" })
2429
+ }, [Be(A(_n), {
2430
+ name: "fileCsv",
2431
+ stroke: Ti.value.props.color
2432
+ }, null, 8, ["stroke"])], 4)]),
2433
+ key: "1"
2434
+ } : void 0]), 1040)) : b("", !0),
2435
+ k(t.$slots, "skeleton", {}, () => [A(lr) ? (E(), y(ve, { key: 0 })) : b("", !0)], !0)
2436
+ ], 46, rt));
2437
+ }
2438
+ }, [["__scopeId", "data-v-f2bbb030"]]);
2439
+ //#endregion
2440
+ export { nt as n, gn as t };