vue-data-ui 2.6.50 → 2.6.52-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/README.md +1 -3
  2. package/dist/{Arrow-DgCzka34.js → Arrow-BrgzjEu9.js} +1 -1
  3. package/dist/{Arrow-Cj0UP9DN.cjs → Arrow-i892KlJJ.cjs} +1 -1
  4. package/dist/{BaseIcon-Dug6kYBB.js → BaseIcon-1Kh1hniD.js} +1 -1
  5. package/dist/{BaseIcon-BeRHKYU4.cjs → BaseIcon-OIGwOnCM.cjs} +1 -1
  6. package/dist/{ColorPicker-C-VVlvta.cjs → ColorPicker-C5fe9E7-.cjs} +1 -1
  7. package/dist/{ColorPicker-8EgjF14O.js → ColorPicker-Cxeiob9V.js} +3 -3
  8. package/dist/{DataTable-Qe7lM3JL.js → DataTable-C4Zf4XLF.js} +15 -15
  9. package/dist/DataTable-DJyyRRlW.cjs +1 -0
  10. package/dist/{Legend-lzTl1S1b.js → Legend-1pyX_J1z.js} +2 -2
  11. package/dist/{Legend-CjiKxR8b.cjs → Legend-Dx4tku_Q.cjs} +1 -1
  12. package/dist/{PackageVersion-DqsBfaeh.js → PackageVersion-BPpaTwrM.js} +1 -1
  13. package/dist/{PackageVersion-yiiAD1cf.cjs → PackageVersion-Di08b2vs.cjs} +1 -1
  14. package/dist/{PenAndPaper-AvORsvqF.js → PenAndPaper-B21RAf9P.js} +5 -5
  15. package/dist/PenAndPaper-C0I2pjPq.cjs +1 -0
  16. package/dist/{Shape-2KuBmTJV.cjs → Shape-Bn0OAR4-.cjs} +1 -1
  17. package/dist/{Shape-Jg6afnuk.js → Shape-BrtnGizi.js} +1 -1
  18. package/dist/{Slicer-DPPVa8zE.js → Slicer-BeRcAG--.js} +25 -25
  19. package/dist/Slicer-BrIoq1c-.cjs +1 -0
  20. package/dist/{Title-cjYd6IYr.cjs → Title-CcW9kRtT.cjs} +1 -1
  21. package/dist/{Title-DPXXRQ-w.js → Title-rbJs8Cs3.js} +1 -1
  22. package/dist/{Tooltip-YBqthQ_8.cjs → Tooltip-BzDUupFB.cjs} +1 -1
  23. package/dist/{Tooltip-C4H6zELy.js → Tooltip-DZGBhn8l.js} +1 -1
  24. package/dist/documentation/installation.md +0 -1
  25. package/dist/dom-to-png-BpstRczV.cjs +1 -0
  26. package/dist/dom-to-png-DFDQ3B5I.js +119 -0
  27. package/dist/img-DN4K4BLQ.cjs +1 -0
  28. package/dist/img-hntVQbmL.js +19 -0
  29. package/dist/index-CuIvJLJx.cjs +9 -0
  30. package/dist/{index-BdAppyf2.js → index-DYjLUPYr.js} +291 -349
  31. package/dist/pdf-BwewXrne.js +46 -0
  32. package/dist/pdf-ClzzT4YP.cjs +1 -0
  33. package/dist/style.css +1 -1
  34. package/dist/types/vue-data-ui.d.cts +0 -64
  35. package/dist/types/vue-data-ui.d.ts +0 -64
  36. package/dist/{useNestedProp-B3UWJnDQ.cjs → useNestedProp-B3OcLUMU.cjs} +1 -1
  37. package/dist/{useNestedProp-BGSJvQb3.js → useNestedProp-DPpLpUNG.js} +1 -1
  38. package/dist/usePanZoom-CUkkqW81.js +116 -0
  39. package/dist/usePanZoom-PXRi2Rwx.cjs +1 -0
  40. package/dist/usePrinter-BwwdT1Uh.cjs +1 -0
  41. package/dist/{usePrinter-Bvq0gUmP.js → usePrinter-GOjH1UQd.js} +5 -5
  42. package/dist/{vue-data-ui-B66itXhe.js → vue-data-ui-CgYIT4l6.js} +60 -62
  43. package/dist/vue-data-ui-XSn3UFqP.cjs +9 -0
  44. package/dist/vue-data-ui.cjs +1 -1
  45. package/dist/vue-data-ui.js +35 -36
  46. package/dist/{vue-ui-3d-bar-kESBThJe.js → vue-ui-3d-bar-BFA4GviN.js} +11 -11
  47. package/dist/{vue-ui-3d-bar-Bp1Qx_3s.cjs → vue-ui-3d-bar-d2lzwwD0.cjs} +2 -2
  48. package/dist/{vue-ui-accordion-Btv7fZHc.cjs → vue-ui-accordion-ZlcsLKVn.cjs} +1 -1
  49. package/dist/{vue-ui-accordion-dAJcVBnP.js → vue-ui-accordion-zFcofzrb.js} +3 -3
  50. package/dist/{vue-ui-age-pyramid-yogLIZ0-.cjs → vue-ui-age-pyramid-BrS-QXEl.cjs} +1 -1
  51. package/dist/{vue-ui-age-pyramid-DOf4u3G7.js → vue-ui-age-pyramid-HYnV6m7j.js} +10 -10
  52. package/dist/{vue-ui-annotator-CSE9-lNO.js → vue-ui-annotator-Bnl6xoGx.js} +84 -85
  53. package/dist/vue-ui-annotator-DpcBNv4G.cjs +371 -0
  54. package/dist/{vue-ui-bullet-CrO7QKNT.js → vue-ui-bullet-BMAoQg9X.js} +8 -8
  55. package/dist/{vue-ui-bullet-C12nLt5L.cjs → vue-ui-bullet-CUg-Tqm5.cjs} +1 -1
  56. package/dist/{vue-ui-candlestick-DdwcejCS.cjs → vue-ui-candlestick-BB_TlvHs.cjs} +1 -1
  57. package/dist/{vue-ui-candlestick-fZNnGqnR.js → vue-ui-candlestick-D99-OMzs.js} +11 -11
  58. package/dist/{vue-ui-carousel-table-Be2jjnQa.cjs → vue-ui-carousel-table-BLMby8AI.cjs} +1 -1
  59. package/dist/{vue-ui-carousel-table-D7TTErUh.js → vue-ui-carousel-table-Cj28UhyG.js} +4 -4
  60. package/dist/{vue-ui-chestnut-DXxpU3iH.js → vue-ui-chestnut-BcHI2rpx.js} +8 -8
  61. package/dist/{vue-ui-chestnut-OYsNRpL_.cjs → vue-ui-chestnut-CK_b_ta8.cjs} +1 -1
  62. package/dist/{vue-ui-circle-pack-i0GUh3ui.js → vue-ui-circle-pack-BYhg53UE.js} +9 -9
  63. package/dist/{vue-ui-circle-pack-CzGyZQx0.cjs → vue-ui-circle-pack-ClzkEDGg.cjs} +1 -1
  64. package/dist/vue-ui-cursor-B3u3ldcD.cjs +1 -0
  65. package/dist/{vue-ui-cursor-7vhZ073K.js → vue-ui-cursor-DkcChdeb.js} +4 -4
  66. package/dist/{vue-ui-dashboard-Z0ukqnTc.js → vue-ui-dashboard-BdnlFgl5.js} +8 -8
  67. package/dist/vue-ui-dashboard-Nt0DdH9L.cjs +1 -0
  68. package/dist/{vue-ui-digits-CnSmR9jO.js → vue-ui-digits-D_BKH_j3.js} +2 -2
  69. package/dist/{vue-ui-digits-er9gte-s.cjs → vue-ui-digits-LJ5NoBDi.cjs} +1 -1
  70. package/dist/{vue-ui-donut-DlBL_0yx.js → vue-ui-donut-DKIAm-ME.js} +12 -12
  71. package/dist/{vue-ui-donut-evolution-U0GNz2fp.js → vue-ui-donut-evolution-B_aFgOze.js} +14 -14
  72. package/dist/{vue-ui-donut-evolution-BDuXBSjv.cjs → vue-ui-donut-evolution-BtnTa4le.cjs} +1 -1
  73. package/dist/{vue-ui-donut-DVg5ro7B.cjs → vue-ui-donut-kRhrhvjt.cjs} +1 -1
  74. package/dist/{vue-ui-dumbbell-PioEuDZQ.cjs → vue-ui-dumbbell-BFYVlYa4.cjs} +1 -1
  75. package/dist/{vue-ui-dumbbell-aIYpaGN0.js → vue-ui-dumbbell-jzYimGnw.js} +10 -10
  76. package/dist/{vue-ui-flow-BOlMAhh0.cjs → vue-ui-flow-BuXSGu-i.cjs} +1 -1
  77. package/dist/{vue-ui-flow-BcaSo6z0.js → vue-ui-flow-CqihZo8O.js} +9 -9
  78. package/dist/{vue-ui-funnel-AgQn4mH5.js → vue-ui-funnel-B9OFgkeR.js} +9 -9
  79. package/dist/{vue-ui-funnel-DrkVJPw1.cjs → vue-ui-funnel-CpaBBSbU.cjs} +1 -1
  80. package/dist/{vue-ui-galaxy-D85_jVQh.cjs → vue-ui-galaxy-BCQr-U2u.cjs} +1 -1
  81. package/dist/{vue-ui-galaxy-DWSIn-eK.js → vue-ui-galaxy-FOIZdAZe.js} +11 -11
  82. package/dist/{vue-ui-gauge-8ULXCGzO.js → vue-ui-gauge-B42XWwB2.js} +7 -7
  83. package/dist/{vue-ui-gauge-BHj3D_VH.cjs → vue-ui-gauge-kZxueLp8.cjs} +1 -1
  84. package/dist/{vue-ui-gizmo-D1j6MDV_.js → vue-ui-gizmo-DNzFp5mg.js} +3 -3
  85. package/dist/{vue-ui-gizmo-CEsmiN_U.cjs → vue-ui-gizmo-DtQnmFnB.cjs} +1 -1
  86. package/dist/{vue-ui-heatmap-tMQOgzTJ.js → vue-ui-heatmap-CBahWBfm.js} +10 -10
  87. package/dist/{vue-ui-heatmap-Cww1BNvU.cjs → vue-ui-heatmap-DwTkeSCE.cjs} +1 -1
  88. package/dist/{vue-ui-history-plot-CrVMrU9H.cjs → vue-ui-history-plot-BLZfokqh.cjs} +1 -1
  89. package/dist/{vue-ui-history-plot-17Ayxmx8.js → vue-ui-history-plot-JF7Cxj70.js} +11 -11
  90. package/dist/{vue-ui-kpi-C9kltMQ9.js → vue-ui-kpi-Dd7_MpTH.js} +3 -3
  91. package/dist/{vue-ui-kpi-BALQ_M2s.cjs → vue-ui-kpi-DgYNzLPE.cjs} +1 -1
  92. package/dist/{vue-ui-mini-loader-DzObX7ZU.cjs → vue-ui-mini-loader-AnEvVAeN.cjs} +1 -1
  93. package/dist/{vue-ui-mini-loader-zkvcqGEg.js → vue-ui-mini-loader-CYlUH9YB.js} +2 -2
  94. package/dist/{vue-ui-molecule-C8d0BNOu.js → vue-ui-molecule-CwjSX0qp.js} +253 -226
  95. package/dist/vue-ui-molecule-DenzPBhZ.cjs +1 -0
  96. package/dist/{vue-ui-mood-radar-Bl-PDTeX.js → vue-ui-mood-radar-B_ZdNRq7.js} +11 -11
  97. package/dist/{vue-ui-mood-radar-B-I03OhG.cjs → vue-ui-mood-radar-oZi1r3t2.cjs} +1 -1
  98. package/dist/{vue-ui-nested-donuts-DnuV1MXZ.cjs → vue-ui-nested-donuts-1iw0Uhgn.cjs} +1 -1
  99. package/dist/{vue-ui-nested-donuts-BxTLEwZg.js → vue-ui-nested-donuts-u6o7Mo5w.js} +11 -11
  100. package/dist/{vue-ui-onion-ChlD0lEh.js → vue-ui-onion-BIgB8q-o.js} +11 -11
  101. package/dist/{vue-ui-onion-jrh-OYsj.cjs → vue-ui-onion-nSs841wa.cjs} +1 -1
  102. package/dist/{vue-ui-parallel-coordinate-plot-DEsxCUkG.cjs → vue-ui-parallel-coordinate-plot-CLZbLwv6.cjs} +1 -1
  103. package/dist/{vue-ui-parallel-coordinate-plot-DaQ5VVjw.js → vue-ui-parallel-coordinate-plot-CzdztQbb.js} +12 -12
  104. package/dist/{vue-ui-quadrant-BhwxemSE.cjs → vue-ui-quadrant-DVJk4jVY.cjs} +1 -1
  105. package/dist/{vue-ui-quadrant-DHwHNx0L.js → vue-ui-quadrant-Dqj0kKDK.js} +12 -12
  106. package/dist/{vue-ui-quick-chart-DCKBR3yK.js → vue-ui-quick-chart-C16V9Aae.js} +9 -9
  107. package/dist/{vue-ui-quick-chart-CKzMyPRh.cjs → vue-ui-quick-chart-DseczpPU.cjs} +1 -1
  108. package/dist/{vue-ui-radar-BKa6M5Wq.cjs → vue-ui-radar-BAeIHJpy.cjs} +1 -1
  109. package/dist/{vue-ui-radar-B5llyhiL.js → vue-ui-radar-Db7iB_Qj.js} +12 -12
  110. package/dist/{vue-ui-rating-ChPyKOUl.cjs → vue-ui-rating-D0Dx6ZXa.cjs} +1 -1
  111. package/dist/{vue-ui-rating-BLdhelA-.js → vue-ui-rating-JEdFnT3W.js} +2 -2
  112. package/dist/{vue-ui-relation-circle-CS8SHw7f.cjs → vue-ui-relation-circle-DQna8U5y.cjs} +1 -1
  113. package/dist/{vue-ui-relation-circle-CDhd8AAr.js → vue-ui-relation-circle-gakSZ4S6.js} +7 -7
  114. package/dist/{vue-ui-rings-bZCTJMWv.js → vue-ui-rings-D5n6DT_A.js} +12 -12
  115. package/dist/{vue-ui-rings-DJS0iOwC.cjs → vue-ui-rings-DtRyfbLl.cjs} +1 -1
  116. package/dist/{vue-ui-scatter-BP8fVV4q.cjs → vue-ui-scatter-Bi6D12HK.cjs} +1 -1
  117. package/dist/{vue-ui-scatter-BKvtGb58.js → vue-ui-scatter-PREHAey0.js} +12 -12
  118. package/dist/{vue-ui-skeleton-CIPY7Xfo.cjs → vue-ui-skeleton-B3iHjtI-.cjs} +1 -1
  119. package/dist/{vue-ui-skeleton-BvIz3HzY.js → vue-ui-skeleton-Bvgys0sE.js} +3 -3
  120. package/dist/{vue-ui-smiley-CF97kVSw.js → vue-ui-smiley-Bbz2pMRt.js} +2 -2
  121. package/dist/{vue-ui-smiley-Dcw6DDUd.cjs → vue-ui-smiley-CPZZHQxU.cjs} +1 -1
  122. package/dist/{vue-ui-spark-trend-H77En2yP.cjs → vue-ui-spark-trend-BQJgJLH1.cjs} +1 -1
  123. package/dist/{vue-ui-spark-trend-DDWZF8FE.js → vue-ui-spark-trend-OSzSYi-e.js} +5 -5
  124. package/dist/{vue-ui-sparkbar-D_J5RsQ7.cjs → vue-ui-sparkbar-CMXau9-B.cjs} +1 -1
  125. package/dist/{vue-ui-sparkbar-DS7rL1J8.js → vue-ui-sparkbar-CTBKE2AF.js} +4 -4
  126. package/dist/{vue-ui-sparkgauge-MSEo6cmu.js → vue-ui-sparkgauge-Cut-q8bg.js} +4 -4
  127. package/dist/{vue-ui-sparkgauge-lyri9BYV.cjs → vue-ui-sparkgauge-DXGiSj1v.cjs} +1 -1
  128. package/dist/{vue-ui-sparkhistogram-DZPn2dDv.js → vue-ui-sparkhistogram-Bc9284wI.js} +5 -5
  129. package/dist/{vue-ui-sparkhistogram-qNy_nXl3.cjs → vue-ui-sparkhistogram-D0JFcRmB.cjs} +1 -1
  130. package/dist/{vue-ui-sparkline-DhUWmLtU.cjs → vue-ui-sparkline-BjuntN3v.cjs} +1 -1
  131. package/dist/{vue-ui-sparkline-DmMQ2SZ_.js → vue-ui-sparkline-JtLdV2lv.js} +4 -4
  132. package/dist/{vue-ui-sparkstackbar-DgmKIPN-.js → vue-ui-sparkstackbar-Dnb7y-aL.js} +5 -5
  133. package/dist/{vue-ui-sparkstackbar-DSWq3rmC.cjs → vue-ui-sparkstackbar-UHMiNIcM.cjs} +1 -1
  134. package/dist/{vue-ui-stackbar-2RHJInUq.cjs → vue-ui-stackbar-B3tfGGNG.cjs} +2 -2
  135. package/dist/{vue-ui-stackbar-DYOgS1Qd.js → vue-ui-stackbar-Do4pbvT_.js} +15 -15
  136. package/dist/{vue-ui-strip-plot-6VO97qw1.cjs → vue-ui-strip-plot-BL_QIbRg.cjs} +1 -1
  137. package/dist/{vue-ui-strip-plot-Dt2b8qR2.js → vue-ui-strip-plot-DpEyBQVy.js} +11 -11
  138. package/dist/{vue-ui-table-DB16XLTw.cjs → vue-ui-table-Bo6YTb5z.cjs} +1 -1
  139. package/dist/{vue-ui-table-CUXgc62i.js → vue-ui-table-DOy0Vino.js} +1 -1
  140. package/dist/{vue-ui-table-heatmap-CCE1VZlG.js → vue-ui-table-heatmap-BBtNwXmc.js} +4 -4
  141. package/dist/{vue-ui-table-heatmap-Awh619At.cjs → vue-ui-table-heatmap-BEyXNXkX.cjs} +1 -1
  142. package/dist/{vue-ui-table-sparkline-Cmmla_Dx.js → vue-ui-table-sparkline-CgMtPPVk.js} +5 -5
  143. package/dist/{vue-ui-table-sparkline-DYQYdZbN.cjs → vue-ui-table-sparkline-CjOt6yUn.cjs} +1 -1
  144. package/dist/{vue-ui-thermometer-DOwFD-a9.cjs → vue-ui-thermometer-DDzJGu-3.cjs} +1 -1
  145. package/dist/{vue-ui-thermometer-C-9ZCOYE.js → vue-ui-thermometer-mxQsDV23.js} +7 -7
  146. package/dist/{vue-ui-timer-DhmCBz29.cjs → vue-ui-timer-BoHc9W-g.cjs} +1 -1
  147. package/dist/{vue-ui-timer-BJWfxtwA.js → vue-ui-timer-py5C5kre.js} +5 -5
  148. package/dist/{vue-ui-tiremarks-C_fjzZx1.cjs → vue-ui-tiremarks-DfzjVsQy.cjs} +1 -1
  149. package/dist/{vue-ui-tiremarks-DWb36mmN.js → vue-ui-tiremarks-cOumsgMp.js} +7 -7
  150. package/dist/vue-ui-treemap-BapuAvm_.cjs +1 -0
  151. package/dist/{vue-ui-treemap-BvQ-fZ2Q.js → vue-ui-treemap-D52gL3aO.js} +185 -185
  152. package/dist/{vue-ui-vertical-bar-Bx-Hgjrl.js → vue-ui-vertical-bar-B7xGhcol.js} +12 -12
  153. package/dist/{vue-ui-vertical-bar-BX82g5XY.cjs → vue-ui-vertical-bar-tUOVTrhe.cjs} +1 -1
  154. package/dist/{vue-ui-waffle-6bPlupZ9.cjs → vue-ui-waffle-D_eTTi3G.cjs} +1 -1
  155. package/dist/{vue-ui-waffle-XBYHZddH.js → vue-ui-waffle-Dl3103a6.js} +12 -12
  156. package/dist/{vue-ui-wheel-BAGyz9kV.cjs → vue-ui-wheel-BF-ixbP0.cjs} +1 -1
  157. package/dist/{vue-ui-wheel-B3opMdjn.js → vue-ui-wheel-j5qr7c2B.js} +7 -7
  158. package/dist/vue-ui-word-cloud-CDCHlEtX.js +628 -0
  159. package/dist/vue-ui-word-cloud-DzhX3V-T.cjs +1 -0
  160. package/dist/{vue-ui-xy-DCMV8GPA.js → vue-ui-xy-Cqd9LwBJ.js} +18 -18
  161. package/dist/vue-ui-xy-DXp678aj.cjs +3 -0
  162. package/dist/{vue-ui-xy-canvas-DKhymJYh.cjs → vue-ui-xy-canvas-DfYwxC06.cjs} +2 -2
  163. package/dist/{vue-ui-xy-canvas-DDf9P1hu.js → vue-ui-xy-canvas-byW5VmrH.js} +16 -16
  164. package/package.json +2 -3
  165. package/dist/DataTable-DtXoZKgy.cjs +0 -1
  166. package/dist/PenAndPaper-Btnlb4RH.cjs +0 -1
  167. package/dist/Slicer-BGrOB5Ac.cjs +0 -1
  168. package/dist/img-BIeSHu0f.js +0 -15
  169. package/dist/img-D6uvziU0.cjs +0 -1
  170. package/dist/index-BVYLM95-.cjs +0 -9
  171. package/dist/pdf-BpXLKlRx.cjs +0 -1
  172. package/dist/pdf-H8Iw_Wax.js +0 -44
  173. package/dist/usePanZoom-BI9ALAYy.cjs +0 -1
  174. package/dist/usePanZoom-D76xCBni.js +0 -97
  175. package/dist/usePrinter-CkJDEgjQ.cjs +0 -1
  176. package/dist/vue-data-ui-CgyB5G6z.cjs +0 -9
  177. package/dist/vue-ui-annotator-DVCxXtI-.cjs +0 -371
  178. package/dist/vue-ui-cursor-BjYOyMry.cjs +0 -1
  179. package/dist/vue-ui-dashboard-zYOnUnUa.cjs +0 -1
  180. package/dist/vue-ui-molecule-mDLCkrh8.cjs +0 -1
  181. package/dist/vue-ui-screenshot-BLvYddQy.cjs +0 -3
  182. package/dist/vue-ui-screenshot-CAciP-qg.js +0 -161
  183. package/dist/vue-ui-treemap-ksooFSp3.cjs +0 -1
  184. package/dist/vue-ui-word-cloud-1Lsf7r8k.cjs +0 -1
  185. package/dist/vue-ui-word-cloud-DJGCUigw.js +0 -571
  186. package/dist/vue-ui-xy-aSB6TWYQ.cjs +0 -3
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./index-BVYLM95-.cjs"),Ce=require("./Title-cjYd6IYr.cjs"),ne=require("./usePrinter-CkJDEgjQ.cjs"),Be=require("./DataTable-DtXoZKgy.cjs"),we=require("./Tooltip-YBqthQ_8.cjs"),$e=require("./vue-ui-skeleton-CIPY7Xfo.cjs"),Pe=require("./vue-ui-accordion-Btv7fZHc.cjs"),ae=require("./useNestedProp-B3UWJnDQ.cjs"),Ne=require("./PackageVersion-yiiAD1cf.cjs"),Te=require("./PenAndPaper-Btnlb4RH.cjs"),Fe=require("./useUserOptionState-BgepsfED.cjs"),Se=require("./useChartAccessibility-Cm7nkzTG.cjs"),xe=require("./usePanZoom-BI9ALAYy.cjs"),Ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Re=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Ve=["x","y","height","width","onClick","onMouseover"],Oe={__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,y=$;function d(r){y("click",r)}function g(r){y("hover",r)}return e.toRef(P,"dataset").value.forEach(r=>{r.nodes&&r.nodes.length>0&&r.nodes.forEach(f=>{f.ancestor=r})}),(r,f)=>{const V=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,(k,E)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("circle",{cx:k.x,cy:k.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,Re),r.$slots.node?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:k.x-i.circleRadius,y:k.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(r.$slots,"node",e.mergeProps({ref_for:!0},{node:i}))],40,Ve)):e.createCommentVNode("",!0)],64))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(V,{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:k})=>[e.renderSlot(r.$slots,"node",e.mergeProps({ref_for:!0},{node:k}))]),_:2},1032,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Ae=["x1","y1","x2","y2","stroke","stroke-width"],Le=["x1","y1","x2","y2","stroke","stroke-width"],Ue={__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(y=>{y.nodes&&y.nodes.length>0&&y.nodes.forEach(d=>{d.ancestor=y})}),(y,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,(r,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:r.x,y1:r.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,Ae),e.createElementVNode("line",{x1:r.x,y1:r.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,Le)],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)}}},De=["x","y","fill","font-size"],Ie={__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,r=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[r.polygonPath&&r.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.polygonPath.coordinates,f=>(e.openBlock(),e.createElementBlock("text",{x:f.x,y:f.y+r.circleRadius*2,fill:a.color,"font-size":r.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(r.name),9,De))),256)),r.nodes&&r.nodes.length>0?(e.openBlock(),e.createBlock(s,{key:0,dataset:r.nodes,color:a.color,hoveredUid:a.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},ze=["id"],_e={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},He={key:2,style:"width:100%;background:transparent;"},Me=["xmlns","viewBox"],qe=["width","height"],Ge=["id"],je=["stop-color"],We=["stop-color"],Xe={key:5,class:"vue-data-ui-watermark"},Ye={key:7,ref:"source",dir:"auto"},Ze=["innerHTML"],Je={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectNode"],setup(a,{expose:$,emit:P}){const{vue_ui_molecule:y}=v.useConfig(),d=a,g=P,s=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{r()});function r(){v.objectIsEmpty(d.dataset)&&v.error({componentName:"VueUiMolecule",type:"dataset"})}const f=e.ref(v.createUid()),V=e.ref(null),i=e.ref(!1),k=e.ref(""),E=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}=Se.useChartAccessibility({config:t.value.style.chart.title});function q(){const o=ae.useNestedProp({userConfig:d.config,defaultConfig:y});return o.theme?{...ae.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,r(),z.value+=1,_.value+=1,m.value.showTable=t.value.table.show,m.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:G,isImaging:j,generatePdf:W,generateImage:X}=ne.usePrinter({elementId:`cluster_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-molecule",options:t.value.userOptions.print}),se=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ie=e.computed(()=>v.convertCustomPalette(t.value.customPalette)),m=e.ref({showTable:t.value.table.show,showDataLabels:!0,showTooltip:t.value.style.chart.tooltip.show});function Y(o,n=0){return Array.isArray(o)&&o.length>0&&o[0].nodes?Y(o[0].nodes,n+1):n}function ue(){const o=Y(d.dataset);let n=100,l=n;for(let c=0;c<o;c+=1)n/=1,l+=n;return{height:l,width:l}}const p=e.ref(ue());e.ref(`0 0 ${p.value.width} ${p.value.height}`);function Z(o,n={x:-p.value.width/2.43,y:p.value.height/2},l=p.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:n,radius:l,sides:o.length,rotation:u});return o.forEach((C,oe)=>{const le=be.coordinates[oe],re=C.color?(()=>{let I=v.convertColorToHex(C.color);return I.startsWith("#")?I:`#${I}`})():null;let T;re?T=re:D===0?T=b:D===1?(T=ie.value[h]||v.palette[h]||b,h+=1):T=b,C.polygonPath={coordinates:[le]},C.circleRadius=c,C.color=T,C.uid=v.createUid(),Array.isArray(C.nodes)&&C.nodes.length&&(C.nodes=Z(C.nodes,le,l/2.9,c/2.2,u+Math.PI*oe/C.nodes.length,h,T,D+1))}),o}function ce(o){const n=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}`),n.add(b),Array.isArray(h.nodes)&&h.nodes.length&&l(h.nodes)})}l(o);const c={};return Array.from(n).forEach(u=>{const h=u.slice(1);c[u]=`gradient_${h}`}),c}const de=e.computed(()=>ce(B.value)),B=e.computed(()=>{const o=v.deepClone(d.dataset);return Z(o)}),L=e.ref(null);function ve(o){L.value={datapoint:o,seriesIndex:-1,series:B.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(v.isFunction(n)&&v.functionReturnsString(()=>n({seriesIndex:-1,datapoint:o,series:B.value,config:t.value})))k.value=n({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>`),k.value=`<div style="font-family:inherit">${l}</div>`}}const J=e.ref(null),F=e.ref(null);function he(o){J.value=o,o?(i.value=!0,ve(o),F.value=o.uid):(i.value=!1,k.value="",F.value=null)}function fe(o){const n=[];function l(c){c.forEach(u=>{const h={name:u.name,details:u.details||"-",ancestor:u.ancestor&&u.ancestor.name||"-",color:u.color||""};n.push(h),u.nodes&&u.nodes.length>0&&l(u.nodes,u.name)})}return l(o),n}const pe=e.computed(()=>fe(B.value)),N=e.computed(()=>{const o=[t.value.table.translations.nodeName,t.value.table.translations.details,t.value.table.translations.ancestor],n=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:n,config:l,colNames:c}});function K(){e.nextTick(()=>{const o=N.value.body.map((c,u)=>[[c[0].name],[c[1]],[c[2]]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(o),l=v.createCsvContent(n);v.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-molecule"})})}function me(){return B.value}const S=e.ref(!1);function ge(o){S.value=o,w.value+=1}function Q(){m.value.showTable=!m.value.showTable}function ee(){m.value.showDataLabels=!m.value.showDataLabels}function te(){m.value.showTooltip=!m.value.showTooltip}const x=e.ref(!1);function U(){x.value=!x.value}const ye=e.computed(()=>!x.value),{viewBox:R}=xe.usePanZoom(A,{x:0,y:0,width:p.value.width<=0?10:p.value.width,height:p.value.height<=0?10:p.value.height},t.value.style.chart.zoom.speed,ye);function ke(o){g("selectNode",o)}return $({getData:me,generatePdf:W,generateCsv:K,generateImage:X,toggleTable:Q,toggleLabels:ee,toggleTooltip:te,toggleAnnotator:U}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"moleculeChart",ref:E,class:e.normalizeClass(`vue-ui-molecule ${S.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:n[1]||(n[1]=l=>{J.value=null,F.value=null,e.unref(H)(!1)}),onMouseenter:n[2]||(n[2]=()=>e.unref(H)(!0))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Te.PenAndPaper,{key:0,svgRef:e.unref(A),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:x.value,onClose:U},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",_e,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",He,[(e.openBlock(),e.createBlock(Ce._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(ne.UserOptions,{ref_key:"details",ref:V,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:m.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:E.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:x.value,onToggleFullscreen:ge,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(R).x} ${e.unref(R).y} ${e.unref(R).width} ${e.unref(R).height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ne._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:p.value.width<=0?10:p.value.width,height:p.value.height<=0?10:p.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,qe)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(de.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,je),e.createElementVNode("stop",{offset:"100%","stop-color":l},null,8,We)],8,Ge))),256))]),e.createVNode(Ue,{dataset:B.value,color:t.value.style.chart.links.stroke,backgroundColor:t.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Oe,{dataset:B.value,hoveredUid:F.value,stroke:t.value.style.chart.nodes.stroke,strokeHovered:t.value.style.chart.nodes.strokeHovered,onClick:ke,onHover:he},{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"]),m.value.showDataLabels?(e.openBlock(),e.createBlock(Ie,{key:1,dataset:B.value,color:t.value.style.chart.color,hoveredUid:F.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:p.value},void 0,!0)],14,Me)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Xe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(G)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.default,{key:6,config:{type:"molecule",style:{backgroundColor:t.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),o.$slots.source?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(we._sfc_main,{show:m.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:E.value,content:k.value,isFullscreen:S.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(Pe.default,{key:8,hideDetails:"",config:{open:m.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(Be.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:n[0]||(n[0]=l=>m.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ze)]),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,ze))}},Ke=Ee._export_sfc(Je,[["__scopeId","data-v-d296dc0b"]]);exports.default=Ke;
@@ -1,3 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),k=require("./index-BVYLM95-.cjs"),U=require("./html2canvas.esm-BA_v9SIU.cjs"),q={__name:"vue-ui-screenshot",props:{config:{type:Object,default(){return{}}}},emits:["postImage"],setup(z,{expose:T,emit:H}){const{vue_ui_screenshot:C}=k.useConfig(),B=z,$=i.ref(`vue-ui-screenshot-${Math.random()}`),n=i.computed(()=>{if(!Object.keys(B.config||{}).length)return C;const e=k.treeShake({defaultConfig:C,userConfig:B.config});return k.convertConfigColors(e)}),a=i.ref(null),d=i.ref(null),v=i.ref(null),M=i.ref(null),S=i.ref(null),y=i.ref(null),h=i.ref(null),p=i.ref(null),m=i.ref(null),b=i.ref(null),x=i.ref(null),w=i.ref(!1),I=i.ref(null);function R(){const e=document.createElement("DIV"),{innerWidth:t,innerHeight:l}=window;return e.style.position="fixed",e.style.top=`${l?l/2-n.value.style.captureArea.initialHeight/2:200}px`,e.style.left=`${t?t/2-n.value.style.captureArea.initialWidth/2:100}px`,e.style.width=`${n.value.style.captureArea.initialWidth}px`,e.style.height=`${n.value.style.captureArea.initialHeight}px`,e.style.background=n.value.style.captureArea.background,e.style.cursor="move",e.style.boxSizing="border-box",e.style.border=n.value.style.captureArea.border,e.style.resize="both",e.style.padding="none !important",e.style.margin="none !important",e.dataset.cy="screenshot-overlay",e}function E(){a.value&&(clearTimeout(I.value),a.value.remove(),a.value=null)}function W(e){const t=document.createElement("DIV");t.classList.add("vue-ui-screenshot-info-text"),t.innerHTML=n.value.translations.info,t.dataset.html2canvasIgnore="true",t.dataset.cy="screenshot-info-text",t.style.background=n.value.style.info.background,t.style.color=n.value.style.info.color,t.style.fontWeight=n.value.style.info.bold?"bold":"normal",t.style.minWidth=`${n.value.style.info.minWidth}px`,t.style.left="50%",t.style.padding=`${n.value.style.info.padding}px`,t.style.position="absolute",t.style.textAlign="center",t.style.top=`${n.value.style.info.top}px`,t.style.transform="translateX(-50%)",t.style.borderRadius=`${n.value.style.info.borderRadius}px`,t.style.boxShadow=n.value.style.info.boxShadow,t.style.fontFamily=n.value.style.info.fontFamily,t.style.fontSize=`${n.value.style.info.fontSize}px`,t.style.border=n.value.style.info.border,t.style.userSelect="none";const l=document.createElement("BUTTON");l.classList.add("vue-ui-screenshot-close-button"),l.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg>',l.style.outline="none",l.dataset.cy="screenshot-close-button",l.style.display="flex",l.style.cursor="pointer",l.style.borderRadius="50%",l.style.alignItems="center",l.style.position="absolute",l.style.justifyContent="center",l.style.transformOrigin="center",l.style.top=`${n.value.style.cancelButton.top}px`,l.style.right=`${n.value.style.cancelButton.right}px`,l.style.background=n.value.style.cancelButton.background,l.style.color=n.value.style.cancelButton.color,l.style.border=n.value.style.cancelButton.border,l.style.borderRadius=`${n.value.style.cancelButton.borderRadius}px`,l.style.height=`${n.value.style.cancelButton.size}px`,l.style.width=`${n.value.style.cancelButton.size}px`,l.addEventListener("click",E),t.appendChild(l),e.appendChild(t)}function X(e){a.value&&(w.value=!0,e.touches?(y.value=e.touches[0].clientX,h.value=e.touches[0].clientY):(y.value=e.clientX,h.value=e.clientY),b.value=a.value.getBoundingClientRect().width,x.value=a.value.getBoundingClientRect().height,e.target.addEventListener("mousemove",L),e.target.addEventListener("touchmove",L))}function L(e){if(!a.value)return;let t,l;e.touches?(p.value=e.touches[0].clientX,t=e.touches[0].clientX,m.value=e.touches[0].clientY,l=e.touches[0].clientY):(p.value=e.clientX,t=e.clientX,m.value=e.clientY,l=e.clientY);const u=e.target.classList[0],o=a.value.style;switch(!0){case u==="vue-ui-screenshot-handle-nw":o.top=`${l}px`,o.left=`${t}px`,o.width=`${b.value+(y.value-p.value)}px`,o.height=`${x.value+(h.value-m.value)}px`;break;case u==="vue-ui-screenshot-handle-ne":o.top=`${l}px`,o.width=`${b.value+(p.value-y.value)}px`,o.height=`${x.value+(h.value-m.value)}px`;break;case u==="vue-ui-screenshot-handle-sw":o.left=`${t}px`,o.width=`${b.value+(y.value-p.value)}px`,o.height=`${x.value+(m.value-h.value)}px`;break;case u==="vue-ui-screenshot-handle-se":o.width=`${b.value+(p.value-y.value)}px`,o.height=`${x.value+(m.value-h.value)}px`;break}}function A(e){if(!a.value)return;e.stopPropagation();const t=Array.from(e.target.classList);t.includes("vue-ui-screenshot-handle-se")||t.includes("vue-ui-screenshot-handle-sw")||t.includes("vue-ui-screenshot-handle-nw")||t.includes("vue-ui-screenshot-handle-ne")||(w.value=!0,a.value.style.pointerEvents="auto",e.touches?(d.value=e.touches[0].clientX,v.value=e.touches[0].clientY):(d.value=e.clientX,v.value=e.clientY),M.value=d.value,S.value=v.value,document.addEventListener("mousemove",g),document.addEventListener("touchmove",g),document.addEventListener("mouseup",f),document.addEventListener("touchend",f))}function f(){d.value=null,v.value=null,M.value=null,S.value=null,w.value=!1,document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",f),document.removeEventListener("touchmove",g),document.removeEventListener("touchend",f)}function g(e){if(!a.value)return;const t=a.value.getBoundingClientRect();let l,u;e.touches?(l=e.touches[0].clientX-d.value,u=e.touches[0].clientY-v.value,d.value=e.touches[0].clientX,v.value=e.touches[0].clientY):(l=e.clientX-d.value,u=e.clientY-v.value,d.value=e.clientX,v.value=e.clientY),a.value.style.top=`${t.top+u}px`,a.value.style.left=`${t.left+l}px`}function Y(e){e.target.removeEventListener("mousemove",L),e.target.removeEventListener("touchmove",L),document.removeEventListener("mousemove",g),document.removeEventListener("touchmove",g),document.removeEventListener("mouseup",f),document.removeEventListener("touchend",f),w.value=!1}function D(){const e=navigator.userAgent;return/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(e)?"tablet":/Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(e)?"mobile":"desktop"}const O=H;function _(){const e=document.getElementById(`vue-ui-screenshot-button-${$.value}`);e.innerHTML=`<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
2
- <path fill="none" stroke="currentColor" d="M1 4 1 3C1 2 2 1 3 1L4 1M16 1 17 1C18 1 19 2 19 3L19 4M1 16 1 17C1 18 2 19 3 19L4 19M16 19 17 19C18 19 19 18 19 17L19 16M8 10A1 1 0 0012 10 1 1 0 008 10M5 13 5 8C5 7 5 7 6 7L14 7C15 7 15 7 15 8L15 13C15 14 15 14 14 14L6 14C5 14 5 14 5 13M7 6 13 6" />
3
- </svg>`,document.getElementById(`vue-ui-screenshot-button-${$.value}`).animate([{opacity:"0.3"},{opacity:"1"},{opacity:"0.3"}],{duration:1e3,iterations:1/0}),e.classList.add("loading"),e.setAttribute("disabled","true")}function F(){if(!a.value)return;_();const e=a.value.getBoundingClientRect();I.value=setTimeout(()=>{U.default(document.body,{allowTaint:!0,width:e.width,height:e.height,x:e.left+window.scrollX,y:e.top+window.scrollY,useCORS:!0,scale:n.value.quality}).then(t=>{const l=t.toDataURL("image/png",1),u=l.split(",")[1],c=atob(u).length/1024;if(n.value.mode==="download"){const s=document.createElement("a");s.download="screenshot.png",s.href=l,s.click()}n.value.mode==="post"&&O("postImage",{createdAt:Date.now(),fileSize:`${c.toFixed(2)} KB`,image:l,x:e.left+window.scrollX,y:e.top+window.scrollY,screenWidth:window.innerWidth>0?window.innerWidth:screen.width,deviceType:D()})}).finally(E)},10)}function j(e){const t=n.value.style.handles.size/2+4,l=document.createElement("DIV");l.style.top=`${-t}px`,l.style.left=`${-t}px`,l.style.cursor="nw-resize",l.classList.add("vue-ui-screenshot-handle-nw"),l.dataset.cy="screenshot-handle-nw";const u=document.createElement("DIV");u.style.top=`${-t}px`,u.style.left="auto",u.style.right=`${-t}px`,u.style.cursor="ne-resize",u.classList.add("vue-ui-screenshot-handle-ne"),u.dataset.cy="screenshot-handle-ne";const o=document.createElement("DIV");o.style.top="auto",o.style.bottom=`${-t}px`,o.style.left=`${-t}px`,o.style.cursor="sw-resize",o.classList.add("vue-ui-screenshot-handle-sw"),o.dataset.cy="screenshot-handle-sw";const c=document.createElement("DIV");c.style.top="auto",c.style.left="auto",c.style.right=`${-t}px`,c.style.bottom=`${-t}px`,c.style.cursor="se-resize",c.classList.add("vue-ui-screenshot-handle-se"),c.dataset.cy="screenshot-handle-se";const s=document.createElement("BUTTON");s.innerHTML=`<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path fill="none" stroke="currentColor" d="M1 4 1 3C1 2 2 1 3 1L4 1M16 1 17 1C18 1 19 2 19 3L19 4M1 16 1 17C1 18 2 19 3 19L4 19M16 19 17 19C18 19 19 18 19 17L19 16M8 10A1 1 0 0012 10 1 1 0 008 10M5 13 5 8C5 7 5 7 6 7L14 7C15 7 15 7 15 8L15 13C15 14 15 14 14 14L6 14C5 14 5 14 5 13M7 6 13 6" /></svg><span>${n.value.translations.captureButton}</span>`,s.classList.add("vue-ui-screenshot-capture-button"),s.id=`vue-ui-screenshot-button-${$.value}`,s.style.position="absolute",s.style.top="50%",s.style.left="50%",s.style.transform="translate(-50%,-50%)",s.style.background=n.value.style.captureButton.background,s.style.color=n.value.style.captureButton.color,s.style.border=n.value.style.captureButton.border,s.style.outline="none",s.style.cursor="pointer",s.style.padding=n.value.style.captureButton.padding,s.style.fontFamily=n.value.style.captureButton.fontFamily,s.style.fontSize=`${n.value.style.captureButton.fontSize}px`,s.style.minHeight=`${n.value.style.captureButton.minHeight}px`,s.style.width="fit-content",s.style.display="flex",s.style.alignItems="center",s.style.justifyContent="center",s.style.gap="3px",s.style.borderRadius=`${n.value.style.captureButton.borderRadius}px`,s.style.boxShadow=n.value.style.captureButton.boxShadow,s.style.userSelect="none",s.style.opacity="0.95",s.style.textAlign="left",s.style.fontWeight=n.value.style.captureButton.bold?"bold":"normal",s.dataset.cy="screenshot-save-button",s.addEventListener("mouseenter",()=>{s.style.opacity="1"}),s.addEventListener("mouseleave",()=>{s.style.opacity="0.95"}),s.addEventListener("click",F),e.appendChild(s),[l,u,o,c].forEach((r,V)=>{r.classList.add(`handle-${V}`),r.dataset.html2canvasIgnore="true",r.style.position="absolute",r.style.height=`${n.value.style.handles.size}px`,r.style.width=`${n.value.style.handles.size}px`,r.style.background=n.value.style.handles.background,r.style.border=n.value.style.handles.border,r.style.borderRadius=`${n.value.style.handles.borderRadius}px`,r.style.pointerEvents="auto !important",r.addEventListener("mousedown",X),r.addEventListener("touchstart",X),e.appendChild(r)})}function N(){a.value||i.nextTick(()=>{const e=R();e.dataset.html2canvasIgnore=!0,W(e),j(e),a.value=e,e.addEventListener("touchmove",function(t){t.preventDefault()},{passive:!1}),document.body.appendChild(e),document.addEventListener("mousedown",A),document.addEventListener("touchstart",A),document.addEventListener("mouseup",Y),document.addEventListener("touchend",Y)})}return T({shoot:N,close:E}),(e,t)=>(i.openBlock(),i.createElementBlock("div"))}};exports.default=q;
@@ -1,161 +0,0 @@
1
- import { ref as i, computed as V, createElementBlock as U, openBlock as G, nextTick as K } from "vue";
2
- import { u as P, A as q, z as J } from "./index-BdAppyf2.js";
3
- import Q from "./html2canvas.esm-DgdJBc_o.js";
4
- const ne = {
5
- __name: "vue-ui-screenshot",
6
- props: {
7
- config: {
8
- type: Object,
9
- default() {
10
- return {};
11
- }
12
- }
13
- },
14
- emits: ["postImage"],
15
- setup(z, { expose: Y, emit: H }) {
16
- const { vue_ui_screenshot: k } = P(), C = z, $ = i(`vue-ui-screenshot-${Math.random()}`), n = V(() => {
17
- if (!Object.keys(C.config || {}).length)
18
- return k;
19
- const e = q({
20
- defaultConfig: k,
21
- userConfig: C.config
22
- });
23
- return J(e);
24
- }), a = i(null), d = i(null), v = i(null), B = i(null), M = i(null), y = i(null), h = i(null), p = i(null), m = i(null), b = i(null), x = i(null), w = i(!1), S = i(null);
25
- function T() {
26
- const e = document.createElement("DIV"), { innerWidth: t, innerHeight: l } = window;
27
- return e.style.position = "fixed", e.style.top = `${l ? l / 2 - n.value.style.captureArea.initialHeight / 2 : 200}px`, e.style.left = `${t ? t / 2 - n.value.style.captureArea.initialWidth / 2 : 100}px`, e.style.width = `${n.value.style.captureArea.initialWidth}px`, e.style.height = `${n.value.style.captureArea.initialHeight}px`, e.style.background = n.value.style.captureArea.background, e.style.cursor = "move", e.style.boxSizing = "border-box", e.style.border = n.value.style.captureArea.border, e.style.resize = "both", e.style.padding = "none !important", e.style.margin = "none !important", e.dataset.cy = "screenshot-overlay", e;
28
- }
29
- function E() {
30
- a.value && (clearTimeout(S.value), a.value.remove(), a.value = null);
31
- }
32
- function R(e) {
33
- const t = document.createElement("DIV");
34
- t.classList.add("vue-ui-screenshot-info-text"), t.innerHTML = n.value.translations.info, t.dataset.html2canvasIgnore = "true", t.dataset.cy = "screenshot-info-text", t.style.background = n.value.style.info.background, t.style.color = n.value.style.info.color, t.style.fontWeight = n.value.style.info.bold ? "bold" : "normal", t.style.minWidth = `${n.value.style.info.minWidth}px`, t.style.left = "50%", t.style.padding = `${n.value.style.info.padding}px`, t.style.position = "absolute", t.style.textAlign = "center", t.style.top = `${n.value.style.info.top}px`, t.style.transform = "translateX(-50%)", t.style.borderRadius = `${n.value.style.info.borderRadius}px`, t.style.boxShadow = n.value.style.info.boxShadow, t.style.fontFamily = n.value.style.info.fontFamily, t.style.fontSize = `${n.value.style.info.fontSize}px`, t.style.border = n.value.style.info.border, t.style.userSelect = "none";
35
- const l = document.createElement("BUTTON");
36
- l.classList.add("vue-ui-screenshot-close-button"), l.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg>', l.style.outline = "none", l.dataset.cy = "screenshot-close-button", l.style.display = "flex", l.style.cursor = "pointer", l.style.borderRadius = "50%", l.style.alignItems = "center", l.style.position = "absolute", l.style.justifyContent = "center", l.style.transformOrigin = "center", l.style.top = `${n.value.style.cancelButton.top}px`, l.style.right = `${n.value.style.cancelButton.right}px`, l.style.background = n.value.style.cancelButton.background, l.style.color = n.value.style.cancelButton.color, l.style.border = n.value.style.cancelButton.border, l.style.borderRadius = `${n.value.style.cancelButton.borderRadius}px`, l.style.height = `${n.value.style.cancelButton.size}px`, l.style.width = `${n.value.style.cancelButton.size}px`, l.addEventListener("click", E), t.appendChild(l), e.appendChild(t);
37
- }
38
- function I(e) {
39
- a.value && (w.value = !0, e.touches ? (y.value = e.touches[0].clientX, h.value = e.touches[0].clientY) : (y.value = e.clientX, h.value = e.clientY), b.value = a.value.getBoundingClientRect().width, x.value = a.value.getBoundingClientRect().height, e.target.addEventListener("mousemove", L), e.target.addEventListener("touchmove", L));
40
- }
41
- function L(e) {
42
- if (!a.value) return;
43
- let t, l;
44
- e.touches ? (p.value = e.touches[0].clientX, t = e.touches[0].clientX, m.value = e.touches[0].clientY, l = e.touches[0].clientY) : (p.value = e.clientX, t = e.clientX, m.value = e.clientY, l = e.clientY);
45
- const u = e.target.classList[0], s = a.value.style;
46
- switch (!0) {
47
- case u === "vue-ui-screenshot-handle-nw":
48
- s.top = `${l}px`, s.left = `${t}px`, s.width = `${b.value + (y.value - p.value)}px`, s.height = `${x.value + (h.value - m.value)}px`;
49
- break;
50
- case u === "vue-ui-screenshot-handle-ne":
51
- s.top = `${l}px`, s.width = `${b.value + (p.value - y.value)}px`, s.height = `${x.value + (h.value - m.value)}px`;
52
- break;
53
- case u === "vue-ui-screenshot-handle-sw":
54
- s.left = `${t}px`, s.width = `${b.value + (y.value - p.value)}px`, s.height = `${x.value + (m.value - h.value)}px`;
55
- break;
56
- case u === "vue-ui-screenshot-handle-se":
57
- s.width = `${b.value + (p.value - y.value)}px`, s.height = `${x.value + (m.value - h.value)}px`;
58
- break;
59
- }
60
- }
61
- function A(e) {
62
- if (!a.value) return;
63
- e.stopPropagation();
64
- const t = Array.from(e.target.classList);
65
- t.includes("vue-ui-screenshot-handle-se") || t.includes("vue-ui-screenshot-handle-sw") || t.includes("vue-ui-screenshot-handle-nw") || t.includes("vue-ui-screenshot-handle-ne") || (w.value = !0, a.value.style.pointerEvents = "auto", e.touches ? (d.value = e.touches[0].clientX, v.value = e.touches[0].clientY) : (d.value = e.clientX, v.value = e.clientY), B.value = d.value, M.value = v.value, document.addEventListener("mousemove", g), document.addEventListener("touchmove", g), document.addEventListener("mouseup", f), document.addEventListener("touchend", f));
66
- }
67
- function f() {
68
- d.value = null, v.value = null, B.value = null, M.value = null, w.value = !1, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", f), document.removeEventListener("touchmove", g), document.removeEventListener("touchend", f);
69
- }
70
- function g(e) {
71
- if (!a.value) return;
72
- const t = a.value.getBoundingClientRect();
73
- let l, u;
74
- e.touches ? (l = e.touches[0].clientX - d.value, u = e.touches[0].clientY - v.value, d.value = e.touches[0].clientX, v.value = e.touches[0].clientY) : (l = e.clientX - d.value, u = e.clientY - v.value, d.value = e.clientX, v.value = e.clientY), a.value.style.top = `${t.top + u}px`, a.value.style.left = `${t.left + l}px`;
75
- }
76
- function X(e) {
77
- e.target.removeEventListener("mousemove", L), e.target.removeEventListener("touchmove", L), document.removeEventListener("mousemove", g), document.removeEventListener("touchmove", g), document.removeEventListener("mouseup", f), document.removeEventListener("touchend", f), w.value = !1;
78
- }
79
- function W() {
80
- const e = navigator.userAgent;
81
- return /(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(e) ? "tablet" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(
82
- e
83
- ) ? "mobile" : "desktop";
84
- }
85
- const D = H;
86
- function O() {
87
- const e = document.getElementById(`vue-ui-screenshot-button-${$.value}`);
88
- e.innerHTML = `<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
89
- <path fill="none" stroke="currentColor" d="M1 4 1 3C1 2 2 1 3 1L4 1M16 1 17 1C18 1 19 2 19 3L19 4M1 16 1 17C1 18 2 19 3 19L4 19M16 19 17 19C18 19 19 18 19 17L19 16M8 10A1 1 0 0012 10 1 1 0 008 10M5 13 5 8C5 7 5 7 6 7L14 7C15 7 15 7 15 8L15 13C15 14 15 14 14 14L6 14C5 14 5 14 5 13M7 6 13 6" />
90
- </svg>`, document.getElementById(`vue-ui-screenshot-button-${$.value}`).animate([
91
- { opacity: "0.3" },
92
- { opacity: "1" },
93
- { opacity: "0.3" }
94
- ], { duration: 1e3, iterations: 1 / 0 }), e.classList.add("loading"), e.setAttribute("disabled", "true");
95
- }
96
- function _() {
97
- if (!a.value) return;
98
- O();
99
- const e = a.value.getBoundingClientRect();
100
- S.value = setTimeout(() => {
101
- Q(document.body, {
102
- allowTaint: !0,
103
- width: e.width,
104
- height: e.height,
105
- x: e.left + window.scrollX,
106
- y: e.top + window.scrollY,
107
- useCORS: !0,
108
- scale: n.value.quality
109
- }).then((t) => {
110
- const l = t.toDataURL("image/png", 1), u = l.split(",")[1], c = atob(u).length / 1024;
111
- if (n.value.mode === "download") {
112
- const o = document.createElement("a");
113
- o.download = "screenshot.png", o.href = l, o.click();
114
- }
115
- n.value.mode === "post" && D("postImage", {
116
- createdAt: Date.now(),
117
- fileSize: `${c.toFixed(2)} KB`,
118
- image: l,
119
- x: e.left + window.scrollX,
120
- y: e.top + window.scrollY,
121
- screenWidth: window.innerWidth > 0 ? window.innerWidth : screen.width,
122
- deviceType: W()
123
- });
124
- }).finally(E);
125
- }, 10);
126
- }
127
- function F(e) {
128
- const t = n.value.style.handles.size / 2 + 4, l = document.createElement("DIV");
129
- l.style.top = `${-t}px`, l.style.left = `${-t}px`, l.style.cursor = "nw-resize", l.classList.add("vue-ui-screenshot-handle-nw"), l.dataset.cy = "screenshot-handle-nw";
130
- const u = document.createElement("DIV");
131
- u.style.top = `${-t}px`, u.style.left = "auto", u.style.right = `${-t}px`, u.style.cursor = "ne-resize", u.classList.add("vue-ui-screenshot-handle-ne"), u.dataset.cy = "screenshot-handle-ne";
132
- const s = document.createElement("DIV");
133
- s.style.top = "auto", s.style.bottom = `${-t}px`, s.style.left = `${-t}px`, s.style.cursor = "sw-resize", s.classList.add("vue-ui-screenshot-handle-sw"), s.dataset.cy = "screenshot-handle-sw";
134
- const c = document.createElement("DIV");
135
- c.style.top = "auto", c.style.left = "auto", c.style.right = `${-t}px`, c.style.bottom = `${-t}px`, c.style.cursor = "se-resize", c.classList.add("vue-ui-screenshot-handle-se"), c.dataset.cy = "screenshot-handle-se";
136
- const o = document.createElement("BUTTON");
137
- o.innerHTML = `<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path fill="none" stroke="currentColor" d="M1 4 1 3C1 2 2 1 3 1L4 1M16 1 17 1C18 1 19 2 19 3L19 4M1 16 1 17C1 18 2 19 3 19L4 19M16 19 17 19C18 19 19 18 19 17L19 16M8 10A1 1 0 0012 10 1 1 0 008 10M5 13 5 8C5 7 5 7 6 7L14 7C15 7 15 7 15 8L15 13C15 14 15 14 14 14L6 14C5 14 5 14 5 13M7 6 13 6" /></svg><span>${n.value.translations.captureButton}</span>`, o.classList.add("vue-ui-screenshot-capture-button"), o.id = `vue-ui-screenshot-button-${$.value}`, o.style.position = "absolute", o.style.top = "50%", o.style.left = "50%", o.style.transform = "translate(-50%,-50%)", o.style.background = n.value.style.captureButton.background, o.style.color = n.value.style.captureButton.color, o.style.border = n.value.style.captureButton.border, o.style.outline = "none", o.style.cursor = "pointer", o.style.padding = n.value.style.captureButton.padding, o.style.fontFamily = n.value.style.captureButton.fontFamily, o.style.fontSize = `${n.value.style.captureButton.fontSize}px`, o.style.minHeight = `${n.value.style.captureButton.minHeight}px`, o.style.width = "fit-content", o.style.display = "flex", o.style.alignItems = "center", o.style.justifyContent = "center", o.style.gap = "3px", o.style.borderRadius = `${n.value.style.captureButton.borderRadius}px`, o.style.boxShadow = n.value.style.captureButton.boxShadow, o.style.userSelect = "none", o.style.opacity = "0.95", o.style.textAlign = "left", o.style.fontWeight = n.value.style.captureButton.bold ? "bold" : "normal", o.dataset.cy = "screenshot-save-button", o.addEventListener("mouseenter", () => {
138
- o.style.opacity = "1";
139
- }), o.addEventListener("mouseleave", () => {
140
- o.style.opacity = "0.95";
141
- }), o.addEventListener("click", _), e.appendChild(o), [l, u, s, c].forEach((r, N) => {
142
- r.classList.add(`handle-${N}`), r.dataset.html2canvasIgnore = "true", r.style.position = "absolute", r.style.height = `${n.value.style.handles.size}px`, r.style.width = `${n.value.style.handles.size}px`, r.style.background = n.value.style.handles.background, r.style.border = n.value.style.handles.border, r.style.borderRadius = `${n.value.style.handles.borderRadius}px`, r.style.pointerEvents = "auto !important", r.addEventListener("mousedown", I), r.addEventListener("touchstart", I), e.appendChild(r);
143
- });
144
- }
145
- function j() {
146
- a.value || K(() => {
147
- const e = T();
148
- e.dataset.html2canvasIgnore = !0, R(e), F(e), a.value = e, e.addEventListener("touchmove", function(t) {
149
- t.preventDefault();
150
- }, { passive: !1 }), document.body.appendChild(e), document.addEventListener("mousedown", A), document.addEventListener("touchstart", A), document.addEventListener("mouseup", X), document.addEventListener("touchend", X);
151
- });
152
- }
153
- return Y({
154
- shoot: j,
155
- close: E
156
- }), (e, t) => (G(), U("div"));
157
- }
158
- };
159
- export {
160
- ne as default
161
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BVYLM95-.cjs"),Me=require("./Title-cjYd6IYr.cjs"),Se=require("./usePrinter-CkJDEgjQ.cjs"),He=require("./Tooltip-YBqthQ_8.cjs"),Ue=require("./Legend-CjiKxR8b.cjs"),We=require("./vue-ui-skeleton-CIPY7Xfo.cjs"),Ge=require("./DataTable-DtXoZKgy.cjs"),je=require("./vue-ui-accordion-Btv7fZHc.cjs"),Be=require("./useResponsive-DQmBAoBf.cjs"),Ne=require("./useNestedProp-B3UWJnDQ.cjs"),Xe=require("./PackageVersion-yiiAD1cf.cjs"),Ye=require("./PenAndPaper-Btnlb4RH.cjs"),Ke=require("./useUserOptionState-BgepsfED.cjs"),Ze=require("./useChartAccessibility-Cm7nkzTG.cjs"),Je=require("./BaseIcon-BeRHKYU4.cjs"),Qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function Oe(r,c){const i=r.length;if(i===0)throw new Error(`Max aspect ratio cannot be computed: ${r} is an empty array`);{let d=1/0,u=-1/0,v=0;for(let f=0;f<i;f+=1){const m=r[f].normalizedValue;m<d&&(d=m),m>u&&(u=m),v+=m}return Math.max(c**2*u/v**2,v**2/(c**2*d))}}function _e(r){const{xOffset:c,yOffset:i,width:d,height:u}=r;return{x0:c,y0:i,x1:c+d,y1:i+u}}function et(r,c,i){if(r.length===0)return!0;{const d=r.concat(c),u=Oe(r,i),v=Oe(d,i);return u>=v}}function tt(r){const c=[],i=r.length;for(let d=0;d<i;d+=1){const u=r[d],v=u.length;for(let h=0;h<v;h+=1)c.push(u[h])}return c}function ot(r,c){const i={...c,children:r};return ze(i)}function lt(r){return(r.x1-r.x0)*(r.y1-r.y0)}function Pe(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=Q(c),h=r.length,f=r.map(y=>y.normalizedValue||0).reduce((y,g)=>y+g,0),m=f/d,x=f/i;let C=u,$=v;const b=[];if(i>=d){for(let y=0;y<h;y+=1){const g=r[y],k=$+g.normalizedValue/m,O={x0:C,y0:$,x1:C+m,y1:k},T=Object.assign({},g,O);$=k,b.push(T)}return b}else{for(let y=0;y<h;y+=1){const g=r[y],k=C+g.normalizedValue/x,O={x0:C,y0:$,x1:k,y1:$+x},T=Object.assign({},g,O);C=k,b.push(T)}return b}}function at(r){const c=Q(r),i=c.width,d=c.height;return Math.min(i,d)}function nt(r,c){const i=r.length,d=r.map(m=>m.value??0).reduce((m,x)=>m+x,0),u=c/d,v=[];let h,f;for(let m=0;m<i;m+=1)f=r[m],h=Object.assign({},f,{normalizedValue:f.value*(u||0)}),v.push(h);return v}function Q(r){const{x0:c,y0:i,x1:d,y1:u}=r;return{xOffset:c,yOffset:i,width:d-c,height:u-i}}function rt(r,c,i,d){let u=r,v=c,h=i,f=d;for(;;){const m=u.length;if(m===0){const b=Pe(v,h);return f.concat(b)}const x=at(h),C=u[0],$=u.slice(1,m);if(et(v,C,x)){const b=v.concat(C);u=$,v=b,h=h,f=f}else{const b=v.length;let y=0;for(let T=0;T<b;T+=1)y+=v[T].normalizedValue;const g=st(h,y),k=Pe(v,h),O=f.concat(k);u=u,v=[],h=g,f=O}}}function ze(r){if(typeof r.children>"u"||!r.children.length)return[r];{const c=nt(r.children,lt(r)),i=rt(c,[],r,[]),d=i.length,u=[];for(let h=0;h<d;h+=1)u.push(ze(i[h]));return tt(u)}}function st(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=Q(r);if(i>=d){const h=c/d,f=i-h,m={xOffset:u+h,yOffset:v,width:f,height:d};return _e(m)}else{const h=c/i,f=d-h,m={xOffset:u,yOffset:v+h,width:i,height:f};return _e(m)}}const ut=["id"],it={key:4,class:"vue-ui-treemap-breadcrumbs","data-html2canvas-ignore":""},ct=["tabindex","onClick","onKeydown","data-last-crumb","onMouseenter","onFocus"],dt={class:"vue-ui-treemap-crumb-unit"},vt={class:"vue-ui-treemap-crumb-unit-label"},ht={key:0,style:{width:"24px",display:"flex","align-items":"center"}},pt={key:0,class:"vue-ui-treemap-crumb-unit-arrow"},ft=["xmlns","viewBox"],mt={key:0},gt=["id"],yt=["stop-color"],bt=["stop-color"],kt=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Ct=["x","y","height","width"],wt={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},xt={key:6,class:"vue-data-ui-watermark"},$t=["onClick"],Tt={key:0},St={key:1},Bt=["innerHTML"],Nt={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(r,{expose:c,emit:i}){const{vue_ui_treemap:d}=s.useConfig(),u=r,v=i,h=e.useSlots();e.onMounted(()=>{h["chart-background"]&&console.warn("VueUiTreemap does not support the #chart-background slot.")});const f=e.computed(()=>!!u.dataset&&u.dataset.length),m=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),x=e.ref(s.createUid()),C=e.ref(!1),$=e.ref(""),b=e.ref(!1),y=e.ref(0),g=e.ref([]),k=e.ref(null),O=e.ref(null),T=e.ref(null),ee=e.ref(null),te=e.ref(null),oe=e.ref(0),le=e.ref(0),ae=e.ref(0),o=e.computed({get:()=>ue(),set:t=>t}),{userOptionsVisible:K,setUserOptionsVisibility:ne,keepUserOptionState:re}=Ke.useUserOptionState({config:o.value}),{svgRef:se}=Ze.useChartAccessibility({config:o.value.style.chart.title});function ue(){const t=Ne.useNestedProp({userConfig:u.config,defaultConfig:d});return t.theme?{...Ne.useNestedProp({userConfig:s.themes.vue_ui_treemap[t.theme]||u.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>u.config,t=>{o.value=ue(),K.value=!o.value.userOptions.showOnChartHover,oe.value+=1,le.value+=1,ae.value+=1,S.value.showTable=o.value.table.show,S.value.showTooltip=o.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:ie,isImaging:ce,generatePdf:de,generateImage:ve}=Se.usePrinter({elementId:`treemap_${x.value}`,fileName:o.value.style.chart.title.text||"vue-ui-treemap",options:o.value.userOptions.print}),Ve=e.computed(()=>o.value.userOptions.show&&!o.value.style.chart.title.text),H=e.computed(()=>s.convertCustomPalette(o.value.customPalette)),S=e.ref({showTable:o.value.table.show,showTooltip:o.value.style.chart.tooltip.show}),_=e.ref({height:o.value.style.chart.height,width:o.value.style.chart.width}),F=e.computed(()=>({bottom:_.value.height-o.value.style.chart.padding.bottom,height:_.value.height-o.value.style.chart.padding.top-o.value.style.chart.padding.bottom,left:o.value.style.chart.padding.left,right:_.value.width-o.value.style.chart.padding.right,top:o.value.style.chart.padding.top,vbHeight:_.value.height,vbWidth:_.value.width,width:_.value.width-o.value.style.chart.padding.left-o.value.style.chart.padding.right}));function he(t){t.forEach((a,l)=>{a.id=s.createUid(),a.color=s.convertColorToHex(a.color)||H.value[l]||s.palette[l]||s.palette[l%s.palette.length],a.children&&(a.children.forEach(n=>{n.parentId=a.id,n.color=a.color}),he(a.children))})}const P=e.ref(u.dataset),U=e.ref(null);e.onMounted(()=>{Ee()});function Ee(){if(s.objectIsEmpty(u.dataset)&&s.error({componentName:"VueUiTreemap",type:"dataset"}),he(P.value),o.value.responsive){const t=Be.throttle(()=>{const{width:a,height:l}=Be.useResponsive({chart:k.value,title:o.value.style.chart.title.text?O.value:null,legend:o.value.style.chart.legend.show?T.value:null,source:ee.value,noTitle:te.value});requestAnimationFrame(()=>{_.value.width=a,_.value.height=l})});U.value=new ResizeObserver(t),U.value.observe(k.value.parentNode)}}e.onBeforeUnmount(()=>{U.value&&U.value.disconnect()});const A=e.ref(P.value),q=e.computed(()=>A.value.map((t,a)=>({...t,color:s.convertColorToHex(t.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length]})).filter(t=>!g.value.includes(t.id))),L=e.computed(()=>P.value.filter(t=>!g.value.includes(t.id)).map(t=>t.value||0).reduce((t,a)=>t+a,0)),pe=e.computed({get(){let t=[...q.value];return o.value.style.chart.layout.sorted&&(t=[...q.value].sort((a,l)=>l.value-a.value)),t.map(a=>({...a}))},set(t){return t}});function fe(t,a){return t.value/a}function Fe(t,a,l){const n=o.value.style.chart.layout.rects.colorRatio-fe(a,l);return s.lightenHexColor(t,n<0?0:n)}function me(t,a,l,n){return t.map((p,E)=>{const Y=Fe(s.convertColorToHex(a)||H.value[E]||s.palette[E]||s.palette[E%s.palette.length],p,n),qe=fe(p,n);return{...p,color:Y,proportion:qe,parentName:l,children:p.children?me(p.children,Y,p.name,n):void 0}})}const M=e.computed(()=>ot(pe.value.map((t,a)=>{const l=t.children?t.children.reduce((n,p)=>n+p.value,0):t.value;return{value:t.value,id:t.id,children:t.children?me(t.children.sort((n,p)=>p.value-n.value),t.color,t.name,l):void 0,color:t.color,name:t.name}}),{x0:F.value.left*2,y0:F.value.top,x1:F.value.width,y1:F.value.height}));function ge({y0:t,y1:a}){return a-t<=0?1e-4:a-t}function ye({x0:t,x1:a}){return a-t<=0?1e-4:a-t}function I(t){const a=o.value.style.chart.layout.labels.fontSize*(t.proportion*2>1?1:t.proportion*2);return a<o.value.style.chart.layout.labels.minFontSize?o.value.style.chart.layout.labels.minFontSize:a}function Ie(t){b.value=t,y.value+=1}const D=e.computed(()=>({startX:0,startY:0,width:F.value.vbWidth,height:F.value.vbHeight}));function R(t,a=P.value){for(const l of a){if(l.id===t)return l;if(l.children){const n=R(t,l.children);if(n)return n}}return null}const w=e.ref([]),z=e.computed(()=>w.value.length>0);function W(t){var l;if(!t){A.value=P.value.slice(),v("selectDatapoint",void 0),w.value=[];return}const a=R(t.id);if(a&&((l=a.children)!=null&&l.length))w.value.push(a.id),A.value=a.children.slice(),v("selectDatapoint",t);else if(t.parentId){w.value.push(t.parentId);const n=R(t.parentId);A.value=n.children.slice(),v("selectDatapoint",t)}else if(w.value.length>0){w.value.pop();const n=w.value[w.value.length-1];if(n){const p=R(n);A.value=p.children.slice()}else A.value=P.value.slice(),w.value=[],v("selectDatapoint",void 0)}}function Re(t){var l;const a=R(t.id);return!!((l=a==null?void 0:a.children)!=null&&l.length||t.parentId)}const V=e.computed(()=>{const t=[{id:null,label:"All"}];if(w.value.length>0){let a=R(w.value[w.value.length-1]);const l=[];for(;a;)l.unshift(a),a=a.parentId?R(a.parentId):null;for(const n of l)t.push({id:n.id,label:n.name,node:n})}return t}),B=e.ref(null),be=e.computed(()=>P.value.map((t,a)=>({...t,color:s.convertColorToHex(t.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length],shape:"square"})).sort((t,a)=>a.value-t.value).map((t,a)=>({...t,proportion:t.value/P.value.map(l=>l.value).reduce((l,n)=>l+n,0),opacity:g.value.includes(t.id)?.5:1}))),Ae=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:o.value.style.chart.legend.backgroundColor,color:o.value.style.chart.legend.color,fontSize:o.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:o.value.style.chart.legend.bold?"bold":""}));function ke(t){z.value=!1,B.value=null,g.value.includes(t.id)?g.value=g.value.filter(a=>a!==t.id):g.value.length<u.dataset.length-1&&g.value.push(t.id),v("selectLegend",pe.value)}const Z=e.ref(null);function Le({datapoint:t,seriesIndex:a}){B.value=t,Z.value={datapoint:t,seriesIndex:a,config:o.value,series:q.value};const l=o.value.style.chart.tooltip.customFormat;if(s.isFunction(l)&&s.functionReturnsString(()=>l({seriesIndex:a,datapoint:t,series:q.value,config:o.value})))$.value=l({seriesIndex:a,datapoint:t,series:q.value,config:o.value});else{let n="";n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${o.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`,n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${t.color}"/></svg>`,n+=`<b>${s.applyDataLabel(o.value.style.chart.layout.labels.formatter,t.value,s.dataLabel({p:o.value.style.chart.layout.labels.prefix,v:t.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.tooltip.roundingValue}),{datapoint:t,seriesIndex:a})}</b>`,$.value=`<div>${n}</div>`}C.value=!0}const N=e.computed(()=>{const t=M.value.map(l=>({name:l.name,color:l.color})),a=M.value.map(l=>l.value);return{head:t,body:a}});function Ce(){e.nextTick(()=>{const t=N.value.head.map((n,p)=>[[n.name],[N.value.body[p]],[isNaN(N.value.body[p]/L.value)?"-":N.value.body[p]/L.value*100]]),a=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(t),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:o.value.style.chart.title.text||"vue-ui-treemap"})})}const G=e.computed(()=>{const t=[o.value.table.columnNames.series,o.value.table.columnNames.value,o.value.table.columnNames.percentage],a=N.value.head.map((p,E)=>{const Y=s.applyDataLabel(o.value.style.chart.layout.labels.formatter,N.value.body[E],s.dataLabel({p:o.value.style.chart.layout.labels.prefix,v:N.value.body[E],s:o.value.style.chart.layout.labels.suffix,r:o.value.table.td.roundingValue}));return[{color:p.color,name:p.name,shape:"square"},Y,isNaN(N.value.body[E]/L.value)?"-":s.dataLabel({v:N.value.body[E]/L.value*100,s:"%",r:o.value.table.td.roundingPercentage})]}),l={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint};return{colNames:[o.value.table.columnNames.series,o.value.table.columnNames.value],head:t,body:a,config:l}});function De(){return M.value}function we(){S.value.showTable=!S.value.showTable}function xe(){S.value.showTooltip=!S.value.showTooltip}const j=e.ref(!1);function J(){j.value=!j.value}const X=e.ref(null);function $e(t){X.value=t}function Te(){X.value=null}return c({getData:De,generateCsv:Ce,generateImage:ve,generatePdf:de,toggleTable:we,toggleTooltip:xe,toggleAnnotator:J}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:k,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${o.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; ${o.value.responsive?"height: 100%;":""} text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`treemap_${x.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(ne)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(ne)(!1))},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ye.PenAndPaper,{key:0,svgRef:e.unref(se),backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:j.value,onClose:J},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ve.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:te,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:O,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Me._sfc_main,{key:`title_${oe.value}`,config:{title:{cy:"treemap-div-title",...o.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&f.value&&(e.unref(re)||e.unref(K))?(e.openBlock(),e.createBlock(Se.UserOptions,{ref:"details",key:`user_option_${y.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(ie),isImaging:e.unref(ce),uid:x.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasFullscreen:o.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:S.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:k.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:j.value,onToggleFullscreen:Ie,onGeneratePdf:e.unref(de),onGenerateCsv:Ce,onGenerateImage:e.unref(ve),onToggleTable:we,onToggleTooltip:xe,onToggleAnnotator:J,style:e.normalizeStyle({visibility:e.unref(re)?e.unref(K)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value.length>1?(e.openBlock(),e.createElementBlock("nav",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(l,n)=>(e.openBlock(),e.createElementBlock("span",{role:"button",tabindex:n<V.value.length-1?0:void 0,key:l.id||"root",onClick:p=>n===V.value.length-1?()=>{}:W(l.node),onKeydown:[e.withKeys(e.withModifiers(p=>n===V.value.length-1?void 0:W(l.node),["prevent"]),["enter"]),e.withKeys(e.withModifiers(p=>n===V.value.length-1?void 0:W(l.node),["prevent"]),["space"])],class:"vue-ui-treemap-crumb","data-last-crumb":n===V.value.length-1,style:e.normalizeStyle({color:o.value.style.chart.color}),onMouseenter:p=>$e(n),onMouseleave:Te,onFocus:p=>$e(n),onBlur:Te},[e.createElementVNode("span",dt,[e.createElementVNode("span",vt,[e.renderSlot(t.$slots,"breadcrumb-label",e.mergeProps({ref_for:!0},{crumb:l,isRoot:n===0,isFocus:X.value===n}),()=>[n===0?(e.openBlock(),e.createElementBlock("div",ht,[e.createVNode(Je.default,{name:X.value===0?"homeFilled":"home",stroke:o.value.style.chart.color},null,8,["name","stroke"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.label),1)],64))],!0)]),n<V.value.length-1?(e.openBlock(),e.createElementBlock("span",pt,[e.renderSlot(t.$slots,"breadcrumb-arrow",{},()=>[a[5]||(a[5]=e.createTextVNode(" › "))],!0)])):e.createCommentVNode("",!0)])],44,ct))),128))])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:5,ref_key:"svgRef",ref:se,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!z.value,"vue-data-ui-zoom-minus":z.value}),viewBox:`${D.value.startX} ${D.value.startY} ${D.value.width<=0?10:D.value.width} ${D.value.height<=0?10:D.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${o.value.style.chart.color}`)},[e.createVNode(Xe._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",mt,[e.createElementVNode("radialGradient",{id:`tgrad_${l.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":l.color},null,8,yt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.lightenHexColor)(l.color,o.value.style.chart.layout.rects.gradient.intensity/100)},null,8,bt)],8,gt)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:ge(l),width:ye(l),fill:m.value?l.color:o.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:o.value.style.chart.layout.rects.borderRadius,stroke:B.value&&B.value.id===l.id?o.value.style.chart.layout.rects.selected.stroke:o.value.style.chart.layout.rects.stroke,"stroke-width":B.value&&B.value.id===l.id?o.value.style.chart.layout.rects.selected.strokeWidth:o.value.style.chart.layout.rects.strokeWidth,onClick:e.withModifiers(p=>W(l),["stop"]),onMouseenter:()=>Le({datapoint:l,seriesIndex:n}),onMouseleave:a[0]||(a[0]=p=>{B.value=null,C.value=!1}),style:e.normalizeStyle(`opacity:${B.value?B.value.id===l.id?1:o.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:e.normalizeClass(["vue-ui-treemap-rect",Re(l)?"vue-data-ui-zoom-plus":z.value?"vue-data-ui-zoom-minus":""])},null,46,kt),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:ge(l),width:ye(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",wt,[o.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>o.value.style.chart.layout.labels.hideUnderProportion||z.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${I(l)/1.5}px);text-align:left;line-height:${I(l)<14?14:I(l)}px;padding:${I(l)/3}px; color:${e.unref(s.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${I(l)}px;`)},e.toDisplayString(l.name),5),a[6]||(a[6]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${I(l)}px;`)},e.toDisplayString(e.unref(s.applyDataLabel)(o.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:o.value.style.chart.layout.labels.prefix,v:l.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"rect",e.mergeProps({ref_for:!0},{rect:l,shouldShow:l.proportion>o.value.style.chart.layout.labels.hideUnderProportion||z.value,fontSize:I(l),isZoom:z.value,textColor:e.unref(s.adaptColorToBackground)(l.color)}),void 0,!0)])],8,Ct))]))),256)),e.renderSlot(t.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:F.value,isZoom:z.value,rect:B.value,config:o.value})),void 0,!0)],14,ft)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xt,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ie)||e.unref(ce)})),void 0,!0)])):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(We.default,{key:7,config:{type:"treemap",style:{backgroundColor:o.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:T},[o.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ue.Legend,{key:`legend_${ae.value}`,legendSet:be.value,config:Ae.value,id:`treemap_legend_${x.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>ke(l))},{item:e.withCtx(({legend:l,index:n})=>[e.createElementVNode("div",{onClick:p=>ke(l),style:e.normalizeStyle(`opacity:${g.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(s.applyDataLabel)(o.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:o.value.style.chart.layout.labels.prefix,v:l.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.legend.roundingValue}),{datapoint:l}))+" ",1),g.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",St," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Tt," ("+e.toDisplayString(isNaN(l.value/L.value)?"-":(l.value/L.value*100).toFixed(o.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,$t)]),_:1},8,["legendSet","config","id"])):e.renderSlot(t.$slots,"legend",{key:1,legend:be.value},void 0,!0)],512),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"source",ref:ee,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(He._sfc_main,{show:S.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,fontSize:o.value.style.chart.tooltip.fontSize,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:k.value,content:$.value,isFullscreen:b.value,isCustom:e.unref(s.isFunction)(o.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),f.value?(e.openBlock(),e.createBlock(je.default,{key:9,hideDetails:"",config:{open:S.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ge.DataTable,{key:`table_${le.value}`,colNames:G.value.colNames,head:G.value.head,body:G.value.body,config:G.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>S.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Bt)]),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,ut))}},Ot=Qe._export_sfc(Nt,[["__scopeId","data-v-3119d5fd"]]);exports.default=Ot;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),f=require("./index-BVYLM95-.cjs"),Ue=require("./Title-cjYd6IYr.cjs"),xe=require("./usePrinter-CkJDEgjQ.cjs"),J=require("./useResponsive-DQmBAoBf.cjs"),De=require("./vue-ui-accordion-Btv7fZHc.cjs"),Ge=require("./DataTable-DtXoZKgy.cjs"),Se=require("./useNestedProp-B3UWJnDQ.cjs"),He=require("./PackageVersion-yiiAD1cf.cjs"),Le=require("./Tooltip-YBqthQ_8.cjs"),je=require("./PenAndPaper-Btnlb4RH.cjs"),Xe=require("./useUserOptionState-BgepsfED.cjs"),Ye=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ze=require("./usePanZoom-BI9ALAYy.cjs"),Je=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ke=["id"],Qe=["xmlns","viewBox"],et=["width","height"],tt=["transform"],ot=["fill","font-weight","x","y","font-size","transform","onMouseover"],at={key:4,class:"vue-data-ui-watermark"},lt=["innerHTML"],nt={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup($e,{expose:Te}){const{vue_ui_word_cloud:Pe}=f.useConfig(),S=$e,A=e.computed({get(){return!!S.dataset&&S.dataset.length},set(o){return o}}),W=e.ref(f.createUid()),K=e.ref(0),M=e.ref(null),Q=e.ref(null),ee=e.ref(null),te=e.ref(0),oe=e.ref(0),U=e.ref(!1),t=e.computed({get:()=>re(),set:o=>o}),T=e.ref(ae());function ae(){return typeof S.dataset=="string"?f.createWordCloudDatasetFromPlainText(S.dataset):S.dataset.map((o,n)=>({...o,value:f.checkNaN(o.value)}))}e.watch(()=>S.dataset,()=>{T.value=ae(),H()});const{userOptionsVisible:D,setUserOptionsVisibility:le,keepUserOptionState:ne}=Xe.useUserOptionState({config:t.value}),{svgRef:G}=Ye.useChartAccessibility({config:t.value.style.chart.title});function re(){const o=Se.useNestedProp({userConfig:S.config,defaultConfig:Pe});return o.theme?{...Se.useNestedProp({userConfig:f.themes.vue_ui_word_cloud[o.theme]||S.config,defaultConfig:o}),customPalette:f.themePalettes[o.theme]||f.palette}:o}e.watch(()=>S.config,o=>{t.value=re(),D.value=!t.value.userOptions.showOnChartHover,se(),te.value+=1,oe.value+=1,refreshSlicer(),k.value.showTable=t.value.table.show,k.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const r=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),Me=J.debounce(()=>{H()},10),ze=J.throttle(()=>{const{width:o,height:n}=J.useResponsive({chart:M.value,title:t.value.style.chart.title.text?Q.value:null,source:ee.value});requestAnimationFrame(()=>{r.value.width=o,r.value.height=n,e.nextTick(Me)})}),I=e.ref(null);e.onMounted(se);function se(){f.objectIsEmpty(S.dataset)?f.error({componentName:"VueUiWordCloud",type:"dataset"}):T.value.forEach((o,n)=>{f.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(a=>{A.value=!1,f.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:a,index:n})})}),t.value.responsive&&(I.value=new ResizeObserver(ze),I.value.observe(M.value.parentNode))}e.onBeforeUnmount(()=>{I.value&&I.value.disconnect()});const{isPrinting:ue,isImaging:ie,generatePdf:ce,generateImage:de}=xe.usePrinter({elementId:`wordCloud_${W.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud",options:t.value.userOptions.print}),k=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function Fe(o,n,a="Arial"){const l=document.createElement("canvas").getContext("2d");return l.font=`${n}px ${t.value.style.chart.words.bold?"bold":"normal"} ${a}`,{width:l.measureText(o).width+t.value.style.chart.words.proximity,height:n}}function Ne(o,n,a){const s=Math.round(n),l=Math.round(a),C=1,x=r.value.minFontSize,B=r.value.maxFontSize,pe=t.value.style.chart.words.proximity||0,me=o.map(p=>p.value),Y=Math.min(...me),ge=Math.max(...me),q=new Uint8Array(s*l),O=document.createElement("canvas"),$=O.getContext("2d",{willReadFrequently:!0});O.width=s,O.height=l;function ye(p,y,b){$.save(),$.font=`${r.value.style&&r.value.style.bold?"bold ":""}${y}px Arial`;const m=$.measureText(p.name),d=Math.ceil(m.width)+2+(b?b*2:0),u=Math.ceil(y)+2+(b?b*2:0);O.width=d,O.height=u,$.clearRect(0,0,d,u),$.font=`${r.value.style&&r.value.style.bold?"bold ":""}${y}px Arial`,$.textAlign="center",$.textBaseline="middle",$.fillStyle="black",$.fillText(p.name,d/2,u/2);const c=$.getImageData(0,0,d,u).data,v=[];for(let g=0;g<u;g+=1)for(let h=0;h<d;h+=1)c[(g*d+h)*4+3]>1&&v.push([h,g]);return $.restore(),{w:d,h:u,wordMask:v}}function be(p,y,b,m,d,u){for(let i=0;i<u.length;i+=1){const c=m+u[i][0],v=d+u[i][1];if(c<0||v<0||c>=y||v>=b||p[v*y+c])return!1}return!0}function we(p,y,b,m,d,u){for(let i=0;i<u.length;i+=1){const c=m+u[i][0],v=d+u[i][1];c>=0&&v>=0&&c<y&&v<b&&(p[v*y+c]=1)}}const Ve=6,_e=2,Re=2,Ee=1,ke=Math.floor(s/2),Ce=Math.floor(l/2),qe=[...o].sort((p,y)=>y.value-p.value),Z=[];function We(p,y,b,m=1){const d=new Set(p.map(([i,c])=>`${i},${c}`)),u=new Set(d);for(let[i,c]of p)for(let v=-m;v<=m;v+=1)for(let g=-m;g<=m;g+=1){if(v===0&&g===0)continue;const h=i+v,w=c+g;h>=0&&h<y&&w>=0&&w<b&&u.add(`${h},${w}`)}return Array.from(u).map(i=>i.split(",").map(Number))}for(const p of qe){let y=x;ge!==Y&&(y=(p.value-Y)/(ge-Y)*(B-x)+x),y=Math.max(x,Math.min(B,y));let b=!1,m=y;for(;!b&&m>=C;){let{w:d,h:u,wordMask:i}=ye(p,m,pe);i=We(i,d,u,2);let c=0,v=0;for(;c<Math.max(s,l)&&!b&&v<1e4;){for(let g=0;g<360;g+=Ve){v+=1;const h=Math.round(ke+c*Math.cos(g*Math.PI/180)-d/2),w=Math.round(Ce+c*Math.sin(g*Math.PI/180)-u/2);if(!(h<0||w<0||h+d>s||w+u>l)&&be(q,s,l,h,w,i)){Z.push({...p,x:h-s/2,y:w-l/2,fontSize:m,width:d,height:u,angle:0}),we(q,s,l,h,w,i),b=!0;break}}c+=_e}b||(m-=1)}if(!b&&m<C){m=C;const{w:d,h:u,wordMask:i}=ye(p,m,pe);let c=0,v=0;for(;c<Math.max(s,l)&&!b&&v<25e3;){for(let g=0;g<360;g+=Re){v+=1;const h=Math.round(ke+c*Math.cos(g*Math.PI/180)-d/2),w=Math.round(Ce+c*Math.sin(g*Math.PI/180)-u/2);if(!(h<0||w<0||h+d>s||w+u>l)&&be(q,s,l,h,w,i)){Z.push({...p,x:h-s/2,y:w-l/2,fontSize:m,width:d,height:u,angle:0}),we(q,s,l,h,w,i),b=!0;break}}c+=Ee}}}return Z}const z=e.ref([]);e.watch(()=>S.dataset,H,{immediate:!0}),e.computed(()=>Math.round(Math.min(...T.value.map(o=>o.value)))),e.computed(()=>Math.round(Math.max(...T.value.map(o=>o.value))));function H(){const o=[...T.value].map(l=>l.value),n=Math.max(...o),a=Math.min(...o),s=[...T.value].map((l,C)=>{let x=(l.value-a)/(n-a)*(r.value.maxFontSize-r.value.minFontSize)+r.value.minFontSize;x=isNaN(x)?r.value.minFontSize:x;const B=Fe(l.name,x);return{...l,id:f.createUid(),fontSize:x,width:B.width,height:B.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[C]||t.value.customPalette[C%t.value.customPalette.length]||f.palette[C]||f.palette[C%f.palette.length]:t.value.style.chart.words.color}});z.value=Ne(s,r.value.width,r.value.height).sort((l,C)=>C.fontSize-l.fontSize)}const V=e.computed(()=>{const o=z.value.map(a=>({name:a.name,color:a.color})),n=z.value.map(a=>a.value);return{head:o,body:n}});function ve(){e.nextTick(()=>{const o=V.value.head.map((s,l)=>[[s.name],[V.value.body[l]]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),a=f.createCsvContent(n);f.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const _=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],n=V.value.head.map((l,C)=>{const x=f.dataLabel({p:t.value.table.td.prefix,v:V.value.body[C],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:l.color,name:l.name},x]}),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{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:n,config:a}}),R=e.ref(!1);function Be(o){R.value=o,K.value+=1}function Oe(){return z.value}function he(){k.value.showTable=!k.value.showTable}function fe(){k.value.showTooltip=!k.value.showTooltip}const F=e.ref(!1);function L(){F.value=!F.value}const Ae=e.computed(()=>!F.value&&t.value.style.chart.zoom.show),{viewBox:E}=Ze.usePanZoom(G,{x:0,y:0,width:r.value.width<=0?10:r.value.width,height:r.value.height<=0?10:r.value.height},1,Ae);Te({getData:Oe,generateCsv:ve,generatePdf:ce,generateImage:de,toggleTable:he,toggleTooltip:fe,toggleAnnotator:L});const P=e.ref(null),N=e.ref(!1),j=e.ref(""),X=e.ref(null);function Ie(o){if(!k.value.showTooltip)return;P.value=o.id,X.value={datapoint:o,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(N.value=!1,f.isFunction(n))try{const a=n({datapoint:o,config:t.value});typeof a=="string"&&(j.value=a,N.value=!0)}catch{console.warn("Custom format cannot be applied."),N.value=!1}if(!N.value){let a=`<svg viewBox="0 0 10 10" height="${t.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${o.color}"/></svg><span>${o.name}:</span><b>${(o.value||0).toFixed(t.value.style.chart.tooltip.roundingValue)}</b>`;j.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${a}</div>`}U.value=!0}return(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:M,id:`wordCloud_${W.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:n[2]||(n[2]=()=>e.unref(le)(!0)),onMouseleave:n[3]||(n[3]=()=>e.unref(le)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(je.PenAndPaper,{key:0,svgRef:e.unref(G),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:F.value,onClose:L},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:Q,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(Ue._sfc_main,{key:`title_${te.value}`,config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&A.value&&(e.unref(ne)||e.unref(D))?(e.openBlock(),e.createBlock(xe.UserOptions,{ref:"details",key:`user_option_${K.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ue),isImaging:e.unref(ie),uid:W.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:R.value,titles:{...t.value.userOptions.buttonTitles},chartElement:M.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:k.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:Be,onGeneratePdf:e.unref(ce),onGenerateCsv:ve,onGenerateImage:e.unref(de),onToggleTable:he,onToggleTooltip:fe,onToggleAnnotator:L,style:e.normalizeStyle({visibility:e.unref(ne)?e.unref(D)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:s})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:s})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:s})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:s})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:s})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:s})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasTooltip","isTooltip","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),A.value?(e.openBlock(),e.createElementBlock("svg",{key:3,ref_key:"svgRef",ref:G,class:e.normalizeClass({"vue-data-ui-fullscreen--on":R.value,"vue-data-ui-fulscreen--off":!R.value}),xmlns:e.unref(f.XMLNS),viewBox:`${e.unref(E).x} ${e.unref(E).y} ${e.unref(E).width} ${e.unref(E).height}`,style:"overflow:hidden;background:transparent;"},[e.createVNode(He._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:r.value.width<=0?10:r.value.width,height:r.value.height<=0?10:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,et)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(r.value.width<=0?10:r.value.width)/2}, ${(r.value.height<=0?10:r.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.value,(a,s)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:a.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:s,x:a.x,y:a.y,"font-size":a.fontSize,transform:`translate(${a.width/2}, ${a.height/2})`,class:e.normalizeClass({animated:t.value.useCssAnimation,"word-selected":P.value&&P.value===a.id&&k.value.showTooltip,"word-not-selected":P.value&&P.value!==a.id&&k.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:l=>Ie(a),onMouseleave:n[0]||(n[0]=l=>{P.value=null,U.value=!1}),style:e.normalizeStyle(`animation-delay:${s*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(a.name),47,ot))]))),256))],8,tt),e.renderSlot(o.$slots,"svg",{svg:{height:r.value.height,width:r.value.width}},void 0,!0)],10,Qe)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",at,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ue)||e.unref(ie)})),void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(Le._sfc_main,{show:k.value.showTooltip&&U.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:M.value,content:j.value,isCustom:N.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...X.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...X.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"source",ref:ee,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),A.value?(e.openBlock(),e.createBlock(De.default,{key:6,hideDetails:"",config:{open:k.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(Ge.DataTable,{key:`table_${oe.value}`,colNames:_.value.colNames,head:_.value.head,body:_.value.body,config:_.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=a=>k.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,lt)]),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)],44,Ke))}},rt=Je._export_sfc(nt,[["__scopeId","data-v-a7ce3b3e"]]);exports.default=rt;