vue-data-ui 2.4.65 → 2.4.67

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 (157) hide show
  1. package/README.md +49 -2
  2. package/dist/{Arrow-BKPURRQ6.cjs → Arrow-BgFoJ_7c.cjs} +1 -1
  3. package/dist/{Arrow-C7ihyW4O.js → Arrow-Pw0XdelV.js} +1 -1
  4. package/dist/{BaseIcon-CyTdOpDr.cjs → BaseIcon-Bo_1SPIG.cjs} +1 -1
  5. package/dist/{BaseIcon-DpaRUsHC.js → BaseIcon-Dog_ErJD.js} +1 -1
  6. package/dist/{DataTable-CwzQ-L0W.cjs → DataTable-1WuyQJQK.cjs} +1 -1
  7. package/dist/{DataTable-DX_jYNWG.js → DataTable-BLV7zzyw.js} +2 -2
  8. package/dist/{Legend-BMTBtkoQ.cjs → Legend-DoFd_NOd.cjs} +1 -1
  9. package/dist/{Legend-DGUxLqhs.js → Legend-ynYWBX3Z.js} +2 -2
  10. package/dist/{PackageVersion-D_9QTWVm.cjs → PackageVersion-BachziuZ.cjs} +1 -1
  11. package/dist/{PackageVersion-B9_Ed72C.js → PackageVersion-BazXxXqy.js} +1 -1
  12. package/dist/{PenAndPaper-CzjoEhsO.js → PenAndPaper-D4nWibJ3.js} +3 -3
  13. package/dist/{PenAndPaper-CfGYucSm.cjs → PenAndPaper-D6E7hDYd.cjs} +1 -1
  14. package/dist/{Shape-aXd72O71.js → Shape-Bz-gcdva.js} +1 -1
  15. package/dist/{Shape-CZB2KQ0L.cjs → Shape-C8aWG3A1.cjs} +1 -1
  16. package/dist/{Slicer-CopZgIzh.js → Slicer-CL0kQ_HB.js} +2 -2
  17. package/dist/{Slicer-ChxjRhai.cjs → Slicer-hEQW3UhE.cjs} +1 -1
  18. package/dist/{Title-DyUTj8GI.js → Title-CEILAOdT.js} +1 -1
  19. package/dist/{Title-BnRtxxP4.cjs → Title-CFqlh_YB.cjs} +1 -1
  20. package/dist/{Tooltip-CUoQNXZK.cjs → Tooltip-BA_0hLX8.cjs} +1 -1
  21. package/dist/{Tooltip-B-0uEV3l.js → Tooltip-CgY3ZV9q.js} +1 -1
  22. package/dist/{index-BVNcFEqn.js → index-CnwO8xcH.js} +8 -7
  23. package/dist/{index-CKgv8c-A.cjs → index-DVvHP4A_.cjs} +3 -3
  24. package/dist/style.css +1 -1
  25. package/dist/types/vue-data-ui.d.cts +11 -0
  26. package/dist/types/vue-data-ui.d.ts +11 -0
  27. package/dist/{useNestedProp-0Mn5Z6Ae.cjs → useNestedProp-CsmZqXml.cjs} +1 -1
  28. package/dist/{useNestedProp-D79dWdel.js → useNestedProp-DPMt3Iiy.js} +1 -1
  29. package/dist/{usePrinter-Bcfs_I6G.js → usePrinter-BEBjMPUP.js} +1 -1
  30. package/dist/{usePrinter-Gkda9yEJ.cjs → usePrinter-a7rkFhGa.cjs} +1 -1
  31. package/dist/vue-data-ui-BRdOwa-y.js +288 -0
  32. package/dist/vue-data-ui-DEys4N5t.cjs +9 -0
  33. package/dist/vue-data-ui.cjs +1 -1
  34. package/dist/vue-data-ui.js +41 -40
  35. package/dist/{vue-ui-3d-bar-mxTzin_H.js → vue-ui-3d-bar-CvpX7WMe.js} +9 -9
  36. package/dist/{vue-ui-3d-bar-baVCskbW.cjs → vue-ui-3d-bar-Dh0cv4h8.cjs} +1 -1
  37. package/dist/{vue-ui-accordion-GNblUy42.js → vue-ui-accordion-DDF-Fm2i.js} +3 -3
  38. package/dist/{vue-ui-accordion-xV0it5je.cjs → vue-ui-accordion-Dghh8xxy.cjs} +1 -1
  39. package/dist/{vue-ui-age-pyramid-DFBuvQgd.js → vue-ui-age-pyramid-DPWG69uQ.js} +10 -10
  40. package/dist/{vue-ui-age-pyramid-ULh6qSJs.cjs → vue-ui-age-pyramid-a4H5S4cY.cjs} +1 -1
  41. package/dist/{vue-ui-annotator-C89rtAuX.cjs → vue-ui-annotator-C0sEr9cJ.cjs} +1 -1
  42. package/dist/{vue-ui-annotator-XbCqxBQ0.js → vue-ui-annotator-DUePPHtb.js} +1 -1
  43. package/dist/{vue-ui-bullet-D_CS85II.js → vue-ui-bullet-BbaaoPyS.js} +8 -8
  44. package/dist/{vue-ui-bullet-DxRqDaiw.cjs → vue-ui-bullet-D4-xLewd.cjs} +1 -1
  45. package/dist/{vue-ui-candlestick-CZxpFMKR.cjs → vue-ui-candlestick-DsBReIGb.cjs} +1 -1
  46. package/dist/{vue-ui-candlestick-C8mUQTPF.js → vue-ui-candlestick-tUuVLgBm.js} +11 -11
  47. package/dist/{vue-ui-carousel-table-DKcc-jNW.cjs → vue-ui-carousel-table-Bz2AtsF0.cjs} +1 -1
  48. package/dist/{vue-ui-carousel-table-D5iLQe38.js → vue-ui-carousel-table-_uE3nbkS.js} +4 -4
  49. package/dist/{vue-ui-chestnut-BqGCLMiu.js → vue-ui-chestnut-3lzZH1Ax.js} +8 -8
  50. package/dist/{vue-ui-chestnut-BFV6pTfc.cjs → vue-ui-chestnut-BL0oYXve.cjs} +1 -1
  51. package/dist/{vue-ui-cursor-BJjzKpLm.cjs → vue-ui-cursor-B6WmdWgg.cjs} +1 -1
  52. package/dist/{vue-ui-cursor-BysQ-bDH.js → vue-ui-cursor-Co96syV2.js} +2 -2
  53. package/dist/{vue-ui-dashboard-zrJGrAmc.js → vue-ui-dashboard-BL0Fl8-5.js} +2 -2
  54. package/dist/{vue-ui-dashboard-C0L_0gyc.cjs → vue-ui-dashboard-CxVP2i4u.cjs} +1 -1
  55. package/dist/{vue-ui-digits-B5P9UheE.js → vue-ui-digits-B9fsrbIE.js} +2 -2
  56. package/dist/{vue-ui-digits-BG_xts2G.cjs → vue-ui-digits-BJg4hobZ.cjs} +1 -1
  57. package/dist/{vue-ui-donut-B9M9CW9D.cjs → vue-ui-donut-BdWF8vMH.cjs} +1 -1
  58. package/dist/{vue-ui-donut-7tNjrx1E.js → vue-ui-donut-D3Hz4Vfa.js} +12 -12
  59. package/dist/{vue-ui-donut-evolution-CEvGFdxK.cjs → vue-ui-donut-evolution-BlwoTXwM.cjs} +1 -1
  60. package/dist/{vue-ui-donut-evolution-C7FpJ59u.js → vue-ui-donut-evolution-Dw4I7fhN.js} +11 -11
  61. package/dist/{vue-ui-dumbbell-CdxHbLz6.js → vue-ui-dumbbell-Bl6xGSLF.js} +10 -10
  62. package/dist/{vue-ui-dumbbell-DP27C8NG.cjs → vue-ui-dumbbell-COjyZaXJ.cjs} +1 -1
  63. package/dist/{vue-ui-flow-cKQSDKfP.js → vue-ui-flow-D2zRJ6wq.js} +9 -9
  64. package/dist/{vue-ui-flow-yW5Pa_MJ.cjs → vue-ui-flow-D5u54RzI.cjs} +1 -1
  65. package/dist/{vue-ui-funnel-73aPtRj5.cjs → vue-ui-funnel-CSZWnJYH.cjs} +1 -1
  66. package/dist/{vue-ui-funnel-qPYVhQpD.js → vue-ui-funnel-Ds3ZEPq6.js} +9 -9
  67. package/dist/{vue-ui-galaxy-9E5GUtBD.cjs → vue-ui-galaxy-C9byGzin.cjs} +1 -1
  68. package/dist/{vue-ui-galaxy-2SRA_RYP.js → vue-ui-galaxy-pt_aAhOb.js} +11 -11
  69. package/dist/{vue-ui-gauge-CBbvp9DU.cjs → vue-ui-gauge-D888JxSB.cjs} +1 -1
  70. package/dist/{vue-ui-gauge-Cpvg4BBS.js → vue-ui-gauge-DpZjO3xY.js} +7 -7
  71. package/dist/{vue-ui-gizmo-B5v0g_Ly.js → vue-ui-gizmo-CqLVPIN1.js} +3 -3
  72. package/dist/{vue-ui-gizmo-BkNuHnnf.cjs → vue-ui-gizmo-D2-_xuYD.cjs} +1 -1
  73. package/dist/{vue-ui-heatmap-dNeKqLC0.js → vue-ui-heatmap-Cs6oP4_Y.js} +10 -10
  74. package/dist/{vue-ui-heatmap-CcUuOqGT.cjs → vue-ui-heatmap-E0PqMLPl.cjs} +1 -1
  75. package/dist/{vue-ui-history-plot-COtfhHw8.js → vue-ui-history-plot-CJSEFhv8.js} +11 -11
  76. package/dist/{vue-ui-history-plot-p18wqHFY.cjs → vue-ui-history-plot-CjTLuCZR.cjs} +1 -1
  77. package/dist/{vue-ui-kpi-HyZOfh63.js → vue-ui-kpi-BHb8giSN.js} +3 -3
  78. package/dist/{vue-ui-kpi-DCn50wZ8.cjs → vue-ui-kpi-DUe_KvC1.cjs} +1 -1
  79. package/dist/{vue-ui-mini-loader-Dp7zc34Q.js → vue-ui-mini-loader-Dg7oL6ff.js} +2 -2
  80. package/dist/{vue-ui-mini-loader-DaPxFP7e.cjs → vue-ui-mini-loader-Dz80iGWP.cjs} +1 -1
  81. package/dist/{vue-ui-molecule-Oim4-hUn.js → vue-ui-molecule-BY_0F7Mg.js} +11 -11
  82. package/dist/{vue-ui-molecule-zkdP7FYM.cjs → vue-ui-molecule-DhWn7i2n.cjs} +1 -1
  83. package/dist/{vue-ui-mood-radar-DsSO6gfa.js → vue-ui-mood-radar-C0ukSxB9.js} +11 -11
  84. package/dist/{vue-ui-mood-radar-CKdM8iDY.cjs → vue-ui-mood-radar-CLv01TXT.cjs} +1 -1
  85. package/dist/{vue-ui-nested-donuts-B5NPJfg6.js → vue-ui-nested-donuts-B7iIvgEq.js} +11 -11
  86. package/dist/{vue-ui-nested-donuts-DbTXLan2.cjs → vue-ui-nested-donuts-BmOh6Y2M.cjs} +1 -1
  87. package/dist/{vue-ui-onion-CID0DNSa.js → vue-ui-onion-B1rP-YG7.js} +11 -11
  88. package/dist/{vue-ui-onion-0Od2Vodu.cjs → vue-ui-onion-BOTGL-Ks.cjs} +1 -1
  89. package/dist/{vue-ui-parallel-coordinate-plot-WtcXCTd-.cjs → vue-ui-parallel-coordinate-plot-AjSZELcj.cjs} +1 -1
  90. package/dist/{vue-ui-parallel-coordinate-plot-DAfBgYbI.js → vue-ui-parallel-coordinate-plot-C0Yj3ecn.js} +12 -12
  91. package/dist/vue-ui-pattern-COZLnLYz.js +146 -0
  92. package/dist/vue-ui-pattern-CT3p_iOg.cjs +1 -0
  93. package/dist/{vue-ui-quadrant-063Cq0di.js → vue-ui-quadrant-C3lCo2lR.js} +12 -12
  94. package/dist/{vue-ui-quadrant-B6WNmecC.cjs → vue-ui-quadrant-C4KVaPPD.cjs} +1 -1
  95. package/dist/{vue-ui-quick-chart-CwNFF0R4.cjs → vue-ui-quick-chart-BjiYIerq.cjs} +1 -1
  96. package/dist/{vue-ui-quick-chart-DCPwhpbx.js → vue-ui-quick-chart-D0JIO11E.js} +9 -9
  97. package/dist/{vue-ui-radar-DcnVyGrM.cjs → vue-ui-radar-C1IEsGcq.cjs} +1 -1
  98. package/dist/{vue-ui-radar-BmY47r3J.js → vue-ui-radar-CVHSHTIW.js} +12 -12
  99. package/dist/{vue-ui-rating-b2SThMJw.js → vue-ui-rating-CQQnfz6s.js} +2 -2
  100. package/dist/{vue-ui-rating-D_9Fqvd_.cjs → vue-ui-rating-UOowmV6D.cjs} +1 -1
  101. package/dist/{vue-ui-relation-circle-Cg3QL_aP.cjs → vue-ui-relation-circle-BrdUzD5q.cjs} +1 -1
  102. package/dist/{vue-ui-relation-circle-B0Q2FdDW.js → vue-ui-relation-circle-CoNtvSYN.js} +7 -7
  103. package/dist/{vue-ui-rings-DlsKpDkQ.js → vue-ui-rings-Bn8O1_X5.js} +12 -12
  104. package/dist/{vue-ui-rings-BQdgj7bV.cjs → vue-ui-rings-DD-JSPqp.cjs} +1 -1
  105. package/dist/{vue-ui-scatter-E_WveJ4p.js → vue-ui-scatter-BH1LZ7XU.js} +12 -12
  106. package/dist/{vue-ui-scatter-D6Yb6VpP.cjs → vue-ui-scatter-uwcz6Dui.cjs} +1 -1
  107. package/dist/{vue-ui-screenshot-CbLsOjZv.js → vue-ui-screenshot-CupnT9Fr.js} +1 -1
  108. package/dist/{vue-ui-screenshot-DhvqiF7S.cjs → vue-ui-screenshot-Dv20cwPs.cjs} +1 -1
  109. package/dist/{vue-ui-skeleton-73YO0ovP.cjs → vue-ui-skeleton-Bw4w98Z_.cjs} +1 -1
  110. package/dist/{vue-ui-skeleton-Bgf16k10.js → vue-ui-skeleton-DyIz4SMi.js} +3 -3
  111. package/dist/{vue-ui-smiley-D-QDQ3Re.cjs → vue-ui-smiley-Ce8lEqra.cjs} +1 -1
  112. package/dist/{vue-ui-smiley-ne5pBMum.js → vue-ui-smiley-bhbvfV3Y.js} +2 -2
  113. package/dist/{vue-ui-spark-trend-BkiRBoVD.js → vue-ui-spark-trend-Cft_rb44.js} +5 -5
  114. package/dist/{vue-ui-spark-trend-Dq1hox65.cjs → vue-ui-spark-trend-D_YPkSzD.cjs} +1 -1
  115. package/dist/{vue-ui-sparkbar-DV5CtFQY.cjs → vue-ui-sparkbar-BDgJFX4N.cjs} +1 -1
  116. package/dist/{vue-ui-sparkbar--Q2alJoW.js → vue-ui-sparkbar-DgaxPc1h.js} +4 -4
  117. package/dist/{vue-ui-sparkgauge-BOcEbdij.js → vue-ui-sparkgauge-Dl20cigA.js} +4 -4
  118. package/dist/{vue-ui-sparkgauge-BVNkRW_m.cjs → vue-ui-sparkgauge-oNVmAtjA.cjs} +1 -1
  119. package/dist/{vue-ui-sparkhistogram-CUiNT8vT.cjs → vue-ui-sparkhistogram-ChgeNYIQ.cjs} +1 -1
  120. package/dist/{vue-ui-sparkhistogram-CIJmWjb4.js → vue-ui-sparkhistogram-c4jnOFhu.js} +5 -5
  121. package/dist/{vue-ui-sparkline-BFlRfhM6.cjs → vue-ui-sparkline-CJDCb22O.cjs} +1 -1
  122. package/dist/{vue-ui-sparkline-lY0wS6kU.js → vue-ui-sparkline-fHgH7VCW.js} +4 -4
  123. package/dist/{vue-ui-sparkstackbar-CGeg_k0k.cjs → vue-ui-sparkstackbar-B9uRFWik.cjs} +1 -1
  124. package/dist/{vue-ui-sparkstackbar-GHM4EY7-.js → vue-ui-sparkstackbar-kG-HctgQ.js} +5 -5
  125. package/dist/{vue-ui-stackbar-CQur8zP0.cjs → vue-ui-stackbar-B18q0nZn.cjs} +1 -1
  126. package/dist/{vue-ui-stackbar-uR3T6rG4.js → vue-ui-stackbar-Sg4hlIIU.js} +13 -13
  127. package/dist/{vue-ui-strip-plot-CBYrZEIt.cjs → vue-ui-strip-plot-BpXdYlYa.cjs} +1 -1
  128. package/dist/{vue-ui-strip-plot-CNFrYVZ6.js → vue-ui-strip-plot-BxN4hG2t.js} +11 -11
  129. package/dist/{vue-ui-table-BbTwHDCo.cjs → vue-ui-table-BL1egpui.cjs} +1 -1
  130. package/dist/{vue-ui-table-DZV-uDG2.js → vue-ui-table-QB-vjlCq.js} +1 -1
  131. package/dist/{vue-ui-table-heatmap-DQBm_9Z3.js → vue-ui-table-heatmap-BvtvK493.js} +4 -4
  132. package/dist/{vue-ui-table-heatmap-DSgQpgxG.cjs → vue-ui-table-heatmap-D-gPys1-.cjs} +1 -1
  133. package/dist/{vue-ui-table-sparkline-wWAVQ0es.js → vue-ui-table-sparkline-Bl6CBllu.js} +5 -5
  134. package/dist/{vue-ui-table-sparkline-AFK2LNsw.cjs → vue-ui-table-sparkline-Bl8bzMSu.cjs} +1 -1
  135. package/dist/{vue-ui-thermometer-CGFQfRUy.cjs → vue-ui-thermometer-CQBwx4Sr.cjs} +1 -1
  136. package/dist/{vue-ui-thermometer-DRZWIAFj.js → vue-ui-thermometer-DvkQCKJ8.js} +7 -7
  137. package/dist/{vue-ui-timer-D2_1bbpl.js → vue-ui-timer-CTPxmrXy.js} +5 -5
  138. package/dist/{vue-ui-timer-C-RRrh5f.cjs → vue-ui-timer-mGjVAf8m.cjs} +1 -1
  139. package/dist/{vue-ui-tiremarks-CIeid_A2.cjs → vue-ui-tiremarks-8Oi7eeFT.cjs} +1 -1
  140. package/dist/{vue-ui-tiremarks-CdX2b-Fq.js → vue-ui-tiremarks-DxwcalRe.js} +7 -7
  141. package/dist/{vue-ui-treemap-r8xOrE8F.cjs → vue-ui-treemap-BquPyE0p.cjs} +1 -1
  142. package/dist/{vue-ui-treemap-CgzgE20q.js → vue-ui-treemap-CaDJCGUj.js} +11 -11
  143. package/dist/{vue-ui-vertical-bar-v9LvL35a.js → vue-ui-vertical-bar-BbFt098V.js} +12 -12
  144. package/dist/{vue-ui-vertical-bar-BcxAjcoh.cjs → vue-ui-vertical-bar-D3xJyfKa.cjs} +1 -1
  145. package/dist/{vue-ui-waffle-5h_9tS3C.cjs → vue-ui-waffle-3cY5r2QB.cjs} +1 -1
  146. package/dist/{vue-ui-waffle-0mHE8fud.js → vue-ui-waffle-BmNA6NLx.js} +11 -11
  147. package/dist/{vue-ui-wheel-rL5Shua2.cjs → vue-ui-wheel-BAcTVwye.cjs} +1 -1
  148. package/dist/{vue-ui-wheel-BWL-td7-.js → vue-ui-wheel-Cb-feR-M.js} +7 -7
  149. package/dist/{vue-ui-word-cloud-2E23n-B8.cjs → vue-ui-word-cloud-DaHs0ide.cjs} +1 -1
  150. package/dist/{vue-ui-word-cloud-OkAF9hSC.js → vue-ui-word-cloud-zx7YU5O2.js} +10 -10
  151. package/dist/{vue-ui-xy-C8E2WzGt.js → vue-ui-xy-DOEHuFSz.js} +16 -16
  152. package/dist/{vue-ui-xy-canvas-I7rw1uDf.cjs → vue-ui-xy-canvas-7u6MWjcr.cjs} +1 -1
  153. package/dist/{vue-ui-xy-canvas-C_0c8FlA.js → vue-ui-xy-canvas-B_LyiCyr.js} +11 -11
  154. package/dist/{vue-ui-xy-DbJNxL5O.cjs → vue-ui-xy-wZOHLmBv.cjs} +2 -2
  155. package/package.json +1 -1
  156. package/dist/vue-data-ui-CXxR_hXg.js +0 -265
  157. package/dist/vue-data-ui-DAwVdbN1.cjs +0 -9
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CKgv8c-A.cjs"),ke=require("./Title-BnRtxxP4.cjs"),ne=require("./usePrinter-Gkda9yEJ.cjs"),me=require("./vue-ui-skeleton-73YO0ovP.cjs"),ye=require("./DataTable-CwzQ-L0W.cjs"),ge=require("./vue-ui-accordion-xV0it5je.cjs"),re=require("./useNestedProp-0Mn5Z6Ae.cjs"),$e=require("./PackageVersion-D_9QTWVm.cjs"),_e=require("./PenAndPaper-CfGYucSm.cjs"),Be=require("./useUserOptionState-BgepsfED.cjs"),be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),L=N=>(e.pushScopeId("data-v-d1a66464"),N=N(),e.popScopeId(),N),xe=["id"],Ce={key:1,style:"width:100%;background:transparent"},Ee=["xmlns","viewBox"],we=["width","height"],Ne=["id"],Ve=["stop-color"],Fe=["stop-color"],Se=["id"],Me=["stop-color"],Pe=["stop-color"],Oe=["id"],Le=["stop-color"],De=["stop-color"],ze=["id"],Te=["stop-color"],je=["stop-color"],Ae=["stop-color"],Ie={key:1},We=["id"],Ge=["stop-color"],He=["stop-color"],Ue=["id"],qe=["stop-color"],Xe=["stop-color"],Re=["id"],Ze=["stop-color"],Ye=["stop-color"],Je=["id"],Ke=L(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF"},null,-1)),Qe=L(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF33"},null,-1)),et=[Ke,Qe],tt=["x","y","font-size","font-weight","fill"],lt=["x","y"],ot=["d","stroke"],nt=["d","stroke"],rt={key:4},at={key:0},st=["stroke-dasharray","d","stroke","stroke-width"],ut=["stroke-dasharray","d","stroke","stroke-width"],it=["stroke-dasharray","d","stroke","stroke-width"],ct=["stroke-dasharray","d","stroke","stroke-width"],dt={key:1},ht=["d","stroke","stroke-width","fill"],vt=["d","stroke","stroke-width","fill"],pt=["d","stroke","stroke-width","fill"],ft={key:2},kt=["d","fill","onMouseenter","onClick"],mt=["d","fill","onMouseenter","onClick"],yt=["d","fill","onMouseenter","onClick"],gt=["d","onMouseenter","onClick"],$t=["d"],_t=["d","stroke"],Bt=["onClick"],bt=["stroke","d"],xt=["cx","cy","fill","stroke"],Ct=["x","y","width","height"],Et={key:1},wt=["d","stroke"],Nt=["d","fill","stroke"],Vt=["id"],Ft=["stop-color"],St=L(()=>e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF20"},null,-1)),Mt=["stop-color"],Pt=["cx","cy","fill"],Ot=["cx","cy","fill"],Lt={key:0},Dt=["text-anchor","x","y","fill","font-size"],zt=["text-anchor","x","y","fill","font-size"],Tt={key:2},jt=["d","fill","stroke"],At={key:5},It={key:0},Wt=["stroke-dasharray","d","stroke","stroke-width"],Gt=["stroke-dasharray","d","stroke","stroke-width"],Ht=["stroke-dasharray","d","stroke","stroke-width"],Ut=["stroke-dasharray","d","stroke","stroke-width"],qt=["d","stroke","stroke-width","fill"],Xt=["d","stroke","stroke-width","fill"],Rt={key:1},Zt=["onClick"],Yt=["id"],Jt=["stop-color"],Kt=["stop-color"],Qt=["id"],el=["stop-color"],tl=["stop-color"],ll=["stop-color"],ol=["stop-color"],nl=["stop-color"],rl=["onMouseenter","onClick","d","fill"],al=["onMouseenter","onClick","d"],sl=["onMouseenter","onClick","d","fill"],ul=["onClick"],il=["stroke","d"],cl=["cx","cy","fill","stroke"],dl=["x","y","width","height"],hl={key:1},vl=["d","stroke"],pl=["d","fill","stroke"],fl=["id"],kl=["stop-color"],ml=L(()=>e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF20"},null,-1)),yl=["stop-color"],gl=["cx","cy","fill"],$l=["cx","cy","fill"],_l={key:0},Bl=["text-anchor","x","y","fill","font-size"],bl=["text-anchor","x","y","fill","font-size"],xl={key:2},Cl=["d","fill","stroke"],El={key:4,class:"vue-data-ui-watermark"},wl={key:6,ref:"source",dir:"auto"},Nl=["innerHTML"],Vl={__name:"vue-ui-3d-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectDatapoint"],setup(N,{expose:ae,emit:F}){const f=N,{vue_ui_3d_bar:se}=s.useConfig(),S=e.computed(()=>!!f.dataset&&Object.keys(f.dataset).length),k=e.ref(s.createUid()),ue=e.ref(null),D=e.ref(null),x=e.ref(!1),I=e.ref(0),W=e.ref(0),l=e.computed({get:()=>U(),set:a=>a}),{userOptionsVisible:z,setUserOptionsVisibility:G,keepUserOptionState:H}=Be.useUserOptionState({config:l.value});function U(){const a=re.useNestedProp({userConfig:f.config,defaultConfig:se});return a.theme?{...re.useNestedProp({userConfig:s.themes.vue_ui_3d_bar[a.theme]||f.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}e.watch(()=>f.config,a=>{l.value=U(),z.value=!l.value.showOnChartHover,Y(),I.value+=1,W.value+=1},{deep:!0});const{isPrinting:q,isImaging:X,generatePdf:R,generateImage:Z}=ne.usePrinter({elementId:`3d_bar_${k.value}`,fileName:l.value.style.chart.title.text||"vue-ui-3d-bar"}),ie=e.computed(()=>s.convertCustomPalette(l.value.customPalette)),M=e.ref({showTable:l.value.table.show}),$=e.computed(()=>f.dataset.series&&f.dataset.series.length),n=e.computed(()=>({height:l.value.style.chart.box.dimensions.height,width:l.value.style.chart.box.dimensions.width,absoluteWidth:l.value.style.chart.box.dimensions.width*($.value?2:1),top:l.value.style.chart.box.dimensions.top,bottom:l.value.style.chart.box.dimensions.bottom,left:l.value.style.chart.box.dimensions.left,right:l.value.style.chart.box.dimensions.right,perspective:l.value.style.chart.box.dimensions.perspective})),g=e.computed(()=>{if($.value){const a=f.dataset.series.map(o=>o.value||0).reduce((o,u)=>o+u,0),r=f.dataset.series.map((o,u)=>({...o,id:s.createUid(),proportion:(o.value||0)/a,color:s.convertColorToHex(o.color)||ie.value[u]||s.palette[u]||s.palette[u%s.palette.length],breakdown:o.breakdown?o.breakdown.sort((i,p)=>p.value-i.value):null})).sort((o,u)=>u.value-o.value),t=[];let c=0;for(let o=0;o<r.length;o+=1)t.push({...r[o],fill:ce(c,r[o].proportion,r[o].breakdown,r[o].color)}),c+=r[o].proportion;return t}return null}),B=e.computed(()=>({right:`M${n.value.width/2},${n.value.top} ${n.value.width-n.value.right}, ${n.value.top+n.value.perspective} ${n.value.width-n.value.right},${n.value.height-n.value.bottom-n.value.perspective} ${n.value.width/2},${n.value.height-n.value.bottom}`,left:`M${n.value.width/2},${n.value.top} ${n.value.left},${n.value.top+n.value.perspective} ${n.value.left},${n.value.height-n.value.bottom-n.value.perspective} ${n.value.width/2},${n.value.height-n.value.bottom}`,side:`M${n.value.width/2},${n.value.height-n.value.bottom} ${n.value.width/2},${n.value.top+n.value.perspective*2}`,topSides:`M${n.value.left},${n.value.top+n.value.perspective} ${n.value.width/2},${n.value.top+n.value.perspective*2} ${n.value.width-n.value.right},${n.value.top+n.value.perspective}`,tubeTop:`M${n.value.left},${n.value.top+n.value.perspective} C ${n.value.left},${n.value.top-n.value.perspective/3} ${n.value.width-n.value.right},${n.value.top-n.value.perspective/3} ${n.value.width-n.value.right},${n.value.top+n.value.perspective} C ${n.value.width-n.value.right},${n.value.top+n.value.perspective*2.3} ${n.value.left},${n.value.top+n.value.perspective*2.3} ${n.value.left},${n.value.top+n.value.perspective}`,tubeLeft:`M${n.value.left},${n.value.top+n.value.perspective} ${n.value.left},${n.value.height-n.value.bottom-n.value.perspective}`,tubeRight:`M${n.value.width-n.value.right},${n.value.top+n.value.perspective} ${n.value.width-n.value.right},${n.value.height-n.value.bottom-n.value.perspective}`,tubeBottom:`M${n.value.width-n.value.right},${n.value.height-n.value.bottom-n.value.perspective} C ${n.value.width-n.value.right},${n.value.height} ${n.value.left},${n.value.height} ${n.value.left},${n.value.height-n.value.bottom-n.value.perspective}`})),E=e.ref(l.value.style.chart.animation.use?0:f.dataset.percentage);e.onMounted(()=>{Y();let a=0,r=l.value.style.chart.animation.speed,t=.005*l.value.style.chart.animation.acceleration;function c(){E.value+=r+a,a+=t,E.value<f.dataset.percentage?requestAnimationFrame(c):E.value=f.dataset.percentage}l.value.style.chart.animation.use&&(E.value=0,c())});function Y(){s.objectIsEmpty(f.dataset)?s.error({componentName:"VueUi3dBar",type:"dataset"}):f.dataset.series?f.dataset.series.forEach((a,r)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(t=>{s.error({componentName:"VueUi3dBar",type:"datasetSerieAttribute",property:t,index:r})}),a.breakdown&&a.breakdown.forEach((t,c)=>{s.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["name","value"]}).forEach(o=>{s.error({componentName:"VueUi3dBar",type:"datasetSerieAttribute",property:o,index:`${r} - ${c}`})})})}):s.getMissingDatasetAttributes({datasetObject:f.dataset,requiredAttributes:["percentage"]}).forEach(a=>{s.error({componentName:"VueUi3dBar",type:"datasetAttribute",property:a})})}function ce(a,r,t,c){const o=n.value.height-n.value.bottom-n.value.top-n.value.perspective*2,{width:u,height:i,bottom:p,right:y,left:h,perspective:v}=n.value,d=p+o*a,A=i-d-v-o*r/2,ve=A>n.value.height/2?"top":"bottom",ee=64,pe=!!t;let te=null,le=null;return pe&&(t=t.map((oe,fe)=>({...oe,value:oe.value||0,color:s.lightenHexColor(c,fe/t.length)})),te=s.makeDonut({series:t},u+n.value.absoluteWidth/4-14,ve==="top"?A-ee:A+ee,28,28,1.99999,2,1,360,105.25,14),le=s.makeDonut({series:t},u-y+20,i-d-v-o*r/2,6,6,1.99999,2,1,360,105.25,6)),{donut:te,miniDonut:le,sidePointer:{x:u-y,y:i-d-v-o*r/2,topY:i-d-v-o*r,height:o*r},apexBottom:{y:i-d,x:u/2},apexTop:{y:i-d-o*r,x:u/2},right:`M${u/2},${i-d} ${u/2},${i-d-o*r} ${u-y},${i-d-v-o*r} ${u-y},${i-d-v}Z`,left:`M${u/2},${i-d} ${u/2},${i-d-o*r} ${h}, ${i-d-v-o*r} ${h},${i-d-v}Z`,liningTop:`M${h},${i-d-v-o*r} ${u/2},${i-d-o*r} ${u-y},${i-d-v-o*r}`,liningTopShade:`M${h},${i-d-v-o*r-.5} ${u/2},${i-d-o*r-.5} ${u-y},${i-d-v-o*r-.5}`,top:`M${u/2},${i-d-o*r} ${h},${i-d-v-o*r} ${u/2},${i-d-v*2-o*r} ${u-y},${i-d-v-o*r} Z`,tubeTop:`M${h},${i-d-o*r-v} C ${h},${i-d-o*r-v*2.5} ${u-y},${i-d-o*r-v*2.5} ${u-y},${i-d-o*r-v} C ${u-y},${i-d-o*r+v/2} ${h},${i-d-o*r+v/2} ${h},${i-d-o*r-v}`,bottomTubeTop:`M ${u-y-.5},${i-d-v} C ${u-y-.5},${i-d+v/2} ${h},${i-d+v/2} ${h+.5},${i-d-v}`,tubeBody:`M
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DVvHP4A_.cjs"),ke=require("./Title-CFqlh_YB.cjs"),ne=require("./usePrinter-a7rkFhGa.cjs"),me=require("./vue-ui-skeleton-Bw4w98Z_.cjs"),ye=require("./DataTable-1WuyQJQK.cjs"),ge=require("./vue-ui-accordion-Dghh8xxy.cjs"),re=require("./useNestedProp-CsmZqXml.cjs"),$e=require("./PackageVersion-BachziuZ.cjs"),_e=require("./PenAndPaper-D6E7hDYd.cjs"),Be=require("./useUserOptionState-BgepsfED.cjs"),be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),L=N=>(e.pushScopeId("data-v-d1a66464"),N=N(),e.popScopeId(),N),xe=["id"],Ce={key:1,style:"width:100%;background:transparent"},Ee=["xmlns","viewBox"],we=["width","height"],Ne=["id"],Ve=["stop-color"],Fe=["stop-color"],Se=["id"],Me=["stop-color"],Pe=["stop-color"],Oe=["id"],Le=["stop-color"],De=["stop-color"],ze=["id"],Te=["stop-color"],je=["stop-color"],Ae=["stop-color"],Ie={key:1},We=["id"],Ge=["stop-color"],He=["stop-color"],Ue=["id"],qe=["stop-color"],Xe=["stop-color"],Re=["id"],Ze=["stop-color"],Ye=["stop-color"],Je=["id"],Ke=L(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF"},null,-1)),Qe=L(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF33"},null,-1)),et=[Ke,Qe],tt=["x","y","font-size","font-weight","fill"],lt=["x","y"],ot=["d","stroke"],nt=["d","stroke"],rt={key:4},at={key:0},st=["stroke-dasharray","d","stroke","stroke-width"],ut=["stroke-dasharray","d","stroke","stroke-width"],it=["stroke-dasharray","d","stroke","stroke-width"],ct=["stroke-dasharray","d","stroke","stroke-width"],dt={key:1},ht=["d","stroke","stroke-width","fill"],vt=["d","stroke","stroke-width","fill"],pt=["d","stroke","stroke-width","fill"],ft={key:2},kt=["d","fill","onMouseenter","onClick"],mt=["d","fill","onMouseenter","onClick"],yt=["d","fill","onMouseenter","onClick"],gt=["d","onMouseenter","onClick"],$t=["d"],_t=["d","stroke"],Bt=["onClick"],bt=["stroke","d"],xt=["cx","cy","fill","stroke"],Ct=["x","y","width","height"],Et={key:1},wt=["d","stroke"],Nt=["d","fill","stroke"],Vt=["id"],Ft=["stop-color"],St=L(()=>e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF20"},null,-1)),Mt=["stop-color"],Pt=["cx","cy","fill"],Ot=["cx","cy","fill"],Lt={key:0},Dt=["text-anchor","x","y","fill","font-size"],zt=["text-anchor","x","y","fill","font-size"],Tt={key:2},jt=["d","fill","stroke"],At={key:5},It={key:0},Wt=["stroke-dasharray","d","stroke","stroke-width"],Gt=["stroke-dasharray","d","stroke","stroke-width"],Ht=["stroke-dasharray","d","stroke","stroke-width"],Ut=["stroke-dasharray","d","stroke","stroke-width"],qt=["d","stroke","stroke-width","fill"],Xt=["d","stroke","stroke-width","fill"],Rt={key:1},Zt=["onClick"],Yt=["id"],Jt=["stop-color"],Kt=["stop-color"],Qt=["id"],el=["stop-color"],tl=["stop-color"],ll=["stop-color"],ol=["stop-color"],nl=["stop-color"],rl=["onMouseenter","onClick","d","fill"],al=["onMouseenter","onClick","d"],sl=["onMouseenter","onClick","d","fill"],ul=["onClick"],il=["stroke","d"],cl=["cx","cy","fill","stroke"],dl=["x","y","width","height"],hl={key:1},vl=["d","stroke"],pl=["d","fill","stroke"],fl=["id"],kl=["stop-color"],ml=L(()=>e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF20"},null,-1)),yl=["stop-color"],gl=["cx","cy","fill"],$l=["cx","cy","fill"],_l={key:0},Bl=["text-anchor","x","y","fill","font-size"],bl=["text-anchor","x","y","fill","font-size"],xl={key:2},Cl=["d","fill","stroke"],El={key:4,class:"vue-data-ui-watermark"},wl={key:6,ref:"source",dir:"auto"},Nl=["innerHTML"],Vl={__name:"vue-ui-3d-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectDatapoint"],setup(N,{expose:ae,emit:F}){const f=N,{vue_ui_3d_bar:se}=s.useConfig(),S=e.computed(()=>!!f.dataset&&Object.keys(f.dataset).length),k=e.ref(s.createUid()),ue=e.ref(null),D=e.ref(null),x=e.ref(!1),I=e.ref(0),W=e.ref(0),l=e.computed({get:()=>U(),set:a=>a}),{userOptionsVisible:z,setUserOptionsVisibility:G,keepUserOptionState:H}=Be.useUserOptionState({config:l.value});function U(){const a=re.useNestedProp({userConfig:f.config,defaultConfig:se});return a.theme?{...re.useNestedProp({userConfig:s.themes.vue_ui_3d_bar[a.theme]||f.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}e.watch(()=>f.config,a=>{l.value=U(),z.value=!l.value.showOnChartHover,Y(),I.value+=1,W.value+=1},{deep:!0});const{isPrinting:q,isImaging:X,generatePdf:R,generateImage:Z}=ne.usePrinter({elementId:`3d_bar_${k.value}`,fileName:l.value.style.chart.title.text||"vue-ui-3d-bar"}),ie=e.computed(()=>s.convertCustomPalette(l.value.customPalette)),M=e.ref({showTable:l.value.table.show}),$=e.computed(()=>f.dataset.series&&f.dataset.series.length),n=e.computed(()=>({height:l.value.style.chart.box.dimensions.height,width:l.value.style.chart.box.dimensions.width,absoluteWidth:l.value.style.chart.box.dimensions.width*($.value?2:1),top:l.value.style.chart.box.dimensions.top,bottom:l.value.style.chart.box.dimensions.bottom,left:l.value.style.chart.box.dimensions.left,right:l.value.style.chart.box.dimensions.right,perspective:l.value.style.chart.box.dimensions.perspective})),g=e.computed(()=>{if($.value){const a=f.dataset.series.map(o=>o.value||0).reduce((o,u)=>o+u,0),r=f.dataset.series.map((o,u)=>({...o,id:s.createUid(),proportion:(o.value||0)/a,color:s.convertColorToHex(o.color)||ie.value[u]||s.palette[u]||s.palette[u%s.palette.length],breakdown:o.breakdown?o.breakdown.sort((i,p)=>p.value-i.value):null})).sort((o,u)=>u.value-o.value),t=[];let c=0;for(let o=0;o<r.length;o+=1)t.push({...r[o],fill:ce(c,r[o].proportion,r[o].breakdown,r[o].color)}),c+=r[o].proportion;return t}return null}),B=e.computed(()=>({right:`M${n.value.width/2},${n.value.top} ${n.value.width-n.value.right}, ${n.value.top+n.value.perspective} ${n.value.width-n.value.right},${n.value.height-n.value.bottom-n.value.perspective} ${n.value.width/2},${n.value.height-n.value.bottom}`,left:`M${n.value.width/2},${n.value.top} ${n.value.left},${n.value.top+n.value.perspective} ${n.value.left},${n.value.height-n.value.bottom-n.value.perspective} ${n.value.width/2},${n.value.height-n.value.bottom}`,side:`M${n.value.width/2},${n.value.height-n.value.bottom} ${n.value.width/2},${n.value.top+n.value.perspective*2}`,topSides:`M${n.value.left},${n.value.top+n.value.perspective} ${n.value.width/2},${n.value.top+n.value.perspective*2} ${n.value.width-n.value.right},${n.value.top+n.value.perspective}`,tubeTop:`M${n.value.left},${n.value.top+n.value.perspective} C ${n.value.left},${n.value.top-n.value.perspective/3} ${n.value.width-n.value.right},${n.value.top-n.value.perspective/3} ${n.value.width-n.value.right},${n.value.top+n.value.perspective} C ${n.value.width-n.value.right},${n.value.top+n.value.perspective*2.3} ${n.value.left},${n.value.top+n.value.perspective*2.3} ${n.value.left},${n.value.top+n.value.perspective}`,tubeLeft:`M${n.value.left},${n.value.top+n.value.perspective} ${n.value.left},${n.value.height-n.value.bottom-n.value.perspective}`,tubeRight:`M${n.value.width-n.value.right},${n.value.top+n.value.perspective} ${n.value.width-n.value.right},${n.value.height-n.value.bottom-n.value.perspective}`,tubeBottom:`M${n.value.width-n.value.right},${n.value.height-n.value.bottom-n.value.perspective} C ${n.value.width-n.value.right},${n.value.height} ${n.value.left},${n.value.height} ${n.value.left},${n.value.height-n.value.bottom-n.value.perspective}`})),E=e.ref(l.value.style.chart.animation.use?0:f.dataset.percentage);e.onMounted(()=>{Y();let a=0,r=l.value.style.chart.animation.speed,t=.005*l.value.style.chart.animation.acceleration;function c(){E.value+=r+a,a+=t,E.value<f.dataset.percentage?requestAnimationFrame(c):E.value=f.dataset.percentage}l.value.style.chart.animation.use&&(E.value=0,c())});function Y(){s.objectIsEmpty(f.dataset)?s.error({componentName:"VueUi3dBar",type:"dataset"}):f.dataset.series?f.dataset.series.forEach((a,r)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(t=>{s.error({componentName:"VueUi3dBar",type:"datasetSerieAttribute",property:t,index:r})}),a.breakdown&&a.breakdown.forEach((t,c)=>{s.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["name","value"]}).forEach(o=>{s.error({componentName:"VueUi3dBar",type:"datasetSerieAttribute",property:o,index:`${r} - ${c}`})})})}):s.getMissingDatasetAttributes({datasetObject:f.dataset,requiredAttributes:["percentage"]}).forEach(a=>{s.error({componentName:"VueUi3dBar",type:"datasetAttribute",property:a})})}function ce(a,r,t,c){const o=n.value.height-n.value.bottom-n.value.top-n.value.perspective*2,{width:u,height:i,bottom:p,right:y,left:h,perspective:v}=n.value,d=p+o*a,A=i-d-v-o*r/2,ve=A>n.value.height/2?"top":"bottom",ee=64,pe=!!t;let te=null,le=null;return pe&&(t=t.map((oe,fe)=>({...oe,value:oe.value||0,color:s.lightenHexColor(c,fe/t.length)})),te=s.makeDonut({series:t},u+n.value.absoluteWidth/4-14,ve==="top"?A-ee:A+ee,28,28,1.99999,2,1,360,105.25,14),le=s.makeDonut({series:t},u-y+20,i-d-v-o*r/2,6,6,1.99999,2,1,360,105.25,6)),{donut:te,miniDonut:le,sidePointer:{x:u-y,y:i-d-v-o*r/2,topY:i-d-v-o*r,height:o*r},apexBottom:{y:i-d,x:u/2},apexTop:{y:i-d-o*r,x:u/2},right:`M${u/2},${i-d} ${u/2},${i-d-o*r} ${u-y},${i-d-v-o*r} ${u-y},${i-d-v}Z`,left:`M${u/2},${i-d} ${u/2},${i-d-o*r} ${h}, ${i-d-v-o*r} ${h},${i-d-v}Z`,liningTop:`M${h},${i-d-v-o*r} ${u/2},${i-d-o*r} ${u-y},${i-d-v-o*r}`,liningTopShade:`M${h},${i-d-v-o*r-.5} ${u/2},${i-d-o*r-.5} ${u-y},${i-d-v-o*r-.5}`,top:`M${u/2},${i-d-o*r} ${h},${i-d-v-o*r} ${u/2},${i-d-v*2-o*r} ${u-y},${i-d-v-o*r} Z`,tubeTop:`M${h},${i-d-o*r-v} C ${h},${i-d-o*r-v*2.5} ${u-y},${i-d-o*r-v*2.5} ${u-y},${i-d-o*r-v} C ${u-y},${i-d-o*r+v/2} ${h},${i-d-o*r+v/2} ${h},${i-d-o*r-v}`,bottomTubeTop:`M ${u-y-.5},${i-d-v} C ${u-y-.5},${i-d+v/2} ${h},${i-d+v/2} ${h+.5},${i-d-v}`,tubeBody:`M
2
2
  ${h},${i-d-o*r-v}
3
3
  C ${h},${i-d-o*r+v/2}
4
4
  ${u-y},${i-d-o*r+v/2}
@@ -1,7 +1,7 @@
1
1
  import { useCssVars as y, computed as s, ref as r, onMounted as b, watch as _, openBlock as u, createElementBlock as v, createElementVNode as n, normalizeClass as $, normalizeStyle as p, renderSlot as c, normalizeProps as i, mergeProps as O, createBlock as D, createCommentVNode as N, guardReactiveProps as m } from "vue";
2
- import w from "./BaseIcon-DpaRUsHC.js";
3
- import { u as x } from "./useNestedProp-D79dWdel.js";
4
- import { u as B, c as I } from "./index-BVNcFEqn.js";
2
+ import w from "./BaseIcon-Dog_ErJD.js";
3
+ import { u as x } from "./useNestedProp-DPMt3Iiy.js";
4
+ import { u as B, c as I } from "./index-CnwO8xcH.js";
5
5
  import { _ as A } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
6
  const F = ["id"], P = {
7
7
  key: 0,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./BaseIcon-CyTdOpDr.cjs"),g=require("./useNestedProp-0Mn5Z6Ae.cjs"),u=require("./index-CKgv8c-A.cjs"),f=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),m=["id"],h={key:0,class:"vue-ui-accordion-arrow"},k={__name:"vue-ui-accordion",props:{config:{type:Object,default(){return{}}},hideDetails:{type:Boolean,default:!1}},setup(l){const c=l;e.useCssVars(r=>({"95f7c2e4":v.value}));const{vue_ui_accordion:d}=u.useConfig(),o=e.computed(()=>g.useNestedProp({userConfig:c.config,defaultConfig:d})),a=e.ref(o.value.open),i=e.ref(u.createUid()),t=e.ref(null),n=e.ref(0);e.onMounted(()=>{t.value.open=o.value.open}),e.watch(()=>o.value.open,r=>{t.value.open=r});function s(){(n.value>0||!o.value.open)&&(a.value=!a.value),n.value+=1}const v=e.computed(()=>`${o.value.maxHeight}px`);return(r,C)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("details",{id:`details_${i.value}`,ref_key:"details",ref:t,onToggle:s},[e.createElementVNode("summary",{class:e.normalizeClass({"vue-ui-accordion-headless":l.hideDetails})},[e.createElementVNode("div",{class:"vue-ui-accordion-head",style:e.normalizeStyle(`background:${o.value.head.backgroundColor};padding:${o.value.head.padding}; ${l.hideDetails?"height: 0px !important; padding: 0 !important;":""}`)},[l.hideDetails?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",h,[o.value.head.useArrowSlot?e.renderSlot(r.$slots,"arrow",e.normalizeProps(e.mergeProps({key:0},{backgroundColor:o.value.head.backgroundColor,color:o.value.head.color,iconColor:o.value.head.iconColor,isOpen:a.value})),void 0,!0):(e.openBlock(),e.createBlock(p.default,{key:1,name:"arrowRight",stroke:o.value.head.iconColor},null,8,["stroke"]))])),e.renderSlot(r.$slots,"title",e.normalizeProps(e.guardReactiveProps({color:o.value.head.color,isOpen:a.value})),void 0,!0)],4)],2)],40,m),e.createElementVNode("div",{class:"vue-ui-accordion-content",style:e.normalizeStyle(`background:${o.value.body.backgroundColor};color:${o.value.body.color}`)},[e.renderSlot(r.$slots,"content",e.normalizeProps(e.guardReactiveProps({backgroundColor:o.value.body.backgroundColor,color:o.value.body.color,isOpen:a.value})),void 0,!0)],4)]))}},y=f._export_sfc(k,[["__scopeId","data-v-28fc829c"]]);exports.default=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./BaseIcon-Bo_1SPIG.cjs"),g=require("./useNestedProp-CsmZqXml.cjs"),u=require("./index-DVvHP4A_.cjs"),f=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),m=["id"],h={key:0,class:"vue-ui-accordion-arrow"},k={__name:"vue-ui-accordion",props:{config:{type:Object,default(){return{}}},hideDetails:{type:Boolean,default:!1}},setup(l){const c=l;e.useCssVars(r=>({"95f7c2e4":v.value}));const{vue_ui_accordion:d}=u.useConfig(),o=e.computed(()=>g.useNestedProp({userConfig:c.config,defaultConfig:d})),a=e.ref(o.value.open),i=e.ref(u.createUid()),t=e.ref(null),n=e.ref(0);e.onMounted(()=>{t.value.open=o.value.open}),e.watch(()=>o.value.open,r=>{t.value.open=r});function s(){(n.value>0||!o.value.open)&&(a.value=!a.value),n.value+=1}const v=e.computed(()=>`${o.value.maxHeight}px`);return(r,C)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("details",{id:`details_${i.value}`,ref_key:"details",ref:t,onToggle:s},[e.createElementVNode("summary",{class:e.normalizeClass({"vue-ui-accordion-headless":l.hideDetails})},[e.createElementVNode("div",{class:"vue-ui-accordion-head",style:e.normalizeStyle(`background:${o.value.head.backgroundColor};padding:${o.value.head.padding}; ${l.hideDetails?"height: 0px !important; padding: 0 !important;":""}`)},[l.hideDetails?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",h,[o.value.head.useArrowSlot?e.renderSlot(r.$slots,"arrow",e.normalizeProps(e.mergeProps({key:0},{backgroundColor:o.value.head.backgroundColor,color:o.value.head.color,iconColor:o.value.head.iconColor,isOpen:a.value})),void 0,!0):(e.openBlock(),e.createBlock(p.default,{key:1,name:"arrowRight",stroke:o.value.head.iconColor},null,8,["stroke"]))])),e.renderSlot(r.$slots,"title",e.normalizeProps(e.guardReactiveProps({color:o.value.head.color,isOpen:a.value})),void 0,!0)],4)],2)],40,m),e.createElementVNode("div",{class:"vue-ui-accordion-content",style:e.normalizeStyle(`background:${o.value.body.backgroundColor};color:${o.value.body.color}`)},[e.renderSlot(r.$slots,"content",e.normalizeProps(e.guardReactiveProps({backgroundColor:o.value.body.backgroundColor,color:o.value.body.color,isOpen:a.value})),void 0,!0)],4)]))}},y=f._export_sfc(k,[["__scopeId","data-v-28fc829c"]]);exports.default=y;
