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
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-C9HllqQA.cjs"),ae=require("./useResponsive-BJ7DTGpm.cjs"),ke=require("./Title-Dn00hErp.cjs"),le=require("./usePrinter-FSAw5pod.cjs"),be=require("./Tooltip-DJiwKA4y.cjs"),Ce=require("./vue-ui-sparkbar-DJDXrRyp.cjs"),we=require("./Legend-BoBvZGqQ.cjs"),Be=require("./DataTable-DO2GAcBm.cjs"),_e=require("./vue-ui-skeleton-CPwED1As.cjs"),Pe=require("./vue-ui-accordion-BkUGNe2H.cjs"),re=require("./useNestedProp-DOr0hj4s.cjs"),$e=require("./PackageVersion-DdLmDkTt.cjs"),xe=require("./PenAndPaper-DyMNuRla.cjs"),Ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["id"],Se=["xmlns","viewBox"],Ee=["id"],Ve=["stop-color"],Ae=["stop-color"],Oe={key:0},Fe=["x1","y1","x2","y2","stroke","stroke-width"],Le={key:0},ze=["d","stroke","stroke-width"],Ie=["d","stroke","stroke-width"],Re={key:1},qe=["x","y","text-anchor","font-size","fill","onMouseenter"],De=["points","stroke","stroke-width"],Me=["points","stroke","stroke-width","fill"],Ue={key:2},Ge=["cx","cy","fill","r","stroke"],We={key:5,class:"vue-data-ui-watermark"},He=["onClick"],Xe={key:0,style:{"max-width":"200px",margin:"0 auto"}},je={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ne,{expose:ue,emit:se}){const d=ne,{vue_ui_radar:ie}=n.useConfig(),b=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(n.createUid()),ce=e.ref(null),x=e.ref(!1),N=e.ref(""),F=e.ref(0),f=e.ref(null),L=e.ref(null),z=e.ref(null),I=e.ref(null),R=e.ref(null),q=e.ref(0),D=e.ref(0),M=e.ref(0),t=e.computed({get:()=>U(),set:o=>o});function U(){const o=re.useNestedProp({userConfig:d.config,defaultConfig:ie});return o.theme?{...re.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=U(),G(),q.value+=1,D.value+=1,M.value+=1},{deep:!0});const B=e.ref(null);function G(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=ae.throttle(()=>{const{width:a,height:l}=ae.useResponsive({chart:f.value,title:t.value.style.chart.title.text?L.value:null,legend:t.value.style.chart.legend.show?z.value:null,source:I.value,noTitle:R.value});s.value.width=a,s.value.height=l});B.value=new ResizeObserver(o),B.value.observe(f.value.parentNode)}}e.onMounted(()=>{G()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:W,isImaging:H,generatePdf:X,generateImage:j}=le.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),de=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Y=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),g=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),ve=e.computed(()=>({style:{backgroundColor:t.value.style.chart.tooltip.backgroundColor,animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),s=e.ref({height:312,width:512}),i=e.ref([]),C=e.ref(null),y=e.ref(!1);function J(o){y.value=!0,i.value.includes(o)?(C.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{y.value=!1,C.value=null},500)):(i.value.push(o),setTimeout(()=>{y.value=!1},500)),se("selectLegend",k.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function pe(){return k.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${m.value}_${a}`,color:n.convertColorToHex(o.color)||Y.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>b.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||Y.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${m.value}_${a}`,formatter:o.formatter||null})):[]),K=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),Q=e.computed(()=>p.value.length),T=e.computed(()=>Math.min(s.value.width,s.value.height)/3),Z=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:T.value,sides:Q.value,rotation:0})),ge=e.computed(()=>{const o=[];for(let a=0;a<T.value;a+=T.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),h=e.computed(()=>Z.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>he({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||K.value)}));return{...o,...p.value[a],plots:l}}));function S({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>s.value.width/2&&(o+=12,l="start"),o<s.value.width/2&&(o-=12,l="end"),a>s.value.height/2&&(a+=20),a<s.value.height/2&&(a-=12),a===s.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function he({centerX:o,centerY:a,apexX:l,apexY:r,proportion:u}){return{x:o+(l-o)*u,y:a+(r-a)*u}}const k=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||K.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,u)=>r+u,0)/p.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>J(l),isSegregated:i.value.includes(l)}))}),me=e.computed(()=>({cy:"radar-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":""})),_=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...k.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((u,c)=>`${n.applyDataLabel(r.formatter,u,n.dataLabel({p:v.value[c].prefix,v:u,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(u/r.target)?"":n.dataLabel({v:u/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),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:o,body:a,config:l,colNames:o}}),P=e.ref(null),E=e.ref([]),V=e.ref(null);function fe(o,a){E.value=[],P.value=a,x.value=!0;let l="";V.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let u=0;u<o.values.length;u+=1)i.value.includes(u)||E.value.push({name:v.value[u].name,value:o.values[u]/o.target*100,color:v.value[u].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[u].prefix??"",v:o.values[u],s:v.value[u].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function ee(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...k.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,Je)=>[c.name,c.target,...c.values.flatMap(O=>[O,isNaN(O/c.target)?"":O/c.target*100])]),r=o.concat([a]).concat(l),u=n.createCsvContent(r);n.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const w=e.ref(!1);function ye(o){w.value=o,F.value+=1}function te(){g.value.showTable=!g.value.showTable}function oe(){g.value.showTooltip=!g.value.showTooltip}const $=e.ref(!1);function A(){$.value=!$.value}return ue({getData:pe,generatePdf:X,generateCsv:ee,generateImage:j,toggleTable:te,toggleTooltip:oe,toggleAnnotator:A}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${w.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:f,id:`vue-ui-radar_${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(xe.PenAndPaper,{key:0,parent:f.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:A},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),de.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:R,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:L,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(ke._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(le.UserOptions,{ref_key:"details",ref:ce,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(H),isPrinting:e.unref(W),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:w.value,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:f.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(X),onGenerateCsv:ee,onGenerateImage:e.unref(j),onToggleTable:te,onToggleTooltip:oe,onToggleAnnotator:A},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,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),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode($e._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ae)],8,Ee))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.width/2,y1:s.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Fe))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ge.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:s.value.width/2,y:s.value.height/2},radius:l,sides:Q.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ze))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:Z.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,Ie),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:S(l).x,y:S(l).y,"text-anchor":S(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:u=>fe(l,r),onMouseleave:a[0]||(a[0]=u=>{x.value=!1,P.value=null})},e.toDisplayString(l.name),41,qe))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&C.value===r&&t.value.useCssAnimation})},null,10,De)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${m.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&C.value===r&&t.value.useCssAnimation})},null,10,Me)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(u,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:P.value!==null&&P.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":y.value&&C.value===c&&t.value.useCssAnimation})},null,10,Ge))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",We,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(W)||e.unref(H)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(_e.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:`legend_${M.value}`,legendSet:k.value,config:me.value,onClickMarker:a[1]||(a[1]=({i:l})=>J(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,He)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:I,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(be._sfc_main,{show:g.value.showTooltip&&x.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,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:f.value,content:N.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...V.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Xe,[e.createVNode(Ce.default,{dataset:E.value,config:ve.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...V.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(Pe.default,{key:8,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Be.DataTable,{key:`table_${D.value}`,colNames:_.value.colNames,head:_.value.head,body:_.value.body,config:_.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>g.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),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,Te))}},Ye=Ne._export_sfc(je,[["__scopeId","data-v-e797ea4b"]]);exports.default=Ye;
@@ -1,6 +1,6 @@
1
1
  import { ref as h, computed as x, watch as E, onMounted as K, openBlock as a, createElementBlock as i, normalizeStyle as o, createElementVNode as r, toDisplayString as g, createCommentVNode as d, unref as s, Fragment as T, renderList as H, withKeys as P } from "vue";
