vue-data-ui 2.3.7 → 2.3.9

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 (139) hide show
  1. package/dist/{Arrow-nwrjVtgP.js → Arrow-CyqlT0ih.js} +1 -1
  2. package/dist/{Arrow-BZtTM41y.cjs → Arrow-Xy7TAWLU.cjs} +1 -1
  3. package/dist/{BaseIcon-DWx8aSo2.cjs → BaseIcon-DpzJwh5Z.cjs} +1 -1
  4. package/dist/{BaseIcon-DLlcdgWI.js → BaseIcon-vF6zgXvp.js} +1 -1
  5. package/dist/{DataTable-BSoyXOFT.cjs → DataTable-DZ7GOCVh.cjs} +1 -1
  6. package/dist/{DataTable-BFsn-W_6.js → DataTable-Dj8KLJHc.js} +2 -2
  7. package/dist/{Legend-DZhpxKg4.cjs → Legend-BNUo8JKO.cjs} +1 -1
  8. package/dist/{Legend-DThjLfzi.js → Legend-MfrOhwon.js} +1 -1
  9. package/dist/{Shape-CoCdB8es.cjs → Shape-DBYznwuk.cjs} +1 -1
  10. package/dist/{Shape-DdhpbOB2.js → Shape-fssaGSn1.js} +1 -1
  11. package/dist/{Slicer-Bb7zhtxv.cjs → Slicer-B8qDEiI2.cjs} +1 -1
  12. package/dist/{Slicer-CBsGmIKc.js → Slicer-C2VIWW3F.js} +1 -1
  13. package/dist/{Title-Ci74YZxW.cjs → Title--kLbBq-N.cjs} +1 -1
  14. package/dist/{Title-CfofmWzW.js → Title-DM6fKrUI.js} +1 -1
  15. package/dist/{Tooltip-cIpD1ChA.js → Tooltip-CAmd4pzg.js} +1 -1
  16. package/dist/{Tooltip-BNMjZUBc.cjs → Tooltip-Dwh7A0L5.cjs} +1 -1
  17. package/dist/{index-DFXgoR1T.cjs → index-CSlObCMJ.cjs} +1 -1
  18. package/dist/{index-CGb3gF5A.js → index-D0PI50d6.js} +1 -1
  19. package/dist/style.css +1 -1
  20. package/dist/{useNestedProp-DCBzUHfz.js → useNestedProp-BNV_Y29K.js} +1 -1
  21. package/dist/{useNestedProp-CbZUIZc0.cjs → useNestedProp-DUXlSjg2.cjs} +1 -1
  22. package/dist/{usePrinter-DoFYRZKM.cjs → usePrinter-ClpmcbPy.cjs} +1 -1
  23. package/dist/{usePrinter-VlAyPtaS.js → usePrinter-DJnJEVGy.js} +1 -1
  24. package/dist/{vue-data-ui-DT5BwtL1.cjs → vue-data-ui-B5epGKMS.cjs} +1 -1
  25. package/dist/{vue-data-ui-DkU-TK4x.js → vue-data-ui-DLhyTmG3.js} +55 -55
  26. package/dist/vue-data-ui.cjs +1 -1
  27. package/dist/vue-data-ui.js +1 -1
  28. package/dist/{vue-ui-3d-bar-BwdmaNwO.cjs → vue-ui-3d-bar-Dv5Nu-Kz.cjs} +1 -1
  29. package/dist/{vue-ui-3d-bar-B2ZdZ5yW.js → vue-ui-3d-bar-JeMsTT6R.js} +7 -7
  30. package/dist/{vue-ui-accordion-Br7xhAKF.js → vue-ui-accordion-C1dTIdYg.js} +3 -3
  31. package/dist/{vue-ui-accordion-P9OYffC3.cjs → vue-ui-accordion-IPISean4.cjs} +1 -1
  32. package/dist/{vue-ui-age-pyramid-D_GP1VkP.js → vue-ui-age-pyramid-BPrB-Srk.js} +8 -8
  33. package/dist/{vue-ui-age-pyramid-CJGz5iEy.cjs → vue-ui-age-pyramid-ytOUpNe5.cjs} +1 -1
  34. package/dist/{vue-ui-annotator-C9I6Zikz.cjs → vue-ui-annotator-Bp2ylQ-N.cjs} +1 -1
  35. package/dist/{vue-ui-annotator-BHI5Uicp.js → vue-ui-annotator-DpY8JI03.js} +1 -1
  36. package/dist/{vue-ui-candlestick-B3Z-Zw-o.cjs → vue-ui-candlestick-BoDWcJYz.cjs} +1 -1
  37. package/dist/{vue-ui-candlestick-BMz6lY9I.js → vue-ui-candlestick-D_KnLwpq.js} +9 -9
  38. package/dist/vue-ui-carousel-table-DWUmj6NW.js +330 -0
  39. package/dist/vue-ui-carousel-table-tPbrubLn.cjs +1 -0
  40. package/dist/{vue-ui-chestnut-C4vJDydB.cjs → vue-ui-chestnut-BltZicnq.cjs} +1 -1
  41. package/dist/{vue-ui-chestnut-DikFweqJ.js → vue-ui-chestnut-gUPyB2F7.js} +6 -6
  42. package/dist/{vue-ui-cursor-CmWl10Om.js → vue-ui-cursor-CBrYcHgg.js} +2 -2
  43. package/dist/{vue-ui-cursor-CxvSx8wW.cjs → vue-ui-cursor-Mi9mivGV.cjs} +1 -1
  44. package/dist/{vue-ui-dashboard-CqNO4CkA.js → vue-ui-dashboard-BvJccz-l.js} +2 -2
  45. package/dist/{vue-ui-dashboard-BRZFA0Yv.cjs → vue-ui-dashboard-DKJRkuMC.cjs} +1 -1
  46. package/dist/{vue-ui-digits-Bq86VtLg.js → vue-ui-digits-PvPOOZTT.js} +2 -2
  47. package/dist/{vue-ui-digits-B5AQ1wb4.cjs → vue-ui-digits-UvPWZIkN.cjs} +1 -1
  48. package/dist/{vue-ui-donut-BSM49MRr.js → vue-ui-donut-CCnmksR_.js} +9 -9
  49. package/dist/{vue-ui-donut-fUSFXY5z.cjs → vue-ui-donut-DBD9IyRA.cjs} +1 -1
  50. package/dist/{vue-ui-donut-evolution-D4vsG4oJ.cjs → vue-ui-donut-evolution-C2mbsaP5.cjs} +1 -1
  51. package/dist/{vue-ui-donut-evolution-hXH6wndl.js → vue-ui-donut-evolution-DWz0XIkn.js} +9 -9
  52. package/dist/{vue-ui-dumbbell-CSxoMYt4.cjs → vue-ui-dumbbell-CdQ1eQN_.cjs} +1 -1
  53. package/dist/{vue-ui-dumbbell-DF7resYk.js → vue-ui-dumbbell-DnhWlDqn.js} +8 -8
  54. package/dist/{vue-ui-flow-qhWWfhM9.cjs → vue-ui-flow-CXeTBawu.cjs} +1 -1
  55. package/dist/{vue-ui-flow-2Wc505ek.js → vue-ui-flow-zTfYWLOo.js} +7 -7
  56. package/dist/{vue-ui-galaxy-DTYcNRMO.cjs → vue-ui-galaxy-Cr1TLsZ-.cjs} +1 -1
  57. package/dist/{vue-ui-galaxy-C1tqFf2k.js → vue-ui-galaxy-CviL0-9-.js} +9 -9
  58. package/dist/{vue-ui-gauge-qkz3wSir.js → vue-ui-gauge-0wjKwTcJ.js} +4 -4
  59. package/dist/{vue-ui-gauge-4oL43tii.cjs → vue-ui-gauge-C8cqiuMs.cjs} +1 -1
  60. package/dist/vue-ui-heatmap-BempgzJY.cjs +1 -0
  61. package/dist/{vue-ui-heatmap-SUwlu7rR.js → vue-ui-heatmap-BjX35pDk.js} +227 -227
  62. package/dist/{vue-ui-kpi-Bw-xbRgX.cjs → vue-ui-kpi-Cwoq-OQZ.cjs} +1 -1
  63. package/dist/{vue-ui-kpi-jQgfkbVw.js → vue-ui-kpi-DKPUNPyD.js} +2 -2
  64. package/dist/{vue-ui-mini-loader-DT-Ww_uE.cjs → vue-ui-mini-loader-DYmuLkr_.cjs} +1 -1
  65. package/dist/{vue-ui-mini-loader-5YEExcv8.js → vue-ui-mini-loader-umbgz-jE.js} +2 -2
  66. package/dist/{vue-ui-molecule-DA0NQGMP.cjs → vue-ui-molecule-D04xU1nK.cjs} +1 -1
  67. package/dist/{vue-ui-molecule-sddRGEOr.js → vue-ui-molecule-DnTFVeGw.js} +9 -9
  68. package/dist/{vue-ui-mood-radar-BlwtCy7m.js → vue-ui-mood-radar-BdsUM6EW.js} +9 -9
  69. package/dist/{vue-ui-mood-radar-CUfTRsXf.cjs → vue-ui-mood-radar-wHCxSeNT.cjs} +1 -1
  70. package/dist/{vue-ui-nested-donuts-CyhCktfb.cjs → vue-ui-nested-donuts--34k7AUI.cjs} +1 -1
  71. package/dist/{vue-ui-nested-donuts-BYDoEtqK.js → vue-ui-nested-donuts-CX_V9UIk.js} +9 -9
  72. package/dist/{vue-ui-onion-BiS7G_xb.js → vue-ui-onion-C3scIn1m.js} +9 -9
  73. package/dist/{vue-ui-onion-DKjJWVtm.cjs → vue-ui-onion-ot5UiFnD.cjs} +1 -1
  74. package/dist/{vue-ui-parallel-coordinate-plot-BcZOH5MA.js → vue-ui-parallel-coordinate-plot-BrtFu6_R.js} +10 -10
  75. package/dist/{vue-ui-parallel-coordinate-plot-CB5WohUW.cjs → vue-ui-parallel-coordinate-plot-CLYNauuG.cjs} +1 -1
  76. package/dist/{vue-ui-quadrant-BX2Z_BiG.js → vue-ui-quadrant-CZQnq031.js} +10 -10
  77. package/dist/{vue-ui-quadrant-aRRuJrr1.cjs → vue-ui-quadrant-b3C38Y-z.cjs} +1 -1
  78. package/dist/{vue-ui-quick-chart-aCDLYVC0.js → vue-ui-quick-chart-CQ_m8VuI.js} +6 -6
  79. package/dist/{vue-ui-quick-chart-BSov5yuk.cjs → vue-ui-quick-chart-CS1XKyME.cjs} +1 -1
  80. package/dist/{vue-ui-radar-DGhNZx7E.js → vue-ui-radar-Bk_bQCIc.js} +10 -10
  81. package/dist/{vue-ui-radar-B3DWzSx8.cjs → vue-ui-radar-ayBCV2nl.cjs} +1 -1
  82. package/dist/{vue-ui-rating-DI2herA3.cjs → vue-ui-rating-BNAFeqKV.cjs} +1 -1
  83. package/dist/{vue-ui-rating-QJp1mzIX.js → vue-ui-rating-CwmqAW6j.js} +2 -2
  84. package/dist/{vue-ui-relation-circle-DRKymwCT.js → vue-ui-relation-circle-B19oCBsQ.js} +5 -5
  85. package/dist/{vue-ui-relation-circle-Dgk6ILFm.cjs → vue-ui-relation-circle-D__4tmLy.cjs} +1 -1
  86. package/dist/{vue-ui-rings-m9Gm4w5-.cjs → vue-ui-rings-DWv1YjLY.cjs} +1 -1
  87. package/dist/{vue-ui-rings-Dc_Xgav-.js → vue-ui-rings-Ekq8eld0.js} +9 -9
  88. package/dist/{vue-ui-scatter-3p_U1RQz.js → vue-ui-scatter-B5lq6TQb.js} +10 -10
  89. package/dist/{vue-ui-scatter-CwNnmbpv.cjs → vue-ui-scatter-Djt3w_7K.cjs} +1 -1
  90. package/dist/{vue-ui-screenshot-Bdg6KSR_.cjs → vue-ui-screenshot-BBTScesQ.cjs} +1 -1
  91. package/dist/{vue-ui-screenshot-DjN1leGW.js → vue-ui-screenshot-BGEu-1aK.js} +1 -1
  92. package/dist/{vue-ui-skeleton-B0udzFdQ.js → vue-ui-skeleton-CDB2sB2S.js} +2 -2
  93. package/dist/{vue-ui-skeleton-CmABeGyu.cjs → vue-ui-skeleton-aEAr9fnx.cjs} +1 -1
  94. package/dist/{vue-ui-smiley-BJdbZUnl.js → vue-ui-smiley-5sY2rtTd.js} +2 -2
  95. package/dist/{vue-ui-smiley-CIMwndRh.cjs → vue-ui-smiley-pHCa1uHj.cjs} +1 -1
  96. package/dist/{vue-ui-spark-trend-BiqhJCi0.cjs → vue-ui-spark-trend-BLYjicGH.cjs} +1 -1
  97. package/dist/{vue-ui-spark-trend-Bs8wWJc2.js → vue-ui-spark-trend-C6U8pRYP.js} +4 -4
  98. package/dist/{vue-ui-sparkbar-CDi8i8_Q.js → vue-ui-sparkbar-DdEDQOc8.js} +3 -3
  99. package/dist/{vue-ui-sparkbar-C2YT0NxS.cjs → vue-ui-sparkbar-e9mZh74f.cjs} +1 -1
  100. package/dist/{vue-ui-sparkgauge-11o7Kgbf.js → vue-ui-sparkgauge-CV0OpVGr.js} +3 -3
  101. package/dist/{vue-ui-sparkgauge-D7sVelKC.cjs → vue-ui-sparkgauge-S9QibidM.cjs} +1 -1
  102. package/dist/{vue-ui-sparkhistogram-DW4yBl5Z.js → vue-ui-sparkhistogram-BCcYAQYV.js} +4 -4
  103. package/dist/{vue-ui-sparkhistogram-C6nnvqeP.cjs → vue-ui-sparkhistogram-DVc-tjMC.cjs} +1 -1
  104. package/dist/{vue-ui-sparkline-B-jMIILk.js → vue-ui-sparkline-C6emienJ.js} +3 -3
  105. package/dist/{vue-ui-sparkline-Bnc9Cv0E.cjs → vue-ui-sparkline-WkYNaf-r.cjs} +1 -1
  106. package/dist/{vue-ui-sparkstackbar-cUpn5wUS.js → vue-ui-sparkstackbar-CptWawfp.js} +3 -3
  107. package/dist/{vue-ui-sparkstackbar-CVyS6viy.cjs → vue-ui-sparkstackbar-oB0fsXWO.cjs} +1 -1
  108. package/dist/{vue-ui-strip-plot-Dc1Y7Lfz.cjs → vue-ui-strip-plot-D30zeVfM.cjs} +1 -1
  109. package/dist/{vue-ui-strip-plot-CpfV9-gw.js → vue-ui-strip-plot-Kb7Kk-C8.js} +9 -9
  110. package/dist/{vue-ui-table-CaCOIekW.js → vue-ui-table-Dqyr1Go9.js} +1 -1
  111. package/dist/{vue-ui-table-BHENqbW6.cjs → vue-ui-table-FUX1jbtH.cjs} +1 -1
  112. package/dist/{vue-ui-table-heatmap-r9XRz_dD.cjs → vue-ui-table-heatmap-Cqd_rPSG.cjs} +1 -1
  113. package/dist/{vue-ui-table-heatmap-s7r2sGYk.js → vue-ui-table-heatmap-DAWzPS1D.js} +4 -4
  114. package/dist/{vue-ui-table-sparkline-Dk_FjirH.cjs → vue-ui-table-sparkline-CWSL5RtX.cjs} +1 -1
  115. package/dist/{vue-ui-table-sparkline-BS7VAPDv.js → vue-ui-table-sparkline-DgUpsNVO.js} +5 -5
  116. package/dist/{vue-ui-thermometer-DU49ev3a.cjs → vue-ui-thermometer-DDpxHZhQ.cjs} +1 -1
  117. package/dist/{vue-ui-thermometer-BQLqVj-X.js → vue-ui-thermometer-UZFTkdJs.js} +5 -5
  118. package/dist/{vue-ui-timer-9QQVkkbc.cjs → vue-ui-timer-CXonfhMU.cjs} +1 -1
  119. package/dist/{vue-ui-timer-DGM9AHJ5.js → vue-ui-timer-DCexI32t.js} +4 -4
  120. package/dist/{vue-ui-tiremarks-CJ9xiM-i.cjs → vue-ui-tiremarks-DByzjHco.cjs} +1 -1
  121. package/dist/{vue-ui-tiremarks-Bxop3uDk.js → vue-ui-tiremarks-UtTUbZUt.js} +5 -5
  122. package/dist/{vue-ui-treemap-BOEC1m08.cjs → vue-ui-treemap-BT9zMgOs.cjs} +1 -1
  123. package/dist/{vue-ui-treemap-CQ9rJnkn.js → vue-ui-treemap-DpLJGsie.js} +9 -9
  124. package/dist/{vue-ui-vertical-bar-CwcIKeM-.js → vue-ui-vertical-bar-B9poCwqT.js} +9 -9
  125. package/dist/{vue-ui-vertical-bar-BBHN-hhJ.cjs → vue-ui-vertical-bar-BWWvfTkx.cjs} +1 -1
  126. package/dist/{vue-ui-waffle-DB3cEJx6.js → vue-ui-waffle-BGnyyHVp.js} +83 -83
  127. package/dist/{vue-ui-waffle-Bg_hB8yK.cjs → vue-ui-waffle-fRaiL6eW.cjs} +1 -1
  128. package/dist/{vue-ui-wheel-CF6psk6N.js → vue-ui-wheel-7JdR9vyK.js} +5 -5
  129. package/dist/{vue-ui-wheel-DpTCJpZn.cjs → vue-ui-wheel-C0BVez2R.cjs} +1 -1
  130. package/dist/{vue-ui-word-cloud-DVu3gTbu.cjs → vue-ui-word-cloud-CDDYvCP9.cjs} +1 -1
  131. package/dist/{vue-ui-word-cloud-QlpZWR2c.js → vue-ui-word-cloud-S1x3FJQ6.js} +6 -6
  132. package/dist/{vue-ui-xy-CpcGvBUq.js → vue-ui-xy-DBC1QS_G.js} +12 -12
  133. package/dist/{vue-ui-xy-DFiOxWGU.cjs → vue-ui-xy-DMkykmZN.cjs} +1 -1
  134. package/dist/{vue-ui-xy-canvas-CBlzHZ_m.js → vue-ui-xy-canvas-1yb0nuDg.js} +10 -10
  135. package/dist/{vue-ui-xy-canvas-DR_8n36F.cjs → vue-ui-xy-canvas-B4xzjjjm.cjs} +1 -1
  136. package/package.json +1 -1
  137. package/dist/vue-ui-carousel-table-9W-FPpp4.js +0 -314
  138. package/dist/vue-ui-carousel-table-ZyIsiWGm.cjs +0 -1
  139. package/dist/vue-ui-heatmap-B8vDpGuW.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DFXgoR1T.cjs"),ke=require("./Title-Ci74YZxW.cjs"),ne=require("./usePrinter-DoFYRZKM.cjs"),Ce=require("./Tooltip-BNMjZUBc.cjs"),we=require("./Legend-DZhpxKg4.cjs"),xe=require("./vue-ui-skeleton-CmABeGyu.cjs"),Te=require("./DataTable-BSoyXOFT.cjs"),$e=require("./vue-ui-accordion-P9OYffC3.cjs"),re=require("./useResponsive-B3TrDDIG.cjs"),ue=require("./useNestedProp-CbZUIZc0.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function se(n,d){const s=n.length;if(s===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let u=1/0,i=-1/0,v=0;for(let f=0;f<s;f+=1){const p=n[f].normalizedValue;p<u&&(u=p),p>i&&(i=p),v+=p}return Math.max(d**2*i/v**2,v**2/(d**2*u))}}function ie(n){const{xOffset:d,yOffset:s,width:u,height:i}=n;return{x0:d,y0:s,x1:d+u,y1:s+i}}function Ne(n,d,s){if(n.length===0)return!0;{const u=n.concat(d),i=se(n,s),v=se(u,s);return i>=v}}function _e(n){const d=[],s=n.length;for(let u=0;u<s;u+=1){const i=n[u],v=i.length;for(let h=0;h<v;h+=1)d.push(i[h])}return d}function Be(n,d){const s={...d,children:n};return de(s)}function ze(n){return(n.x1-n.x0)*(n.y1-n.y0)}function ce(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=W(d),h=n.length,f=n.map(m=>m.normalizedValue||0).reduce((m,k)=>m+k,0),p=f/u,C=f/s;let b=i,w=v;const g=[];if(s>=u){for(let m=0;m<h;m+=1){const k=n[m],x=w+k.normalizedValue/p,t={x0:b,y0:w,x1:b+p,y1:x},S=Object.assign({},k,t);w=x,g.push(S)}return g}else{for(let m=0;m<h;m+=1){const k=n[m],x=b+k.normalizedValue/C,t={x0:b,y0:w,x1:x,y1:w+C},S=Object.assign({},k,t);b=x,g.push(S)}return g}}function Oe(n){const d=W(n),s=d.width,u=d.height;return Math.min(s,u)}function Pe(n,d){const s=n.length,u=n.map(p=>p.value??0).reduce((p,C)=>p+C,0),i=d/u,v=[];let h,f;for(let p=0;p<s;p+=1)f=n[p],h=Object.assign({},f,{normalizedValue:f.value*(i||0)}),v.push(h);return v}function W(n){const{x0:d,y0:s,x1:u,y1:i}=n;return{xOffset:d,yOffset:s,width:u-d,height:i-s}}function Ve(n,d,s,u){let i=n,v=d,h=s,f=u;for(;;){const p=i.length;if(p===0){const g=ce(v,h);return f.concat(g)}const C=Oe(h),b=i[0],w=i.slice(1,p);if(Ne(v,b,C)){const g=v.concat(b);i=w,v=g,h=h,f=f}else{const g=v.length;let m=0;for(let S=0;S<g;S+=1)m+=v[S].normalizedValue;const k=Ee(h,m),x=ce(v,h),t=f.concat(x);i=i,v=[],h=k,f=t}}}function de(n){if(typeof n.children>"u"||!n.children.length)return[n];{const d=Pe(n.children,ze(n)),s=Ve(d,[],n,[]),u=s.length,i=[];for(let h=0;h<u;h+=1)i.push(de(s[h]));return _e(i)}}function Ee(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=W(n);if(s>=u){const h=d/u,f=s-h,p={xOffset:i+h,yOffset:v,width:f,height:u};return ie(p)}else{const h=d/s,f=u-h,p={xOffset:i,yOffset:v+h,width:s,height:f};return ie(p)}}const Fe=n=>(e.pushScopeId("data-v-7489c985"),n=n(),e.popScopeId(),n),Re=["id"],Ie=["xmlns","viewBox"],Le={key:0},De=["id"],qe=["stop-color"],Ae=["stop-color"],He=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Me=["x","y","height","width"],We={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},Ue=Fe(()=>e.createElementVNode("br",null,null,-1)),Ge=["onClick"],je={key:0},Xe={key:1},Ye=["innerHTML"],Ze={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:d,emit:s}){const u=n,{vue_ui_treemap:i}=r.useConfig(),v=e.computed(()=>!!u.dataset&&u.dataset.length),h=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),f=e.ref(r.createUid()),p=e.ref(!1),C=e.ref(""),b=e.ref(!1),w=e.ref(0),g=e.ref([]),m=e.ref(null),k=e.ref(null),x=e.ref(null),t=e.computed(()=>{const o=ue.useNestedProp({userConfig:u.config,defaultConfig:i});return o.theme?{...ue.useNestedProp({userConfig:r.themes.vue_ui_treemap[o.theme]||u.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}),{isPrinting:S,isImaging:ve,generatePdf:U,generateImage:G}=ne.usePrinter({elementId:`treemap_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),L=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),N=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),_=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),z=e.computed(()=>({bottom:_.value.height-t.value.style.chart.padding.bottom,height:_.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:_.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:_.value.height,vbWidth:_.value.width,width:_.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function j(o){o.forEach((a,l)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||L.value[l]||r.palette[l]||r.palette[l%r.palette.length],a.children&&(a.children.forEach(c=>{c.parentId=a.id,c.color=a.color}),j(a.children))})}const O=e.ref(u.dataset),D=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),j(O.value),t.value.responsive){const o=re.throttle(()=>{const{width:a,height:l}=re.useResponsive({chart:m.value,title:t.value.style.chart.title.text?k.value:null,legend:t.value.style.chart.legend.show?x.value:null});_.value.width=a,_.value.height=l});D.value=new ResizeObserver(o),D.value.observe(m.value.parentNode)}}),e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const H=e.ref(O.value),R=e.computed(()=>H.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||L.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(o=>!g.value.includes(o.id))),E=e.computed(()=>O.value.filter(o=>!g.value.includes(o.id)).map(o=>o.value||0).reduce((o,a)=>o+a,0)),X=e.computed({get(){let o=[...R.value];return t.value.style.chart.layout.sorted&&(o=[...R.value].sort((a,l)=>l.value-a.value)),o.map(a=>({...a}))},set(o){return o}});function Y(o,a){return o.value/a}function he(o,a,l){const c=t.value.style.chart.layout.rects.colorRatio-Y(a,l);return r.lightenHexColor(o,c<0?0:c)}function Z(o,a,l,c){return o.map((y,V)=>{const A=he(r.convertColorToHex(a)||L.value[V]||r.palette[V]||r.palette[V%r.palette.length],y,c),be=Y(y,c);return{...y,color:A,proportion:be,parentName:l,children:y.children?Z(y.children,A,y.name,c):void 0}})}const I=e.computed(()=>Be(X.value.map((o,a)=>{const l=o.children?o.children.reduce((c,y)=>c+y.value,0):o.value;return{value:o.value,id:o.id,children:o.children?Z(o.children.sort((c,y)=>y.value-c.value),o.color,o.name,l):void 0,color:o.color,name:o.name}}),{x0:z.value.left*2,y0:z.value.top,x1:z.value.width,y1:z.value.height}));function J({y0:o,y1:a}){return a-o<=0?1e-4:a-o}function K({x0:o,x1:a}){return a-o<=0?1e-4:a-o}function P(o){const a=t.value.style.chart.layout.labels.fontSize*(o.proportion*2>1?1:o.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function pe(o){b.value=o,w.value+=1}const F=e.computed(()=>({startX:0,startY:0,width:z.value.vbWidth,height:z.value.vbHeight})),T=e.ref(!1);function Q(o,a=O.value){for(const l of a){if(l.id===o)return l;if(l.children){const c=Q(o,l.children);if(c)return c}}return null}function fe(o){T.value?(s("selectDatapoint",void 0),H.value=O.value):(s("selectDatapoint",o),H.value=[Q(o.parentId)]),T.value=!T.value}const $=e.ref(null),ee=e.computed(()=>O.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||L.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((o,a)=>a.value-o.value).map((o,a)=>({...o,proportion:o.value/O.value.map(l=>l.value).reduce((l,c)=>l+c,0),opacity:g.value.includes(o.id)?.5:1}))),ge=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function te(o){T.value=!1,$.value=null,g.value.includes(o.id)?g.value=g.value.filter(a=>a!==o.id):g.value.length<u.dataset.length-1&&g.value.push(o.id),s("selectLegend",X.value)}const M=e.ref(null);function me({datapoint:o,seriesIndex:a}){$.value=o,M.value={datapoint:o,seriesIndex:a,config:t.value,series:R.value};const l=t.value.style.chart.tooltip.customFormat;if(r.isFunction(l)&&r.functionReturnsString(()=>l({seriesIndex:a,datapoint:o,series:R.value,config:t.value})))C.value=l({seriesIndex:a,datapoint:o,series:R.value,config:t.value});else{let c="";c+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,c+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${o.color}"/></svg>`,c+=`<b>${r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</b>`,C.value=`<div>${c}</div>`}p.value=!0}const B=e.computed(()=>{const o=I.value.map(l=>({name:l.name,color:l.color})),a=I.value.map(l=>l.value);return{head:o,body:a}});function oe(){e.nextTick(()=>{const o=B.value.head.map((c,y)=>[[c.name],[B.value.body[y]],[isNaN(B.value.body[y]/E.value)?"-":B.value.body[y]/E.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=B.value.head.map((y,V)=>{const A=r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:B.value.body[V],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue});return[{color:y.color,name:y.name,shape:"square"},A,isNaN(B.value.body[V]/E.value)?"-":(B.value.body[V]/E.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}});function ye(){return I.value}function le(){N.value.showTable=!N.value.showTable}function ae(){N.value.showTooltip=!N.value.showTooltip}return d({getData:ye,generateCsv:oe,generateImage:G,generatePdf:U,toggleTable:le,toggleTooltip:ae}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:m,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`treemap_${f.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:k,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[e.createVNode(ke._sfc_main,{config:{title:{cy:"treemap-div-title",...t.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&v.value?(e.openBlock(),e.createBlock(ne.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(S),isImaging:e.unref(ve),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:N.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:m.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(U),onGenerateCsv:oe,onGenerateImage:e.unref(G),onToggleTable:le,onToggleTooltip:ae},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:c})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:c})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!T.value,"vue-data-ui-zoom-minus":T.value}),viewBox:`${F.value.startX} ${F.value.startY} ${F.value.width<=0?10:F.value.width} ${F.value.height<=0?10:F.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",Le,[e.createElementVNode("radialGradient",{id:`tgrad_${l.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":l.color},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(l.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,Ae)],8,De)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:J(l),width:K(l),fill:h.value?l.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:$.value&&$.value.id===l.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":$.value&&$.value.id===l.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:y=>fe(l),onMouseenter:()=>me({datapoint:l,seriesIndex:c}),onMouseleave:a[0]||(a[0]=y=>{$.value=null,p.value=!1}),style:e.normalizeStyle(`opacity:${$.value?$.value.id===l.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,He),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:J(l),width:K(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",We,[t.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||T.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${P(l)/1.5}px);text-align:left;line-height:${P(l)<14?14:P(l)}px;padding:${P(l)/3}px; color:${e.unref(r.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${P(l)}px;`)},e.toDisplayString(l.name),5),Ue,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${P(l)}px;`)},e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.layout.labels.rounding})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:l,shouldShow:l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||T.value,fontSize:P(l),isZoom:T.value,textColor:e.unref(r.adaptColorToBackground)(l.color)})),void 0,!0)])],8,Me))]))),256)),e.renderSlot(o.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:z.value,isZoom:T.value,rect:$.value,config:t.value})),void 0,!0)],14,Ie)):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:3,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:x},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:0,legendSet:ee.value,config:ge.value,id:`treemap_legend_${f.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>te(l))},{item:e.withCtx(({legend:l,index:c})=>[e.createElementVNode("div",{onClick:y=>te(l),style:e.normalizeStyle(`opacity:${g.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.legend.roundingValue}))+" ",1),g.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",Xe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",je," ("+e.toDisplayString(isNaN(l.value/E.value)?"-":(l.value/E.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,Ge)]),_:1},8,["legendSet","config","id"])):e.renderSlot(o.$slots,"legend",{key:1,legend:ee.value},void 0,!0)],512),e.createVNode(Ce._sfc_main,{show:N.value.showTooltip&&p.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,parent:m.value,content:C.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","parent","content","isCustom"]),v.value?(e.openBlock(),e.createBlock($e.default,{key:4,hideDetails:"",config:{open:N.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(Te.DataTable,{colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>N.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ye)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Re))}},Je=Se._export_sfc(Ze,[["__scopeId","data-v-7489c985"]]);exports.default=Je;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CSlObCMJ.cjs"),ke=require("./Title--kLbBq-N.cjs"),ne=require("./usePrinter-ClpmcbPy.cjs"),Ce=require("./Tooltip-Dwh7A0L5.cjs"),we=require("./Legend-BNUo8JKO.cjs"),xe=require("./vue-ui-skeleton-aEAr9fnx.cjs"),Te=require("./DataTable-DZ7GOCVh.cjs"),$e=require("./vue-ui-accordion-IPISean4.cjs"),re=require("./useResponsive-B3TrDDIG.cjs"),ue=require("./useNestedProp-DUXlSjg2.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function se(n,d){const s=n.length;if(s===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let u=1/0,i=-1/0,v=0;for(let f=0;f<s;f+=1){const p=n[f].normalizedValue;p<u&&(u=p),p>i&&(i=p),v+=p}return Math.max(d**2*i/v**2,v**2/(d**2*u))}}function ie(n){const{xOffset:d,yOffset:s,width:u,height:i}=n;return{x0:d,y0:s,x1:d+u,y1:s+i}}function Ne(n,d,s){if(n.length===0)return!0;{const u=n.concat(d),i=se(n,s),v=se(u,s);return i>=v}}function _e(n){const d=[],s=n.length;for(let u=0;u<s;u+=1){const i=n[u],v=i.length;for(let h=0;h<v;h+=1)d.push(i[h])}return d}function Be(n,d){const s={...d,children:n};return de(s)}function ze(n){return(n.x1-n.x0)*(n.y1-n.y0)}function ce(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=W(d),h=n.length,f=n.map(m=>m.normalizedValue||0).reduce((m,k)=>m+k,0),p=f/u,C=f/s;let b=i,w=v;const g=[];if(s>=u){for(let m=0;m<h;m+=1){const k=n[m],x=w+k.normalizedValue/p,t={x0:b,y0:w,x1:b+p,y1:x},S=Object.assign({},k,t);w=x,g.push(S)}return g}else{for(let m=0;m<h;m+=1){const k=n[m],x=b+k.normalizedValue/C,t={x0:b,y0:w,x1:x,y1:w+C},S=Object.assign({},k,t);b=x,g.push(S)}return g}}function Oe(n){const d=W(n),s=d.width,u=d.height;return Math.min(s,u)}function Pe(n,d){const s=n.length,u=n.map(p=>p.value??0).reduce((p,C)=>p+C,0),i=d/u,v=[];let h,f;for(let p=0;p<s;p+=1)f=n[p],h=Object.assign({},f,{normalizedValue:f.value*(i||0)}),v.push(h);return v}function W(n){const{x0:d,y0:s,x1:u,y1:i}=n;return{xOffset:d,yOffset:s,width:u-d,height:i-s}}function Ve(n,d,s,u){let i=n,v=d,h=s,f=u;for(;;){const p=i.length;if(p===0){const g=ce(v,h);return f.concat(g)}const C=Oe(h),b=i[0],w=i.slice(1,p);if(Ne(v,b,C)){const g=v.concat(b);i=w,v=g,h=h,f=f}else{const g=v.length;let m=0;for(let S=0;S<g;S+=1)m+=v[S].normalizedValue;const k=Ee(h,m),x=ce(v,h),t=f.concat(x);i=i,v=[],h=k,f=t}}}function de(n){if(typeof n.children>"u"||!n.children.length)return[n];{const d=Pe(n.children,ze(n)),s=Ve(d,[],n,[]),u=s.length,i=[];for(let h=0;h<u;h+=1)i.push(de(s[h]));return _e(i)}}function Ee(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=W(n);if(s>=u){const h=d/u,f=s-h,p={xOffset:i+h,yOffset:v,width:f,height:u};return ie(p)}else{const h=d/s,f=u-h,p={xOffset:i,yOffset:v+h,width:s,height:f};return ie(p)}}const Fe=n=>(e.pushScopeId("data-v-7489c985"),n=n(),e.popScopeId(),n),Re=["id"],Ie=["xmlns","viewBox"],Le={key:0},De=["id"],qe=["stop-color"],Ae=["stop-color"],He=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Me=["x","y","height","width"],We={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},Ue=Fe(()=>e.createElementVNode("br",null,null,-1)),Ge=["onClick"],je={key:0},Xe={key:1},Ye=["innerHTML"],Ze={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:d,emit:s}){const u=n,{vue_ui_treemap:i}=r.useConfig(),v=e.computed(()=>!!u.dataset&&u.dataset.length),h=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),f=e.ref(r.createUid()),p=e.ref(!1),C=e.ref(""),b=e.ref(!1),w=e.ref(0),g=e.ref([]),m=e.ref(null),k=e.ref(null),x=e.ref(null),t=e.computed(()=>{const o=ue.useNestedProp({userConfig:u.config,defaultConfig:i});return o.theme?{...ue.useNestedProp({userConfig:r.themes.vue_ui_treemap[o.theme]||u.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}),{isPrinting:S,isImaging:ve,generatePdf:U,generateImage:G}=ne.usePrinter({elementId:`treemap_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),L=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),N=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),_=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),z=e.computed(()=>({bottom:_.value.height-t.value.style.chart.padding.bottom,height:_.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:_.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:_.value.height,vbWidth:_.value.width,width:_.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function j(o){o.forEach((a,l)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||L.value[l]||r.palette[l]||r.palette[l%r.palette.length],a.children&&(a.children.forEach(c=>{c.parentId=a.id,c.color=a.color}),j(a.children))})}const O=e.ref(u.dataset),D=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),j(O.value),t.value.responsive){const o=re.throttle(()=>{const{width:a,height:l}=re.useResponsive({chart:m.value,title:t.value.style.chart.title.text?k.value:null,legend:t.value.style.chart.legend.show?x.value:null});_.value.width=a,_.value.height=l});D.value=new ResizeObserver(o),D.value.observe(m.value.parentNode)}}),e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const H=e.ref(O.value),R=e.computed(()=>H.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||L.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(o=>!g.value.includes(o.id))),E=e.computed(()=>O.value.filter(o=>!g.value.includes(o.id)).map(o=>o.value||0).reduce((o,a)=>o+a,0)),X=e.computed({get(){let o=[...R.value];return t.value.style.chart.layout.sorted&&(o=[...R.value].sort((a,l)=>l.value-a.value)),o.map(a=>({...a}))},set(o){return o}});function Y(o,a){return o.value/a}function he(o,a,l){const c=t.value.style.chart.layout.rects.colorRatio-Y(a,l);return r.lightenHexColor(o,c<0?0:c)}function Z(o,a,l,c){return o.map((y,V)=>{const A=he(r.convertColorToHex(a)||L.value[V]||r.palette[V]||r.palette[V%r.palette.length],y,c),be=Y(y,c);return{...y,color:A,proportion:be,parentName:l,children:y.children?Z(y.children,A,y.name,c):void 0}})}const I=e.computed(()=>Be(X.value.map((o,a)=>{const l=o.children?o.children.reduce((c,y)=>c+y.value,0):o.value;return{value:o.value,id:o.id,children:o.children?Z(o.children.sort((c,y)=>y.value-c.value),o.color,o.name,l):void 0,color:o.color,name:o.name}}),{x0:z.value.left*2,y0:z.value.top,x1:z.value.width,y1:z.value.height}));function J({y0:o,y1:a}){return a-o<=0?1e-4:a-o}function K({x0:o,x1:a}){return a-o<=0?1e-4:a-o}function P(o){const a=t.value.style.chart.layout.labels.fontSize*(o.proportion*2>1?1:o.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function pe(o){b.value=o,w.value+=1}const F=e.computed(()=>({startX:0,startY:0,width:z.value.vbWidth,height:z.value.vbHeight})),T=e.ref(!1);function Q(o,a=O.value){for(const l of a){if(l.id===o)return l;if(l.children){const c=Q(o,l.children);if(c)return c}}return null}function fe(o){T.value?(s("selectDatapoint",void 0),H.value=O.value):(s("selectDatapoint",o),H.value=[Q(o.parentId)]),T.value=!T.value}const $=e.ref(null),ee=e.computed(()=>O.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||L.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((o,a)=>a.value-o.value).map((o,a)=>({...o,proportion:o.value/O.value.map(l=>l.value).reduce((l,c)=>l+c,0),opacity:g.value.includes(o.id)?.5:1}))),ge=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function te(o){T.value=!1,$.value=null,g.value.includes(o.id)?g.value=g.value.filter(a=>a!==o.id):g.value.length<u.dataset.length-1&&g.value.push(o.id),s("selectLegend",X.value)}const M=e.ref(null);function me({datapoint:o,seriesIndex:a}){$.value=o,M.value={datapoint:o,seriesIndex:a,config:t.value,series:R.value};const l=t.value.style.chart.tooltip.customFormat;if(r.isFunction(l)&&r.functionReturnsString(()=>l({seriesIndex:a,datapoint:o,series:R.value,config:t.value})))C.value=l({seriesIndex:a,datapoint:o,series:R.value,config:t.value});else{let c="";c+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,c+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${o.color}"/></svg>`,c+=`<b>${r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</b>`,C.value=`<div>${c}</div>`}p.value=!0}const B=e.computed(()=>{const o=I.value.map(l=>({name:l.name,color:l.color})),a=I.value.map(l=>l.value);return{head:o,body:a}});function oe(){e.nextTick(()=>{const o=B.value.head.map((c,y)=>[[c.name],[B.value.body[y]],[isNaN(B.value.body[y]/E.value)?"-":B.value.body[y]/E.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=B.value.head.map((y,V)=>{const A=r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:B.value.body[V],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue});return[{color:y.color,name:y.name,shape:"square"},A,isNaN(B.value.body[V]/E.value)?"-":(B.value.body[V]/E.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}});function ye(){return I.value}function le(){N.value.showTable=!N.value.showTable}function ae(){N.value.showTooltip=!N.value.showTooltip}return d({getData:ye,generateCsv:oe,generateImage:G,generatePdf:U,toggleTable:le,toggleTooltip:ae}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:m,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`treemap_${f.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:k,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[e.createVNode(ke._sfc_main,{config:{title:{cy:"treemap-div-title",...t.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&v.value?(e.openBlock(),e.createBlock(ne.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(S),isImaging:e.unref(ve),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:N.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:m.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(U),onGenerateCsv:oe,onGenerateImage:e.unref(G),onToggleTable:le,onToggleTooltip:ae},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:c})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:c})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!T.value,"vue-data-ui-zoom-minus":T.value}),viewBox:`${F.value.startX} ${F.value.startY} ${F.value.width<=0?10:F.value.width} ${F.value.height<=0?10:F.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",Le,[e.createElementVNode("radialGradient",{id:`tgrad_${l.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":l.color},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(l.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,Ae)],8,De)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:J(l),width:K(l),fill:h.value?l.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:$.value&&$.value.id===l.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":$.value&&$.value.id===l.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:y=>fe(l),onMouseenter:()=>me({datapoint:l,seriesIndex:c}),onMouseleave:a[0]||(a[0]=y=>{$.value=null,p.value=!1}),style:e.normalizeStyle(`opacity:${$.value?$.value.id===l.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,He),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:J(l),width:K(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",We,[t.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||T.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${P(l)/1.5}px);text-align:left;line-height:${P(l)<14?14:P(l)}px;padding:${P(l)/3}px; color:${e.unref(r.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${P(l)}px;`)},e.toDisplayString(l.name),5),Ue,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${P(l)}px;`)},e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.layout.labels.rounding})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:l,shouldShow:l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||T.value,fontSize:P(l),isZoom:T.value,textColor:e.unref(r.adaptColorToBackground)(l.color)})),void 0,!0)])],8,Me))]))),256)),e.renderSlot(o.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:z.value,isZoom:T.value,rect:$.value,config:t.value})),void 0,!0)],14,Ie)):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:3,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:x},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:0,legendSet:ee.value,config:ge.value,id:`treemap_legend_${f.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>te(l))},{item:e.withCtx(({legend:l,index:c})=>[e.createElementVNode("div",{onClick:y=>te(l),style:e.normalizeStyle(`opacity:${g.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.legend.roundingValue}))+" ",1),g.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",Xe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",je," ("+e.toDisplayString(isNaN(l.value/E.value)?"-":(l.value/E.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,Ge)]),_:1},8,["legendSet","config","id"])):e.renderSlot(o.$slots,"legend",{key:1,legend:ee.value},void 0,!0)],512),e.createVNode(Ce._sfc_main,{show:N.value.showTooltip&&p.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,parent:m.value,content:C.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","parent","content","isCustom"]),v.value?(e.openBlock(),e.createBlock($e.default,{key:4,hideDetails:"",config:{open:N.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(Te.DataTable,{colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>N.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ye)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Re))}},Je=Se._export_sfc(Ze,[["__scopeId","data-v-7489c985"]]);exports.default=Je;
@@ -1,14 +1,14 @@
1
1
  import { computed as w, ref as y, onMounted as He, onBeforeUnmount as Ee, openBlock as m, createElementBlock as x, normalizeClass as Ce, normalizeStyle as D, createVNode as ne, createCommentVNode as H, createBlock as ee, unref as T, createSlots as Ue, withCtx as $, renderSlot as _, normalizeProps as j, guardReactiveProps as Y, Fragment as ke, renderList as xe, createElementVNode as O, toDisplayString as G, createTextVNode as $e, nextTick as Ge, pushScopeId as Xe, popScopeId as qe } from "vue";
2
- import { u as je, c as Te, t as Ye, a as Ze, p as C, b as Je, o as Ke, e as Qe, d as te, f as le, X as et, l as _e, C as Oe, v as Se, w as tt, n as lt, q as ot } from "./index-CGb3gF5A.js";
3
- import { _ as at } from "./Title-CfofmWzW.js";
4
- import { u as nt, U as st } from "./usePrinter-VlAyPtaS.js";
5
- import { _ as rt } from "./Tooltip-cIpD1ChA.js";
6
- import { L as ut } from "./Legend-DThjLfzi.js";
7
- import it from "./vue-ui-skeleton-B0udzFdQ.js";
8
- import { D as ct } from "./DataTable-BFsn-W_6.js";
9
- import dt from "./vue-ui-accordion-Br7xhAKF.js";
2
+ import { u as je, c as Te, t as Ye, a as Ze, p as C, b as Je, o as Ke, e as Qe, d as te, f as le, X as et, l as _e, C as Oe, v as Se, w as tt, n as lt, q as ot } from "./index-D0PI50d6.js";
3
+ import { _ as at } from "./Title-DM6fKrUI.js";
4
+ import { u as nt, U as st } from "./usePrinter-DJnJEVGy.js";
5
+ import { _ as rt } from "./Tooltip-CAmd4pzg.js";
6
+ import { L as ut } from "./Legend-MfrOhwon.js";
7
+ import it from "./vue-ui-skeleton-CDB2sB2S.js";
8
+ import { D as ct } from "./DataTable-Dj8KLJHc.js";
9
+ import dt from "./vue-ui-accordion-C1dTIdYg.js";
10
10
  import { t as vt, u as ht } from "./useResponsive-NZB-WLRF.js";
11
- import { u as Ne } from "./useNestedProp-DCBzUHfz.js";
11
+ import { u as Ne } from "./useNestedProp-BNV_Y29K.js";
12
12
  import { _ as ft } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  function ze(a, i) {
14
14
  const s = a.length;
@@ -1,14 +1,14 @@
1
1
  import { useCssVars as De, computed as f, ref as v, onMounted as Re, onBeforeUnmount as Me, openBlock as d, createElementBlock as h, normalizeClass as S, normalizeStyle as i, createVNode as D, createCommentVNode as b, createBlock as J, unref as T, createSlots as Ue, withCtx as m, renderSlot as x, normalizeProps as Q, guardReactiveProps as Y, createElementVNode as o, toDisplayString as u, Fragment as R, renderList as M, withKeys as Xe, createTextVNode as Ae } from "vue";
2
- import { u as Ee, c as Ge, t as He, a as We, p as V, b as je, o as be, e as Z, d as ee, X as qe, s as Ke, r as te, v as Je, w as Qe, f as Ye, n as Ze, q as et } from "./index-CGb3gF5A.js";
2
+ import { u as Ee, c as Ge, t as He, a as We, p as V, b as je, o as be, e as Z, d as ee, X as qe, s as Ke, r as te, v as Je, w as Qe, f as Ye, n as Ze, q as et } from "./index-D0PI50d6.js";
3
3
  import { t as tt, u as lt } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as at } from "./Title-CfofmWzW.js";
5
- import { u as ot, U as nt } from "./usePrinter-VlAyPtaS.js";
6
- import { _ as ut } from "./Tooltip-cIpD1ChA.js";
7
- import { L as me } from "./Legend-DThjLfzi.js";
8
- import rt from "./vue-ui-skeleton-B0udzFdQ.js";
9
- import st from "./BaseIcon-DLlcdgWI.js";
10
- import it from "./vue-ui-accordion-Br7xhAKF.js";
11
- import { u as _e } from "./useNestedProp-DCBzUHfz.js";
4
+ import { _ as at } from "./Title-DM6fKrUI.js";
5
+ import { u as ot, U as nt } from "./usePrinter-DJnJEVGy.js";
6
+ import { _ as ut } from "./Tooltip-CAmd4pzg.js";
7
+ import { L as me } from "./Legend-MfrOhwon.js";
8
+ import rt from "./vue-ui-skeleton-CDB2sB2S.js";
9
+ import st from "./BaseIcon-vF6zgXvp.js";
10
+ import it from "./vue-ui-accordion-C1dTIdYg.js";
11
+ import { u as _e } from "./useNestedProp-BNV_Y29K.js";
12
12
  import { _ as dt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const ct = ["id"], vt = ["onClick"], ht = ["xmlns", "viewBox"], pt = ["id"], gt = ["stop-color"], yt = ["stop-color"], ft = ["x", "y", "width", "height", "fill", "rx"], bt = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], mt = ["x2", "y1", "y2", "stroke", "stroke-width"], _t = ["x", "y", "font-size", "fill", "font-weight"], xt = ["x", "y", "font-size", "fill", "font-weight"], $t = ["x", "y", "font-size", "fill", "font-weight"], kt = ["x", "y", "font-size", "fill", "font-weight"], Ct = ["y", "width", "height", "fill", "onMouseenter"], wt = ["onClick"], Tt = { style: "width:100%;padding-top: 36px;position:relative" }, Nt = { class: "vue-ui-data-table" }, Lt = { key: 0 }, Pt = { style: { width: "100%" } }, Vt = ["data-cell"], St = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ft = ["data-cell"], zt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Bt = ["data-cell"], It = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ot = ["data-cell"], Dt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Rt = ["data-cell"], Mt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ut = ["data-cell"], Xt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, At = ["data-cell"], Et = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Gt = {
14
14
  __name: "vue-ui-vertical-bar",
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DFXgoR1T.cjs"),Y=require("./useResponsive-B3TrDDIG.cjs"),me=require("./Title-Ci74YZxW.cjs"),Z=require("./usePrinter-DoFYRZKM.cjs"),be=require("./Tooltip-BNMjZUBc.cjs"),ee=require("./Legend-DZhpxKg4.cjs"),ke=require("./vue-ui-skeleton-CmABeGyu.cjs"),xe=require("./BaseIcon-DWx8aSo2.cjs"),Ce=require("./vue-ui-accordion-P9OYffC3.cjs"),te=require("./useNestedProp-CbZUIZc0.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),$e=["id"],Ne=["onClick"],we=["xmlns","viewBox"],Se=["id"],Ve=["stop-color"],Te=["stop-color"],Ee=["x","y","width","height","fill","rx"],Be=["x","y","width","height","fill","rx","stroke","stroke-width"],ze=["x2","y1","y2","stroke","stroke-width"],Pe=["x","y","font-size","fill","font-weight"],Le=["x","y","font-size","fill","font-weight"],De=["x","y","font-size","fill","font-weight"],Fe=["x","y","font-size","fill","font-weight"],Ie=["y","width","height","fill","onMouseenter"],Oe=["onClick"],Re={style:"width:100%;padding-top: 36px;position:relative"},Me={class:"vue-ui-data-table"},qe={key:0},He={style:{width:"100%"}},Ue=["data-cell"],Ae={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ge=["data-cell"],Xe={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},je=["data-cell"],We={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ke=["data-cell"],Je={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Qe=["data-cell"],Ye={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ze=["data-cell"],et={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},tt=["data-cell"],lt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},at={__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(le,{expose:ae,emit:oe}){const f=le;e.useCssVars(l=>({"7410f552":l.tdo}));const{vue_ui_vertical_bar:ne}=r.useConfig(),w=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(r.createUid()),re=e.ref(null),E=e.ref(!1),B=e.ref(""),S=e.ref(0),ue=e.ref(null),F=e.ref(0),x=e.ref(null),I=e.ref(null),z=e.ref(null),t=e.computed(()=>{const l=te.useNestedProp({userConfig:f.config,defaultConfig:ne});return l.theme?{...te.useNestedProp({userConfig:r.themes.vue_ui_vertical_bar[l.theme]||f.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),{isPrinting:ie,isImaging:se,generatePdf:O,generateImage:R}=Z.usePrinter({elementId:`vue-ui-vertical-bar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-vertical-bar"}),M=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),q=e.ref(null),H=e.ref(!1),ce=e.computed(()=>t.value.table.responsiveBreakpoint),V=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(f.dataset)&&r.error({componentName:"VueUiVerticalBar",type:"dataset"}),S.value=f.dataset.flatMap(l=>l.children&&l.children.length>0?l.children.length:1).reduce((l,o)=>l+o,0),de(),t.value.responsive){const l=Y.throttle(()=>{const{width:o,height:a}=Y.useResponsive({chart:x.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?z.value:null});G.value=o,s.value=a/S.value-d.value*2});V.value=new ResizeObserver(l),V.value.observe(x.value.parentNode)}}),e.onBeforeUnmount(()=>{V.value&&V.value.disconnect()});function de(){new ResizeObserver(o=>{o.forEach(a=>{H.value=a.contentRect.width<ce.value})}).observe(q.value)}const h=e.ref({showTable:t.value.table.show,sortDesc:t.value.style.chart.layout.bars.sort==="desc",showTooltip:t.value.style.chart.tooltip.show}),U=e.computed(()=>h.value.sortDesc),b=e.computed(()=>(f.dataset.forEach((l,o)=>{l.children&&(r.objectIsEmpty(l.children)?r.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`children (index ${o})`}):l.children.forEach((a,n)=>{[null,void 0].includes(a.name)&&r.error({componentName:"VueUiVerticalBar",type:"datasetSerieAttribute",property:"name",key:"children",index:n})}))}),f.dataset.map((l,o)=>{const a=`vertical_parent_${o}_${m.value}`,n=!!l.children&&l.children.length>0;return![null,void 0].includes(l.value)&&l.value<0&&console.warn(`VueUiVerticalBar is not designed to graph negative values. ${l.name||"serie at index"+o} has the following value: ${l.value}`),{...l,id:a,shape:"square",opacity:y.value.includes(a)?.5:1,value:n?l.children.map(u=>u.value||0).reduce((u,i)=>u+i,0):l.value||0,hasChildren:n,isChild:!1,segregate:()=>C(a),isSegregated:y.value.includes(a),color:r.convertColorToHex(l.color)||M.value[o]||r.palette[o]||r.palette[o%r.palette.length],children:!l.children||!l.children.length?[]:l.children.toSorted((u,i)=>U.value?i.value-u.value:u.value-i.value).map((u,i)=>(![null,void 0].includes(u.value)&&u.value<0&&console.warn(`VueUiVerticalBar is not designed to graph negative values. ${u.name+" child serie"||"child serie at index"+o+", "+i} has the following value: ${u.value}`),{...u,value:u.value||0,isChild:!0,parentId:a,parentName:l.name,parentValue:l.value,id:`vertical_child_${o}_${i}_${m.value}`,childIndex:i,color:r.convertColorToHex(u.color)||r.convertColorToHex(l.color)||M.value[o]||r.palette[o]||r.palette[o%r.palette.length]})).map((u,i)=>({...u,isFirstChild:i===0,isLastChild:i===l.children.length-1}))}}).toSorted((l,o)=>U.value?o.value-l.value:l.value-o.value))),A=e.computed(()=>({cy:"vertical-bar-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),s=e.ref(t.value.style.chart.layout.bars.height),d=e.ref(t.value.style.chart.layout.bars.gap),ve=e.computed(()=>(s.value+d.value)*S.value),G=e.ref(512),c=e.computed(()=>({width:G.value,height:ve.value,padding:{top:12,left:128+t.value.style.chart.layout.bars.offsetX,right:64+t.value.style.chart.layout.bars.paddingRight,bottom:12}})),v=e.computed(()=>({fullHeight:c.value.padding.top+c.value.padding.bottom+c.value.height,top:c.value.padding.top,left:c.value.padding.left,right:c.value.width-c.value.padding.right,bottom:c.value.padding.top+c.value.height,width:c.value.width-(c.value.padding.left+c.value.padding.right)}));function P(){S.value=k.value.flatMap(l=>l.children&&l.children.length>0?l.children.length:1).reduce((l,o)=>l+o,0)}const y=e.ref([]);function C(l){y.value.includes(l)?y.value=y.value.filter(o=>o!==l):y.value.push(l),P(),oe("selectLegend",k.value)}const k=e.computed(()=>b.value.filter(l=>!y.value.includes(l.id))),p=e.computed(()=>k.value.map(l=>l.value).reduce((l,o)=>l+o));function X(l,o=!1,a=0){return o?(l/p.value*100).toFixed(a)+"%":l/p.value}const _=e.computed(()=>k.value.flatMap(l=>l.hasChildren?l.children:l)),he=e.computed(()=>Math.max(...k.value.flatMap(l=>l.children&&l.children.length?Math.max(...l.children.map(o=>o.value)):l.value)));function $(l){const o=l/he.value;return v.value.width*o}function pe(l){return $(l)+v.value.left}function T(l,o){const a=k.value.find(i=>i.id===l.parentId),n=v.value.top+(d.value+s.value)*o,u=a.children.length*(d.value+s.value);return{y:n+u/2-t.value.style.chart.layout.bars.parentLabels.fontSize,name:a.name,value:[void 0,NaN,null].includes(a.value)?"":a.value.toFixed(t.value.style.chart.layout.bars.dataLabels.value.roundingValue),percentageToTotal:isNaN(a.value/p.value)?"":X(a.value,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)}}function ge(){return k.value}const L=e.ref(null),D=e.ref(null);function ye(l,o){D.value={datapoint:l,seriesIndex:o,series:b.value,config:t.value},E.value=!0,L.value=l.id;let a="";const n=l.isChild?l.parentName:l.name,u=l.isChild?l.name:"",i=t.value.style.chart.tooltip.customFormat;r.isFunction(i)&&r.functionReturnsString(()=>i({datapoint:l,series:b.value,config:t.value,seriesIndex:o}))?B.value=i({datapoint:l,series:b.value,config:t.value,seriesIndex:o}):(a+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CSlObCMJ.cjs"),Y=require("./useResponsive-B3TrDDIG.cjs"),me=require("./Title--kLbBq-N.cjs"),Z=require("./usePrinter-ClpmcbPy.cjs"),be=require("./Tooltip-Dwh7A0L5.cjs"),ee=require("./Legend-BNUo8JKO.cjs"),ke=require("./vue-ui-skeleton-aEAr9fnx.cjs"),xe=require("./BaseIcon-DpzJwh5Z.cjs"),Ce=require("./vue-ui-accordion-IPISean4.cjs"),te=require("./useNestedProp-DUXlSjg2.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),$e=["id"],Ne=["onClick"],we=["xmlns","viewBox"],Se=["id"],Ve=["stop-color"],Te=["stop-color"],Ee=["x","y","width","height","fill","rx"],Be=["x","y","width","height","fill","rx","stroke","stroke-width"],ze=["x2","y1","y2","stroke","stroke-width"],Pe=["x","y","font-size","fill","font-weight"],Le=["x","y","font-size","fill","font-weight"],De=["x","y","font-size","fill","font-weight"],Fe=["x","y","font-size","fill","font-weight"],Ie=["y","width","height","fill","onMouseenter"],Oe=["onClick"],Re={style:"width:100%;padding-top: 36px;position:relative"},Me={class:"vue-ui-data-table"},qe={key:0},He={style:{width:"100%"}},Ue=["data-cell"],Ae={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ge=["data-cell"],Xe={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},je=["data-cell"],We={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ke=["data-cell"],Je={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Qe=["data-cell"],Ye={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ze=["data-cell"],et={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},tt=["data-cell"],lt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},at={__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(le,{expose:ae,emit:oe}){const f=le;e.useCssVars(l=>({"7410f552":l.tdo}));const{vue_ui_vertical_bar:ne}=r.useConfig(),w=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(r.createUid()),re=e.ref(null),E=e.ref(!1),B=e.ref(""),S=e.ref(0),ue=e.ref(null),F=e.ref(0),x=e.ref(null),I=e.ref(null),z=e.ref(null),t=e.computed(()=>{const l=te.useNestedProp({userConfig:f.config,defaultConfig:ne});return l.theme?{...te.useNestedProp({userConfig:r.themes.vue_ui_vertical_bar[l.theme]||f.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),{isPrinting:ie,isImaging:se,generatePdf:O,generateImage:R}=Z.usePrinter({elementId:`vue-ui-vertical-bar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-vertical-bar"}),M=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),q=e.ref(null),H=e.ref(!1),ce=e.computed(()=>t.value.table.responsiveBreakpoint),V=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(f.dataset)&&r.error({componentName:"VueUiVerticalBar",type:"dataset"}),S.value=f.dataset.flatMap(l=>l.children&&l.children.length>0?l.children.length:1).reduce((l,o)=>l+o,0),de(),t.value.responsive){const l=Y.throttle(()=>{const{width:o,height:a}=Y.useResponsive({chart:x.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?z.value:null});G.value=o,s.value=a/S.value-d.value*2});V.value=new ResizeObserver(l),V.value.observe(x.value.parentNode)}}),e.onBeforeUnmount(()=>{V.value&&V.value.disconnect()});function de(){new ResizeObserver(o=>{o.forEach(a=>{H.value=a.contentRect.width<ce.value})}).observe(q.value)}const h=e.ref({showTable:t.value.table.show,sortDesc:t.value.style.chart.layout.bars.sort==="desc",showTooltip:t.value.style.chart.tooltip.show}),U=e.computed(()=>h.value.sortDesc),b=e.computed(()=>(f.dataset.forEach((l,o)=>{l.children&&(r.objectIsEmpty(l.children)?r.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`children (index ${o})`}):l.children.forEach((a,n)=>{[null,void 0].includes(a.name)&&r.error({componentName:"VueUiVerticalBar",type:"datasetSerieAttribute",property:"name",key:"children",index:n})}))}),f.dataset.map((l,o)=>{const a=`vertical_parent_${o}_${m.value}`,n=!!l.children&&l.children.length>0;return![null,void 0].includes(l.value)&&l.value<0&&console.warn(`VueUiVerticalBar is not designed to graph negative values. ${l.name||"serie at index"+o} has the following value: ${l.value}`),{...l,id:a,shape:"square",opacity:y.value.includes(a)?.5:1,value:n?l.children.map(u=>u.value||0).reduce((u,i)=>u+i,0):l.value||0,hasChildren:n,isChild:!1,segregate:()=>C(a),isSegregated:y.value.includes(a),color:r.convertColorToHex(l.color)||M.value[o]||r.palette[o]||r.palette[o%r.palette.length],children:!l.children||!l.children.length?[]:l.children.toSorted((u,i)=>U.value?i.value-u.value:u.value-i.value).map((u,i)=>(![null,void 0].includes(u.value)&&u.value<0&&console.warn(`VueUiVerticalBar is not designed to graph negative values. ${u.name+" child serie"||"child serie at index"+o+", "+i} has the following value: ${u.value}`),{...u,value:u.value||0,isChild:!0,parentId:a,parentName:l.name,parentValue:l.value,id:`vertical_child_${o}_${i}_${m.value}`,childIndex:i,color:r.convertColorToHex(u.color)||r.convertColorToHex(l.color)||M.value[o]||r.palette[o]||r.palette[o%r.palette.length]})).map((u,i)=>({...u,isFirstChild:i===0,isLastChild:i===l.children.length-1}))}}).toSorted((l,o)=>U.value?o.value-l.value:l.value-o.value))),A=e.computed(()=>({cy:"vertical-bar-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),s=e.ref(t.value.style.chart.layout.bars.height),d=e.ref(t.value.style.chart.layout.bars.gap),ve=e.computed(()=>(s.value+d.value)*S.value),G=e.ref(512),c=e.computed(()=>({width:G.value,height:ve.value,padding:{top:12,left:128+t.value.style.chart.layout.bars.offsetX,right:64+t.value.style.chart.layout.bars.paddingRight,bottom:12}})),v=e.computed(()=>({fullHeight:c.value.padding.top+c.value.padding.bottom+c.value.height,top:c.value.padding.top,left:c.value.padding.left,right:c.value.width-c.value.padding.right,bottom:c.value.padding.top+c.value.height,width:c.value.width-(c.value.padding.left+c.value.padding.right)}));function P(){S.value=k.value.flatMap(l=>l.children&&l.children.length>0?l.children.length:1).reduce((l,o)=>l+o,0)}const y=e.ref([]);function C(l){y.value.includes(l)?y.value=y.value.filter(o=>o!==l):y.value.push(l),P(),oe("selectLegend",k.value)}const k=e.computed(()=>b.value.filter(l=>!y.value.includes(l.id))),p=e.computed(()=>k.value.map(l=>l.value).reduce((l,o)=>l+o));function X(l,o=!1,a=0){return o?(l/p.value*100).toFixed(a)+"%":l/p.value}const _=e.computed(()=>k.value.flatMap(l=>l.hasChildren?l.children:l)),he=e.computed(()=>Math.max(...k.value.flatMap(l=>l.children&&l.children.length?Math.max(...l.children.map(o=>o.value)):l.value)));function $(l){const o=l/he.value;return v.value.width*o}function pe(l){return $(l)+v.value.left}function T(l,o){const a=k.value.find(i=>i.id===l.parentId),n=v.value.top+(d.value+s.value)*o,u=a.children.length*(d.value+s.value);return{y:n+u/2-t.value.style.chart.layout.bars.parentLabels.fontSize,name:a.name,value:[void 0,NaN,null].includes(a.value)?"":a.value.toFixed(t.value.style.chart.layout.bars.dataLabels.value.roundingValue),percentageToTotal:isNaN(a.value/p.value)?"":X(a.value,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)}}function ge(){return k.value}const L=e.ref(null),D=e.ref(null);function ye(l,o){D.value={datapoint:l,seriesIndex:o,series:b.value,config:t.value},E.value=!0,L.value=l.id;let a="";const n=l.isChild?l.parentName:l.name,u=l.isChild?l.name:"",i=t.value.style.chart.tooltip.customFormat;r.isFunction(i)&&r.functionReturnsString(()=>i({datapoint:l,series:b.value,config:t.value,seriesIndex:o}))?B.value=i({datapoint:l,series:b.value,config:t.value,seriesIndex:o}):(a+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
2
2
  <div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" rx="2" stroke="none" fill="${l.color}"/></svg> ${n}</div>
3
3
  ${u?`<div>${u}</div>`:""}
4
4
  </div>`,t.value.style.chart.tooltip.showValue&&(a+=`<div>${t.value.translations.value}: <b>${t.value.style.chart.tooltip.prefix}${[void 0,NaN,null].includes(l.value)?"-":l.value.toFixed(t.value.style.chart.tooltip.roundingValue)}${t.value.style.chart.tooltip.suffix}</b></div>`),t.value.style.chart.tooltip.showPercentage&&(a+=`<div>${t.value.translations.percentageToTotal} : <b>${isNaN(l.value/p.value)?"-":`${(l.value/p.value*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}`}%</b></div>`,l.isChild&&(a+=`<div>${t.value.translations.percentageToSerie}: <b>${isNaN(l.value/l.parentValue)?"-":`${(l.value/l.parentValue*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}`}%</b></div>`)),B.value=`<div style="text-align:left">${a}</div>`)}function j(l){if(isNaN(l)||!t.value.style.chart.layout.bars.dataLabels.value.show)return"";const o=r.dataLabel({p:t.value.style.chart.layout.bars.dataLabels.value.prefix,v:l,s:t.value.style.chart.layout.bars.dataLabels.value.suffix,r:t.value.style.chart.layout.bars.dataLabels.value.roundingValue}),a=`(${X(l,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;return`${o}${t.value.style.chart.layout.bars.dataLabels.percentage.show?` ${a}`:""}`}const g=e.computed(()=>{const l=[t.value.translations.parentName,t.value.translations.value,t.value.translations.percentageToTotal,t.value.translations.childName,t.value.translations.value,t.value.translations.percentageToSerie,t.value.translations.percentageToTotal],o=_.value.map(a=>a.isChild?a.isFirstChild?{color:a.color,parentName:a.parentName,parentValue:a.parentValue,percentageToTotal:a.parentValue/p.value,childName:a.name,childValue:a.value,childPercentageToParent:a.value/a.parentValue,childPercentageToTotal:a.value/p.value}:{color:"",parentName:"",parentValue:"",percentageToTotal:"",childName:a.name,childValue:a.value,childPercentageToParent:a.value/a.parentValue,childPercentageToTotal:a.value/p.value}:{color:a.color,parentName:a.name,parentValue:a.value,percentageToTotal:a.value/p.value,childName:"",childValue:"",childPercentageToParent:"",childPercentageToTotal:""});return{head:l,body:o}});function W(){const l=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=g.value.head,a=g.value.body.map(i=>[i.parentName,i.parentValue,i.percentageToTotal,i.childName,i.childValue,i.childPercentageToParent,i.childPercentageToTotal]),n=l.concat([o]).concat(a),u=r.createCsvContent(n);r.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-vertical-bar"})}const N=e.ref(!1);function fe(l){N.value=l,F.value+=1}function K(){h.value.showTable=!h.value.showTable}function J(){h.value.sortDesc=!h.value.sortDesc,P()}function Q(){h.value.showTooltip=!h.value.showTooltip}return ae({getData:ge,recalculateHeight:P,generatePdf:O,generateCsv:W,generateImage:R,toggleTable:K,toggleSort:J,toggleTooltip:Q}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-vertical-bar ${N.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"verticalBarChart",ref:x,id:`vue-ui-vertical-bar_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:I,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(me._sfc_main,{config:{title:{cy:"vertical-bar-div-title",...t.value.style.chart.title},subtitle:{cy:"vertical-bar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&w.value?(e.openBlock(),e.createBlock(Z.UserOptions,{ref_key:"details",ref:re,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(se),isPrinting:e.unref(ie),uid:m.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasSort:t.value.userOptions.buttons.sort,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:N.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(O),onGenerateCsv:W,onGenerateImage:e.unref(R),onToggleTable:K,onToggleSort:J,onToggleTooltip:Q},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.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionSort?{name:"optionSort",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionSort",{},void 0,!0)]),key:"6"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasSort","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartLegend",ref:z},[e.createVNode(ee.Legend,{legendSet:b.value,config:A.value,onClickMarker:o[0]||(o[0]=({legend:a})=>C(a.id))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:n=>C(a.id),style:e.normalizeStyle(`opacity:${y.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name)+": "+e.toDisplayString(t.value.style.chart.legend.prefix)+e.toDisplayString(a.value.toFixed(t.value.style.chart.legend.roundingValue))+e.toDisplayString(t.value.style.chart.legend.suffix),13,Ne)]),_:1},8,["legendSet","config"])],512)):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.value}),viewBox:`0 0 ${c.value.width<=0?10:c.value.width} ${v.value.fullHeight<=0?10:v.value.fullHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,n)=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`vertical_bar_gradient_${m.value}_${n}`},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(r.shiftHue)(a.color,.03)}${e.unref(r.opacity)[100-t.value.style.chart.layout.bars.gradientIntensity]}`},null,8,Te)],8,Se))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:v.value.left,y:v.value.top+(d.value+s.value)*n,width:$(a.value)<=0?1e-4:$(a.value),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.underlayerColor,rx:t.value.style.chart.layout.bars.borderRadius,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Ee)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:v.value.left,y:v.value.top+(d.value+s.value)*n,width:$(a.value)<=0?1e-4:$(a.value),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.useGradient?`url(#vertical_bar_gradient_${m.value}_${n})`:`${a.color}${e.unref(r.opacity)[t.value.style.chart.layout.bars.fillOpacity]}`,rx:t.value.style.chart.layout.bars.borderRadius,stroke:t.value.style.chart.layout.bars.useStroke?a.color:"none","stroke-width":t.value.style.chart.layout.bars.useStroke?t.value.style.chart.layout.bars.strokeWidth:0,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Be),(!a.isChild||a.isLastChild)&&t.value.style.chart.layout.separators.show&&n!==_.value.length-1?(e.openBlock(),e.createElementBlock("line",{key:0,x1:0,x2:v.value.left,y1:s.value+d.value/2+v.value.top+(d.value+s.value)*n,y2:s.value+d.value/2+v.value.top+(d.value+s.value)*n,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,ze)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:pe(a.value)+3+t.value.style.chart.layout.bars.dataLabels.offsetX,y:v.value.top+(d.value+s.value)*n+s.value/2+t.value.style.chart.layout.bars.dataLabels.fontSize/2,"text-anchor":"start","font-size":t.value.style.chart.layout.bars.dataLabels.fontSize,fill:t.value.style.chart.layout.bars.dataLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal"},e.toDisplayString(j(a.value)),9,Pe),(a.isChild||!a.hasChildren)&&t.value.style.chart.layout.bars.nameLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"end",x:v.value.left-3+t.value.style.chart.layout.bars.nameLabels.offsetX,y:v.value.top+(d.value+s.value)*n+s.value/2+t.value.style.chart.layout.bars.nameLabels.fontSize/2,"font-size":t.value.style.chart.layout.bars.nameLabels.fontSize,fill:t.value.style.chart.layout.bars.nameLabels.color,"font-weight":t.value.style.chart.layout.bars.nameLabels.bold?"bold":"normal"},e.toDisplayString(a.name),9,Le)):e.createCommentVNode("",!0),a.isChild&&a.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:T(a,n).y,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.parentLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(T(a,n).name),9,De)):e.createCommentVNode("",!0),a.isChild&&a.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:3,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:T(a,n).y+t.value.style.chart.layout.bars.parentLabels.fontSize+6,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(j(T(a,n).value)),9,Fe)):e.createCommentVNode("",!0),e.createElementVNode("rect",{"data-cy-trap":"",x:0,y:v.value.top+(d.value+s.value)*n-d.value/2,width:c.value.width<=0?1e-4:c.value.width,height:s.value+d.value<=0?1e-4:s.value+d.value,fill:L.value===a.id?`${t.value.style.chart.layout.highlighter.color}${e.unref(r.opacity)[t.value.style.chart.layout.highlighter.opacity]}`:"transparent",onMouseenter:u=>ye(a,n),onMouseleave:o[1]||(o[1]=u=>{ue.value=null,E.value=!1,L.value=null})},null,40,Ie)]))),256)),e.renderSlot(l.$slots,"svg",{svg:c.value},void 0,!0)],14,we)):e.createCommentVNode("",!0),w.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:4,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"chartLegend",ref:z},[e.createVNode(ee.Legend,{legendSet:b.value,config:A.value,onClickMarker:o[2]||(o[2]=({legend:a})=>C(a.id))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:n=>C(a.id),style:e.normalizeStyle(`opacity:${y.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name)+" : "+e.toDisplayString(t.value.style.chart.legend.prefix)+e.toDisplayString(a.value.toFixed(t.value.style.chart.legend.roundingValue))+e.toDisplayString(t.value.style.chart.legend.suffix),13,Oe)]),_:1},8,["legendSet","config"])],512)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:b.value},void 0,!0),e.createVNode(be._sfc_main,{show:h.value.showTooltip&&E.value&&y.value.length<f.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,parent:x.value,content:B.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),w.value?(e.openBlock(),e.createBlock(Ce.default,{key:6,hideDetails:"",config:{open:h.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:q,class:"vue-ui-vertical-bar-table"},[e.createElementVNode("div",Re,[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:o[3]||(o[3]=a=>h.value.showTable=!1),onKeypress:o[4]||(o[4]=e.withKeys(a=>h.value.showTable=!1,["enter"]))},[e.createVNode(xe.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("div",{style:{width:"100%","container-type":"inline-size"},class:e.normalizeClass({"vue-ui-responsive":H.value})},[e.createElementVNode("table",Me,[e.createElementVNode("caption",{style:e.normalizeStyle({backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline}),class:"vue-ui-data-table__caption"},[e.createTextVNode(e.toDisplayString(t.value.style.chart.title.text)+" ",1),t.value.style.chart.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",qe,e.toDisplayString(t.value.style.chart.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.head,a=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline}`)},[e.createElementVNode("div",He,e.toDisplayString(a),1)],4))),256))],4),e.createElementVNode("tr",null,[e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"∑ "+e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(isNaN(p.value)?"":p.value.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),5),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"100%",4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4)])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.body,(a,n)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline};font-variant-numeric: tabular-nums;`),"data-cell":g.value.head[0]??""},[e.createElementVNode("div",Ae,[a.color?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`color:${a.color};margin-right:3px`)},"⬤",4)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(a.parentName),1)])],12,Ue),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[1]??""},[e.createElementVNode("div",Xe,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(a.parentValue)?"":a.parentValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,Ge),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[2]??""},[e.createElementVNode("div",We,e.toDisplayString(["",NaN,void 0].includes(a.percentageToTotal)?"":`${(a.percentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,je),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[3]??""},[e.createElementVNode("div",Je,e.toDisplayString(a.childName),1)],12,Ke),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[4]??""},[e.createElementVNode("div",Ye,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(a.childValue)?"":a.childValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,Qe),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[5]??""},[e.createElementVNode("div",et,e.toDisplayString(["",NaN,void 0].includes(a.childPercentageToParent)?"":`${(a.childPercentageToParent*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,Ze),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[6]??""},[e.createElementVNode("div",lt,e.toDisplayString(["",NaN,void 0].includes(a.childPercentageToTotal)?"":`${(a.childPercentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,tt)],6))),256))])])],2)])],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,$e))}},ot=_e._export_sfc(at,[["__scopeId","data-v-22e85059"]]);exports.default=ot;