vue-data-ui 2.6.7 → 2.6.8

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 (153) hide show
  1. package/dist/{Arrow-BxUmDF04.js → Arrow-BHD3VBsD.js} +1 -1
  2. package/dist/{Arrow-PPbxds1Q.cjs → Arrow-YuEygGzC.cjs} +1 -1
  3. package/dist/{BaseIcon-BmVwfJg2.cjs → BaseIcon-D326yPTV.cjs} +1 -1
  4. package/dist/{BaseIcon-CDx9pxUG.js → BaseIcon-dThl5uNa.js} +1 -1
  5. package/dist/{DataTable-Cv_TVAas.cjs → DataTable-CaD8j-SL.cjs} +1 -1
  6. package/dist/{DataTable-TjJIVFlL.js → DataTable-D0-zzsJg.js} +2 -2
  7. package/dist/{Legend-DunrYGuw.cjs → Legend-CEw2uq9s.cjs} +1 -1
  8. package/dist/{Legend-NKGwxkI7.js → Legend-Oaw0MY8Y.js} +2 -2
  9. package/dist/{PackageVersion-DJKkRuOD.cjs → PackageVersion-CCgJTyH9.cjs} +1 -1
  10. package/dist/{PackageVersion-QRvxRYPv.js → PackageVersion-J_USnljf.js} +1 -1
  11. package/dist/{PenAndPaper-CxC1lWGK.js → PenAndPaper-CoEXEMcN.js} +3 -3
  12. package/dist/{PenAndPaper-MTTJ3Gd9.cjs → PenAndPaper-DvNBHCpq.cjs} +1 -1
  13. package/dist/{Shape-D_1vUjCL.cjs → Shape-Cwx-wRaK.cjs} +1 -1
  14. package/dist/{Shape-58uyOuYc.js → Shape-Dtm6toQp.js} +1 -1
  15. package/dist/{Slicer-BGEieXKn.cjs → Slicer-7z_6bjyU.cjs} +1 -1
  16. package/dist/{Slicer-C7ormJRw.js → Slicer-BAcq2vD0.js} +2 -2
  17. package/dist/{Title-Dk92HYMu.cjs → Title-BQSh4ukk.cjs} +1 -1
  18. package/dist/{Title-BI8etrRU.js → Title-DePxeqVl.js} +1 -1
  19. package/dist/{Tooltip-Cxc8c50d.js → Tooltip-DRw9RoFp.js} +1 -1
  20. package/dist/{Tooltip-ClMeqejQ.cjs → Tooltip-DtqrGu-Q.cjs} +1 -1
  21. package/dist/{index-9EeNZMz1.js → index-CZlI7PiS.js} +1 -1
  22. package/dist/{index-DEnRHTzk.cjs → index-DD4PT0Pl.cjs} +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/{useNestedProp-df_bKQEI.js → useNestedProp-Cg0NIwr6.js} +1 -1
  25. package/dist/{useNestedProp-BNT60LxO.cjs → useNestedProp-DU7JFxpL.cjs} +1 -1
  26. package/dist/{usePrinter-dyVny55M.cjs → usePrinter-BtJq2wwh.cjs} +1 -1
  27. package/dist/{usePrinter-ngrh00Ym.js → usePrinter-D-sSdR2l.js} +1 -1
  28. package/dist/{vue-data-ui-CDD7JcMs.js → vue-data-ui-Dh3BJvUF.js} +61 -61
  29. package/dist/{vue-data-ui-BYX-I7HQ.cjs → vue-data-ui-DzVmFW3P.cjs} +1 -1
  30. package/dist/vue-data-ui.cjs +1 -1
  31. package/dist/vue-data-ui.js +1 -1
  32. package/dist/{vue-ui-3d-bar-BArLjlrc.js → vue-ui-3d-bar-Ckd-GTWY.js} +9 -9
  33. package/dist/{vue-ui-3d-bar-DegdXf_S.cjs → vue-ui-3d-bar-llxfgI9N.cjs} +1 -1
  34. package/dist/{vue-ui-accordion-D2qxHGzp.cjs → vue-ui-accordion-2He8z0Sy.cjs} +1 -1
  35. package/dist/{vue-ui-accordion-Qo8JxnIN.js → vue-ui-accordion-DVtmOO3I.js} +3 -3
  36. package/dist/{vue-ui-age-pyramid-Biz02m7c.js → vue-ui-age-pyramid-BUGAES7K.js} +10 -10
  37. package/dist/{vue-ui-age-pyramid-kpaaJ2Gx.cjs → vue-ui-age-pyramid-CxBb12yp.cjs} +1 -1
  38. package/dist/{vue-ui-annotator-By6XNYm0.cjs → vue-ui-annotator-BDUanFLb.cjs} +1 -1
  39. package/dist/{vue-ui-annotator-MXs48Lua.js → vue-ui-annotator-gIa7-tAI.js} +1 -1
  40. package/dist/{vue-ui-bullet-Dkz6vX0T.cjs → vue-ui-bullet-Bg8f_RzX.cjs} +1 -1
  41. package/dist/{vue-ui-bullet-CtBs_r3I.js → vue-ui-bullet-DNfzMdcg.js} +8 -8
  42. package/dist/{vue-ui-candlestick-DiEUIuW8.cjs → vue-ui-candlestick-CnKPX6xB.cjs} +1 -1
  43. package/dist/{vue-ui-candlestick-gPztmuJE.js → vue-ui-candlestick-jErGIOZA.js} +11 -11
  44. package/dist/{vue-ui-carousel-table-D9ckYNKZ.js → vue-ui-carousel-table-DHyvpjWL.js} +4 -4
  45. package/dist/{vue-ui-carousel-table-CYeXP21y.cjs → vue-ui-carousel-table-DsY9Mrdg.cjs} +1 -1
  46. package/dist/{vue-ui-chestnut-oZtRERnV.cjs → vue-ui-chestnut-BTCxF3dU.cjs} +1 -1
  47. package/dist/{vue-ui-chestnut-DWjn-jcN.js → vue-ui-chestnut-kQjk4FqR.js} +8 -8
  48. package/dist/{vue-ui-circle-pack-Bz5yVvAM.js → vue-ui-circle-pack-BQbwIDRa.js} +9 -9
  49. package/dist/{vue-ui-circle-pack-DCJ6N00S.cjs → vue-ui-circle-pack-D-eMMNzU.cjs} +1 -1
  50. package/dist/{vue-ui-cursor-DZhRygRy.cjs → vue-ui-cursor-Dd2eSMAz.cjs} +1 -1
  51. package/dist/{vue-ui-cursor-BrrVDy1u.js → vue-ui-cursor-xy62w2ep.js} +2 -2
  52. package/dist/{vue-ui-dashboard-DEmGN8Js.js → vue-ui-dashboard-DPjU-kPn.js} +2 -2
  53. package/dist/{vue-ui-dashboard-o8Ju_cXW.cjs → vue-ui-dashboard-nMODKstD.cjs} +1 -1
  54. package/dist/{vue-ui-digits-DbOrROu7.js → vue-ui-digits-BNTE0Lsb.js} +2 -2
  55. package/dist/{vue-ui-digits-CgyYdrQ5.cjs → vue-ui-digits-Beuy8wvV.cjs} +1 -1
  56. package/dist/{vue-ui-donut-9pWaRwf3.cjs → vue-ui-donut-DWKUDr7k.cjs} +1 -1
  57. package/dist/{vue-ui-donut-evolution-Ci_gIrkO.cjs → vue-ui-donut-evolution-BICtQ8ke.cjs} +1 -1
  58. package/dist/{vue-ui-donut-evolution-BAMD1wQ5.js → vue-ui-donut-evolution-DfHfXqar.js} +11 -11
  59. package/dist/{vue-ui-donut-CP5uWglM.js → vue-ui-donut-ipVF2Pk6.js} +12 -12
  60. package/dist/{vue-ui-dumbbell-CFYd-Ypn.js → vue-ui-dumbbell-D04To0aO.js} +10 -10
  61. package/dist/{vue-ui-dumbbell-DUNYoZxT.cjs → vue-ui-dumbbell-DPZYa6RZ.cjs} +1 -1
  62. package/dist/{vue-ui-flow-CdvGWFzv.js → vue-ui-flow-DYpBU4gG.js} +9 -9
  63. package/dist/{vue-ui-flow-W89ofPB-.cjs → vue-ui-flow-HFjfjzgX.cjs} +1 -1
  64. package/dist/{vue-ui-funnel-RvdVrhFu.cjs → vue-ui-funnel-BwClLXO6.cjs} +1 -1
  65. package/dist/{vue-ui-funnel-DYutKyoz.js → vue-ui-funnel-CVQHETom.js} +9 -9
  66. package/dist/{vue-ui-galaxy-Djdx-ca8.cjs → vue-ui-galaxy-B0W8yBZU.cjs} +1 -1
  67. package/dist/{vue-ui-galaxy-BCBRlYS1.js → vue-ui-galaxy-DseGnRIL.js} +11 -11
  68. package/dist/{vue-ui-gauge-BVVmf09x.cjs → vue-ui-gauge-0vhiDi19.cjs} +1 -1
  69. package/dist/{vue-ui-gauge-BNAAZt4F.js → vue-ui-gauge-B7nCLtyI.js} +7 -7
  70. package/dist/{vue-ui-gizmo-BFQ_KgLX.js → vue-ui-gizmo-C1fpqm2H.js} +3 -3
  71. package/dist/{vue-ui-gizmo-Ceh0oFY3.cjs → vue-ui-gizmo-CTMnMH7C.cjs} +1 -1
  72. package/dist/{vue-ui-heatmap-Ct3qaBv7.js → vue-ui-heatmap-B0a6TegZ.js} +10 -10
  73. package/dist/{vue-ui-heatmap-CiZpI-tA.cjs → vue-ui-heatmap-DjxXVFyU.cjs} +1 -1
  74. package/dist/{vue-ui-history-plot-Ci8Y2EFg.cjs → vue-ui-history-plot-CfjWg_3c.cjs} +1 -1
  75. package/dist/{vue-ui-history-plot-shn74MJ6.js → vue-ui-history-plot-DsLgXpZ8.js} +11 -11
  76. package/dist/{vue-ui-kpi-DfYrbxlX.cjs → vue-ui-kpi-CTsWQvCi.cjs} +1 -1
  77. package/dist/{vue-ui-kpi-B_pV-2JJ.js → vue-ui-kpi-be1EaVNS.js} +3 -3
  78. package/dist/{vue-ui-mini-loader-BFnWQs5p.js → vue-ui-mini-loader-BHm2QQQF.js} +2 -2
  79. package/dist/{vue-ui-mini-loader-LIqf62jk.cjs → vue-ui-mini-loader-DLdlPE48.cjs} +1 -1
  80. package/dist/{vue-ui-molecule-DNz1m8XZ.js → vue-ui-molecule--G2QIMak.js} +11 -11
  81. package/dist/{vue-ui-molecule-D8YuYTKv.cjs → vue-ui-molecule-DQOP_2JN.cjs} +1 -1
  82. package/dist/{vue-ui-mood-radar-DiYB_zhM.js → vue-ui-mood-radar-Bhr5Q9pC.js} +11 -11
  83. package/dist/{vue-ui-mood-radar-uvH7qUHy.cjs → vue-ui-mood-radar-HxyTIDLP.cjs} +1 -1
  84. package/dist/{vue-ui-nested-donuts-C7ikDjp7.cjs → vue-ui-nested-donuts-C0aK_Cmr.cjs} +1 -1
  85. package/dist/{vue-ui-nested-donuts-9hn-g4ir.js → vue-ui-nested-donuts-Dtll0W-x.js} +11 -11
  86. package/dist/{vue-ui-onion-DCWfNTNu.js → vue-ui-onion-CRRZ8ajr.js} +11 -11
  87. package/dist/{vue-ui-onion-5Rqvd4Fw.cjs → vue-ui-onion-DJFv8ezH.cjs} +1 -1
  88. package/dist/{vue-ui-parallel-coordinate-plot-tlgTbaNX.cjs → vue-ui-parallel-coordinate-plot-BTkf3dkR.cjs} +1 -1
  89. package/dist/{vue-ui-parallel-coordinate-plot-CaPFL9_1.js → vue-ui-parallel-coordinate-plot-DMk3iobe.js} +12 -12
  90. package/dist/{vue-ui-quadrant-B0Sw5NGo.cjs → vue-ui-quadrant-B7iHGaqG.cjs} +1 -1
  91. package/dist/{vue-ui-quadrant-BoQZ375K.js → vue-ui-quadrant-EcGC8p0U.js} +12 -12
  92. package/dist/{vue-ui-quick-chart-D3zV1d7t.cjs → vue-ui-quick-chart-BOla8Yse.cjs} +1 -1
  93. package/dist/{vue-ui-quick-chart-vfMN8F1q.js → vue-ui-quick-chart-D6AS1YSx.js} +9 -9
  94. package/dist/{vue-ui-radar-CNMJCAwo.cjs → vue-ui-radar-DmM3tCiY.cjs} +1 -1
  95. package/dist/{vue-ui-radar-CAuu6wkh.js → vue-ui-radar-LzAasUWm.js} +12 -12
  96. package/dist/{vue-ui-rating-dsRDRL98.cjs → vue-ui-rating-D9K7meNL.cjs} +1 -1
  97. package/dist/{vue-ui-rating-Bm0HZ3du.js → vue-ui-rating-DK4hwg8z.js} +2 -2
  98. package/dist/{vue-ui-relation-circle-5OZMN9jR.js → vue-ui-relation-circle-CbOCYAmF.js} +7 -7
  99. package/dist/{vue-ui-relation-circle-iD7BufNH.cjs → vue-ui-relation-circle-DIJuJZrt.cjs} +1 -1
  100. package/dist/{vue-ui-rings-DC4WG4sK.cjs → vue-ui-rings-BWgF92GG.cjs} +1 -1
  101. package/dist/{vue-ui-rings-COefBaQT.js → vue-ui-rings-Cqzy5T3m.js} +12 -12
  102. package/dist/{vue-ui-scatter-DhO83TZZ.js → vue-ui-scatter-DXvyWQYL.js} +12 -12
  103. package/dist/{vue-ui-scatter-5ny76dmi.cjs → vue-ui-scatter-F-gNKXpp.cjs} +1 -1
  104. package/dist/{vue-ui-screenshot-brillPo5.js → vue-ui-screenshot-BL75IkNz.js} +1 -1
  105. package/dist/{vue-ui-screenshot-DABH_phE.cjs → vue-ui-screenshot-BXngAa8V.cjs} +1 -1
  106. package/dist/{vue-ui-skeleton-BmJiYGtE.js → vue-ui-skeleton-D8r-yAkW.js} +3 -3
  107. package/dist/{vue-ui-skeleton-_DN0U6W6.cjs → vue-ui-skeleton-Tk4j6G2D.cjs} +1 -1
  108. package/dist/{vue-ui-smiley-D9NRimij.js → vue-ui-smiley-BKWWVHh7.js} +2 -2
  109. package/dist/{vue-ui-smiley-CW6714mb.cjs → vue-ui-smiley-BLnMEG6Z.cjs} +1 -1
  110. package/dist/{vue-ui-spark-trend-BKZj03CQ.js → vue-ui-spark-trend-Bb7xpmpt.js} +5 -5
  111. package/dist/{vue-ui-spark-trend-expbkxgR.cjs → vue-ui-spark-trend-CqG-PKFp.cjs} +1 -1
  112. package/dist/{vue-ui-sparkbar-Cr9FtevP.cjs → vue-ui-sparkbar-0h661dcM.cjs} +1 -1
  113. package/dist/{vue-ui-sparkbar-CYRORE5i.js → vue-ui-sparkbar-JIpGYhbq.js} +4 -4
  114. package/dist/{vue-ui-sparkgauge-BHXFhvTv.cjs → vue-ui-sparkgauge-BLglWMCN.cjs} +1 -1
  115. package/dist/{vue-ui-sparkgauge-JV4tYB7P.js → vue-ui-sparkgauge-Cc-l_NLU.js} +4 -4
  116. package/dist/{vue-ui-sparkhistogram-DKINHX2q.js → vue-ui-sparkhistogram-BysifQmq.js} +5 -5
  117. package/dist/{vue-ui-sparkhistogram-T4a3DDck.cjs → vue-ui-sparkhistogram-CCbcvIJ1.cjs} +1 -1
  118. package/dist/{vue-ui-sparkline-Dc6Sf3n8.cjs → vue-ui-sparkline-CDJX8K9i.cjs} +1 -1
  119. package/dist/{vue-ui-sparkline-CbRTHtig.js → vue-ui-sparkline-CV-N3Wio.js} +4 -4
  120. package/dist/{vue-ui-sparkstackbar-CV5SkdsP.cjs → vue-ui-sparkstackbar-Bo4JAlsR.cjs} +1 -1
  121. package/dist/{vue-ui-sparkstackbar-6u9-2nG4.js → vue-ui-sparkstackbar-WOO_AbtI.js} +5 -5
  122. package/dist/{vue-ui-stackbar-CUppObfj.js → vue-ui-stackbar-CP0igpri.js} +13 -13
  123. package/dist/{vue-ui-stackbar-CXB-nd71.cjs → vue-ui-stackbar-D7odU6jb.cjs} +1 -1
  124. package/dist/{vue-ui-strip-plot-6IXF_U6-.cjs → vue-ui-strip-plot-CUqC58Ki.cjs} +1 -1
  125. package/dist/{vue-ui-strip-plot-doaNZAW4.js → vue-ui-strip-plot-_3AJWLnm.js} +11 -11
  126. package/dist/{vue-ui-table-S66UCskD.cjs → vue-ui-table-8O19epjz.cjs} +1 -1
  127. package/dist/{vue-ui-table-CZsNuDR5.js → vue-ui-table-WdE7p5Oy.js} +1 -1
  128. package/dist/{vue-ui-table-heatmap-CjohHqDV.js → vue-ui-table-heatmap-CXS6WfTi.js} +4 -4
  129. package/dist/{vue-ui-table-heatmap-BU9UU15H.cjs → vue-ui-table-heatmap-DH5kHmxx.cjs} +1 -1
  130. package/dist/{vue-ui-table-sparkline-ab2rwdKB.js → vue-ui-table-sparkline-CWwjANqk.js} +5 -5
  131. package/dist/{vue-ui-table-sparkline-CHFFTD0a.cjs → vue-ui-table-sparkline-DnvQfr2p.cjs} +1 -1
  132. package/dist/{vue-ui-thermometer-C72mHwUi.js → vue-ui-thermometer-BxrDTquG.js} +7 -7
  133. package/dist/{vue-ui-thermometer-Ccd6RGh8.cjs → vue-ui-thermometer-COmtpPaq.cjs} +1 -1
  134. package/dist/{vue-ui-timer-C8Fn2B0b.cjs → vue-ui-timer-Bx3W4oUc.cjs} +1 -1
  135. package/dist/{vue-ui-timer-D-LNi6lz.js → vue-ui-timer-DjKCOw9A.js} +5 -5
  136. package/dist/{vue-ui-tiremarks-SOzvMOz4.cjs → vue-ui-tiremarks--XDyJeJg.cjs} +1 -1
  137. package/dist/{vue-ui-tiremarks-Bo8EWsJ8.js → vue-ui-tiremarks-VWxcZxB-.js} +7 -7
  138. package/dist/{vue-ui-treemap-uj94elVB.js → vue-ui-treemap-BGFmZcII.js} +11 -11
  139. package/dist/{vue-ui-treemap-BqTTQrVh.cjs → vue-ui-treemap-DTwjydy8.cjs} +1 -1
  140. package/dist/{vue-ui-vertical-bar-C4Sxun4Q.cjs → vue-ui-vertical-bar-Bpv8mXW2.cjs} +1 -1
  141. package/dist/{vue-ui-vertical-bar-BUTOw-DK.js → vue-ui-vertical-bar-DC9czKCT.js} +12 -12
  142. package/dist/{vue-ui-waffle-DYWGRKdT.cjs → vue-ui-waffle-B_6ZAnKt.cjs} +1 -1
  143. package/dist/{vue-ui-waffle-CTWA1frT.js → vue-ui-waffle-Cu63K9Iy.js} +12 -12
  144. package/dist/{vue-ui-wheel-8K72ZKda.js → vue-ui-wheel-AOt-pfpa.js} +7 -7
  145. package/dist/{vue-ui-wheel-Cz5-0klT.cjs → vue-ui-wheel-BQM-dxTa.cjs} +1 -1
  146. package/dist/{vue-ui-word-cloud-D39riLZb.cjs → vue-ui-word-cloud-Bam3-7P_.cjs} +1 -1
  147. package/dist/{vue-ui-word-cloud-CSwBPDB8.js → vue-ui-word-cloud-CrILrx6m.js} +10 -10
  148. package/dist/{vue-ui-xy-DpDKutd7.js → vue-ui-xy-BuLymzS3.js} +212 -190
  149. package/dist/vue-ui-xy-CSmObuR7.cjs +3 -0
  150. package/dist/{vue-ui-xy-canvas-BCj0SCqe.cjs → vue-ui-xy-canvas-BQ0Lbxbd.cjs} +1 -1
  151. package/dist/{vue-ui-xy-canvas-BQm9gah4.js → vue-ui-xy-canvas-DPnb5mqS.js} +11 -11
  152. package/package.json +1 -1
  153. package/dist/vue-ui-xy-BbWXjajH.cjs +0 -3
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DEnRHTzk.cjs"),W=require("./useNestedProp-BNT60LxO.cjs"),J=require("./usePrinter-dyVny55M.cjs"),ue=require("./Title-Dk92HYMu.cjs"),ie=require("./PenAndPaper-MTTJ3Gd9.cjs"),ce=require("./DataTable-Cv_TVAas.cjs"),ve=require("./vue-ui-accordion-D2qxHGzp.cjs"),K=require("./useResponsive-YQYQrAZ_.cjs"),de=require("./vue-ui-skeleton-_DN0U6W6.cjs"),he=require("./useUserOptionState-BgepsfED.cjs"),fe=require("./PackageVersion-DJKkRuOD.cjs"),me=require("./useChartAccessibility-Cm7nkzTG.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],ye=["xmlns","viewBox"],ge=["width","height"],ke=["id"],Ce=["stop-color"],we=["stop-color"],xe=["stop-color"],Le=["stroke","stroke-width"],Be=["stroke","stroke-width"],$e=["x","y","font-size","fill","font-weight"],_e=["points","fill"],Ne=["stroke","stroke-width","rx"],Se=["x","y","font-size","fill","font-weight"],ze=["x","y","font-size","fill","font-weight"],Te={key:5,class:"vue-data-ui-watermark"},Ae=["innerHTML"],Pe={__name:"vue-ui-funnel",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Q,{expose:Z}){e.useCssVars(a=>({"3ce0aba8":ne.value}));const{vue_ui_funnel:ee}=r.useConfig(),d=Q,b=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(z);function z(){if(r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiFunnel",type:"dataset"}):d.dataset.forEach((a,o)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(l=>{b.value=!1,r.error({componentName:"VueUiFunnel",type:"datasetSerieAttribute",property:l,index:o})})}),t.value.responsive){const a=K.throttle(()=>{const{width:o,height:l}=K.useResponsive({chart:g.value,title:t.value.style.chart.title.text?O.value:null,source:V.value,noTitle:E.value});requestAnimationFrame(()=>{u.value.height=l,u.value.width=o,f.value=G(),i.value.circles=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.circles.dataLabels.fontSize,threshold:10,fallback:10}),i.value.names=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.name.fontSize,threshold:10,fallback:10}),i.value.values=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.value.fontSize,threshold:10,fallback:10})})});D.value=new ResizeObserver(a),D.value.observe(g.value.parentNode)}}const g=e.ref(null),k=e.ref(r.createUid()),T=e.ref(0),A=e.ref(0),P=e.ref(0),E=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(null),m=e.ref(!1);function F(){const a=W.useNestedProp({userConfig:d.config,defaultConfig:ee});return a.theme?{...W.useNestedProp({userConfig:r.themes.vue_ui_funnel[a.theme]||d.config,defaultConfig:a})}:a}const t=e.computed({get:()=>F(),set:a=>a}),{userOptionsVisible:_,setUserOptionsVisibility:I,keepUserOptionState:q}=he.useUserOptionState({config:t.value}),{svgRef:te}=me.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>d.config,a=>{t.value=F(),_.value=!t.value.userOptions.showOnChartHover,z(),A.value+=1,P.value+=1,i.value.circles=t.value.style.chart.circles.dataLabels.fontSize,i.value.names=t.value.style.chart.bars.dataLabels.name.fontSize,i.value.values=t.value.style.chart.bars.dataLabels.value.fontSize,C.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:M,isImaging:R,generatePdf:U,generateImage:j}=J.usePrinter({elementId:`funnel_${k.value}`,fileName:t.value.style.chart.title.text||"vue-ui-funnel"}),ae=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),C=e.ref({showTable:t.value.table.show}),i=e.ref({circles:t.value.style.chart.circles.dataLabels.fontSize,names:t.value.style.chart.bars.dataLabels.name.fontSize,values:t.value.style.chart.bars.dataLabels.value.fontSize}),u=e.computed({get:()=>({height:t.value.style.chart.height,width:t.value.style.chart.width}),set:a=>a}),h=e.computed(()=>b.value?d.dataset.map((a,o)=>({...a,color:a.color?r.convertColorToHex(a.color):r.lightenHexColor(t.value.style.chart.bars.defaultColor,o/d.dataset.length)})):[]);setTimeout(()=>{m.value=!0},h.value.length*150);function G(){const a=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:a,top:o,right:u.value.width-t.value.style.chart.padding.right,bottom:u.value.height-t.value.style.chart.padding.bottom,width:u.value.width-a-t.value.style.chart.padding.right,height:u.value.height-o-t.value.style.chart.padding.bottom}}const f=e.ref(G()),y=e.computed(()=>f.value.height/d.dataset.length),p=e.computed(()=>y.value*t.value.style.chart.bars.gapRatio),H=e.computed(()=>f.value.width*t.value.style.chart.barCircleSpacingRatio),n=e.computed(()=>h.value.map((a,o)=>{const l=y.value-p.value,s=f.value.top+p.value/2*o+(y.value-p.value/2)*o+p.value/2,v=a.value/h.value[0].value,c=(f.value.width-l-H.value)*(a.value/h.value[0].value);return{...a,cx:f.value.left+l/2,cy:s+l/2,datapointIndex:o,fill:a.color,height:Math.max(l,0),proportion:v,r:Math.max(l/2,0),width:Math.max(c,0),x:f.value.left+l+H.value,y:s}})),le=e.computed(()=>{const a=n.value.map(o=>`${o.x+o.width},${o.y+(y.value-p.value)/2}`);return`${n.value[0].x},${n.value[0].y+(y.value-p.value)/2} ${a.toString()} ${n.value.at(-1).x},${n.value.at(-1).y+(y.value-p.value)/2}`}),oe=e.computed(()=>({x1:n.value[0].cx,y1:n.value[0].cy,x2:n.value.at(-1).cx,y2:n.value.at(-1).cy})),w=e.ref(!1);function re(a){w.value=a,T.value+=1}const ne=e.computed(()=>`${h.value.length*150}ms`),B=e.ref(!1);function N(){B.value=!B.value}function X(){C.value.showTable=!C.value.showTable}const x=e.computed(()=>{const a=h.value.map(l=>({name:l.name,color:l.color})),o=h.value.map(l=>l.value);return{head:a,body:o}}),$=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],o=x.value.head.map((v,c)=>{const L=r.applyDataLabel(t.value.style.chart.bars.dataLabels.value.formatter,x.value.body[c],r.dataLabel({p:t.value.style.chart.bars.dataLabels.value.prefix,v:x.value.body[c],s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.table.td.roundingValue}),{datapoint:n.value[c]}),S=r.applyDataLabel(t.value.style.chart.circles.dataLabels.formatter,n.value[c].proportion*100,r.dataLabel({v:n.value[c].proportion*100,s:"%",r:t.value.table.td.roundingPercentage}),{datapoint:n.value[c]});return[{color:v.color,name:v.name},L,S]}),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{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:a,body:o,config:l}});function Y(){e.nextTick(()=>{const a=x.value.head.map((s,v)=>[[s.name],[x.value.body[v]],[n.value[v].proportion*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value],["%"]]].concat(a),l=r.createCsvContent(o);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-funnel"})})}function se(){return h.value}return Z({getData:se,generatePdf:U,generateCsv:Y,generateImage:j,toggleTable:X,toggleAnnotator:N}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"funnelChart",ref:g,class:e.normalizeClass(`vue-ui-funnel ${w.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height:100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`funnel_${k.value}`,onMouseenter:o[1]||(o[1]=()=>e.unref(I)(!0)),onMouseleave:o[2]||(o[2]=()=>e.unref(I)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ie.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:N},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ae.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:E,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:O,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ue._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"funnel-div-title",...t.value.style.chart.title},subtitle:{cy:"funnel-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(q)||e.unref(_))?(e.openBlock(),e.createBlock(J.UserOptions,{ref:"details",key:`user_option_${T.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(M),isImaging:e.unref(R),uid:k.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:w.value,chartElement:g.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleAnnotator:N,onToggleFullscreen:re,onGeneratePdf:e.unref(U),onGenerateImage:e.unref(j),onToggleTable:X,onGenerateCsv:Y,style:e.normalizeStyle({visibility:e.unref(q)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:s})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:s})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:te,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(fe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width<=0?10:u.value.width,height:u.value.height<=0?10:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,ge)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`funnel_area_${k.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.backgroundColor,"stop-opacity":0},null,8,Ce),e.createElementVNode("stop",{offset:"20%","stop-color":t.value.style.chart.area.color},null,8,we),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.area.color},null,8,xe)],8,ke)]),t.value.style.chart.circleLinks.show?(e.openBlock(),e.createElementBlock("line",e.mergeProps({key:1},oe.value,{stroke:t.value.style.chart.circleLinks.color,"stroke-width":12*t.value.style.chart.circleLinks.widthRatio,"stroke-linecap":"round",class:{animated:t.value.useCssAnimation},style:{strokeDasharray:t.value.useCssAnimation?f.value.height:0,strokeDashoffset:t.value.useCssAnimation?f.value.height:0}}),null,16,Le)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,({cx:l,cy:s,r:v,fill:c},L)=>(e.openBlock(),e.createElementBlock("circle",e.mergeProps({ref_for:!0},{cx:l,cy:s,r:v,fill:c},{stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth,class:{animated:t.value.useCssAnimation&&!m.value},style:{animationDelay:`${150*L}ms`}}),null,16,Be))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{x:l.cx,y:l.cy+i.value.circles/3+t.value.style.chart.circles.dataLabels.offsetY,"text-anchor":"middle","font-size":i.value.circles,fill:t.value.style.chart.circles.dataLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(l.color):t.value.style.chart.circles.dataLabels.color,"font-weight":t.value.style.chart.circles.dataLabels.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({animationDelay:`${150*s}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.circles.dataLabels.formatter,l.proportion*100,e.unref(r.dataLabel)({v:l.proportion*100,s:"%",r:t.value.style.chart.circles.dataLabels.rounding}),{datapoint:l})),15,$e))),256)),t.value.style.chart.area.show?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:le.value,fill:`url(#funnel_area_${k.value})`,class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({transition:t.value.useCssAnimation?`all ${150*h.value.length}ms ease-in`:"none"})},null,14,_e)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,({x:l,y:s,height:v,width:c,fill:L},S)=>(e.openBlock(),e.createElementBlock("rect",e.mergeProps({ref_for:!0},{x:l,y:s,height:v,width:c,fill:L},{stroke:t.value.style.chart.bars.stroke,"stroke-width":t.value.style.chart.bars.strokeWidth,rx:t.value.style.chart.bars.borderRadius,class:{animated:t.value.useCssAnimation&&!m.value},style:{animationDelay:`${150*S}ms`}}),null,16,Ne))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.name.offsetX+12,y:l.cy-i.value.names/2+t.value.style.chart.bars.dataLabels.name.offsetY,"text-anchor":"start","font-size":i.value.names,fill:t.value.style.chart.bars.dataLabels.name.color,"font-weight":t.value.style.chart.bars.dataLabels.name.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({animationDelay:`${150*s}ms`})},e.toDisplayString(l.name),15,Se),e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.value.offsetX+12,y:l.cy+i.value.values+t.value.style.chart.bars.dataLabels.value.offsetY,"text-anchor":"start","font-size":i.value.values,fill:t.value.style.chart.bars.dataLabels.value.color,"font-weight":t.value.style.chart.bars.dataLabels.value.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({animationDelay:`${150*s}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.bars.dataLabels.value.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.bars.dataLabels.value.prefix,v:l.value,s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.style.chart.bars.dataLabels.value.rounding}),{datapoint:l})),15,ze)]))),256)),e.renderSlot(a.$slots,"svg",{svg:u.value},void 0,!0)],14,ye)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Te,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(de.default,{key:6,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:V,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(ve.default,{key:8,hideDetails:"",config:{open:C.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(ce.DataTable,{key:`table_${P.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:o[0]||(o[0]=l=>C.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.name:l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,be))}},Ee=pe._export_sfc(Pe,[["__scopeId","data-v-f0e3fa4f"]]);exports.default=Ee;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DD4PT0Pl.cjs"),W=require("./useNestedProp-DU7JFxpL.cjs"),J=require("./usePrinter-BtJq2wwh.cjs"),ue=require("./Title-BQSh4ukk.cjs"),ie=require("./PenAndPaper-DvNBHCpq.cjs"),ce=require("./DataTable-CaD8j-SL.cjs"),ve=require("./vue-ui-accordion-2He8z0Sy.cjs"),K=require("./useResponsive-YQYQrAZ_.cjs"),de=require("./vue-ui-skeleton-Tk4j6G2D.cjs"),he=require("./useUserOptionState-BgepsfED.cjs"),fe=require("./PackageVersion-CCgJTyH9.cjs"),me=require("./useChartAccessibility-Cm7nkzTG.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],ye=["xmlns","viewBox"],ge=["width","height"],ke=["id"],Ce=["stop-color"],we=["stop-color"],xe=["stop-color"],Le=["stroke","stroke-width"],Be=["stroke","stroke-width"],$e=["x","y","font-size","fill","font-weight"],_e=["points","fill"],Ne=["stroke","stroke-width","rx"],Se=["x","y","font-size","fill","font-weight"],ze=["x","y","font-size","fill","font-weight"],Te={key:5,class:"vue-data-ui-watermark"},Ae=["innerHTML"],Pe={__name:"vue-ui-funnel",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Q,{expose:Z}){e.useCssVars(a=>({"3ce0aba8":ne.value}));const{vue_ui_funnel:ee}=r.useConfig(),d=Q,b=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(z);function z(){if(r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiFunnel",type:"dataset"}):d.dataset.forEach((a,o)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(l=>{b.value=!1,r.error({componentName:"VueUiFunnel",type:"datasetSerieAttribute",property:l,index:o})})}),t.value.responsive){const a=K.throttle(()=>{const{width:o,height:l}=K.useResponsive({chart:g.value,title:t.value.style.chart.title.text?O.value:null,source:V.value,noTitle:E.value});requestAnimationFrame(()=>{u.value.height=l,u.value.width=o,f.value=G(),i.value.circles=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.circles.dataLabels.fontSize,threshold:10,fallback:10}),i.value.names=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.name.fontSize,threshold:10,fallback:10}),i.value.values=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.value.fontSize,threshold:10,fallback:10})})});D.value=new ResizeObserver(a),D.value.observe(g.value.parentNode)}}const g=e.ref(null),k=e.ref(r.createUid()),T=e.ref(0),A=e.ref(0),P=e.ref(0),E=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(null),m=e.ref(!1);function F(){const a=W.useNestedProp({userConfig:d.config,defaultConfig:ee});return a.theme?{...W.useNestedProp({userConfig:r.themes.vue_ui_funnel[a.theme]||d.config,defaultConfig:a})}:a}const t=e.computed({get:()=>F(),set:a=>a}),{userOptionsVisible:_,setUserOptionsVisibility:I,keepUserOptionState:q}=he.useUserOptionState({config:t.value}),{svgRef:te}=me.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>d.config,a=>{t.value=F(),_.value=!t.value.userOptions.showOnChartHover,z(),A.value+=1,P.value+=1,i.value.circles=t.value.style.chart.circles.dataLabels.fontSize,i.value.names=t.value.style.chart.bars.dataLabels.name.fontSize,i.value.values=t.value.style.chart.bars.dataLabels.value.fontSize,C.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:M,isImaging:R,generatePdf:U,generateImage:j}=J.usePrinter({elementId:`funnel_${k.value}`,fileName:t.value.style.chart.title.text||"vue-ui-funnel"}),ae=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),C=e.ref({showTable:t.value.table.show}),i=e.ref({circles:t.value.style.chart.circles.dataLabels.fontSize,names:t.value.style.chart.bars.dataLabels.name.fontSize,values:t.value.style.chart.bars.dataLabels.value.fontSize}),u=e.computed({get:()=>({height:t.value.style.chart.height,width:t.value.style.chart.width}),set:a=>a}),h=e.computed(()=>b.value?d.dataset.map((a,o)=>({...a,color:a.color?r.convertColorToHex(a.color):r.lightenHexColor(t.value.style.chart.bars.defaultColor,o/d.dataset.length)})):[]);setTimeout(()=>{m.value=!0},h.value.length*150);function G(){const a=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:a,top:o,right:u.value.width-t.value.style.chart.padding.right,bottom:u.value.height-t.value.style.chart.padding.bottom,width:u.value.width-a-t.value.style.chart.padding.right,height:u.value.height-o-t.value.style.chart.padding.bottom}}const f=e.ref(G()),y=e.computed(()=>f.value.height/d.dataset.length),p=e.computed(()=>y.value*t.value.style.chart.bars.gapRatio),H=e.computed(()=>f.value.width*t.value.style.chart.barCircleSpacingRatio),n=e.computed(()=>h.value.map((a,o)=>{const l=y.value-p.value,s=f.value.top+p.value/2*o+(y.value-p.value/2)*o+p.value/2,v=a.value/h.value[0].value,c=(f.value.width-l-H.value)*(a.value/h.value[0].value);return{...a,cx:f.value.left+l/2,cy:s+l/2,datapointIndex:o,fill:a.color,height:Math.max(l,0),proportion:v,r:Math.max(l/2,0),width:Math.max(c,0),x:f.value.left+l+H.value,y:s}})),le=e.computed(()=>{const a=n.value.map(o=>`${o.x+o.width},${o.y+(y.value-p.value)/2}`);return`${n.value[0].x},${n.value[0].y+(y.value-p.value)/2} ${a.toString()} ${n.value.at(-1).x},${n.value.at(-1).y+(y.value-p.value)/2}`}),oe=e.computed(()=>({x1:n.value[0].cx,y1:n.value[0].cy,x2:n.value.at(-1).cx,y2:n.value.at(-1).cy})),w=e.ref(!1);function re(a){w.value=a,T.value+=1}const ne=e.computed(()=>`${h.value.length*150}ms`),B=e.ref(!1);function N(){B.value=!B.value}function X(){C.value.showTable=!C.value.showTable}const x=e.computed(()=>{const a=h.value.map(l=>({name:l.name,color:l.color})),o=h.value.map(l=>l.value);return{head:a,body:o}}),$=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],o=x.value.head.map((v,c)=>{const L=r.applyDataLabel(t.value.style.chart.bars.dataLabels.value.formatter,x.value.body[c],r.dataLabel({p:t.value.style.chart.bars.dataLabels.value.prefix,v:x.value.body[c],s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.table.td.roundingValue}),{datapoint:n.value[c]}),S=r.applyDataLabel(t.value.style.chart.circles.dataLabels.formatter,n.value[c].proportion*100,r.dataLabel({v:n.value[c].proportion*100,s:"%",r:t.value.table.td.roundingPercentage}),{datapoint:n.value[c]});return[{color:v.color,name:v.name},L,S]}),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{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:a,body:o,config:l}});function Y(){e.nextTick(()=>{const a=x.value.head.map((s,v)=>[[s.name],[x.value.body[v]],[n.value[v].proportion*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value],["%"]]].concat(a),l=r.createCsvContent(o);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-funnel"})})}function se(){return h.value}return Z({getData:se,generatePdf:U,generateCsv:Y,generateImage:j,toggleTable:X,toggleAnnotator:N}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"funnelChart",ref:g,class:e.normalizeClass(`vue-ui-funnel ${w.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height:100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`funnel_${k.value}`,onMouseenter:o[1]||(o[1]=()=>e.unref(I)(!0)),onMouseleave:o[2]||(o[2]=()=>e.unref(I)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ie.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:N},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ae.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:E,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:O,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ue._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"funnel-div-title",...t.value.style.chart.title},subtitle:{cy:"funnel-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(q)||e.unref(_))?(e.openBlock(),e.createBlock(J.UserOptions,{ref:"details",key:`user_option_${T.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(M),isImaging:e.unref(R),uid:k.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:w.value,chartElement:g.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleAnnotator:N,onToggleFullscreen:re,onGeneratePdf:e.unref(U),onGenerateImage:e.unref(j),onToggleTable:X,onGenerateCsv:Y,style:e.normalizeStyle({visibility:e.unref(q)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:s})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:s})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:te,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(fe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width<=0?10:u.value.width,height:u.value.height<=0?10:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,ge)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`funnel_area_${k.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.backgroundColor,"stop-opacity":0},null,8,Ce),e.createElementVNode("stop",{offset:"20%","stop-color":t.value.style.chart.area.color},null,8,we),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.area.color},null,8,xe)],8,ke)]),t.value.style.chart.circleLinks.show?(e.openBlock(),e.createElementBlock("line",e.mergeProps({key:1},oe.value,{stroke:t.value.style.chart.circleLinks.color,"stroke-width":12*t.value.style.chart.circleLinks.widthRatio,"stroke-linecap":"round",class:{animated:t.value.useCssAnimation},style:{strokeDasharray:t.value.useCssAnimation?f.value.height:0,strokeDashoffset:t.value.useCssAnimation?f.value.height:0}}),null,16,Le)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,({cx:l,cy:s,r:v,fill:c},L)=>(e.openBlock(),e.createElementBlock("circle",e.mergeProps({ref_for:!0},{cx:l,cy:s,r:v,fill:c},{stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth,class:{animated:t.value.useCssAnimation&&!m.value},style:{animationDelay:`${150*L}ms`}}),null,16,Be))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{x:l.cx,y:l.cy+i.value.circles/3+t.value.style.chart.circles.dataLabels.offsetY,"text-anchor":"middle","font-size":i.value.circles,fill:t.value.style.chart.circles.dataLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(l.color):t.value.style.chart.circles.dataLabels.color,"font-weight":t.value.style.chart.circles.dataLabels.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({animationDelay:`${150*s}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.circles.dataLabels.formatter,l.proportion*100,e.unref(r.dataLabel)({v:l.proportion*100,s:"%",r:t.value.style.chart.circles.dataLabels.rounding}),{datapoint:l})),15,$e))),256)),t.value.style.chart.area.show?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:le.value,fill:`url(#funnel_area_${k.value})`,class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({transition:t.value.useCssAnimation?`all ${150*h.value.length}ms ease-in`:"none"})},null,14,_e)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,({x:l,y:s,height:v,width:c,fill:L},S)=>(e.openBlock(),e.createElementBlock("rect",e.mergeProps({ref_for:!0},{x:l,y:s,height:v,width:c,fill:L},{stroke:t.value.style.chart.bars.stroke,"stroke-width":t.value.style.chart.bars.strokeWidth,rx:t.value.style.chart.bars.borderRadius,class:{animated:t.value.useCssAnimation&&!m.value},style:{animationDelay:`${150*S}ms`}}),null,16,Ne))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.name.offsetX+12,y:l.cy-i.value.names/2+t.value.style.chart.bars.dataLabels.name.offsetY,"text-anchor":"start","font-size":i.value.names,fill:t.value.style.chart.bars.dataLabels.name.color,"font-weight":t.value.style.chart.bars.dataLabels.name.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({animationDelay:`${150*s}ms`})},e.toDisplayString(l.name),15,Se),e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.value.offsetX+12,y:l.cy+i.value.values+t.value.style.chart.bars.dataLabels.value.offsetY,"text-anchor":"start","font-size":i.value.values,fill:t.value.style.chart.bars.dataLabels.value.color,"font-weight":t.value.style.chart.bars.dataLabels.value.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({animationDelay:`${150*s}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.bars.dataLabels.value.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.bars.dataLabels.value.prefix,v:l.value,s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.style.chart.bars.dataLabels.value.rounding}),{datapoint:l})),15,ze)]))),256)),e.renderSlot(a.$slots,"svg",{svg:u.value},void 0,!0)],14,ye)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Te,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(de.default,{key:6,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:V,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(ve.default,{key:8,hideDetails:"",config:{open:C.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(ce.DataTable,{key:`table_${P.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:o[0]||(o[0]=l=>C.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.name:l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,be))}},Ee=pe._export_sfc(Pe,[["__scopeId","data-v-f0e3fa4f"]]);exports.default=Ee;
@@ -1,15 +1,15 @@
1
1
  import { useCssVars as Le, computed as v, onMounted as Te, ref as c, watch as Ae, createElementBlock as u, openBlock as s, unref as n, normalizeStyle as _, normalizeClass as T, createBlock as A, createCommentVNode as f, createSlots as Ne, withCtx as k, renderSlot as y, normalizeProps as H, guardReactiveProps as X, createVNode as Oe, createElementVNode as C, mergeProps as q, Fragment as M, renderList as R, toDisplayString as V, createTextVNode as ze, nextTick as Se } from "vue";