2
- import { u as W, c as q, o as J, e as Q, i as $, f as _, X as k, w as R, U as F } from "./index-Bya_q1J-.js";
3
- import { u as Z } from "./useNestedProp-B33hazbH.js";
2
+ import { u as W, c as q, o as J, e as Q, i as $, f as _, X as k, w as R, U as F } from "./index-C1GB0E49.js";
3
+ import { u as Z } from "./useNestedProp-CNAPgW6E.js";
4
4
  import { _ as tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const et = {
6
6
  key: 0,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-eFox7weK.cjs"),L=require("./useNestedProp-BkgEhTQY.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},A=["src","height","width"],R=["xmlns","height","width"],X=["id"],j=["stop-color"],F=["stop-color"],I=["points","fill","stroke","stroke-width"],O=["src","alt","height","width","id"],Y=["xmlns","viewBox","height","id"],G=["id"],q=["stop-color"],U=["stop-color"],H=["points","fill","stroke"],K=["xmlns","height"],P=["onClick","onMouseenter","onKeyup"],T=["onMouseenter"],W={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(k,{expose:_,emit:S}){const i=k,{vue_ui_rating:z}=a.useConfig(),d=e.ref(a.createUid()),f=e.ref(!1),s=e.ref(void 0),y=e.ref([]),t=e.computed({get:()=>g(),set:o=>o});function g(){return L.useNestedProp({userConfig:i.config,defaultConfig:z})}e.watch(()=>i.config,o=>{t.value=g(),h()},{deep:!0});const w=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?N(i.dataset.rating):i.dataset.rating),B=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),r=e.ref(w.value),m=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function N(o){let n=0,l=0;for(const u in o){const V=parseInt(u),b=o[u];n+=V*b,l+=b}if(l===0)return 0;const v=n/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{h()});function h(){a.objectIsEmpty(i.dataset)&&a.error({componentName:"VueUiRating",type:"dataset"}),y.value=[];for(let o=t.value.from;o<=t.value.to;o+=1)y.value.push(o)}function p(o,n=!1){return o>s.value||c.value?n?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:n?1:t.value.style.star.useGradient?`url(#star_gradient_under_${d.value})`:t.value.style.star.activeColor}function x(o,n=!1){const l=r.value-o,v=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function $(o){c.value||(r.value=o,S("rate",o))}function C(){return r.value}function E(o=!0){c.value=o}return _({getData:C,toggleReadonly:E}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:n[2]||(n[2]=l=>f.value=!0),onMouseleave:n[3]||(n[3]=l=>{f.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,v)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[m.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(s.value)?t.value.style.image.inactiveOpacity:p(l,!0)}`)},null,12,A)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,j),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,F)],8,X)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(s.value)?t.value.style.star.inactiveColor:p(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:s.value?p(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,I)],8,R)),m.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${d.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${x(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,O)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${x(v)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${d.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,q),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,U)],8,G)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${d.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,H)],8,Y)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:u=>$(l),onMouseenter:u=>s.value=l,onMouseleave:n[0]||(n[0]=u=>s.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>$(l),["enter"])},null,40,P)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:u=>s.value=l,onMouseleave:n[1]||(n[1]=u=>s.value=void 0)},null,40,T)):e.createCommentVNode("",!0)],12,K)),t.value.style.tooltip.show&&B.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l)+":",5),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[l],e.unref(a.dataLabel)({v:i.dataset.rating[l],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},J=D._export_sfc(W,[["__scopeId","data-v-d90e158f"]]);exports.default=J;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-C9HllqQA.cjs"),L=require("./useNestedProp-DOr0hj4s.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},A=["src","height","width"],R=["xmlns","height","width"],X=["id"],j=["stop-color"],F=["stop-color"],I=["points","fill","stroke","stroke-width"],O=["src","alt","height","width","id"],Y=["xmlns","viewBox","height","id"],G=["id"],q=["stop-color"],U=["stop-color"],H=["points","fill","stroke"],K=["xmlns","height"],P=["onClick","onMouseenter","onKeyup"],T=["onMouseenter"],W={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(k,{expose:_,emit:S}){const i=k,{vue_ui_rating:z}=a.useConfig(),d=e.ref(a.createUid()),f=e.ref(!1),s=e.ref(void 0),y=e.ref([]),t=e.computed({get:()=>g(),set:o=>o});function g(){return L.useNestedProp({userConfig:i.config,defaultConfig:z})}e.watch(()=>i.config,o=>{t.value=g(),h()},{deep:!0});const w=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?N(i.dataset.rating):i.dataset.rating),B=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),r=e.ref(w.value),m=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function N(o){let n=0,l=0;for(const u in o){const V=parseInt(u),b=o[u];n+=V*b,l+=b}if(l===0)return 0;const v=n/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{h()});function h(){a.objectIsEmpty(i.dataset)&&a.error({componentName:"VueUiRating",type:"dataset"}),y.value=[];for(let o=t.value.from;o<=t.value.to;o+=1)y.value.push(o)}function p(o,n=!1){return o>s.value||c.value?n?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:n?1:t.value.style.star.useGradient?`url(#star_gradient_under_${d.value})`:t.value.style.star.activeColor}function x(o,n=!1){const l=r.value-o,v=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function $(o){c.value||(r.value=o,S("rate",o))}function C(){return r.value}function E(o=!0){c.value=o}return _({getData:C,toggleReadonly:E}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:n[2]||(n[2]=l=>f.value=!0),onMouseleave:n[3]||(n[3]=l=>{f.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,v)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[m.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(s.value)?t.value.style.image.inactiveOpacity:p(l,!0)}`)},null,12,A)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,j),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,F)],8,X)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(s.value)?t.value.style.star.inactiveColor:p(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:s.value?p(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,I)],8,R)),m.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${d.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${x(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,O)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${x(v)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${d.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,q),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,U)],8,G)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${d.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,H)],8,Y)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:u=>$(l),onMouseenter:u=>s.value=l,onMouseleave:n[0]||(n[0]=u=>s.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>$(l),["enter"])},null,40,P)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:u=>s.value=l,onMouseleave:n[1]||(n[1]=u=>s.value=void 0)},null,40,T)):e.createCommentVNode("",!0)],12,K)),t.value.style.tooltip.show&&B.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l)+":",5),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[l],e.unref(a.dataLabel)({v:i.dataset.rating[l],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},J=D._export_sfc(W,[["__scopeId","data-v-d90e158f"]]);exports.default=J;
@@ -0,0 +1,366 @@
1
+ import { useCssVars as xe, computed as c, ref as a, watch as be, onMounted as Ae, onBeforeUnmount as Oe, openBlock as n, createElementBlock as i, normalizeStyle as C, createBlock as A, createCommentVNode as f, unref as y, createSlots as Pe, withCtx as O, renderSlot as m, normalizeProps as N, guardReactiveProps as S, normalizeClass as R, createVNode as Ie, createElementVNode as Fe, Fragment as P, renderList as I, toDisplayString as Te } from "vue";
2
+ import { u as Ee, c as ze, t as Le, a as Ne, p as ne, b as Se, o as Re, e as re, g as Me, X as je } from "./index-C1GB0E49.js";
3
+ import { t as Be, u as Ge } from "./useResponsive-CoxXLe23.js";
4
+ import { _ as Ue } from "./Title-W7iJGPjg.js";
5
+ import { u as De, U as Ve } from "./usePrinter-y5uHyknw.js";
6
+ import We from "./vue-ui-skeleton-CE6ibl1T.js";
7
+ import { u as se } from "./useNestedProp-CNAPgW6E.js";
8
+ import { _ as Xe } from "./PackageVersion-D9rYHrFZ.js";
9
+ import { P as Ye } from "./PenAndPaper-C-KjtyNA.js";
10
+ import { _ as qe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
+ const He = ["id"], Je = ["xmlns", "viewBox"], Ke = ["cx", "cy", "r", "stroke", "stroke-width"], Qe = { key: 0 }, Ze = ["stroke", "d", "stroke-width"], et = { key: 1 }, tt = ["stroke", "x1", "x2", "y1", "y2"], lt = ["text-anchor", "transform", "x", "y", "onClick", "font-weight", "font-size", "fill"], nt = ["cx", "cy", "fill", "onClick", "r"], rt = {
12
+ key: 5,
13
+ class: "vue-data-ui-watermark"
14
+ }, st = {
15
+ __name: "vue-ui-relation-circle",
16
+ props: {
17
+ dataset: {
18
+ type: Array,
19
+ default() {
20
+ return [];
21
+ }
22
+ },
23
+ config: {
24
+ type: Object,
25
+ default() {
26
+ return {};
27
+ }
28
+ }
29
+ },
30
+ setup(ae, { expose: ie }) {
31
+ const d = ae;
32
+ xe((e) => ({
33
+ "47419f48": fe.value,
34
+ "77774d27": ve.value,
35
+ df46026e: ge.value
36
+ }));
37
+ const { vue_ui_relation_circle: oe } = Ee(), F = c(() => !!d.dataset && Object.keys(d.dataset).length), k = a(ze()), M = a(0), _ = a(null), j = a(null), B = a(null), G = a(null), U = a(0), l = c({
38
+ get: () => D(),
39
+ set: (e) => e
40
+ });
41
+ function D() {
42
+ const e = se({
43
+ userConfig: d.config,
44
+ defaultConfig: oe
45
+ });
46
+ return e.theme ? {
47
+ ...se({
48
+ userConfig: Le.vue_ui_relation_circle[e.theme] || d.config,
49
+ defaultConfig: e
50
+ }),
51
+ customPalette: Ne[e.theme] || ne
52
+ } : e;
53
+ }
54
+ be(() => d.config, (e) => {
55
+ l.value = D(), H(), U.value += 1;
56
+ }, { deep: !0 });
57
+ const { isPrinting: V, isImaging: W, generatePdf: X, generateImage: Y } = De({
58
+ elementId: `relation_circle_${k.value}`,
59
+ fileName: l.value.style.title.text || "vue-ui-relation-circle"
60
+ }), ue = c(() => l.value.userOptions.show && !l.value.style.title.text), q = c(() => Se(l.value.customPalette)), g = a([]), p = a([]), o = a({}), v = a([]), ce = a(0), T = c(() => d.dataset.slice(0, l.value.style.limit)), E = a(l.value.style.size), u = a({
61
+ height: l.value.style.size,
62
+ width: l.value.style.size
63
+ }), h = c({
64
+ get() {
65
+ return E.value * l.value.style.circle.radiusProportion;
66
+ },
67
+ set(e) {
68
+ return e;
69
+ }
70
+ }), de = c(() => l.value.style.links.curved), ve = c(() => `${l.value.style.animation.speedMs}ms`), fe = c(() => h.value * 2), ge = c(() => h.value * 4), w = a(null);
71
+ Ae(() => {
72
+ H(), document.getElementById(`relation_circle_${k.value}`).addEventListener("click", J);
73
+ });
74
+ function H() {
75
+ if (Re(d.dataset) ? re({
76
+ componentName: "VueUiRelationCircle",
77
+ type: "dataset"
78
+ }) : d.dataset.forEach((e, r) => {
79
+ Me({
80
+ datasetObject: e,
81
+ requiredAttributes: ["id", "label", "relations", "weights"]
82
+ }).forEach((t) => {
83
+ re({
84
+ componentName: "VueUiRelationCircle",
85
+ type: "datasetSerieAttribute",
86
+ property: t,
87
+ index: r
88
+ });
89
+ });
90
+ }), l.value.responsive) {
91
+ const e = Be(() => {
92
+ const { width: r, height: t } = Ge({
93
+ chart: _.value,
94
+ title: l.value.style.title.text ? j.value : null,
95
+ source: B.value,
96
+ noTitle: G.value
97
+ });
98
+ E.value = Math.min(r, t), u.value.width = r, u.value.height = t, h.value = E.value * l.value.style.circle.radiusProportion, g.value = [], p.value = [], K(), Q();
99
+ });
100
+ w.value = new ResizeObserver(e), w.value.observe(_.value.parentNode);
101
+ } else
102
+ g.value = [], p.value = [], K(), Q();
103
+ }
104
+ Oe(() => {
105
+ document.getElementById(`relation_circle_${k.value}`).removeEventListener("click", J), w.value && w.value.disconnect();
106
+ });
107
+ function J(e) {
108
+ const r = e.target;
109
+ r && Array.from(r.classList).includes("vue-ui-user-options") || r && Array.from(r.classList).includes("vue-ui-user-options-summary") || r && Array.from(r.classList).includes("vue-data-ui-button") || r && Array.from(r.classList).includes("vue-ui-relation-circle-legend") || (o.value = {}, v.value = []);
110
+ }
111
+ function K() {
112
+ const e = 6.28319 / T.value.length, r = 360 / T.value.length;
113
+ let t = 0, s = 0;
114
+ T.value.forEach(($, L) => {
115
+ const Ce = h.value * Math.cos(t) + u.value.width / 2, we = h.value * Math.sin(t) + u.value.height / 2 + l.value.style.circle.offsetY;
116
+ g.value.push({ x: Ce, y: we, ...$, color: $.color ? $.color : q.value[L] ? q.value[L] : ne[L], regAngle: s }), t += e, s += r;
117
+ });
118
+ }
119
+ function Q() {
120
+ g.value.forEach((e) => {
121
+ g.value.filter((t) => t.relations.includes(e.id)).forEach((t, s) => {
122
+ p.value.push({
123
+ weight: e.weights && e.weights[s] ? e.weights[s] : 1,
124
+ relationId: `${e.id}_${t.id}`,
125
+ x1: e.x,
126
+ y1: e.y,
127
+ x2: t.x,
128
+ y2: t.y,
129
+ colorSource: e.color,
130
+ colorTarget: t.color,
131
+ ...e
132
+ });
133
+ });
134
+ });
135
+ }
136
+ const he = c(() => Math.max(...p.value.map((e) => e.weight)));
137
+ function ye(e) {
138
+ return Object.hasOwn(o.value, "x") ? v.value.includes(e.id) ? "opacity:1" : "opacity:0.1" : "opacity:1";
139
+ }
140
+ function Z(e) {
141
+ return Object.hasOwn(o.value, "x") ? e.colorTarget : e.colorSource;
142
+ }
143
+ function ee(e) {
144
+ return Object.hasOwn(o.value, "x") ? v.value.includes(e.id) && e.relationId === `${e.id}_${o.value.id}` || e.relationId === `${o.value.id}_${e.id}` ? `opacity:1;stroke-width:${le(e)}` : "opacity: 0" : "opacity: 1";
145
+ }
146
+ function me(e) {
147
+ return e.regAngle > 90 && e.regAngle < 270 ? "end" : "start";
148
+ }
149
+ function pe(e) {
150
+ return e.regAngle > 90 && e.regAngle < 270 ? e.x - 5 : e.x + 5;
151
+ }
152
+ function ke(e) {
153
+ return Object.hasOwn(o.value, "x") ? o.value.id === e.id || v.value.includes(e.id) ? "opacity:1" : "opacity:0.2" : "opacity:1";
154
+ }
155
+ function _e(e) {
156
+ return e.regAngle > 90 && e.regAngle < 270 ? `rotate(${e.regAngle + 180},${e.x},${e.y})` : `rotate(${e.regAngle},${e.x},${e.y})`;
157
+ }
158
+ function te(e) {
159
+ ce.value = 360 - e.regAngle, o.value.id && e.id === o.value.id ? (o.value = {}, v.value = []) : (o.value = e, v.value = [...e.relations]);
160
+ }
161
+ function le(e) {
162
+ return e.weight / he.value * l.value.style.links.maxWidth;
163
+ }
164
+ const x = a(!1);
165
+ function $e(e) {
166
+ x.value = e, M.value += 1;
167
+ }
168
+ const b = a(!1);
169
+ function z() {
170
+ b.value = !b.value;
171
+ }
172
+ return ie({
173
+ generatePdf: X,
174
+ generateImage: Y,
175
+ toggleAnnotator: z
176
+ }), (e, r) => (n(), i("div", {
177
+ ref_key: "relationCircleChart",
178
+ ref: _,
179
+ class: "vue-ui-relation-circle",
180
+ style: C(`width:100%;background:${l.value.style.backgroundColor};text-align:center;${l.value.responsive ? "height: 100%" : ""}`),
181
+ id: `relation_circle_${k.value}`
182
+ }, [
183
+ l.value.userOptions.buttons.annotator ? (n(), A(Ye, {
184
+ key: 0,
185
+ parent: _.value,
186
+ backgroundColor: l.value.style.backgroundColor,
187
+ color: l.value.style.color,
188
+ active: b.value,
189
+ onClose: z
190
+ }, null, 8, ["parent", "backgroundColor", "color", "active"])) : f("", !0),
191
+ ue.value ? (n(), i("div", {
192
+ key: 1,
193
+ ref_key: "noTitle",
194
+ ref: G,
195
+ class: "vue-data-ui-no-title-space",
196
+ style: "height:36px; width: 100%;background:transparent"
197
+ }, null, 512)) : f("", !0),
198
+ l.value.style.title.text ? (n(), i("div", {
199
+ key: 2,
200
+ ref_key: "chartTitle",
201
+ ref: j,
202
+ style: "width:100%;background:transparent"
203
+ }, [
204
+ (n(), A(Ue, {
205
+ key: `title_${U.value}`,
206
+ config: {
207
+ title: {
208
+ cy: "relation-div-title",
209
+ ...l.value.style.title
210
+ },
211
+ subtitle: {
212
+ cy: "relation-div-subtitle",
213
+ ...l.value.style.title.subtitle
214
+ }
215
+ }
216
+ }, null, 8, ["config"]))
217
+ ], 512)) : f("", !0),
218
+ l.value.userOptions.show && F.value ? (n(), A(Ve, {
219
+ ref: "details",
220
+ key: `user_options_${M.value}`,
221
+ backgroundColor: l.value.style.backgroundColor,
222
+ color: l.value.style.color,
223
+ isPrinting: y(V),
224
+ isImaging: y(W),
225
+ uid: k.value,
226
+ hasPdf: l.value.userOptions.buttons.pdf,
227
+ hasImg: l.value.userOptions.buttons.img,
228
+ hasFullscreen: l.value.userOptions.buttons.img,
229
+ hasXls: !1,
230
+ isFullscreen: x.value,
231
+ titles: { ...l.value.userOptions.buttonTitles },
232
+ chartElement: _.value,
233
+ position: l.value.userOptions.position,
234
+ hasAnnotator: l.value.userOptions.buttons.annotator,
235
+ isAnnotation: b.value,
236
+ onToggleFullscreen: $e,
237
+ onGeneratePdf: y(X),
238
+ onGenerateImage: y(Y),
239
+ onToggleAnnotator: z
240
+ }, Pe({ _: 2 }, [
241
+ e.$slots.optionPdf ? {
242
+ name: "optionPdf",
243
+ fn: O(() => [
244
+ m(e.$slots, "optionPdf", {}, void 0, !0)
245
+ ]),
246
+ key: "0"
247
+ } : void 0,
248
+ e.$slots.optionImg ? {
249
+ name: "optionImg",
250
+ fn: O(() => [
251
+ m(e.$slots, "optionImg", {}, void 0, !0)
252
+ ]),
253
+ key: "1"
254
+ } : void 0,
255
+ e.$slots.optionFullscreen ? {
256
+ name: "optionFullscreen",
257
+ fn: O(({ toggleFullscreen: t, isFullscreen: s }) => [
258
+ m(e.$slots, "optionFullscreen", N(S({ toggleFullscreen: t, isFullscreen: s })), void 0, !0)
259
+ ]),
260
+ key: "2"
261
+ } : void 0,
262
+ e.$slots.optionAnnotator ? {
263
+ name: "optionAnnotator",
264
+ fn: O(({ toggleAnnotator: t, isAnnotator: s }) => [
265
+ m(e.$slots, "optionAnnotator", N(S({ toggleAnnotator: t, isAnnotator: s })), void 0, !0)
266
+ ]),
267
+ key: "3"
268
+ } : void 0
269
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage"])) : f("", !0),
270
+ F.value ? (n(), i("svg", {
271
+ key: 4,
272
+ xmlns: y(je),
273
+ class: R([{ "vue-data-ui-fullscreen--on": x.value, "vue-data-ui-fulscreen--off": !x.value }, "relation-circle"]),
274
+ viewBox: `0 0 ${u.value.width <= 0 ? 10 : u.value.width} ${u.value.height <= 0 ? 10 : u.value.height}`,
275
+ width: "100%",
276
+ style: "user-select:none; background:transparent"
277
+ }, [
278
+ Ie(Xe),
279
+ Fe("circle", {
280
+ cx: (u.value.width <= 0 ? 1e-4 : u.value.width) / 2,
281
+ cy: (u.value.height <= 0 ? 1e-4 : u.value.height) / 2 + l.value.style.circle.offsetY,
282
+ r: h.value <= 0 ? 1e-4 : h.value,
283
+ stroke: l.value.style.circle.stroke,
284
+ "stroke-width": l.value.style.circle.strokeWidth,
285
+ fill: "transparent",
286
+ class: "main-circle"
287
+ }, null, 8, Ke),
288
+ de.value ? (n(), i("g", Qe, [
289
+ (n(!0), i(P, null, I(p.value, (t, s) => (n(), i("path", {
290
+ key: `relation_${s}`,
291
+ style: C(ee(t)),
292
+ stroke: Z(t),
293
+ class: R(["relation", { "vue-ui-relation-circle-selected": o.value.hasOwnProperty("id") && v.value.includes(t.id) }]),
294
+ d: `M${t.x1},${t.y1} C${t.x1},${t.y1} ${u.value.width / 2},${u.value.height / 2 + l.value.style.circle.offsetY} ${t.x2},${t.y2}`,
295
+ fill: "none",
296
+ "stroke-width": le(t),
297
+ "stroke-linecap": "round"
298
+ }, null, 14, Ze))), 128))
299
+ ])) : (n(), i("g", et, [
300
+ (n(!0), i(P, null, I(p.value, (t, s) => (n(), i("line", {
301
+ key: `relation_${s}`,
302
+ stroke: Z(t),
303
+ style: C(ee(t)),
304
+ x1: t.x1,
305
+ x2: t.x2,
306
+ y1: t.y1,
307
+ y2: t.y2,
308
+ class: R({ "vue-ui-relation-circle-selected": o.value.hasOwnProperty("id") && v.value.includes(t.id) }),
309
+ "stroke-linecap": "round"
310
+ }, null, 14, tt))), 128))
311
+ ])),
312
+ (n(!0), i(P, null, I(g.value, (t, s) => (n(), i("text", {
313
+ key: `plot_text_${s}`,
314
+ "text-anchor": me(t),
315
+ transform: _e(t),
316
+ x: pe(t),
317
+ y: t.y + 5,
318
+ onClick: ($) => te(t),
319
+ class: "vue-ui-relation-circle-legend",
320
+ "transform-origin": "start",
321
+ "font-weight": o.value.id === t.id ? "900" : "400",
322
+ style: C(`font-family:${l.value.style.fontFamily};${ke(t)}`),
323
+ "font-size": l.value.style.labels.fontSize,
324
+ fill: l.value.style.labels.color
325
+ }, Te(t.label), 13, lt))), 128)),
326
+ (n(!0), i(P, null, I(g.value, (t, s) => (n(), i("circle", {
327
+ cx: t.x,
328
+ cy: t.y,
329
+ key: `plot_${s}`,
330
+ style: C(ye(t)),
331
+ class: "vue-ui-relation-circle-plot",
332
+ fill: l.value.style.plot.color,
333
+ onClick: ($) => te(t),
334
+ r: l.value.style.plot.radius
335
+ }, null, 12, nt))), 128)),
336
+ m(e.$slots, "svg", { svg: u.value }, void 0, !0)
337
+ ], 10, Je)) : f("", !0),
338
+ e.$slots.watermark ? (n(), i("div", rt, [
339
+ m(e.$slots, "watermark", N(S({ isPrinting: y(V) || y(W) })), void 0, !0)
340
+ ])) : f("", !0),
341
+ e.$slots.source ? (n(), i("div", {
342
+ key: 6,
343
+ ref_key: "source",
344
+ ref: B,
345
+ dir: "auto"
346
+ }, [
347
+ m(e.$slots, "source", {}, void 0, !0)
348
+ ], 512)) : f("", !0),
349
+ F.value ? f("", !0) : (n(), A(We, {
350
+ key: 7,
351
+ config: {
352
+ type: "relationCircle",
353
+ style: {
354
+ backgroundColor: l.value.style.backgroundColor,
355
+ relationCircle: {
356
+ color: "#CCCCCC"
357
+ }
358
+ }
359
+ }
360
+ }, null, 8, ["config"]))
361
+ ], 12, He));
362
+ }
363
+ }, yt = /* @__PURE__ */ qe(st, [["__scopeId", "data-v-a4837ff7"]]);
364
+ export {
365
+ yt as default
366
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-C9HllqQA.cjs"),U=require("./useResponsive-BJ7DTGpm.cjs"),de=require("./Title-Dn00hErp.cjs"),D=require("./usePrinter-FSAw5pod.cjs"),ve=require("./vue-ui-skeleton-CPwED1As.cjs"),W=require("./useNestedProp-DOr0hj4s.cjs"),fe=require("./PackageVersion-DdLmDkTt.cjs"),ge=require("./PenAndPaper-DyMNuRla.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ye=["id"],he=["xmlns","viewBox"],ke=["cx","cy","r","stroke","stroke-width"],pe={key:0},Ce=["stroke","d","stroke-width"],_e={key:1},$e=["stroke","x1","x2","y1","y2"],xe=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],we=["cx","cy","fill","onClick","r"],Be={key:5,class:"vue-data-ui-watermark"},be={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(X,{expose:Y}){const u=X;e.useCssVars(t=>({"47419f48":ee.value,"77774d27":Z.value,df46026e:te.value}));const{vue_ui_relation_circle:H}=i.useConfig(),C=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length),g=e.ref(i.createUid()),B=e.ref(0),m=e.ref(null),b=e.ref(null),P=e.ref(null),A=e.ref(null),O=e.ref(0),n=e.computed({get:()=>E(),set:t=>t});function E(){const t=W.useNestedProp({userConfig:u.config,defaultConfig:H});return t.theme?{...W.useNestedProp({userConfig:i.themes.vue_ui_relation_circle[t.theme]||u.config,defaultConfig:t}),customPalette:i.themePalettes[t.theme]||i.palette}:t}e.watch(()=>u.config,t=>{n.value=E(),T(),O.value+=1},{deep:!0});const{isPrinting:S,isImaging:I,generatePdf:N,generateImage:z}=D.usePrinter({elementId:`relation_circle_${g.value}`,fileName:n.value.style.title.text||"vue-ui-relation-circle"}),J=e.computed(()=>n.value.userOptions.show&&!n.value.style.title.text),F=e.computed(()=>i.convertCustomPalette(n.value.customPalette)),d=e.ref([]),f=e.ref([]),a=e.ref({}),c=e.ref([]),K=e.ref(0),_=e.computed(()=>u.dataset.slice(0,n.value.style.limit)),$=e.ref(n.value.style.size),s=e.ref({height:n.value.style.size,width:n.value.style.size}),v=e.computed({get(){return $.value*n.value.style.circle.radiusProportion},set(t){return t}}),Q=e.computed(()=>n.value.style.links.curved),Z=e.computed(()=>`${n.value.style.animation.speedMs}ms`),ee=e.computed(()=>v.value*2),te=e.computed(()=>v.value*4),h=e.ref(null);e.onMounted(()=>{T(),document.getElementById(`relation_circle_${g.value}`).addEventListener("click",L)});function T(){if(i.objectIsEmpty(u.dataset)?i.error({componentName:"VueUiRelationCircle",type:"dataset"}):u.dataset.forEach((t,r)=>{i.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{i.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:r})})}),n.value.responsive){const t=U.throttle(()=>{const{width:r,height:l}=U.useResponsive({chart:m.value,title:n.value.style.title.text?b.value:null,source:P.value,noTitle:A.value});$.value=Math.min(r,l),s.value.width=r,s.value.height=l,v.value=$.value*n.value.style.circle.radiusProportion,d.value=[],f.value=[],V(),R()});h.value=new ResizeObserver(t),h.value.observe(m.value.parentNode)}else d.value=[],f.value=[],V(),R()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${g.value}`).removeEventListener("click",L),h.value&&h.value.disconnect()});function L(t){const r=t.target;r&&Array.from(r.classList).includes("vue-ui-user-options")||r&&Array.from(r.classList).includes("vue-ui-user-options-summary")||r&&Array.from(r.classList).includes("vue-data-ui-button")||r&&Array.from(r.classList).includes("vue-ui-relation-circle-legend")||(a.value={},c.value=[])}function V(){const t=6.28319/_.value.length,r=360/_.value.length;let l=0,o=0;_.value.forEach((y,w)=>{const ue=v.value*Math.cos(l)+s.value.width/2,ce=v.value*Math.sin(l)+s.value.height/2+n.value.style.circle.offsetY;d.value.push({x:ue,y:ce,...y,color:y.color?y.color:F.value[w]?F.value[w]:i.palette[w],regAngle:o}),l+=t,o+=r})}function R(){d.value.forEach(t=>{d.value.filter(l=>l.relations.includes(t.id)).forEach((l,o)=>{f.value.push({weight:t.weights&&t.weights[o]?t.weights[o]:1,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,...t})})})}const le=e.computed(()=>Math.max(...f.value.map(t=>t.weight)));function ne(t){return Object.hasOwn(a.value,"x")?c.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function q(t){return Object.hasOwn(a.value,"x")?t.colorTarget:t.colorSource}function M(t){return Object.hasOwn(a.value,"x")?c.value.includes(t.id)&&t.relationId===`${t.id}_${a.value.id}`||t.relationId===`${a.value.id}_${t.id}`?`opacity:1;stroke-width:${G(t)}`:"opacity: 0":"opacity: 1"}function re(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function oe(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function ae(t){return Object.hasOwn(a.value,"x")?a.value.id===t.id||c.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function se(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function j(t){K.value=360-t.regAngle,a.value.id&&t.id===a.value.id?(a.value={},c.value=[]):(a.value=t,c.value=[...t.relations])}function G(t){return t.weight/le.value*n.value.style.links.maxWidth}const k=e.ref(!1);function ie(t){k.value=t,B.value+=1}const p=e.ref(!1);function x(){p.value=!p.value}return Y({generatePdf:N,generateImage:z,toggleAnnotator:x}),(t,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:m,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${n.value.style.backgroundColor};text-align:center;${n.value.responsive?"height: 100%":""}`),id:`relation_circle_${g.value}`},[n.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ge.PenAndPaper,{key:0,parent:m.value,backgroundColor:n.value.style.backgroundColor,color:n.value.style.color,active:p.value,onClose:x},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),J.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:A,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),n.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:b,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${O.value}`,config:{title:{cy:"relation-div-title",...n.value.style.title},subtitle:{cy:"relation-div-subtitle",...n.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),n.value.userOptions.show&&C.value?(e.openBlock(),e.createBlock(D.UserOptions,{ref:"details",key:`user_options_${B.value}`,backgroundColor:n.value.style.backgroundColor,color:n.value.style.color,isPrinting:e.unref(S),isImaging:e.unref(I),uid:g.value,hasPdf:n.value.userOptions.buttons.pdf,hasImg:n.value.userOptions.buttons.img,hasFullscreen:n.value.userOptions.buttons.img,hasXls:!1,isFullscreen:k.value,titles:{...n.value.userOptions.buttonTitles},chartElement:m.value,position:n.value.userOptions.position,hasAnnotator:n.value.userOptions.buttons.annotator,isAnnotation:p.value,onToggleFullscreen:ie,onGeneratePdf:e.unref(N),onGenerateImage:e.unref(z),onToggleAnnotator:x},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"2"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(i.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value},"relation-circle"]),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode(fe._sfc_main),e.createElementVNode("circle",{cx:(s.value.width<=0?1e-4:s.value.width)/2,cy:(s.value.height<=0?1e-4:s.value.height)/2+n.value.style.circle.offsetY,r:v.value<=0?1e-4:v.value,stroke:n.value.style.circle.stroke,"stroke-width":n.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,ke),Q.value?(e.openBlock(),e.createElementBlock("g",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${o}`,style:e.normalizeStyle(M(l)),stroke:q(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&c.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${s.value.width/2},${s.value.height/2+n.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":G(l),"stroke-linecap":"round"},null,14,Ce))),128))])):(e.openBlock(),e.createElementBlock("g",_e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${o}`,stroke:q(l),style:e.normalizeStyle(M(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&c.value.includes(l.id)}),"stroke-linecap":"round"},null,14,$e))),128))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${o}`,"text-anchor":re(l),transform:se(l),x:oe(l),y:l.y+5,onClick:y=>j(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":a.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${n.value.style.fontFamily};${ae(l)}`),"font-size":n.value.style.labels.fontSize,fill:n.value.style.labels.color},e.toDisplayString(l.label),13,xe))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${o}`,style:e.normalizeStyle(ne(l)),class:"vue-ui-relation-circle-plot",fill:n.value.style.plot.color,onClick:y=>j(l),r:n.value.style.plot.radius},null,12,we))),128)),e.renderSlot(t.$slots,"svg",{svg:s.value},void 0,!0)],10,he)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Be,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:P,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:n.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],12,ye))}},Pe=me._export_sfc(be,[["__scopeId","data-v-a4837ff7"]]);exports.default=Pe;