@@ -1,15 +1,15 @@
1
1
  import { computed as b, ref as v, watch as Te, onMounted as Ae, openBlock as i, createElementBlock as r, normalizeClass as ye, normalizeStyle as W, unref as u, createBlock as S, createCommentVNode as y, createSlots as Le, withCtx as p, renderSlot as h, normalizeProps as I, guardReactiveProps as F, createVNode as he, createElementVNode as d, Fragment as z, renderList as P, toDisplayString as w, createTextVNode as fe, nextTick as Se } from "vue";
2
- import { u as ze, c as Oe, t as Ie, o as Fe, e as Pe, v as f, X as Me, s as X, w as ce, i as k, f as _, x as Ne, y as Re, q as De, r as Ge } from "./index-BVNcFEqn.js";
2
+ import { u as ze, c as Oe, t as Ie, o as Fe, e as Pe, v as f, X as Me, s as X, w as ce, i as k, f as _, x as Ne, y as Re, q as De, r as Ge } from "./index-CnwO8xcH.js";
3
3
  import { t as Ue, u as Be } from "./useResponsive-CoxXLe23.js";
4
- import { _ as Ee } from "./Title-DyUTj8GI.js";
5
- import { u as Ve, U as We } from "./usePrinter-Bcfs_I6G.js";
6
- import { _ as Xe } from "./Tooltip-B-0uEV3l.js";
7
- import { D as je } from "./DataTable-DX_jYNWG.js";
8
- import He from "./vue-ui-skeleton-Bgf16k10.js";
9
- import Ye from "./vue-ui-accordion-GNblUy42.js";
10
- import { u as ge } from "./useNestedProp-D79dWdel.js";
11
- import { _ as qe } from "./PackageVersion-B9_Ed72C.js";
12
- import { P as Je } from "./PenAndPaper-CzjoEhsO.js";
4
+ import { _ as Ee } from "./Title-CEILAOdT.js";
5
+ import { u as Ve, U as We } from "./usePrinter-BEBjMPUP.js";
6
+ import { _ as Xe } from "./Tooltip-CgY3ZV9q.js";
7
+ import { D as je } from "./DataTable-BLV7zzyw.js";
8
+ import He from "./vue-ui-skeleton-DyIz4SMi.js";
9
+ import Ye from "./vue-ui-accordion-DDF-Fm2i.js";
10
+ import { u as ge } from "./useNestedProp-DPMt3Iiy.js";
11
+ import { _ as qe } from "./PackageVersion-BazXxXqy.js";
12
+ import { P as Je } from "./PenAndPaper-D4nWibJ3.js";
13
13
  import { u as Ke } from "./useUserOptionState-BIvW1Kz7.js";
