vue-data-ui 2.4.3 → 2.4.5

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 (183) hide show
  1. package/README.md +3 -1
  2. package/dist/{Arrow-Dz6AomGr.cjs → Arrow-BeQLfJqp.cjs} +1 -1
  3. package/dist/{Arrow-C7lNL7sY.js → Arrow-Dvaq-qLp.js} +1 -1
  4. package/dist/{BaseIcon-uALK38Ov.cjs → BaseIcon-BQM6PtJu.cjs} +1 -1
  5. package/dist/{BaseIcon-BbvG1AlW.js → BaseIcon-D9DRVW03.js} +1 -1
  6. package/dist/{DataTable-DTzynbND.cjs → DataTable-DO2GAcBm.cjs} +1 -1
  7. package/dist/{DataTable-DYqC2pqu.js → DataTable-rs_YrvMR.js} +2 -2
  8. package/dist/{Legend-Cgw4lO2O.cjs → Legend-BoBvZGqQ.cjs} +1 -1
  9. package/dist/{Legend-DNgTCgEK.js → Legend-DrmUpnIK.js} +1 -1
  10. package/dist/{PackageVersion-VkaUzgmt.js → PackageVersion-D9rYHrFZ.js} +1 -1
  11. package/dist/{PackageVersion-DwI-KhXH.cjs → PackageVersion-DdLmDkTt.cjs} +1 -1
  12. package/dist/PenAndPaper-C-KjtyNA.js +308 -0
  13. package/dist/PenAndPaper-DyMNuRla.cjs +1 -0
  14. package/dist/{Shape-D2Dpshg1.cjs → Shape-BGqIhzPX.cjs} +1 -1
  15. package/dist/{Shape-Bwon0l0g.js → Shape-CBrmBvYy.js} +1 -1
  16. package/dist/{Slicer-TfpN2Cr4.js → Slicer-4R6np1wa.js} +3 -3
  17. package/dist/{Slicer-uSjfNJjG.cjs → Slicer-BLkkkNUl.cjs} +1 -1
  18. package/dist/{Title-0Tp4hZ4u.cjs → Title-Dn00hErp.cjs} +1 -1
  19. package/dist/{Title-C5pIfQAz.js → Title-W7iJGPjg.js} +1 -1
  20. package/dist/{Tooltip-9Tp2Yrd1.cjs → Tooltip-DJiwKA4y.cjs} +1 -1
  21. package/dist/{Tooltip-Cz24YLfw.js → Tooltip-Pv3Bhir5.js} +1 -1
  22. package/dist/{index-Bya_q1J-.js → index-C1GB0E49.js} +1 -1
  23. package/dist/{index-eFox7weK.cjs → index-C9HllqQA.cjs} +1 -1
  24. package/dist/style.css +1 -1
  25. package/dist/{useNestedProp-B33hazbH.js → useNestedProp-CNAPgW6E.js} +1 -1
  26. package/dist/{useNestedProp-BkgEhTQY.cjs → useNestedProp-DOr0hj4s.cjs} +1 -1
  27. package/dist/{usePrinter-CSRFnDBU.cjs → usePrinter-FSAw5pod.cjs} +1 -1
  28. package/dist/{usePrinter-CiHd1FwD.js → usePrinter-y5uHyknw.js} +1 -1
  29. package/dist/useResponsive-BJ7DTGpm.cjs +1 -0
  30. package/dist/{useResponsive-BY8tgM1n.js → useResponsive-CoxXLe23.js} +8 -7
  31. package/dist/{vue-data-ui-Bduq4f2p.js → vue-data-ui-Bg5KOKEX.js} +58 -58
  32. package/dist/{vue-data-ui-BTtxyUc3.cjs → vue-data-ui-Bnkz3Xmu.cjs} +1 -1
  33. package/dist/vue-data-ui.cjs +1 -1
  34. package/dist/vue-data-ui.js +1 -1
  35. package/dist/{vue-ui-3d-bar-BUEq_VdY.js → vue-ui-3d-bar-mUrcbG6J.js} +9 -9
  36. package/dist/{vue-ui-3d-bar-B-P7PMHs.cjs → vue-ui-3d-bar-sjkBzHFn.cjs} +1 -1
  37. package/dist/{vue-ui-accordion-TEMpM1hO.cjs → vue-ui-accordion-BkUGNe2H.cjs} +1 -1
  38. package/dist/{vue-ui-accordion-DfUfL2dI.js → vue-ui-accordion-DWyRC3-h.js} +3 -3
  39. package/dist/vue-ui-age-pyramid-CKQ8OHuS.cjs +1 -0
  40. package/dist/{vue-ui-age-pyramid-CH72tAMb.js → vue-ui-age-pyramid-CVktvXpY.js} +145 -137
  41. package/dist/{vue-ui-annotator-DPeJ2its.js → vue-ui-annotator-Cp8KDkuP.js} +1 -1
  42. package/dist/{vue-ui-annotator-DU_DJKCw.cjs → vue-ui-annotator-DSJ25l4s.cjs} +1 -1
  43. package/dist/vue-ui-bullet-Bg3TPFgV.cjs +34 -0
  44. package/dist/{vue-ui-bullet-CtP3MlUT.js → vue-ui-bullet-D4atsFQx.js} +75 -69
  45. package/dist/vue-ui-candlestick-BhdG9CY1.cjs +2 -0
  46. package/dist/{vue-ui-candlestick-DDil13a0.js → vue-ui-candlestick-DUNyCQ6Z.js} +240 -232
  47. package/dist/{vue-ui-carousel-table-BaeIxyc0.js → vue-ui-carousel-table-BRrYpr-2.js} +4 -4
  48. package/dist/{vue-ui-carousel-table-C7SJIOG-.cjs → vue-ui-carousel-table-DF4FhrBd.cjs} +1 -1
  49. package/dist/vue-ui-chestnut-BLBS9QO2.cjs +6 -0
  50. package/dist/{vue-ui-chestnut-BczSJF6S.js → vue-ui-chestnut-CjS4qC_J.js} +262 -256
  51. package/dist/{vue-ui-cursor-Dg_Dmww-.js → vue-ui-cursor-C3SpabMF.js} +2 -2
  52. package/dist/{vue-ui-cursor-C2Pj_CI_.cjs → vue-ui-cursor-DzVt5_py.cjs} +1 -1
  53. package/dist/{vue-ui-dashboard-Bul9dqx1.js → vue-ui-dashboard-BCOKtsyJ.js} +2 -2
  54. package/dist/{vue-ui-dashboard-Cg020NiT.cjs → vue-ui-dashboard-CIv7W8Yn.cjs} +1 -1
  55. package/dist/{vue-ui-digits-B8iAa4YZ.js → vue-ui-digits-DaMKAZkt.js} +2 -2
  56. package/dist/{vue-ui-digits-Ctgd84JR.cjs → vue-ui-digits-yNfQgOLZ.cjs} +1 -1
  57. package/dist/{vue-ui-donut-DUcp-fat.js → vue-ui-donut-B_-VAqBw.js} +338 -330
  58. package/dist/vue-ui-donut-Bo4SbdEe.cjs +1 -0
  59. package/dist/{vue-ui-donut-evolution-C_YMbTwq.js → vue-ui-donut-evolution-C9TXFzCm.js} +163 -156
  60. package/dist/vue-ui-donut-evolution-DOPY3I3Q.cjs +1 -0
  61. package/dist/{vue-ui-dumbbell-Buwngz_V.js → vue-ui-dumbbell-BP_Vf_u2.js} +208 -200
  62. package/dist/vue-ui-dumbbell-Cgwng71s.cjs +9 -0
  63. package/dist/vue-ui-flow-BiQj4v8i.cjs +1 -0
  64. package/dist/{vue-ui-flow-Bz3c0K5P.js → vue-ui-flow-DHoxK4t1.js} +130 -124
  65. package/dist/vue-ui-galaxy-C5ZaT8pw.cjs +1 -0
  66. package/dist/{vue-ui-galaxy-Cjh0XGTX.js → vue-ui-galaxy-DuLPsC4Q.js} +125 -119
  67. package/dist/vue-ui-gauge-26eHgOjR.cjs +1 -0
  68. package/dist/{vue-ui-gauge-B1UvGkQa.js → vue-ui-gauge-BhrXiD4S.js} +167 -159
  69. package/dist/{vue-ui-gizmo-DFW6HnHp.cjs → vue-ui-gizmo-Bb_SWCsE.cjs} +1 -1
  70. package/dist/{vue-ui-gizmo-DUQ4t-At.js → vue-ui-gizmo-D3kBYI1G.js} +3 -3
  71. package/dist/vue-ui-heatmap-Bc4HvgMk.cjs +1 -0
  72. package/dist/{vue-ui-heatmap-C-poazUw.js → vue-ui-heatmap-wjsvn1_e.js} +156 -149
  73. package/dist/{vue-ui-kpi-Z4Oi4raz.cjs → vue-ui-kpi-BbvfVZn0.cjs} +1 -1
  74. package/dist/{vue-ui-kpi-DXe-vxAk.js → vue-ui-kpi-DLJuo47I.js} +3 -3
  75. package/dist/{vue-ui-mini-loader-MMvpm9pz.cjs → vue-ui-mini-loader-BaxwhF7o.cjs} +1 -1
  76. package/dist/{vue-ui-mini-loader-BVtHTqxS.js → vue-ui-mini-loader-D4aLvv-D.js} +2 -2
  77. package/dist/{vue-ui-molecule-BaJpDZND.js → vue-ui-molecule-DXpMMgdW.js} +109 -103
  78. package/dist/vue-ui-molecule-ZqAJHh6x.cjs +1 -0
  79. package/dist/{vue-ui-mood-radar-BUNDwsEI.js → vue-ui-mood-radar-B_uWY92C.js} +173 -166
  80. package/dist/vue-ui-mood-radar-BhteAPWH.cjs +1 -0
  81. package/dist/{vue-ui-nested-donuts-mDy2hXa6.js → vue-ui-nested-donuts-By32x0Y7.js} +311 -303
  82. package/dist/vue-ui-nested-donuts-ClgkX1-p.cjs +17 -0
  83. package/dist/vue-ui-onion-BdIxJpfA.cjs +5 -0
  84. package/dist/{vue-ui-onion-DwFG3HAI.js → vue-ui-onion-dQTXKNju.js} +149 -141
  85. package/dist/{vue-ui-parallel-coordinate-plot-ImET_zeo.js → vue-ui-parallel-coordinate-plot-CTF9Ujab.js} +186 -178
  86. package/dist/vue-ui-parallel-coordinate-plot-D6MUp-5W.cjs +8 -0
  87. package/dist/vue-ui-quadrant-CArA4Vmm.cjs +1 -0
  88. package/dist/{vue-ui-quadrant-BeveRihK.js → vue-ui-quadrant-Coqh0pYO.js} +225 -217
  89. package/dist/vue-ui-quick-chart-6Av74TTC.cjs +15 -0
  90. package/dist/{vue-ui-quick-chart-DAhllTfa.js → vue-ui-quick-chart-Bfdddr_B.js} +386 -378
  91. package/dist/{vue-ui-radar-BllatzRa.js → vue-ui-radar-BpdGMVHw.js} +172 -164
  92. package/dist/vue-ui-radar-CLr-gu1X.cjs +1 -0
  93. package/dist/{vue-ui-rating-D1ykV4xO.js → vue-ui-rating-B-YedcK0.js} +2 -2
  94. package/dist/{vue-ui-rating-BoZo7caL.cjs → vue-ui-rating-KFJoH-JV.cjs} +1 -1
  95. package/dist/vue-ui-relation-circle-BLVThOqT.js +366 -0
  96. package/dist/vue-ui-relation-circle-DuGQKFor.cjs +1 -0
  97. package/dist/{vue-ui-rings-B-ZcX6y1.js → vue-ui-rings-BGeYkj-O.js} +196 -188
  98. package/dist/vue-ui-rings-DzgehQZ5.cjs +2 -0
  99. package/dist/{vue-ui-scatter-DG43ck1g.js → vue-ui-scatter-CsBPCCco.js} +288 -280
  100. package/dist/vue-ui-scatter-jPnr8qI0.cjs +1 -0
  101. package/dist/{vue-ui-screenshot-C1JBP_N0.cjs → vue-ui-screenshot-1nXVH-hp.cjs} +1 -1
  102. package/dist/{vue-ui-screenshot-p3ca8cAl.js → vue-ui-screenshot-B2FTnuxH.js} +1 -1
  103. package/dist/{vue-ui-skeleton-BYssP0K4.js → vue-ui-skeleton-CE6ibl1T.js} +3 -3
  104. package/dist/{vue-ui-skeleton-BqKzuhkB.cjs → vue-ui-skeleton-CPwED1As.cjs} +1 -1
  105. package/dist/{vue-ui-smiley-D7dDCdpq.js → vue-ui-smiley-2H9hMFZ_.js} +2 -2
  106. package/dist/{vue-ui-smiley-BXKVpHl2.cjs → vue-ui-smiley-DqOZwhT4.cjs} +1 -1
  107. package/dist/{vue-ui-spark-trend-9V60hM3Z.cjs → vue-ui-spark-trend-CLW85O32.cjs} +1 -1
  108. package/dist/{vue-ui-spark-trend-GWFrO_0z.js → vue-ui-spark-trend-Dx9xVq9a.js} +5 -5
  109. package/dist/{vue-ui-sparkbar-Bgn6AY0q.cjs → vue-ui-sparkbar-DJDXrRyp.cjs} +1 -1
  110. package/dist/{vue-ui-sparkbar-CwqlyAyv.js → vue-ui-sparkbar-zafUIv1n.js} +4 -4
  111. package/dist/{vue-ui-sparkgauge-F2XbiXyA.js → vue-ui-sparkgauge-CFAdhTLk.js} +4 -4
  112. package/dist/{vue-ui-sparkgauge-Dqntz2Zv.cjs → vue-ui-sparkgauge-CPNAXUyl.cjs} +1 -1
  113. package/dist/{vue-ui-sparkhistogram-DRIKK6Ym.js → vue-ui-sparkhistogram-B3DIjpaE.js} +5 -5
  114. package/dist/{vue-ui-sparkhistogram-DnY4-Sdn.cjs → vue-ui-sparkhistogram-CHc3_xRE.cjs} +1 -1
  115. package/dist/{vue-ui-sparkline-Cxtzdlhi.js → vue-ui-sparkline-C-LE7J9H.js} +5 -5
  116. package/dist/{vue-ui-sparkline-CAEs-gtK.cjs → vue-ui-sparkline-U22Yhwy7.cjs} +1 -1
  117. package/dist/{vue-ui-sparkstackbar-0A1klq9s.js → vue-ui-sparkstackbar-BzLoGC-y.js} +4 -4
  118. package/dist/{vue-ui-sparkstackbar-D37ms1rx.cjs → vue-ui-sparkstackbar-nx-Lt8sX.cjs} +1 -1
  119. package/dist/{vue-ui-stackbar-wun4S3C0.cjs → vue-ui-stackbar-BwgHLhj2.cjs} +1 -1
  120. package/dist/{vue-ui-stackbar-ByOuJSdM.js → vue-ui-stackbar-C5xNRXnW.js} +13 -13
  121. package/dist/{vue-ui-strip-plot-CMD0MSqY.js → vue-ui-strip-plot-6khUDDeA.js} +204 -196
  122. package/dist/vue-ui-strip-plot-BFUtZW4b.cjs +1 -0
  123. package/dist/{vue-ui-table-aj0XZ7T5.cjs → vue-ui-table-B3Eng0fH.cjs} +1 -1
  124. package/dist/{vue-ui-table-B75DJ39t.js → vue-ui-table-DsBM7Osw.js} +1 -1
  125. package/dist/{vue-ui-table-heatmap-Ce93TyBF.cjs → vue-ui-table-heatmap-DwCdS68z.cjs} +1 -1
  126. package/dist/{vue-ui-table-heatmap-BO2ugWqD.js → vue-ui-table-heatmap-ccQKInFD.js} +4 -4
  127. package/dist/{vue-ui-table-sparkline-CbjfAaj2.js → vue-ui-table-sparkline-BU-hOCZ7.js} +5 -5
  128. package/dist/{vue-ui-table-sparkline-D6KJjDnU.cjs → vue-ui-table-sparkline-CDmrQFKv.cjs} +1 -1
  129. package/dist/vue-ui-thermometer-BhHYcxmT.cjs +1 -0
  130. package/dist/{vue-ui-thermometer-Pq4PvSIP.js → vue-ui-thermometer-DuI3uDCZ.js} +171 -165
  131. package/dist/{vue-ui-timer-B6IB6yS6.cjs → vue-ui-timer-D7EKaAqa.cjs} +1 -1
  132. package/dist/{vue-ui-timer-Bk3BvB-B.js → vue-ui-timer-Gk3bl_em.js} +6 -6
  133. package/dist/{vue-ui-tiremarks-CU9HJIqf.js → vue-ui-tiremarks-AcEjMpJH.js} +119 -112
  134. package/dist/vue-ui-tiremarks-UX2FbnyG.cjs +1 -0
  135. package/dist/{vue-ui-treemap-DY-lRAhC.js → vue-ui-treemap-CFTpzgX5.js} +266 -258
  136. package/dist/vue-ui-treemap-D6CTMfsm.cjs +1 -0
  137. package/dist/vue-ui-vertical-bar-BzY2H3UC.cjs +4 -0
  138. package/dist/{vue-ui-vertical-bar-CtnIKsM1.js → vue-ui-vertical-bar-CuBJx5l1.js} +245 -237
  139. package/dist/vue-ui-waffle-CZxR13EG.cjs +1 -0
  140. package/dist/{vue-ui-waffle-reOsx-gJ.js → vue-ui-waffle-rDfZLxvH.js} +224 -216
  141. package/dist/{vue-ui-wheel-kYxny3vn.js → vue-ui-wheel-BFt2o4yO.js} +125 -117
  142. package/dist/vue-ui-wheel-BM-St3xT.cjs +1 -0
  143. package/dist/{vue-ui-word-cloud-DwLY4QdB.cjs → vue-ui-word-cloud-DjKyKUbA.cjs} +1 -1
  144. package/dist/{vue-ui-word-cloud-DbMqrHAf.js → vue-ui-word-cloud-pNPIrJ-g.js} +11 -11
  145. package/dist/vue-ui-xy-CBZUMMlP.cjs +3 -0
  146. package/dist/{vue-ui-xy-rbACig0h.js → vue-ui-xy-DwkEc4Np.js} +302 -291
  147. package/dist/{vue-ui-xy-canvas-B0HTR7OV.js → vue-ui-xy-canvas-CW90CROL.js} +12 -12
  148. package/dist/{vue-ui-xy-canvas-CgJd5FiT.cjs → vue-ui-xy-canvas-DWGGLom_.cjs} +1 -1
  149. package/package.json +1 -1
  150. package/dist/PenAndPaper-CDFVOo7X.cjs +0 -1
  151. package/dist/PenAndPaper-DAZYA8Ew.js +0 -269
  152. package/dist/useResponsive-CodiGUOE.cjs +0 -1
  153. package/dist/vue-ui-age-pyramid-DsbZ1qcQ.cjs +0 -1
  154. package/dist/vue-ui-bullet-D8ks_rKr.cjs +0 -34
  155. package/dist/vue-ui-candlestick-D1jdr0bv.cjs +0 -2
  156. package/dist/vue-ui-chestnut-ih5r0Bj9.cjs +0 -6
  157. package/dist/vue-ui-donut-D7KT9EAp.cjs +0 -1
  158. package/dist/vue-ui-donut-evolution-CHtJ8iOK.cjs +0 -1
  159. package/dist/vue-ui-dumbbell-B0dikuqO.cjs +0 -9
  160. package/dist/vue-ui-flow-D6rc8J-8.cjs +0 -1
  161. package/dist/vue-ui-galaxy-CmTt0vBf.cjs +0 -1
  162. package/dist/vue-ui-gauge-B_TKuyM7.cjs +0 -1
  163. package/dist/vue-ui-heatmap-C2HlnqzO.cjs +0 -1
  164. package/dist/vue-ui-molecule-BiYIcOKN.cjs +0 -1
  165. package/dist/vue-ui-mood-radar-C6jMyFkb.cjs +0 -1
  166. package/dist/vue-ui-nested-donuts-DKO2dFKo.cjs +0 -17
  167. package/dist/vue-ui-onion-GWNoZRhw.cjs +0 -5
  168. package/dist/vue-ui-parallel-coordinate-plot-DODn4Ohf.cjs +0 -8
  169. package/dist/vue-ui-quadrant-yuFAxV-5.cjs +0 -1
  170. package/dist/vue-ui-quick-chart-DgFDBzjS.cjs +0 -15
  171. package/dist/vue-ui-radar-BJH5SE6-.cjs +0 -1
  172. package/dist/vue-ui-relation-circle-CKmjOle7.cjs +0 -1
  173. package/dist/vue-ui-relation-circle-xv2l5Be9.js +0 -358
  174. package/dist/vue-ui-rings-DjH3CK23.cjs +0 -2
  175. package/dist/vue-ui-scatter-SBCXAl7q.cjs +0 -1
  176. package/dist/vue-ui-strip-plot-IQrypGvz.cjs +0 -1
  177. package/dist/vue-ui-thermometer-swmi4FmH.cjs +0 -1
  178. package/dist/vue-ui-tiremarks-Cn79uQH2.cjs +0 -1
  179. package/dist/vue-ui-treemap-BEMuKV7x.cjs +0 -1
  180. package/dist/vue-ui-vertical-bar-B1e2RxTv.cjs +0 -4
  181. package/dist/vue-ui-waffle-BqP7Okgu.cjs +0 -1
  182. package/dist/vue-ui-wheel-BuWUGnkC.cjs +0 -1
  183. package/dist/vue-ui-xy-CGWzriYn.cjs +0 -3
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-eFox7weK.cjs"),ie=require("./Title-0Tp4hZ4u.cjs"),Z=require("./usePrinter-CSRFnDBU.cjs"),de=require("./Tooltip-9Tp2Yrd1.cjs"),ce=require("./vue-ui-skeleton-BqKzuhkB.cjs"),ve=require("./BaseIcon-uALK38Ov.cjs"),ye=require("./vue-ui-accordion-TEMpM1hO.cjs"),ee=require("./useNestedProp-BkgEhTQY.cjs"),pe=require("./PackageVersion-DwI-KhXH.cjs"),he=require("./PenAndPaper-CDFVOo7X.cjs"),fe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ge=["id"],me={key:1,style:"width:100%;background:transparent"},be=["xmlns","viewBox"],ke=["x","y","width","height","fill","stroke","stroke-width"],xe=["x","y","width","height","fill","stroke","stroke-width"],we=["font-size","font-weight","fill","x","y"],Ce=["x","y","width","height","onMouseover"],_e={key:0},Ne=["font-size","fill","x","y","font-weight"],Be={key:0},Le=["text-anchor","font-size","fill","font-weight","transform"],$e={key:1},Ve=["x","y","width","height","stroke","stroke-width"],Ee={key:2},Se=["id"],Ae=["stop-color"],ze=["stop-color"],Te=["x","y","font-size","fill"],Me=["x","y","height","rx","fill"],Pe=["x","y","font-size","fill"],Fe=["stroke","x1","x2","y1","y2"],Oe=["fill","d"],De={key:3},Ie={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},Re=["stop-color"],qe=["stop-color"],He=["x","y","width","height","rx"],Ue=["x","y","font-size","fill"],Ge=["x","y","font-size","fill"],Xe=["stroke","x1","x2","y1","y2"],je=["fill","d"],Ye={key:4,class:"vue-data-ui-watermark"},We={key:5,ref:"source",dir:"auto"},Ke={class:"vue-ui-data-table"},Je={key:0},Qe=["data-cell"],Ze={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},et=["data-cell"],tt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},lt={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(L,{expose:te}){const n=L;e.useCssVars(l=>({"7cf48471":l.tdo}));const{vue_ui_heatmap:le}=o.useConfig(),$=e.computed(()=>!!n.dataset&&n.dataset.length);o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiHeatmap",type:"dataset"});const x=e.ref(o.createUid()),V=e.ref(null),ae=e.ref(null),z=e.ref(!1),T=e.ref(""),I=e.ref(void 0),w=e.ref(null),R=e.ref(0),q=e.ref(null),H=e.ref(!1),U=e.ref(0),t=e.computed({get:()=>G(),set:l=>l});function G(){const l=ee.useNestedProp({userConfig:n.config,defaultConfig:le});let s={};return l.theme?s={...ee.useNestedProp({userConfig:o.themes.vue_ui_heatmap[l.theme]||n.config,defaultConfig:l})}:s=l,n.config&&o.hasDeepProperty(n.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?s.style.layout.dataLabels.xAxis.showOnlyAtModulo=n.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:s.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,s}e.watch(()=>n.config,l=>{t.value=G(),M(),U.value+=1},{deep:!0}),e.watch(()=>n.dataset,()=>{M()},{deep:!0});const{isPrinting:X,isImaging:j,generatePdf:Y,generateImage:W}=Z.usePrinter({elementId:`heatmap__${x.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),oe=e.computed(()=>t.value.table.responsiveBreakpoint);function se(){new ResizeObserver(s=>{s.forEach(u=>{H.value=u.contentRect.width<oe.value})}).observe(q.value)}e.onMounted(M);function M(){se()}const k=e.computed(()=>Math.max(...n.dataset.flatMap(l=>(l.values||[]).length))),p=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+n.dataset.length*t.value.style.layout.cells.height,s=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(k.value<n.dataset.length?n.dataset.length:k.value)*t.value.style.layout.cells.height,u=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:u,width:s}}),E=e.computed(()=>t.value.style.legend.position),a=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:p.value.width-t.value.style.layout.padding.right-(E.value==="right"&&t.value.style.legend.show?92:0),bottom:p.value.height-t.value.style.layout.padding.bottom,height:p.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:p.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(E.value==="right"&&t.value.style.legend.show?92:0)})),P=e.computed(()=>i.value.height*n.dataset.length),v=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...n.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=n.dataset.flatMap(u=>u.values);return l.reduce((u,r)=>u+r,0)/l.length}),i=e.computed(()=>({width:a.value.width/k.value,height:a.value.width/(k.value<n.dataset.length?n.dataset.length:k.value)})),h=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:n.dataset.map(u=>u.name),s=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:s.slice(0,k.value)}}),S=e.computed(()=>(n.dataset.forEach((l,s)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{o.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:s})})}),n.dataset.map(l=>({...l,temperatures:(l.values||[]).map((s,u)=>s>=b.value?{side:"up",color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),ratio:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value))>1?1:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value)),value:s,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(s)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(s)/Math.abs(b.value)),color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),value:s,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`})})))),f=e.ref(null),C=e.ref(null);function ue(l,s,u,r){w.value={x:u,y:r};const{value:d,yAxisName:c,xAxisName:g,id:re}=l;I.value=re,f.value=d,C.value={datapoint:l,seriesIndex:s,series:S.value,config:t.value},z.value=!0;let O="";const D=t.value.style.tooltip.customFormat;o.isFunction(D)&&o.functionReturnsString(()=>D({datapoint:l,seriesIndex:s,series:S.value,config:t.value}))?T.value=D({datapoint:l,seriesIndex:s,series:S.value,config:t.value}):(O+=`<div>${c} ${g?`${g}`:""}</div>`,O+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,d)}">⬤</span><span>${isNaN(d)?"-":o.applyDataLabel(t.value.style.layout.cells.value.formatter,d,o.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:s})}</span></div>`,T.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${O}</div>`)}const _=e.computed(()=>a.value.top+P.value*(1-f.value/v.value)),N=e.computed(()=>a.value.left+(p.value.width-a.value.left-t.value.style.layout.padding.right)*(f.value/v.value));e.computed(()=>{const l=n.dataset.map(u=>({name:u.name})),s=n.dataset.map(u=>u.values);return{head:l,body:s}});function K(){e.nextTick(()=>{const l=["",...n.dataset.map((d,c)=>d.name)],s=[];for(let d=0;d<h.value.xLabels.length;d+=1){const c=[h.value.xLabels[d]];for(let g=0;g<n.dataset.length;g+=1)c.push([n.dataset[g].values[d]]);s.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(s),r=o.createCsvContent(u);o.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const B=e.ref(!1);function ne(l){B.value=l,R.value+=1}function J(){y.value.showTable=!y.value.showTable}function Q(){y.value.showTooltip=!y.value.showTooltip}const A=e.ref(!1);function F(){A.value=!A.value}return te({generatePdf:Y,generateCsv:K,generateImage:W,toggleTable:J,toggleTooltip:Q,toggleAnnotator:F}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:V,class:e.normalizeClass(`vue-ui-heatmap ${B.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor}`),id:`heatmap__${x.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(he.PenAndPaper,{key:0,parent:V.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:A.value,onClose:F},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",me,[(e.openBlock(),e.createBlock(ie._sfc_main,{key:`title_${U.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(Z.UserOptions,{ref_key:"details",ref:ae,key:`user_options_${R.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(j),isPrinting:e.unref(X),uid:x.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:V.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:ne,onGeneratePdf:e.unref(Y),onGenerateCsv:K,onGenerateImage:e.unref(W),onToggleTable:J,onToggleTooltip:Q,onToggleAnnotator:F},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:u,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:u,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),viewBox:`0 0 ${p.value.width} ${p.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(pe._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(u,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,ke),e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:d.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,xe),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(o.adaptColorToBackground)(d.color),x:a.value.left+i.value.width*c+i.value.width/2,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:d})),9,we)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c,y:a.value.top+i.value.height*r,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:g=>ue(d,r,a.value.left+i.value.width*c,a.value.top+i.value.height*r),onMouseout:s[0]||(s[0]=g=>{z.value=!1,I.value=void 0,f.value=null,w.value=null})},null,40,Ce)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",_e,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:a.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(h.value.yLabels[r]),9,Ne)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&r%t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.layout.dataLabels.xAxis.rotation===0?"middle":t.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+i.value.width/2+a.value.width/h.value.xLabels.length*r+t.value.style.layout.dataLabels.xAxis.offsetX}, ${a.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(u),9,Le)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("g",$e,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:w.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:w.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:i.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,Ve)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="right"?(e.openBlock(),e.createElementBlock("g",Ee,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${x.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Ae),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,ze)],8,Se)]),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Te),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:P.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${x.value})`},null,8,Me),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top+P.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Pe),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(C.value.datapoint.color),"stroke-width":"2",x1:a.value.right+36,x2:a.value.right+72,y1:_.value,y2:_.value},null,8,Fe)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${a.value.right+36},${_.value} ${a.value.right+26},${_.value-8} ${a.value.right+26},${_.value+8}z`},null,8,Oe)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="bottom"?(e.openBlock(),e.createElementBlock("g",De,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Ie,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Re),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,qe)])]),e.createElementVNode("rect",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height,width:p.value.width-a.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,He),e.createElementVNode("text",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ue),e.createElementVNode("text",{x:a.value.right,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ge),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(C.value.datapoint.color),"stroke-width":"2",x1:N.value,x2:N.value,y1:a.value.bottom+t.value.style.layout.cells.height,y2:a.value.bottom+t.value.style.layout.cells.height*2},null,8,Xe)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${N.value},${a.value.bottom+t.value.style.layout.cells.height} ${N.value-12},${a.value.bottom+t.value.style.layout.cells.height-20} ${N.value+12},${a.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,je)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:p.value},void 0,!0)],14,be)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(X)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",We,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ce.default,{key:6,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(de._sfc_main,{show:y.value.showTooltip&&z.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:V.value,content:T.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...C.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...C.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),$.value?(e.openBlock(),e.createBlock(ye.default,{key:7,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:q,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":H.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:s[1]||(s[1]=u=>y.value.showTable=!1),onKeypress:s[2]||(s[2]=e.withKeys(u=>y.value.showTable=!1,["enter"]))},[e.createVNode(ve.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",Ke,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",Je,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(u,r)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(u.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",Ze,e.toDisplayString(u),1)],12,Qe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":L.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",tt,e.toDisplayString(isNaN(d.values[r])?"-":e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[r],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,et))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ge))}},at=fe._export_sfc(lt,[["__scopeId","data-v-f1071e4f"]]);exports.default=at;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-eFox7weK.cjs"),Te=require("./Title-0Tp4hZ4u.cjs"),ce=require("./usePrinter-CSRFnDBU.cjs"),Se=require("./DataTable-DTzynbND.cjs"),Ve=require("./Tooltip-9Tp2Yrd1.cjs"),z=require("./BaseIcon-uALK38Ov.cjs"),Re=require("./vue-ui-skeleton-BqKzuhkB.cjs"),Le=require("./vue-ui-accordion-TEMpM1hO.cjs"),de=require("./useNestedProp-BkgEhTQY.cjs"),ze=require("./PackageVersion-DwI-KhXH.cjs"),Me=require("./PenAndPaper-CDFVOo7X.cjs"),De=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ue=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Ae={__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:["zoom","hover"],setup(r,{emit:g}){const h=r;function u(a){g("zoom",a)}function c(a){g("hover",a)}return e.toRef(h,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(d=>{d.ancestor=a})}),(a,d)=>{const C=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(w,M)=>(e.openBlock(),e.createElementBlock("circle",{cx:w.x,cy:w.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:r.hoveredUid&&r.hoveredUid===v.uid?r.strokeHovered:r.stroke,"stroke-width":r.hoveredUid&&r.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(x=>u(v),["stop"]),onMouseover:x=>c(v),onMouseleave:d[0]||(d[0]=x=>c(null))},null,40,Ue))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(C,{key:0,dataset:v.nodes,color:r.color,stroke:r.stroke,strokeHovered:r.strokeHovered,hoveredUid:r.hoveredUid,onZoom:u,onHover:c},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Ie=["x1","y1","x2","y2","stroke","stroke-width"],Oe=["x1","y1","x2","y2","stroke","stroke-width"],He={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(r){const g=r;return e.toRef(g,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(c=>{c.ancestor=u})}),(u,c)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(d,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,Ie),e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.color,"stroke-width":a.circleRadius/2},null,8,Oe)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:r.color,backgroundColor:r.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},qe=["x","y","fill","font-size"],je={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;return e.toRef(h,"dataset").value.forEach(c=>{c.nodes&&c.nodes.length>0&&c.nodes.forEach(B=>{B.ancestor=c})}),(c,B)=>{const a=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,d=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[d.polygonPath&&d.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.polygonPath.coordinates,C=>(e.openBlock(),e.createElementBlock("text",{x:C.x,y:C.y+d.circleRadius*2,fill:r.color,"font-size":d.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(d.name),9,qe))),256)),d.nodes&&d.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:d.nodes,color:r.color,hoveredUid:r.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Ge={style:{position:"relative",height:"100%",width:"100%"}},Xe={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(r,{emit:g}){return(h,u)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${r.isFullscreen?"fixed":"absolute"};bottom:0;right:${r.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",Ge,[e.createElementVNode("button",{onClick:u[0]||(u[0]=e.withModifiers(c=>g("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[1]||(u[1]=e.withModifiers(c=>g("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[2]||(u[2]=e.withModifiers(c=>g("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[3]||(u[3]=e.withModifiers(c=>g("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[4]||(u[4]=e.withModifiers(c=>g("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},Ye=["id"],We={key:1,style:"width:100%;background:transparent;"},Ze=["xmlns","viewBox"],Je=["id"],Ke=["stop-color"],Qe=["stop-color"],_e={key:5,class:"vue-data-ui-watermark"},et={key:7,ref:"source",dir:"auto"},tt=["innerHTML"],ot={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(r,{expose:g}){const h=r,{vue_ui_molecule:u}=m.useConfig(),c=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{B()});function B(){m.objectIsEmpty(h.dataset)&&m.error({componentName:"VueUiMolecule",type:"dataset"})}const a=e.ref(m.createUid()),d=e.ref(null),C=e.ref(!1),v=e.ref(""),w=e.ref(null),M=e.ref(null),x=e.ref(!1),y=e.ref(null),W=e.ref(null),A=e.ref(0),Z=e.ref(0),J=e.ref(0),o=e.computed({get:()=>K(),set:t=>t});function K(){const t=de.useNestedProp({userConfig:h.config,defaultConfig:u});return t.theme?{...de.useNestedProp({userConfig:m.themes.vue_ui_molecule[t.theme]||h.config,defaultConfig:t}),customPalette:m.themePalettes[t.theme]||m.palette}:t}e.watch(()=>h.config,t=>{o.value=K(),B(),Z.value+=1,J.value+=1},{deep:!0});const{isPrinting:Q,isImaging:_,generatePdf:ee,generateImage:te}=ce.usePrinter({elementId:`cluster_${a.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ve=e.computed(()=>m.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function oe(t,n=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?oe(t[0].nodes,n+1):n}function pe(){const t=oe(h.dataset);let n=100,l=n;for(let i=0;i<t;i+=1)n/=1,l+=n;return{height:l,width:l}}const $=e.ref(pe()),I=e.ref(`0 0 ${$.value.width} ${$.value.height}`);function le(t,n={x:-$.value.width/2.43,y:$.value.height/2},l=$.value.width/1.1,i=24,s=0,p=0,V="#BBBBBB"){if(t&&t.length>0){const X=m.createPolygonPath({plot:n,radius:l,sides:t.length,rotation:s});t.forEach((f,F)=>{const R=X.coordinates[F];let P;if(f.ancestor?f.ancestor.ancestor?P=f.ancestor.color||V:(P=ve.value[p]||m.palette[p]||V,p+=1):P=V,f.polygonPath={coordinates:[R]},f.circleRadius=i,f.color=P,f.uid=m.createUid(),f.nodes&&f.nodes.length>0){const Y=!f.ancestor||!f.ancestor.ancestor?p:0;f.nodes=le(f.nodes,R,l/2.9,i/2.2,s+Math.PI*F/f.nodes.length,Y,P)}})}return t}function fe(t){const n=new Set;function l(s){s.forEach(p=>{p.color&&!n.has(p.color)&&n.add(p.color),p.nodes&&p.nodes.length>0&&l(p.nodes)})}l(t);const i={};return Array.from(n).forEach((s,p)=>{i[s]=`gradient_${p}`}),i}const me=e.computed(()=>fe(b.value)),b=e.computed(()=>le(h.dataset));function O(){x.value=!1,M.value=null,W.value=null,y.value=null,q({polygonPath:{coordinates:[{x:$.value.width/2,y:$.value.height/2}]},circleRadius:24})}const H=e.ref(null);function q(t){w.value.focus(),e.nextTick(()=>{H.value&&cancelAnimationFrame(H.value);const n=I.value.split(" "),l=parseFloat(n[0]),i=parseFloat(n[1]),s=parseFloat(n[2]),p=parseFloat(n[3]),{x:V,y:X}=t.polygonPath.coordinates[0],{circleRadius:f}=t,F=8.34,R=V-f*F,P=X-f*F,Y=f*F*2,xe=f*F*2,$e=Math.sqrt((R-l)**2+(P-i)**2),L=Math.min(1200,Math.max(20,Math.floor($e/10))),Pe=(R-l)/L,Fe=(P-i)/L,Ne=(Y-s)/L,Ee=(xe-p)/L;let E=0;function ue(){I.value=`${l+Pe*E} ${i+Fe*E} ${s+Ne*E} ${p+Ee*E}`,E+=o.value.style.chart.zoom.speed,E<=L&&(H.value=requestAnimationFrame(ue))}ue()})}function he(t){M.value===t.uid?O():(M.value=t.uid,W.value=t,y.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},q(t),x.value=t.uid!==b.value[0].uid)}function ge(t){if(t.target.nodeName!=="circle")O(),x.value=!1;else return}const j=e.ref(null);function ye(t){j.value={datapoint:t,seriesIndex:-1,series:b.value,config:o.value};const n=o.value.style.chart.tooltip.customFormat;if(m.isFunction(n)&&m.functionReturnsString(()=>n({seriesIndex:-1,datapoint:t,series:b.value,config:o.value})))v.value=n({seriesIndex:-1,datapoint:t,series:b.value,config:o.value});else{let l="";l+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(l+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),v.value=`<div style="font-family:inherit">${l}</div>`}}const ne=e.ref(null),T=e.ref(null);function ke(t){ne.value=t,t?(C.value=!0,ye(t),T.value=t.uid):(C.value=!1,v.value="",T.value=null)}function D(t){t==="right"&&(y.value.polygonPath.coordinates[0].x+=y.value.circleRadius),t==="left"&&(y.value.polygonPath.coordinates[0].x-=y.value.circleRadius),t==="top"&&(y.value.polygonPath.coordinates[0].y-=y.value.circleRadius),t==="bottom"&&(y.value.polygonPath.coordinates[0].y+=y.value.circleRadius),q(y.value)}function be(t){const n=[];function l(i){i.forEach(s=>{const p={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};n.push(p),s.nodes&&s.nodes.length>0&&l(s.nodes,s.name)})}return l(t),n}const Ce=e.computed(()=>be(b.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],n=Ce.value.map((s,p)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),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},i=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:n,config:l,colNames:i}});function re(){e.nextTick(()=>{const t=N.value.body.map((i,s)=>[[i[0].name],[i[1]],[i[2]]]),n=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),l=m.createCsvContent(n);m.downloadCsv({csvContent:l,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function Be(){return b.value}const S=e.ref(!1);function we(t){S.value=t,A.value+=1}function ae(){k.value.showTable=!k.value.showTable}function se(){k.value.showDataLabels=!k.value.showDataLabels}function ie(){k.value.showTooltip=!k.value.showTooltip}const U=e.ref(!1);function G(){U.value=!U.value}return g({getData:Be,generatePdf:ee,generateCsv:re,generateImage:te,toggleTable:ae,toggleLabels:se,toggleTooltip:ie,toggleAnnotator:G}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:n[7]||(n[7]=l=>{ne.value=null,T.value=null}),ref_key:"moleculeChart",ref:w,class:e.normalizeClass(`vue-ui-molecule ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${a.value}`},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Me.PenAndPaper,{key:0,parent:w.value,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:U.value,onClose:G},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",We,[(e.openBlock(),e.createBlock(Te._sfc_main,{key:`title_${Z.value}`,config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),o.value.userOptions.show&&c.value?(e.openBlock(),e.createBlock(ce.UserOptions,{ref_key:"details",ref:d,key:`user_options_${A.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(Q),isImaging:e.unref(_),uid:a.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,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:w.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:U.value,onToggleFullscreen:we,onGeneratePdf:e.unref(ee),onGenerateCsv:re,onGenerateImage:e.unref(te),onToggleTable:ae,onToggleLabels:se,onToggleTooltip:ie,onToggleAnnotator:G},e.createSlots({_:2},[t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(m.XMLNS),viewBox:I.value,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:${o.value.style.chart.color}`),onClick:n[0]||(n[0]=e.withModifiers(l=>ge(l),["stop"]))},[e.createVNode(ze._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(me.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(m.lightenHexColor)(l,.5)},null,8,Ke),e.createElementVNode("stop",{offset:"100%","stop-color":l},null,8,Qe)],8,Je))),256))]),e.createVNode(He,{dataset:b.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Ae,{dataset:b.value,hoveredUid:T.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:he,onHover:ke},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(je,{key:0,dataset:b.value,color:o.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:$.value},void 0,!0)],14,Ze)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Xe,{key:`direction_pad_${A.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:n[1]||(n[1]=l=>D("left")),onMoveRight:n[2]||(n[2]=l=>D("right")),onMoveTop:n[3]||(n[3]=l=>D("top")),onMoveBottom:n[4]||(n[4]=l=>D("bottom")),onReset:n[5]||(n[5]=l=>{O(),x.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",_e,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Q)||e.unref(_)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Re.default,{key:6,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),t.$slots.source?(e.openBlock(),e.createElementBlock("div",et,[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ve._sfc_main,{show:k.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:w.value,content:v.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),c.value?(e.openBlock(),e.createBlock(Le.default,{key:8,hideDetails:"",config:{open:k.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(Se.DataTable,{key:`table_${J.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:n[6]||(n[6]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,tt)]),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,Ye))}},lt=De._export_sfc(ot,[["__scopeId","data-v-1cc509ce"]]);exports.default=lt;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-eFox7weK.cjs"),Y=require("./Title-0Tp4hZ4u.cjs"),O=require("./usePrinter-CSRFnDBU.cjs"),J=require("./Legend-Cgw4lO2O.cjs"),f=require("./BaseIcon-uALK38Ov.cjs"),Q=require("./DataTable-DTzynbND.cjs"),Z=require("./vue-ui-skeleton-BqKzuhkB.cjs"),ee=require("./vue-ui-accordion-TEMpM1hO.cjs"),T=require("./useNestedProp-BkgEhTQY.cjs"),te=require("./PackageVersion-DwI-KhXH.cjs"),oe=require("./PenAndPaper-CDFVOo7X.cjs"),le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],re={key:1,style:"width:100%;background:transparent"},ne=["xmlns","viewBox"],se=["id"],ue=["stop-color"],ie=["stop-color"],ce=["x1","y1","x2","y2","stroke","stroke-width"],de=["d","stroke","stroke-width"],ye=["stroke"],ve=["fill"],me=["stroke"],he=["fill"],pe=["stroke"],fe=["fill"],ke=["stroke"],ge=["fill"],be=["stroke"],Ce=["fill"],Ne=["d","stroke","stroke-width","fill"],xe=["x1","y1","stroke"],we=["cx","cy","fill","stroke"],_e=["fill","stroke"],Ve=["y","fill","font-weight"],Pe=["y","fill"],$e={key:4,class:"vue-data-ui-watermark"},Be=["onClick"],Me={style:{"font-weight":"bold"}},Ee={key:7,ref:"source",dir:"auto"},Ae=["innerHTML"],Se={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(I,{expose:F}){const s=I,{vue_ui_mood_radar:D}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),N=e.ref(null),q=e.ref(null),n=e.ref(null),z=e.ref(0),j=e.ref(0),V=e.ref(0),t=e.computed({get:()=>P(),set:l=>l});function P(){const l=T.useNestedProp({userConfig:s.config,defaultConfig:D});return l.theme?{...T.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=P(),_(),z.value+=1,j.value+=1,V.value+=1},{deep:!0});const{isPrinting:$,isImaging:B,generatePdf:M,generateImage:E}=O.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),k=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),x=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function W({centerX:l,centerY:a,apexX:o,apexY:u,proportion:c,key:p,value:K}){return{x:l+(o-l)*c,y:a+(u-a)*c,key:p,value:K}}const G=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),v=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),i=e.computed(()=>Object.keys(s.dataset).map((l,a)=>{const o=typeof s.dataset[l]!="number"||isNaN(s.dataset[l])?0:s.dataset[l];return{index:a,key:l,value:o,proportion:o/v.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),A=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),x.value.coordinates.map((l,a)=>{const o=W({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:i.value[a].value/G.value,key:i.value[a].key,value:i.value[a].value});return{...l,plots:o,key:i.value[a].key}})):[]),R=e.computed(()=>({cy:"mood-radar-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function U(l){l===n.value?n.value=null:n.value=l}const y=e.computed(()=>{const l=i.value.map(o=>({name:o.key,color:o.color})),a=i.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function S(){e.nextTick(()=>{const l=y.value.head.map((u,c)=>[[u.name],[y.value.body[c]],[isNaN(y.value.body[c]/v.value)?"-":y.value.body[c]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const g=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,p)=>[{color:c.color,name:c.name},y.value.body[p].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[p]/v.value)?"-":(y.value.body[p]/v.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:u}});function H(){return i.value}function L(){k.value.showTable=!k.value.showTable}const b=e.ref(!1);function X(l){b.value=l}const C=e.ref(!1);function w(){C.value=!C.value}return F({getData:H,generatePdf:M,generateCsv:S,generateImage:E,toggleTable:L,toggleAnnotator:w}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:N,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(oe.PenAndPaper,{key:0,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:w},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",re,[e.createVNode(Y._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(O.UserOptions,{key:2,ref_key:"details",ref:q,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref($),isImaging:e.unref(B),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:X,onGeneratePdf:e.unref(M),onGenerateCsv:S,onGenerateImage:e.unref(E),onToggleTable:L,onToggleAnnotator:w},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(te._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,ue),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,ie)],8,se)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ce))),256)),e.createElementVNode("path",{d:x.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,de),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[5],"stroke-width":"1","stroke-linecap":"round",d:"M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"},null,8,ye),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>n.value=5),onMouseleave:a[1]||(a[1]=o=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,ve),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[4],"stroke-width":"1","stroke-linecap":"round",d:"M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"},null,8,me),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>n.value=4),onMouseleave:a[3]||(a[3]=o=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,he),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[3],"stroke-width":"1","stroke-linecap":"round",d:"M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"},null,8,pe),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>n.value=3),onMouseleave:a[5]||(a[5]=o=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,fe),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,ke),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>n.value=2),onMouseleave:a[7]||(a[7]=o=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,ge),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,be),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>n.value=1),onMouseleave:a[9]||(a[9]=o=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,Ce),e.createElementVNode("path",{d:e.unref(r.makePath)(A.value.map(o=>o.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ne),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value.map(o=>o.plots),(o,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,xe),e.createElementVNode("circle",{cx:o.x,cy:o.y,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,we),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,_e),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),9,Ve),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.value/v.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,Pe)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,ne)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",$e,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref($)||e.unref(B)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Z.default,{key:5,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(J.Legend,{legendSet:i.value,config:R.value,key:`legend_${V.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>U(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(f.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==2?(e.openBlock(),e.createBlock(f.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==3?(e.openBlock(),e.createBlock(f.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==4?(e.openBlock(),e.createBlock(f.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==5?(e.openBlock(),e.createBlock(f.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",Me,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Be)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:i.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Ee,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(ee.default,{key:8,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.createVNode(Q.DataTable,{colNames:g.value.colNames,head:g.value.head,body:g.value.body,config:g.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[10]||(a[10]=o=>k.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Ae)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ae))}},Le=le._export_sfc(Se,[["__scopeId","data-v-03614b4a"]]);exports.default=Le;
@@ -1,17 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-eFox7weK.cjs"),fe=require("./useResponsive-CodiGUOE.cjs"),$e=require("./Title-0Tp4hZ4u.cjs"),pe=require("./usePrinter-CSRFnDBU.cjs"),_e=require("./DataTable-DTzynbND.cjs"),Ne=require("./Tooltip-9Tp2Yrd1.cjs"),Se=require("./Legend-Cgw4lO2O.cjs"),Ee=require("./vue-ui-skeleton-BqKzuhkB.cjs"),Ve=require("./vue-ui-accordion-TEMpM1hO.cjs"),he=require("./useNestedProp-BkgEhTQY.cjs"),Fe=require("./PackageVersion-DwI-KhXH.cjs"),Te=require("./PenAndPaper-CDFVOo7X.cjs"),Pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),q=x=>(e.pushScopeId("data-v-65f48b0a"),x=x(),e.popScopeId(),x),De=["id"],ze=["xmlns","viewBox"],Oe=["id"],Ie=q(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Ae=["offset","stop-color"],Me=["offset","stop-opacity"],Re=q(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),qe=["id"],Ue=["id"],Ye=q(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Xe=["id"],Ge=["flood-color"],He=["d","fill","stroke","stroke-width","filter"],We={key:0},Je=["d","fill"],Ke={key:1},Qe=["x","y","font-size","font-weight","fill"],Ze={key:2},je=["filter"],et=["text-anchor","x","y","fill","font-size","font-weight"],tt=["text-anchor","x","y","fill","font-size","font-weight"],lt=["text-anchor","x","y","fill","font-size","font-weight"],at=["d","fill","onMouseenter","onClick"],ot={key:4,class:"vue-data-ui-watermark"},nt={key:0,class:"vue-ui-nested-donuts-legend-title"},rt=["onClick"],st=["innerHTML"],ut={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(x,{expose:ye,emit:U}){const k=x,{vue_ui_nested_donuts:me}=r.useConfig(),$=e.computed(()=>!!k.dataset&&k.dataset.length),p=e.ref(r.createUid()),T=e.ref(!1),P=e.ref(""),be=e.ref(null),Y=e.ref(0),w=e.ref(null),X=e.ref(null),D=e.ref(null),G=e.ref(null),H=e.ref(0),W=e.ref(0),J=e.ref(0),B=e.ref(!1);function ge(l){B.value=l,Y.value+=1}const t=e.computed({get:()=>K(),set:l=>l});function K(){const l=he.useNestedProp({userConfig:k.config,defaultConfig:me});return l.theme?{...he.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>k.config,l=>{t.value=K(),Q(),H.value+=1,W.value+=1,J.value+=1},{deep:!0});const _=e.ref(null);e.onMounted(()=>{Q()});function Q(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=fe.throttle(()=>{const{width:s,height:o}=fe.useResponsive({chart:w.value,title:t.value.style.chart.title.text?X.value:null,legend:t.value.style.chart.legend.show?D.value:null,source:G.value});d.value.width=s,d.value.height=o});_.value=new ResizeObserver(l),_.value.observe(w.value.parentNode)}}e.onBeforeUnmount(()=>{_.value&&_.value.disconnect()});const{isPrinting:Z,isImaging:j,generatePdf:ee,generateImage:te}=pe.usePrinter({elementId:`nested_donuts_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),ke=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),d=e.ref({height:512,width:512});function Ce({datapoint:l,index:s}){U("selectDatapoint",{datapoint:l,index:s})}const v=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,s)=>({...l,total:l.series.filter(o=>!v.value.includes(o.id)).map(o=>r.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:s,id:`${p.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${p.value}_${s}`,id:`${p.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||ke.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:r.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(d.value.height,d.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),le=e.computed(()=>[...m.value].map((l,s)=>{const o=l.series.filter(n=>!v.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!v.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function Le(l,s,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<s}const c=e.ref(le.value);e.watch(()=>le.value,l=>c.value=l);const ae=e.ref(null),oe=e.ref(null);function z(l){U("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=c.value.flatMap(i=>i.series).find(i=>i.id===l.id);let a=o?o.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),f=Le(u,u.length-1,v.value);if(v.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(ae.value),c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),ae.value=requestAnimationFrame(i))};v.value=v.value.filter(y=>y!==l.id),i()}else if(f){let i=function(){a<.1?(cancelAnimationFrame(oe.value),v.value.push(l.id),c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:0}:L)}))):(a/=1.1,c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:a}:L)})),oe.value=requestAnimationFrame(i))};i()}}const O=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),ne=e.computed(()=>c.value.map((l,s)=>b.value-s*b.value/m.value.length)),N=e.computed(()=>c.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.makeDonut({series:l.series},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,O.value)}})),re=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),se=e.ref(null),S=e.ref(null),E=e.ref(null),I=e.ref(null);function we({datapoint:l,_relativeIndex:s,seriesIndex:o}){se.value=l.arcOfId,S.value=l.id,E.value=o,I.value={datapoint:l,seriesIndex:o,series:c.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:c.value,config:t.value})))P.value=n({seriesIndex:o,datapoint:l,series:c.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0){const u=c.value.map(f=>f.series.find(i=>i.seriesIndex===o));u.forEach((f,i)=>{if(!f)return"";a+=`
2
- <div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i<u.length-1?`border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor}`:""}">
3
- <div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
4
- <svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">
5
- <circle cx="10" cy="10" r="10" fill="${f.color}"/>
6
- </svg>
7
- <span>
8
- ${f.arcOf??""} - ${f.name}
9
- </span>
10
- </div>
11
- <span>
12
- ${t.value.style.chart.tooltip.showValue?`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}
13
- </b>`:""}
14
- ${t.value.style.chart.tooltip.showPercentage?`(${r.dataLabel({v:f.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})`:""}
15
- </span>
16
- </div>
17
- `})}else a+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.arcOf??""} - ${l.name}</div>`,a+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(a+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?a+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:a+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`);P.value=`<div style="font-size:${t.value.style.chart.tooltip.fontSize}px">${a}</div>`}T.value=!0}function A(l){return l.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function ue(l,s){if(!t.value.useBlurOnHover)return"";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0)return[null,void 0].includes(E.value)||E.value===s?"":`url(#blur_${p.value})`;if(!t.value.style.chart.tooltip.showAllItemsAtIndex||v.value.length)return[null,void 0].includes(S.value)||S.value===l.id?"":`url(#blur_${p.value})`}const M=e.computed(()=>m.value.map((l,s)=>l.series.map((o,n)=>({name:o.name,color:o.color,value:o.value,shape:"circle",arcOf:o.arcOf,id:o.id,seriesIndex:n,datasetIndex:s,total:l.series.filter(a=>!v.value.includes(a.id)).map(a=>a.value).reduce((a,u)=>a+u,0)})).map(o=>({...o,opacity:v.value.includes(o.id)?.5:1,segregate:()=>z(o),isSegregated:v.value.includes(o.id)})))),xe=e.computed(()=>({cy:"nested-donuts-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),C=e.computed(()=>{const l=c.value.flatMap(o=>o.series.map(n=>({name:`${o.name} - ${n.name}`,color:n.color,total:o.total}))),s=c.value.flatMap(o=>o.series.map(n=>n.value));return{head:l,body:s}});function ie(){e.nextTick(()=>{const l=C.value.head.map((n,a)=>[[n.name],[C.value.body[a]],[isNaN(C.value.body[a]/n.total)?"-":C.value.body[a]/n.total*100]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(s);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-nested-donuts"})})}const V=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],s=C.value.head.map((a,u)=>{const f=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:C.value.body[u],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:a.color,name:a.name},f,isNaN(C.value.body[u]/a.total)?"-":r.dataLabel({v:C.value.body[u]/a.total*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:s,config:o}});function Be(){return m.value}function ce(){h.value.showTable=!h.value.showTable}function de(){h.value.dataLabels.show=!h.value.dataLabels.show}function ve(){h.value.showTooltip=!h.value.showTooltip}const F=e.ref(!1);function R(){F.value=!F.value}return ye({getData:Be,generatePdf:ee,generateCsv:ie,generateImage:te,toggleTable:ce,toggleLabels:de,toggleTooltip:ve,toggleAnnotator:R}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"nestedDonutsChart",ref:w,class:e.normalizeClass(`vue-ui-nested-donuts ${B.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${!t.value.style.chart.title.text&&t.value.userOptions.show?"padding-top:36px":""};background:${t.value.style.chart.backgroundColor}`),id:`nested_donuts_${p.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Te.PenAndPaper,{key:0,parent:w.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:F.value,onClose:R},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:X},[(e.openBlock(),e.createBlock($e._sfc_main,{key:`title_${H.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(pe.UserOptions,{ref:"details",key:`user_option_${Y.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Z),isImaging:e.unref(j),uid:p.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,isFullscreen:B.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:w.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:ge,onGeneratePdf:e.unref(ee),onGenerateCsv:ie,onGenerateImage:e.unref(te),onToggleTable:ce,onToggleLabels:de,onToggleTooltip:ve,onToggleAnnotator:R},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),viewBox:`0 0 ${d.value.width<=0?.001:d.value.width} ${d.value.height<0?.001:d.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Fe._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(re.value,(o,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`radial_${p.value}_${n}`},[Ie,e.createElementVNode("stop",{offset:`${(1-O.value/ne.value[n])*100}%`,"stop-color":e.unref(r.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,Ae),e.createElementVNode("stop",{offset:`${(1-O.value/ne.value[n]/2)*100}%`,"stop-color":"#FFFFFF","stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,Me),Re],8,Oe))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${p.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${p.value}`},null,8,Ue),Ye],8,qe),e.createElementVNode("filter",{id:`shadow_${p.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,Ge)],8,Xe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{class:"vue-ui-donut-arc-path",d:a.arcSlice,fill:e.unref(r.setOpacity)(a.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:ue(a,u)},null,8,He)]))),256))]))),256)),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(re.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:o.donut.arcSlice,fill:`url(#radial_${p.value}_${n})`,stroke:"transparent","stroke-width":"0"},null,8,Je)]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.showDonutName?(e.openBlock(),e.createElementBlock("g",Ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[u===0&&d.value.width&&d.value.height?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),x:d.value.width/2,y:a.startY-t.value.style.chart.layout.labels.dataLabels.fontSize+t.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,"text-anchor":"middle","font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldDonutName?"bold":"normal",fill:t.value.style.chart.layout.labels.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation?e.unref(r.abbreviate)({source:o.name,length:t.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize}):o.name),11,Qe)):e.createCommentVNode("",!0)]))),256))]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",{filter:ue(a,u)},[A(a)&&h.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldPercentage?"bold":"normal"},e.toDisplayString(e.unref(r.dataLabel)({v:a.proportion*100,s:"%",r:t.value.style.chart.layout.labels.dataLabels.roundingPercentage})),11,et)):e.createCommentVNode("",!0),A(a)&&h.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:1,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY)+t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"}," ("+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u}))+") ",11,tt)):e.createCommentVNode("",!0),A(a)&&h.value.dataLabels.show&&!t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:2,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u})),11,lt)):e.createCommentVNode("",!0)],8,je))),256))]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{"data-cy-donut-trap":"",d:a.arcSlice,fill:be.value===n?"rgba(0,0,0,0.1)":"transparent",onMouseenter:f=>we({datapoint:a,relativeIndex:n,seriesIndex:a.seriesIndex}),onClick:f=>Ce({datapoint:a,index:u}),onMouseleave:s[0]||(s[0]=f=>{T.value=!1,se.value=null,S.value=null,E.value=null})},null,40,at)]))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,ze)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ot,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Z)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ee.default,{key:5,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Ne._sfc_main,{show:h.value.showTooltip&&T.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:w.value,content:P.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...I.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...I.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"chartLegend",ref:D,class:e.normalizeClass({"vue-ui-nested-donuts-legend":M.value.length>1})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(o,n)=>(e.openBlock(),e.createBlock(Se.Legend,{key:`legend_${n}_${J.value}`,legendSet:o,config:xe.value,onClickMarker:s[1]||(s[1]=({legend:a})=>z(a))},{legendTitle:e.withCtx(({titleSet:a})=>[a[0]&&a[0].arcOf?(e.openBlock(),e.createElementBlock("div",nt,e.toDisplayString(a[0].arcOf),1)):e.createCommentVNode("",!0)]),item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:f=>z(a),style:e.normalizeStyle(`opacity:${v.value.includes(a.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:a,seriesIndex:u}))+" ",1),v.value.includes(a.id)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" ( - % ) ")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" ("+e.toDisplayString(isNaN(a.value/a.total)?"-":e.unref(r.dataLabel)({v:a.value/a.total*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],64))],12,rt)]),_:2},1032,["legendSet","config"]))),128))],2)):e.createCommentVNode("",!0),t.value.style.chart.legend.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"chartLegend",ref:D},[e.renderSlot(l.$slots,"legend",{legend:M.value},void 0,!0)],512)),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"source",ref:G,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createBlock(Ve.default,{key:9,hideDetails:"",config:{open:h.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(_e.DataTable,{key:`table_${W.value}`,colNames:V.value.colNames,head:V.value.head,body:V.value.body,config:V.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[2]||(s[2]=o=>h.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,st)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,De))}},it=Pe._export_sfc(ut,[["__scopeId","data-v-65f48b0a"]]);exports.default=it;
@@ -1,5 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-eFox7weK.cjs"),Q=require("./useResponsive-CodiGUOE.cjs"),ge=require("./Title-0Tp4hZ4u.cjs"),Z=require("./usePrinter-CSRFnDBU.cjs"),me=require("./Legend-Cgw4lO2O.cjs"),ye=require("./DataTable-DTzynbND.cjs"),be=require("./Tooltip-9Tp2Yrd1.cjs"),ke=require("./vue-ui-skeleton-BqKzuhkB.cjs"),Ce=require("./vue-ui-accordion-TEMpM1hO.cjs"),ee=require("./useNestedProp-BkgEhTQY.cjs"),we=require("./PackageVersion-DwI-KhXH.cjs"),$e=require("./PenAndPaper-CDFVOo7X.cjs"),xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Be=["id"],Te=["xmlns","viewBox"],Pe=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Se=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],_e=["id"],Ne=["stdDeviation"],Oe=["filter"],Ae=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],Ve=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],Fe={key:1},Ie=["onMouseenter"],Ee=["x","y","font-size","fill","font-weight"],Le={key:4,class:"vue-data-ui-watermark"},Me=["onClick"],Re=["innerHTML"],De={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(te,{expose:ae,emit:le}){const p=te,{vue_ui_onion:oe}=u.useConfig(),w=e.computed(()=>!!p.dataset&&p.dataset.length),m=e.ref(u.createUid()),re=e.ref(null),F=e.ref(0),$=e.ref(!1),P=e.ref(""),d=e.ref([]),y=e.ref(null),I=e.ref(null),E=e.ref(null),L=e.ref(null),M=e.ref(0),R=e.ref(0),D=e.ref(0),t=e.computed({get:()=>z(),set:a=>a});function z(){const a=ee.useNestedProp({userConfig:p.config,defaultConfig:oe});return a.theme?{...ee.useNestedProp({userConfig:u.themes.vue_ui_onion[a.theme]||p.config,defaultConfig:a}),customPalette:u.themePalettes[a.theme]||u.palette}:a}e.watch(()=>p.config,a=>{t.value=z(),G(),M.value+=1,R.value+=1,D.value+=1},{deep:!0});const{isPrinting:q,isImaging:Y,generatePdf:X,generateImage:U}=Z.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion"}),ne=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),f=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),n=e.ref({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),x=e.ref(null);e.onMounted(()=>{G()});function G(){if(u.objectIsEmpty(p.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=Q.throttle(()=>{const{width:l,height:o}=Q.useResponsive({chart:y.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?E.value:null,source:L.value});n.value.width=l,n.value.height=o,n.value.padding.top=Math.max(l,o)*.125,n.value.padding.right=Math.max(l,o)*.125,n.value.padding.bottom=Math.max(l,o)*.125,n.value.padding.left=Math.max(l,o)*.125,n.value.minRadius=Math.min(l,o)*.125});x.value=new ResizeObserver(r),x.value.observe(y.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(p.dataset.forEach((a,r)=>{[null,void 0].includes(a.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(a.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),p.dataset.map((a,r)=>{const l=`onion_serie_${r}_${m.value}`;return{...a,percentage:a.percentage||0,targetPercentage:a.percentage||0,color:u.convertColorToHex(a.color)||ne.value[r]||u.palette[r],id:l,shape:"circle",opacity:d.value.includes(l)?.5:1,absoluteIndex:r,segregate:()=>H(l),isSegregated:d.value.includes(l)}}))),b=e.ref(i.value),ue=e.computed(()=>t.value.useStartAnimation),se=e.ref(null),ie=e.computed(()=>Math.max(...i.value.map(a=>a.percentage))),S=e.ref(!1);e.watch(()=>i.value,ce,{immediate:!0});function ce(){if(ue.value&&!S.value){let r=function(){a>=ie.value?(cancelAnimationFrame(se.value),b.value=i.value,S.value=!0):(b.value=i.value.map(l=>({...l,percentage:a<l.targetPercentage?a:l.targetPercentage})),a+=1,requestAnimationFrame(r),S.value=!0)};b.value=i.value.map(l=>({...l,percentage:0}));let a=0;r()}else b.value=i.value}const de=e.computed(()=>({cy:"onion-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),ve=e.computed(()=>i.value.filter(a=>!d.value.includes(a.id)).length),g=e.computed(()=>{const a=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(a>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:a)*t.value.style.chart.layout.gutter.width,track:(a>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:a)*t.value.style.chart.layout.track.width}}),v=e.computed(()=>b.value.filter(a=>!d.value.includes(a.id)).map((a,r)=>{const l=(s.value.maxRadius-g.value.track)/ve.value/2*(1+r),o=s.value.centerY-l;return{percentage:a.percentage||0,...a,labelY:o,radius:l,path:he(l,a.percentage||0)}}));function he(a,r){const l=2*Math.PI*a,o=l*.75,c=`${o} ${l}`,C=o*(1-r/100);return{bgDashArray:`${o} ${l}`,bgDashOffset:0,dashArray:c,dashOffset:C,fullOffset:0,active:`
2
- M ${s.value.centerX},${s.value.centerY-a}
3
- A ${a},${a} 0 1 1
4
- ${s.value.centerX+a*Math.cos(Math.PI*3/4)},${s.value.centerY+a*Math.sin(Math.PI*3/4)}
5
- `.trim()}}function H(a){d.value.includes(a)?d.value=d.value.filter(r=>r!==a):d.value.push(a),le("selectLegend",v.value)}function pe(){return v.value}const _=e.computed(()=>{const a=[t.value.table.translations.serie,t.value.table.translations.percentage,t.value.table.translations.value],r=v.value.map(l=>[l.name,l.percentage,l.value]);return{head:a,body:r}}),B=e.computed(()=>{const a=_.value.head,r=v.value.map(o=>[`<span style="color:${o.color}">⬤</span> ${o.name}`,`${Number(o.percentage??0).toFixed(t.value.table.td.roundingPercentage).toLocaleString()}%`,`${o.prefix||""}${[null,void 0,NaN,"NaN"].includes(o.value)?"-":o.value.toFixed(t.value.table.td.roundingValue).toLocaleString()}${o.suffix||""}`]),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};return{head:a,body:r,config:l,colNames:a}});function W(){e.nextTick(()=>{const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=_.value.head,l=_.value.body,o=a.concat([r]).concat(l),c=u.createCsvContent(o);u.downloadCsv({csvContent:c,title:t.value.style.chart.title.text||"vue-ui-onion"})})}const h=e.ref(void 0),k=e.ref(!1);function fe(a){k.value=a,F.value+=1}const N=e.ref(null);function j({datapoint:a,seriesIndex:r,show:l=!0}){const o=a.absoluteIndex;h.value=r,N.value={datapoint:a,seriesIndex:o,series:i.value,config:t.value},$.value=l;let c="";const C=t.value.style.chart.tooltip.customFormat;if(u.isFunction(C)&&u.functionReturnsString(()=>C({seriesIndex:o,datapoint:a,series:i.value,config:t.value})))P.value=C({seriesIndex:o,datapoint:a,series:i.value,config:t.value});else{const A=t.value.style.chart.tooltip.showPercentage,V=t.value.style.chart.tooltip.showValue;c+=`<div style="width: 100%; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; padding-bottom: 6px;margin-bottom:3px;display:flex;flex-direction:row;gap:3px;align-items:center"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${a.color}"/></svg><span></span>${a.name}</span></div>`,c+=`<div style="width:100%;text-align:left;"><b>${A?u.dataLabel({p:"",v:a.percentage,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}):""}</b> ${A&&V?"(":""}${V?u.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,a.value,u.dataLabel({p:a.prefix||"",v:a.value,s:a.suffix||"",r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:r}):""}${A&&V?")":""}</div>`,P.value=`<div>${c}</div>`}}function J(){f.value.showTable=!f.value.showTable}function K(){f.value.showTooltip=!f.value.showTooltip}const T=e.ref(!1);function O(){T.value=!T.value}return ae({getData:pe,generatePdf:X,generateCsv:W,generateImage:U,toggleTable:J,toggleTooltip:K,toggleAnnotator:O}),(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-onion ${k.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"onionChart",ref:y,id:`vue-ui-onion_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock($e.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:T.value,onClose:O},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:I,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(ge._sfc_main,{key:`title_${M.value}`,config:{title:{cy:"onion-div-title",...t.value.style.chart.title},subtitle:{cy:"onion-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&w.value?(e.openBlock(),e.createBlock(Z.UserOptions,{ref_key:"details",ref:re,key:`user_options${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(Y),isPrinting:e.unref(q),uid:m.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,isTooltip:f.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:T.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(X),onGenerateCsv:W,onGenerateImage:e.unref(U),onToggleTable:J,onToggleTooltip:K,onToggleAnnotator:O},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${n.value.width<=0?1e-4:n.value.width} ${n.value.height<=0?1e-4:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(we._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:t.value.style.chart.layout.gutter.color,"stroke-width":g.value.gutter,fill:"none","stroke-dasharray":l.path.bgDashArray,"stroke-dashoffset":l.path.fullOffset,"stroke-linecap":"round",class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(h.value)&&h.value!==o}),style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,Pe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<0?1e-4:l.radius,stroke:`${l.color}`,"stroke-width":g.value.track,fill:"none","stroke-dasharray":l.path.dashArray,"stroke-dashoffset":l.path.dashOffset,class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(h.value)&&h.value!==o}),"stroke-linecap":"round",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,Se))),256)),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.gradientIntensity},null,8,Ne)],8,_e)]),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",{key:0,filter:`url(#blur_${m.value})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:"white","stroke-width":g.value.track/3,fill:"none","stroke-linecap":"round","stroke-dasharray":l.path.dashArray,"stroke-dashoffset":l.path.dashOffset,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,Ae))),256))],8,Oe)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{"data-cy-trap":"",cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:"transparent","stroke-width":Math.max(g.value.track,g.value.gutter),fill:"none","stroke-dasharray":l.path.bgDashArray,"stroke-dashoffset":l.path.fullOffset,"stroke-linecap":"round",class:"vue-ui-onion-path",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"},onMouseenter:c=>j({datapoint:l,show:!0,seriesIndex:o}),onMouseleave:r[0]||(r[0]=c=>{h.value=void 0,$.value=!1})},null,40,Ve))),256)),t.value.style.chart.layout.labels.show?(e.openBlock(),e.createElementBlock("g",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",{onMouseenter:c=>j({datapoint:l,show:!0,seriesIndex:o}),onMouseleave:r[1]||(r[1]=c=>{h.value=void 0,$.value=!1})},[d.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:0,x:n.value.width/2-g.value.gutter*.8+t.value.style.chart.layout.labels.offsetX,y:l.labelY+t.value.style.chart.layout.labels.offsetY,"text-anchor":"end","font-size":t.value.style.chart.layout.labels.fontSize,fill:t.value.useBlurOnHover&&![null,void 0].includes(h.value)&&h.value===o?l.color:t.value.style.chart.layout.labels.color,"font-weight":t.value.style.chart.layout.labels.bold?"bold":"normal"},e.toDisplayString(l.name?l.name+": ":"")+" "+e.toDisplayString(t.value.style.chart.layout.labels.percentage.show?e.unref(u.dataLabel)({v:l.percentage,s:"%",r:t.value.style.chart.layout.labels.roundingPercentage}):"")+" "+e.toDisplayString(!t.value.style.chart.layout.labels.percentage.show&&t.value.style.chart.layout.labels.value.show?`: ${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(u.dataLabel)({p:l.prefix||"",v:l.value||0,s:l.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:l,seriesIndex:o})}`:`${t.value.style.chart.layout.labels.value.show&&l.value?`(${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(u.dataLabel)({p:l.prefix||"",v:l.value||0,s:l.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:l,seriesIndex:o})})`:""}`),9,Ee))],40,Ie))),256))])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:n.value},void 0,!0)],14,Te)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Le,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(Y)})),void 0,!0)])):e.createCommentVNode("",!0),w.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:5,config:{type:"onion",style:{backgroundColor:t.value.style.chart.backgroundColor,onion:{color:t.value.style.chart.layout.gutter.color}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:E},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(me.Legend,{key:`legend_${D.value}`,legendSet:i.value,config:de.value,onClickMarker:r[2]||(r[2]=({legend:l})=>H(l.id))},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>l.segregate(),style:e.normalizeStyle(`opacity:${d.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name?l.name+": ":"")+" "+e.toDisplayString((l.percentage||0).toFixed(t.value.style.chart.legend.roundingPercentage))+"% ",13,Me)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:i.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:L,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(be._sfc_main,{show:f.value.showTooltip&&$.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:y.value,content:P.value,isCustom:e.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),w.value?(e.openBlock(),e.createBlock(Ce.default,{key:7,hideDetails:"",config:{open:f.value.showTable,maxHeight:1e4,head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ye.DataTable,{key:`table_${R.value}`,colNames:B.value.colNames,head:B.value.head,body:B.value.body,config:B.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[3]||(r[3]=l=>f.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),td:e.withCtx(({td:l})=>[e.createElementVNode("div",{innerHTML:l},null,8,Re)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Be))}},ze=xe._export_sfc(De,[["__scopeId","data-v-71fb43d0"]]);exports.default=ze;
@@ -1,8 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-eFox7weK.cjs"),ne=require("./useResponsive-CodiGUOE.cjs"),be=require("./Title-0Tp4hZ4u.cjs"),ke=require("./Legend-Cgw4lO2O.cjs"),xe=require("./Tooltip-9Tp2Yrd1.cjs"),Ce=require("./Shape-D2Dpshg1.cjs"),se=require("./usePrinter-CSRFnDBU.cjs"),we=require("./DataTable-DTzynbND.cjs"),Be=require("./vue-ui-accordion-TEMpM1hO.cjs"),$e=require("./vue-ui-skeleton-BqKzuhkB.cjs"),re=require("./useNestedProp-BkgEhTQY.cjs"),Se=require("./PackageVersion-DwI-KhXH.cjs"),ze=require("./PenAndPaper-CDFVOo7X.cjs"),Ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ae=["id"],Pe=["xmlns","viewBox"],Te={style:{"pointer-events":"none"}},_e=["x1","x2","y1","y2","stroke","stroke-width"],Fe=["x","y","fill","font-size","font-weight"],Me=["x1","x2","y1","y2","stroke","stroke-width"],Le=["x","y","fill","font-size","font-weight"],Ee={key:0},Ie=["x","y","font-size","fill"],Ve=["width","x","y"],Oe={style:{width:"100%"}},De=["x","y","fill","font-weight","font-size","onMouseenter"],qe=["d","stroke","stroke-width","onMouseenter"],Re={key:4,class:"vue-data-ui-watermark"},Ue=["onClick"],We=["innerHTML"],je={__name:"vue-ui-parallel-coordinate-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ie,{expose:ue,emit:E}){const b=ie,{vue_ui_parallel_coordinate_plot:ce}=i.useConfig(),x=e.computed({get(){return!!b.dataset&&b.dataset.length},set(a){return a}}),I=e.ref(0),C=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(null),q=e.ref(0),R=e.ref(0),U=e.ref(0),A=e.ref(i.createUid()),B=e.ref(!1);function de(a){B.value=a,I.value+=1}const t=e.computed({get:()=>W(),set:a=>a});function W(){const a=re.useNestedProp({userConfig:b.config,defaultConfig:ce});return a.theme?{...re.useNestedProp({userConfig:i.themes.vue_ui_parallel_coordinate_plot[a.theme]||b.config,defaultConfig:a}),customPalette:i.themePalettes[a.theme]||i.palette}:a}e.watch(()=>b.config,a=>{t.value=W(),j(),q.value+=1,U.value+=1,R.value+=1},{deep:!0});const S=e.ref(null);e.onMounted(()=>{j()});function j(){if(i.objectIsEmpty(b.dataset)?i.error({componentName:"VueUiParallelCoordinatePlot",type:"dataset"}):b.dataset.forEach((a,o)=>{i.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","series"]}).forEach(l=>{x.value=!1,i.error({componentName:"VueUiParallelCoordinatePlot",type:"datasetSerieAttribute",property:l,index:o})})}),t.value.responsive){const a=ne.throttle(()=>{const{width:o,height:l}=ne.useResponsive({chart:C.value,title:t.value.style.chart.title.text?V.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:D.value});c.value.width=o,c.value.height=l,c.value.plotSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.plots.radius,threshold:2,fallback:2}),c.value.ticksFontSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.ticks.fontSize,threshold:10,fallback:10}),c.value.datapointFontSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.datapoints.fontSize,threshold:10,fallback:10}),c.value.axisNameFontSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.axisNamesFontSize,threshold:12,fallback:12})});S.value=new ResizeObserver(a),S.value.observe(C.value.parentNode)}}e.onBeforeUnmount(()=>{S.value&&S.value.disconnect()});const{isPrinting:H,isImaging:G,generatePdf:Y,generateImage:X}=se.usePrinter({elementId:`pcp_${A.value}`,fileName:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"}),c=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width,plotSize:t.value.style.chart.plots.radius,ticksFontSize:t.value.style.chart.yAxis.labels.ticks.fontSize,datapointFontSize:t.value.style.chart.yAxis.labels.datapoints.fontSize,axisNameFontSize:t.value.style.chart.yAxis.labels.axisNamesFontSize}),d=e.computed(()=>{const{top:a,right:o,bottom:l,left:n}=t.value.style.chart.padding,r=c.value.height,s=c.value.width;return{chartHeight:r,chartWidth:s,height:r-a-l,width:s-n-o,top:a,left:n,right:s-o,bottom:r-l}}),ve=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),m=e.ref({dataLabels:{show:t.value.style.chart.yAxis.labels.datapoints.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),f=e.ref([]);function J(a){f.value.includes(a)?f.value=f.value.filter(o=>o!==a):f.value.push(a)}const k=e.computed(()=>b.dataset.map((a,o)=>{const l=i.convertColorToHex(a.color)||ve.value[o]||i.palette[o]||i.palette[o%i.palette.length];return{...a,series:a.series.map(n=>({...n,id:i.createUid(),color:l})),seriesIndex:o,color:l,id:i.createUid(),shape:a.shape||"circle"}})),pe=e.computed(()=>k.value.map(a=>({...a,opacity:f.value.includes(a.id)?.5:1,segregate:()=>J(a.id),isSegregated:f.value.includes(a.id)}))),he=e.computed(()=>({cy:"pcp-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),K=e.computed(()=>Math.max(...k.value.filter(a=>!f.value.includes(a.id)).map(a=>Math.max(...a.series.flatMap(o=>o.values.length))))),y=e.computed(()=>d.value.width/K.value),P=e.computed(()=>k.value.filter(a=>!f.value.includes(a.id))),h=e.computed(()=>{let a=[];for(let o=0;o<K.value;o+=1){const l=Math.min(...P.value.flatMap(v=>v.series.map(N=>N.values[o]||0)||0)),n=Math.max(...P.value.flatMap(v=>v.series.map(N=>N.values[o]||0)||0)),r=n===l?l/4:l,s=n===l?n*2:n,u=i.calculateNiceScale(r,s,t.value.style.chart.yAxis.scaleTicks),g=u.ticks.map((v,N)=>{const fe=u.min<0?v+Math.abs(u.min):v-Math.abs(u.min),ge=u.min<0?u.max+Math.abs(u.min):u.max-Math.abs(u.min);return{y:d.value.bottom-d.value.height*(fe/ge),x:d.value.left+y.value*o+y.value/2,value:v}});a.push({scale:u,ticks:g,name:t.value.style.chart.yAxis.labels.axisNames[o]||`Y-${o+1}`})}return a}),T=e.computed(()=>P.value.map((a,o)=>({...a,series:a.series.map((l,n)=>({...l,datapoints:l.values.map((r,s)=>{const u=h.value[s].scale.min<0?(r||0)+Math.abs(h.value[s].scale.min):(r||0)-Math.abs(h.value[s].scale.min),g=h.value[s].scale.min<0?h.value[s].scale.max+Math.abs(h.value[s].scale.min):h.value[s].scale.max-Math.abs(h.value[s].scale.min);return{name:l.name,seriesName:a.name,axisIndex:s,datapointIndex:n,seriesIndex:o,value:r||0,x:d.value.left+y.value*s+y.value/2,y:d.value.bottom-d.value.height*(u/g),comment:l.comments&&l.comments[s]||""}})}))})).map(a=>({...a,series:a.series.map(o=>{const l=i.createStraightPath(o.datapoints),n=i.createSmoothPath(o.datapoints),r=i.getPathLengthFromCoordinates(t.value.style.chart.lines.smooth?`M ${n}`:`M ${l}`);return{...o,smoothPath:n,straightPath:l,pathLength:r}})})));function Q({value:a,index:o,datapoint:l}){return i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[o]||null,a,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[o]||"",v:a,s:t.value.style.chart.yAxis.labels.suffixes[o]||"",r:t.value.style.chart.yAxis.labels.roundings[o]||0}),{datapoint:l,seriesIndex:o})}const p=e.ref(null),_=e.ref(null),$=e.ref(!1),F=e.ref("");function M({shape:a,serieName:o,serie:l,relativeIndex:n,seriesIndex:r}){_.value={serie:l,relativeIndex:n,seriesIndex:r,series:k.value,scales:h.value},$.value=!0,p.value=l.id;let s="";const u=t.value.style.chart.tooltip.customFormat;i.isFunction(u)&&i.functionReturnsString(()=>u({serie:l,seriesIndex:l.seriesIndex,series:k.value,config:t.value,scales:h.value}))?F.value=u({serie:l,seriesIndex:l.seriesIndex,series:k.value,config:t.value,scales:h.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o?o+" - ":""}${l.name}</div>`,h.value.map(g=>g.name).forEach((g,v)=>{s+=`
2
- <div class="vue-ui-tooltip-item" style="text-align:left">
3
- <span>${g}: </span>
4
- <span>
5
- ${i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[v]||null,l.datapoints[v].value,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[v]||"",v:l.datapoints[v].value,s:t.value.style.chart.yAxis.labels.suffixes[v]||"",r:t.value.style.chart.yAxis.labels.roundings[v]||""}),{datapoint:l.datapoints[v],seriesIndex:v})}
6
- </span>
7
- </div>
8
- `,t.value.style.chart.comments.showInTooltip&&l.datapoints[v].comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${l.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${l.color}">${l.datapoints[v].comment}</div>`)}),F.value=`<div>${s}</div>`)}function me(){return k.value}const w=e.computed(()=>{const a=[t.value.table.columnNames.series].concat([t.value.table.columnNames.item]).concat(h.value.map(r=>r.name)),o=T.value.flatMap((r,s)=>r.series.map(u=>[r.name].concat([u.name]).concat(u.values))),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},n=[t.value.table.columnNames.series].concat([t.value.table.columnNames.item]).concat(h.value.map(r=>r.name));return{body:o,head:a,config:l,colNames:n}}),Z=e.computed(()=>T.value.length===0?{head:[],body:[],config:{},columnNames:[]}:{head:w.value.head,body:w.value.body});function ee(){const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=Z.value.head,l=Z.value.body,n=a.concat([o]).concat(l),r=i.createCsvContent(n);i.downloadCsv({csvContent:r,title:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"})}function ye(a){E("selectDatapoint",a)}function te(a){E("selectLegend",{...a,isSegregated:!a.isSegregated,opacity:a.isSegregated?1:.5})}function ae(){m.value.showTable=!m.value.showTable}function le(){m.value.dataLabels.show=!m.value.dataLabels.show}function oe(){m.value.showTooltip=!m.value.showTooltip}const z=e.ref(!1);function L(){z.value=!z.value}return ue({getData:me,generateCsv:ee,generatePdf:Y,generateImage:X,toggleTable:ae,toggleLabels:le,toggleTooltip:oe,toggleAnnotator:L}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"pcpChart",ref:C,class:e.normalizeClass(`vue-ui-pcp ${B.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`pcp_${A.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ze.PenAndPaper,{key:0,parent:C.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:z.value,onClose:L},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:V,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(be._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"pcp-div-title",...t.value.style.chart.title},subtitle:{cy:"pcp-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(se.UserOptions,{ref:"details",key:`user_options_${I.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(H),isImaging:e.unref(G),uid:A.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,isFullscreen:B.value,isTooltip:m.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:z.value,onToggleFullscreen:de,onGeneratePdf:e.unref(Y),onGenerateCsv:ee,onGenerateImage:e.unref(X),onToggleTable:ae,onToggleLabels:le,onToggleTooltip:oe,onToggleAnnotator:L},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(i.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),viewBox:`0 0 ${d.value.chartWidth<=0?10:d.value.chartWidth} ${d.value.chartHeight<=0?10:d.value.chartHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Se._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",Te,[e.createElementVNode("line",{x1:d.value.left+y.value*n+y.value/2,x2:d.value.left+y.value*n+y.value/2,y1:d.value.top,y2:d.value.bottom,stroke:t.value.style.chart.yAxis.stroke,"stroke-width":t.value.style.chart.yAxis.strokeWidth},null,8,_e),e.createElementVNode("text",{x:d.value.left+y.value*n+y.value/2,y:d.value.top-24,fill:t.value.style.chart.yAxis.labels.axisNamesColor,"font-size":c.value.axisNameFontSize,"font-weight":t.value.style.chart.yAxis.labels.axisNamesBold?"bold":"","text-anchor":"middle"},e.toDisplayString(l.name),9,Fe),t.value.style.chart.yAxis.labels.ticks.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.ticks,r=>(e.openBlock(),e.createElementBlock("line",{x1:r.x,x2:r.x-10,y1:r.y,y2:r.y,stroke:t.value.style.chart.yAxis.stroke,"stroke-width":t.value.style.chart.yAxis.strokeWidth,style:e.normalizeStyle(`opacity:${p.value&&!m.value.showTooltip?.2:1}`)},null,12,Me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.ticks,r=>(e.openBlock(),e.createElementBlock("text",{x:r.x-12+t.value.style.chart.yAxis.labels.ticks.offsetX,y:r.y+t.value.style.chart.yAxis.labels.ticks.offsetY+c.value.ticksFontSize/3,fill:t.value.style.chart.yAxis.labels.ticks.color,"text-anchor":"end","font-size":c.value.ticksFontSize,"font-weight":t.value.style.chart.yAxis.labels.ticks.bold?"bold":"normal",style:e.normalizeStyle(`opacity:${p.value&&!m.value.showTooltip?.2:1}`)},e.toDisplayString(Q({value:r.value,index:n,datapoint:r})),13,Le))),256))],64)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,l=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.series,(n,r)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.plots.show?(e.openBlock(),e.createElementBlock("g",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.datapoints,s=>(e.openBlock(),e.createBlock(Ce._sfc_main,{plot:{x:s.x,y:s.y},color:l.color,shape:l.shape,radius:l.shape==="triangle"?c.value.plotSize*1.2:c.value.plotSize,stroke:t.value.style.chart.backgroundColor,strokeWidth:.5,onMouseenter:u=>M({shape:l.shape,serieName:l.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex}),onMouseleave:o[0]||(o[0]=u=>{p.value=null,$.value=!1}),style:e.normalizeStyle(`opacity:${p.value?p.value===n.id?t.value.style.chart.plots.opacity:.2:t.value.style.chart.plots.opacity}`),onClick:()=>ye(s)},null,8,["plot","color","shape","radius","stroke","onMouseenter","style","onClick"]))),256)),m.value.showTooltip?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[p.value&&p.value===n.id&&n.datapoints.length?(e.openBlock(),e.createElementBlock("text",{key:0,x:n.datapoints[0].x-c.value.ticksFontSize,y:n.datapoints[0].y+c.value.ticksFontSize/3,"text-anchor":"end","font-size":c.value.ticksFontSize,fill:l.color,"font-weight":"bold"},e.toDisplayString(n.name),9,Ie)):e.createCommentVNode("",!0)],64)),t.value.style.chart.comments.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.datapoints,s=>(e.openBlock(),e.createElementBlock("g",null,[s.comment?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,style:{overflow:"visible"},height:"12",width:t.value.style.chart.comments.width,x:s.x-t.value.style.chart.comments.width/2+t.value.style.chart.comments.offsetX,y:s.y+t.value.style.chart.comments.offsetY+6},[e.createElementVNode("div",Oe,[e.renderSlot(a.$slots,"plot-comment",{plot:{...s,color:l.color}},void 0,!0)])],8,Ve)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),m.value.dataLabels.show||p.value&&p.value===n.id?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.datapoints,(s,u)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+12+t.value.style.chart.yAxis.labels.datapoints.offsetX,y:s.y+t.value.style.chart.yAxis.labels.datapoints.offsetY+c.value.datapointFontSize/3,fill:t.value.style.chart.yAxis.labels.datapoints.useSerieColor?l.color:t.value.style.chart.yAxis.labels.datapoints.color,"text-anchor":"start","font-weight":t.value.style.chart.yAxis.labels.datapoints.bold?"bold":"normal",class:e.normalizeClass({"vue-ui-pcp-animated":!1,"vue-ui-pcp-transition":!0}),"font-size":c.value.datapointFontSize,onMouseenter:g=>M({shape:l.shape,serieName:l.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex}),onMouseleave:o[1]||(o[1]=g=>{p.value=null,$.value=!1}),style:e.normalizeStyle(`opacity:${p.value?p.value===n.id?1:.2:1}`)},e.toDisplayString(Q({value:s.value,index:u,datapoint:s})),45,De))),256)):e.createCommentVNode("",!0),e.createElementVNode("path",{d:`M${t.value.style.chart.lines.smooth?n.smoothPath:n.straightPath}`,stroke:l.color,"stroke-width":t.value.style.chart.lines.strokeWidth,fill:"none",class:e.normalizeClass({"vue-ui-pcp-animated vue-data-ui-line-animated":t.value.useCssAnimation,"vue-ui-pcp-transition":!0}),onMouseenter:s=>M({shape:l.shape,serieName:l.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex}),onMouseleave:o[2]||(o[2]=s=>{p.value=null,$.value=!1}),style:e.normalizeStyle(`opacity:${p.value?p.value===n.id?t.value.style.chart.lines.opacity:.2:t.value.style.chart.lines.opacity}; stroke-dasharray:${n.pathLength}; stroke-dashoffset: ${t.value.useCssAnimation?n.pathLength:0}`)},null,46,qe)]))),256))]))),256)),e.renderSlot(a.$slots,"svg",{svg:d.value},void 0,!0)],14,Pe)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Re,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(H)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.default,{key:5,config:{type:"parallelCoordinatePlot",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[t.value.style.chart.legend.show&&x.value?(e.openBlock(),e.createBlock(ke.Legend,{key:`legend_${R.value}`,legendSet:pe.value,config:he.value,onClickMarker:o[3]||(o[3]=({legend:l})=>{J(l.id),te(l)})},{item:e.withCtx(({legend:l,index:n})=>[e.createElementVNode("div",{onClick:r=>{l.segregate(),te(l)},style:e.normalizeStyle(`opacity:${f.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name),13,Ue)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:D,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(xe._sfc_main,{show:m.value.showTooltip&&$.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:C.value,content:F.value,isCustom:e.unref(i.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),x.value?(e.openBlock(),e.createBlock(Be.default,{key:7,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(we.DataTable,{key:`table_${U.value}`,colNames:w.value.colNames,head:w.value.head,body:w.value.body,config:w.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[4]||(o[4]=l=>m.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l},null,8,We)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ae))}},He=Ne._export_sfc(je,[["__scopeId","data-v-1fae112e"]]);exports.default=He;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-eFox7weK.cjs"),pe=require("./useResponsive-CodiGUOE.cjs"),ze=require("./Title-0Tp4hZ4u.cjs"),fe=require("./usePrinter-CSRFnDBU.cjs"),Ne=require("./Tooltip-9Tp2Yrd1.cjs"),me=require("./Shape-D2Dpshg1.cjs"),Ve=require("./Legend-Cgw4lO2O.cjs"),Ee=require("./DataTable-DTzynbND.cjs"),Te=require("./vue-ui-skeleton-BqKzuhkB.cjs"),We=require("./vue-ui-accordion-TEMpM1hO.cjs"),ge=require("./useNestedProp-BkgEhTQY.cjs"),Xe=require("./PackageVersion-DwI-KhXH.cjs"),Ye=require("./PenAndPaper-CDFVOo7X.cjs"),Ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Pe=["id"],Me=["xmlns","viewBox","id"],Fe=["id"],De=["stop-color"],Oe=["stop-color"],Re={key:0},He=["fill","x","y","height","width","stroke-width","stroke","rx"],Ie=["x1","y1","x2","y2","stroke","stroke-width"],Ue=["x1","y1","x2","y2","stroke","stroke-width"],Ge={key:1},Qe=["points","fill"],Je=["points","fill"],je=["points","fill"],Ze=["points","fill"],Ke={key:2},et=["y","fill","font-size"],tt=["x","y","fill","font-size"],lt=["x","y","fill","font-size"],at=["y","fill","font-size"],ot={key:3},ut=["x","y","font-size","fill"],rt=["x","y","font-size","fill"],nt=["x","y","font-size","fill"],st=["id","font-size","transform","fill"],it=["id","font-size","transform","fill"],ct=["id","font-size","transform","fill"],vt={key:4},dt=["fill","points"],ht=["x","y","width","height"],yt=["x","y","width","height"],bt=["x","y","width","height"],pt=["x","y","width","height"],ft={key:0},mt=["x","y","font-size","fill"],gt={key:0},xt=["x","y","onMouseover","onClick"],kt={key:7,class:"vue-ui-dna"},$t=["points","fill"],Lt=["points","fill"],Ct=["points","fill"],wt=["points","fill"],St={key:8},Bt=["x","y","font-size","fill","font-weight"],qt={key:9},_t=["x","y","fill"],zt=["x","y","fill"],Nt=["x","y","fill"],Vt=["x","y","fill"],Et=["stroke","d"],Tt=["stroke","d"],Wt={key:4,class:"vue-data-ui-watermark"},Xt=["onClick"],Yt={key:0,height:"14",width:"14",viewBox:"0 0 20 20"},At=["innerHTML"],Pt={__name:"vue-ui-quadrant",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectPlot","selectSide","selectLegend"],setup(xe,{expose:ke,emit:P}){const x=xe,{vue_ui_quadrant:$e}=s.useConfig(),V=e.computed(()=>!!x.dataset&&x.dataset.length),g=e.ref(s.createUid()),Le=e.ref(null),E=e.ref(!1),M=e.ref(""),R=e.ref(0),h=e.ref(!1),w=e.ref(null),H=e.ref(null),I=e.ref(null),U=e.ref(null),G=e.ref(0),Q=e.ref(0),J=e.ref(0),l=e.computed({get:()=>j(),set:a=>a});function j(){const a=ge.useNestedProp({userConfig:x.config,defaultConfig:$e});return a.theme?{...ge.useNestedProp({userConfig:s.themes.vue_ui_quadrant[a.theme]||x.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}e.watch(()=>x.config,a=>{l.value=j(),Z(),G.value+=1,Q.value+=1,J.value+=1},{deep:!0});const T=e.ref(null);function Z(){if(s.objectIsEmpty(x.dataset)?s.error({componentName:"VueUiQuadrant",type:"dataset"}):x.dataset.forEach((a,u)=>{[null,void 0].includes(a.name)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",index:u}),[null,void 0].includes(a.series)?s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"series",index:u}):a.series.forEach((o,r)=>{[null,void 0].includes(o.name)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",key:"series",index:r})})}),l.value.responsive){const a=pe.throttle(()=>{const{width:u,height:o}=pe.useResponsive({chart:w.value,title:l.value.style.chart.title.text?H.value:null,legend:l.value.style.chart.legend.show?I.value:null,source:U.value});y.value=48,t.value.height=o,t.value.usableHeight=o-y.value*2,t.value.width=u,t.value.usableWidth=u-y.value*2,t.value.top=y.value,t.value.left=y.value,t.value.right=u-y.value,t.value.bottom=o-y.value,t.value.centerX=u/2,t.value.centerY=o-o/2,t.value.padding=y.value});T.value=new ResizeObserver(a),T.value.observe(w.value.parentNode)}}e.onMounted(()=>{Z()}),e.onBeforeUnmount(()=>{T.value&&T.value.disconnect()});const{isPrinting:K,isImaging:ee,generatePdf:te,generateImage:le}=fe.usePrinter({elementId:`vue-ui-quadrant_${g.value}`,fileName:l.value.style.chart.title.text||"vue-ui-quadrant"}),ae=e.computed(()=>s.convertCustomPalette(l.value.customPalette)),p=e.ref({plotLabels:{show:l.value.style.chart.layout.labels.plotLabels.show},showTable:l.value.table.show,showTooltip:l.value.style.chart.tooltip.show}),y=e.ref(48),t=e.ref({height:l.value.style.chart.height,usableHeight:l.value.style.chart.height-y.value*2,width:l.value.style.chart.width,usableWidth:l.value.style.chart.width-y.value*2,top:y.value,left:y.value,right:l.value.style.chart.width-y.value,bottom:l.value.style.chart.height-y.value,centerX:l.value.style.chart.width/2,centerY:l.value.style.chart.height-l.value.style.chart.height/2,padding:y.value}),c=e.ref({...JSON.parse(JSON.stringify(t.value)),startX:0,startY:0});e.watch(()=>t.value,a=>{a&&(c.value={...JSON.parse(JSON.stringify(t.value)),startX:0,startY:0})},{deep:!0});const i=e.ref(null),C=e.computed(()=>{switch(i.value){case"TL":return{x:c.value.startX+c.value.width/2,y:c.value.height,text:l.value.style.chart.layout.labels.quadrantLabels.tl.text||"Top Left",fontSize:l.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color,bold:l.value.style.chart.layout.labels.quadrantLabels.tl.bold};case"TR":return{x:c.value.startX+c.value.width/2,y:c.value.height,text:l.value.style.chart.layout.labels.quadrantLabels.tr.text||"Top Right",fontSize:l.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color,bold:l.value.style.chart.layout.labels.quadrantLabels.tr.bold};case"BR":return{x:c.value.startX+c.value.width/2,y:c.value.height*1.678,text:l.value.style.chart.layout.labels.quadrantLabels.br.text||"Bottom Right",fontSize:l.value.style.chart.layout.labels.quadrantLabels.br.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color,bold:l.value.style.chart.layout.labels.quadrantLabels.br.bold};case"BL":return{x:c.value.startX+c.value.width/2,y:c.value.height*1.678,text:l.value.style.chart.layout.labels.quadrantLabels.bl.text||"Bottom Left",fontSize:l.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color,bold:l.value.style.chart.layout.labels.quadrantLabels.bl.bold};default:return{x:0,y:0,text:"",fontSize:0,fill:"none",bold:!1}}}),Ce=e.ref(null),W=e.ref(!1);function B({targetX:a,targetY:u,targetW:o,targetH:r,side:n}){i.value&&z(n);const v={x:a-c.value.startX,y:u-c.value.startY,w:o-c.value.width,h:r-c.value.height},d=l.value.zoomAnimationFrames;let k=0;function be(){W.value=!0,c.value.startX+=v.x/d,c.value.startY+=v.y/d,c.value.width+=v.w/d,c.value.height+=v.h/d,k+=1,k<d?Ce.value=requestAnimationFrame(be):W.value=!1}be()}function $(a){if(!W.value)if(h.value&&i.value===a)B({targetX:0,targetY:0,targetW:t.value.width,targetH:t.value.height}),i.value=null,h.value=!1;else{switch(i.value=a,a){case"TL":B({targetX:0,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tl"});break;case"TR":B({targetX:t.value.width/2-t.value.left,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tr"});break;case"BR":B({targetX:t.value.width/2-t.value.left,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"br"});break;case"BL":B({targetX:0,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"bl"});break;default:c.value.startX=0,c.value.startY=0,c.value.width=t.value.width,c.value.height=t.value.height;break}h.value=!0}}const we=e.computed(()=>{const a=l.value.style.chart.layout.grid.graduations.steps,u=t.value.usableWidth/(a*2),o=t.value.top,r=[];for(let n=0;n<a;n+=1)r.push({x:t.value.padding+u*n,y:o+t.value.usableHeight*(n/a/2),height:t.value.usableHeight*(1-n/a),width:t.value.usableWidth*(1-n/a),opacity:Math.round((n+1)/a*20)});return r}),f=e.computed(()=>{let a=l.value.style.chart.layout.grid.xAxis.max,u=l.value.style.chart.layout.grid.xAxis.min,o=l.value.style.chart.layout.grid.yAxis.max,r=l.value.style.chart.layout.grid.yAxis.min;return l.value.style.chart.layout.grid.xAxis.auto&&(a=Math.max(...S.value.flatMap(n=>n.series.map(v=>v.x))),u=Math.min(...S.value.flatMap(n=>n.series.map(v=>v.x)))),l.value.style.chart.layout.grid.yAxis.auto&&(o=Math.max(...S.value.flatMap(n=>n.series.map(v=>v.y))),r=Math.min(...S.value.flatMap(n=>n.series.map(v=>v.y)))),{x:{max:a,min:u},y:{max:o,min:r}}}),L=e.ref([]),S=e.computed(()=>x.dataset.map((a,u)=>({...a,id:`cat_${u}_${g.value}`,color:s.convertColorToHex(a.color)||ae.value[u]||s.palette[u]}))),Se=e.computed(()=>S.value.filter(a=>!L.value.includes(a.id))),Be=e.computed(()=>S.value.map((a,u)=>({...a,shape:a.shape||"circle",series:a.series.map(o=>({...o,x:oe(o.x),y:ue(o.y),xValue:o.x,yValue:o.y,quadrantSide:ne({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color}))}))),m=e.computed(()=>(x.dataset.forEach((a,u)=>{a.series.forEach((o,r)=>{[null,void 0].includes(o.x)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"x",key:"series",index:r}),[null,void 0].includes(o.y)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"y",key:"series",index:r})})}),Se.value.map((a,u)=>({...a,shape:a.shape||"circle",color:a.color||ae.value[u]||s.palette[u],series:a.series.map(o=>({...o,x:oe(o.x),y:ue(o.y),xValue:o.x,yValue:o.y,quadrantSide:ne({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color,uid:s.createUid()}))}))));function oe(a){if(a>=0){const u=a/f.value.x.max;return t.value.centerX+t.value.usableWidth/2*u}else{const u=Math.abs(a)/Math.abs(f.value.x.min);return t.value.centerX-t.value.usableWidth/2*u}}function ue(a){if(a>=0){const u=a/f.value.y.max;return t.value.centerY+(1-t.value.usableHeight/2*u)}else{const u=Math.abs(a)/Math.abs(f.value.y.min);return t.value.centerY-(1-t.value.usableHeight/2*u)}}const X=e.computed(()=>{const a=m.value.flatMap(d=>d.series.map(k=>({x:k.xValue,y:k.yValue,name:k.name,category:k.categoryName,quadrantSide:k.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[k.quadrantSide].text,color:d.color,shape:d.shape}))),u=l.value.style.chart.layout.grid.xAxis.name||"x",o=l.value.style.chart.layout.grid.yAxis.name||"y",r=[l.value.translations.category,l.value.translations.item,u,o,l.value.translations.side],n=a.map(d=>[d.category,d.name,d.x,d.y,d.sideName||d.quadrantSide]),v=a.map(d=>({shape:d.shape,color:d.color}));return{head:r,body:n,itsShapes:v,tableData:a}}),Y=e.computed(()=>{const a=X.value.head,u=X.value.tableData.map(r=>[{shape:r.shape,color:r.color,name:r.category},r.name,s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,r.x,s.dataLabel({v:r.x,r:l.value.style.chart.layout.labels.plotLabels.rounding})),s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,r.y,s.dataLabel({v:r.y,r:l.value.style.chart.layout.labels.plotLabels.rounding})),r.sideName||r.quadrantSide]),o={th:{backgroundColor:l.value.table.th.backgroundColor,color:l.value.table.th.color,outline:l.value.table.th.outline},td:{backgroundColor:l.value.table.td.backgroundColor,color:l.value.table.td.color,outline:l.value.table.td.outline},breakpoint:l.value.table.responsiveBreakpoint};return{head:a,body:u,config:o,colNames:a}});function F(a){L.value.includes(a)?L.value=L.value.filter(o=>o!==a):L.value.push(a);const u=ce();P("selectLegend",u)}const re=e.computed(()=>Be.value.map(a=>({name:a.name,shape:a.shape,color:a.color,id:a.id,opacity:L.value.includes(a.id)?.5:1,segregate:()=>F(a.id),isSegregated:L.value.includes(a.id)}))),qe=e.computed(()=>({cy:"quadrant-div-legend",backgroundColor:l.value.style.chart.legend.backgroundColor,color:l.value.style.chart.legend.color,fontSize:l.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:l.value.style.chart.legend.bold?"bold":""}));function ne(a){switch(!0){case(a.x>=0&&a.y>=0):return"tr";case(a.x>=0&&a.y<0):return"br";case(a.x<0&&a.y<0):return"bl";case(a.x<0&&a.y>=0):return"tl";default:return""}}const q=e.ref(null),_=e.ref(null),D=e.ref(null);function se(a,u,o){q.value=u.uid,_.value={color:a.color,shape:a.shape},D.value={datapoint:u,seriesIndex:o,series:m.value,config:l.value},E.value=!0;const r=l.value.style.chart.tooltip.customFormat;if(s.isFunction(r)&&s.functionReturnsString(()=>r({seriesIndex:o,datapoint:u,series:m.value,config:l.value})))M.value=r({seriesIndex:o,datapoint:u,series:m.value,config:l.value});else{let n="";u.quadrantSide&&(n+=`<div style="color:${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].color};font-weight:${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].bold?"bold":"400"}">${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text}</div>`),n+=`<div>${a.name}</div>`,n+=`<div style="padding-bottom:6px;border-bottom:1px solid ${l.value.style.chart.tooltip.borderColor};margin-bottom:3px">${u.name}</div>`,n+=`<div>${l.value.style.chart.layout.grid.xAxis.name?l.value.style.chart.layout.grid.xAxis.name:"x"}: <b>${s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,u.xValue,s.dataLabel({v:u.xValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,n+=`<div>${l.value.style.chart.layout.grid.yAxis.name?l.value.style.chart.layout.grid.yAxis.name:"y"}: <b>${s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,u.yValue,s.dataLabel({v:u.yValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,M.value=`<div style="text-align:left;font-size:${l.value.style.chart.tooltip.fontSize}px">${n}</div>`}}function ie(a,u){const o={category:a.name,shape:a.shape,itemName:u.name,x:u.xValue,y:u.yValue,quadrantSide:u.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text};P("selectPlot",o)}function z(a){if(!a)return;const u=m.value.flatMap(r=>r.series.filter(n=>n.quadrantSide===a).map(n=>({category:n.categoryName,itemName:n.name,x:n.xValue,y:n.yValue}))),o={quadrantSide:a,sideName:l.value.style.chart.layout.labels.quadrantLabels[a].text,items:[...u]};P("selectSide",o)}const b=e.computed(()=>({TL:{tl:{x:t.value.left+t.value.usableWidth/4-20,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.left+t.value.usableWidth/4,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.left+t.value.usableWidth/4,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.left+t.value.usableWidth/4-20,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.left+t.value.usableWidth/4-20},20 ${t.value.left+t.value.usableWidth/4+20},20`,vertical:`M ${t.value.left+t.value.usableWidth/4},0 ${t.value.left+t.value.usableWidth/4},40`}},TR:{tl:{x:t.value.centerX+t.value.usableWidth/4-20,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.centerX+t.value.usableWidth/4,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.centerX+t.value.usableWidth/4,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.centerX+t.value.usableWidth/4-20,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.centerX+t.value.usableWidth/4-20},20 ${t.value.centerX+t.value.usableWidth/4+20},20`,vertical:`M ${t.value.centerX+t.value.usableWidth/4},0 ${t.value.centerX+t.value.usableWidth/4},40`}},BR:{tl:{x:t.value.centerX+t.value.usableWidth/4-20,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.centerX+t.value.usableWidth/4,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.centerX+t.value.usableWidth/4,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.centerX+t.value.usableWidth/4-20,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.centerX+t.value.usableWidth/4-20},${t.value.centerY-28} ${t.value.centerX+t.value.usableWidth/4+20},${t.value.centerY-28}`,vertical:`M ${t.value.centerX+t.value.usableWidth/4},${t.value.centerY-48} ${t.value.centerX+t.value.usableWidth/4},${t.value.centerY-8}`}},BL:{tl:{x:t.value.left+t.value.usableWidth/4-20,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.left+t.value.usableWidth/4,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.left+t.value.usableWidth/4,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.left+t.value.usableWidth/4-20,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.left+t.value.usableWidth/4-20},${t.value.centerY-28} ${t.value.left+t.value.usableWidth/4+20},${t.value.centerY-28}`,vertical:`M ${t.value.left+t.value.usableWidth/4},${t.value.centerY-48} ${t.value.left+t.value.usableWidth/4},${t.value.centerY-8}`}}}));function ce(){return m.value.map(a=>({color:a.color,name:a.name,shape:a.shape,series:a.series.map(u=>({name:u.name,x:u.xValue,y:u.yValue,quadrantSide:u.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text}))}))}function ve(){e.nextTick(()=>{const a=[[l.value.style.chart.title.text],[l.value.style.chart.title.subtitle.text],[""]],u=X.value.head,o=X.value.body,r=a.concat([u]).concat(o),n=s.createCsvContent(r);s.downloadCsv({csvContent:n,title:l.value.style.chart.title.text||"vue-ui-quadrant"})})}const N=e.ref(!1);function _e(a){N.value=a,R.value+=1}function de(){p.value.showTable=!p.value.showTable}function he(){p.value.plotLabels.show=!p.value.plotLabels.show}function ye(){p.value.showTooltip=!p.value.showTooltip}const A=e.ref(!1);function O(){A.value=!A.value}return ke({getData:ce,generatePdf:te,generateCsv:ve,generateImage:le,toggleTable:de,toggleLabels:he,toggleTooltip:ye,toggleAnnotator:O}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-quadrant ${N.value?"vue-data-ui-wrapper-fullscreen":""} ${l.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"quadrantChart",ref:w,id:`vue-ui-quadrant_${g.value}`,style:e.normalizeStyle(`font-family:${l.value.style.fontFamily};width:100%; text-align:center;${l.value.style.chart.title.text?"":"padding-top: 36px"};background:${l.value.style.chart.backgroundColor};${l.value.responsive?"height: 100%":""}`)},[l.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ye.PenAndPaper,{key:0,parent:w.value,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,active:A.value,onClose:O},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),l.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:H,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(ze._sfc_main,{key:`table_${G.value}`,config:{title:{cy:"quadrant-title",...l.value.style.chart.title},subtitle:{cy:"quadrant-subtitle",...l.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),l.value.userOptions.show&&V.value?(e.openBlock(),e.createBlock(fe.UserOptions,{ref_key:"details",ref:Le,key:`user_options_${R.value}`,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,isImaging:e.unref(ee),isPrinting:e.unref(K),uid:g.value,hasTooltip:l.value.userOptions.buttons.tooltip&&l.value.style.chart.tooltip.show,hasPdf:l.value.userOptions.buttons.pdf,hasImg:l.value.userOptions.buttons.img,hasXls:l.value.userOptions.buttons.csv,hasTable:l.value.userOptions.buttons.table,hasLabel:l.value.userOptions.buttons.labels,hasFullscreen:l.value.userOptions.buttons.fullscreen,isFullscreen:N.value,isTooltip:p.value.showTooltip,titles:{...l.value.userOptions.buttonTitles},chartElement:w.value,position:l.value.userOptions.position,hasAnnotator:l.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:_e,onGeneratePdf:e.unref(te),onGenerateCsv:ve,onGenerateImage:e.unref(le),onToggleTable:de,onToggleLabels:he,onToggleTooltip:ye,onToggleAnnotator:O},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.value}),viewBox:`${c.value.startX} ${c.value.startY} ${c.value.width} ${c.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:${h.value?"hidden":"visible"};background:transparent;color:${l.value.style.chart.color}`),id:`svg_${g.value}`},[e.createVNode(Xe._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`quadrant_gradient_${g.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(s.setOpacity)(e.unref(s.shiftHue)(o.color,.05),l.value.style.chart.layout.areas.opacity)},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity)},null,8,Oe)],8,Fe))),256))]),l.value.style.chart.layout.grid.graduations.show?(e.openBlock(),e.createElementBlock("g",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(we.value,o=>(e.openBlock(),e.createElementBlock("rect",{fill:l.value.style.chart.layout.grid.graduations.fill?e.unref(s.setOpacity)(l.value.style.chart.layout.grid.graduations.color,o.opacity):"none",x:o.x,y:o.y,height:o.height<=0?.001:o.height,width:o.width<=0?.001:o.width,"stroke-width":l.value.style.chart.layout.grid.graduations.strokeWidth,stroke:l.value.style.chart.layout.grid.graduations.stroke,rx:l.value.style.chart.layout.grid.graduations.roundingForce},null,8,He))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:t.value.left,y1:t.value.centerY,x2:t.value.right,y2:t.value.centerY,stroke:l.value.style.chart.layout.grid.stroke,"stroke-width":l.value.style.chart.layout.grid.strokeWidth},null,8,Ie),e.createElementVNode("line",{x1:t.value.centerX,y1:t.value.top,x2:t.value.centerX,y2:t.value.bottom,stroke:l.value.style.chart.layout.grid.stroke,"stroke-width":l.value.style.chart.layout.grid.strokeWidth},null,8,Ue),l.value.style.chart.layout.grid.showArrows?(e.openBlock(),e.createElementBlock("g",Ge,[e.createElementVNode("polygon",{points:`${t.value.right-8},${t.value.centerY-6} ${t.value.right},${t.value.centerY} ${t.value.right-8},${t.value.centerY+6}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,Qe),e.createElementVNode("polygon",{points:`${t.value.left+8},${t.value.centerY-6} ${t.value.left},${t.value.centerY} ${t.value.left+8},${t.value.centerY+6}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,Je),e.createElementVNode("polygon",{points:`${t.value.centerX-6},${t.value.top+8} ${t.value.centerX},${t.value.top} ${t.value.centerX+6},${t.value.top+8}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,je),e.createElementVNode("polygon",{points:`${t.value.centerX-6},${t.value.bottom-8} ${t.value.centerX},${t.value.bottom} ${t.value.centerX+6},${t.value.bottom-8}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,Ze)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.show&&!h.value?(e.openBlock(),e.createElementBlock("g",Ke,[l.value.style.chart.layout.labels.quadrantLabels.tl.text?(e.openBlock(),e.createElementBlock("text",{key:0,x:0,y:t.value.top-t.value.padding/2,"text-anchor":"start",fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.tl.bold?"bold":""}`),onClick:u[0]||(u[0]=o=>z("tl"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.tl.text),13,et)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.tr.text?(e.openBlock(),e.createElementBlock("text",{key:1,x:t.value.width,y:t.value.top-t.value.padding/2,"text-anchor":"end",fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.tr.bold?"bold":""}`),onClick:u[1]||(u[1]=o=>z("tr"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.tr.text),13,tt)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.br.text?(e.openBlock(),e.createElementBlock("text",{key:2,x:t.value.width,y:t.value.bottom+t.value.padding*.7,"text-anchor":"end",fill:l.value.style.chart.layout.labels.quadrantLabels.br.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.br.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.br.bold?"bold":""}`),onClick:u[2]||(u[2]=o=>z("br"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.br.text),13,lt)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.bl.text?(e.openBlock(),e.createElementBlock("text",{key:3,x:0,y:t.value.bottom+t.value.padding*.7,"text-anchor":"start",fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.bl.bold?"bold":""}`),onClick:u[3]||(u[3]=o=>z("bl"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.bl.text),13,at)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.axisLabels.show?(e.openBlock(),e.createElementBlock("g",ot,[e.createElementVNode("text",{x:t.value.centerX,y:t.value.top-t.value.padding/6,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.max,e.unref(s.dataLabel)({v:f.value.y.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,ut),e.createElementVNode("text",{x:t.value.centerX,y:t.value.top-t.value.padding/2,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(l.value.style.chart.layout.grid.yAxis.name),9,rt),e.createElementVNode("text",{x:t.value.centerX,y:t.value.bottom+t.value.padding*.35,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.negative},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.min,e.unref(s.dataLabel)({v:f.value.y.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,nt),e.createElementVNode("text",{id:`xLabelMin_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.padding-l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(-90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.negative},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.min,e.unref(s.dataLabel)({v:f.value.x.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,st),e.createElementVNode("text",{id:`xLabelMax_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.width-t.value.padding+l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.max,e.unref(s.dataLabel)({v:f.value.x.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,it),e.createElementVNode("text",{id:`xLabelMaxName_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.width-l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(l.value.style.chart.layout.grid.xAxis.name),9,ct)])):e.createCommentVNode("",!0),l.value.style.chart.layout.areas.show?(e.openBlock(),e.createElementBlock("g",vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[o.series.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-quadrant-area":"",fill:l.value.style.chart.layout.areas.useGradient?`url(#quadrant_gradient_${g.value}_${r})`:e.unref(s.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity),points:e.unref(s.giftWrap)(o)},null,8,dt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[e.createElementVNode("rect",{onClick:u[4]||(u[4]=o=>$("TL")),x:t.value.left,y:t.value.top,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,ht),e.createElementVNode("rect",{onClick:u[5]||(u[5]=o=>$("TR")),x:t.value.centerX,y:t.value.top,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,yt),e.createElementVNode("rect",{onClick:u[6]||(u[6]=o=>$("BR")),x:t.value.centerX,y:t.value.centerY,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,bt),e.createElementVNode("rect",{onClick:u[7]||(u[7]=o=>$("BL")),x:t.value.left,y:t.value.centerY,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,pt)]),l.value.style.chart.layout.labels.plotLabels.showAsTag?(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[p.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,n=>(e.openBlock(),e.createElementBlock("foreignObject",{style:{overflow:"visible"},height:"10",width:"100",x:n.x-50,y:n.y-l.value.style.chart.layout.labels.plotLabels.fontSize,onMouseover:v=>se(o,n,r),onMouseleave:u[9]||(u[9]=v=>{E.value=!1,q.value=null,_.value=null}),onClick:v=>ie(o,n)},[e.createElementVNode("div",{style:e.normalizeStyle(`color:${e.unref(s.adaptColorToBackground)(o.color)};margin: 0 auto; font-size:${l.value.style.chart.layout.labels.plotLabels.fontSize}px; text-align:center;background:${o.color}; padding: 2px 4px; border-radius: 12px; height: ${l.value.style.chart.layout.labels.plotLabels.fontSize*1.5}px`)},e.toDisplayString(n.name),5)],40,xt))),256))],64))),256))])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,n=>(e.openBlock(),e.createBlock(me._sfc_main,{color:o.color,isSelected:q.value&&n.uid===q.value,plot:n,radius:l.value.style.chart.layout.plots.radius/(h.value?1.5:1),shape:o.shape,stroke:l.value.style.chart.layout.plots.outline?l.value.style.chart.layout.plots.outlineColor:"none",strokeWidth:l.value.style.chart.layout.plots.outlineWidth,onMouseover:v=>se(o,n,r),onMouseleave:u[8]||(u[8]=v=>{E.value=!1,q.value=null,_.value=null}),onClick:v=>ie(o,n)},null,8,["color","isSelected","plot","radius","shape","stroke","strokeWidth","onMouseover","onClick"]))),256))]))),256)),p.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,o=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,r=>(e.openBlock(),e.createElementBlock("text",{x:r.x,y:r.y+l.value.style.chart.layout.labels.plotLabels.offsetY+l.value.style.chart.layout.plots.radius,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.plotLabels.fontSize/(h.value?1.5:1),fill:l.value.style.chart.layout.labels.plotLabels.color},e.toDisplayString(r.name),9,mt))),256))]))),256))])):e.createCommentVNode("",!0)],64)),h.value?(e.openBlock(),e.createElementBlock("g",kt,[i.value==="TL"?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:`${t.value.left-1},${t.value.centerY} ${t.value.centerX},${t.value.centerY} ${t.value.centerX},${t.value.top-1} ${t.value.right},${t.value.top-1} ${t.value.right},${t.value.bottom} ${t.value.left-1},${t.value.bottom} ${t.value.left-1},${t.value.centerY}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,$t)):e.createCommentVNode("",!0),i.value==="TR"?(e.openBlock(),e.createElementBlock("polygon",{key:1,points:`${t.value.left},${t.value.top-1} ${t.value.centerX},${t.value.top-1} ${t.value.centerX},${t.value.centerY} ${t.value.right+1},${t.value.centerY} ${t.value.right+1},${t.value.bottom} ${t.value.left},${t.value.bottom} ${t.value.left},${t.value.top-1}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,Lt)):e.createCommentVNode("",!0),i.value==="BR"?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:`${t.value.left},${t.value.top} ${t.value.right+1},${t.value.top} ${t.value.right+1},${t.value.centerY} ${t.value.centerX},${t.value.centerY} ${t.value.centerX},${t.value.bottom+1} ${t.value.left},${t.value.bottom+1} ${t.value.left},${t.value.top}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,Ct)):e.createCommentVNode("",!0),i.value==="BL"?(e.openBlock(),e.createElementBlock("polygon",{key:3,points:`${t.value.left-1},${t.value.top} ${t.value.right},${t.value.top} ${t.value.right},${t.value.bottom+1} ${t.value.centerX},${t.value.bottom+1} ${t.value.centerX},${t.value.centerY} ${t.value.left-1},${t.value.centerY} ${t.value.left-1},${t.value.top}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,wt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),i.value&&!W.value?(e.openBlock(),e.createElementBlock("g",St,[e.createElementVNode("text",{x:C.value.x,y:C.value.y-C.value.fontSize/1.5,"font-size":C.value.fontSize/1.5,fill:C.value.fill,"text-anchor":"middle","font-weight":C.value.bold?"bold":"normal"},e.toDisplayString(C.value.text),9,Bt)])):e.createCommentVNode("",!0),h.value&&i.value?(e.openBlock(),e.createElementBlock("g",qt,[e.createElementVNode("rect",{x:b.value[i.value].tl.x,y:b.value[i.value].tl.y,height:"20",width:"20",fill:b.value[i.value].tl.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.value==="TL"?1:.2}`),onClick:u[10]||(u[10]=o=>$("TL")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":i.value!=="TL"})},null,14,_t),e.createElementVNode("rect",{x:b.value[i.value].tr.x,y:b.value[i.value].tr.y,height:"20",width:"20",fill:b.value[i.value].tr.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.value==="TR"?1:.2}`),onClick:u[11]||(u[11]=o=>$("TR")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":i.value!=="TR"})},null,14,zt),e.createElementVNode("rect",{x:b.value[i.value].br.x,y:b.value[i.value].br.y,height:"20",width:"20",fill:b.value[i.value].br.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.value==="BR"?1:.2}`),onClick:u[12]||(u[12]=o=>$("BR")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":i.value!=="BR"})},null,14,Nt),e.createElementVNode("rect",{x:b.value[i.value].bl.x,y:b.value[i.value].bl.y,height:"20",width:"20",fill:b.value[i.value].bl.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.value==="BL"?1:.2}`),onClick:u[13]||(u[13]=o=>$("BL")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":i.value!=="BL"})},null,14,Vt),e.createElementVNode("path",{class:"vue-ui-quadrant-minimap-crosshairs",stroke:l.value.style.chart.backgroundColor,"stroke-width":1,d:b.value[i.value].crosshairs.horizontal},null,8,Et),e.createElementVNode("path",{class:"vue-ui-quadrant-minimap-crosshairs",stroke:l.value.style.chart.backgroundColor,"stroke-width":1,d:b.value[i.value].crosshairs.vertical},null,8,Tt)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:t.value},void 0,!0)],14,Me)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Wt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(ee)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te.default,{key:5,config:{type:"quadrant",style:{backgroundColor:l.value.style.chart.backgroundColor,quadrant:{grid:{color:l.value.style.chart.layout.grid.stroke},plots:{color:l.value.style.chart.layout.grid.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[l.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ve.Legend,{key:`legend_${J.value}`,legendSet:re.value,config:qe.value,onClickMarker:u[14]||(u[14]=({legend:o})=>F(o.id))},{item:e.withCtx(({legend:o})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:r=>F(o.id),style:e.normalizeStyle(`opacity:${L.value.includes(o.id)?.5:1}`)},e.toDisplayString(o.name),13,Xt)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:re.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:U,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ne._sfc_main,{show:p.value.showTooltip&&E.value,backgroundColor:l.value.style.chart.tooltip.backgroundColor,color:l.value.style.chart.tooltip.color,borderRadius:l.value.style.chart.tooltip.borderRadius,borderColor:l.value.style.chart.tooltip.borderColor,borderWidth:l.value.style.chart.tooltip.borderWidth,fontSize:l.value.style.chart.tooltip.fontSize,backgroundOpacity:l.value.style.chart.tooltip.backgroundOpacity,position:l.value.style.chart.tooltip.position,offsetY:l.value.style.chart.tooltip.offsetY,parent:w.value,content:M.value,isCustom:l.value.style.chart.tooltip.customFormat&&typeof l.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),default:e.withCtx(()=>[l.value.style.chart.tooltip.showShape?(e.openBlock(),e.createElementBlock("svg",Yt,[e.createVNode(me._sfc_main,{plot:{x:10,y:10},shape:_.value.shape,color:_.value.color,radius:8,stroke:l.value.style.chart.layout.plots.outline?l.value.style.chart.layout.plots.outlineColor:"none","stroke-width":l.value.style.chart.layout.plots.outlineWidth},null,8,["shape","color","stroke","stroke-width"])])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),V.value?(e.openBlock(),e.createBlock(We.default,{key:7,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color},head:{backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ee.DataTable,{key:`table_${Q.value}`,colNames:Y.value.colNames,head:Y.value.head,body:Y.value.body,config:Y.value.config,title:`${l.value.style.chart.title.text}${l.value.style.chart.title.subtitle.text?` : ${l.value.style.chart.title.subtitle.text}`:""}`,onClose:u[15]||(u[15]=o=>p.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createElementVNode("div",{innerHTML:o.name||o},null,8,At)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Pe))}},Mt=Ae._export_sfc(Pt,[["__scopeId","data-v-33deb505"]]);exports.default=Mt;