vue-data-ui 2.6.34 → 2.6.35

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 (159) hide show
  1. package/dist/{Arrow-CMEpnHJk.cjs → Arrow-DY4Y3Znd.cjs} +1 -1
  2. package/dist/{Arrow-CTKfItAz.js → Arrow-D_ynXsTa.js} +1 -1
  3. package/dist/{BaseIcon-CualbCzD.cjs → BaseIcon-6LsMRYRb.cjs} +1 -1
  4. package/dist/{BaseIcon-U6sA3acm.js → BaseIcon-WAXP3JMF.js} +1 -1
  5. package/dist/{PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-B14szPRR.cjs → ColorPicker-01KuD_Md.cjs} +1 -1
  6. package/dist/{PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-DB34poDU.js → ColorPicker-CvsmsC5D.js} +3 -3
  7. package/dist/{DataTable-Cet65ROb.js → DataTable-BOGSvP5-.js} +2 -2
  8. package/dist/{DataTable-BUm2bH73.cjs → DataTable-CBDNutfc.cjs} +1 -1
  9. package/dist/{Legend-G5jL0_rX.js → Legend-DYipG-b3.js} +2 -2
  10. package/dist/{Legend-C6uocVOl.cjs → Legend-DkO5vYau.cjs} +1 -1
  11. package/dist/{PackageVersion-CDYaUoXM.js → PackageVersion-BAGT8x6y.js} +1 -1
  12. package/dist/{PackageVersion-Cf-xdR3L.cjs → PackageVersion-hOtn8va8.cjs} +1 -1
  13. package/dist/PenAndPaper-CQ-EdO1i.cjs +1 -0
  14. package/dist/{PenAndPaper-TmkkuGUA.js → PenAndPaper-DiAwciGZ.js} +3 -3
  15. package/dist/{Shape-BBvkk24G.js → Shape-C9XlergR.js} +1 -1
  16. package/dist/{Shape-BJEn7JZp.cjs → Shape-D4yyy-4X.cjs} +1 -1
  17. package/dist/{Slicer-TodWp-ep.cjs → Slicer-Zpek_h4a.cjs} +1 -1
  18. package/dist/{Slicer-Dx_fwhGD.js → Slicer-tRfUE8yg.js} +2 -2
  19. package/dist/{Title-KaNdyZTH.js → Title-CL-wJ9JD.js} +1 -1
  20. package/dist/{Title-Bc6ZFfJm.cjs → Title-DqsO0Ipj.cjs} +1 -1
  21. package/dist/{Tooltip-_RSTEXv2.js → Tooltip-BFQr1PRo.js} +1 -1
  22. package/dist/{Tooltip-NxSon5Pe.cjs → Tooltip-BLMWJhhK.cjs} +1 -1
  23. package/dist/index-BAIJ-Bwp.cjs +9 -0
  24. package/dist/{index-CpYyMEXP.js → index-C3RvlHsZ.js} +39 -17
  25. package/dist/style.css +1 -1
  26. package/dist/types/vue-data-ui.d.cts +10 -0
  27. package/dist/types/vue-data-ui.d.ts +10 -0
  28. package/dist/{useNestedProp-lBuAr7aL.js → useNestedProp-BtOzumux.js} +1 -1
  29. package/dist/{useNestedProp-DW-BafGy.cjs → useNestedProp-C2lYzx8-.cjs} +1 -1
  30. package/dist/{usePrinter-ByQ2nM16.cjs → usePrinter-CrCLuTAu.cjs} +1 -1
  31. package/dist/{usePrinter-CN3LJYGM.js → usePrinter-K69JUYus.js} +1 -1
  32. package/dist/{vue-data-ui-YHcDJCzz.cjs → vue-data-ui-CizHApOs.cjs} +1 -1
  33. package/dist/{vue-data-ui-bphu02kN.js → vue-data-ui-CrdwwaLp.js} +61 -61
  34. package/dist/vue-data-ui.cjs +1 -1
  35. package/dist/vue-data-ui.js +1 -1
  36. package/dist/{vue-ui-3d-bar-7tpyg6Ms.cjs → vue-ui-3d-bar-CP01dLZj.cjs} +1 -1
  37. package/dist/{vue-ui-3d-bar-BouzqFZ-.js → vue-ui-3d-bar-DQQFY2ey.js} +9 -9
  38. package/dist/{vue-ui-accordion-B_ltQN1F.js → vue-ui-accordion-5EwxZ6vm.js} +3 -3
  39. package/dist/{vue-ui-accordion-cKYUwWu1.cjs → vue-ui-accordion-A2FE5Ato.cjs} +1 -1
  40. package/dist/{vue-ui-age-pyramid-Z-yjGwQO.js → vue-ui-age-pyramid-DmG98y06.js} +10 -10
  41. package/dist/{vue-ui-age-pyramid-DTpvUn3m.cjs → vue-ui-age-pyramid-XBUDRbob.cjs} +1 -1
  42. package/dist/{vue-ui-annotator-C4O_3MI7.js → vue-ui-annotator-C5hk8PZA.js} +1 -1
  43. package/dist/{vue-ui-annotator-BxAtclpd.cjs → vue-ui-annotator-CtdFCE5-.cjs} +1 -1
  44. package/dist/{vue-ui-bullet-DvFadxAQ.js → vue-ui-bullet-CSfEBhE0.js} +8 -8
  45. package/dist/{vue-ui-bullet-IhsWc_yI.cjs → vue-ui-bullet-CeotH5y9.cjs} +1 -1
  46. package/dist/{vue-ui-candlestick-BER2sP6f.cjs → vue-ui-candlestick-9equXj90.cjs} +1 -1
  47. package/dist/{vue-ui-candlestick-3XTZCuqk.js → vue-ui-candlestick-CdFnVWGU.js} +11 -11
  48. package/dist/{vue-ui-carousel-table-uuel0IlO.js → vue-ui-carousel-table-BP7H6TjL.js} +4 -4
  49. package/dist/{vue-ui-carousel-table-9dnrtvBi.cjs → vue-ui-carousel-table-CgoYKRYs.cjs} +1 -1
  50. package/dist/{vue-ui-chestnut-6Y7Rm6sD.cjs → vue-ui-chestnut-CpnfJL5E.cjs} +1 -1
  51. package/dist/{vue-ui-chestnut-Don1FFT2.js → vue-ui-chestnut-DV_ARMpF.js} +8 -8
  52. package/dist/{vue-ui-circle-pack-C6E6PHrM.js → vue-ui-circle-pack-BIUtg1qv.js} +9 -9
  53. package/dist/{vue-ui-circle-pack-CldijC6k.cjs → vue-ui-circle-pack-G0i4dlBe.cjs} +1 -1
  54. package/dist/{vue-ui-cursor-B4ZiM-6T.cjs → vue-ui-cursor-BetnONNj.cjs} +1 -1
  55. package/dist/{vue-ui-cursor-r0jjn20E.js → vue-ui-cursor-C23X8MwO.js} +2 -2
  56. package/dist/{vue-ui-dashboard-Cf9C0Ks_.js → vue-ui-dashboard-DuAhwMof.js} +2 -2
  57. package/dist/{vue-ui-dashboard-Cm8z1g1x.cjs → vue-ui-dashboard-DxXM3xgb.cjs} +1 -1
  58. package/dist/{vue-ui-digits-DbGWIsKg.cjs → vue-ui-digits-Bo9qpnzn.cjs} +1 -1
  59. package/dist/{vue-ui-digits-D0GfdIvn.js → vue-ui-digits-CMwWxLts.js} +2 -2
  60. package/dist/{vue-ui-donut-CMHBXfgy.cjs → vue-ui-donut-DWOnUiRH.cjs} +1 -1
  61. package/dist/{vue-ui-donut-DFGOICow.js → vue-ui-donut-TStgfQ16.js} +12 -12
  62. package/dist/{vue-ui-donut-evolution-NxJsCFFm.cjs → vue-ui-donut-evolution-DQYbbiYf.cjs} +1 -1
  63. package/dist/{vue-ui-donut-evolution-KedJhwq1.js → vue-ui-donut-evolution-_AjIBiso.js} +11 -11
  64. package/dist/{vue-ui-dumbbell-DhZaeVib.js → vue-ui-dumbbell-BWr4SW0d.js} +10 -10
  65. package/dist/{vue-ui-dumbbell-CzFdAy2C.cjs → vue-ui-dumbbell-DATkdaw-.cjs} +1 -1
  66. package/dist/{vue-ui-flow-BvnqZssM.js → vue-ui-flow-BrrmCZL1.js} +9 -9
  67. package/dist/{vue-ui-flow-DX47jzql.cjs → vue-ui-flow-UZBLSbKP.cjs} +1 -1
  68. package/dist/{vue-ui-funnel-DmOWVm2O.js → vue-ui-funnel-BHZ4AT16.js} +9 -9
  69. package/dist/{vue-ui-funnel-C6G8Bh6B.cjs → vue-ui-funnel-DSqmUdtV.cjs} +1 -1
  70. package/dist/{vue-ui-galaxy-_UQo1bBj.js → vue-ui-galaxy-0OiW8sEH.js} +11 -11
  71. package/dist/{vue-ui-galaxy-B7fUw4LJ.cjs → vue-ui-galaxy-BvjOq6i9.cjs} +1 -1
  72. package/dist/{vue-ui-gauge-DIoZDiVG.js → vue-ui-gauge-BmMIODwp.js} +7 -7
  73. package/dist/{vue-ui-gauge-BW3f_8nu.cjs → vue-ui-gauge-pk9f1HZZ.cjs} +1 -1
  74. package/dist/{vue-ui-gizmo-epvwj5K_.cjs → vue-ui-gizmo-CLbR-3tk.cjs} +1 -1
  75. package/dist/{vue-ui-gizmo-C-U61MNQ.js → vue-ui-gizmo-DXwKDWbm.js} +3 -3
  76. package/dist/{vue-ui-heatmap-D-kGbOfu.js → vue-ui-heatmap-BDPGjX-T.js} +10 -10
  77. package/dist/{vue-ui-heatmap-1FYDlrki.cjs → vue-ui-heatmap-CMn4Mmfn.cjs} +1 -1
  78. package/dist/{vue-ui-history-plot-DBO0y_JU.js → vue-ui-history-plot-CtnCfdh1.js} +11 -11
  79. package/dist/{vue-ui-history-plot-BCiXdi7v.cjs → vue-ui-history-plot-yLfPBWug.cjs} +1 -1
  80. package/dist/{vue-ui-kpi-Cl5jA8KA.js → vue-ui-kpi-DEHXOpna.js} +3 -3
  81. package/dist/{vue-ui-kpi-BXVGd4iF.cjs → vue-ui-kpi-DgAx6h7W.cjs} +1 -1
  82. package/dist/{vue-ui-mini-loader-CC7sDJ2d.js → vue-ui-mini-loader-1RdxhJbS.js} +2 -2
  83. package/dist/{vue-ui-mini-loader-BgpHllqw.cjs → vue-ui-mini-loader-DZb91ptU.cjs} +1 -1
  84. package/dist/{vue-ui-molecule-BtbSrzek.js → vue-ui-molecule-B2cnuwzS.js} +10 -10
  85. package/dist/{vue-ui-molecule-DKovS5fY.cjs → vue-ui-molecule-DKXbW0fk.cjs} +1 -1
  86. package/dist/{vue-ui-mood-radar-D1OfNJ4s.js → vue-ui-mood-radar-BWJ8usCh.js} +11 -11
  87. package/dist/{vue-ui-mood-radar-DvTIfOKV.cjs → vue-ui-mood-radar-CW1abfGk.cjs} +1 -1
  88. package/dist/{vue-ui-nested-donuts-BHKGhT6n.js → vue-ui-nested-donuts-Mk5gkC3N.js} +11 -11
  89. package/dist/{vue-ui-nested-donuts-CtOkH0Hg.cjs → vue-ui-nested-donuts-WD3rqtQZ.cjs} +1 -1
  90. package/dist/{vue-ui-onion-BIgOrbQ-.cjs → vue-ui-onion-CbTiNfEA.cjs} +1 -1
  91. package/dist/{vue-ui-onion-C3eKVX9G.js → vue-ui-onion-D71IEO2k.js} +11 -11
  92. package/dist/{vue-ui-parallel-coordinate-plot-D5MVyFh2.cjs → vue-ui-parallel-coordinate-plot-Bp_7voLV.cjs} +1 -1
  93. package/dist/{vue-ui-parallel-coordinate-plot---ZpnMe1.js → vue-ui-parallel-coordinate-plot-DF6GpboC.js} +12 -12
  94. package/dist/{vue-ui-quadrant-qW4BfKwA.cjs → vue-ui-quadrant-CKwiEzR-.cjs} +1 -1
  95. package/dist/{vue-ui-quadrant-Y5ew2oHQ.js → vue-ui-quadrant-CgJsVCX9.js} +12 -12
  96. package/dist/{vue-ui-quick-chart-BWmQpISe.cjs → vue-ui-quick-chart-myc-iQmq.cjs} +1 -1
  97. package/dist/{vue-ui-quick-chart-DE980OX7.js → vue-ui-quick-chart-t3wkcB1S.js} +9 -9
  98. package/dist/{vue-ui-radar-DjU8iJyd.cjs → vue-ui-radar-V6irejlj.cjs} +1 -1
  99. package/dist/{vue-ui-radar-mGpwEVoU.js → vue-ui-radar-r3QN-BmS.js} +12 -12
  100. package/dist/{vue-ui-rating-BwcABOB0.js → vue-ui-rating-BHnckQSH.js} +2 -2
  101. package/dist/{vue-ui-rating-D81wmvXD.cjs → vue-ui-rating-CWGSRI7d.cjs} +1 -1
  102. package/dist/{vue-ui-relation-circle-B9ETNDdN.js → vue-ui-relation-circle-BrCMlVtv.js} +7 -7
  103. package/dist/{vue-ui-relation-circle-DAVR7xha.cjs → vue-ui-relation-circle-Vj3O-2qa.cjs} +1 -1
  104. package/dist/{vue-ui-rings-C0Oj-x00.cjs → vue-ui-rings-2wx9HPDS.cjs} +1 -1
  105. package/dist/{vue-ui-rings-B3IUlzQM.js → vue-ui-rings-x7dqyLCG.js} +12 -12
  106. package/dist/{vue-ui-scatter-DbSe_3YM.js → vue-ui-scatter-C3tZSTjD.js} +12 -12
  107. package/dist/{vue-ui-scatter-Cqiq2oqG.cjs → vue-ui-scatter-DMkgKo1K.cjs} +1 -1
  108. package/dist/{vue-ui-screenshot-B9yr_Q8w.cjs → vue-ui-screenshot-DKbsMC6s.cjs} +1 -1
  109. package/dist/{vue-ui-screenshot-Dj2ufZqP.js → vue-ui-screenshot-_zUz3d8D.js} +1 -1
  110. package/dist/{vue-ui-skeleton-s5jsRMt_.cjs → vue-ui-skeleton-By5YO7j7.cjs} +1 -1
  111. package/dist/{vue-ui-skeleton-Oq3E8Fka.js → vue-ui-skeleton-Cz142HVr.js} +3 -3
  112. package/dist/{vue-ui-smiley-CwvFF1sH.cjs → vue-ui-smiley-7fOWEMdx.cjs} +1 -1
  113. package/dist/{vue-ui-smiley-BXTavTGD.js → vue-ui-smiley-vdNFoQwV.js} +2 -2
  114. package/dist/{vue-ui-spark-trend-EYGXY3K6.js → vue-ui-spark-trend-CJoYts8s.js} +5 -5
  115. package/dist/{vue-ui-spark-trend-DkaTDNGH.cjs → vue-ui-spark-trend-Dz8oDyje.cjs} +1 -1
  116. package/dist/{vue-ui-sparkbar-CGGhVLLN.cjs → vue-ui-sparkbar-Btnkjhdi.cjs} +1 -1
  117. package/dist/{vue-ui-sparkbar-oUGaWrVL.js → vue-ui-sparkbar-DwfzDcna.js} +4 -4
  118. package/dist/{vue-ui-sparkgauge-C1L-Re-K.js → vue-ui-sparkgauge-D2JVyM2b.js} +4 -4
  119. package/dist/{vue-ui-sparkgauge-DGgdECXI.cjs → vue-ui-sparkgauge-DcjwPim7.cjs} +1 -1
  120. package/dist/{vue-ui-sparkhistogram-N-KUUlu-.js → vue-ui-sparkhistogram-3-C7fKol.js} +5 -5
  121. package/dist/{vue-ui-sparkhistogram-DaRY8EV_.cjs → vue-ui-sparkhistogram-5GrnaH_z.cjs} +1 -1
  122. package/dist/{vue-ui-sparkline-XqQL7w01.js → vue-ui-sparkline-B14ncv-o.js} +4 -4
  123. package/dist/{vue-ui-sparkline-DWr7oKX_.cjs → vue-ui-sparkline-pzy8ldDC.cjs} +1 -1
  124. package/dist/{vue-ui-sparkstackbar-BuNOHaDG.js → vue-ui-sparkstackbar-CfZbtOt1.js} +5 -5
  125. package/dist/{vue-ui-sparkstackbar-B9PUi1ZP.cjs → vue-ui-sparkstackbar-DAXcYCtz.cjs} +1 -1
  126. package/dist/{vue-ui-stackbar-CPOYNwAn.cjs → vue-ui-stackbar-DFYbu9cO.cjs} +1 -1
  127. package/dist/{vue-ui-stackbar-DsUPQZTU.js → vue-ui-stackbar-DKULO7v0.js} +13 -13
  128. package/dist/{vue-ui-strip-plot-E6tKIy1q.cjs → vue-ui-strip-plot-7YGkKicW.cjs} +1 -1
  129. package/dist/{vue-ui-strip-plot-TtdHa_ti.js → vue-ui-strip-plot-CwbYwI_5.js} +11 -11
  130. package/dist/{vue-ui-table-BDNQf-eh.cjs → vue-ui-table-CnHIo3ad.cjs} +1 -1
  131. package/dist/{vue-ui-table-heatmap-BwSaMI5p.cjs → vue-ui-table-heatmap-BwZUpIIG.cjs} +1 -1
  132. package/dist/{vue-ui-table-heatmap-BcewsSph.js → vue-ui-table-heatmap-DCSnfXCY.js} +4 -4
  133. package/dist/{vue-ui-table-U0bpRHZi.js → vue-ui-table-nuvVL2RJ.js} +1 -1
  134. package/dist/{vue-ui-table-sparkline-Cr8FpMNC.js → vue-ui-table-sparkline-C2rr-OQ-.js} +5 -5
  135. package/dist/{vue-ui-table-sparkline-4fC6iYiJ.cjs → vue-ui-table-sparkline-ZZF17nq7.cjs} +1 -1
  136. package/dist/{vue-ui-thermometer-BoLOPpkd.cjs → vue-ui-thermometer-BHS5sbKF.cjs} +1 -1
  137. package/dist/{vue-ui-thermometer-C1f20qE7.js → vue-ui-thermometer-Bv2db7TG.js} +7 -7
  138. package/dist/{vue-ui-timer-BVlFcS3H.js → vue-ui-timer-B1IEmXw6.js} +5 -5
  139. package/dist/{vue-ui-timer-DJvh0V_O.cjs → vue-ui-timer-Dx8_p0EE.cjs} +1 -1
  140. package/dist/{vue-ui-tiremarks-BZNSIFGV.js → vue-ui-tiremarks-SMB141Mf.js} +7 -7
  141. package/dist/{vue-ui-tiremarks-Cy2tiFz-.cjs → vue-ui-tiremarks-tBfYKiUj.cjs} +1 -1
  142. package/dist/{vue-ui-treemap-0eKW6ykm.cjs → vue-ui-treemap-BJI4GG2K.cjs} +1 -1
  143. package/dist/{vue-ui-treemap-DWYu50Ug.js → vue-ui-treemap-CPc0v2VK.js} +11 -11
  144. package/dist/{vue-ui-vertical-bar-LXFp5r5I.cjs → vue-ui-vertical-bar-Dln-jvKW.cjs} +1 -1
  145. package/dist/{vue-ui-vertical-bar-Btq84vk8.js → vue-ui-vertical-bar-UbdRfqp-.js} +12 -12
  146. package/dist/{vue-ui-waffle-BEg9K5Cy.js → vue-ui-waffle-CncHUPIc.js} +12 -12
  147. package/dist/{vue-ui-waffle-COjrRzAu.cjs → vue-ui-waffle-DtGkjSH-.cjs} +1 -1
  148. package/dist/{vue-ui-wheel-CkLA7mG4.cjs → vue-ui-wheel-CTiT17bu.cjs} +1 -1
  149. package/dist/{vue-ui-wheel-2GlRucs9.js → vue-ui-wheel-DB9PUsGH.js} +7 -7
  150. package/dist/{vue-ui-word-cloud-CmJFFQj-.cjs → vue-ui-word-cloud-BZnuFPxo.cjs} +1 -1
  151. package/dist/{vue-ui-word-cloud-CFGwcWSh.js → vue-ui-word-cloud-J0ecdMyw.js} +10 -10
  152. package/dist/{vue-ui-xy-D_qwAaL2.js → vue-ui-xy-CUPCfIR0.js} +1200 -872
  153. package/dist/vue-ui-xy-Diodp6pC.cjs +3 -0
  154. package/dist/{vue-ui-xy-canvas-PbL7Oj-L.js → vue-ui-xy-canvas-BRvbGvJb.js} +16 -16
  155. package/dist/{vue-ui-xy-canvas-5ZpDbTqy.cjs → vue-ui-xy-canvas-DeBMq0za.cjs} +2 -2
  156. package/package.json +3 -3
  157. package/dist/PenAndPaper-D1EXjo5B.cjs +0 -1
  158. package/dist/index-BKVs-xif.cjs +0 -9
  159. package/dist/vue-ui-xy-CXaY0q1j.cjs +0 -3
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),u=require("./index-BKVs-xif.cjs"),p=require("./useResponsive-N8jl0-aC.cjs"),vt=require("./Tooltip-NxSon5Pe.cjs"),dt=require("./Legend-C6uocVOl.cjs"),ht=require("./Title-Bc6ZFfJm.cjs"),ft=require("./Slicer-TodWp-ep.cjs"),Ye=require("./usePrinter-ByQ2nM16.cjs"),yt=require("./vue-ui-accordion-cKYUwWu1.cjs"),pt=require("./DataTable-BUm2bH73.cjs"),gt=require("./vue-ui-skeleton-s5jsRMt_.cjs"),He=require("./useNestedProp-DW-BafGy.cjs"),me=require("./BaseIcon-CualbCzD.cjs"),Xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),mt=require("./PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-B14szPRR.cjs"),bt=require("./useUserOptionState-BgepsfED.cjs"),xt=require("./useChartAccessibility-Cm7nkzTG.cjs"),kt={class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0}),style:{padding:"0 !important"}},Lt=["disabled"],Ct=["xmlns","viewBox"],wt=["cx","cy","r","fill"],St=["d","stroke","stroke-width"],$t=["d","stroke","stroke-width"],zt={__name:"NonSvgPenAndPaper",props:{parent:{type:HTMLElement},backgroundColor:{type:String,default:"#FFFFFF"},color:{type:String,default:"#2D353C"},active:{type:Boolean,default:!1}},emits:["close"],setup($,{emit:be}){const X=$,xe=be,x=l.ref([]),D=l.ref([]),_=l.ref("0 0 0 0"),V=l.ref(X.color),c=l.ref(1),k=l.computed(()=>u.lightenHexColor(X.color,.6));function F({width:h,height:v}){_.value=`0 0 ${h} ${v}`}const U=l.ref(null);l.onMounted(()=>{l.nextTick(()=>{if(X.parent){U.value=new ResizeObserver(s=>{for(const d of s){const{width:g,height:C}=d.contentRect;F({width:g,height:C})}}),U.value.observe(X.parent);const{width:h,height:v}=X.parent.getBoundingClientRect();F({width:h,height:v})}})}),l.onBeforeUnmount(()=>{U.value&&U.value.disconnect()}),l.watch(()=>X.parent,h=>{if(!h)return;const{width:v,height:s}=X.parent.getBoundingClientRect();F({width:v,height:s})},{immediate:!0});const f=l.ref(!1),A=l.ref(""),Z=l.ref(null);function I(h){if(!Z.value)return;f.value=!0;const{x:v,y:s}=re(h);A.value=`M ${v} ${s}`}function q(h){if(!f.value||!Z.value)return;const{x:v,y:s}=re(h);A.value+=` ${v} ${s}`}function Y(h){const v=h.trim().split(/\s+/);if(v.length<4)return h;const s=v.slice(1).map(Number);if(s.length%2!==0)return h;const d=G(s),g=[`M ${d[0]} ${d[1]}`];for(let E=2;E<d.length-2;E+=2){const t=d[E-2],M=d[E-1],P=d[E],T=d[E+1],B=(t+P)/2,j=(M+T)/2;g.push(`Q ${t} ${M} ${B} ${j}`)}const C=d[d.length-2],S=d[d.length-1];return g.push(`L ${C} ${S}`),g.join(" ")}function G(h,v=1){const s=[...h];for(let d=2;d<h.length-2;d+=2){const g=h[d],C=h[d+1],S=h[d-2],E=h[d-1],t=h[d+2],M=h[d+3];s[d]=g+v*((S+t)/2-g),s[d+1]=C+v*((E+M)/2-C)}return s}function oe(h){const v=h.trim().split(/\s+/);let s="",d="",g=null,C=null;for(let S=0;S<v.length;S+=1){const E=v[S];if(isNaN(E)){if(d=E,d==="M"||d==="L")g=parseFloat(v[++S]),C=parseFloat(v[++S]),s+=`${d}${g} ${C}`;else if(d==="Q"){const t=parseFloat(v[++S]),M=parseFloat(v[++S]),P=parseFloat(v[++S]),T=parseFloat(v[++S]);t===g&&M===C?s+=`t${P-g} ${T-C}`:s+=`q${t-g} ${M-C} ${P-g} ${T-C}`,g=P,C=T}}else{const t=parseFloat(E),M=parseFloat(v[++S]);if(d==="L"){const P=t-g,T=M-C;P===0?s+=`v${T}`:T===0?s+=`h${P}`:s+=`l${P} ${T}`,g=t,C=M}else if(d==="Q"){const P=t,T=M,B=parseFloat(v[++S]),j=parseFloat(v[++S]);P===g&&T===C?s+=`t${B-g} ${j-C}`:s+=`q${P-g} ${T-C} ${B-g} ${j-C}`,g=B,C=j}}}return s}function ee(){f.value&&(x.value.push({strokeWidth:c.value,path:oe(Y(A.value)),color:V.value}),D.value=[],A.value=""),f.value=!1}function re(h){if(!Z.value)return{x:0,y:0};const v=Z.value.getBoundingClientRect();let s,d;return h.touches&&h.touches.length?(s=h.touches[0].clientX,d=h.touches[0].clientY):(s=h.clientX,d=h.clientY),{x:s-v.left,y:d-v.top}}l.ref(!1);function te(){if(x.value.length>0){const h=x.value.pop();D.value.push(h)}}function ce(){if(D.value.length>0){const h=D.value.pop();x.value.push(h)}}function ve(){x.value=[],D.value=[]}const de=l.ref(null);return(h,v)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[$.active?(l.openBlock(),l.createElementBlock("div",{key:0,"data-html2canvas-ignore":"",class:l.normalizeClass({"vue-ui-pen-and-paper-actions":!0,visible:$.active})},[l.createElementVNode("button",{class:"vue-ui-pen-and-paper-action",style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:v[0]||(v[0]=s=>xe("close"))},[l.createVNode(me.default,{name:"close",stroke:$.color},null,8,["stroke"])],4),l.createElementVNode("button",kt,[l.createVNode(mt.ColorPicker,{value:V.value,"onUpdate:value":v[1]||(v[1]=s=>V.value=s),backgroundColor:$.backgroundColor,buttonBorderColor:k.value},null,8,["value","backgroundColor","buttonBorderColor"])]),l.createElementVNode("button",{class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!x.value.length}),disabled:!x.value.length,style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:te},[l.createVNode(me.default,{name:"restart",stroke:$.color},null,8,["stroke"])],14,Lt),l.createElementVNode("button",{class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!D.value.length}),style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:ce},[l.createVNode(me.default,{name:"restart",stroke:$.color,style:{transform:"scaleX(-1)"}},null,8,["stroke"])],6),l.createElementVNode("button",{class:l.normalizeClass([{"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!x.value.length},"vue-ui-pen-and-paper-action"]),style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:ve},[l.createVNode(me.default,{name:"trash",stroke:$.color},null,8,["stroke"])],6),l.withDirectives(l.createElementVNode("input",{ref_key:"range",ref:de,type:"range",class:"vertical-range",min:.5,max:12,step:.1,"onUpdate:modelValue":v[2]||(v[2]=s=>c.value=s),style:l.normalizeStyle({accentColor:$.color})},null,4),[[l.vModelText,c.value]])],2)):l.createCommentVNode("",!0),(l.openBlock(),l.createElementBlock("svg",{ref_key:"svgElement",ref:Z,xmlns:l.unref(u.XMLNS),viewBox:_.value,class:l.normalizeClass({"vue-ui-pen-and-paper":!0,inactive:!$.active}),onMousedown:I,onMousemove:q,onMouseup:ee,onMouseleave:ee,onTouchstart:l.withModifiers(I,["prevent"]),onTouchmove:l.withModifiers(q,["prevent"]),onTouchend:ee},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(x.value,s=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:s},[s.path.replace("M","").split(" ").length===2?(l.openBlock(),l.createElementBlock("circle",{key:0,cx:s.path.replace("M","").split(" ")[0],cy:s.path.replace("M","").split(" ")[1],r:s.strokeWidth/2,fill:s.color},null,8,wt)):(l.openBlock(),l.createElementBlock("path",{key:1,class:"vue-ui-pen-and-paper-path",d:s.path,stroke:s.color,"stroke-width":s.strokeWidth,fill:"none"},null,8,St))],64))),128)),f.value?(l.openBlock(),l.createElementBlock("path",{key:0,class:"vue-ui-pen-and-paper-path vue-ui-pen-and-paper-path-drawing",d:Y(A.value),stroke:V.value,"stroke-width":c.value*1.1,fill:"none"},null,8,$t)):l.createCommentVNode("",!0)],42,Ct))],64))}},Mt=Xe._export_sfc(zt,[["__scopeId","data-v-1ffe1d80"]]),Pt=["id"],Tt=["onClick"],Bt={key:2,class:"vue-data-ui-watermark"},It=["innerHTML"],Et={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup($,{expose:be,emit:X}){const{vue_ui_xy_canvas:xe}=u.useConfig(),x=$,D=l.ref(u.createUid()),_=l.ref(null),V=l.ref(null),c=l.ref(null),k=l.ref(1),F=l.ref(1),U=l.ref(!1),f=l.ref(null),A=l.ref(""),Z=l.ref(null),I=l.ref([]),q=l.ref(1),Y=l.ref(!0),G=l.ref(!0),oe=l.ref(null),ee=l.ref(0),re=l.ref(0),te=l.ref(!1),ce=l.ref(null),ve=l.ref(null),de=l.ref(null),h=l.ref(null),v=l.ref(0),s=l.ref(0),d=l.ref(0),g=l.ref(null),C=l.computed(()=>!!x.dataset&&x.dataset.length),S=X,E=l.useSlots();l.onMounted(()=>{E["chart-background"]&&console.warn("VueUiXyCanvas does not support the #chart-background slot.")});const t=l.computed({get:()=>j(),set:e=>e}),{userOptionsVisible:M,setUserOptionsVisibility:P,keepUserOptionState:T}=bt.useUserOptionState({config:t.value}),{svgRef:B}=xt.useChartAccessibility({config:t.value.style.chart.title});function j(){const e=He.useNestedProp({userConfig:x.config,defaultConfig:xe});let o={};return e.theme?o={...He.useNestedProp({userConfig:u.themes.vue_ui_xy_canvas[e.theme]||x.config,defaultConfig:e}),customPalette:u.themePalettes[e.theme]||u.palette}:o=e,x.config&&u.hasDeepProperty(x.config,"style.chart.scale.min")?o.style.chart.scale.min=x.config.style.chart.scale.min:o.style.chart.scale.min=null,x.config&&u.hasDeepProperty(x.config,"style.chart.scale.max")?o.style.chart.scale.max=x.config.style.chart.scale.max:o.style.chart.scale.max=null,x.config&&u.hasDeepProperty(x.config,"style.chart.zoom.startIndex")?o.style.chart.zoom.startIndex=x.config.style.chart.zoom.startIndex:o.style.chart.zoom.startIndex=null,x.config&&u.hasDeepProperty(x.config,"style.chart.zoom.endIndex")?o.style.chart.zoom.endIndex=x.config.style.chart.zoom.endIndex:o.style.chart.zoom.endIndex=null,o}l.watch(()=>x.config,e=>{t.value=j(),M.value=!t.value.userOptions.showOnChartHover,ke(),v.value+=1,s.value+=1,d.value+=1,i.value.showTable=t.value.table.show,i.value.showDataLabels=t.value.style.chart.dataLabels.show,i.value.stacked=t.value.style.chart.stacked,i.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0}),l.watch(()=>x.dataset,()=>{ke(),v.value+=1,s.value+=1,d.value+=1},{deep:!0});const Ce=l.ref(t.value.style.chart.aspectRatio),{isPrinting:we,isImaging:Se,generatePdf:$e,generateImage:ze}=Ye.usePrinter({elementId:`xy_canvas_${D.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas"}),i=l.ref({showTable:t.value.table.show,showDataLabels:t.value.style.chart.dataLabels.show,stacked:t.value.style.chart.stacked,showTooltip:t.value.style.chart.tooltip.show});function Ue(e){te.value=e,re.value+=1}const Me=l.computed(()=>u.convertCustomPalette(t.value.customPalette)),H=l.computed(()=>le.value?Math.max(...le.value.filter((e,o)=>!I.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),a=l.computed(()=>{const e=k.value-k.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:k.value,canvasHeight:F.value,left:k.value*t.value.style.chart.paddingProportions.left,top:F.value*t.value.style.chart.paddingProportions.top,right:k.value-k.value*t.value.style.chart.paddingProportions.right,bottom:F.value-F.value*t.value.style.chart.paddingProportions.bottom,width:e,height:F.value-F.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(n.value.end-n.value.start)}});function Pe(e,o){return e/o}function qe({hasAutoScale:e,series:o,min:r,max:y,scale:b,yOffset:R,individualHeight:m,stackIndex:w=null}){return o.map((J,O)=>{const Q=b.min<0?Math.abs(b.min):0,K=Pe(J+Q,Q+b.max);let se,ie;e&&(se=b.min,ie=Pe(J-se,b.max-se));let W=0;return w===null?W=a.value.bottom-a.value.height*(e?ie:K):W=a.value.bottom-R-m*(e?ie:K),{x:a.value.left+a.value.slot*O+a.value.slot/2,y:W,value:J}})}const z=l.computed(()=>{const e=t.value.style.chart.scale.min!==null?t.value.style.chart.scale.min:Math.min(...le.value.filter((m,w)=>!I.value.includes(m.absoluteIndex)).flatMap(m=>m.series.slice(n.value.start,n.value.end))),o=t.value.style.chart.scale.max!==null?t.value.style.chart.scale.max:Math.max(...le.value.filter((m,w)=>!I.value.includes(m.absoluteIndex)).flatMap(m=>m.series.slice(n.value.start,n.value.end))),r=u.calculateNiceScale(e<0?e:0,o===e?e+1<0?0:e+1:o<0?0:o,t.value.style.chart.scale.ticks),y=r.min<0?Math.abs(r.min):0,b=a.value.bottom-a.value.height*(y/(r.max+y)),R=r.ticks.map(m=>({y:a.value.bottom-a.value.height*((m+y)/(r.max+y)),x:a.value.left-8,value:m}));return{absoluteMin:y,max:o,min:e,scale:r,yLabels:R,zero:b}}),We=l.computed(()=>L.value.map(e=>`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),u=require("./index-BAIJ-Bwp.cjs"),p=require("./useResponsive-N8jl0-aC.cjs"),vt=require("./Tooltip-BLMWJhhK.cjs"),dt=require("./Legend-DkO5vYau.cjs"),ht=require("./Title-DqsO0Ipj.cjs"),ft=require("./Slicer-Zpek_h4a.cjs"),Ye=require("./usePrinter-CrCLuTAu.cjs"),yt=require("./vue-ui-accordion-A2FE5Ato.cjs"),pt=require("./DataTable-CBDNutfc.cjs"),gt=require("./vue-ui-skeleton-By5YO7j7.cjs"),He=require("./useNestedProp-C2lYzx8-.cjs"),Xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),mt=require("./useUserOptionState-BgepsfED.cjs"),bt=require("./useChartAccessibility-Cm7nkzTG.cjs"),me=require("./BaseIcon-6LsMRYRb.cjs"),xt=require("./ColorPicker-01KuD_Md.cjs"),kt={class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0}),style:{padding:"0 !important"}},Lt=["disabled"],Ct=["xmlns","viewBox"],wt=["cx","cy","r","fill"],St=["d","stroke","stroke-width"],$t=["d","stroke","stroke-width"],zt={__name:"NonSvgPenAndPaper",props:{parent:{type:HTMLElement},backgroundColor:{type:String,default:"#FFFFFF"},color:{type:String,default:"#2D353C"},active:{type:Boolean,default:!1}},emits:["close"],setup($,{emit:be}){const X=$,xe=be,x=l.ref([]),D=l.ref([]),Z=l.ref("0 0 0 0"),V=l.ref(X.color),c=l.ref(1),k=l.computed(()=>u.lightenHexColor(X.color,.6));function F({width:h,height:v}){Z.value=`0 0 ${h} ${v}`}const U=l.ref(null);l.onMounted(()=>{l.nextTick(()=>{if(X.parent){U.value=new ResizeObserver(s=>{for(const d of s){const{width:g,height:C}=d.contentRect;F({width:g,height:C})}}),U.value.observe(X.parent);const{width:h,height:v}=X.parent.getBoundingClientRect();F({width:h,height:v})}})}),l.onBeforeUnmount(()=>{U.value&&U.value.disconnect()}),l.watch(()=>X.parent,h=>{if(!h)return;const{width:v,height:s}=X.parent.getBoundingClientRect();F({width:v,height:s})},{immediate:!0});const f=l.ref(!1),A=l.ref(""),_=l.ref(null);function I(h){if(!_.value)return;f.value=!0;const{x:v,y:s}=re(h);A.value=`M ${v} ${s}`}function q(h){if(!f.value||!_.value)return;const{x:v,y:s}=re(h);A.value+=` ${v} ${s}`}function Y(h){const v=h.trim().split(/\s+/);if(v.length<4)return h;const s=v.slice(1).map(Number);if(s.length%2!==0)return h;const d=G(s),g=[`M ${d[0]} ${d[1]}`];for(let E=2;E<d.length-2;E+=2){const t=d[E-2],M=d[E-1],P=d[E],T=d[E+1],B=(t+P)/2,j=(M+T)/2;g.push(`Q ${t} ${M} ${B} ${j}`)}const C=d[d.length-2],S=d[d.length-1];return g.push(`L ${C} ${S}`),g.join(" ")}function G(h,v=1){const s=[...h];for(let d=2;d<h.length-2;d+=2){const g=h[d],C=h[d+1],S=h[d-2],E=h[d-1],t=h[d+2],M=h[d+3];s[d]=g+v*((S+t)/2-g),s[d+1]=C+v*((E+M)/2-C)}return s}function oe(h){const v=h.trim().split(/\s+/);let s="",d="",g=null,C=null;for(let S=0;S<v.length;S+=1){const E=v[S];if(isNaN(E)){if(d=E,d==="M"||d==="L")g=parseFloat(v[++S]),C=parseFloat(v[++S]),s+=`${d}${g} ${C}`;else if(d==="Q"){const t=parseFloat(v[++S]),M=parseFloat(v[++S]),P=parseFloat(v[++S]),T=parseFloat(v[++S]);t===g&&M===C?s+=`t${P-g} ${T-C}`:s+=`q${t-g} ${M-C} ${P-g} ${T-C}`,g=P,C=T}}else{const t=parseFloat(E),M=parseFloat(v[++S]);if(d==="L"){const P=t-g,T=M-C;P===0?s+=`v${T}`:T===0?s+=`h${P}`:s+=`l${P} ${T}`,g=t,C=M}else if(d==="Q"){const P=t,T=M,B=parseFloat(v[++S]),j=parseFloat(v[++S]);P===g&&T===C?s+=`t${B-g} ${j-C}`:s+=`q${P-g} ${T-C} ${B-g} ${j-C}`,g=B,C=j}}}return s}function ee(){f.value&&(x.value.push({strokeWidth:c.value,path:oe(Y(A.value)),color:V.value}),D.value=[],A.value=""),f.value=!1}function re(h){if(!_.value)return{x:0,y:0};const v=_.value.getBoundingClientRect();let s,d;return h.touches&&h.touches.length?(s=h.touches[0].clientX,d=h.touches[0].clientY):(s=h.clientX,d=h.clientY),{x:s-v.left,y:d-v.top}}l.ref(!1);function te(){if(x.value.length>0){const h=x.value.pop();D.value.push(h)}}function ce(){if(D.value.length>0){const h=D.value.pop();x.value.push(h)}}function ve(){x.value=[],D.value=[]}const de=l.ref(null);return(h,v)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[$.active?(l.openBlock(),l.createElementBlock("div",{key:0,"data-html2canvas-ignore":"",class:l.normalizeClass({"vue-ui-pen-and-paper-actions":!0,visible:$.active})},[l.createElementVNode("button",{class:"vue-ui-pen-and-paper-action",style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:v[0]||(v[0]=s=>xe("close"))},[l.createVNode(me.default,{name:"close",stroke:$.color},null,8,["stroke"])],4),l.createElementVNode("button",kt,[l.createVNode(xt.ColorPicker,{value:V.value,"onUpdate:value":v[1]||(v[1]=s=>V.value=s),backgroundColor:$.backgroundColor,buttonBorderColor:k.value},null,8,["value","backgroundColor","buttonBorderColor"])]),l.createElementVNode("button",{class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!x.value.length}),disabled:!x.value.length,style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:te},[l.createVNode(me.default,{name:"restart",stroke:$.color},null,8,["stroke"])],14,Lt),l.createElementVNode("button",{class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!D.value.length}),style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:ce},[l.createVNode(me.default,{name:"restart",stroke:$.color,style:{transform:"scaleX(-1)"}},null,8,["stroke"])],6),l.createElementVNode("button",{class:l.normalizeClass([{"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!x.value.length},"vue-ui-pen-and-paper-action"]),style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:ve},[l.createVNode(me.default,{name:"trash",stroke:$.color},null,8,["stroke"])],6),l.withDirectives(l.createElementVNode("input",{ref_key:"range",ref:de,type:"range",class:"vertical-range",min:.5,max:12,step:.1,"onUpdate:modelValue":v[2]||(v[2]=s=>c.value=s),style:l.normalizeStyle({accentColor:$.color})},null,4),[[l.vModelText,c.value]])],2)):l.createCommentVNode("",!0),(l.openBlock(),l.createElementBlock("svg",{ref_key:"svgElement",ref:_,xmlns:l.unref(u.XMLNS),viewBox:Z.value,class:l.normalizeClass({"vue-ui-pen-and-paper":!0,inactive:!$.active}),onMousedown:I,onMousemove:q,onMouseup:ee,onMouseleave:ee,onTouchstart:l.withModifiers(I,["prevent"]),onTouchmove:l.withModifiers(q,["prevent"]),onTouchend:ee},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(x.value,s=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:s},[s.path.replace("M","").split(" ").length===2?(l.openBlock(),l.createElementBlock("circle",{key:0,cx:s.path.replace("M","").split(" ")[0],cy:s.path.replace("M","").split(" ")[1],r:s.strokeWidth/2,fill:s.color},null,8,wt)):(l.openBlock(),l.createElementBlock("path",{key:1,class:"vue-ui-pen-and-paper-path",d:s.path,stroke:s.color,"stroke-width":s.strokeWidth,fill:"none"},null,8,St))],64))),128)),f.value?(l.openBlock(),l.createElementBlock("path",{key:0,class:"vue-ui-pen-and-paper-path vue-ui-pen-and-paper-path-drawing",d:Y(A.value),stroke:V.value,"stroke-width":c.value*1.1,fill:"none"},null,8,$t)):l.createCommentVNode("",!0)],42,Ct))],64))}},Mt=Xe._export_sfc(zt,[["__scopeId","data-v-1ffe1d80"]]),Pt=["id"],Tt=["onClick"],Bt={key:2,class:"vue-data-ui-watermark"},It=["innerHTML"],Et={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup($,{expose:be,emit:X}){const{vue_ui_xy_canvas:xe}=u.useConfig(),x=$,D=l.ref(u.createUid()),Z=l.ref(null),V=l.ref(null),c=l.ref(null),k=l.ref(1),F=l.ref(1),U=l.ref(!1),f=l.ref(null),A=l.ref(""),_=l.ref(null),I=l.ref([]),q=l.ref(1),Y=l.ref(!0),G=l.ref(!0),oe=l.ref(null),ee=l.ref(0),re=l.ref(0),te=l.ref(!1),ce=l.ref(null),ve=l.ref(null),de=l.ref(null),h=l.ref(null),v=l.ref(0),s=l.ref(0),d=l.ref(0),g=l.ref(null),C=l.computed(()=>!!x.dataset&&x.dataset.length),S=X,E=l.useSlots();l.onMounted(()=>{E["chart-background"]&&console.warn("VueUiXyCanvas does not support the #chart-background slot.")});const t=l.computed({get:()=>j(),set:e=>e}),{userOptionsVisible:M,setUserOptionsVisibility:P,keepUserOptionState:T}=mt.useUserOptionState({config:t.value}),{svgRef:B}=bt.useChartAccessibility({config:t.value.style.chart.title});function j(){const e=He.useNestedProp({userConfig:x.config,defaultConfig:xe});let o={};return e.theme?o={...He.useNestedProp({userConfig:u.themes.vue_ui_xy_canvas[e.theme]||x.config,defaultConfig:e}),customPalette:u.themePalettes[e.theme]||u.palette}:o=e,x.config&&u.hasDeepProperty(x.config,"style.chart.scale.min")?o.style.chart.scale.min=x.config.style.chart.scale.min:o.style.chart.scale.min=null,x.config&&u.hasDeepProperty(x.config,"style.chart.scale.max")?o.style.chart.scale.max=x.config.style.chart.scale.max:o.style.chart.scale.max=null,x.config&&u.hasDeepProperty(x.config,"style.chart.zoom.startIndex")?o.style.chart.zoom.startIndex=x.config.style.chart.zoom.startIndex:o.style.chart.zoom.startIndex=null,x.config&&u.hasDeepProperty(x.config,"style.chart.zoom.endIndex")?o.style.chart.zoom.endIndex=x.config.style.chart.zoom.endIndex:o.style.chart.zoom.endIndex=null,o}l.watch(()=>x.config,e=>{t.value=j(),M.value=!t.value.userOptions.showOnChartHover,ke(),v.value+=1,s.value+=1,d.value+=1,i.value.showTable=t.value.table.show,i.value.showDataLabels=t.value.style.chart.dataLabels.show,i.value.stacked=t.value.style.chart.stacked,i.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0}),l.watch(()=>x.dataset,()=>{ke(),v.value+=1,s.value+=1,d.value+=1},{deep:!0});const Ce=l.ref(t.value.style.chart.aspectRatio),{isPrinting:we,isImaging:Se,generatePdf:$e,generateImage:ze}=Ye.usePrinter({elementId:`xy_canvas_${D.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas"}),i=l.ref({showTable:t.value.table.show,showDataLabels:t.value.style.chart.dataLabels.show,stacked:t.value.style.chart.stacked,showTooltip:t.value.style.chart.tooltip.show});function Ue(e){te.value=e,re.value+=1}const Me=l.computed(()=>u.convertCustomPalette(t.value.customPalette)),H=l.computed(()=>le.value?Math.max(...le.value.filter((e,o)=>!I.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),a=l.computed(()=>{const e=k.value-k.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:k.value,canvasHeight:F.value,left:k.value*t.value.style.chart.paddingProportions.left,top:F.value*t.value.style.chart.paddingProportions.top,right:k.value-k.value*t.value.style.chart.paddingProportions.right,bottom:F.value-F.value*t.value.style.chart.paddingProportions.bottom,width:e,height:F.value-F.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(n.value.end-n.value.start)}});function Pe(e,o){return e/o}function qe({hasAutoScale:e,series:o,min:r,max:y,scale:b,yOffset:R,individualHeight:m,stackIndex:w=null}){return o.map((J,O)=>{const Q=b.min<0?Math.abs(b.min):0,K=Pe(J+Q,Q+b.max);let se,ie;e&&(se=b.min,ie=Pe(J-se,b.max-se));let W=0;return w===null?W=a.value.bottom-a.value.height*(e?ie:K):W=a.value.bottom-R-m*(e?ie:K),{x:a.value.left+a.value.slot*O+a.value.slot/2,y:W,value:J}})}const z=l.computed(()=>{const e=t.value.style.chart.scale.min!==null?t.value.style.chart.scale.min:Math.min(...le.value.filter((m,w)=>!I.value.includes(m.absoluteIndex)).flatMap(m=>m.series.slice(n.value.start,n.value.end))),o=t.value.style.chart.scale.max!==null?t.value.style.chart.scale.max:Math.max(...le.value.filter((m,w)=>!I.value.includes(m.absoluteIndex)).flatMap(m=>m.series.slice(n.value.start,n.value.end))),r=u.calculateNiceScale(e<0?e:0,o===e?e+1<0?0:e+1:o<0?0:o,t.value.style.chart.scale.ticks),y=r.min<0?Math.abs(r.min):0,b=a.value.bottom-a.value.height*(y/(r.max+y)),R=r.ticks.map(m=>({y:a.value.bottom-a.value.height*((m+y)/(r.max+y)),x:a.value.left-8,value:m}));return{absoluteMin:y,max:o,min:e,scale:r,yLabels:R,zero:b}}),We=l.computed(()=>L.value.map(e=>`
2
2
  <div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
3
3
  <svg viewBox="0 0 10 10" height="12" width="12">
4
4
  <circle cx="5" cy="5" r="5" fill="${e.color}"/>
@@ -6,4 +6,4 @@
6
6
  <span>${e.name?e.name+": ":""}</span>
7
7
  <span>${u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.series[f.value],u.dataLabel({p:e.prefix||"",v:e.series[f.value],s:e.suffix||"",r:e.rounding||0}),{datapoint:e,seriesIndex:f.value})}</span>
8
8
  </div>
9
- `)),le=l.computed(()=>x.dataset.map((e,o)=>({...e,series:u.largestTriangleThreeBucketsArray({data:u.sanitizeArray(e.series),threshold:t.value.downsample.threshold}),absoluteIndex:o,color:u.convertColorToHex(e.color||Me.value[o]||u.palette[o]||u.palette[o%u.palette.length])})));l.watch(H,e=>{e&&Te()});const L=l.computed(()=>u.assignStackRatios(le.value.filter((e,o)=>!I.value.includes(e.absoluteIndex))).map((e,o)=>({...e,series:e.series.slice(n.value.start,n.value.end)})).map((e,o)=>{let r=[null,void 0].includes(e.scaleMin)?Math.min(...e.series)||0:e.scaleMin,y=[null,void 0].includes(e.scaleMax)?Math.max(...e.series)||1:e.scaleMax;r===y&&(r=r>=0?y-1:r,y=y>=0?y:r+1),e.series.filter(W=>![null,void 0].includes(W)).map(W=>(W-r)/(y-r));const b={valueMin:r,valueMax:y},R=e.scaleSteps||t.value.style.chart.scale.ticks;let m;e.autoScaling?m=u.calculateNiceScale(b.valueMin,b.valueMax,R):m=u.calculateNiceScale(b.valueMin<0?b.valueMin:0,b.valueMax<=0?0:b.valueMax,R);const w=i.value.stacked?a.value.height*(1-e.cumulatedStackRatio):0,J=i.value.stacked?a.value.height/t.value.style.chart.stackGap:0,O=i.value.stacked?a.value.height*e.stackRatio-J:a.value.height,Q=m.min<0?Math.abs(m.min):0;let K;e.autoScaling&&i.value.stacked&&y<=0?K=a.value.bottom-w-O:K=a.value.bottom-w-O*(Q/(m.max+Q));const se=m.ticks.map((W,ct)=>({y:a.value.bottom-w-O*(ct/(m.ticks.length-1)),x:a.value.left-8,value:W})),ie=qe({hasAutoScale:i.value.stacked&&e.autoScaling,series:e.series,min:i.value.stacked?r:z.value.min,max:i.value.stacked?y:z.value.max,scale:i.value.stacked?m:z.value.scale,yOffset:w,individualHeight:O,stackIndex:i.value.stacked?o:null});return{...e,coordinatesLine:ie,min:r,max:y,localScale:m,localZero:K,localMin:Q,localYLabels:se,yOffset:w,individualHeight:O}})),n=l.ref({start:0,end:H.value});function Te(){Be()}const ae=l.ref(null);async function Be(){(t.value.style.chart.zoom.startIndex!==null||t.value.style.chart.zoom.endIndex!==null)&&ae.value?(t.value.style.chart.zoom.startIndex!==null&&(await l.nextTick(),await l.nextTick(),ae.value&&ae.value.setStartValue(t.value.style.chart.zoom.startIndex)),t.value.style.chart.zoom.endIndex!==null&&(await l.nextTick(),await l.nextTick(),ae.value&&ae.value.setEndValue(_e(t.value.style.chart.zoom.endIndex+1)))):(n.value={start:0,end:H.value},ee.value+=1)}function _e(e){const o=H.value;return e>o?o:e<0||t.value.style.chart.zoom.startIndex!==null&&e<t.value.style.chart.zoom.startIndex?t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex+1:1:e}const Ze=l.computed(()=>L.value.filter(e=>["line","plot",void 0].includes(e.type))),N=l.computed(()=>L.value.filter(e=>e.type==="bar"));function Ge(){if(!B.value)return;const e=V.value.offsetWidth,o=V.value.offsetHeight;B.value.width=e*q.value*2,B.value.height=o*q.value*2,k.value=e*q.value*2,F.value=o*q.value*2,c.value.scale(q.value,q.value),ne()}function je(){if(c.value.clearRect(0,0,1e4,1e4),c.value.fillStyle=t.value.style.chart.backgroundColor,c.value.fillRect(0,0,a.value.canvasWidth,a.value.canvasHeight),i.value.stacked)t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength?L.value.forEach(e=>{for(let o=0;o<n.value.end-n.value.start+1;o+=1)p.line(c.value,[{x:a.value.left+a.value.slot*o,y:a.value.bottom-e.yOffset-e.individualHeight},{x:a.value.left+a.value.slot*o,y:a.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.y.verticalLines.color})}):t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start>=t.value.style.chart.grid.y.verticalLines.hideUnderXLength&&L.value.forEach(e=>{for(let o=n.value.start;o<n.value.end;o+=1)o%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0&&p.line(c.value,[{x:a.value.left+a.value.slot*(o-n.value.start)+a.value.slot/2,y:a.value.bottom-e.yOffset-e.individualHeight},{x:a.value.left+a.value.slot*(o-n.value.start)+a.value.slot/2,y:a.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.y.verticalLines.color})}),t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?L.value.forEach(e=>{e.localYLabels.forEach((o,r)=>{r<e.localYLabels.length-1&&p.rect(c.value,[{x:a.value.left,y:o.y},{x:a.value.right,y:o.y},{x:a.value.right,y:e.localYLabels[r+1].y},{x:a.value.left,y:e.localYLabels[r+1].y}],{fillColor:r%2===0?"transparent":u.setOpacity(t.value.style.chart.grid.x.horizontalLines.color,t.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})})}):L.value.forEach(e=>{e.localYLabels.slice(n.value.start,n.value.end).forEach(o=>{p.line(c.value,[{x:a.value.left,y:o.y},{x:a.value.right,y:o.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})})),t.value.style.chart.grid.zeroLine.show&&L.value.forEach(e=>{p.line(c.value,[{x:a.value.left,y:e.localZero},{x:a.value.right,y:e.localZero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]})}),t.value.style.chart.grid.y.axisLabels.show&&L.value.forEach(e=>{p.line(c.value,[{x:a.value.left,y:a.value.bottom-e.yOffset},{x:a.value.left,y:a.value.bottom-e.yOffset-e.individualHeight}],{color:e.color}),p.line(c.value,[{x:a.value.right,y:a.value.bottom-e.yOffset},{x:a.value.right,y:a.value.bottom-e.yOffset-e.individualHeight}],{color:e.color})}),L.value.forEach(e=>{p.text(c.value,e.name,k.value/35,a.value.bottom-e.yOffset-e.individualHeight/2,{align:"center",rotation:-90,color:e.color,font:`${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`})});else{if(t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=0;e<n.value.end-n.value.start+1;e+=1)p.line(c.value,[{x:a.value.left+a.value.slot*e,y:a.value.top},{x:a.value.left+a.value.slot*e,y:a.value.bottom}],{color:t.value.style.chart.grid.y.verticalLines.color});else if(t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start>=t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=n.value.start;e<n.value.end;e+=1)e%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0&&p.line(c.value,[{x:a.value.left+a.value.slot*(e-n.value.start)+a.value.slot/2,y:a.value.top},{x:a.value.left+a.value.slot*(e-n.value.start)+a.value.slot/2,y:a.value.bottom}],{color:t.value.style.chart.grid.y.verticalLines.color});t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?z.value.yLabels.forEach((e,o)=>{o<z.value.yLabels.length-1&&p.rect(c.value,[{x:a.value.left,y:e.y},{x:a.value.right,y:e.y},{x:a.value.right,y:z.value.yLabels[o+1].y},{x:a.value.left,y:z.value.yLabels[o+1].y}],{fillColor:o%2===0?"transparent":u.setOpacity(t.value.style.chart.grid.x.horizontalLines.color,t.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})}):z.value.yLabels.forEach(e=>{p.line(c.value,[{x:a.value.left,y:e.y},{x:a.value.right,y:e.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})),t.value.style.chart.grid.y.showAxis&&p.line(c.value,[{x:a.value.left,y:a.value.top},{x:a.value.left,y:a.value.bottom}],{color:t.value.style.chart.grid.y.axisColor,lineWidth:t.value.style.chart.grid.y.axisThickness}),t.value.style.chart.grid.x.showAxis&&p.line(c.value,[{x:a.value.left,y:a.value.bottom},{x:a.value.right,y:a.value.bottom}],{color:t.value.style.chart.grid.x.axisColor,lineWidth:t.value.style.chart.grid.x.axisThickness}),t.value.style.chart.grid.zeroLine.show&&p.line(c.value,[{x:a.value.left,y:z.value.zero},{x:a.value.right,y:z.value.zero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]})}t.value.style.chart.grid.y.axisName&&p.text(c.value,t.value.style.chart.grid.y.axisName,k.value-k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio*1.2,a.value.bottom-a.value.height/2,{font:`${t.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center",rotation:90}),t.value.style.chart.grid.x.axisName&&p.text(c.value,t.value.style.chart.grid.x.axisName,k.value/2,F.value,{font:`${t.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center"})}function Qe(e){for(let o=0;o<e.coordinatesLine.length;o+=1){const r=(f.value===o?k.value/150:t.value.style.chart.line.plots.show?k.value/200:0)*t.value.style.chart.line.plots.radiusRatio;p.circle(c.value,{x:e.coordinatesLine[o].x,y:e.coordinatesLine[o].y},r,{color:t.value.style.chart.backgroundColor,fillStyle:e.color})}}function Je(){L.value.forEach(e=>{e.showYMarker&&ue(e)&&p.text(c.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,ue(e).value,u.dataLabel({p:e.prefix||t.value.style.chart.grid.y.axisLabels.prefix||"",v:ue(e).value,s:e.suffix||t.value.style.chart.grid.y.axisLabels.suffix||"",r:e.rounding||t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:ue(e),seriesIndex:null}),a.value.left-8+t.value.style.chart.grid.y.axisLabels.offsetX,ue(e).y,{align:"right",font:`${t.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:e.color})})}function Ke(){t.value.style.chart.grid.y.axisLabels.show&&(i.value.stacked?L.value.forEach(e=>{e.localYLabels.forEach((o,r)=>{p.text(c.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,o.value,u.dataLabel({p:e.prefix||t.value.style.chart.grid.y.axisLabels.prefix||"",v:o.value,s:e.suffix||t.value.style.chart.grid.y.axisLabels.suffix||"",r:e.rounding||t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:o,seriesIndex:r}),o.x+t.value.style.chart.grid.y.axisLabels.offsetX,o.y,{align:"right",font:`${t.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:e.color,globalAlpha:e.showYMarker&&![null,void 0].includes(f.value)?.2:1})})}):z.value.yLabels.forEach((e,o)=>{p.text(c.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.value,u.dataLabel({p:t.value.style.chart.grid.y.axisLabels.prefix||"",v:e.value,s:t.value.style.chart.grid.y.axisLabels.suffix||"",r:t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:e,seriesIndex:o}),e.x+t.value.style.chart.grid.y.axisLabels.offsetX,e.y,{align:"right",font:`${t.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.grid.y.axisLabels.color,globalAlpha:L.value.some(r=>r.showYMarker)&&![null,void 0].includes(f.value)?.2:1})}))}function et(e){for(let o=0;o<e.coordinatesLine.length;o+=1)p.text(c.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[o].value,u.dataLabel({p:e.prefix||"",v:e.coordinatesLine[o].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[o],seriesIndex:o}),e.coordinatesLine[o].x,e.coordinatesLine[o].y+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${t.value.style.chart.dataLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color})}function tt(){for(let e=n.value.start;e<n.value.end;e+=1)(n.value.end-n.value.start<t.value.style.chart.grid.y.timeLabels.modulo||n.value.end-n.value.start>=t.value.style.chart.grid.y.timeLabels.modulo&&(e%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0||e===f.value+n.value.start&&t.value.style.chart.grid.y.timeLabels.showMarker))&&p.text(c.value,t.value.style.chart.grid.y.timeLabels.values[e]||e+1,a.value.left+a.value.slot*(e-n.value.start)+a.value.slot/2,a.value.bottom+k.value/t.value.style.chart.grid.y.timeLabels.offsetY,{align:t.value.style.chart.grid.y.timeLabels.rotation===0?"center":t.value.style.chart.grid.y.timeLabels.rotation>0?"left":"right",font:`${t.value.style.chart.grid.y.timeLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.timeLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.grid.y.timeLabels.showMarker?u.setOpacity(t.value.style.chart.grid.y.timeLabels.color,f.value!==null?f.value+n.value.start===e?100:20:100):t.value.style.chart.grid.y.timeLabels.color,rotation:t.value.style.chart.grid.y.timeLabels.rotation})}function Ie(){p.line(c.value,[{x:a.value.left+a.value.slot*f.value+a.value.slot/2,y:a.value.top},{x:a.value.left+a.value.slot*f.value+a.value.slot/2,y:a.value.bottom}],{color:t.value.style.chart.selector.color,lineDash:t.value.style.chart.selector.dashed?[8,8]:[0,0],lineWidth:2})}function lt(){g.value&&p.line(c.value,[{x:a.value.left,y:g.value},{x:a.value.right,y:g.value}],{color:t.value.style.chart.selector.color,lineDash:t.value.style.chart.selector.dashed?[8,8]:[0,0],lineWidth:2})}function at(){N.value.forEach((e,o)=>{for(let r=0;r<e.coordinatesLine.length;r+=1)p.rect(c.value,[{x:a.value.left+a.value.slot*r+a.value.slot/10+(i.value.stacked?0:a.value.slot/N.value.length*o-(o===0?0:a.value.slot/(5*N.value.length)*o)),y:i.value.stacked?e.localZero:z.value.zero},{x:a.value.left+a.value.slot*r+a.value.slot/10+(i.value.stacked?0:a.value.slot/N.value.length*o-(o===0?0:a.value.slot/(5*N.value.length)*o))+a.value.slot*.8/(i.value.stacked?1:N.value.length),y:i.value.stacked?e.localZero:z.value.zero},{x:a.value.left+a.value.slot*r+a.value.slot/10+(i.value.stacked?0:a.value.slot/N.value.length*o-(o===0?0:a.value.slot/(5*N.value.length)*o))+a.value.slot*.8/(i.value.stacked?1:N.value.length),y:e.coordinatesLine[r].y},{x:a.value.left+a.value.slot*r+a.value.slot/10+(i.value.stacked?0:a.value.slot/N.value.length*o-(o===0?0:a.value.slot/(5*N.value.length)*o)),y:e.coordinatesLine[r].y}],{strokeColor:t.value.style.chart.backgroundColor,gradient:{type:"linear",start:{x:e.coordinatesLine[r].x,y:e.coordinatesLine[r].y},end:{x:e.coordinatesLine[r].x,y:i.value.stacked?e.localZero:z.value.zero},stops:[{offset:0,color:e.color},{offset:1,color:t.value.style.chart.bar.gradient.show?u.lightenHexColor(e.color,.5):e.color}]}}),i.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&p.text(c.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[r].value,u.dataLabel({p:e.prefix||"",v:e.coordinatesLine[r].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[r],seriesIndex:r}),a.value.left+a.value.slot*r+a.value.slot/10+(i.value.stacked?0:a.value.slot/N.value.length*o-(o===0?0:a.value.slot/(5*N.value.length)*o))+a.value.slot*.4/(i.value.stacked?1:N.value.length),(e.coordinatesLine[r].value<0?i.value.stacked?e.localZero:z.value.zero:e.coordinatesLine[r].y)+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${Math.round(k.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color,strokeColor:t.value.style.chart.backgroundColor,lineWidth:.8})})}function ot(e){e.useArea?i.value.stacked?p.polygon(c.value,[{x:e.coordinatesLine[0].x,y:e.localZero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:e.localZero}],{fillColor:u.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):p.polygon(c.value,[{x:e.coordinatesLine[0].x,y:z.value.zero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:z.value.zero}],{fillColor:u.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):p.line(c.value,e.coordinatesLine,{color:e.color,lineWidth:3})}function rt(){L.value.forEach((e,o)=>{p.line(c.value,[{x:a.value.left,y:a.value.bottom-e.yOffset},{x:a.value.right,y:a.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.x.horizontalLines.color,lineWidth:1})})}function ne(){je(),Y.value?(f.value!==null&&t.value.style.chart.selector.show&&Ie(),at(),i.value.stacked&&t.value.style.chart.grid.x.showAxis&&rt(),Ze.value.forEach(e=>{(e.type==="line"||!e.type)&&ot(e),G.value&&(Qe(e),i.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&et(e))}),oe.value=p.cloneCanvas(B.value)):(oe.value&&(c.value.clearRect(0,0,1e4,1e4),c.value.drawImage(oe.value,0,0)),f.value!==null&&t.value.style.chart.selector.show&&Ie(),f.value!==null&&L.value.forEach(e=>{if(e.type==="line"||!e.type||e.type==="plot"){if(!e.coordinatesLine[f.value])return;e.coordinatesLine[f.value].x!==void 0&&e.coordinatesLine[f.value].y!==void 0&&p.circle(c.value,{x:e.coordinatesLine[f.value].x,y:e.coordinatesLine[f.value].y},k.value/150*t.value.style.chart.line.plots.radiusRatio,{color:t.value.style.chart.backgroundColor,fillStyle:e.color})}})),t.value.style.chart.grid.y.timeLabels.show&&tt(),t.value.style.chart.selector.show&&t.value.style.chart.selector.showHorizontalSelector&&lt(),Ke(),Je(),Y.value=!1}const he=p.debounce(()=>{G.value=!0,Ge()},H.value>200?10:1,!G.value);function ue(e){if([null,void 0].includes(f.value)||!e.coordinatesLine[f.value])return!1;const{y:o,value:r}=e.coordinatesLine[f.value];return{y:o,value:r}}function nt(e){const{left:o,top:r}=B.value.getBoundingClientRect(),y=e.clientX-o;if(g.value=(e.clientY-r)*2,(g.value<a.value.top||g.value>a.value.bottom)&&(g.value=null),y*2<a.value.left||y*2>a.value.right){U.value=!1,f.value=null;return}const b=y*2-a.value.left;if(f.value=Math.floor(b/a.value.slot),U.value=!0,!G.value)return;let R="";const m=t.value.style.chart.tooltip.customFormat;u.isFunction(m)&&u.functionReturnsString(()=>m({seriesIndex:f.value,datapoint:L.value.map(w=>({shape:w.shape||null,name:w.name,color:w.color,type:w.type||"line",value:w.series.find((J,O)=>O===f.value)})),series:L.value,config:t.value}))?A.value=m({seriesIndex:f.value,datapoint:L.value.map(w=>({shape:w.shape||null,name:w.name,color:w.color,type:w.type||"line",value:w.series.find((J,O)=>O===f.value)})),series:L.value,config:t.value}):(t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[f.value]&&(R+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; width:100%">${t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[f.value]}</div>`),R+=We.value.join(""),A.value=R),G.value=!1}l.watch(()=>f.value,e=>{he()}),l.watch(()=>n.value,e=>{Y.value=!0,ne()},{deep:!0}),l.watch(()=>i.value.showDataLabels,e=>{Y.value=!0,ne()}),l.watch(()=>g.value,e=>{e&&ne()}),l.watch(()=>i.value.stacked,e=>{Y.value=!0,G.value=!0,he()});function ut(){U.value=!1,f.value=null,A.value="",g.value=null,ne()}const fe=l.ref(null),ye=l.ref(null);l.onMounted(()=>{ke()});function ke(){if(u.objectIsEmpty(x.dataset)?u.error({componentName:"VueUiXyCanvas",type:"dataset"}):B.value&&(c.value=B.value.getContext("2d",{willReadFrequently:!0})),t.value.responsive){const e=p.throttle(()=>{const{width:o,height:r}=p.useResponsive({chart:_.value,title:t.value.style.chart.title.text?ce.value:null,legend:t.value.style.chart.legend.show?ve.value:null,slicer:t.value.style.chart.zoom.show&&H.value>1?de.value:null,source:h.value});requestAnimationFrame(()=>{Ce.value=`${o} / ${r}`})});fe.value=new ResizeObserver(e),fe.value.observe(_.value.parentNode)}ye.value=new ResizeObserver(e=>{for(const o of e)o.contentBoxSize&&V.value&&(Y.value=!0,he())}),ye.value.observe(V.value),Be()}l.onBeforeUnmount(()=>{ye.value&&ye.value.disconnect(),fe.value&&fe.value.disconnect()});function Ee(e){S("selectLegend",L.value.find(o=>o.absoluteIndex===e)),I.value.includes(e)?I.value=I.value.filter(o=>o!==e):I.value.push(e),Y.value=!0,he()}const Ne=l.computed(()=>le.value.map((e,o)=>({...e,name:e.name,color:u.convertColorToHex(e.color)||Me.value[o]||u.palette[o]||u.palette[o%u.palette.length],shape:e.shape||"circle",prefix:e.prefix||"",suffix:e.suffix||"",rounding:e.rounding||0})).map(e=>({...e,opacity:I.value.includes(e.absoluteIndex)?.5:1,segregate:()=>Ee(e.absoluteIndex),isSegregated:I.value.includes(e.absoluteIndex)}))),st=l.computed(()=>({cy:"donut-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":""})),pe=l.computed(()=>{const e=[""].concat(L.value.map(b=>b.name)).concat(' <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>');let o=[];for(let b=0;b<H.value;b+=1){const R=L.value.map(m=>m.series[b]??0).reduce((m,w)=>m+w,0);o.push([t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[b]??b+1].concat(L.value.map(m=>(m.series[b]??0).toFixed(t.value.table.rounding))).concat((R??0).toFixed(t.value.table.rounding)))}const r={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},y=[t.value.table.columnNames.period].concat(L.value.map(b=>b.name)).concat(t.value.table.columnNames.total);return{head:e,body:o.slice(0,n.value.end-n.value.start),config:r,colNames:y}}),Re=l.computed(()=>{if(L.value.length===0)return{head:[],body:[],config:{},columnNames:[]};const e=L.value.map(r=>({label:r.name,color:r.color,type:r.type})),o=[];for(let r=n.value.start;r<n.value.end;r+=1){const y=[t.value.style.chart.grid.y.timeLabels.values[r]||r+1];L.value.forEach(b=>{y.push(Number((b.series[r]||0).toFixed(t.value.table.rounding)))}),o.push(y)}return{head:e,body:o}});function Fe(){const e=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=["",...Re.value.head.map(R=>R.label)],r=Re.value.body,y=e.concat([o]).concat(r),b=u.createCsvContent(y);u.downloadCsv({csvContent:b,title:t.value.style.chart.title.text||"vue-ui-xy-canvas"})}function it(){return L.value}function Oe(){i.value.showTable=!i.value.showTable}function De(){i.value.showDataLabels=!i.value.showDataLabels}function Ve(){i.value.stacked=!i.value.stacked}function Ae(){i.value.showTooltip=!i.value.showTooltip}const ge=l.ref(!1);function Le(){ge.value=!ge.value}return be({getData:it,generateCsv:Fe,generatePdf:$e,generateImage:ze,toggleTable:Oe,toggleLabels:De,toggleStack:Ve,toggleTooltip:Ae,toggleAnnotator:Le}),(e,o)=>(l.openBlock(),l.createElementBlock("div",{style:l.normalizeStyle(`width:100%; position:relative; ${t.value.responsive?"height: 100%":""}`),ref_key:"xy",ref:_,id:`xy_canvas_${D.value}`,class:l.normalizeClass(`vue-ui-donut ${te.value?"vue-data-ui-wrapper-fullscreen":""}`),onMouseenter:o[5]||(o[5]=()=>l.unref(P)(!0)),onMouseleave:o[6]||(o[6]=()=>l.unref(P)(!1))},[t.value.style.chart.title.text?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:ce,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};`)},[(l.openBlock(),l.createBlock(ht._sfc_main,{key:`title_${v.value}`,config:{title:{cy:"xy-canvas-title",...t.value.style.chart.title},subtitle:{cy:"xy-canvas-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):l.createCommentVNode("",!0),t.value.userOptions.show&&C.value&&(l.unref(T)||l.unref(M))?(l.openBlock(),l.createBlock(Ye.UserOptions,{ref:"details",key:`user_option_${re.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:l.unref(we),isImaging:l.unref(Se),uid:D.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasLabel:t.value.userOptions.buttons.labels,hasStack:$.dataset.length>1&&t.value.userOptions.buttons.stack,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasTable:n.value.end-n.value.start<200&&t.value.userOptions.buttons.table,isFullscreen:te.value,isTooltip:i.value.showTooltip,isStacked:i.value.stacked,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:ge.value,onToggleFullscreen:Ue,onGeneratePdf:l.unref($e),onGenerateCsv:Fe,onGenerateImage:l.unref(ze),onToggleTable:Oe,onToggleLabels:De,onToggleStack:Ve,onToggleTooltip:Ae,onToggleAnnotator:Le,style:l.normalizeStyle({visibility:l.unref(T)?l.unref(M)?"visible":"hidden":"visible"})},l.createSlots({_:2},[e.$slots.menuIcon?{name:"menuIcon",fn:l.withCtx(({isOpen:r,color:y})=>[l.renderSlot(e.$slots,"menuIcon",l.normalizeProps(l.guardReactiveProps({isOpen:r,color:y})),void 0,!0)]),key:"0"}:void 0,e.$slots.optionTooltip?{name:"optionTooltip",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,e.$slots.optionPdf?{name:"optionPdf",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,e.$slots.optionCsv?{name:"optionCsv",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,e.$slots.optionImg?{name:"optionImg",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,e.$slots.optionTable?{name:"optionTable",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,e.$slots.optionLabels?{name:"optionLabels",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,e.$slots.optionStack?{name:"optionStack",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionStack",{},void 0,!0)]),key:"7"}:void 0,e.$slots.optionFullscreen?{name:"optionFullscreen",fn:l.withCtx(({toggleFullscreen:r,isFullscreen:y})=>[l.renderSlot(e.$slots,"optionFullscreen",l.normalizeProps(l.guardReactiveProps({toggleFullscreen:r,isFullscreen:y})),void 0,!0)]),key:"8"}:void 0,e.$slots.optionAnnotator?{name:"optionAnnotator",fn:l.withCtx(({toggleAnnotator:r,isAnnotator:y})=>[l.renderSlot(e.$slots,"optionAnnotator",l.normalizeProps(l.guardReactiveProps({toggleAnnotator:r,isAnnotator:y})),void 0,!0)]),key:"9"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasLabel","hasStack","hasFullscreen","hasTable","isFullscreen","isTooltip","isStacked","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):l.createCommentVNode("",!0),l.createElementVNode("div",{class:"vue-ui-xy-canvas",style:l.normalizeStyle(`position: relative; aspect-ratio: ${Ce.value}`),ref_key:"container",ref:V},[C.value?(l.openBlock(),l.createElementBlock("canvas",{key:0,ref_key:"canvas",ref:B,style:{width:"100%",height:"100%"},onMousemove:o[0]||(o[0]=r=>nt(r)),onMouseleave:ut},null,544)):(l.openBlock(),l.createBlock(gt.default,{key:1,config:{type:"line",style:{backgroundColor:t.value.style.chart.backgroundColor,line:{axis:{color:"#CCCCCC"},path:{color:"#CCCCCC",strokeWidth:.5}}}}},null,8,["config"])),l.createVNode(vt._sfc_main,{show:i.value.showTooltip&&U.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:l.unref(B),content:A.value,isFullscreen:te.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,isCustom:l.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-before",l.normalizeProps(l.guardReactiveProps({...Z.value})),void 0,!0)]),"tooltip-after":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-after",l.normalizeProps(l.guardReactiveProps({...Z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","position","offsetY","parent","content","isFullscreen","backgroundOpacity","isCustom"])],4),l.createElementVNode("div",{ref_key:"chartSlicer",ref:de,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&H.value>1?(l.openBlock(),l.createBlock(ft.Slicer,{ref_key:"slicerComponent",ref:ae,key:`slicer_${ee.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.grid.y.timeLabels.values[n.value.start]?t.value.style.chart.grid.y.timeLabels.values[n.value.start]:"",labelRight:t.value.style.chart.grid.y.timeLabels.values[n.value.end-1]?t.value.style.chart.grid.y.timeLabels.values[n.value.end-1]:"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:H.value,min:0,valueStart:n.value.start,valueEnd:n.value.end,start:n.value.start,"onUpdate:start":o[1]||(o[1]=r=>n.value.start=r),end:n.value.end,"onUpdate:end":o[2]||(o[2]=r=>n.value.end=r),refreshStartPoint:t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex:0,refreshEndPoint:t.value.style.chart.zoom.endIndex!==null?t.value.style.chart.zoom.endIndex+1:H.value,enableRangeHandles:t.value.style.chart.zoom.enableRangeHandles,enableSelectionDrag:t.value.style.chart.zoom.enableSelectionDrag,onReset:Te},{"reset-action":l.withCtx(({reset:r})=>[l.renderSlot(e.$slots,"reset-action",l.normalizeProps(l.guardReactiveProps({reset:r})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag"])):l.createCommentVNode("",!0)],4),l.createElementVNode("div",{ref_key:"chartLegend",ref:ve},[t.value.style.chart.legend.show&&C.value?(l.openBlock(),l.createBlock(dt.Legend,{legendSet:Ne.value,config:st.value,key:`legend_${d.value}`,onClickMarker:o[3]||(o[3]=({i:r})=>Ee(r))},{item:l.withCtx(({legend:r,index:y})=>[l.createElementVNode("div",{onClick:b=>r.segregate(),style:l.normalizeStyle(`opacity:${I.value.includes(y)?.5:1}`)},l.toDisplayString(r.name),13,Tt)]),_:1},8,["legendSet","config"])):l.renderSlot(e.$slots,"legend",{key:1,legend:Ne.value},void 0,!0)],512),e.$slots.watermark?(l.openBlock(),l.createElementBlock("div",Bt,[l.renderSlot(e.$slots,"watermark",l.normalizeProps(l.guardReactiveProps({isPrinting:l.unref(we)||l.unref(Se)})),void 0,!0)])):l.createCommentVNode("",!0),e.$slots.source?(l.openBlock(),l.createElementBlock("div",{key:3,ref_key:"source",ref:h,dir:"auto"},[l.renderSlot(e.$slots,"source",{},void 0,!0)],512)):l.createCommentVNode("",!0),n.value.end-n.value.start<200?(l.openBlock(),l.createBlock(yt.default,{key:4,hideDetails:"",config:{open:i.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:l.withCtx(()=>[(l.openBlock(),l.createBlock(pt.DataTable,{key:`table_${s.value}`,colNames:pe.value.colNames,head:pe.value.head,body:pe.value.body,config:pe.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[4]||(o[4]=r=>i.value.showTable=!1)},{th:l.withCtx(({th:r})=>[l.createElementVNode("div",{innerHTML:r},null,8,It)]),td:l.withCtx(({td:r})=>[l.createTextVNode(l.toDisplayString(r),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):l.createCommentVNode("",!0),t.value.userOptions.buttons.annotator&&L.value.length?(l.openBlock(),l.createBlock(Mt,{key:5,parent:_.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:ge.value,onClose:Le},null,8,["parent","backgroundColor","color","active"])):l.createCommentVNode("",!0)],46,Pt))}},Nt=Xe._export_sfc(Et,[["__scopeId","data-v-73b06dd8"]]);exports.default=Nt;
9
+ `)),le=l.computed(()=>x.dataset.map((e,o)=>({...e,series:u.largestTriangleThreeBucketsArray({data:u.sanitizeArray(e.series),threshold:t.value.downsample.threshold}),absoluteIndex:o,color:u.convertColorToHex(e.color||Me.value[o]||u.palette[o]||u.palette[o%u.palette.length])})));l.watch(H,e=>{e&&Te()});const L=l.computed(()=>u.assignStackRatios(le.value.filter((e,o)=>!I.value.includes(e.absoluteIndex))).map((e,o)=>({...e,series:e.series.slice(n.value.start,n.value.end)})).map((e,o)=>{let r=[null,void 0].includes(e.scaleMin)?Math.min(...e.series)||0:e.scaleMin,y=[null,void 0].includes(e.scaleMax)?Math.max(...e.series)||1:e.scaleMax;r===y&&(r=r>=0?y-1:r,y=y>=0?y:r+1),e.series.filter(W=>![null,void 0].includes(W)).map(W=>(W-r)/(y-r));const b={valueMin:r,valueMax:y},R=e.scaleSteps||t.value.style.chart.scale.ticks;let m;e.autoScaling?m=u.calculateNiceScale(b.valueMin,b.valueMax,R):m=u.calculateNiceScale(b.valueMin<0?b.valueMin:0,b.valueMax<=0?0:b.valueMax,R);const w=i.value.stacked?a.value.height*(1-e.cumulatedStackRatio):0,J=i.value.stacked?a.value.height/t.value.style.chart.stackGap:0,O=i.value.stacked?a.value.height*e.stackRatio-J:a.value.height,Q=m.min<0?Math.abs(m.min):0;let K;e.autoScaling&&i.value.stacked&&y<=0?K=a.value.bottom-w-O:K=a.value.bottom-w-O*(Q/(m.max+Q));const se=m.ticks.map((W,ct)=>({y:a.value.bottom-w-O*(ct/(m.ticks.length-1)),x:a.value.left-8,value:W})),ie=qe({hasAutoScale:i.value.stacked&&e.autoScaling,series:e.series,min:i.value.stacked?r:z.value.min,max:i.value.stacked?y:z.value.max,scale:i.value.stacked?m:z.value.scale,yOffset:w,individualHeight:O,stackIndex:i.value.stacked?o:null});return{...e,coordinatesLine:ie,min:r,max:y,localScale:m,localZero:K,localMin:Q,localYLabels:se,yOffset:w,individualHeight:O}})),n=l.ref({start:0,end:H.value});function Te(){Be()}const ae=l.ref(null);async function Be(){(t.value.style.chart.zoom.startIndex!==null||t.value.style.chart.zoom.endIndex!==null)&&ae.value?(t.value.style.chart.zoom.startIndex!==null&&(await l.nextTick(),await l.nextTick(),ae.value&&ae.value.setStartValue(t.value.style.chart.zoom.startIndex)),t.value.style.chart.zoom.endIndex!==null&&(await l.nextTick(),await l.nextTick(),ae.value&&ae.value.setEndValue(Ze(t.value.style.chart.zoom.endIndex+1)))):(n.value={start:0,end:H.value},ee.value+=1)}function Ze(e){const o=H.value;return e>o?o:e<0||t.value.style.chart.zoom.startIndex!==null&&e<t.value.style.chart.zoom.startIndex?t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex+1:1:e}const _e=l.computed(()=>L.value.filter(e=>["line","plot",void 0].includes(e.type))),N=l.computed(()=>L.value.filter(e=>e.type==="bar"));function Ge(){if(!B.value)return;const e=V.value.offsetWidth,o=V.value.offsetHeight;B.value.width=e*q.value*2,B.value.height=o*q.value*2,k.value=e*q.value*2,F.value=o*q.value*2,c.value.scale(q.value,q.value),ne()}function je(){if(c.value.clearRect(0,0,1e4,1e4),c.value.fillStyle=t.value.style.chart.backgroundColor,c.value.fillRect(0,0,a.value.canvasWidth,a.value.canvasHeight),i.value.stacked)t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength?L.value.forEach(e=>{for(let o=0;o<n.value.end-n.value.start+1;o+=1)p.line(c.value,[{x:a.value.left+a.value.slot*o,y:a.value.bottom-e.yOffset-e.individualHeight},{x:a.value.left+a.value.slot*o,y:a.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.y.verticalLines.color})}):t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start>=t.value.style.chart.grid.y.verticalLines.hideUnderXLength&&L.value.forEach(e=>{for(let o=n.value.start;o<n.value.end;o+=1)o%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0&&p.line(c.value,[{x:a.value.left+a.value.slot*(o-n.value.start)+a.value.slot/2,y:a.value.bottom-e.yOffset-e.individualHeight},{x:a.value.left+a.value.slot*(o-n.value.start)+a.value.slot/2,y:a.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.y.verticalLines.color})}),t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?L.value.forEach(e=>{e.localYLabels.forEach((o,r)=>{r<e.localYLabels.length-1&&p.rect(c.value,[{x:a.value.left,y:o.y},{x:a.value.right,y:o.y},{x:a.value.right,y:e.localYLabels[r+1].y},{x:a.value.left,y:e.localYLabels[r+1].y}],{fillColor:r%2===0?"transparent":u.setOpacity(t.value.style.chart.grid.x.horizontalLines.color,t.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})})}):L.value.forEach(e=>{e.localYLabels.slice(n.value.start,n.value.end).forEach(o=>{p.line(c.value,[{x:a.value.left,y:o.y},{x:a.value.right,y:o.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})})),t.value.style.chart.grid.zeroLine.show&&L.value.forEach(e=>{p.line(c.value,[{x:a.value.left,y:e.localZero},{x:a.value.right,y:e.localZero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]})}),t.value.style.chart.grid.y.axisLabels.show&&L.value.forEach(e=>{p.line(c.value,[{x:a.value.left,y:a.value.bottom-e.yOffset},{x:a.value.left,y:a.value.bottom-e.yOffset-e.individualHeight}],{color:e.color}),p.line(c.value,[{x:a.value.right,y:a.value.bottom-e.yOffset},{x:a.value.right,y:a.value.bottom-e.yOffset-e.individualHeight}],{color:e.color})}),L.value.forEach(e=>{p.text(c.value,e.name,k.value/35,a.value.bottom-e.yOffset-e.individualHeight/2,{align:"center",rotation:-90,color:e.color,font:`${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`})});else{if(t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=0;e<n.value.end-n.value.start+1;e+=1)p.line(c.value,[{x:a.value.left+a.value.slot*e,y:a.value.top},{x:a.value.left+a.value.slot*e,y:a.value.bottom}],{color:t.value.style.chart.grid.y.verticalLines.color});else if(t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start>=t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=n.value.start;e<n.value.end;e+=1)e%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0&&p.line(c.value,[{x:a.value.left+a.value.slot*(e-n.value.start)+a.value.slot/2,y:a.value.top},{x:a.value.left+a.value.slot*(e-n.value.start)+a.value.slot/2,y:a.value.bottom}],{color:t.value.style.chart.grid.y.verticalLines.color});t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?z.value.yLabels.forEach((e,o)=>{o<z.value.yLabels.length-1&&p.rect(c.value,[{x:a.value.left,y:e.y},{x:a.value.right,y:e.y},{x:a.value.right,y:z.value.yLabels[o+1].y},{x:a.value.left,y:z.value.yLabels[o+1].y}],{fillColor:o%2===0?"transparent":u.setOpacity(t.value.style.chart.grid.x.horizontalLines.color,t.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})}):z.value.yLabels.forEach(e=>{p.line(c.value,[{x:a.value.left,y:e.y},{x:a.value.right,y:e.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})),t.value.style.chart.grid.y.showAxis&&p.line(c.value,[{x:a.value.left,y:a.value.top},{x:a.value.left,y:a.value.bottom}],{color:t.value.style.chart.grid.y.axisColor,lineWidth:t.value.style.chart.grid.y.axisThickness}),t.value.style.chart.grid.x.showAxis&&p.line(c.value,[{x:a.value.left,y:a.value.bottom},{x:a.value.right,y:a.value.bottom}],{color:t.value.style.chart.grid.x.axisColor,lineWidth:t.value.style.chart.grid.x.axisThickness}),t.value.style.chart.grid.zeroLine.show&&p.line(c.value,[{x:a.value.left,y:z.value.zero},{x:a.value.right,y:z.value.zero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]})}t.value.style.chart.grid.y.axisName&&p.text(c.value,t.value.style.chart.grid.y.axisName,k.value-k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio*1.2,a.value.bottom-a.value.height/2,{font:`${t.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center",rotation:90}),t.value.style.chart.grid.x.axisName&&p.text(c.value,t.value.style.chart.grid.x.axisName,k.value/2,F.value,{font:`${t.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center"})}function Qe(e){for(let o=0;o<e.coordinatesLine.length;o+=1){const r=(f.value===o?k.value/150:t.value.style.chart.line.plots.show?k.value/200:0)*t.value.style.chart.line.plots.radiusRatio;p.circle(c.value,{x:e.coordinatesLine[o].x,y:e.coordinatesLine[o].y},r,{color:t.value.style.chart.backgroundColor,fillStyle:e.color})}}function Je(){L.value.forEach(e=>{e.showYMarker&&ue(e)&&p.text(c.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,ue(e).value,u.dataLabel({p:e.prefix||t.value.style.chart.grid.y.axisLabels.prefix||"",v:ue(e).value,s:e.suffix||t.value.style.chart.grid.y.axisLabels.suffix||"",r:e.rounding||t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:ue(e),seriesIndex:null}),a.value.left-8+t.value.style.chart.grid.y.axisLabels.offsetX,ue(e).y,{align:"right",font:`${t.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:e.color})})}function Ke(){t.value.style.chart.grid.y.axisLabels.show&&(i.value.stacked?L.value.forEach(e=>{e.localYLabels.forEach((o,r)=>{p.text(c.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,o.value,u.dataLabel({p:e.prefix||t.value.style.chart.grid.y.axisLabels.prefix||"",v:o.value,s:e.suffix||t.value.style.chart.grid.y.axisLabels.suffix||"",r:e.rounding||t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:o,seriesIndex:r}),o.x+t.value.style.chart.grid.y.axisLabels.offsetX,o.y,{align:"right",font:`${t.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:e.color,globalAlpha:e.showYMarker&&![null,void 0].includes(f.value)?.2:1})})}):z.value.yLabels.forEach((e,o)=>{p.text(c.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.value,u.dataLabel({p:t.value.style.chart.grid.y.axisLabels.prefix||"",v:e.value,s:t.value.style.chart.grid.y.axisLabels.suffix||"",r:t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:e,seriesIndex:o}),e.x+t.value.style.chart.grid.y.axisLabels.offsetX,e.y,{align:"right",font:`${t.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.grid.y.axisLabels.color,globalAlpha:L.value.some(r=>r.showYMarker)&&![null,void 0].includes(f.value)?.2:1})}))}function et(e){for(let o=0;o<e.coordinatesLine.length;o+=1)p.text(c.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[o].value,u.dataLabel({p:e.prefix||"",v:e.coordinatesLine[o].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[o],seriesIndex:o}),e.coordinatesLine[o].x,e.coordinatesLine[o].y+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${t.value.style.chart.dataLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color})}function tt(){for(let e=n.value.start;e<n.value.end;e+=1)(n.value.end-n.value.start<t.value.style.chart.grid.y.timeLabels.modulo||n.value.end-n.value.start>=t.value.style.chart.grid.y.timeLabels.modulo&&(e%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0||e===f.value+n.value.start&&t.value.style.chart.grid.y.timeLabels.showMarker))&&p.text(c.value,t.value.style.chart.grid.y.timeLabels.values[e]||e+1,a.value.left+a.value.slot*(e-n.value.start)+a.value.slot/2,a.value.bottom+k.value/t.value.style.chart.grid.y.timeLabels.offsetY,{align:t.value.style.chart.grid.y.timeLabels.rotation===0?"center":t.value.style.chart.grid.y.timeLabels.rotation>0?"left":"right",font:`${t.value.style.chart.grid.y.timeLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.timeLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.grid.y.timeLabels.showMarker?u.setOpacity(t.value.style.chart.grid.y.timeLabels.color,f.value!==null?f.value+n.value.start===e?100:20:100):t.value.style.chart.grid.y.timeLabels.color,rotation:t.value.style.chart.grid.y.timeLabels.rotation})}function Ie(){p.line(c.value,[{x:a.value.left+a.value.slot*f.value+a.value.slot/2,y:a.value.top},{x:a.value.left+a.value.slot*f.value+a.value.slot/2,y:a.value.bottom}],{color:t.value.style.chart.selector.color,lineDash:t.value.style.chart.selector.dashed?[8,8]:[0,0],lineWidth:2})}function lt(){g.value&&p.line(c.value,[{x:a.value.left,y:g.value},{x:a.value.right,y:g.value}],{color:t.value.style.chart.selector.color,lineDash:t.value.style.chart.selector.dashed?[8,8]:[0,0],lineWidth:2})}function at(){N.value.forEach((e,o)=>{for(let r=0;r<e.coordinatesLine.length;r+=1)p.rect(c.value,[{x:a.value.left+a.value.slot*r+a.value.slot/10+(i.value.stacked?0:a.value.slot/N.value.length*o-(o===0?0:a.value.slot/(5*N.value.length)*o)),y:i.value.stacked?e.localZero:z.value.zero},{x:a.value.left+a.value.slot*r+a.value.slot/10+(i.value.stacked?0:a.value.slot/N.value.length*o-(o===0?0:a.value.slot/(5*N.value.length)*o))+a.value.slot*.8/(i.value.stacked?1:N.value.length),y:i.value.stacked?e.localZero:z.value.zero},{x:a.value.left+a.value.slot*r+a.value.slot/10+(i.value.stacked?0:a.value.slot/N.value.length*o-(o===0?0:a.value.slot/(5*N.value.length)*o))+a.value.slot*.8/(i.value.stacked?1:N.value.length),y:e.coordinatesLine[r].y},{x:a.value.left+a.value.slot*r+a.value.slot/10+(i.value.stacked?0:a.value.slot/N.value.length*o-(o===0?0:a.value.slot/(5*N.value.length)*o)),y:e.coordinatesLine[r].y}],{strokeColor:t.value.style.chart.backgroundColor,gradient:{type:"linear",start:{x:e.coordinatesLine[r].x,y:e.coordinatesLine[r].y},end:{x:e.coordinatesLine[r].x,y:i.value.stacked?e.localZero:z.value.zero},stops:[{offset:0,color:e.color},{offset:1,color:t.value.style.chart.bar.gradient.show?u.lightenHexColor(e.color,.5):e.color}]}}),i.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&p.text(c.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[r].value,u.dataLabel({p:e.prefix||"",v:e.coordinatesLine[r].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[r],seriesIndex:r}),a.value.left+a.value.slot*r+a.value.slot/10+(i.value.stacked?0:a.value.slot/N.value.length*o-(o===0?0:a.value.slot/(5*N.value.length)*o))+a.value.slot*.4/(i.value.stacked?1:N.value.length),(e.coordinatesLine[r].value<0?i.value.stacked?e.localZero:z.value.zero:e.coordinatesLine[r].y)+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${Math.round(k.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color,strokeColor:t.value.style.chart.backgroundColor,lineWidth:.8})})}function ot(e){e.useArea?i.value.stacked?p.polygon(c.value,[{x:e.coordinatesLine[0].x,y:e.localZero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:e.localZero}],{fillColor:u.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):p.polygon(c.value,[{x:e.coordinatesLine[0].x,y:z.value.zero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:z.value.zero}],{fillColor:u.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):p.line(c.value,e.coordinatesLine,{color:e.color,lineWidth:3})}function rt(){L.value.forEach((e,o)=>{p.line(c.value,[{x:a.value.left,y:a.value.bottom-e.yOffset},{x:a.value.right,y:a.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.x.horizontalLines.color,lineWidth:1})})}function ne(){je(),Y.value?(f.value!==null&&t.value.style.chart.selector.show&&Ie(),at(),i.value.stacked&&t.value.style.chart.grid.x.showAxis&&rt(),_e.value.forEach(e=>{(e.type==="line"||!e.type)&&ot(e),G.value&&(Qe(e),i.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&et(e))}),oe.value=p.cloneCanvas(B.value)):(oe.value&&(c.value.clearRect(0,0,1e4,1e4),c.value.drawImage(oe.value,0,0)),f.value!==null&&t.value.style.chart.selector.show&&Ie(),f.value!==null&&L.value.forEach(e=>{if(e.type==="line"||!e.type||e.type==="plot"){if(!e.coordinatesLine[f.value])return;e.coordinatesLine[f.value].x!==void 0&&e.coordinatesLine[f.value].y!==void 0&&p.circle(c.value,{x:e.coordinatesLine[f.value].x,y:e.coordinatesLine[f.value].y},k.value/150*t.value.style.chart.line.plots.radiusRatio,{color:t.value.style.chart.backgroundColor,fillStyle:e.color})}})),t.value.style.chart.grid.y.timeLabels.show&&tt(),t.value.style.chart.selector.show&&t.value.style.chart.selector.showHorizontalSelector&&lt(),Ke(),Je(),Y.value=!1}const he=p.debounce(()=>{G.value=!0,Ge()},H.value>200?10:1,!G.value);function ue(e){if([null,void 0].includes(f.value)||!e.coordinatesLine[f.value])return!1;const{y:o,value:r}=e.coordinatesLine[f.value];return{y:o,value:r}}function nt(e){const{left:o,top:r}=B.value.getBoundingClientRect(),y=e.clientX-o;if(g.value=(e.clientY-r)*2,(g.value<a.value.top||g.value>a.value.bottom)&&(g.value=null),y*2<a.value.left||y*2>a.value.right){U.value=!1,f.value=null;return}const b=y*2-a.value.left;if(f.value=Math.floor(b/a.value.slot),U.value=!0,!G.value)return;let R="";const m=t.value.style.chart.tooltip.customFormat;u.isFunction(m)&&u.functionReturnsString(()=>m({seriesIndex:f.value,datapoint:L.value.map(w=>({shape:w.shape||null,name:w.name,color:w.color,type:w.type||"line",value:w.series.find((J,O)=>O===f.value)})),series:L.value,config:t.value}))?A.value=m({seriesIndex:f.value,datapoint:L.value.map(w=>({shape:w.shape||null,name:w.name,color:w.color,type:w.type||"line",value:w.series.find((J,O)=>O===f.value)})),series:L.value,config:t.value}):(t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[f.value]&&(R+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; width:100%">${t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[f.value]}</div>`),R+=We.value.join(""),A.value=R),G.value=!1}l.watch(()=>f.value,e=>{he()}),l.watch(()=>n.value,e=>{Y.value=!0,ne()},{deep:!0}),l.watch(()=>i.value.showDataLabels,e=>{Y.value=!0,ne()}),l.watch(()=>g.value,e=>{e&&ne()}),l.watch(()=>i.value.stacked,e=>{Y.value=!0,G.value=!0,he()});function ut(){U.value=!1,f.value=null,A.value="",g.value=null,ne()}const fe=l.ref(null),ye=l.ref(null);l.onMounted(()=>{ke()});function ke(){if(u.objectIsEmpty(x.dataset)?u.error({componentName:"VueUiXyCanvas",type:"dataset"}):B.value&&(c.value=B.value.getContext("2d",{willReadFrequently:!0})),t.value.responsive){const e=p.throttle(()=>{const{width:o,height:r}=p.useResponsive({chart:Z.value,title:t.value.style.chart.title.text?ce.value:null,legend:t.value.style.chart.legend.show?ve.value:null,slicer:t.value.style.chart.zoom.show&&H.value>1?de.value:null,source:h.value});requestAnimationFrame(()=>{Ce.value=`${o} / ${r}`})});fe.value=new ResizeObserver(e),fe.value.observe(Z.value.parentNode)}ye.value=new ResizeObserver(e=>{for(const o of e)o.contentBoxSize&&V.value&&(Y.value=!0,he())}),ye.value.observe(V.value),Be()}l.onBeforeUnmount(()=>{ye.value&&ye.value.disconnect(),fe.value&&fe.value.disconnect()});function Ee(e){S("selectLegend",L.value.find(o=>o.absoluteIndex===e)),I.value.includes(e)?I.value=I.value.filter(o=>o!==e):I.value.push(e),Y.value=!0,he()}const Ne=l.computed(()=>le.value.map((e,o)=>({...e,name:e.name,color:u.convertColorToHex(e.color)||Me.value[o]||u.palette[o]||u.palette[o%u.palette.length],shape:e.shape||"circle",prefix:e.prefix||"",suffix:e.suffix||"",rounding:e.rounding||0})).map(e=>({...e,opacity:I.value.includes(e.absoluteIndex)?.5:1,segregate:()=>Ee(e.absoluteIndex),isSegregated:I.value.includes(e.absoluteIndex)}))),st=l.computed(()=>({cy:"donut-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":""})),pe=l.computed(()=>{const e=[""].concat(L.value.map(b=>b.name)).concat(' <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>');let o=[];for(let b=0;b<H.value;b+=1){const R=L.value.map(m=>m.series[b]??0).reduce((m,w)=>m+w,0);o.push([t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[b]??b+1].concat(L.value.map(m=>(m.series[b]??0).toFixed(t.value.table.rounding))).concat((R??0).toFixed(t.value.table.rounding)))}const r={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},y=[t.value.table.columnNames.period].concat(L.value.map(b=>b.name)).concat(t.value.table.columnNames.total);return{head:e,body:o.slice(0,n.value.end-n.value.start),config:r,colNames:y}}),Re=l.computed(()=>{if(L.value.length===0)return{head:[],body:[],config:{},columnNames:[]};const e=L.value.map(r=>({label:r.name,color:r.color,type:r.type})),o=[];for(let r=n.value.start;r<n.value.end;r+=1){const y=[t.value.style.chart.grid.y.timeLabels.values[r]||r+1];L.value.forEach(b=>{y.push(Number((b.series[r]||0).toFixed(t.value.table.rounding)))}),o.push(y)}return{head:e,body:o}});function Fe(){const e=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=["",...Re.value.head.map(R=>R.label)],r=Re.value.body,y=e.concat([o]).concat(r),b=u.createCsvContent(y);u.downloadCsv({csvContent:b,title:t.value.style.chart.title.text||"vue-ui-xy-canvas"})}function it(){return L.value}function Oe(){i.value.showTable=!i.value.showTable}function De(){i.value.showDataLabels=!i.value.showDataLabels}function Ve(){i.value.stacked=!i.value.stacked}function Ae(){i.value.showTooltip=!i.value.showTooltip}const ge=l.ref(!1);function Le(){ge.value=!ge.value}return be({getData:it,generateCsv:Fe,generatePdf:$e,generateImage:ze,toggleTable:Oe,toggleLabels:De,toggleStack:Ve,toggleTooltip:Ae,toggleAnnotator:Le}),(e,o)=>(l.openBlock(),l.createElementBlock("div",{style:l.normalizeStyle(`width:100%; position:relative; ${t.value.responsive?"height: 100%":""}`),ref_key:"xy",ref:Z,id:`xy_canvas_${D.value}`,class:l.normalizeClass(`vue-ui-donut ${te.value?"vue-data-ui-wrapper-fullscreen":""}`),onMouseenter:o[5]||(o[5]=()=>l.unref(P)(!0)),onMouseleave:o[6]||(o[6]=()=>l.unref(P)(!1))},[t.value.style.chart.title.text?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:ce,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};`)},[(l.openBlock(),l.createBlock(ht._sfc_main,{key:`title_${v.value}`,config:{title:{cy:"xy-canvas-title",...t.value.style.chart.title},subtitle:{cy:"xy-canvas-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):l.createCommentVNode("",!0),t.value.userOptions.show&&C.value&&(l.unref(T)||l.unref(M))?(l.openBlock(),l.createBlock(Ye.UserOptions,{ref:"details",key:`user_option_${re.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:l.unref(we),isImaging:l.unref(Se),uid:D.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasLabel:t.value.userOptions.buttons.labels,hasStack:$.dataset.length>1&&t.value.userOptions.buttons.stack,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasTable:n.value.end-n.value.start<200&&t.value.userOptions.buttons.table,isFullscreen:te.value,isTooltip:i.value.showTooltip,isStacked:i.value.stacked,titles:{...t.value.userOptions.buttonTitles},chartElement:Z.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:ge.value,onToggleFullscreen:Ue,onGeneratePdf:l.unref($e),onGenerateCsv:Fe,onGenerateImage:l.unref(ze),onToggleTable:Oe,onToggleLabels:De,onToggleStack:Ve,onToggleTooltip:Ae,onToggleAnnotator:Le,style:l.normalizeStyle({visibility:l.unref(T)?l.unref(M)?"visible":"hidden":"visible"})},l.createSlots({_:2},[e.$slots.menuIcon?{name:"menuIcon",fn:l.withCtx(({isOpen:r,color:y})=>[l.renderSlot(e.$slots,"menuIcon",l.normalizeProps(l.guardReactiveProps({isOpen:r,color:y})),void 0,!0)]),key:"0"}:void 0,e.$slots.optionTooltip?{name:"optionTooltip",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,e.$slots.optionPdf?{name:"optionPdf",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,e.$slots.optionCsv?{name:"optionCsv",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,e.$slots.optionImg?{name:"optionImg",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,e.$slots.optionTable?{name:"optionTable",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,e.$slots.optionLabels?{name:"optionLabels",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,e.$slots.optionStack?{name:"optionStack",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionStack",{},void 0,!0)]),key:"7"}:void 0,e.$slots.optionFullscreen?{name:"optionFullscreen",fn:l.withCtx(({toggleFullscreen:r,isFullscreen:y})=>[l.renderSlot(e.$slots,"optionFullscreen",l.normalizeProps(l.guardReactiveProps({toggleFullscreen:r,isFullscreen:y})),void 0,!0)]),key:"8"}:void 0,e.$slots.optionAnnotator?{name:"optionAnnotator",fn:l.withCtx(({toggleAnnotator:r,isAnnotator:y})=>[l.renderSlot(e.$slots,"optionAnnotator",l.normalizeProps(l.guardReactiveProps({toggleAnnotator:r,isAnnotator:y})),void 0,!0)]),key:"9"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasLabel","hasStack","hasFullscreen","hasTable","isFullscreen","isTooltip","isStacked","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):l.createCommentVNode("",!0),l.createElementVNode("div",{class:"vue-ui-xy-canvas",style:l.normalizeStyle(`position: relative; aspect-ratio: ${Ce.value}`),ref_key:"container",ref:V},[C.value?(l.openBlock(),l.createElementBlock("canvas",{key:0,ref_key:"canvas",ref:B,style:{width:"100%",height:"100%"},onMousemove:o[0]||(o[0]=r=>nt(r)),onMouseleave:ut},null,544)):(l.openBlock(),l.createBlock(gt.default,{key:1,config:{type:"line",style:{backgroundColor:t.value.style.chart.backgroundColor,line:{axis:{color:"#CCCCCC"},path:{color:"#CCCCCC",strokeWidth:.5}}}}},null,8,["config"])),l.createVNode(vt._sfc_main,{show:i.value.showTooltip&&U.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:l.unref(B),content:A.value,isFullscreen:te.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,isCustom:l.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-before",l.normalizeProps(l.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-after",l.normalizeProps(l.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","position","offsetY","parent","content","isFullscreen","backgroundOpacity","isCustom"])],4),l.createElementVNode("div",{ref_key:"chartSlicer",ref:de,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&H.value>1?(l.openBlock(),l.createBlock(ft.Slicer,{ref_key:"slicerComponent",ref:ae,key:`slicer_${ee.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.grid.y.timeLabels.values[n.value.start]?t.value.style.chart.grid.y.timeLabels.values[n.value.start]:"",labelRight:t.value.style.chart.grid.y.timeLabels.values[n.value.end-1]?t.value.style.chart.grid.y.timeLabels.values[n.value.end-1]:"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:H.value,min:0,valueStart:n.value.start,valueEnd:n.value.end,start:n.value.start,"onUpdate:start":o[1]||(o[1]=r=>n.value.start=r),end:n.value.end,"onUpdate:end":o[2]||(o[2]=r=>n.value.end=r),refreshStartPoint:t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex:0,refreshEndPoint:t.value.style.chart.zoom.endIndex!==null?t.value.style.chart.zoom.endIndex+1:H.value,enableRangeHandles:t.value.style.chart.zoom.enableRangeHandles,enableSelectionDrag:t.value.style.chart.zoom.enableSelectionDrag,onReset:Te},{"reset-action":l.withCtx(({reset:r})=>[l.renderSlot(e.$slots,"reset-action",l.normalizeProps(l.guardReactiveProps({reset:r})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag"])):l.createCommentVNode("",!0)],4),l.createElementVNode("div",{ref_key:"chartLegend",ref:ve},[t.value.style.chart.legend.show&&C.value?(l.openBlock(),l.createBlock(dt.Legend,{legendSet:Ne.value,config:st.value,key:`legend_${d.value}`,onClickMarker:o[3]||(o[3]=({i:r})=>Ee(r))},{item:l.withCtx(({legend:r,index:y})=>[l.createElementVNode("div",{onClick:b=>r.segregate(),style:l.normalizeStyle(`opacity:${I.value.includes(y)?.5:1}`)},l.toDisplayString(r.name),13,Tt)]),_:1},8,["legendSet","config"])):l.renderSlot(e.$slots,"legend",{key:1,legend:Ne.value},void 0,!0)],512),e.$slots.watermark?(l.openBlock(),l.createElementBlock("div",Bt,[l.renderSlot(e.$slots,"watermark",l.normalizeProps(l.guardReactiveProps({isPrinting:l.unref(we)||l.unref(Se)})),void 0,!0)])):l.createCommentVNode("",!0),e.$slots.source?(l.openBlock(),l.createElementBlock("div",{key:3,ref_key:"source",ref:h,dir:"auto"},[l.renderSlot(e.$slots,"source",{},void 0,!0)],512)):l.createCommentVNode("",!0),n.value.end-n.value.start<200?(l.openBlock(),l.createBlock(yt.default,{key:4,hideDetails:"",config:{open:i.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:l.withCtx(()=>[(l.openBlock(),l.createBlock(pt.DataTable,{key:`table_${s.value}`,colNames:pe.value.colNames,head:pe.value.head,body:pe.value.body,config:pe.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[4]||(o[4]=r=>i.value.showTable=!1)},{th:l.withCtx(({th:r})=>[l.createElementVNode("div",{innerHTML:r},null,8,It)]),td:l.withCtx(({td:r})=>[l.createTextVNode(l.toDisplayString(r),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):l.createCommentVNode("",!0),t.value.userOptions.buttons.annotator&&L.value.length?(l.openBlock(),l.createBlock(Mt,{key:5,parent:Z.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:ge.value,onClose:Le},null,8,["parent","backgroundColor","color","active"])):l.createCommentVNode("",!0)],46,Pt))}},Nt=Xe._export_sfc(Et,[["__scopeId","data-v-73b06dd8"]]);exports.default=Nt;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vue-data-ui",
3
3
  "private": false,
4
- "version": "2.6.34",
4
+ "version": "2.6.35",
5
5
  "type": "module",
6
6
  "description": "A user-empowering data visualization Vue 3 components library for eloquent data storytelling",
7
7
  "keywords": [
@@ -95,7 +95,7 @@
95
95
  "vue": ">=3.3.0"
96
96
  },
97
97
  "devDependencies": {
98
- "@vitejs/plugin-vue": "^5.2.1",
98
+ "@vitejs/plugin-vue": "^5.2.3",
99
99
  "canvg": "^4.0.3",
100
100
  "cypress": "^14.0.3",
101
101
  "html2canvas": "^1.4.1",
@@ -103,7 +103,7 @@
103
103
  "remove-attr": "^0.0.13",
104
104
  "sass": "^1.57.1",
105
105
  "simple-git": "^3.24.0",
106
- "vite": "^6.2.5",
106
+ "vite": "^6.2.6",
107
107
  "vitest": "^3.1.1",
108
108
  "vue": "^3.5.13"
109
109
  }
@@ -1 +0,0 @@
1
- "use strict";const n=require("vue"),S=require("./BaseIcon-CualbCzD.cjs"),K=require("./PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-B14szPRR.cjs"),z=require("./index-BKVs-xif.cjs"),T=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),X={key:0,"data-html2canvas-ignore":"",class:"vue-ui-pen-and-paper-actions"},Y={class:"vue-ui-pen-and-paper-action",style:{padding:"0 !important"}},O=["disabled"],W={__name:"PenAndPaper",props:{svgRef:{type:[Object,null],required:!0},color:{type:String,default:"#2D353C"},backgroundColor:{type:String,default:"#FFFFFF"},active:{type:Boolean,default:!1},scale:{type:Number,default:1}},emits:["close"],setup(v,{emit:F}){const l=v,Q=F,A=n.ref([]),h=n.ref([]),C=n.ref(l.color),w=n.ref(2),R=n.ref(!1),$=n.ref(""),r=n.ref(null),c=n.ref(null),B=n.ref(null),k=n.computed(()=>z.lightenHexColor(l.color,.6));function V(){if(!r.value)return;const o=r.value.querySelector(".vue-data-ui-mask");if(o&&r.value.removeChild(o),l.active){const t=document.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("class","vue-data-ui-mask"),t.setAttribute("width","100%"),t.setAttribute("height","100%"),t.setAttribute("fill","transparent"),t.setAttribute("pointer-events","all"),r.value.insertBefore(t,r.value.firstChild)}}function N(o){var s;const t=l.svgRef;if(!t)return{x:0,y:0};const a=t.createSVGPoint();a.x=o.clientX,a.y=o.clientY;const e=(s=t.getScreenCTM())==null?void 0:s.inverse();return e?a.matrixTransform(e):{x:0,y:0}}function M(o){const t=o.trim().split(/\s+/);if(t.length<4)return o;const a=t.slice(1).map(Number);if(a.length%2!==0)return o;const e=I(a),s=[`M ${e[0]} ${e[1]}`];for(let d=2;d<e.length-2;d+=2){const p=e[d-2],m=e[d-1],f=e[d],g=e[d+1],y=(p+f)/2,x=(m+g)/2;s.push(`Q ${p} ${m} ${y} ${x}`)}const u=e[e.length-2],i=e[e.length-1];return s.push(`L ${u} ${i}`),s.join(" ")}function I(o,t=1){const a=[...o];for(let e=2;e<o.length-2;e+=2){const s=o[e],u=o[e+1],i=o[e-2],d=o[e-1],p=o[e+2],m=o[e+3];a[e]=s+t*((i+p)/2-s),a[e+1]=u+t*((d+m)/2-u)}return a}function D(o){const t=o.trim().split(/\s+/);let a="",e="",s=null,u=null;for(let i=0;i<t.length;i+=1){const d=t[i];if(isNaN(d)){if(e=d,e==="M"||e==="L")s=parseFloat(t[++i]),u=parseFloat(t[++i]),a+=`${e}${s} ${u}`;else if(e==="Q"){const p=parseFloat(t[++i]),m=parseFloat(t[++i]),f=parseFloat(t[++i]),g=parseFloat(t[++i]);p===s&&m===u?a+=`t${f-s} ${g-u}`:a+=`q${p-s} ${m-u} ${f-s} ${g-u}`,s=f,u=g}}else{const p=parseFloat(d),m=parseFloat(t[++i]);if(e==="L"){const f=p-s,g=m-u;f===0?a+=`v${g}`:g===0?a+=`h${f}`:a+=`l${f} ${g}`,s=p,u=m}else if(e==="Q"){const f=p,g=m,y=parseFloat(t[++i]),x=parseFloat(t[++i]);f===s&&g===u?a+=`t${y-s} ${x-u}`:a+=`q${f-s} ${g-u} ${y-s} ${x-u}`,s=y,u=x}}}return a}function E(o){if(!l.active||!r.value)return;R.value=!0;const{x:t,y:a}=N(o);B.value={x:t,y:a},$.value=`M ${t} ${a}`,c.value=document.createElementNS("http://www.w3.org/2000/svg","path"),c.value.setAttribute("stroke",C.value),c.value.setAttribute("stroke-width",w.value*l.scale),c.value.setAttribute("fill","none"),c.value.setAttribute("stroke-linecap","round"),c.value.setAttribute("stroke-linejoin","round"),c.value.setAttribute("class","vue-data-ui-doodle"),r.value.appendChild(c.value)}function L(o){if(!R.value||!r.value||!c.value)return;const{x:t,y:a}=N(o);$.value+=` ${t} ${a}`,c.value.setAttribute("d",$.value)}function b(o){if(R.value&&r.value&&c.value){const{x:t,y:a}=N(o);if(B.value&&B.value.x===t&&B.value.y===a){const e=document.createElementNS("http://www.w3.org/2000/svg","circle");e.setAttribute("cx",t),e.setAttribute("cy",a),e.setAttribute("r",w.value*l.scale/2),e.setAttribute("fill",C.value),e.setAttribute("class","vue-data-ui-doodle"),r.value.appendChild(e),A.value.push(e)}else{const e=c.value;e.setAttribute("d",D(M($.value))),A.value.push(e)}h.value=[],c.value=""}R.value=!1}function U(){if(A.value.length>0){const o=A.value.pop();h.value.push(o),r.value&&r.value.removeChild(o)}}function q(){if(h.value.length>0){const o=h.value.pop();A.value.push(o),r.value&&r.value.appendChild(o)}}function G(){r.value&&(r.value.innerHTML=""),A.value=[],h.value=[],V()}function H(){!l.svgRef||!l.active||(l.svgRef.addEventListener("mousedown",E),l.svgRef.addEventListener("mousemove",L),l.svgRef.addEventListener("mouseup",b),l.svgRef.addEventListener("mouseleave",b),l.svgRef.addEventListener("touchstart",E,{passive:!1}),l.svgRef.addEventListener("touchmove",L,{passive:!1}),l.svgRef.addEventListener("touchend",b),r.value&&(r.value.style.pointerEvents="auto"))}function P(){l.svgRef&&(l.svgRef.removeEventListener("mousedown",E),l.svgRef.removeEventListener("mousemove",L),l.svgRef.removeEventListener("mouseup",b),l.svgRef.removeEventListener("mouseleave",b),l.svgRef.removeEventListener("touchstart",E),l.svgRef.removeEventListener("touchmove",L),l.svgRef.removeEventListener("touchend",b),r.value&&(r.value.style.pointerEvents="none"))}return n.watch(()=>l.active,o=>{o?H():P()}),n.watch(()=>l.active,()=>{n.nextTick(()=>{V()})}),n.onMounted(()=>{n.nextTick(()=>{l.svgRef&&(r.value=document.createElementNS("http://www.w3.org/2000/svg","g"),r.value.setAttribute("class","vue-data-ui-doodles"),r.value.style.cursor="url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAABg2lDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV9TpSIVh2YQcchQnSyIijhKFYtgobQVWnUwufQLmjQkKS6OgmvBwY/FqoOLs64OroIg+AHi6OSk6CIl/i8ptIjx4Lgf7+497t4BQrPKNKtnAtB020wn4lIuvyqFXhGGiAhCiMnMMpKZxSx8x9c9Any9i/Es/3N/jgG1YDEgIBHPMcO0iTeIZzZtg/M+scjKskp8Tjxu0gWJH7muePzGueSywDNFM5ueJxaJpVIXK13MyqZGPE0cVTWd8oWcxyrnLc5atc7a9+QvDBf0lQzXaY4ggSUkkYIEBXVUUIWNGK06KRbStB/38Q+7/hS5FHJVwMixgBo0yK4f/A9+d2sVpya9pHAc6H1xnI9RILQLtBqO833sOK0TIPgMXOkdf60JzH6S3uho0SNgcBu4uO5oyh5wuQMMPRmyKbtSkKZQLALvZ/RNeSByC/Sveb2193H6AGSpq+Ub4OAQGCtR9rrPu/u6e/v3TLu/H5C7crM1WjgWAAAABmJLR0QAqwB5AHWF+8OUAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5gwUExIUagzGcQAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAABfSURBVBjTldAxDoNQDIPhL0+q1L33P1AvAhN7xfK6WAgoLfSfrNiykpQtE+7RLzx2vgF9D3o8lWDmn1QVVMP0LZQGmNtqp1/cmou0XHdG/+sYeGZwFBqPCub8rkcvvAGvsi1VYarR8wAAAABJRU5ErkJggg==') 5 5, auto",l.svgRef.appendChild(r.value),P())})}),n.onBeforeUnmount(()=>{r.value&&l.svgRef&&(l.svgRef.removeChild(r.value),P())}),(o,t)=>v.active?(n.openBlock(),n.createElementBlock("div",X,[n.createElementVNode("button",{class:"vue-ui-pen-and-paper-action",onClick:t[0]||(t[0]=a=>Q("close")),style:n.normalizeStyle({backgroundColor:v.backgroundColor,border:`1px solid ${k.value}`})},[n.createVNode(S.default,{name:"close",stroke:v.color},null,8,["stroke"])],4),n.createElementVNode("button",Y,[n.createVNode(K.ColorPicker,{value:C.value,"onUpdate:value":t[1]||(t[1]=a=>C.value=a),backgroundColor:v.backgroundColor,buttonBorderColor:k.value},null,8,["value","backgroundColor","buttonBorderColor"])]),n.createElementVNode("button",{class:n.normalizeClass(["vue-ui-pen-and-paper-action",{"vue-ui-pen-and-paper-action-disabled":!A.value.length}]),disabled:!A.value.length,onClick:U,style:n.normalizeStyle({backgroundColor:v.backgroundColor,border:`1px solid ${k.value}`})},[n.createVNode(S.default,{name:"restart",stroke:v.color},null,8,["stroke"])],14,O),n.createElementVNode("button",{class:n.normalizeClass(["vue-ui-pen-and-paper-action",{"vue-ui-pen-and-paper-action-disabled":!h.value.length}]),onClick:q,style:n.normalizeStyle({backgroundColor:v.backgroundColor,border:`1px solid ${k.value}`})},[n.createVNode(S.default,{name:"restart",stroke:v.color,style:{transform:"scaleX(-1)"}},null,8,["stroke"])],6),n.createElementVNode("button",{class:n.normalizeClass(["vue-ui-pen-and-paper-action",{"vue-ui-pen-and-paper-action-disabled":!A.value.length}]),onClick:G,style:n.normalizeStyle({backgroundColor:v.backgroundColor,border:`1px solid ${k.value}`})},[n.createVNode(S.default,{name:"trash",stroke:v.color},null,8,["stroke"])],6),n.withDirectives(n.createElementVNode("input",{ref:"range",type:"range",class:"vertical-range",min:.5,max:12,step:.1,"onUpdate:modelValue":t[2]||(t[2]=a=>w.value=a),style:n.normalizeStyle({accentColor:v.color})},null,4),[[n.vModelText,w.value]])])):n.createCommentVNode("",!0)}},j=T._export_sfc(W,[["__scopeId","data-v-3cea7589"]]);exports.PenAndPaper=j;