2
- import { u as Pe, o as Fe, e as fe, g as De, c as Ie, d as Me, l as Re, i as B, f as U, X as Ve, G as Be, F as Y, a as Ue, q as Ee, r as Ge } from "./index-9EeNZMz1.js";
3
- import { u as be } from "./useNestedProp-df_bKQEI.js";
4
- import { u as je, U as He } from "./usePrinter-ngrh00Ym.js";
5
- import { _ as Xe } from "./Title-BI8etrRU.js";
6
- import { P as qe } from "./PenAndPaper-CxC1lWGK.js";
7
- import { D as Ye } from "./DataTable-TjJIVFlL.js";
8
- import We from "./vue-ui-accordion-Qo8JxnIN.js";
2
+ import { u as Pe, o as Fe, e as fe, g as De, c as Ie, d as Me, l as Re, i as B, f as U, X as Ve, G as Be, F as Y, a as Ue, q as Ee, r as Ge } from "./index-CZlI7PiS.js";
3
+ import { u as be } from "./useNestedProp-Cg0NIwr6.js";
4
+ import { u as je, U as He } from "./usePrinter-D-sSdR2l.js";
5
+ import { _ as Xe } from "./Title-DePxeqVl.js";
6
+ import { P as qe } from "./PenAndPaper-CoEXEMcN.js";
7
+ import { D as Ye } from "./DataTable-D0-zzsJg.js";
8
+ import We from "./vue-ui-accordion-DVtmOO3I.js";
9
9
  import { t as Je, u as Ke } from "./useResponsive-BWapHhVH.js";
