vue-data-ui 3.28.10 → 3.28.11

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 (348) hide show
  1. package/dist/BaseDraggableDialog-DVstuNhT.js +1 -0
  2. package/dist/{BaseLegendToggle-BIzyyI1h.js → BaseLegendToggle-VzX69MCo.js} +1 -1
  3. package/dist/BaseZoomControls-D4i_j6vc.js +1 -0
  4. package/dist/ColorPicker-DmVnJGVv.js +1 -0
  5. package/dist/{DataTable-Dof6yhO7.js → DataTable-KeuZB1JM.js} +1 -1
  6. package/dist/{HillActions-BMH9pSmQ.js → HillActions-D--h5brJ.js} +1 -1
  7. package/dist/{Legend-DM0ClX3D.js → Legend-W9YVYVX-.js} +1 -1
  8. package/dist/{NonSvgPenAndPaper-DXdAh1Sz.js → NonSvgPenAndPaper-B2kuh5Yb.js} +1 -1
  9. package/dist/{PackageVersion-DKSNC-YP.js → PackageVersion-ksOit8fp.js} +1 -1
  10. package/dist/PenAndPaper-BV5ODysA.js +1 -0
  11. package/dist/SlicerPreview-0m9E7Zh_.js +1 -0
  12. package/dist/{StackChartTable-CZteRybF.js → StackChartTable-D-31a1zL.js} +1 -1
  13. package/dist/{UserOptions-B9EyfU9n.js → UserOptions-K1N7zQRx.js} +1 -1
  14. package/dist/XyAnalysisOptions-CUtj1x2f.js +1 -0
  15. package/dist/components/vue-ui-3d-bar.js +1 -1
  16. package/dist/components/vue-ui-accordion.js +1 -1
  17. package/dist/components/vue-ui-age-pyramid.js +1 -1
  18. package/dist/components/vue-ui-annotator.js +1 -1
  19. package/dist/components/vue-ui-bullet.js +1 -1
  20. package/dist/components/vue-ui-bump.js +1 -1
  21. package/dist/components/vue-ui-candlestick.js +1 -1
  22. package/dist/components/vue-ui-carousel-table.js +1 -1
  23. package/dist/components/vue-ui-chestnut.js +1 -1
  24. package/dist/components/vue-ui-chord.js +1 -1
  25. package/dist/components/vue-ui-circle-pack.js +1 -1
  26. package/dist/components/vue-ui-cursor.js +1 -1
  27. package/dist/components/vue-ui-dag.js +1 -1
  28. package/dist/components/vue-ui-dashboard.js +1 -1
  29. package/dist/components/vue-ui-digits.js +1 -1
  30. package/dist/components/vue-ui-donut-evolution.js +1 -1
  31. package/dist/components/vue-ui-donut.js +1 -1
  32. package/dist/components/vue-ui-dumbbell.js +1 -1
  33. package/dist/components/vue-ui-flow.js +1 -1
  34. package/dist/components/vue-ui-funnel.js +1 -1
  35. package/dist/components/vue-ui-galaxy.js +1 -1
  36. package/dist/components/vue-ui-gauge.js +1 -1
  37. package/dist/components/vue-ui-geo.js +1 -1
  38. package/dist/components/vue-ui-gizmo.js +1 -1
  39. package/dist/components/vue-ui-graph.js +1 -1
  40. package/dist/components/vue-ui-heatmap.js +1 -1
  41. package/dist/components/vue-ui-hill.js +1 -1
  42. package/dist/components/vue-ui-history-plot.js +1 -1
  43. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  44. package/dist/components/vue-ui-kpi.js +1 -1
  45. package/dist/components/vue-ui-label.js +1 -1
  46. package/dist/components/vue-ui-mini-loader.js +1 -1
  47. package/dist/components/vue-ui-molecule.js +1 -1
  48. package/dist/components/vue-ui-mood-radar.js +1 -1
  49. package/dist/components/vue-ui-nested-donuts.js +1 -1
  50. package/dist/components/vue-ui-onion.js +1 -1
  51. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  52. package/dist/components/vue-ui-quadrant.js +1 -1
  53. package/dist/components/vue-ui-quick-chart.js +1 -1
  54. package/dist/components/vue-ui-radar.js +1 -1
  55. package/dist/components/vue-ui-rating.js +1 -1
  56. package/dist/components/vue-ui-relation-circle.js +1 -1
  57. package/dist/components/vue-ui-ridgeline.js +1 -1
  58. package/dist/components/vue-ui-rings.js +1 -1
  59. package/dist/components/vue-ui-scatter.js +1 -1
  60. package/dist/components/vue-ui-skeleton.js +1 -1
  61. package/dist/components/vue-ui-smiley.js +1 -1
  62. package/dist/components/vue-ui-spark-trend.js +1 -1
  63. package/dist/components/vue-ui-sparkbar.js +1 -1
  64. package/dist/components/vue-ui-sparkgauge.js +1 -1
  65. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  66. package/dist/components/vue-ui-sparkline.js +1 -1
  67. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  68. package/dist/components/vue-ui-stackbar.js +1 -1
  69. package/dist/components/vue-ui-stackline.js +1 -1
  70. package/dist/components/vue-ui-strip-plot.js +1 -1
  71. package/dist/components/vue-ui-table-heatmap.js +1 -1
  72. package/dist/components/vue-ui-table-sparkline.js +1 -1
  73. package/dist/components/vue-ui-table.js +1 -1
  74. package/dist/components/vue-ui-thermometer.js +1 -1
  75. package/dist/components/vue-ui-timer.js +1 -1
  76. package/dist/components/vue-ui-tiremarks.js +1 -1
  77. package/dist/components/vue-ui-treemap.js +1 -1
  78. package/dist/components/vue-ui-vertical-bar.js +1 -1
  79. package/dist/components/vue-ui-waffle.js +1 -1
  80. package/dist/components/vue-ui-wheel.js +1 -1
  81. package/dist/components/vue-ui-word-cloud.js +1 -1
  82. package/dist/components/vue-ui-world.js +1 -1
  83. package/dist/components/vue-ui-xy-canvas.js +1 -1
  84. package/dist/components/vue-ui-xy.js +1 -1
  85. package/dist/package-vXTjpYqq.js +1 -0
  86. package/dist/{render-common-Cy1X2PzP.js → render-common-CPA2hfDW.js} +1 -1
  87. package/dist/resolveChartConfig-0IvbmIE_.js +1 -0
  88. package/dist/ssr/vue-ui-donut.js +1 -1
  89. package/dist/ssr/vue-ui-xy.js +1 -1
  90. package/dist/ssr.js +1 -1
  91. package/dist/style.css +1 -1
  92. package/dist/types/vue-data-ui.d.ts +1 -0
  93. package/dist/useConfig-_JwRfIqE.js +1 -0
  94. package/dist/{useObjectBindings-C_70Czuj.js → useObjectBindings-D789Dz63.js} +1 -1
  95. package/dist/utils.js +1 -1
  96. package/dist/vue-data-ui-0NKIVNqt.js +1 -0
  97. package/dist/vue-data-ui.js +1 -1
  98. package/dist/vue-ui-3d-bar-Cs-_W1Av.js +19 -0
  99. package/dist/{vue-ui-accordion-E8TJfFeK.js → vue-ui-accordion-DxGxf-Rm.js} +1 -1
  100. package/dist/vue-ui-age-pyramid-cWWVFoCj.js +1 -0
  101. package/dist/vue-ui-annotator-D31LD4-s.js +331 -0
  102. package/dist/vue-ui-bullet-CMQzoLKs.js +34 -0
  103. package/dist/vue-ui-bump-SSu5eVbF.js +8 -0
  104. package/dist/vue-ui-candlestick-Cm9jS3n7.js +22 -0
  105. package/dist/vue-ui-carousel-table-D-F54W90.js +1 -0
  106. package/dist/vue-ui-chestnut-DNe1s8TT.js +1 -0
  107. package/dist/vue-ui-chord-DGzpBpuI.js +21 -0
  108. package/dist/vue-ui-circle-pack--iJQtXys.js +13 -0
  109. package/dist/vue-ui-cursor-B7DJRSGD.js +1 -0
  110. package/dist/vue-ui-dag-tsM65e_V.js +9 -0
  111. package/dist/vue-ui-dashboard-CC7IhQZu.js +1 -0
  112. package/dist/{vue-ui-digits-DbxT72mM.js → vue-ui-digits-hv2QeC-H.js} +2 -2
  113. package/dist/vue-ui-donut-B9WXaiPn.js +47 -0
  114. package/dist/vue-ui-donut-evolution-Wz_-FYab.js +2 -0
  115. package/dist/vue-ui-donut-iyVVIGoJ.js +22 -0
  116. package/dist/vue-ui-dumbbell-p3Q2LkBV.js +9 -0
  117. package/dist/vue-ui-flow-BCH8YU8H.js +3 -0
  118. package/dist/vue-ui-funnel-DdrBD9oX.js +1 -0
  119. package/dist/vue-ui-galaxy-DYKEOEL-.js +1 -0
  120. package/dist/vue-ui-gauge-CPgvR_YB.js +1 -0
  121. package/dist/vue-ui-geo-DhJ3Wr_5.js +1 -0
  122. package/dist/vue-ui-gizmo-BTy4Vr1e.js +1 -0
  123. package/dist/{vue-ui-graph-9YSKwYhC.js → vue-ui-graph-C4kfE4G8.js} +3 -3
  124. package/dist/vue-ui-heatmap-lti43RhW.js +1 -0
  125. package/dist/vue-ui-hill-3GVfKQmi.js +1 -0
  126. package/dist/vue-ui-history-plot-DMTPygZA.js +2 -0
  127. package/dist/vue-ui-horizontal-bar-DwWo0CvX.js +4 -0
  128. package/dist/{vue-ui-kpi-BxW6DctE.js → vue-ui-kpi-BTMK37Ix.js} +1 -1
  129. package/dist/{vue-ui-label-rxuzmeyD.js → vue-ui-label-CBrMoFDG.js} +2 -2
  130. package/dist/{vue-ui-mini-loader-DpAYrTYb.js → vue-ui-mini-loader-PsWZLMLF.js} +1 -1
  131. package/dist/vue-ui-molecule-rbDnRA7c.js +1 -0
  132. package/dist/vue-ui-mood-radar-8s1jnO3P.js +1 -0
  133. package/dist/vue-ui-nested-donuts-8bY4HvC-.js +19 -0
  134. package/dist/vue-ui-onion-CgLNDFrZ.js +5 -0
  135. package/dist/vue-ui-parallel-coordinate-plot-ms14eLus.js +9 -0
  136. package/dist/vue-ui-quadrant-6GgQZ8fW.js +2 -0
  137. package/dist/vue-ui-quick-chart-CzRbFXIS.js +16 -0
  138. package/dist/vue-ui-radar-BxsD2JBj.js +1 -0
  139. package/dist/vue-ui-rating-D0QvpD3V.js +1 -0
  140. package/dist/vue-ui-relation-circle-BFPAlaWQ.js +1 -0
  141. package/dist/vue-ui-ridgeline-G2m7eFWe.js +2 -0
  142. package/dist/vue-ui-rings-l_BLWL48.js +1 -0
  143. package/dist/vue-ui-scatter-C4hXe3DM.js +9 -0
  144. package/dist/{vue-ui-skeleton-SlYTmirP.js → vue-ui-skeleton-BLyh-ESb.js} +3 -3
  145. package/dist/{vue-ui-smiley-DZVFOGfv.js → vue-ui-smiley-C00q-teB.js} +1 -1
  146. package/dist/{vue-ui-spark-trend-D155vscB.js → vue-ui-spark-trend-D0hz9kNt.js} +1 -1
  147. package/dist/vue-ui-sparkbar-Dweyr8h-.js +1 -0
  148. package/dist/{vue-ui-sparkgauge-CFj0wLj5.js → vue-ui-sparkgauge-DQfCXKFj.js} +1 -1
  149. package/dist/vue-ui-sparkhistogram-DOfAu86W.js +1 -0
  150. package/dist/vue-ui-sparkline-DuX09S8A.js +1 -0
  151. package/dist/vue-ui-sparkstackbar-vXOpiyrI.js +1 -0
  152. package/dist/vue-ui-stackbar-DsrwNY0p.js +29 -0
  153. package/dist/vue-ui-stackline-e7EYZet7.js +39 -0
  154. package/dist/vue-ui-strip-plot-2DxzeUXU.js +2 -0
  155. package/dist/vue-ui-table-B344jLaG.js +14 -0
  156. package/dist/vue-ui-table-heatmap-BwoRcqFD.js +1 -0
  157. package/dist/vue-ui-table-sparkline-itq8yRCe.js +1 -0
  158. package/dist/vue-ui-thermometer-BSRjS7l3.js +1 -0
  159. package/dist/vue-ui-timer-DM-urc2D.js +64 -0
  160. package/dist/vue-ui-tiremarks-CbIOAO3F.js +1 -0
  161. package/dist/vue-ui-treemap-Cgal4H5O.js +1 -0
  162. package/dist/vue-ui-waffle-BZFI7JLd.js +1 -0
  163. package/dist/vue-ui-wheel-DdKm_Vd8.js +1 -0
  164. package/dist/vue-ui-word-cloud-D40vUb5e.js +4 -0
  165. package/dist/vue-ui-world-BseI3A0C.js +19 -0
  166. package/dist/vue-ui-xy-Bl-DUFcf.js +27 -0
  167. package/dist/vue-ui-xy-DNVd3FPA.js +31 -0
  168. package/dist/vue-ui-xy-canvas-CRSisgSA.js +9 -0
  169. package/dist/vue_ui_3d_bar-Dm8zmL8w.js +1 -0
  170. package/dist/vue_ui_age_pyramid-DXJeenVU.js +1 -0
  171. package/dist/vue_ui_bullet-Biewiy1l.js +1 -0
  172. package/dist/vue_ui_bump-DZoGcET0.js +1 -0
  173. package/dist/vue_ui_candlestick-DpPpEElM.js +1 -0
  174. package/dist/vue_ui_chestnut-BKcntsvv.js +1 -0
  175. package/dist/vue_ui_chord-Crjq1pgV.js +1 -0
  176. package/dist/vue_ui_circle_pack-DarCZyF2.js +1 -0
  177. package/dist/vue_ui_dag-B-4OxeQQ.js +1 -0
  178. package/dist/vue_ui_donut-B2W2nyAS.js +1 -0
  179. package/dist/vue_ui_donut_evolution-BvIyBtun.js +1 -0
  180. package/dist/vue_ui_dumbbell-DyyFLbhQ.js +1 -0
  181. package/dist/vue_ui_flow-aeVlnSsc.js +1 -0
  182. package/dist/vue_ui_funnel-CWrEr790.js +1 -0
  183. package/dist/vue_ui_galaxy-DvaSrGxT.js +1 -0
  184. package/dist/vue_ui_gauge-Brc1-auP.js +1 -0
  185. package/dist/vue_ui_geo-COGanKF8.js +1 -0
  186. package/dist/vue_ui_graph-31AYnh4c.js +1 -0
  187. package/dist/vue_ui_heatmap-Q8YMKNq2.js +1 -0
  188. package/dist/vue_ui_hill-Dbv_VVlr.js +1 -0
  189. package/dist/vue_ui_history_plot-C0kFJh-f.js +1 -0
  190. package/dist/vue_ui_horizontal_bar-uuJ0_9O6.js +1 -0
  191. package/dist/vue_ui_label-D3BzxTFQ.js +1 -0
  192. package/dist/vue_ui_molecule-VokyVu8q.js +1 -0
  193. package/dist/vue_ui_mood_radar-i6r1Gp6v.js +1 -0
  194. package/dist/vue_ui_nested_donuts-BAb9o0Ro.js +1 -0
  195. package/dist/vue_ui_onion-BMjwCChN.js +1 -0
  196. package/dist/vue_ui_parallel_coordinate_plot-Wb2Xmpjs.js +1 -0
  197. package/dist/vue_ui_quadrant-DbLNBD92.js +1 -0
  198. package/dist/vue_ui_quick_chart-KljadV9E.js +1 -0
  199. package/dist/vue_ui_radar-Pd3xOzjc.js +1 -0
  200. package/dist/vue_ui_relation_circle-BLo4XQFQ.js +1 -0
  201. package/dist/vue_ui_ridgeline-BIaWjw_v.js +1 -0
  202. package/dist/vue_ui_rings-C0puwNW1.js +1 -0
  203. package/dist/vue_ui_scatter-4as114Wa.js +1 -0
  204. package/dist/vue_ui_spark_trend-BgPQfeCz.js +1 -0
  205. package/dist/vue_ui_sparkbar-CvcZ5nwT.js +1 -0
  206. package/dist/vue_ui_sparkgauge-D3xirz2w.js +1 -0
  207. package/dist/vue_ui_sparkhistogram-E6G1761_.js +1 -0
  208. package/dist/vue_ui_sparkline-DKZdnbap.js +1 -0
  209. package/dist/vue_ui_sparkstackbar-DZX34uPS.js +1 -0
  210. package/dist/vue_ui_stackbar-BrAzeA3Y.js +1 -0
  211. package/dist/vue_ui_stackline-B6ylXHBJ.js +1 -0
  212. package/dist/vue_ui_strip_plot-uxKGttVC.js +1 -0
  213. package/dist/vue_ui_table_heatmap-DVMDsaVJ.js +1 -0
  214. package/dist/vue_ui_table_sparkline-BQO5A9u8.js +1 -0
  215. package/dist/vue_ui_thermometer-BAFdvXZW.js +1 -0
  216. package/dist/vue_ui_tiremarks-LwElhY5p.js +1 -0
  217. package/dist/vue_ui_treemap-JB0DfAmd.js +1 -0
  218. package/dist/vue_ui_waffle-BVf3Wcda.js +1 -0
  219. package/dist/vue_ui_wheel-bdYAONK7.js +1 -0
  220. package/dist/vue_ui_word_cloud-Dn2Ffjxb.js +1 -0
  221. package/dist/vue_ui_xy-BfaXjpvS.js +1 -0
  222. package/dist/vue_ui_xy_canvas-cQVme5sy.js +1 -0
  223. package/package.json +9 -9
  224. package/dist/BaseDraggableDialog-BK7dj9O6.js +0 -1
  225. package/dist/BaseZoomControls-JSk9zW3D.js +0 -1
  226. package/dist/ColorPicker-CwYfNvwH.js +0 -1
  227. package/dist/PenAndPaper-DoNTA-SV.js +0 -1
  228. package/dist/SlicerPreview-ChKbdZSU.js +0 -1
  229. package/dist/XyAnalysisOptions-CV22ga_a.js +0 -1
  230. package/dist/package-CXaebsLV.js +0 -1
  231. package/dist/resolveChartConfig-CIhClE5R.js +0 -1
  232. package/dist/useConfig-C3FbHv4N.js +0 -1
  233. package/dist/vue-data-ui-O-w339Ac.js +0 -1
  234. package/dist/vue-ui-3d-bar-CcFFARyq.js +0 -19
  235. package/dist/vue-ui-age-pyramid-Di6fKV6f.js +0 -1
  236. package/dist/vue-ui-annotator-sBGtsgcb.js +0 -331
  237. package/dist/vue-ui-bullet-BZLa1xj7.js +0 -34
  238. package/dist/vue-ui-bump-BSdpAH0l.js +0 -8
  239. package/dist/vue-ui-candlestick-BKZASgq9.js +0 -22
  240. package/dist/vue-ui-carousel-table-B20E2K8A.js +0 -1
  241. package/dist/vue-ui-chestnut-DavvzmiQ.js +0 -1
  242. package/dist/vue-ui-chord-D2Hn54i7.js +0 -21
  243. package/dist/vue-ui-circle-pack-BKaS-zWo.js +0 -13
  244. package/dist/vue-ui-cursor-BUOHKNmb.js +0 -1
  245. package/dist/vue-ui-dag-SLYPxbGo.js +0 -9
  246. package/dist/vue-ui-dashboard-Bgt7VLv0.js +0 -1
  247. package/dist/vue-ui-donut-8ZWyXEVs.js +0 -22
  248. package/dist/vue-ui-donut-DBcB8Ym1.js +0 -47
  249. package/dist/vue-ui-donut-evolution-D3lo74Ce.js +0 -2
  250. package/dist/vue-ui-dumbbell-CdarkL8Z.js +0 -9
  251. package/dist/vue-ui-flow-B0dYxGWT.js +0 -3
  252. package/dist/vue-ui-funnel-C0Cl9jMd.js +0 -1
  253. package/dist/vue-ui-galaxy-C_UWOQn4.js +0 -1
  254. package/dist/vue-ui-gauge-B94ToHlW.js +0 -1
  255. package/dist/vue-ui-geo-V-JmJgKS.js +0 -1
  256. package/dist/vue-ui-gizmo-BvVDEnNu.js +0 -1
  257. package/dist/vue-ui-heatmap-DWtbocz5.js +0 -1
  258. package/dist/vue-ui-hill-BH_lYm5G.js +0 -1
  259. package/dist/vue-ui-history-plot-DkWvta0h.js +0 -2
  260. package/dist/vue-ui-horizontal-bar-DbJ1DFjG.js +0 -4
  261. package/dist/vue-ui-molecule-BrG8K2Tm.js +0 -1
  262. package/dist/vue-ui-mood-radar-DEpFpfiW.js +0 -1
  263. package/dist/vue-ui-nested-donuts-CZetOzaq.js +0 -19
  264. package/dist/vue-ui-onion-DvyAxUSj.js +0 -5
  265. package/dist/vue-ui-parallel-coordinate-plot-Bdakcv3w.js +0 -9
  266. package/dist/vue-ui-quadrant-CWZeQjHE.js +0 -2
  267. package/dist/vue-ui-quick-chart-BULxPrPs.js +0 -16
  268. package/dist/vue-ui-radar-CJ_5G0QP.js +0 -1
  269. package/dist/vue-ui-rating-QcJoab0i.js +0 -1
  270. package/dist/vue-ui-relation-circle-Vetly6f0.js +0 -1
  271. package/dist/vue-ui-ridgeline-5a87TiQf.js +0 -2
  272. package/dist/vue-ui-rings-CKuFf5vA.js +0 -1
  273. package/dist/vue-ui-scatter-C2hNg3ED.js +0 -9
  274. package/dist/vue-ui-sparkbar-DFShNanl.js +0 -1
  275. package/dist/vue-ui-sparkhistogram-DwDcqqEj.js +0 -1
  276. package/dist/vue-ui-sparkline-kxl5wQGY.js +0 -1
  277. package/dist/vue-ui-sparkstackbar-CHjaAWVJ.js +0 -1
  278. package/dist/vue-ui-stackbar-BrtUg-Mb.js +0 -29
  279. package/dist/vue-ui-stackline-CU2UkEJU.js +0 -39
  280. package/dist/vue-ui-strip-plot-BmEpoIoU.js +0 -2
  281. package/dist/vue-ui-table-Ddg209i0.js +0 -14
  282. package/dist/vue-ui-table-heatmap-B8AdX6Nq.js +0 -1
  283. package/dist/vue-ui-table-sparkline-B62l_ODH.js +0 -1
  284. package/dist/vue-ui-thermometer-CvxyfTWE.js +0 -1
  285. package/dist/vue-ui-timer-BkNtid9A.js +0 -64
  286. package/dist/vue-ui-tiremarks-BE0nbuHp.js +0 -1
  287. package/dist/vue-ui-treemap-B9wAoh5g.js +0 -1
  288. package/dist/vue-ui-waffle-DqeBiuY3.js +0 -1
  289. package/dist/vue-ui-wheel---NZaS40.js +0 -1
  290. package/dist/vue-ui-word-cloud-DRFGFVmf.js +0 -4
  291. package/dist/vue-ui-world-D5gKzypf.js +0 -19
  292. package/dist/vue-ui-xy-Caj8jz6D.js +0 -31
  293. package/dist/vue-ui-xy-CcVIXfL_.js +0 -27
  294. package/dist/vue-ui-xy-canvas-BceSG3AO.js +0 -9
  295. package/dist/vue_ui_3d_bar-DmAve5Ri.js +0 -1
  296. package/dist/vue_ui_age_pyramid-CL0Ef8Ov.js +0 -1
  297. package/dist/vue_ui_bullet-CwVYkpjd.js +0 -1
  298. package/dist/vue_ui_bump-KJL9GYr4.js +0 -1
  299. package/dist/vue_ui_candlestick-DKvha_Ab.js +0 -1
  300. package/dist/vue_ui_chestnut-BxxivKN7.js +0 -1
  301. package/dist/vue_ui_chord-Fq6VBRT1.js +0 -1
  302. package/dist/vue_ui_circle_pack-CfXkXi7v.js +0 -1
  303. package/dist/vue_ui_dag-1b_dLSym.js +0 -1
  304. package/dist/vue_ui_donut-T5PeOqvf.js +0 -1
  305. package/dist/vue_ui_donut_evolution-CVoh3twl.js +0 -1
  306. package/dist/vue_ui_dumbbell-BMcxK0N3.js +0 -1
  307. package/dist/vue_ui_flow-kvV56Es9.js +0 -1
  308. package/dist/vue_ui_funnel-CaEV5hG7.js +0 -1
  309. package/dist/vue_ui_galaxy-B94QInxc.js +0 -1
  310. package/dist/vue_ui_gauge-BJhb6yqE.js +0 -1
  311. package/dist/vue_ui_geo-DL1SMQHp.js +0 -1
  312. package/dist/vue_ui_graph-B1ACwQj7.js +0 -1
  313. package/dist/vue_ui_heatmap-kh5NMmwf.js +0 -1
  314. package/dist/vue_ui_hill-DQi4pQCG.js +0 -1
  315. package/dist/vue_ui_history_plot-soyqUW4Y.js +0 -1
  316. package/dist/vue_ui_horizontal_bar-C4ulIxeT.js +0 -1
  317. package/dist/vue_ui_label-dtPqyFsj.js +0 -1
  318. package/dist/vue_ui_molecule-Bw1UW1Na.js +0 -1
  319. package/dist/vue_ui_mood_radar-CXaBdJnv.js +0 -1
  320. package/dist/vue_ui_nested_donuts-CRtGsJcz.js +0 -1
  321. package/dist/vue_ui_onion-C9BedU_-.js +0 -1
  322. package/dist/vue_ui_parallel_coordinate_plot-Cs_xXAG5.js +0 -1
  323. package/dist/vue_ui_quadrant-BUv-SqzP.js +0 -1
  324. package/dist/vue_ui_quick_chart-BRfcRW6Z.js +0 -1
  325. package/dist/vue_ui_radar-68iK9Fam.js +0 -1
  326. package/dist/vue_ui_relation_circle-Dkv-cSB6.js +0 -1
  327. package/dist/vue_ui_ridgeline-Di26JtQu.js +0 -1
  328. package/dist/vue_ui_rings-BcDDXHpQ.js +0 -1
  329. package/dist/vue_ui_scatter-C50uFYQL.js +0 -1
  330. package/dist/vue_ui_spark_trend-BOM3zo64.js +0 -1
  331. package/dist/vue_ui_sparkbar-Bpx7QrFq.js +0 -1
  332. package/dist/vue_ui_sparkgauge-D2Hk6bvS.js +0 -1
  333. package/dist/vue_ui_sparkhistogram-ChwOkoMb.js +0 -1
  334. package/dist/vue_ui_sparkline-CvL_e9L8.js +0 -1
  335. package/dist/vue_ui_sparkstackbar-Chtog7hC.js +0 -1
  336. package/dist/vue_ui_stackbar-BkBIi_bL.js +0 -1
  337. package/dist/vue_ui_stackline-D7b63K84.js +0 -1
  338. package/dist/vue_ui_strip_plot-CwMowrhT.js +0 -1
  339. package/dist/vue_ui_table_heatmap-vfeY6r97.js +0 -1
  340. package/dist/vue_ui_table_sparkline-Dlfbza49.js +0 -1
  341. package/dist/vue_ui_thermometer-CRijq6H6.js +0 -1
  342. package/dist/vue_ui_tiremarks-8HFfABNF.js +0 -1
  343. package/dist/vue_ui_treemap-Bv4Rdl5_.js +0 -1
  344. package/dist/vue_ui_waffle-BbBLSluB.js +0 -1
  345. package/dist/vue_ui_wheel-C-479bvJ.js +0 -1
  346. package/dist/vue_ui_word_cloud-DBiJtSyL.js +0 -1
  347. package/dist/vue_ui_xy-CJBM9F6W.js +0 -1
  348. package/dist/vue_ui_xy_canvas-CT-FN9rU.js +0 -1
