vue-data-ui 2.4.1 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/README.md +44 -44
  2. package/dist/{Arrow-DpMf3yPs.cjs → Arrow-DLTRnzcG.cjs} +1 -1
  3. package/dist/{Arrow-BIs_9yK8.js → Arrow-JuK2z9IB.js} +1 -1
  4. package/dist/BaseIcon-BGExhz6v.cjs +1 -0
  5. package/dist/{BaseIcon-CXDdkPfN.js → BaseIcon-rRli6Sfv.js} +7 -4
  6. package/dist/{DataTable-BTgMVOwp.cjs → DataTable-DJzhv96s.cjs} +1 -1
  7. package/dist/{DataTable-DL2agEJ3.js → DataTable-DTk7C4Pr.js} +2 -2
  8. package/dist/{Legend-DXLiSLHd.js → Legend-CYF2gpXG.js} +1 -1
  9. package/dist/{Legend-Dj9KiaLv.cjs → Legend-YZ7Hz3o1.cjs} +1 -1
  10. package/dist/{PackageVersion-DtnhR89q.js → PackageVersion-CvCRsT5_.js} +1 -1
  11. package/dist/{PackageVersion-D4D0WicU.cjs → PackageVersion-DVZtsuy4.cjs} +1 -1
  12. package/dist/PenAndPaper-CyXm-yVL.cjs +1 -0
  13. package/dist/PenAndPaper-Jb0pLt3G.js +269 -0
  14. package/dist/{Shape-CO_Ak9Zm.js → Shape-BpPn4eWR.js} +1 -1
  15. package/dist/{Shape-7EC2UKDK.cjs → Shape-X2F-QV_B.cjs} +1 -1
  16. package/dist/{Slicer-CLAVjSQP.cjs → Slicer-CL0tP5a5.cjs} +1 -1
  17. package/dist/{Slicer-BZfUZr1J.js → Slicer-CU7dRZR0.js} +2 -2
  18. package/dist/{Title-DYNLqCCT.js → Title-5VmBwT4i.js} +1 -1
  19. package/dist/{Title-C-lm3Mkl.cjs → Title-Co5jI5ed.cjs} +1 -1
  20. package/dist/{Tooltip-t-3mVhcz.cjs → Tooltip-Bl6W8Zn7.cjs} +1 -1
  21. package/dist/{Tooltip-CICAYyQj.js → Tooltip-Cj4EF7v1.js} +1 -1
  22. package/dist/{index-DDXisDKy.js → index-DnVHQ2xI.js} +880 -842
  23. package/dist/index-FfZRtJ6A.cjs +9 -0
  24. package/dist/style.css +1 -1
  25. package/dist/types/vue-data-ui.d.cts +18 -16
  26. package/dist/types/vue-data-ui.d.ts +18 -16
  27. package/dist/{useNestedProp-S1UXxUgm.js → useNestedProp-Cox0K0Y5.js} +1 -1
  28. package/dist/{useNestedProp-CC9zGr7C.cjs → useNestedProp-q7byAAIJ.cjs} +1 -1
  29. package/dist/usePrinter-BCAFeO_J.cjs +1 -0
  30. package/dist/{usePrinter-8ofTb2MJ.js → usePrinter-BEeNAqS5.js} +230 -185
  31. package/dist/vue-data-ui-CRLLZpt0.cjs +9 -0
  32. package/dist/vue-data-ui-W7nnqn0v.js +261 -0
  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-DcF1nyGW.js → vue-ui-3d-bar-BwBrUabe.js} +414 -390
  36. package/dist/vue-ui-3d-bar-bD_n6qL_.cjs +19 -0
  37. package/dist/{vue-ui-accordion-D_1fE5EF.js → vue-ui-accordion-DspS4q3f.js} +3 -3
  38. package/dist/{vue-ui-accordion-Cc9958th.cjs → vue-ui-accordion-xXgqfR2l.cjs} +1 -1
  39. package/dist/vue-ui-age-pyramid-BZcAwcVQ.cjs +1 -0
  40. package/dist/{vue-ui-age-pyramid-Oe_yHDL0.js → vue-ui-age-pyramid-CxBvm3uM.js} +218 -194
  41. package/dist/{vue-ui-annotator-Dix6_Gm6.js → vue-ui-annotator-BOofWpzv.js} +1 -1
  42. package/dist/{vue-ui-annotator-Dbp6cWMr.cjs → vue-ui-annotator-C6T5_7ZV.cjs} +1 -1
  43. package/dist/vue-ui-bullet-ChaEgXvR.cjs +23 -0
  44. package/dist/vue-ui-bullet-DraC-oFu.js +433 -0
  45. package/dist/vue-ui-candlestick--hPCfMFH.cjs +2 -0
  46. package/dist/{vue-ui-candlestick-CRwzWF6j.js → vue-ui-candlestick-DQZ5eT1f.js} +267 -243
  47. package/dist/{vue-ui-carousel-table-C0GDDSW9.cjs → vue-ui-carousel-table-DpRQklDZ.cjs} +1 -1
  48. package/dist/{vue-ui-carousel-table-BHeEbRKY.js → vue-ui-carousel-table-PdLjpH1p.js} +4 -4
  49. package/dist/{vue-ui-chestnut-CRk0RCB9.js → vue-ui-chestnut-ByI_O5hB.js} +293 -269
  50. package/dist/vue-ui-chestnut-ae6x87wl.cjs +6 -0
  51. package/dist/{vue-ui-cursor-y0kdr0uA.js → vue-ui-cursor-BM74l93B.js} +2 -2
  52. package/dist/{vue-ui-cursor-lU1rts1B.cjs → vue-ui-cursor-BvadpA2m.cjs} +1 -1
  53. package/dist/{vue-ui-dashboard-OyihaKdu.js → vue-ui-dashboard-CoANBhAM.js} +2 -2
  54. package/dist/{vue-ui-dashboard-BfC0jS-X.cjs → vue-ui-dashboard-OP51Gs8I.cjs} +1 -1
  55. package/dist/{vue-ui-digits-BJfcAiq_.cjs → vue-ui-digits-C7jJJg9k.cjs} +1 -1
  56. package/dist/{vue-ui-digits-IKt4qT2-.js → vue-ui-digits-DioaBnkB.js} +2 -2
  57. package/dist/vue-ui-donut-CplNylps.cjs +1 -0
  58. package/dist/vue-ui-donut-evolution-CQpr-6IS.cjs +1 -0
  59. package/dist/{vue-ui-donut-evolution-Dd4o37RP.js → vue-ui-donut-evolution-DAb1xzNd.js} +330 -306
  60. package/dist/{vue-ui-donut-DFaGk4fI.js → vue-ui-donut-ldqSm_JV.js} +345 -321
  61. package/dist/{vue-ui-dumbbell-B7j1_JoQ.js → vue-ui-dumbbell-Dg7PkiKJ.js} +265 -241
  62. package/dist/vue-ui-dumbbell-_ijaYr8W.cjs +9 -0
  63. package/dist/vue-ui-flow-BPt35d5K.cjs +1 -0
  64. package/dist/vue-ui-flow-DKT7ZEnr.js +508 -0
  65. package/dist/vue-ui-galaxy-e06PkTmp.cjs +1 -0
  66. package/dist/{vue-ui-galaxy-CH1BDtWl.js → vue-ui-galaxy-qAA9be3S.js} +193 -169
  67. package/dist/vue-ui-gauge-D8yVTIgP.js +518 -0
  68. package/dist/vue-ui-gauge-DiZVIU0D.cjs +1 -0
  69. package/dist/{vue-ui-gizmo-CKQcbe_7.js → vue-ui-gizmo-DC0uUwI3.js} +3 -3
  70. package/dist/{vue-ui-gizmo-DVwQaEH1.cjs → vue-ui-gizmo-W6bTkg59.cjs} +1 -1
  71. package/dist/vue-ui-heatmap-CbZcv_2I.cjs +1 -0
  72. package/dist/{vue-ui-heatmap-B-zWMk0Y.js → vue-ui-heatmap-u1raIzBQ.js} +252 -228
  73. package/dist/{vue-ui-kpi-CghbfSdM.js → vue-ui-kpi-C-iTxMD2.js} +3 -3
  74. package/dist/{vue-ui-kpi-CuY3xlVq.cjs → vue-ui-kpi-DY_2WF7U.cjs} +1 -1
  75. package/dist/{vue-ui-mini-loader-CH_PfeDc.cjs → vue-ui-mini-loader-Bfq2MNWu.cjs} +1 -1
  76. package/dist/{vue-ui-mini-loader-C7roqZ4p.js → vue-ui-mini-loader-C7x7S0hi.js} +2 -2
  77. package/dist/vue-ui-molecule-BFnOIxxs.js +798 -0
  78. package/dist/vue-ui-molecule-CbKMLrDT.cjs +1 -0
  79. package/dist/vue-ui-mood-radar-6LmFXuiw.cjs +1 -0
  80. package/dist/{vue-ui-mood-radar-DSznHxLS.js → vue-ui-mood-radar-CR1v5v2x.js} +263 -239
  81. package/dist/{vue-ui-nested-donuts-CiE4DdEQ.js → vue-ui-nested-donuts-DEiloQzq.js} +342 -318
  82. package/dist/vue-ui-nested-donuts-DS0fjiLi.cjs +17 -0
  83. package/dist/vue-ui-onion-CLvvu4Ku.cjs +5 -0
  84. package/dist/{vue-ui-onion-D9o6Rcgu.js → vue-ui-onion-LsEhBe4x.js} +226 -202
  85. package/dist/vue-ui-parallel-coordinate-plot-BWg8OFqH.cjs +8 -0
  86. package/dist/{vue-ui-parallel-coordinate-plot-BcYrYXhG.js → vue-ui-parallel-coordinate-plot-CTlIjJqG.js} +243 -219
  87. package/dist/{vue-ui-quadrant-Cs3A77us.js → vue-ui-quadrant-DKVVFufb.js} +350 -326
  88. package/dist/vue-ui-quadrant-OM5J1mG3.cjs +1 -0
  89. package/dist/{vue-ui-quick-chart-CiiSUexi.js → vue-ui-quick-chart-8vJikiGH.js} +505 -481
  90. package/dist/vue-ui-quick-chart-gG5Ar8-i.cjs +15 -0
  91. package/dist/{vue-ui-radar-CNSpiNrM.js → vue-ui-radar-20QhOUer.js} +255 -231
  92. package/dist/vue-ui-radar-CAaHjDO7.cjs +1 -0
  93. package/dist/{vue-ui-rating-GoUNDOdZ.cjs → vue-ui-rating-Bbzm5nUK.cjs} +1 -1
  94. package/dist/{vue-ui-rating-b_iYZWF8.js → vue-ui-rating-DRWJsve1.js} +2 -2
  95. package/dist/vue-ui-relation-circle-BoGAFXuS.cjs +1 -0
  96. package/dist/vue-ui-relation-circle-I45_Sk5l.js +349 -0
  97. package/dist/vue-ui-rings-B9WQ7S5m.cjs +2 -0
  98. package/dist/vue-ui-rings-DG8GCi3y.js +593 -0
  99. package/dist/vue-ui-scatter-BZfg1YIN.cjs +1 -0
  100. package/dist/{vue-ui-scatter-CVuoW-cD.js → vue-ui-scatter-Hqu5-F2H.js} +369 -345
  101. package/dist/{vue-ui-screenshot-Co2o48d6.cjs → vue-ui-screenshot-D8nxd5RV.cjs} +1 -1
  102. package/dist/{vue-ui-screenshot-Csc0dQL9.js → vue-ui-screenshot-cjiqbtLK.js} +1 -1
  103. package/dist/{vue-ui-skeleton-CGV1dEUD.cjs → vue-ui-skeleton-Djv08J67.cjs} +1 -1
  104. package/dist/{vue-ui-skeleton-B2sRnIXX.js → vue-ui-skeleton-aZmkNzAe.js} +3 -3
  105. package/dist/{vue-ui-smiley-Ci3uMgVh.cjs → vue-ui-smiley-B1TA19Hv.cjs} +1 -1
  106. package/dist/{vue-ui-smiley-D4s-AdIE.js → vue-ui-smiley-ChNvxygm.js} +2 -2
  107. package/dist/{vue-ui-spark-trend-BfoEoJEy.cjs → vue-ui-spark-trend-BqrPr63O.cjs} +1 -1
  108. package/dist/{vue-ui-spark-trend-CHKQGMLs.js → vue-ui-spark-trend-CQxELQcf.js} +5 -5
  109. package/dist/{vue-ui-sparkbar-Bb1fq2GR.js → vue-ui-sparkbar-0ixbKZzf.js} +4 -4
  110. package/dist/{vue-ui-sparkbar-DB2DeXti.cjs → vue-ui-sparkbar-CrTEPTU5.cjs} +1 -1
  111. package/dist/{vue-ui-sparkgauge-CJepIY2u.cjs → vue-ui-sparkgauge-BYxpe_WV.cjs} +1 -1
  112. package/dist/{vue-ui-sparkgauge-DWuaAQbo.js → vue-ui-sparkgauge-pdYb7OwH.js} +4 -4
  113. package/dist/{vue-ui-sparkhistogram-B7B36LLT.cjs → vue-ui-sparkhistogram-D21XDUH2.cjs} +1 -1
  114. package/dist/{vue-ui-sparkhistogram-CjeJ3ch1.js → vue-ui-sparkhistogram-N69h2q0U.js} +5 -5
  115. package/dist/{vue-ui-sparkline-DGJDBArr.js → vue-ui-sparkline-2BKYZMOb.js} +4 -4
  116. package/dist/{vue-ui-sparkline-BcqmwDAb.cjs → vue-ui-sparkline-Cf4m-Fxo.cjs} +1 -1
  117. package/dist/{vue-ui-sparkstackbar-DT3aKNeV.cjs → vue-ui-sparkstackbar-dAS8XoJs.cjs} +1 -1
  118. package/dist/{vue-ui-sparkstackbar-B3ul3qUZ.js → vue-ui-sparkstackbar-sh03cuOU.js} +4 -4
  119. package/dist/vue-ui-stackbar-B1si-1RM.js +938 -0
  120. package/dist/vue-ui-stackbar-Dy_saeSe.cjs +6 -0
  121. package/dist/{vue-ui-strip-plot-CIb2LSV8.js → vue-ui-strip-plot-BYn-QrTQ.js} +274 -250
  122. package/dist/vue-ui-strip-plot-D53LABpZ.cjs +1 -0
  123. package/dist/{vue-ui-table-B_sFrAO9.cjs → vue-ui-table-Ce4waJaj.cjs} +1 -1
  124. package/dist/{vue-ui-table-CmVi0nv2.js → vue-ui-table-DQORPCDJ.js} +1 -1
  125. package/dist/{vue-ui-table-heatmap-CgFr38QT.js → vue-ui-table-heatmap-Csp7Tx8N.js} +4 -4
  126. package/dist/{vue-ui-table-heatmap-Chvdf2Gi.cjs → vue-ui-table-heatmap-EqHt-O7Y.cjs} +1 -1
  127. package/dist/{vue-ui-table-sparkline-DUUYQ5dH.cjs → vue-ui-table-sparkline-DONmVOMh.cjs} +1 -1
  128. package/dist/{vue-ui-table-sparkline-eg2Qd8ws.js → vue-ui-table-sparkline-DdwVrfUj.js} +5 -5
  129. package/dist/vue-ui-thermometer-I6ZnlfAv.js +440 -0
  130. package/dist/vue-ui-thermometer-hQBkMa7u.cjs +1 -0
  131. package/dist/{vue-ui-timer-DM1IStj1.cjs → vue-ui-timer-COOXcn14.cjs} +1 -1
  132. package/dist/{vue-ui-timer-COSI3Q5T.js → vue-ui-timer-pi1SazTU.js} +5 -5
  133. package/dist/vue-ui-tiremarks-hdNqoGyd.cjs +1 -0
  134. package/dist/vue-ui-tiremarks-vdPQYiDp.js +303 -0
  135. package/dist/vue-ui-treemap-3FNUlKxL.js +816 -0
  136. package/dist/vue-ui-treemap-Cv0TSFQa.cjs +1 -0
  137. package/dist/vue-ui-vertical-bar-C--Ma0Dw.cjs +4 -0
  138. package/dist/{vue-ui-vertical-bar-CieqHVD5.js → vue-ui-vertical-bar-DwxpB46q.js} +312 -288
  139. package/dist/vue-ui-waffle-CKM0QyJN.cjs +1 -0
  140. package/dist/vue-ui-waffle-XecHJIc-.js +782 -0
  141. package/dist/vue-ui-wheel-Bbih5sSL.js +282 -0
  142. package/dist/vue-ui-wheel-C0dJrzOJ.cjs +1 -0
  143. package/dist/vue-ui-word-cloud-Cfd2wxsT.cjs +1 -0
  144. package/dist/vue-ui-word-cloud-DnhXUn5x.js +598 -0
  145. package/dist/vue-ui-xy-BDpqVzAq.cjs +3 -0
  146. package/dist/{vue-ui-xy-x8KEsGV-.js → vue-ui-xy-CqlRuFMc.js} +775 -751
  147. package/dist/{vue-ui-xy-canvas-BYdTxzi6.js → vue-ui-xy-canvas-C8c2X5fk.js} +409 -385
  148. package/dist/vue-ui-xy-canvas-Cansjd3L.cjs +9 -0
  149. package/package.json +1 -1
  150. package/dist/BaseIcon-E7FmzMcY.cjs +0 -1
  151. package/dist/index-C7_6YjWN.cjs +0 -9
  152. package/dist/usePrinter-8EP4iaGm.cjs +0 -1
  153. package/dist/vue-data-ui-4Yd255Ia.cjs +0 -9
  154. package/dist/vue-data-ui-Cp7bO_tj.js +0 -258
  155. package/dist/vue-ui-3d-bar-BeR2aBgQ.cjs +0 -19
  156. package/dist/vue-ui-age-pyramid-R-C4P4mI.cjs +0 -1
  157. package/dist/vue-ui-bullet-CQKaC4wG.js +0 -409
  158. package/dist/vue-ui-bullet-DSZox236.cjs +0 -23
  159. package/dist/vue-ui-candlestick-Dilozp3V.cjs +0 -2
  160. package/dist/vue-ui-chestnut-DdEcEI04.cjs +0 -6
  161. package/dist/vue-ui-donut-DTSVlGMg.cjs +0 -1
  162. package/dist/vue-ui-donut-evolution-BuUafabD.cjs +0 -1
  163. package/dist/vue-ui-dumbbell-CVfgnyKi.cjs +0 -9
  164. package/dist/vue-ui-flow-C45dODaB.cjs +0 -1
  165. package/dist/vue-ui-flow-DkPTzNv9.js +0 -484
  166. package/dist/vue-ui-galaxy-DlPavMK0.cjs +0 -1
  167. package/dist/vue-ui-gauge-BXiy515T.js +0 -494
  168. package/dist/vue-ui-gauge-vMFUYHYH.cjs +0 -1
  169. package/dist/vue-ui-heatmap-CMQqQnxc.cjs +0 -1
  170. package/dist/vue-ui-molecule-BwmkMEVN.js +0 -774
  171. package/dist/vue-ui-molecule-nOuD0hR5.cjs +0 -1
  172. package/dist/vue-ui-mood-radar-Bof_C9Ae.cjs +0 -1
  173. package/dist/vue-ui-nested-donuts-DIb6YyWv.cjs +0 -17
  174. package/dist/vue-ui-onion-N3tRNc4u.cjs +0 -5
  175. package/dist/vue-ui-parallel-coordinate-plot-qKGk2bX6.cjs +0 -8
  176. package/dist/vue-ui-quadrant-Do48rGrX.cjs +0 -1
  177. package/dist/vue-ui-quick-chart-BxU4d-sJ.cjs +0 -15
  178. package/dist/vue-ui-radar-CooAvwPA.cjs +0 -1
  179. package/dist/vue-ui-relation-circle-nRf1pvD0.js +0 -325
  180. package/dist/vue-ui-relation-circle-uNgJni4x.cjs +0 -1
  181. package/dist/vue-ui-rings-BgRc1o4_.js +0 -569
  182. package/dist/vue-ui-rings-iIgQI9Ws.cjs +0 -2
  183. package/dist/vue-ui-scatter-CkrpmLxP.cjs +0 -1
  184. package/dist/vue-ui-stackbar-CRcUugkl.cjs +0 -6
  185. package/dist/vue-ui-stackbar-DNROvZII.js +0 -915
  186. package/dist/vue-ui-strip-plot-Ck9Fmt_b.cjs +0 -1
  187. package/dist/vue-ui-thermometer-BFfN4aat.cjs +0 -1
  188. package/dist/vue-ui-thermometer-BePmFiwy.js +0 -416
  189. package/dist/vue-ui-tiremarks-BkYXzU3R.cjs +0 -1
  190. package/dist/vue-ui-tiremarks-d6TmSHY7.js +0 -279
  191. package/dist/vue-ui-treemap-BgeZnbl3.cjs +0 -1
  192. package/dist/vue-ui-treemap-Qg0858o6.js +0 -792
  193. package/dist/vue-ui-vertical-bar-D3atbdvl.cjs +0 -4
  194. package/dist/vue-ui-waffle-CD7C9Lu4.cjs +0 -1
  195. package/dist/vue-ui-waffle-CjNhM-mV.js +0 -758
  196. package/dist/vue-ui-wheel-B8mbO6ht.js +0 -258
  197. package/dist/vue-ui-wheel-CYmM7J61.cjs +0 -1
  198. package/dist/vue-ui-word-cloud-DMXrUmX5.js +0 -574
  199. package/dist/vue-ui-word-cloud-Dm9yZ1zQ.cjs +0 -1
  200. package/dist/vue-ui-xy-DoWnidom.cjs +0 -3
  201. package/dist/vue-ui-xy-canvas-DHs5sb3t.cjs +0 -9
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-FfZRtJ6A.cjs"),te=require("./useResponsive-B3TrDDIG.cjs"),me=require("./Title-Co5jI5ed.cjs"),oe=require("./usePrinter-BCAFeO_J.cjs"),fe=require("./Tooltip-Bl6W8Zn7.cjs"),ye=require("./vue-ui-sparkbar-CrTEPTU5.cjs"),ke=require("./Legend-YZ7Hz3o1.cjs"),be=require("./DataTable-DJzhv96s.cjs"),Ce=require("./vue-ui-skeleton-Djv08J67.cjs"),we=require("./vue-ui-accordion-xXgqfR2l.cjs"),ae=require("./useNestedProp-q7byAAIJ.cjs"),Be=require("./PackageVersion-DVZtsuy4.cjs"),_e=require("./PenAndPaper-CyXm-yVL.cjs"),Pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),xe=["id"],$e=["xmlns","viewBox"],Ne=["id"],Te=["stop-color"],Se=["stop-color"],Ee={key:0},Ve=["x1","y1","x2","y2","stroke","stroke-width"],Ae={key:0},Oe=["d","stroke","stroke-width"],Fe=["d","stroke","stroke-width"],Le={key:1},ze=["x","y","text-anchor","font-size","fill","onMouseenter"],Ie=["points","stroke","stroke-width"],Re=["points","stroke","stroke-width","fill"],qe={key:2},De=["cx","cy","fill","r","stroke"],Me={key:4,class:"vue-data-ui-watermark"},Ue=["onClick"],Ge={key:0,style:{"max-width":"200px",margin:"0 auto"}},We={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(le,{expose:re,emit:ne}){const d=le,{vue_ui_radar:ue}=n.useConfig(),b=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(n.createUid()),se=e.ref(null),$=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(0),R=e.ref(0),q=e.ref(0),t=e.computed({get:()=>D(),set:o=>o});function D(){const o=ae.useNestedProp({userConfig:d.config,defaultConfig:ue});return o.theme?{...ae.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=D(),M(),I.value+=1,R.value+=1,q.value+=1},{deep:!0});const B=e.ref(null);function M(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=te.throttle(()=>{const{width:a,height:l}=te.useResponsive({chart:f.value,title:t.value.style.chart.title.text?L.value:null,legend:t.value.style.chart.legend.show?z.value:null});s.value.width=a,s.value.height=l});B.value=new ResizeObserver(o),B.value.observe(f.value.parentNode)}}e.onMounted(()=>{M()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:U,isImaging:G,generatePdf:W,generateImage:H}=oe.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),X=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}),ie=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)),ne("selectLegend",k.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function ce(){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)||X.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)||X.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${m.value}_${a}`,formatter:o.formatter||null})):[]),Y=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),J=e.computed(()=>p.value.length),T=e.computed(()=>Math.min(s.value.width,s.value.height)/3),K=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:T.value,sides:J.value,rotation:0})),de=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(()=>K.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>ve({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||Y.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 ve({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||Y.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)}))}),pe=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 ge(o,a){E.value=[],P.value=a,$.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 Q(){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,Xe)=>[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 he(o){w.value=o,F.value+=1}function Z(){g.value.showTable=!g.value.showTable}function ee(){g.value.showTooltip=!g.value.showTooltip}const x=e.ref(!1);function A(){x.value=!x.value}return re({getData:ce,generatePdf:W,generateCsv:Q,generateImage:H,toggleTable:Z,toggleTooltip:ee,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;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(_e.PenAndPaper,{key:0,parent:f.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:x.value,onClose:A},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:L,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(me._sfc_main,{key:`title_${I.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(oe.UserOptions,{ref_key:"details",ref:se,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(G),isPrinting:e.unref(U),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:x.value,onToggleFullscreen:he,onGeneratePdf:e.unref(W),onGenerateCsv:Q,onGenerateImage:e.unref(H),onToggleTable:Z,onToggleTooltip:ee,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:3,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(Be._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,Te),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Se)],8,Ne))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Ee,[(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,Ve))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(de.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:J.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,Oe))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:K.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,Fe),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Le,[(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=>ge(l,r),onMouseleave:a[0]||(a[0]=u=>{$.value=!1,P.value=null})},e.toDisplayString(l.name),41,ze))),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,Ie)):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,Re)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",qe,[(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,De))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,$e)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ce.default,{key:5,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(ke.Legend,{key:`legend_${q.value}`,legendSet:k.value,config:pe.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,Ue)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),e.createVNode(fe._sfc_main,{show:g.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,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",Ge,[e.createVNode(ye.default,{dataset:E.value,config:ie.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(we.default,{key:6,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_${R.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,xe))}},He=Pe._export_sfc(We,[["__scopeId","data-v-14b2c666"]]);exports.default=He;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-C7_6YjWN.cjs"),L=require("./useNestedProp-CC9zGr7C.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-FfZRtJ6A.cjs"),L=require("./useNestedProp-q7byAAIJ.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,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-DDXisDKy.js";
3
- import { u as Z } from "./useNestedProp-S1UXxUgm.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-DnVHQ2xI.js";
3
+ import { u as Z } from "./useNestedProp-Cox0K0Y5.js";
4
4
  import { _ as tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const et = {
6
6
  key: 0,
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-FfZRtJ6A.cjs"),j=require("./useResponsive-B3TrDDIG.cjs"),se=require("./Title-Co5jI5ed.cjs"),G=require("./usePrinter-BCAFeO_J.cjs"),ue=require("./vue-ui-skeleton-Djv08J67.cjs"),U=require("./useNestedProp-q7byAAIJ.cjs"),ce=require("./PackageVersion-DVZtsuy4.cjs"),de=require("./PenAndPaper-CyXm-yVL.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],ge=["xmlns","viewBox"],me=["cx","cy","r","stroke","stroke-width"],ye={key:0},he=["stroke","d","stroke-width"],pe={key:1},ke=["stroke","x1","x2","y1","y2"],Ce=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],_e=["cx","cy","fill","onClick","r"],$e={key:4,class:"vue-data-ui-watermark"},xe={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(D,{expose:W}){const u=D;e.useCssVars(t=>({"0bc2311e":K.value,"6cb258d0":J.value,"0108e0b2":Q.value}));const{vue_ui_relation_circle:X}=s.useConfig(),C=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length),g=e.ref(s.createUid()),w=e.ref(0),m=e.ref(null),B=e.ref(null),P=e.ref(0),r=e.computed({get:()=>A(),set:t=>t});function A(){const t=U.useNestedProp({userConfig:u.config,defaultConfig:X});return t.theme?{...U.useNestedProp({userConfig:s.themes.vue_ui_relation_circle[t.theme]||u.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>u.config,t=>{r.value=A(),F(),P.value+=1},{deep:!0});const{isPrinting:O,isImaging:E,generatePdf:S,generateImage:I}=G.usePrinter({elementId:`relation_circle_${g.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),z=e.computed(()=>s.convertCustomPalette(r.value.customPalette)),d=e.ref([]),f=e.ref([]),a=e.ref({}),c=e.ref([]),Y=e.ref(0),_=e.computed(()=>u.dataset.slice(0,r.value.style.limit)),$=e.ref(r.value.style.size),i=e.ref({height:r.value.style.size,width:r.value.style.size}),v=e.computed({get(){return $.value*r.value.style.circle.radiusProportion},set(t){return t}}),H=e.computed(()=>r.value.style.links.curved),J=e.computed(()=>`${r.value.style.animation.speedMs}ms`),K=e.computed(()=>v.value*2),Q=e.computed(()=>v.value*4),h=e.ref(null);e.onMounted(()=>{F(),document.getElementById(`relation_circle_${g.value}`).addEventListener("click",N)});function F(){if(s.objectIsEmpty(u.dataset)?s.error({componentName:"VueUiRelationCircle",type:"dataset"}):u.dataset.forEach((t,l)=>{s.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(n=>{s.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:n,index:l})})}),r.value.responsive){const t=j.throttle(()=>{const{width:l,height:n}=j.useResponsive({chart:m.value,title:r.value.style.title.text?B.value:null});$.value=Math.min(l,n),i.value.width=l,i.value.height=n,v.value=$.value*r.value.style.circle.radiusProportion,d.value=[],f.value=[],L(),R()});h.value=new ResizeObserver(t),h.value.observe(m.value.parentNode)}else d.value=[],f.value=[],L(),R()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${g.value}`).removeEventListener("click",N),h.value&&h.value.disconnect()});function N(t){const l=t.target;l&&Array.from(l.classList).includes("vue-ui-user-options")||l&&Array.from(l.classList).includes("vue-ui-user-options-summary")||l&&Array.from(l.classList).includes("vue-data-ui-button")||l&&Array.from(l.classList).includes("vue-ui-relation-circle-legend")||(a.value={},c.value=[])}function L(){const t=6.28319/_.value.length,l=360/_.value.length;let n=0,o=0;_.value.forEach((y,b)=>{const ae=v.value*Math.cos(n)+i.value.width/2,ie=v.value*Math.sin(n)+i.value.height/2+r.value.style.circle.offsetY;d.value.push({x:ae,y:ie,...y,color:y.color?y.color:z.value[b]?z.value[b]:s.palette[b],regAngle:o}),n+=t,o+=l})}function R(){d.value.forEach(t=>{d.value.filter(n=>n.relations.includes(t.id)).forEach((n,o)=>{f.value.push({weight:t.weights&&t.weights[o]?t.weights[o]:1,relationId:`${t.id}_${n.id}`,x1:t.x,y1:t.y,x2:n.x,y2:n.y,colorSource:t.color,colorTarget:n.color,...t})})})}const Z=e.computed(()=>Math.max(...f.value.map(t=>t.weight)));function ee(t){return Object.hasOwn(a.value,"x")?c.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function T(t){return Object.hasOwn(a.value,"x")?t.colorTarget:t.colorSource}function V(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:${M(t)}`:"opacity: 0":"opacity: 1"}function te(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function ne(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function re(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 le(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function q(t){Y.value=360-t.regAngle,a.value.id&&t.id===a.value.id?(a.value={},c.value=[]):(a.value=t,c.value=[...t.relations])}function M(t){return t.weight/Z.value*r.value.style.links.maxWidth}const p=e.ref(!1);function oe(t){p.value=t,w.value+=1}const k=e.ref(!1);function x(){k.value=!k.value}return W({generatePdf:S,generateImage:I,toggleAnnotator:x}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:m,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${g.value}`},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(de.PenAndPaper,{key:0,parent:m.value,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:k.value,onClose:x},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:B,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(se._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&C.value?(e.openBlock(),e.createBlock(G.UserOptions,{ref:"details",key:`user_options_${w.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(O),isImaging:e.unref(E),uid:g.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:p.value,titles:{...r.value.userOptions.buttonTitles},chartElement:m.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:k.value,onToggleFullscreen:oe,onGeneratePdf:e.unref(S),onGenerateImage:e.unref(I),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:n,isFullscreen:o})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:o})),void 0,!0)]),key:"2"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:n,isAnnotator:o})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:n,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:3,xmlns:e.unref(s.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":p.value,"vue-data-ui-fulscreen--off":!p.value},"relation-circle"]),viewBox:`0 0 ${i.value.width<=0?10:i.value.width} ${i.value.height<=0?10:i.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode(ce._sfc_main),e.createElementVNode("circle",{cx:(i.value.width<=0?1e-4:i.value.width)/2,cy:(i.value.height<=0?1e-4:i.value.height)/2+r.value.style.circle.offsetY,r:v.value<=0?1e-4:v.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,me),H.value?(e.openBlock(),e.createElementBlock("g",ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(n,o)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${o}`,style:e.normalizeStyle(V(n)),stroke:T(n),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&c.value.includes(n.id)}]),d:`M${n.x1},${n.y1} C${n.x1},${n.y1} ${i.value.width/2},${i.value.height/2+r.value.style.circle.offsetY} ${n.x2},${n.y2}`,fill:"none","stroke-width":M(n),"stroke-linecap":"round"},null,14,he))),128))])):(e.openBlock(),e.createElementBlock("g",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(n,o)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${o}`,stroke:T(n),style:e.normalizeStyle(V(n)),x1:n.x1,x2:n.x2,y1:n.y1,y2:n.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&c.value.includes(n.id)}),"stroke-linecap":"round"},null,14,ke))),128))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(n,o)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${o}`,"text-anchor":te(n),transform:le(n),x:ne(n),y:n.y+5,onClick:y=>q(n),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":a.value.id===n.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${re(n)}`),"font-size":r.value.style.labels.fontSize,fill:r.value.style.labels.color},e.toDisplayString(n.label),13,Ce))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(n,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:n.x,cy:n.y,key:`plot_${o}`,style:e.normalizeStyle(ee(n)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.color,onClick:y=>q(n),r:r.value.style.plot.radius},null,12,_e))),128)),e.renderSlot(t.$slots,"svg",{svg:i.value},void 0,!0)],10,ge)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",$e,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(E)})),void 0,!0)])):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:5,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],12,fe))}},be=ve._export_sfc(xe,[["__scopeId","data-v-c84e98e7"]]);exports.default=be;
@@ -0,0 +1,349 @@
1
+ import { useCssVars as $e, computed as c, ref as o, watch as Ce, onMounted as be, onBeforeUnmount as xe, openBlock as n, createElementBlock as u, normalizeStyle as C, createBlock as A, createCommentVNode as m, unref as h, createSlots as we, withCtx as O, renderSlot as p, normalizeProps as S, guardReactiveProps as T, normalizeClass as R, createVNode as Ae, createElementVNode as Oe, Fragment as P, renderList as I, toDisplayString as Pe } from "vue";
2
+ import { u as Ie, c as Fe, t as Ee, a as ze, p as te, b as Le, o as Ne, e as le, g as Se, X as Te } from "./index-DnVHQ2xI.js";
3
+ import { t as Re, u as Me } from "./useResponsive-NZB-WLRF.js";
4
+ import { _ as je } from "./Title-5VmBwT4i.js";
5
+ import { u as Be, U as Ge } from "./usePrinter-BEeNAqS5.js";
6
+ import Ue from "./vue-ui-skeleton-aZmkNzAe.js";
7
+ import { u as ne } from "./useNestedProp-Cox0K0Y5.js";
8
+ import { _ as De } from "./PackageVersion-CvCRsT5_.js";
9
+ import { P as Ve } from "./PenAndPaper-Jb0pLt3G.js";
10
+ import { _ as We } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
+ const Xe = ["id"], Ye = ["xmlns", "viewBox"], qe = ["cx", "cy", "r", "stroke", "stroke-width"], He = { key: 0 }, Je = ["stroke", "d", "stroke-width"], Ke = { key: 1 }, Qe = ["stroke", "x1", "x2", "y1", "y2"], Ze = ["text-anchor", "transform", "x", "y", "onClick", "font-weight", "font-size", "fill"], et = ["cx", "cy", "fill", "onClick", "r"], tt = {
12
+ key: 4,
13
+ class: "vue-data-ui-watermark"
14
+ }, lt = {
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(re, { expose: ae }) {
31
+ const d = re;
32
+ $e((e) => ({
33
+ "0bc2311e": ce.value,
34
+ "6cb258d0": ue.value,
35
+ "0108e0b2": de.value
36
+ }));
37
+ const { vue_ui_relation_circle: se } = Ie(), F = c(() => !!d.dataset && Object.keys(d.dataset).length), k = o(Fe()), M = o(0), _ = o(null), j = o(null), B = o(0), l = c({
38
+ get: () => G(),
39
+ set: (e) => e
40
+ });
41
+ function G() {
42
+ const e = ne({
43
+ userConfig: d.config,
44
+ defaultConfig: se
45
+ });
46
+ return e.theme ? {
47
+ ...ne({
48
+ userConfig: Ee.vue_ui_relation_circle[e.theme] || d.config,
49
+ defaultConfig: e
50
+ }),
51
+ customPalette: ze[e.theme] || te
52
+ } : e;
53
+ }
54
+ Ce(() => d.config, (e) => {
55
+ l.value = G(), Y(), B.value += 1;
56
+ }, { deep: !0 });
57
+ const { isPrinting: U, isImaging: D, generatePdf: V, generateImage: W } = Be({
58
+ elementId: `relation_circle_${k.value}`,
59
+ fileName: l.value.style.title.text || "vue-ui-relation-circle"
60
+ }), X = c(() => Le(l.value.customPalette)), f = o([]), y = o([]), s = o({}), v = o([]), ie = o(0), E = c(() => d.dataset.slice(0, l.value.style.limit)), z = o(l.value.style.size), i = o({
61
+ height: l.value.style.size,
62
+ width: l.value.style.size
63
+ }), g = c({
64
+ get() {
65
+ return z.value * l.value.style.circle.radiusProportion;
66
+ },
67
+ set(e) {
68
+ return e;
69
+ }
70
+ }), oe = c(() => l.value.style.links.curved), ue = c(() => `${l.value.style.animation.speedMs}ms`), ce = c(() => g.value * 2), de = c(() => g.value * 4), b = o(null);
71
+ be(() => {
72
+ Y(), document.getElementById(`relation_circle_${k.value}`).addEventListener("click", q);
73
+ });
74
+ function Y() {
75
+ if (Ne(d.dataset) ? le({
76
+ componentName: "VueUiRelationCircle",
77
+ type: "dataset"
78
+ }) : d.dataset.forEach((e, r) => {
79
+ Se({
80
+ datasetObject: e,
81
+ requiredAttributes: ["id", "label", "relations", "weights"]
82
+ }).forEach((t) => {
83
+ le({
84
+ componentName: "VueUiRelationCircle",
85
+ type: "datasetSerieAttribute",
86
+ property: t,
87
+ index: r
88
+ });
89
+ });
90
+ }), l.value.responsive) {
91
+ const e = Re(() => {
92
+ const { width: r, height: t } = Me({
93
+ chart: _.value,
94
+ title: l.value.style.title.text ? j.value : null
95
+ });
96
+ z.value = Math.min(r, t), i.value.width = r, i.value.height = t, g.value = z.value * l.value.style.circle.radiusProportion, f.value = [], y.value = [], H(), J();
97
+ });
98
+ b.value = new ResizeObserver(e), b.value.observe(_.value.parentNode);
99
+ } else
100
+ f.value = [], y.value = [], H(), J();
101
+ }
102
+ xe(() => {
103
+ document.getElementById(`relation_circle_${k.value}`).removeEventListener("click", q), b.value && b.value.disconnect();
104
+ });
105
+ function q(e) {
106
+ const r = e.target;
107
+ 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") || (s.value = {}, v.value = []);
108
+ }
109
+ function H() {
110
+ const e = 6.28319 / E.value.length, r = 360 / E.value.length;
111
+ let t = 0, a = 0;
112
+ E.value.forEach(($, N) => {
113
+ const ke = g.value * Math.cos(t) + i.value.width / 2, _e = g.value * Math.sin(t) + i.value.height / 2 + l.value.style.circle.offsetY;
114
+ f.value.push({ x: ke, y: _e, ...$, color: $.color ? $.color : X.value[N] ? X.value[N] : te[N], regAngle: a }), t += e, a += r;
115
+ });
116
+ }
117
+ function J() {
118
+ f.value.forEach((e) => {
119
+ f.value.filter((t) => t.relations.includes(e.id)).forEach((t, a) => {
120
+ y.value.push({
121
+ weight: e.weights && e.weights[a] ? e.weights[a] : 1,
122
+ relationId: `${e.id}_${t.id}`,
123
+ x1: e.x,
124
+ y1: e.y,
125
+ x2: t.x,
126
+ y2: t.y,
127
+ colorSource: e.color,
128
+ colorTarget: t.color,
129
+ ...e
130
+ });
131
+ });
132
+ });
133
+ }
134
+ const ve = c(() => Math.max(...y.value.map((e) => e.weight)));
135
+ function fe(e) {
136
+ return Object.hasOwn(s.value, "x") ? v.value.includes(e.id) ? "opacity:1" : "opacity:0.1" : "opacity:1";
137
+ }
138
+ function K(e) {
139
+ return Object.hasOwn(s.value, "x") ? e.colorTarget : e.colorSource;
140
+ }
141
+ function Q(e) {
142
+ return Object.hasOwn(s.value, "x") ? v.value.includes(e.id) && e.relationId === `${e.id}_${s.value.id}` || e.relationId === `${s.value.id}_${e.id}` ? `opacity:1;stroke-width:${ee(e)}` : "opacity: 0" : "opacity: 1";
143
+ }
144
+ function ge(e) {
145
+ return e.regAngle > 90 && e.regAngle < 270 ? "end" : "start";
146
+ }
147
+ function he(e) {
148
+ return e.regAngle > 90 && e.regAngle < 270 ? e.x - 5 : e.x + 5;
149
+ }
150
+ function ye(e) {
151
+ return Object.hasOwn(s.value, "x") ? s.value.id === e.id || v.value.includes(e.id) ? "opacity:1" : "opacity:0.2" : "opacity:1";
152
+ }
153
+ function me(e) {
154
+ return e.regAngle > 90 && e.regAngle < 270 ? `rotate(${e.regAngle + 180},${e.x},${e.y})` : `rotate(${e.regAngle},${e.x},${e.y})`;
155
+ }
156
+ function Z(e) {
157
+ ie.value = 360 - e.regAngle, s.value.id && e.id === s.value.id ? (s.value = {}, v.value = []) : (s.value = e, v.value = [...e.relations]);
158
+ }
159
+ function ee(e) {
160
+ return e.weight / ve.value * l.value.style.links.maxWidth;
161
+ }
162
+ const x = o(!1);
163
+ function pe(e) {
164
+ x.value = e, M.value += 1;
165
+ }
166
+ const w = o(!1);
167
+ function L() {
168
+ w.value = !w.value;
169
+ }
170
+ return ae({
171
+ generatePdf: V,
172
+ generateImage: W,
173
+ toggleAnnotator: L
174
+ }), (e, r) => (n(), u("div", {
175
+ ref_key: "relationCircleChart",
176
+ ref: _,
177
+ class: "vue-ui-relation-circle",
178
+ style: C(`width:100%;background:${l.value.style.backgroundColor};text-align:center;${l.value.responsive ? "height: 100%" : ""}`),
179
+ id: `relation_circle_${k.value}`
180
+ }, [
181
+ l.value.userOptions.buttons.annotator ? (n(), A(Ve, {
182
+ key: 0,
183
+ parent: _.value,
184
+ backgroundColor: l.value.style.backgroundColor,
185
+ color: l.value.style.color,
186
+ active: w.value,
187
+ onClose: L
188
+ }, null, 8, ["parent", "backgroundColor", "color", "active"])) : m("", !0),
189
+ l.value.style.title.text ? (n(), u("div", {
190
+ key: 1,
191
+ ref_key: "chartTitle",
192
+ ref: j,
193
+ style: "width:100%;background:transparent"
194
+ }, [
195
+ (n(), A(je, {
196
+ key: `title_${B.value}`,
197
+ config: {
198
+ title: {
199
+ cy: "relation-div-title",
200
+ ...l.value.style.title
201
+ },
202
+ subtitle: {
203
+ cy: "relation-div-subtitle",
204
+ ...l.value.style.title.subtitle
205
+ }
206
+ }
207
+ }, null, 8, ["config"]))
208
+ ], 512)) : m("", !0),
209
+ l.value.userOptions.show && F.value ? (n(), A(Ge, {
210
+ ref: "details",
211
+ key: `user_options_${M.value}`,
212
+ backgroundColor: l.value.style.backgroundColor,
213
+ color: l.value.style.color,
214
+ isPrinting: h(U),
215
+ isImaging: h(D),
216
+ uid: k.value,
217
+ hasPdf: l.value.userOptions.buttons.pdf,
218
+ hasImg: l.value.userOptions.buttons.img,
219
+ hasFullscreen: l.value.userOptions.buttons.img,
220
+ hasXls: !1,
221
+ isFullscreen: x.value,
222
+ titles: { ...l.value.userOptions.buttonTitles },
223
+ chartElement: _.value,
224
+ position: l.value.userOptions.position,
225
+ hasAnnotator: l.value.userOptions.buttons.annotator,
226
+ isAnnotation: w.value,
227
+ onToggleFullscreen: pe,
228
+ onGeneratePdf: h(V),
229
+ onGenerateImage: h(W),
230
+ onToggleAnnotator: L
231
+ }, we({ _: 2 }, [
232
+ e.$slots.optionPdf ? {
233
+ name: "optionPdf",
234
+ fn: O(() => [
235
+ p(e.$slots, "optionPdf", {}, void 0, !0)
236
+ ]),
237
+ key: "0"
238
+ } : void 0,
239
+ e.$slots.optionImg ? {
240
+ name: "optionImg",
241
+ fn: O(() => [
242
+ p(e.$slots, "optionImg", {}, void 0, !0)
243
+ ]),
244
+ key: "1"
245
+ } : void 0,
246
+ e.$slots.optionFullscreen ? {
247
+ name: "optionFullscreen",
248
+ fn: O(({ toggleFullscreen: t, isFullscreen: a }) => [
249
+ p(e.$slots, "optionFullscreen", S(T({ toggleFullscreen: t, isFullscreen: a })), void 0, !0)
250
+ ]),
251
+ key: "2"
252
+ } : void 0,
253
+ e.$slots.optionAnnotator ? {
254
+ name: "optionAnnotator",
255
+ fn: O(({ toggleAnnotator: t, isAnnotator: a }) => [
256
+ p(e.$slots, "optionAnnotator", S(T({ toggleAnnotator: t, isAnnotator: a })), void 0, !0)
257
+ ]),
258
+ key: "3"
259
+ } : void 0
260
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage"])) : m("", !0),
261
+ F.value ? (n(), u("svg", {
262
+ key: 3,
263
+ xmlns: h(Te),
264
+ class: R([{ "vue-data-ui-fullscreen--on": x.value, "vue-data-ui-fulscreen--off": !x.value }, "relation-circle"]),
265
+ viewBox: `0 0 ${i.value.width <= 0 ? 10 : i.value.width} ${i.value.height <= 0 ? 10 : i.value.height}`,
266
+ width: "100%",
267
+ style: "user-select:none; background:transparent"
268
+ }, [
269
+ Ae(De),
270
+ Oe("circle", {
271
+ cx: (i.value.width <= 0 ? 1e-4 : i.value.width) / 2,
272
+ cy: (i.value.height <= 0 ? 1e-4 : i.value.height) / 2 + l.value.style.circle.offsetY,
273
+ r: g.value <= 0 ? 1e-4 : g.value,
274
+ stroke: l.value.style.circle.stroke,
275
+ "stroke-width": l.value.style.circle.strokeWidth,
276
+ fill: "transparent",
277
+ class: "main-circle"
278
+ }, null, 8, qe),
279
+ oe.value ? (n(), u("g", He, [
280
+ (n(!0), u(P, null, I(y.value, (t, a) => (n(), u("path", {
281
+ key: `relation_${a}`,
282
+ style: C(Q(t)),
283
+ stroke: K(t),
284
+ class: R(["relation", { "vue-ui-relation-circle-selected": s.value.hasOwnProperty("id") && v.value.includes(t.id) }]),
285
+ d: `M${t.x1},${t.y1} C${t.x1},${t.y1} ${i.value.width / 2},${i.value.height / 2 + l.value.style.circle.offsetY} ${t.x2},${t.y2}`,
286
+ fill: "none",
287
+ "stroke-width": ee(t),
288
+ "stroke-linecap": "round"
289
+ }, null, 14, Je))), 128))
290
+ ])) : (n(), u("g", Ke, [
291
+ (n(!0), u(P, null, I(y.value, (t, a) => (n(), u("line", {
292
+ key: `relation_${a}`,
293
+ stroke: K(t),
294
+ style: C(Q(t)),
295
+ x1: t.x1,
296
+ x2: t.x2,
297
+ y1: t.y1,
298
+ y2: t.y2,
299
+ class: R({ "vue-ui-relation-circle-selected": s.value.hasOwnProperty("id") && v.value.includes(t.id) }),
300
+ "stroke-linecap": "round"
301
+ }, null, 14, Qe))), 128))
302
+ ])),
303
+ (n(!0), u(P, null, I(f.value, (t, a) => (n(), u("text", {
304
+ key: `plot_text_${a}`,
305
+ "text-anchor": ge(t),
306
+ transform: me(t),
307
+ x: he(t),
308
+ y: t.y + 5,
309
+ onClick: ($) => Z(t),
310
+ class: "vue-ui-relation-circle-legend",
311
+ "transform-origin": "start",
312
+ "font-weight": s.value.id === t.id ? "900" : "400",
313
+ style: C(`font-family:${l.value.style.fontFamily};${ye(t)}`),
314
+ "font-size": l.value.style.labels.fontSize,
315
+ fill: l.value.style.labels.color
316
+ }, Pe(t.label), 13, Ze))), 128)),
317
+ (n(!0), u(P, null, I(f.value, (t, a) => (n(), u("circle", {
318
+ cx: t.x,
319
+ cy: t.y,
320
+ key: `plot_${a}`,
321
+ style: C(fe(t)),
322
+ class: "vue-ui-relation-circle-plot",
323
+ fill: l.value.style.plot.color,
324
+ onClick: ($) => Z(t),
325
+ r: l.value.style.plot.radius
326
+ }, null, 12, et))), 128)),
327
+ p(e.$slots, "svg", { svg: i.value }, void 0, !0)
328
+ ], 10, Ye)) : m("", !0),
329
+ e.$slots.watermark ? (n(), u("div", tt, [
330
+ p(e.$slots, "watermark", S(T({ isPrinting: h(U) || h(D) })), void 0, !0)
331
+ ])) : m("", !0),
332
+ F.value ? m("", !0) : (n(), A(Ue, {
333
+ key: 5,
334
+ config: {
335
+ type: "relationCircle",
336
+ style: {
337
+ backgroundColor: l.value.style.backgroundColor,
338
+ relationCircle: {
339
+ color: "#CCCCCC"
340
+ }
341
+ }
342
+ }
343
+ }, null, 8, ["config"]))
344
+ ], 12, Xe));
345
+ }
346
+ }, ft = /* @__PURE__ */ We(lt, [["__scopeId", "data-v-c84e98e7"]]);
347
+ export {
348
+ ft as default
349
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-FfZRtJ6A.cjs"),K=require("./useResponsive-B3TrDDIG.cjs"),ve=require("./Title-Co5jI5ed.cjs"),Q=require("./usePrinter-BCAFeO_J.cjs"),pe=require("./Tooltip-Bl6W8Zn7.cjs"),he=require("./DataTable-DJzhv96s.cjs"),ge=require("./Legend-YZ7Hz3o1.cjs"),fe=require("./vue-ui-skeleton-Djv08J67.cjs"),me=require("./vue-ui-accordion-xXgqfR2l.cjs"),Z=require("./useNestedProp-q7byAAIJ.cjs"),ye=require("./PackageVersion-DVZtsuy4.cjs"),be=require("./PenAndPaper-CyXm-yVL.cjs"),ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],we=["xmlns","viewBox"],xe=["id"],Te=["stop-color"],Ne=["stop-color"],$e=["stroke","cx","cy","r","fill"],Se=["stroke","stroke-width","cx","cy","r","fill"],Pe=["cx","cy","r","onMouseenter"],_e={key:4,class:"vue-data-ui-watermark"},Be=["onClick"],Le={key:0},Ve={key:1},Ae=["innerHTML"],Ee={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ee,{expose:te,emit:oe}){const v=ee,{vue_ui_rings:le}=r.useConfig(),b=e.ref(!1),x=e.computed(()=>!!v.dataset&&v.dataset.length),k=e.ref(r.createUid()),ae=e.ref(null),T=e.ref(!1),_=e.ref(""),m=e.ref(null),A=e.ref(0),y=e.ref(null),E=e.ref(null),z=e.ref(null),F=e.ref(0),O=e.ref(0),I=e.ref(0),t=e.computed({get:()=>R(),set:o=>o});function R(){const o=Z.useNestedProp({userConfig:v.config,defaultConfig:le});return o.theme?{...Z.useNestedProp({userConfig:r.themes.vue_ui_rings[o.theme]||v.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}e.watch(()=>v.config,o=>{t.value=R(),M(),F.value+=1,O.value+=1,I.value+=1},{deep:!0});const N=e.ref(null);e.onMounted(()=>{M()});function M(){if(r.objectIsEmpty(v.dataset)?r.error({componentName:"VueUiRings",type:"dataset"}):v.dataset.forEach((o,a)=>{o.values.length||r.error({componentName:"VueUiRings",type:"dataset"}),r.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{r.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive){const o=K.throttle(()=>{const{width:a,height:l}=K.useResponsive({chart:y.value,title:t.value.style.chart.title.text?E.value:null,legend:t.value.style.chart.legend.show?z.value:null});s.value.width=a,s.value.height=l});N.value=new ResizeObserver(o),N.value.observe(y.value.parentNode)}setTimeout(()=>{b.value=!0},600)}e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:q,isImaging:D,generatePdf:U,generateImage:H}=Q.usePrinter({elementId:`rings_${k.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings"}),W=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),g=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),re=e.computed(()=>Math.min(s.value.height,s.value.width)),i=e.ref([]);function B(o){i.value.includes(o)?i.value=i.value.filter(a=>a!==o):i.value.push(o),oe("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const ne=e.computed(()=>Math.max(...$.value.filter(o=>!i.value.includes(o.uid)).map(({value:o})=>o)));function G(o){return o/ne.value}const $=e.computed(()=>v.dataset.map(({values:o,name:a,color:l=null},n)=>{const u=r.sanitizeArray(o).reduce((h,w)=>h+w,0);return{name:a,color:l||r.convertColorToHex(l)||W.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:u,proportion:u/v.dataset.map(h=>(h.values||[]).reduce((w,de)=>w+de,0)).reduce((h,w)=>h+w,0),uid:r.createUid()}})),j=e.computed(()=>$.value.map(o=>({...o,shape:"circle",opacity:i.value.includes(o.uid)?.5:1,segregate:()=>B(o.uid),isSegregated:i.value.includes(o.uid)})).toSorted((o,a)=>a.value-o.value)),ue=e.computed(()=>({cy:"rings-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":""})),p=e.computed(()=>$.value.filter(o=>!i.value.includes(o.uid)).map(({value:o})=>o).reduce((o,a)=>o+a,0)),c=e.computed(()=>$.value.filter(o=>!i.value.includes(o.uid)).map(({name:o,value:a,color:l=null,uid:n},u)=>({uid:n,name:o,color:l||r.convertColorToHex(l)||W.value[u]||r.palette[u]||r.palette[u%r.palette.length],value:a,proportion:G(a),percentage:a/p.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*G(a)})).toSorted((o,a)=>a.value-o.value));function se(){return c.value.map(({name:o,color:a,value:l,absoluteValues:n,percentage:u})=>({name:o,color:a,value:l,absoluteValues:n,percentage:u}))}const d=e.computed(()=>re.value-t.value.style.chart.layout.rings.strokeWidth*2),L=e.ref(null);function ie(o,a){if(i.value.length===v.dataset.length)return;L.value={datapoint:a,seriesIndex:o,series:c.value,config:t.value},m.value=o;const l=c.value[o],n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:a,series:c.value,config:t.value})))_.value=n({seriesIndex:o,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,u+=`<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&&(u+=`<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:a,seriesIndex:o})}
2
+ </b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${r.dataLabel({v:l.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${r.dataLabel({v:l.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),_.value=u}T.value=!0}const f=e.computed(()=>{const o=c.value.map(l=>({name:l.name,color:l.color})),a=c.value.map(l=>l.value);return{head:o,body:a}}),S=e.computed(()=>{const o=[' <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>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:p.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=f.value.head.map((u,h)=>[{color:u.color,name:u.name},r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(f.value.body[h]/p.value)?"-":(f.value.body[h]/p.value*100).toFixed(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},n=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:o,body:a,config:l,colNames:n}});function X(){e.nextTick(()=>{const o=f.value.head.map((n,u)=>[[n.name],[f.value.body[u]],[isNaN(f.value.body[u]/p.value)?"-":f.value.body[u]/p.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-rings"})})}const C=e.ref(!1);function ce(o){C.value=o,A.value+=1}function Y(){g.value.showTable=!g.value.showTable}function J(){g.value.showTooltip=!g.value.showTooltip}const P=e.ref(!1);function V(){P.value=!P.value}return te({getData:se,generatePdf:U,generateCsv:X,generateImage:H,toggleTable:Y,toggleTooltip:J,toggleAnnotator:V}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ringsChart",ref:y,class:e.normalizeClass(`vue-ui-rings ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;width:100%;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),id:`rings_${k.value}`,onMouseleave:a[3]||(a[3]=l=>{m.value=null,T.value=!1})},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(be.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:P.value,onClose:V},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:E,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(ve._sfc_main,{key:`title_${F.value}`,config:{title:{cy:"rings-div-title",...t.value.style.chart.title},subtitle:{cy:"rings-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(Q.UserOptions,{ref_key:"details",ref:ae,key:`user_options_${A.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(q),isImaging:e.unref(D),uid:k.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,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:g.value.showTooltip,isFullscreen:C.value,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:P.value,onToggleFullscreen:ce,onGeneratePdf:e.unref(U),onGenerateCsv:X,onGenerateImage:e.unref(H),onToggleTable:Y,onToggleTooltip:J,onToggleAnnotator:V},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:n})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(o.$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","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.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(ye._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${k.value}_${n}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(l.color,.05),100-t.value.style.chart.layout.rings.gradient.intensity)},null,8,Te),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,Ne)],8,xe))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":b.value&&t.value.useCssAnimation,"vue-rings-item-onload":!b.value&&t.value.useCssAnimation,"vue-ui-rings-opacity":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*l.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*l.proportion/2*.9<=0?1e-4:d.value*l.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.underlayerColor},null,14,$e),e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":b.value&&t.value.useCssAnimation,"vue-rings-item-onload":!b.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":l.strokeWidth<.5?.5:l.strokeWidth,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*l.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*l.proportion/2*.9<=0?1e-4:d.value*l.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.show?`url(#gradient_${k.value}_${n})`:l.color},null,14,Se),e.createElementVNode("circle",{"data-cy-trap":"",stroke:"none",cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*l.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*l.proportion/2*.9<=0?1e-4:d.value*l.proportion/2*.9),fill:"transparent",onMouseenter:u=>ie(n,l),onMouseleave:a[0]||(a[0]=u=>{m.value=null,T.value=!1})},null,40,Pe)]))),256)),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,we)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",_e,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(D)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(fe.default,{key:5,config:{type:"rings",style:{backgroundColor:t.value.style.chart.backgroundColor,rings:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ge.Legend,{key:`legend_${I.value}`,legendSet:j.value,config:ue.value,onClickMarker:a[1]||(a[1]=({legend:l})=>B(l.uid))},{item:e.withCtx(({legend:l,index:n})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>B(l.uid),style:e.normalizeStyle(`opacity:${i.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,e.unref(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.legend.roundingValue}),{datapoint:l,seriesIndex:n}))+" ",1),i.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",Ve," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Le," ("+e.toDisplayString(isNaN(l.value/p.value)?"-":e.unref(r.dataLabel)({v:l.value/p.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Be)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:j.value},void 0,!0)],512),e.createVNode(pe._sfc_main,{show:g.value.showTooltip&&T.value&&i.value.length<v.dataset.length,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:_.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),x.value?(e.openBlock(),e.createBlock(me.default,{key:6,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(he.DataTable,{key:`table_${O.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>g.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ae)]),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,Ce))}},ze=ke._export_sfc(Ee,[["__scopeId","data-v-985560ab"]]);exports.default=ze;