vue-data-ui 3.27.1-beta.0 → 3.27.1

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 (189) hide show
  1. package/dist/{Arrow-CJeSufxg.js → Arrow-C2W0uGrq.js} +1 -1
  2. package/dist/{BaseDraggableDialog-T1gEsQid.js → BaseDraggableDialog-D_tuHEjO.js} +1 -1
  3. package/dist/{BaseIcon-Cz30ODFA.js → BaseIcon-DdIyewwY.js} +1 -1
  4. package/dist/{BaseLegendToggle-Dn_tNvn4.js → BaseLegendToggle-Bq5FjyuI.js} +1 -1
  5. package/dist/{BaseZoomControls-xq3tWD3j.js → BaseZoomControls-DoYifY2y.js} +1 -1
  6. package/dist/{ColorPicker-CUjEw53A.js → ColorPicker-MLwiwxl5.js} +1 -1
  7. package/dist/{DataTable-DSUA5M9p.js → DataTable-WNecJMcY.js} +1 -1
  8. package/dist/{HillActions-DdvXld3a.js → HillActions-CHg1AQ3p.js} +1 -1
  9. package/dist/{Legend-DokTll4u.js → Legend-D8YoT1RJ.js} +1 -1
  10. package/dist/{NonSvgPenAndPaper-BLzQuIm6.js → NonSvgPenAndPaper-CqtJpZKh.js} +1 -1
  11. package/dist/{PackageVersion-D6pKL176.js → PackageVersion-CdkxOy58.js} +1 -1
  12. package/dist/{PenAndPaper-DvJJaeU2.js → PenAndPaper-IMw576MC.js} +1 -1
  13. package/dist/{Shape-tkp65OcG.js → Shape-Bp9YNtPc.js} +1 -1
  14. package/dist/SlicerPreview-CNUciSbY.js +1 -0
  15. package/dist/{SparkTooltip-BlJLvizH.js → SparkTooltip-C5JMcBXT.js} +1 -1
  16. package/dist/{Title-BRAjxtjG.js → Title-BGYFqulv.js} +1 -1
  17. package/dist/{Tooltip-BUXB0i6z.js → Tooltip-Cus2-XNQ.js} +1 -1
  18. package/dist/{UserOptions-D65t74CM.js → UserOptions-DTxMeZv3.js} +1 -1
  19. package/dist/{chartImage-NwZO-elv.js → chartImage-CIvU_04o.js} +1 -1
  20. package/dist/components/arrow.js +1 -1
  21. package/dist/components/vue-ui-3d-bar.js +1 -1
  22. package/dist/components/vue-ui-accordion.js +1 -1
  23. package/dist/components/vue-ui-age-pyramid.js +1 -1
  24. package/dist/components/vue-ui-annotator.js +1 -1
  25. package/dist/components/vue-ui-bullet.js +1 -1
  26. package/dist/components/vue-ui-bump.js +1 -1
  27. package/dist/components/vue-ui-candlestick.js +1 -1
  28. package/dist/components/vue-ui-carousel-table.js +1 -1
  29. package/dist/components/vue-ui-chestnut.js +1 -1
  30. package/dist/components/vue-ui-chord.js +1 -1
  31. package/dist/components/vue-ui-circle-pack.js +1 -1
  32. package/dist/components/vue-ui-cursor.js +1 -1
  33. package/dist/components/vue-ui-dag.js +1 -1
  34. package/dist/components/vue-ui-dashboard.js +1 -1
  35. package/dist/components/vue-ui-digits.js +1 -1
  36. package/dist/components/vue-ui-donut-evolution.js +1 -1
  37. package/dist/components/vue-ui-donut.js +1 -1
  38. package/dist/components/vue-ui-dumbbell.js +1 -1
  39. package/dist/components/vue-ui-flow.js +1 -1
  40. package/dist/components/vue-ui-funnel.js +1 -1
  41. package/dist/components/vue-ui-galaxy.js +1 -1
  42. package/dist/components/vue-ui-gauge.js +1 -1
  43. package/dist/components/vue-ui-geo.js +1 -1
  44. package/dist/components/vue-ui-gizmo.js +1 -1
  45. package/dist/components/vue-ui-heatmap.js +1 -1
  46. package/dist/components/vue-ui-hill.js +1 -1
  47. package/dist/components/vue-ui-history-plot.js +1 -1
  48. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  49. package/dist/components/vue-ui-icon.js +1 -1
  50. package/dist/components/vue-ui-kpi.js +1 -1
  51. package/dist/components/vue-ui-label.js +1 -1
  52. package/dist/components/vue-ui-mini-loader.js +1 -1
  53. package/dist/components/vue-ui-molecule.js +1 -1
  54. package/dist/components/vue-ui-mood-radar.js +1 -1
  55. package/dist/components/vue-ui-nested-donuts.js +1 -1
  56. package/dist/components/vue-ui-onion.js +1 -1
  57. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  58. package/dist/components/vue-ui-quadrant.js +1 -1
  59. package/dist/components/vue-ui-quick-chart.js +1 -1
  60. package/dist/components/vue-ui-radar.js +1 -1
  61. package/dist/components/vue-ui-rating.js +1 -1
  62. package/dist/components/vue-ui-relation-circle.js +1 -1
  63. package/dist/components/vue-ui-ridgeline.js +1 -1
  64. package/dist/components/vue-ui-rings.js +1 -1
  65. package/dist/components/vue-ui-scatter.js +1 -1
  66. package/dist/components/vue-ui-skeleton.js +1 -1
  67. package/dist/components/vue-ui-smiley.js +1 -1
  68. package/dist/components/vue-ui-spark-trend.js +1 -1
  69. package/dist/components/vue-ui-sparkbar.js +1 -1
  70. package/dist/components/vue-ui-sparkgauge.js +1 -1
  71. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  72. package/dist/components/vue-ui-sparkline.js +1 -1
  73. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  74. package/dist/components/vue-ui-stackbar.js +1 -1
  75. package/dist/components/vue-ui-stackline.js +1 -1
  76. package/dist/components/vue-ui-strip-plot.js +1 -1
  77. package/dist/components/vue-ui-table-heatmap.js +1 -1
  78. package/dist/components/vue-ui-table-sparkline.js +1 -1
  79. package/dist/components/vue-ui-table.js +1 -1
  80. package/dist/components/vue-ui-thermometer.js +1 -1
  81. package/dist/components/vue-ui-timer.js +1 -1
  82. package/dist/components/vue-ui-tiremarks.js +1 -1
  83. package/dist/components/vue-ui-treemap.js +1 -1
  84. package/dist/components/vue-ui-vertical-bar.js +1 -1
  85. package/dist/components/vue-ui-waffle.js +1 -1
  86. package/dist/components/vue-ui-wheel.js +1 -1
  87. package/dist/components/vue-ui-word-cloud.js +1 -1
  88. package/dist/components/vue-ui-world.js +1 -1
  89. package/dist/components/vue-ui-xy-canvas.js +1 -1
  90. package/dist/components/vue-ui-xy.js +1 -1
  91. package/dist/{dom-to-png-Cp3WLHmJ.js → dom-to-png-D8t3Bm7s.js} +1 -1
  92. package/dist/{exposedLib-CMTeSmyW.js → exposedLib-DHtyEc_G.js} +1 -1
  93. package/dist/{img-8sM3sVWU.js → img-DiT4ivZ5.js} +1 -1
  94. package/dist/{labelUtils-Djp5nJtN.js → labelUtils-CG3uVXoZ.js} +1 -1
  95. package/dist/{lib-zDxoqrgo.js → lib-CV_IANZ6.js} +2 -2
  96. package/dist/package-DE5cU1Rg.js +1 -0
  97. package/dist/{pdf-Dlv_ks7R.js → pdf-BQSB1V3H.js} +1 -1
  98. package/dist/{render-common-DOYi0f4Z.js → render-common-BdZ5aRyn.js} +1 -1
  99. package/dist/{resolveChartConfig-BSo1Oe9n.js → resolveChartConfig-DZg-korK.js} +1 -1
  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 +1 -1
  103. package/dist/style.css +1 -1
  104. package/dist/{useNestedProp-CT9phgWx.js → useNestedProp-CB186vF2.js} +1 -1
  105. package/dist/{useObjectBindings-DM3xDKV3.js → useObjectBindings-Dse7YyAf.js} +1 -1
  106. package/dist/{usePrinter-CnyKPIFM.js → usePrinter-hLW3cv4N.js} +1 -1
  107. package/dist/utils.js +1 -1
  108. package/dist/vue-data-ui-DyYgLIZN.js +1 -0
  109. package/dist/vue-data-ui.js +1 -1
  110. package/dist/{vue-ui-3d-bar-DiaiNy-k.js → vue-ui-3d-bar-BZAoyWkc.js} +1 -1
  111. package/dist/{vue-ui-accordion-Dy5OVFKr.js → vue-ui-accordion-BNvevckx.js} +1 -1
  112. package/dist/{vue-ui-age-pyramid-OeUr1yxi.js → vue-ui-age-pyramid-DkA6vpU3.js} +1 -1
  113. package/dist/{vue-ui-annotator-DA_xAFql.js → vue-ui-annotator-DuQME4Hh.js} +1 -1
  114. package/dist/{vue-ui-bullet-B9lcCTVb.js → vue-ui-bullet-BVs8JX8S.js} +1 -1
  115. package/dist/{vue-ui-bump-DYajIrva.js → vue-ui-bump-DYdm3EvF.js} +1 -1
  116. package/dist/{vue-ui-candlestick-CdAZuNxo.js → vue-ui-candlestick-DZgxl4mW.js} +1 -1
  117. package/dist/{vue-ui-carousel-table-ihGH0LDH.js → vue-ui-carousel-table-BB7DsTUt.js} +1 -1
  118. package/dist/{vue-ui-chestnut-B2aNXFNO.js → vue-ui-chestnut-Bo1h5rBt.js} +1 -1
  119. package/dist/{vue-ui-chord-fAckHfOW.js → vue-ui-chord-B6_veyvO.js} +1 -1
  120. package/dist/{vue-ui-circle-pack-BWHVImkS.js → vue-ui-circle-pack-Bm7e2YNh.js} +1 -1
  121. package/dist/{vue-ui-cursor-DdXKXmhr.js → vue-ui-cursor-TidZDuSh.js} +1 -1
  122. package/dist/{vue-ui-dag-a0fNoIcJ.js → vue-ui-dag-BiN_AnLo.js} +1 -1
  123. package/dist/{vue-ui-dashboard-DkdYMB7n.js → vue-ui-dashboard-zepAVN_W.js} +1 -1
  124. package/dist/{vue-ui-digits-CL9SuIEI.js → vue-ui-digits-CXKKmfGj.js} +1 -1
  125. package/dist/{vue-ui-donut-BaEodt-3.js → vue-ui-donut-CKkBtyPK.js} +1 -1
  126. package/dist/{vue-ui-donut-DaYxdQmP.js → vue-ui-donut-DLDUpjDU.js} +2 -2
  127. package/dist/{vue-ui-donut-evolution-T8cRXKRQ.js → vue-ui-donut-evolution-BxMTdE5G.js} +1 -1
  128. package/dist/{vue-ui-dumbbell-B6HJxEZp.js → vue-ui-dumbbell-C8rNwdz0.js} +1 -1
  129. package/dist/{vue-ui-flow-BlTCVFr3.js → vue-ui-flow-Dru76A2O.js} +1 -1
  130. package/dist/{vue-ui-funnel-WgLFJadZ.js → vue-ui-funnel-D_u1h5S9.js} +1 -1
  131. package/dist/{vue-ui-galaxy-B3nuI6E8.js → vue-ui-galaxy-sBEH18Xj.js} +1 -1
  132. package/dist/{vue-ui-gauge-BwTP65O4.js → vue-ui-gauge-Do3RN8ne.js} +1 -1
  133. package/dist/{vue-ui-geo-CX3yH18H.js → vue-ui-geo-DDbtx_iJ.js} +1 -1
  134. package/dist/{vue-ui-gizmo-CNHcBsku.js → vue-ui-gizmo-eic6xLjB.js} +1 -1
  135. package/dist/{vue-ui-heatmap-CTdeoar7.js → vue-ui-heatmap-DlmJRsM8.js} +1 -1
  136. package/dist/{vue-ui-hill-DR5k8GWZ.js → vue-ui-hill-C5oiuIXh.js} +1 -1
  137. package/dist/{vue-ui-history-plot-C-9uH-Uj.js → vue-ui-history-plot-BJjnkWcT.js} +1 -1
  138. package/dist/{vue-ui-horizontal-bar-qqF7pL7U.js → vue-ui-horizontal-bar-BRDBJEl1.js} +1 -1
  139. package/dist/{vue-ui-kpi-DVcLXGqG.js → vue-ui-kpi-C-eed3jO.js} +1 -1
  140. package/dist/{vue-ui-label-D1Aog-zO.js → vue-ui-label-B4pkXBxc.js} +1 -1
  141. package/dist/{vue-ui-mini-loader-CX0Dx9tT.js → vue-ui-mini-loader-CElmv_iF.js} +1 -1
  142. package/dist/{vue-ui-molecule-B13qVX71.js → vue-ui-molecule-BeyQWZU9.js} +1 -1
  143. package/dist/{vue-ui-mood-radar-C1BtB8lg.js → vue-ui-mood-radar-Bh0kHfiZ.js} +1 -1
  144. package/dist/{vue-ui-nested-donuts-B90yrlJG.js → vue-ui-nested-donuts-FlnJfDaF.js} +1 -1
  145. package/dist/{vue-ui-onion-UMVO2DE_.js → vue-ui-onion-BjhSpjtW.js} +1 -1
  146. package/dist/vue-ui-parallel-coordinate-plot-CHV6XDti.js +9 -0
  147. package/dist/{vue-ui-quadrant-CPG6yAiu.js → vue-ui-quadrant-BaKSTJDv.js} +1 -1
  148. package/dist/{vue-ui-quick-chart-BTPb-Iz8.js → vue-ui-quick-chart-Nc2mVlle.js} +1 -1
  149. package/dist/{vue-ui-radar-Hd-pE9ih.js → vue-ui-radar-BzUfkLlC.js} +1 -1
  150. package/dist/{vue-ui-rating-C_YxQYa_.js → vue-ui-rating-BwWXvbAg.js} +1 -1
  151. package/dist/{vue-ui-relation-circle-CHYG7ZJl.js → vue-ui-relation-circle-nAZEg-BL.js} +1 -1
  152. package/dist/{vue-ui-ridgeline-DS1Gvljt.js → vue-ui-ridgeline-DxLZg1E2.js} +1 -1
  153. package/dist/{vue-ui-rings-B-Hb13Uu.js → vue-ui-rings-BOti0NGb.js} +1 -1
  154. package/dist/{vue-ui-scatter-BTgvOmuo.js → vue-ui-scatter-CCNMggyo.js} +1 -1
  155. package/dist/{vue-ui-skeleton-B-Acw3CC.js → vue-ui-skeleton-DI7pcimU.js} +1 -1
  156. package/dist/{vue-ui-smiley-Ciwqt6ek.js → vue-ui-smiley-D70sJZWl.js} +1 -1
  157. package/dist/{vue-ui-spark-trend-CYqy6c0S.js → vue-ui-spark-trend-BVtfEalS.js} +1 -1
  158. package/dist/{vue-ui-sparkbar-CTXIgjmP.js → vue-ui-sparkbar-CdsLI7Ke.js} +1 -1
  159. package/dist/{vue-ui-sparkgauge-CObOL6s2.js → vue-ui-sparkgauge-wmj5Wnnp.js} +1 -1
  160. package/dist/{vue-ui-sparkhistogram-ClFyDez-.js → vue-ui-sparkhistogram-D8S_P_P4.js} +1 -1
  161. package/dist/{vue-ui-sparkline-DP_nYlW8.js → vue-ui-sparkline-BjsJnS_9.js} +1 -1
  162. package/dist/{vue-ui-sparkstackbar-B2f0ePMg.js → vue-ui-sparkstackbar-ZN8LXzoV.js} +1 -1
  163. package/dist/{vue-ui-stackbar-nMWHZ-f0.js → vue-ui-stackbar-Dx_EN3pT.js} +1 -1
  164. package/dist/{vue-ui-stackline-B95y6Zc5.js → vue-ui-stackline-DW-oxJvA.js} +1 -1
  165. package/dist/{vue-ui-strip-plot-gFNC4r-X.js → vue-ui-strip-plot-D7kjJ3Qh.js} +1 -1
  166. package/dist/{vue-ui-table-Br2JgD_L.js → vue-ui-table-CaFVLHxE.js} +1 -1
  167. package/dist/{vue-ui-table-heatmap-Btu2ejF4.js → vue-ui-table-heatmap-Ctf7Rhqo.js} +1 -1
  168. package/dist/vue-ui-table-sparkline-C0I0cXBS.js +1 -0
  169. package/dist/{vue-ui-thermometer-C6u1eLfo.js → vue-ui-thermometer-B6og15Al.js} +1 -1
  170. package/dist/{vue-ui-timer-DLgsfB1U.js → vue-ui-timer-DgXvO2Q7.js} +2 -2
  171. package/dist/{vue-ui-tiremarks-8B9uE1Bx.js → vue-ui-tiremarks-Dh6fZ454.js} +1 -1
  172. package/dist/{vue-ui-treemap-C4Mot-Os.js → vue-ui-treemap-7JuvN6P_.js} +1 -1
  173. package/dist/{vue-ui-waffle-BwcwNpf7.js → vue-ui-waffle-BqvGzfse.js} +1 -1
  174. package/dist/{vue-ui-wheel-B3OGCXg7.js → vue-ui-wheel-SdwJqKA7.js} +1 -1
  175. package/dist/{vue-ui-word-cloud-BPIyMBXq.js → vue-ui-word-cloud-1WVV_k12.js} +1 -1
  176. package/dist/{vue-ui-world-Cp0DeauH.js → vue-ui-world-DjMy_utm.js} +1 -1
  177. package/dist/{vue-ui-xy-BOE1jvUS.js → vue-ui-xy-DaozHMfg.js} +1 -1
  178. package/dist/{vue-ui-xy-canvas-CaxxiKSa.js → vue-ui-xy-canvas-CegvS9RR.js} +1 -1
  179. package/dist/{vue-ui-xy-DSyKSn4L.js → vue-ui-xy-rGHSI1am.js} +3 -3
  180. package/dist/vue_ui_donut_evolution-CVoh3twl.js +1 -0
  181. package/dist/vue_ui_quick_chart-BRfcRW6Z.js +1 -0
  182. package/package.json +1 -1
  183. package/dist/SlicerPreview-GFRs2EWB.js +0 -1
  184. package/dist/package-DIR2F6AE.js +0 -1
  185. package/dist/vue-data-ui-BG41UScx.js +0 -1
  186. package/dist/vue-ui-parallel-coordinate-plot-C0ofFivm.js +0 -9
  187. package/dist/vue-ui-table-sparkline-B9mYHAxp.js +0 -1
  188. package/dist/vue_ui_donut_evolution-nzVwNQYv.js +0 -1
  189. package/dist/vue_ui_quick_chart-Da1GwklM.js +0 -1
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./tableIntegration-CNoJ1CIY.js";import{n as r,t as i}from"./annotationSlots-BRR85CqJ.js";import{n as a,t as o}from"./userOptionsSlots-DYuo-E5m.js";import{$ as s,Bt as c,D as l,Dt as u,Ht as d,It as ee,Jt as f,S as p,X as te,Y as ne,Yt as m,Zt as h,at as re,b as ie,dt as ae,f as g,h as oe,i as _,in as se,it as ce,j as le,nn as ue,nt as de,p as fe,s as pe,t as me,ut as he,w as ge,yt as _e,zt as ve}from"./lib-zDxoqrgo.js";import{n as ye,t as be}from"./useHints-BH9r_0Vd.js";import{t as xe}from"./useConfig-CKdzPrcf.js";import{t as Se}from"./usePrinter-CnyKPIFM.js";import{n as Ce,t as we}from"./BaseScanner-8NdoBs7B.js";import{t as Te}from"./useNestedProp-CT9phgWx.js";import{t as Ee}from"./useThemeCheck-BKNRbGeC.js";import{t as De}from"./useChartExport-DtPNpc9M.js";import{n as Oe}from"./Title-BRAjxtjG.js";import{t as ke}from"./Shape-tkp65OcG.js";import{t as Ae}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{l as je,t as Me}from"./useResponsive-D2CPcpda.js";import{t as Ne}from"./DefGrad-DKMq1REY.js";import{t as Pe}from"./BaseLegendToggle-Dn_tNvn4.js";import{t as Fe}from"./A11yDataTable-DWNlWXzs.js";import{t as Ie}from"./useUserOptionState-CXlFnwPv.js";import{t as Le}from"./useChartAccessibility-DOMuYJfm.js";import{t as Re}from"./chartImage-NwZO-elv.js";import{n as ze,t as Be}from"./labelUtils-Djp5nJtN.js";import{t as Ve}from"./vue_ui_donut-T5PeOqvf.js";import{t as He}from"./Legend-DokTll4u.js";import{Fragment as v,Teleport as Ue,computed as y,createBlock as b,createCommentVNode as x,createElementBlock as S,createElementVNode as C,createSlots as We,createTextVNode as Ge,createVNode as Ke,defineAsyncComponent as qe,guardReactiveProps as Je,mergeProps as Ye,nextTick as Xe,normalizeClass as Ze,normalizeProps as Qe,normalizeStyle as w,onBeforeUnmount as $e,onMounted as et,openBlock as T,ref as E,renderList as D,renderSlot as O,resolveDynamicComponent as tt,shallowRef as nt,toDisplayString as k,toRefs as rt,unref as A,useSlots as it,vShow as at,watch as ot,withCtx as j,withDirectives as st}from"vue";function ct(e){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;return{smallArcLayoutsClassic:y(()=>{if(t.value.type!==`classic`)return{};let e={},f=n.value||[];if(!f.length)return e;let p=r.value.width/2,te=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=p-(o.value+6),g=p+(o.value+6),oe=!!t.value.style.chart.layout.curvedMarkers;function _({midX:e,midY:t,bandX:n,bandY:r}){if(!oe)return`M ${e} ${t} L ${e} ${r} L ${n} ${r}`;let i=n<p?-1:1,a=n-e,o=r-t,s=Math.sqrt(a*a+o*o)||1,c=e-p,l=t-te,u=Math.sqrt(c*c+l*l)||1,d=c/u,ee=l/u,f=u+9;function ne({x:e,y:t}){let n=e-p,r=t-te,i=Math.sqrt(n*n+r*r)||1;if(i>=f)return{x:e,y:t};let a=f/i;return{x:p+n*a,y:te+r*a}}if(s<56){let i=a/s,c=-(o/s),l=i,u=(e+n)*.5,f=(t+r)*.5,m=u+c,h=f+l,re=(m-p)*(m-p)+(h-te)*(h-te),ie=u-c,ae=f-l;(ie-p)*(ie-p)+(ae-te)*(ae-te)>re&&(c=-c,l=-l);let g=.78,oe=e+a*g,_=t+o*g,se=Math.max(0,Math.min(1,(s-18)/44)),ce=se*se*(3-2*se),le=2.5+ce*4,ue=1+ce*2.5;le*=.9;let de=ne({x:oe+c*le+d*ue,y:_+l*le+ee*ue});return`M ${e} ${t} Q ${de.x} ${de.y} ${n} ${r}`}let m=s*.34;m<20&&(m=20),m>46&&(m=46);let h=s*.46;h<22&&(h=22),h>70&&(h=70);let re={x:e+d*m,y:t+ee*m},ie=p+i*Math.max(Math.abs(n-p),f),ae={x:n-i*Math.min(h,Math.abs(ie-n)*.75),y:r},g=ne(re),_=ne(ae);return`M ${e} ${t} C ${g.x} ${g.y} ${_.x} ${_.y} ${n} ${r}`}function se(e){let t=String(e??``).split(/\n/g),n=Math.max(0,t.length-1)*(h*1.2);return ie+n}function ce({arc:e,index:t}){let{x:n,y:r}=s(e.path);return{arc:e,index:t,midX:n,midY:r,inlineMarkerX:c(e).x,inlineMarkerY:l(e)-3.5,labelHeight:se(e.name)}}function le(e){let{arc:t}=e,n=t.seriesIndex??0;return u.value===n||d.value.includes(n)?!1:ee(t,n)}function ue(e){let t=e.inlineMarkerY<te,n=e.inlineMarkerX<p;return t&&n?`TL`:t&&!n?`TR`:!t&&n?`BL`:`BR`}function de(e,t){if(t.startsWith(`T`)){e.sort((e,t)=>e.inlineMarkerY-t.inlineMarkerY||e.index-t.index);return}e.sort((e,t)=>t.inlineMarkerY-e.inlineMarkerY||e.index-t.index)}function fe({side:e,markerX:t,markerY:n,labelY:r,connectorPath:i}){return{side:e,labelX:e===`left`?t-8:t+8,labelY:r+re,textAnchor:e===`left`?`end`:`start`,markerX:t,markerY:n,connectorPath:i}}function pe({candidateList:t,side:n,bandMarkerX:r,startY:i,direction:a}){let o=i;t.forEach(t=>{let{index:i,midX:s,midY:c,labelHeight:l}=t,u;a===`down`?(u=o,o+=l):(o-=l,u=o);let d=u,ee=_({midX:s,midY:c,bandX:r,bandY:d});e[i]=fe({side:n,markerX:r,markerY:d,labelY:u,connectorPath:ee})})}let me=f.map((e,t)=>ce({arc:e,index:t})).filter(le),he={TL:[],TR:[],BL:[],BR:[]};return me.forEach(e=>{he[ue(e)].push(e)}),Object.keys(he).forEach(e=>{de(he[e],e)}),pe({candidateList:he.TL,side:`left`,bandMarkerX:ae,startY:ne,direction:`down`}),pe({candidateList:he.TR,side:`right`,bandMarkerX:g,startY:ne,direction:`down`}),he.BL.length>1&&pe({candidateList:he.BL,side:`left`,bandMarkerX:ae,startY:m,direction:`up`}),he.BR.length>1&&pe({candidateList:he.BR,side:`right`,bandMarkerX:g,startY:m,direction:`up`}),e})}}var lt=/* @__PURE__ */ e({default:()=>wn}),ut=[`id`],dt=[`id`],ft=[`id`],pt={style:{position:`relative`}},mt=[`xmlns`,`aria-describedby`,`viewBox`],ht=[`width`,`height`],gt={key:1},_t={key:2},vt=[`id`],yt=[`id`],bt=[`id`],xt=[`flood-color`],St=[`id`],Ct=[`flood-color`],wt=[`d`,`stroke`,`filter`],Tt=[`d`,`stroke`,`filter`],Et=[`cx`,`cy`,`r`,`fill`,`filter`],Dt={key:6},Ot=[`stroke`,`d`],kt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],At={key:0},jt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Mt={key:0},Nt=[`stroke`,`d`],Pt={key:0},Ft=[`d`,`stroke`,`stroke-width`,`filter`],It={key:1},Lt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Rt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],zt={key:1},Bt=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Vt=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Ht={key:0},Ut=[`d`,`fill`,`stroke`,`stroke-width`],Wt=[`cx`,`cy`,`r`,`stroke`],Gt=[`cx`,`cy`,`r`,`fill`],Kt=[`cx`,`cy`,`r`],qt={key:0},Jt=[`d`,`stroke`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],Yt={key:1},Xt=[`cx`,`cy`,`r`],Zt=[`x`,`y`,`fill`,`font-size`],Qt=[`x`,`y`,`fill`,`font-size`],$t=[`x`,`y`,`fill`,`font-size`],en=[`x`,`y`,`fill`,`font-size`],tn=[`filter`,`opacity`],nn={key:0},rn=[`x`,`y`],an={key:1},on=[`cx`,`cy`,`fill`,`stroke`,`filter`,`onClick`,`onMouseenter`,`onMouseleave`],sn=[`text-anchor`,`x`,`y`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],cn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`],ln=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],un=[`cx`,`cy`,`fill`,`stroke`,`filter`,`onClick`,`onMouseenter`,`onMouseleave`],dn=[`text-anchor`,`x`,`y`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],fn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`],pn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],mn={key:2},hn=[`x`,`y`,`width`],gn=[`x`,`y`,`width`],_n={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},vn={key:5,class:`vue-data-ui-watermark`},yn=[`id`],bn=[`onClick`],xn={key:8,class:`vue-ui-donut-hollow`},Sn={key:0},Cn={key:1},wn=/*#__PURE__*/ Ae({__name:`vue-ui-donut`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:Ae,emit:lt}){let wn=qe(()=>import(`./Tooltip-BUXB0i6z.js`)),Tn=qe(()=>import(`./BaseIcon-Cz30ODFA.js`).then(e=>e.n)),En=qe(()=>import(`./vue-ui-accordion-Dy5OVFKr.js`).then(e=>e.n)),Dn=qe(()=>import(`./DataTable-DSUA5M9p.js`)),On=qe(()=>import(`./PenAndPaper-DvJJaeU2.js`).then(e=>e.t)),kn=qe(()=>import(`./UserOptions-D65t74CM.js`).then(e=>e.n)),An=qe(()=>import(`./PackageVersion-D6pKL176.js`).then(e=>e.t)),jn=qe(()=>import(`./BaseDraggableDialog-T1gEsQid.js`).then(e=>e.n)),{vue_ui_donut:Mn}=xe(),{isThemeValid:Nn,warnInvalidTheme:Pn}=Ee(),Fn=it(),M=e,In=y({get(){return!!M.dataset&&M.dataset.length},set(e){return e}}),Ln=nt(null),Rn=E(null),zn=E(null),Bn=E(null),Vn=nt(null),Hn=nt(null),Un=nt(null),Wn=nt(null),Gn=nt(null),Kn=nt(null),qn=E(0),Jn=E(0),Yn=E(0),Xn=E(!1),Zn=E(null),Qn=E(null),$n=E(null),er=E({x:0,y:0}),tr=E(`pointer`),nr=E(!1),rr=y({get:()=>I.value.style.chart.layout.labels.percentage.fontSize,set:e=>e}),N=y({get:()=>I.value.style.chart.layout.labels.name.fontSize,set:e=>e}),ir=y({get:()=>I.value.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,set:e=>e}),ar=!1,or=()=>{I.value.autoSize&&!ar&&(ar=!0,requestAnimationFrame(()=>{ar=!1;let e=I.value,t=Rn.value,n=V.value;if(!e.autoSize||!t||!n)return;let[r,i,a,o]=n.getAttribute(`viewBox`).split(` `).map(Number),s={x:r,y:i,width:a,height:o},c=[{selector:`.vue-data-ui-datalabel-value`,baseSize:L.value.percentage.fontSize,minSize:L.value.percentage.minFontSize,sizeRef:rr},{selector:`.vue-data-ui-datalabel-name`,baseSize:L.value.name.fontSize,minSize:L.value.name.minFontSize,sizeRef:N},{selector:`.vue-data-ui-datalabel-inline`,baseSize:L.value.dataLabels.smallArcClusterFontSize,minSize:L.value.name.minFontSize,sizeRef:ir}];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})=>{t.querySelectorAll(e).forEach(e=>{i.value=pe({el:e,bounds:s,currentFontSize:n,minFontSize:r,attempts:200,padding:1})})})}))};et(async()=>{Xn.value=!0,lr(),requestAnimationFrame(or)});let sr;et(()=>{Ln.value&&(sr=new ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;if(e>0&&n>0){or();break}}}),sr.observe(Ln.value.parentElement))}),$e(()=>{sr?.disconnect()}),$e(()=>{Un.value&&(Wn.value&&Un.value.unobserve(Wn.value),Un.value.disconnect())});let cr=y(()=>I.value.debug);function lr(){if(ve(M.dataset)?(re({componentName:`VueUiDonut`,type:`dataset`,debug:cr.value}),In.value=!1,yr.value=!0):(M.dataset.forEach((e,t)=>{_e({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{re({componentName:`VueUiDonut`,type:`datasetSerieAttribute`,property:e,index:t,debug:cr.value}),In.value=!1,yr.value=!0})}),cr.value&&M.dataset.forEach((e,t)=>{(!e.name||e.name===``)&&re({componentName:`VueUiDonut`,type:`datasetAttributeEmpty`,property:`name`,index:t})})),ve(M.dataset)||(yr.value=I.value.loading),I.value.responsive){let e=je(()=>{let{width:e,height:t}=Me({chart:Ln.value,title:I.value.style.chart.title.text?Vn.value:null,legend:I.value.style.chart.legend.show?Hn.value:null,source:Gn.value,noTitle:Kn.value,padding:I.value.autoSize?void 0:jr.value});requestAnimationFrame(()=>{U.value.width=e,U.value.height=t,or()})});Un.value&&(Wn.value&&Un.value.unobserve(Wn.value),Un.value.disconnect()),Un.value=new ResizeObserver(e),Wn.value=Ln.value.parentNode,Un.value.observe(Wn.value)}}let P=E(te()),ur=E(!1),dr=E(``),F=E(null),fr=E(0);function pr(){let e=Te({userConfig:M.config,defaultConfig:Mn}),t={},n=e.theme;if(!n)t=e;else if(!Nn.value(e))Pn(e),t=e;else{let r=Te({userConfig:Ve[n]||M.config,defaultConfig:e});t={...Te({userConfig:M.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:ue[n]||d}}return t}let I=E(pr()),L=y(()=>I.value.style.chart.layout.labels),R=y(()=>I.value.style.chart.layout.donut),mr=y(()=>I.value.style.chart.layout),z=y(()=>I.value.style.chart);ye({config:()=>I.value,dataset:()=>M.dataset,component:`VueUiDonut`,rules:[be.singleSeries,be.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]}]});let hr=y(()=>I.value.userOptions.useCursorPointer),gr=y(()=>se({defaultConfig:{useCssAnimation:!1,table:{show:!1},startAnimation:{show:!1},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{labels:{dataLabels:{show:!1},hollow:{average:{show:!1},total:{show:!1}},value:{show:!1}}},legend:{backgroundColor:`transparent`,showValue:!1,showPercentage:!1},title:{color:`#1A1A1A`,subtitle:{color:`#5A5A5A`}}}}},userConfig:I.value.skeletonConfig??{}})),{loading:_r,FINAL_DATASET:vr,manualLoading:yr,skeletonDataset:br}=Ce({...rt(M),FINAL_CONFIG:I,prepareConfig:pr,skeletonDataset:M.config?.skeletonDataset??[{name:``,values:[3],color:`#BABABA`},{name:``,values:[2],color:`#AAAAAA`},{name:``,values:[1],color:`#CACACA`}],skeletonConfig:se({defaultConfig:I.value,userConfig:gr.value})}),B=E(!0),xr=E(0),Sr=E(!1),Cr=null;function wr(e=1e3){return new Promise(t=>{let n=performance.now();function r(i){let a=i-n,o=Math.min(a/e,1),s=ce(o);xr.value=s,o<1?Cr=requestAnimationFrame(r):(xr.value=1,Cr=null,t())}Cr!==null&&cancelAnimationFrame(Cr),xr.value=0,Cr=requestAnimationFrame(r)})}ot(()=>_r.value,async e=>{if(e||Sr.value)return;let t=vr.value===br,n=I.value.startAnimation?.show;!t&&n?(Sr.value=!0,await wr(I.value.startAnimation.durationMs||1e3)):xr.value=1,B.value=!1},{immediate:!0});let{userOptionsVisible:Tr,setUserOptionsVisibility:Er,keepUserOptionState:Dr}=Ie({config:I.value}),{svgRef:V}=Le({config:z.value.title});function Or(){Er(!0)}function kr(){Er(!1)}let Ar=h(M.config);ot(()=>M.config,(e,t)=>{let n=h(e),r=n!==Ar;Ar=n;let i=pr();if(!r){I.value.style.chart.tooltip=i.style.chart.tooltip,H.value.showTooltip=I.value.style.chart.tooltip.show;return}_r.value||(I.value=i),Tr.value=!I.value.userOptions.showOnChartHover,lr(),qn.value+=1,Jn.value+=1,Yn.value+=1,H.value.dataLabels.show=L.value.dataLabels.show,H.value.showTable=I.value.table.show,H.value.showTooltip=z.value.tooltip.show,U.value.height=z.value.height,U.value.width=z.value.width},{deep:!0});let jr=y(()=>{let{top:e,right:t,bottom:n,left:r}=z.value.padding;return{css:`padding:${e}px ${t}px ${n}px ${r}px`,top:e,right:t,bottom:n,left:r}}),{isPrinting:Mr,isImaging:Nr,generatePdf:Pr,generateImage:Fr}=Se({elementId:`donut__${P.value}`,fileName:z.value.title.text||`vue-ui-donut`,options:I.value.userOptions.print}),Ir=y(()=>I.value.userOptions.show&&!z.value.title.text),Lr=y(()=>ge(I.value.customPalette)),H=E({dataLabels:{show:L.value.dataLabels.show},showTable:I.value.table.show,showTooltip:z.value.tooltip.show});ot(I,()=>{H.value={dataLabels:{show:L.value.dataLabels.show},showTable:I.value.table.show,showTooltip:z.value.tooltip.show}},{immediate:!0});let U=E({height:z.value.height,width:z.value.width}),Rr=y(()=>{if(I.value.pie)return q.value;let e=R.value.strokeWidth/512,t=Math.min(U.value.width,U.value.height)*e,n=t>q.value?q.value:t;return Math.max(n,12*(1+e))}),zr=lt,W=y(()=>vr.value.sort((e,t)=>{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;return e.ghost&&!t.ghost?1:t.ghost&&!e.ghost?-1:r-n}).map((e,t)=>({name:e.name,color:p(e.color)||Lr.value[t]||d[t]||d[t%d.length],value:ie(e.values.reduce((e,t)=>e+t,0)),absoluteValues:e.values,comment:e.comment||``,patternIndex:t,seriesIndex:t,ghost:!1,pattern:`pattern_${P.value}_${t}`})));ot(()=>M.dataset,e=>{Array.isArray(e)&&e.length>0&&(yr.value=!1)},{immediate:!0});let G=nt(W.value);ot(()=>W.value,e=>{G.value=e,requestAnimationFrame(or)});function Br(){return W.value.map(e=>({name:e.name,color:e.color,value:e.value}))}let K=E([]),Vr=E(!1),Hr=E(null);function Ur(){zr(`selectLegend`,Zr.value.map(e=>({name:e.name,color:e.color,value:e.value})))}function Wr({from:e,to:t,duration:n,onUpdate:r,onDone:i,easing:a=ce}){let o=performance.now();function s(c){let l=Math.min((c-o)/n,1),u=a(l);r(e+(t-e)*u,l),l<1?requestAnimationFrame(s):(r(t,1),i&&i())}requestAnimationFrame(s)}function Gr(){K.value.length?K.value=[]:Qr.value.forEach((e,t)=>{K.value.push(t)}),Ur()}function Kr(e){let t=W.value.find((t,n)=>n===e),n=G.value.find((t,n)=>n===e).value;if(K.value.includes(e)){K.value=K.value.filter(t=>t!==e);let r=t.value;function i(){G.value=G.value.map((t,n)=>e===n?{...t,value:r}:t),Ur()}function a(){Vr.value=!0,Hr.value=e,Wr({from:n,to:r,duration:I.value.serieToggleAnimation.durationMs,onUpdate:(t,n)=>{G.value=G.value.map((n,r)=>e===r?{...n,value:t}:n),requestAnimationFrame(or)},onDone:()=>{i(),Vr.value=!1,Hr.value=null}})}I.value.serieToggleAnimation.show&&I.value.type===`classic`?a():(i(),requestAnimationFrame(or))}else if(K.value.length<W.value.length-1){function t(){K.value.push(e),G.value=G.value.map((t,n)=>e===n?{...t,value:0}:t),Ur()}function r(){Vr.value=!0,Hr.value=e,Wr({from:n,to:0,duration:I.value.serieToggleAnimation.durationMs,onUpdate:(t,n)=>{G.value=G.value.map((n,r)=>e===r?{...n,value:t}:n),requestAnimationFrame(or)},onDone:()=>{t(),requestAnimationFrame(or),Vr.value=!1,Hr.value=null}})}I.value.serieToggleAnimation.show&&I.value.type===`classic`?r():t()}}function qr(e){return W.value.length?W.value.find(t=>t.name===e)||(cr.value&&console.warn(`VueUiDonut - Series name not found "${e}"`),null):(cr.value&&console.warn(`VueUiDonut - There are no series to show.`),null)}function Jr(e){let t=qr(e);t!==null&&K.value.includes(t.seriesIndex)&&Kr(t.seriesIndex)}function Yr(e){let t=qr(e);t!==null&&(K.value.includes(t.seriesIndex)||Kr(t.seriesIndex))}let Xr=y(()=>vr.value.reduce((e,t)=>e+t.values.reduce((e,t)=>e+t,0),0)),Zr=y(()=>{if(B.value&&!_r.value){let e=xr.value,t=W.value.map(t=>({...t,value:t.value*e,color:t.color,ghost:!1})),n=Xr.value*(1-e);return n>0&&t.push({name:`__ghost__`,value:n,color:`transparent`,ghost:!0}),t}return G.value.forEach(e=>{if([null,void 0].includes(e.values))return{...e,values:[]}}),G.value.map((e,t)=>({...e,seriesIndex:t})).filter((e,t)=>!K.value.includes(t))}),Qr=y(()=>vr.value.map((e,t)=>{let n=(e.values||[]).reduce((e,t)=>e+t,0),r=n/vr.value.map(e=>(e.values||[]).reduce((e,t)=>e+t,0)).reduce((e,t)=>e+t,0);return{name:e.name,color:p(e.color)||Lr.value[t]||d[t]||d[t%d.length],value:n,shape:`circle`,patternIndex:t,proportion:r}}).map((e,t)=>{let n=_(L.value.value.formatter,e.value,s({p:L.value.dataLabels.prefix,v:e.value,s:L.value.dataLabels.suffix,r:z.value.legend.roundingValue}),{datapoint:e,index:t}),r=_(L.value.percentage.formatter,li(e),s({v:li(e),s:`%`,r:z.value.legend.roundingPercentage})),i=Ei({val:n,percentage:K.value.includes(t)?`${Ti(e.proportion*100)}%`:r,showVal:z.value.legend.showValue,showPercentage:z.value.legend.showPercentage,config:z.value.legend});return{...e,opacity:K.value.includes(t)?.5:1,segregate:()=>!Vr.value&&Kr(t),isSegregated:K.value.includes(t),display:`${e.name}${z.value.legend.showPercentage||z.value.legend.showValue?`: `:``}${i}`}})),$r=y(()=>({cy:`donut-div-legend`,backgroundColor:z.value.legend.backgroundColor,color:z.value.legend.color,fontSize:z.value.legend.fontSize,paddingBottom:12,fontWeight:z.value.legend.bold?`bold`:``})),q=y(()=>{let e=R.value.radiusRatio,t=Math.max(.1,Math.min(.50001,e)),n=Math.min(U.value.width*t,U.value.height*t);return Math.max(12,n)}),J=y(()=>ee({series:Zr.value},U.value.width/2,U.value.height/2,q.value,q.value,1.99999,2,1,360,105.25,Rr.value)),ei=y(()=>Math.abs(Zr.value.map(e=>e.value).reduce((e,t)=>e+t,0))>0),ti=y(()=>ee({series:[{value:1,color:R.value.emptyFill,name:`_`,seriesIndex:0,patternIndex:-1,ghost:!1,absoluteValues:[1]}]},U.value.width/2,U.value.height/2,q.value,q.value,1.99999,2,1,360,105.25,Rr.value)),Y=y(()=>J.value.filter(e=>!e.ghost)),X=y(()=>{let e=Math.max(...Zr.value.map(e=>e.value)),t=Zr.value.map(t=>t.value/e);return le({series:t,center:{x:U.value.width/2,y:U.value.height/2},maxRadius:Math.min(U.value.width,U.value.height)/3,hasGhost:B.value})});function ni(e){return e.x>U.value.width/2+6?`start`:e.x<U.value.width/2-6?`end`:`middle`}function ri(e){return e.middlePoint.y>U.value.height/2?c({initX:e.middlePoint.x,initY:e.middlePoint.y,offset:100,centerX:U.value.width/2,centerY:U.value.height/2}).y:c({initX:e.middlePoint.x,initY:e.middlePoint.y,offset:0,centerX:U.value.width/2,centerY:U.value.height/2}).y-100}function Z(e){return e.proportion*100>L.value.dataLabels.hideUnderValue}function ii(e,t){let n=L.value.dataLabels.hideUnderValue,r=L.value.dataLabels.smallArcClusterThreshold,i=(si.value[t]??e.proportion??0)*100;return i>n&&i<=r}let{smallArcLayoutsClassic:Q}=ct({FINAL_CONFIG:I,noGhostDonut:Y,svg:U,padding:jr,labels_inline_fontSize:ir,minSize:q,findArcMidpoint:he,calcMarkerOffsetX:g,calcMarkerOffsetY:fe,animatingIndex:Hr,segregated:K,isSmallArc:ii});function ai(e,t){let n=e.value/oi(t);return isNaN(n)?0:_(L.value.percentage.formatter,n*100,s({v:n*100,s:`%`,r:L.value.percentage.rounding}),{datapoint:e})}function oi(e){return[...e].map(e=>e.value).reduce((e,t)=>e+t,0)}let $=y(()=>Zr.value.map(e=>e.value).reduce((e,t)=>e+t,0)),si=y(()=>{let e=W.value.reduce((e,t)=>e+t.value,0);return e<=0?[]:W.value.map(t=>t.value/e)}),ci=y(()=>$.value/Zr.value.length);function li(e){return Vr.value?e.proportion*100:e.value/$.value*100}let ui=E(null),di=E(!1);function fi({datapoint:e,seriesIndex:t}){I.value.events.datapointLeave&&I.value.events.datapointLeave({datapoint:e,seriesIndex:t}),ur.value=!1,F.value=null,$n.value=null,tr.value=`pointer`}function pi({datapoint:e,relativeIndex:t,seriesIndex:n,show:r=!1,triggerMode:i=`pointer`}){I.value.events.datapointEnter&&I.value.events.datapointEnter({datapoint:e,seriesIndex:n}),tr.value=i,$n.value=t,ui.value={datapoint:e,seriesIndex:n,config:I.value,series:W.value},ur.value=r,F.value=t;let a=``,o=z.value.tooltip.customFormat;if(di.value=!1,u(o))try{let t=o({seriesIndex:n,datapoint:e,series:W.value,config:I.value});typeof t==`string`&&(dr.value=t,di.value=!0)}catch{console.warn(`Custom format cannot be applied.`),di.value=!1}di.value||(a+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${z.value.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}"/>${Fn.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${P.value}_${n})"/>`:``}</svg>`,a+=`<b>${Ei({showVal:z.value.tooltip.showValue,showPercentage:z.value.tooltip.showPercentage,val:`<span>${_(L.value.value.formatter,e.value,s({p:L.value.dataLabels.prefix,v:e.value,s:L.value.dataLabels.suffix,r:z.value.tooltip.roundingValue}),{datapoint:e,relativeIndex:t,seriesIndex:n})}</span>`,percentage:_(L.value.percentage.formatter,e.proportion*100,s({v:e.proportion*100,s:`%`,r:z.value.tooltip.roundingPercentage}),{datapoint:e,relativeIndex:t,seriesIndex:n}),config:z.value.tooltip})}</b></div>`,z.value.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>`),dr.value=`<div>${a}</div>`)}function mi(e,t){let n=Q.value[t];if(n)return{textAnchor:n.textAnchor,x:n.labelX,y:n.labelY};let r=g(e,!0,12);return{textAnchor:r.anchor,x:r.x,y:fe(e)}}function hi(e,t,n){let{textAnchor:r,x:i}=mi(e,t),a=Di(e),o=`
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./tableIntegration-CNoJ1CIY.js";import{n as r,t as i}from"./annotationSlots-BRR85CqJ.js";import{n as a,t as o}from"./userOptionsSlots-DYuo-E5m.js";import{$ as s,Bt as c,D as l,Dt as u,Ht as d,It as ee,Jt as f,S as p,X as te,Y as ne,Yt as m,Zt as h,at as re,b as ie,dt as ae,f as g,h as oe,i as _,in as se,it as ce,j as le,nn as ue,nt as de,p as fe,s as pe,t as me,ut as he,w as ge,yt as _e,zt as ve}from"./lib-CV_IANZ6.js";import{n as ye,t as be}from"./useHints-BH9r_0Vd.js";import{t as xe}from"./useConfig-CKdzPrcf.js";import{t as Se}from"./usePrinter-hLW3cv4N.js";import{n as Ce,t as we}from"./BaseScanner-8NdoBs7B.js";import{t as Te}from"./useNestedProp-CB186vF2.js";import{t as Ee}from"./useThemeCheck-BKNRbGeC.js";import{t as De}from"./useChartExport-DtPNpc9M.js";import{n as Oe}from"./Title-BGYFqulv.js";import{t as ke}from"./Shape-Bp9YNtPc.js";import{t as Ae}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{l as je,t as Me}from"./useResponsive-D2CPcpda.js";import{t as Ne}from"./DefGrad-DKMq1REY.js";import{t as Pe}from"./BaseLegendToggle-Bq5FjyuI.js";import{t as Fe}from"./A11yDataTable-DWNlWXzs.js";import{t as Ie}from"./useUserOptionState-CXlFnwPv.js";import{t as Le}from"./useChartAccessibility-DOMuYJfm.js";import{t as Re}from"./chartImage-CIvU_04o.js";import{n as ze,t as Be}from"./labelUtils-CG3uVXoZ.js";import{t as Ve}from"./vue_ui_donut-T5PeOqvf.js";import{t as He}from"./Legend-D8YoT1RJ.js";import{Fragment as v,Teleport as Ue,computed as y,createBlock as b,createCommentVNode as x,createElementBlock as S,createElementVNode as C,createSlots as We,createTextVNode as Ge,createVNode as Ke,defineAsyncComponent as qe,guardReactiveProps as Je,mergeProps as Ye,nextTick as Xe,normalizeClass as Ze,normalizeProps as Qe,normalizeStyle as w,onBeforeUnmount as $e,onMounted as et,openBlock as T,ref as E,renderList as D,renderSlot as O,resolveDynamicComponent as tt,shallowRef as nt,toDisplayString as k,toRefs as rt,unref as A,useSlots as it,vShow as at,watch as ot,withCtx as j,withDirectives as st}from"vue";function ct(e){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;return{smallArcLayoutsClassic:y(()=>{if(t.value.type!==`classic`)return{};let e={},f=n.value||[];if(!f.length)return e;let p=r.value.width/2,te=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=p-(o.value+6),g=p+(o.value+6),oe=!!t.value.style.chart.layout.curvedMarkers;function _({midX:e,midY:t,bandX:n,bandY:r}){if(!oe)return`M ${e} ${t} L ${e} ${r} L ${n} ${r}`;let i=n<p?-1:1,a=n-e,o=r-t,s=Math.sqrt(a*a+o*o)||1,c=e-p,l=t-te,u=Math.sqrt(c*c+l*l)||1,d=c/u,ee=l/u,f=u+9;function ne({x:e,y:t}){let n=e-p,r=t-te,i=Math.sqrt(n*n+r*r)||1;if(i>=f)return{x:e,y:t};let a=f/i;return{x:p+n*a,y:te+r*a}}if(s<56){let i=a/s,c=-(o/s),l=i,u=(e+n)*.5,f=(t+r)*.5,m=u+c,h=f+l,re=(m-p)*(m-p)+(h-te)*(h-te),ie=u-c,ae=f-l;(ie-p)*(ie-p)+(ae-te)*(ae-te)>re&&(c=-c,l=-l);let g=.78,oe=e+a*g,_=t+o*g,se=Math.max(0,Math.min(1,(s-18)/44)),ce=se*se*(3-2*se),le=2.5+ce*4,ue=1+ce*2.5;le*=.9;let de=ne({x:oe+c*le+d*ue,y:_+l*le+ee*ue});return`M ${e} ${t} Q ${de.x} ${de.y} ${n} ${r}`}let m=s*.34;m<20&&(m=20),m>46&&(m=46);let h=s*.46;h<22&&(h=22),h>70&&(h=70);let re={x:e+d*m,y:t+ee*m},ie=p+i*Math.max(Math.abs(n-p),f),ae={x:n-i*Math.min(h,Math.abs(ie-n)*.75),y:r},g=ne(re),_=ne(ae);return`M ${e} ${t} C ${g.x} ${g.y} ${_.x} ${_.y} ${n} ${r}`}function se(e){let t=String(e??``).split(/\n/g),n=Math.max(0,t.length-1)*(h*1.2);return ie+n}function ce({arc:e,index:t}){let{x:n,y:r}=s(e.path);return{arc:e,index:t,midX:n,midY:r,inlineMarkerX:c(e).x,inlineMarkerY:l(e)-3.5,labelHeight:se(e.name)}}function le(e){let{arc:t}=e,n=t.seriesIndex??0;return u.value===n||d.value.includes(n)?!1:ee(t,n)}function ue(e){let t=e.inlineMarkerY<te,n=e.inlineMarkerX<p;return t&&n?`TL`:t&&!n?`TR`:!t&&n?`BL`:`BR`}function de(e,t){if(t.startsWith(`T`)){e.sort((e,t)=>e.inlineMarkerY-t.inlineMarkerY||e.index-t.index);return}e.sort((e,t)=>t.inlineMarkerY-e.inlineMarkerY||e.index-t.index)}function fe({side:e,markerX:t,markerY:n,labelY:r,connectorPath:i}){return{side:e,labelX:e===`left`?t-8:t+8,labelY:r+re,textAnchor:e===`left`?`end`:`start`,markerX:t,markerY:n,connectorPath:i}}function pe({candidateList:t,side:n,bandMarkerX:r,startY:i,direction:a}){let o=i;t.forEach(t=>{let{index:i,midX:s,midY:c,labelHeight:l}=t,u;a===`down`?(u=o,o+=l):(o-=l,u=o);let d=u,ee=_({midX:s,midY:c,bandX:r,bandY:d});e[i]=fe({side:n,markerX:r,markerY:d,labelY:u,connectorPath:ee})})}let me=f.map((e,t)=>ce({arc:e,index:t})).filter(le),he={TL:[],TR:[],BL:[],BR:[]};return me.forEach(e=>{he[ue(e)].push(e)}),Object.keys(he).forEach(e=>{de(he[e],e)}),pe({candidateList:he.TL,side:`left`,bandMarkerX:ae,startY:ne,direction:`down`}),pe({candidateList:he.TR,side:`right`,bandMarkerX:g,startY:ne,direction:`down`}),he.BL.length>1&&pe({candidateList:he.BL,side:`left`,bandMarkerX:ae,startY:m,direction:`up`}),he.BR.length>1&&pe({candidateList:he.BR,side:`right`,bandMarkerX:g,startY:m,direction:`up`}),e})}}var lt=/* @__PURE__ */ e({default:()=>wn}),ut=[`id`],dt=[`id`],ft=[`id`],pt={style:{position:`relative`}},mt=[`xmlns`,`aria-describedby`,`viewBox`],ht=[`width`,`height`],gt={key:1},_t={key:2},vt=[`id`],yt=[`id`],bt=[`id`],xt=[`flood-color`],St=[`id`],Ct=[`flood-color`],wt=[`d`,`stroke`,`filter`],Tt=[`d`,`stroke`,`filter`],Et=[`cx`,`cy`,`r`,`fill`,`filter`],Dt={key:6},Ot=[`stroke`,`d`],kt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],At={key:0},jt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Mt={key:0},Nt=[`stroke`,`d`],Pt={key:0},Ft=[`d`,`stroke`,`stroke-width`,`filter`],It={key:1},Lt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Rt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],zt={key:1},Bt=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Vt=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Ht={key:0},Ut=[`d`,`fill`,`stroke`,`stroke-width`],Wt=[`cx`,`cy`,`r`,`stroke`],Gt=[`cx`,`cy`,`r`,`fill`],Kt=[`cx`,`cy`,`r`],qt={key:0},Jt=[`d`,`stroke`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],Yt={key:1},Xt=[`cx`,`cy`,`r`],Zt=[`x`,`y`,`fill`,`font-size`],Qt=[`x`,`y`,`fill`,`font-size`],$t=[`x`,`y`,`fill`,`font-size`],en=[`x`,`y`,`fill`,`font-size`],tn=[`filter`,`opacity`],nn={key:0},rn=[`x`,`y`],an={key:1},on=[`cx`,`cy`,`fill`,`stroke`,`filter`,`onClick`,`onMouseenter`,`onMouseleave`],sn=[`text-anchor`,`x`,`y`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],cn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`],ln=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],un=[`cx`,`cy`,`fill`,`stroke`,`filter`,`onClick`,`onMouseenter`,`onMouseleave`],dn=[`text-anchor`,`x`,`y`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],fn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`],pn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],mn={key:2},hn=[`x`,`y`,`width`],gn=[`x`,`y`,`width`],_n={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},vn={key:5,class:`vue-data-ui-watermark`},yn=[`id`],bn=[`onClick`],xn={key:8,class:`vue-ui-donut-hollow`},Sn={key:0},Cn={key:1},wn=/*#__PURE__*/ Ae({__name:`vue-ui-donut`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:Ae,emit:lt}){let wn=qe(()=>import(`./Tooltip-Cus2-XNQ.js`)),Tn=qe(()=>import(`./BaseIcon-DdIyewwY.js`).then(e=>e.n)),En=qe(()=>import(`./vue-ui-accordion-BNvevckx.js`).then(e=>e.n)),Dn=qe(()=>import(`./DataTable-WNecJMcY.js`)),On=qe(()=>import(`./PenAndPaper-IMw576MC.js`).then(e=>e.t)),kn=qe(()=>import(`./UserOptions-DTxMeZv3.js`).then(e=>e.n)),An=qe(()=>import(`./PackageVersion-CdkxOy58.js`).then(e=>e.t)),jn=qe(()=>import(`./BaseDraggableDialog-D_tuHEjO.js`).then(e=>e.n)),{vue_ui_donut:Mn}=xe(),{isThemeValid:Nn,warnInvalidTheme:Pn}=Ee(),Fn=it(),M=e,In=y({get(){return!!M.dataset&&M.dataset.length},set(e){return e}}),Ln=nt(null),Rn=E(null),zn=E(null),Bn=E(null),Vn=nt(null),Hn=nt(null),Un=nt(null),Wn=nt(null),Gn=nt(null),Kn=nt(null),qn=E(0),Jn=E(0),Yn=E(0),Xn=E(!1),Zn=E(null),Qn=E(null),$n=E(null),er=E({x:0,y:0}),tr=E(`pointer`),nr=E(!1),rr=y({get:()=>I.value.style.chart.layout.labels.percentage.fontSize,set:e=>e}),N=y({get:()=>I.value.style.chart.layout.labels.name.fontSize,set:e=>e}),ir=y({get:()=>I.value.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,set:e=>e}),ar=!1,or=()=>{I.value.autoSize&&!ar&&(ar=!0,requestAnimationFrame(()=>{ar=!1;let e=I.value,t=Rn.value,n=V.value;if(!e.autoSize||!t||!n)return;let[r,i,a,o]=n.getAttribute(`viewBox`).split(` `).map(Number),s={x:r,y:i,width:a,height:o},c=[{selector:`.vue-data-ui-datalabel-value`,baseSize:L.value.percentage.fontSize,minSize:L.value.percentage.minFontSize,sizeRef:rr},{selector:`.vue-data-ui-datalabel-name`,baseSize:L.value.name.fontSize,minSize:L.value.name.minFontSize,sizeRef:N},{selector:`.vue-data-ui-datalabel-inline`,baseSize:L.value.dataLabels.smallArcClusterFontSize,minSize:L.value.name.minFontSize,sizeRef:ir}];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})=>{t.querySelectorAll(e).forEach(e=>{i.value=pe({el:e,bounds:s,currentFontSize:n,minFontSize:r,attempts:200,padding:1})})})}))};et(async()=>{Xn.value=!0,lr(),requestAnimationFrame(or)});let sr;et(()=>{Ln.value&&(sr=new ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;if(e>0&&n>0){or();break}}}),sr.observe(Ln.value.parentElement))}),$e(()=>{sr?.disconnect()}),$e(()=>{Un.value&&(Wn.value&&Un.value.unobserve(Wn.value),Un.value.disconnect())});let cr=y(()=>I.value.debug);function lr(){if(ve(M.dataset)?(re({componentName:`VueUiDonut`,type:`dataset`,debug:cr.value}),In.value=!1,yr.value=!0):(M.dataset.forEach((e,t)=>{_e({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{re({componentName:`VueUiDonut`,type:`datasetSerieAttribute`,property:e,index:t,debug:cr.value}),In.value=!1,yr.value=!0})}),cr.value&&M.dataset.forEach((e,t)=>{(!e.name||e.name===``)&&re({componentName:`VueUiDonut`,type:`datasetAttributeEmpty`,property:`name`,index:t})})),ve(M.dataset)||(yr.value=I.value.loading),I.value.responsive){let e=je(()=>{let{width:e,height:t}=Me({chart:Ln.value,title:I.value.style.chart.title.text?Vn.value:null,legend:I.value.style.chart.legend.show?Hn.value:null,source:Gn.value,noTitle:Kn.value,padding:I.value.autoSize?void 0:jr.value});requestAnimationFrame(()=>{U.value.width=e,U.value.height=t,or()})});Un.value&&(Wn.value&&Un.value.unobserve(Wn.value),Un.value.disconnect()),Un.value=new ResizeObserver(e),Wn.value=Ln.value.parentNode,Un.value.observe(Wn.value)}}let P=E(te()),ur=E(!1),dr=E(``),F=E(null),fr=E(0);function pr(){let e=Te({userConfig:M.config,defaultConfig:Mn}),t={},n=e.theme;if(!n)t=e;else if(!Nn.value(e))Pn(e),t=e;else{let r=Te({userConfig:Ve[n]||M.config,defaultConfig:e});t={...Te({userConfig:M.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:ue[n]||d}}return t}let I=E(pr()),L=y(()=>I.value.style.chart.layout.labels),R=y(()=>I.value.style.chart.layout.donut),mr=y(()=>I.value.style.chart.layout),z=y(()=>I.value.style.chart);ye({config:()=>I.value,dataset:()=>M.dataset,component:`VueUiDonut`,rules:[be.singleSeries,be.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]}]});let hr=y(()=>I.value.userOptions.useCursorPointer),gr=y(()=>se({defaultConfig:{useCssAnimation:!1,table:{show:!1},startAnimation:{show:!1},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{labels:{dataLabels:{show:!1},hollow:{average:{show:!1},total:{show:!1}},value:{show:!1}}},legend:{backgroundColor:`transparent`,showValue:!1,showPercentage:!1},title:{color:`#1A1A1A`,subtitle:{color:`#5A5A5A`}}}}},userConfig:I.value.skeletonConfig??{}})),{loading:_r,FINAL_DATASET:vr,manualLoading:yr,skeletonDataset:br}=Ce({...rt(M),FINAL_CONFIG:I,prepareConfig:pr,skeletonDataset:M.config?.skeletonDataset??[{name:``,values:[3],color:`#BABABA`},{name:``,values:[2],color:`#AAAAAA`},{name:``,values:[1],color:`#CACACA`}],skeletonConfig:se({defaultConfig:I.value,userConfig:gr.value})}),B=E(!0),xr=E(0),Sr=E(!1),Cr=null;function wr(e=1e3){return new Promise(t=>{let n=performance.now();function r(i){let a=i-n,o=Math.min(a/e,1),s=ce(o);xr.value=s,o<1?Cr=requestAnimationFrame(r):(xr.value=1,Cr=null,t())}Cr!==null&&cancelAnimationFrame(Cr),xr.value=0,Cr=requestAnimationFrame(r)})}ot(()=>_r.value,async e=>{if(e||Sr.value)return;let t=vr.value===br,n=I.value.startAnimation?.show;!t&&n?(Sr.value=!0,await wr(I.value.startAnimation.durationMs||1e3)):xr.value=1,B.value=!1},{immediate:!0});let{userOptionsVisible:Tr,setUserOptionsVisibility:Er,keepUserOptionState:Dr}=Ie({config:I.value}),{svgRef:V}=Le({config:z.value.title});function Or(){Er(!0)}function kr(){Er(!1)}let Ar=h(M.config);ot(()=>M.config,(e,t)=>{let n=h(e),r=n!==Ar;Ar=n;let i=pr();if(!r){I.value.style.chart.tooltip=i.style.chart.tooltip,H.value.showTooltip=I.value.style.chart.tooltip.show;return}_r.value||(I.value=i),Tr.value=!I.value.userOptions.showOnChartHover,lr(),qn.value+=1,Jn.value+=1,Yn.value+=1,H.value.dataLabels.show=L.value.dataLabels.show,H.value.showTable=I.value.table.show,H.value.showTooltip=z.value.tooltip.show,U.value.height=z.value.height,U.value.width=z.value.width},{deep:!0});let jr=y(()=>{let{top:e,right:t,bottom:n,left:r}=z.value.padding;return{css:`padding:${e}px ${t}px ${n}px ${r}px`,top:e,right:t,bottom:n,left:r}}),{isPrinting:Mr,isImaging:Nr,generatePdf:Pr,generateImage:Fr}=Se({elementId:`donut__${P.value}`,fileName:z.value.title.text||`vue-ui-donut`,options:I.value.userOptions.print}),Ir=y(()=>I.value.userOptions.show&&!z.value.title.text),Lr=y(()=>ge(I.value.customPalette)),H=E({dataLabels:{show:L.value.dataLabels.show},showTable:I.value.table.show,showTooltip:z.value.tooltip.show});ot(I,()=>{H.value={dataLabels:{show:L.value.dataLabels.show},showTable:I.value.table.show,showTooltip:z.value.tooltip.show}},{immediate:!0});let U=E({height:z.value.height,width:z.value.width}),Rr=y(()=>{if(I.value.pie)return q.value;let e=R.value.strokeWidth/512,t=Math.min(U.value.width,U.value.height)*e,n=t>q.value?q.value:t;return Math.max(n,12*(1+e))}),zr=lt,W=y(()=>vr.value.sort((e,t)=>{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;return e.ghost&&!t.ghost?1:t.ghost&&!e.ghost?-1:r-n}).map((e,t)=>({name:e.name,color:p(e.color)||Lr.value[t]||d[t]||d[t%d.length],value:ie(e.values.reduce((e,t)=>e+t,0)),absoluteValues:e.values,comment:e.comment||``,patternIndex:t,seriesIndex:t,ghost:!1,pattern:`pattern_${P.value}_${t}`})));ot(()=>M.dataset,e=>{Array.isArray(e)&&e.length>0&&(yr.value=!1)},{immediate:!0});let G=nt(W.value);ot(()=>W.value,e=>{G.value=e,requestAnimationFrame(or)});function Br(){return W.value.map(e=>({name:e.name,color:e.color,value:e.value}))}let K=E([]),Vr=E(!1),Hr=E(null);function Ur(){zr(`selectLegend`,Zr.value.map(e=>({name:e.name,color:e.color,value:e.value})))}function Wr({from:e,to:t,duration:n,onUpdate:r,onDone:i,easing:a=ce}){let o=performance.now();function s(c){let l=Math.min((c-o)/n,1),u=a(l);r(e+(t-e)*u,l),l<1?requestAnimationFrame(s):(r(t,1),i&&i())}requestAnimationFrame(s)}function Gr(){K.value.length?K.value=[]:Qr.value.forEach((e,t)=>{K.value.push(t)}),Ur()}function Kr(e){let t=W.value.find((t,n)=>n===e),n=G.value.find((t,n)=>n===e).value;if(K.value.includes(e)){K.value=K.value.filter(t=>t!==e);let r=t.value;function i(){G.value=G.value.map((t,n)=>e===n?{...t,value:r}:t),Ur()}function a(){Vr.value=!0,Hr.value=e,Wr({from:n,to:r,duration:I.value.serieToggleAnimation.durationMs,onUpdate:(t,n)=>{G.value=G.value.map((n,r)=>e===r?{...n,value:t}:n),requestAnimationFrame(or)},onDone:()=>{i(),Vr.value=!1,Hr.value=null}})}I.value.serieToggleAnimation.show&&I.value.type===`classic`?a():(i(),requestAnimationFrame(or))}else if(K.value.length<W.value.length-1){function t(){K.value.push(e),G.value=G.value.map((t,n)=>e===n?{...t,value:0}:t),Ur()}function r(){Vr.value=!0,Hr.value=e,Wr({from:n,to:0,duration:I.value.serieToggleAnimation.durationMs,onUpdate:(t,n)=>{G.value=G.value.map((n,r)=>e===r?{...n,value:t}:n),requestAnimationFrame(or)},onDone:()=>{t(),requestAnimationFrame(or),Vr.value=!1,Hr.value=null}})}I.value.serieToggleAnimation.show&&I.value.type===`classic`?r():t()}}function qr(e){return W.value.length?W.value.find(t=>t.name===e)||(cr.value&&console.warn(`VueUiDonut - Series name not found "${e}"`),null):(cr.value&&console.warn(`VueUiDonut - There are no series to show.`),null)}function Jr(e){let t=qr(e);t!==null&&K.value.includes(t.seriesIndex)&&Kr(t.seriesIndex)}function Yr(e){let t=qr(e);t!==null&&(K.value.includes(t.seriesIndex)||Kr(t.seriesIndex))}let Xr=y(()=>vr.value.reduce((e,t)=>e+t.values.reduce((e,t)=>e+t,0),0)),Zr=y(()=>{if(B.value&&!_r.value){let e=xr.value,t=W.value.map(t=>({...t,value:t.value*e,color:t.color,ghost:!1})),n=Xr.value*(1-e);return n>0&&t.push({name:`__ghost__`,value:n,color:`transparent`,ghost:!0}),t}return G.value.forEach(e=>{if([null,void 0].includes(e.values))return{...e,values:[]}}),G.value.map((e,t)=>({...e,seriesIndex:t})).filter((e,t)=>!K.value.includes(t))}),Qr=y(()=>vr.value.map((e,t)=>{let n=(e.values||[]).reduce((e,t)=>e+t,0),r=n/vr.value.map(e=>(e.values||[]).reduce((e,t)=>e+t,0)).reduce((e,t)=>e+t,0);return{name:e.name,color:p(e.color)||Lr.value[t]||d[t]||d[t%d.length],value:n,shape:`circle`,patternIndex:t,proportion:r}}).map((e,t)=>{let n=_(L.value.value.formatter,e.value,s({p:L.value.dataLabels.prefix,v:e.value,s:L.value.dataLabels.suffix,r:z.value.legend.roundingValue}),{datapoint:e,index:t}),r=_(L.value.percentage.formatter,li(e),s({v:li(e),s:`%`,r:z.value.legend.roundingPercentage})),i=Ei({val:n,percentage:K.value.includes(t)?`${Ti(e.proportion*100)}%`:r,showVal:z.value.legend.showValue,showPercentage:z.value.legend.showPercentage,config:z.value.legend});return{...e,opacity:K.value.includes(t)?.5:1,segregate:()=>!Vr.value&&Kr(t),isSegregated:K.value.includes(t),display:`${e.name}${z.value.legend.showPercentage||z.value.legend.showValue?`: `:``}${i}`}})),$r=y(()=>({cy:`donut-div-legend`,backgroundColor:z.value.legend.backgroundColor,color:z.value.legend.color,fontSize:z.value.legend.fontSize,paddingBottom:12,fontWeight:z.value.legend.bold?`bold`:``})),q=y(()=>{let e=R.value.radiusRatio,t=Math.max(.1,Math.min(.50001,e)),n=Math.min(U.value.width*t,U.value.height*t);return Math.max(12,n)}),J=y(()=>ee({series:Zr.value},U.value.width/2,U.value.height/2,q.value,q.value,1.99999,2,1,360,105.25,Rr.value)),ei=y(()=>Math.abs(Zr.value.map(e=>e.value).reduce((e,t)=>e+t,0))>0),ti=y(()=>ee({series:[{value:1,color:R.value.emptyFill,name:`_`,seriesIndex:0,patternIndex:-1,ghost:!1,absoluteValues:[1]}]},U.value.width/2,U.value.height/2,q.value,q.value,1.99999,2,1,360,105.25,Rr.value)),Y=y(()=>J.value.filter(e=>!e.ghost)),X=y(()=>{let e=Math.max(...Zr.value.map(e=>e.value)),t=Zr.value.map(t=>t.value/e);return le({series:t,center:{x:U.value.width/2,y:U.value.height/2},maxRadius:Math.min(U.value.width,U.value.height)/3,hasGhost:B.value})});function ni(e){return e.x>U.value.width/2+6?`start`:e.x<U.value.width/2-6?`end`:`middle`}function ri(e){return e.middlePoint.y>U.value.height/2?c({initX:e.middlePoint.x,initY:e.middlePoint.y,offset:100,centerX:U.value.width/2,centerY:U.value.height/2}).y:c({initX:e.middlePoint.x,initY:e.middlePoint.y,offset:0,centerX:U.value.width/2,centerY:U.value.height/2}).y-100}function Z(e){return e.proportion*100>L.value.dataLabels.hideUnderValue}function ii(e,t){let n=L.value.dataLabels.hideUnderValue,r=L.value.dataLabels.smallArcClusterThreshold,i=(si.value[t]??e.proportion??0)*100;return i>n&&i<=r}let{smallArcLayoutsClassic:Q}=ct({FINAL_CONFIG:I,noGhostDonut:Y,svg:U,padding:jr,labels_inline_fontSize:ir,minSize:q,findArcMidpoint:he,calcMarkerOffsetX:g,calcMarkerOffsetY:fe,animatingIndex:Hr,segregated:K,isSmallArc:ii});function ai(e,t){let n=e.value/oi(t);return isNaN(n)?0:_(L.value.percentage.formatter,n*100,s({v:n*100,s:`%`,r:L.value.percentage.rounding}),{datapoint:e})}function oi(e){return[...e].map(e=>e.value).reduce((e,t)=>e+t,0)}let $=y(()=>Zr.value.map(e=>e.value).reduce((e,t)=>e+t,0)),si=y(()=>{let e=W.value.reduce((e,t)=>e+t.value,0);return e<=0?[]:W.value.map(t=>t.value/e)}),ci=y(()=>$.value/Zr.value.length);function li(e){return Vr.value?e.proportion*100:e.value/$.value*100}let ui=E(null),di=E(!1);function fi({datapoint:e,seriesIndex:t}){I.value.events.datapointLeave&&I.value.events.datapointLeave({datapoint:e,seriesIndex:t}),ur.value=!1,F.value=null,$n.value=null,tr.value=`pointer`}function pi({datapoint:e,relativeIndex:t,seriesIndex:n,show:r=!1,triggerMode:i=`pointer`}){I.value.events.datapointEnter&&I.value.events.datapointEnter({datapoint:e,seriesIndex:n}),tr.value=i,$n.value=t,ui.value={datapoint:e,seriesIndex:n,config:I.value,series:W.value},ur.value=r,F.value=t;let a=``,o=z.value.tooltip.customFormat;if(di.value=!1,u(o))try{let t=o({seriesIndex:n,datapoint:e,series:W.value,config:I.value});typeof t==`string`&&(dr.value=t,di.value=!0)}catch{console.warn(`Custom format cannot be applied.`),di.value=!1}di.value||(a+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${z.value.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}"/>${Fn.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${P.value}_${n})"/>`:``}</svg>`,a+=`<b>${Ei({showVal:z.value.tooltip.showValue,showPercentage:z.value.tooltip.showPercentage,val:`<span>${_(L.value.value.formatter,e.value,s({p:L.value.dataLabels.prefix,v:e.value,s:L.value.dataLabels.suffix,r:z.value.tooltip.roundingValue}),{datapoint:e,relativeIndex:t,seriesIndex:n})}</span>`,percentage:_(L.value.percentage.formatter,e.proportion*100,s({v:e.proportion*100,s:`%`,r:z.value.tooltip.roundingPercentage}),{datapoint:e,relativeIndex:t,seriesIndex:n}),config:z.value.tooltip})}</b></div>`,z.value.comments.showInTooltip&&e.comment&&(a+=`<div class="vue-data-ui-tooltip-comment" style="background:${f(e.color,12.5)}; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${e.color}">${e.comment}</div>`),dr.value=`<div>${a}</div>`)}function mi(e,t){let n=Q.value[t];if(n)return{textAnchor:n.textAnchor,x:n.labelX,y:n.labelY};let r=g(e,!0,12);return{textAnchor:r.anchor,x:r.x,y:fe(e)}}function hi(e,t,n){let{textAnchor:r,x:i}=mi(e,t),a=Di(e),o=`
2
2
  <tspan