@@ -0,0 +1,22 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{t as s}from"./annotationViewport-X8fvs7pz.js";import{n as ee,t as c}from"./tableIntegration-CNoJ1CIY.js";import{$ as l,D as te,Dt as ne,Jt as re,Qt as ie,X as ae,Yt as oe,_ as se,_t as ce,at as u,b as d,c as le,gt as ue,in as de,nt as fe,pt as pe,rn as me,t as he,wt as ge,zt as _e}from"./lib-rPeBMZrn.js";import{n as ve,t as ye}from"./useHints-C-TwxM0Y.js";import{t as be}from"./useConfig-_JwRfIqE.js";import{t as xe}from"./useSvgLabelLayout-42Kats14.js";import{n as Se,r as Ce,t as we}from"./useTimeLabels-Das5O74F.js";import{t as Te}from"./usePrinter-DVf3YcG5.js";import{n as Ee,t as De}from"./BaseScanner-8NdoBs7B.js";import{t as Oe}from"./useNestedProp-DnGoh-XS.js";import{t as ke}from"./useResponsive-CENUxfEL.js";import{t as Ae}from"./useThemeCheck-BKNRbGeC.js";import{t as je}from"./useChartExport-BZts4KFb.js";import{t as Me}from"./useTransitions-ChGGrtrv.js";import{t as Ne}from"./useUserOptionState-CXlFnwPv.js";import{t as Pe}from"./useChartAccessibility-DOMuYJfm.js";import{t as Fe}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Ie}from"./img-D4RQwASc.js";import{n as Le}from"./Title-BliHuXfT.js";import{t as Re}from"./vue_ui_candlestick-DpPpEElM.js";import{t as ze}from"./A11yDataTable-DWNlWXzs.js";import{t as Be}from"./SlicerPreview-0m9E7Zh_.js";import{t as Ve}from"./DefGrad-DKMq1REY.js";import{t as He}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as f,computed as p,createBlock as Ue,createCommentVNode as m,createElementBlock as h,createElementVNode as g,createSlots as We,createTextVNode as Ge,createVNode as Ke,defineAsyncComponent as qe,guardReactiveProps as Je,mergeProps as Ye,nextTick as Xe,normalizeClass as _,normalizeProps as Ze,normalizeStyle as Qe,onBeforeUnmount as $e,onMounted as et,openBlock as v,ref as y,renderList as b,renderSlot as x,resolveDynamicComponent as tt,shallowRef as nt,toDisplayString as rt,toRefs as it,unref as S,watch as at,watchEffect as ot,withCtx as C}from"vue";var st=/* @__PURE__ */ e({default:()=>Ht}),ct=[`id`],lt=[`id`],ut={style:{position:`relative`}},dt=[`xmlns`,`aria-describedby`,`viewBox`],ft=[`x`,`y`,`width`,`height`],pt={key:1},mt={key:0},ht=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],gt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],_t=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],vt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],yt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],bt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],xt=[`transform`,`text-anchor`,`font-size`,`fill`,`font-weight`],St=[`transform`,`text-anchor`,`font-size`,`fill`,`font-weight`],Ct=[`transform`,`text-anchor`,`font-size`,`fill`,`stroke`,`font-weight`],wt=[`x`,`y`,`width`,`height`,`fill`,`rx`],Tt={key:0},Et=[`cx`,`cy`,`r`,`fill`],Dt=[`cx`,`cy`,`r`,`fill`],Ot={key:1},kt=[`x`,`y`,`width`,`height`,`rx`,`fill`],At=[`x`,`y`,`width`,`height`,`fill`,`rx`],jt=[`x`,`y`,`height`,`width`,`fill`,`rx`],Mt=[`x`,`y`,`height`,`width`,`fill`,`rx`,`stroke`,`stroke-width`],Nt=[`d`,`stroke`],Pt=[`x`,`y`,`height`,`width`,`fill`,`onMouseover`,`onMouseleave`,`onClick`],Ft=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],It=[`data-start`,`data-end`],Lt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Rt={key:5,class:`vue-data-ui-watermark`},zt=[`d`,`stroke`],Bt=[`d`,`stroke`,`stroke-width`],Vt=[`innerHTML`],Ht=/*#__PURE__*/ He({__name:`vue-ui-candlestick`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},selectedXIndex:{type:Number,default:void 0},zoomState:{type:Object,default:null}},emits:[`selectX`,`zoomStart`,`zoomEnd`,`zoomReset`,`update:zoomState`,`copyAlt`],setup(e,{expose:He,emit:st}){let Ht=qe(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Ut=qe(()=>import(`./Tooltip-C1q0Qoh7.js`)),Wt=qe(()=>import(`./vue-ui-accordion-DxGxf-Rm.js`).then(e=>e.n)),Gt=qe(()=>import(`./DataTable-KeuZB1JM.js`)),Kt=qe(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),qt=qe(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Jt=qe(()=>import(`./PackageVersion-ksOit8fp.js`).then(e=>e.t)),Yt=qe(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_candlestick:Xt}=be(),{isThemeValid:Zt,warnInvalidTheme:Qt}=Ae(),w=e,T=st,$t=p(()=>!!w.dataset&&w.dataset.length),E=y(!1),en=y(!1),tn=0,nn=y(null),D=y(ae()),rn=y(!1),an=y(``),O=y(void 0),on=y(0),k=y(null),sn=y(null),cn=y(null),ln=y(null),un=y(null),dn=y(null),fn=y(0),pn=y(0),mn=y(0),hn=y(null),gn=y(null),_n=y(null),vn=y(null),yn=y(null),A=y(null),bn=y({x:0,y:0}),xn=y(`pointer`),Sn=y(!1),j=y(Mn()),M=p(()=>j.value.style.layout.candle),N=p(()=>j.value.style.layout.grid),P=p(()=>j.value.style.layout),F=p(()=>j.value.style),I=p(()=>j.value.userOptions);ve({config:()=>j.value,dataset:()=>w.dataset,component:`VueUiCandlestick`,rules:[ye.emptyArray,{test:e=>e.length>200,message:[`👀 Dataset has > 200 points, which can cause performance issues. Consider:`,``,`▶️ Adding date inputs to constraint the dataset into a specific timeframe`,``,`▶️ Aggregate the data to larger time series to reduce the number of datapoints.`]}]});let{transitionEnabled:Cn}=Me({config:()=>j.value.transitions,dataset:()=>w.dataset}),wn=p(()=>j.value.userOptions.useCursorPointer),Tn=p(()=>de({defaultConfig:{useCssAnimation:!1,userOptions:{show:!1},table:{show:!1},style:{backgroundColor:`#99999930`,layout:{candle:{colors:{bearish:`#BABABA`,bullish:`#CACACA`}},grid:{stroke:`#6A6A6A`,verticalLines:{stroke:`#6A6A6A`},horizontalLines:{stroke:`#6A6A6A`},yAxis:{dataLabels:{show:!1},scale:{min:null,max:null}}},wick:{stroke:`#6A6A6A`,extremity:{color:`#6A6A6A`}}},tooltip:{show:!1},zoom:{show:!1,startIndex:null,endIndex:null}}},userConfig:j.value.skeletonConfig??{}})),{loading:L,FINAL_DATASET:R,manualLoading:En}=Ee({...it(w),FINAL_CONFIG:j,prepareConfig:Mn,callback:()=>{Promise.resolve().then(async()=>{await Xr()})},skeletonDataset:w.config?.skeletonDataset??[[17040672e5,10,20,2,10,30],[17067456e5,10,30,5,20,50],[17092512e5,20,50,10,30,80],[17119296e5,30,80,20,50,130],[17145216e5,50,130,30,100,210],[17172e8,80,210,50,150,340],[1719792e6,130,340,80,280,550],[17224704e5,210,550,130,450,890],[17251488e5,340,890,210,750,1440],[17277408e5,550,1440,340,1230,2330],[17304192e5,890,2330,550,1950,3770],[17330112e5,1440,3770,890,3200,5100]],skeletonConfig:de({defaultConfig:j.value,userConfig:Tn.value})}),{userOptionsVisible:Dn,setUserOptionsVisibility:On,keepUserOptionState:kn}=Ne({config:j.value}),{svgRef:z}=Pe({config:F.value.title});function An(){On(!0)}function jn(){On(!1),T(`selectX`,{seriesIndex:null,datapoint:null}),O.value=null}function Mn(){let e=Oe({userConfig:w.config,defaultConfig:Xt}),t={};w.config&&ge(w.config,`style.layout.grid.xAxis.dataLabels.showFirstAndLast`)&&(e.style.layout.grid.xAxis.dataLabels.showFirstAndLast=!!w.config.style.layout.grid.xAxis.dataLabels.showFirstAndLast);let n=e.theme;if(n){if(!Zt.value(e))Qt(e),t=e;else{let r=Oe({userConfig:Re[n]||w.config,defaultConfig:e});t={...Oe({userConfig:w.config,defaultConfig:r})}}}else t=e;return t}let Nn=ie(w.config);at(()=>w.config,(e,t)=>{let n=ie(e),r=n!==Nn;Nn=n;let i=Mn();r?(L.value||(j.value=Mn()),Dn.value=!j.value.userOptions.showOnChartHover,Ln(),fn.value+=1,mn.value+=1,pn.value+=1,V.value.showTable=j.value.table.show,V.value.showTooltip=F.value.tooltip.show,dr()):(j.value.style.tooltip=i.style.tooltip,V.value.showTooltip=j.value.style.tooltip.show)},{deep:!0}),at(()=>w.dataset,e=>{Array.isArray(e)&&e.length>0&&(En.value=!1),Kr()},{deep:!0});let B=y({height:F.value.height,width:F.value.width,xAxisFontSize:N.value.xAxis.dataLabels.fontSize,yAxisFontSize:N.value.yAxis.dataLabels.fontSize}),Pn=nt(null),Fn=nt(null);et(()=>{Ln()});let In=p(()=>j.value.debug);function Ln(){_e(w.dataset)&&(u({componentName:`VueUiCandlestick`,type:`dataset`,debug:In.value}),En.value=!0),_e(w.dataset)||(En.value=j.value.loading),setTimeout(()=>{E.value=!0},10),j.value.responsive&&(Pn.value&&(Fn.value&&Pn.value.unobserve(Fn.value),Pn.value.disconnect()),Pn.value=new ResizeObserver(()=>{E.value=!1;let{width:e,height:t}=ke({chart:k.value,title:F.value.title.text?sn.value:null,slicer:F.value.zoom.show&&W.value>6?ln.value.$el:null,legend:cn.value,source:un.value,noTitle:dn.value});cancelAnimationFrame(tn),tn=requestAnimationFrame(()=>{B.value.width=e,B.value.height=t-12,en.value=!0,j.value.responsiveProportionalSizing?(B.value.xAxisFontSize=me({relator:Math.min(e,t),adjuster:F.value.width,source:N.value.xAxis.dataLabels.fontSize,threshold:6,fallback:6}),B.value.yAxisFontSize=me({relator:Math.min(e,t),adjuster:F.value.width,source:N.value.yAxis.dataLabels.fontSize,threshold:6,fallback:6})):(B.value.xAxisFontSize=N.value.xAxis.dataLabels.fontSize,B.value.yAxisFontSize=N.value.yAxis.dataLabels.fontSize),nn.value&&clearTimeout(nn.value),nn.value=setTimeout(()=>{E.value=!0},10)})}),Fn.value=k.value.parentNode,Pn.value.observe(Fn.value)),Xr()}$e(()=>{cancelAnimationFrame(tn),Pn.value&&(Fn.value&&Pn.value.unobserve(Fn.value),Pn.value.disconnect())});let{isPrinting:Rn,isImaging:zn,generatePdf:Bn,generateImage:Vn}=Te({elementId:`vue-ui-candlestick_${D.value}`,fileName:F.value.title.text||`vue-ui-candlestick`,options:j.value.userOptions.print}),Hn=p(()=>j.value.userOptions.show&&!F.value.title.text),V=y({showTable:j.value.table.show,showTooltip:F.value.tooltip.show}),{metrics:Un,ready:Wn,settling:H,update:Gn}=xe({svgRef:z,canMeasure:()=>(!j.value.responsive||en.value)&&(!N.value.xAxis.dataLabels.show||Er.value),initialMetrics:{scaleLabelsWidth:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:hn.value?e(hn.value).textWidth:N.value.yAxis.dataLabels.offsetX,timeLabelsHeight:e(gn.value).height})}),Kn=p(()=>gn.value?Un.value.timeLabelsHeight+B.value.xAxisFontSize:0),qn=p(()=>N.value.yAxis.position===`right`);function Jn(){let e=Un.value.scaleLabelsWidth,t=N.value.yAxis.axisName?.show?N.value.yAxis.axisName.fontSize+N.value.yAxis.axisName.offsetX:0,n=e+13+t;return{left:qn.value?0:n,right:qn.value?n:0,scaleLabelsWidth:e,yAxisNameWidth:t,crosshair:13}}let U=p(()=>{let{top:e,right:t,bottom:n,left:r}=P.value.padding,i=Jn();return{top:e+12,right:B.value.width-t-i.right,left:r+i.left,bottom:B.value.height-n-Kn.value,width:B.value.width-r-t-i.left-i.right,height:B.value.height-e-n-Kn.value-12,scaleLabelsWidth:i.scaleLabelsWidth,yAxisNameWidth:i.yAxisNameWidth,crosshair:i.crosshair}}),Yn=p(()=>{let{left:e,top:t,width:n,height:r}=U.value,i=G.value.start,a=G.value.end-i,o=n/a,s=K.value.start-i,ee=K.value.end-i,c=Math.max(0,Math.min(a,s)),l=Math.max(0,Math.min(a,ee));return{x:e+c*o,y:t,width:(l-c)*o,height:r,fill:F.value.zoom.preview.fill,stroke:F.value.zoom.preview.stroke,"stroke-width":F.value.zoom.preview.strokeWidth,"stroke-dasharray":F.value.zoom.preview.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:{pointerEvents:`none`,transition:`none !important`,animation:`none !important`}}}),W=p(()=>R.value.length),G=y({start:0,end:W.value}),K=y({start:0,end:W.value}),Xn=y(!1),Zn=y(!1),Qn=y(null),q=y(null),J=y(null),$n=y(!1),er=y({time:0,x:0,y:0,pointerType:null}),tr=p(()=>F.value.zoom?.dragToZoom),Y=p(()=>tr.value.show&&$t.value&&Jr.value&&W.value>1&&!L.value),nr=null,rr={},ir=p(()=>F.value.zoom.preview.enable&&(K.value.start!==G.value.start||K.value.end!==G.value.end));function ar(e,t){K.value[e]=t}function or(e,t=G.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 sr(e){let t=or(e);t&&T(`update:zoomState`,t)}function cr(){nr&&=(cancelAnimationFrame(nr),null),rr={}}function lr(e){let t=or(e);if(!t)return null;let{start:n,end:r}=t;return(n!==Number(G.value.start)||r!==Number(G.value.end))&&(cr(),G.value={start:n,end:r},K.value={start:n,end:r},dr()),{start:Number(G.value.start),end:Number(G.value.end)}}function ur(e){let t=lr(e);return t?(T(`update:zoomState`,t),t):null}function dr(){let e=Math.max(0,Math.min(G.value.start??0,W.value-1)),t=Math.max(e+1,Math.min(G.value.end??W.value,W.value));(!Number.isFinite(e)||!Number.isFinite(t)||t<=e)&&(e=0,t=W.value),G.value.start=e,G.value.end=t,K.value.start=e,K.value.end=t,ln.value&&ln.value.setRangeValues(e,t)}let fr=p(()=>R.value.map((e,t)=>({...e,absoluteIndex:t}))),pr=p(()=>fr.value.slice(G.value.start,G.value.end)),mr=p(()=>(In.value&&R.value.forEach((e,t)=>{[null,void 0].includes(e[0])&&u({componentName:`VueUiCandlestick`,type:`datasetAttribute`,property:`period (index 0)`,index:t}),[null,void 0].includes(e[1])&&u({componentName:`VueUiCandlestick`,type:`datasetAttribute`,property:`open (index 1)`,index:t}),[null,void 0].includes(e[2])&&u({componentName:`VueUiCandlestick`,type:`datasetAttribute`,property:`high (index 2)`,index:t}),[null,void 0].includes(e[3])&&u({componentName:`VueUiCandlestick`,type:`datasetAttribute`,property:`low (index 3)`,index:t}),[null,void 0].includes(e[4])&&u({componentName:`VueUiCandlestick`,type:`datasetAttribute`,property:`close (index 4)`,index:t}),[null,void 0].includes(e[5])&&u({componentName:`VueUiCandlestick`,type:`datasetAttribute`,property:`volume (index 5)`,index:t})}),pr.value.map(e=>({absoluteIndex:e.absoluteIndex,period:e[0],open:e[1],high:e[2],low:e[3],close:e[4],volume:e[5]})))),hr=p(()=>fr.value.map(e=>({absoluteIndex:e.absoluteIndex,period:e[0],open:e[1],high:e[2],low:e[3],close:e[4],volume:e[5]}))),X=p(()=>U.value.width/pr.value.length),gr=p(()=>{let e={o:-1/0,h:-1/0,l:-1/0},t={o:1/0,h:1/0,l:1/0},n=-1/0,r=1/0;for(let i of mr.value)e.o=Math.max(e.o,i.open),e.h=Math.max(e.h,i.high),e.l=Math.max(e.l,i.low),t.o=Math.min(t.o,i.open),t.h=Math.min(t.h,i.high),t.l=Math.min(t.l,i.low),n=Math.max(n,i.volume),r=Math.min(r,i.volume);return e.c=e.l,t.c=t.l,{max:e,min:t,volumeMax:n,volumeMin:r}}),_r=p(()=>({max:N.value.yAxis.scale.max===null?gr.value.max.h:N.value.yAxis.scale.max,min:N.value.yAxis.scale.min===null?0:N.value.yAxis.scale.min})),Z=p(()=>se(_r.value.min,_r.value.max,N.value.yAxis.dataLabels.steps));function vr(e,t,n=null,r=null){return{...e,x:d(U.value.left+t*X.value+X.value/2),y:d(U.value.top+(1-(e-Z.value.min)/(Z.value.max-Z.value.min))*U.value.height),value:d(e),isMax:e===n,isMin:e===r}}let Q=p(()=>{let{max:e,min:t,volumeMax:n,volumeMin:r}=gr.value;return mr.value.map((i,a)=>{let o=vr(i.open,a,e.o,t.o),s=vr(i.high,a,e.h,t.h),ee=vr(i.low,a,e.l,t.l),c=vr(i.close,a,e.c,t.c),l=i.close>i.open,te=i.volume===n,ne=i.volume===r;return{period:i.period,open:o,high:s,low:ee,close:c,volume:i.volume,isBullish:l,absoluteIndex:i.absoluteIndex,isMaxVolume:te,isMinVolume:ne}})}),yr=p(()=>{let e=-1/0;for(let t of R.value)e=Math.max(e,t[2]);return e});function br({item:e,index:t,minimapH:n,unitW:r,min:i,max:a}){return{...e,x:d(t*r),y:d((1-(e-i)/(a-i))*n),value:d(e)}}let xr=p(()=>{let e=hr.value,t=N.value.yAxis.scale.min??0,n=N.value.yAxis.scale.max??yr.value,r,i,a;return({minimapH:o,unitW:s})=>(a&&r===o&&i===s||(r=o,i=s,a=e.map((e,r)=>{let i=br({item:e.open,index:r,minimapH:o,unitW:s,min:t,max:n}),a=br({item:e.high,index:r,minimapH:o,unitW:s,min:t,max:n}),ee=br({item:e.low,index:r,minimapH:o,unitW:s,min:t,max:n}),c=br({item:e.close,index:r,minimapH:o,unitW:s,min:t,max:n}),l=e.close>e.open;return{period:e.period,open:i,high:a,low:ee,close:c,volume:e.volume,isBullish:l,absoluteIndex:e.absoluteIndex}})),a)}),Sr=p(()=>F.value.zoom.minimap.show?[{name:``,series:R.value.map(e=>e[2]),color:`#000000`,isVisible:!0}]:[]);function Cr(e){return d((e-Z.value.min)/(Z.value.max-Z.value.min))}let wr=p(()=>Z.value.ticks.map(e=>({y:U.value.bottom-U.value.height*Cr(e),value:d(e)}))),Tr=p(()=>mr.value.map(e=>e.period)),$=y([]),Er=y(!1),Dr=y([]),Or=0;ot(()=>{let e=++Or;(async()=>{let t=await we({values:R.value.map(e=>e[0]),maxDatapoints:R.value.length,formatter:N.value.xAxis.dataLabels.datetimeFormatter,start:G.value.start,end:G.value.end});e===Or&&($.value=t,Er.value=!0)})()});let kr=0;ot(()=>{let e=++kr;(async()=>{let t=await we({values:R.value.map(e=>e[0]),maxDatapoints:R.value.length,formatter:N.value.xAxis.dataLabels.datetimeFormatter,start:0,end:W.value});e===kr&&(Dr.value=t)})()});let Ar=y({months:[],shortMonths:[],days:[],shortDays:[]}),jr=0;ot(()=>{let e=++jr,t=N.value.xAxis.dataLabels.datetimeFormatter;(async()=>{let n=await Ce(t.locale).catch(()=>Ce(`en`));e===jr&&(Ar.value=n.data)})()});let Mr=p(()=>{let e=N.value.xAxis.dataLabels.datetimeFormatter,t=Se({useUTC:e.useUTC,locale:Ar.value,januaryAsYear:e.januaryAsYear});return(e,n)=>{let r=R.value.map(e=>e[0])?.[e];return r==null?``:t.formatDate(new Date(r),n)}}),Nr=p(()=>(R.value.map(e=>e[0])||[]).map((e,t)=>({text:Mr.value(t,F.value.tooltip.timeFormat),absoluteIndex:t}))),Pr=p(()=>(R.value.map(e=>e[0])||[]).map((e,t)=>({text:Mr.value(t,F.value.zoom.timeFormat),absoluteIndex:t}))),Fr=p(()=>($.value||[]).map(e=>e?.text??``)),Ir=p(()=>(Dr.value||[]).map(e=>e?.text??``)),Lr=p(()=>{let e=Math.max(1,Math.floor(Number(N.value.xAxis.dataLabels.modulo)||1)),t=Fr.value,n=Ir.value,r=G.value.start??0,i=r>0||t.length<n.length;return ue({configuredModulo:e,visibleTexts:t,allTexts:n,startAbs:r,isZoomed:i})}),Rr=p(()=>{let e=N.value.xAxis.dataLabels,t=G.value.start??0,n=O.value,r=W.value,i=Fr.value,a=Ir.value,o=le(!!e.showOnlyFirstAndLast,!!e.showOnlyAtModulo,Lr.value,i,a,t,n,r);if(!e.showFirstAndLast||e.showOnlyFirstAndLast||!o.length)return o;let s=o.length-1;return o.map((e,t)=>t!==0&&t!==s?e:{...e,text:i[t]??``})}),zr=p(()=>N.value.xAxis.dataLabels.datetimeFormatter.enable?{start:$.value.find(e=>e.absoluteIndex===G.value.start)?.text??``,end:$.value.find(e=>e.absoluteIndex===G.value.end-1)?.text??``}:{start:R.value[G.value.start]?R.value[G.value.start][0]:R.value[0][0],end:R.value[G.value.end-1]?R.value[G.value.end-1][0]:R.value.at(-1)[0]}),Br=y(null);function Vr(e,t){j.value.events.datapointClick&&j.value.events.datapointClick({datapoint:t,seriesIndex:e+G.value.start})}function Hr(e,t){j.value.events.datapointLeave&&j.value.events.datapointLeave({datapoint:t,seriesIndex:e+G.value.start}),O.value=void 0,rn.value=!1,A.value=null,xn.value=`pointer`}at(()=>w.selectedXIndex,e=>{if([null,void 0].includes(w.selectedXIndex)){O.value=null;return}let t=e-G.value.start;t<0||e>=G.value.end?O.value=null:O.value=t??null},{immediate:!0});function Ur(e,t,n=`pointer`){j.value.events.datapointEnter&&j.value.events.datapointEnter({datapoint:t,seriesIndex:e+G.value.start}),O.value=e,A.value=e,xn.value=n,Br.value={datapoint:t,seriesIndex:e,series:Q.value,config:j.value},Ii({seriesIndex:e,datapoint:t});let r=F.value.tooltip.customFormat;if(ne(r)&&pe(()=>r({seriesIndex:e,datapoint:t,series:Q.value,config:j.value})))an.value=r({seriesIndex:e,datapoint:t,series:Q.value,config:j.value});else if(F.value.tooltip.show){let n=``,{period:r,open:i,high:a,low:o,close:s,volume:ee,isBullish:c}=Q.value[e],{period:te,open:ne,high:re,low:ie,close:ae,volume:oe}=j.value.translations,se=N.value.xAxis.dataLabels.datetimeFormatter.enable?F.value.tooltip.useDefaultTimeFormat?$.value[e].text:Nr.value[e].text:r;n+=`<div><svg style="margin-right:6px" viewBox="0 0 12 12" height="12" width="12"><rect x="0" y="0" height="12" width="12" rx="${M.value.borderRadius*3}" stroke="${M.value.stroke}" stroke-width="${M.value.strokeWidth}"
2
+ fill="${M.value.gradient.show?c?`url(#bullish_gradient_${D.value})`:`url(#bearish_gradient_${D.value})`:c?M.value.colors.bullish:M.value.colors.bearish}"/></svg>${se}</div>`,n+=`${oe} : <b>${isNaN(ee)?`-`:Number(ee.toFixed(F.value.tooltip.roundingValue)).toLocaleString()}</b>`,n+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${F.value.tooltip.borderColor}">`;let ce=l({p:F.value.tooltip.prefix,v:i.value,s:F.value.tooltip.suffix,r:F.value.tooltip.roundingValue}),u=l({p:F.value.tooltip.prefix,v:a.value,s:F.value.tooltip.suffix,r:F.value.tooltip.roundingValue}),d=l({p:F.value.tooltip.prefix,v:o.value,s:F.value.tooltip.suffix,r:F.value.tooltip.roundingValue}),le=l({p:F.value.tooltip.prefix,v:s.value,s:F.value.tooltip.suffix,r:F.value.tooltip.roundingValue});F.value.tooltip.showChart?n+=`<div style="width:100%;display:flex;align-items:center;justify-content:center;">
3
+ <svg viewBox="0 0 100 100" width="100px" style="background: transparent; overflow: visible">
4
+ <g>
5
+ <line x1="50" x2="50" y1="20" y2="80" stroke="${t.isBullish?M.value.colors.bullish:M.value.colors.bearish}" stroke-width="2" stroke-linecap="round" />
6
+ ${t.isBullish?`
7
+ <line x1="45" x2="50" y1="65" y2="65" stroke="${M.value.colors.bullish}" stroke-width="1.5" stroke-linecap="round" />
8
+ <line x1="50" x2="55" y1="35" y2="35" stroke="${M.value.colors.bullish}" stroke-width="1.5" stroke-linecap="round" />
9
+ <text x="38" y="70" text-anchor="end" fill="${F.value.tooltip.color}">${ce}</text>
10
+ <text x="62" y="40" text-anchor="start" fill="${F.value.tooltip.color}">${le}</text>
11
+ `:`
12
+ <line x1="45" x2="50" y1="35" y2="35" stroke="${M.value.colors.bearish}" stroke-width="1.5" stroke-linecap="round" />
13
+ <line x1="50" x2="55" y1="65" y2="65" stroke="${M.value.colors.bearish}" stroke-width="1.5" stroke-linecap="round" />
14
+ <text x="40" y="40" text-anchor="end" fill="${F.value.tooltip.color}">${ce}</text>
15
+ <text x="60" y="70" text-anchor="start" fill="${F.value.tooltip.color}">${le}</text>
16
+ `}
17
+ <text x="50" y="13" text-anchor="middle" fill="${F.value.tooltip.color}">${u}</text>
18
+ <text x="50" y="97" text-anchor="middle" fill="${F.value.tooltip.color}">${d}</text>
19
+ <g>
20
+ </svg>
21
+ <div>
22
+ `:(n+=`<div>${ne}: <b>${ce}</b></div>`,n+=`<div>${re}: <b>${u}</b></div>`,n+=`<div>${ie}: <b>${d}</b></div>`,n+=`<div>${ae}: <b>${le}</b></div>`),n+=`</div>`,an.value=`<div style="text-align:right">${n}</div>`}rn.value=!0}let Wr=y(null);function Gr(){return new Promise(e=>requestAnimationFrame(()=>requestAnimationFrame(()=>e())))}$e(()=>{Wr.value&&cancelAnimationFrame(Wr.value),cr(),Ei()});async function Kr({force:e=!1,publish:t=!1}={}){let n=!e;Xr(n),await Xe(),Wr.value&&cancelAnimationFrame(Wr.value),Wr.value=requestAnimationFrame(async()=>{await Gr(),Xr(n),Wr.value=null,t&&(sr({start:Number(G.value.start),end:Number(G.value.end)}),T(`zoomReset`))})}let qr=y(!1),Jr=y(!1),Yr=y(!1);at([()=>w.zoomState,Jr],([e,t])=>{t&&e&&lr(e)},{deep:!0,immediate:!0});function Xr(e=!0){if(!qr.value){qr.value=!0;try{let{startIndex:t,endIndex:n}=F.value.zoom,r=W.value,i=t??0,a=n==null?r:Math.min(Zr(n+1,i),r);Yr.value=!0,G.value.start=i,G.value.end=a,K.value.start=i,K.value.end=a,dr(),Jr.value=!0,e&&w.zoomState&&lr(w.zoomState)}finally{queueMicrotask(()=>{Yr.value=!1}),qr.value=!1}}}function Zr(e,t=G.value.start){let n=W.value,r=Number(t);return e>n?n:e<0||e<=r?Math.min(r+1,n):e}function Qr(e=null){Xe(()=>{let t=[j.value.translations.period,j.value.translations.open,j.value.translations.high,j.value.translations.low,j.value.translations.close,j.value.translations.volume],n=Q.value.map((e,t)=>[N.value.xAxis.dataLabels.datetimeFormatter.enable?$.value[t].text:e.period,e.open.value,e.high.value,e.low.value,e.close.value,e.volume]),r=[[F.value.title.text],[F.value.title.subtitle.text],[[``],[``],[``]],t].concat(n),i=te(r);e?e(i):fe({csvContent:i,title:F.value.title.text||`vue-ui-candlestick`})})}let $r=p(()=>{let e=Q.value.map((e,t)=>{let n=N.value.xAxis.dataLabels.datetimeFormatter.enable?$.value?.[t]?.text??``:e.period,r=l({p:j.value.table.td.prefix,v:e.open.value,s:j.value.table.td.suffix,r:j.value.table.td.roundingValue}),i=l({p:j.value.table.td.prefix,v:e.high.value,s:j.value.table.td.suffix,r:j.value.table.td.roundingValue}),a=l({p:j.value.table.td.prefix,v:e.low.value,s:j.value.table.td.suffix,r:j.value.table.td.roundingValue}),o=l({p:j.value.table.td.prefix,v:e.close.value,s:j.value.table.td.suffix,r:j.value.table.td.roundingValue});return[`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" height="12" width="12" style="margin-right: 6px"><rect x="0" y="0" height="12" width="12" rx="${M.value.borderRadius*3}" fill="${M.value.gradient.show?e.isBullish?`url(#bullish_gradient_${D.value})`:`url(#bearish_gradient_${D.value})`:e.isBullish?M.value.colors.bullish:M.value.colors.bearish}"/></svg> ${n}`,r,i,a,o,`${isNaN(e.volume)?`-`:e.volume.toLocaleString()}`]}),t=Q.value.map((e,t)=>[N.value.xAxis.dataLabels.datetimeFormatter.enable?$.value?.[t]?.text??``:e.period,l({p:j.value.table.td.prefix,v:e.open.value,s:j.value.table.td.suffix,r:j.value.table.td.roundingValue}),l({p:j.value.table.td.prefix,v:e.high.value,s:j.value.table.td.suffix,r:j.value.table.td.roundingValue}),l({p:j.value.table.td.prefix,v:e.low.value,s:j.value.table.td.suffix,r:j.value.table.td.roundingValue}),l({p:j.value.table.td.prefix,v:e.close.value,s:j.value.table.td.suffix,r:j.value.table.td.roundingValue}),`${isNaN(e.volume)?`-`:e.volume}`]),n={th:{backgroundColor:j.value.table.th.backgroundColor,color:j.value.table.th.color,outline:j.value.table.th.outline},td:{backgroundColor:j.value.table.td.backgroundColor,color:j.value.table.td.color,outline:j.value.table.td.outline},breakpoint:j.value.table.responsiveBreakpoint},r=[j.value.translations.period,j.value.translations.open,j.value.translations.high,j.value.translations.low,j.value.translations.last,j.value.translations.volume];return{head:r,body:e,bodyA11y:t,config:n,colNames:r}}),ei=y(!1);function ti(e){ei.value=e,on.value+=1}function ni(){V.value.showTable=!V.value.showTable}function ri(){V.value.showTooltip=!V.value.showTooltip}let ii=y(!1);function ai(){ii.value=!ii.value}async function oi({scale:e=2}={}){if(!k.value)return;let{imageUri:t,base64:n}=await Ie({domElement:k.value,base64:!0,img:!0,scale:e}),r=k.value.getBoundingClientRect(),i={width:r.width,height:r.height,aspectRatio:r.height?r.width/r.height:0},a=await ce(t,e)??i;return{imageUri:t,base64:n,title:F.value.title.text,...a}}let si=p(()=>B.value.width),ci=p(()=>B.value.height);Fe({timeLabelsEls:gn,timeLabels:$,slicer:G,configRef:j,rotationPath:[`style`,`layout`,`grid`,`xAxis`,`dataLabels`,`rotation`],autoRotatePath:[`style`,`layout`,`grid`,`xAxis`,`dataLabels`,`autoRotate`,`enable`],isAutoSize:!1,rotation:N.value.xAxis.dataLabels.autoRotate.angle,width:si,height:ci}),at(j,()=>{V.value={showTable:j.value.table.show,showTooltip:F.value.tooltip.show}},{immediate:!0});let li=p(()=>c({config:j,style:F,mutableConfig:V,dialog:Yt,accordion:Wt,isFullscreen:ei,parent:k,maxWidth:800,isCursorPointer:wn}));at(()=>V.value.showTable,e=>ee(e,j,_n));function ui(){V.value.showTable=!1,vn.value&&vn.value.setTableIconState(!1)}let di=p(()=>F.value.backgroundColor),fi=p(()=>F.value.title),{isCallbackImaging:pi,isCallbackSvg:mi,generateSvg:hi,onGenerateImage:gi}=je({svg:z,title:fi,legend:null,legendItems:null,backgroundColor:di,getSvgCallback:()=>j.value.userOptions.callbacks.svg,generateImage:Vn});function _i(e){yn.value=e}function vi(e){rr={...rr,...e},nr&&cancelAnimationFrame(nr),nr=requestAnimationFrame(()=>{let e={...G.value,...rr};rr={},nr=null,G.value=e,K.value={...e},dr(),sr({start:Number(G.value.start),end:Number(G.value.end)})})}function yi(e){if(qr.value||Yr.value)return;let t=Number(e);Number.isFinite(t)&&(T(`zoomStart`,{index:t,isZoom:t!==0}),t!==G.value.start&&vi({start:t}))}function bi(e){if(qr.value||Yr.value)return;let t=rr.start===void 0?G.value.start:rr.start,n=Zr(Number(e),t);Number.isFinite(n)&&(T(`zoomEnd`,{index:n,isZoom:n!==W.value}),(n!==G.value.end||rr.start!==void 0)&&vi({end:n}))}function xi(e){let t=z.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,ee=(n.height-o)/2;return{x:(e.clientX-n.left-s)/i+r.x,y:(e.clientY-n.top-ee)/i+r.y}}let Si=p(()=>!Xn.value||Qn.value==null||q.value==null?null:{x:Math.min(Qn.value,q.value),y:U.value.top,width:Math.abs(q.value-Qn.value),height:U.value.height}),Ci=p(()=>Jr.value?Number(G.value.start)!==0||Number(G.value.end)!==Number(W.value):!1);function wi(e){return Math.min(Math.max(e,U.value.left),U.value.right)}function Ti(){O.value=void 0,A.value=null,xn.value=`pointer`,rn.value=!1,yn.value=null}function Ei(e){let t=e?.pointerId==null?J.value:e.pointerId;t!=null&&z.value?.hasPointerCapture?.(t)&&z.value.releasePointerCapture(t),Xn.value=!1,Qn.value=null,q.value=null,J.value=null}function Di(){$n.value=!0,setTimeout(()=>{$n.value=!1},0)}function Oi(e){$n.value&&($n.value=!1,e.preventDefault(),e.stopPropagation())}function ki(e){if(!Y.value||!Ci.value||!e)return!1;let t=Date.now(),n=e.pointerType||`mouse`,r=er.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?(er.value={time:0,x:0,y:0,pointerType:null},Di(),Ei(e),Kr({force:!0,publish:!0}),!0):(er.value={time:t,x:e.clientX,y:e.clientY,pointerType:n},!1)}function Ai(e){let t=Number(G.value.end)-Number(G.value.start);if(t<=0||!Number.isFinite(X.value)||X.value<=0)return null;let n=Math.floor((wi(e)-U.value.left)/X.value);return Math.max(0,Math.min(t-1,n))}function ji(e,t){let n=Ai(e),r=Ai(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(G.value.start)+i,end:Number(G.value.start)+a+1}}function Mi(e){let t=ur(e);return t?(T(`zoomStart`,{index:t.start,isZoom:t.start!==0}),T(`zoomEnd`,{index:t.end,isZoom:t.end!==W.value}),t):null}function Ni(e){if(!Y.value||ii.value||e.button!==void 0&&e.button!==0||J.value!=null&&e.pointerId!==J.value)return;let t=xi(e);if(!t)return;let{left:n,right:r,top:i,bottom:a}=U.value;if(t.x<n||t.x>r||t.y<i||t.y>a||Number(G.value.end)-Number(G.value.start)<=1)return;Zn.value=!0,z.value?.focus?.({preventScroll:!0}),Ti();let o=wi(t.x);J.value=e.pointerId,Xn.value=!0,Qn.value=o,q.value=o}function Pi(e){if(!Y.value||!Xn.value||J.value!=null&&e.pointerId!==J.value)return;let t=xi(e);t&&(q.value=wi(t.x),Ti(),Qn.value!=null&&Math.abs(q.value-Qn.value)>=2&&!z.value?.hasPointerCapture?.(e.pointerId)&&z.value?.setPointerCapture?.(e.pointerId))}function Fi(e){if(!Y.value||!Xn.value||J.value!=null&&e.pointerId!==J.value)return;let t=xi(e);t&&(q.value=wi(t.x));let n=Qn.value,r=q.value;if((n==null||r==null?0:Math.abs(r-n))<Math.max(4,U.value.width*.01)){if(ki(e))return;Ei(e);return}let i=ji(Math.min(n,r),Math.max(n,r));i?(Ei(e),Mi(i)&&(er.value={time:0,x:0,y:0,pointerType:null},Ti(),Di())):Ei(e)}function Ii({seriesIndex:e,datapoint:t}){let n=G.value.start+e;T(`selectX`,{dataset:t,index:n,indexLabel:``})}async function Li(){T(`copyAlt`,{config:j.value,dataset:Q.value}),j.value.userOptions.callbacks.altCopy?await Promise.resolve(j.value.userOptions.callbacks.altCopy({config:j.value,dataset:Q.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Ri(){A.value=null,Sn.value=!0}function zi(){Zn.value=!1,A.value=null,xn.value=`pointer`,rn.value=!1,O.value=void 0,Sn.value=!1}function Bi(e){if(!z.value||ii.value||document.activeElement!==z.value||(Zn.value=!1,!Q.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(Y.value&&(Ci.value||Xn.value)){Ei(),Kr({force:!0,publish:!0});return}A.value=null,xn.value=`pointer`,rn.value=!1,O.value=void 0;return}if(r){if(A.value===null)return;let e=Q.value[A.value];if(!e)return;Vr(A.value,e);return}let a=A.value,o=O.value,s=a!==null&&a>=0&&a<Q.value.length,ee=o!=null&&o>=0&&o<Q.value.length;s?n?(a+=1,a>=Q.value.length&&(a=0)):t&&(--a,a<0&&(a=Q.value.length-1)):ee?(a=n?o+1:o-1,a>=Q.value.length&&(a=0),a<0&&(a=Q.value.length-1)):a=n?0:Q.value.length-1;let c=Q.value[a];c&&(Vi(a),Ur(a,c,`keyboard`))}function Vi(e){if(!Number.isFinite(e)||!z.value)return;let t=U.value.left+X.value*e+X.value/2,n=U.value.top+U.value.height/2,r=z.value.getBoundingClientRect();bn.value={x:r.left+t/B.value.width*r.width,y:r.top+n/B.value.height*r.height}}let Hi=p(()=>({headers:$r.value?.colNames??[],rows:$r.value?.bodyA11y??[]}));He({getImage:oi,generatePdf:Bn,generateCsv:Qr,generateImage:Vn,generateSvg:hi,toggleTable:ni,toggleTooltip:ri,toggleAnnotator:ai,toggleFullscreen:ti,copyAlt:Li,resetZoom:()=>Kr({force:!0,publish:!0}),setZoomState:ur}),at(()=>[B.value,N.value,j.value.style.fontFamily,w.dataset,G.value.start,G.value.end,$.value,Er.value,en.value,hn.value,gn.value],Gn,{flush:`post`,deep:!0});let Ui=p(()=>s({enabled:I.value?.annotator?.followZoom,area:U.value,range:G.value,ticks:wr.value}));return(e,s)=>(v(),h(`div`,{ref_key:`candlestickChart`,ref:k,class:_(`vue-data-ui-component vue-ui-candlestick ${ei.value?`vue-data-ui-wrapper-fullscreen`:``} ${j.value.useCssAnimation?``:`vue-ui-dna`}`),style:Qe(`position:relative;font-family:${F.value.fontFamily}; text-align:center;background:${F.value.backgroundColor}; ${j.value.responsive?`height: 100%`:``}`),id:`vue-ui-candlestick_${D.value}`,onMouseenter:An,onMouseleave:jn},[g(`div`,{id:`chart-instructions-${D.value}`,class:`sr-only`},[g(`p`,null,rt(j.value.a11y.translations.keyboardNavigation),1)],8,lt),Hi.value?.rows?.length?(v(),Ue(ze,{key:0,uid:D.value,head:Hi.value.headers,body:Hi.value.rows,notice:j.value.a11y.translations.tableAvailable,caption:j.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):m(``,!0),I.value.buttons.annotator?(v(),Ue(S(Kt),Ye({key:1},S(a)(I.value.annotator),{svgRef:S(z),followZoom:I.value?.annotator?.followZoom,annotationViewport:Ui.value,backgroundColor:F.value.backgroundColor,color:F.value.color,active:ii.value,isCursorPointer:wn.value,palette:I.value.annotatorPalette,onClose:ai}),We({_:2},[b(S(o),t=>({name:t,fn:C(n=>[x(e.$slots,t,Ze(Je(S(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):m(``,!0),Hn.value?(v(),h(`div`,{key:2,ref_key:`noTitle`,ref:dn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):m(``,!0),F.value.title.text?(v(),h(`div`,{key:3,ref_key:`chartTitle`,ref:sn,style:`width:100%;background:transparent`},[(v(),Ue(Le,{key:`title_${mn.value}`,config:{title:{cy:`candlestick-div-title`,...F.value.title},subtitle:{cy:`candlestick-div-subtitle`,...F.value.title.subtitle}}},null,8,[`config`]))],512)):m(``,!0),I.value.show&&$t.value&&(S(kn)||S(Dn))?(v(),Ue(S(qt),Ye({ref_key:`userOptionsRef`,ref:vn,key:`user_options_${on.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isImaging:S(zn),isPrinting:S(Rn),uid:D.value,hasTooltip:I.value.buttons.tooltip&&F.value.tooltip.show,isFullscreen:ei.value,isTooltip:V.value.showTooltip,chartElement:k.value},S(n)(I.value,`pdf csv img svg table fullscreen altCopy annotator`),{isAnnotation:ii.value,tableDialog:j.value.table.useDialog,isCursorPointer:wn.value,onToggleFullscreen:ti,onGeneratePdf:S(Bn),onGenerateCsv:Qr,onGenerateImage:S(gi),onGenerateSvg:S(hi),onToggleTable:ni,onToggleTooltip:ri,onToggleAnnotator:ai,onCopyAlt:Li,style:{visibility:S(kn)?S(Dn)?`visible`:`hidden`:`visible`}}),We({_:2},[b(S(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:C(n=>[x(e.$slots,t,Ze(Je(S(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isImaging`,`isPrinting`,`uid`,`hasTooltip`,`isFullscreen`,`isTooltip`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):m(``,!0),g(`div`,ut,[(v(),h(`svg`,{ref_key:`svgRef`,ref:z,xmlns:S(he),"aria-describedby":`chart-instructions-${D.value}`,class:_({"vue-data-ui-fullscreen--on":ei.value,"vue-data-ui-fulscreen--off":!ei.value,"vue-data-ui-no-transition":!S(Cn)||S(H),"vue-ui-candlestick-chart-zoom-pointer-focus":Y.value&&Zn.value}),viewBox:`0 0 ${B.value.width<=0?10:B.value.width} ${B.value.height<=0?10:B.value.height}`,style:Qe({maxWidth:`100%`,visibility:S(Wn)?`visible`:`hidden`,overflow:`visible`,background:`transparent`,color:F.value.color,cursor:Y.value?Xn.value?`col-resize`:`crosshair`:void 0,touchAction:Y.value?`pan-y`:void 0,userSelect:Y.value?`none`:void 0}),tabindex:`0`,onFocus:Ri,onBlur:zi,onKeydown:Bi,onPointerdown:Ni,onPointermove:Pi,onPointerup:Fi,onPointercancel:Ei,onClickCapture:Oi},[Ke(S(Jt)),x(e.$slots,`svg-underlayer`,{svg:{...B.value,data:Q.value,drawingArea:U.value,isPrintingImg:S(Rn)||S(zn)||S(pi),isPrintingSvg:S(mi)}},void 0,!0),e.$slots[`chart-background`]?(v(),h(`foreignObject`,{key:0,x:U.value.left,y:U.value.top,width:Math.max(.1,U.value.width),height:Math.max(.1,U.value.height),style:{pointerEvents:`none`}},[x(e.$slots,`chart-background`,{},void 0,!0)],8,ft)):m(``,!0),Q.value.length>0?(v(),h(`g`,pt,[g(`defs`,null,[Ke(Ve,{t:`linear`,id:`bearish_gradient_${D.value}`,x2:`0%`,y2:`100%`,stops:[[`0%`,M.value.colors.bearish,1],[`50%`,S(oe)(M.value.colors.bearish,.02),.87],[`100%`,S(oe)(M.value.colors.bearish,.05),.4]]},null,8,[`id`,`stops`]),Ke(Ve,{t:`linear`,id:`bullish_gradient_${D.value}`,x2:`0%`,y2:`100%`,stops:[[`0%`,M.value.colors.bullish,1],[`50%`,S(oe)(M.value.colors.bullish,.02),.87],[`100%`,S(oe)(M.value.colors.bullish,.05),.4]]},null,8,[`id`,`stops`])]),N.value.show?(v(),h(`g`,mt,[g(`line`,{x1:qn.value?U.value.right:U.value.left,x2:qn.value?U.value.right:U.value.left,y1:U.value.top,y2:U.value.bottom,stroke:N.value.stroke,"stroke-width":N.value.strokeWidth,"stroke-linecap":`round`},null,8,ht),g(`line`,{x1:U.value.left,x2:U.value.right,y1:U.value.bottom,y2:U.value.bottom,stroke:N.value.stroke,"stroke-width":N.value.strokeWidth,"stroke-linecap":`round`},null,8,gt),N.value.horizontalLines.show?(v(!0),h(f,{key:0},b(wr.value,e=>(v(),h(`line`,{x1:U.value.left,x2:U.value.right,y1:e.y,y2:e.y,stroke:N.value.horizontalLines.stroke,"stroke-width":N.value.horizontalLines.strokeWidth,"stroke-dasharray":N.value.horizontalLines.strokeDasharray,"stroke-linecap":`round`},null,8,_t))),256)):m(``,!0),N.value.verticalLines.show?(v(!0),h(f,{key:1},b(Rr.value,(e,t)=>(v(),h(`g`,null,[e.text?(v(),h(`line`,{key:0,x1:U.value.left+X.value*t+X.value/2,x2:U.value.left+X.value*t+X.value/2,y1:U.value.top,y2:U.value.bottom,stroke:N.value.verticalLines.stroke,"stroke-width":N.value.verticalLines.strokeWidth,"stroke-dasharray":N.value.verticalLines.strokeDasharray,"stroke-linecap":`round`},null,8,vt)):m(``,!0)]))),256)):m(``,!0),N.value.xAxis.ticks.show?(v(!0),h(f,{key:2},b(Rr.value,(e,t)=>(v(),h(`g`,null,[e.text?(v(),h(`line`,{key:0,x1:U.value.left+X.value*t+X.value/2,x2:U.value.left+X.value*t+X.value/2,y1:U.value.bottom,y2:U.value.bottom+3,stroke:N.value.stroke,"stroke-width":N.value.strokeWidth,"stroke-linecap":`round`},null,8,yt)):m(``,!0)]))),256)):m(``,!0)])):m(``,!0),N.value.yAxis.dataLabels.show?(v(),h(`g`,{key:1,ref_key:`scaleLabels`,ref:hn},[(v(!0),h(f,null,b(wr.value,(e,t)=>(v(),h(`g`,{key:`sl_${t}`},[e.value>=Z.value.min&&e.value<=Z.value.max?(v(),h(`line`,{key:0,x1:qn.value?U.value.right:U.value.left,x2:qn.value?U.value.right+5:U.value.left-5,y1:e.y,y2:e.y,stroke:N.value.stroke,"stroke-width":N.value.strokeWidth,"stroke-linecap":`round`},null,8,bt)):m(``,!0),e.value>=Z.value.min&&e.value<=Z.value.max?(v(),h(`text`,{key:1,class:_({"vue-data-ui-transition":S(Cn)&&!S(H)}),transform:`translate(${qn.value?U.value.right+8+N.value.yAxis.dataLabels.offsetX:U.value.left-8+N.value.yAxis.dataLabels.offsetX}, ${e.y+B.value.yAxisFontSize/3})`,"text-anchor":qn.value?`start`:`end`,"font-size":B.value.yAxisFontSize,fill:N.value.yAxis.dataLabels.color,"font-weight":N.value.yAxis.dataLabels.bold?`bold`:`normal`},rt(S(l)({p:N.value.yAxis.dataLabels.prefix,v:e.value,s:N.value.yAxis.dataLabels.suffix,r:N.value.yAxis.dataLabels.roundingValue})),11,xt)):m(``,!0)]))),128))],512)):m(``,!0),N.value.xAxis.dataLabels.show&&!N.value.xAxis.dataLabels.datetimeFormatter.enable?(v(),h(`g`,{key:2,ref_key:`timeLabelsEls`,ref:gn},[(v(!0),h(f,null,b(Tr.value,(e,t)=>(v(),h(`g`,null,[g(`text`,{class:`vue-data-ui-time-label`,transform:`translate(${U.value.left+X.value*t+X.value/2}, ${U.value.bottom+B.value.xAxisFontSize*1.5}), rotate(${N.value.xAxis.dataLabels.rotation})`,"text-anchor":N.value.xAxis.dataLabels.rotation>0?`start`:N.value.xAxis.dataLabels.rotation<0?`end`:`middle`,"font-size":B.value.xAxisFontSize,fill:N.value.xAxis.dataLabels.color,"font-weight":N.value.xAxis.dataLabels.bold?`bold`:`normal`},rt(e),9,St)]))),256))],512)):m(``,!0),N.value.xAxis.dataLabels.show&&N.value.xAxis.dataLabels.datetimeFormatter.enable?(v(),h(`g`,{key:3,ref_key:`timeLabelsEls`,ref:gn},[(v(!0),h(f,null,b(Rr.value,(e,t)=>(v(),h(`g`,null,[g(`text`,{class:`vue-data-ui-time-label`,transform:`translate(${U.value.left+X.value*t+X.value/2}, ${U.value.bottom+B.value.xAxisFontSize*1.5}), rotate(${N.value.xAxis.dataLabels.rotation})`,"text-anchor":N.value.xAxis.dataLabels.rotation>0?`start`:N.value.xAxis.dataLabels.rotation<0?`end`:`middle`,"font-size":B.value.xAxisFontSize,fill:N.value.xAxis.dataLabels.color,stroke:F.value.backgroundColor,"stroke-width":`3`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"paint-order":`stroke fill`,"font-weight":N.value.xAxis.dataLabels.bold?`bold`:`normal`},rt(e?.text??``),9,Ct)]))),256))],512)):m(``,!0),j.value.type===`candlestick`?(v(),h(f,{key:4},[g(`g`,null,[(v(!0),h(f,null,b(Q.value,(e,t)=>(v(),h(`g`,null,[g(`rect`,{x:e.open.x-P.value.wick.strokeWidth/2,y:e.high.y,width:P.value.wick.strokeWidth,height:Math.abs(e.high.y-e.low.y),fill:P.value.wick.stroke,stroke:`none`,rx:P.value.wick.strokeWidth/2,class:_({"vue-data-ui-transition":E.value&&!S(L)&&!S(H)})},null,10,wt),P.value.wick.extremity.shape===`circle`?(v(),h(`g`,Tt,[g(`circle`,{cx:e.high.x,cy:e.high.y,r:P.value.wick.extremity.size===`auto`?X.value/20:P.value.wick.extremity.size,fill:P.value.wick.extremity.color,class:_({"vue-data-ui-transition":E.value&&!S(L)&&!S(H)})},null,10,Et),g(`circle`,{cx:e.low.x,cy:e.low.y,r:P.value.wick.extremity.size===`auto`?X.value/20:P.value.wick.extremity.size,fill:P.value.wick.extremity.color,class:_({"vue-data-ui-transition":E.value&&!S(L)&&!S(H)})},null,10,Dt)])):m(``,!0),P.value.wick.extremity.shape===`line`?(v(),h(`g`,Ot,[g(`rect`,{x:e.high.x-(P.value.wick.extremity.size===`auto`?X.value*P.value.candle.widthRatio:P.value.wick.extremity.size)/2,y:e.high.y-P.value.wick.strokeWidth/2,width:Math.abs(e.high.x-(P.value.wick.extremity.size===`auto`?X.value*F.value.layout.candle.widthRatio:F.value.layout.wick.extremity.size)/2-(e.high.x+(F.value.layout.wick.extremity.size===`auto`?X.value*F.value.layout.candle.widthRatio:F.value.layout.wick.extremity.size)/2)),height:P.value.wick.strokeWidth,rx:P.value.wick.strokeWidth/2,fill:P.value.wick.extremity.color,stroke:`none`,class:_({"vue-data-ui-transition":E.value&&!S(L)&&!S(H)})},null,10,kt),g(`rect`,{x:e.low.x-(P.value.wick.extremity.size===`auto`?X.value*P.value.candle.widthRatio:P.value.wick.extremity.size)/2,y:e.low.y-P.value.wick.strokeWidth/2,width:Math.abs(e.low.x-(P.value.wick.extremity.size===`auto`?X.value*F.value.layout.candle.widthRatio:F.value.layout.wick.extremity.size)/2-(e.low.x+(F.value.layout.wick.extremity.size===`auto`?X.value*F.value.layout.candle.widthRatio:F.value.layout.wick.extremity.size)/2)),height:P.value.wick.strokeWidth,fill:P.value.wick.extremity.color,stroke:`none`,rx:P.value.wick.strokeWidth/2,class:_({"vue-data-ui-transition":E.value&&!S(L)&&!S(H)})},null,10,At)])):m(``,!0)]))),256))]),g(`g`,null,[(v(!0),h(f,null,b(Q.value,(e,t)=>(v(),h(`rect`,{x:e.open.x-X.value/2+X.value*(1-M.value.widthRatio)/2,y:e.isBullish?e.close.y:e.open.y,height:Math.abs(e.close.y-e.open.y)<=0?1e-4:Math.abs(e.close.y-e.open.y),width:X.value*M.value.widthRatio<=0?1e-4:X.value*M.value.widthRatio,fill:M.value.gradient.underlayer,rx:M.value.borderRadius,stroke:`none`,class:_({"vue-data-ui-transition":E.value&&!S(L)&&!S(H)})},null,10,jt))),256)),(v(!0),h(f,null,b(Q.value,(e,t)=>(v(),h(`rect`,{x:e.open.x-X.value/2+X.value*(1-M.value.widthRatio)/2,y:e.isBullish?e.close.y:e.open.y,height:Math.abs(e.close.y-e.open.y)<=0?1e-4:Math.abs(e.close.y-e.open.y),width:X.value*M.value.widthRatio<=0?1e-4:X.value*M.value.widthRatio,fill:e.isBullish?M.value.gradient.show?`url(#bullish_gradient_${D.value})`:M.value.colors.bullish:M.value.gradient.show?`url(#bearish_gradient_${D.value})`:M.value.colors.bearish,rx:M.value.borderRadius,stroke:M.value.stroke,"stroke-width":M.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:_({"vue-data-ui-transition":E.value&&!S(L)&&!S(H)})},null,10,Mt))),256))])],64)):m(``,!0),j.value.type===`ohlc`?(v(!0),h(f,{key:5},b(Q.value,(e,t)=>(v(),h(`g`,{key:`ohlc_${e.absoluteIndex}`},[g(`path`,{d:`M ${e.high.x},${e.high.y} ${e.low.x},${e.low.y} M${e.open.x-Math.min(6,X.value/3)},${e.open.y} ${e.open.x},${e.open.y} M${e.close.x},${e.close.y} ${e.close.x+Math.min(6,X.value/3)},${e.close.y}`,stroke:e.isBullish?M.value.colors.bullish:M.value.colors.bearish,"stroke-width":1,class:_({"vue-data-ui-transition":S(Cn)&&!S(H)}),"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,Nt)]))),128)):m(``,!0),g(`g`,null,[(v(!0),h(f,null,b(Q.value,(e,t)=>(v(),h(`rect`,{x:U.value.left+t*X.value,y:U.value.top,height:U.value.height<=0?1e-4:U.value.height,width:X.value<=0?1e-4:X.value,fill:O.value===t||yn.value===t?S(re)(P.value.selector.color,P.value.selector.opacity):`transparent`,onMouseover:()=>Ur(t,e,`pointer`),onMouseleave:()=>Hr(t,e),onClick:()=>Vr(t,e)},null,40,Pt))),256))])])):m(``,!0),Si.value?(v(),h(`rect`,{key:2,x:Si.value.x,y:Si.value.y,width:Si.value.width,height:Si.value.height,fill:tr.value.selection.fill,"fill-opacity":tr.value.selection.fillOpacity,stroke:tr.value.selection.stroke,"stroke-opacity":tr.value.selection.strokeOpacity,"stroke-width":tr.value.selection.strokeWidth,"stroke-dasharray":tr.value.selection.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`},null,8,Ft)):m(``,!0),ir.value?(v(),h(`rect`,Ye({key:3},Yn.value,{"data-start":G.value.start,"data-end":G.value.end}),null,16,It)):m(``,!0),x(e.$slots,`svg`,{svg:{...B.value,data:Q.value,drawingArea:U.value,isPrintingImg:S(Rn)||S(zn)||S(pi),isPrintingSvg:S(mi)}},void 0,!0)],46,dt)),e.$slots.hint?(v(),h(`div`,Lt,[x(e.$slots,`hint`,Ze(Je({hint:j.value.a11y.translations.keyboardNavigation,isVisible:Sn.value})),void 0,!0)])):m(``,!0)]),e.$slots.watermark?(v(),h(`div`,Rt,[x(e.$slots,`watermark`,Ze(Je({isPrinting:S(Rn)||S(zn)||S(pi)||S(mi)})),void 0,!0)])):m(``,!0),F.value.zoom.show&&W.value>6&&$t.value&&Jr.value?(v(),Ue(Be,{key:6,ref_key:`chartSlicer`,ref:ln,"data-dom-to-png-ignore-layout":``,allMinimaps:Sr.value,background:F.value.zoom.color,borderColor:F.value.backgroundColor,customFormat:F.value.zoom.customFormat,cutNullValues:!1,enableRangeHandles:F.value.zoom.enableRangeHandles,enableSelectionDrag:F.value.zoom.enableSelectionDrag,end:G.value.end,focusOnDrag:F.value.zoom.focusOnDrag,focusRangeRatio:F.value.zoom.focusRangeRatio,fontSize:F.value.zoom.fontSize,immediate:!F.value.zoom.preview.enable,inputColor:F.value.zoom.color,isPreview:ir.value,labelLeft:zr.value.start||``,labelRight:zr.value.end||``,max:W.value,min:0,minimap:F.value.zoom.minimap.show?S(R).map(e=>e[2]):[],minimapCompact:F.value.zoom.minimap.compact,minimapFrameColor:F.value.zoom.minimap.frameColor,minimapIndicatorColor:F.value.zoom.minimap.indicatorColor,minimapMerged:!1,minimapSelectedColor:F.value.zoom.minimap.selectedColor,minimapSelectedColorOpacity:F.value.zoom.minimap.selectedColorOpacity,minimapSelectedIndex:O.value,minimapSelectionRadius:1,preciseLabels:Pr.value,refreshEndPoint:F.value.zoom.endIndex===null?W.value:F.value.zoom.endIndex+1,refreshStartPoint:F.value.zoom.startIndex===null?0:F.value.zoom.startIndex,selectColor:F.value.zoom.highlightColor,selectedSeries:S(R),smoothMinimap:!1,start:G.value.start,textColor:F.value.color,timeLabels:Dr.value,usePreciseLabels:N.value.xAxis.dataLabels.datetimeFormatter.enable&&!F.value.zoom.useDefaultFormat,useResetSlot:F.value.zoom.useResetSlot,valueEnd:G.value.end,valueStart:G.value.start,verticalHandles:F.value.zoom.minimap.verticalHandles,minScale:N.value.yAxis.scale.min,maxScale:N.value.yAxis.scale.max,maxWidth:F.value.zoom.maxWidth,minimapLeftInsetRatio:B.value.width>0&&F.value.zoom.autoFit?U.value.left/B.value.width:null,minimapRightInsetRatio:B.value.width>0&&F.value.zoom.autoFit?(B.value.width-U.value.right)/B.value.width:null,additionalMinimapHeight:F.value.zoom.minimap.additionalHeight,handleType:F.value.zoom.minimap.handleType,handleIconColor:F.value.zoom.minimap.handleIconColor,handleBorderWidth:F.value.zoom.minimap.handleBorderWidth,handleBorderColor:F.value.zoom.minimap.handleBorderColor,handleFill:F.value.zoom.minimap.handleFill,handleWidth:F.value.zoom.minimap.handleWidth,"onUpdate:end":bi,"onUpdate:start":yi,onTrapMouse:_i,onReset:s[0]||=()=>Kr({force:!0,publish:!0}),onFutureEnd:s[1]||=e=>ar(`end`,e),onFutureStart:s[2]||=e=>ar(`start`,e)},{"reset-action":C(({reset:t})=>[x(e.$slots,`reset-action`,Ze(Je({reset:t})),void 0,!0)]),slotMap:C(({height:e,unitW:t})=>[(v(!0),h(f,null,b(xr.value({minimapH:e,unitW:t}),(e,n)=>(v(),h(`g`,null,[g(`path`,{d:`M ${e.high.x},${e.high.y} ${e.low.x},${e.low.y}`,stroke:e.isBullish?M.value.colors.bullish:M.value.colors.bearish,"stroke-width":1,style:Qe({opacity:n>=K.value.start&&n<=K.value.end?1:.6})},null,12,zt),g(`path`,{d:`M ${e.open.x},${e.open.y} ${e.close.x},${e.close.y}`,stroke:e.isBullish?M.value.colors.bullish:M.value.colors.bearish,"stroke-width":Math.min(6,t/1.5),style:Qe({opacity:n>=K.value.start&&n<=K.value.end?1:.6})},null,12,Bt)]))),256))]),_:3},8,/* @__PURE__ */ `allMinimaps.background.borderColor.customFormat.enableRangeHandles.enableSelectionDrag.end.focusOnDrag.focusRangeRatio.fontSize.immediate.inputColor.isPreview.labelLeft.labelRight.max.minimap.minimapCompact.minimapFrameColor.minimapIndicatorColor.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectedIndex.preciseLabels.refreshEndPoint.refreshStartPoint.selectColor.selectedSeries.start.textColor.timeLabels.usePreciseLabels.useResetSlot.valueEnd.valueStart.verticalHandles.minScale.maxScale.maxWidth.minimapLeftInsetRatio.minimapRightInsetRatio.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth`.split(`.`))):m(``,!0),g(`div`,{ref_key:`chartLegend`,ref:cn},[x(e.$slots,`legend`,{legend:Q.value},void 0,!0)],512),e.$slots.source?(v(),h(`div`,{key:7,ref_key:`source`,ref:un,dir:`auto`},[x(e.$slots,`source`,{},void 0,!0)],512)):m(``,!0),Ke(S(Ut),{teleportTo:F.value.tooltip.teleportTo,show:V.value.showTooltip&&rn.value,backgroundColor:F.value.tooltip.backgroundColor,color:F.value.tooltip.color,borderRadius:F.value.tooltip.borderRadius,borderColor:F.value.tooltip.borderColor,borderWidth:F.value.tooltip.borderWidth,fontSize:F.value.tooltip.fontSize,backgroundOpacity:F.value.tooltip.backgroundOpacity,position:F.value.tooltip.position,offsetX:F.value.tooltip.offsetX,offsetY:F.value.tooltip.offsetY,parent:k.value,content:an.value,isFullscreen:ei.value,isCustom:F.value.tooltip.customFormat&&typeof F.value.tooltip.customFormat==`function`,smooth:F.value.tooltip.smooth,backdropFilter:F.value.tooltip.backdropFilter,smoothForce:F.value.tooltip.smoothForce,smoothSnapThreshold:F.value.tooltip.smoothSnapThreshold,isA11yMode:xn.value===`keyboard`,a11yPosition:bn.value},{"tooltip-before":C(()=>[x(e.$slots,`tooltip-before`,Ze(Je({...Br.value})),void 0,!0)]),tooltip:C(()=>[x(e.$slots,`tooltip`,Ze(Je({...Br.value})),void 0,!0)]),"tooltip-after":C(()=>[x(e.$slots,`tooltip-after`,Ze(Je({...Br.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),$t.value&&I.value.buttons.table?(v(),Ue(tt(li.value.component),Ye({key:8},li.value.props,{ref_key:`tableUnit`,ref:_n,onClose:ui}),We({content:C(()=>[(v(),Ue(S(Gt),{key:`table_${pn.value}`,colNames:$r.value.colNames,head:$r.value.head,body:$r.value.body,config:$r.value.config,title:j.value.table.useDialog?``:li.value.title,withCloseButton:!j.value.table.useDialog,isCursorPointer:wn.value,onClose:ui},{th:C(({th:e})=>[Ge(rt(e),1)]),td:C(({td:e})=>[g(`div`,{innerHTML:e},null,8,Vt)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[j.value.table.useDialog?{name:`title`,fn:C(()=>[Ge(rt(li.value.title),1)]),key:`0`}:void 0,j.value.table.useDialog?{name:`actions`,fn:C(()=>[g(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:s[3]||=e=>Qr(I.value.callbacks.csv),style:Qe({cursor:wn.value?`pointer`:`default`})},[Ke(S(Ht),{name:`fileCsv`,stroke:li.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):m(``,!0),x(e.$slots,`skeleton`,{},()=>[S(L)?(v(),Ue(De,{key:0})):m(``,!0)],!0)],46,ct))}},[[`__scopeId`,`data-v-73f6d497`]]);export{st as n,Ht as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{D as i,Jt as ee,X as a,at as o,nt as te,zt as s}from"./lib-rPeBMZrn.js";import{n as ne,t as re}from"./useHints-C-TwxM0Y.js";import{t as ie}from"./useConfig-_JwRfIqE.js";import{t as ae}from"./usePrinter-DVf3YcG5.js";import{t as oe}from"./useNestedProp-DnGoh-XS.js";import{t as se}from"./useUserOptionState-CXlFnwPv.js";import{t as ce}from"./usePrefersMotion-XLHwega2.js";import{t as le}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as c,computed as l,createBlock as ue,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createSlots as de,createTextVNode as p,defineAsyncComponent as fe,guardReactiveProps as pe,mergeProps as m,nextTick as me,normalizeClass as he,normalizeProps as ge,normalizeStyle as h,onBeforeUnmount as g,onMounted as _,openBlock as v,ref as y,renderList as b,renderSlot as x,shallowRef as _e,toDisplayString as S,unref as C,useSlots as ve,watch as w,withCtx as ye}from"vue";var be=/* @__PURE__ */ e({default:()=>T}),xe=[`id`],Se=[`aria-labelledby`],Ce=[`id`],we=[`height`],Te=[`id`],Ee=[`data-cell`,`aria-label`,`height`],De={key:2,ref:`source`,dir:`auto`},T=/*#__PURE__*/ le({__name:`vue-ui-carousel-table`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:le,emit:be}){let T=fe(()=>import(`./vue-ui-skeleton-BLyh-ESb.js`).then(e=>e.n)),Oe=fe(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),{vue_ui_carousel_table:ke}=ie(),E=ce(),D=e,Ae=be,O=y(a()),je=y(!1),k=y(!!D.dataset),Me=ve();_(()=>{Ne()});let A=l({get:()=>Le(),set:e=>e}),j=l(()=>A.value.debug);_(()=>{Me[`chart-background`]&&j.value&&console.warn(`VueUiCarouselTable does not support the #chart-background slot.`)});function Ne(){s(D.dataset)?o({componentName:`VueUiCarouselTable`,type:`dataset`,debug:j.value}):((!D.dataset.head||s(D.dataset.head))&&(o({componentName:`VueUiCarouselTable`,type:`datasetAttribute`,property:`head`,debug:j.value}),k.value=!1),(!D.dataset.body||s(D.dataset.body))&&(o({componentName:`VueUiCarouselTable`,type:`datasetAttribute`,property:`body`,debug:j.value}),k.value=!1)),E.value&&(A.value.userOptions.buttons.animation=!1)}ne({config:()=>A.value,dataset:()=>D.dataset,component:`VueUiCarouselTable`,rules:[re.noHint]});let Pe=l(()=>A.value.userOptions.useCursorPointer),{userOptionsVisible:M,setUserOptionsVisibility:Fe,keepUserOptionState:Ie}=se({config:A.value});function Le(){return oe({userConfig:D.config,defaultConfig:ke})}w(()=>D.config,e=>{A.value=Le(),M.value=!A.value.userOptions.showOnChartHover,Ne()},{deep:!0}),w(()=>D.dataset,e=>{U()},{deep:!0});let{isPrinting:Re,isImaging:ze,generatePdf:Be,generateImage:Ve}=ae({elementId:`carousel-table_${O.value}`,fileName:A.value.caption.text||`vue-ui-carousel-table`,options:A.value.userOptions.print}),N=y({showAnimation:A.value.animation.use}),P=y(null),He=y(null),F=y(null),I=y(null),L=y(0),R=y(0),z=y(!1),B=y(null),V=y(null),H=y(0);function U(){B.value&&(V.value={elements:B.value.getElementsByTagName(`tr`),heights:Array.from(B.value.getElementsByTagName(`tr`)).map(e=>e.getBoundingClientRect().height)})}_(U);let Ue=l(()=>!V.value||!V.value.heights.length?0:Math.max(...V.value.heights)+L.value+R.value),We=l(()=>D.dataset.body?A.value.tbody.tr.visible<=D.dataset.body.length?A.value.tbody.tr.visible:D.dataset.body.length:0),Ge=l(()=>(A.value.tbody.tr.height+A.value.tbody.tr.td.padding.top+A.value.tbody.tr.td.padding.bottom+A.value.tbody.tr.border.size*2)*We.value+L.value+R.value),W=y(0),G=y(null),K=y(0),q=y(!1),Ke=y(0);_(()=>{F.value&&(L.value=F.value.getBoundingClientRect().height),I.value&&(R.value=I.value.getBoundingClientRect().height),N.value.showAnimation&&V.value&&Je()}),_(()=>{if(P.value){let e=P.value.querySelector(`thead`),t=Array.from(B.value.querySelectorAll(`tr`));function n(){let n=e.getBoundingClientRect().bottom;t.forEach(e=>{e.getBoundingClientRect().top<n?e.style.visibility=`hidden`:e.style.visibility=`visible`})}P.value.addEventListener(`scroll`,n),n(),g(()=>{P.value.removeEventListener(`scroll`,n)})}});function qe(e){je.value=e,Ke.value+=1}function Je(){E.value||!G.value&&!q.value&&(A.value.animation.type===`scroll`?G.value=requestAnimationFrame(J):G.value=requestAnimationFrame(Xe))}function Ye(){if(!P.value)return!1;let{scrollTop:e,scrollHeight:t,clientHeight:n}=P.value;return e+n>=t}function J(e){q.value||(K.value||=e,e-K.value>=A.value.animation.speedMs&&(W.value+=V.value.heights[H.value],(Ye()||H.value>=V.value.heights.length)&&(W.value=0,H.value=-1),H.value+=1,P.value&&P.value.scrollTo({top:W.value,behavior:`smooth`}),K.value=e),G.value=requestAnimationFrame(J))}function Xe(e){if(q.value)return;K.value||=e;let t=e-K.value,n=A.value.animation.speedMs/4/1e3;t>=n&&(W.value+=n,W.value>=P.value.scrollHeight-P.value.clientHeight&&(W.value=0),P.value&&P.value.scrollTo({top:W.value,behavior:`auto`}),K.value=e),G.value=requestAnimationFrame(Xe)}function Y(){q.value=!0,cancelAnimationFrame(G.value),G.value=null}g(Y);function X(){q.value&&N.value.showAnimation&&(q.value=!1,K.value=0,Je())}function Ze(){A.value.animation.pauseOnHover&&Y()}let Z=y(null);function Qe(){Y(),clearTimeout(Z.value)}function $e(){clearTimeout(Z.value),Z.value=setTimeout(X,1e3)}w(()=>A.value.animation.use,e=>{e?(N.value.showAnimation=!0,X()):(N.value.showAnimation=!1,Y())}),w(()=>A.value.animation.type,e=>{Y(),W.value=0,H.value=0,P.value.scrollTo({top:0,behavior:`auto`}),X()});let et=l(()=>A.value.responsiveBreakpoint),Q=_e(null);_(()=>{Q.value=new ResizeObserver(e=>{e.forEach(e=>{z.value=e.contentRect.width<et.value}),L.value=F.value?F.value.getBoundingClientRect().height:0,R.value=I.value?I.value.getBoundingClientRect().height:0,H.value=0,me(()=>{Y(),K.value=0,W.value=0,U(),X()})}),P.value&&Q.value.observe(P.value)}),g(()=>{Q.value&&Q.value.disconnect()});function tt(){Be()}function nt(){N.value.showAnimation=!N.value.showAnimation,N.value.showAnimation?X():Y()}function rt(e=null){me(()=>{let t=D.dataset.head.map((e,t)=>[[D.dataset.body[t]]]),n=[[A.value.caption.text],[D.dataset.head.map(e=>[e])]].concat(t),r=i(n);e?e(r):te({csvContent:r,title:A.value.caption.text||`vue-ui-carousel-table`})})}async function $(){Ae(`copyAlt`,{config:A.value,dataset:D.dataset}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:D.dataset})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return le({pauseAnimation:Y,resumeAnimation:X,toggleAnimation:nt,generateCsv:rt,generatePdf:tt,generateImage:Ve,copyAlt:$}),(i,a)=>(v(),d(`div`,{class:`vue-data-ui-component vue-ui-carousel-table`,style:{position:`relative`,overflow:`visible`},ref_key:`chartContainer`,ref:He,onMouseenter:a[5]||=()=>C(Fe)(!0),onMouseleave:a[6]||=()=>C(Fe)(!1)},[f(`div`,{ref_key:`tableContainer`,ref:P,id:`carousel-table_${O.value}`,style:h({height:C(Re)||C(ze)?`auto`:`${Math.max(Ge.value,Ue.value)}px`,containerType:`inline-size`,position:`relative`,overflow:`auto`,fontFamily:A.value.fontFamily}),class:he({"vue-ui-responsive":z.value,"is-playing":A.value.scrollbar.hide||!q.value&&A.value.scrollbar.showOnlyOnHover}),onMouseover:a[0]||=e=>Ze(),onMouseleave:a[1]||=e=>X(),onTouchstart:a[2]||=e=>Qe(),onTouchend:a[3]||=e=>$e(),onTouchcancel:a[4]||=e=>$e()},[k.value?(v(),d(`table`,{key:0,class:`vue-data-ui-carousel-table`,"aria-labelledby":`carousel-caption-${O.value}`,style:h({...A.value.style,border:`${A.value.border.size}px solid ${A.value.border.color}`,width:`100%`,borderCollapse:`collapse`,backgroundColor:A.value.tbody.backgroundColor})},[f(`caption`,{ref_key:`caption`,ref:F,class:`vue-data-ui-carousel-table-caption`,id:`carousel-caption-${O.value}`,style:h({...A.value.caption.style,fontFamily:`inherit`,position:`sticky`,top:0,zIndex:2,paddingTop:A.value.caption.padding.top+`px`,paddingRight:A.value.caption.padding.right+`px`,paddingBottom:A.value.caption.padding.bottom+`px`,paddingLeft:A.value.caption.padding.left+`px`,boxShadow:z.value?A.value.thead.tr.style.boxShadow:`none`,minHeight:`36px`,display:i.$slots.caption||A.value.caption.text||A.value.userOptions.show?``:`none`})},[p(S(A.value.caption.text&&!i.$slots.caption?A.value.caption.text:``)+` `,1),x(i.$slots,`caption`,{},void 0,!0)],12,Ce),f(`thead`,{role:`rowgroup`,style:h({...A.value.thead.style,position:`sticky`,top:`${i.$slots.caption||A.value.caption.text||A.value.userOptions.show?L.value:0}px`,zIndex:1})},[f(`tr`,{ref_key:`tableRow`,ref:I,role:`row`,style:h({...A.value.thead.tr.style,border:A.value.thead.tr.border.size?`${A.value.thead.tr.border.size}px solid ${A.value.thead.tr.border.color}`:`none`,boxShadow:z.value?`none`:A.value.thead.tr.style.boxShadow}),height:`${A.value.thead.tr.height}px`},[(v(!0),d(c,null,b(e.dataset.head,(e,t)=>(v(),d(`th`,{role:`cell`,key:`th_${t}`,id:`col-${t}`,scope:`col`,style:h({...A.value.thead.tr.th.style,border:A.value.thead.tr.th.border.size?`${A.value.thead.tr.th.border.size}px solid ${A.value.thead.tr.th.border.color}`:`none`,paddingTop:A.value.thead.tr.th.padding.top+`px`,paddingRight:A.value.thead.tr.th.padding.right+`px`,paddingBottom:A.value.thead.tr.th.padding.bottom+`px`,paddingLeft:A.value.thead.tr.th.padding.left+`px`})},[p(S(i.$slots.th?``:e)+` `,1),x(i.$slots,`th`,m({ref_for:!0},{th:e,colIndex:t}),void 0,!0)],12,Te))),128))],12,we)],4),e.dataset.body&&e.dataset.head?(v(),d(`tbody`,{key:0,ref_key:`tbody`,ref:B,"aria-live":`polite`,style:{clipPath:`inset(0,0,0,0)`}},[(v(!0),d(c,null,b(e.dataset.body,(t,n)=>(v(),d(`tr`,{style:h({...A.value.tbody.tr.style,border:`${A.value.tbody.tr.border.size}px solid ${A.value.tbody.tr.border.color}`,verticalAlign:`middle`})},[(v(!0),d(c,null,b(t,(t,r)=>(v(),d(`td`,{role:`cell`,"data-cell":e.dataset.head[r]||``,"aria-label":`${e.dataset.head[r]}: ${t}`,style:h({...A.value.tbody.tr.td.style,border:`${A.value.tbody.tr.td.border.size}px solid ${A.value.tbody.tr.td.border.color}`,backgroundColor:C(ee)(A.value.tbody.tr.td.style.backgroundColor,n%2==0&&A.value.tbody.tr.td.alternateColor?A.value.tbody.tr.td.alternateOpacity*100:100),paddingTop:A.value.tbody.tr.td.padding.top+`px`,paddingRight:A.value.tbody.tr.td.padding.right+`px`,paddingBottom:A.value.tbody.tr.td.padding.bottom+`px`,paddingLeft:A.value.tbody.tr.td.padding.left+`px`,verticalAlign:`middle`}),height:`${A.value.tbody.tr.height}px`},[p(S(i.$slots.td?``:t)+` `,1),x(i.$slots,`td`,m({ref_for:!0},{td:t,rowIndex:n,colIndex:r}),void 0,!0)],12,Ee))),256))],4))),256))],512)):u(``,!0)],12,Se)):u(``,!0)],46,xe),k.value?u(``,!0):(v(),ue(C(T),{key:0,config:{type:`table`}})),A.value.userOptions.show&&k.value&&(C(Ie)||C(M))?(v(),ue(C(Oe),m({ref:`details`,key:`user_option_${Ke.value}`,backgroundColor:A.value.style.backgroundColor,color:A.value.style.color,isPrinting:C(Re),isImaging:C(ze),uid:O.value,hasTooltip:!1,hasTable:!1,hasLabel:!1,isAnimation:!N.value.showAnimation,isFullscreen:je.value,chartElement:He.value},C(n)(A.value.userOptions,`pdf csv img fullscreen altCopy animation`),{zIndex:3,offsetX:12,isCursorPointer:Pe.value,onGeneratePdf:tt,onGenerateCsv:rt,onGenerateImage:C(Ve),onToggleAnimation:nt,onToggleFullscreen:qe,onCopyAlt:$,style:{visibility:C(Ie)?C(M)?`visible`:`hidden`:`visible`}}),de({_:2},[b(C(t)(i.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionAnimation optionFullscreen optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:ye(t=>[x(i.$slots,e,ge(pe(C(r)(e,t))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isAnimation`,`isFullscreen`,`chartElement`,`isCursorPointer`,`onGenerateImage`,`style`])):u(``,!0),i.$slots.source?(v(),d(`div`,De,[x(i.$slots,`source`,{},void 0,!0)],512)):u(``,!0)],544))}},[[`__scopeId`,`data-v-c9c4bcb2`]]);export{be as n,T as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{t as s}from"./tableIntegration-CNoJ1CIY.js";import{n as ee}from"./resolveChartConfig-0IvbmIE_.js";import{$ as c,D as te,Ht as l,It as ne,Jt as u,S as re,X as ie,Yt as ae,at as oe,f as d,h as se,i as ce,in as le,nt as ue,p as de,r as fe,t as pe,w as me,yt as he,zt as ge}from"./lib-rPeBMZrn.js";import{n as _e,t as ve}from"./useHints-C-TwxM0Y.js";import{t as ye}from"./useConfig-_JwRfIqE.js";import{n as be,t as xe}from"./BaseScanner-8NdoBs7B.js";import{t as Se}from"./usePrinter-DVf3YcG5.js";import{t as Ce}from"./useChartExport-BZts4KFb.js";import{t as we}from"./useTableResponsive-uSz_qZOB.js";import{t as Te}from"./useUserOptionState-CXlFnwPv.js";import{t as Ee}from"./useChartAccessibility-DOMuYJfm.js";import{t as De}from"./img-D4RQwASc.js";import{t as Oe}from"./vue_ui_chestnut-BKcntsvv.js";import{t as ke}from"./A11yDataTable-DWNlWXzs.js";import{t as Ae}from"./DefGrad-DKMq1REY.js";import{t as je}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as f,computed as p,createBlock as Me,createCommentVNode as m,createElementBlock as h,createElementVNode as g,createSlots as Ne,createTextVNode as Pe,createVNode as Fe,defineAsyncComponent as Ie,guardReactiveProps as Le,mergeProps as Re,nextTick as ze,normalizeClass as _,normalizeProps as Be,normalizeStyle as v,onMounted as Ve,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as He,toDisplayString as C,toRefs as Ue,unref as w,useCssVars as We,watch as Ge,withCtx as Ke,withKeys as qe}from"vue";var Je=/* @__PURE__ */ e({default:()=>Bn}),Ye=[`id`],Xe=[`id`],Ze={"aria-live":`polite`,class:`sr-only`},Qe={key:2,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},$e={style:{position:`relative`}},et=[`xmlns`,`aria-describedby`,`viewBox`],tt=[`width`,`height`],nt={key:1},rt=[`fill`,`font-weight`,`font-size`,`x`,`y`],it=[`fill`,`font-weight`,`font-size`,`x`,`y`],at={key:2},ot=[`x`,`y`,`font-size`,`font-weight`,`fill`],st=[`x`,`y`,`font-size`,`font-weight`,`fill`],ct=[`d`,`stroke`,`fill`],lt=[`cx`,`cy`,`r`,`fill`],ut=[`aria-label`,`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onClick`],dt={key:3},ft=[`x`,`y`,`font-size`,`fill`,`onClick`],pt={key:0},mt=[`x`,`y`,`fill`,`font-size`,`font-weight`],ht=[`x`,`y`,`height`,`width`,`fill`,`rx`,`onClick`],gt=[`aria-label`,`x`,`y`,`height`,`width`,`fill`,`rx`,`stroke`,`stroke-width`,`onClick`],_t={key:4},vt=[`x`,`y`,`fill`,`font-size`,`onClick`],yt=[`d`,`stroke`],bt=[`aria-label`,`fill`,`cx`,`cy`,`r`,`onClick`],xt={key:5},St=[`x`,`y`,`font-size`,`font-weight`,`fill`],Ct=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],wt=[`y`,`height`,`width`],Tt={style:{width:`100%`,height:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`,"flex-direction":`column`}},Et={style:{display:`flex`,"align-items":`center`,"justify-content":`center`,gap:`12px`,"flex-wrap":`wrap`,"flex-direction":`row`}},Dt={viewBox:`0 0 20 20`,height:`16`,width:`16`},Ot=[`fill`],kt={key:7},At=[`y`,`height`,`width`],jt={style:{width:`100%`,height:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`,"flex-direction":`column`}},Mt={style:{display:`flex`,"align-items":`center`,"justify-content":`center`,gap:`12px`,"flex-wrap":`wrap`,"flex-direction":`row`}},Nt={viewBox:`0 0 20 20`,height:`16`,width:`16`},Pt=[`fill`],Ft=[`cx`,`cy`,`fill`],It=[`d`,`stroke`],Lt=[`cx`,`cy`,`fill`],Rt=[`d`,`stroke`],zt=[`cx`,`cy`,`fill`],Bt=[`cx`,`cy`,`fill`],Vt=[`x`,`y`,`fill`,`font-size`,`font-weight`],Ht=[`x`,`y`,`fill`,`font-size`,`font-weight`],Ut=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Wt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Gt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Kt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],qt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Jt=[`x`,`y`,`font-size`,`fill`],Yt=[`x`,`y`,`font-size`,`fill`],Xt=[`x`,`y`,`font-size`,`fill`],Zt={key:4,class:`vue-data-ui-watermark`},Qt={key:5,ref:`source`,dir:`auto`},$t={class:`vue-ui-data-table`},en={key:0},tn=[`data-cell`],nn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},rn={key:0},an={key:1},on=[`data-cell`],sn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},cn={key:0},ln={key:1},un=[`data-cell`],dn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},fn={key:0},pn={key:1},mn=[`data-cell`],hn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},gn={key:0},_n={key:1},vn=[`data-cell`],yn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},bn={key:0},xn={key:1},Sn=[`data-cell`],Cn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},wn={key:0},Tn={key:1},En=[`data-cell`],Dn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},On={key:0},kn={key:1},An=[`data-cell`],jn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Mn=[`data-cell`],Nn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Pn=[`data-cell`],Fn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},In=[`data-cell`],Ln={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Rn=[`data-cell`],zn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Bn=/*#__PURE__*/ je({__name:`vue-ui-chestnut`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectRoot`,`selectBranch`,`selectNut`,`copyAlt`],setup(e,{expose:je,emit:Je}){We(e=>({v45e1a30d:e.tdo}));let Bn=Ie(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Vn=Ie(()=>import(`./vue-ui-accordion-DxGxf-Rm.js`).then(e=>e.n)),Hn=Ie(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Un=Ie(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Wn=Ie(()=>import(`./PackageVersion-ksOit8fp.js`).then(e=>e.t)),Gn=Ie(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_chestnut:Kn}=ye(),T=e,qn=p(()=>!!T.dataset&&T.dataset.length),E=b(ie()),Jn=b(null),Yn=b(0),Xn=b(null),Zn=b(null),Qn=b(!1),D=b(!1),O=b(``),k=b({level:`root`,rootIndex:0,branchIndex:0,nutIndex:0,locked:!1}),A=b(or()),j=p(()=>A.value.style.chart.layout.roots),M=p(()=>A.value.style.chart.layout.branches),N=p(()=>A.value.style.chart.layout.nuts),P=p(()=>A.value.style.chart.layout),F=p(()=>A.value.style.chart);_e({config:()=>A.value,dataset:()=>T.dataset,component:`VueUiChestnut`,rules:[ve.emptyArray,{test:e=>e.some(e=>e?.branches&&e.branches.length>10),message:[`👀 Some root has > 10 branches, which can make the chart heavy. Consider:`,``,`▶️ Grouping some branches in broader categories.`]},{test:e=>e.some(e=>e?.branches&&e.branches.some(e=>e?.breakdown&&e?.breakdown.length>6)),message:[`👀 Some donuts have > 6 series. Consider:`,``,`▶️ Grouping small values into an "Other" category.`]}]});let I=p(()=>A.value.userOptions.useCursorPointer),$n=p(()=>le({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{grandTotal:{show:!1},roots:{stroke:`#6A6A6A`,labels:{show:!1}},verticalSeparator:{stroke:`transparent`},branches:{stroke:`#6A6A6A`,underlayerColor:`#6A6A6A90`,labels:{show:!1,dataLabels:{show:!1}}}}}}},userConfig:A.value.skeletonConfig??{}})),{loading:er,FINAL_DATASET:tr}=be({...Ue(T),FINAL_CONFIG:A,prepareConfig:or,skeletonDataset:T.config?.skeletonDataset??[{name:`_`,color:`#969696`,branches:[{name:`_`,value:32,breakdown:[{name:`_`,value:16,color:`#CACACA`},{name:`_`,value:16,color:`#6A6A6A`}]},{name:`_`,value:16,breakdown:[{name:`_`,value:8,color:`#CACACA`},{name:`_`,value:8,color:`#6A6A6A`}]},{name:`_`,value:8,breakdown:[{name:`_`,value:4,color:`#CACACA`},{name:`_`,value:4,color:`#6A6A6A`}]},{name:`_`,value:4,breakdown:[{name:`_`,value:2,color:`#CACACA`},{name:`_`,value:2,color:`#6A6A6A`}]}]},{name:`_`,color:`#C4C4C4`,branches:[{name:`_`,value:24,breakdown:[{name:`_`,value:12,color:`#CACACA`},{name:`_`,value:12,color:`#6A6A6A`}]},{name:`_`,value:12,breakdown:[{name:`_`,value:6,color:`#CACACA`},{name:`_`,value:6,color:`#6A6A6A`}]},{name:`_`,value:6,breakdown:[{name:`_`,value:3,color:`#CACACA`},{name:`_`,value:3,color:`#6A6A6A`}]},{name:`_`,value:2,breakdown:[{name:`_`,value:1,color:`#CACACA`},{name:`_`,value:1,color:`#6A6A6A`}]}]}],skeletonConfig:le({defaultConfig:A.value,userConfig:$n.value})}),{userOptionsVisible:nr,setUserOptionsVisibility:rr,keepUserOptionState:ir}=Te({config:A.value}),{svgRef:ar}=Ee({config:P.value.title});function or(){return ee(T.config,Kn,Oe)}Ge(()=>T.config,e=>{A.value=or(),nr.value=!A.value.userOptions.showOnChartHover,pr.value.showTable=A.value.table.show,Fr()},{deep:!0});let{isPrinting:sr,isImaging:cr,generatePdf:lr,generateImage:ur}=Se({elementId:`vue-ui-chestnut_${E.value}`,fileName:P.value.title.text||`vue-ui-chestnut`,options:A.value.userOptions.print}),dr=p(()=>A.value.userOptions.show),fr=p(()=>me(A.value.customPalette)),pr=b({showTable:A.value.table.show});Ge(A,()=>{pr.value={showTable:A.value.table.show}},{immediate:!0});let mr=b(null),hr=p(()=>A.value.table.responsiveBreakpoint),L=b({gap:6,padding:{top:102,left:12,right:12,bottom:96},width:1024,height:0,branchSize:32,branchStart:128}),R=p(()=>({left:L.value.padding.left,top:L.value.padding.top,right:L.value.width-L.value.padding.right,bottom:L.value.height-L.value.padding.bottom,width:L.value.width-(L.value.padding.left+L.value.padding.right),height:L.value.height-(L.value.padding.top+L.value.padding.bottom),seedX:L.value.padding.left+64})),z=p(()=>tr.value.flatMap(e=>(e.branches||[]).map(e=>e.value||0)).reduce((e,t)=>e+t,0)),gr=p(()=>A.value.debug),B=p(()=>(gr.value&&tr.value.forEach((e,t)=>{he({datasetObject:e,requiredAttributes:[`name`,`branches`]}).forEach(e=>{oe({componentName:`VueUiChestnut`,type:`datasetSerieAttribute`,property:e,index:t})}),e.branches&&e.branches.forEach((e,n)=>{he({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{oe({componentName:`VueUiChestnut`,type:`datasetSerieAttribute`,property:e,index:`${t} - ${n}`})}),e.breakdown&&e.breakdown.forEach((e,r)=>{he({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{oe({componentName:`VueUiChestnut`,type:`datasetSerieAttribute`,property:e,index:`${t} - ${n} - ${r}`})})})})}),tr.value.map((e,t)=>{let n=(e.branches||[]).map(e=>e.value||0).reduce((e,t)=>e+t,0);return{...e,color:re(e.color)||fr.value[t]||l[t]||l[t%l.length],id:e.id||`root_${t}_${E.value}`,type:`root`,total:n,rootIndex:t,branches:(e.branches||[]).map((r,i)=>({...r,rootName:e.name,rootIndex:t,color:re(e.color)||fr.value[t]||l[t]||l[t%l.length],value:r.value>=0?r.value:0,id:r.id||`branch_${t}_${i}_${E.value}`,proportionToRoot:r.value/n,type:`branch`,breakdown:(r.breakdown||[]).map((a,o)=>({table:{rootName:e.name,rootValue:n,rootToTotal:n/z.value,branchName:r.name,branchValue:r.value,branchToTotal:r.value/z.value,branchToRoot:r.value/n,nutName:a.name,nutValue:a.value,nutToTotal:a.value/z.value,nutToRoot:a.value/n,nutToBranch:a.value/r.value},...a,type:`nut`,branchName:r.name,rootName:e.name,branchTotal:r.value>=0?r.value:0,proportionToBranch:a.value/r.value,proportionToRoot:a.value/n,proportionToTree:a.value/z.value,rootIndex:t,id:a.id||`nut_${t}_${i}_${o}_${E.value}`,color:re(a.color)||fr.value[o]||l[o]||l[o%l.length],value:a.value>=0?a.value:0}))}))}})));function _r(){return B.value}let vr=Je,yr=p(()=>B.value.flatMap(e=>e.branches).length),br=p(()=>Math.max(...B.value.map(e=>e.branches.map(e=>e.value).reduce((e,t)=>e+t,0)))),xr=p(()=>Math.max(...B.value.flatMap(e=>e.branches.map(e=>e.value)))),Sr=p(()=>256+L.value.padding.left),V=p(()=>B.value.sort((e,t)=>t.total-e.total).map((e,t)=>{let n=R.value.height/B.value.length/2,r=e.total/br.value*(n>64?64:n);return{...e,x:R.value.seedX,y:R.value.top+R.value.height/B.value.length*(t+1)-(R.value.height/B.value.length/2+L.value.gap/2),r:r<L.value.branchSize/2?L.value.branchSize/2:r}})),Cr=p(()=>M.value.widthRatio<=0?.1:M.value.widthRatio>1.8?1.8:M.value.widthRatio),wr=p(()=>V.value.flatMap(e=>e.branches)),H=p(()=>wr.value.sort((e,t)=>t.value-e.value).map((e,t)=>({...e,y1:t*L.value.branchSize+R.value.top+t*L.value.gap,y2:t*L.value.branchSize+L.value.branchSize,x1:Sr.value,x2:384*e.value/xr.value*Cr.value+Sr.value}))),Tr=p(()=>V.value),Er=p(()=>Tr.value.map(e=>H.value.filter(t=>t.rootIndex===e.rootIndex).sort((e,t)=>e.y1-t.y1))),Dr=p(()=>Tr.value.map((e,t)=>Er.value[t].map(e=>(e.breakdown||[]).map((t,n)=>({...t,nutIndex:n,rootIndex:e.rootIndex,branchId:e.id,branchName:e.name,branchValue:e.value,rootName:e.rootName})))));function Or(e){let t=V.value.find(t=>t.rootIndex===e.rootIndex);return{x:t.x,y:t.y,r:t.r}}let U=b(null),kr=b(null),W=b(null),G=b(null);function K(){U.value=null,W.value=null,G.value=null}function q(e){if(U.value)return e.type===`root`?e.rootIndex===U.value.rootIndex:e.type===`branch`?e.id===U.value.id:e.type===`nut`&&e.branchName===U.value.name&&e.rootIndex===U.value.rootIndex;if(W.value)return e.type===`root`?e.rootIndex===W.value.rootIndex:e.type===`branch`?e.id===W.value.id:e.type===`nut`&&e.branchName===W.value.name&&e.rootIndex===W.value.rootIndex;if(G.value)return e.type===`root`?e.id===G.value.id:e.type===`branch`||e.type===`nut`?e.rootIndex===G.value.rootIndex:!1;if(ui.value&&D.value){if(k.value.level===`root`)return e.type===`root`?Z.value&&e.id===Z.value.id:e.type===`branch`||e.type===`nut`?Z.value&&e.rootIndex===Z.value.rootIndex:!1;if(k.value.level===`branch`)return e.type===`root`?Z.value&&e.rootIndex===Z.value.rootIndex:e.type===`branch`?ci.value&&e.id===ci.value.id:(e.type,!1);if(k.value.level===`nut`)return e.type===`root`?Z.value&&e.rootIndex===Z.value.rootIndex:e.type===`branch`?li.value&&e.id===li.value.id:e.type===`nut`&&li.value&&e.branchName===li.value.name&&e.rootIndex===li.value.rootIndex}return!0}function Ar(e){K();let t=Tr.value.findIndex(t=>t.rootIndex===e.rootIndex),n=(Er.value[t]||[]).findIndex(t=>t.id===e.id);t!==-1&&(k.value.rootIndex=t),n!==-1&&(k.value.branchIndex=n),k.value.level=`nut`,k.value.nutIndex=0,ze(()=>{U.value=e,W.value=e,kr.value=ne({series:e.breakdown,base:1},e.x2+24+N.value.offsetX,e.y1+L.value.branchSize/2,80,80),vr(`selectNut`,e.breakdown),Q()})}function J(){U.value=null,kr.value=null,vr(`selectNut`,null)}function jr(e){let t=Tr.value.findIndex(t=>t.rootIndex===e.rootIndex),n=(Er.value[t]||[]).findIndex(t=>t.id===e.id);t!==-1&&(k.value.rootIndex=t),n!==-1&&(k.value.branchIndex=n),k.value.level=`branch`,k.value.nutIndex=0,W.value&&W.value.id===e.id?(W.value=null,K(),vr(`selectBranch`,null),Q()):(K(),W.value=e,vr(`selectBranch`,e),Q())}function Mr(e){let t=Tr.value.findIndex(t=>t.id===e.id);t!==-1&&(k.value.rootIndex=t),k.value.level=`root`,k.value.branchIndex=0,k.value.nutIndex=0,G.value&&G.value.id===e.id?(K(),vr(`selectRoot`,null),Q()):(K(),G.value=e,vr(`selectRoot`,e),Q())}function Nr(){return R.value.bottom-(U.value.y1+180)<0?0:R.value.bottom}function Pr(e){return e.proportion*100>N.value.selected.labels.dataLabels.hideUnderValue}Ve(()=>{Fr()});function Fr(){ge(T.dataset)&&oe({componentName:`VueUiChestnut`,type:`dataset`,debug:gr.value});let e=yr.value*(L.value.branchSize+L.value.gap)+L.value.padding.top+L.value.padding.bottom;L.value.height=e}let Y=p(()=>({head:[A.value.table.th.translations.rootName,A.value.table.th.translations.rootValue,A.value.table.th.translations.rootToTotal,A.value.table.th.translations.branchName,A.value.table.th.translations.branchValue,A.value.table.th.translations.branchToRoot,A.value.table.th.translations.branchToTotal,A.value.table.th.translations.nutName,A.value.table.th.translations.nutValue,A.value.table.th.translations.nutToBranch,A.value.table.th.translations.nutToRoot,A.value.table.th.translations.nutToTotal],body:B.value.flatMap((e,t)=>e.branches.flatMap((e,t)=>e.breakdown.flatMap((e,t)=>e.table)))}));function Ir(e=null){ze(()=>{let t=[[P.value.title.text],[P.value.title.subtitle.text],[``],[`Grand total`,z.value],[``]],n=Y.value.head,r=Y.value.body.map((e,t)=>[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?``:e.rootName,Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?``:e.rootValue,Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?``:e.rootToTotal,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchName,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchValue,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchToRoot,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchToTotal,e.nutName,e.nutValue,e.nutToBranch,e.nutToRoot,e.nutToTotal]),i=t.concat([n]).concat(r),a=te(i);e?e(a):ue({csvContent:a,title:P.value.title.text||`vue-ui-chestnut`})})}let Lr=b(!1);function Rr(e){Lr.value=e,Yn.value+=1}function zr(){pr.value.showTable=!pr.value.showTable}let Br=b(!1);function Vr(){Br.value=!Br.value}async function Hr({scale:e=2}={}){if(!Jn.value)return;let{width:t,height:n}=Jn.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await De({domElement:Jn.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:P.value.title.text,width:t,height:n,aspectRatio:r}}function Ur(e){let t=Or(e),n=e.x1,r=e.y1,i=L.value.branchSize,a=t.x+t.r/2,o=t.y;return[`M ${n},${r}`,`C ${n-20},${r} ${n-20},${r} ${a},${o}`,`C ${a},${o} ${n-20},${r+i} ${n},${r+i}`,`Z`].join(` `)}let Wr=p(()=>s({config:A,style:F,mutableConfig:pr,dialog:Gn,accordion:Vn,isFullscreen:Lr,parent:Jn,maxWidth:800,titleStyle:P,isCursorPointer:I}));Ge(()=>pr.value.showTable,async e=>{A.value.table.show||(e&&A.value.table.useDialog&&Xn.value?(await ze(),Xn.value.open()):`close`in Xn.value&&Xn.value.close())});let{isResponsive:Gr}=we(mr,hr);function Kr(){pr.value.showTable=!1,Zn.value&&Zn.value.setTableIconState(!1)}let qr=p(()=>B.value.map((e,t)=>({...e,display:`${e.name}: ${ce(j.value.labels.formatter,e.total,c({p:P.value.legend.prefix,v:e.total,s:P.value.legend.suffix,r:P.value.legend.roundingValue}),{datapoint:e})} (${c({v:e.total/z.value*100,s:`%`,r:P.value.legend.roundingPercentage})})`}))),Jr=p(()=>qr.value.map(e=>({color:e.color,name:e.display,shape:`circle`}))),Yr=p(()=>F.value.backgroundColor),Xr=p(()=>({...P.value.legend,textAlign:`center`,show:!0,position:`bottom`})),Zr=p(()=>P.value.title),{isCallbackImaging:Qr,isCallbackSvg:$r,generateSvg:ei,onGenerateImage:ti}=Ce({svg:ar,title:Zr,legend:Xr,legendItems:Jr,backgroundColor:Yr,titleEmbedded:!0,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:ur});async function ni(){vr(`copyAlt`,{config:A.value,dataset:B.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:B.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function ri(e){if(!e)return``;let t=c({p:P.value.legend.prefix,v:e.total,s:P.value.legend.suffix,r:P.value.legend.roundingValue}),n=c({v:e.total/z.value*100,s:`%`,r:P.value.legend.roundingPercentage});return`Root ${e.name}. Value ${t}. ${n} of total.`}function ii(e){if(!e)return``;let t=c({p:M.value.labels.dataLabels.prefix,v:e.value,s:M.value.labels.dataLabels.suffix,r:M.value.labels.dataLabels.roundingValue}),n=c({v:e.proportionToRoot*100,s:`%`,r:P.value.legend.roundingPercentage});return`Branch ${e.name}. Root ${e.rootName}. Value ${t}. ${n} of root ${e.rootName}.`}function ai(e){if(!e)return``;let t=c({p:P.value.legend.prefix,v:e.value,s:P.value.legend.suffix,r:N.value.selected.labels.roundingValue}),n=c({v:e.proportionToBranch*100,s:`%`,r:N.value.selected.labels.roundingPercentage});return`Nut ${e.name}. Branch ${e.branchName}. Root ${e.rootName}. Value ${t}. ${n} of branch ${e.branchName}.`}let oi=p(()=>Tr.value[k.value.rootIndex]||null),X=p(()=>(Er.value[k.value.rootIndex]||[])[k.value.branchIndex]||null),si=p(()=>((Dr.value[k.value.rootIndex]||[])[k.value.branchIndex]||[])[k.value.nutIndex]||null),Z=p(()=>oi.value),ci=p(()=>X.value),li=p(()=>k.value.level===`nut`?X.value:null),ui=p(()=>Qn.value);function Q(){k.value.level===`root`?O.value=ri(oi.value):k.value.level===`branch`?O.value=ii(X.value):k.value.level===`nut`&&(O.value=ai(si.value))}function $(){k.value={level:`root`,rootIndex:0,branchIndex:0,nutIndex:0,locked:!1},O.value=``}function di(){let e=Er.value[k.value.rootIndex]||[];e.length?(k.value.branchIndex>=e.length&&(k.value.branchIndex=0),k.value.branchIndex<0&&(k.value.branchIndex=e.length-1)):k.value.branchIndex=0}function fi(){let e=(Dr.value[k.value.rootIndex]||[])[k.value.branchIndex]||[];e.length?(k.value.nutIndex>=e.length&&(k.value.nutIndex=0),k.value.nutIndex<0&&(k.value.nutIndex=e.length-1)):k.value.nutIndex=0}function pi(e){if(k.value.level===`root`){let t=Tr.value.length;if(!t)return;k.value.rootIndex+=e,k.value.rootIndex>=t&&(k.value.rootIndex=0),k.value.rootIndex<0&&(k.value.rootIndex=t-1),k.value.branchIndex=0,k.value.nutIndex=0,Q()}else k.value.level===`branch`?(k.value.branchIndex+=e,di(),k.value.nutIndex=0,Q()):k.value.level===`nut`&&(k.value.nutIndex+=e,fi(),Q())}function mi(e){if(e>0){if(k.value.level===`root`){if(!(Er.value[k.value.rootIndex]||[]).length)return;k.value.level=`branch`,k.value.branchIndex=0,k.value.nutIndex=0,Q();return}if(k.value.level===`branch`){if(!((Dr.value[k.value.rootIndex]||[])[k.value.branchIndex]||[]).length)return;k.value.level=`nut`,k.value.nutIndex=0,X.value?Ar(X.value):Q();return}}else k.value.level===`nut`?(J(),W.value=null,k.value.level=`branch`,k.value.nutIndex=0,Q()):k.value.level===`branch`&&(W.value=null,G.value=null,k.value.level=`root`,k.value.nutIndex=0,Q())}function hi(){k.value.level===`root`&&oi.value?(Mr(oi.value),O.value=`${ri(oi.value)} selected.`):k.value.level===`branch`&&X.value?(jr(X.value),O.value=`${ii(X.value)} selected.`):k.value.level===`nut`&&X.value&&si.value&&(Ar(X.value),O.value=`${ai(si.value)} details opened.`)}function gi(){Qn.value=!0,D.value=!1}function _i(){Qn.value=!1,D.value=!1,O.value=``,G.value||W.value||U.value||$()}function vi(e){let t=e.key===`ArrowUp`,n=e.key===`ArrowDown`,r=e.key===`ArrowLeft`,i=e.key===`ArrowRight`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;(t||n||r||i||a||o)&&(e.preventDefault(),e.stopPropagation(),Qn.value||=!0,o?(K(),$(),D.value=!1):((t||n||r||i)&&(D.value=!0),t?pi(-1):n?pi(1):r?mi(-1):i?mi(1):a&&hi()))}let yi=p(()=>({headers:Y.value.head,rows:Y.value.body.map(e=>[e.rootName,e.rootValue,c({v:e.rootToTotal*100,s:`%`,r:A.value.table.td.roundingPercentage}),e.branchName,e.branchValue,c({v:e.branchToRoot*100,s:`%`,r:A.value.table.td.roundingPercentage}),c({v:e.branchToTotal*100,s:`%`,r:A.value.table.td.roundingPercentage}),e.nutName,e.nutValue,c({v:e.nutToBranch*100,s:`%`,r:A.value.table.td.roundingPercentage}),c({v:e.nutToRoot*100,s:`%`,r:A.value.table.td.roundingPercentage}),c({v:e.nutToTotal*100,s:`%`,r:A.value.table.td.roundingPercentage})])}));return je({getData:_r,getImage:Hr,generatePdf:lr,generateCsv:Ir,generateImage:ur,generateSvg:ei,toggleTable:zr,toggleAnnotator:Vr,toggleFullscreen:Rr,copyAlt:ni}),(e,s)=>(y(),h(`div`,{class:_(`vue-data-ui-component vue-ui-chestnut ${Lr.value?`vue-data-ui-wrapper-fullscreen`:``}`),ref_key:`chestnutChart`,ref:Jn,id:`vue-ui-chestnut_${E.value}`,style:v(`font-family:${A.value.style.fontFamily};width:100%; text-align:center;background:${F.value.backgroundColor}`),onMouseenter:s[12]||=()=>w(rr)(!0),onMouseleave:s[13]||=()=>w(rr)(!1)},[g(`div`,{id:`chart-instructions-${E.value}`,class:`sr-only`},[g(`p`,null,C(A.value.a11y.translations.keyboardNavigation),1)],8,Xe),g(`div`,Ze,C(O.value),1),yi.value?.rows?.length?(y(),Me(ke,{key:0,uid:E.value,head:yi.value.headers,body:yi.value.rows,notice:A.value.a11y.translations.tableAvailable,caption:A.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):m(``,!0),A.value.userOptions.buttons.annotator?(y(),Me(w(Hn),Re({key:1},w(a)(A.value.userOptions.annotator),{svgRef:w(ar),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Br.value,isCursorPointer:I.value,palette:A.value.userOptions.annotatorPalette,onClose:Vr}),Ne({_:2},[x(w(o),t=>({name:t,fn:Ke(n=>[S(e.$slots,t,Be(Le(w(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):m(``,!0),dr.value?(y(),h(`div`,Qe,null,512)):m(``,!0),A.value.userOptions.show&&qn.value&&(w(ir)||w(nr))?(y(),Me(w(Un),Re({ref_key:`userOptionsRef`,ref:Zn,key:`user_options_${Yn.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isImaging:w(cr),isPrinting:w(sr),uid:E.value,isFullscreen:Lr.value,chartElement:Jn.value},w(n)(A.value.userOptions,`pdf csv img svg table fullscreen altCopy annotator`),{isAnnotation:Br.value,tableDialog:A.value.table.useDialog,isCursorPointer:I.value,onToggleFullscreen:Rr,onGeneratePdf:w(lr),onGenerateCsv:Ir,onGenerateImage:w(ti),onGenerateSvg:w(ei),onToggleTable:zr,onToggleAnnotator:Vr,onCopyAlt:ni,style:{visibility:w(ir)?w(nr)?`visible`:`hidden`:`visible`}}),Ne({_:2},[x(w(t)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Ke(n=>[S(e.$slots,t,Be(Le(w(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isImaging`,`isPrinting`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):m(``,!0),g(`div`,$e,[L.value.height>0?(y(),h(`svg`,{key:0,ref_key:`svgRef`,ref:ar,xmlns:w(pe),"aria-describedby":`chart-instructions-${E.value}`,class:_({"vue-data-ui-fullscreen--on":Lr.value,"vue-data-ui-fulscreen--off":!Lr.value}),viewBox:`0 0 ${L.value.width<=0?10:L.value.width} ${L.value.height<=0?10:L.value.height}`,style:v(`overflow:visible;background:transparent;color:${F.value.color}`),tabindex:`0`,onFocus:gi,onBlur:_i,onKeydown:vi},[Fe(w(Wn)),S(e.$slots,`svg-underlayer`,{svg:{...L.value,isPrintingImg:w(sr)||w(cr)||w(Qr),isPrintingSvg:w($r)}},void 0,!0),e.$slots[`chart-background`]?(y(),h(`foreignObject`,{key:0,x:0,y:0,width:L.value.width<=0?10:L.value.width,height:L.value.height<=0?10:L.value.height,style:{pointerEvents:`none`}},[S(e.$slots,`chart-background`,{},void 0,!0)],8,tt)):m(``,!0),U.value?m(``,!0):(y(),h(`g`,nt,[P.value.title.text?(y(),h(`text`,{key:0,"text-anchor":`middle`,fill:P.value.title.color,"font-weight":P.value.title.bold?`bold`:`normal`,"font-size":P.value.title.fontSize,x:L.value.width/2,y:12+P.value.title.fontSize+P.value.title.offsetY,onClick:s[0]||=()=>{K(),$(),D.value=!1}},C(P.value.title.text),9,rt)):m(``,!0),P.value.title.subtitle.text?(y(),h(`text`,{key:1,"text-anchor":`middle`,fill:P.value.title.subtitle.color,"font-weight":P.value.title.subtitle.bold?`bold`:`normal`,"font-size":P.value.title.subtitle.fontSize,x:L.value.width/2,y:48+P.value.title.subtitle.fontSize+P.value.title.subtitle.offsetY,onClick:s[1]||=()=>{K(),$(),D.value=!1}},C(P.value.title.subtitle.text),9,it)):m(``,!0)])),g(`defs`,null,[(y(!0),h(f,null,x(B.value,(e,t)=>(y(),Me(Ae,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`root_gradient_${E.value}_${e.rootIndex}`,key:`root_gradient_${E.value}_${e.rootIndex}`,stops:[[`0%`,w(u)(w(ae)(e.color,.05),100-j.value.gradientIntensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128)),(y(!0),h(f,null,x(B.value,e=>(y(),Me(Ae,{t:`linear`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,id:`branch_gradient_${E.value}_${e.rootIndex}`,key:`branch_gradient_${E.value}_${e.rootIndex}`,stops:[[`0%`,e.color,1],[`100%`,w(u)(w(ae)(e.color,.02),100-M.value.gradientIntensity),1]]},null,8,[`id`,`stops`]))),128)),Fe(Ae,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`nutpick_${E.value}`,stops:[[`0%`,w(u)(`#FFFFFF`,0),0],[`80%`,w(u)(`#FFFFFF`,N.value.selected.gradientIntensity),1],[`100%`,w(u)(`#FFFFFF`,0),0]]},null,8,[`id`,`stops`]),Fe(Ae,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`nut_${E.value}`,stops:[[`0%`,w(u)(`#FFFFFF`,0),0],[`80%`,w(u)(`#FFFFFF`,N.value.gradientIntensity),1],[`100%`,w(u)(`#FFFFFF`,0),0]]},null,8,[`id`,`stops`]),Fe(Ae,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`nut_underlayer_${E.value}`,stops:[[`0%`,w(u)(F.value.backgroundColor,100),1],[`80%`,w(u)(F.value.backgroundColor,60),1],[`100%`,w(u)(F.value.backgroundColor,0),1]]},null,8,[`id`,`stops`])]),P.value.grandTotal.show?(y(),h(`g`,at,[g(`text`,{x:R.value.seedX,y:32+P.value.grandTotal.offsetY,"font-size":P.value.grandTotal.fontSize,"font-weight":P.value.grandTotal.bold?`bold`:`normal`,fill:P.value.grandTotal.color,"text-anchor":`middle`,onClick:s[2]||=()=>{K(),$(),D.value=!1}},C(P.value.grandTotal.text),9,ot),g(`text`,{x:R.value.seedX,y:38+P.value.grandTotal.fontSize+P.value.grandTotal.offsetY,"font-size":P.value.grandTotal.fontSize,"font-weight":P.value.grandTotal.bold?`bold`:`normal`,fill:P.value.grandTotal.color,"text-anchor":`middle`,onClick:s[3]||=()=>{K(),$(),D.value=!1}},C(w(ce)(P.value.grandTotal.formatter,z.value,w(c)({p:P.value.grandTotal.prefix,v:z.value,s:P.value.grandTotal.suffix,r:P.value.grandTotal.roundingValue}))),9,st)])):m(``,!0),(y(!0),h(f,null,x(H.value,e=>(y(),h(`g`,null,[g(`defs`,null,[Fe(Ae,{t:`linear`,id:`link_grad_${e.id}`,stops:[[`0%`,e.color,1],[`100%`,w(u)(e.color,P.value.links.opacity),1]]},null,8,[`id`,`stops`])]),g(`path`,{d:Ur(e),stroke:w(u)(e.color,P.value.links.opacity),fill:`url(#link_grad_${e.id})`,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:v(`opacity:${+!!q(e)}`),onClick:s[4]||=()=>{K(),$(),D.value=!1}},null,12,ct)]))),256)),(y(!0),h(f,null,x(V.value,e=>(y(),h(`circle`,{cx:e.x,cy:e.y,r:e.r,fill:j.value.underlayerColor,stroke:`none`,style:v(`cursor:${I.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`)},null,12,lt))),256)),(y(!0),h(f,null,x(V.value,(e,t)=>(y(),h(`circle`,{"aria-label":ri(e),cx:e.x,cy:e.y,r:e.r,fill:j.value.useGradient?`url(#root_gradient_${E.value}_${e.rootIndex})`:e.color,stroke:j.value.stroke,"stroke-width":j.value.strokeWidth,style:v(`cursor:${I.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>Mr(e)},null,12,ut))),256)),j.value.labels.show?(y(),h(`g`,dt,[(y(!0),h(f,null,x(V.value,(e,t)=>(y(),h(`text`,{x:e.x,y:e.y+j.value.labels.fontSize/2.6,"text-anchor":`middle`,"font-size":j.value.labels.fontSize,fill:j.value.labels.adaptColorToBackground?w(fe)(e.color):j.value.labels.color,"font-weight":`bold`,style:v(`cursor:${I.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>Mr(e)},C(w(ce)(j.value.labels.formatter,e.total,w(c)({p:j.value.labels.prefix,v:e.total,s:j.value.labels.suffix,r:j.value.labels.roundingValue}),{datapoint:e})),13,ft))),256)),(y(!0),h(f,null,x(V.value,e=>(y(),h(`g`,null,[U.value&&e.rootIndex===U.value.rootIndex||W.value&&e.rootIndex===W.value.rootIndex||G.value&&e.rootIndex===G.value.rootIndex?(y(),h(`g`,pt,[g(`text`,{x:e.x,y:e.y+e.r+24,"text-anchor":`middle`,fill:j.value.labels.name.color,"font-size":j.value.labels.name.fontSize,"font-weight":j.value.labels.name.bold?`bold`:`normal`,onClick:s[5]||=()=>{K(),$(),D.value=!1}},C(e.name),9,mt)])):m(``,!0)]))),256))])):m(``,!0),(y(!0),h(f,null,x(H.value,e=>(y(),h(`rect`,{x:e.x1,y:e.y1,height:L.value.branchSize,width:e.x2-e.x1,fill:M.value.underlayerColor,rx:M.value.borderRadius,stroke:`none`,style:v(`opacity:${q(e)?1:.05}`),onClick:t=>jr(e)},null,12,ht))),256)),(y(!0),h(f,null,x(H.value,(e,t)=>(y(),h(`rect`,{"aria-label":ii(e),x:e.x1,y:e.y1,height:L.value.branchSize,width:e.x2-e.x1,fill:M.value.useGradient?`url(#branch_gradient_${E.value}_${e.rootIndex})`:e.color,rx:M.value.borderRadius,stroke:M.value.stroke,"stroke-width":M.value.strokeWidth,style:v(`cursor:${I.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>jr(e)},null,12,gt))),256)),M.value.labels.dataLabels.show?(y(),h(`g`,_t,[(y(!0),h(f,null,x(H.value,e=>(y(),h(`g`,null,[e.proportionToRoot*100>M.value.labels.dataLabels.hideUnderValue?(y(),h(`text`,{key:0,x:e.x1+6,y:e.y1+L.value.branchSize/1.5,"text-anchor":`start`,fill:w(fe)(e.color),"font-size":M.value.labels.dataLabels.fontSize,"font-weight":`bold`,style:v(`cursor:${I.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>jr(e)},C(w(ce)(M.value.labels.dataLabels.formatter,e.value,w(c)({p:P.value.branches.labels.dataLabels.prefix,v:e.value,s:P.value.branches.labels.dataLabels.suffix,r:P.value.branches.labels.dataLabels.roundingValue}),{datapoint:e})),13,vt)):m(``,!0)]))),256))])):m(``,!0),(y(!0),h(f,null,x(H.value,(e,t)=>(y(),h(`g`,null,[(y(!0),h(f,null,x(w(ne)({series:e.breakdown,base:1},e.x2+24+N.value.offsetX,e.y1+L.value.branchSize/2,L.value.branchSize/3,L.value.branchSize/3),(t,n)=>(y(),h(`path`,{d:t.path,stroke:t.color,"stroke-width":10,fill:`none`,style:v(`opacity:${q(e)?1:.1}`)},null,12,yt))),256)),g(`circle`,{"aria-label":`Open details for branch ${e.name} in root ${e.rootName}`,fill:N.value.useGradient?`url(#nut_${E.value})`:`transparent`,cx:e.x2+24+N.value.offsetX,cy:e.y1+L.value.branchSize/2,r:L.value.branchSize/2+2,onClick:t=>Ar(e),style:v(`cursor:${I.value?`pointer`:`default`};opacity:${q(e)?1:.1}`)},null,12,bt)]))),256)),M.value.labels.show&&!W.value?(y(),h(`g`,xt,[(y(!0),h(f,null,x(H.value,e=>(y(),h(`text`,{x:e.x2+L.value.branchSize+24+N.value.offsetX,y:e.y1+L.value.branchSize/2+5,"font-size":M.value.labels.fontSize,"font-weight":M.value.labels.bold?`bold`:`normal`,fill:M.value.labels.color,"text-anchor":`start`,style:v(`opacity:${q(e)?1:.1}`)},C(e.name),13,St))),256))])):m(``,!0),g(`line`,{x1:256+L.value.padding.left,x2:256+L.value.padding.left,y1:R.value.top,y2:R.value.bottom,stroke:P.value.verticalSeparator.stroke,"stroke-width":P.value.verticalSeparator.strokeWidth},null,8,Ct),!U.value&&!W.value?(y(),h(`foreignObject`,{key:6,x:0,y:R.value.bottom,height:L.value.height-R.value.bottom,width:L.value.width,style:{overflow:`visible`},"data-no-svg-export":``,onClick:s[6]||=()=>{K(),$(),D.value=!1}},[g(`div`,Tt,[g(`div`,Et,[(y(!0),h(f,null,x(V.value,e=>(y(),h(`div`,{style:v(`display:flex;align-items:center;gap:3px;flex-direction:row;font-size:${P.value.legend.fontSize}px;`)},[(y(),h(`svg`,Dt,[g(`circle`,{cx:`10`,cy:`10`,r:`10`,fill:e.color,stroke:`none`},null,8,Ot)])),w(er)?m(``,!0):(y(),h(f,{key:0},[g(`span`,null,C(e.name)+`:`,1),g(`b`,null,C(w(ce)(P.value.roots.labels.formatter,e.total,w(c)({p:F.value.layout.legend.prefix,v:e.total,s:F.value.layout.legend.suffix,r:F.value.layout.legend.roundingValue}),{datapoint:e})),1),Pe(` (`+C(w(c)({v:e.total/z.value*100,s:`%`,r:P.value.legend.roundingPercentage}))+`) `,1)],64))],4))),256))])])],8,wt)):m(``,!0),U.value&&kr.value?(y(),h(`g`,kt,[(y(),h(`foreignObject`,{x:0,y:Nr(),height:L.value.height-R.value.bottom,width:L.value.width,style:{overflow:`visible`},onClick:s[7]||=()=>{K(),$(),D.value=!1}},[g(`div`,jt,[g(`b`,null,C(U.value.name),1),g(`div`,Mt,[(y(!0),h(f,null,x(U.value.breakdown,(e,t)=>(y(),h(`div`,{style:v(`display:flex;align-items:center;gap:6px;flex-direction:row;font-size:${P.value.legend.fontSize}px;`)},[(y(),h(`svg`,Nt,[g(`circle`,{cx:`10`,cy:`10`,r:`10`,fill:e.color,stroke:`none`},null,8,Pt)])),g(`span`,null,[Pe(C(e.name)+`: `,1),g(`b`,null,C(P.value.legend.prefix)+` `+C(e.value.toFixed(F.value.layout.nuts.selected.labels.roundingValue))+` `+C(P.value.legend.suffix),1),Pe(` (`+C((e.proportionToBranch*100).toFixed(P.value.nuts.selected.labels.roundingPercentage))+`%)`,1)])],4))),256))])])],8,At)),g(`circle`,{cx:U.value.x2+24+N.value.offsetX,cy:U.value.y1+L.value.branchSize/2,r:256,fill:`url(#nut_underlayer_${E.value})`,onClick:J,class:_(N.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Ft),(y(!0),h(f,null,x(kr.value,e=>(y(),h(`g`,null,[Pr(e)?(y(),h(`path`,{key:0,d:w(se)(e,{x:U.value.x2+24+N.value.offsetX,y:U.value.y1+L.value.branchSize/2},16,16,!1,!1,64),stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,class:_(N.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,It)):m(``,!0)]))),256)),g(`circle`,{cx:U.value.x2+24+N.value.offsetX,cy:U.value.y1+L.value.branchSize/2,r:118,fill:F.value.backgroundColor,onClick:J,class:_(N.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Lt),(y(!0),h(f,null,x(kr.value,e=>(y(),h(`path`,{d:e.path,stroke:e.color,"stroke-width":64,fill:`none`,onClick:J,class:_(N.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Rt))),256)),g(`circle`,{cx:U.value.x2+24+N.value.offsetX,cy:U.value.y1+L.value.branchSize/2,r:110,fill:`url(#nutpick_${E.value})`,onClick:J,class:_(N.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,zt),g(`circle`,{cx:U.value.x2+24+N.value.offsetX,cy:U.value.y1+L.value.branchSize/2,r:64,fill:F.value.backgroundColor,onClick:J,class:_(N.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Bt),g(`text`,{x:U.value.x2+24+N.value.offsetX,y:U.value.y1+8,fill:N.value.selected.labels.core.total.color,"font-size":N.value.selected.labels.core.total.fontSize,"font-weight":N.value.selected.labels.core.total.bold?`bold`:`normal`,"text-anchor":`middle`,onClick:J,class:_(N.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},C(A.value.translations.total),11,Vt),g(`text`,{x:U.value.x2+24+N.value.offsetX,y:U.value.y1+36,fill:N.value.selected.labels.core.value.color,"font-size":N.value.selected.labels.core.value.fontSize,"font-weight":N.value.selected.labels.core.value.bold?`bold`:`normal`,"text-anchor":`middle`,onClick:J,class:_(N.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},C(w(ce)(N.value.selected.labels.dataLabels.formatter,U.value.value,w(c)({p:N.value.selected.labels.core.value.prefix,v:U.value.value,s:N.value.selected.labels.core.value.suffix,r:N.value.selected.roundingValue}),{datapoint:U.value})),11,Ht),(y(!0),h(f,null,x(kr.value,(e,t)=>(y(),h(`g`,null,[Pr(e)?(y(),h(`text`,{key:0,x:w(d)(e).x,"text-anchor":w(d)(e).anchor,y:w(de)(e)-N.value.selected.labels.dataLabels.fontSize/6,fill:e.color,"font-size":N.value.selected.labels.dataLabels.fontSize/2,style:v(`font-weight:${N.value.selected.labels.dataLabels.bold?`bold`:``}`),class:_(N.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},` ⬤ `,14,Ut)):m(``,!0),Pr(e)?(y(),h(`text`,{key:1,x:w(d)(e,!0).x,"text-anchor":w(d)(e,!0).anchor,y:w(de)(e),fill:N.value.selected.labels.dataLabels.color,"font-size":N.value.selected.labels.dataLabels.fontSize,style:v(`font-weight:${N.value.selected.labels.dataLabels.bold?`bold`:``}`),class:_(N.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},C(U.value.breakdown[t].name),15,Wt)):m(``,!0)]))),256)),(y(!0),h(f,null,x(kr.value,(e,t)=>(y(),h(`g`,null,[Pr(e)?(y(),h(`text`,{key:0,x:w(d)(e,!0).x,"text-anchor":w(d)(e).anchor,y:w(de)(e)+N.value.selected.labels.dataLabels.fontSize,fill:N.value.selected.labels.dataLabels.color,"font-size":N.value.selected.labels.dataLabels.fontSize,style:v(`font-weight:${N.value.selected.labels.dataLabels.bold?`bold`:``}`),class:_(N.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},C(w(c)({v:U.value.breakdown[t].value/U.value.value*100,s:`%`,r:N.value.selected.labels.roundingPercentage}))+` `+C(A.value.translations.of)+` `+C(U.value.breakdown[t].branchName)+` `+C(w(ce)(N.value.selected.labels.dataLabels.formatter,U.value.breakdown[t].value,w(c)({p:N.value.selected.labels.dataLabels.prefix,v:U.value.breakdown[t].value,s:N.value.selected.labels.dataLabels.suffix,r:N.value.selected.roundingValue}),{datapoint:kr.value,seriesIndex:t})),15,Gt)):m(``,!0),Pr(e)?(y(),h(`text`,{key:1,x:w(d)(e,!0).x,"text-anchor":w(d)(e).anchor,y:w(de)(e)+N.value.selected.labels.dataLabels.fontSize*2,fill:N.value.selected.labels.dataLabels.color,"font-size":N.value.selected.labels.dataLabels.fontSize,style:v(`font-weight:${N.value.selected.labels.dataLabels.bold?`bold`:``}`),class:_(N.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},C(w(c)({v:U.value.breakdown[t].proportionToRoot*100,s:`%`,r:N.value.selected.labels.roundingPercentage}))+` `+C(A.value.translations.of)+` `+C(U.value.breakdown[t].rootName),15,Kt)):m(``,!0),Pr(e)?(y(),h(`text`,{key:2,x:w(d)(e,!0).x,"text-anchor":w(d)(e).anchor,y:w(de)(e)+N.value.selected.labels.dataLabels.fontSize*3,fill:N.value.selected.labels.dataLabels.color,"font-size":N.value.selected.labels.dataLabels.fontSize,style:v(`font-weight:${N.value.selected.labels.dataLabels.bold?`bold`:``}`),class:_(N.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},C(w(c)({v:U.value.breakdown[t].proportionToTree*100,s:`%`,r:N.value.selected.labels.roundingPercentage}))+` `+C(A.value.translations.proportionToTree),15,qt)):m(``,!0)]))),256))])):m(``,!0),(y(!0),h(f,null,x(H.value,e=>(y(),h(`g`,null,[W.value&&W.value.id===e.id&&!U.value?(y(),h(`text`,{key:0,x:e.x1+6,y:e.y1+L.value.branchSize+24,"font-weight":`bold`,"text-anchor":`start`,"font-size":M.value.labels.dataLabels.fontSize,fill:M.value.labels.color,onClick:s[8]||=()=>{K(),$(),D.value=!1}},C(e.name)+`: `+C(w(ce)(M.value.labels.dataLabels.formatter,e.value,w(c)({p:M.value.labels.dataLabels.prefix,v:e.value,s:M.value.labels.dataLabels.suffix,r:M.value.labels.dataLabels.roundingValue}),{datapoint:e})),9,Jt)):m(``,!0),W.value&&W.value.id===e.id&&!U.value?(y(),h(`text`,{key:1,x:e.x1+6,y:e.y1+L.value.branchSize+48,"text-anchor":`start`,"font-size":M.value.labels.dataLabels.fontSize,fill:M.value.labels.color,onClick:s[9]||=()=>{K(),$(),D.value=!1}},C(w(c)({v:e.proportionToRoot*100,s:`%`,r:M.value.labels.dataLabels.roundingPercentage}))+` `+C(A.value.translations.of)+` `+C(e.rootName),9,Yt)):m(``,!0),W.value&&W.value.id===e.id&&!U.value?(y(),h(`text`,{key:2,x:e.x1+6,y:e.y1+L.value.branchSize+72,"text-anchor":`start`,"font-size":M.value.labels.dataLabels.fontSize,fill:M.value.labels.color,onClick:s[10]||=()=>{K(),$(),D.value=!1}},C(w(c)({v:e.value/z.value*100,s:`%`,r:M.value.labels.dataLabels.roundingPercentage}))+` `+C(A.value.translations.proportionToTree),9,Xt)):m(``,!0)]))),256)),S(e.$slots,`svg`,{svg:{...L.value,isPrintingImg:w(sr)||w(cr)||w(Qr),isPrintingSvg:w($r)}},void 0,!0)],46,et)):m(``,!0)]),e.$slots.watermark?(y(),h(`div`,Zt,[S(e.$slots,`watermark`,Be(Le({isPrinting:w(sr)||w(cr)||w(Qr)||w($r)})),void 0,!0)])):m(``,!0),S(e.$slots,`legend`,{legend:B.value},void 0,!0),e.$slots.source?(y(),h(`div`,Qt,[S(e.$slots,`source`,{},void 0,!0)],512)):m(``,!0),qn.value&&A.value.userOptions.buttons.table?(y(),Me(He(Wr.value.component),Re({key:6},Wr.value.props,{ref_key:`tableUnit`,ref:Xn,onClose:Kr}),Ne({content:Ke(()=>[g(`div`,{ref_key:`tableContainer`,ref:mr,class:`vue-ui-chestnut-table`,style:v(`${A.value.table.useDialog?``:`max-height: 300px;margin-top:24px`}`)},[g(`div`,{style:v(`${A.value.table.useDialog?``:`padding-top:36px;`}position: relative`)},[A.value.table.useDialog?m(``,!0):(y(),h(`div`,{key:0,role:`button`,tabindex:`0`,style:v(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:${I.value?`pointer`:`default`}; background:${A.value.table.th.backgroundColor};`),onClick:Kr,onKeypress:qe(Kr,[`enter`])},[Fe(w(Bn),{name:`close`,stroke:A.value.table.th.color,"stroke-width":2},null,8,[`stroke`])],36)),g(`div`,{style:{width:`100%`},class:_({"vue-ui-responsive":w(Gr)})},[g(`table`,$t,[A.value.table.useDialog?m(``,!0):(y(),h(`caption`,{key:0,style:v({backgroundColor:A.value.table.th.backgroundColor,color:A.value.table.th.color,outline:A.value.table.th.outline}),class:`vue-ui-data-table__caption`},[Pe(C(P.value.title.text)+` `,1),P.value.title.subtitle.text?(y(),h(`span`,en,C(P.value.title.subtitle.text),1)):m(``,!0)],4)),g(`thead`,null,[g(`tr`,{role:`row`,style:v(`background:${A.value.table.th.backgroundColor};color:${A.value.table.th.color}`)},[(y(!0),h(f,null,x(Y.value.head,e=>(y(),h(`th`,{style:v(`outline:${A.value.table.th.outline}`)},C(e),5))),256))],4)]),g(`tbody`,null,[(y(!0),h(f,null,x(Y.value.body,(e,t)=>(y(),h(`tr`,{class:_({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":t%2==0,"vue-ui-data-table__tbody__row-odd":t%2!=0}),style:v(`background:${A.value.table.td.backgroundColor};color:${A.value.table.td.color}`)},[g(`td`,{class:`vue-ui-data-table__tbody__td`,style:v(`outline:${A.value.table.td.outline}`),"data-cell":Y.value.head[0]},[g(`div`,nn,[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?(y(),h(`span`,rn)):(y(),h(`span`,an,C(e.rootName),1))])],12,tn),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:v(`outline:${A.value.table.td.outline}`),"data-cell":Y.value.head[1]},[g(`div`,sn,[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?(y(),h(`span`,cn)):(y(),h(`span`,ln,C(e.rootValue.toFixed(A.value.table.td.roundingValue)),1))])],12,on),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:v(`outline:${A.value.table.td.outline}`),"data-cell":Y.value.head[2]},[g(`div`,dn,[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?(y(),h(`span`,fn)):(y(),h(`span`,pn,C((e.rootToTotal*100).toFixed(A.value.table.td.roundingPercentage))+`% `,1))])],12,un),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:v(`outline:${A.value.table.td.outline}`),"data-cell":Y.value.head[3]},[g(`div`,hn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(y(),h(`span`,gn)):(y(),h(`span`,_n,C(e.branchName),1))])],12,mn),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:v(`outline:${A.value.table.td.outline}`),"data-cell":Y.value.head[4]},[g(`div`,yn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(y(),h(`span`,bn)):(y(),h(`span`,xn,C(e.branchValue.toFixed(A.value.table.td.roundingValue)),1))])],12,vn),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:v(`outline:${A.value.table.td.outline}`),"data-cell":Y.value.head[5]},[g(`div`,Cn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(y(),h(`span`,wn)):(y(),h(`span`,Tn,C((e.branchToRoot*100).toFixed(A.value.table.td.roundingPercentage))+`% `,1))])],12,Sn),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:v(`outline:${A.value.table.td.outline}`),"data-cell":Y.value.head[6]},[g(`div`,Dn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(y(),h(`span`,On)):(y(),h(`span`,kn,C((e.branchToTotal*100).toFixed(A.value.table.td.roundingPercentage))+`% `,1))])],12,En),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:v(`outline:${A.value.table.td.outline}`),"data-cell":Y.value.head[7]},[g(`div`,jn,C(e.nutName),1)],12,An),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:v(`outline:${A.value.table.td.outline}`),"data-cell":Y.value.head[8]},[g(`div`,Nn,C(e.nutValue.toFixed(A.value.table.td.roundingValue)),1)],12,Mn),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:v(`outline:${A.value.table.td.outline}`),"data-cell":Y.value.head[9]},[g(`div`,Fn,C((e.nutToBranch*100).toFixed(A.value.table.td.roundingPercentage))+`% `,1)],12,Pn),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:v(`outline:${A.value.table.td.outline}`),"data-cell":Y.value.head[10]},[g(`div`,Ln,C((e.nutToRoot*100).toFixed(A.value.table.td.roundingPercentage))+`% `,1)],12,In),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:v(`outline:${A.value.table.td.outline}`),"data-cell":Y.value.head[11]},[g(`div`,zn,C((e.nutToTotal*100).toFixed(A.value.table.td.roundingPercentage))+`% `,1)],12,Rn)],6))),256))])])],2)],4)],4)]),_:2},[A.value.table.useDialog?{name:`title`,fn:Ke(()=>[Pe(C(Wr.value.title),1)]),key:`0`}:void 0,A.value.table.useDialog?{name:`actions`,fn:Ke(()=>[g(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:s[11]||=e=>Ir(A.value.userOptions.callbacks.csv)},[Fe(w(Bn),{name:`fileCsv`,stroke:Wr.value.props.color},null,8,[`stroke`])])]),key:`1`}:void 0]),1040)):m(``,!0),S(e.$slots,`skeleton`,{},()=>[w(er)?(y(),Me(xe,{key:0})):m(``,!0)],!0)],46,Ye))}},[[`__scopeId`,`data-v-41623f2b`]]);export{Je as n,Bn as t};
@@ -0,0 +1,21 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s,t as c}from"./tableIntegration-CNoJ1CIY.js";import{t as l}from"./chartImage-DPGnEuYM.js";import{n as ee}from"./resolveChartConfig-0IvbmIE_.js";import{$ as te,D as ne,Ht as re,S as ie,X as ae,Y as oe,at as se,i as ce,in as le,nt as ue,r as de,sn as fe,t as pe,w as me,yt as he,zt as ge}from"./lib-rPeBMZrn.js";import{c as _e}from"./canvas-lib-22VpOI4_.js";import{n as ve}from"./useHints-C-TwxM0Y.js";import{t as ye}from"./useConfig-_JwRfIqE.js";import{n as be,t as xe}from"./BaseScanner-8NdoBs7B.js";import{t as Se}from"./usePrinter-DVf3YcG5.js";import{t as Ce}from"./useResponsive-CENUxfEL.js";import{t as we}from"./useChartExport-BZts4KFb.js";import{t as Te}from"./useUserOptionState-CXlFnwPv.js";import{t as Ee}from"./useChartAccessibility-DOMuYJfm.js";import{t as De}from"./Shape-CRe8woTu.js";import{n as Oe}from"./Title-BliHuXfT.js";import{t as ke}from"./vue_ui_chord-Crjq1pgV.js";import{t as Ae}from"./Legend-W9YVYVX-.js";import{t as je}from"./A11yDataTable-DWNlWXzs.js";import{t as Me}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as u,Teleport as Ne,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Pe,createTextVNode as Fe,createVNode as Ie,defineAsyncComponent as g,guardReactiveProps as Le,mergeProps as Re,nextTick as ze,normalizeClass as _,normalizeProps as Be,normalizeStyle as v,onBeforeUnmount as Ve,onMounted as He,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as Ue,shallowRef as We,toDisplayString as C,toRefs as Ge,unref as w,useCssVars as Ke,watch as qe,withCtx as T,withModifiers as Je}from"vue";var Ye=/* @__PURE__ */ e({default:()=>Dt}),Xe=[`id`],Ze=[`id`],Qe=[`id`],$e=[`xmlns`,`viewBox`,`aria-describedby`],et=[`width`,`height`],tt={key:1},nt=[`id`,`d`],rt={key:2},it=[`transform`],at=[`d`,`fill`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],ot=[`d`,`fill`,`stroke`,`stroke-width`],st=[`d`,`fill`],ct=[`d`,`fill`,`stroke`,`stroke-width`,`onMouseenter`,`onClick`,`onMouseleave`],lt=[`d`,`fill`,`stroke`,`stroke-width`],ut=[`d`,`fill`,`stroke`,`stroke-width`],dt=[`d`,`fill`,`stroke`,`stroke-width`],ft={key:0},pt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],mt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],ht=[`cx`,`cy`,`r`,`stroke`,`stroke-width`,`fill`],gt=[`transform`,`fill`,`text-anchor`,`font-size`,`font-weight`],_t={key:1},vt=[`font-size`,`font-weight`,`fill`],yt=[`href`],bt=[`transform`,`text-anchor`,`font-size`,`font-weight`,`fill`,`innerHTML`],xt={key:5,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},St={key:6,class:`vue-data-ui-watermark`},Ct=[`id`],wt=[`onClick`],Tt={key:9,"data-dom-to-png-ignore":``,class:`reset-wrapper`},Et={style:{"text-align":`right`,width:`100%`}},Dt=/*#__PURE__*/ Me({__name:`vue-ui-chord`,props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},emits:[`selectLegend`,`selectGroup`,`selectRibbon`,`copyAlt`],setup(e,{expose:Me,emit:Ye}){Ke(e=>({v099901df:e.slicerColor}));let Dt=g(()=>import(`./vue-ui-accordion-DxGxf-Rm.js`).then(e=>e.n)),Ot=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),kt=g(()=>import(`./DataTable-KeuZB1JM.js`)),At=g(()=>import(`./PackageVersion-ksOit8fp.js`).then(e=>e.t)),jt=g(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Mt=g(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Nt=g(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_chord:Pt}=ye(),E=e,Ft=Ye,D=b(!!E.dataset&&Object.hasOwn(E.dataset,`matrix`)),O=b(ae()),k=b(null),A=b(null),j=b(null),It=b(0),M=b(null),Lt=b(null),Rt=b(null),zt=b(null),Bt=b(null),Vt=b(0),Ht=b(0),Ut=b(0),Wt=b(!1),N=We(null),P=We(null),Gt=b(!1),Kt=b(null),qt=b(null),F=b(`group`),I=b(null),Jt=b(!1),L=b(on()),R=d(()=>L.value.style.chart.arcs),z=d(()=>L.value.style.chart.ribbons),B=d(()=>L.value.style.chart);ve({config:()=>L.value,dataset:()=>E.dataset,component:`VueUiChord`,rules:[{test:e=>e.matrix&&e.matrix.length>12,message:[`👀 The number of groups > 12, the chart might become hard to read. Consider:`,``,`▶️ Using broader groups to reduce their number.`]}]});let V=d(()=>L.value.userOptions.useCursorPointer),Yt=d(()=>le({defaultConfig:{useCssAnimation:!1,userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,legend:{backgroundColor:`transparent`},arcs:{stroke:`#6A6A6A`,labels:{show:!1}},ribbons:{stroke:`#6A6A6A`,underlayerOpacity:0,labels:{show:!1}}}}},userConfig:L.value.skeletonConfig??{}})),{loading:Xt,FINAL_DATASET:H,manualLoading:Zt}=be({...Ge(E),FINAL_CONFIG:L,prepareConfig:on,callback:()=>{Promise.resolve().then(async()=>{await ze(),W.value.showTable=L.value.table.show})},skeletonDataset:E.config?.skeletonDataset??{matrix:[[12e3,6e3,9e3,3e3],[2e3,1e4,2e3,6001],[8e3,1600,8e3,8001],[1e3,1e3,1e3,7001]],labels:[],colors:[`#DBDBDB`,`#C4C4C4`,`#ADADAD`,`#969696`]},skeletonConfig:le({defaultConfig:L.value,userConfig:Yt.value})}),{userOptionsVisible:Qt,setUserOptionsVisibility:$t,keepUserOptionState:en}=Te({config:L.value}),{svgRef:U}=Ee({config:B.value.title}),{isPrinting:tn,isImaging:nn,generatePdf:rn,generateImage:an}=Se({elementId:`chord_${O.value}`,fileName:B.value.title.text||`vue-ui-chord`,options:L.value.userOptions.print}),W=b({showTable:L.value.table.show});function on(){return ee(E.config,Pt,ke)}qe(()=>E.config,e=>{Xt.value||(L.value=on()),Qt.value=!L.value.userOptions.showOnChartHover,cn(),Vt.value+=1,Ht.value+=1,Ut.value+=1,X.value=L.value.initialRotation,W.value.showTable=L.value.table.show},{deep:!0});let G=d(()=>L.value.debug);qe(()=>E.dataset,()=>{sn(),cn(),Vt.value+=1,Ht.value+=1,Ut.value+=1});function sn(){if(ge(E.dataset)){se({componentName:`VueUiChord`,type:`dataset`,debug:G.value}),D.value=!1,Zt.value=!0;return}let e=he({datasetObject:E.dataset,requiredAttributes:[`matrix`]});if(e.length){G.value&&e.forEach(e=>{se({componentName:`VueUiChord`,type:`datasetAttribute`,property:e})}),D.value=!1,Zt.value=!0;return}let t=E.dataset.matrix;if(!Array.isArray(t)||t.length<2){G.value&&console.warn(`VueUiChord: dataset.matrix requires a minimum of 2 datapoints, for example:
2
+
3
+ matrix:[
4
+ [1, 1],
5
+ [1, 1]
6
+ ]`),D.value=!1,Zt.value=!0;return}let n=t.length,r=t.findIndex(e=>!Array.isArray(e)||e.length!==n);r===-1?(D.value=!0,Zt.value=!1):(G.value&&console.warn(`VueUiChord - Invalid matrix: dataset.matrix at index ${r} has ${Array.isArray(t[r])?t[r].length:`NaN`} elements instead of the required ${n}
7
+
8
+ dataset.matrix[${r}] = [${Array.isArray(t[r])?t[r].toString():`invalid`}]`),D.value=!1,Zt.value=!0)}function cn(){if(sn(),L.value.responsive){let e=_e(()=>{let{width:e,height:t,heightNoTitle:n,heightSource:r,heightTitle:i,heightLegend:a}=Ce({chart:M.value,title:B.value.title.text?Lt.value:null,legend:B.value.legend.show?Rt.value:null,source:zt.value,noTitle:Bt.value}),o=i+a+r+n;e<t?M.value.style.width=`100%`:(M.value.style.height=`100%`,U.value.style.height=`calc(100% - ${o}px)`)},100);N.value&&(P.value&&N.value.unobserve(P.value),N.value.disconnect()),N.value=new ResizeObserver(e),P.value=M.value.parentNode,N.value.observe(P.value),e()}un.value=setTimeout(()=>{Wt.value=!0},500)}function ln(){!H.value||!Object.hasOwn(H.value,`matrix`)||H.value.matrix.length<2?(G.value&&console.warn(`VueUiChord: dataset.matrix requires a minimum of 2 datapoints, for example:
9
+
10
+ matrix:[
11
+ [1, 1],
12
+ [1, 1]
13
+ ]`),D.value=!1):H.value.matrix.forEach((e,t)=>{e.length!==H.value.matrix.length&&(G.value&&console.warn(`VueUiChord - Invalid matrix: dataset.matrix at index ${t} has ${e.length} elements instead of the required ${H.value.matrix.length}\n\ndataset.matrix[${t}] = [${e.toString()}] has a length of ${e.length} but should have the same length as the matrix itself (${H.value.matrix.length})`),D.value=!1)})}let un=b(null);He(()=>{Gt.value=!0,cn()});let K=b({height:600,width:600}),dn=d(()=>L.value.userOptions.show&&!B.value.title.text),fn=d(()=>me(L.value.customPalette)),q=d(()=>({inner:K.value.width*.3*R.value.innerRadiusRatio,outer:K.value.width*.34*R.value.outerRadiusRatio})),pn=d(()=>R.value.padAngle/100),J=d(()=>({matrix:H.value.matrix??[[0]],labels:H.value.labels??[``],colors:H.value.colors&&Array.isArray(H.value.colors)&&H.value.colors.length?H.value.colors.map(e=>ie(e)):H.value.matrix.map((e,t)=>fn.value[t]||re[t]||re[t%re.length])}));function mn(e,t){let n=e.length,r=q.value.inner,i=Array(n).fill(0),a=0;for(let t=0;t<n;t+=1)for(let r=0;r<n;r+=1)i[t]+=e[t][r],a+=e[t][r];let o=(2*Math.PI-t*n)/a,s=[],c=0;for(let e=0;e<n;e+=1){let n=c,r=n+i[e]*o;s.push({index:e,pattern:`pattern_${O.value}_${e}`,startAngle:n,endAngle:r,name:J.value.labels[e],id:ae(),color:J.value.colors[e],proportion:i[e]/a}),c=r+t}let l=[];for(let t=0;t<n;t+=1){let n=e[t].map((e,t)=>({j:t,v:e}));n.sort((e,t)=>t.v-e.v);let i=s[t].startAngle;for(let{j:e,v:a}of n){let n=i,c=n+a*o;l.push({index:t,subIndex:e,pattern:`pattern_${O.value}_${t}`,startAngle:n,endAngle:c,value:a,groupName:J.value.labels[t],groupId:s[t].id,groupColor:J.value.colors[t],midAngle:(n+c)/2,midBaseX:Math.cos((n+c)/2-Math.PI/2)*r,midBaseY:Math.sin((n+c)/2-Math.PI/2)*r}),i=c}}let ee=[];for(let e of l){let t=l.find(t=>t.index===e.subIndex&&t.subIndex===e.index);ee.push({source:e,target:t,id:ae()})}return{groups:s,chords:ee}}let Y=d(()=>{let e=mn(J.value.matrix,pn.value);return ln(),e.chords.sort((e,t)=>Math.max(t.source.value,t.target.value)-Math.max(e.source.value,e.target.value)),e}),hn=d(()=>{let e=q.value.outer+z.value.labels.offset+12,t=z.value.labels.fontSize*.6,n=[];if(A.value){let r=A.value;if(r.source.value){let i=String(r.source.value);n.push({id:r.id+`-src`,theta:r.source.midAngle,w:i.length*t/e,midBaseX:r.source.midBaseX,midBaseY:r.source.midBaseY,groupColor:r.source.groupColor,value:r.source.value})}if(r.target&&r.target.value&&r.target.value!==r.source.value){let i=String(r.target.value);n.push({id:r.id+`-tgt`,theta:r.target.midAngle,w:i.length*t/e,midBaseX:r.target.midBaseX,midBaseY:r.target.midBaseY,groupColor:r.target.groupColor,value:r.target.value})}return n}function r(r){Y.value.chords.filter(e=>e.source.groupId===r&&e.source.value).forEach(r=>{{let i=String(r.source.value);n.push({id:r.id+`-src`,theta:r.source.midAngle,w:i.length*t/e,midBaseX:r.source.midBaseX,midBaseY:r.source.midBaseY,groupColor:r.source.groupColor,value:r.source.value})}if(r.target&&r.target.value&&r.target.value!==r.source.value){let i=String(r.target.value);n.push({id:r.id+`-tgt`,theta:r.target.midAngle,w:i.length*t/e,midBaseX:r.target.midBaseX,midBaseY:r.target.midBaseY,groupColor:r.target.groupColor,value:r.target.value})}})}return j.value&&r(j.value),k.value&&r(k.value.id),n}),gn=d(()=>{let e=hn.value.map(e=>({...e})).sort((e,t)=>e.theta-t.theta),t=z.value.labels.minSeparationDeg*Math.PI/180,n=!0,r=0;for(;n&&r++<10;){n=!1;for(let r=1;r<e.length;r+=1){let i=e[r-1],a=e[r],o=i.theta+i.w+t;a.theta<o&&(a.theta=o,n=!0)}let r=e[0],i=e[e.length-1],a=i.theta+i.w+t-2*Math.PI;r.theta<a&&(r.theta=a,n=!0)}return e});function _n(e,t,n,r){let i=e-Math.PI/2,a=t-Math.PI/2,o=Math.cos(i)*n,s=Math.sin(i)*n,c=Math.cos(a)*n,l=Math.sin(a)*n,ee=Math.cos(a)*r,te=Math.sin(a)*r,ne=Math.cos(i)*r,re=Math.sin(i)*r,ie=+(t-e>Math.PI);return`M${o},${s} A${n},${n} 0 ${ie} 1 ${c},${l} L${ee},${te} A${r},${r} 0 ${ie} 0 ${ne},${re} Z`}function vn(e,t){let n=q.value.inner,r=e.startAngle-Math.PI/2,i=e.endAngle-Math.PI/2,a=t.startAngle-Math.PI/2,o=t.endAngle-Math.PI/2,s=Math.cos(r)*n,c=Math.sin(r)*n,l=Math.cos(i)*n,ee=Math.sin(i)*n,te=Math.cos(a)*n,ne=Math.sin(a)*n,re=Math.cos(o)*n,ie=Math.sin(o)*n;return`M${s},${c}A${n},${n} 0 ${+(e.endAngle-e.startAngle>Math.PI)} 1 ${l},${ee}Q0,0 ${te},${ne}A${n},${n} 0 ${+(t.endAngle-t.startAngle>Math.PI)} 1 ${re},${ie}Q0,0 ${s},${c}Z`}let yn=d(()=>X.value*Math.PI/180);function bn(e){return(e.startAngle+e.endAngle)/2}function xn(e){return((bn(e)+yn.value)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)}function Sn(e){let t=e+yn.value;return t=(t%(2*Math.PI)+2*Math.PI)%(2*Math.PI),t>Math.PI?`end`:`start`}function Cn(e){let t=e-Math.PI/2;return`translate(${Math.cos(t)*(q.value.outer+R.value.labels.offset+24)},${Math.sin(t)*(q.value.outer+R.value.labels.offset+24)})`}function wn(e,t,n){let r=e-Math.PI/2,i=t-Math.PI/2,a=Math.cos(r)*n,o=Math.sin(r)*n,s=Math.cos(i)*n,c=Math.sin(i)*n;return`M${a},${o} A${n},${n} 0 ${+(t-e>Math.PI)} 1 ${s},${c}`}let X=b(L.value.initialRotation),Tn=b(!1),En=0,Dn=0;function On(e){let t=U.value.getBoundingClientRect(),n=t.left+t.width/2,r=t.top+t.height/2,i=e.clientX??e.touches[0].clientX,a=e.clientY??e.touches[0].clientY;return Math.atan2(a-r,i-n)}function kn(e){L.value.enableRotation&&!Un.value&&(e.preventDefault(),Tn.value=!0,En=X.value,Dn=On(e))}function An(e){if(!Tn.value)return;let t=On(e);X.value=En+(t-Dn)*180/Math.PI}function jn(){Tn.value=!1}function Mn(e){return ce(z.value.labels.formatter,e,te({p:z.value.labels.prefix,v:e,s:z.value.labels.suffix,r:z.value.labels.rounding}))}He(()=>{window.addEventListener(`mousemove`,An),window.addEventListener(`mouseup`,jn),window.addEventListener(`touchmove`,An,{passive:!1}),window.addEventListener(`touchend`,jn)}),Ve(()=>{window.removeEventListener(`mousemove`,An),window.removeEventListener(`mouseup`,jn),window.removeEventListener(`touchmove`,An),window.removeEventListener(`touchend`,jn),clearTimeout(un.value),N.value&&(P.value&&N.value.unobserve(P.value),N.value.disconnect())});let Nn=b(!1);function Pn(e){Nn.value=e,It.value+=1}function Fn(e,t){L.value.events.datapointEnter&&L.value.events.datapointEnter({datapoint:e,seriesIndex:t}),j.value||(k.value=e)}function In(e,t){k.value=null,L.value.events.datapointLeave&&L.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function Ln(e,t){Ft(`selectGroup`,e),L.value.events.datapointClick&&L.value.events.datapointClick({datapoint:e,seriesIndex:t})}function Rn(e,t){L.value.events.datapointEnter&&L.value.events.datapointEnter({datapoint:e,seriesIndex:t}),j.value||(A.value=e)}function zn(e,t){A.value=null,L.value.events.datapointLeave&&L.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function Bn(e,t){Ft(`selectRibbon`,e),L.value.events.datapointClick&&L.value.events.datapointClick({datapoint:e,seriesIndex:t})}function Vn(e){return!j.value&&!k.value&&!A.value?.8:(j.value?j.value===e.source.groupId:k.value?k.value.id===e.source.groupId:A.value?.id===e.id)?1:.1}function Hn(e){return!j.value&&!k.value&&!A.value||(j.value?j.value===e.id:k.value?k.value.id===e.id:[A.value?.source.groupId,A.value?.target.groupId].includes(e.id))?1:.3}let Un=b(!1);function Wn(){Un.value=!Un.value}function Gn(){W.value.showTable=!W.value.showTable}function Kn(){return Y.value}let Z=b(null);function qn(){let e=L.value.initialRotation;Z.value!==null&&cancelAnimationFrame(Z.value);let t=()=>{X.value+=(e-X.value)*.05,Math.abs(X.value-e)<.1?(X.value=e,Z.value=null):Z.value=requestAnimationFrame(t)};Z.value=requestAnimationFrame(t)}Ve(()=>{Z.value!==null&&cancelAnimationFrame(Z.value)});function Jn(e){e===j.value?(j.value=null,Ft(`selectLegend`,null)):(j.value=e,Ft(`selectLegend`,Y.value.groups.find(t=>t.id===e)))}let Yn=d(()=>Y.value.groups.map((e,t)=>({name:e.name,color:e.color,shape:`circle`,patternIndex:t,pattern:`pattern_${O.value}_${t}`,id:e.id,select:()=>Jn(e.id),opacity:j.value?j.value===e.id?1:.3:1}))),Xn=d(()=>({cy:`chord-div-legend`,backgroundColor:B.value.legend.backgroundColor,color:B.value.legend.color,fontSize:B.value.legend.fontSize,paddingBottom:12,fontWeight:B.value.legend.bold?`bold`:``})),Q=d(()=>({head:Y.value.groups.map((e,t)=>({name:e.name||t,color:e.color})),body:J.value.matrix})),Zn=d(()=>{let e=[{name:``,color:null},...Q.value.head];return{colNames:e,head:e,body:Q.value.body.map((e,t)=>[Q.value.head[t],...Q.value.body[t]]),config:{th:{backgroundColor:L.value.table.th.backgroundColor,color:L.value.table.th.color,outline:L.value.table.th.outline},td:{backgroundColor:L.value.table.td.backgroundColor,color:L.value.table.td.color,outline:L.value.table.td.outline},breakpoint:L.value.table.responsiveBreakpoint}}});function Qn(e=null){ze(()=>{let t=J.value.matrix.map((e,t)=>[[J.value.labels[t]||t],e]),n=[[B.value.title.text],[B.value.title.subtitle.text],[[``],...J.value.labels.map((e,t)=>[e||t])]].concat(t),r=ne(n);e?e(r):ue({csvContent:r,title:B.value.title.text||`vue-ui-chord`})})}let $n=l(M,()=>B.value.title.text);function er(e,t){return`${J.value.labels[t]}${R.value.labels.showPercentage?te({p:` (`,v:isNaN(e.proportion)?0:e.proportion*100,s:`%)`,r:R.value.labels.roundingPercentage}):``}`}let tr=d(()=>c({config:L,style:B,mutableConfig:W,dialog:Nt,accordion:Dt,isFullscreen:Nn,parent:M,maxWidth:800,isCursorPointer:V}));qe(()=>W.value.showTable,e=>s(e,L,Kt));function nr(){W.value.showTable=!1,qt.value&&qt.value.setTableIconState(!1)}let rr=d(()=>B.value.backgroundColor),ir=d(()=>B.value.legend),ar=d(()=>B.value.title),{isCallbackImaging:or,isCallbackSvg:sr,generateSvg:cr,onGenerateImage:lr}=we({svg:U,title:ar,legend:ir,legendItems:Yn,backgroundColor:rr,getSvgCallback:()=>L.value.userOptions.callbacks.svg,generateImage:an});async function ur(){Ft(`copyAlt`,{config:L.value,dataset:J.value}),L.value.userOptions.callbacks.altCopy?await Promise.resolve(L.value.userOptions.callbacks.altCopy({config:L.value,dataset:J.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let dr=d(()=>(k.value?Y.value.chords.filter(e=>e.source.groupId===k.value.id):j.value?Y.value.chords.filter(e=>e.source.groupId===j.value):Y.value.chords).filter(e=>e.source.value)),$=d(()=>({groups:Y.value.groups.map((e,t)=>({type:`group`,index:t,item:e})),ribbons:dr.value.map((e,t)=>({type:`ribbon`,index:t,item:{...e,path:vn(e.source,e.target),color:J.value.colors[e.source.index]}}))})),fr=d(()=>({headers:[``,...Q.value.head.map(e=>e.name)],rows:Q.value.body.map((e,t)=>[Q.value.head[t]?.name??`${t}`,...e.map(e=>Mn(e))])}));function pr(e){let t=$.value.groups[e];t&&(F.value=`group`,I.value=e,A.value=null,k.value=t.item)}function mr(e){let t=$.value.ribbons[e];t&&(F.value=`ribbon`,I.value=e,k.value=null,A.value=t.item)}function hr(){I.value=null,F.value=`group`,k.value=null,A.value=null}function gr(){Jt.value=!0,F.value=`group`,I.value=null}function _r(){Jt.value=!1,hr()}function vr(e){if(!U.value||Un.value||document.activeElement!==U.value)return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`ArrowUp`,i=e.key===`ArrowDown`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){hr();return}if(r){F.value=`group`,$.value.groups.length&&pr(I.value===null?0:Math.min(I.value,$.value.groups.length-1));return}if(i){if(!$.value.ribbons.length)return;F.value=`ribbon`,mr(I.value===null?0:Math.min(I.value,$.value.ribbons.length-1));return}if(a){if(F.value===`group`){let e=$.value.groups[I.value];e&&Ln(e.item,e.index)}else{let e=$.value.ribbons[I.value];e&&Bn(e.item,e.index)}return}let s=F.value===`group`?$.value.groups:$.value.ribbons;if(!s.length)return;let c=I.value;c===null||c<0||c>=s.length?c=n?0:s.length-1:n?(c+=1,c>=s.length&&(c=0)):t&&(--c,c<0&&(c=s.length-1)),F.value===`group`?pr(c):mr(c)}return Me({getData:Kn,getImage:$n,generateCsv:Qn,generateImage:an,generateSvg:cr,generatePdf:rn,toggleAnnotator:Wn,toggleTable:Gn,toggleFullscreen:Pn,copyAlt:ur}),(e,s)=>(y(),m(`div`,{ref_key:`chordChart`,ref:M,class:_({"vue-data-ui-component":!0,"vue-ui-chord":!0,"vue-data-ui-wrapper-fullscreen":Nn.value,"vue-data-ui-responsive":L.value.responsive}),style:v(`font-family:${L.value.style.fontFamily};width:100%; text-align:center;background:${B.value.backgroundColor}`),id:`chord_${O.value}`,onMouseenter:s[2]||=()=>w($t)(!0),onMouseleave:s[3]||=()=>w($t)(!1)},[h(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[h(`p`,null,C(L.value.a11y.translations.keyboardNavigation),1)],8,Ze),fr.value?.rows?.length?(y(),f(je,{key:0,uid:O.value,head:fr.value.headers,body:fr.value.rows,notice:L.value.a11y.translations.tableAvailable,caption:L.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):p(``,!0),L.value.userOptions.buttons.annotator&&w(U)?(y(),f(w(jt),Re({key:1},w(a)(L.value.userOptions.annotator),{color:B.value.color,backgroundColor:B.value.backgroundColor,active:Un.value,svgRef:w(U),isCursorPointer:V.value,palette:L.value.userOptions.annotatorPalette,onClose:Wn}),Pe({_:2},[x(w(o),t=>({name:t,fn:T(n=>[S(e.$slots,t,Be(Le(w(i)(t,n))),void 0,!0)])}))]),1040,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`,`palette`])):p(``,!0),S(e.$slots,`userConfig`,{},void 0,!0),dn.value?(y(),m(`div`,{key:2,ref_key:`noTitle`,ref:Bt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),B.value.title.text?(y(),m(`div`,{key:3,ref_key:`chartTitle`,ref:Lt,style:`width:100%;background:transparent;padding-bottom:24px`},[(y(),f(Oe,{key:`title_${Vt.value}`,config:{title:{cy:`chord-div-title`,...B.value.title},subtitle:{cy:`chord-div-subtitle`,...B.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),h(`div`,{id:`legend-top-${O.value}`},null,8,Qe),L.value.userOptions.show&&D.value&&(w(en)||w(Qt))?(y(),f(w(Mt),Re({ref_key:`userOptionsRef`,ref:qt,key:`user_option_${It.value}`,backgroundColor:B.value.backgroundColor,color:B.value.color,isPrinting:w(tn),isImaging:w(nn),uid:O.value,hasTooltip:!1,hasLabel:!1,isFullscreen:Nn.value,chartElement:M.value},w(n)(L.value.userOptions,`pdf csv img svg table fullscreen altCopy annotator`),{isAnnotation:Un.value,tableDialog:L.value.table.useDialog,isCursorPointer:V.value,onToggleFullscreen:Pn,onGeneratePdf:w(rn),onGenerateCsv:Qn,onGenerateImage:w(lr),onGenerateSvg:w(cr),onToggleTable:Gn,onToggleAnnotator:Wn,onCopyAlt:ur,style:{visibility:w(en)?w(Qt)?`visible`:`hidden`:`visible`}}),Pe({_:2},[x(w(t)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:T(n=>[S(e.$slots,t,Be(Le(w(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):p(``,!0),(y(),m(`svg`,{xmlns:w(pe),ref_key:`svgRef`,ref:U,viewBox:`0 0 ${K.value.width} ${K.value.height}`,"aria-describedby":`chart-instructions-${O.value}`,tabindex:`0`,preserveAspectRatio:`xMidYMid meet`,style:{overflow:`visible`},class:_({"vue-ui-chord-rotating":Tn.value,"vue-ui-chord-idle":!Tn.value}),onMousedown:Je(kn,[`prevent`]),onTouchstart:Je(kn,[`prevent`]),onFocus:gr,onBlur:_r,onKeydown:vr},[Ie(w(At)),S(e.$slots,`svg-underlayer`,{svg:{height:600,width:600,isPrintingImg:w(tn)||w(nn)||w(or),isPrintingSvg:w(sr)}},void 0,!0),e.$slots[`chart-background`]?(y(),m(`foreignObject`,{key:0,x:0,y:0,width:K.value.width<=0?10:K.value.width,height:K.value.height<=0?10:K.value.height,style:{pointerEvents:`none`}},[S(e.$slots,`chart-background`,{},void 0,!0)],8,et)):p(``,!0),R.value.labels.curved?(y(),m(`defs`,tt,[(y(!0),m(u,null,x(Y.value.groups,(e,t)=>(y(),m(`path`,{key:`labelPath-${t}`,id:`labelPath-${t}_${O.value}`,d:wn(e.startAngle,e.endAngle,(q.value.inner+q.value.outer)/2+R.value.labels.offset),fill:`none`},null,8,nt))),128))])):p(``,!0),e.$slots.pattern?(y(),m(`g`,rt,[(y(!0),m(u,null,x(Y.value.groups,(t,n)=>(y(),m(`defs`,null,[S(e.$slots,`pattern`,Re({ref_for:!0},{seriesIndex:t.index,patternId:`pattern_${O.value}_${n}`}),void 0,!0)]))),256))])):p(``,!0),h(`g`,{transform:`translate(${K.value.width/2}, ${K.value.height/2}) rotate(${X.value})`},[(y(!0),m(u,null,x(Y.value.groups,(t,n)=>(y(),m(`g`,null,[(y(),m(`path`,{class:_({"vue-ui-chord-arc":!0,"vue-ui-chord-arc-animated":L.value.useCssAnimation&&!Wt.value}),key:`arc-${n}`,d:_n(t.startAngle,t.endAngle,q.value.outer,q.value.inner),fill:J.value.colors[n],stroke:R.value.stroke,"stroke-width":R.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:v({opacity:Hn(t)}),onMouseenter:e=>Fn(t,n),onMouseleave:e=>In(t,n),onClick:e=>Ln(t,n)},null,46,at)),e.$slots.pattern?(y(),m(`path`,{class:_({"vue-ui-chord-arc":!0,"vue-ui-chord-arc-animated":L.value.useCssAnimation&&!Wt.value}),key:`arc-${n}`,d:_n(t.startAngle,t.endAngle,q.value.outer,q.value.inner),fill:`url(#${t.pattern})`,stroke:R.value.stroke,"stroke-width":R.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:v({opacity:Hn(t),pointerEvents:`none`})},null,14,ot)):p(``,!0)]))),256)),h(`g`,null,[(y(!0),m(u,null,x(k.value?Y.value.chords.filter(e=>e.source.groupId===k.value.id):j.value?Y.value.chords.filter(e=>e.source.groupId===j.value):Y.value.chords,(t,n)=>(y(),m(u,{key:`ribbon-${t.id}`},[t.source.value?(y(),m(`path`,{key:0,class:_({"vue-ui-chord-ribbon":!0}),d:vn(t.source,t.target),fill:B.value.backgroundColor,style:v({opacity:z.value.underlayerOpacity})},null,12,st)):p(``,!0),t.source.value?(y(),m(`path`,{key:1,class:_({"vue-ui-chord-ribbon":!0}),d:vn(t.source,t.target),fill:J.value.colors[t.source.index],stroke:z.value.stroke,"stroke-width":z.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:v({opacity:Vn(t)}),onMouseenter:e=>Rn({...t,path:vn(t.source,t.target),color:J.value.colors[t.source.index]},n),onClick:e=>Bn({...t,color:J.value.colors[t.source.index]},n),onMouseleave:e=>zn({...t,color:J.value.colors[t.source.index]},n)},null,44,ct)):p(``,!0),t.source.value&&e.$slots.pattern?(y(),m(`path`,{key:2,class:_({"vue-ui-chord-ribbon":!0}),d:vn(t.source,t.target),fill:`url(#pattern_${O.value}_${t.source.index})`,stroke:z.value.stroke,"stroke-width":z.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:v({opacity:Vn(t),pointerEvents:`none`})},null,12,lt)):p(``,!0)],64))),128)),A.value?(y(),m(`path`,{key:0,d:A.value.path,fill:A.value.color,stroke:z.value.stroke,"stroke-width":z.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:_({"vue-ui-chord-ribbon":!0}),style:{pointerEvents:`none`}},null,8,ut)):p(``,!0),A.value&&e.$slots.pattern?(y(),m(`path`,{key:1,d:A.value.path,fill:`url(#${A.value.source.pattern})`,stroke:z.value.stroke,"stroke-width":z.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:_({"vue-ui-chord-ribbon":!0}),style:{pointerEvents:`none`}},null,8,dt)):p(``,!0)]),(k.value||A.value||j.value)&&z.value.labels.show?(y(),m(`g`,ft,[(y(!0),m(u,null,x(gn.value,e=>(y(),m(u,{key:e.id},[h(`line`,{x1:e.midBaseX,y1:e.midBaseY,x2:Math.cos(e.theta-Math.PI/2)*(q.value.outer+z.value.labels.offset+12),y2:Math.sin(e.theta-Math.PI/2)*(q.value.outer+z.value.labels.offset+12),stroke:B.value.backgroundColor,"stroke-width":z.value.labels.connector.strokeWidth*3,"pointer-events":`none`},null,8,pt),h(`line`,{x1:e.midBaseX,y1:e.midBaseY,x2:Math.cos(e.theta-Math.PI/2)*(q.value.outer+z.value.labels.offset+12),y2:Math.sin(e.theta-Math.PI/2)*(q.value.outer+z.value.labels.offset+12),stroke:z.value.labels.connector.stroke,"stroke-width":z.value.labels.connector.strokeWidth,"pointer-events":`none`},null,8,mt),z.value.labels.marker.show?(y(),m(`circle`,{key:0,cx:Math.cos(e.theta-Math.PI/2)*(q.value.outer+z.value.labels.offset+12),cy:Math.sin(e.theta-Math.PI/2)*(q.value.outer+z.value.labels.offset+12),r:z.value.labels.marker.radius,stroke:z.value.labels.marker.stroke,"stroke-width":z.value.labels.marker.strokeWidth,fill:e.groupColor,"pointer-events":`none`},null,8,ht)):p(``,!0),h(`text`,{transform:`
14
+ translate(
15
+ ${Math.cos(e.theta-Math.PI/2)*(q.value.outer+z.value.labels.offset+24)},
16
+ ${Math.sin(e.theta-Math.PI/2)*(q.value.outer+z.value.labels.offset+24)}
17
+ ) rotate(${-X.value})
18
+ `,fill:z.value.labels.useSerieColor?e.groupColor:z.value.labels.color,"text-anchor":Sn(e.theta),"font-size":z.value.labels.fontSize,"font-weight":z.value.labels.bold?`bold`:`normal`,dy:`.35em`,"pointer-events":`none`},C(Mn(e.value)),9,gt)],64))),128))])):p(``,!0),R.value.labels.show?(y(),m(`g`,_t,[R.value.labels.curved?(y(!0),m(u,{key:0},x(Y.value.groups,(e,t)=>(y(),m(`text`,{class:`vue-ui-chord-label-curved`,key:`curved-label-${t}`,"font-size":R.value.labels.fontSize,"font-weight":R.value.labels.bold?`bold`:`normal`,fill:R.value.labels.adaptColorToBackground?w(de)(J.value.colors[t]):R.value.labels.color},[h(`textPath`,{href:`#labelPath-${t}_${O.value}`,startOffset:`50%`,"text-anchor":`middle`},C(J.value.labels[t])+C(R.value.labels.showPercentage?w(te)({p:` (`,v:isNaN(e.proportion)?0:e.proportion*100,s:`%)`,r:R.value.labels.roundingPercentage}):``),9,yt)],8,vt))),128)):!k.value&&!A.value&&!j.value?(y(!0),m(u,{key:1},x(Y.value.groups,(e,t)=>(y(),m(`text`,{class:`vue-ui-chord-label-straight`,key:`label-${t}`,transform:`
19
+ ${Cn((e.startAngle+e.endAngle)/2)}
20
+ rotate(${-X.value})
21
+ `,dy:`.35em`,"text-anchor":xn(e)>Math.PI?`end`:`start`,"font-size":R.value.labels.fontSize,"font-weight":R.value.labels.bold?`bold`:`normal`,fill:R.value.labels.color,innerHTML:w(oe)({content:w(fe)(er(e,t)),fontSize:R.value.labels.fontSize,fill:R.value.labels.color,x:0,y:0})},null,8,bt))),128)):p(``,!0)])):p(``,!0)],8,it),S(e.$slots,`svg`,{svg:{height:600,width:600,isPrintingImg:w(tn)||w(nn)||w(or),isPrintingSvg:w(sr)}},void 0,!0)],42,$e)),e.$slots.hint?(y(),m(`div`,xt,[S(e.$slots,`hint`,Be(Le({hint:L.value.a11y.translations.keyboardNavigation,isVisible:Jt.value})),void 0,!0)])):p(``,!0),e.$slots.watermark?(y(),m(`div`,St,[S(e.$slots,`watermark`,Be(Le({isPrinting:w(tn)||w(nn)||w(or)||w(sr)})),void 0,!0)])):p(``,!0),h(`div`,{id:`legend-bottom-${O.value}`},null,8,Ct),Gt.value&&(B.value.legend.show||e.$slots.legend)?(y(),f(Ne,{key:7,to:B.value.legend.position===`top`?`#legend-top-${O.value}`:`#legend-bottom-${O.value}`},[h(`div`,{ref_key:`chartLegend`,ref:Rt},[S(e.$slots,`legend`,{legend:Yn.value},()=>[B.value.legend.show?(y(),f(Ae,{key:`legend_${Ut.value}`,legendSet:Yn.value,config:Xn.value,isCursorPointer:V.value,onClickMarker:s[0]||=({legend:e})=>Jn(e.id)},Pe({item:T(({legend:e})=>[h(`div`,{style:v({opacity:j.value?j.value===e.id?1:.3:1}),onClick:t=>e.select()},C(e.name),13,wt)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:T(({legend:e,index:t})=>[Ie(De,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${O.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):p(``,!0)],!0)],512)],8,[`to`])):p(``,!0),e.$slots.source?(y(),m(`div`,{key:8,ref_key:`source`,ref:zt,dir:`auto`},[S(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),X.value===L.value.initialRotation?p(``,!0):(y(),m(`div`,Tt,[S(e.$slots,`reset-action`,{reset:qn},()=>[h(`button`,{"data-cy-reset":``,tabindex:`0`,role:`button`,class:`vue-data-ui-refresh-button`,style:v({background:B.value.backgroundColor,cursor:V.value?`pointer`:`default`}),onClick:qn},[Ie(w(Ot),{name:`refresh`,stroke:B.value.color},null,8,[`stroke`])],4)],!0)])),D.value&&L.value.userOptions.buttons.table?(y(),f(Ue(tr.value.component),Re({key:10},tr.value.props,{ref_key:`tableUnit`,ref:Kt,onClose:nr}),Pe({content:T(()=>[(y(),f(w(kt),{key:`table_${Ht.value}`,colNames:Zn.value.colNames,head:Zn.value.head,body:Zn.value.body,config:Zn.value.config,title:L.value.table.useDialog?``:tr.value.title,withCloseButton:!L.value.table.useDialog,isCursorPointer:V.value,onClose:nr},{th:T(({th:e})=>[Fe(C(e.name),1)]),td:T(({td:e})=>[h(`div`,Et,C(e.name?e.name:Mn(e)),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[L.value.table.useDialog?{name:`title`,fn:T(()=>[Fe(C(tr.value.title),1)]),key:`0`}:void 0,L.value.table.useDialog?{name:`actions`,fn:T(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:s[1]||=e=>Qn(L.value.userOptions.callbacks.csv),style:v({cursor:V.value?`pointer`:`default`})},[Ie(w(Ot),{name:`fileCsv`,stroke:tr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),S(e.$slots,`skeleton`,{},()=>[w(Xt)?(y(),f(xe,{key:0})):p(``,!0)],!0)],46,Xe))}},[[`__scopeId`,`data-v-2c749955`]]);export{Ye as n,Dt as t};
@@ -0,0 +1,13 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s}from"./annotationViewport-X8fvs7pz.js";import{t as c}from"./tableIntegration-CNoJ1CIY.js";import{t as l}from"./chartImage-DPGnEuYM.js";import{n as u}from"./resolveChartConfig-0IvbmIE_.js";import{$ as d,D as f,Dt as p,Ft as m,Ht as ee,Q as h,S as g,X as te,Zt as ne,at as re,i as ie,in as ae,nn as oe,nt as se,q as ce,r as le,t as ue,tn as de,w as fe,zt as pe}from"./lib-rPeBMZrn.js";import{c as me}from"./canvas-lib-22VpOI4_.js";import{n as he,t as ge}from"./useHints-C-TwxM0Y.js";import{t as _e}from"./useConfig-_JwRfIqE.js";import{t as ve}from"./usePrinter-DVf3YcG5.js";import{n as ye,t as be}from"./BaseScanner-8NdoBs7B.js";import{t as xe}from"./useResponsive-CENUxfEL.js";import{t as Se}from"./useChartExport-BZts4KFb.js";import{t as Ce}from"./useTransitions-ChGGrtrv.js";import{t as we}from"./useUserOptionState-CXlFnwPv.js";import{t as Te}from"./useChartAccessibility-DOMuYJfm.js";import{n as Ee}from"./Title-BliHuXfT.js";import{t as De}from"./vue_ui_circle_pack-DarCZyF2.js";import{t as Oe}from"./usePanZoom-CE6Ofyy8.js";import{t as ke}from"./A11yDataTable-DWNlWXzs.js";import{t as Ae}from"./DefGrad-DKMq1REY.js";import{t as je}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as _,computed as v,createBlock as y,createCommentVNode as b,createElementBlock as x,createElementVNode as S,createSlots as Me,createTextVNode as Ne,createVNode as Pe,defineAsyncComponent as C,guardReactiveProps as w,mergeProps as T,nextTick as Fe,normalizeClass as E,normalizeProps as D,normalizeStyle as Ie,onBeforeUnmount as Le,onMounted as Re,openBlock as O,ref as k,renderList as A,renderSlot as j,resolveDynamicComponent as ze,toDisplayString as M,toRefs as Be,unref as N,useCssVars as Ve,watch as He,withCtx as P}from"vue";function Ue(e,t=0){let n=e.reduce((e,{x:n,r})=>Math.min(e,n-r-t),1/0),r=e.reduce((e,{x:n,r})=>Math.max(e,n+r+t),-1/0),i=e.reduce((e,{y:n,r})=>Math.min(e,n-r-t),1/0),a=e.reduce((e,{y:n,r})=>Math.max(e,n+r+t),-1/0);return[n,i,r-n,a-i]}function We(e,t,n){let r=e._,i=e.next._,a=r.r+i.r,o=(r.x*i.r+i.x*r.r)/a,s=(r.y*i.r+i.y*r.r)/a;return Math.max(Math.abs(o*n),Math.abs(s*t))}function Ge(e,t,n){let r=We,i=e.length;if(!i)return e;e.sort((e,t)=>t.r-e.r);let a,o,s;if(a=e[0],a.x=0,a.y=0,!(i>1))return e;if(o=e[1],a.x=-o.r,o.x=a.r,o.y=0,!(i>2))return Je(e,n,t),e;Ke(o,a,s=e[2]),a=new tt(a),o=new tt(o),s=new tt(s),a.next=s.previous=o,o.next=a.previous=s,s.next=o.previous=a;packLoop:for(let c=3;c<i;++c){Ke(a._,o._,s=e[c]),s=new tt(s);let i=o.next,l=a.previous,u=o._.r,d=a._.r;do if(u<=d){if(qe(i._,s._)){o=i,a.next=o,o.previous=a,--c;continue packLoop}u+=i._.r,i=i.next}else{if(qe(l._,s._)){a=l,a.next=o,o.previous=a,--c;continue packLoop}d+=l._.r,l=l.previous}while(i!==l.next);s.previous=a,s.next=o,a.next=o.previous=o=s;let f=a,p=r(a,n,t),m=a.next;for(;m!==o;){let e=r(m,n,t);e<p&&(f=m,p=e),m=m.next}a=f,o=a.next}return Je(e,n,t),Ze(e,n,t),e}function Ke(e,t,n){let r=e.x-t.x,i=e.y-t.y,a=r*r+i*i;if(a){let o=(t.r+n.r)**2,s=(e.r+n.r)**2;if(o>s){let t=(a+s-o)/(2*a),c=Math.sqrt(Math.max(0,s/a-t*t));n.x=e.x-t*r-c*i,n.y=e.y-t*i+c*r}else{let e=(a+o-s)/(2*a),c=Math.sqrt(Math.max(0,o/a-e*e));n.x=t.x+e*r-c*i,n.y=t.y+e*i+c*r}}else n.x=t.x+n.r,n.y=t.y}function qe(e,t){let n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Je(e,t,n){if(e.length<4)return;let r=e[0].r,i=e.findIndex(e=>e.r<r*.6),a=i===-1?Math.min(e.length,12):i,o=e.slice(0,Math.max(3,a));for(let t=0;t<80;t+=1){let t=!1;for(let n=0;n<o.length;n+=1){let r=o[n],i=.06*(1-n/Math.max(1,o.length)),a=r.x*(1-i),s=r.y*(1-i);Ye(r,a,s,e,n)&&(r.x=a,r.y=s,t=!0)}if(Xe(o),!t)break}let s=o.reduce((e,t)=>e+t.x,0)/o.length,c=o.reduce((e,t)=>e+t.y,0)/o.length;for(let t of e)t.x-=s,t.y-=c}function Ye(e,t,n,r){let i=e.x,a=e.y;e.x=t,e.y=n;for(let t of r)if(t!==e&&qe(e,t))return e.x=i,e.y=a,!1;return e.x=i,e.y=a,!0}function Xe(e){for(let t=0;t<6;t+=1){let t=!1;for(let n=0;n<e.length-1;n+=1)for(let r=n+1;r<e.length;r+=1){let i=e[n],a=e[r],o=a.x-i.x,s=a.y-i.y,c=Math.sqrt(o*o+s*s)||1e-6,l=i.r+a.r;if(c<l){let e=(l-c)/2,n=o/c,r=s/c;i.x-=n*e,i.y-=r*e,a.x+=n*e,a.y+=r*e,t=!0}}if(!t)break}}function Ze(e,t,n){if(e.length<6)return;let r=e[0].r,i=e.findIndex(e=>e.r<=r*.45);if(i!==-1)for(let r=i;r<e.length;r+=1){let i=e[r],a=Qe(i,e.slice(0,r),t,n);a&&(i.x=a.x,i.y=a.y)}}function Qe(e,t,n,r){if(t.length<2)return null;let i=null,a=1/0;for(let o=0;o<t.length-1;o+=1)for(let s=o+1;s<t.length;s+=1){let c=t[o],l=t[s],u=$e(c,l,e.r);for(let o of u){if(!o)continue;let s={...e,x:o.x,y:o.y};if(!F(s,t))continue;let c=et(s,t,n,r);c<a&&(a=c,i=o)}}return i}function $e(e,t,n){let r=e.r+n,i=t.r+n,a=t.x-e.x,o=t.y-e.y,s=a*a+o*o,c=Math.sqrt(s);if(!c||c>r+i||c<Math.abs(r-i))return[];let l=(r*r-i*i+s)/(2*c),u=r*r-l*l;if(u<0)return[];let d=Math.sqrt(u),f=a/c,p=o/c,m=e.x+l*f,ee=e.y+l*p,h=-p*d,g=f*d;return[{x:m+h,y:ee+g},{x:m-h,y:ee-g}]}function F(e,t){for(let n of t)if(qe(n,e))return!1;return!0}function et(e,t,n,r){let i=e.x/Math.max(1,n),a=e.y/Math.max(1,r),o=i*i+a*a,s=[];for(let n of t){let t=e.x-n.x,r=e.y-n.y,i=Math.sqrt(t*t+r*r)-(e.r+n.r);s.push(i)}s.sort((e,t)=>e-t);let c=s[0]??0,l=s[1]??c,u=s[2]??l;return c*8+l*4+u*2+o*e.r*12}var tt=class{constructor(e){this._=e,this.next=null,this.previous=null}},nt=/* @__PURE__ */ e({default:()=>I}),rt=[`id`],it=[`id`],at=[`xmlns`,`aria-describedby`,`viewBox`],ot=[`x`,`y`,`width`,`height`],st={key:0},ct=[`x`,`y`,`width`,`height`,`stroke`,`stroke-width`,`fill`,`rx`,`onMouseenter`,`onMouseout`,`onClick`],lt=[`x`,`y`,`width`,`height`,`stroke`,`stroke-width`,`fill`,`rx`],ut=[`x`,`y`,`width`,`height`,`fill`,`rx`],dt=[`transform`,`font-size`,`fill`,`font-weight`],ft=[`transform`,`font-size`,`fill`,`font-weight`],pt={key:1,style:{pointerEvents:`none`}},mt=[`stroke`,`stroke-width`,`stroke-dasharray`,`opacity`,`d`],ht=[`x`,`y`,`width`,`height`,`rx`,`ry`,`fill`,`stroke`,`stroke-width`,`filter`],gt=[`fill`,`x`,`y`,`rx`,`width`,`height`],_t=[`transform`,`font-size`,`fill`,`font-family`],vt=[`dy`],yt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},bt={key:5,class:`vue-data-ui-watermark`},xt={key:6,"data-dom-to-png-ignore":``,class:`reset-wrapper`},St={style:{display:`flex`,"align-items":`center`}},I=/*#__PURE__*/ je({__name:`vue-ui-circle-pack`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:je,emit:We}){Ve(e=>({v9b29cc6a:gr.value}));let Ke=C(()=>import(`./Tooltip-C1q0Qoh7.js`)),qe=C(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Je=C(()=>import(`./vue-ui-accordion-DxGxf-Rm.js`).then(e=>e.n)),Ye=C(()=>import(`./DataTable-KeuZB1JM.js`)),Xe=C(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Ze=C(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Qe=C(()=>import(`./PackageVersion-ksOit8fp.js`).then(e=>e.t)),$e=C(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),F=e,et=We,{vue_ui_circle_pack:tt}=_e(),nt=v(()=>!!F.dataset&&F.dataset.length),I=k(te()),L=k(null),Ct=k(null),wt=k(null),Tt=k(0),Et=k(0),Dt=k(0),Ot=k(null),kt=k(null),At=k(null),jt=k(!1),Mt=k(``),R=k(null),z=k(null),Nt=k({x:0,y:0}),Pt=k(`pointer`),Ft=k(!1),B=k(Ut()),V=v(()=>B.value.style.chart.circles.labels),H=v(()=>B.value.style.chart.circles),U=v(()=>B.value.style.chart);he({config:()=>B.value,dataset:()=>F.dataset,component:`VueUiCirclePack`,rules:[ge.emptyArray,{test:e=>e.length===1&&(!e[0].children||e[0]?.children.length===0),message:[`👀 The dataset only has a single series. Consider:`,``,`▶️ Using a value display instead of a chart component, or using VueUiKpi.`]},{test:e=>e.length===1&&e[0]?.children&&e[0]?.children.length<6,message:[`👀 The number of datapoints is probably too low for this type of chart. Consider:`,``,`▶️ Using VueUiDonut or VueUiWaffle instead.`]}]});let{transitionEnabled:W}=Ce({config:()=>B.value.transitions,dataset:()=>F.dataset}),It=v(()=>B.value.userOptions.useCursorPointer),Lt=v(()=>ae({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,circles:{stroke:`#6A6A6A`,labels:{name:{show:!1},value:{show:!1}}}}}},userConfig:B.value.skeletonConfig??{}})),{loading:Rt,FINAL_DATASET:zt}=ye({...Be(F),FINAL_CONFIG:B,prepareConfig:Ut,skeletonDataset:F.config?.skeletonDataset??[{name:`_`,value:13,color:`#F2F2F2`},{name:`_`,value:8,color:`#DBDBDB`},{name:`_`,value:5,color:`#ADADAD`},{name:`_`,value:3,color:`#969696`},{name:`_`,value:2,color:`#808080`},{name:`_`,value:1,color:`#696969`}],skeletonConfig:ae({defaultConfig:B.value,userConfig:Lt.value})}),{svgRef:G}=Te({config:U.value.title}),{userOptionsVisible:Bt,setUserOptionsVisibility:Vt,keepUserOptionState:Ht}=we({config:B.value});function Ut(){return u(F.config,tt,De)}let Wt=ne(F.config);He(()=>F.config,(e,t)=>{let n=ne(e),r=n!==Wt;Wt=n;let i=Ut();r?(B.value=i,Bt.value=!B.value.userOptions.showOnChartHover,mn(),Tt.value+=1,Et.value+=1,K.value.showTable=B.value.table.show,K.value.showTooltip=U.value.tooltip.show,K.value.showZoom=U.value.zoom?.show??!1):(B.value.style.chart.tooltip=i.style.chart.tooltip,K.value.showTooltip=B.value.style.chart.tooltip.show)},{deep:!0});let{isPrinting:Gt,isImaging:Kt,generatePdf:qt,generateImage:Jt}=ve({elementId:`vue-ui-circle-pack_${I.value}`,fileName:U.value.title.text||`vue-ui-circle-pack`,options:B.value.userOptions.print}),Yt=v(()=>B.value.userOptions.show&&!U.value.title.text),K=k({showTable:B.value.table.show,showTooltip:U.value.tooltip.show,showZoom:U.value.zoom?.show??!1});He(B,()=>{K.value={showTable:B.value.table.show,showTooltip:U.value.tooltip.show,showZoom:U.value.zoom?.show??!1}},{immediate:!0});let q=k({h:10,w:10}),Xt=k([0,0,100,100]),Zt=k({x:0,y:0,width:100,height:100}),Qt=v(()=>B.value.debug),$t=v(()=>{let e=B.value.style?.chart||{};return e.dimensions&&typeof e.dimensions.width==`number`?e.dimensions.width:typeof e.width==`number`?e.width:300}),en=v(()=>{let e=B.value.style?.chart||{};return e.dimensions&&typeof e.dimensions.height==`number`?e.dimensions.height:typeof e.height==`number`?e.height:300}),J=k([]),Y=k([]),X=k(null),Z=k(null);function tn(e,t){q.value={w:e,h:t};let n=gn.value.map(nn);if(!n.length){let n={x:0,y:0,width:e,height:t};J.value=[],Y.value=[],Xt.value=[n.x,n.y,n.width,n.height],Zt.value={...n},Mn(n);return}let r=Ge(n,t,e),[i,a,o,s]=Ue(r,1),c=Math.min(o?e/o:1,s?t/s:1),l=(e-o*c)/2,u=(t-s*c)/2,d=r.map(e=>({...e,x:(e.x-i)*c+l,y:(e.y-a)*c+u,r:e.r*c}));J.value=ln(d),Y.value=J.value;let f=Un({x:0,y:0,width:e,height:t});Xt.value=[f.x,f.y,f.width,f.height],Zt.value={...f},Mn(f)}function nn(e){return{...e,children:Array.isArray(e.children)?e.children.map(nn):[]}}function rn(e){let t=Number(e?.value);return Number.isFinite(t)&&t>0?t:Array.isArray(e?.children)?e.children.reduce((e,t)=>e+rn(t),0):0}function an(e,t){let n=oe[B.value.theme||`default`]||ee,r=hn.value.length?hn.value:n.length?n:ee;return g(e.color)||r[t%r.length]||ee[t%ee.length]}function on(e){return!Array.isArray(e.children)||!e.children.length?1:e.children.reduce((e,t)=>e+on(t),0)}function sn(e,t=null,n=0,r=[]){return Array.isArray(e)?e.map((e,i)=>{let a=rn(e);if(!Number.isFinite(a)||a<=0)return null;let o=te(),s=[...r,i],c=s.reduce((e,t,n)=>e+t+n,0),l=e.color||t?.color?g(e.color||t?.color):an(e,c),u=sn(e.children,{id:o,name:e.name,color:l,rootId:t?.rootId??o},n+1,s);return{...e,value:a,r:a,id:o,color:l,depth:n,parentId:t?.id??null,parentName:t?.name??null,rootId:t?.rootId??o,hasChildren:u.length>0,childCount:u.length,leafCount:u.length?on({children:u}):1,hierarchyPath:s,children:u}}).filter(Boolean):[]}function cn(e){if(!Array.isArray(e.children)||!e.children.length)return[];let t=e.r*2;if(!t)return[];let n=Ge(e.children.map(nn),t,t),[r,i,a,o]=Ue(n,1),s=Math.min(a?t/a:1,o?t/o:1)*.9,c=a*s,l=o*s,u=e.x-c/2,d=e.y-l/2;return n.map(e=>({...e,x:(e.x-r)*s+u,y:(e.y-i)*s+d,r:e.r*s}))}function ln(e){let t=[];return e.forEach(e=>{let n=cn(e);t.push({...e,children:n}),t.push(...ln(n))}),t}function un(e,t){return!e||!t||!Array.isArray(e.hierarchyPath)||!Array.isArray(t.hierarchyPath)||e.hierarchyPath.length<=t.hierarchyPath.length?!1:t.hierarchyPath.every((t,n)=>e.hierarchyPath[n]===t)}function dn(e){return e.hasChildren?V.value.parents.show:V.value.children.show}function fn(){if(!B.value.responsive||!L.value)return;let e=me(()=>{let{width:e,height:t}=xe({chart:L.value,title:U.value.title.text?Ct.value:null,legend:null,source:Ot.value,noTitle:wt.value});requestAnimationFrame(()=>{e&&t&&(G.value&&(G.value.setAttribute(`width`,e),G.value.setAttribute(`height`,t)),tn(e,t))})});X.value&&(Z.value&&X.value.unobserve(Z.value),X.value.disconnect()),X.value=new ResizeObserver(e),Z.value=L.value.parentNode||L.value,Z.value&&X.value.observe(Z.value),e()}function pn(){X.value&&(Z.value&&X.value.unobserve(Z.value),X.value.disconnect(),X.value=null,Z.value=null)}async function mn(){pe(F.dataset)&&re({componentName:`VueUiCirclePack`,type:`dataset`,debug:Qt.value});let e=$t.value,t=en.value;tn(e,t),B.value.responsive?fn():pn()}Re(mn),Le(()=>{pn()}),He(()=>zt.value,async e=>{await mn()},{deep:!0});let hn=v(()=>fe(B.value.customPalette)),gn=v(()=>sn(zt.value)),_n=v(()=>J.value.length?Math.max(...J.value.map(e=>e.r)):0);function vn(e,t){return _n.value?t/_n.value*e:0}function yn(e,t){B.value.events.datapointLeave&&B.value.events.datapointLeave({datapoint:e,seriesIndex:t}),(Pt.value!==`keyboard`||R.value?.id!==e?.id)&&(jt.value=!1,R.value=null,z.value=null,Pt.value=`pointer`)}function bn(e,t){et(`selectDatapoint`,e),B.value.events.datapointClick&&B.value.events.datapointClick({datapoint:e,seriesIndex:t})}let xn=k(null),Sn=k(!1);function Cn(e,t,n=`pointer`){R.value=e,z.value=t,Pt.value=n,B.value.events.datapointEnter&&B.value.events.datapointEnter({datapoint:e,seriesIndex:t}),xn.value={datapoint:e,seriesIndex:t,config:B.value,series:Y.value},jt.value=!0;let r=U.value.tooltip.customFormat;if(Sn.value=!1,p(r))try{let n=r({seriesIndex:t,datapoint:e,series:Y.value,config:B.value});typeof n==`string`&&(Mt.value=n,Sn.value=!0)}catch{console.warn(`Custom format cannot be applied.`),Sn.value=!1}if(!Sn.value){let t=``;t+=`
2
+ <div style="display:flex;align-items:center;gap:4px;">
3
+ <svg viewBox="0 0 10 10" height="${U.value.tooltip.fontSize}" width="${U.value.tooltip.fontSize}">
4
+ <circle
5
+ cx="5"
6
+ cy="5"
7
+ r="5"
8
+ fill="${H.value.gradient.show?`url(#${e.id})`:e.color}"
9
+ />
10
+ </svg>
11
+ <span>${e.name}: <b>${wn(e)}</b></span>
12
+ </div>
13
+ `,Mt.value=t}}function wn(e){return ie(V.value.value.formatter,e.value,d({p:V.value.value.prefix,v:e.value,s:V.value.value.suffix,r:V.value.value.rounding}))}function Tn(e){if(!e)return 0;let t=wn(e),n=e.r/(t.length||1)*(t.length===1?1:2);return Math.min(e.r/2.5,n)}let Q=k(!1);function En(e){Q.value=e,Dt.value+=1}let Dn=k(!1);function On(){Dn.value=!Dn.value}let kn=v(()=>!Dn.value&&K.value.showZoom),{viewBox:$,resetZoom:An,isZoom:jn,setInitialViewBox:Mn}=Oe(G,{x:0,y:0,width:Math.max(10,q.value.w),height:Math.max(10,q.value.h)},U.value.zoom?.speed??1,kn);function Nn(e,t,n=0){return!(e.x+e.width+n<t.x||t.x+t.width+n<e.x||e.y+e.height+n<t.y||t.y+t.height+n<e.y)}function Pn(e,t,n=0){let r=Math.min(Math.max(t.x,e.x-n),e.x+e.width+n),i=Math.min(Math.max(t.y,e.y-n),e.y+e.height+n),a=t.x-r,o=t.y-i;return a*a+o*o<=t.r*t.r}function Fn(e,t,n=1){let r=Math.max(4*n,Math.min(t.width,t.height)*.01);return{...e,x:Math.min(Math.max(e.x,t.x+r),t.x+t.width-e.width-r),y:Math.min(Math.max(e.y,t.y+r),t.y+t.height-e.height-r)}}function In(e){let t=[e.name];return V.value.value.show&&t.push(wn(e)),t.filter(Boolean)}function Ln(e,t,n,r,i){let a=e.x,o=e.y;return{right:{x:a+e.r+i,y:o-n/2,anchorX:a+e.r,anchorY:o},left:{x:a-e.r-i-t,y:o-n/2,anchorX:a-e.r,anchorY:o},top:{x:a-t/2,y:o-e.r-i-n,anchorX:a,anchorY:o-e.r},bottom:{x:a-t/2,y:o+e.r+i,anchorX:a,anchorY:o+e.r},topRight:{x:a+e.r*.7+i,y:o-e.r*.7-i-n,anchorX:a+e.r*.7,anchorY:o-e.r*.7},topLeft:{x:a-e.r*.7-i-t,y:o-e.r*.7-i-n,anchorX:a-e.r*.7,anchorY:o-e.r*.7},bottomRight:{x:a+e.r*.7+i,y:o+e.r*.7+i,anchorX:a+e.r*.7,anchorY:o+e.r*.7},bottomLeft:{x:a-e.r*.7-i-t,y:o+e.r*.7+i,anchorX:a-e.r*.7,anchorY:o+e.r*.7}}[r]}function Rn(e,t){let n=[],r=t.get(e.parentId);for(;r;)n.push(r),r=t.get(r.parentId);return n}function zn(e,t,n,r,i,a){let o=e.x,s=e.y,c=t||e,l=a*.6,u={right:{x:c.x+c.r+a,y:s-r/2},left:{x:c.x-c.r-a-n,y:s-r/2},top:{x:o-n/2,y:c.y-c.r-a-r},bottom:{x:o-n/2,y:c.y+c.r+a},topRight:{x:c.x+c.r+a,y:c.y-c.r-a-r-l},topLeft:{x:c.x-c.r-a-n,y:c.y-c.r-a-r-l},bottomRight:{x:c.x+c.r+a,y:c.y+c.r+a+l},bottomLeft:{x:c.x-c.r-a-n,y:c.y+c.r+a+l}}[i],d=u.x+n/2,f=u.y+r/2,p=Math.atan2(f-s,d-o);return{...u,anchorX:o+Math.cos(p)*e.r,anchorY:s+Math.sin(p)*e.r}}function Bn(e,t={}){let{clamp:n=!0,scale:r=1}=t;if(!J.value.length||!q.value.w||!q.value.h||!U.value.parentTooltips.show)return[];let i=Math.max(8,U.value.parentTooltips.fontSizeRatio*10)*r,a=i*1.25,o=i*.75,s=i*.55,c=Math.max(8*r,Math.min(e.width,e.height)*.025),l=Math.max(2*r,Math.min(e.width,e.height)*.006),u=[`right`,`left`,`top`,`bottom`,`topRight`,`topLeft`,`bottomRight`,`bottomLeft`],d=[],f=new Map(J.value.map(e=>[e.id,e]));return J.value.filter(e=>e.hasChildren&&e.name).sort((e,t)=>t.r-e.r).forEach(t=>{let p=Rn(t,f).at(-1),m=In(t),ee=m.reduce((e,t)=>Math.max(e,String(t).length),0),h=Math.max(i*5,ee*i*.62+o*2),g=m.length*a+s*2,te=p?u.map(e=>zn(t,p,h,g,e,c)):[],ne=u.map(e=>Ln(t,h,g,e,c)),re=[...te,...ne].map(t=>{let i=n?Fn({x:t.x,y:t.y,width:h,height:g},e,r):{x:t.x,y:t.y,width:h,height:g};return{...i,anchorX:t.anchorX,anchorY:t.anchorY,lineX:i.x+i.width/2,lineY:i.y+i.height/2}}).find(e=>!d.some(t=>Nn(e,t,l))&&!J.value.some(t=>Pn(e,t,l)));re&&d.push({...re,datapoint:t,id:`parent_tooltip_${t.id}`,color:t.color,lines:m,fontSize:i,lineHeight:a,paddingX:o,paddingY:s,scale:r})}),d}function Vn(e){let t=Zt.value;if(!t.width||!t.height||!e.width||!e.height)return 1;let n=Math.min(e.width/t.width,e.height/t.height);return Number.isFinite(n)&&n>0?n:1}let Hn=v(()=>Bn($.value,{clamp:!0,scale:Vn($.value)}));function Un(e){let t=Bn(e,{clamp:!1});if(!t.length)return e;let n=Math.min(e.x,...t.map(e=>e.x)),r=Math.min(e.y,...t.map(e=>e.y)),i=Math.max(e.x+e.width,...t.map(e=>e.x+e.width)),a=Math.max(e.y+e.height,...t.map(e=>e.y+e.height)),o=Math.max(8,Math.min(e.width,e.height)*.025);return{x:n-o,y:r-o,width:i-n+o*2,height:a-r+o*2}}function Wn(e){let t=[];function n(e,r=0,i=``){e.forEach(e=>{t.push({name:e.name,value:e.value,color:e.color,parentName:i,depth:r}),Array.isArray(e.children)&&e.children.length&&n(e.children,r+1,e.name)})}return n(e),t}let Gn=v(()=>{let e=Wn(gn.value);return{head:Y.value.map(e=>({name:e.name,value:e.value,color:e.color})).toSorted((e,t)=>t.value-e.value),body:e.map(e=>e.value),hierarchy:e}}),Kn=v(()=>Wn(gn.value).map(e=>({...e,name:`${`- `.repeat(e.depth)}${e.name}`})));function qn(e=null){Fe(()=>{let t=Kn.value.map(e=>[[e.name],[e.parentName||``],[e.depth],[e.value]]),n=[[U.value.title.text],[U.value.title.subtitle.text],[[B.value.table.columnNames.datapoint],[`Parent`],[`Depth`],[B.value.table.columnNames.value]]].concat(t),r=f(n);e?e(r):se({csvContent:r,title:U.value.title.text||`vue-ui-circle-pack`})})}let Jn=v(()=>{let e=[B.value.table.columnNames.datapoint,B.value.table.columnNames.parent,B.value.table.columnNames.depth,B.value.table.columnNames.value],t=Gn.value.hierarchy.map(e=>{let t=d({p:V.value.value.prefix,v:e.value,s:V.value.value.suffix,r:V.value.value.rounding});return[{color:e.color,name:`${` `.repeat(e.depth)}${e.name}`},e.parentName??``,e.depth??0,t]}),n={th:{backgroundColor:B.value.table.th.backgroundColor,color:B.value.table.th.color,outline:B.value.table.th.outline},td:{backgroundColor:B.value.table.td.backgroundColor,color:B.value.table.td.color,outline:B.value.table.td.outline},breakpoint:B.value.table.responsiveBreakpoint};return{colNames:[B.value.table.columnNames.datapoint,B.value.table.columnNames.parent,B.value.table.columnNames.depth,B.value.table.columnNames.value],head:e,body:t,config:n}});function Yn(){K.value.showTable=!K.value.showTable}function Xn(){K.value.showTooltip=!K.value.showTooltip}function Zn(){K.value.showZoom=!K.value.showZoom}function Qn(){return gn.value}let $n=l(L,()=>U.value.title.text),er=v(()=>c({config:B,style:U,mutableConfig:K,dialog:$e,accordion:Je,isFullscreen:Q,parent:L,maxWidth:500,isCursorPointer:It}));He(()=>K.value.showTable,e=>{B.value.table.show||(e&&B.value.table.useDialog&&kt.value?kt.value.open():kt.value&&`close`in kt.value&&kt.value.close())});function tr(){K.value.showTable=!1,At.value&&At.value.setTableIconState(!1)}let nr=v(()=>U.value.backgroundColor),rr=v(()=>U.value.title),{isCallbackImaging:ir,isCallbackSvg:ar,generateSvg:or,onGenerateImage:sr}=Se({svg:G,title:rr,legend:null,legendItems:null,backgroundColor:nr,getSvgCallback:()=>B.value.userOptions.callbacks.svg,generateImage:Jt});async function cr(){et(`copyAlt`,{config:B.value,dataset:gn.value,flattenedDataset:Y.value}),B.value.userOptions.callbacks.altCopy?await Promise.resolve(B.value.userOptions.callbacks.altCopy({config:B.value,dataset:gn.value,flattenedDataset:Y.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function lr(e){if(!Number.isFinite(e)||!G.value)return;let t=J.value[e];if(!t)return;let n=de(t.x,t.y,G.value);n&&(Nt.value=n)}function ur(){if(z.value!==null){let e=J.value[z.value];e&&yn(e,z.value)}z.value=null,Pt.value=`pointer`,jt.value=!1,R.value=null}function dr(){z.value=null,Ft.value=!0}function fr(){ur(),Ft.value=!1}function pr(e,t){let n=J.value.length;return n?e===null||e<0||e>=n?t===`next`?0:n-1:t===`previous`?(e-1+n)%n:(e+1)%n:null}function mr(e){if(!G.value||Dn.value||document.activeElement!==G.value||!J.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){ur();return}if(r){if(z.value===null)return;let e=J.value[z.value];if(!e)return;bn(e,z.value);return}let a=z.value;a===null||a<0||a>=J.value.length?a=n?0:J.value.length-1:n?a=pr(a,`next`):t&&(a=pr(a,`previous`));let o=J.value[a];o&&(z.value=a,lr(a),Cn(o,a,`keyboard`))}let hr=v(()=>({headers:Jn.value?.colNames??[],rows:Jn.value?.body?.map(e=>[e[0]?.name??``,e[1]])??[]})),gr=v(()=>U.value.color);je({getData:Qn,getImage:$n,generateCsv:qn,generatePdf:qt,generateImage:Jt,generateSvg:or,toggleTable:Yn,toggleAnnotator:On,toggleFullscreen:En,copyAlt:cr,toggleZoom:Zn,resetZoom:An});let _r=v(()=>s(B.value.userOptions?.annotator?.followZoom,$.value));return(e,s)=>(O(),x(`div`,{id:`vue-ui-circle-pack_${I.value}`,class:E(`vue-data-ui-component vue-ui-circle-pack ${Q.value?`vue-data-ui-wrapper-fullscreen`:``} ${N(Rt)?`loading`:``}`),ref_key:`circlePackChart`,ref:L,style:Ie(`font-family:${B.value.style.fontFamily};text-align:center;background:${U.value.backgroundColor};`),onMouseenter:s[2]||=()=>N(Vt)(!0),onMouseleave:s[3]||=()=>N(Vt)(!1)},[S(`div`,{id:`chart-instructions-${I.value}`,class:`sr-only`},[S(`p`,null,M(B.value.a11y.translations.keyboardNavigation),1)],8,it),hr.value?.rows?.length?(O(),y(ke,{key:0,uid:I.value,head:hr.value.headers,body:hr.value.rows,notice:B.value.a11y.translations.tableAvailable,caption:B.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):b(``,!0),B.value.userOptions.buttons.annotator?(O(),y(N(Ze),T({key:1},N(a)(B.value.userOptions.annotator),{svgRef:N(G),followZoom:B.value.userOptions?.annotator?.followZoom,annotationViewport:_r.value,backgroundColor:U.value.backgroundColor,color:U.value.color,active:Dn.value,isCursorPointer:It.value,palette:B.value.userOptions.annotatorPalette,onClose:On}),Me({_:2},[A(N(o),t=>({name:t,fn:P(n=>[j(e.$slots,t,D(w(N(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):b(``,!0),j(e.$slots,`userConfig`,{},void 0,!0),Yt.value?(O(),x(`div`,{key:2,ref_key:`noTitle`,ref:wt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):b(``,!0),U.value.title.text?(O(),x(`div`,{key:3,ref_key:`chartTitle`,ref:Ct,style:`width:100%;background:transparent;padding-bottom:12px`},[(O(),y(Ee,{key:`title_${Tt.value}`,config:{title:{cy:`donut-div-title`,...U.value.title},subtitle:{cy:`donut-div-subtitle`,...U.value.title.subtitle}}},null,8,[`config`]))],512)):b(``,!0),B.value.userOptions.show&&nt.value&&(N(Ht)||N(Bt))?(O(),y(N(Xe),T({ref_key:`userOptionsRef`,ref:At,key:`user_option_${Dt.value}`,backgroundColor:U.value.backgroundColor,color:U.value.color,isPrinting:N(Gt),isImaging:N(Kt),uid:I.value,hasTooltip:B.value.userOptions.buttons.tooltip,isTooltip:K.value.showTooltip,hasLabel:!1,isFullscreen:Q.value,chartElement:L.value},N(n)(B.value.userOptions,`pdf csv img svg table fullscreen altCopy annotator zoom`),{isAnnotation:Dn.value,tableDialog:B.value.table.useDialog,isCursorPointer:It.value,isZoom:K.value.showZoom,onToggleFullscreen:En,onGeneratePdf:N(qt),onGenerateCsv:qn,onGenerateImage:N(sr),onGenerateSvg:N(or),onToggleTable:Yn,onToggleTooltip:Xn,onToggleAnnotator:On,onToggleZoom:Zn,onCopyAlt:cr,style:{visibility:N(Ht)?N(Bt)?`visible`:`hidden`:`visible`}}),Me({_:2},[A(N(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionZoom optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:P(n=>[j(e.$slots,t,D(w(N(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`isTooltip`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`isZoom`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):b(``,!0),S(`div`,{class:E({"vue-ui-circle-pack-svg-container":!0,"not-responsive":!B.value.responsive})},[(O(),x(`svg`,{ref_key:`svgRef`,ref:G,xmlns:N(ue),"aria-describedby":`chart-instructions-${I.value}`,viewBox:`${N($).x} ${N($).y} ${N($).width} ${N($).height}`,preserveAspectRatio:`xMidYMid meet`,class:E({"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value,"not-responsive":!B.value.responsive,"vue-data-ui-no-transition":!N(W)}),style:Ie(`display:block;${B.value.responsive?`width:100%;height:auto`:`height:100%;`};overflow:${K.value.showZoom?`hidden`:`visible`};background:transparent;color:${U.value.color};background:${U.value.backgroundColor};`),tabindex:`0`,onFocus:dr,onBlur:fr,onKeydown:mr},[Pe(N(Qe)),j(e.$slots,`svg-underlayer`,{svg:{drawingArea:{...N($)},width:q.value.w,height:q.value.h,isPrintingImg:N(Gt)||N(Kt)||N(ir),isPrintingSvg:N(ar)}},void 0,!0),e.$slots[`chart-background`]?(O(),x(`foreignObject`,{key:0,x:N($).x,y:N($).y,width:q.value.w,height:q.value.h,style:{pointerEvents:`none`}},[j(e.$slots,`chart-background`,{},void 0,!0)],8,ot)):b(``,!0),(O(!0),x(_,null,A(J.value,(t,n)=>(O(),x(_,{key:t.id},[S(`defs`,null,[Pe(Ae,{t:`radial`,id:t.id,fy:`30%`,stops:[[`10%`,N(m)(t.color,H.value.gradient.intensity/100),1],[`90%`,N(h)(t.color,.1),1],[`100%`,t.color,1]]},null,8,[`id`,`stops`])]),e.$slots.pattern?(O(),x(`g`,st,[S(`defs`,null,[j(e.$slots,`pattern`,T({ref_for:!0},{...t,patternId:`pattern_${I.value}_${t.id}`}),void 0,!0)])])):b(``,!0),S(`rect`,{class:E({"vue-data-ui-transition":N(W)}),x:t.x-t.r,y:t.y-t.r,width:t.r*2,height:t.r*2,stroke:H.value.stroke,"vector-effect":`non-scaling-stroke`,"stroke-width":H.value.strokeWidth*(_n.value||1)/100,fill:H.value.gradient.show?`url(#${t.id})`:t.color,rx:t.r,onMouseenter:e=>Cn(t,n,`pointer`),onMouseout:e=>yn(t,n),onClick:e=>bn(t,n)},null,42,ct),e.$slots.pattern?(O(),x(`rect`,{key:1,class:E({"vue-data-ui-transition":N(W)}),x:t.x-t.r,y:t.y-t.r,width:t.r*2,height:t.r*2,stroke:H.value.stroke,"vector-effect":`non-scaling-stroke`,"stroke-width":H.value.strokeWidth*(_n.value||1)/100,fill:`url(#pattern_${I.value}_${t.id})`,rx:t.r,style:{pointerEvents:`none`}},null,10,lt)):b(``,!0)],64))),128)),(O(!0),x(_,null,A(J.value,(e,t)=>(O(),x(_,{key:e.id},[e.hasChildren?b(``,!0):(O(),x(`rect`,{key:0,class:E({"vue-data-ui-transition":N(W)}),x:e.x-e.r,y:e.y-e.r,width:e.r*2,height:e.r*2,stroke:`none`,fill:R.value&&R.value.id===e.id?H.value.gradient.show?`url(#${e.id})`:e.color:`transparent`,rx:e.r,style:Ie({filter:R.value&&R.value.id===e.id?`drop-shadow(0px 0px 6px ${H.value.selectedShadowColor})`:`none`,opacity:+!!R.value,pointerEvents:`none`})},null,14,ut))],64))),128)),(O(!0),x(_,null,A(J.value,(t,n)=>(O(),x(_,{key:`cl_${t.id}`},[e.$slots[`data-label`]&&dn(t)?j(e.$slots,`data-label`,T({ref_for:!0},{...t,createTSpans:N(ce),fontSize:{name:t.r/3*V.value.name.fontSizeRatio,value:Tn(t)*V.value.value.fontSizeRatio},color:V.value.name.color?V.value.name.color:N(le)(t.color)}),void 0,!0,0):(O(),x(_,{key:1},[V.value.name.show&&t.name&&dn(t)?(O(),x(`text`,{key:0,style:{pointerEvents:`none`},class:E({"vue-data-ui-transition":N(W)}),transform:`translate(${t.x}, ${t.y+vn(t.r,V.value.name.offsetY)-t.r/10})`,"font-size":t.r/3*V.value.name.fontSizeRatio,fill:V.value.name.color===`auto`?N(le)(t.color):V.value.name.color,"font-weight":V.value.name.bold?`bold`:`normal`,"text-anchor":`middle`},M(t.name),11,dt)):b(``,!0),V.value.value.show&&dn(t)?(O(),x(`text`,{key:1,class:E({"vue-data-ui-transition":N(W)}),style:{pointerEvents:`none`,transition:`opacity 0.2s ease-in-out`},transform:`translate(${t.x}, ${t.y+vn(t.r,V.value.value.offsetY)+t.r/2.5})`,"font-size":Tn(t)*V.value.value.fontSizeRatio,fill:V.value.value.color===`auto`?N(le)(t.color):V.value.value.color,"font-weight":V.value.value.bold?`bold`:`normal`,"text-anchor":`middle`},M(wn(t)),11,ft)):b(``,!0)],64)),j(e.$slots,`circle`,T({ref_for:!0},{...t,showLabel:dn(t),isSelected:R.value?.id===t.id,isDescendantOfSelected:un(t,R.value),uid:`${n}_${I.value}`}),void 0,!0)],64))),128)),Hn.value.length&&U.value.parentTooltips.show?(O(),x(`g`,pt,[(O(!0),x(_,null,A(Hn.value,t=>(O(),x(`g`,{key:`tltp_${t.id}`},[S(`path`,{class:E({"vue-data-ui-transition":N(W)}),stroke:U.value.parentTooltips.link.useSerieColor?t.color:U.value.parentTooltips.link.stroke,"vector-effect":`non-scaling-stroke`,"stroke-width":U.value.parentTooltips.link.strokeWidth,"stroke-linecap":`round`,"stroke-dasharray":U.value.parentTooltips.link.strokeDasharray,opacity:U.value.parentTooltips.link.opacity,d:`M${t.anchorX}, ${t.anchorY} ${t.lineX}, ${t.lineY}`},null,10,mt),S(`rect`,{class:E({"vue-data-ui-transition":N(W)}),x:t.x,y:t.y,width:t.width,height:t.height,rx:Math.max(3*t.scale,t.fontSize/2.5)*U.value.parentTooltips.borderRadiusRatio,ry:Math.max(3*t.scale,t.fontSize/2.5)*U.value.parentTooltips.borderRadiusRatio,fill:U.value.parentTooltips.backgroundColor,stroke:U.value.parentTooltips.useSerieColor?t.color:U.value.parentTooltips.stroke,"vector-effect":`non-scaling-stroke`,"stroke-width":U.value.parentTooltips.strokeWidth,filter:U.value.parentTooltips.filter},null,10,ht),j(e.$slots,`parent-tooltip`,T({ref_for:!0},{...t}),()=>[S(`rect`,{class:E({"vue-data-ui-transition":N(W)}),fill:t.color,x:t.x+t.paddingX*1.3-t.fontSize*.35,y:t.y+t.paddingY+t.lineHeight/2-t.fontSize*.35,rx:t.fontSize*.35,width:t.fontSize*.7,height:t.fontSize*.7},null,10,gt),S(`text`,{class:E({"vue-data-ui-transition":N(W)}),transform:`translate(${t.x+t.paddingX+t.fontSize}, ${t.y+t.paddingY+t.fontSize})`,"font-size":t.fontSize,fill:U.value.parentTooltips.color,"font-family":B.value.style.fontFamily,"text-anchor":`start`},[(O(!0),x(_,null,A(t.lines,(e,n)=>(O(),x(`tspan`,{key:`${t.id}_${n}`,x:0,dy:n===0?0:t.lineHeight},M(e),9,vt))),128))],10,_t)],!0)]))),128))])):b(``,!0),j(e.$slots,`svg`,{svg:{drawingArea:{...N($)},width:q.value.w,height:q.value.h,isPrintingImg:N(Gt)||N(Kt)||N(ir),isPrintingSvg:N(ar)}},void 0,!0)],46,at)),e.$slots.hint?(O(),x(`div`,yt,[j(e.$slots,`hint`,D(w({hint:B.value.a11y.translations.keyboardNavigation,isVisible:Ft.value})),void 0,!0)])):b(``,!0)],2),e.$slots.watermark?(O(),x(`div`,bt,[j(e.$slots,`watermark`,D(w({isPrinting:N(Gt)||N(Kt)||N(ir)||N(ar)})),void 0,!0)])):b(``,!0),N(jn)?(O(),x(`div`,xt,[j(e.$slots,`reset-action`,{reset:N(An)},()=>[S(`button`,{"data-cy-reset":``,tabindex:`0`,role:`button`,class:`vue-data-ui-refresh-button`,style:Ie({background:U.value.backgroundColor,cursor:It.value?`pointer`:`default`}),onClick:s[0]||=e=>N(An)(!0)},[Pe(N(qe),{name:`refresh`,stroke:U.value.color},null,8,[`stroke`])],4)],!0)])):b(``,!0),e.$slots.source?(O(),x(`div`,{key:7,ref_key:`source`,ref:Ot,dir:`auto`},[j(e.$slots,`source`,{},void 0,!0)],512)):b(``,!0),Pe(N(Ke),{teleportTo:U.value.tooltip.teleportTo,show:K.value.showTooltip&&jt.value,backgroundColor:U.value.tooltip.backgroundColor,color:U.value.tooltip.color,fontSize:U.value.tooltip.fontSize,borderRadius:U.value.tooltip.borderRadius,borderColor:U.value.tooltip.borderColor,borderWidth:U.value.tooltip.borderWidth,backgroundOpacity:U.value.tooltip.backgroundOpacity,position:U.value.tooltip.position,offsetX:U.value.tooltip.offsetX,offsetY:U.value.tooltip.offsetY,parent:L.value,content:Mt.value,isCustom:Sn.value,isFullscreen:Q.value,smooth:U.value.tooltip.smooth,backdropFilter:U.value.tooltip.backdropFilter,smoothForce:U.value.tooltip.smoothForce,smoothSnapThreshold:U.value.tooltip.smoothSnapThrehsold,isA11yMode:Pt.value===`keyboard`,a11yPosition:Nt.value},{"tooltip-before":P(()=>[j(e.$slots,`tooltip-before`,D(w({...xn.value})),void 0,!0)]),tooltip:P(()=>[j(e.$slots,`tooltip`,D(w({...xn.value})),void 0,!0)]),"tooltip-after":P(()=>[j(e.$slots,`tooltip-after`,D(w({...xn.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`]),nt.value&&B.value.userOptions.buttons.table?(O(),y(ze(er.value.component),T({key:8},er.value.props,{ref_key:`tableUnit`,ref:kt,onClose:tr}),Me({content:P(()=>[(O(),y(N(Ye),{key:`table_${Et.value}`,colNames:Jn.value.colNames,head:Jn.value.head,body:Jn.value.body,config:Jn.value.config,title:B.value.table.useDialog?``:er.value.title,withCloseButton:!B.value.table.useDialog,isCursorPointer:It.value,onClose:tr},{th:P(({th:e})=>[S(`div`,St,M(e),1)]),td:P(({td:e})=>[Ne(M(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[B.value.table.useDialog?{name:`title`,fn:P(()=>[Ne(M(er.value.title),1)]),key:`0`}:void 0,B.value.table.useDialog?{name:`actions`,fn:P(()=>[S(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:s[1]||=e=>qn(B.value.userOptions.callbacks.csv),style:Ie({cursor:It.value?`pointer`:`default`})},[Pe(N(qe),{name:`fileCsv`,stroke:er.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):b(``,!0),j(e.$slots,`skeleton`,{},()=>[N(Rt)?(O(),y(be,{key:0})):b(``,!0)],!0)],46,rt))}},[[`__scopeId`,`data-v-187a2897`]]);export{nt as n,I as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useNestedProp-DnGoh-XS.js";import{Jt as n,X as r,t as i}from"./lib-rPeBMZrn.js";import{t as a}from"./useConfig-_JwRfIqE.js";import{n as o}from"./PackageVersion-ksOit8fp.js";import{t as s}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Teleport as c,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createVNode as ee,nextTick as te,normalizeClass as m,normalizeStyle as ne,onBeforeUnmount as re,onMounted as h,openBlock as g,ref as _,toDisplayString as v,unref as y}from"vue";var b=/* @__PURE__ */ e({default:()=>R}),x=[`xmlns`,`height`,`width`],S={id:`follower`,fy:`30%`,fx:`30%`},ie=[`stop-color`,`stop-opacity`],ae=[`r`,`fill`,`stroke`,`stroke-width`,`stroke-dasharray`],oe=[`r`],se={key:2,class:`wave`},C=[`id`],w=[`id`],T=[`filter`,`stroke`],E={key:3,class:`crosshair`},D=[`x1`,`stroke`,`stroke-width`,`stroke-dasharray`],O=[`x1`,`stroke`,`stroke-width`,`stroke-dasharray`],k=[`y1`,`stroke`,`stroke-width`,`stroke-dasharray`],A=[`y1`,`stroke`,`stroke-width`,`stroke-dasharray`],j=[`cy`,`r`,`fill`],M=[`cy`,`r`,`fill`],N=[`cx`,`r`,`fill`],P=[`cx`,`r`,`fill`],F={key:5,class:`coordinates`},I=[`x`,`y`,`font-size`,`fill`],L=[`transform`],ce=[`font-size`,`fill`],R=/*#__PURE__*/ s({__name:`vue-ui-cursor`,props:{config:{type:Object,default:{}}},setup(e){let{vue_ui_cursor:s}=a(),b=e,R=_(r()),z=l(()=>t({userConfig:b.config,defaultConfig:s})),B=_({x:-100,y:-100}),V=l(()=>Math.round(z.value.centerCircleRadius)),H=l(()=>Math.round(z.value.coordinatesOffset));function U({clientX:e,clientY:t,...n}){B.value.x=e-V.value,B.value.y=t-V.value}function W(e){B.value.x=e.targetTouches[0].clientX-V.value,B.value.y=e.targetTouches[0].clientY-V.value}let G=_(!0);function K(e){G.value=e}let q=_(!1),J=_(null);function Y(){q.value=!1,J.value&&clearTimeout(J.value),te(()=>{q.value=!0,J.value=setTimeout(()=>{q.value=!1},1e3)})}let X=_(null),Z=_(null);function Q(){return z.value.parentId?document.getElementById(z.value.parentId):document.getElementsByTagName(`div`)[0]||null}function $(e){e&&(e.addEventListener(`mousemove`,U),e.addEventListener(`touchmove`,W),e.addEventListener(`mouseleave`,()=>K(!1)),e.addEventListener(`mouseenter`,()=>K(!0)),e.addEventListener(`click`,Y))}function le(e){e&&(e.removeEventListener(`mousemove`,U),e.removeEventListener(`touchmove`,W),e.removeEventListener(`mouseleave`,()=>K(!1)),e.removeEventListener(`mouseenter`,()=>K(!0)),e.removeEventListener(`click`,Y))}return h(()=>{let e=Q();if(e){X.value=e,$(e);return}if(!z.value.parentId)return;let t=new MutationObserver(()=>{let e=Q();e&&(X.value=e,$(e),t.disconnect(),Z.value=null)});t.observe(document.body,{childList:!0,subtree:!0}),Z.value=t}),re(()=>{Z.value&&=(Z.value.disconnect(),null),X.value&&=(le(X.value),null)}),(e,t)=>(g(),u(c,{to:`body`},[G.value?(g(),f(`svg`,{key:0,"data-dom-to-png-ignore":``,xmlns:y(i),style:ne(`z-index: 2147483647; overflow: visible; pointer-events: none;background: transparent; position:fixed; top:${B.value.y}px; left:${B.value.x}px;`),viewBox:`0 0 100 100`,height:V.value*2,width:V.value*2},[ee(o),p(`defs`,null,[p(`radialGradient`,S,[p(`stop`,{offset:`10%`,"stop-color":z.value.bubbleEffectColor,"stop-opacity":z.value.bubbleEffectOpacity},null,8,ie),t[0]||=p(`stop`,{offset:`95%`,"stop-color":`transparent`},null,-1)])]),z.value.showCenterCircle?(g(),f(`circle`,{key:0,cx:50,cy:50,r:V.value,fill:y(n)(z.value.centerCircleColor,z.value.centerCircleOpacity*100),stroke:z.value.centerCircleStroke,"stroke-width":z.value.centerCircleStrokeWidth,"stroke-dasharray":z.value.centerCircleDasharray},null,8,ae)):d(``,!0),z.value.bubbleEffect?(g(),f(`circle`,{key:1,cx:50,cy:50,r:V.value,fill:`url(#follower)`,stroke:`none`},null,8,oe)):d(``,!0),z.value.useWaveOnClick?(g(),f(`g`,se,[p(`defs`,null,[p(`filter`,{id:`blur_${R.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[p(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:4,id:`blur_std_${R.value}`},null,8,w),t[1]||=p(`feColorMatrix`,{type:`saturate`,values:`0`},null,-1)],8,C)]),q.value?(g(),f(`circle`,{key:0,class:m({"circle-wave":q.value}),cx:50,cy:50,r:50,filter:`url(#blur_${R.value})`,stroke:z.value.centerCircleStroke,fill:`none`,"stroke-width":`3`},null,10,T)):d(``,!0)])):d(``,!0),z.value.showCrosshair?(g(),f(`g`,E,[p(`line`,{x1:-V.value+50,x2:-5e3,y1:50,y2:50,stroke:z.value.crosshairStroke,"stroke-width":z.value.crosshairStrokeWidth,"stroke-dasharray":z.value.crosshairDasharray,"stroke-linecap":`round`},null,8,D),p(`line`,{x1:50+V.value,x2:5e3,y1:50,y2:50,stroke:z.value.crosshairStroke,"stroke-width":z.value.crosshairStrokeWidth,"stroke-dasharray":z.value.crosshairDasharray,"stroke-linecap":`round`},null,8,O),p(`line`,{x1:50,x2:50,y1:-V.value+50,y2:-5e3,stroke:z.value.crosshairStroke,"stroke-width":z.value.crosshairStrokeWidth,"stroke-dasharray":z.value.crosshairDasharray,"stroke-linecap":`round`},null,8,k),p(`line`,{x1:50,x2:50,y1:V.value+50,y2:5e3,stroke:z.value.crosshairStroke,"stroke-width":z.value.crosshairStrokeWidth,"stroke-dasharray":z.value.crosshairDasharray,"stroke-linecap":`round`},null,8,A)])):d(``,!0),z.value.showIntersectCircles?(g(),f(`g`,{key:4,class:m({"rotating-circles":z.value.isLoading})},[p(`circle`,{cx:50,cy:V.value+50,r:z.value.intersectCirclesRadius,fill:z.value.intersectCirclesFill},null,8,j),p(`circle`,{cx:50,cy:-V.value+50,r:z.value.intersectCirclesRadius,fill:z.value.intersectCirclesFill},null,8,M),p(`circle`,{cx:-V.value+50,cy:50,r:z.value.intersectCirclesRadius,fill:z.value.intersectCirclesFill},null,8,N),p(`circle`,{cx:V.value+50,cy:50,r:z.value.intersectCirclesRadius,fill:z.value.intersectCirclesFill},null,8,P)],2)):d(``,!0),z.value.showCoordinates?(g(),f(`g`,F,[p(`text`,{"text-anchor":`end`,x:-V.value+50-z.value.coordinatesFontSize/2+H.value,y:50-z.value.coordinatesFontSize/2+H.value,"font-size":z.value.coordinatesFontSize,fill:z.value.coordinatesColor,style:{"font-variant-numeric":`tabular-nums`},"font-family":`Arial`},v(B.value.x.toFixed(0)),9,I),p(`g`,{transform:`translate(${50-z.value.coordinatesFontSize/2+H.value}, ${-V.value+50-z.value.coordinatesFontSize/2+H.value})`},[p(`text`,{"text-anchor":`start`,"font-size":z.value.coordinatesFontSize,fill:z.value.coordinatesColor,style:{"font-variant-numeric":`tabular-nums`},transform:`rotate(-90)`,"font-family":`Arial`},v(B.value.y.toFixed(0)),9,ce)],8,L)])):d(``,!0)],12,x)):d(``,!0)]))}},[[`__scopeId`,`data-v-4b1f566e`]]);export{b as n,R as t};