10
- import Qe from "./vue-ui-skeleton-BmJiYGtE.js";
10
+ import Qe from "./vue-ui-skeleton-D8r-yAkW.js";
11
11
  import { u as Ze } from "./useUserOptionState-BIvW1Kz7.js";
12
- import { _ as et } from "./PackageVersion-QRvxRYPv.js";
12
+ import { _ as et } from "./PackageVersion-J_USnljf.js";
13
13
  import { u as tt } from "./useChartAccessibility-BWojgys7.js";
14
14
  import { _ as at } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
15
  const lt = ["id"], st = ["xmlns", "viewBox"], ot = ["width", "height"], rt = ["id"], nt = ["stop-color"], ut = ["stop-color"], it = ["stop-color"], ct = ["stroke", "stroke-width"], vt = ["stroke", "stroke-width"], dt = ["x", "y", "font-size", "fill", "font-weight"], ht = ["points", "fill"], ft = ["stroke", "stroke-width", "rx"], bt = ["x", "y", "font-size", "fill", "font-weight"], mt = ["x", "y", "font-size", "fill", "font-weight"], yt = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DEnRHTzk.cjs"),ce=require("./Legend-DunrYGuw.cjs"),de=require("./Title-Dk92HYMu.cjs"),ve=require("./Tooltip-ClMeqejQ.cjs"),he=require("./DataTable-Cv_TVAas.cjs"),X=require("./usePrinter-dyVny55M.cjs"),pe=require("./vue-ui-skeleton-_DN0U6W6.cjs"),fe=require("./vue-ui-accordion-D2qxHGzp.cjs"),Y=require("./useNestedProp-BNT60LxO.cjs"),ye=require("./PackageVersion-DJKkRuOD.cjs"),ge=require("./PenAndPaper-MTTJ3Gd9.cjs"),me=require("./useUserOptionState-BgepsfED.cjs"),be=require("./useChartAccessibility-Cm7nkzTG.cjs"),ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],we={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},xe={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},$e=["xmlns","viewBox"],Be=["width","height"],Se=["id"],Te=["stdDeviation"],Ne=["d","stroke","stroke-width"],Pe=["d","stroke","stroke-width"],_e=["filter"],Ve=["d","stroke","stroke-width"],Ee=["d","stroke-width","onMouseenter","onClick"],Le={key:5,class:"vue-data-ui-watermark"},Oe=["onClick"],Ae={key:0},Fe={key:1},ze={key:8,ref:"source",dir:"auto"},Ie=["innerHTML"],De={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(J,{expose:K,emit:Q}){const{vue_ui_galaxy:Z}=r.useConfig(),c=J,k=e.computed(()=>!!c.dataset&&c.dataset.length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):c.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})}const g=e.ref(r.createUid()),C=e.ref(null),ee=e.ref(null),$=e.ref(!1),B=e.ref(""),d=e.ref(null),V=e.ref(0),E=e.ref(0),L=e.ref(0),O=e.ref(0),t=e.computed({get:()=>z(),set:l=>l}),{userOptionsVisible:S,setUserOptionsVisibility:A,keepUserOptionState:F}=me.useUserOptionState({config:t.value}),{svgRef:te}=be.useChartAccessibility({config:t.value.style.chart.title});function z(){const l=Y.useNestedProp({userConfig:c.config,defaultConfig:Z});return l.theme?{...Y.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>c.config,l=>{t.value=z(),S.value=!t.value.userOptions.showOnChartHover,_(),E.value+=1,L.value+=1,O.value+=1,u.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,u.value.showTable=t.value.table.show,u.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:I,isImaging:D,generatePdf:q,generateImage:M}=X.usePrinter({elementId:`galaxy_${g.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),le=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),oe=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),u=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),m=e.ref({height:180,width:250}),U=Q,i=e.ref([]);function T(l){i.value.includes(l.id)?i.value=i.value.filter(a=>a!==l.id):i.value.push(l.id),U("selectLegend",b.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>c.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||oe.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,n)=>o+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function ae(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const v=e.computed(()=>p.value.filter(l=>!i.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),re=e.ref(190),G=e.computed(()=>p.value.filter(l=>!i.value.includes(l.id))),b=e.computed(()=>{const l=[];for(let a=0;a<G.value.length;a+=1){const o=G.value[a];let n=o.value/v.value*re.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/v.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!i.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),y=e.ref(!1);function ne(l){y.value=l,V.value+=1}const N=e.ref(null);function se({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){N.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},$.value=n,d.value=l.id;let s="";const f=t.value.style.chart.tooltip.customFormat;r.isFunction(f)&&r.functionReturnsString(()=>f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?B.value=f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,s+=`<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&&(s+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?s+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:s+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),B.value=`<div>${s}</div>`)}const R=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/c.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:i.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>T(l),isSegregated:i.value.includes(l.id)}))),ue=e.computed(()=>({cy:"galaxy-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":""})),h=e.computed(()=>{const l=b.value.map(o=>({name:o.name,color:o.color})),a=b.value.map(o=>o.value);return{head:l,body:a}});function W(){e.nextTick(()=>{const l=h.value.head.map((n,s)=>[[n.name],[h.value.body[s]],[isNaN(h.value.body[s]/v.value)?"-":h.value.body[s]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const w=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:v.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((s,f)=>{const ie=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[f],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},ie,isNaN(h.value.body[f]/v.value)?"-":r.dataLabel({v:h.value.body[f]/v.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function H(){u.value.showTable=!u.value.showTable}function j(){u.value.showTooltip=!u.value.showTooltip}const x=e.ref(!1);function P(){x.value=!x.value}return K({getData:ae,generatePdf:q,generateCsv:W,generateImage:M,toggleTable:H,toggleTooltip:j,toggleAnnotator:P}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:C,class:e.normalizeClass(`vue-ui-galaxy ${y.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${g.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(A)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(A)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ge.PenAndPaper,{key:0,parent:C.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:x.value,onClose:P},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),le.value?(e.openBlock(),e.createElementBlock("div",we,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",xe,[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value&&(e.unref(F)||e.unref(S))?(e.openBlock(),e.createBlock(X.UserOptions,{ref_key:"details",ref:ee,key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(I),isImaging:e.unref(D),uid:g.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:u.value.showTooltip,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:x.value,onToggleFullscreen:ne,onGeneratePdf:e.unref(q),onGenerateCsv:W,onGenerateImage:e.unref(M),onToggleTable:H,onToggleTooltip:j,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(S)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:te,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${m.value.width} ${m.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ye._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:m.value.width,height:m.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Be)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${g.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,Te)],8,Se)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,Ne)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${d.value&&d.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Pe)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${g.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${d.value&&d.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Ve)],8,_e)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>se({datapoint:o,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{$.value=!1,d.value=null}),onClick:s=>U("selectDatapoint",o)},null,40,Ee)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:m.value},void 0,!0)],14,$e)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Le,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(D)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(pe.default,{key:6,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ce.Legend,{key:`legend_${O.value}`,legendSet:R.value,config:ue.value,onClickMarker:a[1]||(a[1]=({legend:o})=>T(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>T(o),style:e.normalizeStyle(`opacity:${i.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),i.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",Fe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Ae," ("+e.toDisplayString(isNaN(o.value/v.value)?"-":e.unref(r.dataLabel)({v:o.value/v.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Oe)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:R.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",ze,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ve._sfc_main,{show:u.value.showTooltip&&$.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:B.value,isFullscreen:y.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),k.value?(e.openBlock(),e.createBlock(fe.default,{key:9,hideDetails:"",config:{open:u.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_${L.value}`,colNames:w.value.colNames,head:w.value.head,body:w.value.body,config:w.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>u.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Ie)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ce))}},qe=ke._export_sfc(De,[["__scopeId","data-v-67e1681a"]]);exports.default=qe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DD4PT0Pl.cjs"),ce=require("./Legend-CEw2uq9s.cjs"),de=require("./Title-BQSh4ukk.cjs"),ve=require("./Tooltip-DtqrGu-Q.cjs"),he=require("./DataTable-CaD8j-SL.cjs"),X=require("./usePrinter-BtJq2wwh.cjs"),pe=require("./vue-ui-skeleton-Tk4j6G2D.cjs"),fe=require("./vue-ui-accordion-2He8z0Sy.cjs"),Y=require("./useNestedProp-DU7JFxpL.cjs"),ye=require("./PackageVersion-CCgJTyH9.cjs"),ge=require("./PenAndPaper-DvNBHCpq.cjs"),me=require("./useUserOptionState-BgepsfED.cjs"),be=require("./useChartAccessibility-Cm7nkzTG.cjs"),ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],we={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},xe={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},$e=["xmlns","viewBox"],Be=["width","height"],Se=["id"],Te=["stdDeviation"],Ne=["d","stroke","stroke-width"],Pe=["d","stroke","stroke-width"],_e=["filter"],Ve=["d","stroke","stroke-width"],Ee=["d","stroke-width","onMouseenter","onClick"],Le={key:5,class:"vue-data-ui-watermark"},Oe=["onClick"],Ae={key:0},Fe={key:1},ze={key:8,ref:"source",dir:"auto"},Ie=["innerHTML"],De={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(J,{expose:K,emit:Q}){const{vue_ui_galaxy:Z}=r.useConfig(),c=J,k=e.computed(()=>!!c.dataset&&c.dataset.length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):c.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})}const g=e.ref(r.createUid()),C=e.ref(null),ee=e.ref(null),$=e.ref(!1),B=e.ref(""),d=e.ref(null),V=e.ref(0),E=e.ref(0),L=e.ref(0),O=e.ref(0),t=e.computed({get:()=>z(),set:l=>l}),{userOptionsVisible:S,setUserOptionsVisibility:A,keepUserOptionState:F}=me.useUserOptionState({config:t.value}),{svgRef:te}=be.useChartAccessibility({config:t.value.style.chart.title});function z(){const l=Y.useNestedProp({userConfig:c.config,defaultConfig:Z});return l.theme?{...Y.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>c.config,l=>{t.value=z(),S.value=!t.value.userOptions.showOnChartHover,_(),E.value+=1,L.value+=1,O.value+=1,u.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,u.value.showTable=t.value.table.show,u.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:I,isImaging:D,generatePdf:q,generateImage:M}=X.usePrinter({elementId:`galaxy_${g.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),le=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),oe=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),u=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),m=e.ref({height:180,width:250}),U=Q,i=e.ref([]);function T(l){i.value.includes(l.id)?i.value=i.value.filter(a=>a!==l.id):i.value.push(l.id),U("selectLegend",b.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>c.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||oe.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,n)=>o+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function ae(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const v=e.computed(()=>p.value.filter(l=>!i.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),re=e.ref(190),G=e.computed(()=>p.value.filter(l=>!i.value.includes(l.id))),b=e.computed(()=>{const l=[];for(let a=0;a<G.value.length;a+=1){const o=G.value[a];let n=o.value/v.value*re.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/v.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!i.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),y=e.ref(!1);function ne(l){y.value=l,V.value+=1}const N=e.ref(null);function se({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){N.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},$.value=n,d.value=l.id;let s="";const f=t.value.style.chart.tooltip.customFormat;r.isFunction(f)&&r.functionReturnsString(()=>f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?B.value=f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,s+=`<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&&(s+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?s+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:s+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),B.value=`<div>${s}</div>`)}const R=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/c.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:i.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>T(l),isSegregated:i.value.includes(l.id)}))),ue=e.computed(()=>({cy:"galaxy-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":""})),h=e.computed(()=>{const l=b.value.map(o=>({name:o.name,color:o.color})),a=b.value.map(o=>o.value);return{head:l,body:a}});function W(){e.nextTick(()=>{const l=h.value.head.map((n,s)=>[[n.name],[h.value.body[s]],[isNaN(h.value.body[s]/v.value)?"-":h.value.body[s]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const w=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:v.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((s,f)=>{const ie=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[f],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},ie,isNaN(h.value.body[f]/v.value)?"-":r.dataLabel({v:h.value.body[f]/v.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function H(){u.value.showTable=!u.value.showTable}function j(){u.value.showTooltip=!u.value.showTooltip}const x=e.ref(!1);function P(){x.value=!x.value}return K({getData:ae,generatePdf:q,generateCsv:W,generateImage:M,toggleTable:H,toggleTooltip:j,toggleAnnotator:P}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:C,class:e.normalizeClass(`vue-ui-galaxy ${y.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${g.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(A)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(A)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ge.PenAndPaper,{key:0,parent:C.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:x.value,onClose:P},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),le.value?(e.openBlock(),e.createElementBlock("div",we,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",xe,[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value&&(e.unref(F)||e.unref(S))?(e.openBlock(),e.createBlock(X.UserOptions,{ref_key:"details",ref:ee,key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(I),isImaging:e.unref(D),uid:g.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:u.value.showTooltip,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:x.value,onToggleFullscreen:ne,onGeneratePdf:e.unref(q),onGenerateCsv:W,onGenerateImage:e.unref(M),onToggleTable:H,onToggleTooltip:j,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(S)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:te,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${m.value.width} ${m.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ye._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:m.value.width,height:m.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Be)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${g.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,Te)],8,Se)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,Ne)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${d.value&&d.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Pe)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${g.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${d.value&&d.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Ve)],8,_e)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>se({datapoint:o,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{$.value=!1,d.value=null}),onClick:s=>U("selectDatapoint",o)},null,40,Ee)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:m.value},void 0,!0)],14,$e)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Le,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(D)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(pe.default,{key:6,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ce.Legend,{key:`legend_${O.value}`,legendSet:R.value,config:ue.value,onClickMarker:a[1]||(a[1]=({legend:o})=>T(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>T(o),style:e.normalizeStyle(`opacity:${i.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),i.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",Fe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Ae," ("+e.toDisplayString(isNaN(o.value/v.value)?"-":e.unref(r.dataLabel)({v:o.value/v.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Oe)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:R.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",ze,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ve._sfc_main,{show:u.value.showTooltip&&$.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:B.value,isFullscreen:y.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),k.value?(e.openBlock(),e.createBlock(fe.default,{key:9,hideDetails:"",config:{open:u.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_${L.value}`,colNames:w.value.colNames,head:w.value.head,body:w.value.body,config:w.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>u.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Ie)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ce))}},qe=ke._export_sfc(De,[["__scopeId","data-v-67e1681a"]]);exports.default=qe;
@@ -1,15 +1,15 @@
1
1
  import { computed as h, onMounted as Ae, ref as u, watch as Ie, createElementBlock as n, openBlock as o, unref as i, normalizeStyle as E, normalizeClass as V, createBlock as $, createCommentVNode as c, renderSlot as v, createVNode as ie, createSlots as Ee, withCtx as d, normalizeProps as S, guardReactiveProps as N, createElementVNode as _, Fragment as ce, renderList as ve, createTextVNode as de, toDisplayString as M, nextTick as Ve } from "vue";
2
- import { u as Me, o as De, e as he, g as Be, c as pe, t as Ge, p as D, a as ze, b as Ue, J as ye, d as We, M as He, f as k, X as Re, i as fe, x as ge, q as Xe, r as je, y as Ye } from "./index-9EeNZMz1.js";
3
- import { L as qe } from "./Legend-NKGwxkI7.js";
4
- import { _ as Je } from "./Title-BI8etrRU.js";
5
- import { _ as Ke } from "./Tooltip-Cxc8c50d.js";
6
- import { D as Qe } from "./DataTable-TjJIVFlL.js";
7
- import { u as Ze, U as et } from "./usePrinter-ngrh00Ym.js";
8
- import tt from "./vue-ui-skeleton-BmJiYGtE.js";
9
- import lt from "./vue-ui-accordion-Qo8JxnIN.js";
10
- import { u as be } from "./useNestedProp-df_bKQEI.js";
11
- import { _ as at } from "./PackageVersion-QRvxRYPv.js";
12
- import { P as ot } from "./PenAndPaper-CxC1lWGK.js";
2
+ import { u as Me, o as De, e as he, g as Be, c as pe, t as Ge, p as D, a as ze, b as Ue, J as ye, d as We, M as He, f as k, X as Re, i as fe, x as ge, q as Xe, r as je, y as Ye } from "./index-CZlI7PiS.js";
3
+ import { L as qe } from "./Legend-Oaw0MY8Y.js";
4
+ import { _ as Je } from "./Title-DePxeqVl.js";
5
+ import { _ as Ke } from "./Tooltip-DRw9RoFp.js";
6
+ import { D as Qe } from "./DataTable-D0-zzsJg.js";
7
+ import { u as Ze, U as et } from "./usePrinter-D-sSdR2l.js";
8
+ import tt from "./vue-ui-skeleton-D8r-yAkW.js";
9
+ import lt from "./vue-ui-accordion-DVtmOO3I.js";
10
+ import { u as be } from "./useNestedProp-Cg0NIwr6.js";
11
+ import { _ as at } from "./PackageVersion-J_USnljf.js";
12
+ import { P as ot } from "./PenAndPaper-CoEXEMcN.js";
13
13
  import { u as st } from "./useUserOptionState-BIvW1Kz7.js";
14
14
  import { u as rt } from "./useChartAccessibility-BWojgys7.js";
15
15
  import { _ as ut } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DEnRHTzk.cjs"),W=require("./useResponsive-YQYQrAZ_.cjs"),H=require("./usePrinter-dyVny55M.cjs"),he=require("./vue-ui-skeleton-_DN0U6W6.cjs"),me=require("./Title-Dk92HYMu.cjs"),Z=require("./useNestedProp-BNT60LxO.cjs"),fe=require("./PackageVersion-DJKkRuOD.cjs"),ye=require("./PenAndPaper-MTTJ3Gd9.cjs"),pe=require("./useUserOptionState-BgepsfED.cjs"),ke=require("./useChartAccessibility-Cm7nkzTG.cjs"),ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],Be={key:0},_e=["xmlns","viewBox"],Se=["width","height"],xe=["id"],Ce=["stop-color"],we=["stop-color"],Ne=["stop-color"],Fe=["id"],Ee=["stdDeviation"],ze={key:1},$e=["d","fill","stroke"],Pe=["d","fill","stroke"],Oe=["d","fill"],Me=["id","d"],Ve=["fill","font-size","font-weight"],Xe=["href","startOffset"],Ae=["x","y","text-anchor","fill","font-size","font-weight"],Ie=["d","filter"],Ye=["stroke","stroke-width"],Re=["stroke","stroke-width"],Le=["stroke","stroke-width"],De=["stroke","stroke-width"],qe={key:8},Ge=["x","y","text-anchor","font-size","font-weight","fill"],je=["x","y","font-size","font-weight","fill"],Te={key:0},Ue=["x1","y1","x2","y2","stroke","stroke-width"],We=["x1","y1","x2","y2","stroke","stroke-width"],He=["x1","y1","x2","y2","stroke-width","filter"],Ze={key:1},Je=["d","fill","stroke","stroke-width"],Ke=["cx","cy","fill","r","stroke-width","stroke"],Qe=["x","y","font-size","fill"],et={key:5,class:"vue-data-ui-watermark"},tt={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(w,{expose:J}){const{vue_ui_gauge:K}=s.useConfig(),c=w,S=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length>0&&c.dataset.series&&c.dataset.series.length),m=e.ref(s.createUid()),Q=e.ref(null),z=e.ref(0),B=e.ref(null),$=e.ref(null),P=e.ref(null),O=e.ref(null),M=e.ref(null),V=e.ref(0),t=e.computed({get:()=>I(),set:a=>a}),{userOptionsVisible:N,setUserOptionsVisibility:X,keepUserOptionState:A}=pe.useUserOptionState({config:t.value}),{svgRef:ee}=ke.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>c.config,a=>{t.value=I(),N.value=!t.value.userOptions.showOnChartHover,G(),V.value+=1},{deep:!0});function I(){const a=Z.useNestedProp({userConfig:c.config,defaultConfig:K});return a.theme?{...Z.useNestedProp({userConfig:s.themes.vue_ui_gauge[a.theme]||c.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}const{isPrinting:Y,isImaging:R,generatePdf:L,generateImage:D}=H.usePrinter({elementId:`vue-ui-gauge_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge"}),te=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ae=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),k=e.computed(()=>{if(!S.value||s.objectIsEmpty(c.dataset.series||{}))return{value:0,series:[{from:0,to:0}]};const a=[];(c.dataset.series||[]).forEach(l=>{a.push(l.from||1e-7),a.push(l.to||1e-7)});const n=Math.max(...a);return{...c.dataset,series:(c.dataset.series||[]).map((l,o)=>({...l,color:s.convertColorToHex(l.color)||ae.value[o]||s.palette[o],value:((l.to||0)-(l.from||0))/n*100}))}}),h=e.ref(512),r=e.ref({height:358.4,width:h.value,top:0,bottom:358.4,centerX:179.2,centerY:h.value/2,labelFontSize:18,legendFontSize:t.value.style.chart.legend.fontSize,pointerRadius:t.value.style.chart.layout.pointer.circle.radius,trackSize:t.value.style.chart.layout.track.size,pointerSize:t.value.style.chart.layout.pointer.size,pointerStrokeWidth:t.value.style.chart.layout.pointer.strokeWidth,markerOffset:t.value.style.chart.layout.markers.offsetY+3,segmentFontSize:t.value.style.chart.layout.segmentNames.fontSize}),b=e.ref(0),p=e.ref(0),d=e.ref(t.value.style.chart.animation.use?Math.min(...c.dataset.series.map(a=>a.from)):c.dataset.value);e.watch(()=>c.dataset.value,()=>{j(c.dataset.value)});const u=e.computed(()=>{const a=r.value.width/2,n=i.value.base,l=Math.PI*((d.value+0-p.value)/(b.value-p.value))+Math.PI;return{x1:a,y1:n,x2:a+i.value.pointerSize*r.value.pointerSize*.9*Math.cos(l),y2:n+i.value.pointerSize*r.value.pointerSize*.9*Math.sin(l)}}),q=e.computed(()=>{const a=r.value.width/2,n=i.value.base,l=Math.PI*((d.value+0-p.value)/(b.value-p.value))+Math.PI,o=a+i.value.pointerSize*r.value.pointerSize*.9*Math.cos(l),f=n+i.value.pointerSize*r.value.pointerSize*.9*Math.sin(l),y=r.value.pointerRadius,ie=a+y*Math.cos(l+Math.PI/2),ce=n+y*Math.sin(l+Math.PI/2),ve=a+y*Math.cos(l-Math.PI/2),de=n+y*Math.sin(l-Math.PI/2);return isNaN(o)?null:`M ${o},${f} ${ie},${ce} ${ve},${de} Z`}),F=e.computed(()=>{for(let a=0;a<k.value.series.length;a+=1){const{color:n,from:l,to:o}=k.value.series[a];if(d.value>=l&&d.value<=o)return n}return"#2D353C"}),x=e.ref(null);function G(){if(s.objectIsEmpty(c.dataset)?s.error({componentName:"VueUiGauge",type:"dataset"}):(s.getMissingDatasetAttributes({datasetObject:c.dataset,requiredAttributes:["value","series"]}).forEach(a=>{s.error({componentName:"VueUiGauge",type:"datasetAttribute",property:a})}),Object.hasOwn(c.dataset,"series")&&(c.dataset.series.length?c.dataset.series.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["from","to"]}).forEach(l=>{s.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:l,index:n})})}):s.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),j(c.dataset.value||0),t.value.responsive){const a=W.throttle(()=>{const{width:n,height:l}=W.useResponsive({chart:B.value,title:t.value.style.chart.title.text?$.value:null,legend:P.value,source:O.value,noTitle:M.value});requestAnimationFrame(()=>{r.value.width=n,r.value.height=l,r.value.centerX=n/2,r.value.centerY=h.value/2/358.4*l,r.value.bottom=l,r.value.labelFontSize=18/h.value*Math.min(l,n)<10?10:18/h.value*Math.min(l,n),r.value.legendFontSize=t.value.style.chart.legend.fontSize/h.value*Math.min(l,n)<14?14:t.value.style.chart.legend.fontSize/h.value*Math.min(l,n),r.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/h.value*Math.min(l,n),r.value.trackSize=t.value.style.chart.layout.track.size/h.value*Math.min(l,n),r.value.pointerStrokeWidth=s.translateSize({relator:Math.min(n,l),adjuster:h.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),r.value.markerOffset=s.translateSize({relator:Math.max(n,l),adjuster:h.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2}),r.value.segmentFontSize=s.translateSize({relator:Math.min(n,l),adjuster:h.value,source:t.value.style.chart.layout.segmentNames.fontSize,threshold:8,fallback:8})})});x.value=new ResizeObserver(a),x.value.observe(B.value.parentNode)}}e.onMounted(()=>{G()}),e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});function j(a){const n=[];(k.value.series||[]).forEach(y=>{n.push(y.from||0),n.push(y.to||0)}),b.value=Math.max(...n),p.value=Math.min(...n);let l=t.value.style.chart.animation.speed;const o=Math.abs(a-d.value)/(l*60);function f(){d.value<a?d.value=Math.min(d.value+o,a):d.value>a&&(d.value=Math.max(d.value-o,a)),d.value!==a&&requestAnimationFrame(f)}f()}const i=e.computed(()=>{const a=t.value.responsive?Math.min(r.value.width,r.value.height):r.value.width,n=2.5/t.value.style.chart.layout.radiusRatio;return{arcs:a/n,gradients:a/(n*1.1),base:t.value.responsive?r.value.height/2:r.value.height*.7,ratingBase:t.value.responsive?r.value.height/2+r.value.height/4:r.value.height*.9,pointerSize:t.value.responsive?Math.min(r.value.width,r.value.height)/3:r.value.width/3.2}}),v=e.computed(()=>s.makeDonut({series:k.value.series},r.value.width/2,i.value.base,i.value.arcs,i.value.arcs,1,1,1,180,109.9495,40*r.value.trackSize)),le=e.computed(()=>s.makeDonut({series:k.value.series},r.value.width/2,i.value.base,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,1,1,1,180,109.9495,40*r.value.trackSize)),g=e.computed(()=>v.value.map(a=>i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio*(a.nameOffsetRatio||1))),T=e.computed(()=>{const{x:a,y:n}=s.offsetFromCenterPoint({initX:v.value[0].firstSeparator.x,initY:v.value[0].firstSeparator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:l,y:o}=s.offsetFromCenterPoint({initX:v.value[0].startX,initY:v.value[0].startY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:a,y1:n,x2:l,y2:o}}),U=e.computed(()=>v.value.map(a=>{const{x:n,y:l}=s.offsetFromCenterPoint({initX:a.separator.x,initY:a.separator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:o,y:f}=s.offsetFromCenterPoint({initX:a.endX,initY:a.endY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:n,y1:l,x2:o,y2:f}}));function re(a){if(a.reduce((f,y)=>f+y,0)>100)throw new Error("Total % must not exceed 100");const l=50;let o=0;return a.map(f=>(o+=f,`${o/100*l-f/4}%`))}const oe=e.computed(()=>re(v.value.map(a=>a.proportion*100))),ne=e.computed(()=>s.makeDonut({series:k.value.series},r.value.width/2,i.value.base,i.value.gradients,i.value.gradients,.95,1,1,180,110.02,2*r.value.trackSize)),se=e.computed(()=>{const a=p.value>=0?-p.value:Math.abs(p.value);return s.createHalfCircleArc({radius:t.value.style.chart.layout.indicatorArc.radius*r.value.trackSize,centerX:r.value.width/2,centerY:i.value.base,percentage:(d.value+a)/(b.value+a)})}),_=e.ref(!1);function ue(a){_.value=a,z.value+=1}const C=e.ref(!1);function E(){C.value=!C.value}return J({generatePdf:L,generateImage:D,toggleAnnotator:E}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${_.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:B,id:`vue-ui-gauge_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:n[0]||(n[0]=()=>e.unref(X)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ye.PenAndPaper,{key:0,parent:B.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:E},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),te.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:M,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:$,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(me._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"gauge-div-title",...t.value.style.chart.title},subtitle:{cy:"gauge-div-subtitle",...t.value.style.chart.title.subtitle}}},{default:e.withCtx(()=>[t.value.translations.base&&w.dataset.base?(e.openBlock(),e.createElementBlock("span",Be,e.toDisplayString(t.value.translations.base)+": "+e.toDisplayString(w.dataset.base),1)):e.createCommentVNode("",!0)]),_:1},8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&S.value&&(e.unref(A)||e.unref(N))?(e.openBlock(),e.createBlock(H.UserOptions,{ref_key:"details",ref:Q,key:`user_options_${z.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(R),isPrinting:e.unref(Y),uid:m.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:B.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(L),onGenerateImage:e.unref(D),onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(A)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"2"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),S.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:ee,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:hidden !important;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(fe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:r.value.width<=0?10:r.value.width,height:r.value.height<=0?10:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Se)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`gradient_${m.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(s.setOpacity)("#FFFFFF",1)},null,8,Ce),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(s.setOpacity)("#FFFFFF",t.value.style.chart.layout.track.gradientIntensity)},null,8,we),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)("#FFFFFF",1)},null,8,Ne)],8,xe)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.track.gradientIntensity},null,8,Ee)],8,Fe)]),a.$slots.pattern?(e.openBlock(),e.createElementBlock("g",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(a.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:o,patternId:`pattern_${m.value}_${o}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${o}`,d:l.arcSlice,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,$e))),128)),a.$slots.pattern?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${o}`,d:l.arcSlice,fill:`url(#pattern_${m.value}_${o})`,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,Pe))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.indicatorArc.show?(e.openBlock(),e.createElementBlock("path",{key:3,d:se.value,fill:t.value.style.chart.layout.indicatorArc.fill},null,8,Oe)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentNames.show&&t.value.style.chart.layout.segmentNames.curved?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{id:`curve_${m.value}_${o}`,d:`M ${u.value.x1},${u.value.y1} m -${g.value[o]},0 a ${g.value[o]},${g.value[o]} 0 1,1 ${2*g.value[o]},0 a ${g.value[o]},${g.value[o]} 0 1,1 -${2*g.value[o]},0`,fill:"transparent"},null,8,Me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{fill:t.value.style.chart.layout.segmentNames.useSerieColor?l.color:t.value.style.chart.layout.segmentNames.color,"font-size":r.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal","text-anchor":"middle"},[e.createElementVNode("textPath",{href:`#curve_${m.value}_${o}`,startOffset:oe.value[o]},e.toDisplayString(l.name||""),9,Xe)],8,Ve))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentNames.show&&!t.value.style.chart.layout.segmentNames.curved?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:5},e.renderList(le.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:l.center.endX,y:l.center.endY,"text-anchor":e.unref(s.calcMarkerOffsetX)(l,!1,12).anchor,fill:t.value.style.chart.layout.segmentNames.useSerieColor?l.color:t.value.style.chart.layout.segmentNames.color,"font-size":r.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal"},e.toDisplayString(l.name||""),9,Ae))),256)):e.createCommentVNode("",!0),t.value.style.chart.layout.track.useGradient?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:6},e.renderList(ne.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${o}`,d:l.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${m.value})`},null,8,Ie))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentSeparators.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[e.createElementVNode("line",e.mergeProps(T.value,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Ye),e.createElementVNode("line",e.mergeProps(T.value,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,Re),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,l=>(e.openBlock(),e.createElementBlock("line",e.mergeProps({ref_for:!0},l,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Le))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,l=>(e.openBlock(),e.createElementBlock("line",e.mergeProps({ref_for:!0},l,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,De))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(s.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:l.center.startX,initY:l.center.startY,offset:r.value.markerOffset}).x,y:e.unref(s.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:l.center.startX,initY:l.center.startY,offset:r.value.markerOffset}).y,"text-anchor":l.center.startX<u.value.x1-5?"end":l.center.startX>u.value.x1+5?"start":"middle","font-size":r.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.markers.formatter,l.from,e.unref(s.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:l.from,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,Ge))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("text",{key:9,x:e.unref(s.offsetFromCenterPoint)({centerX:r.value.width/2,centerY:i.value.base,initX:v.value.at(-1).endX,initY:v.value.at(-1).endY,offset:r.value.markerOffset}).x,y:e.unref(s.offsetFromCenterPoint)({centerX:r.value.width/2,centerY:i.value.base,initX:v.value.at(-1).endX,initY:v.value.at(-1).endY,offset:r.value.markerOffset}).y,"text-anchor":"start","font-size":r.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.markers.formatter,b.value,e.unref(s.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:b.value,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,je)):e.createCommentVNode("",!0),t.value.style.chart.layout.pointer.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",Te,[isNaN(u.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":r.value.pointerStrokeWidth,"stroke-linecap":"round"},null,8,Ue)),isNaN(u.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:1,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":r.value.pointerStrokeWidth*.7},null,8,We)),!isNaN(u.value.x2)&&t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock("line",{key:2,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:"white","stroke-linecap":"round","stroke-width":r.value.pointerStrokeWidth*.3,filter:`url(#blur_${m.value})`},null,8,He)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",Ze,[q.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:q.value,fill:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,"stroke-linejoin":"round"},null,8,Je)):e.createCommentVNode("",!0)])),e.createElementVNode("circle",{cx:r.value.width/2,cy:i.value.base,fill:t.value.style.chart.layout.pointer.circle.color,r:r.value.pointerRadius<=0?1e-4:r.value.pointerRadius,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,stroke:t.value.style.chart.layout.pointer.circle.stroke},null,8,Ke)],64)):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("text",{key:11,x:r.value.width/2,y:i.value.ratingBase,"text-anchor":"middle","font-size":r.value.legendFontSize,"font-weight":"bold",fill:t.value.style.chart.legend.useRatingColor?F.value:t.value.style.chart.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.legend.formatter,d.value,e.unref(s.dataLabel)({p:t.value.style.chart.legend.prefix+(t.value.style.chart.legend.showPlusSymbol&&d.value>0?"+":""),v:d.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}))),9,Qe)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:r.value},void 0,!0)],14,_e)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",et,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(he.default,{key:6,config:{type:"gauge",style:{backgroundColor:t.value.style.chart.backgroundColor,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:P},[e.renderSlot(a.$slots,"legend",{legend:k.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:O,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],46,be))}},at=ge._export_sfc(tt,[["__scopeId","data-v-b25b19d0"]]);exports.default=at;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DD4PT0Pl.cjs"),W=require("./useResponsive-YQYQrAZ_.cjs"),H=require("./usePrinter-BtJq2wwh.cjs"),he=require("./vue-ui-skeleton-Tk4j6G2D.cjs"),me=require("./Title-BQSh4ukk.cjs"),Z=require("./useNestedProp-DU7JFxpL.cjs"),fe=require("./PackageVersion-CCgJTyH9.cjs"),ye=require("./PenAndPaper-DvNBHCpq.cjs"),pe=require("./useUserOptionState-BgepsfED.cjs"),ke=require("./useChartAccessibility-Cm7nkzTG.cjs"),ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],Be={key:0},_e=["xmlns","viewBox"],Se=["width","height"],xe=["id"],Ce=["stop-color"],we=["stop-color"],Ne=["stop-color"],Fe=["id"],Ee=["stdDeviation"],ze={key:1},$e=["d","fill","stroke"],Pe=["d","fill","stroke"],Oe=["d","fill"],Me=["id","d"],Ve=["fill","font-size","font-weight"],Xe=["href","startOffset"],Ae=["x","y","text-anchor","fill","font-size","font-weight"],Ie=["d","filter"],Ye=["stroke","stroke-width"],Re=["stroke","stroke-width"],Le=["stroke","stroke-width"],De=["stroke","stroke-width"],qe={key:8},Ge=["x","y","text-anchor","font-size","font-weight","fill"],je=["x","y","font-size","font-weight","fill"],Te={key:0},Ue=["x1","y1","x2","y2","stroke","stroke-width"],We=["x1","y1","x2","y2","stroke","stroke-width"],He=["x1","y1","x2","y2","stroke-width","filter"],Ze={key:1},Je=["d","fill","stroke","stroke-width"],Ke=["cx","cy","fill","r","stroke-width","stroke"],Qe=["x","y","font-size","fill"],et={key:5,class:"vue-data-ui-watermark"},tt={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(w,{expose:J}){const{vue_ui_gauge:K}=s.useConfig(),c=w,S=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length>0&&c.dataset.series&&c.dataset.series.length),m=e.ref(s.createUid()),Q=e.ref(null),z=e.ref(0),B=e.ref(null),$=e.ref(null),P=e.ref(null),O=e.ref(null),M=e.ref(null),V=e.ref(0),t=e.computed({get:()=>I(),set:a=>a}),{userOptionsVisible:N,setUserOptionsVisibility:X,keepUserOptionState:A}=pe.useUserOptionState({config:t.value}),{svgRef:ee}=ke.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>c.config,a=>{t.value=I(),N.value=!t.value.userOptions.showOnChartHover,G(),V.value+=1},{deep:!0});function I(){const a=Z.useNestedProp({userConfig:c.config,defaultConfig:K});return a.theme?{...Z.useNestedProp({userConfig:s.themes.vue_ui_gauge[a.theme]||c.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}const{isPrinting:Y,isImaging:R,generatePdf:L,generateImage:D}=H.usePrinter({elementId:`vue-ui-gauge_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge"}),te=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ae=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),k=e.computed(()=>{if(!S.value||s.objectIsEmpty(c.dataset.series||{}))return{value:0,series:[{from:0,to:0}]};const a=[];(c.dataset.series||[]).forEach(l=>{a.push(l.from||1e-7),a.push(l.to||1e-7)});const n=Math.max(...a);return{...c.dataset,series:(c.dataset.series||[]).map((l,o)=>({...l,color:s.convertColorToHex(l.color)||ae.value[o]||s.palette[o],value:((l.to||0)-(l.from||0))/n*100}))}}),h=e.ref(512),r=e.ref({height:358.4,width:h.value,top:0,bottom:358.4,centerX:179.2,centerY:h.value/2,labelFontSize:18,legendFontSize:t.value.style.chart.legend.fontSize,pointerRadius:t.value.style.chart.layout.pointer.circle.radius,trackSize:t.value.style.chart.layout.track.size,pointerSize:t.value.style.chart.layout.pointer.size,pointerStrokeWidth:t.value.style.chart.layout.pointer.strokeWidth,markerOffset:t.value.style.chart.layout.markers.offsetY+3,segmentFontSize:t.value.style.chart.layout.segmentNames.fontSize}),b=e.ref(0),p=e.ref(0),d=e.ref(t.value.style.chart.animation.use?Math.min(...c.dataset.series.map(a=>a.from)):c.dataset.value);e.watch(()=>c.dataset.value,()=>{j(c.dataset.value)});const u=e.computed(()=>{const a=r.value.width/2,n=i.value.base,l=Math.PI*((d.value+0-p.value)/(b.value-p.value))+Math.PI;return{x1:a,y1:n,x2:a+i.value.pointerSize*r.value.pointerSize*.9*Math.cos(l),y2:n+i.value.pointerSize*r.value.pointerSize*.9*Math.sin(l)}}),q=e.computed(()=>{const a=r.value.width/2,n=i.value.base,l=Math.PI*((d.value+0-p.value)/(b.value-p.value))+Math.PI,o=a+i.value.pointerSize*r.value.pointerSize*.9*Math.cos(l),f=n+i.value.pointerSize*r.value.pointerSize*.9*Math.sin(l),y=r.value.pointerRadius,ie=a+y*Math.cos(l+Math.PI/2),ce=n+y*Math.sin(l+Math.PI/2),ve=a+y*Math.cos(l-Math.PI/2),de=n+y*Math.sin(l-Math.PI/2);return isNaN(o)?null:`M ${o},${f} ${ie},${ce} ${ve},${de} Z`}),F=e.computed(()=>{for(let a=0;a<k.value.series.length;a+=1){const{color:n,from:l,to:o}=k.value.series[a];if(d.value>=l&&d.value<=o)return n}return"#2D353C"}),x=e.ref(null);function G(){if(s.objectIsEmpty(c.dataset)?s.error({componentName:"VueUiGauge",type:"dataset"}):(s.getMissingDatasetAttributes({datasetObject:c.dataset,requiredAttributes:["value","series"]}).forEach(a=>{s.error({componentName:"VueUiGauge",type:"datasetAttribute",property:a})}),Object.hasOwn(c.dataset,"series")&&(c.dataset.series.length?c.dataset.series.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["from","to"]}).forEach(l=>{s.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:l,index:n})})}):s.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),j(c.dataset.value||0),t.value.responsive){const a=W.throttle(()=>{const{width:n,height:l}=W.useResponsive({chart:B.value,title:t.value.style.chart.title.text?$.value:null,legend:P.value,source:O.value,noTitle:M.value});requestAnimationFrame(()=>{r.value.width=n,r.value.height=l,r.value.centerX=n/2,r.value.centerY=h.value/2/358.4*l,r.value.bottom=l,r.value.labelFontSize=18/h.value*Math.min(l,n)<10?10:18/h.value*Math.min(l,n),r.value.legendFontSize=t.value.style.chart.legend.fontSize/h.value*Math.min(l,n)<14?14:t.value.style.chart.legend.fontSize/h.value*Math.min(l,n),r.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/h.value*Math.min(l,n),r.value.trackSize=t.value.style.chart.layout.track.size/h.value*Math.min(l,n),r.value.pointerStrokeWidth=s.translateSize({relator:Math.min(n,l),adjuster:h.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),r.value.markerOffset=s.translateSize({relator:Math.max(n,l),adjuster:h.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2}),r.value.segmentFontSize=s.translateSize({relator:Math.min(n,l),adjuster:h.value,source:t.value.style.chart.layout.segmentNames.fontSize,threshold:8,fallback:8})})});x.value=new ResizeObserver(a),x.value.observe(B.value.parentNode)}}e.onMounted(()=>{G()}),e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});function j(a){const n=[];(k.value.series||[]).forEach(y=>{n.push(y.from||0),n.push(y.to||0)}),b.value=Math.max(...n),p.value=Math.min(...n);let l=t.value.style.chart.animation.speed;const o=Math.abs(a-d.value)/(l*60);function f(){d.value<a?d.value=Math.min(d.value+o,a):d.value>a&&(d.value=Math.max(d.value-o,a)),d.value!==a&&requestAnimationFrame(f)}f()}const i=e.computed(()=>{const a=t.value.responsive?Math.min(r.value.width,r.value.height):r.value.width,n=2.5/t.value.style.chart.layout.radiusRatio;return{arcs:a/n,gradients:a/(n*1.1),base:t.value.responsive?r.value.height/2:r.value.height*.7,ratingBase:t.value.responsive?r.value.height/2+r.value.height/4:r.value.height*.9,pointerSize:t.value.responsive?Math.min(r.value.width,r.value.height)/3:r.value.width/3.2}}),v=e.computed(()=>s.makeDonut({series:k.value.series},r.value.width/2,i.value.base,i.value.arcs,i.value.arcs,1,1,1,180,109.9495,40*r.value.trackSize)),le=e.computed(()=>s.makeDonut({series:k.value.series},r.value.width/2,i.value.base,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,1,1,1,180,109.9495,40*r.value.trackSize)),g=e.computed(()=>v.value.map(a=>i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio*(a.nameOffsetRatio||1))),T=e.computed(()=>{const{x:a,y:n}=s.offsetFromCenterPoint({initX:v.value[0].firstSeparator.x,initY:v.value[0].firstSeparator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:l,y:o}=s.offsetFromCenterPoint({initX:v.value[0].startX,initY:v.value[0].startY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:a,y1:n,x2:l,y2:o}}),U=e.computed(()=>v.value.map(a=>{const{x:n,y:l}=s.offsetFromCenterPoint({initX:a.separator.x,initY:a.separator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:o,y:f}=s.offsetFromCenterPoint({initX:a.endX,initY:a.endY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:n,y1:l,x2:o,y2:f}}));function re(a){if(a.reduce((f,y)=>f+y,0)>100)throw new Error("Total % must not exceed 100");const l=50;let o=0;return a.map(f=>(o+=f,`${o/100*l-f/4}%`))}const oe=e.computed(()=>re(v.value.map(a=>a.proportion*100))),ne=e.computed(()=>s.makeDonut({series:k.value.series},r.value.width/2,i.value.base,i.value.gradients,i.value.gradients,.95,1,1,180,110.02,2*r.value.trackSize)),se=e.computed(()=>{const a=p.value>=0?-p.value:Math.abs(p.value);return s.createHalfCircleArc({radius:t.value.style.chart.layout.indicatorArc.radius*r.value.trackSize,centerX:r.value.width/2,centerY:i.value.base,percentage:(d.value+a)/(b.value+a)})}),_=e.ref(!1);function ue(a){_.value=a,z.value+=1}const C=e.ref(!1);function E(){C.value=!C.value}return J({generatePdf:L,generateImage:D,toggleAnnotator:E}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${_.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:B,id:`vue-ui-gauge_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:n[0]||(n[0]=()=>e.unref(X)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ye.PenAndPaper,{key:0,parent:B.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:E},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),te.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:M,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:$,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(me._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"gauge-div-title",...t.value.style.chart.title},subtitle:{cy:"gauge-div-subtitle",...t.value.style.chart.title.subtitle}}},{default:e.withCtx(()=>[t.value.translations.base&&w.dataset.base?(e.openBlock(),e.createElementBlock("span",Be,e.toDisplayString(t.value.translations.base)+": "+e.toDisplayString(w.dataset.base),1)):e.createCommentVNode("",!0)]),_:1},8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&S.value&&(e.unref(A)||e.unref(N))?(e.openBlock(),e.createBlock(H.UserOptions,{ref_key:"details",ref:Q,key:`user_options_${z.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(R),isPrinting:e.unref(Y),uid:m.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:B.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(L),onGenerateImage:e.unref(D),onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(A)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"2"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),S.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:ee,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:hidden !important;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(fe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:r.value.width<=0?10:r.value.width,height:r.value.height<=0?10:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Se)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`gradient_${m.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(s.setOpacity)("#FFFFFF",1)},null,8,Ce),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(s.setOpacity)("#FFFFFF",t.value.style.chart.layout.track.gradientIntensity)},null,8,we),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)("#FFFFFF",1)},null,8,Ne)],8,xe)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.track.gradientIntensity},null,8,Ee)],8,Fe)]),a.$slots.pattern?(e.openBlock(),e.createElementBlock("g",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(a.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:o,patternId:`pattern_${m.value}_${o}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${o}`,d:l.arcSlice,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,$e))),128)),a.$slots.pattern?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${o}`,d:l.arcSlice,fill:`url(#pattern_${m.value}_${o})`,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,Pe))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.indicatorArc.show?(e.openBlock(),e.createElementBlock("path",{key:3,d:se.value,fill:t.value.style.chart.layout.indicatorArc.fill},null,8,Oe)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentNames.show&&t.value.style.chart.layout.segmentNames.curved?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{id:`curve_${m.value}_${o}`,d:`M ${u.value.x1},${u.value.y1} m -${g.value[o]},0 a ${g.value[o]},${g.value[o]} 0 1,1 ${2*g.value[o]},0 a ${g.value[o]},${g.value[o]} 0 1,1 -${2*g.value[o]},0`,fill:"transparent"},null,8,Me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{fill:t.value.style.chart.layout.segmentNames.useSerieColor?l.color:t.value.style.chart.layout.segmentNames.color,"font-size":r.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal","text-anchor":"middle"},[e.createElementVNode("textPath",{href:`#curve_${m.value}_${o}`,startOffset:oe.value[o]},e.toDisplayString(l.name||""),9,Xe)],8,Ve))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentNames.show&&!t.value.style.chart.layout.segmentNames.curved?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:5},e.renderList(le.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:l.center.endX,y:l.center.endY,"text-anchor":e.unref(s.calcMarkerOffsetX)(l,!1,12).anchor,fill:t.value.style.chart.layout.segmentNames.useSerieColor?l.color:t.value.style.chart.layout.segmentNames.color,"font-size":r.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal"},e.toDisplayString(l.name||""),9,Ae))),256)):e.createCommentVNode("",!0),t.value.style.chart.layout.track.useGradient?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:6},e.renderList(ne.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${o}`,d:l.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${m.value})`},null,8,Ie))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentSeparators.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[e.createElementVNode("line",e.mergeProps(T.value,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Ye),e.createElementVNode("line",e.mergeProps(T.value,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,Re),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,l=>(e.openBlock(),e.createElementBlock("line",e.mergeProps({ref_for:!0},l,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Le))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,l=>(e.openBlock(),e.createElementBlock("line",e.mergeProps({ref_for:!0},l,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,De))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(s.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:l.center.startX,initY:l.center.startY,offset:r.value.markerOffset}).x,y:e.unref(s.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:l.center.startX,initY:l.center.startY,offset:r.value.markerOffset}).y,"text-anchor":l.center.startX<u.value.x1-5?"end":l.center.startX>u.value.x1+5?"start":"middle","font-size":r.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.markers.formatter,l.from,e.unref(s.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:l.from,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,Ge))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("text",{key:9,x:e.unref(s.offsetFromCenterPoint)({centerX:r.value.width/2,centerY:i.value.base,initX:v.value.at(-1).endX,initY:v.value.at(-1).endY,offset:r.value.markerOffset}).x,y:e.unref(s.offsetFromCenterPoint)({centerX:r.value.width/2,centerY:i.value.base,initX:v.value.at(-1).endX,initY:v.value.at(-1).endY,offset:r.value.markerOffset}).y,"text-anchor":"start","font-size":r.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.markers.formatter,b.value,e.unref(s.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:b.value,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,je)):e.createCommentVNode("",!0),t.value.style.chart.layout.pointer.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",Te,[isNaN(u.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":r.value.pointerStrokeWidth,"stroke-linecap":"round"},null,8,Ue)),isNaN(u.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:1,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":r.value.pointerStrokeWidth*.7},null,8,We)),!isNaN(u.value.x2)&&t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock("line",{key:2,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:"white","stroke-linecap":"round","stroke-width":r.value.pointerStrokeWidth*.3,filter:`url(#blur_${m.value})`},null,8,He)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",Ze,[q.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:q.value,fill:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,"stroke-linejoin":"round"},null,8,Je)):e.createCommentVNode("",!0)])),e.createElementVNode("circle",{cx:r.value.width/2,cy:i.value.base,fill:t.value.style.chart.layout.pointer.circle.color,r:r.value.pointerRadius<=0?1e-4:r.value.pointerRadius,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,stroke:t.value.style.chart.layout.pointer.circle.stroke},null,8,Ke)],64)):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("text",{key:11,x:r.value.width/2,y:i.value.ratingBase,"text-anchor":"middle","font-size":r.value.legendFontSize,"font-weight":"bold",fill:t.value.style.chart.legend.useRatingColor?F.value:t.value.style.chart.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.legend.formatter,d.value,e.unref(s.dataLabel)({p:t.value.style.chart.legend.prefix+(t.value.style.chart.legend.showPlusSymbol&&d.value>0?"+":""),v:d.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}))),9,Qe)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:r.value},void 0,!0)],14,_e)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",et,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(he.default,{key:6,config:{type:"gauge",style:{backgroundColor:t.value.style.chart.backgroundColor,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:P},[e.renderSlot(a.$slots,"legend",{legend:k.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:O,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],46,be))}},at=ge._export_sfc(tt,[["__scopeId","data-v-b25b19d0"]]);exports.default=at;
@@ -1,12 +1,12 @@
1
1
  import { computed as y, ref as f, watch as me, onMounted as Ge, onBeforeUnmount as Ee, createElementBlock as u, openBlock as r, unref as i, normalizeStyle as L, normalizeClass as pe, createBlock as G, createCommentVNode as c, createElementVNode as p, withCtx as X, toDisplayString as O, createSlots as Ue, renderSlot as w, normalizeProps as D, guardReactiveProps as B, createVNode as We, Fragment as g, renderList as S, mergeProps as I } from "vue";
2
- import { u as je, c as Te, t as Le, p as ge, a as De, b as Be, o as ke, d as Ve, e as E, g as be, m as V, I as z, N as qe, X as He, s as q, n as Ze, i as H, f as Z, F as J } from "./index-9EeNZMz1.js";
2
+ import { u as je, c as Te, t as Le, p as ge, a as De, b as Be, o as ke, d as Ve, e as E, g as be, m as V, I as z, N as qe, X as He, s as q, n as Ze, i as H, f as Z, F as J } from "./index-CZlI7PiS.js";
3
3
  import { t as Je, u as Ke } from "./useResponsive-BWapHhVH.js";
4
- import { u as Qe, U as et } from "./usePrinter-ngrh00Ym.js";
5
- import tt from "./vue-ui-skeleton-BmJiYGtE.js";
6
- import { _ as at } from "./Title-BI8etrRU.js";
7
- import { u as _e } from "./useNestedProp-df_bKQEI.js";
8
- import { _ as lt } from "./PackageVersion-QRvxRYPv.js";
9
- import { P as rt } from "./PenAndPaper-CxC1lWGK.js";
4
+ import { u as Qe, U as et } from "./usePrinter-D-sSdR2l.js";
5
+ import tt from "./vue-ui-skeleton-D8r-yAkW.js";
6
+ import { _ as at } from "./Title-DePxeqVl.js";
7
+ import { u as _e } from "./useNestedProp-Cg0NIwr6.js";
8
+ import { _ as lt } from "./PackageVersion-J_USnljf.js";
9
+ import { P as rt } from "./PenAndPaper-CoEXEMcN.js";
10
10
  import { u as st } from "./useUserOptionState-BIvW1Kz7.js";
11
11
  import { u as ot } from "./useChartAccessibility-BWojgys7.js";
12
12
  import { _ as ut } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1,7 +1,7 @@
1
1
  import { ref as b, useSlots as z, onMounted as g, computed as c, watch as G, createElementBlock as a, openBlock as s, normalizeStyle as L, createVNode as N, createCommentVNode as i, createElementVNode as t, Fragment as p, toDisplayString as y, unref as d } from "vue";
2
- import { u as $, c as F, e as B, i as k, f as m } from "./index-9EeNZMz1.js";
3
- import { u as V } from "./useNestedProp-df_bKQEI.js";
4
- import { _ as P } from "./PackageVersion-QRvxRYPv.js";
2
+ import { u as $, c as F, e as B, i as k, f as m } from "./index-CZlI7PiS.js";
3
+ import { u as V } from "./useNestedProp-Cg0NIwr6.js";
4
+ import { _ as P } from "./PackageVersion-J_USnljf.js";
5
5
  const U = ["viewBox", "width"], D = { key: 0 }, I = ["id"], M = ["stop-color"], S = ["stop-color"], E = ["stroke"], O = ["stroke"], A = ["width", "fill"], j = ["fill"], T = { key: 0 }, q = ["id"], H = ["stroke"], J = ["stroke", "stroke-dasharray", "stroke-dashoffset"], K = ["filter"], Q = ["stroke", "stroke-dasharray", "stroke-dashoffset"], R = ["fill"], ee = {
6
6
  __name: "vue-ui-gizmo",
7
7
  props: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-DEnRHTzk.cjs"),k=require("./useNestedProp-BNT60LxO.cjs"),p=require("./PackageVersion-DJKkRuOD.cjs"),g=["viewBox","width"],v={key:0},_=["id"],y=["stop-color"],N=["stop-color"],C=["stroke"],V=["stroke"],w=["width","fill"],x=["fill"],B={key:0},E=["id"],b=["stroke"],L=["stroke","stroke-dasharray","stroke-dashoffset"],z=["filter"],G=["stroke","stroke-dasharray","stroke-dashoffset"],F=["fill"],P={__name:"vue-ui-gizmo",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(i){const{vue_ui_gizmo:f}=a.useConfig(),o=i,n=e.ref(a.createUid()),h=e.useSlots();e.onMounted(()=>{c()}),e.onMounted(()=>{h["chart-background"]&&console.warn("VueUiGizmo does not support the #chart-background slot.")});function c(){!o.dataset&&o.dataset!==0&&a.error({componentName:"VueUiGizmo",type:"dataset"}),o.dataset<0&&console.warn("VueUiGizmo: dataset cannot be negative.")}const t=e.computed({get:()=>d(),set:s=>s});function d(){return k.useNestedProp({userConfig:o.config,defaultConfig:f})}e.watch(()=>o.config,s=>{t.value=d(),c()},{deep:!0});const u=e.computed(()=>({battery:{width:t.value.showPercentage?140:80,height:50},gauge:{width:80,height:80}})[t.value.type]),l=e.computed(()=>{const r=2*Math.PI*35,m=r-o.dataset/100*r;return{dasharray:`${r} ${r}`,dashoffset:m}});return(s,r)=>(e.openBlock(),e.createElementBlock("svg",{class:"vue-ui-gizmo",viewBox:`0 0 ${u.value.width} ${u.value.height}`,width:t.value.size,style:e.normalizeStyle({background:"transparent",fontFamily:t.value.fontFamily})},[e.createVNode(p._sfc_main),t.value.useGradient?(e.openBlock(),e.createElementBlock("defs",v,[e.createElementVNode("linearGradient",{id:`gizmo_gradient_${n.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.gradientColor},null,8,y),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.color},null,8,N)],8,_)])):e.createCommentVNode("",!0),t.value.type==="battery"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("path",{d:"M 5 10 L 5 40 C 5 43 7 45 9 45 L 65 45 C 68 45 70 43 70 40 L 70 38 C 73 38 75 38 75 33 L 75 17 C 75 12 73 12 70 12 L 70 10 C 70 7 68 5 65 5 L 10 5 C 7 5 5 7 5 10",stroke:t.value.stroke,"stroke-width":2,fill:"none"},null,8,C),e.createElementVNode("path",{d:"M 70 16 L 70 34",stroke:t.value.stroke,"stroke-width":2,fill:"none",style:{opacity:"0.5"}},null,8,V),e.createElementVNode("rect",{x:10,y:10,height:30,width:55*(i.dataset/100),fill:t.value.useGradient?`url(#gizmo_gradient_${n.value})`:t.value.color,rx:2},null,8,w),t.value.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:0,x:85,y:32,"text-anchor":"start","font-size":"20",fill:t.value.textColor},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.formatter,o.dataset,e.unref(a.dataLabel)({v:o.dataset,s:"%"}))),9,x)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="gauge"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.value.useGradient?(e.openBlock(),e.createElementBlock("defs",B,[e.createElementVNode("filter",{id:`blur_${n.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},r[0]||(r[0]=[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:1},null,-1)]),8,E)])):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.stroke,"stroke-width":2*4,fill:"none"},null,8,b),e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.color,"stroke-width":2*4,"stroke-dasharray":l.value.dasharray,"stroke-dashoffset":l.value.dashoffset,"stroke-linecap":"round",fill:"none",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,L),t.value.useGradient?(e.openBlock(),e.createElementBlock("g",{key:1,filter:`url(#blur_${n.value})`},[e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.gradientColor,"stroke-width":1,fill:"none","stroke-dasharray":l.value.dasharray,"stroke-dashoffset":l.value.dashoffset,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,G)],8,z)):e.createCommentVNode("",!0),t.value.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:2,x:40,y:47,"text-anchor":"middle","font-size":"20",fill:t.value.textColor},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.formatter,o.dataset,e.unref(a.dataLabel)({v:o.dataset,s:"%"}))),9,F)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],12,g))}};exports.default=P;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-DD4PT0Pl.cjs"),k=require("./useNestedProp-DU7JFxpL.cjs"),p=require("./PackageVersion-CCgJTyH9.cjs"),g=["viewBox","width"],v={key:0},_=["id"],y=["stop-color"],N=["stop-color"],C=["stroke"],V=["stroke"],w=["width","fill"],x=["fill"],B={key:0},E=["id"],b=["stroke"],L=["stroke","stroke-dasharray","stroke-dashoffset"],z=["filter"],G=["stroke","stroke-dasharray","stroke-dashoffset"],F=["fill"],P={__name:"vue-ui-gizmo",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(i){const{vue_ui_gizmo:f}=a.useConfig(),o=i,n=e.ref(a.createUid()),h=e.useSlots();e.onMounted(()=>{c()}),e.onMounted(()=>{h["chart-background"]&&console.warn("VueUiGizmo does not support the #chart-background slot.")});function c(){!o.dataset&&o.dataset!==0&&a.error({componentName:"VueUiGizmo",type:"dataset"}),o.dataset<0&&console.warn("VueUiGizmo: dataset cannot be negative.")}const t=e.computed({get:()=>d(),set:s=>s});function d(){return k.useNestedProp({userConfig:o.config,defaultConfig:f})}e.watch(()=>o.config,s=>{t.value=d(),c()},{deep:!0});const u=e.computed(()=>({battery:{width:t.value.showPercentage?140:80,height:50},gauge:{width:80,height:80}})[t.value.type]),l=e.computed(()=>{const r=2*Math.PI*35,m=r-o.dataset/100*r;return{dasharray:`${r} ${r}`,dashoffset:m}});return(s,r)=>(e.openBlock(),e.createElementBlock("svg",{class:"vue-ui-gizmo",viewBox:`0 0 ${u.value.width} ${u.value.height}`,width:t.value.size,style:e.normalizeStyle({background:"transparent",fontFamily:t.value.fontFamily})},[e.createVNode(p._sfc_main),t.value.useGradient?(e.openBlock(),e.createElementBlock("defs",v,[e.createElementVNode("linearGradient",{id:`gizmo_gradient_${n.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.gradientColor},null,8,y),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.color},null,8,N)],8,_)])):e.createCommentVNode("",!0),t.value.type==="battery"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("path",{d:"M 5 10 L 5 40 C 5 43 7 45 9 45 L 65 45 C 68 45 70 43 70 40 L 70 38 C 73 38 75 38 75 33 L 75 17 C 75 12 73 12 70 12 L 70 10 C 70 7 68 5 65 5 L 10 5 C 7 5 5 7 5 10",stroke:t.value.stroke,"stroke-width":2,fill:"none"},null,8,C),e.createElementVNode("path",{d:"M 70 16 L 70 34",stroke:t.value.stroke,"stroke-width":2,fill:"none",style:{opacity:"0.5"}},null,8,V),e.createElementVNode("rect",{x:10,y:10,height:30,width:55*(i.dataset/100),fill:t.value.useGradient?`url(#gizmo_gradient_${n.value})`:t.value.color,rx:2},null,8,w),t.value.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:0,x:85,y:32,"text-anchor":"start","font-size":"20",fill:t.value.textColor},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.formatter,o.dataset,e.unref(a.dataLabel)({v:o.dataset,s:"%"}))),9,x)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="gauge"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.value.useGradient?(e.openBlock(),e.createElementBlock("defs",B,[e.createElementVNode("filter",{id:`blur_${n.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},r[0]||(r[0]=[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:1},null,-1)]),8,E)])):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.stroke,"stroke-width":2*4,fill:"none"},null,8,b),e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.color,"stroke-width":2*4,"stroke-dasharray":l.value.dasharray,"stroke-dashoffset":l.value.dashoffset,"stroke-linecap":"round",fill:"none",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,L),t.value.useGradient?(e.openBlock(),e.createElementBlock("g",{key:1,filter:`url(#blur_${n.value})`},[e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.gradientColor,"stroke-width":1,fill:"none","stroke-dasharray":l.value.dasharray,"stroke-dashoffset":l.value.dashoffset,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,G)],8,z)):e.createCommentVNode("",!0),t.value.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:2,x:40,y:47,"text-anchor":"middle","font-size":"20",fill:t.value.textColor},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.formatter,o.dataset,e.unref(a.dataLabel)({v:o.dataset,s:"%"}))),9,F)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],12,g))}};exports.default=P;
@@ -1,14 +1,14 @@
1
1
  import { useCssVars as Re, computed as h, ref as p, watch as $e, onMounted as Be, createElementBlock as n, openBlock as o, unref as u, normalizeStyle as k, normalizeClass as K, createBlock as G, createCommentVNode as c, createVNode as se, createSlots as Ee, withCtx as _, renderSlot as f, normalizeProps as U, guardReactiveProps as H, Fragment as A, renderList as M, createElementVNode as i, toDisplayString as b, withKeys as Ge, createTextVNode as Ue, nextTick as He } from "vue";
2
- import { u as Xe, o as De, e as Ce, c as ue, a as je, C as We, g as Ye, O as ne, X as qe, G as ie, i as V, f as S, v as T, q as Ke, r as Je, x as Qe, y as Ze } from "./index-9EeNZMz1.js";
3
- import { _ as et } from "./Title-BI8etrRU.js";
4
- import { u as tt, U as lt } from "./usePrinter-ngrh00Ym.js";
5
- import { _ as at } from "./Tooltip-Cxc8c50d.js";
6
- import ot from "./vue-ui-skeleton-BmJiYGtE.js";
7
- import st from "./BaseIcon-CDx9pxUG.js";
8
- import ut from "./vue-ui-accordion-Qo8JxnIN.js";
9
- import { u as Le } from "./useNestedProp-df_bKQEI.js";
10
- import { _ as nt } from "./PackageVersion-QRvxRYPv.js";
11
- import { P as it } from "./PenAndPaper-CxC1lWGK.js";
2
+ import { u as Xe, o as De, e as Ce, c as ue, a as je, C as We, g as Ye, O as ne, X as qe, G as ie, i as V, f as S, v as T, q as Ke, r as Je, x as Qe, y as Ze } from "./index-CZlI7PiS.js";
3
+ import { _ as et } from "./Title-DePxeqVl.js";
4
+ import { u as tt, U as lt } from "./usePrinter-D-sSdR2l.js";
5
+ import { _ as at } from "./Tooltip-DRw9RoFp.js";
6
+ import ot from "./vue-ui-skeleton-D8r-yAkW.js";
7
+ import st from "./BaseIcon-dThl5uNa.js";
8
+ import ut from "./vue-ui-accordion-DVtmOO3I.js";
9
+ import { u as Le } from "./useNestedProp-Cg0NIwr6.js";
10
+ import { _ as nt } from "./PackageVersion-J_USnljf.js";
11
+ import { P as it } from "./PenAndPaper-CoEXEMcN.js";
12
12
  import { u as rt } from "./useUserOptionState-BIvW1Kz7.js";
13
13
  import { u as vt } from "./useChartAccessibility-BWojgys7.js";
14
14
  import { _ as dt } from "./_plugin-vue_export-helper-CHgC5LLL.js";