vue-data-ui 2.11.1 → 2.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/dist/{Arrow-Djn3xrHB.cjs → Arrow-CogAJvGp.cjs} +1 -1
  2. package/dist/{Arrow-Ch3m7pIz.js → Arrow-OttzfahM.js} +1 -1
  3. package/dist/{BaseIcon-D9r5PTQj.js → BaseIcon-CpIcYACc.js} +1 -1
  4. package/dist/{BaseIcon-ljtRuDne.cjs → BaseIcon-DY-33nfj.cjs} +1 -1
  5. package/dist/{ColorPicker-DuOr2Ic4.js → ColorPicker-BnsG9Qeu.js} +3 -3
  6. package/dist/{ColorPicker-CiQtzrYd.cjs → ColorPicker-CrMLe8x_.cjs} +1 -1
  7. package/dist/{DataTable-p1tKJjJU.js → DataTable-CJOtzfgn.js} +2 -2
  8. package/dist/{DataTable-CzL8BmEn.cjs → DataTable-CNCnRrD-.cjs} +1 -1
  9. package/dist/{Legend-COUltTuv.js → Legend-DKQ4psNY.js} +2 -2
  10. package/dist/{Legend-m-jOk1o6.cjs → Legend-ieOu_fKK.cjs} +1 -1
  11. package/dist/{PackageVersion-BhpRHJg-.cjs → PackageVersion-BxSGdh6L.cjs} +1 -1
  12. package/dist/{PackageVersion-Db8Jk3Yz.js → PackageVersion-D-aPPO0L.js} +1 -1
  13. package/dist/{PenAndPaper-Cr_VFW1Y.cjs → PenAndPaper-ByAFuR-l.cjs} +1 -1
  14. package/dist/{PenAndPaper-Bleo21mI.js → PenAndPaper-D9g_r8-6.js} +3 -3
  15. package/dist/{Shape-3lpxIkGY.cjs → Shape-BQIcurpe.cjs} +1 -1
  16. package/dist/{Shape-DThtou8P.js → Shape-DLjaeo5U.js} +1 -1
  17. package/dist/{Slicer-BSgrBZJB.js → Slicer-DuqI_UVS.js} +2 -2
  18. package/dist/{Slicer-D5exzdrG.cjs → Slicer-FXxFjXOP.cjs} +1 -1
  19. package/dist/{Title-DnNgxDaw.cjs → Title-D62pPwLz.cjs} +1 -1
  20. package/dist/{Title-C6HOVO5o.js → Title-DIYoufYR.js} +1 -1
  21. package/dist/{Tooltip-CkPkykAp.js → Tooltip-BFz2yelJ.js} +1 -1
  22. package/dist/{Tooltip-BcRV15Nk.cjs → Tooltip-C_H6-uAa.cjs} +1 -1
  23. package/dist/{dom-to-png-dbkxxccc.cjs → dom-to-png-B3SeX1JP.cjs} +1 -1
  24. package/dist/{dom-to-png-C-xt3eHI.js → dom-to-png-BB-m1MuD.js} +1 -1
  25. package/dist/{img-B6MWbnlo.cjs → img-Bl4Pt1QH.cjs} +1 -1
  26. package/dist/{img-CeyprTwt.js → img-Cyr1eIO7.js} +1 -1
  27. package/dist/{index-BKWunRAY.cjs → index-Cn2tUOoX.cjs} +1 -1
  28. package/dist/{index-Ckt5xLw3.js → index-d3erwTWB.js} +1 -1
  29. package/dist/{pdf-BoIy0kYM.cjs → pdf-BQABl7QG.cjs} +1 -1
  30. package/dist/{pdf-C8Uc-ViT.js → pdf-BQRTRQlZ.js} +1 -1
  31. package/dist/{useNestedProp-BU5A_H6S.js → useNestedProp-BqKuhIvF.js} +1 -1
  32. package/dist/{useNestedProp-swJfhg8O.cjs → useNestedProp-C8955nsn.cjs} +1 -1
  33. package/dist/{usePrinter-Dhf-GWO2.cjs → usePrinter-BrH80VBz.cjs} +1 -1
  34. package/dist/{usePrinter-Drrm-7ZN.js → usePrinter-CHrKIDM7.js} +3 -3
  35. package/dist/{vue-data-ui-DEFuCGY2.js → vue-data-ui-BRKcN5_z.js} +63 -63
  36. package/dist/{vue-data-ui-BwmmF0Rx.cjs → vue-data-ui-BbzW2_-6.cjs} +1 -1
  37. package/dist/vue-data-ui.cjs +1 -1
  38. package/dist/vue-data-ui.js +1 -1
  39. package/dist/{vue-ui-3d-bar-Dejz1jbq.js → vue-ui-3d-bar-BIw7nTYA.js} +9 -9
  40. package/dist/{vue-ui-3d-bar-B7HO9mUa.cjs → vue-ui-3d-bar-WFymJ4EL.cjs} +1 -1
  41. package/dist/{vue-ui-accordion-CACZOsPN.cjs → vue-ui-accordion-7GoAZx3k.cjs} +1 -1
  42. package/dist/{vue-ui-accordion-CHWjFAdS.js → vue-ui-accordion-BJyaBDyF.js} +3 -3
  43. package/dist/{vue-ui-age-pyramid-BuI0BAu6.cjs → vue-ui-age-pyramid-DGpLdvsL.cjs} +1 -1
  44. package/dist/{vue-ui-age-pyramid-BCbQzcSN.js → vue-ui-age-pyramid-Dn_061NF.js} +10 -10
  45. package/dist/{vue-ui-annotator-BVkhLQx1.js → vue-ui-annotator-Y65oZVga.js} +2 -2
  46. package/dist/{vue-ui-annotator-D3WW79fZ.cjs → vue-ui-annotator-ypStRKCB.cjs} +1 -1
  47. package/dist/{vue-ui-bullet-Dp-pvoks.js → vue-ui-bullet-B5mjXy0q.js} +8 -8
  48. package/dist/{vue-ui-bullet-Cu4QFP97.cjs → vue-ui-bullet-C_Ppz5nn.cjs} +1 -1
  49. package/dist/{vue-ui-candlestick-PL89PKKX.js → vue-ui-candlestick-BIC2-GAV.js} +11 -11
  50. package/dist/{vue-ui-candlestick-CvzvkTZL.cjs → vue-ui-candlestick-BrDk_pc_.cjs} +1 -1
  51. package/dist/{vue-ui-carousel-table-pGj3lD-7.cjs → vue-ui-carousel-table-BTxtBHvb.cjs} +1 -1
  52. package/dist/{vue-ui-carousel-table-CxCDgVti.js → vue-ui-carousel-table-CnvQ0CeQ.js} +4 -4
  53. package/dist/{vue-ui-chestnut-BCLNZl02.cjs → vue-ui-chestnut-D_NZDyDN.cjs} +1 -1
  54. package/dist/{vue-ui-chestnut-B59bltYj.js → vue-ui-chestnut-IsRTDol2.js} +8 -8
  55. package/dist/{vue-ui-chord-I12oZYBZ.cjs → vue-ui-chord-CZ66gJ7w.cjs} +1 -1
  56. package/dist/{vue-ui-chord-311T5EMM.js → vue-ui-chord-iSsr3a59.js} +12 -12
  57. package/dist/{vue-ui-circle-pack-ckubmbMP.js → vue-ui-circle-pack-CS2l9IXg.js} +9 -9
  58. package/dist/{vue-ui-circle-pack-BdEy-F2l.cjs → vue-ui-circle-pack-lGkj98rL.cjs} +1 -1
  59. package/dist/{vue-ui-cursor-DuaNjqbd.js → vue-ui-cursor-Cq9lPDB7.js} +2 -2
  60. package/dist/{vue-ui-cursor-CB9lfY2N.cjs → vue-ui-cursor-YZyc0ARl.cjs} +1 -1
  61. package/dist/{vue-ui-dashboard-z6r_7oqD.js → vue-ui-dashboard-7Cm-15oc.js} +62 -62
  62. package/dist/{vue-ui-dashboard-BYVM2ULB.cjs → vue-ui-dashboard-jP2U4qtK.cjs} +1 -1
  63. package/dist/{vue-ui-digits-uhUYI1ca.js → vue-ui-digits-BecNI-j7.js} +2 -2
  64. package/dist/{vue-ui-digits-DKjgPEvR.cjs → vue-ui-digits-C5PfeED6.cjs} +1 -1
  65. package/dist/{vue-ui-donut-C7VlH0Dm.cjs → vue-ui-donut-BM9i2XHJ.cjs} +1 -1
  66. package/dist/{vue-ui-donut-C0Wl5tdn.js → vue-ui-donut-D_bFxovZ.js} +12 -12
  67. package/dist/{vue-ui-donut-evolution-BSZYlpQ4.js → vue-ui-donut-evolution-C8dlmVur.js} +11 -11
  68. package/dist/{vue-ui-donut-evolution-DS2dqteq.cjs → vue-ui-donut-evolution-Oga32kTV.cjs} +1 -1
  69. package/dist/{vue-ui-dumbbell-CTcvX2CT.cjs → vue-ui-dumbbell-ClzXgan7.cjs} +1 -1
  70. package/dist/{vue-ui-dumbbell-9sEMuWdj.js → vue-ui-dumbbell-Ds41wAQh.js} +10 -10
  71. package/dist/{vue-ui-flow-wAvTzG20.cjs → vue-ui-flow-Bp1oqzTj.cjs} +1 -1
  72. package/dist/{vue-ui-flow-Bn6eRbfA.js → vue-ui-flow-CqdSvk4_.js} +11 -11
  73. package/dist/{vue-ui-funnel-ENbP7k7d.js → vue-ui-funnel-CNDgAWjp.js} +9 -9
  74. package/dist/{vue-ui-funnel-DQflekb1.cjs → vue-ui-funnel-y3hN7BGU.cjs} +1 -1
  75. package/dist/{vue-ui-galaxy-B6thZdtp.cjs → vue-ui-galaxy-D5vKPiFH.cjs} +1 -1
  76. package/dist/{vue-ui-galaxy-BXBlLF0x.js → vue-ui-galaxy-DzUAHZ4G.js} +11 -11
  77. package/dist/{vue-ui-gauge-TLv35WQu.cjs → vue-ui-gauge-57ahTSbZ.cjs} +1 -1
  78. package/dist/{vue-ui-gauge-D-BFLHdh.js → vue-ui-gauge-Cj-4ZhyL.js} +7 -7
  79. package/dist/{vue-ui-gizmo-CupuHUJa.js → vue-ui-gizmo-CCS3u0qr.js} +3 -3
  80. package/dist/{vue-ui-gizmo-CIDsbSUq.cjs → vue-ui-gizmo-D5_kCO9e.cjs} +1 -1
  81. package/dist/{vue-ui-heatmap-Df3qLtt5.cjs → vue-ui-heatmap-B8sfOhVF.cjs} +1 -1
  82. package/dist/{vue-ui-heatmap-Bxy7ffI3.js → vue-ui-heatmap-CBRd8kvj.js} +10 -10
  83. package/dist/{vue-ui-history-plot-CPbp9vdL.js → vue-ui-history-plot-4XT22zB_.js} +11 -11
  84. package/dist/{vue-ui-history-plot-CPmQ5Xri.cjs → vue-ui-history-plot-DQVpKlp1.cjs} +1 -1
  85. package/dist/{vue-ui-kpi-D16IoodO.js → vue-ui-kpi-B-lBgRvZ.js} +3 -3
  86. package/dist/{vue-ui-kpi-D6wD01aX.cjs → vue-ui-kpi-DjI1yXtc.cjs} +1 -1
  87. package/dist/{vue-ui-mini-loader-BczPBX3e.cjs → vue-ui-mini-loader-BpAnNEHG.cjs} +1 -1
  88. package/dist/{vue-ui-mini-loader-CceGVViE.js → vue-ui-mini-loader-_ksyazrb.js} +2 -2
  89. package/dist/{vue-ui-molecule-uQWB-9XK.cjs → vue-ui-molecule-BqpYPmrd.cjs} +1 -1
  90. package/dist/{vue-ui-molecule-CrQakNH_.js → vue-ui-molecule-Db_QmLY6.js} +11 -11
  91. package/dist/{vue-ui-mood-radar-BG9otX9u.cjs → vue-ui-mood-radar-DI_FioVr.cjs} +1 -1
  92. package/dist/{vue-ui-mood-radar-DahDca5w.js → vue-ui-mood-radar-Y_CGEC1L.js} +11 -11
  93. package/dist/{vue-ui-nested-donuts-DTNxPtmB.cjs → vue-ui-nested-donuts-B0rJlEH0.cjs} +1 -1
  94. package/dist/{vue-ui-nested-donuts-XJH9z_wF.js → vue-ui-nested-donuts-DosW9Sfg.js} +11 -11
  95. package/dist/{vue-ui-onion-rmq2wvkV.cjs → vue-ui-onion-CEHc9oKt.cjs} +1 -1
  96. package/dist/{vue-ui-onion-BJvveHv1.js → vue-ui-onion-CQwIVcfN.js} +11 -11
  97. package/dist/{vue-ui-parallel-coordinate-plot-DUG7AQBu.cjs → vue-ui-parallel-coordinate-plot-C1sxm3Nr.cjs} +1 -1
  98. package/dist/{vue-ui-parallel-coordinate-plot-C1A6OGCv.js → vue-ui-parallel-coordinate-plot-Cdu0SvMZ.js} +12 -12
  99. package/dist/{vue-ui-quadrant-CPUtUNLW.js → vue-ui-quadrant-B8H5sBMi.js} +12 -12
  100. package/dist/{vue-ui-quadrant-wz9ILTxc.cjs → vue-ui-quadrant-DM3Afg_i.cjs} +1 -1
  101. package/dist/{vue-ui-quick-chart-D5GV86FD.js → vue-ui-quick-chart-ClB6jwSV.js} +9 -9
  102. package/dist/{vue-ui-quick-chart-BUCAhqff.cjs → vue-ui-quick-chart-ClJi48bc.cjs} +1 -1
  103. package/dist/{vue-ui-radar-DgxnT6Ia.js → vue-ui-radar-BTluZs04.js} +12 -12
  104. package/dist/{vue-ui-radar-DEJQlniz.cjs → vue-ui-radar-f0QY_Mal.cjs} +1 -1
  105. package/dist/{vue-ui-rating-oHYSjb-S.cjs → vue-ui-rating-B71_TxmN.cjs} +1 -1
  106. package/dist/{vue-ui-rating-YhL9VCJu.js → vue-ui-rating-CTNYeoXO.js} +2 -2
  107. package/dist/{vue-ui-relation-circle-CuN880Sz.js → vue-ui-relation-circle-CdHhoGcO.js} +7 -7
  108. package/dist/{vue-ui-relation-circle-fvzrVyeW.cjs → vue-ui-relation-circle-DHOG2jKh.cjs} +1 -1
  109. package/dist/{vue-ui-ridgeline-0N6HCsbx.cjs → vue-ui-ridgeline-CxhklaLX.cjs} +1 -1
  110. package/dist/{vue-ui-ridgeline-DcJqJ4Br.js → vue-ui-ridgeline-Dr6UOfwb.js} +12 -12
  111. package/dist/{vue-ui-rings-B3NvRyTt.cjs → vue-ui-rings-DoGxh2qe.cjs} +1 -1
  112. package/dist/{vue-ui-rings-CWVbql32.js → vue-ui-rings-N2mHKtLh.js} +12 -12
  113. package/dist/{vue-ui-scatter-BomRqjIY.js → vue-ui-scatter-BcJRyqbE.js} +12 -12
  114. package/dist/{vue-ui-scatter-pm9MRNSF.cjs → vue-ui-scatter-BnRkkP5Z.cjs} +1 -1
  115. package/dist/{vue-ui-skeleton-Buze5CJ9.js → vue-ui-skeleton-BOtCpAcY.js} +3 -3
  116. package/dist/{vue-ui-skeleton-D5NShLgw.cjs → vue-ui-skeleton-Mcoev-5q.cjs} +1 -1
  117. package/dist/{vue-ui-smiley-BwfJxJz1.js → vue-ui-smiley-BPqpTUTh.js} +2 -2
  118. package/dist/{vue-ui-smiley-2dUYrT8i.cjs → vue-ui-smiley-Ch9trBZA.cjs} +1 -1
  119. package/dist/{vue-ui-spark-trend-C7iY_86w.js → vue-ui-spark-trend-BXo8mbxJ.js} +5 -5
  120. package/dist/{vue-ui-spark-trend-CEisuf9v.cjs → vue-ui-spark-trend-PqEN-rL8.cjs} +1 -1
  121. package/dist/{vue-ui-sparkbar-CRuTBzCm.js → vue-ui-sparkbar-DEsL52nJ.js} +4 -4
  122. package/dist/{vue-ui-sparkbar-CYBJuXyQ.cjs → vue-ui-sparkbar-DnRQFo63.cjs} +1 -1
  123. package/dist/{vue-ui-sparkgauge-BXiL-H2G.cjs → vue-ui-sparkgauge-C0E5Sojk.cjs} +1 -1
  124. package/dist/{vue-ui-sparkgauge-DlQVyQjt.js → vue-ui-sparkgauge-DkawMq8d.js} +4 -4
  125. package/dist/{vue-ui-sparkhistogram-dRHZS69c.cjs → vue-ui-sparkhistogram-Bqtsbb3w.cjs} +1 -1
  126. package/dist/{vue-ui-sparkhistogram-B0dDhsh7.js → vue-ui-sparkhistogram-D8ZCXl7m.js} +5 -5
  127. package/dist/{vue-ui-sparkline--7FAyaV6.cjs → vue-ui-sparkline-BTruGe7A.cjs} +1 -1
  128. package/dist/{vue-ui-sparkline-BPYP_3F7.js → vue-ui-sparkline-D8LYPXpr.js} +4 -4
  129. package/dist/{vue-ui-sparkstackbar-DIIJj1wV.cjs → vue-ui-sparkstackbar-DeXUgBIH.cjs} +1 -1
  130. package/dist/{vue-ui-sparkstackbar-CW8EOoq6.js → vue-ui-sparkstackbar-DzeVCG0H.js} +5 -5
  131. package/dist/{vue-ui-stackbar-Ck1yeR-g.cjs → vue-ui-stackbar-CaFp42Tn.cjs} +1 -1
  132. package/dist/{vue-ui-stackbar-C7VZ5PHn.js → vue-ui-stackbar-DQ9CcKUd.js} +13 -13
  133. package/dist/{vue-ui-strip-plot-DZMIliYA.js → vue-ui-strip-plot-C6gcQLMI.js} +11 -11
  134. package/dist/{vue-ui-strip-plot-C2YMIwOm.cjs → vue-ui-strip-plot-DzNU6VRW.cjs} +1 -1
  135. package/dist/{vue-ui-table-DggvYyBd.js → vue-ui-table-D7azsjo3.js} +3 -3
  136. package/dist/{vue-ui-table-BR32W2JW.cjs → vue-ui-table-DP2ZaGWa.cjs} +1 -1
  137. package/dist/{vue-ui-table-heatmap-Bl8BJlrP.cjs → vue-ui-table-heatmap-B2gZkAqm.cjs} +1 -1
  138. package/dist/{vue-ui-table-heatmap-Co86evBH.js → vue-ui-table-heatmap-DINNMAyX.js} +4 -4
  139. package/dist/{vue-ui-table-sparkline-bpl24ydD.js → vue-ui-table-sparkline-BrYh6fVq.js} +5 -5
  140. package/dist/{vue-ui-table-sparkline-CR4Xo17N.cjs → vue-ui-table-sparkline-CgN2nMYT.cjs} +1 -1
  141. package/dist/{vue-ui-thermometer-C03In60a.cjs → vue-ui-thermometer-DgZfQbR2.cjs} +1 -1
  142. package/dist/{vue-ui-thermometer-9fpJItF7.js → vue-ui-thermometer-J0A6MZy_.js} +7 -7
  143. package/dist/{vue-ui-timer-Jei5BiD_.js → vue-ui-timer-CI8zPXh3.js} +5 -5
  144. package/dist/{vue-ui-timer-B-GRZP1F.cjs → vue-ui-timer-ClM5FpoU.cjs} +1 -1
  145. package/dist/{vue-ui-tiremarks-CtojdnkW.cjs → vue-ui-tiremarks-19Krsd1f.cjs} +1 -1
  146. package/dist/{vue-ui-tiremarks-B8WG2ok9.js → vue-ui-tiremarks-BuNik_Pf.js} +7 -7
  147. package/dist/{vue-ui-treemap-Cb7cgmml.cjs → vue-ui-treemap-DvmJ1MOU.cjs} +1 -1
  148. package/dist/{vue-ui-treemap-6KYCNZho.js → vue-ui-treemap-oUtdOGWu.js} +12 -12
  149. package/dist/{vue-ui-vertical-bar-BEFnicAy.js → vue-ui-vertical-bar-2bHPN2lr.js} +12 -12
  150. package/dist/{vue-ui-vertical-bar-U38k297l.cjs → vue-ui-vertical-bar-RT-SM-us.cjs} +1 -1
  151. package/dist/{vue-ui-waffle-BiDUa_mf.cjs → vue-ui-waffle-BSKRUJbJ.cjs} +1 -1
  152. package/dist/{vue-ui-waffle-DkmwDnZR.js → vue-ui-waffle-BuISvHw-.js} +12 -12
  153. package/dist/{vue-ui-wheel-DP7fvbGp.js → vue-ui-wheel-CSy7_x22.js} +7 -7
  154. package/dist/{vue-ui-wheel-_n8mecg5.cjs → vue-ui-wheel-DfBVkT9x.cjs} +1 -1
  155. package/dist/{vue-ui-word-cloud-D7AN_XSy.cjs → vue-ui-word-cloud-BlfCmzD-.cjs} +1 -1
  156. package/dist/{vue-ui-word-cloud-QJS8wmHH.js → vue-ui-word-cloud-DEpoSRMP.js} +10 -10
  157. package/dist/vue-ui-world-Cy1VBlK3.js +931 -0
  158. package/dist/vue-ui-world-EgFhVXSY.cjs +19 -0
  159. package/dist/{vue-ui-xy-B31mVrV8.js → vue-ui-xy-PaM6vcjk.js} +16 -16
  160. package/dist/{vue-ui-xy-DrSTGIwE.cjs → vue-ui-xy-aQEDcKbT.cjs} +2 -2
  161. package/dist/{vue-ui-xy-canvas-Cb-SSn4j.cjs → vue-ui-xy-canvas-C6-sYgU_.cjs} +1 -1
  162. package/dist/{vue-ui-xy-canvas-CcYTS3qd.js → vue-ui-xy-canvas-CSyX_xLO.js} +12 -12
  163. package/package.json +1 -1
  164. package/dist/vue-ui-world-BKjsYsNe.js +0 -931
  165. package/dist/vue-ui-world-Cwu0_sO2.cjs +0 -19
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BKWunRAY.cjs"),le=require("./useNestedProp-swJfhg8O.cjs"),ae=require("./usePrinter-Dhf-GWO2.cjs"),Ce=require("./PackageVersion-BhpRHJg-.cjs"),we=require("./Legend-m-jOk1o6.cjs"),Be=require("./Title-DnNgxDaw.cjs"),Se=require("./Tooltip-BcRV15Nk.cjs"),_e=require("./DataTable-CzL8BmEn.cjs"),Ne=require("./vue-ui-accordion-CACZOsPN.cjs"),ze=require("./PenAndPaper-Cr_VFW1Y.cjs"),$e=require("./vue-ui-skeleton-D5NShLgw.cjs"),oe=require("./useResponsive-BBkmXXaa.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),Ee=require("./useChartAccessibility-Cm7nkzTG.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["id"],Ae=["xmlns","viewBox"],Pe=["x","y","width","height"],Ve={key:1},Fe=["id"],Oe=["stop-color"],De=["stop-color"],Ie=["stop-color"],Xe={key:2},qe=["x1","x2","y1","y2","stroke","stroke-width"],Ye={key:3},Re=["x","y","fill","font-size"],je=["transform","font-size","fill","font-weight"],Ue={key:5},He=["x1","x2","y1","y2","stroke","stroke-width"],We={key:6},Ge=["transform","fill","font-size","text-anchor"],Ze=["x","y","font-size","fill","font-weight"],Je=["x1","x2","y1","y2","stroke","stroke-width"],Ke=["x1","x2","y1","y2","stroke","stroke-width"],Qe=["d","stroke","stroke-width"],et=["d","stroke","stroke-width"],tt=["cx","cy","fill","r"],lt=["cx","cy","fill","r","stroke","stroke-width"],at={key:1},ot=["x","y","font-size","fill","font-weight"],st={key:2},rt=["x","y","font-size","font-weight","fill"],nt=["cx","cy","r","onMouseenter","onClick"],it={key:5,class:"vue-data-ui-watermark"},ut=["onClick"],ct=["innerHTML"],vt={__name:"vue-ui-history-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(se,{expose:re,emit:ne}){const{vue_ui_history_plot:ie}=r.useConfig(),c=se,k=e.ref(null),M=e.ref(null),T=e.ref(0),A=e.ref(null),P=e.ref(0),V=e.ref(0),F=e.ref(0),w=e.ref(null),O=e.ref(null),b=e.ref(r.createUid()),N=e.ref(!1),z=e.ref(""),h=e.ref([]),B=e.ref(!1),p=e.ref(null),C=e.ref(!1),D=e.ref(null),y=e.computed({get:()=>!!c.dataset&&c.dataset.length,set:l=>l}),I=ne;e.onMounted(X),e.onBeforeUnmount(()=>{w.value&&w.value.disconnect()});function X(){if(r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiHistoryPlot",type:"dataset"}):c.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{y.value=!1,r.error({componentName:"VueUiHistoryPlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=oe.throttle(()=>{const{width:o,height:a}=oe.useResponsive({chart:k.value,title:t.value.style.chart.title.text?M.value:null,noTitle:O.value,legend:t.value.style.chart.legend.show?A.value:null,source:D.value});requestAnimationFrame(()=>{v.value.width=o,v.value.height=a,i.value.plots=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:3,fallback:3}),i.value.indexLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.indexLabels.fontSize,threshold:6,fallback:6}),i.value.labels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.labels.fontSize,threshold:6,fallback:6}),i.value.xAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.labels.fontSize,threshold:6,fallback:6}),i.value.xAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.name.fontSize,threshold:6,fallback:6}),i.value.yAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.labels.fontSize,threshold:6,fallback:6}),i.value.yAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.name.fontSize,threshold:6,fallback:6})})});w.value=new ResizeObserver(l),w.value.observe(k.value.parentNode)}}function q(){const l=le.useNestedProp({userConfig:c.config,defaultConfig:ie});let o={};return l.theme?o={...le.useNestedProp({userConfig:r.themes.vue_ui_history_plot[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:o=l,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMin")?o.style.chart.axes.x.scaleMin=c.config.style.chart.axes.x.scaleMin:o.style.chart.axes.x.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMax")?o.style.chart.axes.x.scaleMax=c.config.style.chart.axes.x.scaleMax:o.style.chart.axes.x.scaleMax=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMin")?o.style.chart.axes.y.scaleMin=c.config.style.chart.axes.y.scaleMin:o.style.chart.axes.y.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMax")?o.style.chart.axes.y.scaleMax=c.config.style.chart.axes.y.scaleMax:o.style.chart.axes.y.scaleMax=null,o}const t=e.computed({get:()=>q(),set:l=>l}),{userOptionsVisible:$,setUserOptionsVisibility:Y,keepUserOptionState:R}=Le.useUserOptionState({config:t.value}),{svgRef:j}=Ee.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>c.config,l=>{t.value=q(),$.value=!t.value.userOptions.showOnChartHover,X(),T.value+=1,V.value+=1,P.value+=1,v.value.height=t.value.style.chart.height,v.value.width=t.value.style.chart.width,i.value.plots=t.value.style.chart.plots.radius,i.value.indexLabels=t.value.style.chart.plots.indexLabels.fontSize,i.value.labels=t.value.style.chart.plots.labels.fontSize,i.value.xAxisLabels=t.value.style.chart.axes.x.labels.fontSize,i.value.xAxisName=t.value.style.chart.axes.x.name.fontSize,i.value.yAxisLabels=t.value.style.chart.axes.y.labels.fontSize,i.value.yAxisName=t.value.style.chart.axes.y.name.fontSize,f.value.showTable=t.value.table.show,f.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:U,isImaging:H,generatePdf:W,generateImage:G}=ae.usePrinter({elementId:`history_plot_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-history-plot",options:t.value.userOptions.print}),ue=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ce=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),f=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),v=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),n=e.computed(()=>{const l=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:l,top:o,right:v.value.width-t.value.style.chart.padding.right,bottom:v.value.height-t.value.style.chart.padding.bottom,width:v.value.width-l-t.value.style.chart.padding.right,height:v.value.height-o-t.value.style.chart.padding.bottom}}),i=e.ref({plots:t.value.style.chart.plots.radius,indexLabels:t.value.style.chart.plots.indexLabels.fontSize,labels:t.value.style.chart.plots.labels.fontSize,xAxisLabels:t.value.style.chart.axes.x.labels.fontSize,xAxisName:t.value.style.chart.axes.x.name.fontSize,yAxisLabels:t.value.style.chart.axes.y.labels.fontSize,yAxisName:t.value.style.chart.axes.y.name.fontSize}),x=e.computed(()=>y.value?c.dataset.map((l,o)=>({...l,color:l.color?r.convertColorToHex(l.color):ce.value[o]||r.palette[o]||r.palette[o%r.palette.length],seriesIndex:o})):[]),ve=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.x))):1),de=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.x)));return l<0?l:0}),he=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.y))):1),ye=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.y)));return l<0?l:0}),d=e.computed(()=>{const l=r.calculateNiceScale(t.value.style.chart.axes.x.scaleMin===null?de.value:t.value.style.chart.axes.x.scaleMin,t.value.style.chart.axes.x.scaleMax===null?ve.value:t.value.style.chart.axes.x.scaleMax,t.value.style.chart.axes.x.ticks),o=r.calculateNiceScale(t.value.style.chart.axes.y.scaleMin===null?ye.value:t.value.style.chart.axes.y.scaleMin,t.value.style.chart.axes.y.scaleMax===null?he.value:t.value.style.chart.axes.y.scaleMax,t.value.style.chart.axes.y.ticks);return{x:l,y:o,tickX:l.ticks.map(a=>({x:n.value.left+(a-l.min)/(l.max-l.min)*n.value.width,y1:n.value.top,y2:n.value.bottom,value:a})),tickY:o.ticks.map(a=>({y:n.value.bottom-(a-o.min)/(o.max-o.min)*n.value.height,x1:n.value.left,x2:n.value.right,value:a}))}});function fe(l){const o=d.value.x.min<0?Math.abs(d.value.x.min):d.value.x.min>0?-d.value.x.min:0;return n.value.left+((l||0)+o)/(d.value.x.max+o)*n.value.width}function me(l){const o=d.value.y.min<0?Math.abs(d.value.y.min):d.value.y.min>0?-d.value.y.min:0;return n.value.bottom-((l||0)+o)/(d.value.y.max+o)*n.value.height}const g=e.computed(()=>x.value.filter(l=>!h.value.includes(l.seriesIndex)).map((l,o)=>{const a=l.values.map((s,m)=>({valueX:s.x,valueY:s.y,label:s.label,x:fe(s.x),y:me(s.y),color:l.color,seriesName:l.name,id:r.createUid()})),u=a.map(s=>`${s.x},${s.y} `).join("").trim();return{...l,plots:a,path:`M${u}`}}));function Z(l){h.value.includes(l)?h.value=h.value.filter(o=>o!==l):h.value.push(l)}const J=e.computed(()=>x.value.map(l=>({...l,opacity:h.value.includes(l.seriesIndex)?.5:1,segregate:()=>Z(l.seriesIndex),isSegregated:h.value.includes(l.seriesIndex),shape:"circle"}))),pe=e.computed(()=>({cy:"history-plot-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function xe(l){I("selectDatapoint",l)}function K(l){I("selectLegend",{...l,isSegregated:!l.isSegregated,opacity:l.isSegregated?1:.5})}function ge(l){B.value=l,F.value+=1}const L=e.ref(null);function ke({datapoint:l,plotIndex:o,seriesIndex:a}){L.value={datapoint:l,seriesIndex:a,plotIndex:o,config:t.value,series:x.value},p.value=l;const u=t.value.style.chart.tooltip.customFormat;if(C.value=!1,r.isFunction(u))try{const s=u({seriesIndex:a,datapoint:l,plotIndex:o,series:x.value,config:t.value});typeof s=="string"&&(z.value=s,C.value=!0)}catch{console.warn("Custom format cannot be applied."),C.value=!1}if(!C.value){let s="";s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};margin-bottom:3px;padding-bottom:6px;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg><span>${l.seriesName}</span></div>`,s+=`<div>${l.label}</div>`,s+=`<div>${t.value.style.chart.axes.x.name.text||"x"}: ${r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,l.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:l.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))}</div>`,s+=`<div>${t.value.style.chart.axes.y.name.text||"y"}: ${r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,l.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:l.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))}</div>`,z.value=`<div>${s}</div>`}N.value=!0}e.computed(()=>({head:g.value.map(o=>({name:o.name,color:o.color}))}));const S=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.datapoint,t.value.table.columnNames.x,t.value.table.columnNames.y],o=g.value.flatMap(u=>u.plots.map(s=>[{color:s.color,name:s.seriesName},s.label,r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,s.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:s.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding})),r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,s.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:s.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))])),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:o,config:a,colNames:l}});function Q(){e.nextTick(()=>{const l=[[t.value.table.columnNames.series],[t.value.table.columnNames.datapoint],[t.value.table.columnNames.x],[t.value.table.columnNames.y]],o=g.value.flatMap(s=>s.plots.map(m=>[[m.seriesName],[m.label],[m.valueX],[m.valueY]])),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],l].concat(o),u=r.createCsvContent(a);r.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-history-plot"})})}const _=e.ref(!1);function E(){_.value=!_.value}function ee(){f.value.showTable=!f.value.showTable}function te(){f.value.showTooltip=!f.value.showTooltip}function be(){return g.value}return re({getData:be,generatePdf:W,generateCsv:Q,generateImage:G,toggleTable:ee,toggleTooltip:te,toggleAnnotator:E}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{id:`history_plot_${b.value}`,ref_key:"historyPlotChart",ref:k,class:e.normalizeClass({"vue-ui-history-plot":!0,"vue-data-ui-wrapper-fullscreen":B.value}),style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`),onMouseenter:o[3]||(o[3]=()=>e.unref(Y)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(Y)(!1))},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ze._sfc_main,{key:0,svgRef:e.unref(j),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:_.value,onClose:E},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ue.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:O,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:M,class:"vue-ui-xy-title",style:e.normalizeStyle(`font-family:${t.value.style.fontFamily}`)},[(e.openBlock(),e.createBlock(Be._sfc_main,{key:`title_${T.value}`,config:{title:{cy:"history-plot-div-title",...t.value.style.chart.title},subtitle:{cy:"history-plot-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value&&(e.unref(R)||e.unref($))?(e.openBlock(),e.createBlock(ae.UserOptions,{ref:"details",key:`user_option_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(H),uid:b.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,chartElement:k.value,position:t.value.userOptions.position,isTooltip:f.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:_.value,onToggleFullscreen:ge,onGeneratePdf:e.unref(W),onGenerateCsv:Q,onGenerateImage:e.unref(G),onToggleTable:ee,onToggleTooltip:te,onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(R)?e.unref($)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:u})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:u})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:u})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:u})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:j,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${v.value.width<0?.1:v.value.width} ${v.value.height<0?.1:v.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ce._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:n.value.left,y:n.value.top,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Pe)):e.createCommentVNode("",!0),t.value.style.chart.plots.gradient.show?(e.openBlock(),e.createElementBlock("defs",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${u}_${b.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(r.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,Oe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ie)],8,Fe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalLines.show?(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x,x2:a.x,y1:a.y1,y2:a.y2,stroke:t.value.style.chart.grid.verticalLines.stroke,"stroke-width":t.value.style.chart.grid.verticalLines.strokeWidth,"stroke-linecap":"round"},null,8,qe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.labels.show?(e.openBlock(),e.createElementBlock("g",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("text",{x:n.value.left+t.value.style.chart.axes.y.labels.offsetX-4,y:a.y+i.value.yAxisLabels/3,fill:t.value.style.chart.axes.y.labels.color,"font-size":i.value.yAxisLabels,"text-anchor":"end"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.y.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.y.labels.prefix,v:a.value,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))),9,Re))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.name.text?(e.openBlock(),e.createElementBlock("text",{key:4,transform:`translate(${t.value.style.chart.axes.y.name.offsetX+i.value.yAxisName}, ${v.value.height/2+t.value.style.chart.axes.y.name.offsetY}), rotate(-90)`,"font-size":i.value.yAxisName,fill:t.value.style.chart.axes.y.name.color,"font-weight":t.value.style.chart.axes.y.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.y.name.text),9,je)):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalLines.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.horizontalLines.stroke,"stroke-width":t.value.style.chart.grid.horizontalLines.strokeWidth,"stroke-linecap":"round"},null,8,He))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.labels.show?(e.openBlock(),e.createElementBlock("g",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("text",{transform:`translate(${a.x}, ${n.value.bottom+t.value.style.chart.axes.x.labels.offsetY+i.value.xAxisLabels}), rotate(${t.value.style.chart.axes.x.labels.rotation})`,fill:t.value.style.chart.axes.x.labels.color,"font-size":i.value.xAxisLabels,"text-anchor":t.value.style.chart.axes.x.labels.rotation>0?"start":t.value.style.chart.axes.x.labels.rotation<0?"end":"middle"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.x.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.x.labels.prefix,v:a.value,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))),9,Ge))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.name.text?(e.openBlock(),e.createElementBlock("text",{key:7,x:v.value.width/2+t.value.style.chart.axes.x.name.offsetX,y:v.value.height+t.value.style.chart.axes.x.name.offsetY,"font-size":i.value.xAxisName,fill:t.value.style.chart.axes.x.name.color,"font-weight":t.value.style.chart.axes.x.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.x.name.text),9,Ze)):e.createCommentVNode("",!0),t.value.style.chart.grid.xAxis.show?(e.openBlock(),e.createElementBlock("line",{key:8,x1:n.value.left,x2:n.value.left+n.value.width,y1:n.value.bottom,y2:n.value.bottom,stroke:t.value.style.chart.grid.xAxis.stroke,"stroke-width":t.value.style.chart.grid.xAxis.strokeWidth,"stroke-linecap":"round"},null,8,Je)):e.createCommentVNode("",!0),t.value.style.chart.grid.yAxis.show?(e.openBlock(),e.createElementBlock("line",{key:9,x1:n.value.left,x2:n.value.left,y1:n.value.top,y2:n.value.bottom,stroke:t.value.style.chart.grid.yAxis.stroke,"stroke-width":t.value.style.chart.grid.yAxis.strokeWidth,"stroke-linecap":"round"},null,8,Ke)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.paths.show?(e.openBlock(),e.createElementBlock("g",{key:0,style:e.normalizeStyle({opacity:p.value===null?1:.3})},[e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.paths.strokeWidth+4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Qe),e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.paths.useSerieColor?a.color:t.value.style.chart.paths.stroke,"stroke-width":t.value.style.chart.paths.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,et)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.backgroundColor,r:i.value.plots,stroke:"none"},null,8,tt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.plots.gradient.show?`url(#gradient_${u}_${b.value})`:s.color,r:i.value.plots,stroke:t.value.style.chart.plots.stroke,"stroke-width":t.value.style.chart.plots.strokeWidth,class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:p.value===null||p.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},null,14,lt))),256)),t.value.style.chart.plots.labels.show?(e.openBlock(),e.createElementBlock("g",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.labels.offsetX,y:s.y+t.value.style.chart.plots.labels.offsetY+i.value.plots+i.value.labels,"font-size":i.value.labels,fill:t.value.style.chart.plots.labels.color,"font-weight":t.value.style.chart.plots.labels.bold?"bold":"normal","text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:p.value===null||p.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(s.label),15,ot))),256))])):e.createCommentVNode("",!0),t.value.style.chart.plots.indexLabels.show?(e.openBlock(),e.createElementBlock("g",st,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(s,m)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.indexLabels.offsetX,y:s.y+t.value.style.chart.plots.indexLabels.offsetY+i.value.indexLabels/3,"font-size":i.value.indexLabels,"font-weight":t.value.style.chart.plots.indexLabels.bold?"bold":"normal",fill:t.value.style.chart.plots.indexLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(a.color):t.value.style.chart.plots.indexLabels.color,"text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:p.value===null||p.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(t.value.style.chart.plots.indexLabels.startAtZero?m:m+1),15,rt))),256))])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,a=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:"transparent",r:i.value.plots,stroke:"none",onMouseenter:m=>ke({datapoint:u,plotIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:o[0]||(o[0]=m=>{N.value=!1,p.value=null}),onClick:()=>xe(u)},null,40,nt))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:v.value},void 0,!0)],12,Ae)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",it,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(H)})),void 0,!0)])):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.default,{key:6,config:{type:"historyPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,historyPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:A},[t.value.style.chart.legend.show&&y.value?(e.openBlock(),e.createBlock(we.Legend,{key:`legend_${P.value}`,legendSet:J.value,config:pe.value,onClickMarker:o[1]||(o[1]=({legend:a})=>{Z(a.seriesIndex),K(a)})},{item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:s=>{a.segregate(),K(a)},style:e.normalizeStyle(`opacity:${h.value.includes(a.seriesIndex)?.5:1}`)},e.toDisplayString(a.name),13,ut)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:J.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:D,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Se._sfc_main,{show:f.value.showTooltip&&N.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:z.value,isCustom:C.value,isFullscreen:B.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),y.value?(e.openBlock(),e.createBlock(Ne.default,{key:8,hideDetails:"",config:{open:f.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(_e.DataTable,{key:`table_${V.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>f.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,ct)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Te))}},dt=Me._export_sfc(vt,[["__scopeId","data-v-56983f81"]]);exports.default=dt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Cn2tUOoX.cjs"),le=require("./useNestedProp-C8955nsn.cjs"),ae=require("./usePrinter-BrH80VBz.cjs"),Ce=require("./PackageVersion-BxSGdh6L.cjs"),we=require("./Legend-ieOu_fKK.cjs"),Be=require("./Title-D62pPwLz.cjs"),Se=require("./Tooltip-C_H6-uAa.cjs"),_e=require("./DataTable-CNCnRrD-.cjs"),Ne=require("./vue-ui-accordion-7GoAZx3k.cjs"),ze=require("./PenAndPaper-ByAFuR-l.cjs"),$e=require("./vue-ui-skeleton-Mcoev-5q.cjs"),oe=require("./useResponsive-BBkmXXaa.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),Ee=require("./useChartAccessibility-Cm7nkzTG.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["id"],Ae=["xmlns","viewBox"],Pe=["x","y","width","height"],Ve={key:1},Fe=["id"],Oe=["stop-color"],De=["stop-color"],Ie=["stop-color"],Xe={key:2},qe=["x1","x2","y1","y2","stroke","stroke-width"],Ye={key:3},Re=["x","y","fill","font-size"],je=["transform","font-size","fill","font-weight"],Ue={key:5},He=["x1","x2","y1","y2","stroke","stroke-width"],We={key:6},Ge=["transform","fill","font-size","text-anchor"],Ze=["x","y","font-size","fill","font-weight"],Je=["x1","x2","y1","y2","stroke","stroke-width"],Ke=["x1","x2","y1","y2","stroke","stroke-width"],Qe=["d","stroke","stroke-width"],et=["d","stroke","stroke-width"],tt=["cx","cy","fill","r"],lt=["cx","cy","fill","r","stroke","stroke-width"],at={key:1},ot=["x","y","font-size","fill","font-weight"],st={key:2},rt=["x","y","font-size","font-weight","fill"],nt=["cx","cy","r","onMouseenter","onClick"],it={key:5,class:"vue-data-ui-watermark"},ut=["onClick"],ct=["innerHTML"],vt={__name:"vue-ui-history-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(se,{expose:re,emit:ne}){const{vue_ui_history_plot:ie}=r.useConfig(),c=se,k=e.ref(null),M=e.ref(null),T=e.ref(0),A=e.ref(null),P=e.ref(0),V=e.ref(0),F=e.ref(0),w=e.ref(null),O=e.ref(null),b=e.ref(r.createUid()),N=e.ref(!1),z=e.ref(""),h=e.ref([]),B=e.ref(!1),p=e.ref(null),C=e.ref(!1),D=e.ref(null),y=e.computed({get:()=>!!c.dataset&&c.dataset.length,set:l=>l}),I=ne;e.onMounted(X),e.onBeforeUnmount(()=>{w.value&&w.value.disconnect()});function X(){if(r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiHistoryPlot",type:"dataset"}):c.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{y.value=!1,r.error({componentName:"VueUiHistoryPlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=oe.throttle(()=>{const{width:o,height:a}=oe.useResponsive({chart:k.value,title:t.value.style.chart.title.text?M.value:null,noTitle:O.value,legend:t.value.style.chart.legend.show?A.value:null,source:D.value});requestAnimationFrame(()=>{v.value.width=o,v.value.height=a,i.value.plots=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:3,fallback:3}),i.value.indexLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.indexLabels.fontSize,threshold:6,fallback:6}),i.value.labels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.labels.fontSize,threshold:6,fallback:6}),i.value.xAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.labels.fontSize,threshold:6,fallback:6}),i.value.xAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.name.fontSize,threshold:6,fallback:6}),i.value.yAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.labels.fontSize,threshold:6,fallback:6}),i.value.yAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.name.fontSize,threshold:6,fallback:6})})});w.value=new ResizeObserver(l),w.value.observe(k.value.parentNode)}}function q(){const l=le.useNestedProp({userConfig:c.config,defaultConfig:ie});let o={};return l.theme?o={...le.useNestedProp({userConfig:r.themes.vue_ui_history_plot[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:o=l,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMin")?o.style.chart.axes.x.scaleMin=c.config.style.chart.axes.x.scaleMin:o.style.chart.axes.x.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMax")?o.style.chart.axes.x.scaleMax=c.config.style.chart.axes.x.scaleMax:o.style.chart.axes.x.scaleMax=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMin")?o.style.chart.axes.y.scaleMin=c.config.style.chart.axes.y.scaleMin:o.style.chart.axes.y.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMax")?o.style.chart.axes.y.scaleMax=c.config.style.chart.axes.y.scaleMax:o.style.chart.axes.y.scaleMax=null,o}const t=e.computed({get:()=>q(),set:l=>l}),{userOptionsVisible:$,setUserOptionsVisibility:Y,keepUserOptionState:R}=Le.useUserOptionState({config:t.value}),{svgRef:j}=Ee.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>c.config,l=>{t.value=q(),$.value=!t.value.userOptions.showOnChartHover,X(),T.value+=1,V.value+=1,P.value+=1,v.value.height=t.value.style.chart.height,v.value.width=t.value.style.chart.width,i.value.plots=t.value.style.chart.plots.radius,i.value.indexLabels=t.value.style.chart.plots.indexLabels.fontSize,i.value.labels=t.value.style.chart.plots.labels.fontSize,i.value.xAxisLabels=t.value.style.chart.axes.x.labels.fontSize,i.value.xAxisName=t.value.style.chart.axes.x.name.fontSize,i.value.yAxisLabels=t.value.style.chart.axes.y.labels.fontSize,i.value.yAxisName=t.value.style.chart.axes.y.name.fontSize,f.value.showTable=t.value.table.show,f.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:U,isImaging:H,generatePdf:W,generateImage:G}=ae.usePrinter({elementId:`history_plot_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-history-plot",options:t.value.userOptions.print}),ue=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ce=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),f=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),v=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),n=e.computed(()=>{const l=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:l,top:o,right:v.value.width-t.value.style.chart.padding.right,bottom:v.value.height-t.value.style.chart.padding.bottom,width:v.value.width-l-t.value.style.chart.padding.right,height:v.value.height-o-t.value.style.chart.padding.bottom}}),i=e.ref({plots:t.value.style.chart.plots.radius,indexLabels:t.value.style.chart.plots.indexLabels.fontSize,labels:t.value.style.chart.plots.labels.fontSize,xAxisLabels:t.value.style.chart.axes.x.labels.fontSize,xAxisName:t.value.style.chart.axes.x.name.fontSize,yAxisLabels:t.value.style.chart.axes.y.labels.fontSize,yAxisName:t.value.style.chart.axes.y.name.fontSize}),x=e.computed(()=>y.value?c.dataset.map((l,o)=>({...l,color:l.color?r.convertColorToHex(l.color):ce.value[o]||r.palette[o]||r.palette[o%r.palette.length],seriesIndex:o})):[]),ve=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.x))):1),de=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.x)));return l<0?l:0}),he=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.y))):1),ye=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.y)));return l<0?l:0}),d=e.computed(()=>{const l=r.calculateNiceScale(t.value.style.chart.axes.x.scaleMin===null?de.value:t.value.style.chart.axes.x.scaleMin,t.value.style.chart.axes.x.scaleMax===null?ve.value:t.value.style.chart.axes.x.scaleMax,t.value.style.chart.axes.x.ticks),o=r.calculateNiceScale(t.value.style.chart.axes.y.scaleMin===null?ye.value:t.value.style.chart.axes.y.scaleMin,t.value.style.chart.axes.y.scaleMax===null?he.value:t.value.style.chart.axes.y.scaleMax,t.value.style.chart.axes.y.ticks);return{x:l,y:o,tickX:l.ticks.map(a=>({x:n.value.left+(a-l.min)/(l.max-l.min)*n.value.width,y1:n.value.top,y2:n.value.bottom,value:a})),tickY:o.ticks.map(a=>({y:n.value.bottom-(a-o.min)/(o.max-o.min)*n.value.height,x1:n.value.left,x2:n.value.right,value:a}))}});function fe(l){const o=d.value.x.min<0?Math.abs(d.value.x.min):d.value.x.min>0?-d.value.x.min:0;return n.value.left+((l||0)+o)/(d.value.x.max+o)*n.value.width}function me(l){const o=d.value.y.min<0?Math.abs(d.value.y.min):d.value.y.min>0?-d.value.y.min:0;return n.value.bottom-((l||0)+o)/(d.value.y.max+o)*n.value.height}const g=e.computed(()=>x.value.filter(l=>!h.value.includes(l.seriesIndex)).map((l,o)=>{const a=l.values.map((s,m)=>({valueX:s.x,valueY:s.y,label:s.label,x:fe(s.x),y:me(s.y),color:l.color,seriesName:l.name,id:r.createUid()})),u=a.map(s=>`${s.x},${s.y} `).join("").trim();return{...l,plots:a,path:`M${u}`}}));function Z(l){h.value.includes(l)?h.value=h.value.filter(o=>o!==l):h.value.push(l)}const J=e.computed(()=>x.value.map(l=>({...l,opacity:h.value.includes(l.seriesIndex)?.5:1,segregate:()=>Z(l.seriesIndex),isSegregated:h.value.includes(l.seriesIndex),shape:"circle"}))),pe=e.computed(()=>({cy:"history-plot-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function xe(l){I("selectDatapoint",l)}function K(l){I("selectLegend",{...l,isSegregated:!l.isSegregated,opacity:l.isSegregated?1:.5})}function ge(l){B.value=l,F.value+=1}const L=e.ref(null);function ke({datapoint:l,plotIndex:o,seriesIndex:a}){L.value={datapoint:l,seriesIndex:a,plotIndex:o,config:t.value,series:x.value},p.value=l;const u=t.value.style.chart.tooltip.customFormat;if(C.value=!1,r.isFunction(u))try{const s=u({seriesIndex:a,datapoint:l,plotIndex:o,series:x.value,config:t.value});typeof s=="string"&&(z.value=s,C.value=!0)}catch{console.warn("Custom format cannot be applied."),C.value=!1}if(!C.value){let s="";s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};margin-bottom:3px;padding-bottom:6px;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg><span>${l.seriesName}</span></div>`,s+=`<div>${l.label}</div>`,s+=`<div>${t.value.style.chart.axes.x.name.text||"x"}: ${r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,l.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:l.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))}</div>`,s+=`<div>${t.value.style.chart.axes.y.name.text||"y"}: ${r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,l.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:l.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))}</div>`,z.value=`<div>${s}</div>`}N.value=!0}e.computed(()=>({head:g.value.map(o=>({name:o.name,color:o.color}))}));const S=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.datapoint,t.value.table.columnNames.x,t.value.table.columnNames.y],o=g.value.flatMap(u=>u.plots.map(s=>[{color:s.color,name:s.seriesName},s.label,r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,s.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:s.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding})),r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,s.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:s.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))])),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:o,config:a,colNames:l}});function Q(){e.nextTick(()=>{const l=[[t.value.table.columnNames.series],[t.value.table.columnNames.datapoint],[t.value.table.columnNames.x],[t.value.table.columnNames.y]],o=g.value.flatMap(s=>s.plots.map(m=>[[m.seriesName],[m.label],[m.valueX],[m.valueY]])),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],l].concat(o),u=r.createCsvContent(a);r.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-history-plot"})})}const _=e.ref(!1);function E(){_.value=!_.value}function ee(){f.value.showTable=!f.value.showTable}function te(){f.value.showTooltip=!f.value.showTooltip}function be(){return g.value}return re({getData:be,generatePdf:W,generateCsv:Q,generateImage:G,toggleTable:ee,toggleTooltip:te,toggleAnnotator:E}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{id:`history_plot_${b.value}`,ref_key:"historyPlotChart",ref:k,class:e.normalizeClass({"vue-ui-history-plot":!0,"vue-data-ui-wrapper-fullscreen":B.value}),style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`),onMouseenter:o[3]||(o[3]=()=>e.unref(Y)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(Y)(!1))},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ze._sfc_main,{key:0,svgRef:e.unref(j),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:_.value,onClose:E},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ue.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:O,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:M,class:"vue-ui-xy-title",style:e.normalizeStyle(`font-family:${t.value.style.fontFamily}`)},[(e.openBlock(),e.createBlock(Be._sfc_main,{key:`title_${T.value}`,config:{title:{cy:"history-plot-div-title",...t.value.style.chart.title},subtitle:{cy:"history-plot-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value&&(e.unref(R)||e.unref($))?(e.openBlock(),e.createBlock(ae.UserOptions,{ref:"details",key:`user_option_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(H),uid:b.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,chartElement:k.value,position:t.value.userOptions.position,isTooltip:f.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:_.value,onToggleFullscreen:ge,onGeneratePdf:e.unref(W),onGenerateCsv:Q,onGenerateImage:e.unref(G),onToggleTable:ee,onToggleTooltip:te,onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(R)?e.unref($)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:u})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:u})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:u})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:u})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:j,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${v.value.width<0?.1:v.value.width} ${v.value.height<0?.1:v.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ce._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:n.value.left,y:n.value.top,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Pe)):e.createCommentVNode("",!0),t.value.style.chart.plots.gradient.show?(e.openBlock(),e.createElementBlock("defs",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${u}_${b.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(r.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,Oe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ie)],8,Fe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalLines.show?(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x,x2:a.x,y1:a.y1,y2:a.y2,stroke:t.value.style.chart.grid.verticalLines.stroke,"stroke-width":t.value.style.chart.grid.verticalLines.strokeWidth,"stroke-linecap":"round"},null,8,qe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.labels.show?(e.openBlock(),e.createElementBlock("g",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("text",{x:n.value.left+t.value.style.chart.axes.y.labels.offsetX-4,y:a.y+i.value.yAxisLabels/3,fill:t.value.style.chart.axes.y.labels.color,"font-size":i.value.yAxisLabels,"text-anchor":"end"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.y.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.y.labels.prefix,v:a.value,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))),9,Re))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.name.text?(e.openBlock(),e.createElementBlock("text",{key:4,transform:`translate(${t.value.style.chart.axes.y.name.offsetX+i.value.yAxisName}, ${v.value.height/2+t.value.style.chart.axes.y.name.offsetY}), rotate(-90)`,"font-size":i.value.yAxisName,fill:t.value.style.chart.axes.y.name.color,"font-weight":t.value.style.chart.axes.y.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.y.name.text),9,je)):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalLines.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.horizontalLines.stroke,"stroke-width":t.value.style.chart.grid.horizontalLines.strokeWidth,"stroke-linecap":"round"},null,8,He))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.labels.show?(e.openBlock(),e.createElementBlock("g",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("text",{transform:`translate(${a.x}, ${n.value.bottom+t.value.style.chart.axes.x.labels.offsetY+i.value.xAxisLabels}), rotate(${t.value.style.chart.axes.x.labels.rotation})`,fill:t.value.style.chart.axes.x.labels.color,"font-size":i.value.xAxisLabels,"text-anchor":t.value.style.chart.axes.x.labels.rotation>0?"start":t.value.style.chart.axes.x.labels.rotation<0?"end":"middle"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.x.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.x.labels.prefix,v:a.value,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))),9,Ge))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.name.text?(e.openBlock(),e.createElementBlock("text",{key:7,x:v.value.width/2+t.value.style.chart.axes.x.name.offsetX,y:v.value.height+t.value.style.chart.axes.x.name.offsetY,"font-size":i.value.xAxisName,fill:t.value.style.chart.axes.x.name.color,"font-weight":t.value.style.chart.axes.x.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.x.name.text),9,Ze)):e.createCommentVNode("",!0),t.value.style.chart.grid.xAxis.show?(e.openBlock(),e.createElementBlock("line",{key:8,x1:n.value.left,x2:n.value.left+n.value.width,y1:n.value.bottom,y2:n.value.bottom,stroke:t.value.style.chart.grid.xAxis.stroke,"stroke-width":t.value.style.chart.grid.xAxis.strokeWidth,"stroke-linecap":"round"},null,8,Je)):e.createCommentVNode("",!0),t.value.style.chart.grid.yAxis.show?(e.openBlock(),e.createElementBlock("line",{key:9,x1:n.value.left,x2:n.value.left,y1:n.value.top,y2:n.value.bottom,stroke:t.value.style.chart.grid.yAxis.stroke,"stroke-width":t.value.style.chart.grid.yAxis.strokeWidth,"stroke-linecap":"round"},null,8,Ke)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.paths.show?(e.openBlock(),e.createElementBlock("g",{key:0,style:e.normalizeStyle({opacity:p.value===null?1:.3})},[e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.paths.strokeWidth+4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Qe),e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.paths.useSerieColor?a.color:t.value.style.chart.paths.stroke,"stroke-width":t.value.style.chart.paths.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,et)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.backgroundColor,r:i.value.plots,stroke:"none"},null,8,tt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.plots.gradient.show?`url(#gradient_${u}_${b.value})`:s.color,r:i.value.plots,stroke:t.value.style.chart.plots.stroke,"stroke-width":t.value.style.chart.plots.strokeWidth,class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:p.value===null||p.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},null,14,lt))),256)),t.value.style.chart.plots.labels.show?(e.openBlock(),e.createElementBlock("g",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.labels.offsetX,y:s.y+t.value.style.chart.plots.labels.offsetY+i.value.plots+i.value.labels,"font-size":i.value.labels,fill:t.value.style.chart.plots.labels.color,"font-weight":t.value.style.chart.plots.labels.bold?"bold":"normal","text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:p.value===null||p.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(s.label),15,ot))),256))])):e.createCommentVNode("",!0),t.value.style.chart.plots.indexLabels.show?(e.openBlock(),e.createElementBlock("g",st,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(s,m)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.indexLabels.offsetX,y:s.y+t.value.style.chart.plots.indexLabels.offsetY+i.value.indexLabels/3,"font-size":i.value.indexLabels,"font-weight":t.value.style.chart.plots.indexLabels.bold?"bold":"normal",fill:t.value.style.chart.plots.indexLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(a.color):t.value.style.chart.plots.indexLabels.color,"text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:p.value===null||p.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(t.value.style.chart.plots.indexLabels.startAtZero?m:m+1),15,rt))),256))])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,a=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:"transparent",r:i.value.plots,stroke:"none",onMouseenter:m=>ke({datapoint:u,plotIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:o[0]||(o[0]=m=>{N.value=!1,p.value=null}),onClick:()=>xe(u)},null,40,nt))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:v.value},void 0,!0)],12,Ae)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",it,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(H)})),void 0,!0)])):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.default,{key:6,config:{type:"historyPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,historyPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:A},[t.value.style.chart.legend.show&&y.value?(e.openBlock(),e.createBlock(we.Legend,{key:`legend_${P.value}`,legendSet:J.value,config:pe.value,onClickMarker:o[1]||(o[1]=({legend:a})=>{Z(a.seriesIndex),K(a)})},{item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:s=>{a.segregate(),K(a)},style:e.normalizeStyle(`opacity:${h.value.includes(a.seriesIndex)?.5:1}`)},e.toDisplayString(a.name),13,ut)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:J.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:D,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Se._sfc_main,{show:f.value.showTooltip&&N.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:z.value,isCustom:C.value,isFullscreen:B.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),y.value?(e.openBlock(),e.createBlock(Ne.default,{key:8,hideDetails:"",config:{open:f.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(_e.DataTable,{key:`table_${V.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>f.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,ct)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Te))}},dt=Me._export_sfc(vt,[["__scopeId","data-v-56983f81"]]);exports.default=dt;
@@ -1,7 +1,7 @@
1
1
  import { computed as D, useSlots as x, onMounted as g, watch as C, ref as $, createElementBlock as i, openBlock as s, normalizeStyle as u, normalizeClass as r, createElementVNode as k, renderSlot as n, createTextVNode as y, toDisplayString as h, createVNode as z, Fragment as A, unref as b } from "vue";
2
- import { u as w } from "./useNestedProp-BU5A_H6S.js";
3
- import { u as B, i as L, f as M } from "./index-Ckt5xLw3.js";
4
- import E from "./vue-ui-digits-uhUYI1ca.js";
2
+ import { u as w } from "./useNestedProp-BqKuhIvF.js";
3
+ import { u as B, i as L, f as M } from "./index-d3erwTWB.js";
4
+ import E from "./vue-ui-digits-BecNI-j7.js";
5
5
  const G = {
6
6
  __name: "vue-ui-kpi",
7
7
  props: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./useNestedProp-swJfhg8O.cjs"),u=require("./index-BKWunRAY.cjs"),y=require("./vue-ui-digits-DKjgPEvR.cjs"),C={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(n){const{vue_ui_kpi:m}=u.useConfig(),o=n,a=e.computed({get:()=>i(),set:t=>t}),f=e.useSlots();e.onMounted(()=>{f["chart-background"]&&console.warn("VueUiKpi does not support the #chart-background slot.")});function i(){return p.useNestedProp({userConfig:o.config,defaultConfig:m})}e.watch(()=>o.config,t=>{a.value=i(),r()},{deep:!0});const g=e.ref((typeof o.dataset=="number",o.dataset)),l=e.ref(a.value.useAnimation?a.value.animationValueStart:g.value),s=t=>{const v=a.value.animationFrames,c=Math.abs(t-l.value)/v;function d(){l.value<t?l.value=Math.min(l.value+c,t):l.value>t&&(l.value=Math.max(l.value-c,t)),l.value!==t&&requestAnimationFrame(d)}d()};e.onMounted(()=>{r()});function r(){a.value.useAnimation?(l.value=a.value.animationValueStart,s(o.dataset)):l.value=o.dataset}return e.watch(()=>o.dataset,t=>{a.value.useAnimation?s(t):l.value=t}),(t,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-kpi ${a.value.layoutClass}`),style:e.normalizeStyle(`background:${a.value.backgroundColor}; ${a.value.layoutCss}`)},[e.createElementVNode("div",{class:e.normalizeClass(`vue-ui-kpi-title ${a.value.titleClass}`),style:e.normalizeStyle(`font-family: ${a.value.fontFamily}; font-size:${a.value.titleFontSize}px; color:${a.value.titleColor}; font-weight:${a.value.titleBold?"bold":"normal"}; ${a.value.titleCss}`)},[e.renderSlot(t.$slots,"title",{comment:n.dataset}),e.createTextVNode(" "+e.toDisplayString(a.value.title),1)],6),e.renderSlot(t.$slots,"comment-before",{comment:n.dataset}),e.createElementVNode("div",{class:e.normalizeClass(`vue-ui-kpi-value ${a.value.valueClass}`),style:e.normalizeStyle(`font-family: ${a.value.fontFamily}; font-size:${a.value.valueFontSize}px; color:${a.value.valueColor}; font-weight:${a.value.valueBold?"bold":"normal"}; ${a.value.valueCss}`)},[e.renderSlot(t.$slots,"value",{comment:n.dataset}),a.value.analogDigits.show?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({height:a.value.analogDigits.height+"px"})},[e.createVNode(y.default,{dataset:Number(l.value.toFixed(a.value.valueRounding)),config:{backgroundColor:a.value.backgroundColor,digits:{color:a.value.analogDigits.color,skeletonColor:a.value.analogDigits.skeletonColor}}},null,8,["dataset","config"])],4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(u.applyDataLabel)(a.value.formatter,l.value,e.unref(u.dataLabel)({p:a.value.prefix,v:l.value,s:a.value.suffix,r:a.value.valueRounding}))),1)],64))],6),e.renderSlot(t.$slots,"comment-after",{comment:n.dataset})],6))}};exports.default=C;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./useNestedProp-C8955nsn.cjs"),u=require("./index-Cn2tUOoX.cjs"),y=require("./vue-ui-digits-C5PfeED6.cjs"),C={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(n){const{vue_ui_kpi:m}=u.useConfig(),o=n,a=e.computed({get:()=>i(),set:t=>t}),f=e.useSlots();e.onMounted(()=>{f["chart-background"]&&console.warn("VueUiKpi does not support the #chart-background slot.")});function i(){return p.useNestedProp({userConfig:o.config,defaultConfig:m})}e.watch(()=>o.config,t=>{a.value=i(),r()},{deep:!0});const g=e.ref((typeof o.dataset=="number",o.dataset)),l=e.ref(a.value.useAnimation?a.value.animationValueStart:g.value),s=t=>{const v=a.value.animationFrames,c=Math.abs(t-l.value)/v;function d(){l.value<t?l.value=Math.min(l.value+c,t):l.value>t&&(l.value=Math.max(l.value-c,t)),l.value!==t&&requestAnimationFrame(d)}d()};e.onMounted(()=>{r()});function r(){a.value.useAnimation?(l.value=a.value.animationValueStart,s(o.dataset)):l.value=o.dataset}return e.watch(()=>o.dataset,t=>{a.value.useAnimation?s(t):l.value=t}),(t,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-kpi ${a.value.layoutClass}`),style:e.normalizeStyle(`background:${a.value.backgroundColor}; ${a.value.layoutCss}`)},[e.createElementVNode("div",{class:e.normalizeClass(`vue-ui-kpi-title ${a.value.titleClass}`),style:e.normalizeStyle(`font-family: ${a.value.fontFamily}; font-size:${a.value.titleFontSize}px; color:${a.value.titleColor}; font-weight:${a.value.titleBold?"bold":"normal"}; ${a.value.titleCss}`)},[e.renderSlot(t.$slots,"title",{comment:n.dataset}),e.createTextVNode(" "+e.toDisplayString(a.value.title),1)],6),e.renderSlot(t.$slots,"comment-before",{comment:n.dataset}),e.createElementVNode("div",{class:e.normalizeClass(`vue-ui-kpi-value ${a.value.valueClass}`),style:e.normalizeStyle(`font-family: ${a.value.fontFamily}; font-size:${a.value.valueFontSize}px; color:${a.value.valueColor}; font-weight:${a.value.valueBold?"bold":"normal"}; ${a.value.valueCss}`)},[e.renderSlot(t.$slots,"value",{comment:n.dataset}),a.value.analogDigits.show?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({height:a.value.analogDigits.height+"px"})},[e.createVNode(y.default,{dataset:Number(l.value.toFixed(a.value.valueRounding)),config:{backgroundColor:a.value.backgroundColor,digits:{color:a.value.analogDigits.color,skeletonColor:a.value.analogDigits.skeletonColor}}},null,8,["dataset","config"])],4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(u.applyDataLabel)(a.value.formatter,l.value,e.unref(u.dataLabel)({p:a.value.prefix,v:l.value,s:a.value.suffix,r:a.value.valueRounding}))),1)],64))],6),e.renderSlot(t.$slots,"comment-after",{comment:n.dataset})],6))}};exports.default=C;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./useNestedProp-swJfhg8O.cjs"),n=require("./index-BKWunRAY.cjs"),m=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=["xmlns","viewBox"],C={key:0},_=["stroke"],h=["stroke"],M=["stroke"],y={key:1},B=["stroke"],f={key:2},L=["stroke"],b={__name:"vue-ui-mini-loader",props:{config:{type:Object,default(){return{}}}},setup(u){e.useCssVars(k=>({"4430a3e6":c.value,"056a6732":d.value,"7f3540a4":p.value}));const{vue_ui_mini_loader:a}=n.useConfig(),i=u,t=e.computed(()=>v.useNestedProp({userConfig:i.config,defaultConfig:a})),s=e.ref({onion:"-10 -10 84 84",line:"-10 -10 112 84",bar:"-10 -10 106 84"}),r=e.computed(()=>({gutter:`stroke:${t.value.line.gutterColor};opacity:${t.value.line.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.line.gutterBlur}px);`})),l=e.computed(()=>({gutter:`stroke:${t.value.bar.gutterColor};opacity:${t.value.bar.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.bar.gutterBlur}px);`})),o=e.computed(()=>({gutter:`stroke:${t.value.onion.gutterColor};opacity:${t.value.onion.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.onion.gutterBlur}px);`})),c=e.computed(()=>`blur(${t.value.onion.trackBlur}px) hue-rotate(${t.value.onion.trackHueRotate}deg)`),d=e.computed(()=>`blur(${t.value.line.trackBlur}px) hue-rotate(${t.value.line.trackHueRotate}deg)`),p=e.computed(()=>`blur(${t.value.bar.trackBlur}px) hue-rotate(${t.value.bar.trackHueRotate}deg)`);return(k,x)=>(e.openBlock(),e.createElementBlock("svg",{class:"vue-ui-mini-loader",xmlns:e.unref(n.XMLNS),viewBox:s.value[t.value.type],style:{background:"transparent"},width:"100%"},[t.value.type==="onion"?(e.openBlock(),e.createElementBlock("g",C,[e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,_),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,h),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,M)])):e.createCommentVNode("",!0),t.value.type==="line"?(e.openBlock(),e.createElementBlock("g",y,[e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(r.value.gutter+r.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5",stroke:t.value.line.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"line-animated"},null,8,B)])):e.createCommentVNode("",!0),t.value.type==="bar"?(e.openBlock(),e.createElementBlock("g",f,[e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(l.value.gutter+l.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5",stroke:t.value.bar.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"bar-animated"},null,8,L)])):e.createCommentVNode("",!0)],8,g))}},N=m._export_sfc(b,[["__scopeId","data-v-3b670831"]]);exports.default=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./useNestedProp-C8955nsn.cjs"),n=require("./index-Cn2tUOoX.cjs"),m=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=["xmlns","viewBox"],C={key:0},_=["stroke"],h=["stroke"],M=["stroke"],y={key:1},B=["stroke"],f={key:2},L=["stroke"],b={__name:"vue-ui-mini-loader",props:{config:{type:Object,default(){return{}}}},setup(u){e.useCssVars(k=>({"4430a3e6":c.value,"056a6732":d.value,"7f3540a4":p.value}));const{vue_ui_mini_loader:a}=n.useConfig(),i=u,t=e.computed(()=>v.useNestedProp({userConfig:i.config,defaultConfig:a})),s=e.ref({onion:"-10 -10 84 84",line:"-10 -10 112 84",bar:"-10 -10 106 84"}),r=e.computed(()=>({gutter:`stroke:${t.value.line.gutterColor};opacity:${t.value.line.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.line.gutterBlur}px);`})),l=e.computed(()=>({gutter:`stroke:${t.value.bar.gutterColor};opacity:${t.value.bar.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.bar.gutterBlur}px);`})),o=e.computed(()=>({gutter:`stroke:${t.value.onion.gutterColor};opacity:${t.value.onion.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.onion.gutterBlur}px);`})),c=e.computed(()=>`blur(${t.value.onion.trackBlur}px) hue-rotate(${t.value.onion.trackHueRotate}deg)`),d=e.computed(()=>`blur(${t.value.line.trackBlur}px) hue-rotate(${t.value.line.trackHueRotate}deg)`),p=e.computed(()=>`blur(${t.value.bar.trackBlur}px) hue-rotate(${t.value.bar.trackHueRotate}deg)`);return(k,x)=>(e.openBlock(),e.createElementBlock("svg",{class:"vue-ui-mini-loader",xmlns:e.unref(n.XMLNS),viewBox:s.value[t.value.type],style:{background:"transparent"},width:"100%"},[t.value.type==="onion"?(e.openBlock(),e.createElementBlock("g",C,[e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,_),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,h),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,M)])):e.createCommentVNode("",!0),t.value.type==="line"?(e.openBlock(),e.createElementBlock("g",y,[e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(r.value.gutter+r.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5",stroke:t.value.line.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"line-animated"},null,8,B)])):e.createCommentVNode("",!0),t.value.type==="bar"?(e.openBlock(),e.createElementBlock("g",f,[e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(l.value.gutter+l.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5",stroke:t.value.bar.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"bar-animated"},null,8,L)])):e.createCommentVNode("",!0)],8,g))}},N=m._export_sfc(b,[["__scopeId","data-v-3b670831"]]);exports.default=N;
@@ -1,6 +1,6 @@
1
1
  import { useCssVars as h, computed as r, ref as f, createElementBlock as n, openBlock as u, unref as M, createCommentVNode as a, createElementVNode as t, normalizeStyle as l } from "vue";
2
- import { u as m } from "./useNestedProp-BU5A_H6S.js";
3
- import { u as y, X as L } from "./index-Ckt5xLw3.js";
2
+ import { u as m } from "./useNestedProp-BqKuhIvF.js";
3
+ import { u as y, X as L } from "./index-d3erwTWB.js";
4
4
  import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const b = ["xmlns", "viewBox"], x = { key: 0 }, $ = ["stroke"], w = ["stroke"], A = ["stroke"], N = { key: 1 }, O = ["stroke"], S = { key: 2 }, F = ["stroke"], I = {
6
6
  __name: "vue-ui-mini-loader",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./index-BKWunRAY.cjs"),we=require("./Title-DnNgxDaw.cjs"),ae=require("./usePrinter-Dhf-GWO2.cjs"),$e=require("./DataTable-CzL8BmEn.cjs"),Pe=require("./Tooltip-BcRV15Nk.cjs"),Ne=require("./vue-ui-skeleton-D5NShLgw.cjs"),Se=require("./vue-ui-accordion-CACZOsPN.cjs"),se=require("./useNestedProp-swJfhg8O.cjs"),Te=require("./PackageVersion-BhpRHJg-.cjs"),Ee=require("./PenAndPaper-Cr_VFW1Y.cjs"),Fe=require("./useUserOptionState-BgepsfED.cjs"),xe=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ve=require("./usePanZoom-PXRi2Rwx.cjs"),Re=require("./BaseIcon-ljtRuDne.cjs"),Oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ae=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Le=["x","y","height","width","onClick","onMouseover"],Ue={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["click","hover"],setup(a,{emit:$}){const P=a,k=$;function d(n){k("click",n)}function g(n){k("hover",n)}return e.toRef(P,"dataset").value.forEach(n=>{n.nodes&&n.nodes.length>0&&n.nodes.forEach(f=>{f.ancestor=n})}),(n,f)=>{const R=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataset,i=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.polygonPath&&i.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.polygonPath.coordinates,(y,x)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("circle",{cx:y.x,cy:y.y,r:i.circleRadius,fill:`url(#gradient_${i.color})`,stroke:a.hoveredUid&&a.hoveredUid===i.uid?a.strokeHovered:a.stroke,"stroke-width":a.hoveredUid&&a.hoveredUid===i.uid?i.circleRadius/6:i.circleRadius/12,style:{cursor:"pointer"},onClick:w=>d(i),onMouseover:w=>g(i),onMouseleave:f[0]||(f[0]=w=>g(null))},null,40,Ae),n.$slots.node?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:y.x-i.circleRadius,y:y.y-i.circleRadius,height:i.circleRadius*2,width:i.circleRadius*2,style:{overflow:"visible"},onClick:e.withModifiers(w=>d(i),["stop"]),onMouseover:w=>g(i),onMouseleave:f[1]||(f[1]=w=>g(null))},[e.renderSlot(n.$slots,"node",e.mergeProps({ref_for:!0},{node:i}))],40,Le)):e.createCommentVNode("",!0)],64))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(R,{key:0,dataset:i.nodes,color:a.color,stroke:a.stroke,strokeHovered:a.strokeHovered,hoveredUid:a.hoveredUid,onClick:d,onHover:g},{node:e.withCtx(({node:y})=>[e.renderSlot(n.$slots,"node",e.mergeProps({ref_for:!0},{node:y}))]),_:2},1032,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},De=["x1","y1","x2","y2","stroke","stroke-width"],Ie=["x1","y1","x2","y2","stroke","stroke-width"],ze={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(a){const $=a;return e.toRef($,"dataset").value.forEach(k=>{k.nodes&&k.nodes.length>0&&k.nodes.forEach(d=>{d.ancestor=k})}),(k,d)=>{const g=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataset,s=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.polygonPath&&s.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s.polygonPath.coordinates,(n,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.ancestor&&s.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:n.x,y1:n.y,x2:s.ancestor.polygonPath.coordinates[0].x,y2:s.ancestor.polygonPath.coordinates[0].y,stroke:a.backgroundColor,"stroke-width":s.circleRadius/1.5},null,8,De),e.createElementVNode("line",{x1:n.x,y1:n.y,x2:s.ancestor.polygonPath.coordinates[0].x,y2:s.ancestor.polygonPath.coordinates[0].y,stroke:a.color,"stroke-width":s.circleRadius/2},null,8,Ie)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataset,s=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.polygonPath&&s.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.nodes&&s.nodes.length>0?(e.openBlock(),e.createBlock(g,{key:0,dataset:s.nodes,color:a.color,backgroundColor:a.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},_e=["x","y","fill","font-size"],He={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(a,{emit:$}){const P=a;return e.toRef(P,"dataset").value.forEach(d=>{d.nodes&&d.nodes.length>0&&d.nodes.forEach(g=>{g.ancestor=d})}),(d,g)=>{const s=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataset,n=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.polygonPath&&n.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.polygonPath.coordinates,f=>(e.openBlock(),e.createElementBlock("text",{x:f.x,y:f.y+n.circleRadius*2,fill:a.color,"font-size":n.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(n.name),9,_e))),256)),n.nodes&&n.nodes.length>0?(e.openBlock(),e.createBlock(s,{key:0,dataset:n.nodes,color:a.color,hoveredUid:a.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Me=["id"],qe={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Ge={key:2,style:"width:100%;background:transparent;"},je=["xmlns","viewBox"],We=["width","height"],Xe=["id"],Ze=["stop-color"],Ye=["stop-color"],Je={key:5,class:"vue-data-ui-watermark"},Ke={key:6,"data-dom-to-png-ignore":"",class:"reset-wrapper"},Qe={key:8,ref:"source",dir:"auto"},et=["innerHTML"],tt={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectNode"],setup(a,{expose:$,emit:P}){e.useCssVars(o=>({"6c5e8f09":o.slicerColor}));const{vue_ui_molecule:k}=v.useConfig(),d=a,g=P,s=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{n()});function n(){v.objectIsEmpty(d.dataset)&&v.error({componentName:"VueUiMolecule",type:"dataset"})}const f=e.ref(v.createUid()),R=e.ref(null),i=e.ref(!1),y=e.ref(""),x=e.ref(null),w=e.ref(0),z=e.ref(0),_=e.ref(0),t=e.computed({get:()=>q(),set:o=>o}),{userOptionsVisible:O,setUserOptionsVisibility:H,keepUserOptionState:M}=Fe.useUserOptionState({config:t.value}),{svgRef:A}=xe.useChartAccessibility({config:t.value.style.chart.title});function q(){const o=se.useNestedProp({userConfig:d.config,defaultConfig:k});return o.theme?{...se.useNestedProp({userConfig:v.themes.vue_ui_molecule[o.theme]||d.config,defaultConfig:o}),customPalette:v.themePalettes[o.theme]||v.palette}:o}e.watch(()=>d.config,o=>{t.value=q(),O.value=!t.value.userOptions.showOnChartHover,n(),z.value+=1,_.value+=1,p.value.showTable=t.value.table.show,p.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:G,isImaging:j,generatePdf:W,generateImage:X}=ae.usePrinter({elementId:`cluster_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-molecule",options:t.value.userOptions.print}),ie=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ue=e.computed(()=>v.convertCustomPalette(t.value.customPalette)),p=e.ref({showTable:t.value.table.show,showDataLabels:!0,showTooltip:t.value.style.chart.tooltip.show});function Z(o,r=0){return Array.isArray(o)&&o.length>0&&o[0].nodes?Z(o[0].nodes,r+1):r}function ce(){const o=Z(d.dataset);let r=100,l=r;for(let c=0;c<o;c+=1)r/=1,l+=r;return{height:l,width:l}}const m=e.ref(ce());e.ref(`0 0 ${m.value.width} ${m.value.height}`);function Y(o,r={x:-m.value.width/2.43,y:m.value.height/2},l=m.value.width/1.1,c=24,u=0,h=0,b="#BBBBBB",D=0){if(!Array.isArray(o)||o.length===0)return o;const Be=v.createPolygonPath({plot:r,radius:l,sides:o.length,rotation:u});return o.forEach((C,le)=>{const re=Be.coordinates[le],ne=C.color?(()=>{let I=v.convertColorToHex(C.color);return I.startsWith("#")?I:`#${I}`})():null;let S;ne?S=ne:D===0?S=b:D===1?(S=ue.value[h]||v.palette[h]||b,h+=1):S=b,C.polygonPath={coordinates:[re]},C.circleRadius=c,C.color=S,C.uid=v.createUid(),Array.isArray(C.nodes)&&C.nodes.length&&(C.nodes=Y(C.nodes,re,l/2.9,c/2.2,u+Math.PI*le/C.nodes.length,h,S,D+1))}),o}function de(o){const r=new Set;function l(u){u.forEach(h=>{if(!h.color)return;let b=h.color;/^#?[0-9A-F]{6}$/i.test(b)||(b=v.convertColorToHex(b)),b.startsWith("#")||(b=`#${b}`),r.add(b),Array.isArray(h.nodes)&&h.nodes.length&&l(h.nodes)})}l(o);const c={};return Array.from(r).forEach(u=>{const h=u.slice(1);c[u]=`gradient_${h}`}),c}const ve=e.computed(()=>de(B.value)),B=e.computed(()=>{const o=v.deepClone(d.dataset);return Y(o)}),L=e.ref(null);function he(o){L.value={datapoint:o,seriesIndex:-1,series:B.value,config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(v.isFunction(r)&&v.functionReturnsString(()=>r({seriesIndex:-1,datapoint:o,series:B.value,config:t.value})))y.value=r({seriesIndex:-1,datapoint:o,series:B.value,config:t.value});else{let l="";l+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${o.color}">⬤</div><div>${o.name}</div></div>`,o.details&&(l+=`<div style="width:100%;border-top:1px solid ${t.value.style.chart.tooltip.borderColor};margin-top: 2px">${o.details}</div>`),y.value=`<div style="font-family:inherit">${l}</div>`}}const J=e.ref(null),T=e.ref(null);function fe(o){J.value=o,o?(i.value=!0,he(o),T.value=o.uid):(i.value=!1,y.value="",T.value=null)}function me(o){const r=[];function l(c){c.forEach(u=>{const h={name:u.name,details:u.details||"-",ancestor:u.ancestor&&u.ancestor.name||"-",color:u.color||""};r.push(h),u.nodes&&u.nodes.length>0&&l(u.nodes,u.name)})}return l(o),r}const pe=e.computed(()=>me(B.value)),N=e.computed(()=>{const o=[t.value.table.translations.nodeName,t.value.table.translations.details,t.value.table.translations.ancestor],r=pe.value.map((u,h)=>[{color:u.color,name:u.name},u.details,u.ancestor||""]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},c=[t.value.table.translations.nodeName,t.value.table.translations.details,t.value.table.translations.ancestor];return{head:o,body:r,config:l,colNames:c}});function K(){e.nextTick(()=>{const o=N.value.body.map((c,u)=>[[c[0].name],[c[1]],[c[2]]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(o),l=v.createCsvContent(r);v.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-molecule"})})}function ge(){return B.value}const E=e.ref(!1);function ke(o){E.value=o,w.value+=1}function Q(){p.value.showTable=!p.value.showTable}function ee(){p.value.showDataLabels=!p.value.showDataLabels}function te(){p.value.showTooltip=!p.value.showTooltip}const F=e.ref(!1);function U(){F.value=!F.value}const ye=e.computed(()=>!F.value),{viewBox:V,resetZoom:oe,isZoom:be}=Ve.usePanZoom(A,{x:0,y:0,width:m.value.width<=0?10:m.value.width,height:m.value.height<=0?10:m.value.height},t.value.style.chart.zoom.speed,ye);function Ce(o){g("selectNode",o)}return $({getData:ge,generatePdf:W,generateCsv:K,generateImage:X,toggleTable:Q,toggleLabels:ee,toggleTooltip:te,toggleAnnotator:U}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"moleculeChart",ref:x,class:e.normalizeClass(`vue-ui-molecule ${E.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`cluster_${f.value}`,onMouseleave:r[2]||(r[2]=l=>{J.value=null,T.value=null,e.unref(H)(!1)}),onMouseenter:r[3]||(r[3]=()=>e.unref(H)(!0))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ee._sfc_main,{key:0,svgRef:e.unref(A),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:F.value,onClose:U},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ie.value?(e.openBlock(),e.createElementBlock("div",qe,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Ge,[(e.openBlock(),e.createBlock(we._sfc_main,{key:`title_${z.value}`,config:{title:{cy:"molecule-div-title",...t.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&s.value&&(e.unref(M)||e.unref(O))?(e.openBlock(),e.createBlock(ae.UserOptions,{ref_key:"details",ref:R,key:`user_options_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(G),isImaging:e.unref(j),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:ke,onGeneratePdf:e.unref(W),onGenerateCsv:K,onGenerateImage:e.unref(X),onToggleTable:Q,onToggleLabels:ee,onToggleTooltip:te,onToggleAnnotator:U,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(O)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:c})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:c})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:c})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:c})),void 0,!0)]),key:"7"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:c})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:c})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:A,xmlns:e.unref(v.XMLNS),viewBox:`${e.unref(V).x} ${e.unref(V).y} ${e.unref(V).width} ${e.unref(V).height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":E.value,"vue-data-ui-fulscreen--off":!E.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Te._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:m.value.width<=0?10:m.value.width,height:m.value.height<=0?10:m.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,We)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ve.value),l=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${l}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(v.lightenHexColor)(l,.5)},null,8,Ze),e.createElementVNode("stop",{offset:"100%","stop-color":l},null,8,Ye)],8,Xe))),256))]),e.createVNode(ze,{dataset:B.value,color:t.value.style.chart.links.stroke,backgroundColor:t.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Ue,{dataset:B.value,hoveredUid:T.value,stroke:t.value.style.chart.nodes.stroke,strokeHovered:t.value.style.chart.nodes.strokeHovered,onClick:Ce,onHover:fe},{node:e.withCtx(({node:l})=>[e.renderSlot(o.$slots,"node",e.normalizeProps(e.guardReactiveProps({node:l})),void 0,!0)]),_:3},8,["dataset","hoveredUid","stroke","strokeHovered"]),p.value.showDataLabels?(e.openBlock(),e.createBlock(He,{key:1,dataset:B.value,color:t.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:m.value},void 0,!0)],14,je)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Je,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(G)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref(be)?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(o.$slots,"reset-action",{reset:e.unref(oe)},()=>[e.createElementVNode("button",{"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",style:e.normalizeStyle({background:t.value.style.chart.backgroundColor}),onClick:r[0]||(r[0]=l=>e.unref(oe)(!0))},[e.createVNode(Re.default,{name:"refresh",stroke:t.value.style.chart.color},null,8,["stroke"])],4)],!0)])):e.createCommentVNode("",!0),s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ne.default,{key:7,config:{type:"molecule",style:{backgroundColor:t.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),o.$slots.source?(e.openBlock(),e.createElementBlock("div",Qe,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Pe._sfc_main,{show:p.value.showTooltip&&i.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:x.value,content:y.value,isFullscreen:E.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),s.value?(e.openBlock(),e.createBlock(Se.default,{key:9,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock($e.DataTable,{key:`table_${_.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[1]||(r[1]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,et)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Me))}},ot=Oe._export_sfc(tt,[["__scopeId","data-v-90558edd"]]);exports.default=ot;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./index-Cn2tUOoX.cjs"),we=require("./Title-D62pPwLz.cjs"),ae=require("./usePrinter-BrH80VBz.cjs"),$e=require("./DataTable-CNCnRrD-.cjs"),Pe=require("./Tooltip-C_H6-uAa.cjs"),Ne=require("./vue-ui-skeleton-Mcoev-5q.cjs"),Se=require("./vue-ui-accordion-7GoAZx3k.cjs"),se=require("./useNestedProp-C8955nsn.cjs"),Te=require("./PackageVersion-BxSGdh6L.cjs"),Ee=require("./PenAndPaper-ByAFuR-l.cjs"),Fe=require("./useUserOptionState-BgepsfED.cjs"),xe=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ve=require("./usePanZoom-PXRi2Rwx.cjs"),Re=require("./BaseIcon-DY-33nfj.cjs"),Oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ae=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Le=["x","y","height","width","onClick","onMouseover"],Ue={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["click","hover"],setup(a,{emit:$}){const P=a,k=$;function d(n){k("click",n)}function g(n){k("hover",n)}return e.toRef(P,"dataset").value.forEach(n=>{n.nodes&&n.nodes.length>0&&n.nodes.forEach(f=>{f.ancestor=n})}),(n,f)=>{const R=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataset,i=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.polygonPath&&i.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.polygonPath.coordinates,(y,x)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("circle",{cx:y.x,cy:y.y,r:i.circleRadius,fill:`url(#gradient_${i.color})`,stroke:a.hoveredUid&&a.hoveredUid===i.uid?a.strokeHovered:a.stroke,"stroke-width":a.hoveredUid&&a.hoveredUid===i.uid?i.circleRadius/6:i.circleRadius/12,style:{cursor:"pointer"},onClick:w=>d(i),onMouseover:w=>g(i),onMouseleave:f[0]||(f[0]=w=>g(null))},null,40,Ae),n.$slots.node?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:y.x-i.circleRadius,y:y.y-i.circleRadius,height:i.circleRadius*2,width:i.circleRadius*2,style:{overflow:"visible"},onClick:e.withModifiers(w=>d(i),["stop"]),onMouseover:w=>g(i),onMouseleave:f[1]||(f[1]=w=>g(null))},[e.renderSlot(n.$slots,"node",e.mergeProps({ref_for:!0},{node:i}))],40,Le)):e.createCommentVNode("",!0)],64))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(R,{key:0,dataset:i.nodes,color:a.color,stroke:a.stroke,strokeHovered:a.strokeHovered,hoveredUid:a.hoveredUid,onClick:d,onHover:g},{node:e.withCtx(({node:y})=>[e.renderSlot(n.$slots,"node",e.mergeProps({ref_for:!0},{node:y}))]),_:2},1032,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},De=["x1","y1","x2","y2","stroke","stroke-width"],Ie=["x1","y1","x2","y2","stroke","stroke-width"],ze={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(a){const $=a;return e.toRef($,"dataset").value.forEach(k=>{k.nodes&&k.nodes.length>0&&k.nodes.forEach(d=>{d.ancestor=k})}),(k,d)=>{const g=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataset,s=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.polygonPath&&s.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s.polygonPath.coordinates,(n,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.ancestor&&s.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:n.x,y1:n.y,x2:s.ancestor.polygonPath.coordinates[0].x,y2:s.ancestor.polygonPath.coordinates[0].y,stroke:a.backgroundColor,"stroke-width":s.circleRadius/1.5},null,8,De),e.createElementVNode("line",{x1:n.x,y1:n.y,x2:s.ancestor.polygonPath.coordinates[0].x,y2:s.ancestor.polygonPath.coordinates[0].y,stroke:a.color,"stroke-width":s.circleRadius/2},null,8,Ie)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataset,s=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.polygonPath&&s.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.nodes&&s.nodes.length>0?(e.openBlock(),e.createBlock(g,{key:0,dataset:s.nodes,color:a.color,backgroundColor:a.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},_e=["x","y","fill","font-size"],He={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(a,{emit:$}){const P=a;return e.toRef(P,"dataset").value.forEach(d=>{d.nodes&&d.nodes.length>0&&d.nodes.forEach(g=>{g.ancestor=d})}),(d,g)=>{const s=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataset,n=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.polygonPath&&n.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.polygonPath.coordinates,f=>(e.openBlock(),e.createElementBlock("text",{x:f.x,y:f.y+n.circleRadius*2,fill:a.color,"font-size":n.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(n.name),9,_e))),256)),n.nodes&&n.nodes.length>0?(e.openBlock(),e.createBlock(s,{key:0,dataset:n.nodes,color:a.color,hoveredUid:a.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Me=["id"],qe={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Ge={key:2,style:"width:100%;background:transparent;"},je=["xmlns","viewBox"],We=["width","height"],Xe=["id"],Ze=["stop-color"],Ye=["stop-color"],Je={key:5,class:"vue-data-ui-watermark"},Ke={key:6,"data-dom-to-png-ignore":"",class:"reset-wrapper"},Qe={key:8,ref:"source",dir:"auto"},et=["innerHTML"],tt={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectNode"],setup(a,{expose:$,emit:P}){e.useCssVars(o=>({"6c5e8f09":o.slicerColor}));const{vue_ui_molecule:k}=v.useConfig(),d=a,g=P,s=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{n()});function n(){v.objectIsEmpty(d.dataset)&&v.error({componentName:"VueUiMolecule",type:"dataset"})}const f=e.ref(v.createUid()),R=e.ref(null),i=e.ref(!1),y=e.ref(""),x=e.ref(null),w=e.ref(0),z=e.ref(0),_=e.ref(0),t=e.computed({get:()=>q(),set:o=>o}),{userOptionsVisible:O,setUserOptionsVisibility:H,keepUserOptionState:M}=Fe.useUserOptionState({config:t.value}),{svgRef:A}=xe.useChartAccessibility({config:t.value.style.chart.title});function q(){const o=se.useNestedProp({userConfig:d.config,defaultConfig:k});return o.theme?{...se.useNestedProp({userConfig:v.themes.vue_ui_molecule[o.theme]||d.config,defaultConfig:o}),customPalette:v.themePalettes[o.theme]||v.palette}:o}e.watch(()=>d.config,o=>{t.value=q(),O.value=!t.value.userOptions.showOnChartHover,n(),z.value+=1,_.value+=1,p.value.showTable=t.value.table.show,p.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:G,isImaging:j,generatePdf:W,generateImage:X}=ae.usePrinter({elementId:`cluster_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-molecule",options:t.value.userOptions.print}),ie=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ue=e.computed(()=>v.convertCustomPalette(t.value.customPalette)),p=e.ref({showTable:t.value.table.show,showDataLabels:!0,showTooltip:t.value.style.chart.tooltip.show});function Z(o,r=0){return Array.isArray(o)&&o.length>0&&o[0].nodes?Z(o[0].nodes,r+1):r}function ce(){const o=Z(d.dataset);let r=100,l=r;for(let c=0;c<o;c+=1)r/=1,l+=r;return{height:l,width:l}}const m=e.ref(ce());e.ref(`0 0 ${m.value.width} ${m.value.height}`);function Y(o,r={x:-m.value.width/2.43,y:m.value.height/2},l=m.value.width/1.1,c=24,u=0,h=0,b="#BBBBBB",D=0){if(!Array.isArray(o)||o.length===0)return o;const Be=v.createPolygonPath({plot:r,radius:l,sides:o.length,rotation:u});return o.forEach((C,le)=>{const re=Be.coordinates[le],ne=C.color?(()=>{let I=v.convertColorToHex(C.color);return I.startsWith("#")?I:`#${I}`})():null;let S;ne?S=ne:D===0?S=b:D===1?(S=ue.value[h]||v.palette[h]||b,h+=1):S=b,C.polygonPath={coordinates:[re]},C.circleRadius=c,C.color=S,C.uid=v.createUid(),Array.isArray(C.nodes)&&C.nodes.length&&(C.nodes=Y(C.nodes,re,l/2.9,c/2.2,u+Math.PI*le/C.nodes.length,h,S,D+1))}),o}function de(o){const r=new Set;function l(u){u.forEach(h=>{if(!h.color)return;let b=h.color;/^#?[0-9A-F]{6}$/i.test(b)||(b=v.convertColorToHex(b)),b.startsWith("#")||(b=`#${b}`),r.add(b),Array.isArray(h.nodes)&&h.nodes.length&&l(h.nodes)})}l(o);const c={};return Array.from(r).forEach(u=>{const h=u.slice(1);c[u]=`gradient_${h}`}),c}const ve=e.computed(()=>de(B.value)),B=e.computed(()=>{const o=v.deepClone(d.dataset);return Y(o)}),L=e.ref(null);function he(o){L.value={datapoint:o,seriesIndex:-1,series:B.value,config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(v.isFunction(r)&&v.functionReturnsString(()=>r({seriesIndex:-1,datapoint:o,series:B.value,config:t.value})))y.value=r({seriesIndex:-1,datapoint:o,series:B.value,config:t.value});else{let l="";l+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${o.color}">⬤</div><div>${o.name}</div></div>`,o.details&&(l+=`<div style="width:100%;border-top:1px solid ${t.value.style.chart.tooltip.borderColor};margin-top: 2px">${o.details}</div>`),y.value=`<div style="font-family:inherit">${l}</div>`}}const J=e.ref(null),T=e.ref(null);function fe(o){J.value=o,o?(i.value=!0,he(o),T.value=o.uid):(i.value=!1,y.value="",T.value=null)}function me(o){const r=[];function l(c){c.forEach(u=>{const h={name:u.name,details:u.details||"-",ancestor:u.ancestor&&u.ancestor.name||"-",color:u.color||""};r.push(h),u.nodes&&u.nodes.length>0&&l(u.nodes,u.name)})}return l(o),r}const pe=e.computed(()=>me(B.value)),N=e.computed(()=>{const o=[t.value.table.translations.nodeName,t.value.table.translations.details,t.value.table.translations.ancestor],r=pe.value.map((u,h)=>[{color:u.color,name:u.name},u.details,u.ancestor||""]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},c=[t.value.table.translations.nodeName,t.value.table.translations.details,t.value.table.translations.ancestor];return{head:o,body:r,config:l,colNames:c}});function K(){e.nextTick(()=>{const o=N.value.body.map((c,u)=>[[c[0].name],[c[1]],[c[2]]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(o),l=v.createCsvContent(r);v.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-molecule"})})}function ge(){return B.value}const E=e.ref(!1);function ke(o){E.value=o,w.value+=1}function Q(){p.value.showTable=!p.value.showTable}function ee(){p.value.showDataLabels=!p.value.showDataLabels}function te(){p.value.showTooltip=!p.value.showTooltip}const F=e.ref(!1);function U(){F.value=!F.value}const ye=e.computed(()=>!F.value),{viewBox:V,resetZoom:oe,isZoom:be}=Ve.usePanZoom(A,{x:0,y:0,width:m.value.width<=0?10:m.value.width,height:m.value.height<=0?10:m.value.height},t.value.style.chart.zoom.speed,ye);function Ce(o){g("selectNode",o)}return $({getData:ge,generatePdf:W,generateCsv:K,generateImage:X,toggleTable:Q,toggleLabels:ee,toggleTooltip:te,toggleAnnotator:U}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"moleculeChart",ref:x,class:e.normalizeClass(`vue-ui-molecule ${E.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`cluster_${f.value}`,onMouseleave:r[2]||(r[2]=l=>{J.value=null,T.value=null,e.unref(H)(!1)}),onMouseenter:r[3]||(r[3]=()=>e.unref(H)(!0))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ee._sfc_main,{key:0,svgRef:e.unref(A),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:F.value,onClose:U},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ie.value?(e.openBlock(),e.createElementBlock("div",qe,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Ge,[(e.openBlock(),e.createBlock(we._sfc_main,{key:`title_${z.value}`,config:{title:{cy:"molecule-div-title",...t.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&s.value&&(e.unref(M)||e.unref(O))?(e.openBlock(),e.createBlock(ae.UserOptions,{ref_key:"details",ref:R,key:`user_options_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(G),isImaging:e.unref(j),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:ke,onGeneratePdf:e.unref(W),onGenerateCsv:K,onGenerateImage:e.unref(X),onToggleTable:Q,onToggleLabels:ee,onToggleTooltip:te,onToggleAnnotator:U,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(O)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:c})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:c})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:c})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:c})),void 0,!0)]),key:"7"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:c})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:c})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:A,xmlns:e.unref(v.XMLNS),viewBox:`${e.unref(V).x} ${e.unref(V).y} ${e.unref(V).width} ${e.unref(V).height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":E.value,"vue-data-ui-fulscreen--off":!E.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Te._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:m.value.width<=0?10:m.value.width,height:m.value.height<=0?10:m.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,We)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ve.value),l=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${l}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(v.lightenHexColor)(l,.5)},null,8,Ze),e.createElementVNode("stop",{offset:"100%","stop-color":l},null,8,Ye)],8,Xe))),256))]),e.createVNode(ze,{dataset:B.value,color:t.value.style.chart.links.stroke,backgroundColor:t.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Ue,{dataset:B.value,hoveredUid:T.value,stroke:t.value.style.chart.nodes.stroke,strokeHovered:t.value.style.chart.nodes.strokeHovered,onClick:Ce,onHover:fe},{node:e.withCtx(({node:l})=>[e.renderSlot(o.$slots,"node",e.normalizeProps(e.guardReactiveProps({node:l})),void 0,!0)]),_:3},8,["dataset","hoveredUid","stroke","strokeHovered"]),p.value.showDataLabels?(e.openBlock(),e.createBlock(He,{key:1,dataset:B.value,color:t.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:m.value},void 0,!0)],14,je)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Je,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(G)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref(be)?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(o.$slots,"reset-action",{reset:e.unref(oe)},()=>[e.createElementVNode("button",{"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",style:e.normalizeStyle({background:t.value.style.chart.backgroundColor}),onClick:r[0]||(r[0]=l=>e.unref(oe)(!0))},[e.createVNode(Re.default,{name:"refresh",stroke:t.value.style.chart.color},null,8,["stroke"])],4)],!0)])):e.createCommentVNode("",!0),s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ne.default,{key:7,config:{type:"molecule",style:{backgroundColor:t.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),o.$slots.source?(e.openBlock(),e.createElementBlock("div",Qe,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Pe._sfc_main,{show:p.value.showTooltip&&i.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:x.value,content:y.value,isFullscreen:E.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),s.value?(e.openBlock(),e.createBlock(Se.default,{key:9,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock($e.DataTable,{key:`table_${_.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[1]||(r[1]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,et)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Me))}},ot=Oe._export_sfc(tt,[["__scopeId","data-v-90558edd"]]);exports.default=ot;
@@ -1,18 +1,18 @@
1
1
  import { toRef as ee, resolveComponent as te, createElementBlock as r, openBlock as l, Fragment as p, renderList as I, createCommentVNode as f, createBlock as O, createElementVNode as U, withModifiers as Ve, renderSlot as y, mergeProps as $e, withCtx as m, toDisplayString as Oe, useCssVars as je, computed as S, onMounted as We, ref as g, watch as Xe, unref as v, normalizeStyle as W, normalizeClass as we, createVNode as G, createSlots as Ye, normalizeProps as D, guardReactiveProps as N, createTextVNode as Ze, nextTick as qe } from "vue";
2
- import { u as Je, o as Ke, e as Qe, c as Te, t as et, p as Pe, a as tt, b as ot, O as lt, X as st, l as at, P as rt, d as xe, q as nt, r as it, x as ut, y as ct } from "./index-Ckt5xLw3.js";
3
- import { _ as dt } from "./Title-C6HOVO5o.js";
4
- import { u as vt, U as ht } from "./usePrinter-Drrm-7ZN.js";
5
- import { D as ft } from "./DataTable-p1tKJjJU.js";
6
- import { _ as yt } from "./Tooltip-CkPkykAp.js";
7
- import pt from "./vue-ui-skeleton-Buze5CJ9.js";
8
- import gt from "./vue-ui-accordion-CHWjFAdS.js";
9
- import { u as Fe } from "./useNestedProp-BU5A_H6S.js";
10
- import { _ as mt } from "./PackageVersion-Db8Jk3Yz.js";
11
- import { _ as bt } from "./PenAndPaper-Bleo21mI.js";
2
+ import { u as Je, o as Ke, e as Qe, c as Te, t as et, p as Pe, a as tt, b as ot, O as lt, X as st, l as at, P as rt, d as xe, q as nt, r as it, x as ut, y as ct } from "./index-d3erwTWB.js";
3
+ import { _ as dt } from "./Title-DIYoufYR.js";
4
+ import { u as vt, U as ht } from "./usePrinter-CHrKIDM7.js";
5
+ import { D as ft } from "./DataTable-CJOtzfgn.js";
6
+ import { _ as yt } from "./Tooltip-BFz2yelJ.js";
7
+ import pt from "./vue-ui-skeleton-BOtCpAcY.js";
8
+ import gt from "./vue-ui-accordion-BJyaBDyF.js";
9
+ import { u as Fe } from "./useNestedProp-BqKuhIvF.js";
10
+ import { _ as mt } from "./PackageVersion-D-aPPO0L.js";
11
+ import { _ as bt } from "./PenAndPaper-D9g_r8-6.js";
12
12
  import { u as kt } from "./useUserOptionState-BIvW1Kz7.js";
13
13
  import { u as Ct } from "./useChartAccessibility-BWojgys7.js";
14
14
  import { u as $t } from "./usePanZoom-CUkkqW81.js";
15
- import wt from "./BaseIcon-D9r5PTQj.js";
15
+ import wt from "./BaseIcon-CpIcYACc.js";
16
16
  import { _ as Tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
17
  const Pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], xt = ["x", "y", "height", "width", "onClick", "onMouseover"], Ft = {
18
18
  __name: "RecursiveCircles",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BKWunRAY.cjs"),oe=require("./Title-DnNgxDaw.cjs"),q=require("./usePrinter-Dhf-GWO2.cjs"),le=require("./Legend-m-jOk1o6.cjs"),g=require("./BaseIcon-ljtRuDne.cjs"),ae=require("./DataTable-CzL8BmEn.cjs"),re=require("./vue-ui-skeleton-D5NShLgw.cjs"),ne=require("./vue-ui-accordion-CACZOsPN.cjs"),z=require("./useNestedProp-swJfhg8O.cjs"),se=require("./PackageVersion-BhpRHJg-.cjs"),ue=require("./PenAndPaper-Cr_VFW1Y.cjs"),ie=require("./useUserOptionState-BgepsfED.cjs"),ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],ye={key:2,style:"width:100%;background:transparent"},me=["xmlns","viewBox"],he=["width","height"],fe=["id"],pe=["stop-color"],ke=["stop-color"],ge=["x1","y1","x2","y2","stroke","stroke-width"],be=["d","stroke","stroke-width"],Ce=["stroke"],Ne=["fill"],we=["stroke"],xe=["fill"],Ve=["stroke"],_e=["fill"],Be=["stroke"],Pe=["fill"],$e=["stroke"],Me=["fill"],Ee=["d","stroke","stroke-width","fill"],Oe=["x1","y1","stroke"],Se=["cx","cy","fill","stroke"],Ae=["fill","stroke"],Te=["y","fill","font-weight"],Le=["y","fill"],Ie={key:5,class:"vue-data-ui-watermark"},Fe=["onClick"],qe={style:{"font-weight":"bold"}},ze={key:8,ref:"source",dir:"auto"},De=["innerHTML"],Re={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(D,{expose:R}){const{vue_ui_mood_radar:j}=r.useConfig(),u=D,m=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length);e.onMounted(()=>{V()});function V(){r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),_=e.ref(null),U=e.ref(null),n=e.ref(null),W=e.ref(null),G=e.ref(0),H=e.ref(0),B=e.ref(0),t=e.computed({get:()=>E(),set:l=>l}),{userOptionsVisible:N,setUserOptionsVisibility:P,keepUserOptionState:$}=ie.useUserOptionState({config:t.value}),{svgRef:M}=ce.useChartAccessibility({config:t.value.style.chart.title});function E(){const l=z.useNestedProp({userConfig:u.config,defaultConfig:j});return l.theme?{...z.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||u.config,defaultConfig:l})}:l}e.watch(()=>u.config,l=>{t.value=E(),N.value=!t.value.userOptions.showOnChartHover,V(),G.value+=1,H.value+=1,B.value+=1,f.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:O,isImaging:S,generatePdf:A,generateImage:T}=q.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar",options:t.value.userOptions.print}),X=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),f=e.ref({showTable:t.value.table.show}),i=e.computed(()=>({height:256,width:256})),w=e.computed(()=>r.createPolygonPath({plot:{x:128,y:i.value.height/2},radius:90,sides:5,rotation:11}));function K({centerX:l,centerY:a,apexX:o,apexY:s,proportion:d,key:k,value:te}){return{x:l+(o-l)*d,y:a+(s-a)*d,key:k,value:te}}const Y=e.computed(()=>Math.max(...Object.values(u.dataset).map(l=>isNaN(l)?0:l))),y=e.computed(()=>Object.values(u.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),c=e.computed(()=>Object.keys(u.dataset).map((l,a)=>{const o=typeof u.dataset[l]!="number"||isNaN(u.dataset[l])?0:u.dataset[l];return{index:a,key:l,value:o,proportion:o/y.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),L=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(u.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),w.value.coordinates.map((l,a)=>{const o=K({centerX:i.value.width/2,centerY:i.value.height/2,apexX:l.x,apexY:l.y,proportion:c.value[a].value/Y.value,key:c.value[a].key,value:c.value[a].value});return{...l,plots:o,key:c.value[a].key}})):[]),J=e.computed(()=>({cy:"mood-radar-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function Q(l){l===n.value?n.value=null:n.value=l}const v=e.computed(()=>{const l=c.value.map(o=>({name:o.key,color:o.color})),a=c.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function I(){e.nextTick(()=>{const l=v.value.head.map((s,d)=>[[s.name],[v.value.body[d]],[isNaN(v.value.body[d]/y.value)?"-":v.value.body[d]/y.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const b=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(y.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=v.value.head.map((d,k)=>[{color:d.color,name:d.name},v.value.body[k].toFixed(t.value.table.td.roundingValue),isNaN(v.value.body[k]/y.value)?"-":(v.value.body[k]/y.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},s=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:s}});function Z(){return c.value}function F(){f.value.showTable=!f.value.showTable}const p=e.ref(!1);function ee(l){p.value=l}const C=e.ref(!1);function x(){C.value=!C.value}return R({getData:Z,generatePdf:A,generateCsv:I,generateImage:T,toggleTable:F,toggleAnnotator:x}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${p.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:_,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[11]||(a[11]=()=>e.unref(P)(!0)),onMouseleave:a[12]||(a[12]=()=>e.unref(P)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ue._sfc_main,{key:0,svgRef:e.unref(M),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:x},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),X.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:W,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",ye,[e.createVNode(oe._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref($)||e.unref(N))?(e.openBlock(),e.createBlock(q.UserOptions,{key:3,ref_key:"details",ref:U,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(O),isImaging:e.unref(S),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:p.value,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:ee,onGeneratePdf:e.unref(A),onGenerateCsv:I,onGenerateImage:e.unref(T),onToggleTable:F,onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref($)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:s})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:s})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:s})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:s})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:s})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:s})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:M,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${i.value.width} ${i.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":p.value,"vue-data-ui-fulscreen--off":!p.value}),style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(se._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:i.value.width,height:i.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,he)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,pe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,ke)],8,fe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:i.value.width/2,y1:i.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ge))),256)),e.createElementVNode("path",{d:w.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,be),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[5],"stroke-width":"1","stroke-linecap":"round",d:"M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"},null,8,Ce),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>n.value=5),onMouseleave:a[1]||(a[1]=o=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,Ne),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[4],"stroke-width":"1","stroke-linecap":"round",d:"M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"},null,8,we),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>n.value=4),onMouseleave:a[3]||(a[3]=o=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,xe),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[3],"stroke-width":"1","stroke-linecap":"round",d:"M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"},null,8,Ve),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>n.value=3),onMouseleave:a[5]||(a[5]=o=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,_e),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,Be),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>n.value=2),onMouseleave:a[7]||(a[7]=o=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,Pe),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,$e),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>n.value=1),onMouseleave:a[9]||(a[9]=o=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,Me),e.createElementVNode("path",{d:e.unref(r.makePath)(L.value.map(o=>o.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ee),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value.map(o=>o.plots),(o,s)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,Oe),e.createElementVNode("circle",{cx:o.x,cy:o.y,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Se),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Ae),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:s})),9,Te),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.value/y.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,Le)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,me)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(S)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(le.Legend,{legendSet:c.value,config:J.value,key:`legend_${B.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:s})=>[e.createElementVNode("div",{onClick:()=>Q(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(g.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==2?(e.openBlock(),e.createBlock(g.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==3?(e.openBlock(),e.createBlock(g.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==4?(e.openBlock(),e.createBlock(g.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==5?(e.openBlock(),e.createBlock(g.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",qe,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:s})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Fe)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:c.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",ze,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(ne.default,{key:9,hideDetails:"",config:{open:f.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ae.DataTable,{colNames:b.value.colNames,head:b.value.head,body:b.value.body,config:b.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[10]||(a[10]=o=>f.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,De)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ve))}},je=de._export_sfc(Re,[["__scopeId","data-v-219c3ecd"]]);exports.default=je;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Cn2tUOoX.cjs"),oe=require("./Title-D62pPwLz.cjs"),q=require("./usePrinter-BrH80VBz.cjs"),le=require("./Legend-ieOu_fKK.cjs"),g=require("./BaseIcon-DY-33nfj.cjs"),ae=require("./DataTable-CNCnRrD-.cjs"),re=require("./vue-ui-skeleton-Mcoev-5q.cjs"),ne=require("./vue-ui-accordion-7GoAZx3k.cjs"),z=require("./useNestedProp-C8955nsn.cjs"),se=require("./PackageVersion-BxSGdh6L.cjs"),ue=require("./PenAndPaper-ByAFuR-l.cjs"),ie=require("./useUserOptionState-BgepsfED.cjs"),ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],ye={key:2,style:"width:100%;background:transparent"},me=["xmlns","viewBox"],he=["width","height"],fe=["id"],pe=["stop-color"],ke=["stop-color"],ge=["x1","y1","x2","y2","stroke","stroke-width"],be=["d","stroke","stroke-width"],Ce=["stroke"],Ne=["fill"],we=["stroke"],xe=["fill"],Ve=["stroke"],_e=["fill"],Be=["stroke"],Pe=["fill"],$e=["stroke"],Me=["fill"],Ee=["d","stroke","stroke-width","fill"],Oe=["x1","y1","stroke"],Se=["cx","cy","fill","stroke"],Ae=["fill","stroke"],Te=["y","fill","font-weight"],Le=["y","fill"],Ie={key:5,class:"vue-data-ui-watermark"},Fe=["onClick"],qe={style:{"font-weight":"bold"}},ze={key:8,ref:"source",dir:"auto"},De=["innerHTML"],Re={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(D,{expose:R}){const{vue_ui_mood_radar:j}=r.useConfig(),u=D,m=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length);e.onMounted(()=>{V()});function V(){r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),_=e.ref(null),U=e.ref(null),n=e.ref(null),W=e.ref(null),G=e.ref(0),H=e.ref(0),B=e.ref(0),t=e.computed({get:()=>E(),set:l=>l}),{userOptionsVisible:N,setUserOptionsVisibility:P,keepUserOptionState:$}=ie.useUserOptionState({config:t.value}),{svgRef:M}=ce.useChartAccessibility({config:t.value.style.chart.title});function E(){const l=z.useNestedProp({userConfig:u.config,defaultConfig:j});return l.theme?{...z.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||u.config,defaultConfig:l})}:l}e.watch(()=>u.config,l=>{t.value=E(),N.value=!t.value.userOptions.showOnChartHover,V(),G.value+=1,H.value+=1,B.value+=1,f.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:O,isImaging:S,generatePdf:A,generateImage:T}=q.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar",options:t.value.userOptions.print}),X=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),f=e.ref({showTable:t.value.table.show}),i=e.computed(()=>({height:256,width:256})),w=e.computed(()=>r.createPolygonPath({plot:{x:128,y:i.value.height/2},radius:90,sides:5,rotation:11}));function K({centerX:l,centerY:a,apexX:o,apexY:s,proportion:d,key:k,value:te}){return{x:l+(o-l)*d,y:a+(s-a)*d,key:k,value:te}}const Y=e.computed(()=>Math.max(...Object.values(u.dataset).map(l=>isNaN(l)?0:l))),y=e.computed(()=>Object.values(u.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),c=e.computed(()=>Object.keys(u.dataset).map((l,a)=>{const o=typeof u.dataset[l]!="number"||isNaN(u.dataset[l])?0:u.dataset[l];return{index:a,key:l,value:o,proportion:o/y.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),L=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(u.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),w.value.coordinates.map((l,a)=>{const o=K({centerX:i.value.width/2,centerY:i.value.height/2,apexX:l.x,apexY:l.y,proportion:c.value[a].value/Y.value,key:c.value[a].key,value:c.value[a].value});return{...l,plots:o,key:c.value[a].key}})):[]),J=e.computed(()=>({cy:"mood-radar-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function Q(l){l===n.value?n.value=null:n.value=l}const v=e.computed(()=>{const l=c.value.map(o=>({name:o.key,color:o.color})),a=c.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function I(){e.nextTick(()=>{const l=v.value.head.map((s,d)=>[[s.name],[v.value.body[d]],[isNaN(v.value.body[d]/y.value)?"-":v.value.body[d]/y.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const b=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(y.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=v.value.head.map((d,k)=>[{color:d.color,name:d.name},v.value.body[k].toFixed(t.value.table.td.roundingValue),isNaN(v.value.body[k]/y.value)?"-":(v.value.body[k]/y.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},s=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:s}});function Z(){return c.value}function F(){f.value.showTable=!f.value.showTable}const p=e.ref(!1);function ee(l){p.value=l}const C=e.ref(!1);function x(){C.value=!C.value}return R({getData:Z,generatePdf:A,generateCsv:I,generateImage:T,toggleTable:F,toggleAnnotator:x}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${p.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:_,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[11]||(a[11]=()=>e.unref(P)(!0)),onMouseleave:a[12]||(a[12]=()=>e.unref(P)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ue._sfc_main,{key:0,svgRef:e.unref(M),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:x},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),X.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:W,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",ye,[e.createVNode(oe._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref($)||e.unref(N))?(e.openBlock(),e.createBlock(q.UserOptions,{key:3,ref_key:"details",ref:U,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(O),isImaging:e.unref(S),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:p.value,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:ee,onGeneratePdf:e.unref(A),onGenerateCsv:I,onGenerateImage:e.unref(T),onToggleTable:F,onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref($)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:s})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:s})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:s})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:s})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:s})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:s})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:M,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${i.value.width} ${i.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":p.value,"vue-data-ui-fulscreen--off":!p.value}),style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(se._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:i.value.width,height:i.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,he)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,pe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,ke)],8,fe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:i.value.width/2,y1:i.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ge))),256)),e.createElementVNode("path",{d:w.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,be),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[5],"stroke-width":"1","stroke-linecap":"round",d:"M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"},null,8,Ce),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>n.value=5),onMouseleave:a[1]||(a[1]=o=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,Ne),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[4],"stroke-width":"1","stroke-linecap":"round",d:"M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"},null,8,we),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>n.value=4),onMouseleave:a[3]||(a[3]=o=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,xe),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[3],"stroke-width":"1","stroke-linecap":"round",d:"M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"},null,8,Ve),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>n.value=3),onMouseleave:a[5]||(a[5]=o=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,_e),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,Be),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>n.value=2),onMouseleave:a[7]||(a[7]=o=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,Pe),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,$e),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>n.value=1),onMouseleave:a[9]||(a[9]=o=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,Me),e.createElementVNode("path",{d:e.unref(r.makePath)(L.value.map(o=>o.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ee),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value.map(o=>o.plots),(o,s)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,Oe),e.createElementVNode("circle",{cx:o.x,cy:o.y,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Se),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Ae),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:s})),9,Te),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.value/y.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,Le)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,me)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(S)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(le.Legend,{legendSet:c.value,config:J.value,key:`legend_${B.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:s})=>[e.createElementVNode("div",{onClick:()=>Q(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(g.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==2?(e.openBlock(),e.createBlock(g.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==3?(e.openBlock(),e.createBlock(g.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==4?(e.openBlock(),e.createBlock(g.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==5?(e.openBlock(),e.createBlock(g.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",qe,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:s})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Fe)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:c.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",ze,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(ne.default,{key:9,hideDetails:"",config:{open:f.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ae.DataTable,{colNames:b.value.colNames,head:b.value.head,body:b.value.body,config:b.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[10]||(a[10]=o=>f.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,De)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ve))}},je=de._export_sfc(Re,[["__scopeId","data-v-219c3ecd"]]);exports.default=je;
@@ -1,15 +1,15 @@
1
1
  import { computed as c, onMounted as we, ref as y, watch as _e, createElementBlock as h, openBlock as r, unref as a, normalizeStyle as L, normalizeClass as ee, createBlock as p, createCommentVNode as u, renderSlot as v, createVNode as U, createSlots as xe, withCtx as f, normalizeProps as I, guardReactiveProps as F, createElementVNode as s, Fragment as te, renderList as oe, toDisplayString as P, createTextVNode as le, nextTick as $e } from "vue";
2
- import { u as Me, o as Ne, e as ae, c as Pe, a as Ae, P as Oe, X as Te, s as C, w as Le, Q as Ie, i as se, f as S, q as Fe, r as Se } from "./index-Ckt5xLw3.js";
3
- import { _ as Ve } from "./Title-C6HOVO5o.js";
4
- import { u as je, U as Re } from "./usePrinter-Drrm-7ZN.js";
5
- import { L as Ue } from "./Legend-COUltTuv.js";
6
- import A from "./BaseIcon-D9r5PTQj.js";
7
- import { D as Be } from "./DataTable-p1tKJjJU.js";
8
- import De from "./vue-ui-skeleton-Buze5CJ9.js";
9
- import We from "./vue-ui-accordion-CHWjFAdS.js";
10
- import { u as re } from "./useNestedProp-BU5A_H6S.js";
11
- import { _ as ze } from "./PackageVersion-Db8Jk3Yz.js";
12
- import { _ as Ee } from "./PenAndPaper-Bleo21mI.js";
2
+ import { u as Me, o as Ne, e as ae, c as Pe, a as Ae, P as Oe, X as Te, s as C, w as Le, Q as Ie, i as se, f as S, q as Fe, r as Se } from "./index-d3erwTWB.js";
3
+ import { _ as Ve } from "./Title-DIYoufYR.js";
4
+ import { u as je, U as Re } from "./usePrinter-CHrKIDM7.js";
5
+ import { L as Ue } from "./Legend-DKQ4psNY.js";
6
+ import A from "./BaseIcon-CpIcYACc.js";
7
+ import { D as Be } from "./DataTable-CJOtzfgn.js";
8
+ import De from "./vue-ui-skeleton-BOtCpAcY.js";
9
+ import We from "./vue-ui-accordion-BJyaBDyF.js";
10
+ import { u as re } from "./useNestedProp-BqKuhIvF.js";
11
+ import { _ as ze } from "./PackageVersion-D-aPPO0L.js";
12
+ import { _ as Ee } from "./PenAndPaper-D9g_r8-6.js";
13
13
  import { u as Ge } from "./useUserOptionState-BIvW1Kz7.js";
14
14
  import { u as He } from "./useChartAccessibility-BWojgys7.js";
15
15
  import { _ as Xe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BKWunRAY.cjs"),Se=require("./useResponsive-BBkmXXaa.cjs"),Ke=require("./Title-DnNgxDaw.cjs"),Ve=require("./usePrinter-Dhf-GWO2.cjs"),Qe=require("./DataTable-CzL8BmEn.cjs"),Ze=require("./Tooltip-BcRV15Nk.cjs"),je=require("./Legend-m-jOk1o6.cjs"),et=require("./vue-ui-skeleton-D5NShLgw.cjs"),tt=require("./vue-ui-accordion-CACZOsPN.cjs"),Ee=require("./useNestedProp-swJfhg8O.cjs"),lt=require("./PackageVersion-BhpRHJg-.cjs"),at=require("./PenAndPaper-Cr_VFW1Y.cjs"),ot=require("./useUserOptionState-BgepsfED.cjs"),nt=require("./useChartAccessibility-Cm7nkzTG.cjs"),st=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),rt=["id"],ut=["xmlns","viewBox"],it=["width","height"],ct=["id"],dt=["offset","stop-color"],vt=["offset","stop-opacity"],ft=["id"],pt=["id"],ht=["id"],yt=["flood-color"],mt=["d","fill","stroke","stroke-width","filter"],bt={key:1},gt=["d","fill"],kt={key:2},wt=["x","y","font-size","font-weight","fill"],Ct={key:3},Lt=["filter"],$t=["opacity","text-anchor","x","y","fill","font-size","font-weight"],xt=["opacity","text-anchor","x","y","fill","font-size","font-weight"],Bt=["text-anchor","x","y","fill","font-size","font-weight"],_t=["d","fill","onMouseenter","onClick"],Nt={key:5,class:"vue-data-ui-watermark"},St={key:0,class:"vue-ui-nested-donuts-legend-title"},Vt=["onClick"],Et=["innerHTML"],Tt={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(Te,{expose:Fe,emit:Oe}){const{vue_ui_nested_donuts:Ae}=r.useConfig(),b=Te,E=e.computed(()=>!!b.dataset&&b.dataset.length),p=e.ref(r.createUid()),M=e.ref(!1),R=e.ref(""),ze=e.ref(null),le=e.ref(0),N=e.ref(null),ae=e.ref(null),q=e.ref(null),oe=e.ref(null),ne=e.ref(null),se=e.ref(0),re=e.ref(0),ue=e.ref(0),x=e.ref(!0),B=e.ref([]),S=e.ref([]),_=e.ref(!1);function Pe(a){_.value=a,le.value+=1}const t=e.computed({get:()=>ve(),set:a=>a}),{userOptionsVisible:U,setUserOptionsVisibility:ie,keepUserOptionState:ce}=ot.useUserOptionState({config:t.value}),{svgRef:de}=nt.useChartAccessibility({config:t.value.style.chart.title});function ve(){const a=Ee.useNestedProp({userConfig:b.config,defaultConfig:Ae});return a.theme?{...Ee.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[a.theme]||b.config,defaultConfig:a}),customPalette:r.themePalettes[a.theme]||r.palette}:a}e.watch(()=>b.config,a=>{t.value=ve(),U.value=!t.value.userOptions.showOnChartHover,G(),se.value+=1,re.value+=1,ue.value+=1,m.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,m.value.showTable=t.value.table.show,m.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const fe=e.computed(()=>{const{top:a,right:s,bottom:o,left:n}=t.value.style.chart.padding;return{css:`padding:${a}px ${s}px ${o}px ${n}px`,top:a,right:s,bottom:o,left:n}});function De(a,s=1e3,o=50){return new Promise(n=>{const l=a.length;B.value=Array(l).fill(0),S.value=[];let u=0;a.forEach((c,f)=>{setTimeout(()=>{const L=performance.now();function g(i){const d=Math.min((i-L)/s,1),k=r.easeOutCubic(d),Q=c*k;B.value[f]=Q,B.value=[...B.value];const D=[];let V=0;b.dataset.forEach((I,Z)=>{const Xe=I.series.reduce((ee,te)=>ee+r.sanitizeArray(te.values).reduce((We,Je)=>We+Je,0),0),He=B.value.slice(V,V+I.series.length).reduce((ee,te)=>ee+te,0),j=Xe-He;j>.001&&D.push({name:"__ghost__",arcOf:I.name,arcOfId:`${p.value}_${Z}`,id:`ghost_${p.value}_${Z}`,seriesIndex:-1,datasetIndex:Z,color:"transparent",value:j,fullValue:j,absoluteValues:[],ghost:!0}),V+=I.series.length}),S.value=D,d<1?requestAnimationFrame(g):(u+=1,u===l&&n())}requestAnimationFrame(g)},f*o)})})}e.onMounted(async()=>{var a;if(G(),(a=t.value.startAnimation)!=null&&a.show){const o=b.dataset.flatMap(n=>n.series).map(n=>r.sanitizeArray(n.values).reduce((l,u)=>l+u,0));B.value=o.map(()=>0),x.value=!0,S.value=b.dataset.map((n,l)=>{const u=n.series.reduce((c,f)=>c+r.sanitizeArray(f.values).reduce((L,g)=>L+g,0),0);return{name:"__ghost__",arcOf:n.name,arcOfId:`${p.value}_${l}`,id:`ghost_${p.value}_${l}`,seriesIndex:-1,datasetIndex:l,color:"transparent",value:u,fullValue:u,absoluteValues:[],ghost:!0}}),await e.nextTick(),De(o,t.value.startAnimation.durationMs,t.value.startAnimation.staggerMs).then(()=>{x.value=!1,S.value=[]})}else x.value=!1});const T=e.ref(null);e.onMounted(()=>{G()});function G(){if(r.objectIsEmpty(b.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const a=Se.throttle(()=>{const{width:s,height:o}=Se.useResponsive({chart:N.value,title:t.value.style.chart.title.text?ae.value:null,legend:t.value.style.chart.legend.show?q.value:null,source:oe.value,noTitle:ne.value,padding:fe.value});requestAnimationFrame(()=>{v.value.width=s,v.value.height=o})});T.value=new ResizeObserver(a),T.value.observe(N.value.parentNode)}}e.onBeforeUnmount(()=>{T.value&&T.value.disconnect()});const{isPrinting:pe,isImaging:he,generatePdf:ye,generateImage:me}=Ve.usePrinter({elementId:`nested_donuts_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts",options:t.value.userOptions.print}),Ie=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Me=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),m=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),v=e.ref({height:512,width:512}),be=Oe;function Re({datapoint:a,index:s}){be("selectDatapoint",{datapoint:a,index:s})}function ge({from:a,to:s,duration:o,onUpdate:n,onDone:l,easing:u=r.easeOutCubic}){const c=performance.now();function f(L){const g=Math.min((L-c)/o,1),i=u(g),d=a+(s-a)*i;n(d,g),g<1?requestAnimationFrame(f):(n(s,1),l&&l())}requestAnimationFrame(f)}const y=e.ref([]),w=e.computed(()=>{b.dataset.forEach((s,o)=>{[null,void 0].includes(s.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:o}),[null,void 0].includes(s.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:o}):s.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${o}`}):s.series.forEach((n,l)=>{[null,void 0].includes(n.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:l,key:"serie"}),[null,void 0].includes(n.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:l,key:"serie"})})});let a=0;return b.dataset.map((s,o)=>({...s,total:s.series.filter(n=>!y.value.includes(n.id)).map(n=>r.sanitizeArray(n.values).reduce((l,u)=>l+u,0)).reduce((n,l)=>n+l,0),datasetIndex:o,id:`${p.value}_${o}`,series:s.series.map((n,l)=>{const u=r.sanitizeArray(n.values).reduce((c,f)=>c+f,0);return{name:n.name,arcOf:s.name,arcOfId:`${p.value}_${o}`,id:`${p.value}_${o}_${l}`,seriesIndex:l,datasetIndex:o,color:r.convertColorToHex(n.color)||Me.value[l]||r.palette[l%r.palette.length],value:x.value?B.value[a++]??0:u,absoluteValues:n.values||[]}})}))}),C=e.computed(()=>Math.min(v.value.height,v.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),ke=e.computed(()=>[...w.value].map((a,s)=>{const o=a.series.filter(n=>!y.value.includes(n.id)).map(n=>n.value).reduce((n,l)=>n+l,0);return{...a,total:o,series:a.series.filter(n=>!y.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function qe(a,s,o){let n=0;for(let l=0;l<a.length;l+=1)o.includes(a[l])&&(n+=1);return n<s}const h=e.ref(ke.value);e.watch(()=>ke.value,a=>h.value=a);function Y(a){var g;be("selectLegend",a);const s=b.dataset.flatMap((i,d)=>i.series.map((k,Q)=>({value:r.sanitizeArray(k.values).reduce((D,V)=>D+V,0),id:`${p.value}_${d}_${Q}`,arcOfId:`${p.value}_${d}`}))).find(i=>i.id===a.id);if(!s)return;const o=((g=w.value.flatMap(i=>i.series).find(i=>i.id===a.id))==null?void 0:g.value)??0,n=h.value.flatMap(i=>i.series).find(i=>i.id===a.id);let u=n?n.value:0;const c=w.value.find(i=>i.id===s.arcOfId);if(!c)return;const f=c.series.map(i=>i.id),L=qe(f,f.length-1,y.value);y.value.includes(a.id)?(y.value=y.value.filter(i=>i!==a.id),t.value.serieToggleAnimation.show?ge({from:u,to:o,duration:t.value.serieToggleAnimation.durationMs,onUpdate:i=>{h.value=h.value.map(d=>({...d,series:d.series.map(k=>k.id===a.id?{...k,value:i}:k)}))}}):h.value=h.value.map(i=>({...i,series:i.series.map(d=>d.id===a.id?{...d,value:o}:d)}))):L&&(t.value.serieToggleAnimation.show?ge({from:u,to:0,duration:t.value.serieToggleAnimation.durationMs,onUpdate:i=>{h.value=h.value.map(d=>({...d,series:d.series.map(k=>k.id===a.id?{...k,value:i}:k)}))},onDone:()=>{y.value.push(a.id)}}):(h.value=h.value.map(i=>({...i,series:i.series.map(d=>d.id===a.id?{...d,value:0}:d)})),y.value.push(a.id)))}const X=e.computed(()=>C.value/w.value.length*t.value.style.chart.layout.donut.spacingRatio),we=e.computed(()=>h.value.map((a,s)=>C.value-s*C.value/w.value.length)),F=e.computed(()=>h.value.map((a,s)=>{const o=C.value-s*C.value/h.value.length,n=x.value?S.value.find(u=>u.datasetIndex===s):null,l=[...a.series,...n?[n]:[]].map(u=>({...u,value:u.value<.001?.001:u.value}));return{...a,radius:o,donut:r.makeDonut({series:l},v.value.width/2,v.value.height/2,o,o,1.99999,2,1,360,105.25,X.value)}})),Ce=e.computed(()=>[...w.value].map((a,s)=>{const o=s*C.value/w.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},v.value.width/2,v.value.height/2,C.value-o,C.value-o,1.99999,2,1,360,105.25,C.value/w.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),Le=e.ref(null),O=e.ref(null),A=e.ref(null),H=e.ref(null);function Ue({datapoint:a,_relativeIndex:s,seriesIndex:o}){Le.value=a.arcOfId,O.value=a.id,A.value=o,H.value={datapoint:a,seriesIndex:o,series:h.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:a,series:h.value,config:t.value})))R.value=n({seriesIndex:o,datapoint:a,series:h.value,config:t.value});else{let l="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&y.value.length===0){const u=h.value.map(c=>c.series.find(f=>f.seriesIndex===o));u.forEach((c,f)=>{if(!c)return"";l+=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Cn2tUOoX.cjs"),Se=require("./useResponsive-BBkmXXaa.cjs"),Ke=require("./Title-D62pPwLz.cjs"),Ve=require("./usePrinter-BrH80VBz.cjs"),Qe=require("./DataTable-CNCnRrD-.cjs"),Ze=require("./Tooltip-C_H6-uAa.cjs"),je=require("./Legend-ieOu_fKK.cjs"),et=require("./vue-ui-skeleton-Mcoev-5q.cjs"),tt=require("./vue-ui-accordion-7GoAZx3k.cjs"),Ee=require("./useNestedProp-C8955nsn.cjs"),lt=require("./PackageVersion-BxSGdh6L.cjs"),at=require("./PenAndPaper-ByAFuR-l.cjs"),ot=require("./useUserOptionState-BgepsfED.cjs"),nt=require("./useChartAccessibility-Cm7nkzTG.cjs"),st=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),rt=["id"],ut=["xmlns","viewBox"],it=["width","height"],ct=["id"],dt=["offset","stop-color"],vt=["offset","stop-opacity"],ft=["id"],pt=["id"],ht=["id"],yt=["flood-color"],mt=["d","fill","stroke","stroke-width","filter"],bt={key:1},gt=["d","fill"],kt={key:2},wt=["x","y","font-size","font-weight","fill"],Ct={key:3},Lt=["filter"],$t=["opacity","text-anchor","x","y","fill","font-size","font-weight"],xt=["opacity","text-anchor","x","y","fill","font-size","font-weight"],Bt=["text-anchor","x","y","fill","font-size","font-weight"],_t=["d","fill","onMouseenter","onClick"],Nt={key:5,class:"vue-data-ui-watermark"},St={key:0,class:"vue-ui-nested-donuts-legend-title"},Vt=["onClick"],Et=["innerHTML"],Tt={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(Te,{expose:Fe,emit:Oe}){const{vue_ui_nested_donuts:Ae}=r.useConfig(),b=Te,E=e.computed(()=>!!b.dataset&&b.dataset.length),p=e.ref(r.createUid()),M=e.ref(!1),R=e.ref(""),ze=e.ref(null),le=e.ref(0),N=e.ref(null),ae=e.ref(null),q=e.ref(null),oe=e.ref(null),ne=e.ref(null),se=e.ref(0),re=e.ref(0),ue=e.ref(0),x=e.ref(!0),B=e.ref([]),S=e.ref([]),_=e.ref(!1);function Pe(a){_.value=a,le.value+=1}const t=e.computed({get:()=>ve(),set:a=>a}),{userOptionsVisible:U,setUserOptionsVisibility:ie,keepUserOptionState:ce}=ot.useUserOptionState({config:t.value}),{svgRef:de}=nt.useChartAccessibility({config:t.value.style.chart.title});function ve(){const a=Ee.useNestedProp({userConfig:b.config,defaultConfig:Ae});return a.theme?{...Ee.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[a.theme]||b.config,defaultConfig:a}),customPalette:r.themePalettes[a.theme]||r.palette}:a}e.watch(()=>b.config,a=>{t.value=ve(),U.value=!t.value.userOptions.showOnChartHover,G(),se.value+=1,re.value+=1,ue.value+=1,m.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,m.value.showTable=t.value.table.show,m.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const fe=e.computed(()=>{const{top:a,right:s,bottom:o,left:n}=t.value.style.chart.padding;return{css:`padding:${a}px ${s}px ${o}px ${n}px`,top:a,right:s,bottom:o,left:n}});function De(a,s=1e3,o=50){return new Promise(n=>{const l=a.length;B.value=Array(l).fill(0),S.value=[];let u=0;a.forEach((c,f)=>{setTimeout(()=>{const L=performance.now();function g(i){const d=Math.min((i-L)/s,1),k=r.easeOutCubic(d),Q=c*k;B.value[f]=Q,B.value=[...B.value];const D=[];let V=0;b.dataset.forEach((I,Z)=>{const Xe=I.series.reduce((ee,te)=>ee+r.sanitizeArray(te.values).reduce((We,Je)=>We+Je,0),0),He=B.value.slice(V,V+I.series.length).reduce((ee,te)=>ee+te,0),j=Xe-He;j>.001&&D.push({name:"__ghost__",arcOf:I.name,arcOfId:`${p.value}_${Z}`,id:`ghost_${p.value}_${Z}`,seriesIndex:-1,datasetIndex:Z,color:"transparent",value:j,fullValue:j,absoluteValues:[],ghost:!0}),V+=I.series.length}),S.value=D,d<1?requestAnimationFrame(g):(u+=1,u===l&&n())}requestAnimationFrame(g)},f*o)})})}e.onMounted(async()=>{var a;if(G(),(a=t.value.startAnimation)!=null&&a.show){const o=b.dataset.flatMap(n=>n.series).map(n=>r.sanitizeArray(n.values).reduce((l,u)=>l+u,0));B.value=o.map(()=>0),x.value=!0,S.value=b.dataset.map((n,l)=>{const u=n.series.reduce((c,f)=>c+r.sanitizeArray(f.values).reduce((L,g)=>L+g,0),0);return{name:"__ghost__",arcOf:n.name,arcOfId:`${p.value}_${l}`,id:`ghost_${p.value}_${l}`,seriesIndex:-1,datasetIndex:l,color:"transparent",value:u,fullValue:u,absoluteValues:[],ghost:!0}}),await e.nextTick(),De(o,t.value.startAnimation.durationMs,t.value.startAnimation.staggerMs).then(()=>{x.value=!1,S.value=[]})}else x.value=!1});const T=e.ref(null);e.onMounted(()=>{G()});function G(){if(r.objectIsEmpty(b.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const a=Se.throttle(()=>{const{width:s,height:o}=Se.useResponsive({chart:N.value,title:t.value.style.chart.title.text?ae.value:null,legend:t.value.style.chart.legend.show?q.value:null,source:oe.value,noTitle:ne.value,padding:fe.value});requestAnimationFrame(()=>{v.value.width=s,v.value.height=o})});T.value=new ResizeObserver(a),T.value.observe(N.value.parentNode)}}e.onBeforeUnmount(()=>{T.value&&T.value.disconnect()});const{isPrinting:pe,isImaging:he,generatePdf:ye,generateImage:me}=Ve.usePrinter({elementId:`nested_donuts_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts",options:t.value.userOptions.print}),Ie=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Me=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),m=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),v=e.ref({height:512,width:512}),be=Oe;function Re({datapoint:a,index:s}){be("selectDatapoint",{datapoint:a,index:s})}function ge({from:a,to:s,duration:o,onUpdate:n,onDone:l,easing:u=r.easeOutCubic}){const c=performance.now();function f(L){const g=Math.min((L-c)/o,1),i=u(g),d=a+(s-a)*i;n(d,g),g<1?requestAnimationFrame(f):(n(s,1),l&&l())}requestAnimationFrame(f)}const y=e.ref([]),w=e.computed(()=>{b.dataset.forEach((s,o)=>{[null,void 0].includes(s.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:o}),[null,void 0].includes(s.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:o}):s.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${o}`}):s.series.forEach((n,l)=>{[null,void 0].includes(n.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:l,key:"serie"}),[null,void 0].includes(n.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:l,key:"serie"})})});let a=0;return b.dataset.map((s,o)=>({...s,total:s.series.filter(n=>!y.value.includes(n.id)).map(n=>r.sanitizeArray(n.values).reduce((l,u)=>l+u,0)).reduce((n,l)=>n+l,0),datasetIndex:o,id:`${p.value}_${o}`,series:s.series.map((n,l)=>{const u=r.sanitizeArray(n.values).reduce((c,f)=>c+f,0);return{name:n.name,arcOf:s.name,arcOfId:`${p.value}_${o}`,id:`${p.value}_${o}_${l}`,seriesIndex:l,datasetIndex:o,color:r.convertColorToHex(n.color)||Me.value[l]||r.palette[l%r.palette.length],value:x.value?B.value[a++]??0:u,absoluteValues:n.values||[]}})}))}),C=e.computed(()=>Math.min(v.value.height,v.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),ke=e.computed(()=>[...w.value].map((a,s)=>{const o=a.series.filter(n=>!y.value.includes(n.id)).map(n=>n.value).reduce((n,l)=>n+l,0);return{...a,total:o,series:a.series.filter(n=>!y.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function qe(a,s,o){let n=0;for(let l=0;l<a.length;l+=1)o.includes(a[l])&&(n+=1);return n<s}const h=e.ref(ke.value);e.watch(()=>ke.value,a=>h.value=a);function Y(a){var g;be("selectLegend",a);const s=b.dataset.flatMap((i,d)=>i.series.map((k,Q)=>({value:r.sanitizeArray(k.values).reduce((D,V)=>D+V,0),id:`${p.value}_${d}_${Q}`,arcOfId:`${p.value}_${d}`}))).find(i=>i.id===a.id);if(!s)return;const o=((g=w.value.flatMap(i=>i.series).find(i=>i.id===a.id))==null?void 0:g.value)??0,n=h.value.flatMap(i=>i.series).find(i=>i.id===a.id);let u=n?n.value:0;const c=w.value.find(i=>i.id===s.arcOfId);if(!c)return;const f=c.series.map(i=>i.id),L=qe(f,f.length-1,y.value);y.value.includes(a.id)?(y.value=y.value.filter(i=>i!==a.id),t.value.serieToggleAnimation.show?ge({from:u,to:o,duration:t.value.serieToggleAnimation.durationMs,onUpdate:i=>{h.value=h.value.map(d=>({...d,series:d.series.map(k=>k.id===a.id?{...k,value:i}:k)}))}}):h.value=h.value.map(i=>({...i,series:i.series.map(d=>d.id===a.id?{...d,value:o}:d)}))):L&&(t.value.serieToggleAnimation.show?ge({from:u,to:0,duration:t.value.serieToggleAnimation.durationMs,onUpdate:i=>{h.value=h.value.map(d=>({...d,series:d.series.map(k=>k.id===a.id?{...k,value:i}:k)}))},onDone:()=>{y.value.push(a.id)}}):(h.value=h.value.map(i=>({...i,series:i.series.map(d=>d.id===a.id?{...d,value:0}:d)})),y.value.push(a.id)))}const X=e.computed(()=>C.value/w.value.length*t.value.style.chart.layout.donut.spacingRatio),we=e.computed(()=>h.value.map((a,s)=>C.value-s*C.value/w.value.length)),F=e.computed(()=>h.value.map((a,s)=>{const o=C.value-s*C.value/h.value.length,n=x.value?S.value.find(u=>u.datasetIndex===s):null,l=[...a.series,...n?[n]:[]].map(u=>({...u,value:u.value<.001?.001:u.value}));return{...a,radius:o,donut:r.makeDonut({series:l},v.value.width/2,v.value.height/2,o,o,1.99999,2,1,360,105.25,X.value)}})),Ce=e.computed(()=>[...w.value].map((a,s)=>{const o=s*C.value/w.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},v.value.width/2,v.value.height/2,C.value-o,C.value-o,1.99999,2,1,360,105.25,C.value/w.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),Le=e.ref(null),O=e.ref(null),A=e.ref(null),H=e.ref(null);function Ue({datapoint:a,_relativeIndex:s,seriesIndex:o}){Le.value=a.arcOfId,O.value=a.id,A.value=o,H.value={datapoint:a,seriesIndex:o,series:h.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:a,series:h.value,config:t.value})))R.value=n({seriesIndex:o,datapoint:a,series:h.value,config:t.value});else{let l="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&y.value.length===0){const u=h.value.map(c=>c.series.find(f=>f.seriesIndex===o));u.forEach((c,f)=>{if(!c)return"";l+=`
2
2
  <div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${f<u.length-1?`border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor}`:""}">
3
3
  <div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
4
4
  <svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">