14
14
  import { _ as Qe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
15
  const Ze = ["id"], et = ["xmlns", "viewBox"], tt = ["x", "y", "width", "height"], lt = ["id"], at = ["stop-color"], ot = ["stop-color"], st = ["id"], it = ["stop-color"], ut = ["stop-color"], rt = ["x", "y", "width", "height", "fill", "rx"], nt = ["x", "y", "width", "height", "fill", "rx"], dt = ["x", "y", "width", "height", "fill", "rx"], vt = ["x", "y", "width", "height", "fill", "rx"], yt = { key: 0 }, ht = ["x", "y", "fill", "font-size", "font-weight"], ft = ["x", "y", "fill", "font-size", "font-weight"], ct = { key: 1 }, gt = ["x", "y", "font-size", "fill", "font-weight"], pt = { key: 2 }, bt = { key: 0 }, xt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], mt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], wt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], kt = ["x", "y", "font-size", "fill", "font-weight"], _t = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ct = ["x", "y", "font-size", "fill", "font-weight"], $t = ["x", "y", "font-size", "fill", "font-weight"], Tt = ["x", "y", "width", "height", "fill", "onMouseover"], At = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CKgv8c-A.cjs"),X=require("./useResponsive-BJ7DTGpm.cjs"),re=require("./Title-BnRtxxP4.cjs"),Y=require("./usePrinter-Gkda9yEJ.cjs"),ie=require("./Tooltip-CUoQNXZK.cjs"),ne=require("./DataTable-CwzQ-L0W.cjs"),ue=require("./vue-ui-skeleton-73YO0ovP.cjs"),de=require("./vue-ui-accordion-xV0it5je.cjs"),J=require("./useNestedProp-0Mn5Z6Ae.cjs"),ce=require("./PackageVersion-D_9QTWVm.cjs"),ve=require("./PenAndPaper-CfGYucSm.cjs"),ye=require("./useUserOptionState-BgepsfED.cjs"),he=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],pe=["xmlns","viewBox"],ge=["x","y","width","height"],be=["id"],me=["stop-color"],xe=["stop-color"],ke=["id"],we=["stop-color"],Ce=["stop-color"],Ne=["x","y","width","height","fill","rx"],_e=["x","y","width","height","fill","rx"],Le=["x","y","width","height","fill","rx"],Se=["x","y","width","height","fill","rx"],Te={key:0},Be=["x","y","fill","font-size","font-weight"],Ae=["x","y","fill","font-size","font-weight"],$e={key:1},Ee=["x","y","font-size","fill","font-weight"],Ve={key:2},ze={key:0},Pe=["x1","x2","y1","y2","stroke","stroke-width"],Oe=["x1","x2","y1","y2","stroke","stroke-width"],Fe=["x1","x2","y1","y2","stroke","stroke-width"],Ie=["x","y","font-size","fill","font-weight"],De=["x1","x2","y1","y2","stroke","stroke-width"],Me=["x","y","font-size","fill","font-weight"],Re=["x","y","font-size","fill","font-weight"],qe=["x","y","width","height","fill","onMouseover"],Ue={key:5,class:"vue-data-ui-watermark"},Ge={__name:"vue-ui-age-pyramid",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(T,{expose:K}){const u=T,{vue_ui_age_pyramid:Q}=r.useConfig(),m=e.computed(()=>!!u.dataset&&u.dataset.length),c=e.ref(r.createUid()),Z=e.ref(null),C=e.ref(!1),N=e.ref(""),x=e.ref(null),B=e.ref(0),y=e.ref(null),A=e.ref(null),$=e.ref(null),E=e.ref(null),V=e.ref(0),z=e.ref(0),t=e.computed({get:()=>F(),set:l=>l}),{userOptionsVisible:_,setUserOptionsVisibility:P,keepUserOptionState:O}=ye.useUserOptionState({config:t.value});function F(){const l=J.useNestedProp({userConfig:u.config,defaultConfig:Q});return l.theme?{...J.useNestedProp({userConfig:r.themes.vue_ui_age_pyramid[l.theme]||u.config,defaultConfig:l})}:l}e.watch(()=>u.config,l=>{t.value=F(),_.value=!t.value.showOnChartHover,D(),V.value+=1,z.value+=1},{deep:!0});const I=e.ref(null);e.onMounted(()=>{D()});function D(){if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiAgePyramid",type:"dataset"}),t.value.responsive){const l=X.throttle(()=>{const{width:i,height:o}=X.useResponsive({chart:y.value,title:t.value.style.title.text?A.value:null,source:$.value,noTitle:E.value});d.value.width=i,d.value.height=o});I.value=new ResizeObserver(l),I.value.observe(y.value.parentNode)}}const{isPrinting:M,isImaging:R,generatePdf:q,generateImage:U}=Y.usePrinter({elementId:`vue-ui-age-pyramid_${c.value}`,fileName:t.value.style.title.text||"vue-ui-age-pyramid"}),ee=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),d=e.ref({height:t.value.style.height,width:t.value.style.width}),s=e.computed(()=>{const l=d.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left,i=t.value.style.layout.padding.left,o=d.value.width-t.value.style.layout.padding.right;return{top:t.value.style.layout.padding.top,left:i,right:o,bottom:d.value.height-t.value.style.layout.padding.bottom,width:l,height:d.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,centerX:t.value.style.layout.padding.left+l/2,leftChart:{width:l/2-t.value.style.layout.centerSlit.width,right:i+l/2-t.value.style.layout.centerSlit.width},rightChart:{width:l/2-t.value.style.layout.centerSlit.width,left:i+l/2+t.value.style.layout.centerSlit.width}}}),te=e.computed(()=>u.dataset.map(l=>t.value.style.layout.dataLabels.yAxis.display==="age"?l[1]:l[0])),h=e.computed(()=>{const l=le(b.value/5),i=[],o=[];for(let a=0;a<=5;a+=1){const n=l*a,j=l*(a-5);i.push({value:n,x:s.value.left+s.value.width/2+t.value.style.layout.centerSlit.width+n/b.value*s.value.leftChart.width}),o.push({value:Math.abs(j),x:s.value.left+s.value.width/2+j/b.value*s.value.leftChart.width-t.value.style.layout.centerSlit.width})}return{right:i,left:o}});function le(l){if(l===0)return 0;const o=10**Math.floor(Math.log10(Math.abs(l)));let a;return l<0,a=Math.round(l/o)*o,a}const b=e.computed(()=>Math.max(...u.dataset.flatMap(l=>l.slice(-2).map(i=>r.checkNaN(i))))),f=e.computed(()=>u.dataset.length),oe=e.computed(()=>u.dataset.map(l=>({segment:l[0],age:l[1],left:{value:l[2],proportionToMax:l[2]/b.value},right:{value:l[3],proportionToMax:l[3]/b.value}}))),p=e.computed(()=>oe.value.map((l,i)=>{const o=s.value.top+s.value.height/f.value*i,a=s.value.height/f.value-t.value.style.layout.bars.gap;return{segment:l.segment,age:l.age,left:{...l.left,y:o,color:t.value.style.layout.bars.left.color,x:s.value.leftChart.right-l.left.proportionToMax*s.value.leftChart.width,width:r.checkNaN(l.left.proportionToMax*s.value.leftChart.width),height:a},right:{...l.right,y:o,color:t.value.style.layout.bars.right.color,x:s.value.rightChart.left,width:r.checkNaN(l.right.proportionToMax*s.value.rightChart.width),height:a}}})),L=e.ref(null);function ae(l,i){x.value=l,L.value={datapoint:i,seriesIndex:l,series:p.value,config:t.value};const o=t.value.style.tooltip.customFormat;if(r.isFunction(o)&&r.functionReturnsString(()=>o({seriesIndex:l,datapoint:{segment:i[0],index:i[1],left:i[2],right:i[3]},series:p.value,config:t.value})))N.value=o({seriesIndex:l,datapoint:{segment:i[0],index:i[1],left:i[2],right:i[3]},series:p.value,config:t.value});else{let a="";const n=p.value[l];a+=`<div><b>${n.segment}</b></div>`,a+=`<div>${t.value.translations.age}: ${r.applyDataLabel(t.value.style.layout.dataLabels.yAxis.formatter,r.checkNaN(n.age),r.dataLabel({v:r.checkNaN(n.age)}),{datapoint:i,seriesIndex:l})}</div>`,a+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,a+='<div style="display:flex; flex-direction:row;gap:12px">',a+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${c.value})`:t.value.style.layout.bars.left.color}"/></svg><div>${t.value.translations.female}</div><div><b>${r.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,r.checkNaN(n.left.value),r.dataLabel({v:r.checkNaN(n.left.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,a+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${c.value})`:t.value.style.layout.bars.right.color}"/></svg><div>${t.value.translations.male}</div><div><b>${r.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,r.checkNaN(n.right.value),r.dataLabel({v:r.checkNaN(n.right.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,a+="</div>",a+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}"><div>${t.value.translations.total}</div><div><b>${r.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,r.checkNaN(n.right.value)+r.checkNaN(n.left.value),r.dataLabel({v:r.checkNaN(n.right.value)+r.checkNaN(n.left.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,a+="</div>",N.value=`<div>${a}</div>`}C.value=!0}function G(){e.nextTick(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],i=u.dataset.map(n=>[n[0],n[1],n[2],n[3],n[2]+n[3]]),o=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(i),a=r.createCsvContent(o);r.downloadCsv({csvContent:a,title:t.value.style.title.text||"vue-ui-heatmap"})})}const k=e.computed(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],i=u.dataset.map(a=>[a[0],a[1],a[2].toLocaleString(),a[3].toLocaleString(),(a[2]+a[3]).toLocaleString()]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:i,config:o,colNames:l}}),g=e.ref(!1);function se(l){g.value=l,B.value+=1}function H(){v.value.showTable=!v.value.showTable}function W(){v.value.showTooltip=!v.value.showTooltip}const w=e.ref(!1);function S(){w.value=!w.value}return K({generatePdf:q,generateCsv:G,generateImage:U,toggleTable:H,toggleTooltip:W,toggleAnnotator:S}),(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-age-pyramid ${g.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"agePyramid",ref:y,id:`vue-ui-age-pyramid_${c.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:i[2]||(i[2]=()=>e.unref(P)(!0)),onMouseleave:i[3]||(i[3]=()=>e.unref(P)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ve.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:w.value,onClose:S},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ee.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:E,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(re._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"pyramid-div-title",...t.value.style.title},subtitle:{cy:"pyramid-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref(O)||e.unref(_))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref_key:"details",ref:Z,key:`user_options_${B.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(R),isPrinting:e.unref(M),uid:c.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:g.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:se,onGeneratePdf:e.unref(q),onGenerateCsv:G,onGenerateImage:e.unref(U),onToggleTable:H,onToggleTooltip:W,onToggleAnnotator:S,style:e.normalizeStyle({visibility:e.unref(O)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:a})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:a})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:a})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:a})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":g.value,"vue-data-ui-fulscreen--off":!g.value}),viewBox:`0 0 ${d.value.width<=0?10:d.value.width} ${d.value.height<=0?10:d.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(ce._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:s.value.left,y:s.value.top,width:s.value.width,height:s.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,ge)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`age_pyramid_left_${c.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.bars.left.color},null,8,me),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.layout.bars.left.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,xe)],8,be),e.createElementVNode("linearGradient",{id:`age_pyramid_right_${c.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.layout.bars.right.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,we),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.bars.right.color},null,8,Ce)],8,ke)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.left.x,y:o.left.y,width:e.unref(r.checkNaN)(o.left.width<=0?1e-4:o.left.width),height:o.left.height<=0?1e-4:o.left.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,Ne),e.createElementVNode("rect",{x:o.left.x,y:o.left.y,width:o.left.width<=0?1e-4:o.left.width,height:o.left.height<=0?1e-4:o.left.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${c.value})`:o.left.color,rx:t.value.style.layout.bars.borderRadius},null,8,_e),e.createElementVNode("rect",{x:o.right.x,y:o.right.y,width:o.right.width<=0?1e-4:o.right.width,height:o.right.height<=0?1e-4:o.right.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,Le),e.createElementVNode("rect",{x:o.right.x,y:o.right.y,width:o.right.width<=0?1e-4:o.right.width,height:o.right.height<=0?1e-4:o.right.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${c.value})`:o.right.color,rx:t.value.style.layout.bars.borderRadius},null,8,Se)]))),256)),e.createElementVNode("g",null,[t.value.style.layout.dataLabels.sideTitles.show?(e.openBlock(),e.createElementBlock("g",Te,[e.createElementVNode("text",{x:s.value.left,y:s.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.left.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"start","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.female),9,Be),e.createElementVNode("text",{x:s.value.right,y:s.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.right.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.male),9,Ae)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,(o,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a%t.value.style.layout.dataLabels.yAxis.showEvery===0?(e.openBlock(),e.createElementBlock("text",{key:0,x:s.value.centerX,y:s.value.top+s.value.height/f.value*a+t.value.style.layout.dataLabels.yAxis.fontSize/3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.dataLabels.yAxis.formatter,o,e.unref(r.dataLabel)({v:o}),{datapoint:o,seriesIndex:a})),9,Ee)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ve,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",ze,[e.createElementVNode("line",{x1:h.value.right[0].x,x2:h.value.right.at(-1).x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Pe),e.createElementVNode("line",{x1:h.value.left[0].x,x2:h.value.left.at(-1).x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Oe)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.right,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Fe)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:o.x,y:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,o.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(r.dataLabel)({v:o.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:o,seriesIndex:a})),9,Ie)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.left,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,De)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:o.x,y:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,o.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(r.dataLabel)({v:o.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:o,seriesIndex:a})),9,Me)]))),256)),e.createElementVNode("text",{x:s.value.right,y:d.value.height,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.translation),9,Re)])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.dataset,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:s.value.left,y:s.value.top+s.value.height/f.value*a-t.value.style.layout.bars.gap/2,width:s.value.width<=0?1e-4:s.value.width,height:s.value.height/f.value<=0?1e-4:s.value.height/f.value,fill:x.value!==null&&x.value===a?e.unref(r.setOpacity)(t.value.style.highlighter.color,t.value.style.highlighter.opacity):"transparent",onMouseover:n=>ae(a,o),onMouseleave:i[0]||(i[0]=n=>{x.value=null,C.value=!1})},null,40,qe)]))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,pe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ue,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:6,config:{type:"pyramid",style:{backgroundColor:t.value.style.backgroundColor,pyramid:{color:"#CCCCCC"}}}},null,8,["config"])),e.renderSlot(l.$slots,"legend",{legend:p.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:$,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ie._sfc_main,{show:v.value.showTooltip&&C.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:y.value,content:N.value,isFullscreen:g.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),m.value?(e.openBlock(),e.createBlock(de.default,{key:8,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ne.DataTable,{key:`table_${z.value}`,colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:i[1]||(i[1]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,fe))}},He=he._export_sfc(Ge,[["__scopeId","data-v-8fdd585f"]]);exports.default=He;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DVvHP4A_.cjs"),X=require("./useResponsive-BJ7DTGpm.cjs"),re=require("./Title-CFqlh_YB.cjs"),Y=require("./usePrinter-a7rkFhGa.cjs"),ie=require("./Tooltip-BA_0hLX8.cjs"),ne=require("./DataTable-1WuyQJQK.cjs"),ue=require("./vue-ui-skeleton-Bw4w98Z_.cjs"),de=require("./vue-ui-accordion-Dghh8xxy.cjs"),J=require("./useNestedProp-CsmZqXml.cjs"),ce=require("./PackageVersion-BachziuZ.cjs"),ve=require("./PenAndPaper-D6E7hDYd.cjs"),ye=require("./useUserOptionState-BgepsfED.cjs"),he=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],pe=["xmlns","viewBox"],ge=["x","y","width","height"],be=["id"],me=["stop-color"],xe=["stop-color"],ke=["id"],we=["stop-color"],Ce=["stop-color"],Ne=["x","y","width","height","fill","rx"],_e=["x","y","width","height","fill","rx"],Le=["x","y","width","height","fill","rx"],Se=["x","y","width","height","fill","rx"],Te={key:0},Be=["x","y","fill","font-size","font-weight"],Ae=["x","y","fill","font-size","font-weight"],$e={key:1},Ee=["x","y","font-size","fill","font-weight"],Ve={key:2},ze={key:0},Pe=["x1","x2","y1","y2","stroke","stroke-width"],Oe=["x1","x2","y1","y2","stroke","stroke-width"],Fe=["x1","x2","y1","y2","stroke","stroke-width"],Ie=["x","y","font-size","fill","font-weight"],De=["x1","x2","y1","y2","stroke","stroke-width"],Me=["x","y","font-size","fill","font-weight"],Re=["x","y","font-size","fill","font-weight"],qe=["x","y","width","height","fill","onMouseover"],Ue={key:5,class:"vue-data-ui-watermark"},Ge={__name:"vue-ui-age-pyramid",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(T,{expose:K}){const u=T,{vue_ui_age_pyramid:Q}=r.useConfig(),m=e.computed(()=>!!u.dataset&&u.dataset.length),c=e.ref(r.createUid()),Z=e.ref(null),C=e.ref(!1),N=e.ref(""),x=e.ref(null),B=e.ref(0),y=e.ref(null),A=e.ref(null),$=e.ref(null),E=e.ref(null),V=e.ref(0),z=e.ref(0),t=e.computed({get:()=>F(),set:l=>l}),{userOptionsVisible:_,setUserOptionsVisibility:P,keepUserOptionState:O}=ye.useUserOptionState({config:t.value});function F(){const l=J.useNestedProp({userConfig:u.config,defaultConfig:Q});return l.theme?{...J.useNestedProp({userConfig:r.themes.vue_ui_age_pyramid[l.theme]||u.config,defaultConfig:l})}:l}e.watch(()=>u.config,l=>{t.value=F(),_.value=!t.value.showOnChartHover,D(),V.value+=1,z.value+=1},{deep:!0});const I=e.ref(null);e.onMounted(()=>{D()});function D(){if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiAgePyramid",type:"dataset"}),t.value.responsive){const l=X.throttle(()=>{const{width:i,height:o}=X.useResponsive({chart:y.value,title:t.value.style.title.text?A.value:null,source:$.value,noTitle:E.value});d.value.width=i,d.value.height=o});I.value=new ResizeObserver(l),I.value.observe(y.value.parentNode)}}const{isPrinting:M,isImaging:R,generatePdf:q,generateImage:U}=Y.usePrinter({elementId:`vue-ui-age-pyramid_${c.value}`,fileName:t.value.style.title.text||"vue-ui-age-pyramid"}),ee=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),d=e.ref({height:t.value.style.height,width:t.value.style.width}),s=e.computed(()=>{const l=d.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left,i=t.value.style.layout.padding.left,o=d.value.width-t.value.style.layout.padding.right;return{top:t.value.style.layout.padding.top,left:i,right:o,bottom:d.value.height-t.value.style.layout.padding.bottom,width:l,height:d.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,centerX:t.value.style.layout.padding.left+l/2,leftChart:{width:l/2-t.value.style.layout.centerSlit.width,right:i+l/2-t.value.style.layout.centerSlit.width},rightChart:{width:l/2-t.value.style.layout.centerSlit.width,left:i+l/2+t.value.style.layout.centerSlit.width}}}),te=e.computed(()=>u.dataset.map(l=>t.value.style.layout.dataLabels.yAxis.display==="age"?l[1]:l[0])),h=e.computed(()=>{const l=le(b.value/5),i=[],o=[];for(let a=0;a<=5;a+=1){const n=l*a,j=l*(a-5);i.push({value:n,x:s.value.left+s.value.width/2+t.value.style.layout.centerSlit.width+n/b.value*s.value.leftChart.width}),o.push({value:Math.abs(j),x:s.value.left+s.value.width/2+j/b.value*s.value.leftChart.width-t.value.style.layout.centerSlit.width})}return{right:i,left:o}});function le(l){if(l===0)return 0;const o=10**Math.floor(Math.log10(Math.abs(l)));let a;return l<0,a=Math.round(l/o)*o,a}const b=e.computed(()=>Math.max(...u.dataset.flatMap(l=>l.slice(-2).map(i=>r.checkNaN(i))))),f=e.computed(()=>u.dataset.length),oe=e.computed(()=>u.dataset.map(l=>({segment:l[0],age:l[1],left:{value:l[2],proportionToMax:l[2]/b.value},right:{value:l[3],proportionToMax:l[3]/b.value}}))),p=e.computed(()=>oe.value.map((l,i)=>{const o=s.value.top+s.value.height/f.value*i,a=s.value.height/f.value-t.value.style.layout.bars.gap;return{segment:l.segment,age:l.age,left:{...l.left,y:o,color:t.value.style.layout.bars.left.color,x:s.value.leftChart.right-l.left.proportionToMax*s.value.leftChart.width,width:r.checkNaN(l.left.proportionToMax*s.value.leftChart.width),height:a},right:{...l.right,y:o,color:t.value.style.layout.bars.right.color,x:s.value.rightChart.left,width:r.checkNaN(l.right.proportionToMax*s.value.rightChart.width),height:a}}})),L=e.ref(null);function ae(l,i){x.value=l,L.value={datapoint:i,seriesIndex:l,series:p.value,config:t.value};const o=t.value.style.tooltip.customFormat;if(r.isFunction(o)&&r.functionReturnsString(()=>o({seriesIndex:l,datapoint:{segment:i[0],index:i[1],left:i[2],right:i[3]},series:p.value,config:t.value})))N.value=o({seriesIndex:l,datapoint:{segment:i[0],index:i[1],left:i[2],right:i[3]},series:p.value,config:t.value});else{let a="";const n=p.value[l];a+=`<div><b>${n.segment}</b></div>`,a+=`<div>${t.value.translations.age}: ${r.applyDataLabel(t.value.style.layout.dataLabels.yAxis.formatter,r.checkNaN(n.age),r.dataLabel({v:r.checkNaN(n.age)}),{datapoint:i,seriesIndex:l})}</div>`,a+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,a+='<div style="display:flex; flex-direction:row;gap:12px">',a+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${c.value})`:t.value.style.layout.bars.left.color}"/></svg><div>${t.value.translations.female}</div><div><b>${r.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,r.checkNaN(n.left.value),r.dataLabel({v:r.checkNaN(n.left.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,a+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${c.value})`:t.value.style.layout.bars.right.color}"/></svg><div>${t.value.translations.male}</div><div><b>${r.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,r.checkNaN(n.right.value),r.dataLabel({v:r.checkNaN(n.right.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,a+="</div>",a+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}"><div>${t.value.translations.total}</div><div><b>${r.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,r.checkNaN(n.right.value)+r.checkNaN(n.left.value),r.dataLabel({v:r.checkNaN(n.right.value)+r.checkNaN(n.left.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,a+="</div>",N.value=`<div>${a}</div>`}C.value=!0}function G(){e.nextTick(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],i=u.dataset.map(n=>[n[0],n[1],n[2],n[3],n[2]+n[3]]),o=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(i),a=r.createCsvContent(o);r.downloadCsv({csvContent:a,title:t.value.style.title.text||"vue-ui-heatmap"})})}const k=e.computed(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],i=u.dataset.map(a=>[a[0],a[1],a[2].toLocaleString(),a[3].toLocaleString(),(a[2]+a[3]).toLocaleString()]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:i,config:o,colNames:l}}),g=e.ref(!1);function se(l){g.value=l,B.value+=1}function H(){v.value.showTable=!v.value.showTable}function W(){v.value.showTooltip=!v.value.showTooltip}const w=e.ref(!1);function S(){w.value=!w.value}return K({generatePdf:q,generateCsv:G,generateImage:U,toggleTable:H,toggleTooltip:W,toggleAnnotator:S}),(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-age-pyramid ${g.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"agePyramid",ref:y,id:`vue-ui-age-pyramid_${c.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:i[2]||(i[2]=()=>e.unref(P)(!0)),onMouseleave:i[3]||(i[3]=()=>e.unref(P)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ve.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:w.value,onClose:S},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ee.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:E,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(re._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"pyramid-div-title",...t.value.style.title},subtitle:{cy:"pyramid-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref(O)||e.unref(_))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref_key:"details",ref:Z,key:`user_options_${B.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(R),isPrinting:e.unref(M),uid:c.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:g.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:se,onGeneratePdf:e.unref(q),onGenerateCsv:G,onGenerateImage:e.unref(U),onToggleTable:H,onToggleTooltip:W,onToggleAnnotator:S,style:e.normalizeStyle({visibility:e.unref(O)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:a})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:a})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:a})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:a})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":g.value,"vue-data-ui-fulscreen--off":!g.value}),viewBox:`0 0 ${d.value.width<=0?10:d.value.width} ${d.value.height<=0?10:d.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(ce._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:s.value.left,y:s.value.top,width:s.value.width,height:s.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,ge)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`age_pyramid_left_${c.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.bars.left.color},null,8,me),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.layout.bars.left.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,xe)],8,be),e.createElementVNode("linearGradient",{id:`age_pyramid_right_${c.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.layout.bars.right.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,we),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.bars.right.color},null,8,Ce)],8,ke)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.left.x,y:o.left.y,width:e.unref(r.checkNaN)(o.left.width<=0?1e-4:o.left.width),height:o.left.height<=0?1e-4:o.left.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,Ne),e.createElementVNode("rect",{x:o.left.x,y:o.left.y,width:o.left.width<=0?1e-4:o.left.width,height:o.left.height<=0?1e-4:o.left.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${c.value})`:o.left.color,rx:t.value.style.layout.bars.borderRadius},null,8,_e),e.createElementVNode("rect",{x:o.right.x,y:o.right.y,width:o.right.width<=0?1e-4:o.right.width,height:o.right.height<=0?1e-4:o.right.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,Le),e.createElementVNode("rect",{x:o.right.x,y:o.right.y,width:o.right.width<=0?1e-4:o.right.width,height:o.right.height<=0?1e-4:o.right.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${c.value})`:o.right.color,rx:t.value.style.layout.bars.borderRadius},null,8,Se)]))),256)),e.createElementVNode("g",null,[t.value.style.layout.dataLabels.sideTitles.show?(e.openBlock(),e.createElementBlock("g",Te,[e.createElementVNode("text",{x:s.value.left,y:s.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.left.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"start","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.female),9,Be),e.createElementVNode("text",{x:s.value.right,y:s.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.right.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.male),9,Ae)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,(o,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a%t.value.style.layout.dataLabels.yAxis.showEvery===0?(e.openBlock(),e.createElementBlock("text",{key:0,x:s.value.centerX,y:s.value.top+s.value.height/f.value*a+t.value.style.layout.dataLabels.yAxis.fontSize/3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.dataLabels.yAxis.formatter,o,e.unref(r.dataLabel)({v:o}),{datapoint:o,seriesIndex:a})),9,Ee)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ve,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",ze,[e.createElementVNode("line",{x1:h.value.right[0].x,x2:h.value.right.at(-1).x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Pe),e.createElementVNode("line",{x1:h.value.left[0].x,x2:h.value.left.at(-1).x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Oe)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.right,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Fe)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:o.x,y:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,o.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(r.dataLabel)({v:o.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:o,seriesIndex:a})),9,Ie)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.left,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,De)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:o.x,y:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,o.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(r.dataLabel)({v:o.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:o,seriesIndex:a})),9,Me)]))),256)),e.createElementVNode("text",{x:s.value.right,y:d.value.height,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.translation),9,Re)])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.dataset,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:s.value.left,y:s.value.top+s.value.height/f.value*a-t.value.style.layout.bars.gap/2,width:s.value.width<=0?1e-4:s.value.width,height:s.value.height/f.value<=0?1e-4:s.value.height/f.value,fill:x.value!==null&&x.value===a?e.unref(r.setOpacity)(t.value.style.highlighter.color,t.value.style.highlighter.opacity):"transparent",onMouseover:n=>ae(a,o),onMouseleave:i[0]||(i[0]=n=>{x.value=null,C.value=!1})},null,40,qe)]))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,pe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ue,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:6,config:{type:"pyramid",style:{backgroundColor:t.value.style.backgroundColor,pyramid:{color:"#CCCCCC"}}}},null,8,["config"])),e.renderSlot(l.$slots,"legend",{legend:p.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:$,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ie._sfc_main,{show:v.value.showTooltip&&C.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:y.value,content:N.value,isFullscreen:g.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),m.value?(e.openBlock(),e.createBlock(de.default,{key:8,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ne.DataTable,{key:`table_${z.value}`,colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:i[1]||(i[1]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,fe))}},He=he._export_sfc(Ge,[["__scopeId","data-v-8fdd585f"]]);exports.default=He;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./html2canvas.esm-BA_v9SIU.cjs"),I=require("./jspdf.es.min-DLYY9DTT.cjs"),u=require("./index-CKgv8c-A.cjs"),o=require("vue"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),f={props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{shapes:[],lastSelectedShape:void 0}}}},data(){return{activeShape:void 0,strokeSize:1,currentPointer:{start:{x:0,y:0},end:{x:0,end:0}},currentTarget:void 0,hoveredShapeId:void 0,isBold:!1,isBulletTextMode:!1,isDash:!1,isDeleteMode:!1,isDrawing:!1,isDrawingNewShape:!0,isDrawMode:!1,isItalic:!1,isMouseDown:!1,isMoveMode:!1,isPrinting:!1,isResizeMode:!1,isSelectMode:!1,isSummaryOpen:!1,isTextMode:!1,isUnderline:!1,isWriting:!1,lastSelectedShape:this.dataset.lastSelectedShape,pointerDownId:-1,pointerPosition:{x:0,y:0},preventEdit:!0,selectedGroup:[],shapes:this.dataset.shapes?this.dataset.shapes:[],shapesOrder:[],step:Math.round(Math.random())*1e5,svgHeight:1e3,svgWidth:1e3,options:{arrow:{color:"grey",filled:!0},circle:{color:"grey",filled:!1,radius:3,strokeWidth:2},rect:{color:"grey",filled:!1,strokeWidth:2,height:12,width:12}},selectedColor:"#000000",showCaret:!1,sizeRatio:1,slottedSvg:void 0,sourceWidth:1,sourceHeight:1,textAlign:"start",textFont:20,transparency:100,transparencyCodes:u.opacity}},watch:{shapes:{handler(e){e.length===0&&(this.lastSelectedShape=void 0)}}},computed:{FINAL_CONFIG(){const e=u.useConfig().vue_ui_annotator;if(!Object.keys(this.config||{}).length)return e;const l=this.treeShake({defaultConfig:e,userConfig:this.config});return this.convertConfigColors(l)},canSelect(){return this.shapes.filter(e=>!["line","group"].includes(e.type)).length>1},colorTransparency(){return this.transparencyCodes[this.transparency>98?98:this.transparency]},cursorClass(){switch(!0){case this.isDeleteMode:return"default";case this.isMoveMode:return"move";case this.isTextMode:return"text";case this.isResizeMode:return"se-resize";default:return""}},records(){return this.shapes},userShapes(){return this.records.map(e=>{switch(!0){case(e&&e.type==="arrow"):const l=e.strokeWidth>3?5:10,s=e.strokeWidth>3?2.5:5;return`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./html2canvas.esm-BA_v9SIU.cjs"),I=require("./jspdf.es.min-DLYY9DTT.cjs"),u=require("./index-DVvHP4A_.cjs"),o=require("vue"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),f={props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{shapes:[],lastSelectedShape:void 0}}}},data(){return{activeShape:void 0,strokeSize:1,currentPointer:{start:{x:0,y:0},end:{x:0,end:0}},currentTarget:void 0,hoveredShapeId:void 0,isBold:!1,isBulletTextMode:!1,isDash:!1,isDeleteMode:!1,isDrawing:!1,isDrawingNewShape:!0,isDrawMode:!1,isItalic:!1,isMouseDown:!1,isMoveMode:!1,isPrinting:!1,isResizeMode:!1,isSelectMode:!1,isSummaryOpen:!1,isTextMode:!1,isUnderline:!1,isWriting:!1,lastSelectedShape:this.dataset.lastSelectedShape,pointerDownId:-1,pointerPosition:{x:0,y:0},preventEdit:!0,selectedGroup:[],shapes:this.dataset.shapes?this.dataset.shapes:[],shapesOrder:[],step:Math.round(Math.random())*1e5,svgHeight:1e3,svgWidth:1e3,options:{arrow:{color:"grey",filled:!0},circle:{color:"grey",filled:!1,radius:3,strokeWidth:2},rect:{color:"grey",filled:!1,strokeWidth:2,height:12,width:12}},selectedColor:"#000000",showCaret:!1,sizeRatio:1,slottedSvg:void 0,sourceWidth:1,sourceHeight:1,textAlign:"start",textFont:20,transparency:100,transparencyCodes:u.opacity}},watch:{shapes:{handler(e){e.length===0&&(this.lastSelectedShape=void 0)}}},computed:{FINAL_CONFIG(){const e=u.useConfig().vue_ui_annotator;if(!Object.keys(this.config||{}).length)return e;const l=this.treeShake({defaultConfig:e,userConfig:this.config});return this.convertConfigColors(l)},canSelect(){return this.shapes.filter(e=>!["line","group"].includes(e.type)).length>1},colorTransparency(){return this.transparencyCodes[this.transparency>98?98:this.transparency]},cursorClass(){switch(!0){case this.isDeleteMode:return"default";case this.isMoveMode:return"move";case this.isTextMode:return"text";case this.isResizeMode:return"se-resize";default:return""}},records(){return this.shapes},userShapes(){return this.records.map(e=>{switch(!0){case(e&&e.type==="arrow"):const l=e.strokeWidth>3?5:10,s=e.strokeWidth>3?2.5:5;return`
2
2
  <defs>
3
3
  <marker
4
4
  id="${e.id}"
@@ -1,6 +1,6 @@
1
1
  import p from "./html2canvas.esm-d2sM-0Wm.js";
2
2
  import { E as _ } from "./jspdf.es.min-C660YX78.js";
3
- import { z as v, u as w, A, B as M } from "./index-BVNcFEqn.js";
3
+ import { z as v, u as w, A, B as M } from "./index-CnwO8xcH.js";
4
4
  import { openBlock as d, createElementBlock as n, createElementVNode as r, normalizeStyle as c, toDisplayString as u, normalizeClass as y, createCommentVNode as a, withDirectives as f, vModelCheckbox as g, vModelText as C, renderSlot as O, Fragment as L, renderList as G, createStaticVNode as N, pushScopeId as m, popScopeId as T } from "vue";
5
5
  import { _ as R } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
6
  const D = {
@@ -1,12 +1,12 @@
1
1
  import { ref as d, computed as g, onMounted as de, watch as J, onBeforeUnmount as ge, openBlock as r, createElementBlock as o, normalizeClass as K, normalizeStyle as I, unref as u, createBlock as k, createCommentVNode as i, createSlots as fe, withCtx as w, renderSlot as f, normalizeProps as H, guardReactiveProps as M, createVNode as me, Fragment as T, renderList as U, createElementVNode as x, toDisplayString as L } from "vue";
2
- import { u as ye, o as pe, e as Q, g as be, c as ke, l as we, D as xe, d as _e, i as $, f as B, X as Ce, t as Le } from "./index-BVNcFEqn.js";
3
- import { u as Z } from "./useNestedProp-D79dWdel.js";
4
- import { _ as $e } from "./Title-DyUTj8GI.js";
5
- import { L as Be } from "./Legend-DGUxLqhs.js";
6
- import { u as Oe, U as Ae } from "./usePrinter-Bcfs_I6G.js";
7
- import { _ as Pe } from "./PackageVersion-B9_Ed72C.js";
8
- import { P as Fe } from "./PenAndPaper-CzjoEhsO.js";
9
- import Se from "./vue-ui-skeleton-Bgf16k10.js";
2
+ import { u as ye, o as pe, e as Q, g as be, c as ke, l as we, D as xe, d as _e, i as $, f as B, X as Ce, t as Le } from "./index-CnwO8xcH.js";
3
+ import { u as Z } from "./useNestedProp-DPMt3Iiy.js";
4
+ import { _ as $e } from "./Title-CEILAOdT.js";
5
+ import { L as Be } from "./Legend-ynYWBX3Z.js";
6
+ import { u as Oe, U as Ae } from "./usePrinter-BEBjMPUP.js";
7
+ import { _ as Pe } from "./PackageVersion-BazXxXqy.js";
8
+ import { P as Fe } from "./PenAndPaper-D4nWibJ3.js";
9
+ import Se from "./vue-ui-skeleton-DyIz4SMi.js";
10
10
  import { u as Ie } from "./useUserOptionState-BIvW1Kz7.js";
11
11
  import { _ as He } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  const Me = ["id"], Te = {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CKgv8c-A.cjs"),A=require("./useNestedProp-0Mn5Z6Ae.cjs"),Y=require("./Title-BnRtxxP4.cjs"),J=require("./Legend-BMTBtkoQ.cjs"),F=require("./usePrinter-Gkda9yEJ.cjs"),K=require("./PackageVersion-D_9QTWVm.cjs"),Q=require("./PenAndPaper-CfGYucSm.cjs"),Z=require("./vue-ui-skeleton-73YO0ovP.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],le={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},re=["xmlns","viewBox"],oe=["width","height"],se={key:1},ne=["x","y","height","width","fill","stroke"],ue=["x","y","height","width","rx","fill","stroke","stroke-width"],ie=["x","y","height","width","fill","stroke","stroke-width"],ce=["x","y","font-size","font-weight","fill"],de=["x","y","height","width","rx","fill","stroke","stroke-width"],he={key:3},ve=["x","y","fill","font-size","font-weight"],me={key:4},ge=["x1","x2","y1","y2","stroke"],fe={key:5,class:"vue-data-ui-watermark"},ye={class:"vue-ui-bullet-legend-item",dir:"auto"},pe={style:{"margin-right":"2px"}},ke={key:7,ref:"source",dir:"auto"},be={__name:"vue-ui-bullet",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(z,{expose:I}){const n=z,{vue_ui_bullet:H}=s.useConfig(),y=e.ref(null),T=e.ref(null),B=e.ref(0),M=e.ref(null),U=e.ref(0),d=e.computed({get:()=>n.dataset.hasOwnProperty("value"),set:a=>a}),v=e.computed(()=>n.dataset.segments?Array.isArray(n.dataset.segments)?n.dataset.segments.length?!0:(console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DVvHP4A_.cjs"),A=require("./useNestedProp-CsmZqXml.cjs"),Y=require("./Title-CFqlh_YB.cjs"),J=require("./Legend-DoFd_NOd.cjs"),F=require("./usePrinter-a7rkFhGa.cjs"),K=require("./PackageVersion-BachziuZ.cjs"),Q=require("./PenAndPaper-D6E7hDYd.cjs"),Z=require("./vue-ui-skeleton-Bw4w98Z_.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],le={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},re=["xmlns","viewBox"],oe=["width","height"],se={key:1},ne=["x","y","height","width","fill","stroke"],ue=["x","y","height","width","rx","fill","stroke","stroke-width"],ie=["x","y","height","width","fill","stroke","stroke-width"],ce=["x","y","font-size","font-weight","fill"],de=["x","y","height","width","rx","fill","stroke","stroke-width"],he={key:3},ve=["x","y","fill","font-size","font-weight"],me={key:4},ge=["x1","x2","y1","y2","stroke"],fe={key:5,class:"vue-data-ui-watermark"},ye={class:"vue-ui-bullet-legend-item",dir:"auto"},pe={style:{"margin-right":"2px"}},ke={key:7,ref:"source",dir:"auto"},be={__name:"vue-ui-bullet",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(z,{expose:I}){const n=z,{vue_ui_bullet:H}=s.useConfig(),y=e.ref(null),T=e.ref(null),B=e.ref(0),M=e.ref(null),U=e.ref(0),d=e.computed({get:()=>n.dataset.hasOwnProperty("value"),set:a=>a}),v=e.computed(()=>n.dataset.segments?Array.isArray(n.dataset.segments)?n.dataset.segments.length?!0:(console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
2
2
 
3
3
  segments: [
4
4
  {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-CKgv8c-A.cjs"),ie=require("./useResponsive-BJ7DTGpm.cjs"),_e=require("./Title-BnRtxxP4.cjs"),de=require("./usePrinter-Gkda9yEJ.cjs"),ze=require("./Tooltip-CUoQNXZK.cjs"),Ve=require("./DataTable-CwzQ-L0W.cjs"),Ee=require("./vue-ui-skeleton-73YO0ovP.cjs"),Te=require("./Slicer-ChxjRhai.cjs"),Ae=require("./vue-ui-accordion-xV0it5je.cjs"),ce=require("./useNestedProp-0Mn5Z6Ae.cjs"),Fe=require("./PackageVersion-D_9QTWVm.cjs"),Ie=require("./PenAndPaper-CfGYucSm.cjs"),Pe=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Re=["id"],Oe=["xmlns","viewBox"],Ue=["x","y","width","height"],De={key:1},Me=["id"],qe=["stop-color"],He=["stop-color"],We=["stop-color"],Ge=["id"],je=["stop-color"],Xe=["stop-color"],Ye=["stop-color"],Je={key:0},Ke=["x1","x2","y1","y2","stroke","stroke-width"],Qe=["x1","x2","y1","y2","stroke","stroke-width"],Ze={key:1},et=["x1","x2","y1","y2","stroke","stroke-width"],tt=["x","y","font-size","fill","font-weight"],lt={key:2},ot=["transform","text-anchor","font-size","fill","font-weight"],at=["x1","x2","y1","y2","stroke","stroke-width"],nt={key:0},ut=["cx","cy","r","fill"],st=["cx","cy","r","fill"],rt={key:1},it=["x1","x2","y1","y2","stroke","stroke-width"],dt=["x1","x2","y1","y2","stroke","stroke-width"],ct=["x","y","height","width","fill","rx"],vt=["x","y","height","width","fill","rx","stroke","stroke-width"],yt=["x","y","height","width","fill","onMouseover"],ht={key:5,class:"vue-data-ui-watermark"},pt=["innerHTML"],ft={__name:"vue-ui-candlestick",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(f,{expose:ve}){const d=f,{vue_ui_candlestick:ye}=u.useConfig(),b=e.computed(()=>!!d.dataset&&d.dataset.length),h=e.ref(u.createUid()),he=e.ref(null),V=e.ref(!1),E=e.ref(""),T=e.ref(void 0),L=e.ref(0),g=e.ref(null),R=e.ref(null),O=e.ref(null),U=e.ref(null),D=e.ref(null),M=e.ref(null),C=e.ref(0),q=e.ref(0),H=e.ref(0),t=e.computed({get:()=>j(),set:l=>l}),{userOptionsVisible:A,setUserOptionsVisibility:W,keepUserOptionState:G}=Pe.useUserOptionState({config:t.value});function j(){const l=ce.useNestedProp({userConfig:d.config,defaultConfig:ye});let a={};return l.theme?a={...ce.useNestedProp({userConfig:u.themes.vue_ui_candlestick[l.theme]||d.config,defaultConfig:l})}:a=l,d.config&&u.hasDeepProperty(d.config,"style.zoom.startIndex")?a.style.zoom.startIndex=d.config.style.zoom.startIndex:a.style.zoom.startIndex=null,d.config&&u.hasDeepProperty(d.config,"style.zoom.endIndex")?a.style.zoom.endIndex=d.config.style.zoom.endIndex:a.style.zoom.endIndex=null,a}e.watch(()=>d.config,l=>{t.value=j(),A.value=!t.value.showOnChartHover,X(),C.value+=1,H.value+=1,q.value+=1},{deep:!0}),e.watch(()=>d.dataset,l=>{c.value.start=0,c.value.end=l.length,C.value+=1},{deep:!0});const i=e.ref({height:t.value.style.height,width:t.value.style.width,xAxisFontSize:t.value.style.layout.grid.xAxis.dataLabels.fontSize,yAxisFontSize:t.value.style.layout.grid.yAxis.dataLabels.fontSize}),N=e.ref(null);e.onMounted(()=>{X()});function X(){if(u.objectIsEmpty(d.dataset)&&u.error({componentName:"VueUiCandlestick",type:"dataset"}),t.value.responsive){const l=ie.throttle(()=>{const{width:a,height:o}=ie.useResponsive({chart:g.value,title:t.value.style.title.text?R.value:null,slicer:U.value,legend:O.value,source:D.value,noTitle:M.value});i.value.width=a,i.value.height=o,i.value.xAxisFontSize=u.translateSize({relator:Math.min(a,o),adjuster:t.value.style.width,source:t.value.style.layout.grid.xAxis.dataLabels.fontSize,threshold:6,fallback:6}),i.value.yAxisFontSize=u.translateSize({relator:Math.min(a,o),adjuster:t.value.style.width,source:t.value.style.layout.grid.yAxis.dataLabels.fontSize,threshold:6,fallback:6})});N.value=new ResizeObserver(l),N.value.observe(g.value.parentNode)}te()}e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:Y,isImaging:J,generatePdf:K,generateImage:Q}=de.usePrinter({elementId:`vue-ui-candlestick_${h.value}`,fileName:t.value.style.title.text||"vue-ui-candlestick"}),pe=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),s=e.computed(()=>{const{top:l,right:a,bottom:o,left:n}=t.value.style.layout.padding;return{top:l,right:i.value.width-a,left:n,bottom:i.value.height-o,width:i.value.width-n-a,height:i.value.height-l-o}}),w=e.computed(()=>d.dataset.length),c=e.ref({start:0,end:w.value}),Z=e.computed(()=>d.dataset.slice(c.value.start,c.value.end)),F=e.computed(()=>(d.dataset.forEach((l,a)=>{[null,void 0].includes(l[0])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"period (index 0)",index:a}),[null,void 0].includes(l[1])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"open (index 1)",index:a}),[null,void 0].includes(l[2])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"high (index 2)",index:a}),[null,void 0].includes(l[3])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"low (index 3)",index:a}),[null,void 0].includes(l[4])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"last (index 4)",index:a}),[null,void 0].includes(l[5])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"volume (index 5)",index:a})}),Z.value.map(l=>({period:l[0],open:l[1],high:l[2],low:l[3],last:l[4],volume:l[5]})))),r=e.computed(()=>s.value.width/Z.value.length),ee=e.computed(()=>({max:Math.max(...F.value.map(l=>l.high)),min:0})),m=e.computed(()=>u.calculateNiceScale(ee.value.min,ee.value.max,t.value.style.layout.grid.yAxis.dataLabels.steps));function $(l,a){return{...l,x:u.checkNaN(s.value.left+a*r.value+r.value/2),y:u.checkNaN(s.value.top+(1-l/m.value.max)*s.value.height),value:u.checkNaN(l)}}const v=e.computed(()=>F.value.map((l,a)=>{const o=$(l.open,a),n=$(l.high,a),y=$(l.low,a),_=$(l.last,a),z=l.last>l.open;return{period:l.period,open:o,high:n,low:y,last:_,volume:l.volume,isBullish:z}}));function fe(l){return u.checkNaN(l/m.value.max)}const me=e.computed(()=>m.value.ticks.map(l=>({y:s.value.bottom-s.value.height*fe(l),value:u.checkNaN(l)}))),ge=e.computed(()=>F.value.map(l=>l.period)),I=e.ref(null);function ke(l,a){T.value=l,I.value={datapoint:a,seriesIndex:l,series:v.value,config:t.value};const o=t.value.style.tooltip.customFormat;if(u.isFunction(o)&&u.functionReturnsString(()=>o({seriesIndex:l,datapoint:a,series:v.value,config:t.value})))E.value=o({seriesIndex:l,datapoint:a,series:v.value,config:t.value});else if(t.value.style.tooltip.show){let n="";const{period:y,open:_,high:z,low:ne,last:ue,volume:se,isBullish:re}=v.value[l],{period:gt,open:Ce,high:Ne,low:$e,last:Se,volume:Be}=t.value.translations;n+=`<div><svg style="margin-right:6px" viewBox="0 0 12 12" height="12" width="12"><rect x="0" y="0" height="12" width="12" rx="${t.value.style.layout.candle.borderRadius*3}" stroke="${t.value.style.layout.candle.stroke}" stroke-width="${t.value.style.layout.candle.strokeWidth}"
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-DVvHP4A_.cjs"),ie=require("./useResponsive-BJ7DTGpm.cjs"),_e=require("./Title-CFqlh_YB.cjs"),de=require("./usePrinter-a7rkFhGa.cjs"),ze=require("./Tooltip-BA_0hLX8.cjs"),Ve=require("./DataTable-1WuyQJQK.cjs"),Ee=require("./vue-ui-skeleton-Bw4w98Z_.cjs"),Te=require("./Slicer-hEQW3UhE.cjs"),Ae=require("./vue-ui-accordion-Dghh8xxy.cjs"),ce=require("./useNestedProp-CsmZqXml.cjs"),Fe=require("./PackageVersion-BachziuZ.cjs"),Ie=require("./PenAndPaper-D6E7hDYd.cjs"),Pe=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Re=["id"],Oe=["xmlns","viewBox"],Ue=["x","y","width","height"],De={key:1},Me=["id"],qe=["stop-color"],He=["stop-color"],We=["stop-color"],Ge=["id"],je=["stop-color"],Xe=["stop-color"],Ye=["stop-color"],Je={key:0},Ke=["x1","x2","y1","y2","stroke","stroke-width"],Qe=["x1","x2","y1","y2","stroke","stroke-width"],Ze={key:1},et=["x1","x2","y1","y2","stroke","stroke-width"],tt=["x","y","font-size","fill","font-weight"],lt={key:2},ot=["transform","text-anchor","font-size","fill","font-weight"],at=["x1","x2","y1","y2","stroke","stroke-width"],nt={key:0},ut=["cx","cy","r","fill"],st=["cx","cy","r","fill"],rt={key:1},it=["x1","x2","y1","y2","stroke","stroke-width"],dt=["x1","x2","y1","y2","stroke","stroke-width"],ct=["x","y","height","width","fill","rx"],vt=["x","y","height","width","fill","rx","stroke","stroke-width"],yt=["x","y","height","width","fill","onMouseover"],ht={key:5,class:"vue-data-ui-watermark"},pt=["innerHTML"],ft={__name:"vue-ui-candlestick",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(f,{expose:ve}){const d=f,{vue_ui_candlestick:ye}=u.useConfig(),b=e.computed(()=>!!d.dataset&&d.dataset.length),h=e.ref(u.createUid()),he=e.ref(null),V=e.ref(!1),E=e.ref(""),T=e.ref(void 0),L=e.ref(0),g=e.ref(null),R=e.ref(null),O=e.ref(null),U=e.ref(null),D=e.ref(null),M=e.ref(null),C=e.ref(0),q=e.ref(0),H=e.ref(0),t=e.computed({get:()=>j(),set:l=>l}),{userOptionsVisible:A,setUserOptionsVisibility:W,keepUserOptionState:G}=Pe.useUserOptionState({config:t.value});function j(){const l=ce.useNestedProp({userConfig:d.config,defaultConfig:ye});let a={};return l.theme?a={...ce.useNestedProp({userConfig:u.themes.vue_ui_candlestick[l.theme]||d.config,defaultConfig:l})}:a=l,d.config&&u.hasDeepProperty(d.config,"style.zoom.startIndex")?a.style.zoom.startIndex=d.config.style.zoom.startIndex:a.style.zoom.startIndex=null,d.config&&u.hasDeepProperty(d.config,"style.zoom.endIndex")?a.style.zoom.endIndex=d.config.style.zoom.endIndex:a.style.zoom.endIndex=null,a}e.watch(()=>d.config,l=>{t.value=j(),A.value=!t.value.showOnChartHover,X(),C.value+=1,H.value+=1,q.value+=1},{deep:!0}),e.watch(()=>d.dataset,l=>{c.value.start=0,c.value.end=l.length,C.value+=1},{deep:!0});const i=e.ref({height:t.value.style.height,width:t.value.style.width,xAxisFontSize:t.value.style.layout.grid.xAxis.dataLabels.fontSize,yAxisFontSize:t.value.style.layout.grid.yAxis.dataLabels.fontSize}),N=e.ref(null);e.onMounted(()=>{X()});function X(){if(u.objectIsEmpty(d.dataset)&&u.error({componentName:"VueUiCandlestick",type:"dataset"}),t.value.responsive){const l=ie.throttle(()=>{const{width:a,height:o}=ie.useResponsive({chart:g.value,title:t.value.style.title.text?R.value:null,slicer:U.value,legend:O.value,source:D.value,noTitle:M.value});i.value.width=a,i.value.height=o,i.value.xAxisFontSize=u.translateSize({relator:Math.min(a,o),adjuster:t.value.style.width,source:t.value.style.layout.grid.xAxis.dataLabels.fontSize,threshold:6,fallback:6}),i.value.yAxisFontSize=u.translateSize({relator:Math.min(a,o),adjuster:t.value.style.width,source:t.value.style.layout.grid.yAxis.dataLabels.fontSize,threshold:6,fallback:6})});N.value=new ResizeObserver(l),N.value.observe(g.value.parentNode)}te()}e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:Y,isImaging:J,generatePdf:K,generateImage:Q}=de.usePrinter({elementId:`vue-ui-candlestick_${h.value}`,fileName:t.value.style.title.text||"vue-ui-candlestick"}),pe=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),s=e.computed(()=>{const{top:l,right:a,bottom:o,left:n}=t.value.style.layout.padding;return{top:l,right:i.value.width-a,left:n,bottom:i.value.height-o,width:i.value.width-n-a,height:i.value.height-l-o}}),w=e.computed(()=>d.dataset.length),c=e.ref({start:0,end:w.value}),Z=e.computed(()=>d.dataset.slice(c.value.start,c.value.end)),F=e.computed(()=>(d.dataset.forEach((l,a)=>{[null,void 0].includes(l[0])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"period (index 0)",index:a}),[null,void 0].includes(l[1])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"open (index 1)",index:a}),[null,void 0].includes(l[2])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"high (index 2)",index:a}),[null,void 0].includes(l[3])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"low (index 3)",index:a}),[null,void 0].includes(l[4])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"last (index 4)",index:a}),[null,void 0].includes(l[5])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"volume (index 5)",index:a})}),Z.value.map(l=>({period:l[0],open:l[1],high:l[2],low:l[3],last:l[4],volume:l[5]})))),r=e.computed(()=>s.value.width/Z.value.length),ee=e.computed(()=>({max:Math.max(...F.value.map(l=>l.high)),min:0})),m=e.computed(()=>u.calculateNiceScale(ee.value.min,ee.value.max,t.value.style.layout.grid.yAxis.dataLabels.steps));function $(l,a){return{...l,x:u.checkNaN(s.value.left+a*r.value+r.value/2),y:u.checkNaN(s.value.top+(1-l/m.value.max)*s.value.height),value:u.checkNaN(l)}}const v=e.computed(()=>F.value.map((l,a)=>{const o=$(l.open,a),n=$(l.high,a),y=$(l.low,a),_=$(l.last,a),z=l.last>l.open;return{period:l.period,open:o,high:n,low:y,last:_,volume:l.volume,isBullish:z}}));function fe(l){return u.checkNaN(l/m.value.max)}const me=e.computed(()=>m.value.ticks.map(l=>({y:s.value.bottom-s.value.height*fe(l),value:u.checkNaN(l)}))),ge=e.computed(()=>F.value.map(l=>l.period)),I=e.ref(null);function ke(l,a){T.value=l,I.value={datapoint:a,seriesIndex:l,series:v.value,config:t.value};const o=t.value.style.tooltip.customFormat;if(u.isFunction(o)&&u.functionReturnsString(()=>o({seriesIndex:l,datapoint:a,series:v.value,config:t.value})))E.value=o({seriesIndex:l,datapoint:a,series:v.value,config:t.value});else if(t.value.style.tooltip.show){let n="";const{period:y,open:_,high:z,low:ne,last:ue,volume:se,isBullish:re}=v.value[l],{period:gt,open:Ce,high:Ne,low:$e,last:Se,volume:Be}=t.value.translations;n+=`<div><svg style="margin-right:6px" viewBox="0 0 12 12" height="12" width="12"><rect x="0" y="0" height="12" width="12" rx="${t.value.style.layout.candle.borderRadius*3}" stroke="${t.value.style.layout.candle.stroke}" stroke-width="${t.value.style.layout.candle.strokeWidth}"
2
2
  fill="${t.value.style.layout.candle.gradient.show?re?`url(#bullish_gradient_${h.value})`:`url(#bearish_gradient_${h.value})`:re?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg>${y}</div>`,n+=`${Be} : <b>${isNaN(se)?"-":Number(se.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()}</b>`,n+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,n+=`<div>${Ce}: <b>${t.value.style.tooltip.prefix} ${isNaN(_.value)?"-":Number(_.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+=`<div>${Ne}: <b>${t.value.style.tooltip.prefix} ${isNaN(z.value)?"-":Number(z.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+=`<div>${$e}: <b>${t.value.style.tooltip.prefix} ${isNaN(ne.value)?"-":Number(ne.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+=`<div>${Se}: <b>${t.value.style.tooltip.prefix} ${isNaN(ue.value)?"-":Number(ue.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+="</div>",E.value=`<div style="text-align:right">${n}</div>`}V.value=!0}function xe(){te()}const k=e.ref(null);async function te(){(t.value.style.zoom.startIndex!==null||t.value.style.zoom.endIndex!==null)&&k.value?(t.value.style.zoom.startIndex!==null&&(await e.nextTick(),await e.nextTick(),k.value&&k.value.setStartValue(t.value.style.zoom.startIndex)),t.value.style.zoom.endIndex!==null&&(await e.nextTick(),await e.nextTick(),k.value&&k.value.setEndValue(be(t.value.style.zoom.endIndex+1)))):(c.value={start:0,end:w.value},C.value+=1)}function be(l){const a=w.value;return l>a?a:l<0||t.value.style.zoom.startIndex!==null&&l<t.value.style.zoom.startIndex?t.value.style.zoom.startIndex!==null?t.value.style.zoom.startIndex+1:1:l}function le(){e.nextTick(()=>{const l=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume],a=v.value.map(y=>[y.period,y.open.value,y.high.value,y.low.value,y.last.value,y.volume]),o=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),n=u.createCsvContent(o);u.downloadCsv({csvContent:n,title:t.value.style.title.text||"vue-ui-candlestick"})})}const S=e.computed(()=>{const l=v.value.map(n=>[`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" height="12" width="12" style="margin-right: 6px"><rect x="0" y="0" height="12" width="12" :rx="${t.value.style.layout.candle.borderRadius*3}" fill="${t.value.style.layout.candle.gradient.show?n.isBullish?`url(#bullish_gradient_${h.value}`:`url(#bearish_gradient_${h.value})`:n.isBullish?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg> ${n.period}`,`${t.value.table.td.prefix} ${isNaN(n.open.value)?"-":Number(n.open.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(n.high.value)?"-":Number(n.high.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(n.low.value)?"-":Number(n.low.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(n.last.value)?"-":Number(n.last.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${isNaN(n.volume)?"-":n.volume.toLocaleString()}`]),a={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},o=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume];return{head:o,body:l,config:a,colNames:o}}),x=e.ref(!1);function we(l){x.value=l,L.value+=1}function oe(){p.value.showTable=!p.value.showTable}function ae(){p.value.showTooltip=!p.value.showTooltip}const B=e.ref(!1);function P(){B.value=!B.value}return ve({generatePdf:K,generateCsv:le,generateImage:Q,toggleTable:oe,toggleTooltip:ae,toggleAnnotator:P}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"candlestickChart",ref:g,class:e.normalizeClass(`vue-ui-candlestick ${x.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`position:relative;font-family:${t.value.style.fontFamily}; text-align:center;background:${t.value.style.backgroundColor}; ${t.value.responsive?"height: 100%":""}`),id:`vue-ui-candlestick_${h.value}`,onMouseenter:a[4]||(a[4]=()=>e.unref(W)(!0)),onMouseleave:a[5]||(a[5]=()=>e.unref(W)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ie.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:B.value,onClose:P},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),pe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:M,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:R,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(_e._sfc_main,{key:`title_${H.value}`,config:{title:{cy:"candlestick-div-title",...t.value.style.title},subtitle:{cy:"candlestick-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(G)||e.unref(A))?(e.openBlock(),e.createBlock(de.UserOptions,{ref_key:"details",ref:he,key:`user_options_${L.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(J),isPrinting:e.unref(Y),uid:h.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:x.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:we,onGeneratePdf:e.unref(K),onGenerateCsv:le,onGenerateImage:e.unref(Q),onToggleTable:oe,onToggleTooltip:ae,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(G)?e.unref(A)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${i.value.width<=0?10:i.value.width} ${i.value.height<=0?10:i.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(Fe._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:s.value.left,y:s.value.top,width:s.value.width,height:s.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Ue)):e.createCommentVNode("",!0),v.value.length>0?(e.openBlock(),e.createElementBlock("g",De,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`bearish_gradient_${h.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bearish},null,8,qe),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bearish,.02)}DE`},null,8,He),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bearish,.05)}66`},null,8,We)],8,Me),e.createElementVNode("linearGradient",{id:`bullish_gradient_${h.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bullish},null,8,je),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bullish,.02)}DE`},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bullish,.05)}66`},null,8,Ye)],8,Ge)]),t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Je,[e.createElementVNode("line",{x1:s.value.left,x2:s.value.left,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ke),e.createElementVNode("line",{x1:s.value.left,x2:s.value.right,y1:s.value.bottom,y2:s.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Qe)])):e.createCommentVNode("",!0),t.value.style.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value>=m.value.min&&o.value<=m.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:s.value.left,x2:s.value.left-5,y1:o.y,y2:o.y,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,et)):e.createCommentVNode("",!0),o.value>=m.value.min&&o.value<=m.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:s.value.left-8+t.value.style.layout.grid.yAxis.dataLabels.offsetX,y:o.y+i.value.yAxisFontSize/3,"font-size":i.value.yAxisFontSize,"text-anchor":"end",fill:t.value.style.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(t.value.style.layout.grid.yAxis.dataLabels.prefix)+" "+e.toDisplayString(e.unref(u.canShowValue)(o.value)?o.value.toFixed(t.value.style.layout.grid.yAxis.dataLabels.roundingValue):"")+" "+e.toDisplayString(t.value.style.layout.grid.yAxis.dataLabels.suffix),9,tt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),t.value.style.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ge.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{transform:`translate(${s.value.left+r.value*n+r.value/2}, ${s.value.bottom+i.value.xAxisFontSize*2+t.value.style.layout.grid.xAxis.dataLabels.offsetY}), rotate(${t.value.style.layout.grid.xAxis.dataLabels.rotation})`,"text-anchor":t.value.style.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":i.value.xAxisFontSize,fill:t.value.style.layout.grid.xAxis.dataLabels.color,"font-weight":t.value.style.layout.grid.xAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(o),9,ot)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("line",{x1:o.open.x,x2:o.open.x,y1:o.high.y,y2:o.low.y,stroke:t.value.style.layout.wick.stroke,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,at),t.value.style.layout.wick.extremity.shape==="circle"?(e.openBlock(),e.createElementBlock("g",nt,[e.createElementVNode("circle",{cx:o.high.x,cy:o.high.y,r:t.value.style.layout.wick.extremity.size==="auto"?r.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,ut),e.createElementVNode("circle",{cx:o.low.x,cy:o.low.y,r:t.value.style.layout.wick.extremity.size==="auto"?r.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,st)])):e.createCommentVNode("",!0),t.value.style.layout.wick.extremity.shape==="line"?(e.openBlock(),e.createElementBlock("g",rt,[e.createElementVNode("line",{x1:o.high.x-(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:o.high.x+(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:o.high.y,y2:o.high.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,it),e.createElementVNode("line",{x1:o.low.x-(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:o.low.x+(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:o.low.y,y2:o.low.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,dt)])):e.createCommentVNode("",!0)]))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("rect",{x:o.open.x-r.value/2+r.value*(1-t.value.style.layout.candle.widthRatio)/2,y:o.isBullish?o.last.y:o.open.y,height:Math.abs(o.last.y-o.open.y)<=0?1e-4:Math.abs(o.last.y-o.open.y),width:r.value*t.value.style.layout.candle.widthRatio<=0?1e-4:r.value*t.value.style.layout.candle.widthRatio,fill:t.value.style.layout.candle.gradient.underlayer,rx:t.value.style.layout.candle.borderRadius,stroke:"none"},null,8,ct))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("rect",{x:o.open.x-r.value/2+r.value*(1-t.value.style.layout.candle.widthRatio)/2,y:o.isBullish?o.last.y:o.open.y,height:Math.abs(o.last.y-o.open.y)<=0?1e-4:Math.abs(o.last.y-o.open.y),width:r.value*t.value.style.layout.candle.widthRatio<=0?1e-4:r.value*t.value.style.layout.candle.widthRatio,fill:o.isBullish?t.value.style.layout.candle.gradient.show?`url(#bullish_gradient_${h.value})`:t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.gradient.show?`url(#bearish_gradient_${h.value})`:t.value.style.layout.candle.colors.bearish,rx:t.value.style.layout.candle.borderRadius,stroke:t.value.style.layout.candle.stroke,"stroke-width":t.value.style.layout.candle.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,vt))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value.left+n*r.value,y:s.value.top,height:s.value.height<=0?1e-4:s.value.height,width:r.value<=0?1e-4:r.value,fill:T.value===n?e.unref(u.setOpacity)(t.value.style.layout.selector.color,t.value.style.layout.selector.opacity):"transparent",onMouseover:y=>ke(n,o),onMouseleave:a[0]||(a[0]=y=>{T.value=void 0,V.value=!1})},null,40,yt))),256))])])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,Oe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ht,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ee.default,{key:6,config:{type:"candlesticks",style:{backgroundColor:t.value.style.backgroundColor,candlesticks:{axis:{color:"#CCCCCC"},candle:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.zoom.show&&b.value?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"chartSlicer",ref:U},[(e.openBlock(),e.createBlock(Te.Slicer,{ref_key:"slicerComponent",ref:k,key:`slicer_${C.value}`,background:t.value.style.zoom.color,borderColor:t.value.style.backgroundColor,fontSize:t.value.style.zoom.fontSize,useResetSlot:t.value.style.zoom.useResetSlot,labelLeft:f.dataset[c.value.start]?f.dataset[c.value.start][0]:f.dataset[0][0],labelRight:f.dataset[c.value.end-1]?f.dataset[c.value.end-1][0]:f.dataset.at(-1)[0],textColor:t.value.style.color,inputColor:t.value.style.zoom.color,selectColor:t.value.style.zoom.highlightColor,max:w.value,min:0,valueStart:c.value.start,valueEnd:c.value.end,start:c.value.start,"onUpdate:start":a[1]||(a[1]=o=>c.value.start=o),end:c.value.end,"onUpdate:end":a[2]||(a[2]=o=>c.value.end=o),refreshStartPoint:t.value.style.zoom.startIndex!==null?t.value.style.zoom.startIndex:0,refreshEndPoint:t.value.style.zoom.endIndex!==null?t.value.style.zoom.endIndex+1:w.value,enableRangeHandles:t.value.style.zoom.enableRangeHandles,enableSelectionDrag:t.value.style.zoom.enableSelectionDrag,onReset:xe},{"reset-action":e.withCtx(({reset:o})=>[e.renderSlot(l.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:o})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag"]))],512)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[e.renderSlot(l.$slots,"legend",{legend:v.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"source",ref:D,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:p.value.showTooltip&&V.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:g.value,content:E.value,isFullscreen:x.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...I.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...I.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),b.value?(e.openBlock(),e.createBlock(Ae.default,{key:9,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ve.DataTable,{key:`table_${q.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:a[3]||(a[3]=o=>p.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createElementVNode("div",{innerHTML:o},null,8,pt)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Re))}},mt=Le._export_sfc(ft,[["__scopeId","data-v-744b9b91"]]);exports.default=mt;
@@ -1,16 +1,16 @@
1
1
  import { computed as g, ref as n, watch as Se, onMounted as qe, onBeforeUnmount as Je, nextTick as V, openBlock as s, createElementBlock as u, normalizeClass as Ne, normalizeStyle as ee, unref as v, createBlock as _, createCommentVNode as y, createSlots as Ke, withCtx as m, renderSlot as f, normalizeProps as T, guardReactiveProps as I, createVNode as Ae, createElementVNode as r, Fragment as F, renderList as L, toDisplayString as P, createTextVNode as Qe } from "vue";
2
- import { u as Ze, c as et, t as tt, C as Te, o as lt, e as z, D as ot, v as U, X as at, w as j, E as st, s as ut, x as it, y as nt, q as rt, r as dt, F as Ie } from "./index-BVNcFEqn.js";
2
+ import { u as Ze, c as et, t as tt, C as Te, o as lt, e as z, D as ot, v as U, X as at, w as j, E as st, s as ut, x as it, y as nt, q as rt, r as dt, F as Ie } from "./index-CnwO8xcH.js";
3
3
  import { t as vt, u as yt } from "./useResponsive-CoxXLe23.js";
4
- import { _ as ct } from "./Title-DyUTj8GI.js";
5
- import { u as ht, U as pt } from "./usePrinter-Bcfs_I6G.js";
6
- import { _ as ft } from "./Tooltip-B-0uEV3l.js";
7
- import { D as gt } from "./DataTable-DX_jYNWG.js";
8
- import mt from "./vue-ui-skeleton-Bgf16k10.js";
9
- import { S as bt } from "./Slicer-CopZgIzh.js";
10
- import xt from "./vue-ui-accordion-GNblUy42.js";
11
- import { u as Fe } from "./useNestedProp-D79dWdel.js";
12
- import { _ as kt } from "./PackageVersion-B9_Ed72C.js";
13
- import { P as wt } from "./PenAndPaper-CzjoEhsO.js";
4
+ import { _ as ct } from "./Title-CEILAOdT.js";
5
+ import { u as ht, U as pt } from "./usePrinter-BEBjMPUP.js";
6
+ import { _ as ft } from "./Tooltip-CgY3ZV9q.js";
7
+ import { D as gt } from "./DataTable-BLV7zzyw.js";
8
+ import mt from "./vue-ui-skeleton-DyIz4SMi.js";
9
+ import { S as bt } from "./Slicer-CL0kQ_HB.js";
10
+ import xt from "./vue-ui-accordion-DDF-Fm2i.js";
11
+ import { u as Fe } from "./useNestedProp-DPMt3Iiy.js";
12
+ import { _ as kt } from "./PackageVersion-BazXxXqy.js";
13
+ import { P as wt } from "./PenAndPaper-D4nWibJ3.js";
14
14
  import { u as $t } from "./useUserOptionState-BIvW1Kz7.js";
15
15
  import { _ as Ct } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
16
  const _t = ["id"], zt = ["xmlns", "viewBox"], St = ["x", "y", "width", "height"], Nt = { key: 1 }, At = ["id"], Tt = ["stop-color"], It = ["stop-color"], Ft = ["stop-color"], Lt = ["id"], Rt = ["stop-color"], Ot = ["stop-color"], Vt = ["stop-color"], Pt = { key: 0 }, Ut = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Bt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Et = { key: 1 }, Mt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Dt = ["x", "y", "font-size", "fill", "font-weight"], Wt = { key: 2 }, Gt = ["transform", "text-anchor", "font-size", "fill", "font-weight"], Ht = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], jt = { key: 0 }, Xt = ["cx", "cy", "r", "fill"], Yt = ["cx", "cy", "r", "fill"], qt = { key: 1 }, Jt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Kt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Qt = ["x", "y", "height", "width", "fill", "rx"], Zt = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width"], el = ["x", "y", "height", "width", "fill", "onMouseover"], tl = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-CKgv8c-A.cjs"),ue=require("./useNestedProp-0Mn5Z6Ae.cjs"),Q=require("./usePrinter-Gkda9yEJ.cjs"),se=require("./vue-ui-skeleton-73YO0ovP.cjs"),de=require("./useUserOptionState-BgepsfED.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],pe=["height"],fe=["data-cell","height"],me={key:2,ref:"source",dir:"auto"},he={__name:"vue-ui-carousel-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(b,{expose:W}){const r=b,{vue_ui_carousel_table:Y}=u.useConfig(),S=e.ref(u.createUid()),I=e.ref(!1),k=e.ref(!!r.dataset),Z=e.useSlots();e.onMounted(()=>{F()}),e.onMounted(()=>{Z["chart-background"]&&console.warn("VueUiCarouselTable does not support the #chart-background slot.")});function F(){u.objectIsEmpty(r.dataset)?u.error({componentName:"VueUiCarouselTable",type:"dataset"}):((!r.dataset.head||u.objectIsEmpty(r.dataset.head))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"head"}),k.value=!1),(!r.dataset.body||u.objectIsEmpty(r.dataset.body))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"body"}),k.value=!1))}const t=e.computed({get:()=>V(),set:o=>o}),{userOptionsVisible:A,setUserOptionsVisibility:P,keepUserOptionState:N}=de.useUserOptionState({config:t.value});function V(){return ue.useNestedProp({userConfig:r.config,defaultConfig:Y})}e.watch(()=>r.config,o=>{t.value=V(),A.value=!t.value.showOnChartHover,F()},{deep:!0}),e.watch(()=>r.dataset,o=>{O()},{deep:!0});const{isPrinting:R,isImaging:M,generatePdf:_,generateImage:q}=Q.usePrinter({elementId:`carousel-table_${S.value}`,fileName:t.value.caption.text||"vue-ui-carousel-table"}),v=e.ref({showAnimation:t.value.animation.use}),l=e.ref(null),U=e.ref(null),C=e.ref(null),T=e.ref(null),$=e.ref(0),B=e.ref(0),x=e.ref(!1),w=e.ref(null),f=e.ref(null),y=e.ref(0);function O(){w.value&&(f.value={elements:w.value.getElementsByTagName("tr"),heights:Array.from(w.value.getElementsByTagName("tr")).map(o=>o.getBoundingClientRect().height)})}e.onMounted(O);const ee=e.computed(()=>!f.value||!f.value.heights.length?0:Math.max(...f.value.heights)+$.value+B.value),te=e.computed(()=>r.dataset.body?t.value.tbody.tr.visible<=r.dataset.body.length?t.value.tbody.tr.visible:r.dataset.body.length:0),oe=e.computed(()=>(t.value.tbody.tr.height+t.value.tbody.tr.td.padding.top+t.value.tbody.tr.td.padding.bottom+t.value.tbody.tr.border.size*2)*te.value+$.value+B.value),d=e.ref(0),m=e.ref(null),s=e.ref(0),h=e.ref(!1),H=e.ref(0);e.onMounted(()=>{C.value&&($.value=C.value.getBoundingClientRect().height),T.value&&(B.value=T.value.getBoundingClientRect().height),v.value.showAnimation&&f.value&&L()}),e.onMounted(()=>{if(l.value){let n=function(){const i=o.getBoundingClientRect().bottom;a.forEach(p=>{p.getBoundingClientRect().top<i?p.style.visibility="hidden":p.style.visibility="visible"})};const o=l.value.querySelector("thead"),a=Array.from(w.value.querySelectorAll("tr"));l.value.addEventListener("scroll",n),n(),e.onBeforeUnmount(()=>{l.value.removeEventListener("scroll",n)})}});function ae(o){I.value=o,H.value+=1}function L(){!m.value&&!h.value&&(t.value.animation.type==="scroll"?m.value=requestAnimationFrame(D):m.value=requestAnimationFrame(G))}function ne(){if(!l.value)return!1;const{scrollTop:o,scrollHeight:a,clientHeight:n}=l.value;return o+n>=a}function D(o){if(h.value)return;s.value||(s.value=o),o-s.value>=t.value.animation.speedMs&&(d.value+=f.value.heights[y.value],(ne()||y.value>=f.value.heights.length)&&(d.value=0,y.value=-1),y.value+=1,l.value&&l.value.scrollTo({top:d.value,behavior:"smooth"}),s.value=o),m.value=requestAnimationFrame(D)}function G(o){if(h.value)return;s.value||(s.value=o);const a=o-s.value,n=t.value.animation.speedMs/4/1e3;a>=n&&(d.value+=n,d.value>=l.value.scrollHeight-l.value.clientHeight&&(d.value=0),l.value&&l.value.scrollTo({top:d.value,behavior:"auto"}),s.value=o),m.value=requestAnimationFrame(G)}function c(){h.value=!0,cancelAnimationFrame(m.value),m.value=null}e.onBeforeUnmount(c);function g(){!h.value||!v.value.showAnimation||(h.value=!1,s.value=0,L())}function le(){t.value.animation.pauseOnHover&&c()}const E=e.ref(null);function re(){c(),clearTimeout(E.value)}function j(){clearTimeout(E.value),E.value=setTimeout(g,1e3)}e.watch(()=>t.value.animation.use,o=>{o?(v.value.showAnimation=!0,g()):(v.value.showAnimation=!1,c())}),e.watch(()=>t.value.animation.type,o=>{c(),d.value=0,y.value=0,l.value.scrollTo({top:0,behavior:"auto"}),g()});const ie=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{const o=new ResizeObserver(a=>{a.forEach(n=>{x.value=n.contentRect.width<ie.value}),$.value=C.value?C.value.getBoundingClientRect().height:0,B.value=T.value?T.value.getBoundingClientRect().height:0,y.value=0,e.nextTick(()=>{c(),s.value=0,d.value=0,O(),g()})});l.value&&o.observe(l.value)});function X(){_()}function J(){v.value.showAnimation=!v.value.showAnimation,v.value.showAnimation?g():c()}function K(){e.nextTick(()=>{const o=r.dataset.head.map((i,p)=>[[r.dataset.body[p]]]),a=[[t.value.caption.text],[r.dataset.head.map(i=>[i])]].concat(o),n=u.createCsvContent(a);u.downloadCsv({csvContent:n,title:t.value.caption.text||"vue-ui-carousel-table"})})}return W({pauseAnimation:c,resumeAnimation:g,toggleAnimation:J,generateCsv:K,generatePdf:X,generateImage:q}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{style:{position:"relative",overflow:"visible"},ref_key:"chartContainer",ref:U,onMouseenter:a[5]||(a[5]=()=>e.unref(P)(!0)),onMouseleave:a[6]||(a[6]=()=>e.unref(P)(!1))},[e.createElementVNode("div",{ref_key:"tableContainer",ref:l,id:`carousel-table_${S.value}`,style:e.normalizeStyle({height:e.unref(R)||e.unref(M)?"auto":`${Math.max(oe.value,ee.value)}px`,containerType:"inline-size",position:"relative",overflow:"auto",fontFamily:t.value.fontFamily}),class:e.normalizeClass({"vue-ui-responsive":x.value,"is-playing":t.value.scrollbar.hide||!h.value&&t.value.scrollbar.showOnlyOnHover}),onMouseover:a[0]||(a[0]=n=>le()),onMouseleave:a[1]||(a[1]=n=>g()),onTouchstart:a[2]||(a[2]=n=>re()),onTouchend:a[3]||(a[3]=n=>j()),onTouchcancel:a[4]||(a[4]=n=>j())},[k.value?(e.openBlock(),e.createElementBlock("table",{key:0,class:"vue-data-ui-carousel-table",style:e.normalizeStyle({...t.value.style,border:`${t.value.border.size}px solid ${t.value.border.color}`,width:"100%",borderCollapse:"collapse",backgroundColor:t.value.tbody.backgroundColor})},[e.createElementVNode("caption",{ref_key:"caption",ref:C,class:"vue-data-ui-carousel-table-caption",style:e.normalizeStyle({...t.value.caption.style,fontFamily:"inherit",position:"sticky",top:0,zIndex:2,paddingTop:t.value.caption.padding.top+"px",paddingRight:t.value.caption.padding.right+"px",paddingBottom:t.value.caption.padding.bottom+"px",paddingLeft:t.value.caption.padding.left+"px",boxShadow:x.value?t.value.thead.tr.style.boxShadow:"none",minHeight:"36px",display:o.$slots.caption||t.value.caption.text||t.value.userOptions.show?"":"none"})},[e.createTextVNode(e.toDisplayString(t.value.caption.text&&!o.$slots.caption?t.value.caption.text:"")+" ",1),e.renderSlot(o.$slots,"caption",{},void 0,!0)],4),e.createElementVNode("thead",{style:e.normalizeStyle({...t.value.thead.style,position:"sticky",top:`${o.$slots.caption||t.value.caption.text||t.value.userOptions.show?$.value:0}px`,zIndex:1})},[e.createElementVNode("tr",{ref_key:"tableRow",ref:T,role:"row",style:e.normalizeStyle({...t.value.thead.tr.style,border:t.value.thead.tr.border.size?`${t.value.thead.tr.border.size}px solid ${t.value.thead.tr.border.color}`:"none",boxShadow:x.value?"none":t.value.thead.tr.style.boxShadow}),height:`${t.value.thead.tr.height}px`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.dataset.head,(n,i)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",key:`th_${i}`,style:e.normalizeStyle({...t.value.thead.tr.th.style,border:t.value.thead.tr.th.border.size?`${t.value.thead.tr.th.border.size}px solid ${t.value.thead.tr.th.border.color}`:"none",paddingTop:t.value.thead.tr.th.padding.top+"px",paddingRight:t.value.thead.tr.th.padding.right+"px",paddingBottom:t.value.thead.tr.th.padding.bottom+"px",paddingLeft:t.value.thead.tr.th.padding.left+"px"})},[e.createTextVNode(e.toDisplayString(o.$slots.th?"":n)+" ",1),e.renderSlot(o.$slots,"th",e.normalizeProps(e.guardReactiveProps({th:n,colIndex:i})),void 0,!0)],4))),128))],12,pe)],4),b.dataset.body&&b.dataset.head?(e.openBlock(),e.createElementBlock("tbody",{key:0,ref_key:"tbody",ref:w,style:e.normalizeStyle({clipPath:"inset(0,0,0,0)"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.dataset.body,(n,i)=>(e.openBlock(),e.createElementBlock("tr",{style:e.normalizeStyle({...t.value.tbody.tr.style,border:`${t.value.tbody.tr.border.size}px solid ${t.value.tbody.tr.border.color}`,verticalAlign:"middle"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n,(p,z)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":b.dataset.head[z]||"",style:e.normalizeStyle({...t.value.tbody.tr.td.style,border:`${t.value.tbody.tr.td.border.size}px solid ${t.value.tbody.tr.td.border.color}`,backgroundColor:e.unref(u.setOpacity)(t.value.tbody.tr.td.style.backgroundColor,i%2===0&&t.value.tbody.tr.td.alternateColor?t.value.tbody.tr.td.alternateOpacity*100:100),paddingTop:t.value.tbody.tr.td.padding.top+"px",paddingRight:t.value.tbody.tr.td.padding.right+"px",paddingBottom:t.value.tbody.tr.td.padding.bottom+"px",paddingLeft:t.value.tbody.tr.td.padding.left+"px",verticalAlign:"middle"}),height:`${t.value.tbody.tr.height}px`},[e.createTextVNode(e.toDisplayString(o.$slots.td?"":p)+" ",1),e.renderSlot(o.$slots,"td",e.normalizeProps(e.guardReactiveProps({td:p,rowIndex:i,colIndex:z})),void 0,!0)],12,fe))),256))],4))),256))],4)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],46,ce),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(se.default,{key:0,config:{type:"table"}})),t.value.userOptions.show&&k.value&&(e.unref(N)||e.unref(A))?(e.openBlock(),e.createBlock(Q.UserOptions,{ref:"details",key:`user_option_${H.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isPrinting:e.unref(R),isImaging:e.unref(M),uid:S.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:!1,hasLabel:!1,hasAnimation:t.value.userOptions.buttons.animation,isAnimation:!v.value.showAnimation,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:I.value,chartElement:U.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},zIndex:3,offsetX:12,onGeneratePdf:X,onGenerateCsv:K,onGenerateImage:e.unref(q),onToggleAnimation:J,onToggleFullscreen:ae,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(A)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionAnimation?{name:"optionAnimation",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionAnimation",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:i})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasAnimation","isAnimation","hasFullscreen","isFullscreen","chartElement","position","titles","onGenerateImage","style"])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",me,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],544))}},ge=ve._export_sfc(he,[["__scopeId","data-v-ad42b687"]]);exports.default=ge;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-DVvHP4A_.cjs"),ue=require("./useNestedProp-CsmZqXml.cjs"),Q=require("./usePrinter-a7rkFhGa.cjs"),se=require("./vue-ui-skeleton-Bw4w98Z_.cjs"),de=require("./useUserOptionState-BgepsfED.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],pe=["height"],fe=["data-cell","height"],me={key:2,ref:"source",dir:"auto"},he={__name:"vue-ui-carousel-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(b,{expose:W}){const r=b,{vue_ui_carousel_table:Y}=u.useConfig(),S=e.ref(u.createUid()),I=e.ref(!1),k=e.ref(!!r.dataset),Z=e.useSlots();e.onMounted(()=>{F()}),e.onMounted(()=>{Z["chart-background"]&&console.warn("VueUiCarouselTable does not support the #chart-background slot.")});function F(){u.objectIsEmpty(r.dataset)?u.error({componentName:"VueUiCarouselTable",type:"dataset"}):((!r.dataset.head||u.objectIsEmpty(r.dataset.head))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"head"}),k.value=!1),(!r.dataset.body||u.objectIsEmpty(r.dataset.body))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"body"}),k.value=!1))}const t=e.computed({get:()=>V(),set:o=>o}),{userOptionsVisible:A,setUserOptionsVisibility:P,keepUserOptionState:N}=de.useUserOptionState({config:t.value});function V(){return ue.useNestedProp({userConfig:r.config,defaultConfig:Y})}e.watch(()=>r.config,o=>{t.value=V(),A.value=!t.value.showOnChartHover,F()},{deep:!0}),e.watch(()=>r.dataset,o=>{O()},{deep:!0});const{isPrinting:R,isImaging:M,generatePdf:_,generateImage:q}=Q.usePrinter({elementId:`carousel-table_${S.value}`,fileName:t.value.caption.text||"vue-ui-carousel-table"}),v=e.ref({showAnimation:t.value.animation.use}),l=e.ref(null),U=e.ref(null),C=e.ref(null),T=e.ref(null),$=e.ref(0),B=e.ref(0),x=e.ref(!1),w=e.ref(null),f=e.ref(null),y=e.ref(0);function O(){w.value&&(f.value={elements:w.value.getElementsByTagName("tr"),heights:Array.from(w.value.getElementsByTagName("tr")).map(o=>o.getBoundingClientRect().height)})}e.onMounted(O);const ee=e.computed(()=>!f.value||!f.value.heights.length?0:Math.max(...f.value.heights)+$.value+B.value),te=e.computed(()=>r.dataset.body?t.value.tbody.tr.visible<=r.dataset.body.length?t.value.tbody.tr.visible:r.dataset.body.length:0),oe=e.computed(()=>(t.value.tbody.tr.height+t.value.tbody.tr.td.padding.top+t.value.tbody.tr.td.padding.bottom+t.value.tbody.tr.border.size*2)*te.value+$.value+B.value),d=e.ref(0),m=e.ref(null),s=e.ref(0),h=e.ref(!1),H=e.ref(0);e.onMounted(()=>{C.value&&($.value=C.value.getBoundingClientRect().height),T.value&&(B.value=T.value.getBoundingClientRect().height),v.value.showAnimation&&f.value&&L()}),e.onMounted(()=>{if(l.value){let n=function(){const i=o.getBoundingClientRect().bottom;a.forEach(p=>{p.getBoundingClientRect().top<i?p.style.visibility="hidden":p.style.visibility="visible"})};const o=l.value.querySelector("thead"),a=Array.from(w.value.querySelectorAll("tr"));l.value.addEventListener("scroll",n),n(),e.onBeforeUnmount(()=>{l.value.removeEventListener("scroll",n)})}});function ae(o){I.value=o,H.value+=1}function L(){!m.value&&!h.value&&(t.value.animation.type==="scroll"?m.value=requestAnimationFrame(D):m.value=requestAnimationFrame(G))}function ne(){if(!l.value)return!1;const{scrollTop:o,scrollHeight:a,clientHeight:n}=l.value;return o+n>=a}function D(o){if(h.value)return;s.value||(s.value=o),o-s.value>=t.value.animation.speedMs&&(d.value+=f.value.heights[y.value],(ne()||y.value>=f.value.heights.length)&&(d.value=0,y.value=-1),y.value+=1,l.value&&l.value.scrollTo({top:d.value,behavior:"smooth"}),s.value=o),m.value=requestAnimationFrame(D)}function G(o){if(h.value)return;s.value||(s.value=o);const a=o-s.value,n=t.value.animation.speedMs/4/1e3;a>=n&&(d.value+=n,d.value>=l.value.scrollHeight-l.value.clientHeight&&(d.value=0),l.value&&l.value.scrollTo({top:d.value,behavior:"auto"}),s.value=o),m.value=requestAnimationFrame(G)}function c(){h.value=!0,cancelAnimationFrame(m.value),m.value=null}e.onBeforeUnmount(c);function g(){!h.value||!v.value.showAnimation||(h.value=!1,s.value=0,L())}function le(){t.value.animation.pauseOnHover&&c()}const E=e.ref(null);function re(){c(),clearTimeout(E.value)}function j(){clearTimeout(E.value),E.value=setTimeout(g,1e3)}e.watch(()=>t.value.animation.use,o=>{o?(v.value.showAnimation=!0,g()):(v.value.showAnimation=!1,c())}),e.watch(()=>t.value.animation.type,o=>{c(),d.value=0,y.value=0,l.value.scrollTo({top:0,behavior:"auto"}),g()});const ie=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{const o=new ResizeObserver(a=>{a.forEach(n=>{x.value=n.contentRect.width<ie.value}),$.value=C.value?C.value.getBoundingClientRect().height:0,B.value=T.value?T.value.getBoundingClientRect().height:0,y.value=0,e.nextTick(()=>{c(),s.value=0,d.value=0,O(),g()})});l.value&&o.observe(l.value)});function X(){_()}function J(){v.value.showAnimation=!v.value.showAnimation,v.value.showAnimation?g():c()}function K(){e.nextTick(()=>{const o=r.dataset.head.map((i,p)=>[[r.dataset.body[p]]]),a=[[t.value.caption.text],[r.dataset.head.map(i=>[i])]].concat(o),n=u.createCsvContent(a);u.downloadCsv({csvContent:n,title:t.value.caption.text||"vue-ui-carousel-table"})})}return W({pauseAnimation:c,resumeAnimation:g,toggleAnimation:J,generateCsv:K,generatePdf:X,generateImage:q}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{style:{position:"relative",overflow:"visible"},ref_key:"chartContainer",ref:U,onMouseenter:a[5]||(a[5]=()=>e.unref(P)(!0)),onMouseleave:a[6]||(a[6]=()=>e.unref(P)(!1))},[e.createElementVNode("div",{ref_key:"tableContainer",ref:l,id:`carousel-table_${S.value}`,style:e.normalizeStyle({height:e.unref(R)||e.unref(M)?"auto":`${Math.max(oe.value,ee.value)}px`,containerType:"inline-size",position:"relative",overflow:"auto",fontFamily:t.value.fontFamily}),class:e.normalizeClass({"vue-ui-responsive":x.value,"is-playing":t.value.scrollbar.hide||!h.value&&t.value.scrollbar.showOnlyOnHover}),onMouseover:a[0]||(a[0]=n=>le()),onMouseleave:a[1]||(a[1]=n=>g()),onTouchstart:a[2]||(a[2]=n=>re()),onTouchend:a[3]||(a[3]=n=>j()),onTouchcancel:a[4]||(a[4]=n=>j())},[k.value?(e.openBlock(),e.createElementBlock("table",{key:0,class:"vue-data-ui-carousel-table",style:e.normalizeStyle({...t.value.style,border:`${t.value.border.size}px solid ${t.value.border.color}`,width:"100%",borderCollapse:"collapse",backgroundColor:t.value.tbody.backgroundColor})},[e.createElementVNode("caption",{ref_key:"caption",ref:C,class:"vue-data-ui-carousel-table-caption",style:e.normalizeStyle({...t.value.caption.style,fontFamily:"inherit",position:"sticky",top:0,zIndex:2,paddingTop:t.value.caption.padding.top+"px",paddingRight:t.value.caption.padding.right+"px",paddingBottom:t.value.caption.padding.bottom+"px",paddingLeft:t.value.caption.padding.left+"px",boxShadow:x.value?t.value.thead.tr.style.boxShadow:"none",minHeight:"36px",display:o.$slots.caption||t.value.caption.text||t.value.userOptions.show?"":"none"})},[e.createTextVNode(e.toDisplayString(t.value.caption.text&&!o.$slots.caption?t.value.caption.text:"")+" ",1),e.renderSlot(o.$slots,"caption",{},void 0,!0)],4),e.createElementVNode("thead",{style:e.normalizeStyle({...t.value.thead.style,position:"sticky",top:`${o.$slots.caption||t.value.caption.text||t.value.userOptions.show?$.value:0}px`,zIndex:1})},[e.createElementVNode("tr",{ref_key:"tableRow",ref:T,role:"row",style:e.normalizeStyle({...t.value.thead.tr.style,border:t.value.thead.tr.border.size?`${t.value.thead.tr.border.size}px solid ${t.value.thead.tr.border.color}`:"none",boxShadow:x.value?"none":t.value.thead.tr.style.boxShadow}),height:`${t.value.thead.tr.height}px`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.dataset.head,(n,i)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",key:`th_${i}`,style:e.normalizeStyle({...t.value.thead.tr.th.style,border:t.value.thead.tr.th.border.size?`${t.value.thead.tr.th.border.size}px solid ${t.value.thead.tr.th.border.color}`:"none",paddingTop:t.value.thead.tr.th.padding.top+"px",paddingRight:t.value.thead.tr.th.padding.right+"px",paddingBottom:t.value.thead.tr.th.padding.bottom+"px",paddingLeft:t.value.thead.tr.th.padding.left+"px"})},[e.createTextVNode(e.toDisplayString(o.$slots.th?"":n)+" ",1),e.renderSlot(o.$slots,"th",e.normalizeProps(e.guardReactiveProps({th:n,colIndex:i})),void 0,!0)],4))),128))],12,pe)],4),b.dataset.body&&b.dataset.head?(e.openBlock(),e.createElementBlock("tbody",{key:0,ref_key:"tbody",ref:w,style:e.normalizeStyle({clipPath:"inset(0,0,0,0)"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.dataset.body,(n,i)=>(e.openBlock(),e.createElementBlock("tr",{style:e.normalizeStyle({...t.value.tbody.tr.style,border:`${t.value.tbody.tr.border.size}px solid ${t.value.tbody.tr.border.color}`,verticalAlign:"middle"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n,(p,z)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":b.dataset.head[z]||"",style:e.normalizeStyle({...t.value.tbody.tr.td.style,border:`${t.value.tbody.tr.td.border.size}px solid ${t.value.tbody.tr.td.border.color}`,backgroundColor:e.unref(u.setOpacity)(t.value.tbody.tr.td.style.backgroundColor,i%2===0&&t.value.tbody.tr.td.alternateColor?t.value.tbody.tr.td.alternateOpacity*100:100),paddingTop:t.value.tbody.tr.td.padding.top+"px",paddingRight:t.value.tbody.tr.td.padding.right+"px",paddingBottom:t.value.tbody.tr.td.padding.bottom+"px",paddingLeft:t.value.tbody.tr.td.padding.left+"px",verticalAlign:"middle"}),height:`${t.value.tbody.tr.height}px`},[e.createTextVNode(e.toDisplayString(o.$slots.td?"":p)+" ",1),e.renderSlot(o.$slots,"td",e.normalizeProps(e.guardReactiveProps({td:p,rowIndex:i,colIndex:z})),void 0,!0)],12,fe))),256))],4))),256))],4)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],46,ce),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(se.default,{key:0,config:{type:"table"}})),t.value.userOptions.show&&k.value&&(e.unref(N)||e.unref(A))?(e.openBlock(),e.createBlock(Q.UserOptions,{ref:"details",key:`user_option_${H.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isPrinting:e.unref(R),isImaging:e.unref(M),uid:S.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:!1,hasLabel:!1,hasAnimation:t.value.userOptions.buttons.animation,isAnimation:!v.value.showAnimation,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:I.value,chartElement:U.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},zIndex:3,offsetX:12,onGeneratePdf:X,onGenerateCsv:K,onGenerateImage:e.unref(q),onToggleAnimation:J,onToggleFullscreen:ae,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(A)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionAnimation?{name:"optionAnimation",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionAnimation",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:i})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasAnimation","isAnimation","hasFullscreen","isFullscreen","chartElement","position","titles","onGenerateImage","style"])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",me,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],544))}},ge=ve._export_sfc(he,[["__scopeId","data-v-ad42b687"]]);exports.default=ge;
@@ -1,8 +1,8 @@
1
1
  import { ref as l, useSlots as Ie, onMounted as A, computed as B, watch as E, onBeforeUnmount as ce, nextTick as he, openBlock as u, createElementBlock as v, unref as r, createElementVNode as H, normalizeStyle as p, normalizeClass as Fe, createTextVNode as L, toDisplayString as G, renderSlot as h, Fragment as D, renderList as X, normalizeProps as j, guardReactiveProps as J, createCommentVNode as P, createBlock as fe, createSlots as Be, withCtx as R } from "vue";
2
- import { u as Pe, c as Re, o as K, e as Q, s as ze, q as Se, r as Ee } from "./index-BVNcFEqn.js";
3
- import { u as He } from "./useNestedProp-D79dWdel.js";
4
- import { u as Ne, U as Ue } from "./usePrinter-Bcfs_I6G.js";
5
- import Ve from "./vue-ui-skeleton-Bgf16k10.js";
2
+ import { u as Pe, c as Re, o as K, e as Q, s as ze, q as Se, r as Ee } from "./index-CnwO8xcH.js";
3
+ import { u as He } from "./useNestedProp-DPMt3Iiy.js";
4
+ import { u as Ne, U as Ue } from "./usePrinter-BEBjMPUP.js";
5
+ import Ve from "./vue-ui-skeleton-DyIz4SMi.js";
6
6
  import { u as Me } from "./useUserOptionState-BIvW1Kz7.js";
7
7
  import { _ as qe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
8
  const Le = ["id"], Ge = ["height"], De = ["data-cell", "height"], Xe = {
@@ -1,12 +1,12 @@
1
1
  import { useCssVars as Ye, computed as m, ref as T, watch as qe, onMounted as He, openBlock as a, createElementBlock as o, normalizeClass as k, normalizeStyle as h, unref as n, createBlock as K, createCommentVNode as f, createSlots as We, withCtx as X, renderSlot as F, normalizeProps as ue, guardReactiveProps as ne, createVNode as $e, toDisplayString as c, createElementVNode as s, Fragment as g, renderList as _, createTextVNode as J, withKeys as Ke, nextTick as Ce } from "vue";
2
- import { u as Je, c as Qe, t as Ze, a as et, p as P, b as tt, g as re, e as Q, d as ie, o as lt, X as at, s as S, w as Te, i as G, f as z, G as ze, m as Ne, j as ot, k as V, n as H, q as st, r as ut } from "./index-BVNcFEqn.js";
3
- import { u as nt, U as rt } from "./usePrinter-Bcfs_I6G.js";
4
- import it from "./vue-ui-skeleton-Bgf16k10.js";
5
- import ct from "./BaseIcon-DpaRUsHC.js";
6
- import dt from "./vue-ui-accordion-GNblUy42.js";
7
- import { u as Se } from "./useNestedProp-D79dWdel.js";
8
- import { _ as vt } from "./PackageVersion-B9_Ed72C.js";
9
- import { P as yt } from "./PenAndPaper-CzjoEhsO.js";
2
+ import { u as Je, c as Qe, t as Ze, a as et, p as P, b as tt, g as re, e as Q, d as ie, o as lt, X as at, s as S, w as Te, i as G, f as z, G as ze, m as Ne, j as ot, k as V, n as H, q as st, r as ut } from "./index-CnwO8xcH.js";
3
+ import { u as nt, U as rt } from "./usePrinter-BEBjMPUP.js";
4
+ import it from "./vue-ui-skeleton-DyIz4SMi.js";
5
+ import ct from "./BaseIcon-Dog_ErJD.js";
6
+ import dt from "./vue-ui-accordion-DDF-Fm2i.js";
7
+ import { u as Se } from "./useNestedProp-DPMt3Iiy.js";
8
+ import { _ as vt } from "./PackageVersion-BazXxXqy.js";
9
+ import { P as yt } from "./PenAndPaper-D4nWibJ3.js";
10
10
  import { u as ht } from "./useUserOptionState-BIvW1Kz7.js";
11
11
  import { _ as ft } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  const bt = ["id"], pt = {