3
3
  class="vue-data-ui-datalabel-inline"
4
4
  fill="${L.value.percentage.color}"
@@ -44,4 +44,4 @@ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./t
44
44
  font-size="${N.value}px"
45
45
  style="font-weight:${L.value.name.bold?`bold`:`normal`}"
46
46
  >${e}</tspan>
47
- `}),r===`end`?`${L.value.name.show?u:``}${s}`:`${s}${L.value.name.show?u:``}`}function _i(e){return I.value.useBlurOnHover&&![null,void 0].includes(F.value)&&F.value!==e?`url(#blur_${P.value})`:``}function vi(e){if(!Vr.value||Hr.value===null||e.seriesIndex!==Hr.value)return 1;let t=(e.proportion??0)*100,n=L.value.dataLabels.hideUnderValue,r=L.value.dataLabels.smallArcClusterThreshold+2,i=n;return t>=r?1:t<=i?0:(t-i)/(r-i)}let yi=y(()=>({head:Zr.value.map(e=>({name:e.name,color:e.color})),body:Zr.value.map(e=>e.value)}));function bi(e=null){Xe(()=>{let t=yi.value.head.map((e,t)=>[[e.name],[yi.value.body[t]],[isNaN(yi.value.body[t]/$.value)?`-`:yi.value.body[t]/$.value*100]]),n=[[z.value.title.text],[z.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),r=l(n);e?e(r):de({csvContent:r,title:z.value.title.text||`vue-ui-donut`})})}let xi=y(()=>{let e=[`__SUM__`,s({p:L.value.dataLabels.prefix,v:$.value,s:L.value.dataLabels.suffix,r:I.value.table.td.roundingValue}),`100%`],t=yi.value.head.map((e,t)=>[{color:e.color,name:e.name||`-`},yi.value.body[t],isNaN(yi.value.body[t]/$.value)?`-`:(yi.value.body[t]/$.value*100).toFixed(I.value.table.td.roundingPercentage)+`%`]),n=t.map(e=>e.map((e,t)=>t===0?e.name:e)),r={th:{backgroundColor:I.value.table.th.backgroundColor,color:I.value.table.th.color,outline:I.value.table.th.outline},td:{backgroundColor:I.value.table.td.backgroundColor,color:I.value.table.td.color,outline:I.value.table.td.outline},breakpoint:I.value.table.responsiveBreakpoint};return{colNames:[I.value.table.columnNames.series,I.value.table.columnNames.value,I.value.table.columnNames.percentage],head:e,body:t,a11yBody:n,config:r}}),Si=E(!1);function Ci(e){Si.value=e,fr.value+=1}let wi=y(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function Ti(e){return ze({num:e,rounding:z.value.legend.roundingPercentage})}function Ei({val:e,percentage:t,showVal:n,showPercentage:r,config:i}){return Be({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function Di(e){return Ei({val:_(L.value.value.formatter,e.value,s({p:L.value.dataLabels.prefix,v:e.value,s:L.value.dataLabels.suffix,r:L.value.value.rounding}),{datapoint:e}),percentage:ai(e,Y.value),showVal:L.value.value.show,showPercentage:L.value.percentage.show,config:L.value.dataLabels})}function Oi(e,t){I.value.events.datapointClick&&I.value.events.datapointClick({datapoint:e,seriesIndex:e.seriesIndex}),zr(`selectDatapoint`,{datapoint:e,index:t})}function ki(){H.value.showTable=!H.value.showTable}function Ai(){H.value.dataLabels.show=!H.value.dataLabels.show}function ji(){H.value.showTooltip=!H.value.showTooltip}let Mi=E(!1);function Ni(){Mi.value=!Mi.value}let Pi=Re(Ln,()=>z.value.title.text);function Fi(){if(!Rn.value)return;let{x:e,y:t,width:n,height:r}=Rn.value.getBBox();V.value&&V.value.setAttribute(`viewBox`,`${e} ${t} ${n+Math.min(0,e)} ${r+Math.min(0,t)}`)}let Ii=y(()=>n({config:I,style:z,mutableConfig:H,dialog:jn,accordion:En,isFullscreen:Si,parent:Ln,maxWidth:500,isCursorPointer:hr}));ot(()=>H.value.showTable,e=>t(e,I,Zn));function Li(){H.value.showTable=!1,Qn.value&&Qn.value.setTableIconState(!1)}let Ri=y(()=>Qr.value.map(e=>({...e,name:e.display}))),zi=y(()=>z.value.backgroundColor),Bi=y(()=>z.value.legend),Vi=y(()=>z.value.title),{isCallbackImaging:Hi,isCallbackSvg:Ui,generateSvg:Wi,onGenerateImage:Gi}=De({svg:V,title:Vi,legend:Bi,legendItems:Ri,backgroundColor:zi,getSvgCallback:()=>I.value.userOptions.callbacks.svg,generateImage:Fr});async function Ki(){if(zr(`copyAlt`,{config:I.value,dataset:G.value}),!I.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(I.value.userOptions.callbacks.altCopy({config:I.value,dataset:G.value}))}function qi(){$n.value=null,nr.value=!0}function Ji(){$n.value=null,tr.value=`pointer`,ur.value=!1,F.value=null,nr.value=!1}function Yi(e){if(!V.value||Mi.value||document.activeElement!==V.value||!Y.value.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){$n.value=null,tr.value=`pointer`,ur.value=!1,F.value=null;return}if(r){if($n.value===null)return;let e=Y.value[$n.value];if(!e)return;Oi(e,$n.value);return}let a=$n.value,o=F.value,s=a!==null&&a>=0&&a<Y.value.length,c=o!==null&&o>=0&&o<Y.value.length;s?n?(a+=1,a>=Y.value.length&&(a=0)):t&&(--a,a<0&&(a=Y.value.length-1)):c?(a=n?o+1:o-1,a>=Y.value.length&&(a=0),a<0&&(a=Y.value.length-1)):a=n?0:Y.value.length-1;let l=Y.value[a];l&&($n.value=a,Xi(a),pi({datapoint:l,relativeIndex:a,seriesIndex:l.seriesIndex,show:!0,triggerMode:`keyboard`}))}function Xi(e){if(!Number.isFinite(e)||!V.value)return;let t=U.value.width/2,n=U.value.height/2;if(I.value.type===`classic`){let r=Y.value[e];if(!r?.arcSlice)return;let i=he(r.arcSlice);if(!i)return;t=i.x,n=i.y}else{let r=X.value[e]?.middlePoint;if(!r)return;t=r.x,n=r.y}let r=V.value.getBoundingClientRect();er.value={x:r.left+t/U.value.width*r.width,y:r.top+n/U.value.height*r.height}}let Zi=y(()=>({headers:xi.value?.colNames??[],rows:xi.value?.a11yBody??[]}));return Ae({autoSize:Fi,getData:Br,getImage:Pi,generatePdf:Pr,generateCsv:bi,generateImage:Fr,generateSvg:Wi,hideSeries:Yr,showSeries:Jr,toggleTable:ki,toggleLabels:Ai,toggleTooltip:ji,toggleAnnotator:Ni,toggleFullscreen:Ci,copyAlt:Ki}),(t,n)=>(T(),S(`div`,{ref_key:`donutChart`,ref:Ln,class:Ze(`vue-data-ui-component vue-ui-donut ${Si.value?`vue-data-ui-wrapper-fullscreen`:``} ${I.value.useCssAnimation?``:`vue-ui-dna`}`),style:w(`font-family:${I.value.style.fontFamily};width:100%; ${I.value.responsive?`height:100%;`:``} text-align:center;background:${z.value.backgroundColor}`),id:`donut__${P.value}`,onMouseenter:Or,onMouseleave:kr},[C(`div`,{id:`chart-instructions-${P.value}`,class:`sr-only`},[C(`p`,null,k(I.value.a11y.translations.keyboardNavigation),1)],8,dt),Zi.value?.rows?.length?(T(),b(Fe,{key:0,uid:P.value,head:Zi.value.headers,body:Zi.value.rows,notice:I.value.a11y.translations.tableAvailable,caption:I.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):x(``,!0),I.value.userOptions.buttons.annotator&&A(V)?(T(),b(A(On),{key:1,color:z.value.color,backgroundColor:z.value.backgroundColor,active:Mi.value,svgRef:A(V),isCursorPointer:hr.value,palette:I.value.userOptions.annotatorPalette,onClose:Ni},We({_:2},[D(A(i),e=>({name:e,fn:j(n=>[O(t.$slots,e,Qe(Je(A(r)(e,n))),void 0,!0)])}))]),1032,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`,`palette`])):x(``,!0),O(t.$slots,`userConfig`,{},void 0,!0),Ir.value?(T(),S(`div`,{key:2,ref_key:`noTitle`,ref:Kn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):x(``,!0),z.value.title.text?(T(),S(`div`,{key:3,ref_key:`chartTitle`,ref:Vn,style:`width:100%;background:transparent;padding-bottom:24px`},[(T(),b(Oe,{key:`title_${qn.value}`,config:{title:{cy:`donut-div-title`,...z.value.title},subtitle:{cy:`donut-div-subtitle`,...z.value.title.subtitle}}},null,8,[`config`]))],512)):x(``,!0),C(`div`,{id:`legend-top-${P.value}`},null,8,ft),I.value.userOptions.show&&In.value&&(A(Dr)||A(Tr))?(T(),b(A(kn),{ref_key:`userOptionsRef`,ref:Qn,key:`user_option_${fr.value}`,backgroundColor:z.value.backgroundColor,color:z.value.color,isPrinting:A(Mr),isImaging:A(Nr),uid:P.value,hasTooltip:z.value.tooltip.show&&I.value.userOptions.buttons.tooltip,hasPdf:I.value.userOptions.buttons.pdf,hasImg:I.value.userOptions.buttons.img,hasSvg:I.value.userOptions.buttons.svg,hasXls:I.value.userOptions.buttons.csv,hasTable:I.value.userOptions.buttons.table,hasLabel:I.value.userOptions.buttons.labels,hasFullscreen:I.value.userOptions.buttons.fullscreen,hasAltCopy:I.value.userOptions.buttons.altCopy,isFullscreen:Si.value,chartElement:Ln.value,position:I.value.userOptions.position,callbacks:I.value.userOptions.callbacks,isTooltip:H.value.showTooltip,titles:{...I.value.userOptions.buttonTitles},hasAnnotator:I.value.userOptions.buttons.annotator,isAnnotation:Mi.value,printScale:I.value.userOptions.print.scale,tableDialog:I.value.table.useDialog,isCursorPointer:hr.value,onToggleFullscreen:Ci,onGeneratePdf:A(Pr),onGenerateCsv:bi,onGenerateImage:A(Gi),onGenerateSvg:A(Wi),onToggleTable:ki,onToggleLabels:Ai,onToggleTooltip:ji,onToggleAnnotator:Ni,onCopyAlt:Ki,style:w({visibility:A(Dr)?A(Tr)?`visible`:`hidden`:`visible`})},We({_:2},[D(A(a)(t.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:j(n=>[O(t.$slots,e,Qe(Je(A(o)(e,n))),void 0,!0)])}))]),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.onGenerateImage.onGenerateSvg.style`.split(`.`))):x(``,!0),C(`div`,pt,[(T(),S(`svg`,{ref_key:`svgRef`,ref:V,xmlns:A(me),"aria-describedby":`chart-instructions-${P.value}`,class:Ze({"vue-data-ui-fullscreen--on":Si.value,"vue-data-ui-fulscreen--off":!Si.value,"vue-data-ui-svg":!0}),viewBox:`0 0 ${U.value.width<=0?10:U.value.width} ${U.value.height<=0?10:U.value.height}`,style:w(`max-width:100%; overflow: visible; background:transparent;color:${z.value.color};${jr.value.css}`),tabindex:`0`,onFocus:qi,onBlur:Ji,onKeydown:Yi},[C(`g`,{ref_key:`G`,ref:Rn,class:`vue-data-ui-g`},[Ke(A(An)),t.$slots[`chart-background`]?(T(),S(`foreignObject`,{key:0,x:0,y:0,width:U.value.width<=0?10:U.value.width,height:U.value.height<=0?10:U.value.height,style:{pointerEvents:`none`}},[O(t.$slots,`chart-background`,{},void 0,!0)],8,ht)):x(``,!0),I.value.type===`classic`&&!isNaN(Rr.value/q.value)?(T(),S(`defs`,gt,[z.value.useGradient?(T(),b(Ne,{key:0,t:`radial`,id:`gradient_${P.value}`,stops:[[`0%`,A(f)(z.value.backgroundColor,0),0],[`${(1-Rr.value/q.value)*100}%`,A(f)(`#FFFFFF`,0),0],[`${(1-Rr.value/q.value/2)*100}%`,A(f)(`#FFFFFF`,z.value.gradientIntensity),1],[`100%`,A(f)(z.value.backgroundColor,0),0]]},null,8,[`id`,`stops`])):x(``,!0)])):x(``,!0),I.value.type===`polar`?(T(),S(`defs`,_t,[(T(!0),S(v,null,D(X.value,(e,t)=>(T(),b(Ne,{t:`radial`,id:`polar_gradient_${t}_${P.value}`,key:`pg_${t}_${P.value}`,cx:(isNaN(e.middlePoint.x/U.value.width*100)?0:e.middlePoint.x/U.value.width*100)+`%`,cy:(isNaN(e.middlePoint.y/U.value.height*100)?0:e.middlePoint.y/U.value.height*100)+`%`,r:`62%`,stops:[[`0%`,A(m)(J.value[t].color,.05),z.value.gradientIntensity/100],[`100%`,J.value[t].color,1]]},null,8,[`id`,`cx`,`cy`,`stops`]))),128))])):x(``,!0),C(`defs`,null,[C(`filter`,{id:`blur_${P.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[C(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:2,id:`blur_std_${P.value}`},null,8,yt),n[5]||=C(`feColorMatrix`,{type:`saturate`,values:`0`},null,-1)],8,vt),C(`filter`,{id:`shadow_${P.value}`,"color-interpolation-filters":`sRGB`},[C(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`10`,"flood-opacity":`0.5`,"flood-color":R.value.shadowColor},null,8,xt)],8,bt),C(`filter`,{id:`drop_shadow_${P.value}`,"color-interpolation-filters":`sRGB`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[C(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`3`,"flood-opacity":`1`,"flood-color":R.value.shadowColor},null,8,Ct)],8,St)]),I.value.type===`classic`?(T(!0),S(v,{key:3},D(J.value.filter(e=>!e.ghost),(e,t)=>(T(),S(`g`,null,[Z(e)&&H.value.dataLabels.show?(T(),S(`path`,{key:0,d:A(Q)[t]?.connectorPath||A(oe)(e,{x:U.value.width/2,y:U.value.height/2},16,16,!1,!1,Rr.value,12,mr.value.curvedMarkers),stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,filter:_i(t)},null,8,wt)):x(``,!0)]))),256)):x(``,!0),I.value.type===`polar`?(T(!0),S(v,{key:4},D(J.value.filter(e=>!e.ghost),(e,t)=>(T(),S(`g`,null,[Z(e)&&H.value.dataLabels.show?(T(),S(`path`,{key:0,d:`M ${A(c)({initX:X.value[t].middlePoint.x,initY:X.value[t].middlePoint.y,offset:24,centerX:U.value.width/2,centerY:U.value.height/2}).x},${A(c)({initX:X.value[t].middlePoint.x,initY:X.value[t].middlePoint.y,offset:24,centerX:U.value.width/2,centerY:U.value.height/2}).y} ${X.value[t].middlePoint.x},${X.value[t].middlePoint.y}`,stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,filter:_i(t),style:w({transition:B.value||!I.value.serieToggleAnimation.show?`none`:`all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Tt)):x(``,!0)]))),256)):x(``,!0),I.value.type===`classic`&&R.value.useShadow?(T(),S(`circle`,{key:5,cx:U.value.width/2,cy:U.value.height/2,r:q.value<=0?10:q.value,fill:z.value.backgroundColor,filter:`url(#shadow_${P.value})`},null,8,Et)):x(``,!0),t.$slots.pattern?(T(),S(`g`,Dt,[(T(!0),S(v,null,D(e.dataset,(e,n)=>(T(),S(`defs`,{key:`pattern-${e.patternIndex}`},[O(t.$slots,`pattern`,Ye({ref_for:!0},{seriesIndex:n,patternId:`pattern_${P.value}_${n}`}),void 0,!0)]))),128))])):x(``,!0),$.value&&I.value.type===`classic`?(T(),S(v,{key:7},[(T(!0),S(v,null,D(Y.value,(e,t)=>(T(),S(`path`,{stroke:z.value.backgroundColor,d:e.arcSlice,fill:`#FFFFFF`},null,8,Ot))),256)),(T(!0),S(v,null,D(Y.value,(e,t)=>(T(),S(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:e.color,stroke:R.value.borderColorAuto?z.value.backgroundColor:R.value.borderColor,"stroke-width":R.value.borderWidth,filter:_i(t)},null,8,kt))),256)),t.$slots.pattern?(T(),S(`g`,At,[(T(!0),S(v,null,D(Y.value,(e,t)=>(T(),S(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:`url(#${e.pattern})`,stroke:R.value.borderColorAuto?z.value.backgroundColor:R.value.borderColor,"stroke-width":R.value.borderWidth,filter:_i(t)},null,8,jt))),256))])):x(``,!0)],64)):x(``,!0),$.value&&I.value.type===`polar`?(T(),S(v,{key:8},[J.value.length>1?(T(),S(`g`,Mt,[(T(!0),S(v,null,D(Y.value,(e,t)=>(T(),S(`path`,{stroke:R.value.borderColorAuto?z.value.backgroundColor:R.value.borderColor,d:X.value[t].path,fill:`#FFFFFF`,style:w({transition:B.value||!I.value.serieToggleAnimation.show?`none`:`all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Nt))),256)),R.value.useShadow?(T(),S(`g`,Pt,[(T(!0),S(v,null,D(Y.value,(e,t)=>(T(),S(`path`,{class:`vue-ui-donut-arc-path`,d:X.value[t].path,fill:`transparent`,stroke:R.value.borderColorAuto?z.value.backgroundColor:mr.value.donut.borderColor,"stroke-width":R.value.borderWidth,filter:`url(#drop_shadow_${P.value})`,style:w({transition:B.value||!I.value.serieToggleAnimation.show?`none`:`all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Ft))),256))])):x(``,!0),t.$slots.pattern?(T(),S(`g`,It,[(T(!0),S(v,null,D(Y.value,(e,t)=>(T(),S(`path`,{class:`vue-ui-donut-arc-path`,d:X.value[t].path,fill:`url(#${e.pattern})`,stroke:R.value.borderColorAuto?z.value.backgroundColor:mr.value.donut.borderColor,"stroke-width":R.value.borderWidth,filter:_i(t),style:w({transition:B.value||!I.value.serieToggleAnimation.show?`none`:`all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`,transformOrigin:`center`})},null,12,Lt))),256))])):x(``,!0),(T(!0),S(v,null,D(Y.value,(e,t)=>(T(),S(`path`,{class:`vue-ui-donut-arc-path`,d:X.value[t].path,fill:z.value.useGradient?`url(#polar_gradient_${t}_${P.value})`:e.color,stroke:R.value.borderColorAuto?z.value.backgroundColor:R.value.borderColor,"stroke-width":R.value.borderWidth,filter:_i(t),style:w({transition:B.value||!I.value.serieToggleAnimation.show?`none`:`all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Rt))),256))])):(T(),S(`g`,zt,[t.$slots.pattern?(T(),S(`circle`,{key:0,cx:U.value.width/2,cy:U.value.height/2,r:q.value,fill:`url(#pattern_${P.value}_${J.value[0].patternIndex})`,stroke:z.value.backgroundColor,"stroke-width":R.value.borderWidth},null,8,Bt)):x(``,!0),C(`circle`,{cx:U.value.width/2,cy:U.value.height/2,r:q.value,fill:z.value.useGradient?`url(#polar_gradient_0_${P.value})`:J.value[0].color,stroke:z.value.backgroundColor,"stroke-width":R.value.borderWidth},null,8,Vt)]))],64)):(T(),S(v,{key:9},[I.value.type===`classic`&&!ei.value?(T(),S(`g`,Ht,[(T(!0),S(v,null,D(ti.value,(e,t)=>(T(),S(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:e.color,stroke:z.value.backgroundColor,"stroke-width":R.value.borderWidth},null,8,Ut))),256))])):x(``,!0),C(`circle`,{cx:U.value.width/2,cy:U.value.height/2,r:q.value<=0?10:q.value,fill:`transparent`,stroke:z.value.backgroundColor},null,8,Wt)],64)),z.value.useGradient&&I.value.type===`classic`?(T(),S(`circle`,{key:10,cx:U.value.width/2,cy:U.value.height/2,r:q.value<=0?10:q.value,fill:`url(#gradient_${P.value})`},null,8,Gt)):x(``,!0),C(`circle`,{ref_key:`circle_hollow`,ref:Bn,style:{pointerEvents:`none`},fill:`none`,cx:U.value.width/2,cy:U.value.height/2,r:Math.max(.1,Rr.value*1.7)},null,8,Kt),$.value?(T(),S(v,{key:11},[J.value.length>1||I.value.type===`classic`?(T(),S(`g`,qt,[(T(!0),S(v,null,D(J.value.filter(e=>!e.ghost),(e,t)=>(T(),S(`path`,{d:I.value.type===`classic`?e.arcSlice:X.value[t].path,stroke:R.value.borderColorAuto?z.value.backgroundColor:R.value.borderColor,fill:F.value===t?R.value.selectedColor:`transparent`,onMouseenter:n=>pi({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>fi({datapoint:e,seriesIndex:e.seriesIndex}),onClick:n=>Oi(e,t)},null,40,Jt))),256))])):(T(),S(`g`,Yt,[C(`circle`,{cx:U.value.width/2,cy:U.value.height/2,r:q.value,fill:`transparent`,onMouseenter:n[0]||=e=>pi({datapoint:J.value[0],relativeIndex:0,seriesIndex:J.value[0].seriesIndex,show:!0}),onMouseleave:n[1]||=e=>fi({datapoint:J.value[0],seriesIndex:J.value[0].seriesIndex}),onClick:n[2]||=e=>Oi(J.value[0],t.i)},null,40,Xt)]))],64)):x(``,!0),I.value.type===`classic`?(T(),S(`g`,{key:12,ref_key:`G_hollow`,ref:zn,class:`vue-data-ui-donut-hollow-labels`},[L.value.hollow.total.show?(T(),S(`text`,{key:0,"text-anchor":`middle`,x:U.value.width/2,y:U.value.height/2-(L.value.hollow.average.show?L.value.hollow.total.fontSize:0)+L.value.hollow.total.offsetY,fill:L.value.hollow.total.color,"font-size":L.value.hollow.total.fontSize,style:w(`font-weight:${L.value.hollow.total.bold?`bold`:``}`)},k(L.value.hollow.total.text),13,Zt)):x(``,!0),L.value.hollow.total.show?(T(),S(`text`,{key:1,"text-anchor":`middle`,x:U.value.width/2,y:U.value.height/2+L.value.hollow.total.fontSize-(L.value.hollow.average.show?L.value.hollow.total.fontSize:0)+L.value.hollow.total.value.offsetY,fill:L.value.hollow.total.value.color,"font-size":L.value.hollow.total.value.fontSize,style:w(`font-weight:${L.value.hollow.total.value.bold?`bold`:``}`)},k(A(_)(L.value.hollow.total.value.formatter,$.value,A(s)({p:L.value.hollow.total.value.prefix,v:$.value,s:L.value.hollow.total.value.suffix}))),13,Qt)):x(``,!0),L.value.hollow.average.show?(T(),S(`text`,{key:2,"text-anchor":`middle`,x:U.value.width/2,y:U.value.height/2+(L.value.hollow.total.show?L.value.hollow.average.fontSize:0)+L.value.hollow.average.offsetY,fill:L.value.hollow.average.color,"font-size":L.value.hollow.average.fontSize,style:w(`font-weight:${L.value.hollow.average.bold?`bold`:``}`)},k(L.value.hollow.average.text),13,$t)):x(``,!0),L.value.hollow.average.show?(T(),S(`text`,{key:3,"text-anchor":`middle`,x:U.value.width/2,y:U.value.height/2+(L.value.hollow.total.show?L.value.hollow.average.fontSize:0)+L.value.hollow.average.fontSize+L.value.hollow.average.value.offsetY,fill:L.value.hollow.average.value.color,"font-size":L.value.hollow.average.value.fontSize,style:w(`font-weight:${L.value.hollow.average.value.bold?`bold`:``}`)},k(Vr.value||B.value?`--`:A(_)(L.value.hollow.average.value.formatter,A(ae)(ci.value),A(s)({p:L.value.hollow.average.value.prefix,v:A(ae)(ci.value),s:L.value.hollow.average.value.suffix,r:L.value.hollow.average.value.rounding}))),13,en)):x(``,!0)],512)):x(``,!0),(T(!0),S(v,null,D(Y.value.filter(e=>!e.ghost),(e,n)=>(T(),S(`g`,{filter:_i(n),key:e.seriesIndex,opacity:vi(e)},[L.value.dataLabels.useLabelSlots?(T(),S(`g`,nn,[(T(),S(`foreignObject`,{x:A(g)(e,!0).anchor===`end`?A(g)(e).x-120:A(g)(e,!0).anchor===`middle`?A(g)(e).x-60:A(g)(e).x,y:A(fe)(e)-(wi.value?20:0),width:`120`,height:`60`,style:{overflow:`visible`}},[C(`div`,null,[O(t.$slots,`dataLabel`,Ye({ref_for:!0},{datapoint:e,isBlur:!I.value.useBlurOnHover||[null,void 0].includes(F.value)||F.value===n,isSafari:wi.value,isVisible:Z(e)&&H.value.dataLabels.show,textAlign:A(g)(e,!0,16,!0).anchor,flexAlign:A(g)(e,!0,16).anchor,percentage:ai(e,Y.value)}),void 0,!0)])],8,rn))])):(T(),S(`g`,an,[I.value.type===`classic`?(T(),S(v,{key:0},[Z(e)&&H.value.dataLabels.show?(T(),S(`circle`,{key:0,cx:A(Q)[n]?.markerX??A(g)(e).x,cy:A(Q)[n]?.markerY??A(fe)(e)-3.5,fill:e.color,stroke:z.value.backgroundColor,"stroke-width":1,r:3,filter:!I.value.useBlurOnHover||[null,void 0].includes(F.value)||F.value===n?``:`url(#blur_${P.value})`,onClick:t=>Oi(e,n),onMouseenter:t=>pi({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>fi({datapoint:e,seriesIndex:e.seriesIndex})},null,40,on)):x(``,!0),L.value.dataLabels.oneLine||A(Q)[n]?st((T(),S(`text`,{key:1,class:`vue-data-ui-datalabel-inline`,"text-anchor":A(Q)[n]?.textAnchor||A(g)(e,!0,12).anchor,x:A(Q)[n]?.labelX??A(g)(e,!0,12).x,y:A(Q)[n]?.labelY??A(fe)(e),onClick:t=>Oi(e,n),onMouseenter:t=>pi({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>fi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:hi(e,n,!!A(Q)[n])},null,40,sn)),[[at,Z(e)&&H.value.dataLabels.show]]):(T(),S(v,{key:2},[st(C(`text`,{class:`vue-data-ui-datalabel-value`,"text-anchor":A(Q)[n]?.textAnchor||A(g)(e,!0,12).anchor,x:A(Q)[n]?.labelX??A(g)(e,!0,12).x,y:A(Q)[n]?.labelY??A(fe)(e),fill:L.value.percentage.color,"font-size":rr.value+`px`,style:w(`font-weight:${L.value.percentage.bold?`bold`:``}`),onClick:t=>Oi(e,n),onMouseenter:t=>pi({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>fi({datapoint:e,seriesIndex:e.seriesIndex})},k(Di(e)),45,cn),[[at,Z(e)&&H.value.dataLabels.show]]),st(C(`text`,{class:`vue-data-ui-datalabel-name`,"text-anchor":A(Q)[n]?.textAnchor||A(g)(e).anchor,x:A(Q)[n]?.labelX??A(g)(e,!0,12).x,y:(A(Q)[n]?.labelY??A(fe)(e))+N.value*1.2,fill:L.value.name.color,"font-size":N.value+`px`,style:w(`font-weight:${L.value.name.bold?`bold`:``}`),onClick:t=>Oi(e,n),onMouseenter:t=>pi({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>fi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:A(ne)({content:e.name,fontSize:N.value,fill:L.value.name.color,x:A(Q)[n]?.labelX??A(g)(e,!0,12).x,y:(A(Q)[n]?.labelY??A(fe)(e))+N.value})},null,44,ln),[[at,Z(e,!0,12)&&H.value.dataLabels.show&&L.value.name.show]])],64))],64)):x(``,!0),I.value.type===`polar`?(T(),S(v,{key:1},[Z(e)&&H.value.dataLabels.show?(T(),S(`circle`,{key:0,cx:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:24,centerX:U.value.width/2,centerY:U.value.height/2}).x,cy:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:24,centerX:U.value.width/2,centerY:U.value.height/2}).y,fill:e.color,stroke:z.value.backgroundColor,"stroke-width":1,r:3,filter:!I.value.useBlurOnHover||[null,void 0].includes(F.value)||F.value===n?``:`url(#blur_${P.value})`,onClick:t=>Oi(e,n),onMouseenter:t=>pi({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>fi({datapoint:e,seriesIndex:e.seriesIndex}),style:w({transition:B.value||!I.value.serieToggleAnimation.show?`none`:`all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,44,un)):x(``,!0),L.value.dataLabels.oneLine?st((T(),S(`text`,{key:1,class:`vue-data-ui-datalabel-inline`,"text-anchor":ni(X.value[n].middlePoint),x:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).x,y:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).y,style:w({transition:B.value||!I.value.serieToggleAnimation.show?`none`:`all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`}),onClick:t=>Oi(e,n),onMouseenter:t=>pi({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>fi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:gi(e,n)},null,44,dn)),[[at,Z(e)&&H.value.dataLabels.show]]):(T(),S(v,{key:2},[Z(e)&&H.value.dataLabels.show?(T(),S(`text`,{key:0,class:`vue-data-ui-datalabel-value`,"text-anchor":ni(X.value[n].middlePoint),x:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).x,y:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).y,fill:L.value.percentage.color,"font-size":rr.value,style:w({transition:B.value||!I.value.serieToggleAnimation.show?`none`:`all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:L.value.percentage.bold?`bold`:`normal`}),onClick:t=>Oi(e,n),onMouseenter:t=>pi({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>fi({datapoint:e,seriesIndex:e.seriesIndex})},k(Di(e)),45,fn)):x(``,!0),Z(e,!0,12)&&H.value.dataLabels.show&&L.value.name.show?(T(),S(`text`,{key:1,class:`vue-data-ui-datalabel-name`,"text-anchor":ni(X.value[n].middlePoint),x:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).x,y:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).y+N.value*1.2,fill:L.value.name.color,"font-size":N.value,style:w({transition:B.value||!I.value.serieToggleAnimation.show?`none`:`all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:L.value.name.bold?`bold`:`normal`}),onClick:t=>Oi(e,n),onMouseenter:t=>pi({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>fi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:A(ne)({content:e.name,fontSize:N.value,fill:L.value.name.color,x:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).x,y:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).y+N.value*1.2})},null,44,pn)):x(``,!0)],64))],64)):x(``,!0)])),H.value.dataLabels.show&&z.value.comments.show&&e.comment?(T(),S(`g`,mn,[Z(e)&&I.value.type===`classic`?(T(),S(`foreignObject`,{key:0,x:z.value.comments.offsetX+(A(g)(e,!0).anchor===`end`?A(g)(e).x-z.value.comments.width:A(g)(e,!0).anchor===`middle`?A(g)(e).x-z.value.comments.width/2:A(g)(e).x),y:A(fe)(e)+24+z.value.comments.offsetY,width:z.value.comments.width,height:`200`,style:{overflow:`visible`,"pointer-events":`none`}},[C(`div`,null,[O(t.$slots,`plot-comment`,{plot:{...e,textAlign:A(g)(e,!0,16,!0).anchor,flexAlign:A(g)(e,!0,16).anchor,isFirstLoad:B.value}},void 0,!0)])],8,hn)):x(``,!0),Z(e)&&I.value.type===`polar`?(T(),S(`foreignObject`,{key:1,x:z.value.comments.offsetX+(ni(X.value[n].middlePoint)===`end`?A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).x-z.value.comments.width:ni(X.value[n].middlePoint)===`middle`?A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).x-z.value.comments.width/2:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).x),y:ri(X.value[n])+z.value.comments.offsetY,width:z.value.comments.width,height:`200`,style:w({transition:B.value||!I.value.serieToggleAnimation.show?`none`:`all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`,overflow:`visible`,pointerEvents:`none`})},[C(`div`,null,[O(t.$slots,`plot-comment`,{plot:{...e,textAlign:ni(X.value[n].middlePoint),flexAlign:ni(X.value[n].middlePoint),isFirstLoad:B.value}},void 0,!0)])],12,gn)):x(``,!0)])):x(``,!0)],8,tn))),128)),O(t.$slots,`svg`,{svg:{...U.value,datapoints:J.value,isPrintingImg:A(Mr)||A(Nr)||A(Hi),isPrintingSvg:A(Ui)}},void 0,!0)],512)],46,mt)),t.$slots.hint?(T(),S(`div`,_n,[O(t.$slots,`hint`,Qe(Je({hint:I.value.a11y.translations.keyboardNavigation,isVisible:nr.value})),void 0,!0)])):x(``,!0)]),t.$slots.watermark?(T(),S(`div`,vn,[O(t.$slots,`watermark`,Qe(Je({isPrinting:A(Mr)||A(Nr)||A(Hi)||A(Ui)})),void 0,!0)])):x(``,!0),C(`div`,{id:`legend-bottom-${P.value}`},null,8,yn),Xn.value&&(z.value.legend.show||t.$slots.legend)?(T(),b(Ue,{key:6,to:z.value.legend.position===`top`?`#legend-top-${P.value}`:`#legend-bottom-${P.value}`},[C(`div`,{ref_key:`chartLegend`,ref:Hn},[O(t.$slots,`legend`,{legend:Qr.value},()=>[z.value.legend.show?(T(),b(He,{key:`legend_${Yn.value}`,legendSet:Qr.value,config:$r.value,onClickMarker:n[3]||=({i:e})=>Kr(e),isCursorPointer:hr.value},We({item:j(({legend:e,index:t})=>[C(`div`,{style:w(`opacity:${K.value.includes(t)?.5:1}`),onClick:t=>e.segregate()},k(e.display),13,bn)]),legendToggle:j(()=>[Qr.value.length>2&&z.value.legend.selectAllToggle.show&&!A(_r)?(T(),b(Pe,{key:0,backgroundColor:z.value.legend.selectAllToggle.backgroundColor,color:z.value.legend.selectAllToggle.color,fontSize:z.value.legend.fontSize,checked:K.value.length>0,isCursorPointer:hr.value,onToggle:Gr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):x(``,!0)]),_:2},[t.$slots.pattern?{name:`legend-pattern`,fn:j(({legend:e,index:t})=>[Ke(ke,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${P.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):x(``,!0)],!0)],512)],8,[`to`])):x(``,!0),t.$slots.source?(T(),S(`div`,{key:7,ref_key:`source`,ref:Gn,dir:`auto`},[O(t.$slots,`source`,{},void 0,!0)],512)):x(``,!0),t.$slots.hollow?(T(),S(`div`,xn,[O(t.$slots,`hollow`,Qe(Je({total:$.value,average:ci.value,dataset:W.value,...U.value})),void 0,!0)])):x(``,!0),Ke(A(wn),{teleportTo:z.value.tooltip.teleportTo,show:H.value.showTooltip&&ur.value,backgroundColor:z.value.tooltip.backgroundColor,color:z.value.tooltip.color,fontSize:z.value.tooltip.fontSize,borderRadius:z.value.tooltip.borderRadius,borderColor:z.value.tooltip.borderColor,borderWidth:z.value.tooltip.borderWidth,backgroundOpacity:z.value.tooltip.backgroundOpacity,position:z.value.tooltip.position,offsetX:z.value.tooltip.offsetX,offsetY:z.value.tooltip.offsetY,parent:Ln.value,content:dr.value,isCustom:di.value,isFullscreen:Si.value,smooth:z.value.tooltip.smooth,backdropFilter:z.value.tooltip.backdropFilter,smoothForce:z.value.tooltip.smoothForce,smoothSnapThreshold:z.value.tooltip.smoothSnapThrehsold,isA11yMode:tr.value===`keyboard`,a11yPosition:er.value},{"tooltip-before":j(()=>[O(t.$slots,`tooltip-before`,Qe(Je({...ui.value})),void 0,!0)]),tooltip:j(()=>[O(t.$slots,`tooltip`,Qe(Je({...ui.value})),void 0,!0)]),"tooltip-after":j(()=>[O(t.$slots,`tooltip-after`,Qe(Je({...ui.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isCustom`,`isFullscreen`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),In.value&&I.value.userOptions.buttons.table?(T(),b(tt(Ii.value.component),Ye({key:9},Ii.value.props,{ref_key:`tableUnit`,ref:Zn,onClose:Li}),We({content:j(()=>[(T(),b(A(Dn),{key:`table_${Jn.value}`,colNames:xi.value.colNames,head:xi.value.head,body:xi.value.body,config:xi.value.config,title:I.value.table.useDialog?``:Ii.value.title,withCloseButton:!I.value.table.useDialog,isCursorPointer:hr.value,onClose:Li},{th:j(({th:e})=>[e===`__SUM__`?(T(),S(`div`,Sn,[Ke(A(Tn),{name:`sigma`,stroke:xi.value.config.th.color,size:16},null,8,[`stroke`])])):(T(),S(`div`,Cn,k(e),1))]),td:j(({td:e})=>[Ge(k(e.name?e.name:isNaN(Number(e))?e.includes(`%`)?e:A(_)(L.value.percentage.formatter,e,A(s)({v:e,s:`%`,r:L.value.percentage.rounding})):A(_)(L.value.value.formatter,e,A(s)({p:L.value.dataLabels.prefix,v:e,s:L.value.dataLabels.suffix,r:L.value.value.rounding}))),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[I.value.table.useDialog?{name:`title`,fn:j(()=>[Ge(k(Ii.value.title),1)]),key:`0`}:void 0,I.value.table.useDialog?{name:`actions`,fn:j(()=>[C(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:n[4]||=e=>bi(I.value.userOptions.callbacks.csv),style:w({cursor:hr.value?`pointer`:`default`})},[Ke(A(Tn),{name:`fileCsv`,stroke:Ii.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):x(``,!0),O(t.$slots,`skeleton`,{},()=>[A(_r)?(T(),b(we,{key:0})):x(``,!0)],!0)],46,ut))}},[[`__scopeId`,`data-v-9c658c47`]]);export{lt as n,wn as t};
47
+ `}),r===`end`?`${L.value.name.show?u:``}${s}`:`${s}${L.value.name.show?u:``}`}function _i(e){return I.value.useBlurOnHover&&![null,void 0].includes(F.value)&&F.value!==e?`url(#blur_${P.value})`:``}function vi(e){if(!Vr.value||Hr.value===null||e.seriesIndex!==Hr.value)return 1;let t=(e.proportion??0)*100,n=L.value.dataLabels.hideUnderValue,r=L.value.dataLabels.smallArcClusterThreshold+2,i=n;return t>=r?1:t<=i?0:(t-i)/(r-i)}let yi=y(()=>({head:Zr.value.map(e=>({name:e.name,color:e.color})),body:Zr.value.map(e=>e.value)}));function bi(e=null){Xe(()=>{let t=yi.value.head.map((e,t)=>[[e.name],[yi.value.body[t]],[isNaN(yi.value.body[t]/$.value)?`-`:yi.value.body[t]/$.value*100]]),n=[[z.value.title.text],[z.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),r=l(n);e?e(r):de({csvContent:r,title:z.value.title.text||`vue-ui-donut`})})}let xi=y(()=>{let e=[`__SUM__`,s({p:L.value.dataLabels.prefix,v:$.value,s:L.value.dataLabels.suffix,r:I.value.table.td.roundingValue}),`100%`],t=yi.value.head.map((e,t)=>[{color:e.color,name:e.name||`-`},yi.value.body[t],isNaN(yi.value.body[t]/$.value)?`-`:(yi.value.body[t]/$.value*100).toFixed(I.value.table.td.roundingPercentage)+`%`]),n=t.map(e=>e.map((e,t)=>t===0?e.name:e)),r={th:{backgroundColor:I.value.table.th.backgroundColor,color:I.value.table.th.color,outline:I.value.table.th.outline},td:{backgroundColor:I.value.table.td.backgroundColor,color:I.value.table.td.color,outline:I.value.table.td.outline},breakpoint:I.value.table.responsiveBreakpoint};return{colNames:[I.value.table.columnNames.series,I.value.table.columnNames.value,I.value.table.columnNames.percentage],head:e,body:t,a11yBody:n,config:r}}),Si=E(!1);function Ci(e){Si.value=e,fr.value+=1}let wi=y(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function Ti(e){return ze({num:e,rounding:z.value.legend.roundingPercentage})}function Ei({val:e,percentage:t,showVal:n,showPercentage:r,config:i}){return Be({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function Di(e){return Ei({val:_(L.value.value.formatter,e.value,s({p:L.value.dataLabels.prefix,v:e.value,s:L.value.dataLabels.suffix,r:L.value.value.rounding}),{datapoint:e}),percentage:ai(e,Y.value),showVal:L.value.value.show,showPercentage:L.value.percentage.show,config:L.value.dataLabels})}function Oi(e,t){I.value.events.datapointClick&&I.value.events.datapointClick({datapoint:e,seriesIndex:e.seriesIndex}),zr(`selectDatapoint`,{datapoint:e,index:t})}function ki(){H.value.showTable=!H.value.showTable}function Ai(){H.value.dataLabels.show=!H.value.dataLabels.show}function ji(){H.value.showTooltip=!H.value.showTooltip}let Mi=E(!1);function Ni(){Mi.value=!Mi.value}let Pi=Re(Ln,()=>z.value.title.text);function Fi(){if(!Rn.value)return;let{x:e,y:t,width:n,height:r}=Rn.value.getBBox();V.value&&V.value.setAttribute(`viewBox`,`${e} ${t} ${n+Math.min(0,e)} ${r+Math.min(0,t)}`)}let Ii=y(()=>n({config:I,style:z,mutableConfig:H,dialog:jn,accordion:En,isFullscreen:Si,parent:Ln,maxWidth:500,isCursorPointer:hr}));ot(()=>H.value.showTable,e=>t(e,I,Zn));function Li(){H.value.showTable=!1,Qn.value&&Qn.value.setTableIconState(!1)}let Ri=y(()=>Qr.value.map(e=>({...e,name:e.display}))),zi=y(()=>z.value.backgroundColor),Bi=y(()=>z.value.legend),Vi=y(()=>z.value.title),{isCallbackImaging:Hi,isCallbackSvg:Ui,generateSvg:Wi,onGenerateImage:Gi}=De({svg:V,title:Vi,legend:Bi,legendItems:Ri,backgroundColor:zi,getSvgCallback:()=>I.value.userOptions.callbacks.svg,generateImage:Fr});async function Ki(){if(zr(`copyAlt`,{config:I.value,dataset:G.value}),!I.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(I.value.userOptions.callbacks.altCopy({config:I.value,dataset:G.value}))}function qi(){$n.value=null,nr.value=!0}function Ji(){$n.value=null,tr.value=`pointer`,ur.value=!1,F.value=null,nr.value=!1}function Yi(e){if(!V.value||Mi.value||document.activeElement!==V.value||!Y.value.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){$n.value=null,tr.value=`pointer`,ur.value=!1,F.value=null;return}if(r){if($n.value===null)return;let e=Y.value[$n.value];if(!e)return;Oi(e,$n.value);return}let a=$n.value,o=F.value,s=a!==null&&a>=0&&a<Y.value.length,c=o!==null&&o>=0&&o<Y.value.length;s?n?(a+=1,a>=Y.value.length&&(a=0)):t&&(--a,a<0&&(a=Y.value.length-1)):c?(a=n?o+1:o-1,a>=Y.value.length&&(a=0),a<0&&(a=Y.value.length-1)):a=n?0:Y.value.length-1;let l=Y.value[a];l&&($n.value=a,Xi(a),pi({datapoint:l,relativeIndex:a,seriesIndex:l.seriesIndex,show:!0,triggerMode:`keyboard`}))}function Xi(e){if(!Number.isFinite(e)||!V.value)return;let t=U.value.width/2,n=U.value.height/2;if(I.value.type===`classic`){let r=Y.value[e];if(!r?.arcSlice)return;let i=he(r.arcSlice);if(!i)return;t=i.x,n=i.y}else{let r=X.value[e]?.middlePoint;if(!r)return;t=r.x,n=r.y}let r=V.value.getBoundingClientRect();er.value={x:r.left+t/U.value.width*r.width,y:r.top+n/U.value.height*r.height}}let Zi=y(()=>({headers:xi.value?.colNames??[],rows:xi.value?.a11yBody??[]}));return Ae({autoSize:Fi,getData:Br,getImage:Pi,generatePdf:Pr,generateCsv:bi,generateImage:Fr,generateSvg:Wi,hideSeries:Yr,showSeries:Jr,toggleTable:ki,toggleLabels:Ai,toggleTooltip:ji,toggleAnnotator:Ni,toggleFullscreen:Ci,copyAlt:Ki}),(t,n)=>(T(),S(`div`,{ref_key:`donutChart`,ref:Ln,class:Ze(`vue-data-ui-component vue-ui-donut ${Si.value?`vue-data-ui-wrapper-fullscreen`:``} ${I.value.useCssAnimation?``:`vue-ui-dna`}`),style:w(`font-family:${I.value.style.fontFamily};width:100%; ${I.value.responsive?`height:100%;`:``} text-align:center;background:${z.value.backgroundColor}`),id:`donut__${P.value}`,onMouseenter:Or,onMouseleave:kr},[C(`div`,{id:`chart-instructions-${P.value}`,class:`sr-only`},[C(`p`,null,k(I.value.a11y.translations.keyboardNavigation),1)],8,dt),Zi.value?.rows?.length?(T(),b(Fe,{key:0,uid:P.value,head:Zi.value.headers,body:Zi.value.rows,notice:I.value.a11y.translations.tableAvailable,caption:I.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):x(``,!0),I.value.userOptions.buttons.annotator&&A(V)?(T(),b(A(On),{key:1,color:z.value.color,backgroundColor:z.value.backgroundColor,active:Mi.value,svgRef:A(V),isCursorPointer:hr.value,palette:I.value.userOptions.annotatorPalette,onClose:Ni},We({_:2},[D(A(i),e=>({name:e,fn:j(n=>[O(t.$slots,e,Qe(Je(A(r)(e,n))),void 0,!0)])}))]),1032,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`,`palette`])):x(``,!0),O(t.$slots,`userConfig`,{},void 0,!0),Ir.value?(T(),S(`div`,{key:2,ref_key:`noTitle`,ref:Kn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):x(``,!0),z.value.title.text?(T(),S(`div`,{key:3,ref_key:`chartTitle`,ref:Vn,style:`width:100%;background:transparent;padding-bottom:24px`},[(T(),b(Oe,{key:`title_${qn.value}`,config:{title:{cy:`donut-div-title`,...z.value.title},subtitle:{cy:`donut-div-subtitle`,...z.value.title.subtitle}}},null,8,[`config`]))],512)):x(``,!0),C(`div`,{id:`legend-top-${P.value}`},null,8,ft),I.value.userOptions.show&&In.value&&(A(Dr)||A(Tr))?(T(),b(A(kn),{ref_key:`userOptionsRef`,ref:Qn,key:`user_option_${fr.value}`,backgroundColor:z.value.backgroundColor,color:z.value.color,isPrinting:A(Mr),isImaging:A(Nr),uid:P.value,hasTooltip:z.value.tooltip.show&&I.value.userOptions.buttons.tooltip,hasPdf:I.value.userOptions.buttons.pdf,hasImg:I.value.userOptions.buttons.img,hasSvg:I.value.userOptions.buttons.svg,hasXls:I.value.userOptions.buttons.csv,hasTable:I.value.userOptions.buttons.table,hasLabel:I.value.userOptions.buttons.labels,hasFullscreen:I.value.userOptions.buttons.fullscreen,hasAltCopy:I.value.userOptions.buttons.altCopy,isFullscreen:Si.value,chartElement:Ln.value,position:I.value.userOptions.position,callbacks:I.value.userOptions.callbacks,isTooltip:H.value.showTooltip,titles:{...I.value.userOptions.buttonTitles},hasAnnotator:I.value.userOptions.buttons.annotator,isAnnotation:Mi.value,printScale:I.value.userOptions.print.scale,tableDialog:I.value.table.useDialog,isCursorPointer:hr.value,onToggleFullscreen:Ci,onGeneratePdf:A(Pr),onGenerateCsv:bi,onGenerateImage:A(Gi),onGenerateSvg:A(Wi),onToggleTable:ki,onToggleLabels:Ai,onToggleTooltip:ji,onToggleAnnotator:Ni,onCopyAlt:Ki,style:w({visibility:A(Dr)?A(Tr)?`visible`:`hidden`:`visible`})},We({_:2},[D(A(a)(t.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:j(n=>[O(t.$slots,e,Qe(Je(A(o)(e,n))),void 0,!0)])}))]),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.onGenerateImage.onGenerateSvg.style`.split(`.`))):x(``,!0),C(`div`,pt,[(T(),S(`svg`,{ref_key:`svgRef`,ref:V,xmlns:A(me),"aria-describedby":`chart-instructions-${P.value}`,class:Ze({"vue-data-ui-fullscreen--on":Si.value,"vue-data-ui-fulscreen--off":!Si.value,"vue-data-ui-svg":!0}),viewBox:`0 0 ${U.value.width<=0?10:U.value.width} ${U.value.height<=0?10:U.value.height}`,style:w(`max-width:100%; overflow: visible; background:transparent;color:${z.value.color};${jr.value.css}`),tabindex:`0`,onFocus:qi,onBlur:Ji,onKeydown:Yi},[C(`g`,{ref_key:`G`,ref:Rn,class:`vue-data-ui-g`},[Ke(A(An)),t.$slots[`chart-background`]?(T(),S(`foreignObject`,{key:0,x:0,y:0,width:U.value.width<=0?10:U.value.width,height:U.value.height<=0?10:U.value.height,style:{pointerEvents:`none`}},[O(t.$slots,`chart-background`,{},void 0,!0)],8,ht)):x(``,!0),I.value.type===`classic`&&!isNaN(Rr.value/q.value)?(T(),S(`defs`,gt,[z.value.useGradient?(T(),b(Ne,{key:0,t:`radial`,id:`gradient_${P.value}`,stops:[[`0%`,A(f)(z.value.backgroundColor,0),0],[`${(1-Rr.value/q.value)*100}%`,A(f)(`#FFFFFF`,0),0],[`${(1-Rr.value/q.value/2)*100}%`,A(f)(`#FFFFFF`,z.value.gradientIntensity),1],[`100%`,A(f)(z.value.backgroundColor,0),0]]},null,8,[`id`,`stops`])):x(``,!0)])):x(``,!0),I.value.type===`polar`?(T(),S(`defs`,_t,[(T(!0),S(v,null,D(X.value,(e,t)=>(T(),b(Ne,{t:`radial`,id:`polar_gradient_${t}_${P.value}`,key:`pg_${t}_${P.value}`,cx:(isNaN(e.middlePoint.x/U.value.width*100)?0:e.middlePoint.x/U.value.width*100)+`%`,cy:(isNaN(e.middlePoint.y/U.value.height*100)?0:e.middlePoint.y/U.value.height*100)+`%`,r:`62%`,stops:[[`0%`,A(m)(J.value[t].color,.05),z.value.gradientIntensity/100],[`100%`,J.value[t].color,1]]},null,8,[`id`,`cx`,`cy`,`stops`]))),128))])):x(``,!0),C(`defs`,null,[C(`filter`,{id:`blur_${P.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[C(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:2,id:`blur_std_${P.value}`},null,8,yt),n[5]||=C(`feColorMatrix`,{type:`saturate`,values:`0`},null,-1)],8,vt),C(`filter`,{id:`shadow_${P.value}`,"color-interpolation-filters":`sRGB`},[C(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`10`,"flood-opacity":`0.5`,"flood-color":R.value.shadowColor},null,8,xt)],8,bt),C(`filter`,{id:`drop_shadow_${P.value}`,"color-interpolation-filters":`sRGB`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[C(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`3`,"flood-opacity":`1`,"flood-color":R.value.shadowColor},null,8,Ct)],8,St)]),I.value.type===`classic`?(T(!0),S(v,{key:3},D(J.value.filter(e=>!e.ghost),(e,t)=>(T(),S(`g`,null,[Z(e)&&H.value.dataLabels.show?(T(),S(`path`,{key:0,d:A(Q)[t]?.connectorPath||A(oe)(e,{x:U.value.width/2,y:U.value.height/2},16,16,!1,!1,Rr.value,12,mr.value.curvedMarkers),stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,filter:_i(t)},null,8,wt)):x(``,!0)]))),256)):x(``,!0),I.value.type===`polar`?(T(!0),S(v,{key:4},D(J.value.filter(e=>!e.ghost),(e,t)=>(T(),S(`g`,null,[Z(e)&&H.value.dataLabels.show?(T(),S(`path`,{key:0,d:`M ${A(c)({initX:X.value[t].middlePoint.x,initY:X.value[t].middlePoint.y,offset:24,centerX:U.value.width/2,centerY:U.value.height/2}).x},${A(c)({initX:X.value[t].middlePoint.x,initY:X.value[t].middlePoint.y,offset:24,centerX:U.value.width/2,centerY:U.value.height/2}).y} ${X.value[t].middlePoint.x},${X.value[t].middlePoint.y}`,stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,filter:_i(t),style:w({transition:B.value||!I.value.serieToggleAnimation.show?`none`:`all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Tt)):x(``,!0)]))),256)):x(``,!0),I.value.type===`classic`&&R.value.useShadow?(T(),S(`circle`,{key:5,cx:U.value.width/2,cy:U.value.height/2,r:q.value<=0?10:q.value,fill:z.value.backgroundColor,filter:`url(#shadow_${P.value})`},null,8,Et)):x(``,!0),t.$slots.pattern?(T(),S(`g`,Dt,[(T(!0),S(v,null,D(e.dataset,(e,n)=>(T(),S(`defs`,{key:`pattern-${e.patternIndex}`},[O(t.$slots,`pattern`,Ye({ref_for:!0},{seriesIndex:n,patternId:`pattern_${P.value}_${n}`}),void 0,!0)]))),128))])):x(``,!0),$.value&&I.value.type===`classic`?(T(),S(v,{key:7},[(T(!0),S(v,null,D(Y.value,(e,t)=>(T(),S(`path`,{stroke:z.value.backgroundColor,d:e.arcSlice,fill:`#FFFFFF`},null,8,Ot))),256)),(T(!0),S(v,null,D(Y.value,(e,t)=>(T(),S(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:e.color,stroke:R.value.borderColorAuto?z.value.backgroundColor:R.value.borderColor,"stroke-width":R.value.borderWidth,filter:_i(t)},null,8,kt))),256)),t.$slots.pattern?(T(),S(`g`,At,[(T(!0),S(v,null,D(Y.value,(e,t)=>(T(),S(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:`url(#${e.pattern})`,stroke:R.value.borderColorAuto?z.value.backgroundColor:R.value.borderColor,"stroke-width":R.value.borderWidth,filter:_i(t)},null,8,jt))),256))])):x(``,!0)],64)):x(``,!0),$.value&&I.value.type===`polar`?(T(),S(v,{key:8},[J.value.length>1?(T(),S(`g`,Mt,[(T(!0),S(v,null,D(Y.value,(e,t)=>(T(),S(`path`,{stroke:R.value.borderColorAuto?z.value.backgroundColor:R.value.borderColor,d:X.value[t].path,fill:`#FFFFFF`,style:w({transition:B.value||!I.value.serieToggleAnimation.show?`none`:`all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Nt))),256)),R.value.useShadow?(T(),S(`g`,Pt,[(T(!0),S(v,null,D(Y.value,(e,t)=>(T(),S(`path`,{class:`vue-ui-donut-arc-path`,d:X.value[t].path,fill:`transparent`,stroke:R.value.borderColorAuto?z.value.backgroundColor:mr.value.donut.borderColor,"stroke-width":R.value.borderWidth,filter:`url(#drop_shadow_${P.value})`,style:w({transition:B.value||!I.value.serieToggleAnimation.show?`none`:`all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Ft))),256))])):x(``,!0),t.$slots.pattern?(T(),S(`g`,It,[(T(!0),S(v,null,D(Y.value,(e,t)=>(T(),S(`path`,{class:`vue-ui-donut-arc-path`,d:X.value[t].path,fill:`url(#${e.pattern})`,stroke:R.value.borderColorAuto?z.value.backgroundColor:mr.value.donut.borderColor,"stroke-width":R.value.borderWidth,filter:_i(t),style:w({transition:B.value||!I.value.serieToggleAnimation.show?`none`:`all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`,transformOrigin:`center`})},null,12,Lt))),256))])):x(``,!0),(T(!0),S(v,null,D(Y.value,(e,t)=>(T(),S(`path`,{class:`vue-ui-donut-arc-path`,d:X.value[t].path,fill:z.value.useGradient?`url(#polar_gradient_${t}_${P.value})`:e.color,stroke:R.value.borderColorAuto?z.value.backgroundColor:R.value.borderColor,"stroke-width":R.value.borderWidth,filter:_i(t),style:w({transition:B.value||!I.value.serieToggleAnimation.show?`none`:`all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Rt))),256))])):(T(),S(`g`,zt,[t.$slots.pattern?(T(),S(`circle`,{key:0,cx:U.value.width/2,cy:U.value.height/2,r:q.value,fill:`url(#pattern_${P.value}_${J.value[0].patternIndex})`,stroke:z.value.backgroundColor,"stroke-width":R.value.borderWidth},null,8,Bt)):x(``,!0),C(`circle`,{cx:U.value.width/2,cy:U.value.height/2,r:q.value,fill:z.value.useGradient?`url(#polar_gradient_0_${P.value})`:J.value[0].color,stroke:z.value.backgroundColor,"stroke-width":R.value.borderWidth},null,8,Vt)]))],64)):(T(),S(v,{key:9},[I.value.type===`classic`&&!ei.value?(T(),S(`g`,Ht,[(T(!0),S(v,null,D(ti.value,(e,t)=>(T(),S(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:e.color,stroke:z.value.backgroundColor,"stroke-width":R.value.borderWidth},null,8,Ut))),256))])):x(``,!0),C(`circle`,{cx:U.value.width/2,cy:U.value.height/2,r:q.value<=0?10:q.value,fill:`transparent`,stroke:z.value.backgroundColor},null,8,Wt)],64)),z.value.useGradient&&I.value.type===`classic`?(T(),S(`circle`,{key:10,cx:U.value.width/2,cy:U.value.height/2,r:q.value<=0?10:q.value,fill:`url(#gradient_${P.value})`},null,8,Gt)):x(``,!0),C(`circle`,{ref_key:`circle_hollow`,ref:Bn,style:{pointerEvents:`none`},fill:`none`,cx:U.value.width/2,cy:U.value.height/2,r:Math.max(.1,Rr.value*1.7)},null,8,Kt),$.value?(T(),S(v,{key:11},[J.value.length>1||I.value.type===`classic`?(T(),S(`g`,qt,[(T(!0),S(v,null,D(J.value.filter(e=>!e.ghost),(e,t)=>(T(),S(`path`,{d:I.value.type===`classic`?e.arcSlice:X.value[t].path,stroke:R.value.borderColorAuto?z.value.backgroundColor:R.value.borderColor,fill:F.value===t?R.value.selectedColor:`transparent`,onMouseenter:n=>pi({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>fi({datapoint:e,seriesIndex:e.seriesIndex}),onClick:n=>Oi(e,t)},null,40,Jt))),256))])):(T(),S(`g`,Yt,[C(`circle`,{cx:U.value.width/2,cy:U.value.height/2,r:q.value,fill:`transparent`,onMouseenter:n[0]||=e=>pi({datapoint:J.value[0],relativeIndex:0,seriesIndex:J.value[0].seriesIndex,show:!0}),onMouseleave:n[1]||=e=>fi({datapoint:J.value[0],seriesIndex:J.value[0].seriesIndex}),onClick:n[2]||=e=>Oi(J.value[0],t.i)},null,40,Xt)]))],64)):x(``,!0),I.value.type===`classic`?(T(),S(`g`,{key:12,ref_key:`G_hollow`,ref:zn,class:`vue-data-ui-donut-hollow-labels`},[L.value.hollow.total.show?(T(),S(`text`,{key:0,"text-anchor":`middle`,x:U.value.width/2,y:U.value.height/2-(L.value.hollow.average.show?L.value.hollow.total.fontSize:0)+L.value.hollow.total.offsetY,fill:L.value.hollow.total.color,"font-size":L.value.hollow.total.fontSize,style:w(`font-weight:${L.value.hollow.total.bold?`bold`:``}`)},k(L.value.hollow.total.text),13,Zt)):x(``,!0),L.value.hollow.total.show?(T(),S(`text`,{key:1,"text-anchor":`middle`,x:U.value.width/2,y:U.value.height/2+L.value.hollow.total.fontSize-(L.value.hollow.average.show?L.value.hollow.total.fontSize:0)+L.value.hollow.total.value.offsetY,fill:L.value.hollow.total.value.color,"font-size":L.value.hollow.total.value.fontSize,style:w(`font-weight:${L.value.hollow.total.value.bold?`bold`:``}`)},k(A(_)(L.value.hollow.total.value.formatter,$.value,A(s)({p:L.value.hollow.total.value.prefix,v:$.value,s:L.value.hollow.total.value.suffix}))),13,Qt)):x(``,!0),L.value.hollow.average.show?(T(),S(`text`,{key:2,"text-anchor":`middle`,x:U.value.width/2,y:U.value.height/2+(L.value.hollow.total.show?L.value.hollow.average.fontSize:0)+L.value.hollow.average.offsetY,fill:L.value.hollow.average.color,"font-size":L.value.hollow.average.fontSize,style:w(`font-weight:${L.value.hollow.average.bold?`bold`:``}`)},k(L.value.hollow.average.text),13,$t)):x(``,!0),L.value.hollow.average.show?(T(),S(`text`,{key:3,"text-anchor":`middle`,x:U.value.width/2,y:U.value.height/2+(L.value.hollow.total.show?L.value.hollow.average.fontSize:0)+L.value.hollow.average.fontSize+L.value.hollow.average.value.offsetY,fill:L.value.hollow.average.value.color,"font-size":L.value.hollow.average.value.fontSize,style:w(`font-weight:${L.value.hollow.average.value.bold?`bold`:``}`)},k(Vr.value||B.value?`--`:A(_)(L.value.hollow.average.value.formatter,A(ae)(ci.value),A(s)({p:L.value.hollow.average.value.prefix,v:A(ae)(ci.value),s:L.value.hollow.average.value.suffix,r:L.value.hollow.average.value.rounding}))),13,en)):x(``,!0)],512)):x(``,!0),(T(!0),S(v,null,D(Y.value.filter(e=>!e.ghost),(e,n)=>(T(),S(`g`,{filter:_i(n),key:e.seriesIndex,opacity:vi(e)},[L.value.dataLabels.useLabelSlots?(T(),S(`g`,nn,[(T(),S(`foreignObject`,{x:A(g)(e,!0).anchor===`end`?A(g)(e).x-120:A(g)(e,!0).anchor===`middle`?A(g)(e).x-60:A(g)(e).x,y:A(fe)(e)-(wi.value?20:0),width:`120`,height:`60`,style:{overflow:`visible`}},[C(`div`,null,[O(t.$slots,`dataLabel`,Ye({ref_for:!0},{datapoint:e,isBlur:!I.value.useBlurOnHover||[null,void 0].includes(F.value)||F.value===n,isSafari:wi.value,isVisible:Z(e)&&H.value.dataLabels.show,textAlign:A(g)(e,!0,16,!0).anchor,flexAlign:A(g)(e,!0,16).anchor,percentage:ai(e,Y.value)}),void 0,!0)])],8,rn))])):(T(),S(`g`,an,[I.value.type===`classic`?(T(),S(v,{key:0},[Z(e)&&H.value.dataLabels.show?(T(),S(`circle`,{key:0,cx:A(Q)[n]?.markerX??A(g)(e).x,cy:A(Q)[n]?.markerY??A(fe)(e)-3.5,fill:e.color,stroke:z.value.backgroundColor,"stroke-width":1,r:3,filter:!I.value.useBlurOnHover||[null,void 0].includes(F.value)||F.value===n?``:`url(#blur_${P.value})`,onClick:t=>Oi(e,n),onMouseenter:t=>pi({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>fi({datapoint:e,seriesIndex:e.seriesIndex})},null,40,on)):x(``,!0),L.value.dataLabels.oneLine||A(Q)[n]?st((T(),S(`text`,{key:1,class:`vue-data-ui-datalabel-inline`,"text-anchor":A(Q)[n]?.textAnchor||A(g)(e,!0,12).anchor,x:A(Q)[n]?.labelX??A(g)(e,!0,12).x,y:A(Q)[n]?.labelY??A(fe)(e),onClick:t=>Oi(e,n),onMouseenter:t=>pi({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>fi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:hi(e,n,!!A(Q)[n])},null,40,sn)),[[at,Z(e)&&H.value.dataLabels.show]]):(T(),S(v,{key:2},[st(C(`text`,{class:`vue-data-ui-datalabel-value`,"text-anchor":A(Q)[n]?.textAnchor||A(g)(e,!0,12).anchor,x:A(Q)[n]?.labelX??A(g)(e,!0,12).x,y:A(Q)[n]?.labelY??A(fe)(e),fill:L.value.percentage.color,"font-size":rr.value+`px`,style:w(`font-weight:${L.value.percentage.bold?`bold`:``}`),onClick:t=>Oi(e,n),onMouseenter:t=>pi({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>fi({datapoint:e,seriesIndex:e.seriesIndex})},k(Di(e)),45,cn),[[at,Z(e)&&H.value.dataLabels.show]]),st(C(`text`,{class:`vue-data-ui-datalabel-name`,"text-anchor":A(Q)[n]?.textAnchor||A(g)(e).anchor,x:A(Q)[n]?.labelX??A(g)(e,!0,12).x,y:(A(Q)[n]?.labelY??A(fe)(e))+N.value*1.2,fill:L.value.name.color,"font-size":N.value+`px`,style:w(`font-weight:${L.value.name.bold?`bold`:``}`),onClick:t=>Oi(e,n),onMouseenter:t=>pi({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>fi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:A(ne)({content:e.name,fontSize:N.value,fill:L.value.name.color,x:A(Q)[n]?.labelX??A(g)(e,!0,12).x,y:(A(Q)[n]?.labelY??A(fe)(e))+N.value})},null,44,ln),[[at,Z(e,!0,12)&&H.value.dataLabels.show&&L.value.name.show]])],64))],64)):x(``,!0),I.value.type===`polar`?(T(),S(v,{key:1},[Z(e)&&H.value.dataLabels.show?(T(),S(`circle`,{key:0,cx:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:24,centerX:U.value.width/2,centerY:U.value.height/2}).x,cy:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:24,centerX:U.value.width/2,centerY:U.value.height/2}).y,fill:e.color,stroke:z.value.backgroundColor,"stroke-width":1,r:3,filter:!I.value.useBlurOnHover||[null,void 0].includes(F.value)||F.value===n?``:`url(#blur_${P.value})`,onClick:t=>Oi(e,n),onMouseenter:t=>pi({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>fi({datapoint:e,seriesIndex:e.seriesIndex}),style:w({transition:B.value||!I.value.serieToggleAnimation.show?`none`:`all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,44,un)):x(``,!0),L.value.dataLabels.oneLine?st((T(),S(`text`,{key:1,class:`vue-data-ui-datalabel-inline`,"text-anchor":ni(X.value[n].middlePoint),x:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).x,y:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).y,style:w({transition:B.value||!I.value.serieToggleAnimation.show?`none`:`all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`}),onClick:t=>Oi(e,n),onMouseenter:t=>pi({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>fi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:gi(e,n)},null,44,dn)),[[at,Z(e)&&H.value.dataLabels.show]]):(T(),S(v,{key:2},[Z(e)&&H.value.dataLabels.show?(T(),S(`text`,{key:0,class:`vue-data-ui-datalabel-value`,"text-anchor":ni(X.value[n].middlePoint),x:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).x,y:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).y,fill:L.value.percentage.color,"font-size":rr.value,style:w({transition:B.value||!I.value.serieToggleAnimation.show?`none`:`all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:L.value.percentage.bold?`bold`:`normal`}),onClick:t=>Oi(e,n),onMouseenter:t=>pi({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>fi({datapoint:e,seriesIndex:e.seriesIndex})},k(Di(e)),45,fn)):x(``,!0),Z(e,!0,12)&&H.value.dataLabels.show&&L.value.name.show?(T(),S(`text`,{key:1,class:`vue-data-ui-datalabel-name`,"text-anchor":ni(X.value[n].middlePoint),x:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).x,y:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).y+N.value*1.2,fill:L.value.name.color,"font-size":N.value,style:w({transition:B.value||!I.value.serieToggleAnimation.show?`none`:`all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:L.value.name.bold?`bold`:`normal`}),onClick:t=>Oi(e,n),onMouseenter:t=>pi({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>fi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:A(ne)({content:e.name,fontSize:N.value,fill:L.value.name.color,x:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).x,y:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).y+N.value*1.2})},null,44,pn)):x(``,!0)],64))],64)):x(``,!0)])),H.value.dataLabels.show&&z.value.comments.show&&e.comment?(T(),S(`g`,mn,[Z(e)&&I.value.type===`classic`?(T(),S(`foreignObject`,{key:0,x:z.value.comments.offsetX+(A(g)(e,!0).anchor===`end`?A(g)(e).x-z.value.comments.width:A(g)(e,!0).anchor===`middle`?A(g)(e).x-z.value.comments.width/2:A(g)(e).x),y:A(fe)(e)+24+z.value.comments.offsetY,width:z.value.comments.width,height:`200`,style:{overflow:`visible`,"pointer-events":`none`}},[C(`div`,null,[O(t.$slots,`plot-comment`,{plot:{...e,textAlign:A(g)(e,!0,16,!0).anchor,flexAlign:A(g)(e,!0,16).anchor,isFirstLoad:B.value}},void 0,!0)])],8,hn)):x(``,!0),Z(e)&&I.value.type===`polar`?(T(),S(`foreignObject`,{key:1,x:z.value.comments.offsetX+(ni(X.value[n].middlePoint)===`end`?A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).x-z.value.comments.width:ni(X.value[n].middlePoint)===`middle`?A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).x-z.value.comments.width/2:A(c)({initX:X.value[n].middlePoint.x,initY:X.value[n].middlePoint.y,offset:42,centerX:U.value.width/2,centerY:U.value.height/2}).x),y:ri(X.value[n])+z.value.comments.offsetY,width:z.value.comments.width,height:`200`,style:w({transition:B.value||!I.value.serieToggleAnimation.show?`none`:`all ${I.value.serieToggleAnimation.durationMs}ms ease-in-out`,overflow:`visible`,pointerEvents:`none`})},[C(`div`,null,[O(t.$slots,`plot-comment`,{plot:{...e,textAlign:ni(X.value[n].middlePoint),flexAlign:ni(X.value[n].middlePoint),isFirstLoad:B.value}},void 0,!0)])],12,gn)):x(``,!0)])):x(``,!0)],8,tn))),128)),O(t.$slots,`svg`,{svg:{...U.value,datapoints:J.value,isPrintingImg:A(Mr)||A(Nr)||A(Hi),isPrintingSvg:A(Ui)}},void 0,!0)],512)],46,mt)),t.$slots.hint?(T(),S(`div`,_n,[O(t.$slots,`hint`,Qe(Je({hint:I.value.a11y.translations.keyboardNavigation,isVisible:nr.value})),void 0,!0)])):x(``,!0)]),t.$slots.watermark?(T(),S(`div`,vn,[O(t.$slots,`watermark`,Qe(Je({isPrinting:A(Mr)||A(Nr)||A(Hi)||A(Ui)})),void 0,!0)])):x(``,!0),C(`div`,{id:`legend-bottom-${P.value}`},null,8,yn),Xn.value&&(z.value.legend.show||t.$slots.legend)?(T(),b(Ue,{key:6,to:z.value.legend.position===`top`?`#legend-top-${P.value}`:`#legend-bottom-${P.value}`},[C(`div`,{ref_key:`chartLegend`,ref:Hn},[O(t.$slots,`legend`,{legend:Qr.value},()=>[z.value.legend.show?(T(),b(He,{key:`legend_${Yn.value}`,legendSet:Qr.value,config:$r.value,onClickMarker:n[3]||=({i:e})=>Kr(e),isCursorPointer:hr.value},We({item:j(({legend:e,index:t})=>[C(`div`,{style:w(`opacity:${K.value.includes(t)?.5:1}`),onClick:t=>e.segregate()},k(e.display),13,bn)]),legendToggle:j(()=>[Qr.value.length>2&&z.value.legend.selectAllToggle.show&&!A(_r)?(T(),b(Pe,{key:0,backgroundColor:z.value.legend.selectAllToggle.backgroundColor,color:z.value.legend.selectAllToggle.color,fontSize:z.value.legend.fontSize,checked:K.value.length>0,isCursorPointer:hr.value,onToggle:Gr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):x(``,!0)]),_:2},[t.$slots.pattern?{name:`legend-pattern`,fn:j(({legend:e,index:t})=>[Ke(ke,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${P.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):x(``,!0)],!0)],512)],8,[`to`])):x(``,!0),t.$slots.source?(T(),S(`div`,{key:7,ref_key:`source`,ref:Gn,dir:`auto`},[O(t.$slots,`source`,{},void 0,!0)],512)):x(``,!0),t.$slots.hollow?(T(),S(`div`,xn,[O(t.$slots,`hollow`,Qe(Je({total:$.value,average:ci.value,dataset:W.value,...U.value})),void 0,!0)])):x(``,!0),Ke(A(wn),{teleportTo:z.value.tooltip.teleportTo,show:H.value.showTooltip&&ur.value,backgroundColor:z.value.tooltip.backgroundColor,color:z.value.tooltip.color,fontSize:z.value.tooltip.fontSize,borderRadius:z.value.tooltip.borderRadius,borderColor:z.value.tooltip.borderColor,borderWidth:z.value.tooltip.borderWidth,backgroundOpacity:z.value.tooltip.backgroundOpacity,position:z.value.tooltip.position,offsetX:z.value.tooltip.offsetX,offsetY:z.value.tooltip.offsetY,parent:Ln.value,content:dr.value,isCustom:di.value,isFullscreen:Si.value,smooth:z.value.tooltip.smooth,backdropFilter:z.value.tooltip.backdropFilter,smoothForce:z.value.tooltip.smoothForce,smoothSnapThreshold:z.value.tooltip.smoothSnapThrehsold,isA11yMode:tr.value===`keyboard`,a11yPosition:er.value},{"tooltip-before":j(()=>[O(t.$slots,`tooltip-before`,Qe(Je({...ui.value})),void 0,!0)]),tooltip:j(()=>[O(t.$slots,`tooltip`,Qe(Je({...ui.value})),void 0,!0)]),"tooltip-after":j(()=>[O(t.$slots,`tooltip-after`,Qe(Je({...ui.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isCustom`,`isFullscreen`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),In.value&&I.value.userOptions.buttons.table?(T(),b(tt(Ii.value.component),Ye({key:9},Ii.value.props,{ref_key:`tableUnit`,ref:Zn,onClose:Li}),We({content:j(()=>[(T(),b(A(Dn),{key:`table_${Jn.value}`,colNames:xi.value.colNames,head:xi.value.head,body:xi.value.body,config:xi.value.config,title:I.value.table.useDialog?``:Ii.value.title,withCloseButton:!I.value.table.useDialog,isCursorPointer:hr.value,onClose:Li},{th:j(({th:e})=>[e===`__SUM__`?(T(),S(`div`,Sn,[Ke(A(Tn),{name:`sigma`,stroke:xi.value.config.th.color,size:16},null,8,[`stroke`])])):(T(),S(`div`,Cn,k(e),1))]),td:j(({td:e})=>[Ge(k(e.name?e.name:isNaN(Number(e))?e.includes(`%`)?e:A(_)(L.value.percentage.formatter,e,A(s)({v:e,s:`%`,r:L.value.percentage.rounding})):A(_)(L.value.value.formatter,e,A(s)({p:L.value.dataLabels.prefix,v:e,s:L.value.dataLabels.suffix,r:L.value.value.rounding}))),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[I.value.table.useDialog?{name:`title`,fn:j(()=>[Ge(k(Ii.value.title),1)]),key:`0`}:void 0,I.value.table.useDialog?{name:`actions`,fn:j(()=>[C(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:n[4]||=e=>bi(I.value.userOptions.callbacks.csv),style:w({cursor:hr.value?`pointer`:`default`})},[Ke(A(Tn),{name:`fileCsv`,stroke:Ii.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):x(``,!0),O(t.$slots,`skeleton`,{},()=>[A(_r)?(T(),b(we,{key:0})):x(``,!0)],!0)],46,ut))}},[[`__scopeId`,`data-v-75934a20`]]);export{lt as n,wn as t};
@@ -1,2 +1,2 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./tableIntegration-CNoJ1CIY.js";import{n as r,t as i}from"./annotationSlots-BRR85CqJ.js";import{n as a,t as o}from"./userOptionsSlots-DYuo-E5m.js";import{$ as s,$t as c,At as ee,D as te,Ht as ne,It as re,J as ie,Jt as ae,Kt as oe,S as se,X as ce,_ as le,at as ue,f as de,h as fe,i as pe,in as me,nn as he,nt as ge,p as _e,t as ve,tt as ye,w as be,y as xe,yt as Se,zt as Ce}from"./lib-zDxoqrgo.js";import{n as we,t as Te}from"./useHints-BH9r_0Vd.js";import{t as Ee}from"./useTimeLabels-Das5O74F.js";import{t as De}from"./useConfig-CKdzPrcf.js";import{t as Oe}from"./usePrinter-CnyKPIFM.js";import{n as ke,t as Ae}from"./BaseScanner-8NdoBs7B.js";import{t as je}from"./useNestedProp-CT9phgWx.js";import{t as Me}from"./useThemeCheck-BKNRbGeC.js";import{t as Ne}from"./useChartExport-DtPNpc9M.js";import{t as Pe}from"./useTransitions-DfSHzsdz.js";import{t as Fe}from"./useStableElementSize-CegFbRlF.js";import{t as Ie}from"./useTimeLabelCollider-XQf_S7-z.js";import{n as Le}from"./Title-BRAjxtjG.js";import{t as Re}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{l as ze,t as Be}from"./useResponsive-D2CPcpda.js";import{t as Ve}from"./DefGrad-DKMq1REY.js";import{t as He}from"./SlicerPreview-GFRs2EWB.js";import{t as Ue}from"./BaseLegendToggle-Dn_tNvn4.js";import{t as We}from"./A11yDataTable-DWNlWXzs.js";import{t as Ge}from"./useUserOptionState-CXlFnwPv.js";import{t as Ke}from"./useChartAccessibility-DOMuYJfm.js";import{t as qe}from"./chartImage-NwZO-elv.js";import{t as Je}from"./Legend-DokTll4u.js";import{t as Ye}from"./vue_ui_donut_evolution-nzVwNQYv.js";import{Fragment as l,Teleport as Xe,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as Ze,createTextVNode as Qe,createVNode as $e,defineAsyncComponent as et,guardReactiveProps as tt,mergeProps as nt,nextTick as rt,normalizeClass as h,normalizeProps as it,normalizeStyle as at,onBeforeUnmount as ot,onMounted as st,openBlock as g,ref as _,renderList as v,renderSlot as y,resolveDynamicComponent as ct,shallowRef as lt,toDisplayString as b,toRefs as ut,unref as x,watch as dt,watchEffect as ft,withCtx as S}from"vue";var pt=/* @__PURE__ */ e({default:()=>nn}),mt=[`id`],ht=[`id`],gt=[`id`],_t={style:{position:`relative`}},vt=[`xmlns`,`aria-describedby`,`viewBox`],yt=[`x`,`y`,`width`,`height`],bt={key:1},xt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],St=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ct={key:0},wt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Tt=[`font-size`,`fill`,`transform`],Et=[`x`,`y`,`font-size`,`fill`],Dt=[`d`,`stroke`,`stroke-width`],Ot=[`transform`,`font-size`,`text-anchor`,`fill`,`font-weight`],kt={key:0},At=[`text-anchor`,`font-size`,`fill`,`transform`],jt=[`text-anchor`,`font-size`,`fill`,`transform`,`innerHTML`],Mt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],Nt={key:1},Pt=[`cx`,`cy`,`r`,`fill`],Ft={key:0},It={key:0},Lt=[`d`,`stroke`],Rt=[`text-anchor`,`x`,`y`,`fill`],zt=[`cx`,`cy`,`r`,`fill`],Bt={key:0},Vt=[`cx`,`cy`,`fill`],Ht={key:1},Ut=[`d`,`fill`,`stroke`],Wt={key:2},Gt=[`d`,`fill`,`stroke`],Kt=[`x`,`y`,`font-size`,`fill`],qt=[`x`,`y`,`width`,`height`,`fill`],Jt=[`x`,`y`,`width`,`height`,`onMouseenter`,`onMouseleave`,`onClick`],Yt=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],Xt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Zt={key:5,class:`vue-data-ui-watermark`},Qt=[`id`],$t=[`onClick`],en={key:0},tn={key:1},nn=/*#__PURE__*/ Re({__name:`vue-ui-donut-evolution`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},zoomState:{type:Object,default:null}},emits:[`selectLegend`,`zoomStart`,`zoomEnd`,`zoomReset`,`update:zoomState`,`copyAlt`],setup(e,{expose:Re,emit:pt}){let nn=et(()=>import(`./vue-ui-accordion-Dy5OVFKr.js`).then(e=>e.n)),rn=et(()=>import(`./BaseIcon-Cz30ODFA.js`).then(e=>e.n)),an=et(()=>import(`./DataTable-DSUA5M9p.js`)),on=et(()=>import(`./PackageVersion-D6pKL176.js`).then(e=>e.t)),sn=et(()=>import(`./PenAndPaper-DvJJaeU2.js`).then(e=>e.t)),cn=et(()=>import(`./UserOptions-D65t74CM.js`).then(e=>e.n)),ln=et(()=>import(`./vue-ui-donut-DaYxdQmP.js`).then(e=>e.n)),un=et(()=>import(`./BaseDraggableDialog-T1gEsQid.js`).then(e=>e.n)),{vue_ui_donut_evolution:dn}=De(),{isThemeValid:fn,warnInvalidTheme:pn}=Me(),C=e,w=_(ce()),T=_([]),E=_(null),D=_(null),mn=_(!1),O=_(null),k=_(null),hn=_(null),gn=_(0),_n=_(0),vn=_(0),yn=_(0),bn=_(0),xn=_(null),Sn=_(null),Cn=_(null),wn=_(null),Tn=_(!1),En=_(null),Dn=_(null),On=lt(null),kn=_(0),An=_(0),jn=_(!1);function Mn(){On.value=k.value?.parentNode??null}function Nn(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})})}async function Pn(){let e=++An.value;await rt(),await Nn(),await Nn(),e===An.value&&(kn.value+=1)}function Fn(){jn.value||(jn.value=!0,rt(()=>{jn.value=!1,Mn(),Pn()}))}let In=Fe({elementRef:On,minimumWidth:2,minimumHeight:2,stableFramesRequired:2,once:!1,onSizeAccepted:()=>{Pn()}}),Ln=_(null),Rn=_(null),zn=_(null),Bn=_(null),Vn=_(null),Hn=_(!1),A=lt(null),Un=lt(null),Wn=_(null),j=_(null),Gn=_(!1),M=pt,Kn=u(()=>!!C.dataset&&C.dataset.length);st(()=>{Tn.value=!0,Mn(),In.start(),Jn(),Pn()});let qn=u(()=>N.value.debug);function Jn(){if(Ce(C.dataset)?(ue({componentName:`VueUiDonutEvolution`,type:`dataset`,debug:qn.value}),er.value=!0):C.dataset.length&&C.dataset.forEach((e,t)=>{Se({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{ue({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:e,index:t,debug:qn.value}),er.value=!0})}),Ce(C.dataset)||(er.value=N.value.loading),setTimeout(()=>{Hn.value=!0},10),vr(),N.value.responsive){let e=ze(()=>{Hn.value=!1;let{width:e,height:t}=Be({chart:k.value,title:N.value.style.chart.title.text?Ln.value:null,legend:N.value.style.chart.legend.show?Rn.value:null,slicer:N.value.style.chart.zoom.show&&nr.value>1?Vn.value:null,source:zn.value});requestAnimationFrame(()=>{tr.value.width=e,tr.value.height=t-12,Fn(),clearTimeout(Wn.value),Wn.value=setTimeout(()=>{Hn.value=!0},10)})});A.value&&(Un.value&&A.value.unobserve(Un.value),A.value.disconnect()),A.value=new ResizeObserver(e),Un.value=k.value.parentNode,A.value.observe(Un.value)}Fn()}let N=_(Er()),P=u(()=>F.value.grid),F=u(()=>N.value.style.chart.layout),Yn=u(()=>N.value.style.chart.dialog),I=u(()=>N.value.style.chart);we({config:()=>N.value,dataset:()=>C.dataset,component:`VueUiDonutEvolution`,rules:[Te.emptyArray,{test:e=>e.length===1,message:[`👀 There is only a single series in your dataset. Consider:`,``,`▶️ Using VueUiXy instead, for a regular line chart.`]},{test:e=>e.length>6,message:[`👀 The number of series is > 6, which makes donuts hard to read. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]},{test:e=>e.some(e=>e.values.length>24),message:[`👀 Some series have a number of data points > 24, which can make the chart and donuts hard to read. Consider:`,``,`▶️ Using larger time scales, or aggregated values.`,``,`▶️ Filtering the time range by adding date intputs in your UI.`,``,`▶️ Using VueUiXy to show longer series in a more comfortable display.`]}]});let{transitionEnabled:Xn}=Pe({config:()=>N.value.transitions,dataset:()=>C.dataset}),L=u(()=>N.value.userOptions.useCursorPointer),Zn=u(()=>me({defaultConfig:{useCssAnimation:!1,table:{show:!1},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{dataLabels:{show:!1},grid:{stroke:`#6A6A6A`,axis:{yLabel:``,xLabel:``},yAxis:{scaleMin:null,scaleMax:null,autoScale:!1,dataLabels:{show:!1}},xAxis:{dataLabels:{show:!1}}},line:{stroke:`#CACACA60`}},legend:{backgroundColor:`transparent`,showValue:!1,showPercentage:!1},zoom:{show:!1,startIndex:null,endIndex:null}}}},userConfig:N.value.skeletonConfig??{}})),{loading:Qn,FINAL_DATASET:$n,manualLoading:er}=ke({...ut(C),FINAL_CONFIG:N,prepareConfig:Er,callback:()=>{Promise.resolve().then(async()=>{await vr()})},skeletonDataset:C.config?.skeletonDataset??[{name:``,values:[1,2,3,5,8,13],color:`#AAAAAA`},{name:``,values:[1,2,3,5,8,13],color:`#BABABA`},{name:``,values:[1,2,3,5,8,13],color:`#CACACA`}],skeletonConfig:me({defaultConfig:N.value,userConfig:Zn.value})}),tr=_({width:F.value.width,height:F.value.height}),nr=u(()=>Math.max(...$n.value.map(e=>e.values.length))),R=_({start:0,end:nr.value}),z=_(!1),rr=_(!1),B=_(null),V=_(null),H=_(null),ir=_(!1),ar=_({time:0,x:0,y:0,pointerType:null}),or=u(()=>N.value.style.chart.zoom?.dragToZoom),U=u(()=>or.value.show&&Kn.value&&cr.value&&Y.value>1&&!Qn.value),sr=_(!1),cr=_(!1),lr=_(!1),ur=null,W={};function dr(e,t=R.value){if(!e||typeof e!=`object`)return null;let n=e.start!==void 0&&e.start!==null,r=e.end!==void 0&&e.end!==null;if(!n&&!r)return null;let i=Number(n?e.start:t.start),a=Number(r?e.end:t.end);return!Number.isFinite(i)||!Number.isFinite(a)?null:{start:i,end:a}}function fr(e){let t=dr(e);t&&M(`update:zoomState`,t)}function pr(){ur&&=(cancelAnimationFrame(ur),null),W={}}function mr(e,t=R.value.start){let n=Y.value,r=Number(t);return e>n?n:e<0||e<=r?Math.min(r+1,n):e}function hr(){let e=Y.value;if(!Number.isFinite(e)||e<=0){R.value={start:0,end:0};return}let t=Math.max(0,Math.min(Number(R.value.start)||0,e-1)),n=Math.max(t+1,Math.min(Number(R.value.end)||e,e));(!Number.isFinite(t)||!Number.isFinite(n)||n<=t)&&(t=0,n=e),R.value={start:t,end:n},Bn.value&&Bn.value.setRangeValues(t,n)}function gr(e){let t=dr(e);if(!t)return null;let{start:n,end:r}=t;return(n!==Number(R.value.start)||r!==Number(R.value.end))&&(pr(),R.value={start:n,end:r},hr(),Fn()),{start:Number(R.value.start),end:Number(R.value.end)}}function _r(e){let t=gr(e);return t?(fr(t),t):null}async function vr(e=!0){if(!sr.value){sr.value=!0;try{await rt(),await rt();let{startIndex:t,endIndex:n}=I.value.zoom,r=Y.value;if(!Number.isFinite(r)||r<=0){R.value={start:0,end:0},cr.value=!0;return}let i=t==null?0:Number(t),a=n==null?r:mr(Number(n)+1,i);lr.value=!0,R.value={start:i,end:a},hr(),cr.value=!0,e&&C.zoomState&&gr(C.zoomState)}finally{queueMicrotask(()=>{lr.value=!1}),sr.value=!1,Fn()}}}async function yr({force:e=!1,publish:t=!1}={}){await vr(!e),t&&(fr({start:Number(R.value.start),end:Number(R.value.end)}),M(`zoomReset`))}dt([()=>C.zoomState,cr],([e,t])=>{t&&e&&gr(e)},{deep:!0,immediate:!0});function br(e){W={...W,...e},ur&&cancelAnimationFrame(ur),ur=requestAnimationFrame(()=>{let e={...R.value,...W};W={},ur=null,R.value=e,hr(),Fn(),fr({start:Number(R.value.start),end:Number(R.value.end)})})}function xr(e){if(sr.value||lr.value)return;let t=Number(e);Number.isFinite(t)&&(M(`zoomStart`,{index:t,isZoom:t!==0}),t!==R.value.start&&br({start:t}))}function Sr(e){if(sr.value||lr.value)return;let t=W.start===void 0?R.value.start:W.start,n=mr(Number(e),t);Number.isFinite(n)&&(M(`zoomEnd`,{index:n,isZoom:n!==Y.value}),(n!==R.value.end||W.start!==void 0)&&br({end:n}))}let{userOptionsVisible:Cr,setUserOptionsVisibility:wr,keepUserOptionState:Tr}=Ge({config:N.value}),{svgRef:G}=Ke({config:I.value.title});function Er(){let e=je({userConfig:C.config,defaultConfig:dn}),t={},n=e.theme;if(n){if(!fn.value(e))pn(e),t=e;else{let r=je({userConfig:Ye[n]||C.config,defaultConfig:e});t={...je({userConfig:C.config,defaultConfig:r}),customPalette:e.customPalette?e.customPalette:he[n]||ne}}}else t=e;return t}dt(()=>C.config,e=>{Qn.value||(N.value=Er()),Cr.value=!N.value.userOptions.showOnChartHover,Jn(),vn.value+=1,yn.value+=1,bn.value+=1,Nr.value.showTable=N.value.table.show},{deep:!0}),dt(()=>C.dataset,e=>{Array.isArray(e)&&e.length>0&&(er.value=!1),yr()},{deep:!0});let{isPrinting:Dr,isImaging:Or,generatePdf:kr,generateImage:Ar}=Oe({elementId:w.value,fileName:I.value.title.text||`vue-ui-donut-evolution`,options:N.value.userOptions.print}),jr=u(()=>N.value.userOptions.show&&!I.value.title.text),Mr=u(()=>be(N.value.customPalette)),Nr=_({showTable:N.value.table.show});dt(N,()=>{Nr.value={showTable:N.value.table.show}},{immediate:!0});let Pr=u(()=>({top:F.value.padding.top,right:F.value.padding.right,bottom:F.value.padding.bottom,left:F.value.padding.left})),K=u(()=>P.value.yAxis.position===`right`);function Fr(){let e=0;xn.value&&(e=Array.from(xn.value.querySelectorAll(`text`)).reduce((e,t)=>{let n=t.getComputedTextLength();return n>e?n:e},0));let t=wn.value?wn.value.getBoundingClientRect().width+P.value.axis.yLabelOffsetX+P.value.axis.fontSize:0,n=e+t+5;return{left:K.value?0:n,right:K.value?n:0,scaleLabelsWidth:e,yAxisLabelWidth:t,crosshair:5}}let Ir=_(0),Lr=ze(e=>{Ir.value=e},100);ft(e=>{let t=Sn.value;if(!t)return;let n=new ResizeObserver(e=>{Lr(e[0].contentRect.height)});n.observe(t),e(()=>n.disconnect())}),ot(()=>{Ir.value=0,In.stop(),clearTimeout(Wn.value),pr(),fi(),Qr(),A.value&&(Un.value&&A.value.unobserve(Un.value),A.value.disconnect(),A.value=null,Un.value=null)});let Rr=u(()=>{let e=0;Cn.value&&(e=Cn.value.getBBox().height);let t=0;return Sn.value&&(t=Ir.value),e+t+P.value.axis.fontSize+P.value.xAxis.dataLabels.offsetY}),q=u(()=>{kn.value;let e=Fr(),t=F.value.dataLabels.fontSize*3,n=tr.value.width,r=tr.value.height,i=Pr.value.left+e.left,a=n-Pr.value.right-e.right,o=n-i-Pr.value.right-e.right,s=r-Pr.value.top-Pr.value.bottom-t-Rr.value,c=Pr.value.top+t;return{top:c,left:i,right:a,bottom:r-Pr.value.bottom-Rr.value,absoluteHeight:r,absoluteWidth:n,centerX:i+Math.max(10,o)/2,centerY:c+Math.max(10,s)/2,width:Math.max(10,o),height:Math.max(10,s),scaleLabelsWidth:e.scaleLabelsWidth,yAxisLabelWidth:e.yAxisLabelWidth,crosshair:e.crosshair}}),J=u(()=>(qn.value&&$n.value.forEach((e,t)=>{[null,void 0].includes(e.name)&&ue({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:`name`,index:t}),[null,void 0].includes(e.values)&&ue({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:`values`,index:t})}),$n.value.map((e,t)=>({...e,values:oe(e.values),color:se(e.color)||Mr.value[t]||ne[t]||ne[t%ne.length],length:(e.values||[]).length,uid:ce()})))),zr=u(()=>J.value.filter(e=>!T.value.includes(e.uid)).map(e=>({...e,values:e.values.filter((e,t)=>t>=R.value.start&&t<=R.value.end)}))),Y=u(()=>Math.max(...J.value.map(e=>e.length))),X=_([]),Br=0;ft(()=>{let e=++Br;(async()=>{let t=await Ee({values:P.value.xAxis.dataLabels.values,maxDatapoints:Y.value,formatter:P.value.xAxis.dataLabels.datetimeFormatter,start:R.value.start,end:R.value.end});e===Br&&(X.value=t)})()});let Z=u(()=>q.value.width/(R.value.end-R.value.start)),Vr=u(()=>{let e=[];for(let t=0;t<R.value.end-R.value.start;t+=1){let n=zr.value.map(e=>e.values[t]??null),r=n.filter(e=>[void 0,null].includes(e)).length===n.length,i=n.reduce((e,t)=>e+t,0),a=n.map(e=>e/i),o=q.value.left+Z.value*t+Z.value/2;e.push({index:t,percentages:a,subtotal:r||i<0?null:i,values:n,x:o})}return e}),Hr=u(()=>{let e=Math.max(...Vr.value.map(e=>e.subtotal).filter(e=>ee(e)))??1,t=Math.min(...Vr.value.map(e=>e.subtotal).filter(e=>ee(e)))??0,n=Math.max(P.value.yAxis.scaleMax??0,e),r;return r=P.value.yAxis.scaleMin==null?0:Math.min(t,P.value.yAxis.scaleMin),P.value.yAxis.autoScale&&(r=t,n=e),r===n&&(r=n/2,n*=1.5),{max:n,min:r}}),Q=u(()=>{let e=Vr.value.length===1?Hr.value.max*2:Hr.value.max;return le(Hr.value.min,e,P.value.yAxis.dataLabels.steps)});dt(()=>Q.value.ticks.join(`|`),()=>{Fn()},{flush:`post`});function Ur(e){return(e-Q.value.min)/(Q.value.max-Q.value.min)}let Wr=u(()=>Q.value.ticks.map(e=>({y:q.value.bottom-q.value.height*Ur(e),value:e}))),$=u(()=>{let e=Vr.value,t=Math.max(...e.map(e=>e.subtotal));return e.length===1&&t*2,e.map((t,n)=>{let r=Math.min(q.value.width/24,Z.value/2*.7),i=r>q.value.width/16?q.value.width/16:r,a=E.value===t.index?q.value.width/16:i,o=e.length>4?r*2:r*2>Z.value/2*.7?Z.value/2*.7:r*2,s=q.value.bottom-q.value.height*Ur(t.subtotal),c=zr.value.map(e=>({color:e.color,name:e.name,value:e.values[n]??0})).toSorted((e,t)=>t.value-e.value);return{...t,y:s,radius:i,activeRadius:a,hoverRadius:o,donut:re({series:c},t.x,s,i,i,1.99999,2,1,360,105.25,i/2),donutHover:re({series:c},t.x,s,o,o,1.99999,2,1,360,105.25,o/2),donutFocus:re({series:c},q.value.centerX,q.value.centerY,q.value.height/3.6,q.value.height/3.6,1.99999,2,1,360,105.25,q.value.height/6)}})});function Gr(e,t,n){return pe(F.value.dataLabels.formatter,e,s({p:F.value.dataLabels.prefix,v:e,s:F.value.dataLabels.suffix,r:F.value.dataLabels.rounding}),{datapoint:t,index:n})}function Kr(e,t){return isNaN(e.value/c(t,`value`))?0:(e.value/c(t,`value`)*100).toFixed(0)+`%`}function qr(e){let t=G.value;if(!t)return null;if(t.createSVGPoint&&t.getScreenCTM){let n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;let r=t.getScreenCTM();if(r){let e=n.matrixTransform(r.inverse());return{x:e.x,y:e.y}}}let n=t.getBoundingClientRect(),r=t.viewBox?.baseVal||{x:0,y:0,width:n.width,height:n.height},i=Math.min(n.width/r.width,n.height/r.height);if(!Number.isFinite(i)||i<=0)return null;let a=r.width*i,o=r.height*i,s=(n.width-a)/2,c=(n.height-o)/2;return{x:(e.clientX-n.left-s)/i+r.x,y:(e.clientY-n.top-c)/i+r.y}}let Jr=u(()=>!z.value||B.value==null||V.value==null?null:{x:Math.min(B.value,V.value),y:q.value.top,width:Math.abs(V.value-B.value),height:q.value.height}),Yr=u(()=>cr.value?Number(R.value.start)!==0||Number(R.value.end)!==Number(Y.value):!1);function Xr(e){return Math.min(Math.max(e,q.value.left),q.value.right)}function Zr(){E.value=null,D.value=null,j.value=null}function Qr(e){let t=e?.pointerId==null?H.value:e.pointerId;t!=null&&G.value?.hasPointerCapture?.(t)&&G.value.releasePointerCapture(t),z.value=!1,B.value=null,V.value=null,H.value=null}function $r(){ir.value=!0,setTimeout(()=>{ir.value=!1},0)}function ei(e){ir.value&&(ir.value=!1,e.preventDefault(),e.stopPropagation())}function ti(e){if(!U.value||!Yr.value||!e)return!1;let t=Date.now(),n=e.pointerType||`mouse`,r=ar.value,i=n===`touch`?450:350,a=n===`touch`?28:10,o=Math.hypot(e.clientX-r.x,e.clientY-r.y);return r.time>0&&r.pointerType===n&&t-r.time<=i&&o<=a?(ar.value={time:0,x:0,y:0,pointerType:null},$r(),fi(),Qr(e),Fi(),yr({force:!0,publish:!0}),!0):(ar.value={time:t,x:e.clientX,y:e.clientY,pointerType:n},!1)}function ni(e){let t=Number(R.value.end)-Number(R.value.start);if(t<=0||!Number.isFinite(Z.value)||Z.value<=0)return null;let n=Math.floor((Xr(e)-q.value.left)/Z.value);return Math.max(0,Math.min(t-1,n))}function ri(e,t){let n=ni(e),r=ni(t);if(n==null||r==null)return null;let i=Math.min(n,r),a=Math.max(n,r);return a<=i?null:{start:Number(R.value.start)+i,end:Number(R.value.start)+a+1}}function ii(e){let t=_r(e);return t?(M(`zoomStart`,{index:t.start,isZoom:t.start!==0}),M(`zoomEnd`,{index:t.end,isZoom:t.end!==Y.value}),t):null}function ai(e){if(!U.value||ki.value||e.button!==void 0&&e.button!==0||H.value!=null&&e.pointerId!==H.value)return;let t=qr(e);if(!t||t.x<q.value.left||t.x>q.value.right||t.y<q.value.top||t.y>q.value.bottom||Number(R.value.end)-Number(R.value.start)<=1)return;rr.value=!0,G.value?.focus?.({preventScroll:!0}),fi(),Zr();let n=Xr(t.x);H.value=e.pointerId,z.value=!0,B.value=n,V.value=n}function oi(e){if(!U.value||!z.value||H.value!=null&&e.pointerId!==H.value)return;let t=qr(e);t&&(V.value=Xr(t.x),Zr(),B.value!=null&&Math.abs(V.value-B.value)>=2&&!G.value?.hasPointerCapture?.(e.pointerId)&&G.value?.setPointerCapture?.(e.pointerId))}function si(e){if(!U.value||!z.value||H.value!=null&&e.pointerId!==H.value)return;let t=qr(e);t&&(V.value=Xr(t.x));let n=B.value,r=V.value;if((n==null||r==null?0:Math.abs(r-n))<Math.max(4,q.value.width*.01)){if(ti(e))return;Qr(e);return}let i=ri(Math.min(n,r),Math.max(n,r));if(!i){Qr(e);return}Qr(e),ii(i)&&(ar.value={time:0,x:0,y:0,pointerType:null},Zr(),$r())}function ci(e){z.value||(E.value=null,D.value=null,j.value=null,N.value.events.datapointLeave&&N.value.events.datapointLeave({datapoint:e,seriesIndex:e.seriesIndex+R.value.start}))}function li(e){z.value||(N.value.events.datapointEnter&&N.value.events.datapointEnter({datapoint:e,seriesIndex:e.index+R.value.start}),E.value=e.index,D.value=e,j.value=e.index)}let ui=_(null),di=null;function fi(){di&&=(clearTimeout(di),null)}function pi(e,t){N.value.events.datapointClick&&N.value.events.datapointClick({datapoint:e,seriesIndex:e.index+R.value.start}),e.subtotal&&Yn.value.show&&(D.value=null,E.value=null,mn.value=!0,O.value=e,Ii(e),[null,void 0].includes(t)||(ui.value=t))}function mi(e,t){if(fi(),!U.value||!Yr.value){pi(e,t);return}let n=ar.value.pointerType===`touch`?480:380;di=setTimeout(()=>{di=null,pi(e,t)},n)}let hi=u(()=>J.value.map((e,t)=>({name:e.name,value:e.values.slice(R.value.start,R.value.end).reduce((e,t)=>e+t,0),shape:`circle`,uid:e.uid,color:e.color})).sort((e,t)=>t.value-e.value).map((e,t)=>({...e,opacity:T.value.includes(e.uid)?.5:1,segregate:()=>yi(e.uid),isSegregated:T.value.includes(e.uid),display:`${e.name}${I.value.legend.showPercentage||I.value.legend.showValue?`: `:``}${I.value.legend.showValue?pe(F.value.dataLabels.formatter,e.value,s({p:F.value.dataLabels.prefix,v:e.value,s:F.value.dataLabels.suffix,r:I.value.legend.roundingValue}),{datapoint:e,seriesIndex:t}):``}${I.value.legend.showPercentage?T.value.includes(e.uid)?`${I.value.legend.showValue?` (`:``}- %${I.value.legend.showValue?`)`:``}`:`${I.value.legend.showValue?` (`:``}${isNaN(e.value/gi.value)?`-`:s({v:e.value/gi.value*100,s:`%`,r:I.value.legend.roundingPercentage})}${I.value.legend.showValue?`)`:``}`:``}`}))),gi=u(()=>$.value.map(e=>e.subtotal).reduce((e,t)=>e+t,0)),_i=u(()=>({cy:`donut-div-legend`,backgroundColor:I.value.legend.backgroundColor,color:I.value.legend.color,fontSize:I.value.legend.fontSize,paddingBottom:12,fontWeight:I.value.legend.bold?`bold`:``}));function vi(){T.value.length?T.value=[]:hi.value.forEach(e=>{T.value.push(e.uid)}),M(`selectLegend`,zr.value)}function yi(e){if(T.value.includes(e))T.value=T.value.filter(t=>t!==e),M(`selectLegend`,zr.value);else{if(T.value.length===J.value.length-1)return;T.value.push(e),M(`selectLegend`,zr.value)}O.value&&pi($.value.find((e,t)=>t===ui.value))}function bi(e){return J.value.length?J.value.find(t=>t.name===e)||(qn.value&&console.warn(`VueUiDonutEvolution - Series name not found "${e}"`),null):(qn.value&&console.warn(`VueUiDonutEvolution - There are no series to show.`),null)}function xi(e){let t=bi(e);t!==null&&T.value.includes(t.uid)&&yi(t.uid)}function Si(e){let t=bi(e);t!==null&&(T.value.includes(t.uid)||yi(t.uid))}let Ci=u(()=>{let e=[``].concat(J.value.filter(e=>!T.value.includes(e.uid)).map(e=>({name:e.name,color:e.color})),[`Σ`]),t=[];for(let e=0;e<Y.value;e+=1){let n=J.value.filter(e=>!T.value.includes(e.uid)).map(t=>t.values[e]??0).reduce((e,t)=>e+t,0);t.push([X.value[e]?X.value[e].text:`-`].concat(J.value.filter(e=>!T.value.includes(e.uid)).map(t=>({value:t.values[e]??0,percentage:t.values[e]?t.values[e]/n*100:0})),[`${F.value.dataLabels.prefix}${Number(n.toFixed(N.value.table.td.roundingValue))}${F.value.dataLabels.suffix}`]))}return{head:e,body:t,bodyA11y:t.map(e=>e.map((t,n)=>n===0||n===e.length-1?t:`${Gr(t.value??0,null,n)} (${t.percentage.toFixed(1)}%)`)),config:{th:{backgroundColor:N.value.table.th.backgroundColor,color:N.value.table.th.color,outline:N.value.table.th.outline},td:{backgroundColor:N.value.table.td.backgroundColor,color:N.value.table.td.color,outline:N.value.table.td.outline},breakpoint:N.value.table.responsiveBreakpoint},colNames:[N.value.table.columnNames.period].concat(J.value.filter(e=>!T.value.includes(e.uid)).map(e=>e.name),N.value.table.columnNames.total)}});function wi(){return J.value}function Ti(e=null){rt(()=>{let t=[[I.value.title.text],[I.value.title.subtitle.text],[``]],n=[...Ci.value.head.map(e=>e.name??e)],r=[...Ci.value.body.map(e=>e.map(e=>e.value??e))],i=t.concat([n]).concat(r),a=te(i);e?e(a):ge({csvContent:a,title:I.value.title.text||`vue-ui-donut-evolution`})})}let Ei=_(!1);function Di(e){Ei.value=e,gn.value+=1}function Oi(){Nr.value.showTable=!Nr.value.showTable}let ki=_(!1);function Ai(){ki.value=!ki.value}function ji(e){return e.proportion*100>I.value.donuts.hover.hideLabelsUnderValue}let Mi=_([]),Ni=_({}),Pi=_(null);function Fi(){Pi.value?.close?.(),O.value=null,ui.value=null,mn.value=!1,D.value=null,E.value=null,j.value=null}function Ii(e){Mi.value=e.donut.map(e=>({name:e.name,values:[e.value],color:e.color})),Ni.value=ye({...Yn.value.donutChart,responsive:!0,theme:N.value.theme}),Pi.value&&Pi.value.open()}let Li=qe(k,()=>I.value.title.text),Ri=u(()=>tr.value.width),zi=u(()=>tr.value.height);Ie({timeLabelsEls:Sn,timeLabels:X,slicer:R,configRef:N,rotationPath:[`style`,`chart`,`layout`,`grid`,`xAxis`,`dataLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`layout`,`grid`,`xAxis`,`dataLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:Ri,height:zi,rotation:P.value.xAxis.dataLabels.autoRotate.angle});let Bi=u(()=>n({config:N,style:I,mutableConfig:Nr,dialog:un,accordion:nn,isFullscreen:Ei,parent:k,maxWidth:800,isCursorPointer:L}));dt(()=>Nr.value.showTable,e=>t(e,N,En));function Vi(){Nr.value.showTable=!1,Dn.value&&Dn.value.setTableIconState(!1)}let Hi=u(()=>hi.value.map(e=>({...e,name:e.display}))),Ui=u(()=>I.value.backgroundColor),Wi=u(()=>I.value.legend),Gi=u(()=>I.value.title),{isCallbackImaging:Ki,isCallbackSvg:qi,generateSvg:Ji,onGenerateImage:Yi}=Ne({svg:G,title:Gi,legend:Wi,legendItems:Hi,backgroundColor:Ui,getSvgCallback:()=>N.value.userOptions.callbacks.svg,generateImage:Ar});async function Xi(){if(M(`copyAlt`,{config:N.value,dataset:$.value}),!N.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(N.value.userOptions.callbacks.altCopy({config:N.value,dataset:$.value}))}function Zi(){j.value=null,Gn.value=!0}function Qi(){rr.value=!1,j.value=null,E.value=null,D.value=null,Gn.value=!1}function $i(e){if(!G.value||ki.value||document.activeElement!==G.value||(rr.value=!1,!$.value.length))return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){if(U.value&&(Yr.value||z.value)){fi(),Qr(),Fi(),yr({force:!0,publish:!0});return}j.value=null,E.value=null,D.value=null;return}if(r){if(j.value===null)return;let e=$.value[j.value];if(!e)return;pi(e,j.value);return}let a=j.value,o=E.value,s=a!==null&&a>=0&&a<$.value.length,c=o!==null&&o>=0&&o<$.value.length;s?n?(a+=1,a>=$.value.length&&(a=0)):t&&(--a,a<0&&(a=$.value.length-1)):c?(a=n?o+1:o-1,a>=$.value.length&&(a=0),a<0&&(a=$.value.length-1)):a=n?0:$.value.length-1;let ee=$.value[a];ee&&li(ee)}let ea=u(()=>({headers:Ci.value?.colNames??[],rows:Ci.value?.bodyA11y??[]}));return Re({getData:wi,getImage:Li,generatePdf:kr,generateCsv:Ti,generateImage:Ar,generateSvg:Ji,hideSeries:Si,showSeries:xi,toggleTable:Oi,toggleAnnotator:Ai,toggleFullscreen:Di,copyAlt:Xi,resetZoom:()=>yr({force:!0,publish:!0}),setZoomState:_r}),(e,t)=>(g(),p(`div`,{ref_key:`donutEvolutionChart`,ref:k,class:h(`vue-data-ui-component vue-ui-donut-evolution ${Ei.value?`vue-data-ui-wrapper-fullscreen`:``} ${N.value.useCssAnimation?``:`vue-ui-dna`}`),style:at(`font-family:${N.value.style.fontFamily};width:100%; text-align:center;background:${I.value.backgroundColor}`),id:w.value,onMouseenter:t[4]||=()=>x(wr)(!0),onMouseleave:t[5]||=()=>x(wr)(!1)},[m(`div`,{id:`chart-instructions-${w.value}`,class:`sr-only`},[m(`p`,null,b(N.value.a11y.translations.keyboardNavigation),1)],8,ht),ea.value?.rows?.length?(g(),d(We,{key:0,uid:w.value,head:ea.value.headers,body:ea.value.rows,notice:N.value.a11y.translations.tableAvailable,caption:N.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),N.value.userOptions.buttons.annotator?(g(),d(x(sn),{key:1,svgRef:x(G),backgroundColor:I.value.backgroundColor,color:I.value.color,active:ki.value,isCursorPointer:L.value,palette:N.value.userOptions.annotatorPalette,onClose:Ai},Ze({_:2},[v(x(i),t=>({name:t,fn:S(n=>[y(e.$slots,t,it(tt(x(r)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),jr.value?(g(),p(`div`,{key:2,ref_key:`noTitle`,ref:hn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),I.value.title.text?(g(),p(`div`,{key:3,ref_key:`chartTitle`,ref:Ln,style:`width:100%;background:transparent;padding-bottom:24px`,onMouseleave:ci},[(g(),d(Le,{key:`title_${vn.value}`,config:{title:{cy:`donut-evolution-div-title`,...I.value.title},subtitle:{cy:`donut-evolution-div-subtitle`,...I.value.title.subtitle}}},null,8,[`config`]))],544)):f(``,!0),m(`div`,{id:`legend-top-${w.value}`},null,8,gt),N.value.userOptions.show&&Kn.value&&(x(Tr)||x(Cr))?(g(),d(x(cn),{ref_key:`userOptionsRef`,ref:Dn,key:`user_options_${gn.value}`,backgroundColor:I.value.backgroundColor,color:I.value.color,isPrinting:x(Dr),isImaging:x(Or),uid:w.value,hasPdf:N.value.userOptions.buttons.pdf,hasImg:N.value.userOptions.buttons.img,hasSvg:N.value.userOptions.buttons.svg,hasXls:N.value.userOptions.buttons.csv,hasTable:N.value.userOptions.buttons.table,hasFullscreen:N.value.userOptions.buttons.fullscreen,hasAltCopy:N.value.userOptions.buttons.altCopy,isFullscreen:Ei.value,titles:{...N.value.userOptions.buttonTitles},chartElement:k.value,position:N.value.userOptions.position,hasAnnotator:N.value.userOptions.buttons.annotator,isAnnotation:ki.value,callbacks:N.value.userOptions.callbacks,printScale:N.value.userOptions.print.scale,tableDialog:N.value.table.useDialog,isCursorPointer:L.value,onToggleFullscreen:Di,onGeneratePdf:x(kr),onGenerateCsv:Ti,onGenerateImage:x(Yi),onGenerateSvg:x(Ji),onToggleTable:Oi,onToggleAnnotator:Ai,onCopyAlt:Xi,style:at({visibility:x(Tr)?x(Cr)?`visible`:`hidden`:`visible`})},Ze({_:2},[v(x(a)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:S(n=>[y(e.$slots,t,it(tt(x(o)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),m(`div`,_t,[(g(),p(`svg`,{ref_key:`svgRef`,ref:G,xmlns:x(ve),"aria-describedby":`chart-instructions-${w.value}`,class:h({"vue-data-ui-fullscreen--on":Ei.value,"vue-data-ui-fulscreen--off":!Ei.value,"vue-data-ui-no-transition":!x(Xn),"vue-ui-donut-evolution-chart-zoom-pointer-focus":U.value&&rr.value}),viewBox:`0 0 ${q.value.absoluteWidth} ${q.value.absoluteHeight}`,style:at({maxWidth:`100%`,overflow:`visible`,background:`transparent`,color:I.value.color,cursor:U.value?z.value?`col-resize`:`crosshair`:void 0,touchAction:U.value?`pan-y`:void 0,userSelect:U.value?`none`:void 0}),tabindex:`0`,onFocus:Zi,onBlur:Qi,onKeydown:$i,onPointerdown:ai,onPointermove:oi,onPointerup:si,onPointercancel:Qr,onClickCapture:ei},[$e(x(on)),e.$slots[`chart-background`]?(g(),p(`foreignObject`,{key:0,x:q.value.left,y:q.value.top,width:q.value.width,height:q.value.height,style:{pointerEvents:`none`}},[y(e.$slots,`chart-background`,{},void 0,!0)],8,yt)):f(``,!0),m(`defs`,null,[$e(Ve,{t:`linear`,id:`hover_${w.value}`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,stops:[[`0%`,x(ae)(I.value.backgroundColor,F.value.highlighter.opacity),1],[`100%`,x(ae)(F.value.highlighter.color,F.value.highlighter.opacity),1]]},null,8,[`id`,`stops`]),$e(Ve,{t:`radial`,id:`focus_${w.value}`,stops:[[`0%`,x(ae)(x(se)(I.value.backgroundColor),0),1],[`77%`,x(ae)(`#FFFFFF`,30),1],[`100%`,x(ae)(x(se)(I.value.backgroundColor),0),1]]},null,8,[`id`,`stops`])]),P.value.show?(g(),p(`g`,bt,[m(`line`,{x1:K.value?q.value.right:q.value.left,x2:K.value?q.value.right:q.value.left,y1:q.value.top,y2:q.value.top+q.value.height,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth,"stroke-linecap":`round`},null,8,xt),m(`line`,{x1:q.value.left,x2:q.value.right,y1:q.value.bottom,y2:q.value.bottom,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth,"stroke-linecap":`round`},null,8,St),P.value.showVerticalLines?(g(),p(`g`,Ct,[(g(!0),p(l,null,v(R.value.end-R.value.start,(e,t)=>(g(),p(`line`,{x1:q.value.left+(t+1)*Z.value,x2:q.value.left+(t+1)*Z.value,y1:q.value.top,y2:q.value.bottom,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth,"stroke-linecap":`round`},null,8,wt))),256))])):f(``,!0)])):f(``,!0),m(`g`,null,[P.value.axis.yLabel?(g(),p(`text`,{key:0,ref_key:`yAxisLabel`,ref:wn,"font-size":P.value.axis.fontSize,fill:P.value.axis.color,transform:`translate(${K.value?q.value.absoluteWidth-P.value.axis.fontSize/2-P.value.axis.yLabelOffsetX:P.value.axis.fontSize}, ${q.value.top+q.value.height/2}) rotate(-90)`,"text-anchor":`middle`,style:{transition:`none`}},b(P.value.axis.yLabel),9,Tt)):f(``,!0),P.value.axis.xLabel?(g(),p(`text`,{key:1,ref_key:`xAxisLabel`,ref:Cn,"text-anchor":`middle`,x:q.value.absoluteWidth/2,y:q.value.absoluteHeight-3,"font-size":P.value.axis.fontSize,fill:P.value.axis.color},b(P.value.axis.xLabel),9,Et)):f(``,!0)]),P.value.yAxis.dataLabels.show?(g(),p(`g`,{key:2,ref_key:`scaleLabels`,ref:xn,class:h({"donut-opacity":!0,"donut-behind":E.value!==null})},[(g(!0),p(l,null,v(Wr.value,(e,t)=>(g(),p(`g`,{key:`sl_${t}`},[e.value>=Q.value.min&&e.value<=Q.value.max?(g(),p(`path`,{key:0,class:h({"vue-data-ui-transition":x(Xn)}),d:`M${K.value?q.value.right:q.value.left},${e.y} ${K.value?q.value.right+5:q.value.left-5},${e.y}`,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth,"stroke-linecap":`round`},null,10,Dt)):f(``,!0),e.value>=Q.value.min&&e.value<=Q.value.max?(g(),p(`text`,{key:1,class:h({"vue-data-ui-transition":x(Xn)}),transform:`translate(${K.value?q.value.right-P.value.yAxis.dataLabels.offsetX+7:q.value.left+P.value.yAxis.dataLabels.offsetX-7}, ${e.y+P.value.yAxis.dataLabels.fontSize/3})`,"font-size":P.value.yAxis.dataLabels.fontSize,"text-anchor":K.value?`start`:`end`,fill:P.value.yAxis.dataLabels.color,"font-weight":P.value.yAxis.dataLabels.bold?`bold`:`normal`},b(x(xe)(e.value)?x(pe)(F.value.dataLabels.formatter,e.value,x(s)({p:F.value.dataLabels.prefix,v:e.value,s:F.value.dataLabels.suffix,r:F.value.grid.yAxis.dataLabels.roundingValue}),{datapoint:e,seriesIndex:t}):``),11,Ot)):f(``,!0)]))),128))],2)):f(``,!0),P.value.xAxis.dataLabels.show?(g(),p(`g`,{key:3,ref_key:`timeLabelsEls`,ref:Sn,class:h({"donut-opacity":!0})},[(g(!0),p(l,null,v(R.value.end-R.value.start,(e,t)=>(g(),p(`g`,null,[(P.value.xAxis.dataLabels.showOnlyFirstAndLast&&(t===0||t===Y.value-1)||!P.value.xAxis.dataLabels.showOnlyFirstAndLast)&&X.value[t]&&X.value[t].text?(g(),p(`g`,kt,[String(X.value[t].text).includes(`
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./tableIntegration-CNoJ1CIY.js";import{n as r,t as i}from"./annotationSlots-BRR85CqJ.js";import{n as a,t as o}from"./userOptionsSlots-DYuo-E5m.js";import{$ as s,$t as c,At as ee,D as te,Ht as ne,It as re,J as ie,Jt as ae,Kt as oe,S as se,X as ce,_ as le,at as ue,f as de,h as fe,i as pe,in as me,nn as he,nt as ge,p as _e,t as ve,tt as ye,w as be,y as xe,yt as Se,zt as Ce}from"./lib-CV_IANZ6.js";import{n as we,t as Te}from"./useHints-BH9r_0Vd.js";import{t as Ee}from"./useTimeLabels-Das5O74F.js";import{t as De}from"./useConfig-CKdzPrcf.js";import{t as Oe}from"./usePrinter-hLW3cv4N.js";import{n as ke,t as Ae}from"./BaseScanner-8NdoBs7B.js";import{t as je}from"./useNestedProp-CB186vF2.js";import{t as Me}from"./useThemeCheck-BKNRbGeC.js";import{t as Ne}from"./useChartExport-DtPNpc9M.js";import{t as Pe}from"./useTransitions-DfSHzsdz.js";import{t as Fe}from"./useStableElementSize-CegFbRlF.js";import{t as Ie}from"./useTimeLabelCollider-XQf_S7-z.js";import{n as Le}from"./Title-BGYFqulv.js";import{t as Re}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{l as ze,t as Be}from"./useResponsive-D2CPcpda.js";import{t as Ve}from"./DefGrad-DKMq1REY.js";import{t as He}from"./SlicerPreview-CNUciSbY.js";import{t as Ue}from"./BaseLegendToggle-Bq5FjyuI.js";import{t as We}from"./A11yDataTable-DWNlWXzs.js";import{t as Ge}from"./useUserOptionState-CXlFnwPv.js";import{t as Ke}from"./useChartAccessibility-DOMuYJfm.js";import{t as qe}from"./chartImage-CIvU_04o.js";import{t as Je}from"./Legend-D8YoT1RJ.js";import{t as Ye}from"./vue_ui_donut_evolution-CVoh3twl.js";import{Fragment as l,Teleport as Xe,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as Ze,createTextVNode as Qe,createVNode as $e,defineAsyncComponent as et,guardReactiveProps as tt,mergeProps as nt,nextTick as rt,normalizeClass as h,normalizeProps as it,normalizeStyle as at,onBeforeUnmount as ot,onMounted as st,openBlock as g,ref as _,renderList as v,renderSlot as y,resolveDynamicComponent as ct,shallowRef as lt,toDisplayString as b,toRefs as ut,unref as x,watch as dt,watchEffect as ft,withCtx as S}from"vue";var pt=/* @__PURE__ */ e({default:()=>nn}),mt=[`id`],ht=[`id`],gt=[`id`],_t={style:{position:`relative`}},vt=[`xmlns`,`aria-describedby`,`viewBox`],yt=[`x`,`y`,`width`,`height`],bt={key:1},xt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],St=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ct={key:0},wt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Tt=[`font-size`,`fill`,`transform`],Et=[`x`,`y`,`font-size`,`fill`],Dt=[`d`,`stroke`,`stroke-width`],Ot=[`transform`,`font-size`,`text-anchor`,`fill`,`font-weight`],kt={key:0},At=[`text-anchor`,`font-size`,`fill`,`transform`],jt=[`text-anchor`,`font-size`,`fill`,`transform`,`innerHTML`],Mt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],Nt={key:1},Pt=[`cx`,`cy`,`r`,`fill`],Ft={key:0},It={key:0},Lt=[`d`,`stroke`],Rt=[`text-anchor`,`x`,`y`,`fill`],zt=[`cx`,`cy`,`r`,`fill`],Bt={key:0},Vt=[`cx`,`cy`,`fill`],Ht={key:1},Ut=[`d`,`fill`,`stroke`],Wt={key:2},Gt=[`d`,`fill`,`stroke`],Kt=[`x`,`y`,`font-size`,`fill`],qt=[`x`,`y`,`width`,`height`,`fill`],Jt=[`x`,`y`,`width`,`height`,`onMouseenter`,`onMouseleave`,`onClick`],Yt=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],Xt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Zt={key:5,class:`vue-data-ui-watermark`},Qt=[`id`],$t=[`onClick`],en={key:0},tn={key:1},nn=/*#__PURE__*/ Re({__name:`vue-ui-donut-evolution`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},zoomState:{type:Object,default:null}},emits:[`selectLegend`,`zoomStart`,`zoomEnd`,`zoomReset`,`update:zoomState`,`copyAlt`],setup(e,{expose:Re,emit:pt}){let nn=et(()=>import(`./vue-ui-accordion-BNvevckx.js`).then(e=>e.n)),rn=et(()=>import(`./BaseIcon-DdIyewwY.js`).then(e=>e.n)),an=et(()=>import(`./DataTable-WNecJMcY.js`)),on=et(()=>import(`./PackageVersion-CdkxOy58.js`).then(e=>e.t)),sn=et(()=>import(`./PenAndPaper-IMw576MC.js`).then(e=>e.t)),cn=et(()=>import(`./UserOptions-DTxMeZv3.js`).then(e=>e.n)),ln=et(()=>import(`./vue-ui-donut-DLDUpjDU.js`).then(e=>e.n)),un=et(()=>import(`./BaseDraggableDialog-D_tuHEjO.js`).then(e=>e.n)),{vue_ui_donut_evolution:dn}=De(),{isThemeValid:fn,warnInvalidTheme:pn}=Me(),C=e,w=_(ce()),T=_([]),E=_(null),D=_(null),mn=_(!1),O=_(null),k=_(null),hn=_(null),gn=_(0),_n=_(0),vn=_(0),yn=_(0),bn=_(0),xn=_(null),Sn=_(null),Cn=_(null),wn=_(null),Tn=_(!1),En=_(null),Dn=_(null),On=lt(null),kn=_(0),An=_(0),jn=_(!1);function Mn(){On.value=k.value?.parentNode??null}function Nn(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})})}async function Pn(){let e=++An.value;await rt(),await Nn(),await Nn(),e===An.value&&(kn.value+=1)}function Fn(){jn.value||(jn.value=!0,rt(()=>{jn.value=!1,Mn(),Pn()}))}let In=Fe({elementRef:On,minimumWidth:2,minimumHeight:2,stableFramesRequired:2,once:!1,onSizeAccepted:()=>{Pn()}}),Ln=_(null),Rn=_(null),zn=_(null),Bn=_(null),Vn=_(null),Hn=_(!1),A=lt(null),Un=lt(null),Wn=_(null),j=_(null),Gn=_(!1),M=pt,Kn=u(()=>!!C.dataset&&C.dataset.length);st(()=>{Tn.value=!0,Mn(),In.start(),Jn(),Pn()});let qn=u(()=>N.value.debug);function Jn(){if(Ce(C.dataset)?(ue({componentName:`VueUiDonutEvolution`,type:`dataset`,debug:qn.value}),er.value=!0):C.dataset.length&&C.dataset.forEach((e,t)=>{Se({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{ue({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:e,index:t,debug:qn.value}),er.value=!0})}),Ce(C.dataset)||(er.value=N.value.loading),setTimeout(()=>{Hn.value=!0},10),vr(),N.value.responsive){let e=ze(()=>{Hn.value=!1;let{width:e,height:t}=Be({chart:k.value,title:N.value.style.chart.title.text?Ln.value:null,legend:N.value.style.chart.legend.show?Rn.value:null,slicer:N.value.style.chart.zoom.show&&nr.value>1?Vn.value:null,source:zn.value});requestAnimationFrame(()=>{tr.value.width=e,tr.value.height=t-12,Fn(),clearTimeout(Wn.value),Wn.value=setTimeout(()=>{Hn.value=!0},10)})});A.value&&(Un.value&&A.value.unobserve(Un.value),A.value.disconnect()),A.value=new ResizeObserver(e),Un.value=k.value.parentNode,A.value.observe(Un.value)}Fn()}let N=_(Er()),P=u(()=>F.value.grid),F=u(()=>N.value.style.chart.layout),Yn=u(()=>N.value.style.chart.dialog),I=u(()=>N.value.style.chart);we({config:()=>N.value,dataset:()=>C.dataset,component:`VueUiDonutEvolution`,rules:[Te.emptyArray,{test:e=>e.length===1,message:[`👀 There is only a single series in your dataset. Consider:`,``,`▶️ Using VueUiXy instead, for a regular line chart.`]},{test:e=>e.length>6,message:[`👀 The number of series is > 6, which makes donuts hard to read. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]},{test:e=>e.some(e=>e.values.length>24),message:[`👀 Some series have a number of data points > 24, which can make the chart and donuts hard to read. Consider:`,``,`▶️ Using larger time scales, or aggregated values.`,``,`▶️ Filtering the time range by adding date intputs in your UI.`,``,`▶️ Using VueUiXy to show longer series in a more comfortable display.`]}]});let{transitionEnabled:Xn}=Pe({config:()=>N.value.transitions,dataset:()=>C.dataset}),L=u(()=>N.value.userOptions.useCursorPointer),Zn=u(()=>me({defaultConfig:{useCssAnimation:!1,table:{show:!1},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{dataLabels:{show:!1},grid:{stroke:`#6A6A6A`,axis:{yLabel:``,xLabel:``},yAxis:{scaleMin:null,scaleMax:null,autoScale:!1,dataLabels:{show:!1}},xAxis:{dataLabels:{show:!1}}},line:{stroke:`#CACACA60`}},legend:{backgroundColor:`transparent`,showValue:!1,showPercentage:!1},zoom:{show:!1,startIndex:null,endIndex:null}}}},userConfig:N.value.skeletonConfig??{}})),{loading:Qn,FINAL_DATASET:$n,manualLoading:er}=ke({...ut(C),FINAL_CONFIG:N,prepareConfig:Er,callback:()=>{Promise.resolve().then(async()=>{await vr()})},skeletonDataset:C.config?.skeletonDataset??[{name:``,values:[1,2,3,5,8,13],color:`#AAAAAA`},{name:``,values:[1,2,3,5,8,13],color:`#BABABA`},{name:``,values:[1,2,3,5,8,13],color:`#CACACA`}],skeletonConfig:me({defaultConfig:N.value,userConfig:Zn.value})}),tr=_({width:F.value.width,height:F.value.height}),nr=u(()=>Math.max(...$n.value.map(e=>e.values.length))),R=_({start:0,end:nr.value}),z=_(!1),rr=_(!1),B=_(null),V=_(null),H=_(null),ir=_(!1),ar=_({time:0,x:0,y:0,pointerType:null}),or=u(()=>N.value.style.chart.zoom?.dragToZoom),U=u(()=>or.value.show&&Kn.value&&cr.value&&Y.value>1&&!Qn.value),sr=_(!1),cr=_(!1),lr=_(!1),ur=null,W={};function dr(e,t=R.value){if(!e||typeof e!=`object`)return null;let n=e.start!==void 0&&e.start!==null,r=e.end!==void 0&&e.end!==null;if(!n&&!r)return null;let i=Number(n?e.start:t.start),a=Number(r?e.end:t.end);return!Number.isFinite(i)||!Number.isFinite(a)?null:{start:i,end:a}}function fr(e){let t=dr(e);t&&M(`update:zoomState`,t)}function pr(){ur&&=(cancelAnimationFrame(ur),null),W={}}function mr(e,t=R.value.start){let n=Y.value,r=Number(t);return e>n?n:e<0||e<=r?Math.min(r+1,n):e}function hr(){let e=Y.value;if(!Number.isFinite(e)||e<=0){R.value={start:0,end:0};return}let t=Math.max(0,Math.min(Number(R.value.start)||0,e-1)),n=Math.max(t+1,Math.min(Number(R.value.end)||e,e));(!Number.isFinite(t)||!Number.isFinite(n)||n<=t)&&(t=0,n=e),R.value={start:t,end:n},Bn.value&&Bn.value.setRangeValues(t,n)}function gr(e){let t=dr(e);if(!t)return null;let{start:n,end:r}=t;return(n!==Number(R.value.start)||r!==Number(R.value.end))&&(pr(),R.value={start:n,end:r},hr(),Fn()),{start:Number(R.value.start),end:Number(R.value.end)}}function _r(e){let t=gr(e);return t?(fr(t),t):null}async function vr(e=!0){if(!sr.value){sr.value=!0;try{await rt(),await rt();let{startIndex:t,endIndex:n}=I.value.zoom,r=Y.value;if(!Number.isFinite(r)||r<=0){R.value={start:0,end:0},cr.value=!0;return}let i=t==null?0:Number(t),a=n==null?r:mr(Number(n)+1,i);lr.value=!0,R.value={start:i,end:a},hr(),cr.value=!0,e&&C.zoomState&&gr(C.zoomState)}finally{queueMicrotask(()=>{lr.value=!1}),sr.value=!1,Fn()}}}async function yr({force:e=!1,publish:t=!1}={}){await vr(!e),t&&(fr({start:Number(R.value.start),end:Number(R.value.end)}),M(`zoomReset`))}dt([()=>C.zoomState,cr],([e,t])=>{t&&e&&gr(e)},{deep:!0,immediate:!0});function br(e){W={...W,...e},ur&&cancelAnimationFrame(ur),ur=requestAnimationFrame(()=>{let e={...R.value,...W};W={},ur=null,R.value=e,hr(),Fn(),fr({start:Number(R.value.start),end:Number(R.value.end)})})}function xr(e){if(sr.value||lr.value)return;let t=Number(e);Number.isFinite(t)&&(M(`zoomStart`,{index:t,isZoom:t!==0}),t!==R.value.start&&br({start:t}))}function Sr(e){if(sr.value||lr.value)return;let t=W.start===void 0?R.value.start:W.start,n=mr(Number(e),t);Number.isFinite(n)&&(M(`zoomEnd`,{index:n,isZoom:n!==Y.value}),(n!==R.value.end||W.start!==void 0)&&br({end:n}))}let{userOptionsVisible:Cr,setUserOptionsVisibility:wr,keepUserOptionState:Tr}=Ge({config:N.value}),{svgRef:G}=Ke({config:I.value.title});function Er(){let e=je({userConfig:C.config,defaultConfig:dn}),t={},n=e.theme;if(n){if(!fn.value(e))pn(e),t=e;else{let r=je({userConfig:Ye[n]||C.config,defaultConfig:e});t={...je({userConfig:C.config,defaultConfig:r}),customPalette:e.customPalette?e.customPalette:he[n]||ne}}}else t=e;return t}dt(()=>C.config,e=>{Qn.value||(N.value=Er()),Cr.value=!N.value.userOptions.showOnChartHover,Jn(),vn.value+=1,yn.value+=1,bn.value+=1,Nr.value.showTable=N.value.table.show},{deep:!0}),dt(()=>C.dataset,e=>{Array.isArray(e)&&e.length>0&&(er.value=!1),yr()},{deep:!0});let{isPrinting:Dr,isImaging:Or,generatePdf:kr,generateImage:Ar}=Oe({elementId:w.value,fileName:I.value.title.text||`vue-ui-donut-evolution`,options:N.value.userOptions.print}),jr=u(()=>N.value.userOptions.show&&!I.value.title.text),Mr=u(()=>be(N.value.customPalette)),Nr=_({showTable:N.value.table.show});dt(N,()=>{Nr.value={showTable:N.value.table.show}},{immediate:!0});let Pr=u(()=>({top:F.value.padding.top,right:F.value.padding.right,bottom:F.value.padding.bottom,left:F.value.padding.left})),K=u(()=>P.value.yAxis.position===`right`);function Fr(){let e=0;xn.value&&(e=Array.from(xn.value.querySelectorAll(`text`)).reduce((e,t)=>{let n=t.getComputedTextLength();return n>e?n:e},0));let t=wn.value?wn.value.getBoundingClientRect().width+P.value.axis.yLabelOffsetX+P.value.axis.fontSize:0,n=e+t+5;return{left:K.value?0:n,right:K.value?n:0,scaleLabelsWidth:e,yAxisLabelWidth:t,crosshair:5}}let Ir=_(0),Lr=ze(e=>{Ir.value=e},100);ft(e=>{let t=Sn.value;if(!t)return;let n=new ResizeObserver(e=>{Lr(e[0].contentRect.height)});n.observe(t),e(()=>n.disconnect())}),ot(()=>{Ir.value=0,In.stop(),clearTimeout(Wn.value),pr(),fi(),Qr(),A.value&&(Un.value&&A.value.unobserve(Un.value),A.value.disconnect(),A.value=null,Un.value=null)});let Rr=u(()=>{let e=0;Cn.value&&(e=Cn.value.getBBox().height);let t=0;return Sn.value&&(t=Ir.value),e+t+P.value.axis.fontSize+P.value.xAxis.dataLabels.offsetY}),q=u(()=>{kn.value;let e=Fr(),t=F.value.dataLabels.fontSize*3,n=tr.value.width,r=tr.value.height,i=Pr.value.left+e.left,a=n-Pr.value.right-e.right,o=n-i-Pr.value.right-e.right,s=r-Pr.value.top-Pr.value.bottom-t-Rr.value,c=Pr.value.top+t;return{top:c,left:i,right:a,bottom:r-Pr.value.bottom-Rr.value,absoluteHeight:r,absoluteWidth:n,centerX:i+Math.max(10,o)/2,centerY:c+Math.max(10,s)/2,width:Math.max(10,o),height:Math.max(10,s),scaleLabelsWidth:e.scaleLabelsWidth,yAxisLabelWidth:e.yAxisLabelWidth,crosshair:e.crosshair}}),J=u(()=>(qn.value&&$n.value.forEach((e,t)=>{[null,void 0].includes(e.name)&&ue({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:`name`,index:t}),[null,void 0].includes(e.values)&&ue({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:`values`,index:t})}),$n.value.map((e,t)=>({...e,values:oe(e.values),color:se(e.color)||Mr.value[t]||ne[t]||ne[t%ne.length],length:(e.values||[]).length,uid:ce()})))),zr=u(()=>J.value.filter(e=>!T.value.includes(e.uid)).map(e=>({...e,values:e.values.filter((e,t)=>t>=R.value.start&&t<=R.value.end)}))),Y=u(()=>Math.max(...J.value.map(e=>e.length))),X=_([]),Br=0;ft(()=>{let e=++Br;(async()=>{let t=await Ee({values:P.value.xAxis.dataLabels.values,maxDatapoints:Y.value,formatter:P.value.xAxis.dataLabels.datetimeFormatter,start:R.value.start,end:R.value.end});e===Br&&(X.value=t)})()});let Z=u(()=>q.value.width/(R.value.end-R.value.start)),Vr=u(()=>{let e=[];for(let t=0;t<R.value.end-R.value.start;t+=1){let n=zr.value.map(e=>e.values[t]??null),r=n.filter(e=>[void 0,null].includes(e)).length===n.length,i=n.reduce((e,t)=>e+t,0),a=n.map(e=>e/i),o=q.value.left+Z.value*t+Z.value/2;e.push({index:t,percentages:a,subtotal:r||i<0?null:i,values:n,x:o})}return e}),Hr=u(()=>{let e=Math.max(...Vr.value.map(e=>e.subtotal).filter(e=>ee(e)))??1,t=Math.min(...Vr.value.map(e=>e.subtotal).filter(e=>ee(e)))??0,n=Math.max(P.value.yAxis.scaleMax??0,e),r;return r=P.value.yAxis.scaleMin==null?0:Math.min(t,P.value.yAxis.scaleMin),P.value.yAxis.autoScale&&(r=t,n=e),r===n&&(r=n/2,n*=1.5),{max:n,min:r}}),Q=u(()=>{let e=Vr.value.length===1?Hr.value.max*2:Hr.value.max;return le(Hr.value.min,e,P.value.yAxis.dataLabels.steps)});dt(()=>Q.value.ticks.join(`|`),()=>{Fn()},{flush:`post`});function Ur(e){return(e-Q.value.min)/(Q.value.max-Q.value.min)}let Wr=u(()=>Q.value.ticks.map(e=>({y:q.value.bottom-q.value.height*Ur(e),value:e}))),$=u(()=>{let e=Vr.value,t=Math.max(...e.map(e=>e.subtotal));return e.length===1&&t*2,e.map((t,n)=>{let r=Math.min(q.value.width/24,Z.value/2*.7),i=r>q.value.width/16?q.value.width/16:r,a=E.value===t.index?q.value.width/16:i,o=e.length>4?r*2:r*2>Z.value/2*.7?Z.value/2*.7:r*2,s=q.value.bottom-q.value.height*Ur(t.subtotal),c=zr.value.map(e=>({color:e.color,name:e.name,value:e.values[n]??0})).toSorted((e,t)=>t.value-e.value);return{...t,y:s,radius:i,activeRadius:a,hoverRadius:o,donut:re({series:c},t.x,s,i,i,1.99999,2,1,360,105.25,i/2),donutHover:re({series:c},t.x,s,o,o,1.99999,2,1,360,105.25,o/2),donutFocus:re({series:c},q.value.centerX,q.value.centerY,q.value.height/3.6,q.value.height/3.6,1.99999,2,1,360,105.25,q.value.height/6)}})});function Gr(e,t,n){return pe(F.value.dataLabels.formatter,e,s({p:F.value.dataLabels.prefix,v:e,s:F.value.dataLabels.suffix,r:F.value.dataLabels.rounding}),{datapoint:t,index:n})}function Kr(e,t){return isNaN(e.value/c(t,`value`))?0:(e.value/c(t,`value`)*100).toFixed(0)+`%`}function qr(e){let t=G.value;if(!t)return null;if(t.createSVGPoint&&t.getScreenCTM){let n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;let r=t.getScreenCTM();if(r){let e=n.matrixTransform(r.inverse());return{x:e.x,y:e.y}}}let n=t.getBoundingClientRect(),r=t.viewBox?.baseVal||{x:0,y:0,width:n.width,height:n.height},i=Math.min(n.width/r.width,n.height/r.height);if(!Number.isFinite(i)||i<=0)return null;let a=r.width*i,o=r.height*i,s=(n.width-a)/2,c=(n.height-o)/2;return{x:(e.clientX-n.left-s)/i+r.x,y:(e.clientY-n.top-c)/i+r.y}}let Jr=u(()=>!z.value||B.value==null||V.value==null?null:{x:Math.min(B.value,V.value),y:q.value.top,width:Math.abs(V.value-B.value),height:q.value.height}),Yr=u(()=>cr.value?Number(R.value.start)!==0||Number(R.value.end)!==Number(Y.value):!1);function Xr(e){return Math.min(Math.max(e,q.value.left),q.value.right)}function Zr(){E.value=null,D.value=null,j.value=null}function Qr(e){let t=e?.pointerId==null?H.value:e.pointerId;t!=null&&G.value?.hasPointerCapture?.(t)&&G.value.releasePointerCapture(t),z.value=!1,B.value=null,V.value=null,H.value=null}function $r(){ir.value=!0,setTimeout(()=>{ir.value=!1},0)}function ei(e){ir.value&&(ir.value=!1,e.preventDefault(),e.stopPropagation())}function ti(e){if(!U.value||!Yr.value||!e)return!1;let t=Date.now(),n=e.pointerType||`mouse`,r=ar.value,i=n===`touch`?450:350,a=n===`touch`?28:10,o=Math.hypot(e.clientX-r.x,e.clientY-r.y);return r.time>0&&r.pointerType===n&&t-r.time<=i&&o<=a?(ar.value={time:0,x:0,y:0,pointerType:null},$r(),fi(),Qr(e),Fi(),yr({force:!0,publish:!0}),!0):(ar.value={time:t,x:e.clientX,y:e.clientY,pointerType:n},!1)}function ni(e){let t=Number(R.value.end)-Number(R.value.start);if(t<=0||!Number.isFinite(Z.value)||Z.value<=0)return null;let n=Math.floor((Xr(e)-q.value.left)/Z.value);return Math.max(0,Math.min(t-1,n))}function ri(e,t){let n=ni(e),r=ni(t);if(n==null||r==null)return null;let i=Math.min(n,r),a=Math.max(n,r);return a<=i?null:{start:Number(R.value.start)+i,end:Number(R.value.start)+a+1}}function ii(e){let t=_r(e);return t?(M(`zoomStart`,{index:t.start,isZoom:t.start!==0}),M(`zoomEnd`,{index:t.end,isZoom:t.end!==Y.value}),t):null}function ai(e){if(!U.value||ki.value||e.button!==void 0&&e.button!==0||H.value!=null&&e.pointerId!==H.value)return;let t=qr(e);if(!t||t.x<q.value.left||t.x>q.value.right||t.y<q.value.top||t.y>q.value.bottom||Number(R.value.end)-Number(R.value.start)<=1)return;rr.value=!0,G.value?.focus?.({preventScroll:!0}),fi(),Zr();let n=Xr(t.x);H.value=e.pointerId,z.value=!0,B.value=n,V.value=n}function oi(e){if(!U.value||!z.value||H.value!=null&&e.pointerId!==H.value)return;let t=qr(e);t&&(V.value=Xr(t.x),Zr(),B.value!=null&&Math.abs(V.value-B.value)>=2&&!G.value?.hasPointerCapture?.(e.pointerId)&&G.value?.setPointerCapture?.(e.pointerId))}function si(e){if(!U.value||!z.value||H.value!=null&&e.pointerId!==H.value)return;let t=qr(e);t&&(V.value=Xr(t.x));let n=B.value,r=V.value;if((n==null||r==null?0:Math.abs(r-n))<Math.max(4,q.value.width*.01)){if(ti(e))return;Qr(e);return}let i=ri(Math.min(n,r),Math.max(n,r));if(!i){Qr(e);return}Qr(e),ii(i)&&(ar.value={time:0,x:0,y:0,pointerType:null},Zr(),$r())}function ci(e){z.value||(E.value=null,D.value=null,j.value=null,N.value.events.datapointLeave&&N.value.events.datapointLeave({datapoint:e,seriesIndex:e.seriesIndex+R.value.start}))}function li(e){z.value||(N.value.events.datapointEnter&&N.value.events.datapointEnter({datapoint:e,seriesIndex:e.index+R.value.start}),E.value=e.index,D.value=e,j.value=e.index)}let ui=_(null),di=null;function fi(){di&&=(clearTimeout(di),null)}function pi(e,t){N.value.events.datapointClick&&N.value.events.datapointClick({datapoint:e,seriesIndex:e.index+R.value.start}),e.subtotal&&Yn.value.show&&(D.value=null,E.value=null,mn.value=!0,O.value=e,Ii(e),[null,void 0].includes(t)||(ui.value=t))}function mi(e,t){if(fi(),!U.value||!Yr.value){pi(e,t);return}let n=ar.value.pointerType===`touch`?480:380;di=setTimeout(()=>{di=null,pi(e,t)},n)}let hi=u(()=>J.value.map((e,t)=>({name:e.name,value:e.values.slice(R.value.start,R.value.end).reduce((e,t)=>e+t,0),shape:`circle`,uid:e.uid,color:e.color})).sort((e,t)=>t.value-e.value).map((e,t)=>({...e,opacity:T.value.includes(e.uid)?.5:1,segregate:()=>yi(e.uid),isSegregated:T.value.includes(e.uid),display:`${e.name}${I.value.legend.showPercentage||I.value.legend.showValue?`: `:``}${I.value.legend.showValue?pe(F.value.dataLabels.formatter,e.value,s({p:F.value.dataLabels.prefix,v:e.value,s:F.value.dataLabels.suffix,r:I.value.legend.roundingValue}),{datapoint:e,seriesIndex:t}):``}${I.value.legend.showPercentage?T.value.includes(e.uid)?`${I.value.legend.showValue?` (`:``}- %${I.value.legend.showValue?`)`:``}`:`${I.value.legend.showValue?` (`:``}${isNaN(e.value/gi.value)?`-`:s({v:e.value/gi.value*100,s:`%`,r:I.value.legend.roundingPercentage})}${I.value.legend.showValue?`)`:``}`:``}`}))),gi=u(()=>$.value.map(e=>e.subtotal).reduce((e,t)=>e+t,0)),_i=u(()=>({cy:`donut-div-legend`,backgroundColor:I.value.legend.backgroundColor,color:I.value.legend.color,fontSize:I.value.legend.fontSize,paddingBottom:12,fontWeight:I.value.legend.bold?`bold`:``}));function vi(){T.value.length?T.value=[]:hi.value.forEach(e=>{T.value.push(e.uid)}),M(`selectLegend`,zr.value)}function yi(e){if(T.value.includes(e))T.value=T.value.filter(t=>t!==e),M(`selectLegend`,zr.value);else{if(T.value.length===J.value.length-1)return;T.value.push(e),M(`selectLegend`,zr.value)}O.value&&pi($.value.find((e,t)=>t===ui.value))}function bi(e){return J.value.length?J.value.find(t=>t.name===e)||(qn.value&&console.warn(`VueUiDonutEvolution - Series name not found "${e}"`),null):(qn.value&&console.warn(`VueUiDonutEvolution - There are no series to show.`),null)}function xi(e){let t=bi(e);t!==null&&T.value.includes(t.uid)&&yi(t.uid)}function Si(e){let t=bi(e);t!==null&&(T.value.includes(t.uid)||yi(t.uid))}let Ci=u(()=>{let e=[``].concat(J.value.filter(e=>!T.value.includes(e.uid)).map(e=>({name:e.name,color:e.color})),[`Σ`]),t=[];for(let e=0;e<Y.value;e+=1){let n=J.value.filter(e=>!T.value.includes(e.uid)).map(t=>t.values[e]??0).reduce((e,t)=>e+t,0);t.push([X.value[e]?X.value[e].text:`-`].concat(J.value.filter(e=>!T.value.includes(e.uid)).map(t=>({value:t.values[e]??0,percentage:t.values[e]?t.values[e]/n*100:0})),[`${F.value.dataLabels.prefix}${Number(n.toFixed(N.value.table.td.roundingValue))}${F.value.dataLabels.suffix}`]))}return{head:e,body:t,bodyA11y:t.map(e=>e.map((t,n)=>n===0||n===e.length-1?t:`${Gr(t.value??0,null,n)} (${t.percentage.toFixed(1)}%)`)),config:{th:{backgroundColor:N.value.table.th.backgroundColor,color:N.value.table.th.color,outline:N.value.table.th.outline},td:{backgroundColor:N.value.table.td.backgroundColor,color:N.value.table.td.color,outline:N.value.table.td.outline},breakpoint:N.value.table.responsiveBreakpoint},colNames:[N.value.table.columnNames.period].concat(J.value.filter(e=>!T.value.includes(e.uid)).map(e=>e.name),N.value.table.columnNames.total)}});function wi(){return J.value}function Ti(e=null){rt(()=>{let t=[[I.value.title.text],[I.value.title.subtitle.text],[``]],n=[...Ci.value.head.map(e=>e.name??e)],r=[...Ci.value.body.map(e=>e.map(e=>e.value??e))],i=t.concat([n]).concat(r),a=te(i);e?e(a):ge({csvContent:a,title:I.value.title.text||`vue-ui-donut-evolution`})})}let Ei=_(!1);function Di(e){Ei.value=e,gn.value+=1}function Oi(){Nr.value.showTable=!Nr.value.showTable}let ki=_(!1);function Ai(){ki.value=!ki.value}function ji(e){return e.proportion*100>I.value.donuts.hover.hideLabelsUnderValue}let Mi=_([]),Ni=_({}),Pi=_(null);function Fi(){Pi.value?.close?.(),O.value=null,ui.value=null,mn.value=!1,D.value=null,E.value=null,j.value=null}function Ii(e){Mi.value=e.donut.map(e=>({name:e.name,values:[e.value],color:e.color})),Ni.value=ye({...Yn.value.donutChart,responsive:!0,theme:N.value.theme}),Pi.value&&Pi.value.open()}let Li=qe(k,()=>I.value.title.text),Ri=u(()=>tr.value.width),zi=u(()=>tr.value.height);Ie({timeLabelsEls:Sn,timeLabels:X,slicer:R,configRef:N,rotationPath:[`style`,`chart`,`layout`,`grid`,`xAxis`,`dataLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`layout`,`grid`,`xAxis`,`dataLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:Ri,height:zi,rotation:P.value.xAxis.dataLabels.autoRotate.angle});let Bi=u(()=>n({config:N,style:I,mutableConfig:Nr,dialog:un,accordion:nn,isFullscreen:Ei,parent:k,maxWidth:800,isCursorPointer:L}));dt(()=>Nr.value.showTable,e=>t(e,N,En));function Vi(){Nr.value.showTable=!1,Dn.value&&Dn.value.setTableIconState(!1)}let Hi=u(()=>hi.value.map(e=>({...e,name:e.display}))),Ui=u(()=>I.value.backgroundColor),Wi=u(()=>I.value.legend),Gi=u(()=>I.value.title),{isCallbackImaging:Ki,isCallbackSvg:qi,generateSvg:Ji,onGenerateImage:Yi}=Ne({svg:G,title:Gi,legend:Wi,legendItems:Hi,backgroundColor:Ui,getSvgCallback:()=>N.value.userOptions.callbacks.svg,generateImage:Ar});async function Xi(){if(M(`copyAlt`,{config:N.value,dataset:$.value}),!N.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(N.value.userOptions.callbacks.altCopy({config:N.value,dataset:$.value}))}function Zi(){j.value=null,Gn.value=!0}function Qi(){rr.value=!1,j.value=null,E.value=null,D.value=null,Gn.value=!1}function $i(e){if(!G.value||ki.value||document.activeElement!==G.value||(rr.value=!1,!$.value.length))return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){if(U.value&&(Yr.value||z.value)){fi(),Qr(),Fi(),yr({force:!0,publish:!0});return}j.value=null,E.value=null,D.value=null;return}if(r){if(j.value===null)return;let e=$.value[j.value];if(!e)return;pi(e,j.value);return}let a=j.value,o=E.value,s=a!==null&&a>=0&&a<$.value.length,c=o!==null&&o>=0&&o<$.value.length;s?n?(a+=1,a>=$.value.length&&(a=0)):t&&(--a,a<0&&(a=$.value.length-1)):c?(a=n?o+1:o-1,a>=$.value.length&&(a=0),a<0&&(a=$.value.length-1)):a=n?0:$.value.length-1;let ee=$.value[a];ee&&li(ee)}let ea=u(()=>({headers:Ci.value?.colNames??[],rows:Ci.value?.bodyA11y??[]}));return Re({getData:wi,getImage:Li,generatePdf:kr,generateCsv:Ti,generateImage:Ar,generateSvg:Ji,hideSeries:Si,showSeries:xi,toggleTable:Oi,toggleAnnotator:Ai,toggleFullscreen:Di,copyAlt:Xi,resetZoom:()=>yr({force:!0,publish:!0}),setZoomState:_r}),(e,t)=>(g(),p(`div`,{ref_key:`donutEvolutionChart`,ref:k,class:h(`vue-data-ui-component vue-ui-donut-evolution ${Ei.value?`vue-data-ui-wrapper-fullscreen`:``} ${N.value.useCssAnimation?``:`vue-ui-dna`}`),style:at(`font-family:${N.value.style.fontFamily};width:100%; text-align:center;background:${I.value.backgroundColor}`),id:w.value,onMouseenter:t[4]||=()=>x(wr)(!0),onMouseleave:t[5]||=()=>x(wr)(!1)},[m(`div`,{id:`chart-instructions-${w.value}`,class:`sr-only`},[m(`p`,null,b(N.value.a11y.translations.keyboardNavigation),1)],8,ht),ea.value?.rows?.length?(g(),d(We,{key:0,uid:w.value,head:ea.value.headers,body:ea.value.rows,notice:N.value.a11y.translations.tableAvailable,caption:N.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),N.value.userOptions.buttons.annotator?(g(),d(x(sn),{key:1,svgRef:x(G),backgroundColor:I.value.backgroundColor,color:I.value.color,active:ki.value,isCursorPointer:L.value,palette:N.value.userOptions.annotatorPalette,onClose:Ai},Ze({_:2},[v(x(i),t=>({name:t,fn:S(n=>[y(e.$slots,t,it(tt(x(r)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),jr.value?(g(),p(`div`,{key:2,ref_key:`noTitle`,ref:hn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),I.value.title.text?(g(),p(`div`,{key:3,ref_key:`chartTitle`,ref:Ln,style:`width:100%;background:transparent;padding-bottom:24px`,onMouseleave:ci},[(g(),d(Le,{key:`title_${vn.value}`,config:{title:{cy:`donut-evolution-div-title`,...I.value.title},subtitle:{cy:`donut-evolution-div-subtitle`,...I.value.title.subtitle}}},null,8,[`config`]))],544)):f(``,!0),m(`div`,{id:`legend-top-${w.value}`},null,8,gt),N.value.userOptions.show&&Kn.value&&(x(Tr)||x(Cr))?(g(),d(x(cn),{ref_key:`userOptionsRef`,ref:Dn,key:`user_options_${gn.value}`,backgroundColor:I.value.backgroundColor,color:I.value.color,isPrinting:x(Dr),isImaging:x(Or),uid:w.value,hasPdf:N.value.userOptions.buttons.pdf,hasImg:N.value.userOptions.buttons.img,hasSvg:N.value.userOptions.buttons.svg,hasXls:N.value.userOptions.buttons.csv,hasTable:N.value.userOptions.buttons.table,hasFullscreen:N.value.userOptions.buttons.fullscreen,hasAltCopy:N.value.userOptions.buttons.altCopy,isFullscreen:Ei.value,titles:{...N.value.userOptions.buttonTitles},chartElement:k.value,position:N.value.userOptions.position,hasAnnotator:N.value.userOptions.buttons.annotator,isAnnotation:ki.value,callbacks:N.value.userOptions.callbacks,printScale:N.value.userOptions.print.scale,tableDialog:N.value.table.useDialog,isCursorPointer:L.value,onToggleFullscreen:Di,onGeneratePdf:x(kr),onGenerateCsv:Ti,onGenerateImage:x(Yi),onGenerateSvg:x(Ji),onToggleTable:Oi,onToggleAnnotator:Ai,onCopyAlt:Xi,style:at({visibility:x(Tr)?x(Cr)?`visible`:`hidden`:`visible`})},Ze({_:2},[v(x(a)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:S(n=>[y(e.$slots,t,it(tt(x(o)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),m(`div`,_t,[(g(),p(`svg`,{ref_key:`svgRef`,ref:G,xmlns:x(ve),"aria-describedby":`chart-instructions-${w.value}`,class:h({"vue-data-ui-fullscreen--on":Ei.value,"vue-data-ui-fulscreen--off":!Ei.value,"vue-data-ui-no-transition":!x(Xn),"vue-ui-donut-evolution-chart-zoom-pointer-focus":U.value&&rr.value}),viewBox:`0 0 ${q.value.absoluteWidth} ${q.value.absoluteHeight}`,style:at({maxWidth:`100%`,overflow:`visible`,background:`transparent`,color:I.value.color,cursor:U.value?z.value?`col-resize`:`crosshair`:void 0,touchAction:U.value?`pan-y`:void 0,userSelect:U.value?`none`:void 0}),tabindex:`0`,onFocus:Zi,onBlur:Qi,onKeydown:$i,onPointerdown:ai,onPointermove:oi,onPointerup:si,onPointercancel:Qr,onClickCapture:ei},[$e(x(on)),e.$slots[`chart-background`]?(g(),p(`foreignObject`,{key:0,x:q.value.left,y:q.value.top,width:q.value.width,height:q.value.height,style:{pointerEvents:`none`}},[y(e.$slots,`chart-background`,{},void 0,!0)],8,yt)):f(``,!0),m(`defs`,null,[$e(Ve,{t:`linear`,id:`hover_${w.value}`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,stops:[[`0%`,x(ae)(I.value.backgroundColor,F.value.highlighter.opacity),1],[`100%`,x(ae)(F.value.highlighter.color,F.value.highlighter.opacity),1]]},null,8,[`id`,`stops`]),$e(Ve,{t:`radial`,id:`focus_${w.value}`,stops:[[`0%`,x(ae)(x(se)(I.value.backgroundColor),0),1],[`77%`,x(ae)(`#FFFFFF`,30),1],[`100%`,x(ae)(x(se)(I.value.backgroundColor),0),1]]},null,8,[`id`,`stops`])]),P.value.show?(g(),p(`g`,bt,[m(`line`,{x1:K.value?q.value.right:q.value.left,x2:K.value?q.value.right:q.value.left,y1:q.value.top,y2:q.value.top+q.value.height,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth,"stroke-linecap":`round`},null,8,xt),m(`line`,{x1:q.value.left,x2:q.value.right,y1:q.value.bottom,y2:q.value.bottom,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth,"stroke-linecap":`round`},null,8,St),P.value.showVerticalLines?(g(),p(`g`,Ct,[(g(!0),p(l,null,v(R.value.end-R.value.start,(e,t)=>(g(),p(`line`,{x1:q.value.left+(t+1)*Z.value,x2:q.value.left+(t+1)*Z.value,y1:q.value.top,y2:q.value.bottom,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth,"stroke-linecap":`round`},null,8,wt))),256))])):f(``,!0)])):f(``,!0),m(`g`,null,[P.value.axis.yLabel?(g(),p(`text`,{key:0,ref_key:`yAxisLabel`,ref:wn,"font-size":P.value.axis.fontSize,fill:P.value.axis.color,transform:`translate(${K.value?q.value.absoluteWidth-P.value.axis.fontSize/2-P.value.axis.yLabelOffsetX:P.value.axis.fontSize}, ${q.value.top+q.value.height/2}) rotate(-90)`,"text-anchor":`middle`,style:{transition:`none`}},b(P.value.axis.yLabel),9,Tt)):f(``,!0),P.value.axis.xLabel?(g(),p(`text`,{key:1,ref_key:`xAxisLabel`,ref:Cn,"text-anchor":`middle`,x:q.value.absoluteWidth/2,y:q.value.absoluteHeight-3,"font-size":P.value.axis.fontSize,fill:P.value.axis.color},b(P.value.axis.xLabel),9,Et)):f(``,!0)]),P.value.yAxis.dataLabels.show?(g(),p(`g`,{key:2,ref_key:`scaleLabels`,ref:xn,class:h({"donut-opacity":!0,"donut-behind":E.value!==null})},[(g(!0),p(l,null,v(Wr.value,(e,t)=>(g(),p(`g`,{key:`sl_${t}`},[e.value>=Q.value.min&&e.value<=Q.value.max?(g(),p(`path`,{key:0,class:h({"vue-data-ui-transition":x(Xn)}),d:`M${K.value?q.value.right:q.value.left},${e.y} ${K.value?q.value.right+5:q.value.left-5},${e.y}`,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth,"stroke-linecap":`round`},null,10,Dt)):f(``,!0),e.value>=Q.value.min&&e.value<=Q.value.max?(g(),p(`text`,{key:1,class:h({"vue-data-ui-transition":x(Xn)}),transform:`translate(${K.value?q.value.right-P.value.yAxis.dataLabels.offsetX+7:q.value.left+P.value.yAxis.dataLabels.offsetX-7}, ${e.y+P.value.yAxis.dataLabels.fontSize/3})`,"font-size":P.value.yAxis.dataLabels.fontSize,"text-anchor":K.value?`start`:`end`,fill:P.value.yAxis.dataLabels.color,"font-weight":P.value.yAxis.dataLabels.bold?`bold`:`normal`},b(x(xe)(e.value)?x(pe)(F.value.dataLabels.formatter,e.value,x(s)({p:F.value.dataLabels.prefix,v:e.value,s:F.value.dataLabels.suffix,r:F.value.grid.yAxis.dataLabels.roundingValue}),{datapoint:e,seriesIndex:t}):``),11,Ot)):f(``,!0)]))),128))],2)):f(``,!0),P.value.xAxis.dataLabels.show?(g(),p(`g`,{key:3,ref_key:`timeLabelsEls`,ref:Sn,class:h({"donut-opacity":!0})},[(g(!0),p(l,null,v(R.value.end-R.value.start,(e,t)=>(g(),p(`g`,null,[(P.value.xAxis.dataLabels.showOnlyFirstAndLast&&(t===0||t===Y.value-1)||!P.value.xAxis.dataLabels.showOnlyFirstAndLast)&&X.value[t]&&X.value[t].text?(g(),p(`g`,kt,[String(X.value[t].text).includes(`
2
2
  `)?(g(),p(`text`,{key:1,class:`vue-data-ui-time-label`,"text-anchor":P.value.xAxis.dataLabels.rotation>0?`start`:P.value.xAxis.dataLabels.rotation<0?`end`:`middle`,"font-size":P.value.xAxis.dataLabels.fontSize,fill:P.value.xAxis.dataLabels.color,transform:`translate(${q.value.left+Z.value*t+Z.value/2}, ${q.value.bottom+P.value.xAxis.dataLabels.fontSize+P.value.xAxis.dataLabels.offsetY}), rotate(${P.value.xAxis.dataLabels.rotation})`,innerHTML:x(ie)({content:String(X.value[t].text),fontSize:P.value.xAxis.dataLabels.fontSize,fill:F.value.grid.xAxis.dataLabels.color,x:0,y:0})},null,8,jt)):(g(),p(`text`,{key:0,class:`vue-data-ui-time-label`,"text-anchor":P.value.xAxis.dataLabels.rotation>0?`start`:P.value.xAxis.dataLabels.rotation<0?`end`:`middle`,"font-size":P.value.xAxis.dataLabels.fontSize,fill:P.value.xAxis.dataLabels.color,transform:`translate(${q.value.left+Z.value*t+Z.value/2}, ${q.value.bottom+P.value.xAxis.dataLabels.fontSize+P.value.xAxis.dataLabels.offsetY}), rotate(${P.value.xAxis.dataLabels.rotation})`},b(X.value[t].text||``),9,At))])):f(``,!0)]))),256))],512)):f(``,!0),(g(!0),p(l,null,v($.value,(e,t)=>(g(),p(`g`,null,[F.value.line.show&&t<$.value.length-1&&![e.subtotal,$.value[t+1].subtotal].includes(null)?(g(),p(`line`,{key:0,class:h({"donut-opacity":!0,"donut-behind":E.value!==null}),x1:e.x,y1:e.y,x2:$.value[t+1].x,y2:$.value[t+1].y,stroke:F.value.line.stroke,"stroke-width":F.value.line.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,Mt)):f(``,!0),e.subtotal===null?f(``,!0):(g(),p(`g`,Nt,[e.subtotal?(g(),p(`circle`,{key:0,cx:e.x,cy:e.y,r:e.activeRadius,fill:I.value.backgroundColor},null,8,Pt)):f(``,!0)]))]))),256)),(g(!0),p(l,null,v($.value,(e,t)=>(g(),p(`g`,{class:h({"donut-opacity":!0,"donut-behind":t!==E.value&&E.value!==null})},[e.subtotal?(g(),p(`g`,Ft,[E.value!==null&&E.value===t?(g(),p(`g`,It,[(g(!0),p(l,null,v(e.donutHover,t=>(g(),p(`g`,null,[ji(t)?(g(),p(`path`,{key:0,d:x(fe)(t,{x:t.center.endX,y:t.center.endY},12,12,{x:e.x,y:e.y},!1,20),stroke:t.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,Lt)):f(``,!0)]))),256)),(g(!0),p(l,null,v(e.donutHover,(t,n)=>(g(),p(`g`,null,[ji(t)?(g(),p(`text`,{key:0,"data-cy-hover-label":``,"text-anchor":x(de)(t,!0,0).anchor,x:x(de)(t,!0,9).x,y:x(_e)(t,14,10),fill:P.value.yAxis.dataLabels.color,"font-size":8,"font-weight":`bold`},b(t.name)+`: `+b(Kr(t,e.donut))+` (`+b(t.value===null?`-`:Gr(t.value,t,n))+`) `,9,Rt)):f(``,!0)]))),256)),m(`g`,null,[m(`circle`,{cx:e.x,cy:e.y,r:e.hoverRadius,fill:I.value.backgroundColor},null,8,zt)])])):f(``,!0)])):f(``,!0)],2))),256)),(g(!0),p(l,null,v($.value,(e,t)=>(g(),p(`g`,{class:h({"donut-opacity":!0,"donut-behind":t!==E.value&&E.value!==null})},[e.subtotal===null?f(``,!0):(g(),p(`g`,Bt,[e.subtotal===0?(g(),p(`circle`,{key:0,cx:e.x,cy:e.y,r:3,fill:I.value.color},null,8,Vt)):E.value!==null&&E.value===t?(g(),p(`g`,Ht,[(g(!0),p(l,null,v(e.donutHover,(e,t)=>(g(),p(`path`,{d:e.arcSlice,fill:`${e.color}`,"stroke-width":1,stroke:I.value.backgroundColor},null,8,Ut))),256))])):(g(),p(`g`,Wt,[(g(!0),p(l,null,v(e.donut,(e,t)=>(g(),p(`path`,{d:e.arcSlice,fill:`${e.color}`,"stroke-width":.5,stroke:I.value.backgroundColor},null,8,Gt))),256))]))]))],2))),256)),(g(!0),p(l,null,v($.value,(e,t)=>(g(),p(`g`,{class:h({"donut-opacity":!0,"donut-behind":t!==E.value&&E.value!==null||mn.value&&t!==O.value.index})},[e.subtotal!==null&&F.value.dataLabels.show?(g(),p(`text`,{key:0,"text-anchor":`middle`,x:e.x,y:E.value===e.index&&e.subtotal?e.y+F.value.dataLabels.fontSize/3:e.y-e.radius-F.value.dataLabels.fontSize+F.value.dataLabels.offsetY,"font-size":F.value.dataLabels.fontSize,"font-weight":`bold`,fill:F.value.dataLabels.color},b(Gr(e.subtotal,e,t)),9,Kt)):f(``,!0)],2))),256)),(g(!0),p(l,null,v($.value,(e,t)=>(g(),p(`rect`,{x:q.value.left+t*Z.value,y:q.value.top,width:Z.value,height:q.value.height,fill:[E.value,ui.value].includes(e.index)?`url(#hover_${w.value})`:`transparent`,class:h({"donut-hover":L.value&&e.subtotal&&[E.value,ui.value].includes(e.index)}),style:{pointerEvents:`none`}},null,10,qt))),256)),(g(!0),p(l,null,v($.value,(e,t)=>(g(),p(`rect`,{"data-cy-trap":``,x:q.value.left+t*Z.value,y:q.value.top,width:Z.value,height:q.value.height,fill:`transparent`,onMouseenter:t=>li(e),onMouseleave:t=>ci(e),onClick:n=>mi(e,t),style:at({cursor:U.value?z.value?`col-resize`:`crosshair`:void 0}),class:h({"donut-hover":L.value&&E.value===e.index&&e.subtotal})},null,46,Jt))),256)),Jr.value?(g(),p(`rect`,{key:4,x:Jr.value.x,y:Jr.value.y,width:Jr.value.width,height:Jr.value.height,fill:or.value.selection.fill,"fill-opacity":or.value.selection.fillOpacity,stroke:or.value.selection.stroke,"stroke-opacity":or.value.selection.strokeOpacity,"stroke-width":or.value.selection.strokeWidth,"stroke-dasharray":or.value.selection.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`},null,8,Yt)):f(``,!0),y(e.$slots,`svg`,{svg:{...q.value,isPrintingImg:x(Dr)||x(Or)||x(Ki),isPrintingSvg:x(qi)}},void 0,!0)],46,vt)),e.$slots.hint?(g(),p(`div`,Xt,[y(e.$slots,`hint`,it(tt({hint:N.value.a11y.translations.keyboardNavigation,isVisible:Gn.value})),void 0,!0)])):f(``,!0)]),e.$slots.watermark?(g(),p(`div`,Zt,[y(e.$slots,`watermark`,it(tt({isPrinting:x(Dr)||x(Or)||x(Ki)||x(qi)})),void 0,!0)])):f(``,!0),m(`div`,{ref_key:`chartSlicer`,ref:Vn,style:at(`width:100%;background:${I.value.backgroundColor}`),"data-dom-to-png-ignore":``},[Y.value>1&&I.value.zoom.show?(g(),d(He,{ref_key:`slicerComponent`,ref:Bn,key:`slicer_${_n.value}`,background:I.value.zoom.color,borderColor:I.value.backgroundColor,fontSize:I.value.zoom.fontSize,useResetSlot:I.value.zoom.useResetSlot,timeLabels:X.value,textColor:I.value.color,inputColor:I.value.zoom.color,selectColor:I.value.zoom.highlightColor,max:Y.value,min:0,valueStart:R.value.start,valueEnd:R.value.end,refreshStartPoint:I.value.zoom.startIndex===null?0:I.value.zoom.startIndex,refreshEndPoint:I.value.zoom.endIndex===null?Y.value:I.value.zoom.endIndex+1,enableRangeHandles:I.value.zoom.enableRangeHandles,enableSelectionDrag:I.value.zoom.enableSelectionDrag,focusOnDrag:I.value.zoom.focusOnDrag,focusRangeRatio:I.value.zoom.focusRangeRatio,isCursorPointer:L.value,maxWidth:I.value.zoom.maxWidth,minimapLeftInsetRatio:q.value.absoluteWidth>0&&I.value.zoom.autoFit?q.value.left/q.value.absoluteWidth:null,minimapRightInsetRatio:q.value.absoluteWidth>0&&I.value.zoom.autoFit?(q.value.absoluteWidth-q.value.right)/q.value.absoluteWidth:null,"onUpdate:start":xr,"onUpdate:end":Sr,onReset:t[0]||=()=>yr({force:!0,publish:!0})},{"reset-action":S(({reset:t})=>[y(e.$slots,`reset-action`,it(tt({reset:t})),void 0,!0)]),_:3},8,[`background`,`borderColor`,`fontSize`,`useResetSlot`,`timeLabels`,`textColor`,`inputColor`,`selectColor`,`max`,`valueStart`,`valueEnd`,`refreshStartPoint`,`refreshEndPoint`,`enableRangeHandles`,`enableSelectionDrag`,`focusOnDrag`,`focusRangeRatio`,`isCursorPointer`,`maxWidth`,`minimapLeftInsetRatio`,`minimapRightInsetRatio`])):f(``,!0)],4),m(`div`,{id:`legend-bottom-${w.value}`},null,8,Qt),Tn.value&&(I.value.legend.show||e.$slots.legend)?(g(),d(Xe,{key:6,to:I.value.legend.position===`top`?`#legend-top-${w.value}`:`#legend-bottom-${w.value}`},[m(`div`,{ref_key:`chartLegend`,ref:Rn},[y(e.$slots,`legend`,{legend:hi.value},()=>[I.value.legend.show?(g(),d(Je,{key:`legend_${bn.value}`,legendSet:hi.value,config:_i.value,onClickMarker:t[1]||=({legend:e})=>yi(e.uid)},{item:S(({legend:e,index:t})=>[m(`div`,{onClick:t=>yi(e.uid),style:at(`opacity:${T.value.includes(e.uid)?.5:1}`)},b(e.display),13,$t)]),legendToggle:S(()=>[hi.value.length>2&&I.value.legend.selectAllToggle.show&&!x(Qn)?(g(),d(Ue,{key:0,backgroundColor:I.value.legend.selectAllToggle.backgroundColor,color:I.value.legend.selectAllToggle.color,fontSize:I.value.legend.fontSize,checked:T.value.length>0,onToggle:vi},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`])):f(``,!0)]),_:1},8,[`legendSet`,`config`])):f(``,!0)],!0)],512)],8,[`to`])):f(``,!0),e.$slots.source?(g(),p(`div`,{key:7,ref_key:`source`,ref:zn,dir:`auto`},[y(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),Kn.value&&N.value.userOptions.buttons.table?(g(),d(ct(Bi.value.component),nt({key:8},Bi.value.props,{ref_key:`tableUnit`,ref:En,onClose:Vi}),Ze({content:S(()=>[(g(),d(x(an),{key:`table_${yn.value}`,colNames:Ci.value.colNames,head:Ci.value.head,body:Ci.value.body,config:Ci.value.config,title:N.value.table.useDialog?``:Bi.value.title,withCloseButton:!N.value.table.useDialog,isCursorPointer:L.value,onClose:Vi},{th:S(({th:e})=>[Qe(b(e.name??e),1)]),td:S(({td:e})=>[e.value===null?(g(),p(`span`,en,`-`)):(g(),p(`b`,tn,b(isNaN(e.value)?``:F.value.dataLabels.prefix)+b(!isNaN(e.value)&&e.value!==null?Number(e.value.toFixed(N.value.table.td.roundingValue)).toLocaleString():e)+b(isNaN(e.value)?``:F.value.dataLabels.suffix),1)),m(`span`,null,b(e.percentage&&!isNaN(e.percentage)?`(${Number(e.percentage.toFixed(N.value.table.td.roundingPercentage)).toLocaleString()}%)`:``),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[N.value.table.useDialog?{name:`title`,fn:S(()=>[Qe(b(Bi.value.title),1)]),key:`0`}:void 0,N.value.table.useDialog?{name:`actions`,fn:S(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[2]||=e=>Ti(N.value.userOptions.callbacks.csv),style:at({cursor:L.value?`cursor`:`default`})},[$e(x(rn),{name:`fileCsv`,stroke:Bi.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):f(``,!0),Yn.value.show?(g(),d(x(un),{key:9,ref_key:`dialog`,ref:Pi,onClose:t[3]||=e=>{O.value=null,mn.value=!1,D.value=null,E.value=null,ui.value=null},backgroundColor:Yn.value.backgroundColor,color:Yn.value.color,headerBg:Yn.value.header.backgroundColor,headerColor:Yn.value.header.color,isFullscreen:Ei.value,fullscreenParent:k.value},{title:S(()=>[Qe(b(X.value[Number(O.value.index)]?X.value[Number(O.value.index)].text:``),1)]),content:S(()=>[O.value?(g(),d(x(ln),{key:0,config:Ni.value,dataset:Mi.value},null,8,[`config`,`dataset`])):f(``,!0)]),_:1},8,[`backgroundColor`,`color`,`headerBg`,`headerColor`,`isFullscreen`,`fullscreenParent`])):f(``,!0),x(Qn)?(g(),d(Ae,{key:10})):f(``,!0)],46,mt))}},[[`__scopeId`,`data-v-04822613`]]);export{pt as n,nn as t};