vue-data-ui 2.4.68 → 2.4.70

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 (156) hide show
  1. package/README.md +3 -1
  2. package/dist/{Arrow-D5Ik6Rl_.js → Arrow-6iiqpdmu.js} +1 -1
  3. package/dist/{Arrow-DTyx6yXe.cjs → Arrow-B5enRv0z.cjs} +1 -1
  4. package/dist/{BaseIcon-D7H3G8-f.js → BaseIcon-1cIjVntY.js} +1 -1
  5. package/dist/{BaseIcon-At97xJaA.cjs → BaseIcon-U1_DjHDx.cjs} +1 -1
  6. package/dist/{DataTable-CNH8bChE.js → DataTable-B1FxJofv.js} +2 -2
  7. package/dist/{DataTable-Dng-zRfh.cjs → DataTable-D8n9mxYD.cjs} +1 -1
  8. package/dist/{Legend-kF7sC1KK.js → Legend-BMPqVkBW.js} +2 -2
  9. package/dist/{Legend-kMbr5DZt.cjs → Legend-yTCeOn97.cjs} +1 -1
  10. package/dist/{PackageVersion-m6HC0skh.js → PackageVersion-B51w3y82.js} +1 -1
  11. package/dist/{PackageVersion-CHUMvFGr.cjs → PackageVersion-ou96yRPl.cjs} +1 -1
  12. package/dist/{PenAndPaper-FOhKSug_.js → PenAndPaper-BSEqDrpB.js} +3 -3
  13. package/dist/{PenAndPaper-DmMAK04m.cjs → PenAndPaper-BWwAIhEN.cjs} +1 -1
  14. package/dist/{Shape-Ajzs1V3O.cjs → Shape-BQHHOWfV.cjs} +1 -1
  15. package/dist/{Shape-CfcWXI5g.js → Shape-TWPk_v-7.js} +1 -1
  16. package/dist/{Slicer-Cgyw5vYE.cjs → Slicer-B2hsi3sr.cjs} +1 -1
  17. package/dist/{Slicer-Bq3BajcJ.js → Slicer-CTMbBaNs.js} +2 -2
  18. package/dist/{Title-C7y-iI1m.cjs → Title-CLw400_T.cjs} +1 -1
  19. package/dist/{Title-L52l_KMR.js → Title-CujJ2kZY.js} +1 -1
  20. package/dist/{Tooltip-Y622sV6l.cjs → Tooltip-BGjOAkJQ.cjs} +1 -1
  21. package/dist/{Tooltip-FYp9ljnj.js → Tooltip-CPxoXFKu.js} +1 -1
  22. package/dist/{index-3_ulDZ6w.js → index-B3hGeAZ7.js} +8330 -4527
  23. package/dist/index-DsNY1SpD.cjs +9 -0
  24. package/dist/style.css +1 -1
  25. package/dist/types/vue-data-ui.d.cts +2 -2
  26. package/dist/types/vue-data-ui.d.ts +2 -2
  27. package/dist/{useNestedProp-BtCZVKOm.cjs → useNestedProp-B4YewnHE.cjs} +1 -1
  28. package/dist/{useNestedProp-Bs6ltq3I.js → useNestedProp-WWv9scq-.js} +1 -1
  29. package/dist/{usePrinter-BmNhTUGE.cjs → usePrinter-BS5qzASr.cjs} +1 -1
  30. package/dist/{usePrinter-NdwnpHUu.js → usePrinter-CiUt-pS9.js} +1 -1
  31. package/dist/{vue-data-ui-qqS_JEAb.js → vue-data-ui-Dex3QmMG.js} +60 -60
  32. package/dist/{vue-data-ui-C4MFJb3X.cjs → vue-data-ui-RimTudAT.cjs} +1 -1
  33. package/dist/vue-data-ui.cjs +1 -1
  34. package/dist/vue-data-ui.js +1 -1
  35. package/dist/{vue-ui-3d-bar-D1Q5GpB8.cjs → vue-ui-3d-bar-BaUMT6Im.cjs} +1 -1
  36. package/dist/{vue-ui-3d-bar-B-DPM6sB.js → vue-ui-3d-bar-CSDlYOc2.js} +9 -9
  37. package/dist/{vue-ui-accordion-Dd0mfQys.cjs → vue-ui-accordion-BAP0rDBZ.cjs} +1 -1
  38. package/dist/{vue-ui-accordion-DXlXtAML.js → vue-ui-accordion-DFn61GBf.js} +3 -3
  39. package/dist/{vue-ui-age-pyramid-CEw1j90S.js → vue-ui-age-pyramid-B9kHnlMD.js} +10 -10
  40. package/dist/{vue-ui-age-pyramid-Dn8sTUD1.cjs → vue-ui-age-pyramid-s4RTdVJb.cjs} +1 -1
  41. package/dist/{vue-ui-annotator-I7b5208U.js → vue-ui-annotator-ClRp-_nk.js} +1 -1
  42. package/dist/{vue-ui-annotator-DLwKn7nJ.cjs → vue-ui-annotator-vJFxGq0D.cjs} +1 -1
  43. package/dist/{vue-ui-bullet-B_toFHM0.cjs → vue-ui-bullet-BojHcddQ.cjs} +1 -1
  44. package/dist/{vue-ui-bullet-CUpzxv8b.js → vue-ui-bullet-CCxg-DLm.js} +8 -8
  45. package/dist/{vue-ui-candlestick-D4poOC-A.js → vue-ui-candlestick-CKA68yh0.js} +11 -11
  46. package/dist/{vue-ui-candlestick-DUjJP9IX.cjs → vue-ui-candlestick-D79x0-7c.cjs} +1 -1
  47. package/dist/{vue-ui-carousel-table-BRdt1LUl.cjs → vue-ui-carousel-table-C3bbmzML.cjs} +1 -1
  48. package/dist/{vue-ui-carousel-table-CMP41H6W.js → vue-ui-carousel-table-Drk3spxC.js} +4 -4
  49. package/dist/{vue-ui-chestnut-BzCjWlbs.js → vue-ui-chestnut-2sRDod-W.js} +8 -8
  50. package/dist/{vue-ui-chestnut-BGpagpDQ.cjs → vue-ui-chestnut-BEGqhEq0.cjs} +1 -1
  51. package/dist/{vue-ui-cursor-CdhhPJ2w.js → vue-ui-cursor-DF-5Ps-j.js} +2 -2
  52. package/dist/{vue-ui-cursor-Ike72xN1.cjs → vue-ui-cursor-DKkfnZmq.cjs} +1 -1
  53. package/dist/{vue-ui-dashboard-CDUpQHzg.js → vue-ui-dashboard-DrdZgjNe.js} +2 -2
  54. package/dist/{vue-ui-dashboard-CFF1xhGw.cjs → vue-ui-dashboard-OckN8VFj.cjs} +1 -1
  55. package/dist/{vue-ui-digits-Cu3AtNFJ.cjs → vue-ui-digits-D5_-V30J.cjs} +1 -1
  56. package/dist/{vue-ui-digits-Cje8oZYA.js → vue-ui-digits-mDAvf_YK.js} +2 -2
  57. package/dist/{vue-ui-donut-DyEbJv8M.js → vue-ui-donut-CJEJcYS2.js} +12 -12
  58. package/dist/{vue-ui-donut-BNmui7ee.cjs → vue-ui-donut-Cmlh9AUu.cjs} +1 -1
  59. package/dist/{vue-ui-donut-evolution-B_kVMwY5.js → vue-ui-donut-evolution-CK-cpwE5.js} +11 -11
  60. package/dist/{vue-ui-donut-evolution-BxElmgKr.cjs → vue-ui-donut-evolution-DbtSfpK6.cjs} +1 -1
  61. package/dist/{vue-ui-dumbbell-XSwVUKkI.js → vue-ui-dumbbell-BLzNidEF.js} +10 -10
  62. package/dist/{vue-ui-dumbbell-Bb4_UIZL.cjs → vue-ui-dumbbell-CBoNAirK.cjs} +1 -1
  63. package/dist/{vue-ui-flow-BxSDPsTX.cjs → vue-ui-flow-DL2m0MdD.cjs} +1 -1
  64. package/dist/{vue-ui-flow-CT9Ikm2q.js → vue-ui-flow-bCt7TASQ.js} +9 -9
  65. package/dist/{vue-ui-funnel-4Xz5KcCC.cjs → vue-ui-funnel-D-jHODod.cjs} +1 -1
  66. package/dist/{vue-ui-funnel-xE-KSwUY.js → vue-ui-funnel-jLnMfVJu.js} +9 -9
  67. package/dist/{vue-ui-galaxy-BKyxc95s.cjs → vue-ui-galaxy-0WxeXT5y.cjs} +1 -1
  68. package/dist/{vue-ui-galaxy-CQu_2tM7.js → vue-ui-galaxy-Zqj4_zJg.js} +11 -11
  69. package/dist/{vue-ui-gauge-BML0PHj7.js → vue-ui-gauge-DNlSMh2o.js} +7 -7
  70. package/dist/{vue-ui-gauge-BY-_g8oh.cjs → vue-ui-gauge-DofvFQSC.cjs} +1 -1
  71. package/dist/{vue-ui-gizmo-CZdz1ws4.js → vue-ui-gizmo-COgDK5C0.js} +3 -3
  72. package/dist/{vue-ui-gizmo-DCDez8vm.cjs → vue-ui-gizmo-CRgJ1mZy.cjs} +1 -1
  73. package/dist/{vue-ui-heatmap-B6TqJ0rT.cjs → vue-ui-heatmap-BEkE4xql.cjs} +1 -1
  74. package/dist/{vue-ui-heatmap-BBhBotdK.js → vue-ui-heatmap-BOJgxQWc.js} +10 -10
  75. package/dist/{vue-ui-history-plot-ICiiX_iG.cjs → vue-ui-history-plot-BHbGz1DH.cjs} +1 -1
  76. package/dist/{vue-ui-history-plot-CEGzb0go.js → vue-ui-history-plot-DpfI1G8u.js} +11 -11
  77. package/dist/{vue-ui-kpi-CcY9SiQU.js → vue-ui-kpi-C8rtBkJx.js} +3 -3
  78. package/dist/{vue-ui-kpi-b1KYFaD5.cjs → vue-ui-kpi-CK5INSo4.cjs} +1 -1
  79. package/dist/{vue-ui-mini-loader-ChYeDs8b.js → vue-ui-mini-loader-DAS-clra.js} +2 -2
  80. package/dist/{vue-ui-mini-loader-DRDOwWX4.cjs → vue-ui-mini-loader-jcfkEvKC.cjs} +1 -1
  81. package/dist/{vue-ui-molecule-BC9pfKLe.cjs → vue-ui-molecule-Ba9FjFUe.cjs} +1 -1
  82. package/dist/{vue-ui-molecule-C7RlUrep.js → vue-ui-molecule-kOGTPW9a.js} +11 -11
  83. package/dist/{vue-ui-mood-radar-MwQGdQBk.js → vue-ui-mood-radar-6lLMtdI6.js} +11 -11
  84. package/dist/{vue-ui-mood-radar-DuyOelxm.cjs → vue-ui-mood-radar-D7kjDtlO.cjs} +1 -1
  85. package/dist/{vue-ui-nested-donuts-CTjWqxm1.js → vue-ui-nested-donuts-CK6LyQMB.js} +11 -11
  86. package/dist/{vue-ui-nested-donuts-DV_fUt8X.cjs → vue-ui-nested-donuts-D8af6ksq.cjs} +1 -1
  87. package/dist/{vue-ui-onion-CMJQd4hJ.cjs → vue-ui-onion-BAPfxwHq.cjs} +1 -1
  88. package/dist/{vue-ui-onion-DQU2quzY.js → vue-ui-onion-DWF3EeOX.js} +11 -11
  89. package/dist/{vue-ui-parallel-coordinate-plot-el0qRCNH.js → vue-ui-parallel-coordinate-plot-BL2TYCct.js} +12 -12
  90. package/dist/{vue-ui-parallel-coordinate-plot-mr_VL-5e.cjs → vue-ui-parallel-coordinate-plot-CiZvUoVu.cjs} +1 -1
  91. package/dist/{vue-ui-quadrant-D4JbzGnx.js → vue-ui-quadrant-76ioBDrb.js} +12 -12
  92. package/dist/{vue-ui-quadrant-p1PqQgE8.cjs → vue-ui-quadrant-DRtc-eU7.cjs} +1 -1
  93. package/dist/{vue-ui-quick-chart-C7dbfJas.js → vue-ui-quick-chart-BfiEh20h.js} +9 -9
  94. package/dist/{vue-ui-quick-chart-CpVCnKQR.cjs → vue-ui-quick-chart-Cf_a2-DK.cjs} +1 -1
  95. package/dist/vue-ui-radar-7FJCgzJe.cjs +1 -0
  96. package/dist/{vue-ui-radar-DwcDudGq.js → vue-ui-radar-CXpLA1Ug.js} +128 -128
  97. package/dist/{vue-ui-rating-CF611kMg.cjs → vue-ui-rating-D7bp5GXD.cjs} +1 -1
  98. package/dist/{vue-ui-rating-CVWVcuH4.js → vue-ui-rating-Dm99_KHq.js} +2 -2
  99. package/dist/{vue-ui-relation-circle-i-IWbtjG.cjs → vue-ui-relation-circle-DGmHEiu0.cjs} +1 -1
  100. package/dist/{vue-ui-relation-circle-DOqHTAlr.js → vue-ui-relation-circle-DP8adT--.js} +7 -7
  101. package/dist/{vue-ui-rings-HITb7jlj.cjs → vue-ui-rings-3dpAN_IS.cjs} +1 -1
  102. package/dist/{vue-ui-rings-CYtiwLoa.js → vue-ui-rings-DcGvctVh.js} +12 -12
  103. package/dist/{vue-ui-scatter-OHMJOdMx.cjs → vue-ui-scatter-BaB0Ss3P.cjs} +1 -1
  104. package/dist/{vue-ui-scatter-Cz4FEjWs.js → vue-ui-scatter-iYN3XbTv.js} +12 -12
  105. package/dist/{vue-ui-screenshot-PgLhVqsE.cjs → vue-ui-screenshot-BjJljc9y.cjs} +1 -1
  106. package/dist/{vue-ui-screenshot-BdztwxL8.js → vue-ui-screenshot-CA4rbg_4.js} +1 -1
  107. package/dist/{vue-ui-skeleton-uAX1ZH1F.js → vue-ui-skeleton-BAv7fXp9.js} +3 -3
  108. package/dist/{vue-ui-skeleton-DkZB7ae3.cjs → vue-ui-skeleton-BKT91qEa.cjs} +1 -1
  109. package/dist/{vue-ui-smiley-B8AEl3OB.js → vue-ui-smiley-BBlYvJpk.js} +2 -2
  110. package/dist/{vue-ui-smiley-CdtUIpXZ.cjs → vue-ui-smiley-BKJ4T8gG.cjs} +1 -1
  111. package/dist/{vue-ui-spark-trend-BvYBFEgW.cjs → vue-ui-spark-trend-CTuB4pyB.cjs} +1 -1
  112. package/dist/{vue-ui-spark-trend-C4TeGkYj.js → vue-ui-spark-trend-CoILXmOJ.js} +5 -5
  113. package/dist/{vue-ui-sparkbar-CTjfAkYo.js → vue-ui-sparkbar-7EUa2Jmc.js} +4 -4
  114. package/dist/{vue-ui-sparkbar-DB7UzjAD.cjs → vue-ui-sparkbar-JMpa0Jma.cjs} +1 -1
  115. package/dist/{vue-ui-sparkgauge-BlPTNi74.js → vue-ui-sparkgauge-BFyxHsvB.js} +4 -4
  116. package/dist/{vue-ui-sparkgauge-Bn2BPZoT.cjs → vue-ui-sparkgauge-BYPSS-9V.cjs} +1 -1
  117. package/dist/{vue-ui-sparkhistogram-BKRqTMvf.js → vue-ui-sparkhistogram-KrHoJol3.js} +5 -5
  118. package/dist/{vue-ui-sparkhistogram-B1mF8U0R.cjs → vue-ui-sparkhistogram-XrF1W3wK.cjs} +1 -1
  119. package/dist/{vue-ui-sparkline-Bg-TapoG.js → vue-ui-sparkline-eAOZxlhG.js} +4 -4
  120. package/dist/{vue-ui-sparkline-Dj0hFEo0.cjs → vue-ui-sparkline-rDPUOgGm.cjs} +1 -1
  121. package/dist/{vue-ui-sparkstackbar-DzI-MFl3.cjs → vue-ui-sparkstackbar-Czz-Lkc4.cjs} +1 -1
  122. package/dist/{vue-ui-sparkstackbar-D8KqTPqH.js → vue-ui-sparkstackbar-DcDCa91F.js} +5 -5
  123. package/dist/{vue-ui-stackbar-e1b5UPvn.cjs → vue-ui-stackbar-CZOwxp5b.cjs} +1 -1
  124. package/dist/{vue-ui-stackbar-6vF4VXMO.js → vue-ui-stackbar-GgXydxhr.js} +13 -13
  125. package/dist/{vue-ui-strip-plot-sWs8kbbo.js → vue-ui-strip-plot-DnWdZFVh.js} +11 -11
  126. package/dist/{vue-ui-strip-plot-GsQbr3zj.cjs → vue-ui-strip-plot-DpBcyzwt.cjs} +1 -1
  127. package/dist/{vue-ui-table-SRSARac3.js → vue-ui-table-DrBXqpBg.js} +1 -1
  128. package/dist/{vue-ui-table-CJVmhYep.cjs → vue-ui-table-MEwtGPBw.cjs} +1 -1
  129. package/dist/{vue-ui-table-heatmap-D1xntRRZ.cjs → vue-ui-table-heatmap-CujV9941.cjs} +1 -1
  130. package/dist/{vue-ui-table-heatmap-CKiO41aZ.js → vue-ui-table-heatmap-TDNQHDGp.js} +4 -4
  131. package/dist/{vue-ui-table-sparkline-hyCYl7SR.js → vue-ui-table-sparkline-Ctb2LW6k.js} +5 -5
  132. package/dist/{vue-ui-table-sparkline-BZJqRwhf.cjs → vue-ui-table-sparkline-zVF4kGcs.cjs} +1 -1
  133. package/dist/{vue-ui-thermometer-0bxewTlH.cjs → vue-ui-thermometer-BotRGJkO.cjs} +1 -1
  134. package/dist/{vue-ui-thermometer-uYO2Cbv6.js → vue-ui-thermometer-wNKYm3Kx.js} +7 -7
  135. package/dist/{vue-ui-timer-hehskDGP.cjs → vue-ui-timer-BrAWdEP-.cjs} +1 -1
  136. package/dist/{vue-ui-timer-DO2sPtaA.js → vue-ui-timer-CR0O7wYl.js} +5 -5
  137. package/dist/{vue-ui-tiremarks-C3Y478uT.cjs → vue-ui-tiremarks-DlK4zttR.cjs} +1 -1
  138. package/dist/{vue-ui-tiremarks-DQjOkAad.js → vue-ui-tiremarks-wuiChorp.js} +7 -7
  139. package/dist/{vue-ui-treemap-Bv36Ha7O.js → vue-ui-treemap-CJZlFtGP.js} +11 -11
  140. package/dist/{vue-ui-treemap-_4nb3nS1.cjs → vue-ui-treemap-DrkJBrlp.cjs} +1 -1
  141. package/dist/{vue-ui-vertical-bar-DeP6cUWy.js → vue-ui-vertical-bar-CULY6eIO.js} +288 -272
  142. package/dist/vue-ui-vertical-bar-DHzq1n9V.cjs +4 -0
  143. package/dist/{vue-ui-waffle-Hlsl5QtL.cjs → vue-ui-waffle-C82U9mjw.cjs} +1 -1
  144. package/dist/{vue-ui-waffle-BfzfWmf5.js → vue-ui-waffle-CymcJtwQ.js} +12 -12
  145. package/dist/{vue-ui-wheel-DJC5YCbw.js → vue-ui-wheel-CAXdjlKQ.js} +7 -7
  146. package/dist/{vue-ui-wheel--e6UBwL4.cjs → vue-ui-wheel-ED9GGmMR.cjs} +1 -1
  147. package/dist/{vue-ui-word-cloud-CVsld1uE.js → vue-ui-word-cloud-CaAop2-k.js} +10 -10
  148. package/dist/{vue-ui-word-cloud-AGcxc9Jb.cjs → vue-ui-word-cloud-Czmv1BKA.cjs} +1 -1
  149. package/dist/{vue-ui-xy-DiZVwKYl.cjs → vue-ui-xy-D3d6V9BN.cjs} +1 -1
  150. package/dist/{vue-ui-xy-DwwIMZEo.js → vue-ui-xy-X04Cu9MT.js} +14 -14
  151. package/dist/{vue-ui-xy-canvas-D1kEOzE6.cjs → vue-ui-xy-canvas-B65fFQ2Q.cjs} +1 -1
  152. package/dist/{vue-ui-xy-canvas-ChBRm7Zw.js → vue-ui-xy-canvas-soP9-Ijz.js} +11 -11
  153. package/package.json +1 -1
  154. package/dist/index-CPtAxuTc.cjs +0 -9
  155. package/dist/vue-ui-radar-B8w_jmnj.cjs +0 -1
  156. package/dist/vue-ui-vertical-bar-LquYjKVD.cjs +0 -4
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-CPtAxuTc.cjs"),M=require("./useNestedProp-BtCZVKOm.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},R=["src","height","width"],X=["xmlns","height","width"],j=["id"],F=["stop-color"],I=["stop-color"],O=["points","fill","stroke","stroke-width"],Y=["src","alt","height","width","id"],G=["xmlns","viewBox","height","id"],U=["id"],q=["stop-color"],H=["stop-color"],K=["points","fill","stroke"],P=["xmlns","height"],T=["onClick","onMouseenter","onKeyup"],W=["onMouseenter"],J={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(k,{expose:S,emit:_}){const i=k,{vue_ui_rating:w}=o.useConfig(),d=e.ref(o.createUid()),g=e.ref(!1),s=e.ref(void 0),y=e.ref([]),z=e.useSlots();e.onMounted(()=>{z["chart-background"]&&console.warn("VueUiRating does not support the #chart-background slot.")});const t=e.computed({get:()=>f(),set:a=>a});function f(){return M.useNestedProp({userConfig:i.config,defaultConfig:w})}e.watch(()=>i.config,a=>{t.value=f(),h()},{deep:!0});const B=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?C(i.dataset.rating):i.dataset.rating),N=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),r=e.ref(B.value),m=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function C(a){let n=0,l=0;for(const u in a){const L=parseInt(u),$=a[u];n+=L*$,l+=$}if(l===0)return 0;const v=n/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{h()});function h(){o.objectIsEmpty(i.dataset)&&o.error({componentName:"VueUiRating",type:"dataset"}),y.value=[];for(let a=t.value.from;a<=t.value.to;a+=1)y.value.push(a)}function p(a,n=!1){return a>s.value||c.value?n?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:n?1:t.value.style.star.useGradient?`url(#star_gradient_under_${d.value})`:t.value.style.star.activeColor}function x(a,n=!1){const l=r.value-a,v=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function b(a){c.value||(r.value=a,_("rate",a))}function E(){return r.value}function V(a=!0){c.value=a}return S({getData:E,toggleReadonly:V}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:n[2]||(n[2]=l=>g.value=!0),onMouseleave:n[3]||(n[3]=l=>{g.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",A,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,v)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[m.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(s.value)?t.value.style.image.inactiveOpacity:p(l,!0)}`)},null,12,R)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(o.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,F),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,I)],8,j)]),e.createElementVNode("polygon",{points:e.unref(o.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(s.value)?t.value.style.star.inactiveColor:p(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:s.value?p(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,O)],8,X)),m.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${d.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${x(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,Y)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${x(v)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${d.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(o.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,q),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,H)],8,U)]),e.createElementVNode("polygon",{points:e.unref(o.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${d.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,K)],8,G)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(o.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:u=>b(l),onMouseenter:u=>s.value=l,onMouseleave:n[0]||(n[0]=u=>s.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>b(l),["enter"])},null,40,T)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:u=>s.value=l,onMouseleave:n[1]||(n[1]=u=>s.value=void 0)},null,40,W)):e.createCommentVNode("",!0)],12,P)),t.value.style.tooltip.show&&N.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l)+":",5),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[l],e.unref(o.dataLabel)({v:i.dataset.rating[l],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},Q=D._export_sfc(J,[["__scopeId","data-v-9e1d13d5"]]);exports.default=Q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-DsNY1SpD.cjs"),M=require("./useNestedProp-B4YewnHE.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},R=["src","height","width"],X=["xmlns","height","width"],j=["id"],F=["stop-color"],I=["stop-color"],O=["points","fill","stroke","stroke-width"],Y=["src","alt","height","width","id"],G=["xmlns","viewBox","height","id"],U=["id"],q=["stop-color"],H=["stop-color"],K=["points","fill","stroke"],P=["xmlns","height"],T=["onClick","onMouseenter","onKeyup"],W=["onMouseenter"],J={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(k,{expose:S,emit:_}){const i=k,{vue_ui_rating:w}=o.useConfig(),d=e.ref(o.createUid()),g=e.ref(!1),s=e.ref(void 0),y=e.ref([]),z=e.useSlots();e.onMounted(()=>{z["chart-background"]&&console.warn("VueUiRating does not support the #chart-background slot.")});const t=e.computed({get:()=>f(),set:a=>a});function f(){return M.useNestedProp({userConfig:i.config,defaultConfig:w})}e.watch(()=>i.config,a=>{t.value=f(),h()},{deep:!0});const B=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?C(i.dataset.rating):i.dataset.rating),N=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),r=e.ref(B.value),m=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function C(a){let n=0,l=0;for(const u in a){const L=parseInt(u),$=a[u];n+=L*$,l+=$}if(l===0)return 0;const v=n/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{h()});function h(){o.objectIsEmpty(i.dataset)&&o.error({componentName:"VueUiRating",type:"dataset"}),y.value=[];for(let a=t.value.from;a<=t.value.to;a+=1)y.value.push(a)}function p(a,n=!1){return a>s.value||c.value?n?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:n?1:t.value.style.star.useGradient?`url(#star_gradient_under_${d.value})`:t.value.style.star.activeColor}function x(a,n=!1){const l=r.value-a,v=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function b(a){c.value||(r.value=a,_("rate",a))}function E(){return r.value}function V(a=!0){c.value=a}return S({getData:E,toggleReadonly:V}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:n[2]||(n[2]=l=>g.value=!0),onMouseleave:n[3]||(n[3]=l=>{g.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",A,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,v)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[m.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(s.value)?t.value.style.image.inactiveOpacity:p(l,!0)}`)},null,12,R)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(o.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,F),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,I)],8,j)]),e.createElementVNode("polygon",{points:e.unref(o.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(s.value)?t.value.style.star.inactiveColor:p(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:s.value?p(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,O)],8,X)),m.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${d.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${x(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,Y)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${x(v)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${d.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(o.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,q),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,H)],8,U)]),e.createElementVNode("polygon",{points:e.unref(o.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${d.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,K)],8,G)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(o.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:u=>b(l),onMouseenter:u=>s.value=l,onMouseleave:n[0]||(n[0]=u=>s.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>b(l),["enter"])},null,40,T)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:u=>s.value=l,onMouseleave:n[1]||(n[1]=u=>s.value=void 0)},null,40,W)):e.createCommentVNode("",!0)],12,P)),t.value.style.tooltip.show&&N.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l)+":",5),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[l],e.unref(o.dataLabel)({v:i.dataset.rating[l],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},Q=D._export_sfc(J,[["__scopeId","data-v-9e1d13d5"]]);exports.default=Q;
@@ -1,6 +1,6 @@
1
1
  import { ref as h, useSlots as T, onMounted as R, computed as x, watch as H, openBlock as a, createElementBlock as o, normalizeStyle as i, createElementVNode as r, toDisplayString as g, createCommentVNode as y, unref as s, Fragment as P, renderList as W, withKeys as q } from "vue";
2
- import { u as J, c as Q, o as Z, e as tt, i as $, f as b, X as k, w as F, V as X } from "./index-3_ulDZ6w.js";
3
- import { u as et } from "./useNestedProp-Bs6ltq3I.js";
2
+ import { u as J, c as Q, o as Z, e as tt, i as $, f as b, X as k, w as F, V as X } from "./index-B3hGeAZ7.js";
3
+ import { u as et } from "./useNestedProp-WWv9scq-.js";
4
4
  import { _ as lt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const at = {
6
6
  key: 0,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-CPtAxuTc.cjs"),Z=require("./useResponsive-BJ7DTGpm.cjs"),Ce=require("./Title-C7y-iI1m.cjs"),ee=require("./usePrinter-BmNhTUGE.cjs"),Be=require("./vue-ui-skeleton-DkZB7ae3.cjs"),te=require("./useNestedProp-BtCZVKOm.cjs"),$e=require("./PackageVersion-CHUMvFGr.cjs"),Pe=require("./PenAndPaper-DmMAK04m.cjs"),_e=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ze=["id"],Oe=["xmlns","viewBox"],Se=["width","height"],Ee=["cx","cy","r","stroke","stroke-width"],Ae={key:1},Ne=["stroke","d","stroke-width"],Ie={style:{"pointer-events":"none"}},Ve=["cx","cy","fill","r","stroke"],Me=["x","y","fill","font-size"],Fe={key:2},Te=["stroke","stroke-width","x1","x2","y1","y2"],Re={style:{"pointer-events":"none"}},je=["cx","cy","fill","r","stroke"],qe=["x","y","fill","font-size"],De=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],Ue=["cx","cy","fill","stroke","onClick","r"],Ge={key:5,class:"vue-data-ui-watermark"},We={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(le,{expose:re}){const y=le;e.useCssVars(t=>({"4beec998":ue.value,15467313:ie.value,e556a096:ce.value}));const{vue_ui_relation_circle:ne}=o.useConfig(),$=e.computed(()=>!!y.dataset&&Object.keys(y.dataset).length),w=e.ref(o.createUid()),E=e.ref(0),x=e.ref(null),A=e.ref(null),N=e.ref(null),I=e.ref(null),V=e.ref(0),r=e.computed({get:()=>T(),set:t=>t}),{userOptionsVisible:P,setUserOptionsVisibility:M,keepUserOptionState:F}=_e.useUserOptionState({config:r.value});function T(){const t=te.useNestedProp({userConfig:y.config,defaultConfig:ne});return t.theme?{...te.useNestedProp({userConfig:o.themes.vue_ui_relation_circle[t.theme]||y.config,defaultConfig:t}),customPalette:o.themePalettes[t.theme]||o.palette}:t}e.watch(()=>y.config,t=>{r.value=T(),P.value=!r.value.showOnChartHover,Y(),V.value+=1},{deep:!0});const{isPrinting:R,isImaging:j,generatePdf:q,generateImage:D}=ee.usePrinter({elementId:`relation_circle_${w.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),oe=e.computed(()=>r.value.userOptions.show&&!r.value.style.title.text),U=e.computed(()=>o.convertCustomPalette(r.value.customPalette)),h=e.ref([]),d=e.ref([]),i=e.ref({}),v=e.ref([]),se=e.ref(0),_=e.computed(()=>y.dataset.slice(0,r.value.style.limit)),k=e.ref(r.value.style.size),f=e.ref(r.value.style.weightLabels.size),G=e.ref(r.value.style.plot.radius),W=e.ref(r.value.style.labels.fontSize),a=e.ref({height:r.value.style.size,width:r.value.style.size}),m=e.computed({get(){return k.value*r.value.style.circle.radiusProportion},set(t){return t}}),ae=e.computed(()=>r.value.style.links.curved),ie=e.computed(()=>`${r.value.style.animation.speedMs}ms`),ue=e.computed(()=>m.value*2),ce=e.computed(()=>m.value*4),b=e.ref(null);e.onMounted(()=>{Y(),document.getElementById(`relation_circle_${w.value}`).addEventListener("click",X)});function Y(){if(o.objectIsEmpty(y.dataset)?o.error({componentName:"VueUiRelationCircle",type:"dataset"}):y.dataset.forEach((t,n)=>{o.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{o.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=Z.throttle(()=>{const{width:n,height:l}=Z.useResponsive({chart:x.value,title:r.value.style.title.text?A.value:null,source:N.value,noTitle:I.value});k.value=Math.min(n,l),a.value.width=n,a.value.height=l,m.value=k.value*r.value.style.circle.radiusProportion,h.value=[],d.value=[],H(),J(),f.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.weightLabels.size,threshold:6,fallback:6}),G.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.plot.radius,threshold:1,fallback:1}),W.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.labels.fontSize,threshold:6,fallback:6})});b.value=new ResizeObserver(t),b.value.observe(x.value.parentNode)}else h.value=[],d.value=[],H(),J()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${w.value}`).removeEventListener("click",X),b.value&&b.value.disconnect()});function X(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(i.value={},v.value=[])}function H(){const t=6.28319/_.value.length,n=360/_.value.length;let l=0,s=0;_.value.forEach((c,u)=>{const O=c.weights.reduce((xe,be)=>xe+be,0),S=m.value*Math.cos(l)+a.value.width/2,we=m.value*Math.sin(l)+a.value.height/2+r.value.style.circle.offsetY;h.value.push({x:S,y:we,...c,color:c.color?c.color:U.value[u]?U.value[u]:o.palette[u],regAngle:s,totalWeight:O}),l+=t,s+=n})}function de(t,n){const l=(t.x+n.x)/2,s=(t.y+n.y)/2;return{x:l,y:s}}function J(){d.value=[],h.value.forEach(t=>{h.value.filter(l=>l.relations.includes(t.id)).forEach((l,s)=>{const c=l.relations.indexOf(t.id);d.value.push({weight:l.weights[c]?l.weights[c]:0,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,midPointLine:de({x:t.x,y:t.y},{x:l.x,y:l.y}),midPointBezier:ve({x1:t.x,x2:l.x,y1:t.y,y2:l.y}),...t})})})}function ve(t){const n={x:t.x1,y:t.y1},l={x:t.x2,y:t.y2},s={x:t.x1,y:t.y1},c={x:a.value.width/2,y:a.value.height/2+r.value.style.circle.offsetY},u=.5,O=Math.pow(1-u,3)*n.x+3*Math.pow(1-u,2)*u*s.x+3*(1-u)*Math.pow(u,2)*c.x+Math.pow(u,3)*l.x,S=Math.pow(1-u,3)*n.y+3*Math.pow(1-u,2)*u*s.y+3*(1-u)*Math.pow(u,2)*c.y+Math.pow(u,3)*l.y;return{x:O,y:S}}const fe=e.computed(()=>Math.max(...d.value.map(t=>t.weight)));function ye(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function g(t){return t.colorSource}function K(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`?`opacity:1;stroke-width:${L(t)}`:"opacity: 0":"opacity: 1"}function p(t){return Object.hasOwn(i.value,"x")?!!(v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`):!1}function ge(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function he(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function me(t){return Object.hasOwn(i.value,"x")?i.value.id===t.id||v.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function ke(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function Q(t){se.value=360-t.regAngle,i.value.id&&t.id===i.value.id?(i.value={},v.value=[]):(i.value=t,v.value=[...t.relations])}function L(t){const n=t.weight/fe.value*r.value.style.links.maxWidth;return Math.max(.3,n)}const C=e.ref(!1);function pe(t){C.value=t,E.value+=1}const B=e.ref(!1);function z(){B.value=!B.value}return re({generatePdf:q,generateImage:D,toggleAnnotator:z}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:x,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${w.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref(M)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(M)(!1))},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe.PenAndPaper,{key:0,parent:x.value,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:B.value,onClose:z},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),oe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:I,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&$.value&&(e.unref(F)||e.unref(P))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(R),isImaging:e.unref(j),uid:w.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:C.value,titles:{...r.value.userOptions.buttonTitles},chartElement:x.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(D),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"2"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:s})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:s})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value},"relation-circle"]),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode($e._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:a.value.width<=0?10:a.value.width,height:a.value.height<=0?10:a.value.height,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,Se)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:(a.value.width<=0?1e-4:a.value.width)/2,cy:(a.value.height<=0?1e-4:a.value.height)/2+r.value.style.circle.offsetY,r:m.value<=0?1e-4:m.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,Ee),ae.value?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${s}`,style:e.normalizeStyle(K(l)),stroke:g(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${a.value.width/2},${a.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":L(l),"stroke-linecap":"round"},null,14,Ne))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",Ie,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key:0},{x:l.midPointBezier.x,y:l.midPointBezier.y,color:g(l),weight:l.weight,fontSize:f.value})),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointBezier.x,cy:l.midPointBezier.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Ve)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointBezier.x,y:l.midPointBezier.y+f.value/3,fill:e.unref(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Me)):e.createCommentVNode("",!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${s}`,stroke:g(l),"stroke-width":L(l),style:e.normalizeStyle(K(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}),"stroke-linecap":"round"},null,14,Te))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",Re,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key:0},{x:l.midPointLine.x,y:l.midPointLine.y,color:g(l),weight:l.weight,fontSize:f.value})),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointLine.x,cy:l.midPointLine.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,je)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointLine.x,y:l.midPointLine.y+f.value/3,fill:e.unref(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,qe)):e.createCommentVNode("",!0)]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${s}`,"text-anchor":ge(l),transform:ke(l),x:he(l),y:l.y+5,onClick:c=>Q(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":i.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${me(l)}`),"font-size":W.value,fill:r.value.style.labels.color},e.toDisplayString(l.label)+" ("+e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.totalWeight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.totalWeight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l}))+") ",13,De))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${s}`,style:e.normalizeStyle(ye(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.useSerieColor?l.color:r.value.style.plot.color,stroke:r.value.style.backgroundColor,"stroke-width":"1",onClick:c=>Q(l),r:G.value},null,12,Ue))),128)),e.renderSlot(t.$slots,"svg",{svg:a.value},void 0,!0)],10,Oe)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(R)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:N,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Be.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],44,ze))}},Ye=Le._export_sfc(We,[["__scopeId","data-v-d95c92fd"]]);exports.default=Ye;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-DsNY1SpD.cjs"),Z=require("./useResponsive-BJ7DTGpm.cjs"),Ce=require("./Title-CLw400_T.cjs"),ee=require("./usePrinter-BS5qzASr.cjs"),Be=require("./vue-ui-skeleton-BKT91qEa.cjs"),te=require("./useNestedProp-B4YewnHE.cjs"),$e=require("./PackageVersion-ou96yRPl.cjs"),Pe=require("./PenAndPaper-BWwAIhEN.cjs"),_e=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ze=["id"],Oe=["xmlns","viewBox"],Se=["width","height"],Ee=["cx","cy","r","stroke","stroke-width"],Ae={key:1},Ne=["stroke","d","stroke-width"],Ie={style:{"pointer-events":"none"}},Ve=["cx","cy","fill","r","stroke"],Me=["x","y","fill","font-size"],Fe={key:2},Te=["stroke","stroke-width","x1","x2","y1","y2"],Re={style:{"pointer-events":"none"}},je=["cx","cy","fill","r","stroke"],qe=["x","y","fill","font-size"],De=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],Ue=["cx","cy","fill","stroke","onClick","r"],Ge={key:5,class:"vue-data-ui-watermark"},We={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(le,{expose:re}){const y=le;e.useCssVars(t=>({"4beec998":ue.value,15467313:ie.value,e556a096:ce.value}));const{vue_ui_relation_circle:ne}=o.useConfig(),$=e.computed(()=>!!y.dataset&&Object.keys(y.dataset).length),w=e.ref(o.createUid()),E=e.ref(0),x=e.ref(null),A=e.ref(null),N=e.ref(null),I=e.ref(null),V=e.ref(0),r=e.computed({get:()=>T(),set:t=>t}),{userOptionsVisible:P,setUserOptionsVisibility:M,keepUserOptionState:F}=_e.useUserOptionState({config:r.value});function T(){const t=te.useNestedProp({userConfig:y.config,defaultConfig:ne});return t.theme?{...te.useNestedProp({userConfig:o.themes.vue_ui_relation_circle[t.theme]||y.config,defaultConfig:t}),customPalette:o.themePalettes[t.theme]||o.palette}:t}e.watch(()=>y.config,t=>{r.value=T(),P.value=!r.value.showOnChartHover,Y(),V.value+=1},{deep:!0});const{isPrinting:R,isImaging:j,generatePdf:q,generateImage:D}=ee.usePrinter({elementId:`relation_circle_${w.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),oe=e.computed(()=>r.value.userOptions.show&&!r.value.style.title.text),U=e.computed(()=>o.convertCustomPalette(r.value.customPalette)),h=e.ref([]),d=e.ref([]),i=e.ref({}),v=e.ref([]),se=e.ref(0),_=e.computed(()=>y.dataset.slice(0,r.value.style.limit)),k=e.ref(r.value.style.size),f=e.ref(r.value.style.weightLabels.size),G=e.ref(r.value.style.plot.radius),W=e.ref(r.value.style.labels.fontSize),a=e.ref({height:r.value.style.size,width:r.value.style.size}),m=e.computed({get(){return k.value*r.value.style.circle.radiusProportion},set(t){return t}}),ae=e.computed(()=>r.value.style.links.curved),ie=e.computed(()=>`${r.value.style.animation.speedMs}ms`),ue=e.computed(()=>m.value*2),ce=e.computed(()=>m.value*4),b=e.ref(null);e.onMounted(()=>{Y(),document.getElementById(`relation_circle_${w.value}`).addEventListener("click",X)});function Y(){if(o.objectIsEmpty(y.dataset)?o.error({componentName:"VueUiRelationCircle",type:"dataset"}):y.dataset.forEach((t,n)=>{o.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{o.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=Z.throttle(()=>{const{width:n,height:l}=Z.useResponsive({chart:x.value,title:r.value.style.title.text?A.value:null,source:N.value,noTitle:I.value});k.value=Math.min(n,l),a.value.width=n,a.value.height=l,m.value=k.value*r.value.style.circle.radiusProportion,h.value=[],d.value=[],H(),J(),f.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.weightLabels.size,threshold:6,fallback:6}),G.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.plot.radius,threshold:1,fallback:1}),W.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.labels.fontSize,threshold:6,fallback:6})});b.value=new ResizeObserver(t),b.value.observe(x.value.parentNode)}else h.value=[],d.value=[],H(),J()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${w.value}`).removeEventListener("click",X),b.value&&b.value.disconnect()});function X(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(i.value={},v.value=[])}function H(){const t=6.28319/_.value.length,n=360/_.value.length;let l=0,s=0;_.value.forEach((c,u)=>{const O=c.weights.reduce((xe,be)=>xe+be,0),S=m.value*Math.cos(l)+a.value.width/2,we=m.value*Math.sin(l)+a.value.height/2+r.value.style.circle.offsetY;h.value.push({x:S,y:we,...c,color:c.color?c.color:U.value[u]?U.value[u]:o.palette[u],regAngle:s,totalWeight:O}),l+=t,s+=n})}function de(t,n){const l=(t.x+n.x)/2,s=(t.y+n.y)/2;return{x:l,y:s}}function J(){d.value=[],h.value.forEach(t=>{h.value.filter(l=>l.relations.includes(t.id)).forEach((l,s)=>{const c=l.relations.indexOf(t.id);d.value.push({weight:l.weights[c]?l.weights[c]:0,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,midPointLine:de({x:t.x,y:t.y},{x:l.x,y:l.y}),midPointBezier:ve({x1:t.x,x2:l.x,y1:t.y,y2:l.y}),...t})})})}function ve(t){const n={x:t.x1,y:t.y1},l={x:t.x2,y:t.y2},s={x:t.x1,y:t.y1},c={x:a.value.width/2,y:a.value.height/2+r.value.style.circle.offsetY},u=.5,O=Math.pow(1-u,3)*n.x+3*Math.pow(1-u,2)*u*s.x+3*(1-u)*Math.pow(u,2)*c.x+Math.pow(u,3)*l.x,S=Math.pow(1-u,3)*n.y+3*Math.pow(1-u,2)*u*s.y+3*(1-u)*Math.pow(u,2)*c.y+Math.pow(u,3)*l.y;return{x:O,y:S}}const fe=e.computed(()=>Math.max(...d.value.map(t=>t.weight)));function ye(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function g(t){return t.colorSource}function K(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`?`opacity:1;stroke-width:${L(t)}`:"opacity: 0":"opacity: 1"}function p(t){return Object.hasOwn(i.value,"x")?!!(v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`):!1}function ge(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function he(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function me(t){return Object.hasOwn(i.value,"x")?i.value.id===t.id||v.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function ke(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function Q(t){se.value=360-t.regAngle,i.value.id&&t.id===i.value.id?(i.value={},v.value=[]):(i.value=t,v.value=[...t.relations])}function L(t){const n=t.weight/fe.value*r.value.style.links.maxWidth;return Math.max(.3,n)}const C=e.ref(!1);function pe(t){C.value=t,E.value+=1}const B=e.ref(!1);function z(){B.value=!B.value}return re({generatePdf:q,generateImage:D,toggleAnnotator:z}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:x,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${w.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref(M)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(M)(!1))},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe.PenAndPaper,{key:0,parent:x.value,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:B.value,onClose:z},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),oe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:I,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&$.value&&(e.unref(F)||e.unref(P))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(R),isImaging:e.unref(j),uid:w.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:C.value,titles:{...r.value.userOptions.buttonTitles},chartElement:x.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(D),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"2"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:s})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:s})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value},"relation-circle"]),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode($e._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:a.value.width<=0?10:a.value.width,height:a.value.height<=0?10:a.value.height,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,Se)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:(a.value.width<=0?1e-4:a.value.width)/2,cy:(a.value.height<=0?1e-4:a.value.height)/2+r.value.style.circle.offsetY,r:m.value<=0?1e-4:m.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,Ee),ae.value?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${s}`,style:e.normalizeStyle(K(l)),stroke:g(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${a.value.width/2},${a.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":L(l),"stroke-linecap":"round"},null,14,Ne))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",Ie,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key:0},{x:l.midPointBezier.x,y:l.midPointBezier.y,color:g(l),weight:l.weight,fontSize:f.value})),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointBezier.x,cy:l.midPointBezier.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Ve)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointBezier.x,y:l.midPointBezier.y+f.value/3,fill:e.unref(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Me)):e.createCommentVNode("",!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${s}`,stroke:g(l),"stroke-width":L(l),style:e.normalizeStyle(K(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}),"stroke-linecap":"round"},null,14,Te))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",Re,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key:0},{x:l.midPointLine.x,y:l.midPointLine.y,color:g(l),weight:l.weight,fontSize:f.value})),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointLine.x,cy:l.midPointLine.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,je)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointLine.x,y:l.midPointLine.y+f.value/3,fill:e.unref(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,qe)):e.createCommentVNode("",!0)]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${s}`,"text-anchor":ge(l),transform:ke(l),x:he(l),y:l.y+5,onClick:c=>Q(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":i.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${me(l)}`),"font-size":W.value,fill:r.value.style.labels.color},e.toDisplayString(l.label)+" ("+e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.totalWeight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.totalWeight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l}))+") ",13,De))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${s}`,style:e.normalizeStyle(ye(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.useSerieColor?l.color:r.value.style.plot.color,stroke:r.value.style.backgroundColor,"stroke-width":"1",onClick:c=>Q(l),r:G.value},null,12,Ue))),128)),e.renderSlot(t.$slots,"svg",{svg:a.value},void 0,!0)],10,Oe)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(R)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:N,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Be.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],44,ze))}},Ye=Le._export_sfc(We,[["__scopeId","data-v-d95c92fd"]]);exports.default=Ye;
@@ -1,12 +1,12 @@
1
1
  import { useCssVars as Ge, computed as f, ref as o, watch as Ve, onMounted as We, onBeforeUnmount as De, openBlock as i, createElementBlock as a, normalizeStyle as C, unref as u, createBlock as F, createCommentVNode as v, createSlots as Xe, withCtx as B, renderSlot as h, normalizeProps as A, guardReactiveProps as W, normalizeClass as D, createVNode as Ye, createElementVNode as qe, Fragment as P, renderList as L, mergeProps as ge, toDisplayString as E } from "vue";
2
- import { u as He, c as Je, t as Ke, a as Qe, p as me, b as Ze, o as et, e as ke, g as tt, X as lt, G as pe, i as X, f as Y, F as q } from "./index-3_ulDZ6w.js";
2
+ import { u as He, c as Je, t as Ke, a as Qe, p as me, b as Ze, o as et, e as ke, g as tt, X as lt, G as pe, i as X, f as Y, F as q } from "./index-B3hGeAZ7.js";
3
3
  import { t as st, u as it } from "./useResponsive-CoxXLe23.js";
4
- import { _ as at } from "./Title-L52l_KMR.js";
5
- import { u as nt, U as rt } from "./usePrinter-NdwnpHUu.js";
6
- import ut from "./vue-ui-skeleton-uAX1ZH1F.js";
7
- import { u as we } from "./useNestedProp-Bs6ltq3I.js";
8
- import { _ as ot } from "./PackageVersion-m6HC0skh.js";
9
- import { P as ct } from "./PenAndPaper-FOhKSug_.js";
4
+ import { _ as at } from "./Title-CujJ2kZY.js";
5
+ import { u as nt, U as rt } from "./usePrinter-CiUt-pS9.js";
6
+ import ut from "./vue-ui-skeleton-BAv7fXp9.js";
7
+ import { u as we } from "./useNestedProp-WWv9scq-.js";
8
+ import { _ as ot } from "./PackageVersion-B51w3y82.js";
9
+ import { P as ct } from "./PenAndPaper-BSEqDrpB.js";
10
10
  import { u as dt } from "./useUserOptionState-BIvW1Kz7.js";
11
11
  import { _ as vt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  const yt = ["id"], ft = ["xmlns", "viewBox"], ht = ["width", "height"], gt = ["cx", "cy", "r", "stroke", "stroke-width"], mt = { key: 1 }, kt = ["stroke", "d", "stroke-width"], pt = { style: { "pointer-events": "none" } }, wt = ["cx", "cy", "fill", "r", "stroke"], xt = ["x", "y", "fill", "font-size"], bt = { key: 2 }, $t = ["stroke", "stroke-width", "x1", "x2", "y1", "y2"], _t = { style: { "pointer-events": "none" } }, Ct = ["cx", "cy", "fill", "r", "stroke"], Pt = ["x", "y", "fill", "font-size"], Lt = ["text-anchor", "transform", "x", "y", "onClick", "font-weight", "font-size", "fill"], Ot = ["cx", "cy", "fill", "stroke", "onClick", "r"], zt = {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-CPtAxuTc.cjs"),le=require("./useResponsive-BJ7DTGpm.cjs"),be=require("./Title-C7y-iI1m.cjs"),oe=require("./usePrinter-BmNhTUGE.cjs"),ke=require("./Tooltip-Y622sV6l.cjs"),Ce=require("./DataTable-Dng-zRfh.cjs"),we=require("./Legend-kMbr5DZt.cjs"),$e=require("./vue-ui-skeleton-DkZB7ae3.cjs"),xe=require("./vue-ui-accordion-Dd0mfQys.cjs"),ae=require("./useNestedProp-BtCZVKOm.cjs"),Ne=require("./PackageVersion-CHUMvFGr.cjs"),Te=require("./PenAndPaper-DmMAK04m.cjs"),Se=require("./useUserOptionState-BgepsfED.cjs"),Be=require("./Shape-Ajzs1V3O.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Pe=["id"],Ve=["xmlns","viewBox"],Le=["width","height"],Ee=["id"],Oe=["stop-color"],Ie=["stop-color"],ze={key:1},Ae=["stroke","cx","cy","r","fill"],Fe=["stroke","stroke-width","cx","cy","r","fill"],Re=["stroke","stroke-width","cx","cy","r","fill"],qe=["cx","cy","r","onMouseenter"],Me={key:5,class:"vue-data-ui-watermark"},Ue=["onClick"],De={key:0},We={key:1},He=["innerHTML"],Ge={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(re,{expose:ne,emit:se}){const p=re,{vue_ui_rings:ue}=n.useConfig(),ie=e.useSlots(),b=e.ref(!1),$=e.computed(()=>!!p.dataset&&p.dataset.length),f=e.ref(n.createUid()),ce=e.ref(null),x=e.ref(!1),_=e.ref(""),g=e.ref(null),O=e.ref(0),k=e.ref(null),I=e.ref(null),z=e.ref(null),A=e.ref(null),F=e.ref(null),R=e.ref(0),q=e.ref(0),M=e.ref(0),t=e.computed({get:()=>W(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:U,keepUserOptionState:D}=Se.useUserOptionState({config:t.value});function W(){const l=ae.useNestedProp({userConfig:p.config,defaultConfig:ue});return l.theme?{...ae.useNestedProp({userConfig:n.themes.vue_ui_rings[l.theme]||p.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}e.watch(()=>p.config,l=>{t.value=W(),P.value=!t.value.showOnChartHover,H(),R.value+=1,q.value+=1,M.value+=1},{deep:!0});const N=e.ref(null);e.onMounted(()=>{H()});function H(){if(n.objectIsEmpty(p.dataset)?n.error({componentName:"VueUiRings",type:"dataset"}):p.dataset.forEach((l,a)=>{l.values.length||n.error({componentName:"VueUiRings",type:"dataset"}),n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{n.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:o,index:a})})}),t.value.responsive){const l=le.throttle(()=>{const{width:a,height:o}=le.useResponsive({chart:k.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?z.value:null,source:A.value,noTitle:F.value});s.value.width=a,s.value.height=o});N.value=new ResizeObserver(l),N.value.observe(k.value.parentNode)}setTimeout(()=>{b.value=!0},600)}e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:G,isImaging:j,generatePdf:X,generateImage:Y}=oe.usePrinter({elementId:`rings_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings"}),de=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),J=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),m=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),ve=e.computed(()=>Math.min(s.value.height,s.value.width)),d=e.ref([]);function V(l){d.value.includes(l)?d.value=d.value.filter(a=>a!==l):d.value.push(l),se("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const pe=e.computed(()=>Math.max(...T.value.filter(l=>!d.value.includes(l.uid)).map(({value:l})=>l)));function K(l){return l/pe.value}const T=e.computed(()=>p.dataset.map(({values:l,name:a,color:o=null},r)=>{const u=n.sanitizeArray(l).reduce((v,w)=>v+w,0);return{name:a,color:o||n.convertColorToHex(o)||J.value[r]||n.palette[r]||n.palette[r%n.palette.length],value:u,proportion:u/p.dataset.map(v=>(v.values||[]).reduce((w,ye)=>w+ye,0)).reduce((v,w)=>v+w,0),uid:n.createUid(),absoluteIndex:r}})),Q=e.computed(()=>T.value.map(l=>({...l,shape:"circle",opacity:d.value.includes(l.uid)?.5:1,segregate:()=>V(l.uid),isSegregated:d.value.includes(l.uid)})).toSorted((l,a)=>a.value-l.value)),he=e.computed(()=>({cy:"rings-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),h=e.computed(()=>T.value.filter(l=>!d.value.includes(l.uid)).map(({value:l})=>l).reduce((l,a)=>l+a,0)),c=e.computed(()=>T.value.filter(l=>!d.value.includes(l.uid)).map(({name:l,value:a,color:o=null,uid:r,absoluteIndex:u},v)=>({absoluteIndex:u,uid:r,name:l,color:o||n.convertColorToHex(o)||J.value[v]||n.palette[v]||n.palette[v%n.palette.length],value:a,proportion:K(a),percentage:a/h.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*K(a)})).toSorted((l,a)=>a.value-l.value));function fe(){return c.value.map(({name:l,color:a,value:o,absoluteValues:r,percentage:u})=>({name:l,color:a,value:o,absoluteValues:r,percentage:u}))}const i=e.computed(()=>ve.value-t.value.style.chart.layout.rings.strokeWidth*2),L=e.ref(null);function ge(l,a){if(d.value.length===p.dataset.length)return;L.value={datapoint:a,seriesIndex:l,series:c.value,config:t.value},g.value=l;const o=c.value[l],r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:l,datapoint:a,series:c.value,config:t.value})))_.value=r({seriesIndex:l,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${o.color}" />${ie.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${f.value}_${a.absoluteIndex})" />`:""}</svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:l})}
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DsNY1SpD.cjs"),le=require("./useResponsive-BJ7DTGpm.cjs"),be=require("./Title-CLw400_T.cjs"),oe=require("./usePrinter-BS5qzASr.cjs"),ke=require("./Tooltip-BGjOAkJQ.cjs"),Ce=require("./DataTable-D8n9mxYD.cjs"),we=require("./Legend-yTCeOn97.cjs"),$e=require("./vue-ui-skeleton-BKT91qEa.cjs"),xe=require("./vue-ui-accordion-BAP0rDBZ.cjs"),ae=require("./useNestedProp-B4YewnHE.cjs"),Ne=require("./PackageVersion-ou96yRPl.cjs"),Te=require("./PenAndPaper-BWwAIhEN.cjs"),Se=require("./useUserOptionState-BgepsfED.cjs"),Be=require("./Shape-BQHHOWfV.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Pe=["id"],Ve=["xmlns","viewBox"],Le=["width","height"],Ee=["id"],Oe=["stop-color"],Ie=["stop-color"],ze={key:1},Ae=["stroke","cx","cy","r","fill"],Fe=["stroke","stroke-width","cx","cy","r","fill"],Re=["stroke","stroke-width","cx","cy","r","fill"],qe=["cx","cy","r","onMouseenter"],Me={key:5,class:"vue-data-ui-watermark"},Ue=["onClick"],De={key:0},We={key:1},He=["innerHTML"],Ge={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(re,{expose:ne,emit:se}){const p=re,{vue_ui_rings:ue}=n.useConfig(),ie=e.useSlots(),b=e.ref(!1),$=e.computed(()=>!!p.dataset&&p.dataset.length),f=e.ref(n.createUid()),ce=e.ref(null),x=e.ref(!1),_=e.ref(""),g=e.ref(null),O=e.ref(0),k=e.ref(null),I=e.ref(null),z=e.ref(null),A=e.ref(null),F=e.ref(null),R=e.ref(0),q=e.ref(0),M=e.ref(0),t=e.computed({get:()=>W(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:U,keepUserOptionState:D}=Se.useUserOptionState({config:t.value});function W(){const l=ae.useNestedProp({userConfig:p.config,defaultConfig:ue});return l.theme?{...ae.useNestedProp({userConfig:n.themes.vue_ui_rings[l.theme]||p.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}e.watch(()=>p.config,l=>{t.value=W(),P.value=!t.value.showOnChartHover,H(),R.value+=1,q.value+=1,M.value+=1},{deep:!0});const N=e.ref(null);e.onMounted(()=>{H()});function H(){if(n.objectIsEmpty(p.dataset)?n.error({componentName:"VueUiRings",type:"dataset"}):p.dataset.forEach((l,a)=>{l.values.length||n.error({componentName:"VueUiRings",type:"dataset"}),n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{n.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:o,index:a})})}),t.value.responsive){const l=le.throttle(()=>{const{width:a,height:o}=le.useResponsive({chart:k.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?z.value:null,source:A.value,noTitle:F.value});s.value.width=a,s.value.height=o});N.value=new ResizeObserver(l),N.value.observe(k.value.parentNode)}setTimeout(()=>{b.value=!0},600)}e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:G,isImaging:j,generatePdf:X,generateImage:Y}=oe.usePrinter({elementId:`rings_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings"}),de=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),J=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),m=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),ve=e.computed(()=>Math.min(s.value.height,s.value.width)),d=e.ref([]);function V(l){d.value.includes(l)?d.value=d.value.filter(a=>a!==l):d.value.push(l),se("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const pe=e.computed(()=>Math.max(...T.value.filter(l=>!d.value.includes(l.uid)).map(({value:l})=>l)));function K(l){return l/pe.value}const T=e.computed(()=>p.dataset.map(({values:l,name:a,color:o=null},r)=>{const u=n.sanitizeArray(l).reduce((v,w)=>v+w,0);return{name:a,color:o||n.convertColorToHex(o)||J.value[r]||n.palette[r]||n.palette[r%n.palette.length],value:u,proportion:u/p.dataset.map(v=>(v.values||[]).reduce((w,ye)=>w+ye,0)).reduce((v,w)=>v+w,0),uid:n.createUid(),absoluteIndex:r}})),Q=e.computed(()=>T.value.map(l=>({...l,shape:"circle",opacity:d.value.includes(l.uid)?.5:1,segregate:()=>V(l.uid),isSegregated:d.value.includes(l.uid)})).toSorted((l,a)=>a.value-l.value)),he=e.computed(()=>({cy:"rings-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),h=e.computed(()=>T.value.filter(l=>!d.value.includes(l.uid)).map(({value:l})=>l).reduce((l,a)=>l+a,0)),c=e.computed(()=>T.value.filter(l=>!d.value.includes(l.uid)).map(({name:l,value:a,color:o=null,uid:r,absoluteIndex:u},v)=>({absoluteIndex:u,uid:r,name:l,color:o||n.convertColorToHex(o)||J.value[v]||n.palette[v]||n.palette[v%n.palette.length],value:a,proportion:K(a),percentage:a/h.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*K(a)})).toSorted((l,a)=>a.value-l.value));function fe(){return c.value.map(({name:l,color:a,value:o,absoluteValues:r,percentage:u})=>({name:l,color:a,value:o,absoluteValues:r,percentage:u}))}const i=e.computed(()=>ve.value-t.value.style.chart.layout.rings.strokeWidth*2),L=e.ref(null);function ge(l,a){if(d.value.length===p.dataset.length)return;L.value={datapoint:a,seriesIndex:l,series:c.value,config:t.value},g.value=l;const o=c.value[l],r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:l,datapoint:a,series:c.value,config:t.value})))_.value=r({seriesIndex:l,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${o.color}" />${ie.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${f.value}_${a.absoluteIndex})" />`:""}</svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:l})}
2
2
  </b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${n.dataLabel({v:o.value/h.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${n.dataLabel({v:o.value/h.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),_.value=u}x.value=!0}const y=e.computed(()=>{const l=c.value.map(o=>({name:o.name,color:o.color})),a=c.value.map(o=>o.value);return{head:l,body:a}}),S=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=y.value.head.map((u,v)=>[{color:u.color,name:u.name},n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:y.value.body[v],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(y.value.body[v]/h.value)?"-":(y.value.body[v]/h.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},r=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:r}});function Z(){e.nextTick(()=>{const l=y.value.head.map((r,u)=>[[r.name],[y.value.body[u]],[isNaN(y.value.body[u]/h.value)?"-":y.value.body[u]/h.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=n.createCsvContent(a);n.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-rings"})})}const C=e.ref(!1);function me(l){C.value=l,O.value+=1}function ee(){m.value.showTable=!m.value.showTable}function te(){m.value.showTooltip=!m.value.showTooltip}const B=e.ref(!1);function E(){B.value=!B.value}return ne({getData:fe,generatePdf:X,generateCsv:Z,generateImage:Y,toggleTable:ee,toggleTooltip:te,toggleAnnotator:E}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ringsChart",ref:k,class:e.normalizeClass(`vue-ui-rings ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;width:100%;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),id:`rings_${f.value}`,onMouseleave:a[3]||(a[3]=o=>{g.value=null,x.value=!1,e.unref(U)(!1)}),onMouseenter:a[4]||(a[4]=()=>e.unref(U)(!0))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Te.PenAndPaper,{key:0,parent:k.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:E},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),de.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:F,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:I,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(be._sfc_main,{key:`title_${R.value}`,config:{title:{cy:"rings-div-title",...t.value.style.chart.title},subtitle:{cy:"rings-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(D)||e.unref(P))?(e.openBlock(),e.createBlock(oe.UserOptions,{ref_key:"details",ref:ce,key:`user_options_${O.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(G),isImaging:e.unref(j),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,isTooltip:m.value.showTooltip,isFullscreen:C.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:me,onGeneratePdf:e.unref(X),onGenerateCsv:Z,onGenerateImage:e.unref(Y),onToggleTable:ee,onToggleTooltip:te,onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(D)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ne._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:s.value.width<=0?10:s.value.width,height:s.value.height<=0?10:s.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Le)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(o.color,.05),100-t.value.style.chart.layout.rings.gradient.intensity)},null,8,Oe),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,Ie)],8,Ee))),256))]),l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,o=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(l.$slots,"pattern",e.normalizeProps(e.guardReactiveProps({seriesIndex:o.absoluteIndex,patternId:`pattern_${f.value}_${o.absoluteIndex}`})),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":b.value&&t.value.useCssAnimation,"vue-rings-item-onload":!b.value&&t.value.useCssAnimation,"vue-ui-rings-opacity":g.value!==null&&g.value!==r}),style:e.normalizeStyle(`animation-delay:${r*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+i.value*c.value[0].proportion/2-i.value*o.proportion/2-2*(r+1),r:e.unref(n.checkNaN)(i.value*o.proportion/2*.9<=0?1e-4:i.value*o.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.underlayerColor},null,14,Ae),e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":b.value&&t.value.useCssAnimation,"vue-rings-item-onload":!b.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":g.value!==null&&g.value!==r}),style:e.normalizeStyle(`animation-delay:${r*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":o.strokeWidth<.5?.5:o.strokeWidth,cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+i.value*c.value[0].proportion/2-i.value*o.proportion/2-2*(r+1),r:e.unref(n.checkNaN)(i.value*o.proportion/2*.9<=0?1e-4:i.value*o.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.show?`url(#gradient_${f.value}_${r})`:o.color},null,14,Fe),l.$slots.pattern?(e.openBlock(),e.createElementBlock("circle",{key:0,class:e.normalizeClass({"vue-ui-rings-item":b.value&&t.value.useCssAnimation,"vue-rings-item-onload":!b.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":g.value!==null&&g.value!==r}),style:e.normalizeStyle(`animation-delay:${r*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":o.strokeWidth<.5?.5:o.strokeWidth,cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+i.value*c.value[0].proportion/2-i.value*o.proportion/2-2*(r+1),r:e.unref(n.checkNaN)(i.value*o.proportion/2*.9<=0?1e-4:i.value*o.proportion/2*.9),fill:`url(#pattern_${f.value}_${o.absoluteIndex})`},null,14,Re)):e.createCommentVNode("",!0),e.createElementVNode("circle",{"data-cy-trap":"",stroke:"none",cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+i.value*c.value[0].proportion/2-i.value*o.proportion/2-2*(r+1),r:e.unref(n.checkNaN)(i.value*o.proportion/2*.9<=0?1e-4:i.value*o.proportion/2*.9),fill:"transparent",onMouseenter:u=>ge(r,o),onMouseleave:a[0]||(a[0]=u=>{g.value=null,x.value=!1})},null,40,qe)]))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,Ve)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(G)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.default,{key:6,config:{type:"rings",style:{backgroundColor:t.value.style.chart.backgroundColor,rings:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:`legend_${M.value}`,legendSet:Q.value,config:he.value,onClickMarker:a[1]||(a[1]=({legend:o})=>V(o.uid))},e.createSlots({item:e.withCtx(({legend:o,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>V(o.uid),style:e.normalizeStyle(`opacity:${d.value.includes(o.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:r}))+" ",1),d.value.includes(o.uid)?(e.openBlock(),e.createElementBlock("span",We," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",De," ("+e.toDisplayString(isNaN(o.value/h.value)?"-":e.unref(n.dataLabel)({v:o.value/h.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ue)]),_:2},[l.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:o,index:r})=>[e.createVNode(Be._sfc_main,{shape:o.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${f.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:Q.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:A,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ke._sfc_main,{show:m.value.showTooltip&&x.value&&d.value.length<p.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:_.value,isFullscreen:C.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({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),$.value?(e.openBlock(),e.createBlock(xe.default,{key:8,hideDetails:"",config:{open:m.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ce.DataTable,{key:`table_${q.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>m.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,He)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Pe))}},je=_e._export_sfc(Ge,[["__scopeId","data-v-966f63d3"]]);exports.default=je;
@@ -1,18 +1,18 @@
1
1
  import { useSlots as De, ref as r, computed as h, watch as Ee, onMounted as Ge, onBeforeUnmount as He, openBlock as n, createElementBlock as v, normalizeClass as V, normalizeStyle as N, unref as i, createBlock as O, createCommentVNode as m, createSlots as $e, withCtx as g, renderSlot as p, normalizeProps as L, guardReactiveProps as F, createVNode as J, createElementVNode as w, Fragment as K, renderList as Q, createTextVNode as we, toDisplayString as E, nextTick as je } from "vue";
2
- import { u as Xe, c as _e, t as Ye, a as qe, p as I, o as Je, e as Z, g as Ke, b as Qe, J as Ze, d as Te, f as P, X as et, s as tt, w as lt, v as G, i as xe, x as ot, y as at, q as st, r as nt } from "./index-3_ulDZ6w.js";
2
+ import { u as Xe, c as _e, t as Ye, a as qe, p as I, o as Je, e as Z, g as Ke, b as Qe, J as Ze, d as Te, f as P, X as et, s as tt, w as lt, v as G, i as xe, x as ot, y as at, q as st, r as nt } from "./index-B3hGeAZ7.js";
3
3
  import { t as ut, u as rt } from "./useResponsive-CoxXLe23.js";
4
- import { _ as it } from "./Title-L52l_KMR.js";
5
- import { u as vt, U as ct } from "./usePrinter-NdwnpHUu.js";
6
- import { _ as dt } from "./Tooltip-FYp9ljnj.js";
7
- import { D as pt } from "./DataTable-CNH8bChE.js";
8
- import { L as ht } from "./Legend-kF7sC1KK.js";
9
- import gt from "./vue-ui-skeleton-uAX1ZH1F.js";
10
- import ft from "./vue-ui-accordion-DXlXtAML.js";
11
- import { u as Ne } from "./useNestedProp-Bs6ltq3I.js";
12
- import { _ as yt } from "./PackageVersion-m6HC0skh.js";
13
- import { P as mt } from "./PenAndPaper-FOhKSug_.js";
4
+ import { _ as it } from "./Title-CujJ2kZY.js";
5
+ import { u as vt, U as ct } from "./usePrinter-CiUt-pS9.js";
6
+ import { _ as dt } from "./Tooltip-CPxoXFKu.js";
7
+ import { D as pt } from "./DataTable-B1FxJofv.js";
8
+ import { L as ht } from "./Legend-BMPqVkBW.js";
9
+ import gt from "./vue-ui-skeleton-BAv7fXp9.js";
10
+ import ft from "./vue-ui-accordion-DFn61GBf.js";
11
+ import { u as Ne } from "./useNestedProp-WWv9scq-.js";
12
+ import { _ as yt } from "./PackageVersion-B51w3y82.js";
13
+ import { P as mt } from "./PenAndPaper-BSEqDrpB.js";
14
14
  import { u as bt } from "./useUserOptionState-BIvW1Kz7.js";
15
- import { _ as kt } from "./Shape-CfcWXI5g.js";
15
+ import { _ as kt } from "./Shape-TWPk_v-7.js";
16
16
  import { _ as Ct } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
17
  const $t = ["id"], wt = ["xmlns", "viewBox"], _t = ["width", "height"], Tt = ["id"], xt = ["stop-color"], Nt = ["stop-color"], Ot = { key: 1 }, It = ["stroke", "cx", "cy", "r", "fill"], Pt = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], St = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], At = ["cx", "cy", "r", "onMouseenter"], Lt = {
18
18
  key: 5,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CPtAxuTc.cjs"),we=require("./useResponsive-BJ7DTGpm.cjs"),Te=require("./Title-C7y-iI1m.cjs"),Be=require("./usePrinter-BmNhTUGE.cjs"),Pe=require("./Tooltip-Y622sV6l.cjs"),De=require("./Legend-kMbr5DZt.cjs"),_e=require("./Shape-Ajzs1V3O.cjs"),Oe=require("./DataTable-Dng-zRfh.cjs"),Fe=require("./vue-ui-skeleton-DkZB7ae3.cjs"),We=require("./vue-ui-accordion-Dd0mfQys.cjs"),Ce=require("./useNestedProp-BtCZVKOm.cjs"),qe=require("./PackageVersion-CHUMvFGr.cjs"),Ie=require("./PenAndPaper-DmMAK04m.cjs"),Xe=require("./useUserOptionState-BgepsfED.cjs"),Ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),je=["id"],Re=["xmlns","viewBox"],Ue=["width","height"],Ge={key:1},He=["x1","x2","y1","y2","stroke","stroke-width"],Je=["x1","x2","y1","y2","stroke","stroke-width"],Ke={key:2},Qe=["points","fill","stroke-width","stroke-dasharray","stroke"],Ze={key:0},et=["cx","cy","r","fill","stroke","stroke-width","onMouseover"],tt={key:1},lt={key:3},at=["id"],ot=["stop-color"],st=["stop-color"],rt=["id"],nt=["stop-color"],ut=["stop-color"],it=["x","y","width","height","fill","stroke","stroke-width","rx"],ct=["x","y","height","width","fill","stroke","stroke-width","rx"],yt={key:0},vt=["d","stroke","stroke-width"],dt=["d","stroke","stroke-width"],pt=["d","stroke","stroke-width"],ht=["d","stroke","stroke-width"],ft={key:4,style:{"pointer-events":"none !important"}},mt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],gt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],kt=["x","y","font-size","fill","font-weight","text-anchor"],xt=["x","y","font-size","fill","font-weight"],bt=["cx","cy","r","fill","stroke","stroke-width"],wt=["cx","cy","r","fill","stroke","stroke-width"],Bt=["x","y","font-size","fill","font-weight","text-anchor"],_t={key:5},Ct=["x","y","font-size","fill"],Nt=["x","y","font-size","fill"],St=["id","transform","font-size","font-weight","fill"],Mt={key:6},$t=["x","y","font-size","fill"],Et=["x","y","font-size","fill"],Lt=["font-size","font-weight","fill","x","y"],zt=["id"],Vt=["x","y","width","height"],At={key:7},Tt=["x1","x2","y1","y2","stroke-dasharray","stroke","stroke-width","clip-path"],Pt=["x","y","fill","font-size","font-weight"],Dt={key:5,class:"vue-data-ui-watermark"},Ot=["onClick"],Ft={key:0,style:{width:"100%",display:"flex","align-items":"center","justify-content":"center"}},Wt={viewBox:"0 0 20 20",height:"20",width:"20",style:{overflow:"hidden",background:"transparent"}},qt={key:0},It=["innerHTML"],Xt={__name:"vue-ui-scatter",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Ne,{expose:Se}){const C=Ne,{vue_ui_scatter:Me}=s.useConfig(),P=e.computed(()=>!!C.dataset&&C.dataset.length),k=e.ref(s.createUid()),$e=e.ref(null),I=e.ref(!1),X=e.ref(""),K=e.ref(0),V=e.ref(null),Q=e.ref(null),Z=e.ref(null),ee=e.ref(null),te=e.ref(null),le=e.ref(0),ae=e.ref(0),oe=e.ref(0),t=e.computed({get:()=>ne(),set:l=>l}),{userOptionsVisible:Y,setUserOptionsVisibility:se,keepUserOptionState:re}=Xe.useUserOptionState({config:t.value});function ne(){const l=Ce.useNestedProp({userConfig:C.config,defaultConfig:Me});return l.theme?{...Ce.useNestedProp({userConfig:s.themes.vue_ui_scatter[l.theme]||C.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}e.watch(()=>C.config,l=>{t.value=ne(),Y.value=!t.value.showOnChartHover,ue(),le.value+=1,ae.value+=1,oe.value+=1},{deep:!0});const D=e.ref(null);e.onMounted(()=>{ue()});function ue(){if(s.objectIsEmpty(C.dataset)&&s.error({componentName:"VueUiScatter",type:"dataset"}),t.value.responsive){const l=we.throttle(()=>{const{width:n,height:a}=we.useResponsive({chart:V.value,title:t.value.style.title.text?Q.value:null,legend:t.value.style.legend.show?Z.value:null,source:ee.value,noTitle:te.value});h.value.width=n,h.value.height=a});D.value=new ResizeObserver(l),D.value.observe(V.value.parentNode)}}e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const{isPrinting:ie,isImaging:ce,generatePdf:ye,generateImage:ve}=Be.usePrinter({elementId:`vue-ui-scatter_${k.value}`,fileName:t.value.style.title.text||"vue-ui-scatter"}),Ee=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),de=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),S=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),h=e.ref({height:t.value.style.layout.height,width:t.value.style.layout.width}),O=e.computed(()=>t.value.style.layout.marginalBars.show?t.value.style.layout.marginalBars.size+t.value.style.layout.marginalBars.offset:0),u=e.computed(()=>({top:t.value.style.layout.padding.top+O.value,right:h.value.width-t.value.style.layout.padding.right-O.value,bottom:h.value.height-t.value.style.layout.padding.bottom,left:t.value.style.layout.padding.left,height:h.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom-O.value,width:h.value.width-t.value.style.layout.padding.left-t.value.style.layout.padding.right-O.value})),y=e.computed(()=>{C.dataset.forEach((o,i)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["values"]}).forEach(f=>{s.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:f,index:i})}),o.values&&o.values.forEach((f,E)=>{s.getMissingDatasetAttributes({datasetObject:f,requiredAttributes:["x","y"]}).forEach(T=>{s.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:`values.${T}`,index:`${i} - ${E}`})})})});const l=Math.min(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),n=Math.max(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),a=Math.min(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y))),r=Math.max(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y)));return{xMin:l>=0?0:l,xMax:n,yMin:a>=0?0:a,yMax:r}}),v=e.computed(()=>({x:u.value.left+Math.abs(y.value.xMin)/(y.value.xMax+Math.abs(y.value.xMin))*u.value.width,y:u.value.bottom-Math.abs(y.value.yMin)/(y.value.yMax+Math.abs(y.value.yMin))*u.value.height})),$=e.computed(()=>C.dataset.map((l,n)=>{const a=`cluster_${k.value}_${n}`;return{...l,values:s.largestTriangleThreeBuckets({data:l.values,threshold:t.value.downsample.threshold}),id:a,color:l.color?l.color:de.value[n]||s.palette[n]||s.palette[n%s.palette.length],opacity:p.value.includes(a)?.5:1,shape:l.shape??"circle",segregate:()=>ge(a),isSegregated:p.value.includes(a)}})),Le=e.computed(()=>({cy:"scatter-div-legend",backgroundColor:t.value.style.legend.backgroundColor,color:t.value.style.legend.color,fontSize:t.value.style.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.legend.bold?"bold":""})),j=e.computed(()=>$.value.map((l,n)=>({...l,plots:l.values.map(a=>({x:u.value.left+(a.x+Math.abs(y.value.xMin))/(y.value.xMax+Math.abs(y.value.xMin))*u.value.width,y:u.value.bottom-(a.y+Math.abs(y.value.yMin))/(y.value.yMax+Math.abs(y.value.yMin))*u.value.height,v:{...a,name:a.name||""},clusterName:l.name,color:l.color?l.color:de.value[n]||s.palette[n]||s.palette[n%s.palette.length],id:`plot_${k.value}_${Math.random()}`,weight:a.weight??t.value.style.layout.plots.radius}))})).filter(l=>!p.value.includes(l.id))),x=e.computed(()=>j.value.map(l=>{const n=l.plots.reduce((d,L)=>d+L.x,0)/l.plots.length,a=l.plots.reduce((d,L)=>d+L.y,0)/l.plots.length;let r=0,o=0,i=0;for(const d of l.plots)r+=(d.x-n)*(d.y-a),o+=(d.x-n)**2,i+=(d.y-a)**2;const f=r/Math.sqrt(o*i),E=f*(Math.sqrt(i)/Math.sqrt(o)),T=a-E*n,_={x1:u.value.left,x2:u.value.right,y1:E*u.value.left+T,y2:E*u.value.right+T,coefficient:f},g=(_.y2-_.y1)/(_.x2-_.x1),w=_.y1-g*_.x1,N=Math.min(h.value.width-t.value.style.layout.padding.right,Math.max(t.value.style.layout.padding.left,(u.value.top-w)/g)),q={x:N,y:g*N+w<=t.value.style.layout.padding.top?u.value.top:g*N+w};return{...l,correlation:_,label:q,plots:l.plots.map(d=>{const L=(d.x+g*d.y-g*w)/(1+Math.pow(g,2)),G=(g*d.x+Math.pow(g,2)*d.y+w)/(1+Math.pow(g,2)),m=Math.sqrt(Math.pow(d.x-L,2)+Math.pow(d.y-G,2));return{...d,deviation:m,shape:l.shape,color:l.color}})}})),pe=e.computed(()=>Math.max(...x.value.flatMap(l=>l.plots.map(n=>Math.abs(n.deviation)))));function ze(){return x.value}function he(l,n){const a=Array.isArray(l)?l.flatMap(m=>m.plots.map(z=>({x:z.x,y:z.y}))):l.plots.map(m=>({x:m.x,y:m.y}));let r=1/0,o=-1/0,i=1/0,f=-1/0;a.forEach(({x:m,y:z})=>{r=Math.min(r,m),o=Math.max(o,m),i=Math.min(i,z),f=Math.max(f,z)});const E=o-r,T=f-i,_=E/n,g=T/n,w=Array(n).fill(0),N=Array(n).fill(0);a.forEach(({x:m,y:z})=>{const H=Math.floor((m-r)/_),J=Math.floor((z-i)/g);w[H]||(w[H]=0),N[J]||(N[J]=0),w[H]+=1,N[J]+=1});const q=[],d=[];for(let m=0;m<n;m+=1)q.push(r+(m+.5)*_),d.push(i+(m+.5)*g);const L=Math.max(...w),G=Math.max(...N);return{x:w,y:N,avgX:q,avgY:d,maxX:L,maxY:G}}const M=e.computed(()=>t.value.style.layout.marginalBars.tranches),b=e.computed(()=>he(j.value,M.value)),Ve=e.computed(()=>{const l=u.value.top-t.value.style.layout.marginalBars.offset,n=u.value.right+t.value.style.layout.marginalBars.offset;return j.value.map(a=>{const r=he(a,M.value);return{coords:r,dX:s.createSmoothPath(r.avgX.map((o,i)=>({x:o,y:l-r.x[i]/r.maxX*t.value.style.layout.marginalBars.size}))),dY:s.createSmoothPathVertical(r.avgY.map((o,i)=>({y:o,x:n+t.value.style.layout.marginalBars.size*r.y[i]/r.maxY}))),color:a.color,id:a.id}})}),B=e.ref(void 0),c=e.ref(null),R=e.ref(null);function fe(l,n){B.value=l.id,c.value=l;let a="";R.value={datapoint:l,seriesIndex:n,series:x.value,config:t.value};const r=t.value.style.tooltip.customFormat;s.isFunction(r)&&s.functionReturnsString(()=>r({datapoint:l,seriesIndex:n,series:x.value,config:t.value}))?X.value=r({datapoint:l,seriesIndex:n,series:x.value,config:t.value}):(l.clusterName&&(a+=`<div style="display:flex;gap:3px;align-items:center">${l.clusterName}</div>`),l.v.name&&(a+=`<div>${l.v.name}</div>`),a+=`<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,a+=`<div>${t.value.style.layout.dataLabels.xAxis.name}: <b>${isNaN(l.v.x)?"-":s.applyDataLabel(t.value.style.layout.plots.selectors.labels.x.formatter,l.v.x,s.dataLabel({p:t.value.style.tooltip.prefix,v:l.v.x,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:n})}</b></div>`,a+=`<div>${t.value.style.layout.dataLabels.yAxis.name}: <b>${isNaN(l.v.y)?"-":s.applyDataLabel(t.value.style.layout.plots.selectors.labels.y.formatter,l.v.y,s.dataLabel({p:t.value.style.tooltip.prefix,v:l.v.y,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:n})}</b></div>`,a+=`${t.value.style.layout.plots.deviation.translation}: <b>${s.dataLabel({v:l.deviation,r:t.value.style.layout.plots.deviation.roundingValue})}</b>`,a+="</div>",X.value=`<div>${a}</div>`),I.value=!0}function me(){I.value=!1,B.value=void 0,c.value=null}const p=e.ref([]);function ge(l){p.value.includes(l)?p.value=p.value.filter(n=>n!==l):p.value.length<C.dataset.length-1&&p.value.push(l)}function ke(){e.nextTick(()=>{const l=["",t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],n=x.value.map(o=>[o.name,o.correlation.coefficient,o.plots.length,o.plots.map(i=>i.v.x).reduce((i,f)=>i+f,0)/o.plots.length,o.plots.map(i=>i.v.y).reduce((i,f)=>i+f,0)/o.plots.length]),a=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(n),r=s.createCsvContent(a);s.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const F=e.computed(()=>{const l=[t.value.table.translations.series,t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],n=x.value.map(r=>[{shape:r.shape,content:r.name,color:r.color},Number((r.correlation.coefficient??0).toFixed(t.value.table.td.roundingValue)).toLocaleString(),r.plots.length.toLocaleString(),Number((r.plots.map(o=>o.v.x??0).reduce((o,i)=>o+i,0)/r.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString(),Number((r.plots.map(o=>o.v.y??0).reduce((o,i)=>o+i,0)/r.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString()]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:n,config:a,colNames:l}}),A=e.ref(!1);function Ae(l){A.value=l,K.value+=1}function xe(){S.value.showTable=!S.value.showTable}function be(){S.value.showTooltip=!S.value.showTooltip}const W=e.ref(!1);function U(){W.value=!W.value}return Se({getData:ze,generatePdf:ye,generateCsv:ke,generateImage:ve,toggleTable:xe,toggleTooltip:be,toggleAnnotator:U}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-scatter ${A.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"scatterChart",ref:V,id:`vue-ui-scatter_${k.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:n[2]||(n[2]=()=>e.unref(se)(!0)),onMouseleave:n[3]||(n[3]=()=>e.unref(se)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ie.PenAndPaper,{key:0,parent:V.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:W.value,onClose:U},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ee.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:te,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:Q,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Te._sfc_main,{key:`title_${le.value}`,config:{title:{cy:"scatter-div-title",...t.value.style.title},subtitle:{cy:"scatter-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&P.value&&(e.unref(re)||e.unref(Y))?(e.openBlock(),e.createBlock(Be.UserOptions,{ref_key:"details",ref:$e,key:`user_options_${K.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(ce),isPrinting:e.unref(ie),uid:k.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:S.value.showTooltip,isFullscreen:A.value,titles:{...t.value.userOptions.buttonTitles},chartElement:V.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:W.value,onToggleFullscreen:Ae,onGeneratePdf:e.unref(ye),onGenerateCsv:ke,onGenerateImage:e.unref(ve),onToggleTable:xe,onToggleTooltip:be,onToggleAnnotator:U,style:e.normalizeStyle({visibility:e.unref(re)?e.unref(Y)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":A.value,"vue-data-ui-fulscreen--off":!A.value}),viewBox:`0 0 ${h.value.width<=0?10:h.value.width} ${h.value.height<=0?10:h.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(qe._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:h.value.width<=0?10:h.value.width,height:h.value.height<=0?10:h.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Ue)):e.createCommentVNode("",!0),t.value.style.layout.axis.show?(e.openBlock(),e.createElementBlock("g",Ge,[e.createElementVNode("line",{x1:v.value.x,x2:v.value.x,y1:u.value.top,y2:u.value.bottom,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,He),e.createElementVNode("line",{x1:u.value.left,x2:u.value.right,y1:v.value.y,y2:v.value.y,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,Je)])):e.createCommentVNode("",!0),t.value.style.layout.plots.giftWrap.show?(e.openBlock(),e.createElementBlock("g",Ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[a.plots.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(s.giftWrap)({series:a.plots}),fill:e.unref(s.setOpacity)(a.color,t.value.style.layout.plots.giftWrap.fillOpacity*100),"stroke-width":t.value.style.layout.plots.giftWrap.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.giftWrap.strokeDasharray,stroke:a.color,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Qe)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[!a.shape||a.shape==="circle"?(e.openBlock(),e.createElementBlock("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(o,i)=>(e.openBlock(),e.createElementBlock("circle",{cx:o.x,cy:o.y,r:B.value&&B.value===o.id?o.weight*2:o.weight,fill:e.unref(s.setOpacity)(a.color,t.value.style.layout.plots.opacity*100),stroke:t.value.style.layout.plots.stroke,"stroke-width":t.value.style.layout.plots.strokeWidth,onMouseover:f=>fe(o,r),onMouseleave:me,style:e.normalizeStyle(`opacity:${B.value&&B.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/pe.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,44,et))),256))])):(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(o,i)=>(e.openBlock(),e.createBlock(_e._sfc_main,{plot:{x:o.x,y:o.y},radius:B.value&&B.value===o.id?o.weight*2:o.weight,shape:a.shape,color:e.unref(s.setOpacity)(a.color,t.value.style.layout.plots.opacity*100),stroke:t.value.style.layout.plots.stroke,strokeWidth:t.value.style.layout.plots.strokeWidth,onMouseover:f=>fe(o,r),onMouseleave:me,style:e.normalizeStyle(`opacity:${B.value&&B.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/pe.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,8,["plot","radius","shape","color","stroke","strokeWidth","onMouseover","style"]))),256))]))]))),256)),t.value.style.layout.marginalBars.show?(e.openBlock(),e.createElementBlock("g",lt,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`marginal_x_${k.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.marginalBars.fill},null,8,ot),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,st)],8,at),e.createElementVNode("linearGradient",{id:`marginal_y_${k.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.backgroundColor},null,8,nt),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.marginalBars.fill},null,8,ut)],8,rt)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.x,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[a&&b.value.avgX[r]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:b.value.avgX[r]-u.value.width/M.value/2,y:u.value.top-t.value.style.layout.marginalBars.offset-a/b.value.maxX*t.value.style.layout.marginalBars.size,width:u.value.width/M.value<=0?1e-4:u.value.width/M.value,height:a/b.value.maxX*t.value.style.layout.marginalBars.size<=0?1e-4:a/b.value.maxX*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_x_${k.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,it)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.y,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[a&&b.value.avgY[r]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:u.value.right+t.value.style.layout.marginalBars.offset,y:b.value.avgY[r]-u.value.height/M.value/2,height:u.value.height/M.value<=0?1e-4:u.value.height/M.value,width:a/b.value.maxY*t.value.style.layout.marginalBars.size<=0?1e-4:a/b.value.maxY*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_y_${k.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,ct)):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.marginalBars.showLines?(e.openBlock(),e.createElementBlock("g",yt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ve.value,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${a.dX}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,vt)),p.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${a.dX}`,stroke:a.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,dt)),p.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${a.dY}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,pt)),p.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:3,d:`M ${a.dY}`,stroke:a.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,ht))],64))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c.value&&t.value.style.layout.plots.selectors.show?(e.openBlock(),e.createElementBlock("g",ft,[e.createElementVNode("line",{x1:v.value.x,x2:c.value.x,y1:c.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,mt),e.createElementVNode("line",{x1:c.value.x,x2:c.value.x,y1:v.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,gt),e.createElementVNode("text",{x:v.value.x+(c.value.x>v.value.x?-6:6),y:c.value.y+t.value.style.layout.plots.selectors.labels.fontSize/3,"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x>v.value.x?"end":"start"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(c.value.v.y),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(c.value.v.y),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,kt),e.createElementVNode("text",{x:c.value.x,y:v.value.y+(c.value.y>v.value.y?-6:t.value.style.layout.plots.selectors.labels.fontSize+6),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(c.value.v.x),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(c.value.v.x),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,xt),e.createElementVNode("circle",{cx:v.value.x,cy:c.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,bt),e.createElementVNode("circle",{cx:c.value.x,cy:v.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,wt),t.value.style.layout.plots.selectors.labels.showName?(e.openBlock(),e.createElementBlock("text",{key:0,x:c.value.x,y:c.value.y+(c.value.y<v.value.y?-t.value.style.layout.plots.selectors.labels.fontSize/2:t.value.style.layout.plots.selectors.labels.fontSize),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x<u.value.left+100?"start":c.value.x>u.value.right-100?"end":c.value.x>v.value.x?"start":"end"},e.toDisplayString(c.value.v.name),9,Bt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",_t,[e.createElementVNode("text",{x:u.value.left-5,y:v.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,e.unref(s.checkNaN)(y.value.xMin),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.xMin),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,Ct),e.createElementVNode("text",{x:u.value.right+3,y:v.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"start","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,e.unref(s.checkNaN)(y.value.xMax),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.xMax),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,Nt),e.createElementVNode("text",{id:`vue-ui-scatter-xAxis-label-${k.value}`,transform:`translate(${t.value.style.layout.dataLabels.xAxis.fontSize*2}, ${u.value.top+u.value.height/2}), rotate(-90)`,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.name),9,St)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Mt,[e.createElementVNode("text",{x:v.value.x,y:u.value.bottom+t.value.style.layout.dataLabels.yAxis.fontSize+3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(y.value.yMin),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.yMin),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,$t),e.createElementVNode("text",{x:v.value.x,y:u.value.top-t.value.style.layout.dataLabels.yAxis.fontSize/2,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(y.value.yMax),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.yMax),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,Et),e.createElementVNode("text",{"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.yAxis.color,x:u.value.left+u.value.width/2,y:u.value.bottom+8+t.value.style.layout.dataLabels.yAxis.fontSize*2},e.toDisplayString(t.value.style.layout.dataLabels.yAxis.name),9,Lt)])):e.createCommentVNode("",!0),e.createElementVNode("clipPath",{id:`clip_path_${k.value}`},[e.createElementVNode("rect",{x:u.value.left,y:u.value.top,width:u.value.width<=0?1e-4:u.value.width,height:u.value.height<=0?1e-4:u.value.height},null,8,Vt)],8,zt),t.value.style.layout.correlation.show?(e.openBlock(),e.createElementBlock("g",At,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.correlation.x1,x2:a.correlation.x2,y1:a.correlation.y1,y2:a.correlation.y2,"stroke-dasharray":t.value.style.layout.correlation.strokeDasharray,stroke:a.color,"stroke-width":t.value.style.layout.correlation.strokeWidth,"clip-path":`url(#clip_path_${k.value})`},null,8,Tt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.correlation.label.show?(e.openBlock(),e.createElementBlock("text",{key:0,x:a.label.x,y:a.label.y,fill:t.value.style.layout.correlation.label.useSerieColor?a.color:t.value.style.layout.correlation.label.color,"font-size":t.value.style.layout.correlation.label.fontSize,"font-weight":t.value.style.layout.correlation.label.bold?"bold":"normal"},e.toDisplayString(e.unref(s.dataLabel)({v:e.unref(s.checkNaN)(a.correlation.coefficient),r:t.value.style.layout.correlation.label.roundingValue})),9,Pt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:h.value},void 0,!0)],14,Re)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Dt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ie)||e.unref(ce)})),void 0,!0)])):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Fe.default,{key:6,config:{type:"quadrant",style:{backgroundColor:t.value.style.backgroundColor,quadrant:{grid:{color:t.value.style.layout.axis.stroke},plots:{color:t.value.style.layout.axis.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:Z},[t.value.style.legend.show?(e.openBlock(),e.createBlock(De.Legend,{key:`legend_${oe.value}`,legendSet:$.value,config:Le.value,onClickMarker:n[0]||(n[0]=({legend:a})=>ge(a.id))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:r=>a.segregate(),style:e.normalizeStyle(`opacity:${p.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name),13,Ot)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:$.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:ee,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Pe._sfc_main,{show:S.value.showTooltip&&I.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:V.value,content:X.value,isFullscreen:A.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...R.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...R.value})),void 0,!0)]),default:e.withCtx(()=>[t.value.style.tooltip.showShape?(e.openBlock(),e.createElementBlock("div",Ft,[(e.openBlock(),e.createElementBlock("svg",Wt,[e.createVNode(_e._sfc_main,{shape:c.value.shape,color:c.value.color,plot:{x:10,y:10},radius:7},null,8,["shape","color"])]))])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),P.value?(e.openBlock(),e.createBlock(We.default,{key:8,hideDetails:"",config:{open:S.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Oe.DataTable,{key:`table_${ae.value}`,colNames:F.value.colNames,head:F.value.head,body:F.value.body,config:F.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=a=>S.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createTextVNode(e.toDisplayString(a),1)]),td:e.withCtx(({td:a})=>[a.shape?(e.openBlock(),e.createElementBlock("div",qt,[e.createElementVNode("span",null,e.toDisplayString(a.content),1)])):(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:a},null,8,It))]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,je))}},Yt=Ye._export_sfc(Xt,[["__scopeId","data-v-19af165c"]]);exports.default=Yt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DsNY1SpD.cjs"),we=require("./useResponsive-BJ7DTGpm.cjs"),Te=require("./Title-CLw400_T.cjs"),Be=require("./usePrinter-BS5qzASr.cjs"),Pe=require("./Tooltip-BGjOAkJQ.cjs"),De=require("./Legend-yTCeOn97.cjs"),_e=require("./Shape-BQHHOWfV.cjs"),Oe=require("./DataTable-D8n9mxYD.cjs"),Fe=require("./vue-ui-skeleton-BKT91qEa.cjs"),We=require("./vue-ui-accordion-BAP0rDBZ.cjs"),Ce=require("./useNestedProp-B4YewnHE.cjs"),qe=require("./PackageVersion-ou96yRPl.cjs"),Ie=require("./PenAndPaper-BWwAIhEN.cjs"),Xe=require("./useUserOptionState-BgepsfED.cjs"),Ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),je=["id"],Re=["xmlns","viewBox"],Ue=["width","height"],Ge={key:1},He=["x1","x2","y1","y2","stroke","stroke-width"],Je=["x1","x2","y1","y2","stroke","stroke-width"],Ke={key:2},Qe=["points","fill","stroke-width","stroke-dasharray","stroke"],Ze={key:0},et=["cx","cy","r","fill","stroke","stroke-width","onMouseover"],tt={key:1},lt={key:3},at=["id"],ot=["stop-color"],st=["stop-color"],rt=["id"],nt=["stop-color"],ut=["stop-color"],it=["x","y","width","height","fill","stroke","stroke-width","rx"],ct=["x","y","height","width","fill","stroke","stroke-width","rx"],yt={key:0},vt=["d","stroke","stroke-width"],dt=["d","stroke","stroke-width"],pt=["d","stroke","stroke-width"],ht=["d","stroke","stroke-width"],ft={key:4,style:{"pointer-events":"none !important"}},mt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],gt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],kt=["x","y","font-size","fill","font-weight","text-anchor"],xt=["x","y","font-size","fill","font-weight"],bt=["cx","cy","r","fill","stroke","stroke-width"],wt=["cx","cy","r","fill","stroke","stroke-width"],Bt=["x","y","font-size","fill","font-weight","text-anchor"],_t={key:5},Ct=["x","y","font-size","fill"],Nt=["x","y","font-size","fill"],St=["id","transform","font-size","font-weight","fill"],Mt={key:6},$t=["x","y","font-size","fill"],Et=["x","y","font-size","fill"],Lt=["font-size","font-weight","fill","x","y"],zt=["id"],Vt=["x","y","width","height"],At={key:7},Tt=["x1","x2","y1","y2","stroke-dasharray","stroke","stroke-width","clip-path"],Pt=["x","y","fill","font-size","font-weight"],Dt={key:5,class:"vue-data-ui-watermark"},Ot=["onClick"],Ft={key:0,style:{width:"100%",display:"flex","align-items":"center","justify-content":"center"}},Wt={viewBox:"0 0 20 20",height:"20",width:"20",style:{overflow:"hidden",background:"transparent"}},qt={key:0},It=["innerHTML"],Xt={__name:"vue-ui-scatter",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Ne,{expose:Se}){const C=Ne,{vue_ui_scatter:Me}=s.useConfig(),P=e.computed(()=>!!C.dataset&&C.dataset.length),k=e.ref(s.createUid()),$e=e.ref(null),I=e.ref(!1),X=e.ref(""),K=e.ref(0),V=e.ref(null),Q=e.ref(null),Z=e.ref(null),ee=e.ref(null),te=e.ref(null),le=e.ref(0),ae=e.ref(0),oe=e.ref(0),t=e.computed({get:()=>ne(),set:l=>l}),{userOptionsVisible:Y,setUserOptionsVisibility:se,keepUserOptionState:re}=Xe.useUserOptionState({config:t.value});function ne(){const l=Ce.useNestedProp({userConfig:C.config,defaultConfig:Me});return l.theme?{...Ce.useNestedProp({userConfig:s.themes.vue_ui_scatter[l.theme]||C.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}e.watch(()=>C.config,l=>{t.value=ne(),Y.value=!t.value.showOnChartHover,ue(),le.value+=1,ae.value+=1,oe.value+=1},{deep:!0});const D=e.ref(null);e.onMounted(()=>{ue()});function ue(){if(s.objectIsEmpty(C.dataset)&&s.error({componentName:"VueUiScatter",type:"dataset"}),t.value.responsive){const l=we.throttle(()=>{const{width:n,height:a}=we.useResponsive({chart:V.value,title:t.value.style.title.text?Q.value:null,legend:t.value.style.legend.show?Z.value:null,source:ee.value,noTitle:te.value});h.value.width=n,h.value.height=a});D.value=new ResizeObserver(l),D.value.observe(V.value.parentNode)}}e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const{isPrinting:ie,isImaging:ce,generatePdf:ye,generateImage:ve}=Be.usePrinter({elementId:`vue-ui-scatter_${k.value}`,fileName:t.value.style.title.text||"vue-ui-scatter"}),Ee=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),de=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),S=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),h=e.ref({height:t.value.style.layout.height,width:t.value.style.layout.width}),O=e.computed(()=>t.value.style.layout.marginalBars.show?t.value.style.layout.marginalBars.size+t.value.style.layout.marginalBars.offset:0),u=e.computed(()=>({top:t.value.style.layout.padding.top+O.value,right:h.value.width-t.value.style.layout.padding.right-O.value,bottom:h.value.height-t.value.style.layout.padding.bottom,left:t.value.style.layout.padding.left,height:h.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom-O.value,width:h.value.width-t.value.style.layout.padding.left-t.value.style.layout.padding.right-O.value})),y=e.computed(()=>{C.dataset.forEach((o,i)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["values"]}).forEach(f=>{s.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:f,index:i})}),o.values&&o.values.forEach((f,E)=>{s.getMissingDatasetAttributes({datasetObject:f,requiredAttributes:["x","y"]}).forEach(T=>{s.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:`values.${T}`,index:`${i} - ${E}`})})})});const l=Math.min(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),n=Math.max(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),a=Math.min(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y))),r=Math.max(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y)));return{xMin:l>=0?0:l,xMax:n,yMin:a>=0?0:a,yMax:r}}),v=e.computed(()=>({x:u.value.left+Math.abs(y.value.xMin)/(y.value.xMax+Math.abs(y.value.xMin))*u.value.width,y:u.value.bottom-Math.abs(y.value.yMin)/(y.value.yMax+Math.abs(y.value.yMin))*u.value.height})),$=e.computed(()=>C.dataset.map((l,n)=>{const a=`cluster_${k.value}_${n}`;return{...l,values:s.largestTriangleThreeBuckets({data:l.values,threshold:t.value.downsample.threshold}),id:a,color:l.color?l.color:de.value[n]||s.palette[n]||s.palette[n%s.palette.length],opacity:p.value.includes(a)?.5:1,shape:l.shape??"circle",segregate:()=>ge(a),isSegregated:p.value.includes(a)}})),Le=e.computed(()=>({cy:"scatter-div-legend",backgroundColor:t.value.style.legend.backgroundColor,color:t.value.style.legend.color,fontSize:t.value.style.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.legend.bold?"bold":""})),j=e.computed(()=>$.value.map((l,n)=>({...l,plots:l.values.map(a=>({x:u.value.left+(a.x+Math.abs(y.value.xMin))/(y.value.xMax+Math.abs(y.value.xMin))*u.value.width,y:u.value.bottom-(a.y+Math.abs(y.value.yMin))/(y.value.yMax+Math.abs(y.value.yMin))*u.value.height,v:{...a,name:a.name||""},clusterName:l.name,color:l.color?l.color:de.value[n]||s.palette[n]||s.palette[n%s.palette.length],id:`plot_${k.value}_${Math.random()}`,weight:a.weight??t.value.style.layout.plots.radius}))})).filter(l=>!p.value.includes(l.id))),x=e.computed(()=>j.value.map(l=>{const n=l.plots.reduce((d,L)=>d+L.x,0)/l.plots.length,a=l.plots.reduce((d,L)=>d+L.y,0)/l.plots.length;let r=0,o=0,i=0;for(const d of l.plots)r+=(d.x-n)*(d.y-a),o+=(d.x-n)**2,i+=(d.y-a)**2;const f=r/Math.sqrt(o*i),E=f*(Math.sqrt(i)/Math.sqrt(o)),T=a-E*n,_={x1:u.value.left,x2:u.value.right,y1:E*u.value.left+T,y2:E*u.value.right+T,coefficient:f},g=(_.y2-_.y1)/(_.x2-_.x1),w=_.y1-g*_.x1,N=Math.min(h.value.width-t.value.style.layout.padding.right,Math.max(t.value.style.layout.padding.left,(u.value.top-w)/g)),q={x:N,y:g*N+w<=t.value.style.layout.padding.top?u.value.top:g*N+w};return{...l,correlation:_,label:q,plots:l.plots.map(d=>{const L=(d.x+g*d.y-g*w)/(1+Math.pow(g,2)),G=(g*d.x+Math.pow(g,2)*d.y+w)/(1+Math.pow(g,2)),m=Math.sqrt(Math.pow(d.x-L,2)+Math.pow(d.y-G,2));return{...d,deviation:m,shape:l.shape,color:l.color}})}})),pe=e.computed(()=>Math.max(...x.value.flatMap(l=>l.plots.map(n=>Math.abs(n.deviation)))));function ze(){return x.value}function he(l,n){const a=Array.isArray(l)?l.flatMap(m=>m.plots.map(z=>({x:z.x,y:z.y}))):l.plots.map(m=>({x:m.x,y:m.y}));let r=1/0,o=-1/0,i=1/0,f=-1/0;a.forEach(({x:m,y:z})=>{r=Math.min(r,m),o=Math.max(o,m),i=Math.min(i,z),f=Math.max(f,z)});const E=o-r,T=f-i,_=E/n,g=T/n,w=Array(n).fill(0),N=Array(n).fill(0);a.forEach(({x:m,y:z})=>{const H=Math.floor((m-r)/_),J=Math.floor((z-i)/g);w[H]||(w[H]=0),N[J]||(N[J]=0),w[H]+=1,N[J]+=1});const q=[],d=[];for(let m=0;m<n;m+=1)q.push(r+(m+.5)*_),d.push(i+(m+.5)*g);const L=Math.max(...w),G=Math.max(...N);return{x:w,y:N,avgX:q,avgY:d,maxX:L,maxY:G}}const M=e.computed(()=>t.value.style.layout.marginalBars.tranches),b=e.computed(()=>he(j.value,M.value)),Ve=e.computed(()=>{const l=u.value.top-t.value.style.layout.marginalBars.offset,n=u.value.right+t.value.style.layout.marginalBars.offset;return j.value.map(a=>{const r=he(a,M.value);return{coords:r,dX:s.createSmoothPath(r.avgX.map((o,i)=>({x:o,y:l-r.x[i]/r.maxX*t.value.style.layout.marginalBars.size}))),dY:s.createSmoothPathVertical(r.avgY.map((o,i)=>({y:o,x:n+t.value.style.layout.marginalBars.size*r.y[i]/r.maxY}))),color:a.color,id:a.id}})}),B=e.ref(void 0),c=e.ref(null),R=e.ref(null);function fe(l,n){B.value=l.id,c.value=l;let a="";R.value={datapoint:l,seriesIndex:n,series:x.value,config:t.value};const r=t.value.style.tooltip.customFormat;s.isFunction(r)&&s.functionReturnsString(()=>r({datapoint:l,seriesIndex:n,series:x.value,config:t.value}))?X.value=r({datapoint:l,seriesIndex:n,series:x.value,config:t.value}):(l.clusterName&&(a+=`<div style="display:flex;gap:3px;align-items:center">${l.clusterName}</div>`),l.v.name&&(a+=`<div>${l.v.name}</div>`),a+=`<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,a+=`<div>${t.value.style.layout.dataLabels.xAxis.name}: <b>${isNaN(l.v.x)?"-":s.applyDataLabel(t.value.style.layout.plots.selectors.labels.x.formatter,l.v.x,s.dataLabel({p:t.value.style.tooltip.prefix,v:l.v.x,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:n})}</b></div>`,a+=`<div>${t.value.style.layout.dataLabels.yAxis.name}: <b>${isNaN(l.v.y)?"-":s.applyDataLabel(t.value.style.layout.plots.selectors.labels.y.formatter,l.v.y,s.dataLabel({p:t.value.style.tooltip.prefix,v:l.v.y,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:n})}</b></div>`,a+=`${t.value.style.layout.plots.deviation.translation}: <b>${s.dataLabel({v:l.deviation,r:t.value.style.layout.plots.deviation.roundingValue})}</b>`,a+="</div>",X.value=`<div>${a}</div>`),I.value=!0}function me(){I.value=!1,B.value=void 0,c.value=null}const p=e.ref([]);function ge(l){p.value.includes(l)?p.value=p.value.filter(n=>n!==l):p.value.length<C.dataset.length-1&&p.value.push(l)}function ke(){e.nextTick(()=>{const l=["",t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],n=x.value.map(o=>[o.name,o.correlation.coefficient,o.plots.length,o.plots.map(i=>i.v.x).reduce((i,f)=>i+f,0)/o.plots.length,o.plots.map(i=>i.v.y).reduce((i,f)=>i+f,0)/o.plots.length]),a=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(n),r=s.createCsvContent(a);s.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const F=e.computed(()=>{const l=[t.value.table.translations.series,t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],n=x.value.map(r=>[{shape:r.shape,content:r.name,color:r.color},Number((r.correlation.coefficient??0).toFixed(t.value.table.td.roundingValue)).toLocaleString(),r.plots.length.toLocaleString(),Number((r.plots.map(o=>o.v.x??0).reduce((o,i)=>o+i,0)/r.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString(),Number((r.plots.map(o=>o.v.y??0).reduce((o,i)=>o+i,0)/r.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString()]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:n,config:a,colNames:l}}),A=e.ref(!1);function Ae(l){A.value=l,K.value+=1}function xe(){S.value.showTable=!S.value.showTable}function be(){S.value.showTooltip=!S.value.showTooltip}const W=e.ref(!1);function U(){W.value=!W.value}return Se({getData:ze,generatePdf:ye,generateCsv:ke,generateImage:ve,toggleTable:xe,toggleTooltip:be,toggleAnnotator:U}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-scatter ${A.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"scatterChart",ref:V,id:`vue-ui-scatter_${k.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:n[2]||(n[2]=()=>e.unref(se)(!0)),onMouseleave:n[3]||(n[3]=()=>e.unref(se)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ie.PenAndPaper,{key:0,parent:V.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:W.value,onClose:U},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ee.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:te,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:Q,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Te._sfc_main,{key:`title_${le.value}`,config:{title:{cy:"scatter-div-title",...t.value.style.title},subtitle:{cy:"scatter-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&P.value&&(e.unref(re)||e.unref(Y))?(e.openBlock(),e.createBlock(Be.UserOptions,{ref_key:"details",ref:$e,key:`user_options_${K.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(ce),isPrinting:e.unref(ie),uid:k.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:S.value.showTooltip,isFullscreen:A.value,titles:{...t.value.userOptions.buttonTitles},chartElement:V.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:W.value,onToggleFullscreen:Ae,onGeneratePdf:e.unref(ye),onGenerateCsv:ke,onGenerateImage:e.unref(ve),onToggleTable:xe,onToggleTooltip:be,onToggleAnnotator:U,style:e.normalizeStyle({visibility:e.unref(re)?e.unref(Y)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":A.value,"vue-data-ui-fulscreen--off":!A.value}),viewBox:`0 0 ${h.value.width<=0?10:h.value.width} ${h.value.height<=0?10:h.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(qe._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:h.value.width<=0?10:h.value.width,height:h.value.height<=0?10:h.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Ue)):e.createCommentVNode("",!0),t.value.style.layout.axis.show?(e.openBlock(),e.createElementBlock("g",Ge,[e.createElementVNode("line",{x1:v.value.x,x2:v.value.x,y1:u.value.top,y2:u.value.bottom,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,He),e.createElementVNode("line",{x1:u.value.left,x2:u.value.right,y1:v.value.y,y2:v.value.y,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,Je)])):e.createCommentVNode("",!0),t.value.style.layout.plots.giftWrap.show?(e.openBlock(),e.createElementBlock("g",Ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[a.plots.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(s.giftWrap)({series:a.plots}),fill:e.unref(s.setOpacity)(a.color,t.value.style.layout.plots.giftWrap.fillOpacity*100),"stroke-width":t.value.style.layout.plots.giftWrap.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.giftWrap.strokeDasharray,stroke:a.color,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Qe)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[!a.shape||a.shape==="circle"?(e.openBlock(),e.createElementBlock("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(o,i)=>(e.openBlock(),e.createElementBlock("circle",{cx:o.x,cy:o.y,r:B.value&&B.value===o.id?o.weight*2:o.weight,fill:e.unref(s.setOpacity)(a.color,t.value.style.layout.plots.opacity*100),stroke:t.value.style.layout.plots.stroke,"stroke-width":t.value.style.layout.plots.strokeWidth,onMouseover:f=>fe(o,r),onMouseleave:me,style:e.normalizeStyle(`opacity:${B.value&&B.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/pe.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,44,et))),256))])):(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(o,i)=>(e.openBlock(),e.createBlock(_e._sfc_main,{plot:{x:o.x,y:o.y},radius:B.value&&B.value===o.id?o.weight*2:o.weight,shape:a.shape,color:e.unref(s.setOpacity)(a.color,t.value.style.layout.plots.opacity*100),stroke:t.value.style.layout.plots.stroke,strokeWidth:t.value.style.layout.plots.strokeWidth,onMouseover:f=>fe(o,r),onMouseleave:me,style:e.normalizeStyle(`opacity:${B.value&&B.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/pe.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,8,["plot","radius","shape","color","stroke","strokeWidth","onMouseover","style"]))),256))]))]))),256)),t.value.style.layout.marginalBars.show?(e.openBlock(),e.createElementBlock("g",lt,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`marginal_x_${k.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.marginalBars.fill},null,8,ot),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,st)],8,at),e.createElementVNode("linearGradient",{id:`marginal_y_${k.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.backgroundColor},null,8,nt),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.marginalBars.fill},null,8,ut)],8,rt)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.x,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[a&&b.value.avgX[r]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:b.value.avgX[r]-u.value.width/M.value/2,y:u.value.top-t.value.style.layout.marginalBars.offset-a/b.value.maxX*t.value.style.layout.marginalBars.size,width:u.value.width/M.value<=0?1e-4:u.value.width/M.value,height:a/b.value.maxX*t.value.style.layout.marginalBars.size<=0?1e-4:a/b.value.maxX*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_x_${k.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,it)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.y,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[a&&b.value.avgY[r]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:u.value.right+t.value.style.layout.marginalBars.offset,y:b.value.avgY[r]-u.value.height/M.value/2,height:u.value.height/M.value<=0?1e-4:u.value.height/M.value,width:a/b.value.maxY*t.value.style.layout.marginalBars.size<=0?1e-4:a/b.value.maxY*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_y_${k.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,ct)):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.marginalBars.showLines?(e.openBlock(),e.createElementBlock("g",yt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ve.value,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${a.dX}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,vt)),p.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${a.dX}`,stroke:a.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,dt)),p.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${a.dY}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,pt)),p.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:3,d:`M ${a.dY}`,stroke:a.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,ht))],64))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c.value&&t.value.style.layout.plots.selectors.show?(e.openBlock(),e.createElementBlock("g",ft,[e.createElementVNode("line",{x1:v.value.x,x2:c.value.x,y1:c.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,mt),e.createElementVNode("line",{x1:c.value.x,x2:c.value.x,y1:v.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,gt),e.createElementVNode("text",{x:v.value.x+(c.value.x>v.value.x?-6:6),y:c.value.y+t.value.style.layout.plots.selectors.labels.fontSize/3,"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x>v.value.x?"end":"start"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(c.value.v.y),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(c.value.v.y),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,kt),e.createElementVNode("text",{x:c.value.x,y:v.value.y+(c.value.y>v.value.y?-6:t.value.style.layout.plots.selectors.labels.fontSize+6),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(c.value.v.x),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(c.value.v.x),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,xt),e.createElementVNode("circle",{cx:v.value.x,cy:c.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,bt),e.createElementVNode("circle",{cx:c.value.x,cy:v.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,wt),t.value.style.layout.plots.selectors.labels.showName?(e.openBlock(),e.createElementBlock("text",{key:0,x:c.value.x,y:c.value.y+(c.value.y<v.value.y?-t.value.style.layout.plots.selectors.labels.fontSize/2:t.value.style.layout.plots.selectors.labels.fontSize),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x<u.value.left+100?"start":c.value.x>u.value.right-100?"end":c.value.x>v.value.x?"start":"end"},e.toDisplayString(c.value.v.name),9,Bt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",_t,[e.createElementVNode("text",{x:u.value.left-5,y:v.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,e.unref(s.checkNaN)(y.value.xMin),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.xMin),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,Ct),e.createElementVNode("text",{x:u.value.right+3,y:v.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"start","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,e.unref(s.checkNaN)(y.value.xMax),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.xMax),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,Nt),e.createElementVNode("text",{id:`vue-ui-scatter-xAxis-label-${k.value}`,transform:`translate(${t.value.style.layout.dataLabels.xAxis.fontSize*2}, ${u.value.top+u.value.height/2}), rotate(-90)`,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.name),9,St)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Mt,[e.createElementVNode("text",{x:v.value.x,y:u.value.bottom+t.value.style.layout.dataLabels.yAxis.fontSize+3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(y.value.yMin),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.yMin),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,$t),e.createElementVNode("text",{x:v.value.x,y:u.value.top-t.value.style.layout.dataLabels.yAxis.fontSize/2,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(y.value.yMax),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.yMax),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,Et),e.createElementVNode("text",{"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.yAxis.color,x:u.value.left+u.value.width/2,y:u.value.bottom+8+t.value.style.layout.dataLabels.yAxis.fontSize*2},e.toDisplayString(t.value.style.layout.dataLabels.yAxis.name),9,Lt)])):e.createCommentVNode("",!0),e.createElementVNode("clipPath",{id:`clip_path_${k.value}`},[e.createElementVNode("rect",{x:u.value.left,y:u.value.top,width:u.value.width<=0?1e-4:u.value.width,height:u.value.height<=0?1e-4:u.value.height},null,8,Vt)],8,zt),t.value.style.layout.correlation.show?(e.openBlock(),e.createElementBlock("g",At,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.correlation.x1,x2:a.correlation.x2,y1:a.correlation.y1,y2:a.correlation.y2,"stroke-dasharray":t.value.style.layout.correlation.strokeDasharray,stroke:a.color,"stroke-width":t.value.style.layout.correlation.strokeWidth,"clip-path":`url(#clip_path_${k.value})`},null,8,Tt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.correlation.label.show?(e.openBlock(),e.createElementBlock("text",{key:0,x:a.label.x,y:a.label.y,fill:t.value.style.layout.correlation.label.useSerieColor?a.color:t.value.style.layout.correlation.label.color,"font-size":t.value.style.layout.correlation.label.fontSize,"font-weight":t.value.style.layout.correlation.label.bold?"bold":"normal"},e.toDisplayString(e.unref(s.dataLabel)({v:e.unref(s.checkNaN)(a.correlation.coefficient),r:t.value.style.layout.correlation.label.roundingValue})),9,Pt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:h.value},void 0,!0)],14,Re)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Dt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ie)||e.unref(ce)})),void 0,!0)])):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Fe.default,{key:6,config:{type:"quadrant",style:{backgroundColor:t.value.style.backgroundColor,quadrant:{grid:{color:t.value.style.layout.axis.stroke},plots:{color:t.value.style.layout.axis.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:Z},[t.value.style.legend.show?(e.openBlock(),e.createBlock(De.Legend,{key:`legend_${oe.value}`,legendSet:$.value,config:Le.value,onClickMarker:n[0]||(n[0]=({legend:a})=>ge(a.id))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:r=>a.segregate(),style:e.normalizeStyle(`opacity:${p.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name),13,Ot)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:$.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:ee,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Pe._sfc_main,{show:S.value.showTooltip&&I.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:V.value,content:X.value,isFullscreen:A.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...R.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...R.value})),void 0,!0)]),default:e.withCtx(()=>[t.value.style.tooltip.showShape?(e.openBlock(),e.createElementBlock("div",Ft,[(e.openBlock(),e.createElementBlock("svg",Wt,[e.createVNode(_e._sfc_main,{shape:c.value.shape,color:c.value.color,plot:{x:10,y:10},radius:7},null,8,["shape","color"])]))])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),P.value?(e.openBlock(),e.createBlock(We.default,{key:8,hideDetails:"",config:{open:S.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Oe.DataTable,{key:`table_${ae.value}`,colNames:F.value.colNames,head:F.value.head,body:F.value.body,config:F.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=a=>S.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createTextVNode(e.toDisplayString(a),1)]),td:e.withCtx(({td:a})=>[a.shape?(e.openBlock(),e.createElementBlock("div",qt,[e.createElementVNode("span",null,e.toDisplayString(a.content),1)])):(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:a},null,8,It))]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,je))}},Yt=Ye._export_sfc(Xt,[["__scopeId","data-v-19af165c"]]);exports.default=Yt;
@@ -1,17 +1,17 @@
1
1
  import { computed as m, ref as h, watch as lt, onMounted as at, onBeforeUnmount as ot, openBlock as o, createElementBlock as r, normalizeClass as Ve, normalizeStyle as D, unref as n, createBlock as j, createCommentVNode as c, createSlots as st, withCtx as _, renderSlot as M, normalizeProps as Q, guardReactiveProps as Z, createVNode as pe, createElementVNode as d, Fragment as N, renderList as X, toDisplayString as C, createTextVNode as ut, nextTick as rt } from "vue";
2
- import { u as it, c as nt, t as vt, a as yt, p as q, o as ct, e as fe, b as dt, g as Ee, T as ht, R as pt, Y as ft, X as gt, U as xt, s as ge, i as V, v as z, f as P, x as mt, y as bt, q as kt, r as wt } from "./index-3_ulDZ6w.js";
2
+ import { u as it, c as nt, t as vt, a as yt, p as q, o as ct, e as fe, b as dt, g as Ee, T as ht, R as pt, Y as ft, X as gt, U as xt, s as ge, i as V, v as z, f as P, x as mt, y as bt, q as kt, r as wt } from "./index-B3hGeAZ7.js";
3
3
  import { t as _t, u as Mt } from "./useResponsive-CoxXLe23.js";
4
- import { _ as $t } from "./Title-L52l_KMR.js";
5
- import { u as Ct, U as zt } from "./usePrinter-NdwnpHUu.js";
6
- import { _ as At } from "./Tooltip-FYp9ljnj.js";
7
- import { L as St } from "./Legend-kF7sC1KK.js";
8
- import { _ as Ue } from "./Shape-CfcWXI5g.js";
9
- import { D as Lt } from "./DataTable-CNH8bChE.js";
10
- import Tt from "./vue-ui-skeleton-uAX1ZH1F.js";
11
- import Bt from "./vue-ui-accordion-DXlXtAML.js";
12
- import { u as Ge } from "./useNestedProp-Bs6ltq3I.js";
13
- import { _ as Ot } from "./PackageVersion-m6HC0skh.js";
14
- import { P as Nt } from "./PenAndPaper-FOhKSug_.js";
4
+ import { _ as $t } from "./Title-CujJ2kZY.js";
5
+ import { u as Ct, U as zt } from "./usePrinter-CiUt-pS9.js";
6
+ import { _ as At } from "./Tooltip-CPxoXFKu.js";
7
+ import { L as St } from "./Legend-BMPqVkBW.js";
8
+ import { _ as Ue } from "./Shape-TWPk_v-7.js";
9
+ import { D as Lt } from "./DataTable-B1FxJofv.js";
10
+ import Tt from "./vue-ui-skeleton-BAv7fXp9.js";
11
+ import Bt from "./vue-ui-accordion-DFn61GBf.js";
12
+ import { u as Ge } from "./useNestedProp-WWv9scq-.js";
13
+ import { _ as Ot } from "./PackageVersion-B51w3y82.js";
14
+ import { P as Nt } from "./PenAndPaper-BSEqDrpB.js";
15
15
  import { u as Pt } from "./useUserOptionState-BIvW1Kz7.js";
16
16
  import { _ as Wt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
17
  const Ft = ["id"], Xt = ["xmlns", "viewBox"], It = ["width", "height"], Yt = { key: 1 }, Dt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], jt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Vt = { key: 2 }, Et = ["points", "fill", "stroke-width", "stroke-dasharray", "stroke"], Ut = { key: 0 }, Gt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onMouseover"], Rt = { key: 1 }, qt = { key: 3 }, Ht = ["id"], Jt = ["stop-color"], Kt = ["stop-color"], Qt = ["id"], Zt = ["stop-color"], el = ["stop-color"], tl = ["x", "y", "width", "height", "fill", "stroke", "stroke-width", "rx"], ll = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], al = { key: 0 }, ol = ["d", "stroke", "stroke-width"], sl = ["d", "stroke", "stroke-width"], ul = ["d", "stroke", "stroke-width"], rl = ["d", "stroke", "stroke-width"], il = {