vue-data-ui 3.28.2 → 3.28.4

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 (166) hide show
  1. package/README.md +25 -1
  2. package/dist/{PackageVersion-BIhjLNBU.js → PackageVersion-DhptF5oD.js} +1 -1
  3. package/dist/components/vue-ui-3d-bar.js +1 -1
  4. package/dist/components/vue-ui-age-pyramid.js +1 -1
  5. package/dist/components/vue-ui-annotator.js +1 -1
  6. package/dist/components/vue-ui-bullet.js +1 -1
  7. package/dist/components/vue-ui-bump.js +1 -1
  8. package/dist/components/vue-ui-candlestick.js +1 -1
  9. package/dist/components/vue-ui-carousel-table.js +1 -1
  10. package/dist/components/vue-ui-chestnut.js +1 -1
  11. package/dist/components/vue-ui-chord.js +1 -1
  12. package/dist/components/vue-ui-circle-pack.js +1 -1
  13. package/dist/components/vue-ui-cursor.js +1 -1
  14. package/dist/components/vue-ui-dag.js +1 -1
  15. package/dist/components/vue-ui-dashboard.js +1 -1
  16. package/dist/components/vue-ui-digits.js +1 -1
  17. package/dist/components/vue-ui-donut-evolution.js +1 -1
  18. package/dist/components/vue-ui-donut.js +1 -1
  19. package/dist/components/vue-ui-dumbbell.js +1 -1
  20. package/dist/components/vue-ui-flow.js +1 -1
  21. package/dist/components/vue-ui-funnel.js +1 -1
  22. package/dist/components/vue-ui-galaxy.js +1 -1
  23. package/dist/components/vue-ui-gauge.js +1 -1
  24. package/dist/components/vue-ui-geo.js +1 -1
  25. package/dist/components/vue-ui-gizmo.js +1 -1
  26. package/dist/components/vue-ui-graph.js +1 -1
  27. package/dist/components/vue-ui-heatmap.js +1 -1
  28. package/dist/components/vue-ui-hill.js +1 -1
  29. package/dist/components/vue-ui-history-plot.js +1 -1
  30. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  31. package/dist/components/vue-ui-kpi.js +1 -1
  32. package/dist/components/vue-ui-mini-loader.js +1 -1
  33. package/dist/components/vue-ui-molecule.js +1 -1
  34. package/dist/components/vue-ui-mood-radar.js +1 -1
  35. package/dist/components/vue-ui-nested-donuts.js +1 -1
  36. package/dist/components/vue-ui-onion.js +1 -1
  37. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  38. package/dist/components/vue-ui-quadrant.js +1 -1
  39. package/dist/components/vue-ui-quick-chart.js +1 -1
  40. package/dist/components/vue-ui-radar.js +1 -1
  41. package/dist/components/vue-ui-rating.js +1 -1
  42. package/dist/components/vue-ui-relation-circle.js +1 -1
  43. package/dist/components/vue-ui-ridgeline.js +1 -1
  44. package/dist/components/vue-ui-rings.js +1 -1
  45. package/dist/components/vue-ui-scatter.js +1 -1
  46. package/dist/components/vue-ui-skeleton.js +1 -1
  47. package/dist/components/vue-ui-smiley.js +1 -1
  48. package/dist/components/vue-ui-spark-trend.js +1 -1
  49. package/dist/components/vue-ui-sparkbar.js +1 -1
  50. package/dist/components/vue-ui-sparkgauge.js +1 -1
  51. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  52. package/dist/components/vue-ui-sparkline.js +1 -1
  53. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  54. package/dist/components/vue-ui-stackbar.js +1 -1
  55. package/dist/components/vue-ui-stackline.js +1 -1
  56. package/dist/components/vue-ui-strip-plot.js +1 -1
  57. package/dist/components/vue-ui-table-heatmap.js +1 -1
  58. package/dist/components/vue-ui-table-sparkline.js +1 -1
  59. package/dist/components/vue-ui-table.js +1 -1
  60. package/dist/components/vue-ui-thermometer.js +1 -1
  61. package/dist/components/vue-ui-timer.js +1 -1
  62. package/dist/components/vue-ui-tiremarks.js +1 -1
  63. package/dist/components/vue-ui-treemap.js +1 -1
  64. package/dist/components/vue-ui-vertical-bar.js +1 -1
  65. package/dist/components/vue-ui-waffle.js +1 -1
  66. package/dist/components/vue-ui-wheel.js +1 -1
  67. package/dist/components/vue-ui-word-cloud.js +1 -1
  68. package/dist/components/vue-ui-world.js +1 -1
  69. package/dist/components/vue-ui-xy-canvas.js +1 -1
  70. package/dist/components/vue-ui-xy.js +1 -1
  71. package/dist/geoProjections-CX3Pvo1N.js +1 -0
  72. package/dist/llms.txt +9 -34
  73. package/dist/package-CX7pZToh.js +1 -0
  74. package/dist/pdf-CVdqBWVS.js +1 -0
  75. package/dist/{render-common-B-s2XJ_I.js → render-common-DwEiRIJ0.js} +1 -1
  76. package/dist/ssr/vue-ui-donut.js +1 -1
  77. package/dist/ssr/vue-ui-xy.js +1 -1
  78. package/dist/ssr.js +1 -1
  79. package/dist/style.css +1 -1
  80. package/dist/{useHints-BH9r_0Vd.js → useHints-C-TwxM0Y.js} +1 -1
  81. package/dist/{useObjectBindings-DiMX4HGv.js → useObjectBindings-C15PEyQD.js} +1 -1
  82. package/dist/{usePrinter-sVoTzet1.js → usePrinter-DVf3YcG5.js} +1 -1
  83. package/dist/useSvgLabelLayout-42Kats14.js +1 -0
  84. package/dist/utils.js +1 -1
  85. package/dist/vue-data-ui-CORn0LF6.js +1 -0
  86. package/dist/vue-data-ui.js +1 -1
  87. package/dist/{vue-ui-3d-bar-CkHFiFp4.js → vue-ui-3d-bar-CJTKyv3A.js} +2 -2
  88. package/dist/{vue-ui-age-pyramid-vpIjdLg5.js → vue-ui-age-pyramid-6uZzf1w6.js} +1 -1
  89. package/dist/{vue-ui-annotator-CdCDYzdK.js → vue-ui-annotator-DCJdieNC.js} +3 -3
  90. package/dist/{vue-ui-bullet-rgxGRR1p.js → vue-ui-bullet-CsJcLhmV.js} +2 -2
  91. package/dist/{vue-ui-bump-CeDsunDi.js → vue-ui-bump-DXpxBWp_.js} +2 -2
  92. package/dist/{vue-ui-candlestick-KJHOS5F7.js → vue-ui-candlestick-Bn_RSZ0k.js} +2 -2
  93. package/dist/{vue-ui-carousel-table-CeI5SIxH.js → vue-ui-carousel-table-ChNykS-r.js} +1 -1
  94. package/dist/vue-ui-chestnut-DMYQTkxM.js +1 -0
  95. package/dist/{vue-ui-chord-8rk7304-.js → vue-ui-chord-Pp0U0-zV.js} +2 -2
  96. package/dist/{vue-ui-circle-pack-BsH09EPG.js → vue-ui-circle-pack-We23fOaF.js} +2 -2
  97. package/dist/{vue-ui-cursor-Cpov2m58.js → vue-ui-cursor-3-RTIIl-.js} +1 -1
  98. package/dist/{vue-ui-dag-BHFL2cUA.js → vue-ui-dag-5fVnwEXd.js} +2 -2
  99. package/dist/{vue-ui-dashboard-BxXdhdNJ.js → vue-ui-dashboard-Dlwnintv.js} +1 -1
  100. package/dist/{vue-ui-digits-xHOLjA2_.js → vue-ui-digits-ZMK0aBxE.js} +1 -1
  101. package/dist/{vue-ui-donut-Vbp5Xs2-.js → vue-ui-donut-CmLo1r4-.js} +2 -2
  102. package/dist/{vue-ui-donut-evolution-BTmztL3Y.js → vue-ui-donut-evolution-CYvo7Cww.js} +2 -2
  103. package/dist/vue-ui-donut-j1bv0KyD.js +22 -0
  104. package/dist/{vue-ui-dumbbell-CDcgKS2A.js → vue-ui-dumbbell-DigrSGwq.js} +2 -2
  105. package/dist/{vue-ui-flow-kVocPE27.js → vue-ui-flow-D9cc9yXD.js} +2 -2
  106. package/dist/vue-ui-funnel-U88Hs0nL.js +1 -0
  107. package/dist/{vue-ui-galaxy-hP-9mVlB.js → vue-ui-galaxy-B1Vuz8CA.js} +1 -1
  108. package/dist/{vue-ui-gauge-BRabsLkh.js → vue-ui-gauge-1MgZSPXt.js} +1 -1
  109. package/dist/{vue-ui-geo-Dacnp6iw.js → vue-ui-geo-BV8ARcaX.js} +1 -1
  110. package/dist/{vue-ui-gizmo-Dp3hpHIX.js → vue-ui-gizmo-DtsERB-E.js} +1 -1
  111. package/dist/{vue-ui-graph-DHU9hUry.js → vue-ui-graph-BVTPTDl5.js} +2 -2
  112. package/dist/{vue-ui-heatmap-kPnmZgWi.js → vue-ui-heatmap-6YwaVr3F.js} +1 -1
  113. package/dist/{vue-ui-hill-Ddbup7-b.js → vue-ui-hill-BvrNT8KZ.js} +1 -1
  114. package/dist/{vue-ui-history-plot-CwO2o-2s.js → vue-ui-history-plot-CJIILQPt.js} +2 -2
  115. package/dist/{vue-ui-horizontal-bar-CvX77vE4.js → vue-ui-horizontal-bar-Dfo-kTqg.js} +2 -2
  116. package/dist/{vue-ui-kpi-CCOOwX_Q.js → vue-ui-kpi-DHfExr9d.js} +1 -1
  117. package/dist/{vue-ui-mini-loader-7gqQI5jy.js → vue-ui-mini-loader-Bbupx66Y.js} +1 -1
  118. package/dist/vue-ui-molecule-C8e5IeHG.js +1 -0
  119. package/dist/{vue-ui-mood-radar-GJ-lhgI0.js → vue-ui-mood-radar-DsnT2U65.js} +1 -1
  120. package/dist/{vue-ui-nested-donuts-CrlPwpg8.js → vue-ui-nested-donuts-JkpqMhuL.js} +2 -2
  121. package/dist/{vue-ui-onion-CKmyy-Y_.js → vue-ui-onion-CIA2tlff.js} +2 -2
  122. package/dist/{vue-ui-parallel-coordinate-plot-C0UqWt0M.js → vue-ui-parallel-coordinate-plot-Bcr3B3NI.js} +2 -2
  123. package/dist/{vue-ui-quadrant-CTGFBNo9.js → vue-ui-quadrant-DKVFawhC.js} +2 -2
  124. package/dist/{vue-ui-quick-chart-ZBOPZhxA.js → vue-ui-quick-chart-Bk2N8Hmd.js} +2 -2
  125. package/dist/{vue-ui-radar-B1z3Ux3E.js → vue-ui-radar-CdH-BFKA.js} +1 -1
  126. package/dist/{vue-ui-rating-CV2b0tjA.js → vue-ui-rating-ChWXrWNJ.js} +1 -1
  127. package/dist/{vue-ui-relation-circle-DqN5N08e.js → vue-ui-relation-circle-COZpOybS.js} +1 -1
  128. package/dist/{vue-ui-ridgeline-DcSB5Qef.js → vue-ui-ridgeline-MLknaTUO.js} +2 -2
  129. package/dist/{vue-ui-rings-CJqAnf-l.js → vue-ui-rings-ARqLCM_P.js} +1 -1
  130. package/dist/{vue-ui-scatter-THQAeoWs.js → vue-ui-scatter-CX2wsXdE.js} +2 -2
  131. package/dist/{vue-ui-skeleton-DqmhigQ0.js → vue-ui-skeleton-wyvAru88.js} +1 -1
  132. package/dist/{vue-ui-smiley-VTdQetY0.js → vue-ui-smiley--VTlUAdp.js} +1 -1
  133. package/dist/{vue-ui-spark-trend-B2Nf1raK.js → vue-ui-spark-trend-C02PmIq_.js} +1 -1
  134. package/dist/{vue-ui-sparkbar-CamZ_49V.js → vue-ui-sparkbar-CjD57-Xi.js} +1 -1
  135. package/dist/{vue-ui-sparkgauge-Ffrp_7VV.js → vue-ui-sparkgauge-8Eia8T2W.js} +1 -1
  136. package/dist/{vue-ui-sparkhistogram-CLfzi3PO.js → vue-ui-sparkhistogram-C-0f7XCl.js} +1 -1
  137. package/dist/{vue-ui-sparkline-Y-sljnbS.js → vue-ui-sparkline-BMMrpUPR.js} +1 -1
  138. package/dist/{vue-ui-sparkstackbar-CYZ-ADO1.js → vue-ui-sparkstackbar-BmgCVCKG.js} +1 -1
  139. package/dist/{vue-ui-stackbar-CQLYm10x.js → vue-ui-stackbar-G_zZRAa9.js} +2 -2
  140. package/dist/{vue-ui-stackline-VpvF7MRx.js → vue-ui-stackline-DchZoEAg.js} +2 -2
  141. package/dist/{vue-ui-strip-plot-B9Ogpw7K.js → vue-ui-strip-plot-DVyPa3sp.js} +2 -2
  142. package/dist/{vue-ui-table-heatmap-BtziURiu.js → vue-ui-table-heatmap-DzvPQnY9.js} +1 -1
  143. package/dist/{vue-ui-table-Bi9C3LzP.js → vue-ui-table-qTF_q-Qu.js} +1 -1
  144. package/dist/{vue-ui-table-sparkline-DEVAL0cR.js → vue-ui-table-sparkline-B2Q-7-GQ.js} +1 -1
  145. package/dist/{vue-ui-thermometer-ClN4EO0I.js → vue-ui-thermometer-CxNoxslq.js} +1 -1
  146. package/dist/{vue-ui-timer-nqZxt1vU.js → vue-ui-timer-DRjoRidI.js} +2 -2
  147. package/dist/{vue-ui-tiremarks-BeJBsgXo.js → vue-ui-tiremarks-BC_YGp3T.js} +1 -1
  148. package/dist/{vue-ui-treemap-FA-yXwmv.js → vue-ui-treemap-CNM5ohoO.js} +1 -1
  149. package/dist/{vue-ui-waffle-CO07S6HV.js → vue-ui-waffle-BiJshI4O.js} +1 -1
  150. package/dist/{vue-ui-wheel-BeaSWB4x.js → vue-ui-wheel-BxR0_iNZ.js} +1 -1
  151. package/dist/{vue-ui-word-cloud-C1OWGFng.js → vue-ui-word-cloud-CZzC3R1K.js} +2 -2
  152. package/dist/{vue-ui-world-CUS_mKgl.js → vue-ui-world-CJgt0ESz.js} +2 -2
  153. package/dist/vue-ui-xy-B6XNUCzQ.js +24 -0
  154. package/dist/{vue-ui-xy-BigPHE0Q.js → vue-ui-xy-DrKVPSg7.js} +1 -1
  155. package/dist/{vue-ui-xy-canvas-CeC3gcrW.js → vue-ui-xy-canvas-Do4P4ajB.js} +2 -2
  156. package/package.json +141 -131
  157. package/dist/geoProjections-Bvj-eMvq.js +0 -1
  158. package/dist/package-DwcKiXuI.js +0 -1
  159. package/dist/pdf-DAicVFxx.js +0 -1
  160. package/dist/useSvgLabelLayout-D1I8sQUi.js +0 -1
  161. package/dist/vue-data-ui-BvHCscNE.js +0 -1
  162. package/dist/vue-ui-chestnut-CiY-2e77.js +0 -1
  163. package/dist/vue-ui-donut-CR3klUbX.js +0 -22
  164. package/dist/vue-ui-funnel-CZAdPYqK.js +0 -1
  165. package/dist/vue-ui-molecule-BPGs9Dom.js +0 -1
  166. package/dist/vue-ui-xy-6B_K-quN.js +0 -24
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Ct as r,D as i,Dt as a,F as o,Ht as s,Jt as c,P as l,Qt as u,S as d,X as f,_ as p,at as m,b as h,i as g,in as ee,jt as te,nt as ne,pt as re,t as ie,tn as ae,v as oe,w as se,yt as ce,zt as le}from"./lib-rPeBMZrn.js";import{n as ue,t as de}from"./BaseScanner-8NdoBs7B.js";import{n as fe,t as pe}from"./useHints-BH9r_0Vd.js";import{t as me}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as he}from"./resolveChartConfig-CIhClE5R.js";import{t as ge}from"./img-D4RQwASc.js";import{n as _e}from"./Title-BliHuXfT.js";import{t as ve}from"./useChartExport-BZts4KFb.js";import{n as ye,t as be}from"./tableIntegration-CNoJ1CIY.js";import{n as xe,t as Se}from"./annotationSlots-BRR85CqJ.js";import{n as Ce,t as we}from"./userOptionsSlots-DYuo-E5m.js";import{t as Te}from"./usePrinter-sVoTzet1.js";import{t as Ee}from"./useTransitions-ChGGrtrv.js";import{t as De}from"./useSvgLabelLayout-D1I8sQUi.js";import{t as Oe}from"./Shape-CRe8woTu.js";import{t as ke}from"./useResponsive-CENUxfEL.js";import{t as Ae}from"./DefGrad-DKMq1REY.js";import{t as je}from"./BaseLegendToggle-Q3TiW9u1.js";import{t as Me}from"./A11yDataTable-DWNlWXzs.js";import{t as Ne}from"./useUserOptionState-CXlFnwPv.js";import{t as Pe}from"./useChartAccessibility-DOMuYJfm.js";import{t as Fe}from"./Legend-DM0ClX3D.js";import{t as Ie}from"./vue_ui_scatter-C50uFYQL.js";import{Fragment as _,Teleport as Le,computed as v,createBlock as y,createCommentVNode as b,createElementBlock as x,createElementVNode as S,createSlots as Re,createTextVNode as ze,createVNode as Be,defineAsyncComponent as Ve,guardReactiveProps as He,mergeProps as Ue,nextTick as We,normalizeClass as Ge,normalizeProps as Ke,normalizeStyle as qe,onBeforeUnmount as Je,onMounted as Ye,openBlock as C,ref as w,renderList as T,renderSlot as E,resolveDynamicComponent as Xe,shallowRef as Ze,toDisplayString as D,toRefs as Qe,unref as O,watch as $e,withCtx as k}from"vue";var et=/* @__PURE__ */ e({default:()=>wn}),tt=[`id`],nt=[`id`],rt={key:0,class:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`},it=[`id`],at={style:{position:`relative`}},ot=[`xmlns`,`aria-describedby`,`viewBox`],st=[`width`,`height`],ct={key:1},lt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ut=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],dt={key:2},ft=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],pt=[`opacity`],mt=[`stroke`,`stroke-width`,`d`],ht=[`transform`,`font-size`,`fill`,`stroke`],gt={key:4},_t=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],vt=[`opacity`],yt=[`d`,`stroke`,`stroke-width`],bt=[`transform`,`font-size`,`fill`,`stroke`],xt={key:6},St=[`x`,`y`,`width`,`height`,`fill`,`stroke`,`stroke-width`,`rx`],Ct=[`x`,`y`,`width`,`height`,`onMouseenter`],wt={key:2,style:{"pointer-events":`none`}},Tt=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`],Et=[`x1`,`x2`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Dt=[`x1`,`x2`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Ot=[`x`,`y`,`height`,`width`,`fill`,`stroke`,`stroke-width`,`rx`],kt=[`x`,`y`,`width`,`height`,`onMouseenter`],At={key:2,style:{"pointer-events":`none`}},jt=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`],Mt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Nt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Pt={key:0,style:{"pointer-events":`none`}},Ft=[`d`,`stroke`,`stroke-width`],It=[`d`,`stroke`,`stroke-width`],Lt=[`d`,`stroke`,`stroke-width`],Rt=[`d`,`stroke`,`stroke-width`],zt={key:7},Bt=[`points`,`fill`,`stroke-width`,`stroke-dasharray`,`stroke`],Vt={key:0,class:`vue-ui-scatter-datapoint`},Ht=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onMouseover`,`onMouseleave`,`onClick`],Ut={key:1},Wt=[`transform`,`font-size`,`fill`,`onMouseover`,`onMouseleave`,`onClick`],Gt=[`d`,`fill`,`stroke`,`stroke-width`,`stroke-opacity`],Kt={key:0,style:{"pointer-events":`none`}},qt=[`x`,`y`,`width`,`height`],Jt={key:0,style:{"pointer-events":`none !important`}},Yt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Xt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Zt=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],Qt=[`x`,`y`,`font-size`,`fill`,`font-weight`],$t=[`x`,`y`,`font-size`,`fill`],en=[`x`,`y`,`font-size`,`fill`],tn=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],nn=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],rn=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],an=[`id`,`transform`,`font-size`,`font-weight`,`fill`],on=[`font-size`,`fill`,`transform`],sn=[`transform`,`font-size`,`fill`],cn=[`x`,`y`,`font-size`,`fill`],ln=[`x`,`y`,`font-size`,`fill`],un=[`font-size`,`font-weight`,`fill`,`x`,`y`],dn=[`id`],fn=[`x`,`y`,`width`,`height`],pn={key:14,style:{pointerEvents:`none`}},mn=[`x1`,`x2`,`y1`,`y2`,`stroke-dasharray`,`stroke`,`stroke-width`,`clip-path`],hn=[`x`,`y`,`fill`,`font-size`,`font-weight`],gn={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},_n={key:6,class:`vue-data-ui-watermark`},vn=[`id`],yn=[`onClick`],bn={key:0,style:{width:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`}},xn={viewBox:`0 0 20 20`,height:`20`,width:`20`,style:{overflow:`hidden`,background:`transparent`}},Sn={key:0},Cn=[`innerHTML`],wn=/*#__PURE__*/ me({__name:`vue-ui-scatter`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`,`selectLegend`],setup(e,{expose:me,emit:et}){let wn=Ve(()=>import(`./Tooltip-C1q0Qoh7.js`)),Tn=Ve(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),En=Ve(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),Dn=Ve(()=>import(`./DataTable-0Vv-aGHD.js`)),On=Ve(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),kn=Ve(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),An=Ve(()=>import(`./PackageVersion-BIhjLNBU.js`).then(e=>e.t)),jn=Ve(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),{vue_ui_scatter:Mn}=t(),A=e,Nn=et,Pn=v(()=>!!A.dataset&&A.dataset.length),j=w(f()),Fn=w(!1),In=w(``),Ln=w(0),Rn=w(null),zn=w(null),Bn=w(null),Vn=w(null),Hn=w(null),Un=w(0),Wn=w(0),Gn=w(0),M=w([]),Kn=w(!1),qn=w(null),Jn=w(null),Yn=w(null),Xn=w(null),Zn=w(null),Qn=w(null),$n=w(null),er=w(null),tr=w(null),nr=w(null),rr=w(null),ir=w({x:0,y:0}),ar=w(`pointer`),or=w(!1),sr=w(null),N=w(br()),P=v(()=>N.value.userOptions),F=v(()=>N.value.style.layout.dataLabels.xAxis),I=v(()=>N.value.style.layout.dataLabels.yAxis),L=v(()=>N.value.style.layout.marginalBars),R=v(()=>N.value.style.layout.plots),z=v(()=>N.value.style.tooltip),B=v(()=>N.value.style);fe({config:()=>N.value,dataset:()=>A.dataset,component:`VueUiScatter`,rules:[pe.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series (clusters) is > 6. Consider:`,``,``,`▶️ Using filters to let users choose a maximum number of series (clusters) to display.`]}]});let{transitionEnabled:cr}=Ee({config:()=>N.value.transitions,dataset:()=>A.dataset}),lr=v(()=>N.value.userOptions.useCursorPointer),ur=v(()=>a(N.value.events?.datapointClick));function dr(e=100,t=.8,n={}){let{meanX:r=0,sdX:i=1,meanY:a=0,sdY:o=1,seed:s}=n,c=(s??Math.floor(Math.random()*2**31))>>>0,l=()=>(c=c*1664525+1013904223>>>0,c/2**32),u=()=>{let e=0,t=0;for(;e===0;)e=l();for(;t===0;)t=l();return Math.sqrt(-2*Math.log(e))*Math.cos(2*Math.PI*t)},d=e/2,f=Array.from({length:d},u),p=Array.from({length:d},u),m=e=>e.reduce((e,t)=>e+t,0)/e.length,h=m(f),g=m(p);for(let e=0;e<d;e+=1)f[e]-=h,p[e]-=g;let ee=(e,t)=>e.reduce((e,n,r)=>e+n*t[r],0),te=e=>ee(e,e),ne=ee(p,f)/te(f),re=p.map((e,t)=>e-ne*f[t]),ie=te(f)/d,ae=te(re)/d,oe=Math.sqrt((1-t*t)*ie/ae),se=f.map((e,n)=>t*e+oe*re[n]),ce=f.concat(f.map(e=>-e)),le=se.concat(se.map(e=>-e)),ue=e=>Math.sqrt(te(e)/e.length),de=(e,t,n)=>{let r=ue(e);return e.map(e=>n+(r?e/r*t:0))},fe=de(ce,i,r),pe=de(le,o,a);for(let e=fe.length-1;e>0;--e){let t=Math.floor(l()*(e+1));[fe[e],fe[t]]=[fe[t],fe[e]],[pe[e],pe[t]]=[pe[t],pe[e]]}return fe.map((e,t)=>({x:e,y:pe[t]}))}let fr=v(()=>ee({defaultConfig:{userOptions:{show:!1},table:{show:!1},useCssAnimation:!1,style:{backgroundColor:`#99999930`,layout:{axis:{stroke:`#6A6A6A`},correlation:{label:{show:!1}},dataLabels:{xAxis:{show:!1},yAxis:{show:!1}},marginalBars:{fill:`#99999960`},padding:{top:12,right:12,bottom:12,left:12},plots:{stroke:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}},userConfig:N.value.skeletonConfig??{}})),{loading:pr,FINAL_DATASET:mr,manualLoading:hr}=ue({...Qe(A),FINAL_CONFIG:N,prepareConfig:br,skeletonDataset:A.config?.skeletonDataset??[{name:``,color:`#999999`,values:dr(100,.5,{seed:42})}],skeletonConfig:ee({defaultConfig:N.value,userConfig:fr.value})}),{userOptionsVisible:gr,setUserOptionsVisibility:_r,keepUserOptionState:vr}=Ne({config:N.value}),{svgRef:yr}=Pe({config:B.value.title});function br(){return he(A.config,Mn,Ie)}let xr=u(A.config);$e(()=>A.config,(e,t)=>{let n=u(e),r=n!==xr;xr=n;let i=br();r?(pr.value||(N.value=i),gr.value=!N.value.userOptions.showOnChartHover,Dr(),Un.value+=1,Wn.value+=1,Gn.value+=1,V.value.showTable=N.value.table.show,V.value.showTooltip=z.value.show,Er.value&&N.value.usePerformanceMode&&console.warn(`VueUiScatter : You are using performance mode
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Ct as r,D as i,Dt as a,F as o,Ht as s,Jt as c,P as l,Qt as u,S as d,X as f,_ as p,at as m,b as h,i as g,in as ee,jt as te,nt as ne,pt as re,t as ie,tn as ae,v as oe,w as se,yt as ce,zt as le}from"./lib-rPeBMZrn.js";import{n as ue,t as de}from"./BaseScanner-8NdoBs7B.js";import{n as fe,t as pe}from"./useHints-C-TwxM0Y.js";import{t as me}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as he}from"./resolveChartConfig-CIhClE5R.js";import{t as ge}from"./img-D4RQwASc.js";import{n as _e}from"./Title-BliHuXfT.js";import{t as ve}from"./useChartExport-BZts4KFb.js";import{n as ye,t as be}from"./tableIntegration-CNoJ1CIY.js";import{n as xe,t as Se}from"./annotationSlots-BRR85CqJ.js";import{n as Ce,t as we}from"./userOptionsSlots-DYuo-E5m.js";import{t as Te}from"./usePrinter-DVf3YcG5.js";import{t as Ee}from"./useTransitions-ChGGrtrv.js";import{t as De}from"./useSvgLabelLayout-42Kats14.js";import{t as Oe}from"./Shape-CRe8woTu.js";import{t as ke}from"./useResponsive-CENUxfEL.js";import{t as Ae}from"./DefGrad-DKMq1REY.js";import{t as je}from"./BaseLegendToggle-Q3TiW9u1.js";import{t as Me}from"./A11yDataTable-DWNlWXzs.js";import{t as Ne}from"./useUserOptionState-CXlFnwPv.js";import{t as Pe}from"./useChartAccessibility-DOMuYJfm.js";import{t as Fe}from"./Legend-DM0ClX3D.js";import{t as Ie}from"./vue_ui_scatter-C50uFYQL.js";import{Fragment as _,Teleport as Le,computed as v,createBlock as y,createCommentVNode as b,createElementBlock as x,createElementVNode as S,createSlots as Re,createTextVNode as ze,createVNode as Be,defineAsyncComponent as Ve,guardReactiveProps as He,mergeProps as Ue,nextTick as We,normalizeClass as Ge,normalizeProps as Ke,normalizeStyle as qe,onBeforeUnmount as Je,onMounted as Ye,openBlock as C,ref as w,renderList as T,renderSlot as E,resolveDynamicComponent as Xe,shallowRef as Ze,toDisplayString as D,toRefs as Qe,unref as O,watch as $e,withCtx as k}from"vue";var et=/* @__PURE__ */ e({default:()=>wn}),tt=[`id`],nt=[`id`],rt={key:0,class:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`},it=[`id`],at={style:{position:`relative`}},ot=[`xmlns`,`aria-describedby`,`viewBox`],st=[`width`,`height`],ct={key:1},lt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ut=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],dt={key:2},ft=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],pt=[`opacity`],mt=[`stroke`,`stroke-width`,`d`],ht=[`transform`,`font-size`,`fill`,`stroke`],gt={key:4},_t=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],vt=[`opacity`],yt=[`d`,`stroke`,`stroke-width`],bt=[`transform`,`font-size`,`fill`,`stroke`],xt={key:6},St=[`x`,`y`,`width`,`height`,`fill`,`stroke`,`stroke-width`,`rx`],Ct=[`x`,`y`,`width`,`height`,`onMouseenter`],wt={key:2,style:{"pointer-events":`none`}},Tt=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`],Et=[`x1`,`x2`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Dt=[`x1`,`x2`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Ot=[`x`,`y`,`height`,`width`,`fill`,`stroke`,`stroke-width`,`rx`],kt=[`x`,`y`,`width`,`height`,`onMouseenter`],At={key:2,style:{"pointer-events":`none`}},jt=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`],Mt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Nt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Pt={key:0,style:{"pointer-events":`none`}},Ft=[`d`,`stroke`,`stroke-width`],It=[`d`,`stroke`,`stroke-width`],Lt=[`d`,`stroke`,`stroke-width`],Rt=[`d`,`stroke`,`stroke-width`],zt={key:7},Bt=[`points`,`fill`,`stroke-width`,`stroke-dasharray`,`stroke`],Vt={key:0,class:`vue-ui-scatter-datapoint`},Ht=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onMouseover`,`onMouseleave`,`onClick`],Ut={key:1},Wt=[`transform`,`font-size`,`fill`,`onMouseover`,`onMouseleave`,`onClick`],Gt=[`d`,`fill`,`stroke`,`stroke-width`,`stroke-opacity`],Kt={key:0,style:{"pointer-events":`none`}},qt=[`x`,`y`,`width`,`height`],Jt={key:0,style:{"pointer-events":`none !important`}},Yt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Xt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Zt=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],Qt=[`x`,`y`,`font-size`,`fill`,`font-weight`],$t=[`x`,`y`,`font-size`,`fill`],en=[`x`,`y`,`font-size`,`fill`],tn=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],nn=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],rn=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],an=[`id`,`transform`,`font-size`,`font-weight`,`fill`],on=[`font-size`,`fill`,`transform`],sn=[`transform`,`font-size`,`fill`],cn=[`x`,`y`,`font-size`,`fill`],ln=[`x`,`y`,`font-size`,`fill`],un=[`font-size`,`font-weight`,`fill`,`x`,`y`],dn=[`id`],fn=[`x`,`y`,`width`,`height`],pn={key:14,style:{pointerEvents:`none`}},mn=[`x1`,`x2`,`y1`,`y2`,`stroke-dasharray`,`stroke`,`stroke-width`,`clip-path`],hn=[`x`,`y`,`fill`,`font-size`,`font-weight`],gn={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},_n={key:6,class:`vue-data-ui-watermark`},vn=[`id`],yn=[`onClick`],bn={key:0,style:{width:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`}},xn={viewBox:`0 0 20 20`,height:`20`,width:`20`,style:{overflow:`hidden`,background:`transparent`}},Sn={key:0},Cn=[`innerHTML`],wn=/*#__PURE__*/ me({__name:`vue-ui-scatter`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`,`selectLegend`],setup(e,{expose:me,emit:et}){let wn=Ve(()=>import(`./Tooltip-C1q0Qoh7.js`)),Tn=Ve(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),En=Ve(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),Dn=Ve(()=>import(`./DataTable-0Vv-aGHD.js`)),On=Ve(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),kn=Ve(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),An=Ve(()=>import(`./PackageVersion-DhptF5oD.js`).then(e=>e.t)),jn=Ve(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),{vue_ui_scatter:Mn}=t(),A=e,Nn=et,Pn=v(()=>!!A.dataset&&A.dataset.length),j=w(f()),Fn=w(!1),In=w(``),Ln=w(0),Rn=w(null),zn=w(null),Bn=w(null),Vn=w(null),Hn=w(null),Un=w(0),Wn=w(0),Gn=w(0),M=w([]),Kn=w(!1),qn=w(null),Jn=w(null),Yn=w(null),Xn=w(null),Zn=w(null),Qn=w(null),$n=w(null),er=w(null),tr=w(null),nr=w(null),rr=w(null),ir=w({x:0,y:0}),ar=w(`pointer`),or=w(!1),sr=w(null),N=w(br()),P=v(()=>N.value.userOptions),F=v(()=>N.value.style.layout.dataLabels.xAxis),I=v(()=>N.value.style.layout.dataLabels.yAxis),L=v(()=>N.value.style.layout.marginalBars),R=v(()=>N.value.style.layout.plots),z=v(()=>N.value.style.tooltip),B=v(()=>N.value.style);fe({config:()=>N.value,dataset:()=>A.dataset,component:`VueUiScatter`,rules:[pe.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series (clusters) is > 6. Consider:`,``,``,`▶️ Using filters to let users choose a maximum number of series (clusters) to display.`]}]});let{transitionEnabled:cr}=Ee({config:()=>N.value.transitions,dataset:()=>A.dataset}),lr=v(()=>N.value.userOptions.useCursorPointer),ur=v(()=>a(N.value.events?.datapointClick));function dr(e=100,t=.8,n={}){let{meanX:r=0,sdX:i=1,meanY:a=0,sdY:o=1,seed:s}=n,c=(s??Math.floor(Math.random()*2**31))>>>0,l=()=>(c=c*1664525+1013904223>>>0,c/2**32),u=()=>{let e=0,t=0;for(;e===0;)e=l();for(;t===0;)t=l();return Math.sqrt(-2*Math.log(e))*Math.cos(2*Math.PI*t)},d=e/2,f=Array.from({length:d},u),p=Array.from({length:d},u),m=e=>e.reduce((e,t)=>e+t,0)/e.length,h=m(f),g=m(p);for(let e=0;e<d;e+=1)f[e]-=h,p[e]-=g;let ee=(e,t)=>e.reduce((e,n,r)=>e+n*t[r],0),te=e=>ee(e,e),ne=ee(p,f)/te(f),re=p.map((e,t)=>e-ne*f[t]),ie=te(f)/d,ae=te(re)/d,oe=Math.sqrt((1-t*t)*ie/ae),se=f.map((e,n)=>t*e+oe*re[n]),ce=f.concat(f.map(e=>-e)),le=se.concat(se.map(e=>-e)),ue=e=>Math.sqrt(te(e)/e.length),de=(e,t,n)=>{let r=ue(e);return e.map(e=>n+(r?e/r*t:0))},fe=de(ce,i,r),pe=de(le,o,a);for(let e=fe.length-1;e>0;--e){let t=Math.floor(l()*(e+1));[fe[e],fe[t]]=[fe[t],fe[e]],[pe[e],pe[t]]=[pe[t],pe[e]]}return fe.map((e,t)=>({x:e,y:pe[t]}))}let fr=v(()=>ee({defaultConfig:{userOptions:{show:!1},table:{show:!1},useCssAnimation:!1,style:{backgroundColor:`#99999930`,layout:{axis:{stroke:`#6A6A6A`},correlation:{label:{show:!1}},dataLabels:{xAxis:{show:!1},yAxis:{show:!1}},marginalBars:{fill:`#99999960`},padding:{top:12,right:12,bottom:12,left:12},plots:{stroke:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}},userConfig:N.value.skeletonConfig??{}})),{loading:pr,FINAL_DATASET:mr,manualLoading:hr}=ue({...Qe(A),FINAL_CONFIG:N,prepareConfig:br,skeletonDataset:A.config?.skeletonDataset??[{name:``,color:`#999999`,values:dr(100,.5,{seed:42})}],skeletonConfig:ee({defaultConfig:N.value,userConfig:fr.value})}),{userOptionsVisible:gr,setUserOptionsVisibility:_r,keepUserOptionState:vr}=Ne({config:N.value}),{svgRef:yr}=Pe({config:B.value.title});function br(){return he(A.config,Mn,Ie)}let xr=u(A.config);$e(()=>A.config,(e,t)=>{let n=u(e),r=n!==xr;xr=n;let i=br();r?(pr.value||(N.value=i),gr.value=!N.value.userOptions.showOnChartHover,Dr(),Un.value+=1,Wn.value+=1,Gn.value+=1,V.value.showTable=N.value.table.show,V.value.showTooltip=z.value.show,Er.value&&N.value.usePerformanceMode&&console.warn(`VueUiScatter : You are using performance mode
2
2
 
3
3
  - downsampling is disabled in this mode, all plots are rendered
4
4
 
@@ -6,4 +6,4 @@ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO
6
6
 
7
7
  - Depending on plot density, shapes might not display a border (stroke) to avoid fuzziness
8
8
 
9
- ℹ️ To remove this warning, set config.debug to false.`)):(N.value.style.tooltip=i.style.tooltip,V.value.showTooltip=N.value.style.tooltip.show)},{deep:!0}),$e(()=>A.dataset,e=>{Array.isArray(e)&&e.length>0&&(hr.value=!1)},{deep:!0});let Sr=Ze(null),Cr=Ze(null),wr=w(!1),Tr=0;Ye(async()=>{Dr(),await We(),Kn.value=!0});let Er=v(()=>N.value.debug);function Dr(){le(A.dataset)&&(m({componentName:`VueUiScatter`,type:`dataset`,debug:Er.value}),hr.value=!0),le(A.dataset)||(hr.value=N.value.loading),N.value.responsive&&(Sr.value&&(Cr.value&&Sr.value.unobserve(Cr.value),Sr.value.disconnect()),Sr.value=new ResizeObserver(()=>{let{width:e,height:t}=ke({chart:Rn.value,title:B.value.title.text?zn.value:null,legend:B.value.legend.show?Bn.value:null,source:Vn.value,noTitle:Hn.value});cancelAnimationFrame(Tr),Tr=requestAnimationFrame(()=>{H.value.width=e,H.value.height=t,wr.value=!0})}),Cr.value=Rn.value.parentNode,Sr.value.observe(Cr.value))}Je(()=>{cancelAnimationFrame(Tr),Sr.value&&(Cr.value&&Sr.value.unobserve(Cr.value),Sr.value.disconnect())});let{isPrinting:Or,isImaging:kr,generatePdf:Ar,generateImage:jr}=Te({elementId:`vue-ui-scatter_${j.value}`,fileName:B.value.title.text||`vue-ui-scatter`,options:N.value.userOptions.print}),Mr=v(()=>N.value.userOptions.show&&!B.value.title.text),Nr=v(()=>se(N.value.customPalette)),V=w({showTable:N.value.table.show,showTooltip:z.value.show});$e(N,()=>{V.value={showTable:N.value.table.show,showTooltip:z.value.show}},{immediate:!0});let H=w({height:B.value.layout.height,width:B.value.layout.width}),Pr=v(()=>L.value.show?L.value.size+L.value.offset:0),{metrics:Fr,ready:Ir,settling:Lr,update:Rr}=De({svgRef:yr,canMeasure:()=>!N.value.responsive||wr.value,initialMetrics:{left:0,right:0,bottom:0},measure:e=>{let t=I.value.scales.show?e(tr.value).textWidth:0,n=t=>{let n=e(t);return Math.max(0,n.x+n.width-H.value.width)},r=Qn.value?n(Qn.value):0,i=F.value.scales.show&&nr.value?Math.max(0,...[...nr.value.querySelectorAll(`text`)].map(n)):0,a=Math.max(r,i);return{left:Math.max(e(Zn.value).width,t?t+12:0),right:a?a+6:0,bottom:er.value?e(er.value).height+6:0}}}),U=v(()=>{let{left:e,right:t,bottom:n}=Fr.value;return{top:B.value.layout.padding.top+Pr.value+I.value.fontSize*2,right:H.value.width-B.value.layout.padding.right-Pr.value-6-t,bottom:H.value.height-B.value.layout.padding.bottom-n,left:B.value.layout.padding.left+e,height:H.value.height-B.value.layout.padding.top-B.value.layout.padding.bottom-Pr.value-n-I.value.fontSize*2,width:H.value.width-B.value.layout.padding.left-B.value.layout.padding.right-Pr.value-e-t-6}}),zr=v(()=>{Er.value&&mr.value.forEach((e,t)=>{ce({datasetObject:e,requiredAttributes:[`values`]}).forEach(e=>{m({componentName:`VueUiScatter`,type:`datasetSerieAttribute`,property:e,index:t})}),e.values&&e.values.forEach((e,n)=>{ce({datasetObject:e,requiredAttributes:[`x`,`y`]}).forEach(e=>{m({componentName:`VueUiScatter`,type:`datasetSerieAttribute`,property:`values.${e}`,index:`${t} - ${n}`})})})});let e=Math.min(...K.value.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values.map(e=>e.x))),t=Math.max(...K.value.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values.map(e=>e.x))),n=Math.min(...K.value.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values.map(e=>e.y))),r=Math.max(...K.value.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values.map(e=>e.y)));return{xMin:e<0?e:0,xMax:t,yMin:n<0?n:0,yMax:r}}),Br=v(()=>{let e=B.value.layout.axis;return{xMin:e.xMin!==null&&e.xMin!==void 0?e.xMin:zr.value.xMin,xMax:e.xMax!==null&&e.xMax!==void 0?e.xMax:zr.value.xMax,yMin:e.yMin!==null&&e.yMin!==void 0?e.yMin:zr.value.yMin,yMax:e.yMax!==null&&e.yMax!==void 0?e.yMax:zr.value.yMax}});function Vr(e){return Number.isFinite(e)?e<2?2:Math.trunc(e):5}function Hr(e){return e.roundingValue!==void 0&&e.roundingValue!==null?e.roundingValue:e.rounding!==void 0&&e.rounding!==null?e.rounding:0}function Ur({minimum:e,maximum:t,stepCount:n,useNiceScale:r}){let i=Vr(n);if(e===t){let n=t+(e===0?1:Math.abs(e)*.01);return(r?p:oe)(e,n,i)}return(r?p:oe)(e,t,i)}let Wr=v(()=>{let e=F.value;return Ur({minimum:Br.value.xMin,maximum:Br.value.xMax,stepCount:e.scales.steps,useNiceScale:e.scales.useNiceScale})}),Gr=v(()=>{let e=I.value;return Ur({minimum:Br.value.yMin,maximum:Br.value.yMax,stepCount:e.scales.steps,useNiceScale:e.scales.useNiceScale})}),W=v(()=>({xMin:Wr.value.min,xMax:Wr.value.max,yMin:Gr.value.min,yMax:Gr.value.max})),Kr=v(()=>{let e=F.value,t=e.scales.labels;return Wr.value.ticks.map(r=>({value:r,x:Xr(r),label:g(t.formatter,h(r),n({p:R.value.selectors.labels.prefix,v:h(r),s:R.value.selectors.labels.suffix,r:Hr(e)}))}))}),qr=v(()=>{let e=I.value,t=e.scales.labels;return Gr.value.ticks.map(r=>({value:r,y:Zr(r),label:g(t.formatter,h(r),n({p:R.value.selectors.labels.prefix,v:h(r),s:R.value.selectors.labels.suffix,r:Hr(e)}))}))}),Jr=v(()=>di.value.length>0&&F.value.scales.show),Yr=v(()=>di.value.length>0&&I.value.scales.show);function Xr(e){let t=W.value.xMax-W.value.xMin;return t===0?U.value.left:U.value.left+(e-W.value.xMin)/t*U.value.width}function Zr(e){let t=W.value.yMax-W.value.yMin;return t===0?U.value.bottom:U.value.bottom-(e-W.value.yMin)/t*U.value.height}let G=v(()=>{let{xMin:e,xMax:t,yMin:n,yMax:r}=W.value,i=e>0?e:t<0?t:0,a=n>0?n:r<0?r:0;return{x:Xr(i),y:Zr(a)}}),K=v(()=>mr.value.map((e,t)=>{let n=`cluster_${j.value}_${t}`;return{...e,values:te({data:e.values,threshold:N.value.usePerformanceMode?e.values.length+1:N.value.downsample.threshold}),id:n,color:e.color?e.color:Nr.value[t]||s[t]||s[t%s.length],opacity:M.value.includes(n)?.5:1,shape:e.shape??`circle`,segregate:()=>vi(n),isSegregated:M.value.includes(n),hasGroupSelection:!!oi.value,isGroupSelected:oi.value===n,onEnter:()=>ci(n),onLeave:()=>li()}})),Qr=v(()=>({cy:`scatter-div-legend`,backgroundColor:B.value.legend.backgroundColor,color:B.value.legend.color,fontSize:B.value.legend.fontSize,paddingBottom:12,fontWeight:B.value.legend.bold?`bold`:``})),$r=v(()=>K.value.map((e,t)=>({...e,plots:e.values.map((n,r)=>({x:Xr(n.x),y:Zr(n.y),v:{...n,name:n.name||``},clusterName:e.name,clusterId:e.id,color:e.color?e.color:Nr.value[t]||s[t]||s[t%s.length],id:`plot_${j.value}_${t}_${r}`,weight:n.weight??R.value.radius}))})).filter(e=>!M.value.includes(e.id))),q=v(()=>{let e=1e-9,t=({m:t,b:n,rect:r,verticalX:i=null})=>{let{left:a,right:o,top:s,bottom:c}=r,l=[],u=(e,t)=>{Number.isFinite(e)&&Number.isFinite(t)&&l.push({x:e,y:t})},d=({x:t,y:n})=>t>=a-e&&t<=o+e&&n>=s-e&&n<=c+e;i===null?Number.isFinite(t)&&(u(a,t*a+n),u(o,t*o+n),Math.abs(t)>e?(u((s-n)/t,s),u((c-n)/t,c)):n>=s-e&&n<=c+e&&(u(a,n),u(o,n))):i>=a-e&&i<=o+e&&(u(i,s),u(i,c));let f=l.filter(d),p=[];for(let e of f)p.some(t=>Math.abs(t.x-e.x)<1e-6&&Math.abs(t.y-e.y)<1e-6)||p.push(e);if(p.length<2)return null;let m=p[0],h=p[1],g=0;for(let e=0;e<p.length;e+=1)for(let t=e+1;t<p.length;t+=1){let n=p[e].x-p[t].x,r=p[e].y-p[t].y,i=n*n+r*r;i>g&&(g=i,m=p[e],h=p[t])}return{x1:m.x,y1:m.y,x2:h.x,y2:h.y}};return $r.value.map(n=>{let r=n.plots.length,i=n.plots.reduce((e,t)=>e+t.x,0)/r,a=n.plots.reduce((e,t)=>e+t.y,0)/r,o=0,s=0,c=0;for(let e of n.plots){let t=e.x-i,n=e.y-a;o+=t*n,s+=t*t,c+=n*n}let l,u,f=null;s<e?(f=i,l=1/0,u=null):(l=o/s,u=a-l*i);let p,m;f===null?(p=l,m=u):(p=1/0,m=null);let h=n.plots.every(e=>e.v&&typeof e.v.x==`number`&&typeof e.v.y==`number`),g=NaN;if(r>=2){let t=0,o=0;h?(t=n.plots.reduce((e,t)=>e+t.v.x,0)/r,o=n.plots.reduce((e,t)=>e+t.v.y,0)/r):(t=i,o=-a);let s=0,c=0,l=0;for(let e of n.plots){let n=h?e.v.x:e.x,r=h?e.v.y:-e.y,i=n-t,a=r-o;s+=i*a,c+=i*i,l+=a*a}if(c>=e&&l>=e){let e=s/Math.sqrt(c*l);g=Math.max(-1,Math.min(1,e))}}let ee=t({m:p,b:m,rect:U.value,verticalX:f});if(!ee)return{...n,correlation:null,label:null,plots:n.plots.map(e=>({...e,deviation:0,shape:n.shape,color:d(n.color)}))};let te={x:(ee.x1+ee.x2)/2,y:(ee.y1+ee.y2)/2};return{...n,color:d(n.color),correlation:{...ee,coefficient:g},label:te,plots:n.plots.map(t=>{let r,i;f===null?Math.abs(p)<e?(r=t.x,i=m):(r=(t.x+p*t.y-p*m)/(1+p*p),i=(p*t.x+p*p*t.y+m)/(1+p*p)):(r=f,i=t.y);let a=t.x-r,o=t.y-i,s=Math.sqrt(a*a+o*o);return{...t,deviation:s,shape:n.shape,color:d(n.color)}})}})}),ei=v(()=>Math.max(...q.value.flatMap(e=>e.plots.map(e=>Math.abs(e.deviation)))));function ti(){return q.value}function ni(e,t){let n=Array.isArray(e)?e.flatMap(e=>e.plots.map(e=>({x:e.x,y:e.y}))):e.plots.map(e=>({x:e.x,y:e.y})),r=1/0,i=-1/0,a=1/0,o=-1/0;n.forEach(({x:e,y:t})=>{r=Math.min(r,e),i=Math.max(i,e),a=Math.min(a,t),o=Math.max(o,t)});let s=i-r,c=o-a,l=s/t,u=c/t,d=Array(t).fill(0),f=Array(t).fill(0),p=(e,n,r)=>r>0?Math.max(0,Math.min(t-1,Math.floor((e-n)/r+1e-10))):0;n.forEach(({x:e,y:t})=>{let n=p(e,r,l),i=p(t,a,u);d[n]||(d[n]=0),f[i]||(f[i]=0),d[n]+=1,f[i]+=1});let m=[],h=[];for(let e=0;e<t;e+=1)m.push(r+(e+.5)*l),h.push(a+(e+.5)*u);return{x:d,y:f,avgX:m,avgY:h,maxX:Math.max(...d),maxY:Math.max(...f)}}let J=v(()=>L.value.tranches),Y=v(()=>ni($r.value,J.value)),ri=v(()=>{let e=U.value.top-L.value.offset,t=U.value.right+L.value.offset;return $r.value.map(n=>{let r=ni(n,J.value);return{coords:r,dX:l(r.avgX.map((t,n)=>({x:t,y:e-r.x[n]/r.maxX*L.value.size}))),dY:o(r.avgY.map((e,n)=>({y:e,x:t+L.value.size*r.y[n]/r.maxY}))),color:n.color,id:n.id}})}),X=w(void 0),Z=w(null),Q=w([]),ii=w(!1),ai=w(null),oi=w(void 0);function si(){Fn.value=!1,X.value=void 0,Q.value=[],Z.value=null,sr.value=null,rr.value=null,oi.value=void 0}function ci(e){let t=q.value.find(t=>t.id===e);t?(Q.value=t.plots.map(e=>e.id),oi.value=e):Q.value=[]}function li(){Q.value=[],oi.value=void 0}function ui(e){if(!yr.value||!e)return;let t=ae(e.x,e.y,yr.value);t&&(ir.value=t)}let di=v(()=>Z.value?[Z.value]:Q.value.length?q.value.flatMap(e=>e.plots).filter(e=>Q.value.includes(e.id)):[]);function fi(e){let t=F.value,r=t.scales.labels;return g(r.formatter,h(e.v.x),n({p:R.value.selectors.labels.prefix,v:h(e.v.x),s:R.value.selectors.labels.suffix,r:Hr(t)}),{datapoint:e})}function pi(e){let t=I.value,r=t.scales.labels;return g(r.formatter,h(e.v.y),n({p:R.value.selectors.labels.prefix,v:h(e.v.y),s:R.value.selectors.labels.suffix,r:Hr(t)}),{datapoint:e})}function mi(e,t,r=`pointer`,i=null){X.value=e.id,Z.value=e,ar.value=r,sr.value=i,rr.value=e.id;let o=``;N.value.events.datapointEnter&&N.value.events.datapointEnter({datapoint:e,seriesIndex:t}),ai.value={datapoint:e,seriesIndex:t,series:q.value,config:N.value};let s=z.value.customFormat;a(s)&&re(()=>s({datapoint:e,seriesIndex:t,series:q.value,config:N.value}))?In.value=s({datapoint:e,seriesIndex:t,series:q.value,config:N.value}):(e.clusterName&&(o+=`<div style="display:flex;gap:3px;align-items:center">${e.clusterName}</div>`),e.v.name&&(o+=`<div>${e.v.name}</div>`),o+=`<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${z.value.borderColor}">`,o+=`<div>${F.value.name}: <b>${isNaN(e.v.x)?`-`:g(R.value.selectors.labels.x.formatter,e.v.x,n({p:z.value.prefix,v:e.v.x,s:z.value.suffix,r:z.value.roundingValue}),{datapoint:e,seriesIndex:t})}</b></div>`,o+=`<div>${I.value.name}: <b>${isNaN(e.v.y)?`-`:g(R.value.selectors.labels.y.formatter,e.v.y,n({p:z.value.prefix,v:e.v.y,s:z.value.suffix,r:z.value.roundingValue}),{datapoint:e,seriesIndex:t})}</b></div>`,o+=`${R.value.deviation.translation}: <b>${n({v:e.deviation,r:R.value.deviation.roundingValue})}</b>`,o+=`</div>`,In.value=`<div>${o}</div>`),Fn.value=!0,r===`keyboard`&&We(()=>{ui(e)})}function hi(e,t){N.value.events.datapointLeave&&N.value.events.datapointLeave({datapoint:e,seriesIndex:t}),(ar.value!==`keyboard`||rr.value!==e?.id)&&(Fn.value=!1,X.value=void 0,Z.value=null)}function gi(e,t){N.value.events.datapointClick&&N.value.events.datapointClick({datapoint:e,seriesIndex:t})}function _i(){M.value.length?M.value=[]:K.value.forEach(e=>{M.value.push(e.id)}),Nn(`selectLegend`,$r.value)}function vi(e){M.value.includes(e)?M.value=M.value.filter(t=>t!==e):M.value.length<mr.value.length-1&&M.value.push(e),Nn(`selectLegend`,$r.value)}function yi(e){return K.value.length?K.value.find(t=>t.name===e)||(Er.value&&console.warn(`VueUiScatter - Series name not found "${e}"`),null):(Er.value&&console.warn(`VueUiScatter - There are no series to show.`),null)}function bi(e){let t=yi(e);t!==null&&M.value.includes(t.id)&&vi(t.id)}function xi(e){let t=yi(e);t!==null&&(M.value.includes(t.id)||vi(t.id))}function Si(e=null){We(()=>{let t=[``,N.value.table.translations.correlationCoefficient,N.value.table.translations.nbrPlots,`${F.value.name} ${N.value.table.translations.average}`,`${I.value.name} ${N.value.table.translations.average}`],n=q.value.map(e=>[e.name,e.correlation.coefficient,e.plots.length,e.plots.map(e=>e.v.x).reduce((e,t)=>e+t,0)/e.plots.length,e.plots.map(e=>e.v.y).reduce((e,t)=>e+t,0)/e.plots.length]),r=[[B.value.title.text],[B.value.title.subtitle.text],[[``],[``],[``]],t].concat(n),a=i(r);e?e(a):ne({csvContent:a,title:B.value.title.text||`vue-ui-heatmap`})})}let Ci=v(()=>{let e=[N.value.table.translations.series,N.value.table.translations.correlationCoefficient,N.value.table.translations.nbrPlots,`${F.value.name} ${N.value.table.translations.average}`,`${I.value.name} ${N.value.table.translations.average}`],t=q.value.map(e=>[{shape:e.shape,content:e.name??`-`,color:e.color},Number((e.correlation?.coefficient??0).toFixed(N.value.table.td.roundingValue)).toLocaleString(),e.plots.length.toLocaleString(),Number((e.plots.map(e=>e.v.x??0).reduce((e,t)=>e+t,0)/e.plots.length).toFixed(N.value.table.td.roundingAverage)).toLocaleString(),Number((e.plots.map(e=>e.v.y??0).reduce((e,t)=>e+t,0)/e.plots.length).toFixed(N.value.table.td.roundingAverage)).toLocaleString()]);return{head:e,body:t,a11yBody:t.map(e=>e.map((e,t)=>t===0?e.content:e)),config:{th:{backgroundColor:N.value.table.th.backgroundColor,color:N.value.table.th.color,outline:N.value.table.th.outline},td:{backgroundColor:N.value.table.td.backgroundColor,color:N.value.table.td.color,outline:N.value.table.td.outline},breakpoint:N.value.table.responsiveBreakpoint},colNames:e}}),wi=w(!1);function Ti(e){wi.value=e,Ln.value+=1}function Ei(){V.value.showTable=!V.value.showTable}function Di(){V.value.showTooltip=!V.value.showTooltip}let Oi=w(!1);function ki(){Oi.value=!Oi.value}async function Ai({scale:e=2}={}){if(!Rn.value)return;let{width:t,height:n}=Rn.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await ge({domElement:Rn.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:B.value.title.text,width:t,height:n,aspectRatio:r}}function ji(e){qn.value=e,L.value.highlighter.highlightBothAxes&&(Jn.value=Y.value.y.length-2-e)}function Mi(e){Jn.value=e,L.value.highlighter.highlightBothAxes&&(qn.value=e)}function Ni(){qn.value=null,Jn.value=null}let Pi={circle:1,square:1,diamond:1,triangle:1.2,star:1.3,pentagon:1.3,hexagon:1.3},$=e=>e.toFixed(3);function Fi({shape:e=`circle`,cx:t,cy:n,r}){if(!N.value.usePerformanceMode)return``;let i=Pi[e]*r;switch(e){case`circle`:{let e=$(t-i),r=$(n),a=$(t+i),o=$(i);return`M ${e} ${r} A ${o} ${o} 0 1 0 ${a} ${r} A ${o} ${o} 0 1 0 ${e} ${r} Z`}case`square`:{let e=$(t-i),r=$(n-i),a=$(t+i),o=$(n+i);return`M ${e} ${r} L ${a} ${r} L ${a} ${o} L ${e} ${o} Z`}case`diamond`:{let e=$(t),r=$(n);return`M ${e} ${$(n-i)} L ${$(t+i)} ${r} L ${e} ${$(n+i)} L ${$(t-i)} ${r} Z`}case`triangle`:{let e=i*Math.sqrt(3),r=t,a=n-2/3*e,o=t-i,s=n+1/3*e,c=t+i,l=s;return`M ${$(r)} ${$(a)} L ${$(o)} ${$(s)} L ${$(c)} ${$(l)} Z`}case`star`:{let e=i,r=i*.5,a=[];for(let i=0;i<10;i+=1){let o=(-90+i*36)*Math.PI/180,s=i%2==0?e:r;a.push([t+s*Math.cos(o),n+s*Math.sin(o)])}let o=`M ${$(a[0][0])} ${$(a[0][1])}`;for(let e=1;e<a.length;e+=1)o+=` L ${$(a[e][0])} ${$(a[e][1])}`;return o+` Z`}case`pentagon`:{let e=[];for(let r=0;r<5;r+=1){let a=(-90+r*72)*Math.PI/180;e.push([t+i*Math.cos(a),n+i*Math.sin(a)])}let r=`M ${$(e[0][0])} ${$(e[0][1])}`;for(let t=1;t<5;t+=1)r+=` L ${$(e[t][0])} ${$(e[t][1])}`;return r+` Z`}case`hexagon`:{let e=[];for(let r=0;r<6;r+=1){let a=(-60+r*60)*Math.PI/180;e.push([t+i*Math.cos(a),n+i*Math.sin(a)])}let r=`M ${$(e[0][0])} ${$(e[0][1])}`;for(let t=1;t<6;t+=1)r+=` L ${$(e[t][0])} ${$(e[t][1])}`;return r+` Z`}default:{let e=$(t-i),r=$(n),a=$(t+i),o=$(i);return`M ${e} ${r} A ${o} ${o} 0 1 0 ${a} ${r} A ${o} ${o} 0 1 0 ${e} ${r} Z`}}}let Ii=v(()=>{if(!N.value.usePerformanceMode)return[``];let{left:e,right:t,top:n,bottom:r}=U.value,i=Math.max(1,(t-e)*(r-n)),a=e=>e/i*1e4,o=R.value.stroke,s=R.value.strokeWidth,l=R.value.opacity;return q.value.map(i=>{let u=[];for(let a of i.plots){let o=a.x,s=a.y;if(o<e||o>t||s<n||s>r)continue;let c=Math.max(R.value.radius,a.weight);u.push(Fi({shape:i.shape||`circle`,cx:o,cy:s,r:c}))}if(!u.length)return null;let d=a(i.plots.length)>2.5||i.plots.length>1e3;return{id:i.id,d:u.join(``),fill:c(i.color,l*100),stroke:d?`none`:o,strokeWidth:d?0:s,strokeOpacity:1}}).filter(Boolean)});function Li(){return N.value.usePerformanceMode?e=>{let t=yr.value;if(!t)return;let n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;let r=t.getScreenCTM();if(!r)return;let i=r.inverse(),a=n.matrixTransform(i),o=null,s=1/0,c=-1;if(q.value.forEach((e,t)=>{e.plots.forEach(e=>{let n=e.x-a.x,r=e.y-a.y,i=n*n+r*r;i<=64&&i<s&&(s=i,o=e,c=t)})}),ii.value=!!o,o)X.value!==o.id&&(X.value=o.id,mi(o,c,`pointer`,ra.value.get(o.id)??null));else if(X.value){let e=Z.value;X.value=void 0,hi(e,c)}}:()=>null}let Ri=Li();function zi(){if(ii.value=!1,X.value){let e=Z.value;X.value=void 0,hi(e,null)}}function Bi(e){let t=Z.value;if(t){let e=q.value.findIndex(e=>e.id===t.clusterId);gi(t,e>=0?e:0)}}let Vi=v(()=>be({config:N,style:B,mutableConfig:V,dialog:jn,accordion:En,isFullscreen:wi,parent:Rn,maxWidth:800,isCursorPointer:lr}));$e(()=>V.value.showTable,e=>ye(e,N,Yn));function Hi(){V.value.showTable=!1,Xn.value&&Xn.value.setTableIconState(!1)}let Ui=v(()=>B.value.backgroundColor),Wi=v(()=>B.value.legend),Gi=v(()=>B.value.title),{isCallbackImaging:Ki,isCallbackSvg:qi,generateSvg:Ji,onGenerateImage:Yi}=ve({svg:yr,title:Gi,legend:Wi,legendItems:K,backgroundColor:Ui,getSvgCallback:()=>N.value.userOptions.callbacks.svg,generateImage:jr});async function Xi(){Nn(`copyAlt`,{config:N.value,dataset:$r.value}),N.value.userOptions.callbacks.altCopy?await Promise.resolve(N.value.userOptions.callbacks.altCopy({config:N.value,dataset:$r.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Zi(e,t){let n=na.value.filter(t=>t.id!==e.id);if(!n.length)return null;let r=(n=>{if(!n.length)return null;let r=null,i=1/0;return n.forEach(n=>{let a=n.x-e.x,o=n.y-e.y,s=0,c=0;t===`right`||t===`left`?(s=Math.abs(a),c=Math.abs(o)):(s=Math.abs(o),c=Math.abs(a));let l=s*1e3+c;l<i&&(r=n,i=l)}),r})(n.filter(n=>t===`right`?n.x>e.x:t===`left`?n.x<e.x:t===`down`?n.y>e.y:t===`up`&&n.y<e.y));if(r)return r;let i=[];if(t===`right`){let e=Math.min(...n.map(e=>e.x));i=n.filter(t=>t.x===e)}if(t===`left`){let e=Math.max(...n.map(e=>e.x));i=n.filter(t=>t.x===e)}if(t===`down`){let e=Math.min(...n.map(e=>e.y));i=n.filter(t=>t.y===e)}if(t===`up`){let e=Math.max(...n.map(e=>e.y));i=n.filter(t=>t.y===e)}return i.length?i.reduce((n,r)=>{if(!n)return r;let i=Math.abs(t===`right`||t===`left`?n.y-e.y:n.x-e.x);return Math.abs(t===`right`||t===`left`?r.y-e.y:r.x-e.x)<i?r:n},null):null}function Qi(){sr.value=null,rr.value=null,or.value=!0}function $i(){si(),ar.value=`pointer`,or.value=!1}function ea(e){if(!yr.value||Oi.value||document.activeElement!==yr.value||!na.value.length)return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`ArrowUp`,i=e.key===`ArrowDown`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){si(),ar.value=`pointer`;return}if(a){if(sr.value===null)return;let e=na.value[sr.value];if(!e)return;gi(e,e.seriesIndex);return}let s=null;if(n&&(s=`right`),t&&(s=`left`),i&&(s=`down`),r&&(s=`up`),rr.value===null){let e=Z.value;if(e&&e.id){let t=Zi(e,s);if(!t){let t=ra.value.get(e.id);if(t===void 0)return;mi(e,e.seriesIndex,`keyboard`,t);return}let n=ra.value.get(t.id);if(n===void 0)return;mi(t,t.seriesIndex,`keyboard`,n);return}let t=na.value[0];if(!t)return;let n=ra.value.get(t.id)??0;mi(t,t.seriesIndex,`keyboard`,n);return}let c=ra.value.get(rr.value);if(c===void 0)return;let l=na.value[c];if(!l)return;let u=Zi(l,s);if(!u)return;let d=ra.value.get(u.id);d!==void 0&&mi(u,u.seriesIndex,`keyboard`,d)}let ta=v(()=>{if(!Z.value)return``;let e=Z.value,t=isNaN(e.v.x)?`-`:g(R.value.selectors.labels.x.formatter,e.v.x,n({p:z.value.prefix,v:e.v.x,s:z.value.suffix,r:z.value.roundingValue}),{datapoint:e,seriesIndex:e.seriesIndex}),r=isNaN(e.v.y)?`-`:g(R.value.selectors.labels.y.formatter,e.v.y,n({p:z.value.prefix,v:e.v.y,s:z.value.suffix,r:z.value.roundingValue}),{datapoint:e,seriesIndex:e.seriesIndex});return[e.clusterName||``,e.v.name||``,`${F.value.name}: ${t}`,`${I.value.name}: ${r}`].filter(Boolean).join(`. `)}),na=v(()=>q.value.flatMap((e,t)=>e.plots.map(n=>({...n,seriesIndex:t,seriesId:e.id,seriesName:e.name,shape:e.shape||`circle`,color:e.color})))),ra=v(()=>{let e=/* @__PURE__ */ new Map;return na.value.forEach((t,n)=>{e.set(t.id,n)}),e}),ia=v(()=>({headers:Ci.value?.colNames??[],rows:Ci.value?.a11yBody??[]}));return me({getData:ti,getImage:Ai,generatePdf:Ar,generateCsv:Si,generateImage:jr,generateSvg:Ji,hideSeries:xi,showSeries:bi,toggleTable:Ei,toggleTooltip:Di,toggleAnnotator:ki,toggleFullscreen:Ti,copyAlt:Xi}),$e(()=>[H.value,F.value,I.value,B.value.layout.padding,Pr.value,W.value,R.value.selectors.labels,N.value.style.fontFamily,A.dataset,M.value,wr.value,Zn.value,Qn.value,er.value,nr.value,tr.value],Rr,{flush:`post`,deep:!0}),(e,t)=>(C(),x(`div`,{class:Ge(`vue-data-ui-component vue-ui-scatter ${wi.value?`vue-data-ui-wrapper-fullscreen`:``} ${N.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`scatterChart`,ref:Rn,id:`vue-ui-scatter_${j.value}`,style:qe(`font-family:${B.value.fontFamily};width:100%; text-align:center;background:${B.value.backgroundColor};${N.value.responsive?`height: 100%`:``}`),onMouseenter:t[5]||=()=>O(_r)(!0),onMouseleave:t[6]||=()=>{O(_r)(!1),or.value||si()}},[S(`div`,{id:`chart-instructions-${j.value}`,class:`sr-only`},[S(`p`,null,D(N.value.a11y.translations.keyboardNavigation),1)],8,nt),V.value.showTooltip?b(``,!0):(C(),x(`div`,rt,D(ta.value),1)),ia.value?.rows?.length&&Pn.value?(C(),y(Me,{key:1,uid:j.value,head:ia.value.headers,body:ia.value.rows,notice:N.value.a11y.translations.tableAvailable,caption:N.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):b(``,!0),P.value.buttons.annotator?(C(),y(O(On),{key:2,svgRef:O(yr),backgroundColor:B.value.backgroundColor,color:B.value.color,active:Oi.value,isCursorPointer:lr.value,palette:P.value.annotatorPalette,onClose:ki},Re({_:2},[T(O(Se),t=>({name:t,fn:k(n=>[E(e.$slots,t,Ke(He(O(xe)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):b(``,!0),Mr.value?(C(),x(`div`,{key:3,ref_key:`noTitle`,ref:Hn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):b(``,!0),B.value.title.text?(C(),x(`div`,{key:4,ref_key:`chartTitle`,ref:zn,style:`width:100%;background:transparent`},[(C(),y(_e,{key:`title_${Un.value}`,config:{title:{cy:`scatter-div-title`,...B.value.title},subtitle:{cy:`scatter-div-subtitle`,...B.value.title.subtitle}}},null,8,[`config`]))],512)):b(``,!0),S(`div`,{id:`legend-top-${j.value}`},null,8,it),P.value.show&&Pn.value&&(O(vr)||O(gr))?(C(),y(O(kn),{ref_key:`userOptionsRef`,ref:Xn,key:`user_options_${Ln.value}`,backgroundColor:B.value.backgroundColor,color:B.value.color,isImaging:O(kr),isPrinting:O(Or),uid:j.value,hasTooltip:P.value.buttons.tooltip&&z.value.show,hasPdf:P.value.buttons.pdf,hasImg:P.value.buttons.img,hasSvg:P.value.buttons.svg,hasXls:P.value.buttons.csv,hasTable:P.value.buttons.table,hasFullscreen:P.value.buttons.fullscreen,hasAltCopy:P.value.buttons.altCopy,isTooltip:V.value.showTooltip,isFullscreen:wi.value,titles:{...P.value.buttonTitles},chartElement:Rn.value,position:P.value.position,hasAnnotator:P.value.buttons.annotator,isAnnotation:Oi.value,callbacks:P.value.callbacks,printScale:P.value.print.scale,tableDialog:N.value.table.useDialog,isCursorPointer:lr.value,onToggleFullscreen:Ti,onGeneratePdf:O(Ar),onGenerateCsv:Si,onGenerateImage:O(Yi),onGenerateSvg:O(Ji),onToggleTable:Ei,onToggleTooltip:Di,onToggleAnnotator:ki,onCopyAlt:Xi,style:qe({visibility:O(vr)?O(gr)?`visible`:`hidden`:`visible`})},Re({_:2},[T(O(Ce)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:k(n=>[E(e.$slots,t,Ke(He(O(we)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isTooltip.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):b(``,!0),S(`div`,at,[(C(),x(`svg`,{ref_key:`svgRef`,ref:yr,xmlns:O(ie),"aria-describedby":`chart-instructions-${j.value}`,class:Ge({"vue-data-ui-fullscreen--on":wi.value,"vue-data-ui-fulscreen--off":!wi.value,"vue-data-ui-no-transition":!O(cr)||O(Lr)}),viewBox:`0 0 ${H.value.width<=0?10:H.value.width} ${H.value.height<=0?10:H.value.height}`,style:qe(`max-width:100%;overflow:visible;background:transparent;color:${B.value.color};visibility:${O(Ir)?`visible`:`hidden`}`),onMouseleave:Ni,tabindex:`0`,onFocus:Qi,onBlur:$i,onKeydown:ea},[Be(O(An)),E(e.$slots,`svg-underlayer`,{svg:{...H.value,drawingArea:{...U.value,zero:G.value},data:$r.value,isPrintingImg:O(Or)||O(kr)||O(Ki),isPrintingSvg:O(qi)}},void 0,!0),e.$slots[`chart-background`]?(C(),x(`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(e.$slots,`chart-background`,{},void 0,!0)],8,st)):b(``,!0),B.value.layout.axis.show?(C(),x(`g`,ct,[S(`line`,{x1:G.value.x,x2:G.value.x,y1:U.value.top,y2:U.value.bottom,stroke:B.value.layout.axis.stroke,"stroke-width":B.value.layout.axis.strokeWidth,"stroke-linecap":`round`},null,8,lt),S(`line`,{x1:U.value.left,x2:U.value.right,y1:G.value.y,y2:G.value.y,stroke:B.value.layout.axis.stroke,"stroke-width":B.value.layout.axis.strokeWidth,"stroke-linecap":`round`},null,8,ut)])):b(``,!0),F.value.scales.verticalLines.show?(C(),x(`g`,dt,[(C(!0),x(_,null,T(Kr.value,(e,t)=>(C(),x(`line`,{key:`scatter-x-scale-line-${j.value}-${t}`,x1:e.x,x2:e.x,y1:U.value.top,y2:U.value.bottom,stroke:F.value.scales.verticalLines.stroke,"stroke-width":F.value.scales.verticalLines.strokeWidth,"stroke-linecap":`round`},null,8,ft))),128))])):b(``,!0),F.value.scales.show?(C(),x(`g`,{key:3,ref_key:`xAxisScaleLabels`,ref:nr},[(C(!0),x(_,null,T(Kr.value,(e,t)=>(C(),x(`g`,{class:`vue-ui-scatter-scale-group`,key:`scatter-x-scale-${j.value}-${t}`,opacity:+!Jr.value},[S(`path`,{class:Ge({"vue-data-ui-transition":O(cr)&&!O(Lr)}),stroke:B.value.layout.axis.stroke,"stroke-width":B.value.layout.axis.strokeWidth,d:`M${e.x},${G.value.y-4} ${e.x},${G.value.y+4}`,"stroke-linecap":`round`},null,10,mt),S(`text`,{class:Ge({"vue-data-ui-transition":O(cr)&&!O(Lr)}),transform:`translate(${e.x}, ${G.value.y+F.value.scales.labels.fontSize+6+F.value.scales.labels.offsetY})`,"text-anchor":`middle`,"font-size":F.value.scales.labels.fontSize,fill:F.value.scales.labels.color,stroke:B.value.backgroundColor,"stroke-width":`2`,"paint-order":`stroke`},D(e.label),11,ht)],8,pt))),128))],512)):b(``,!0),I.value.scales.horizontalLines.show?(C(),x(`g`,gt,[(C(!0),x(_,null,T(qr.value,(e,t)=>(C(),x(`line`,{key:`scatter-y-scale-line-${j.value}-${t}`,x1:U.value.left,x2:U.value.right,y1:e.y,y2:e.y,stroke:I.value.scales.horizontalLines.stroke,"stroke-width":I.value.scales.horizontalLines.strokeWidth,"stroke-linecap":`round`},null,8,_t))),128))])):b(``,!0),I.value.scales.show?(C(),x(`g`,{key:5,ref_key:`yAxisScaleLabels`,ref:tr,opacity:+!Yr.value,style:{transition:`opacity 0.1s ease-in-out`},class:`vue-ui-scatter-scale-group`},[(C(!0),x(_,null,T(qr.value,(e,t)=>(C(),x(`g`,{key:`scatter-y-scale-${j.value}-${t}`},[S(`path`,{class:Ge({"vue-data-ui-transition":O(cr)&&!O(Lr)}),d:`M${G.value.x-4},${e.y} ${G.value.x+4},${e.y}`,stroke:B.value.layout.axis.stroke,"stroke-width":B.value.layout.axis.strokeWidth,"stroke-linecap":`round`},null,10,yt),S(`text`,{class:Ge({"vue-data-ui-transition":O(cr)&&!O(Lr)}),transform:`translate(${G.value.x-I.value.scales.labels.fontSize/2-8+I.value.scales.labels.offsetX}, ${e.y+I.value.scales.labels.fontSize/3})`,"text-anchor":`end`,"font-size":I.value.scales.labels.fontSize,fill:I.value.scales.labels.color,stroke:B.value.backgroundColor,"stroke-width":`2`,"paint-order":`stroke`},D(e.label),11,bt)]))),128))],8,vt)):b(``,!0),L.value.show?(C(),x(`g`,xt,[S(`defs`,null,[Be(Ae,{t:`linear`,id:`marginal_x_${j.value}`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,stops:[[`0%`,L.value.fill,1],[`100%`,B.value.backgroundColor,1]]},null,8,[`id`,`stops`]),Be(Ae,{t:`linear`,id:`marginal_y_${j.value}`,x1:`0%`,x2:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,B.value.backgroundColor,1],[`100%`,L.value.fill,1]]},null,8,[`id`,`stops`])]),(C(!0),x(_,null,T(Y.value.x,(e,n)=>(C(),x(`g`,null,[e&&Y.value.avgX[n]?(C(),x(`rect`,{key:0,x:Y.value.avgX[n]-U.value.width/J.value/2,y:U.value.top-L.value.offset-e/Y.value.maxX*L.value.size,width:U.value.width/J.value<=0?1e-4:U.value.width/J.value,height:e/Y.value.maxX*L.value.size<=0?1e-4:e/Y.value.maxX*L.value.size,fill:L.value.useGradient?`url(#marginal_x_${j.value})`:L.value.fill,style:qe([`opacity:${L.value.opacity}`,{"pointer-events":`none`}]),stroke:B.value.backgroundColor,"stroke-width":L.value.strokeWidth,rx:L.value.borderRadius},null,12,St)):b(``,!0),Y.value.avgX[n]?(C(),x(`rect`,{key:1,x:Y.value.avgX[n]-U.value.width/J.value/2,y:U.value.top-L.value.offset-L.value.size,width:U.value.width/J.value<=0?1e-4:U.value.width/J.value,height:Math.max(.1,L.value.size),fill:`transparent`,onMouseenter:e=>ji(n),onMouseleave:t[0]||=e=>Ni()},null,40,Ct)):b(``,!0),Y.value.avgX[n]&&qn.value!=null&&qn.value===n?(C(),x(`g`,wt,[S(`rect`,{x:Y.value.avgX[n]-U.value.width/J.value/2,y:U.value.top,width:U.value.width/J.value<=0?1e-4:U.value.width/J.value,height:U.value.height,fill:L.value.highlighter.color,"fill-opacity":L.value.highlighter.opacity},null,8,Tt),S(`line`,{x1:Y.value.avgX[n]-U.value.width/J.value/2,x2:Y.value.avgX[n]-U.value.width/J.value/2,y1:0,y2:U.value.top+U.value.height,stroke:L.value.highlighter.stroke,"stroke-dasharray":L.value.highlighter.strokeDasharray,"stroke-width":L.value.highlighter.strokeWidth,style:{transition:`none !important`,animation:`none !important`}},null,8,Et),S(`line`,{x1:Y.value.avgX[n]-U.value.width/J.value/2+(U.value.width/J.value<=0?1e-4:U.value.width/J.value),x2:Y.value.avgX[n]-U.value.width/J.value/2+(U.value.width/J.value<=0?1e-4:U.value.width/J.value),y1:0,y2:U.value.top+U.value.height,stroke:L.value.highlighter.stroke,"stroke-dasharray":L.value.highlighter.strokeDasharray,"stroke-width":L.value.highlighter.strokeWidth,style:{transition:`none !important`,animation:`none !important`}},null,8,Dt)])):b(``,!0)]))),256)),(C(!0),x(_,null,T(Y.value.y,(e,n)=>(C(),x(`g`,null,[e&&Y.value.avgY[n]?(C(),x(`rect`,{key:0,x:U.value.right+L.value.offset,y:Y.value.avgY[n]-U.value.height/J.value/2,height:U.value.height/J.value<=0?1e-4:U.value.height/J.value,width:e/Y.value.maxY*L.value.size<=0?1e-4:e/Y.value.maxY*L.value.size,fill:L.value.useGradient?`url(#marginal_y_${j.value})`:L.value.fill,style:qe([`opacity:${L.value.opacity}`,{"pointer-events":`none`}]),stroke:B.value.backgroundColor,"stroke-width":L.value.strokeWidth,rx:L.value.borderRadius},null,12,Ot)):b(``,!0),Y.value.avgY[n]?(C(),x(`rect`,{key:1,x:U.value.right+L.value.offset,y:Y.value.avgY[n]-U.value.height/J.value/2,width:Math.max(.1,L.value.size),height:U.value.height/J.value<=0?1e-4:U.value.height/J.value,fill:`transparent`,onMouseenter:e=>Mi(n),onMouseleave:t[1]||=e=>Ni()},null,40,kt)):b(``,!0),Y.value.avgY[n]&&Jn.value!=null&&Jn.value===n?(C(),x(`g`,At,[S(`rect`,{x:U.value.left,y:Y.value.avgY[n]-U.value.height/J.value/2,width:U.value.width,height:U.value.height/J.value<=0?1e-4:U.value.height/J.value,fill:L.value.highlighter.color,"fill-opacity":L.value.highlighter.opacity},null,8,jt),S(`line`,{x1:U.value.left,x2:H.value.width,y1:Y.value.avgY[n]-U.value.height/J.value/2,y2:Y.value.avgY[n]-U.value.height/J.value/2,stroke:L.value.highlighter.stroke,"stroke-dasharray":L.value.highlighter.strokeDasharray,"stroke-width":L.value.highlighter.strokeWidth,style:{transition:`none !important`,animation:`none !important`}},null,8,Mt),S(`line`,{x1:U.value.left,x2:H.value.width,y1:Y.value.avgY[n]-U.value.height/J.value/2+(U.value.height/J.value<=0?1e-4:U.value.height/J.value),y2:Y.value.avgY[n]-U.value.height/J.value/2+(U.value.height/J.value<=0?1e-4:U.value.height/J.value),stroke:L.value.highlighter.stroke,"stroke-dasharray":L.value.highlighter.strokeDasharray,"stroke-width":L.value.highlighter.strokeWidth,style:{transition:`none !important`,animation:`none !important`}},null,8,Nt)])):b(``,!0)]))),256)),L.value.showLines?(C(),x(`g`,Pt,[(C(!0),x(_,null,T(ri.value,e=>(C(),x(_,null,[M.value.includes(e.id)?b(``,!0):(C(),x(`path`,{key:0,d:`M ${e.dX}`,stroke:B.value.backgroundColor,"stroke-width":L.value.linesStrokeWidth+1,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,Ft)),M.value.includes(e.id)?b(``,!0):(C(),x(`path`,{key:1,d:`M ${e.dX}`,stroke:e.color,"stroke-width":L.value.linesStrokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,It)),M.value.includes(e.id)?b(``,!0):(C(),x(`path`,{key:2,d:`M ${e.dY}`,stroke:B.value.backgroundColor,"stroke-width":L.value.linesStrokeWidth+1,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,Lt)),M.value.includes(e.id)?b(``,!0):(C(),x(`path`,{key:3,d:`M ${e.dY}`,stroke:e.color,"stroke-width":L.value.linesStrokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,Rt))],64))),256))])):b(``,!0)])):b(``,!0),R.value.giftWrap.show?(C(),x(`g`,zt,[(C(!0),x(_,null,T(q.value,(e,t)=>(C(),x(`g`,null,[e.plots.length>2?(C(),x(`polygon`,{key:0,points:O(r)({series:e.plots}),fill:O(c)(e.color,R.value.giftWrap.fillOpacity*100),"stroke-width":R.value.giftWrap.strokeWidth,"stroke-dasharray":R.value.giftWrap.strokeDasharray,stroke:e.color,"stroke-linejoin":`round`,"stroke-linecap":`round`},null,8,Bt)):b(``,!0)]))),256))])):b(``,!0),N.value.usePerformanceMode?b(``,!0):(C(!0),x(_,{key:8},T(q.value,(e,t)=>(C(),x(`g`,{key:e.id},[!e.shape||e.shape===`circle`?(C(),x(`g`,Vt,[(C(!0),x(_,null,T(e.plots,(n,r)=>(C(),x(`circle`,{key:n.id,cx:n.x,cy:n.y,r:X.value&&X.value===n.id||Q.value.includes(n.id)?n.weight*R.value.hoverRadiusRatio:n.weight,fill:O(c)(e.color,X.value&&X.value!==n.id||Q.value.length&&!Q.value.includes(n.id)?R.value.opacityNotSelected*100:R.value.opacity*100),stroke:R.value.stroke,"stroke-width":R.value.strokeWidth,style:qe(`opacity:${X.value&&X.value===n.id||Q.value.includes(n.id)?1:R.value.significance.useDistanceOpacity?1-Math.abs(n.deviation)/ei.value:R.value.significance.show&&Math.abs(n.deviation)>R.value.significance.deviationThreshold?R.value.significance.opacity:1}`),onMouseover:e=>mi(n,t,`pointer`,ra.value.get(n.id)),onMouseleave:e=>hi(n,t),onClick:e=>gi(n,t)},null,44,Ht))),128))])):(C(),x(`g`,Ut,[(C(!0),x(_,null,T(e.plots,(n,r)=>(C(),y(Oe,{class:`vue-ui-scatter-datapoint`,plot:{x:n.x,y:n.y},radius:X.value&&X.value===n.id||Q.value.includes(n.id)?n.weight*R.value.hoverRadiusRatio:n.weight,shape:e.shape,color:O(c)(e.color,X.value&&X.value!==n.id||Q.value.length&&!Q.value.includes(n.id)?R.value.opacityNotSelected*100:R.value.opacity*100),stroke:R.value.stroke,strokeWidth:R.value.strokeWidth,style:qe(`opacity:${X.value&&X.value===n.id||Q.value.includes(n.id)?1:R.value.significance.useDistanceOpacity?1-Math.abs(n.deviation)/ei.value:R.value.significance.show&&Math.abs(n.deviation)>R.value.significance.deviationThreshold?R.value.significance.opacity:1}`),onMouseover:e=>mi(n,t,`pointer`,ra.value.get(n.id)),onMouseleave:e=>hi(n,t),onClick:e=>gi(n,t)},null,8,[`plot`,`radius`,`shape`,`color`,`stroke`,`strokeWidth`,`style`,`onMouseover`,`onMouseleave`,`onClick`]))),256))])),R.value.name.show?(C(!0),x(_,{key:2},T(e.plots,(e,n)=>(C(),x(`text`,{class:`vue-ui-scatter-datapoint-label`,key:`datalabel-${e.id}`,transform:`translate(${e.x}, ${e.y-e.weight-R.value.name.fontSize+R.value.name.offsetY})`,"text-anchor":`middle`,"font-size":R.value.name.fontSize,fill:O(c)(R.value.name.color,X.value&&X.value!==e.id||Q.value.length&&!Q.value.includes(e.id)?R.value.opacityNotSelected*100:100),onMouseover:n=>mi(e,t,`pointer`,ra.value.get(e.id)),onMouseleave:n=>hi(e,t),onClick:n=>gi(e,t)},D(e.clusterName),41,Wt))),128)):b(``,!0)]))),128)),N.value.usePerformanceMode?(C(),x(_,{key:9},[S(`g`,null,[(C(!0),x(_,null,T(Ii.value,e=>(C(),x(`path`,{key:e.id,d:e.d,fill:e.fill,stroke:e.stroke,"stroke-width":e.strokeWidth,"stroke-opacity":e.strokeOpacity,"vector-effect":`non-scaling-stroke`,"paint-order":`fill`},null,8,Gt))),128))]),Z.value?(C(),x(`g`,Kt,[Be(Oe,{shape:Z.value.shape||`circle`,color:Z.value.color,plot:{x:Z.value.x,y:Z.value.y},radius:Z.value.weight*R.value.hoverRadiusRatio,stroke:R.value.stroke,strokeWidth:R.value.strokeWidth},null,8,[`shape`,`color`,`plot`,`radius`,`stroke`,`strokeWidth`])])):b(``,!0),S(`rect`,{x:U.value.left,y:U.value.top,width:Math.max(1e-4,U.value.width),height:Math.max(1e-4,U.value.height),fill:`transparent`,style:qe({cursor:ii.value&&ur.value?`pointer`:`default`}),onMousemove:t[2]||=(...e)=>O(Ri)&&O(Ri)(...e),onMouseleave:zi,onClick:Bi},null,44,qt)],64)):b(``,!0),(C(!0),x(_,null,T(di.value,e=>(C(),x(_,{key:`selector_${e.id}`},[R.value.selectors.show?(C(),x(`g`,Jt,[S(`line`,{x1:G.value.x,x2:e.x,y1:e.y,y2:e.y,stroke:R.value.selectors.stroke,"stroke-width":R.value.selectors.strokeWidth,"stroke-dasharray":R.value.selectors.strokeDasharray,"stroke-linecap":`round`,class:`line-pointer`},null,8,Yt),S(`line`,{x1:e.x,x2:e.x,y1:G.value.y,y2:e.y,stroke:R.value.selectors.stroke,"stroke-width":R.value.selectors.strokeWidth,"stroke-dasharray":R.value.selectors.strokeDasharray,"stroke-linecap":`round`,class:`line-pointer`},null,8,Xt),I.value.scales.show?b(``,!0):(C(),x(`text`,{key:0,x:G.value.x+(e.x>G.value.x?-6:6),y:e.y+R.value.selectors.labels.fontSize/3,"font-size":R.value.selectors.labels.fontSize,fill:R.value.selectors.labels.color,"font-weight":R.value.selectors.labels.bold?`bold`:`normal`,"text-anchor":e.x>G.value.x?`end`:`start`},D(O(g)(R.value.selectors.labels.y.formatter,O(h)(e.v.y),O(n)({p:R.value.selectors.labels.prefix,v:O(h)(e.v.y),s:R.value.selectors.labels.suffix,r:R.value.selectors.labels.rounding}),{datapoint:e})),9,Zt)),F.value.scales.show?b(``,!0):(C(),x(`text`,{key:1,x:e.x,y:G.value.y+(e.y>G.value.y?-6:R.value.selectors.labels.fontSize+6),"font-size":R.value.selectors.labels.fontSize,fill:R.value.selectors.labels.color,"font-weight":R.value.selectors.labels.bold?`bold`:`normal`,"text-anchor":`middle`},D(O(g)(R.value.selectors.labels.y.formatter,O(h)(e.v.x),O(n)({p:R.value.selectors.labels.prefix,v:O(h)(e.v.x),s:R.value.selectors.labels.suffix,r:R.value.selectors.labels.rounding}),{datapoint:e})),9,Qt)),F.value.scales.show?(C(),x(`text`,{key:2,x:e.x,y:G.value.y+F.value.scales.labels.fontSize+6+F.value.scales.labels.offsetY,"text-anchor":`middle`,"font-size":F.value.scales.labels.fontSize,fill:F.value.scales.labels.color},D(fi(e)),9,$t)):b(``,!0),I.value.scales.show?(C(),x(`text`,{key:3,x:G.value.x-I.value.scales.labels.fontSize/2-8+I.value.scales.labels.offsetX,y:e.y+I.value.scales.labels.fontSize/3,"text-anchor":`end`,"font-size":I.value.scales.labels.fontSize,fill:I.value.scales.labels.color},D(pi(e)),9,en)):b(``,!0),S(`circle`,{cx:G.value.x,cy:e.y,r:R.value.selectors.markers.radius,fill:R.value.selectors.markers.fill,stroke:R.value.selectors.markers.stroke,"stroke-width":R.value.selectors.markers.strokeWidth,class:`line-pointer`},null,8,tn),S(`circle`,{cx:e.x,cy:G.value.y,r:R.value.selectors.markers.radius,fill:R.value.selectors.markers.fill,stroke:R.value.selectors.markers.stroke,"stroke-width":R.value.selectors.markers.strokeWidth,class:`line-pointer`},null,8,nn),R.value.selectors.labels.showName&&!R.value.name.show?(C(),x(`text`,{key:4,x:e.x,y:e.y+(e.y<G.value.y?-R.value.selectors.labels.fontSize/2:R.value.selectors.labels.fontSize),"font-size":R.value.selectors.labels.fontSize,fill:R.value.selectors.labels.color,"font-weight":R.value.selectors.labels.bold?`bold`:`normal`,"text-anchor":e.x<U.value.left+100?`start`:e.x>U.value.right-100?`end`:e.x>G.value.x?`start`:`end`},D(e.v.name),9,rn)):b(``,!0)])):b(``,!0)],64))),128)),F.value.show?(C(),x(`g`,{key:10,ref_key:`xAxisLabelLeft`,ref:Zn},[S(`text`,{id:`vue-ui-scatter-xAxis-label-${j.value}`,transform:`translate(${F.value.fontSize+(B.value.layout.dataLabels.reverseAxisLabels?I.value.offsetX:F.value.offsetX)}, ${U.value.top+U.value.height/2+(B.value.layout.dataLabels.reverseAxisLabels?I.value.offsetY:F.value.offsetY)}), rotate(-90)`,"text-anchor":`middle`,"font-size":F.value.fontSize,"font-weight":F.value.bold?`bold`:`normal`,fill:F.value.color},D(B.value.layout.dataLabels.reverseAxisLabels?I.value.name:F.value.name),9,an),F.value.showValue?(C(),x(`text`,{key:0,"text-anchor":`middle`,"font-size":F.value.fontSize,fill:F.value.color,transform:`translate(${F.value.name?F.value.fontSize*3:0}, ${G.value.y+F.value.fontSize/3}), rotate(-90)`},D(O(g)(R.value.selectors.labels.x.formatter,O(h)(W.value.xMin),O(n)({p:R.value.selectors.labels.prefix,v:O(h)(W.value.xMin),s:R.value.selectors.labels.suffix,r:B.value.layout.dataLabels.xAxis.rounding}))),9,on)):b(``,!0)],512)):b(``,!0),F.value.show&&F.value.showValue?(C(),x(`text`,{key:11,ref_key:`xAxisLabelRight`,ref:Qn,"text-anchor":`middle`,transform:`translate(${U.value.right+B.value.layout.padding.right+6}, ${G.value.y+F.value.fontSize/3}), rotate(-90)`,"font-size":F.value.fontSize,fill:F.value.color},D(O(g)(R.value.selectors.labels.x.formatter,O(h)(W.value.xMax),O(n)({p:R.value.selectors.labels.prefix,v:O(h)(W.value.xMax),s:R.value.selectors.labels.suffix,r:F.value.rounding}))),9,sn)):b(``,!0),I.value.show&&I.value.showValue?(C(),x(`text`,{key:12,ref_key:`yAxisLabelTop`,ref:$n,x:G.value.x,y:U.value.top-I.value.fontSize,"text-anchor":`middle`,"font-size":I.value.fontSize,fill:I.value.color},D(O(g)(R.value.selectors.labels.y.formatter,O(h)(W.value.yMax),O(n)({p:R.value.selectors.labels.prefix,v:O(h)(W.value.yMax),s:R.value.selectors.labels.suffix,r:I.value.rounding}))),9,cn)):b(``,!0),I.value.show?(C(),x(`g`,{key:13,ref_key:`yAxisLabelBottom`,ref:er},[I.value.showValue?(C(),x(`text`,{key:0,x:G.value.x,y:H.value.height-I.value.fontSize*2,"text-anchor":`middle`,"font-size":I.value.fontSize,fill:I.value.color},D(O(g)(R.value.selectors.labels.y.formatter,O(h)(W.value.yMin),O(n)({p:R.value.selectors.labels.prefix,v:O(h)(W.value.yMin),s:R.value.selectors.labels.suffix,r:B.value.layout.dataLabels.yAxis.rounding}))),9,ln)):b(``,!0),S(`text`,{"text-anchor":`middle`,"font-size":I.value.fontSize,"font-weight":I.value.bold?`bold`:`normal`,fill:I.value.color,x:U.value.left+U.value.width/2+(B.value.layout.dataLabels.reverseAxisLabels?F.value.offsetX:I.value.offsetX),y:H.value.height+(B.value.layout.dataLabels.reverseAxisLabels?F.value.offsetY:I.value.offsetY)},D(B.value.layout.dataLabels.reverseAxisLabels?F.value.name:I.value.name),9,un)],512)):b(``,!0),S(`clipPath`,{id:`clip_path_${j.value}`},[S(`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,fn)],8,dn),B.value.layout.correlation.show?(C(),x(`g`,pn,[(C(!0),x(_,null,T(q.value.filter(e=>e.correlation),(e,t)=>(C(),x(`line`,{x1:e.correlation.x1,x2:e.correlation.x2,y1:e.correlation.y1,y2:e.correlation.y2,"stroke-dasharray":B.value.layout.correlation.strokeDasharray,stroke:e.color,"stroke-width":B.value.layout.correlation.strokeWidth,"clip-path":`url(#clip_path_${j.value})`},null,8,mn))),256)),(C(!0),x(_,null,T(q.value.filter(e=>e.correlation),(e,t)=>(C(),x(`g`,null,[B.value.layout.correlation.label.show?(C(),x(`text`,{key:0,x:e.correlation.x2,y:e.correlation.y2,fill:B.value.layout.correlation.label.useSerieColor?e.color:B.value.layout.correlation.label.color,"text-anchor":`end`,"font-size":B.value.layout.correlation.label.fontSize,"font-weight":B.value.layout.correlation.label.bold?`bold`:`normal`},D(O(n)({v:O(h)(e.correlation?.coefficient??0),r:B.value.layout.correlation.label.roundingValue})),9,hn)):b(``,!0)]))),256))])):b(``,!0),E(e.$slots,`svg`,{svg:{...H.value,drawingArea:{...U.value,zero:G.value},data:$r.value,isPrintingImg:O(Or)||O(kr)||O(Ki),isPrintingSvg:O(qi)}},void 0,!0)],46,ot)),e.$slots.hint?(C(),x(`div`,gn,[E(e.$slots,`hint`,Ke(He({hint:N.value.a11y.translations.keyboardNavigation,isVisible:or.value})),void 0,!0)])):b(``,!0)]),e.$slots.watermark?(C(),x(`div`,_n,[E(e.$slots,`watermark`,Ke(He({isPrinting:O(Or)||O(kr)||O(Ki)||O(qi)})),void 0,!0)])):b(``,!0),S(`div`,{id:`legend-bottom-${j.value}`},null,8,vn),Pn.value&&Kn.value&&(B.value.legend.show||e.$slots.legend)?(C(),y(Le,{key:7,to:B.value.legend.position===`top`?`#legend-top-${j.value}`:`#legend-bottom-${j.value}`},[S(`div`,{ref_key:`chartLegend`,ref:Bn},[E(e.$slots,`legend`,{legend:K.value},()=>[B.value.legend.show?(C(),y(Fe,{key:`legend_${Gn.value}`,legendSet:K.value,config:Qr.value,isCursorPointer:lr.value,onClickMarker:t[3]||=({legend:e})=>vi(e.id)},{item:k(({legend:e})=>[S(`div`,{onClick:t=>e.segregate(),style:qe(`opacity:${M.value.includes(e.id)?.5:1}`)},D(e.name),13,yn)]),legendToggle:k(()=>[K.value.length>2&&B.value.legend.selectAllToggle.show&&!O(pr)?(C(),y(je,{key:0,backgroundColor:B.value.legend.selectAllToggle.backgroundColor,color:B.value.legend.selectAllToggle.color,fontSize:B.value.legend.fontSize,checked:M.value.length>0,isCursorPointer:lr.value,onToggle:_i},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):b(``,!0)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):b(``,!0)],!0)],512)],8,[`to`])):b(``,!0),e.$slots.source?(C(),x(`div`,{key:8,ref_key:`source`,ref:Vn,dir:`auto`},[E(e.$slots,`source`,{},void 0,!0)],512)):b(``,!0),Be(O(wn),{teleportTo:z.value.teleportTo,show:V.value.showTooltip&&Fn.value,backgroundColor:z.value.backgroundColor,color:z.value.color,borderRadius:z.value.borderRadius,borderColor:z.value.borderColor,borderWidth:z.value.borderWidth,fontSize:z.value.fontSize,backgroundOpacity:z.value.backgroundOpacity,position:z.value.position,offsetX:z.value.offsetX,offsetY:z.value.offsetY,parent:Rn.value,content:In.value,isFullscreen:wi.value,isCustom:z.value.customFormat&&typeof z.value.customFormat==`function`,smooth:z.value.smooth,backdropFilter:z.value.backdropFilter,smoothForce:z.value.smoothForce,smoothSnapThreshold:z.value.smoothSnapThreshold,isA11yMode:ar.value===`keyboard`,a11yPosition:ir.value},{"tooltip-before":k(()=>[E(e.$slots,`tooltip-before`,Ke(He({...ai.value})),void 0,!0)]),tooltip:k(()=>[E(e.$slots,`tooltip`,Ke(He({...ai.value})),void 0,!0)]),"tooltip-after":k(()=>[E(e.$slots,`tooltip-after`,Ke(He({...ai.value})),void 0,!0)]),default:k(()=>[z.value.showShape?(C(),x(`div`,bn,[(C(),x(`svg`,xn,[Be(Oe,{shape:Z.value.shape,color:Z.value.color,plot:{x:10,y:10},radius:7},null,8,[`shape`,`color`])]))])):b(``,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Pn.value&&P.value.buttons.table?(C(),y(Xe(Vi.value.component),Ue({key:9},Vi.value.props,{ref_key:`tableUnit`,ref:Yn,onClose:Hi}),Re({content:k(()=>[(C(),y(O(Dn),{key:`table_${Wn.value}`,colNames:Ci.value.colNames,head:Ci.value.head,body:Ci.value.body,config:Ci.value.config,title:N.value.table.useDialog?``:Vi.value.title,withCloseButton:!N.value.table.useDialog,isCursorPointer:lr.value,onClose:Hi},{th:k(({th:e})=>[ze(D(e),1)]),td:k(({td:e})=>[e.shape?(C(),x(`div`,Sn,[S(`span`,null,D(e.content),1)])):(C(),x(`div`,{key:1,innerHTML:e},null,8,Cn))]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[N.value.table.useDialog?{name:`title`,fn:k(()=>[ze(D(Vi.value.title),1)]),key:`0`}:void 0,N.value.table.useDialog?{name:`actions`,fn:k(()=>[S(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[4]||=e=>Si(P.value.callbacks.csv),style:qe({cursor:lr.value?`pointer`:`default`})},[Be(O(Tn),{name:`fileCsv`,stroke:Vi.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):b(``,!0),E(e.$slots,`skeleton`,{},()=>[O(pr)?(C(),y(de,{key:0})):b(``,!0)],!0)],46,tt))}},[[`__scopeId`,`data-v-d7334a0a`]]);export{et as n,wn as t};
9
+ ℹ️ To remove this warning, set config.debug to false.`)):(N.value.style.tooltip=i.style.tooltip,V.value.showTooltip=N.value.style.tooltip.show)},{deep:!0}),$e(()=>A.dataset,e=>{Array.isArray(e)&&e.length>0&&(hr.value=!1)},{deep:!0});let Sr=Ze(null),Cr=Ze(null),wr=w(!1),Tr=0;Ye(async()=>{Dr(),await We(),Kn.value=!0});let Er=v(()=>N.value.debug);function Dr(){le(A.dataset)&&(m({componentName:`VueUiScatter`,type:`dataset`,debug:Er.value}),hr.value=!0),le(A.dataset)||(hr.value=N.value.loading),N.value.responsive&&(Sr.value&&(Cr.value&&Sr.value.unobserve(Cr.value),Sr.value.disconnect()),Sr.value=new ResizeObserver(()=>{let{width:e,height:t}=ke({chart:Rn.value,title:B.value.title.text?zn.value:null,legend:B.value.legend.show?Bn.value:null,source:Vn.value,noTitle:Hn.value});cancelAnimationFrame(Tr),Tr=requestAnimationFrame(()=>{H.value.width=e,H.value.height=t,wr.value=!0})}),Cr.value=Rn.value.parentNode,Sr.value.observe(Cr.value))}Je(()=>{cancelAnimationFrame(Tr),Sr.value&&(Cr.value&&Sr.value.unobserve(Cr.value),Sr.value.disconnect())});let{isPrinting:Or,isImaging:kr,generatePdf:Ar,generateImage:jr}=Te({elementId:`vue-ui-scatter_${j.value}`,fileName:B.value.title.text||`vue-ui-scatter`,options:N.value.userOptions.print}),Mr=v(()=>N.value.userOptions.show&&!B.value.title.text),Nr=v(()=>se(N.value.customPalette)),V=w({showTable:N.value.table.show,showTooltip:z.value.show});$e(N,()=>{V.value={showTable:N.value.table.show,showTooltip:z.value.show}},{immediate:!0});let H=w({height:B.value.layout.height,width:B.value.layout.width}),Pr=v(()=>L.value.show?L.value.size+L.value.offset:0),{metrics:Fr,ready:Ir,settling:Lr,update:Rr}=De({svgRef:yr,canMeasure:()=>!N.value.responsive||wr.value,initialMetrics:{left:0,right:0,bottom:0},measure:e=>{let t=I.value.scales.show?e(tr.value).textWidth:0,n=t=>{let n=e(t);return Math.max(0,n.x+n.width-H.value.width)},r=Qn.value?n(Qn.value):0,i=F.value.scales.show&&nr.value?Math.max(0,...[...nr.value.querySelectorAll(`text`)].map(n)):0,a=Math.max(r,i);return{left:Math.max(e(Zn.value).width,t?t+12:0),right:a?a+6:0,bottom:er.value?e(er.value).height+6:0}}}),U=v(()=>{let{left:e,right:t,bottom:n}=Fr.value;return{top:B.value.layout.padding.top+Pr.value+I.value.fontSize*2,right:H.value.width-B.value.layout.padding.right-Pr.value-6-t,bottom:H.value.height-B.value.layout.padding.bottom-n,left:B.value.layout.padding.left+e,height:H.value.height-B.value.layout.padding.top-B.value.layout.padding.bottom-Pr.value-n-I.value.fontSize*2,width:H.value.width-B.value.layout.padding.left-B.value.layout.padding.right-Pr.value-e-t-6}}),zr=v(()=>{Er.value&&mr.value.forEach((e,t)=>{ce({datasetObject:e,requiredAttributes:[`values`]}).forEach(e=>{m({componentName:`VueUiScatter`,type:`datasetSerieAttribute`,property:e,index:t})}),e.values&&e.values.forEach((e,n)=>{ce({datasetObject:e,requiredAttributes:[`x`,`y`]}).forEach(e=>{m({componentName:`VueUiScatter`,type:`datasetSerieAttribute`,property:`values.${e}`,index:`${t} - ${n}`})})})});let e=Math.min(...K.value.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values.map(e=>e.x))),t=Math.max(...K.value.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values.map(e=>e.x))),n=Math.min(...K.value.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values.map(e=>e.y))),r=Math.max(...K.value.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values.map(e=>e.y)));return{xMin:e<0?e:0,xMax:t,yMin:n<0?n:0,yMax:r}}),Br=v(()=>{let e=B.value.layout.axis;return{xMin:e.xMin!==null&&e.xMin!==void 0?e.xMin:zr.value.xMin,xMax:e.xMax!==null&&e.xMax!==void 0?e.xMax:zr.value.xMax,yMin:e.yMin!==null&&e.yMin!==void 0?e.yMin:zr.value.yMin,yMax:e.yMax!==null&&e.yMax!==void 0?e.yMax:zr.value.yMax}});function Vr(e){return Number.isFinite(e)?e<2?2:Math.trunc(e):5}function Hr(e){return e.roundingValue!==void 0&&e.roundingValue!==null?e.roundingValue:e.rounding!==void 0&&e.rounding!==null?e.rounding:0}function Ur({minimum:e,maximum:t,stepCount:n,useNiceScale:r}){let i=Vr(n);if(e===t){let n=t+(e===0?1:Math.abs(e)*.01);return(r?p:oe)(e,n,i)}return(r?p:oe)(e,t,i)}let Wr=v(()=>{let e=F.value;return Ur({minimum:Br.value.xMin,maximum:Br.value.xMax,stepCount:e.scales.steps,useNiceScale:e.scales.useNiceScale})}),Gr=v(()=>{let e=I.value;return Ur({minimum:Br.value.yMin,maximum:Br.value.yMax,stepCount:e.scales.steps,useNiceScale:e.scales.useNiceScale})}),W=v(()=>({xMin:Wr.value.min,xMax:Wr.value.max,yMin:Gr.value.min,yMax:Gr.value.max})),Kr=v(()=>{let e=F.value,t=e.scales.labels;return Wr.value.ticks.map(r=>({value:r,x:Xr(r),label:g(t.formatter,h(r),n({p:R.value.selectors.labels.prefix,v:h(r),s:R.value.selectors.labels.suffix,r:Hr(e)}))}))}),qr=v(()=>{let e=I.value,t=e.scales.labels;return Gr.value.ticks.map(r=>({value:r,y:Zr(r),label:g(t.formatter,h(r),n({p:R.value.selectors.labels.prefix,v:h(r),s:R.value.selectors.labels.suffix,r:Hr(e)}))}))}),Jr=v(()=>di.value.length>0&&F.value.scales.show),Yr=v(()=>di.value.length>0&&I.value.scales.show);function Xr(e){let t=W.value.xMax-W.value.xMin;return t===0?U.value.left:U.value.left+(e-W.value.xMin)/t*U.value.width}function Zr(e){let t=W.value.yMax-W.value.yMin;return t===0?U.value.bottom:U.value.bottom-(e-W.value.yMin)/t*U.value.height}let G=v(()=>{let{xMin:e,xMax:t,yMin:n,yMax:r}=W.value,i=e>0?e:t<0?t:0,a=n>0?n:r<0?r:0;return{x:Xr(i),y:Zr(a)}}),K=v(()=>mr.value.map((e,t)=>{let n=`cluster_${j.value}_${t}`;return{...e,values:te({data:e.values,threshold:N.value.usePerformanceMode?e.values.length+1:N.value.downsample.threshold}),id:n,color:e.color?e.color:Nr.value[t]||s[t]||s[t%s.length],opacity:M.value.includes(n)?.5:1,shape:e.shape??`circle`,segregate:()=>vi(n),isSegregated:M.value.includes(n),hasGroupSelection:!!oi.value,isGroupSelected:oi.value===n,onEnter:()=>ci(n),onLeave:()=>li()}})),Qr=v(()=>({cy:`scatter-div-legend`,backgroundColor:B.value.legend.backgroundColor,color:B.value.legend.color,fontSize:B.value.legend.fontSize,paddingBottom:12,fontWeight:B.value.legend.bold?`bold`:``})),$r=v(()=>K.value.map((e,t)=>({...e,plots:e.values.map((n,r)=>({x:Xr(n.x),y:Zr(n.y),v:{...n,name:n.name||``},clusterName:e.name,clusterId:e.id,color:e.color?e.color:Nr.value[t]||s[t]||s[t%s.length],id:`plot_${j.value}_${t}_${r}`,weight:n.weight??R.value.radius}))})).filter(e=>!M.value.includes(e.id))),q=v(()=>{let e=1e-9,t=({m:t,b:n,rect:r,verticalX:i=null})=>{let{left:a,right:o,top:s,bottom:c}=r,l=[],u=(e,t)=>{Number.isFinite(e)&&Number.isFinite(t)&&l.push({x:e,y:t})},d=({x:t,y:n})=>t>=a-e&&t<=o+e&&n>=s-e&&n<=c+e;i===null?Number.isFinite(t)&&(u(a,t*a+n),u(o,t*o+n),Math.abs(t)>e?(u((s-n)/t,s),u((c-n)/t,c)):n>=s-e&&n<=c+e&&(u(a,n),u(o,n))):i>=a-e&&i<=o+e&&(u(i,s),u(i,c));let f=l.filter(d),p=[];for(let e of f)p.some(t=>Math.abs(t.x-e.x)<1e-6&&Math.abs(t.y-e.y)<1e-6)||p.push(e);if(p.length<2)return null;let m=p[0],h=p[1],g=0;for(let e=0;e<p.length;e+=1)for(let t=e+1;t<p.length;t+=1){let n=p[e].x-p[t].x,r=p[e].y-p[t].y,i=n*n+r*r;i>g&&(g=i,m=p[e],h=p[t])}return{x1:m.x,y1:m.y,x2:h.x,y2:h.y}};return $r.value.map(n=>{let r=n.plots.length,i=n.plots.reduce((e,t)=>e+t.x,0)/r,a=n.plots.reduce((e,t)=>e+t.y,0)/r,o=0,s=0,c=0;for(let e of n.plots){let t=e.x-i,n=e.y-a;o+=t*n,s+=t*t,c+=n*n}let l,u,f=null;s<e?(f=i,l=1/0,u=null):(l=o/s,u=a-l*i);let p,m;f===null?(p=l,m=u):(p=1/0,m=null);let h=n.plots.every(e=>e.v&&typeof e.v.x==`number`&&typeof e.v.y==`number`),g=NaN;if(r>=2){let t=0,o=0;h?(t=n.plots.reduce((e,t)=>e+t.v.x,0)/r,o=n.plots.reduce((e,t)=>e+t.v.y,0)/r):(t=i,o=-a);let s=0,c=0,l=0;for(let e of n.plots){let n=h?e.v.x:e.x,r=h?e.v.y:-e.y,i=n-t,a=r-o;s+=i*a,c+=i*i,l+=a*a}if(c>=e&&l>=e){let e=s/Math.sqrt(c*l);g=Math.max(-1,Math.min(1,e))}}let ee=t({m:p,b:m,rect:U.value,verticalX:f});if(!ee)return{...n,correlation:null,label:null,plots:n.plots.map(e=>({...e,deviation:0,shape:n.shape,color:d(n.color)}))};let te={x:(ee.x1+ee.x2)/2,y:(ee.y1+ee.y2)/2};return{...n,color:d(n.color),correlation:{...ee,coefficient:g},label:te,plots:n.plots.map(t=>{let r,i;f===null?Math.abs(p)<e?(r=t.x,i=m):(r=(t.x+p*t.y-p*m)/(1+p*p),i=(p*t.x+p*p*t.y+m)/(1+p*p)):(r=f,i=t.y);let a=t.x-r,o=t.y-i,s=Math.sqrt(a*a+o*o);return{...t,deviation:s,shape:n.shape,color:d(n.color)}})}})}),ei=v(()=>Math.max(...q.value.flatMap(e=>e.plots.map(e=>Math.abs(e.deviation)))));function ti(){return q.value}function ni(e,t){let n=Array.isArray(e)?e.flatMap(e=>e.plots.map(e=>({x:e.x,y:e.y}))):e.plots.map(e=>({x:e.x,y:e.y})),r=1/0,i=-1/0,a=1/0,o=-1/0;n.forEach(({x:e,y:t})=>{r=Math.min(r,e),i=Math.max(i,e),a=Math.min(a,t),o=Math.max(o,t)});let s=i-r,c=o-a,l=s/t,u=c/t,d=Array(t).fill(0),f=Array(t).fill(0),p=(e,n,r)=>r>0?Math.max(0,Math.min(t-1,Math.floor((e-n)/r+1e-10))):0;n.forEach(({x:e,y:t})=>{let n=p(e,r,l),i=p(t,a,u);d[n]||(d[n]=0),f[i]||(f[i]=0),d[n]+=1,f[i]+=1});let m=[],h=[];for(let e=0;e<t;e+=1)m.push(r+(e+.5)*l),h.push(a+(e+.5)*u);return{x:d,y:f,avgX:m,avgY:h,maxX:Math.max(...d),maxY:Math.max(...f)}}let J=v(()=>L.value.tranches),Y=v(()=>ni($r.value,J.value)),ri=v(()=>{let e=U.value.top-L.value.offset,t=U.value.right+L.value.offset;return $r.value.map(n=>{let r=ni(n,J.value);return{coords:r,dX:l(r.avgX.map((t,n)=>({x:t,y:e-r.x[n]/r.maxX*L.value.size}))),dY:o(r.avgY.map((e,n)=>({y:e,x:t+L.value.size*r.y[n]/r.maxY}))),color:n.color,id:n.id}})}),X=w(void 0),Z=w(null),Q=w([]),ii=w(!1),ai=w(null),oi=w(void 0);function si(){Fn.value=!1,X.value=void 0,Q.value=[],Z.value=null,sr.value=null,rr.value=null,oi.value=void 0}function ci(e){let t=q.value.find(t=>t.id===e);t?(Q.value=t.plots.map(e=>e.id),oi.value=e):Q.value=[]}function li(){Q.value=[],oi.value=void 0}function ui(e){if(!yr.value||!e)return;let t=ae(e.x,e.y,yr.value);t&&(ir.value=t)}let di=v(()=>Z.value?[Z.value]:Q.value.length?q.value.flatMap(e=>e.plots).filter(e=>Q.value.includes(e.id)):[]);function fi(e){let t=F.value,r=t.scales.labels;return g(r.formatter,h(e.v.x),n({p:R.value.selectors.labels.prefix,v:h(e.v.x),s:R.value.selectors.labels.suffix,r:Hr(t)}),{datapoint:e})}function pi(e){let t=I.value,r=t.scales.labels;return g(r.formatter,h(e.v.y),n({p:R.value.selectors.labels.prefix,v:h(e.v.y),s:R.value.selectors.labels.suffix,r:Hr(t)}),{datapoint:e})}function mi(e,t,r=`pointer`,i=null){X.value=e.id,Z.value=e,ar.value=r,sr.value=i,rr.value=e.id;let o=``;N.value.events.datapointEnter&&N.value.events.datapointEnter({datapoint:e,seriesIndex:t}),ai.value={datapoint:e,seriesIndex:t,series:q.value,config:N.value};let s=z.value.customFormat;a(s)&&re(()=>s({datapoint:e,seriesIndex:t,series:q.value,config:N.value}))?In.value=s({datapoint:e,seriesIndex:t,series:q.value,config:N.value}):(e.clusterName&&(o+=`<div style="display:flex;gap:3px;align-items:center">${e.clusterName}</div>`),e.v.name&&(o+=`<div>${e.v.name}</div>`),o+=`<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${z.value.borderColor}">`,o+=`<div>${F.value.name}: <b>${isNaN(e.v.x)?`-`:g(R.value.selectors.labels.x.formatter,e.v.x,n({p:z.value.prefix,v:e.v.x,s:z.value.suffix,r:z.value.roundingValue}),{datapoint:e,seriesIndex:t})}</b></div>`,o+=`<div>${I.value.name}: <b>${isNaN(e.v.y)?`-`:g(R.value.selectors.labels.y.formatter,e.v.y,n({p:z.value.prefix,v:e.v.y,s:z.value.suffix,r:z.value.roundingValue}),{datapoint:e,seriesIndex:t})}</b></div>`,o+=`${R.value.deviation.translation}: <b>${n({v:e.deviation,r:R.value.deviation.roundingValue})}</b>`,o+=`</div>`,In.value=`<div>${o}</div>`),Fn.value=!0,r===`keyboard`&&We(()=>{ui(e)})}function hi(e,t){N.value.events.datapointLeave&&N.value.events.datapointLeave({datapoint:e,seriesIndex:t}),(ar.value!==`keyboard`||rr.value!==e?.id)&&(Fn.value=!1,X.value=void 0,Z.value=null)}function gi(e,t){N.value.events.datapointClick&&N.value.events.datapointClick({datapoint:e,seriesIndex:t})}function _i(){M.value.length?M.value=[]:K.value.forEach(e=>{M.value.push(e.id)}),Nn(`selectLegend`,$r.value)}function vi(e){M.value.includes(e)?M.value=M.value.filter(t=>t!==e):M.value.length<mr.value.length-1&&M.value.push(e),Nn(`selectLegend`,$r.value)}function yi(e){return K.value.length?K.value.find(t=>t.name===e)||(Er.value&&console.warn(`VueUiScatter - Series name not found "${e}"`),null):(Er.value&&console.warn(`VueUiScatter - There are no series to show.`),null)}function bi(e){let t=yi(e);t!==null&&M.value.includes(t.id)&&vi(t.id)}function xi(e){let t=yi(e);t!==null&&(M.value.includes(t.id)||vi(t.id))}function Si(e=null){We(()=>{let t=[``,N.value.table.translations.correlationCoefficient,N.value.table.translations.nbrPlots,`${F.value.name} ${N.value.table.translations.average}`,`${I.value.name} ${N.value.table.translations.average}`],n=q.value.map(e=>[e.name,e.correlation.coefficient,e.plots.length,e.plots.map(e=>e.v.x).reduce((e,t)=>e+t,0)/e.plots.length,e.plots.map(e=>e.v.y).reduce((e,t)=>e+t,0)/e.plots.length]),r=[[B.value.title.text],[B.value.title.subtitle.text],[[``],[``],[``]],t].concat(n),a=i(r);e?e(a):ne({csvContent:a,title:B.value.title.text||`vue-ui-heatmap`})})}let Ci=v(()=>{let e=[N.value.table.translations.series,N.value.table.translations.correlationCoefficient,N.value.table.translations.nbrPlots,`${F.value.name} ${N.value.table.translations.average}`,`${I.value.name} ${N.value.table.translations.average}`],t=q.value.map(e=>[{shape:e.shape,content:e.name??`-`,color:e.color},Number((e.correlation?.coefficient??0).toFixed(N.value.table.td.roundingValue)).toLocaleString(),e.plots.length.toLocaleString(),Number((e.plots.map(e=>e.v.x??0).reduce((e,t)=>e+t,0)/e.plots.length).toFixed(N.value.table.td.roundingAverage)).toLocaleString(),Number((e.plots.map(e=>e.v.y??0).reduce((e,t)=>e+t,0)/e.plots.length).toFixed(N.value.table.td.roundingAverage)).toLocaleString()]);return{head:e,body:t,a11yBody:t.map(e=>e.map((e,t)=>t===0?e.content:e)),config:{th:{backgroundColor:N.value.table.th.backgroundColor,color:N.value.table.th.color,outline:N.value.table.th.outline},td:{backgroundColor:N.value.table.td.backgroundColor,color:N.value.table.td.color,outline:N.value.table.td.outline},breakpoint:N.value.table.responsiveBreakpoint},colNames:e}}),wi=w(!1);function Ti(e){wi.value=e,Ln.value+=1}function Ei(){V.value.showTable=!V.value.showTable}function Di(){V.value.showTooltip=!V.value.showTooltip}let Oi=w(!1);function ki(){Oi.value=!Oi.value}async function Ai({scale:e=2}={}){if(!Rn.value)return;let{width:t,height:n}=Rn.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await ge({domElement:Rn.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:B.value.title.text,width:t,height:n,aspectRatio:r}}function ji(e){qn.value=e,L.value.highlighter.highlightBothAxes&&(Jn.value=Y.value.y.length-2-e)}function Mi(e){Jn.value=e,L.value.highlighter.highlightBothAxes&&(qn.value=e)}function Ni(){qn.value=null,Jn.value=null}let Pi={circle:1,square:1,diamond:1,triangle:1.2,star:1.3,pentagon:1.3,hexagon:1.3},$=e=>e.toFixed(3);function Fi({shape:e=`circle`,cx:t,cy:n,r}){if(!N.value.usePerformanceMode)return``;let i=Pi[e]*r;switch(e){case`circle`:{let e=$(t-i),r=$(n),a=$(t+i),o=$(i);return`M ${e} ${r} A ${o} ${o} 0 1 0 ${a} ${r} A ${o} ${o} 0 1 0 ${e} ${r} Z`}case`square`:{let e=$(t-i),r=$(n-i),a=$(t+i),o=$(n+i);return`M ${e} ${r} L ${a} ${r} L ${a} ${o} L ${e} ${o} Z`}case`diamond`:{let e=$(t),r=$(n);return`M ${e} ${$(n-i)} L ${$(t+i)} ${r} L ${e} ${$(n+i)} L ${$(t-i)} ${r} Z`}case`triangle`:{let e=i*Math.sqrt(3),r=t,a=n-2/3*e,o=t-i,s=n+1/3*e,c=t+i,l=s;return`M ${$(r)} ${$(a)} L ${$(o)} ${$(s)} L ${$(c)} ${$(l)} Z`}case`star`:{let e=i,r=i*.5,a=[];for(let i=0;i<10;i+=1){let o=(-90+i*36)*Math.PI/180,s=i%2==0?e:r;a.push([t+s*Math.cos(o),n+s*Math.sin(o)])}let o=`M ${$(a[0][0])} ${$(a[0][1])}`;for(let e=1;e<a.length;e+=1)o+=` L ${$(a[e][0])} ${$(a[e][1])}`;return o+` Z`}case`pentagon`:{let e=[];for(let r=0;r<5;r+=1){let a=(-90+r*72)*Math.PI/180;e.push([t+i*Math.cos(a),n+i*Math.sin(a)])}let r=`M ${$(e[0][0])} ${$(e[0][1])}`;for(let t=1;t<5;t+=1)r+=` L ${$(e[t][0])} ${$(e[t][1])}`;return r+` Z`}case`hexagon`:{let e=[];for(let r=0;r<6;r+=1){let a=(-60+r*60)*Math.PI/180;e.push([t+i*Math.cos(a),n+i*Math.sin(a)])}let r=`M ${$(e[0][0])} ${$(e[0][1])}`;for(let t=1;t<6;t+=1)r+=` L ${$(e[t][0])} ${$(e[t][1])}`;return r+` Z`}default:{let e=$(t-i),r=$(n),a=$(t+i),o=$(i);return`M ${e} ${r} A ${o} ${o} 0 1 0 ${a} ${r} A ${o} ${o} 0 1 0 ${e} ${r} Z`}}}let Ii=v(()=>{if(!N.value.usePerformanceMode)return[``];let{left:e,right:t,top:n,bottom:r}=U.value,i=Math.max(1,(t-e)*(r-n)),a=e=>e/i*1e4,o=R.value.stroke,s=R.value.strokeWidth,l=R.value.opacity;return q.value.map(i=>{let u=[];for(let a of i.plots){let o=a.x,s=a.y;if(o<e||o>t||s<n||s>r)continue;let c=Math.max(R.value.radius,a.weight);u.push(Fi({shape:i.shape||`circle`,cx:o,cy:s,r:c}))}if(!u.length)return null;let d=a(i.plots.length)>2.5||i.plots.length>1e3;return{id:i.id,d:u.join(``),fill:c(i.color,l*100),stroke:d?`none`:o,strokeWidth:d?0:s,strokeOpacity:1}}).filter(Boolean)});function Li(){return N.value.usePerformanceMode?e=>{let t=yr.value;if(!t)return;let n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;let r=t.getScreenCTM();if(!r)return;let i=r.inverse(),a=n.matrixTransform(i),o=null,s=1/0,c=-1;if(q.value.forEach((e,t)=>{e.plots.forEach(e=>{let n=e.x-a.x,r=e.y-a.y,i=n*n+r*r;i<=64&&i<s&&(s=i,o=e,c=t)})}),ii.value=!!o,o)X.value!==o.id&&(X.value=o.id,mi(o,c,`pointer`,ra.value.get(o.id)??null));else if(X.value){let e=Z.value;X.value=void 0,hi(e,c)}}:()=>null}let Ri=Li();function zi(){if(ii.value=!1,X.value){let e=Z.value;X.value=void 0,hi(e,null)}}function Bi(e){let t=Z.value;if(t){let e=q.value.findIndex(e=>e.id===t.clusterId);gi(t,e>=0?e:0)}}let Vi=v(()=>be({config:N,style:B,mutableConfig:V,dialog:jn,accordion:En,isFullscreen:wi,parent:Rn,maxWidth:800,isCursorPointer:lr}));$e(()=>V.value.showTable,e=>ye(e,N,Yn));function Hi(){V.value.showTable=!1,Xn.value&&Xn.value.setTableIconState(!1)}let Ui=v(()=>B.value.backgroundColor),Wi=v(()=>B.value.legend),Gi=v(()=>B.value.title),{isCallbackImaging:Ki,isCallbackSvg:qi,generateSvg:Ji,onGenerateImage:Yi}=ve({svg:yr,title:Gi,legend:Wi,legendItems:K,backgroundColor:Ui,getSvgCallback:()=>N.value.userOptions.callbacks.svg,generateImage:jr});async function Xi(){Nn(`copyAlt`,{config:N.value,dataset:$r.value}),N.value.userOptions.callbacks.altCopy?await Promise.resolve(N.value.userOptions.callbacks.altCopy({config:N.value,dataset:$r.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Zi(e,t){let n=na.value.filter(t=>t.id!==e.id);if(!n.length)return null;let r=(n=>{if(!n.length)return null;let r=null,i=1/0;return n.forEach(n=>{let a=n.x-e.x,o=n.y-e.y,s=0,c=0;t===`right`||t===`left`?(s=Math.abs(a),c=Math.abs(o)):(s=Math.abs(o),c=Math.abs(a));let l=s*1e3+c;l<i&&(r=n,i=l)}),r})(n.filter(n=>t===`right`?n.x>e.x:t===`left`?n.x<e.x:t===`down`?n.y>e.y:t===`up`&&n.y<e.y));if(r)return r;let i=[];if(t===`right`){let e=Math.min(...n.map(e=>e.x));i=n.filter(t=>t.x===e)}if(t===`left`){let e=Math.max(...n.map(e=>e.x));i=n.filter(t=>t.x===e)}if(t===`down`){let e=Math.min(...n.map(e=>e.y));i=n.filter(t=>t.y===e)}if(t===`up`){let e=Math.max(...n.map(e=>e.y));i=n.filter(t=>t.y===e)}return i.length?i.reduce((n,r)=>{if(!n)return r;let i=Math.abs(t===`right`||t===`left`?n.y-e.y:n.x-e.x);return Math.abs(t===`right`||t===`left`?r.y-e.y:r.x-e.x)<i?r:n},null):null}function Qi(){sr.value=null,rr.value=null,or.value=!0}function $i(){si(),ar.value=`pointer`,or.value=!1}function ea(e){if(!yr.value||Oi.value||document.activeElement!==yr.value||!na.value.length)return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`ArrowUp`,i=e.key===`ArrowDown`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){si(),ar.value=`pointer`;return}if(a){if(sr.value===null)return;let e=na.value[sr.value];if(!e)return;gi(e,e.seriesIndex);return}let s=null;if(n&&(s=`right`),t&&(s=`left`),i&&(s=`down`),r&&(s=`up`),rr.value===null){let e=Z.value;if(e&&e.id){let t=Zi(e,s);if(!t){let t=ra.value.get(e.id);if(t===void 0)return;mi(e,e.seriesIndex,`keyboard`,t);return}let n=ra.value.get(t.id);if(n===void 0)return;mi(t,t.seriesIndex,`keyboard`,n);return}let t=na.value[0];if(!t)return;let n=ra.value.get(t.id)??0;mi(t,t.seriesIndex,`keyboard`,n);return}let c=ra.value.get(rr.value);if(c===void 0)return;let l=na.value[c];if(!l)return;let u=Zi(l,s);if(!u)return;let d=ra.value.get(u.id);d!==void 0&&mi(u,u.seriesIndex,`keyboard`,d)}let ta=v(()=>{if(!Z.value)return``;let e=Z.value,t=isNaN(e.v.x)?`-`:g(R.value.selectors.labels.x.formatter,e.v.x,n({p:z.value.prefix,v:e.v.x,s:z.value.suffix,r:z.value.roundingValue}),{datapoint:e,seriesIndex:e.seriesIndex}),r=isNaN(e.v.y)?`-`:g(R.value.selectors.labels.y.formatter,e.v.y,n({p:z.value.prefix,v:e.v.y,s:z.value.suffix,r:z.value.roundingValue}),{datapoint:e,seriesIndex:e.seriesIndex});return[e.clusterName||``,e.v.name||``,`${F.value.name}: ${t}`,`${I.value.name}: ${r}`].filter(Boolean).join(`. `)}),na=v(()=>q.value.flatMap((e,t)=>e.plots.map(n=>({...n,seriesIndex:t,seriesId:e.id,seriesName:e.name,shape:e.shape||`circle`,color:e.color})))),ra=v(()=>{let e=/* @__PURE__ */ new Map;return na.value.forEach((t,n)=>{e.set(t.id,n)}),e}),ia=v(()=>({headers:Ci.value?.colNames??[],rows:Ci.value?.a11yBody??[]}));return me({getData:ti,getImage:Ai,generatePdf:Ar,generateCsv:Si,generateImage:jr,generateSvg:Ji,hideSeries:xi,showSeries:bi,toggleTable:Ei,toggleTooltip:Di,toggleAnnotator:ki,toggleFullscreen:Ti,copyAlt:Xi}),$e(()=>[H.value,F.value,I.value,B.value.layout.padding,Pr.value,W.value,R.value.selectors.labels,N.value.style.fontFamily,A.dataset,M.value,wr.value,Zn.value,Qn.value,er.value,nr.value,tr.value],Rr,{flush:`post`,deep:!0}),(e,t)=>(C(),x(`div`,{class:Ge(`vue-data-ui-component vue-ui-scatter ${wi.value?`vue-data-ui-wrapper-fullscreen`:``} ${N.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`scatterChart`,ref:Rn,id:`vue-ui-scatter_${j.value}`,style:qe(`font-family:${B.value.fontFamily};width:100%; text-align:center;background:${B.value.backgroundColor};${N.value.responsive?`height: 100%`:``}`),onMouseenter:t[5]||=()=>O(_r)(!0),onMouseleave:t[6]||=()=>{O(_r)(!1),or.value||si()}},[S(`div`,{id:`chart-instructions-${j.value}`,class:`sr-only`},[S(`p`,null,D(N.value.a11y.translations.keyboardNavigation),1)],8,nt),V.value.showTooltip?b(``,!0):(C(),x(`div`,rt,D(ta.value),1)),ia.value?.rows?.length&&Pn.value?(C(),y(Me,{key:1,uid:j.value,head:ia.value.headers,body:ia.value.rows,notice:N.value.a11y.translations.tableAvailable,caption:N.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):b(``,!0),P.value.buttons.annotator?(C(),y(O(On),{key:2,svgRef:O(yr),backgroundColor:B.value.backgroundColor,color:B.value.color,active:Oi.value,isCursorPointer:lr.value,palette:P.value.annotatorPalette,onClose:ki},Re({_:2},[T(O(Se),t=>({name:t,fn:k(n=>[E(e.$slots,t,Ke(He(O(xe)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):b(``,!0),Mr.value?(C(),x(`div`,{key:3,ref_key:`noTitle`,ref:Hn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):b(``,!0),B.value.title.text?(C(),x(`div`,{key:4,ref_key:`chartTitle`,ref:zn,style:`width:100%;background:transparent`},[(C(),y(_e,{key:`title_${Un.value}`,config:{title:{cy:`scatter-div-title`,...B.value.title},subtitle:{cy:`scatter-div-subtitle`,...B.value.title.subtitle}}},null,8,[`config`]))],512)):b(``,!0),S(`div`,{id:`legend-top-${j.value}`},null,8,it),P.value.show&&Pn.value&&(O(vr)||O(gr))?(C(),y(O(kn),{ref_key:`userOptionsRef`,ref:Xn,key:`user_options_${Ln.value}`,backgroundColor:B.value.backgroundColor,color:B.value.color,isImaging:O(kr),isPrinting:O(Or),uid:j.value,hasTooltip:P.value.buttons.tooltip&&z.value.show,hasPdf:P.value.buttons.pdf,hasImg:P.value.buttons.img,hasSvg:P.value.buttons.svg,hasXls:P.value.buttons.csv,hasTable:P.value.buttons.table,hasFullscreen:P.value.buttons.fullscreen,hasAltCopy:P.value.buttons.altCopy,isTooltip:V.value.showTooltip,isFullscreen:wi.value,titles:{...P.value.buttonTitles},chartElement:Rn.value,position:P.value.position,hasAnnotator:P.value.buttons.annotator,isAnnotation:Oi.value,callbacks:P.value.callbacks,printScale:P.value.print.scale,tableDialog:N.value.table.useDialog,isCursorPointer:lr.value,onToggleFullscreen:Ti,onGeneratePdf:O(Ar),onGenerateCsv:Si,onGenerateImage:O(Yi),onGenerateSvg:O(Ji),onToggleTable:Ei,onToggleTooltip:Di,onToggleAnnotator:ki,onCopyAlt:Xi,style:qe({visibility:O(vr)?O(gr)?`visible`:`hidden`:`visible`})},Re({_:2},[T(O(Ce)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:k(n=>[E(e.$slots,t,Ke(He(O(we)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isTooltip.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):b(``,!0),S(`div`,at,[(C(),x(`svg`,{ref_key:`svgRef`,ref:yr,xmlns:O(ie),"aria-describedby":`chart-instructions-${j.value}`,class:Ge({"vue-data-ui-fullscreen--on":wi.value,"vue-data-ui-fulscreen--off":!wi.value,"vue-data-ui-no-transition":!O(cr)||O(Lr)}),viewBox:`0 0 ${H.value.width<=0?10:H.value.width} ${H.value.height<=0?10:H.value.height}`,style:qe(`max-width:100%;overflow:visible;background:transparent;color:${B.value.color};visibility:${O(Ir)?`visible`:`hidden`}`),onMouseleave:Ni,tabindex:`0`,onFocus:Qi,onBlur:$i,onKeydown:ea},[Be(O(An)),E(e.$slots,`svg-underlayer`,{svg:{...H.value,drawingArea:{...U.value,zero:G.value},data:$r.value,isPrintingImg:O(Or)||O(kr)||O(Ki),isPrintingSvg:O(qi)}},void 0,!0),e.$slots[`chart-background`]?(C(),x(`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(e.$slots,`chart-background`,{},void 0,!0)],8,st)):b(``,!0),B.value.layout.axis.show?(C(),x(`g`,ct,[S(`line`,{x1:G.value.x,x2:G.value.x,y1:U.value.top,y2:U.value.bottom,stroke:B.value.layout.axis.stroke,"stroke-width":B.value.layout.axis.strokeWidth,"stroke-linecap":`round`},null,8,lt),S(`line`,{x1:U.value.left,x2:U.value.right,y1:G.value.y,y2:G.value.y,stroke:B.value.layout.axis.stroke,"stroke-width":B.value.layout.axis.strokeWidth,"stroke-linecap":`round`},null,8,ut)])):b(``,!0),F.value.scales.verticalLines.show?(C(),x(`g`,dt,[(C(!0),x(_,null,T(Kr.value,(e,t)=>(C(),x(`line`,{key:`scatter-x-scale-line-${j.value}-${t}`,x1:e.x,x2:e.x,y1:U.value.top,y2:U.value.bottom,stroke:F.value.scales.verticalLines.stroke,"stroke-width":F.value.scales.verticalLines.strokeWidth,"stroke-linecap":`round`},null,8,ft))),128))])):b(``,!0),F.value.scales.show?(C(),x(`g`,{key:3,ref_key:`xAxisScaleLabels`,ref:nr},[(C(!0),x(_,null,T(Kr.value,(e,t)=>(C(),x(`g`,{class:`vue-ui-scatter-scale-group`,key:`scatter-x-scale-${j.value}-${t}`,opacity:+!Jr.value},[S(`path`,{class:Ge({"vue-data-ui-transition":O(cr)&&!O(Lr)}),stroke:B.value.layout.axis.stroke,"stroke-width":B.value.layout.axis.strokeWidth,d:`M${e.x},${G.value.y-4} ${e.x},${G.value.y+4}`,"stroke-linecap":`round`},null,10,mt),S(`text`,{class:Ge({"vue-data-ui-transition":O(cr)&&!O(Lr)}),transform:`translate(${e.x}, ${G.value.y+F.value.scales.labels.fontSize+6+F.value.scales.labels.offsetY})`,"text-anchor":`middle`,"font-size":F.value.scales.labels.fontSize,fill:F.value.scales.labels.color,stroke:B.value.backgroundColor,"stroke-width":`2`,"paint-order":`stroke`},D(e.label),11,ht)],8,pt))),128))],512)):b(``,!0),I.value.scales.horizontalLines.show?(C(),x(`g`,gt,[(C(!0),x(_,null,T(qr.value,(e,t)=>(C(),x(`line`,{key:`scatter-y-scale-line-${j.value}-${t}`,x1:U.value.left,x2:U.value.right,y1:e.y,y2:e.y,stroke:I.value.scales.horizontalLines.stroke,"stroke-width":I.value.scales.horizontalLines.strokeWidth,"stroke-linecap":`round`},null,8,_t))),128))])):b(``,!0),I.value.scales.show?(C(),x(`g`,{key:5,ref_key:`yAxisScaleLabels`,ref:tr,opacity:+!Yr.value,style:{transition:`opacity 0.1s ease-in-out`},class:`vue-ui-scatter-scale-group`},[(C(!0),x(_,null,T(qr.value,(e,t)=>(C(),x(`g`,{key:`scatter-y-scale-${j.value}-${t}`},[S(`path`,{class:Ge({"vue-data-ui-transition":O(cr)&&!O(Lr)}),d:`M${G.value.x-4},${e.y} ${G.value.x+4},${e.y}`,stroke:B.value.layout.axis.stroke,"stroke-width":B.value.layout.axis.strokeWidth,"stroke-linecap":`round`},null,10,yt),S(`text`,{class:Ge({"vue-data-ui-transition":O(cr)&&!O(Lr)}),transform:`translate(${G.value.x-I.value.scales.labels.fontSize/2-8+I.value.scales.labels.offsetX}, ${e.y+I.value.scales.labels.fontSize/3})`,"text-anchor":`end`,"font-size":I.value.scales.labels.fontSize,fill:I.value.scales.labels.color,stroke:B.value.backgroundColor,"stroke-width":`2`,"paint-order":`stroke`},D(e.label),11,bt)]))),128))],8,vt)):b(``,!0),L.value.show?(C(),x(`g`,xt,[S(`defs`,null,[Be(Ae,{t:`linear`,id:`marginal_x_${j.value}`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,stops:[[`0%`,L.value.fill,1],[`100%`,B.value.backgroundColor,1]]},null,8,[`id`,`stops`]),Be(Ae,{t:`linear`,id:`marginal_y_${j.value}`,x1:`0%`,x2:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,B.value.backgroundColor,1],[`100%`,L.value.fill,1]]},null,8,[`id`,`stops`])]),(C(!0),x(_,null,T(Y.value.x,(e,n)=>(C(),x(`g`,null,[e&&Y.value.avgX[n]?(C(),x(`rect`,{key:0,x:Y.value.avgX[n]-U.value.width/J.value/2,y:U.value.top-L.value.offset-e/Y.value.maxX*L.value.size,width:U.value.width/J.value<=0?1e-4:U.value.width/J.value,height:e/Y.value.maxX*L.value.size<=0?1e-4:e/Y.value.maxX*L.value.size,fill:L.value.useGradient?`url(#marginal_x_${j.value})`:L.value.fill,style:qe([`opacity:${L.value.opacity}`,{"pointer-events":`none`}]),stroke:B.value.backgroundColor,"stroke-width":L.value.strokeWidth,rx:L.value.borderRadius},null,12,St)):b(``,!0),Y.value.avgX[n]?(C(),x(`rect`,{key:1,x:Y.value.avgX[n]-U.value.width/J.value/2,y:U.value.top-L.value.offset-L.value.size,width:U.value.width/J.value<=0?1e-4:U.value.width/J.value,height:Math.max(.1,L.value.size),fill:`transparent`,onMouseenter:e=>ji(n),onMouseleave:t[0]||=e=>Ni()},null,40,Ct)):b(``,!0),Y.value.avgX[n]&&qn.value!=null&&qn.value===n?(C(),x(`g`,wt,[S(`rect`,{x:Y.value.avgX[n]-U.value.width/J.value/2,y:U.value.top,width:U.value.width/J.value<=0?1e-4:U.value.width/J.value,height:U.value.height,fill:L.value.highlighter.color,"fill-opacity":L.value.highlighter.opacity},null,8,Tt),S(`line`,{x1:Y.value.avgX[n]-U.value.width/J.value/2,x2:Y.value.avgX[n]-U.value.width/J.value/2,y1:0,y2:U.value.top+U.value.height,stroke:L.value.highlighter.stroke,"stroke-dasharray":L.value.highlighter.strokeDasharray,"stroke-width":L.value.highlighter.strokeWidth,style:{transition:`none !important`,animation:`none !important`}},null,8,Et),S(`line`,{x1:Y.value.avgX[n]-U.value.width/J.value/2+(U.value.width/J.value<=0?1e-4:U.value.width/J.value),x2:Y.value.avgX[n]-U.value.width/J.value/2+(U.value.width/J.value<=0?1e-4:U.value.width/J.value),y1:0,y2:U.value.top+U.value.height,stroke:L.value.highlighter.stroke,"stroke-dasharray":L.value.highlighter.strokeDasharray,"stroke-width":L.value.highlighter.strokeWidth,style:{transition:`none !important`,animation:`none !important`}},null,8,Dt)])):b(``,!0)]))),256)),(C(!0),x(_,null,T(Y.value.y,(e,n)=>(C(),x(`g`,null,[e&&Y.value.avgY[n]?(C(),x(`rect`,{key:0,x:U.value.right+L.value.offset,y:Y.value.avgY[n]-U.value.height/J.value/2,height:U.value.height/J.value<=0?1e-4:U.value.height/J.value,width:e/Y.value.maxY*L.value.size<=0?1e-4:e/Y.value.maxY*L.value.size,fill:L.value.useGradient?`url(#marginal_y_${j.value})`:L.value.fill,style:qe([`opacity:${L.value.opacity}`,{"pointer-events":`none`}]),stroke:B.value.backgroundColor,"stroke-width":L.value.strokeWidth,rx:L.value.borderRadius},null,12,Ot)):b(``,!0),Y.value.avgY[n]?(C(),x(`rect`,{key:1,x:U.value.right+L.value.offset,y:Y.value.avgY[n]-U.value.height/J.value/2,width:Math.max(.1,L.value.size),height:U.value.height/J.value<=0?1e-4:U.value.height/J.value,fill:`transparent`,onMouseenter:e=>Mi(n),onMouseleave:t[1]||=e=>Ni()},null,40,kt)):b(``,!0),Y.value.avgY[n]&&Jn.value!=null&&Jn.value===n?(C(),x(`g`,At,[S(`rect`,{x:U.value.left,y:Y.value.avgY[n]-U.value.height/J.value/2,width:U.value.width,height:U.value.height/J.value<=0?1e-4:U.value.height/J.value,fill:L.value.highlighter.color,"fill-opacity":L.value.highlighter.opacity},null,8,jt),S(`line`,{x1:U.value.left,x2:H.value.width,y1:Y.value.avgY[n]-U.value.height/J.value/2,y2:Y.value.avgY[n]-U.value.height/J.value/2,stroke:L.value.highlighter.stroke,"stroke-dasharray":L.value.highlighter.strokeDasharray,"stroke-width":L.value.highlighter.strokeWidth,style:{transition:`none !important`,animation:`none !important`}},null,8,Mt),S(`line`,{x1:U.value.left,x2:H.value.width,y1:Y.value.avgY[n]-U.value.height/J.value/2+(U.value.height/J.value<=0?1e-4:U.value.height/J.value),y2:Y.value.avgY[n]-U.value.height/J.value/2+(U.value.height/J.value<=0?1e-4:U.value.height/J.value),stroke:L.value.highlighter.stroke,"stroke-dasharray":L.value.highlighter.strokeDasharray,"stroke-width":L.value.highlighter.strokeWidth,style:{transition:`none !important`,animation:`none !important`}},null,8,Nt)])):b(``,!0)]))),256)),L.value.showLines?(C(),x(`g`,Pt,[(C(!0),x(_,null,T(ri.value,e=>(C(),x(_,null,[M.value.includes(e.id)?b(``,!0):(C(),x(`path`,{key:0,d:`M ${e.dX}`,stroke:B.value.backgroundColor,"stroke-width":L.value.linesStrokeWidth+1,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,Ft)),M.value.includes(e.id)?b(``,!0):(C(),x(`path`,{key:1,d:`M ${e.dX}`,stroke:e.color,"stroke-width":L.value.linesStrokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,It)),M.value.includes(e.id)?b(``,!0):(C(),x(`path`,{key:2,d:`M ${e.dY}`,stroke:B.value.backgroundColor,"stroke-width":L.value.linesStrokeWidth+1,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,Lt)),M.value.includes(e.id)?b(``,!0):(C(),x(`path`,{key:3,d:`M ${e.dY}`,stroke:e.color,"stroke-width":L.value.linesStrokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,Rt))],64))),256))])):b(``,!0)])):b(``,!0),R.value.giftWrap.show?(C(),x(`g`,zt,[(C(!0),x(_,null,T(q.value,(e,t)=>(C(),x(`g`,null,[e.plots.length>2?(C(),x(`polygon`,{key:0,points:O(r)({series:e.plots}),fill:O(c)(e.color,R.value.giftWrap.fillOpacity*100),"stroke-width":R.value.giftWrap.strokeWidth,"stroke-dasharray":R.value.giftWrap.strokeDasharray,stroke:e.color,"stroke-linejoin":`round`,"stroke-linecap":`round`},null,8,Bt)):b(``,!0)]))),256))])):b(``,!0),N.value.usePerformanceMode?b(``,!0):(C(!0),x(_,{key:8},T(q.value,(e,t)=>(C(),x(`g`,{key:e.id},[!e.shape||e.shape===`circle`?(C(),x(`g`,Vt,[(C(!0),x(_,null,T(e.plots,(n,r)=>(C(),x(`circle`,{key:n.id,cx:n.x,cy:n.y,r:X.value&&X.value===n.id||Q.value.includes(n.id)?n.weight*R.value.hoverRadiusRatio:n.weight,fill:O(c)(e.color,X.value&&X.value!==n.id||Q.value.length&&!Q.value.includes(n.id)?R.value.opacityNotSelected*100:R.value.opacity*100),stroke:R.value.stroke,"stroke-width":R.value.strokeWidth,style:qe(`opacity:${X.value&&X.value===n.id||Q.value.includes(n.id)?1:R.value.significance.useDistanceOpacity?1-Math.abs(n.deviation)/ei.value:R.value.significance.show&&Math.abs(n.deviation)>R.value.significance.deviationThreshold?R.value.significance.opacity:1}`),onMouseover:e=>mi(n,t,`pointer`,ra.value.get(n.id)),onMouseleave:e=>hi(n,t),onClick:e=>gi(n,t)},null,44,Ht))),128))])):(C(),x(`g`,Ut,[(C(!0),x(_,null,T(e.plots,(n,r)=>(C(),y(Oe,{class:`vue-ui-scatter-datapoint`,plot:{x:n.x,y:n.y},radius:X.value&&X.value===n.id||Q.value.includes(n.id)?n.weight*R.value.hoverRadiusRatio:n.weight,shape:e.shape,color:O(c)(e.color,X.value&&X.value!==n.id||Q.value.length&&!Q.value.includes(n.id)?R.value.opacityNotSelected*100:R.value.opacity*100),stroke:R.value.stroke,strokeWidth:R.value.strokeWidth,style:qe(`opacity:${X.value&&X.value===n.id||Q.value.includes(n.id)?1:R.value.significance.useDistanceOpacity?1-Math.abs(n.deviation)/ei.value:R.value.significance.show&&Math.abs(n.deviation)>R.value.significance.deviationThreshold?R.value.significance.opacity:1}`),onMouseover:e=>mi(n,t,`pointer`,ra.value.get(n.id)),onMouseleave:e=>hi(n,t),onClick:e=>gi(n,t)},null,8,[`plot`,`radius`,`shape`,`color`,`stroke`,`strokeWidth`,`style`,`onMouseover`,`onMouseleave`,`onClick`]))),256))])),R.value.name.show?(C(!0),x(_,{key:2},T(e.plots,(e,n)=>(C(),x(`text`,{class:`vue-ui-scatter-datapoint-label`,key:`datalabel-${e.id}`,transform:`translate(${e.x}, ${e.y-e.weight-R.value.name.fontSize+R.value.name.offsetY})`,"text-anchor":`middle`,"font-size":R.value.name.fontSize,fill:O(c)(R.value.name.color,X.value&&X.value!==e.id||Q.value.length&&!Q.value.includes(e.id)?R.value.opacityNotSelected*100:100),onMouseover:n=>mi(e,t,`pointer`,ra.value.get(e.id)),onMouseleave:n=>hi(e,t),onClick:n=>gi(e,t)},D(e.clusterName),41,Wt))),128)):b(``,!0)]))),128)),N.value.usePerformanceMode?(C(),x(_,{key:9},[S(`g`,null,[(C(!0),x(_,null,T(Ii.value,e=>(C(),x(`path`,{key:e.id,d:e.d,fill:e.fill,stroke:e.stroke,"stroke-width":e.strokeWidth,"stroke-opacity":e.strokeOpacity,"vector-effect":`non-scaling-stroke`,"paint-order":`fill`},null,8,Gt))),128))]),Z.value?(C(),x(`g`,Kt,[Be(Oe,{shape:Z.value.shape||`circle`,color:Z.value.color,plot:{x:Z.value.x,y:Z.value.y},radius:Z.value.weight*R.value.hoverRadiusRatio,stroke:R.value.stroke,strokeWidth:R.value.strokeWidth},null,8,[`shape`,`color`,`plot`,`radius`,`stroke`,`strokeWidth`])])):b(``,!0),S(`rect`,{x:U.value.left,y:U.value.top,width:Math.max(1e-4,U.value.width),height:Math.max(1e-4,U.value.height),fill:`transparent`,style:qe({cursor:ii.value&&ur.value?`pointer`:`default`}),onMousemove:t[2]||=(...e)=>O(Ri)&&O(Ri)(...e),onMouseleave:zi,onClick:Bi},null,44,qt)],64)):b(``,!0),(C(!0),x(_,null,T(di.value,e=>(C(),x(_,{key:`selector_${e.id}`},[R.value.selectors.show?(C(),x(`g`,Jt,[S(`line`,{x1:G.value.x,x2:e.x,y1:e.y,y2:e.y,stroke:R.value.selectors.stroke,"stroke-width":R.value.selectors.strokeWidth,"stroke-dasharray":R.value.selectors.strokeDasharray,"stroke-linecap":`round`,class:`line-pointer`},null,8,Yt),S(`line`,{x1:e.x,x2:e.x,y1:G.value.y,y2:e.y,stroke:R.value.selectors.stroke,"stroke-width":R.value.selectors.strokeWidth,"stroke-dasharray":R.value.selectors.strokeDasharray,"stroke-linecap":`round`,class:`line-pointer`},null,8,Xt),I.value.scales.show?b(``,!0):(C(),x(`text`,{key:0,x:G.value.x+(e.x>G.value.x?-6:6),y:e.y+R.value.selectors.labels.fontSize/3,"font-size":R.value.selectors.labels.fontSize,fill:R.value.selectors.labels.color,"font-weight":R.value.selectors.labels.bold?`bold`:`normal`,"text-anchor":e.x>G.value.x?`end`:`start`},D(O(g)(R.value.selectors.labels.y.formatter,O(h)(e.v.y),O(n)({p:R.value.selectors.labels.prefix,v:O(h)(e.v.y),s:R.value.selectors.labels.suffix,r:R.value.selectors.labels.rounding}),{datapoint:e})),9,Zt)),F.value.scales.show?b(``,!0):(C(),x(`text`,{key:1,x:e.x,y:G.value.y+(e.y>G.value.y?-6:R.value.selectors.labels.fontSize+6),"font-size":R.value.selectors.labels.fontSize,fill:R.value.selectors.labels.color,"font-weight":R.value.selectors.labels.bold?`bold`:`normal`,"text-anchor":`middle`},D(O(g)(R.value.selectors.labels.y.formatter,O(h)(e.v.x),O(n)({p:R.value.selectors.labels.prefix,v:O(h)(e.v.x),s:R.value.selectors.labels.suffix,r:R.value.selectors.labels.rounding}),{datapoint:e})),9,Qt)),F.value.scales.show?(C(),x(`text`,{key:2,x:e.x,y:G.value.y+F.value.scales.labels.fontSize+6+F.value.scales.labels.offsetY,"text-anchor":`middle`,"font-size":F.value.scales.labels.fontSize,fill:F.value.scales.labels.color},D(fi(e)),9,$t)):b(``,!0),I.value.scales.show?(C(),x(`text`,{key:3,x:G.value.x-I.value.scales.labels.fontSize/2-8+I.value.scales.labels.offsetX,y:e.y+I.value.scales.labels.fontSize/3,"text-anchor":`end`,"font-size":I.value.scales.labels.fontSize,fill:I.value.scales.labels.color},D(pi(e)),9,en)):b(``,!0),S(`circle`,{cx:G.value.x,cy:e.y,r:R.value.selectors.markers.radius,fill:R.value.selectors.markers.fill,stroke:R.value.selectors.markers.stroke,"stroke-width":R.value.selectors.markers.strokeWidth,class:`line-pointer`},null,8,tn),S(`circle`,{cx:e.x,cy:G.value.y,r:R.value.selectors.markers.radius,fill:R.value.selectors.markers.fill,stroke:R.value.selectors.markers.stroke,"stroke-width":R.value.selectors.markers.strokeWidth,class:`line-pointer`},null,8,nn),R.value.selectors.labels.showName&&!R.value.name.show?(C(),x(`text`,{key:4,x:e.x,y:e.y+(e.y<G.value.y?-R.value.selectors.labels.fontSize/2:R.value.selectors.labels.fontSize),"font-size":R.value.selectors.labels.fontSize,fill:R.value.selectors.labels.color,"font-weight":R.value.selectors.labels.bold?`bold`:`normal`,"text-anchor":e.x<U.value.left+100?`start`:e.x>U.value.right-100?`end`:e.x>G.value.x?`start`:`end`},D(e.v.name),9,rn)):b(``,!0)])):b(``,!0)],64))),128)),F.value.show?(C(),x(`g`,{key:10,ref_key:`xAxisLabelLeft`,ref:Zn},[S(`text`,{id:`vue-ui-scatter-xAxis-label-${j.value}`,transform:`translate(${F.value.fontSize+(B.value.layout.dataLabels.reverseAxisLabels?I.value.offsetX:F.value.offsetX)}, ${U.value.top+U.value.height/2+(B.value.layout.dataLabels.reverseAxisLabels?I.value.offsetY:F.value.offsetY)}), rotate(-90)`,"text-anchor":`middle`,"font-size":F.value.fontSize,"font-weight":F.value.bold?`bold`:`normal`,fill:F.value.color},D(B.value.layout.dataLabels.reverseAxisLabels?I.value.name:F.value.name),9,an),F.value.showValue?(C(),x(`text`,{key:0,"text-anchor":`middle`,"font-size":F.value.fontSize,fill:F.value.color,transform:`translate(${F.value.name?F.value.fontSize*3:0}, ${G.value.y+F.value.fontSize/3}), rotate(-90)`},D(O(g)(R.value.selectors.labels.x.formatter,O(h)(W.value.xMin),O(n)({p:R.value.selectors.labels.prefix,v:O(h)(W.value.xMin),s:R.value.selectors.labels.suffix,r:B.value.layout.dataLabels.xAxis.rounding}))),9,on)):b(``,!0)],512)):b(``,!0),F.value.show&&F.value.showValue?(C(),x(`text`,{key:11,ref_key:`xAxisLabelRight`,ref:Qn,"text-anchor":`middle`,transform:`translate(${U.value.right+B.value.layout.padding.right+6}, ${G.value.y+F.value.fontSize/3}), rotate(-90)`,"font-size":F.value.fontSize,fill:F.value.color},D(O(g)(R.value.selectors.labels.x.formatter,O(h)(W.value.xMax),O(n)({p:R.value.selectors.labels.prefix,v:O(h)(W.value.xMax),s:R.value.selectors.labels.suffix,r:F.value.rounding}))),9,sn)):b(``,!0),I.value.show&&I.value.showValue?(C(),x(`text`,{key:12,ref_key:`yAxisLabelTop`,ref:$n,x:G.value.x,y:U.value.top-I.value.fontSize,"text-anchor":`middle`,"font-size":I.value.fontSize,fill:I.value.color},D(O(g)(R.value.selectors.labels.y.formatter,O(h)(W.value.yMax),O(n)({p:R.value.selectors.labels.prefix,v:O(h)(W.value.yMax),s:R.value.selectors.labels.suffix,r:I.value.rounding}))),9,cn)):b(``,!0),I.value.show?(C(),x(`g`,{key:13,ref_key:`yAxisLabelBottom`,ref:er},[I.value.showValue?(C(),x(`text`,{key:0,x:G.value.x,y:H.value.height-I.value.fontSize*2,"text-anchor":`middle`,"font-size":I.value.fontSize,fill:I.value.color},D(O(g)(R.value.selectors.labels.y.formatter,O(h)(W.value.yMin),O(n)({p:R.value.selectors.labels.prefix,v:O(h)(W.value.yMin),s:R.value.selectors.labels.suffix,r:B.value.layout.dataLabels.yAxis.rounding}))),9,ln)):b(``,!0),S(`text`,{"text-anchor":`middle`,"font-size":I.value.fontSize,"font-weight":I.value.bold?`bold`:`normal`,fill:I.value.color,x:U.value.left+U.value.width/2+(B.value.layout.dataLabels.reverseAxisLabels?F.value.offsetX:I.value.offsetX),y:H.value.height+(B.value.layout.dataLabels.reverseAxisLabels?F.value.offsetY:I.value.offsetY)},D(B.value.layout.dataLabels.reverseAxisLabels?F.value.name:I.value.name),9,un)],512)):b(``,!0),S(`clipPath`,{id:`clip_path_${j.value}`},[S(`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,fn)],8,dn),B.value.layout.correlation.show?(C(),x(`g`,pn,[(C(!0),x(_,null,T(q.value.filter(e=>e.correlation),(e,t)=>(C(),x(`line`,{x1:e.correlation.x1,x2:e.correlation.x2,y1:e.correlation.y1,y2:e.correlation.y2,"stroke-dasharray":B.value.layout.correlation.strokeDasharray,stroke:e.color,"stroke-width":B.value.layout.correlation.strokeWidth,"clip-path":`url(#clip_path_${j.value})`},null,8,mn))),256)),(C(!0),x(_,null,T(q.value.filter(e=>e.correlation),(e,t)=>(C(),x(`g`,null,[B.value.layout.correlation.label.show?(C(),x(`text`,{key:0,x:e.correlation.x2,y:e.correlation.y2,fill:B.value.layout.correlation.label.useSerieColor?e.color:B.value.layout.correlation.label.color,"text-anchor":`end`,"font-size":B.value.layout.correlation.label.fontSize,"font-weight":B.value.layout.correlation.label.bold?`bold`:`normal`},D(O(n)({v:O(h)(e.correlation?.coefficient??0),r:B.value.layout.correlation.label.roundingValue})),9,hn)):b(``,!0)]))),256))])):b(``,!0),E(e.$slots,`svg`,{svg:{...H.value,drawingArea:{...U.value,zero:G.value},data:$r.value,isPrintingImg:O(Or)||O(kr)||O(Ki),isPrintingSvg:O(qi)}},void 0,!0)],46,ot)),e.$slots.hint?(C(),x(`div`,gn,[E(e.$slots,`hint`,Ke(He({hint:N.value.a11y.translations.keyboardNavigation,isVisible:or.value})),void 0,!0)])):b(``,!0)]),e.$slots.watermark?(C(),x(`div`,_n,[E(e.$slots,`watermark`,Ke(He({isPrinting:O(Or)||O(kr)||O(Ki)||O(qi)})),void 0,!0)])):b(``,!0),S(`div`,{id:`legend-bottom-${j.value}`},null,8,vn),Pn.value&&Kn.value&&(B.value.legend.show||e.$slots.legend)?(C(),y(Le,{key:7,to:B.value.legend.position===`top`?`#legend-top-${j.value}`:`#legend-bottom-${j.value}`},[S(`div`,{ref_key:`chartLegend`,ref:Bn},[E(e.$slots,`legend`,{legend:K.value},()=>[B.value.legend.show?(C(),y(Fe,{key:`legend_${Gn.value}`,legendSet:K.value,config:Qr.value,isCursorPointer:lr.value,onClickMarker:t[3]||=({legend:e})=>vi(e.id)},{item:k(({legend:e})=>[S(`div`,{onClick:t=>e.segregate(),style:qe(`opacity:${M.value.includes(e.id)?.5:1}`)},D(e.name),13,yn)]),legendToggle:k(()=>[K.value.length>2&&B.value.legend.selectAllToggle.show&&!O(pr)?(C(),y(je,{key:0,backgroundColor:B.value.legend.selectAllToggle.backgroundColor,color:B.value.legend.selectAllToggle.color,fontSize:B.value.legend.fontSize,checked:M.value.length>0,isCursorPointer:lr.value,onToggle:_i},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):b(``,!0)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):b(``,!0)],!0)],512)],8,[`to`])):b(``,!0),e.$slots.source?(C(),x(`div`,{key:8,ref_key:`source`,ref:Vn,dir:`auto`},[E(e.$slots,`source`,{},void 0,!0)],512)):b(``,!0),Be(O(wn),{teleportTo:z.value.teleportTo,show:V.value.showTooltip&&Fn.value,backgroundColor:z.value.backgroundColor,color:z.value.color,borderRadius:z.value.borderRadius,borderColor:z.value.borderColor,borderWidth:z.value.borderWidth,fontSize:z.value.fontSize,backgroundOpacity:z.value.backgroundOpacity,position:z.value.position,offsetX:z.value.offsetX,offsetY:z.value.offsetY,parent:Rn.value,content:In.value,isFullscreen:wi.value,isCustom:z.value.customFormat&&typeof z.value.customFormat==`function`,smooth:z.value.smooth,backdropFilter:z.value.backdropFilter,smoothForce:z.value.smoothForce,smoothSnapThreshold:z.value.smoothSnapThreshold,isA11yMode:ar.value===`keyboard`,a11yPosition:ir.value},{"tooltip-before":k(()=>[E(e.$slots,`tooltip-before`,Ke(He({...ai.value})),void 0,!0)]),tooltip:k(()=>[E(e.$slots,`tooltip`,Ke(He({...ai.value})),void 0,!0)]),"tooltip-after":k(()=>[E(e.$slots,`tooltip-after`,Ke(He({...ai.value})),void 0,!0)]),default:k(()=>[z.value.showShape?(C(),x(`div`,bn,[(C(),x(`svg`,xn,[Be(Oe,{shape:Z.value.shape,color:Z.value.color,plot:{x:10,y:10},radius:7},null,8,[`shape`,`color`])]))])):b(``,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Pn.value&&P.value.buttons.table?(C(),y(Xe(Vi.value.component),Ue({key:9},Vi.value.props,{ref_key:`tableUnit`,ref:Yn,onClose:Hi}),Re({content:k(()=>[(C(),y(O(Dn),{key:`table_${Wn.value}`,colNames:Ci.value.colNames,head:Ci.value.head,body:Ci.value.body,config:Ci.value.config,title:N.value.table.useDialog?``:Vi.value.title,withCloseButton:!N.value.table.useDialog,isCursorPointer:lr.value,onClose:Hi},{th:k(({th:e})=>[ze(D(e),1)]),td:k(({td:e})=>[e.shape?(C(),x(`div`,Sn,[S(`span`,null,D(e.content),1)])):(C(),x(`div`,{key:1,innerHTML:e},null,8,Cn))]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[N.value.table.useDialog?{name:`title`,fn:k(()=>[ze(D(Vi.value.title),1)]),key:`0`}:void 0,N.value.table.useDialog?{name:`actions`,fn:k(()=>[S(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[4]||=e=>Si(P.value.callbacks.csv),style:qe({cursor:lr.value?`pointer`:`default`})},[Be(O(Tn),{name:`fileCsv`,stroke:Vi.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):b(``,!0),E(e.$slots,`skeleton`,{},()=>[O(pr)?(C(),y(de,{key:0})):b(``,!0)],!0)],46,tt))}},[[`__scopeId`,`data-v-d41aba1c`]]);export{et as n,wn as t};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{B as n,Jt as r,M as i,X as ee,t as a}from"./lib-rPeBMZrn.js";import{n as te,t as ne}from"./useHints-BH9r_0Vd.js";import{t as o}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as re}from"./useNestedProp-DnGoh-XS.js";import{t as ie}from"./DefGrad-DKMq1REY.js";import{n as s}from"./PackageVersion-BIhjLNBU.js";import{Fragment as c,computed as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createStaticVNode as p,createVNode as m,normalizeClass as ae,normalizeStyle as h,openBlock as g,ref as _,renderList as v,unref as y}from"vue";var b=/* @__PURE__ */ e({default:()=>G}),oe=[`id`],se=[`xmlns`],ce={transform:`translate(300, 300)`},le=[`d`,`fill`,`stroke`],ue=[`xmlns`],x=[`fill`,`stroke`],S=[`fill`,`stroke`],C=[`fill`,`stroke`],w=[`fill`,`stroke`],T=[`fill`,`stroke`],E=[`xmlns`],D=[`stroke`],O=[`stroke`],k=[`stroke`],A=[`fill`,`stroke`],j=[`fill`],M=[`fill`,`stroke`],N=[`fill`],P=[`fill`,`stroke`],F=[`fill`],I=[`fill`,`stroke`],L=[`fill`],R=[`fill`,`stroke`],z=[`fill`],B=[`fill`,`stroke`],V=[`fill`],H=[`xmlns`],U=[`stroke`],de=[`stroke`],fe=[`stroke`],pe=[`stroke`],me=[`stroke`],he=[`stroke`],ge=[`stroke`],_e=[`stroke`],ve=[`stroke`],ye=[`xmlns`],be=[`stroke`,`fill`],xe=[`xmlns`],Se=[`stroke`,`fill`],Ce=[`xmlns`],we=[`fill`],Te=[`fill`],Ee=[`fill`],De=[`fill`],Oe=[`xmlns`],ke=[`stroke`],Ae=[`fill`],je=[`stroke`,`fill`],Me=[`stroke`,`fill`],Ne=[`fill`],Pe=[`stroke`,`fill`],Fe=[`stroke`,`fill`],Ie=[`fill`],Le=[`stroke`,`fill`],Re=[`stroke`,`fill`],ze=[`fill`],Be=[`stroke`,`fill`],Ve=[`stroke`,`fill`],He=[`fill`],Ue=[`stroke`,`fill`],We=[`stroke`,`fill`],Ge=[`xmlns`],Ke=[`stroke`],qe=[`stroke`],Je=[`stroke`,`fill`],Ye=[`stroke`,`fill`],Xe=[`stroke`,`fill`],Ze=[`stroke`,`fill`],Qe=[`stroke`,`fill`],$e=[`stroke`,`fill`],et=[`stroke`,`fill`],tt=[`stroke`,`fill`],nt=[`stroke`,`fill`],rt=[`stroke`,`fill`],it=[`stroke`,`fill`],at=[`stroke`,`fill`],ot=[`stroke`,`fill`],st=[`stroke`,`fill`],ct=[`stroke`,`fill`],lt=[`stroke`,`fill`],ut=[`stroke`,`fill`],dt=[`stroke`,`fill`],ft=[`stroke`,`fill`],pt=[`stroke`,`fill`],mt=[`stroke`,`fill`],ht=[`stroke`,`fill`],gt=[`stroke`,`fill`],_t=[`xmlns`],vt=[`stroke`],yt=[`xmlns`],bt=[`stroke`],xt=[`xmlns`],St=[`stroke`],Ct=[`xmlns`],wt=[`fill`],Tt=[`fill`],Et=[`fill`],Dt=[`fill`],Ot=[`fill`],kt=[`fill`],At=[`fill`],jt=[`fill`],Mt=[`fill`],Nt=[`fill`],Pt=[`fill`],Ft=[`fill`],It=[`xmlns`],Lt=[`stroke`],Rt=[`stroke`],zt=[`stroke`],Bt=[`stroke`],Vt=[`stroke`],Ht=[`stroke`],Ut=[`xmlns`],Wt=[`stroke`],Gt=[`stroke`],Kt=[`stroke`],qt=[`stroke`],Jt=[`stroke`],Yt=[`stroke`],Xt=[`stroke`],Zt=[`stroke`],Qt=[`stroke`],$t=[`xmlns`],en=[`stroke`],tn=[`xmlns`],nn=[`stroke`],rn=[`stroke`],an=[`stroke`],on=[`stroke`],sn=[`stroke`],cn=[`stroke`],ln=[`stroke`],un=[`stroke`],dn=[`stroke`],fn=[`xmlns`],pn=[`x1`,`x2`,`stroke`],mn=[`xmlns`],hn=[`x`,`y`,`width`,`height`,`fill`],gn=[`y`,`width`,`height`,`fill`],_n=[`xmlns`],vn=[`fill`],yn=[`fill`],bn=[`fill`],xn=[`xmlns`],Sn=[`x1`,`x2`,`y1`,`y2`,`stroke`],Cn=[`stroke`],wn=[`fill`],Tn=[`xmlns`],En=[`fill`],Dn=[`fill`],On=[`x1`,`y1`,`x2`,`y2`,`stroke-width`,`stroke`],kn=[`xmlns`],An={key:0},jn=[`stroke`,`stroke-width`],Mn=[`stroke`,`stroke-width`],Nn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Pn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Fn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],In=[`x`,`y`,`height`,`width`,`fill`],Ln=[`xmlns`,`viewBox`],Rn=[`x`,`y`,`stroke`,`fill`],zn=[`xmlns`],Bn=[`d`,`stroke`],Vn=[`cx`,`cy`,`r`,`fill`,`stroke`],Hn=[`cx`,`cy`,`r`,`fill`,`stroke`],Un=[`x`,`y`,`width`,`fill`],Wn=[`cx`,`cy`,`fill`],Gn=[`cx`,`cy`,`fill`],Kn=[`stroke`],qn=[`xmlns`],Jn=[`stroke`,`stroke-width`],Yn=[`stroke`,`stroke-width`],Xn=[`stroke`,`stroke-width`],Zn=[`fill`],Qn=[`fill`],$n=[`fill`],er=[`fill`],tr=[`fill`],nr=[`fill`],rr=[`xmlns`],ir={key:0},ar=[`stroke`,`stroke-width`],or=[`stroke`,`stroke-width`],sr=[`stroke`,`stroke-width`],cr={key:1},lr=[`r`,`fill`],ur=[`r`,`fill`],dr=[`xmlns`],fr={key:0},pr=[`stroke`,`stroke-width`],mr=[`stroke`,`stroke-width`],hr=[`fill`,`rx`,`x`,`y`,`width`,`height`],gr=[`xmlns`],_r=[`stroke-width`,`stroke`],vr=[`stroke-width`,`stroke`],yr=[`stroke-width`,`stroke`],br=[`xmlns`],xr=[`stroke`],Sr=[`stroke`],Cr=[`stroke`],wr=[`stroke`],Tr=[`fill`],Er=[`stroke`],Dr=[`xmlns`],Or=[`stroke`,`stroke-width`],kr=[`stroke`,`stroke-width`],Ar=[`fill`,`r`],jr=[`fill`,`r`],Mr=[`fill`,`r`],Nr=[`fill`,`r`],Pr=[`fill`,`r`],Fr=[`fill`,`r`],Ir=[`fill`,`r`],Lr=[`fill`,`r`],Rr=[`fill`,`r`],zr=[`xmlns`],Br=[`d`,`stroke`,`stroke-width`],Vr=[`d`,`stroke`,`stroke-width`],Hr=[`d`,`stroke`,`stroke-width`],Ur=[`d`,`stroke`,`stroke-width`],Wr=[`stroke`,`stroke-width`],Gr=[`stroke`,`stroke-width`],Kr=[`stroke`,`stroke-width`],qr=[`fill`],Jr=[`fill`],Yr=[`xmlns`],Xr=[`x`,`y`,`fill`],Zr=[`x`,`y`,`fill`],Qr=[`x`,`y`,`fill`],$r=[`xmlns`],ei=[`fill`],ti=[`fill`],ni=[`y1`,`y2`,`stroke`,`stroke-width`],ri=[`x1`,`x2`,`stroke`,`stroke-width`],ii=[`xmlns`,`stroke`],ai=[`fill`],oi=[`xmlns`,`stroke`],si=[`xmlns`,`stroke`],ci=[`fill`],li=[`xmlns`,`stroke`],ui=[`xmlns`,`stroke`],di=[`fill`],fi=[`xmlns`,`stroke`],pi=[`xmlns`,`stroke`],mi=[`fill`],hi=[`xmlns`,`stroke`],W=[`xmlns`,`stroke`],gi=[`fill`],_i=[`xmlns`,`stroke`],vi=[`xmlns`],yi=[`points`,`fill`,`stroke`,`stroke-width`],bi=[`xmlns`],xi={key:0},Si=[`stroke`,`stroke-width`],Ci=[`y`,`width`,`fill`,`rx`],G=/*#__PURE__*/ o({__name:`vue-ui-skeleton`,props:{config:{type:Object,default(){return{}}}},setup(e){let{vue_ui_skeleton:o}=t(),b=e,G=_(`vue-ui-skeleton-${ee()}`),K=l(()=>re({userConfig:b.config,defaultConfig:o})),q=l(()=>K.value.style);te({config:()=>K.value,dataset:()=>[],component:`VueUiSkeleton`,rules:[ne.noHint]});let wi=l(()=>K.value.style.animated),J=l(()=>K.value.type),Ti=_([60,50,55,36,40,25,26,12]),Ei=l(()=>i({plot:{x:50,y:50},radius:40,sides:6}).path),Di=l(()=>i({plot:{x:50,y:50},radius:30,sides:6}).path),Oi=l(()=>i({plot:{x:50,y:50},radius:20,sides:6}).path),ki=l(()=>i({plot:{x:50,y:50},radius:10,sides:6}).path),Y=_([{root:{x:70,y:77,r:44,opacity:100},bars:[{x:200,y:37,opacity:100,width:240},{x:200,y:118,opacity:100,width:180},{x:200,y:253,opacity:100,width:80}]},{root:{x:70,y:177,r:32,opacity:70},bars:[{x:200,y:145,opacity:70,width:160},{x:200,y:172,opacity:70,width:140},{x:200,y:199,opacity:70,width:120}]},{root:{x:70,y:257,r:24,opacity:40},bars:[{x:200,y:64,opacity:40,width:220},{x:200,y:91,opacity:40,width:200},{x:200,y:226,opacity:40,width:100}]}]),X=_([{y:200,height:100,bar:50},{y:180,height:100,bar:40},{y:150,height:100,bar:30},{y:120,height:80,bar:50},{y:110,height:60,bar:30},{y:80,height:80,bar:10},{y:50,height:80,bar:40},{y:24,height:40,bar:24},{y:44,height:20,bar:13},{y:32,height:45,bar:19}]),Z=_([[3,2.5],[4,3.1],[8,6],[9.5,6.5],[12,11],[16,15],[18,18.2],[25,24],[24,26],[32,32],[33,32],[32,31],[38,37],[37,38],[42,41],[40,41],[44,45],[38,35],[31,32]]),Q=_([{x:40,y:30},{x:45,y:28},{x:50,y:25},{x:55,y:20},{x:60,y:27},{x:65,y:14},{x:70,y:23},{x:75,y:16},{x:80,y:25},{x:85,y:10},{x:90,y:18},{x:95,y:7},{x:100,y:12},{x:105,y:10},{x:110,y:20},{x:115,y:7},{x:120,y:14},{x:125,y:10},{x:130,y:19},{x:135,y:3},{x:140,y:10},{x:145,y:2},{x:150,y:1}]);function $(e,t=1){let n=29.85;return{x:200+160*Math.cos(n+e*Math.PI/180)*t,y:200+160*Math.sin(n+e*Math.PI/180)*t}}let Ai=l(()=>{let e=[];for(let t=0;t<100;t+=1)e.push({x1:$(360/100*t).x,y1:$(360/100*t).y,x2:$(360/100*t,.9).x,y2:$(360/100*t,.9).y,color:K.value.style.wheel.color});return e}),ji=_([`M1.74 203.99A204 204 0 01-131.29-156.13l15.44 18.36A180 180 0 001.53 179.99Z`,`M-123.33-162.5A204 204 0 01-10.2-203.75L-9-179.78a180 180 0 00-99.82 36.4Z`,`M0-180A180 180 0 01175.19 41.33l23.36 5.51A204 204 0 000-204Z`,`M172.91 50.03A180 180 0 0110.53 179.69l1.4 23.96A204 204 0 00195.96 56.7Z`,`M-166.87-67.49a180 180 0 0151.02-70.28Q0 0 119.83-134.32a180 180 0 0152.13 81.13Q0 0-166.87-67.49Z`,`M-29.99-177.48a180 180 0 0110.73-1.49Q0 0 112.89 140.2A180 180 0 0153.63 171.83Q0 0-29.99-177.48Z`,`M179.71 10.29a180 180 0 01-4.52 31.04Q0 0-40.87-175.3a180 180 0 0110.88-2.18Q0 0 179.71 10.29Z`,`M-19.26-178.97Q0 0-166.87-67.49a180 180 0 00-12.14 86.36Q0 0-9-179.78a180 180 0 00-10.26.81Z`,`M-108.82-143.38Q0 0-40.87-175.3a180 180 0 00-67.95 31.92Q0 0-40.87-175.3a180 180 0 00-67.95 31.92Z`,`M0-180a180 180 0 01119.83 45.68Q0 0 0-180a180 180 0 01119.83 45.68Q0 0 0-180Z`,`M-148.85 101.22Q0 0-179.01 18.87a180 180 0 0030.16 82.35Q0 0-179.01 18.87a180 180 0 0030.16 82.35Z`,`M1.53 179.99Q0 0 31.73 177.18a180 180 0 0021.9-5.35Q0 0-148.85 101.22A180 180 0 001.53 179.99Z`,`M31.73 177.18a180 180 0 01-21.2 2.51Q0 0 171.96-53.19a180 180 0 017.75 63.48Q0 0 31.73 177.18Z`,`M172.91 50.03Q0 0 112.89 140.2a180 180 0 0060.02-90.17Q0 0 112.89 140.2a180 180 0 0060.02-90.17Z`]);return(e,t)=>(g(),d(`div`,{id:G.value,class:ae({"vue-data-ui-component":!0,"vue-ui-skeleton":!0,"vue-ui-skeleton-animated":wi.value}),style:h(`background:${q.value.backgroundColor};color:${q.value.color};display:flex;align-items:center;justify-content:center;`)},[J.value===`chord`?(g(),d(`svg`,{key:0,xmlns:y(a),width:`100%`,viewBox:`0 0 600 600`,style:h({background:q.value.backgroundColor})},[m(s),f(`g`,ce,[(g(!0),d(c,null,v(ji.value,(e,t)=>(g(),d(`path`,{key:e,d:e,fill:q.value.chord.color,stroke:q.value.backgroundColor,"stroke-width":`2`,style:h({opacity:t>3?.6:1})},null,12,le))),128))])],12,se)):u(``,!0),J.value===`ridgeline`?(g(),d(`svg`,{key:1,xmlns:y(a),width:`100%`,viewBox:`20 0 512 200`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`defs`,null,[m(ie,{t:`linear`,id:`ridgeline-gradient-${G.value}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,q.value.ridgeline.color,1],[`30%`,q.value.ridgeline.color,.7],[`70%`,q.value.ridgeline.color,.3],[`100%`,q.value.ridgeline.color,.1]]},null,8,[`id`,`stops`])]),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 60c6.18-.6 12.36-1.11 18.55-1.79 6.18-.68 12.37-2.38 18.55-2.4 6.19-.01 12.37 0 18.56-.01 6.18-.02 12.37-5.3 18.55-5.3 6.19 0 12.37 4.95 18.56 4.95 6.18 0 12.37-2.78 18.55-2.78 6.19 0 12.37 1.02 18.56 1.92 6.18.9 12.37 4.58 18.55 4.58s12.37-6.71 18.55-6.71c6.19 0 12.37.89 18.56.89 6.18 0 12.37-4.48 18.55-4.48 6.19 0 12.37 4.79 18.56 4.79 6.18 0 12.37-26.07 18.55-26.07 6.19 0 12.37 9.31 18.56 13.85 6.18 4.54 12.37 13.39 18.55 13.39 6.19 0 12.37-36.14 18.56-36.14 6.18 0 12.36 38.45 18.55 38.45 6.18 0 12.37-11.46 18.55-16.94 6.19-5.48 12.37-15.97 18.56-15.97 6.18 0 12.37 16.4 18.55 16.4 6.19 0 12.37-.12 18.56-.35 6.18-.22 12.37-38.08 18.55-38.08 6.19 0 12.37 24.07 18.56 36.1V60`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,x),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 90c6.18-.22 12.36-.35 18.55-.67 6.18-.32 12.37-1.65 18.55-1.65 6.19 0 12.37 1.66 18.56 1.66 6.18 0 12.37-8.76 18.55-8.76 6.19 0 12.37 4.15 18.56 4.15 6.18 0 12.37-8.44 18.55-8.44 6.19 0 12.37 10.87 18.56 10.87 6.18 0 12.37-9.21 18.55-12.16 6.18-2.96 12.37-6.97 18.55-6.97 6.19 0 12.37 9.59 18.56 12.77 6.18 3.18 12.37 7.6 18.55 7.6 6.19 0 12.37-24.44 18.56-24.44 6.18 0 12.37 16.97 18.55 16.97 6.19 0 12.37-20.62 18.56-20.62 6.18 0 12.37 20.37 18.55 20.37 6.19 0 12.37-13.13 18.56-13.13 6.18 0 12.36 13.51 18.55 13.51 6.18 0 12.37-26.41 18.55-26.41 6.19 0 12.37.49 18.56 1.26 6.18.78 12.37 13.82 18.55 13.82 6.19 0 12.37-5.3 18.56-8.3 6.18-3 12.37-9.81 18.55-9.81 6.19 0 12.37 19.82 18.56 29.72V90`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,S),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 120c6.18-.34 12.36-.55 18.55-1.01 6.18-.46 12.37-1.17 18.55-2.15 6.19-.99 12.37-3.7 18.56-4.69 6.18-.98 12.37-2.15 18.55-2.15 6.19 0 12.37.52 18.56 1.2 6.18.68 12.37 6.67 18.55 6.67 6.19 0 12.37-12.15 18.56-12.15 6.18 0 12.37 4.6 18.55 4.6S227.5 99.7 233.68 98.99c6.19-.71 12.37-1.18 18.56-1.18 6.18 0 12.37 17.75 18.55 18.22 6.19.48 12.37.74 18.56.74 6.18 0 12.37-17.09 18.55-17.09 6.19 0 12.37 12.68 18.56 12.68 6.18 0 12.37-.33 18.55-.67 6.19-.34 12.37-.79 18.56-2.06 6.18-1.26 12.36-25.45 18.55-25.45 6.18 0 12.37 10.35 18.55 10.35 6.19 0 12.37-21.07 18.56-21.07 6.18 0 12.37 33.27 18.55 33.27 6.19 0 12.37-26.97 18.56-26.97 6.18 0 12.37 26.97 18.55 27.36 6.19.4 12.37.41 18.56.61V120`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,C),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 150c6.18-.52 12.36-1.57 18.55-1.57 6.18 0 12.37 1.36 18.55 1.36 6.19 0 12.37-1.75 18.56-3.18 6.18-1.43 12.37-6.62 18.55-6.62 6.19 0 12.37 9.98 18.56 9.98 6.18 0 12.37-4.94 18.55-5.64 6.19-.71 12.37-.52 18.56-1.31 6.18-.78 12.37-12.43 18.55-12.43s12.37 18.52 18.55 18.52c6.19 0 12.37-2.49 18.56-2.49 6.18 0 12.37 3.02 18.55 3.02 6.19 0 12.37-29.39 18.56-29.39 6.18 0 12.37 5.56 18.55 8.36 6.19 2.81 12.37 5.14 18.56 8.47 6.18 3.34 12.37 12.25 18.55 12.25 6.19 0 12.37-4.3 18.56-8.78 6.18-4.48 12.36-28.77 18.55-28.77 6.18 0 12.37 1.29 18.55 3.02 6.19 1.72 12.37 18.36 18.56 18.36 6.18 0 12.37-7.68 18.55-12.92 6.19-5.24 12.37-18.51 18.56-20.1 6.18-1.58 12.37-2.7 18.55-2.7 6.19 0 12.37 34.69 18.56 52.04V150`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,w),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 180c6.18-.6 12.36-1.07 18.55-1.81 6.18-.74 12.37-2.86 18.55-2.86 6.19 0 12.37 2.14 18.56 2.14 6.18 0 12.37-7.08 18.55-7.08 6.19 0 12.37 1.08 18.56 2.03 6.18.95 12.37 4.75 18.55 4.75 6.19 0 12.37-2.45 18.56-4.62 6.18-2.17 12.37-10.99 18.55-10.99s12.37 9.58 18.55 9.58c6.19 0 12.37-.25 18.56-.69 6.18-.43 12.37-13.6 18.55-13.6 6.19 0 12.37 17.23 18.56 17.23 6.18 0 12.37-2.5 18.55-5.19 6.19-2.68 12.37-15.45 18.56-18 6.18-2.55 12.37-4.86 18.55-4.86 6.19 0 12.37 18.61 18.56 18.61 6.18 0 12.36-24.22 18.55-26.66 6.18-2.45 12.37-4.25 18.55-4.25 6.19 0 12.37 7.92 18.56 7.92 6.18 0 12.37-1.95 18.55-1.95 6.19 0 12.37 29.69 18.56 29.69 6.18 0 12.37-2.55 18.55-6.14 6.19-3.58 12.37-28.83 18.56-43.25v60`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,T)],12,ue)):u(``,!0),J.value===`historyPlot`?(g(),d(`svg`,{key:2,xmlns:y(a),width:`100%`,viewBox:`0 0 612 512`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`line`,{x1:`12`,x2:`12`,y1:`12`,y2:`500`,stroke:q.value.historyPlot.color,"stroke-width":`3`,"stroke-linecap":`round`},null,8,D),f(`line`,{x1:`12`,x2:`600`,y1:`500`,y2:`500`,stroke:q.value.historyPlot.color,"stroke-width":`3`,"stroke-linecap":`round`},null,8,O),f(`path`,{d:`M 80,100 300,200 400,150 560,230 360,420 230,320`,fill:`none`,stroke:q.value.historyPlot.color,"stroke-width":`3`},null,8,k),f(`circle`,{cx:`80`,cy:`100`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,A),f(`text`,{x:`80`,y:`108`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 1 `,8,j),f(`circle`,{cx:`300`,cy:`200`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,M),f(`text`,{x:`300`,y:`208`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 2 `,8,N),f(`circle`,{cx:`400`,cy:`150`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,P),f(`text`,{x:`400`,y:`158`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 3 `,8,F),f(`circle`,{cx:`560`,cy:`230`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,I),f(`text`,{x:`560`,y:`238`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 4 `,8,L),f(`circle`,{cx:`360`,cy:`420`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,R),f(`text`,{x:`360`,y:`428`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 5 `,8,z),f(`circle`,{cx:`230`,cy:`320`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,B),f(`text`,{x:`230`,y:`328`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 6 `,8,V)],12,E)):u(``,!0),J.value===`circlePack`?(g(),d(`svg`,{key:3,xmlns:y(a),width:`100%`,viewBox:`0 0 100 100`,style:h(`background:${q.value.backgroundColor}`)},[f(`circle`,{cx:50,cy:50,r:20,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,U),f(`circle`,{cx:80,cy:50,r:10,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,de),f(`circle`,{cx:28,cy:30,r:10,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,fe),f(`circle`,{cx:25,cy:76,r:16,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,pe),f(`circle`,{cx:60,cy:78.5,r:10,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,me),f(`circle`,{cx:64,cy:20,r:13,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,he),f(`circle`,{cx:72,cy:37,r:5,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,ge),f(`circle`,{cx:25,cy:45,r:5,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,_e),f(`circle`,{cx:70,cy:66,r:5,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,ve)],12,H)):u(``,!0),J.value===`flow`?(g(),d(`svg`,{key:4,xmlns:y(a),width:`100%`,viewBox:`0 0 80 60`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`path`,{d:`M5 5V55M75 5V55M28 5V55M52 5V55M5 8l23 4L52 9 75 8v4H52L28 21 5 29ZM5 34l23 1L52 24l23-3v6L52 30 28 44l24-5 23 2v6L52 45 28 52H5Z`,stroke:q.value.flow.color,"stroke-width":.8,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:q.value.flow.color},null,8,be)],12,ye)):u(``,!0),J.value===`parallelCoordinatePlot`?(g(),d(`svg`,{key:5,xmlns:y(a),width:`100%`,viewBox:`0 0 80 60`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`path`,{d:`M5 5V55M75 5V55M28 5V55M52 5V55M5 10a1 1 0 000 2 1 1 0 000-2m23 5a1 1 0 000 2 1 1 0 000-2M52 8a1 1 0 000 2 1 1 0 000-2m23 3a1 1 0 000 2 1 1 0 000-2M6 11l21 5m2 0L51 9m2 0 21 3M5 50a1 1 0 000-2 1 1 0 000 2M28 39a1 1 0 000 2 1 1 0 000-2m24 6a1 1 0 000 2 1 1 0 000-2m23 0a1 1 0 000 2 1 1 0 000-2M6 49l21-9m2 0 22 6m2 0H74M5 25a1 1 0 000 2 1 1 0 000-2m23 6a1 1 0 000 2 1 1 0 000-2m24-8a1 1 0 000 2 1 1 0 000-2m23-2a1 1 0 000 2 1 1 0 000-2M6 26l21 6m2 0 22-8m2 0 21-2`,stroke:q.value.parallelCoordinatePlot.color,"stroke-width":.8,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:q.value.parallelCoordinatePlot.color},null,8,Se)],12,xe)):u(``,!0),J.value===`bullet`?(g(),d(`svg`,{key:6,xmlns:y(a),width:`100%`,viewBox:`0 0 600 96`,style:h(`background:${q.value.backgroundColor}`)},[f(`rect`,{fill:q.value.bullet.color,x:24,y:12,width:300,height:72,style:{opacity:`0.8`}},null,8,we),f(`rect`,{fill:q.value.bullet.color,x:324,y:12,width:150,height:72,style:{opacity:`0.6`}},null,8,Te),f(`rect`,{fill:q.value.bullet.color,x:474,y:12,width:102,height:72,style:{opacity:`0.3`}},null,8,Ee),f(`rect`,{fill:q.value.bullet.color,x:24,y:36,width:490,height:24,style:{opacity:`1`}},null,8,De)],12,Ce)):u(``,!0),J.value===`dumbbell`?(g(),d(`svg`,{key:7,xmlns:y(a),width:`100%`,viewBox:`0 0 100 55`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`line`,{x1:`3`,x2:`3`,y1:`3`,y2:`67`,stroke:q.value.dumbbell.color,"stroke-width":.5,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,ke),f(`path`,{d:`
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{B as n,Jt as r,M as i,X as ee,t as a}from"./lib-rPeBMZrn.js";import{n as te,t as ne}from"./useHints-C-TwxM0Y.js";import{t as o}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as re}from"./useNestedProp-DnGoh-XS.js";import{t as ie}from"./DefGrad-DKMq1REY.js";import{n as s}from"./PackageVersion-DhptF5oD.js";import{Fragment as c,computed as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createStaticVNode as p,createVNode as m,normalizeClass as ae,normalizeStyle as h,openBlock as g,ref as _,renderList as v,unref as y}from"vue";var b=/* @__PURE__ */ e({default:()=>G}),oe=[`id`],se=[`xmlns`],ce={transform:`translate(300, 300)`},le=[`d`,`fill`,`stroke`],ue=[`xmlns`],x=[`fill`,`stroke`],S=[`fill`,`stroke`],C=[`fill`,`stroke`],w=[`fill`,`stroke`],T=[`fill`,`stroke`],E=[`xmlns`],D=[`stroke`],O=[`stroke`],k=[`stroke`],A=[`fill`,`stroke`],j=[`fill`],M=[`fill`,`stroke`],N=[`fill`],P=[`fill`,`stroke`],F=[`fill`],I=[`fill`,`stroke`],L=[`fill`],R=[`fill`,`stroke`],z=[`fill`],B=[`fill`,`stroke`],V=[`fill`],H=[`xmlns`],U=[`stroke`],de=[`stroke`],fe=[`stroke`],pe=[`stroke`],me=[`stroke`],he=[`stroke`],ge=[`stroke`],_e=[`stroke`],ve=[`stroke`],ye=[`xmlns`],be=[`stroke`,`fill`],xe=[`xmlns`],Se=[`stroke`,`fill`],Ce=[`xmlns`],we=[`fill`],Te=[`fill`],Ee=[`fill`],De=[`fill`],Oe=[`xmlns`],ke=[`stroke`],Ae=[`fill`],je=[`stroke`,`fill`],Me=[`stroke`,`fill`],Ne=[`fill`],Pe=[`stroke`,`fill`],Fe=[`stroke`,`fill`],Ie=[`fill`],Le=[`stroke`,`fill`],Re=[`stroke`,`fill`],ze=[`fill`],Be=[`stroke`,`fill`],Ve=[`stroke`,`fill`],He=[`fill`],Ue=[`stroke`,`fill`],We=[`stroke`,`fill`],Ge=[`xmlns`],Ke=[`stroke`],qe=[`stroke`],Je=[`stroke`,`fill`],Ye=[`stroke`,`fill`],Xe=[`stroke`,`fill`],Ze=[`stroke`,`fill`],Qe=[`stroke`,`fill`],$e=[`stroke`,`fill`],et=[`stroke`,`fill`],tt=[`stroke`,`fill`],nt=[`stroke`,`fill`],rt=[`stroke`,`fill`],it=[`stroke`,`fill`],at=[`stroke`,`fill`],ot=[`stroke`,`fill`],st=[`stroke`,`fill`],ct=[`stroke`,`fill`],lt=[`stroke`,`fill`],ut=[`stroke`,`fill`],dt=[`stroke`,`fill`],ft=[`stroke`,`fill`],pt=[`stroke`,`fill`],mt=[`stroke`,`fill`],ht=[`stroke`,`fill`],gt=[`stroke`,`fill`],_t=[`xmlns`],vt=[`stroke`],yt=[`xmlns`],bt=[`stroke`],xt=[`xmlns`],St=[`stroke`],Ct=[`xmlns`],wt=[`fill`],Tt=[`fill`],Et=[`fill`],Dt=[`fill`],Ot=[`fill`],kt=[`fill`],At=[`fill`],jt=[`fill`],Mt=[`fill`],Nt=[`fill`],Pt=[`fill`],Ft=[`fill`],It=[`xmlns`],Lt=[`stroke`],Rt=[`stroke`],zt=[`stroke`],Bt=[`stroke`],Vt=[`stroke`],Ht=[`stroke`],Ut=[`xmlns`],Wt=[`stroke`],Gt=[`stroke`],Kt=[`stroke`],qt=[`stroke`],Jt=[`stroke`],Yt=[`stroke`],Xt=[`stroke`],Zt=[`stroke`],Qt=[`stroke`],$t=[`xmlns`],en=[`stroke`],tn=[`xmlns`],nn=[`stroke`],rn=[`stroke`],an=[`stroke`],on=[`stroke`],sn=[`stroke`],cn=[`stroke`],ln=[`stroke`],un=[`stroke`],dn=[`stroke`],fn=[`xmlns`],pn=[`x1`,`x2`,`stroke`],mn=[`xmlns`],hn=[`x`,`y`,`width`,`height`,`fill`],gn=[`y`,`width`,`height`,`fill`],_n=[`xmlns`],vn=[`fill`],yn=[`fill`],bn=[`fill`],xn=[`xmlns`],Sn=[`x1`,`x2`,`y1`,`y2`,`stroke`],Cn=[`stroke`],wn=[`fill`],Tn=[`xmlns`],En=[`fill`],Dn=[`fill`],On=[`x1`,`y1`,`x2`,`y2`,`stroke-width`,`stroke`],kn=[`xmlns`],An={key:0},jn=[`stroke`,`stroke-width`],Mn=[`stroke`,`stroke-width`],Nn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Pn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Fn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],In=[`x`,`y`,`height`,`width`,`fill`],Ln=[`xmlns`,`viewBox`],Rn=[`x`,`y`,`stroke`,`fill`],zn=[`xmlns`],Bn=[`d`,`stroke`],Vn=[`cx`,`cy`,`r`,`fill`,`stroke`],Hn=[`cx`,`cy`,`r`,`fill`,`stroke`],Un=[`x`,`y`,`width`,`fill`],Wn=[`cx`,`cy`,`fill`],Gn=[`cx`,`cy`,`fill`],Kn=[`stroke`],qn=[`xmlns`],Jn=[`stroke`,`stroke-width`],Yn=[`stroke`,`stroke-width`],Xn=[`stroke`,`stroke-width`],Zn=[`fill`],Qn=[`fill`],$n=[`fill`],er=[`fill`],tr=[`fill`],nr=[`fill`],rr=[`xmlns`],ir={key:0},ar=[`stroke`,`stroke-width`],or=[`stroke`,`stroke-width`],sr=[`stroke`,`stroke-width`],cr={key:1},lr=[`r`,`fill`],ur=[`r`,`fill`],dr=[`xmlns`],fr={key:0},pr=[`stroke`,`stroke-width`],mr=[`stroke`,`stroke-width`],hr=[`fill`,`rx`,`x`,`y`,`width`,`height`],gr=[`xmlns`],_r=[`stroke-width`,`stroke`],vr=[`stroke-width`,`stroke`],yr=[`stroke-width`,`stroke`],br=[`xmlns`],xr=[`stroke`],Sr=[`stroke`],Cr=[`stroke`],wr=[`stroke`],Tr=[`fill`],Er=[`stroke`],Dr=[`xmlns`],Or=[`stroke`,`stroke-width`],kr=[`stroke`,`stroke-width`],Ar=[`fill`,`r`],jr=[`fill`,`r`],Mr=[`fill`,`r`],Nr=[`fill`,`r`],Pr=[`fill`,`r`],Fr=[`fill`,`r`],Ir=[`fill`,`r`],Lr=[`fill`,`r`],Rr=[`fill`,`r`],zr=[`xmlns`],Br=[`d`,`stroke`,`stroke-width`],Vr=[`d`,`stroke`,`stroke-width`],Hr=[`d`,`stroke`,`stroke-width`],Ur=[`d`,`stroke`,`stroke-width`],Wr=[`stroke`,`stroke-width`],Gr=[`stroke`,`stroke-width`],Kr=[`stroke`,`stroke-width`],qr=[`fill`],Jr=[`fill`],Yr=[`xmlns`],Xr=[`x`,`y`,`fill`],Zr=[`x`,`y`,`fill`],Qr=[`x`,`y`,`fill`],$r=[`xmlns`],ei=[`fill`],ti=[`fill`],ni=[`y1`,`y2`,`stroke`,`stroke-width`],ri=[`x1`,`x2`,`stroke`,`stroke-width`],ii=[`xmlns`,`stroke`],ai=[`fill`],oi=[`xmlns`,`stroke`],si=[`xmlns`,`stroke`],ci=[`fill`],li=[`xmlns`,`stroke`],ui=[`xmlns`,`stroke`],di=[`fill`],fi=[`xmlns`,`stroke`],pi=[`xmlns`,`stroke`],mi=[`fill`],hi=[`xmlns`,`stroke`],W=[`xmlns`,`stroke`],gi=[`fill`],_i=[`xmlns`,`stroke`],vi=[`xmlns`],yi=[`points`,`fill`,`stroke`,`stroke-width`],bi=[`xmlns`],xi={key:0},Si=[`stroke`,`stroke-width`],Ci=[`y`,`width`,`fill`,`rx`],G=/*#__PURE__*/ o({__name:`vue-ui-skeleton`,props:{config:{type:Object,default(){return{}}}},setup(e){let{vue_ui_skeleton:o}=t(),b=e,G=_(`vue-ui-skeleton-${ee()}`),K=l(()=>re({userConfig:b.config,defaultConfig:o})),q=l(()=>K.value.style);te({config:()=>K.value,dataset:()=>[],component:`VueUiSkeleton`,rules:[ne.noHint]});let wi=l(()=>K.value.style.animated),J=l(()=>K.value.type),Ti=_([60,50,55,36,40,25,26,12]),Ei=l(()=>i({plot:{x:50,y:50},radius:40,sides:6}).path),Di=l(()=>i({plot:{x:50,y:50},radius:30,sides:6}).path),Oi=l(()=>i({plot:{x:50,y:50},radius:20,sides:6}).path),ki=l(()=>i({plot:{x:50,y:50},radius:10,sides:6}).path),Y=_([{root:{x:70,y:77,r:44,opacity:100},bars:[{x:200,y:37,opacity:100,width:240},{x:200,y:118,opacity:100,width:180},{x:200,y:253,opacity:100,width:80}]},{root:{x:70,y:177,r:32,opacity:70},bars:[{x:200,y:145,opacity:70,width:160},{x:200,y:172,opacity:70,width:140},{x:200,y:199,opacity:70,width:120}]},{root:{x:70,y:257,r:24,opacity:40},bars:[{x:200,y:64,opacity:40,width:220},{x:200,y:91,opacity:40,width:200},{x:200,y:226,opacity:40,width:100}]}]),X=_([{y:200,height:100,bar:50},{y:180,height:100,bar:40},{y:150,height:100,bar:30},{y:120,height:80,bar:50},{y:110,height:60,bar:30},{y:80,height:80,bar:10},{y:50,height:80,bar:40},{y:24,height:40,bar:24},{y:44,height:20,bar:13},{y:32,height:45,bar:19}]),Z=_([[3,2.5],[4,3.1],[8,6],[9.5,6.5],[12,11],[16,15],[18,18.2],[25,24],[24,26],[32,32],[33,32],[32,31],[38,37],[37,38],[42,41],[40,41],[44,45],[38,35],[31,32]]),Q=_([{x:40,y:30},{x:45,y:28},{x:50,y:25},{x:55,y:20},{x:60,y:27},{x:65,y:14},{x:70,y:23},{x:75,y:16},{x:80,y:25},{x:85,y:10},{x:90,y:18},{x:95,y:7},{x:100,y:12},{x:105,y:10},{x:110,y:20},{x:115,y:7},{x:120,y:14},{x:125,y:10},{x:130,y:19},{x:135,y:3},{x:140,y:10},{x:145,y:2},{x:150,y:1}]);function $(e,t=1){let n=29.85;return{x:200+160*Math.cos(n+e*Math.PI/180)*t,y:200+160*Math.sin(n+e*Math.PI/180)*t}}let Ai=l(()=>{let e=[];for(let t=0;t<100;t+=1)e.push({x1:$(360/100*t).x,y1:$(360/100*t).y,x2:$(360/100*t,.9).x,y2:$(360/100*t,.9).y,color:K.value.style.wheel.color});return e}),ji=_([`M1.74 203.99A204 204 0 01-131.29-156.13l15.44 18.36A180 180 0 001.53 179.99Z`,`M-123.33-162.5A204 204 0 01-10.2-203.75L-9-179.78a180 180 0 00-99.82 36.4Z`,`M0-180A180 180 0 01175.19 41.33l23.36 5.51A204 204 0 000-204Z`,`M172.91 50.03A180 180 0 0110.53 179.69l1.4 23.96A204 204 0 00195.96 56.7Z`,`M-166.87-67.49a180 180 0 0151.02-70.28Q0 0 119.83-134.32a180 180 0 0152.13 81.13Q0 0-166.87-67.49Z`,`M-29.99-177.48a180 180 0 0110.73-1.49Q0 0 112.89 140.2A180 180 0 0153.63 171.83Q0 0-29.99-177.48Z`,`M179.71 10.29a180 180 0 01-4.52 31.04Q0 0-40.87-175.3a180 180 0 0110.88-2.18Q0 0 179.71 10.29Z`,`M-19.26-178.97Q0 0-166.87-67.49a180 180 0 00-12.14 86.36Q0 0-9-179.78a180 180 0 00-10.26.81Z`,`M-108.82-143.38Q0 0-40.87-175.3a180 180 0 00-67.95 31.92Q0 0-40.87-175.3a180 180 0 00-67.95 31.92Z`,`M0-180a180 180 0 01119.83 45.68Q0 0 0-180a180 180 0 01119.83 45.68Q0 0 0-180Z`,`M-148.85 101.22Q0 0-179.01 18.87a180 180 0 0030.16 82.35Q0 0-179.01 18.87a180 180 0 0030.16 82.35Z`,`M1.53 179.99Q0 0 31.73 177.18a180 180 0 0021.9-5.35Q0 0-148.85 101.22A180 180 0 001.53 179.99Z`,`M31.73 177.18a180 180 0 01-21.2 2.51Q0 0 171.96-53.19a180 180 0 017.75 63.48Q0 0 31.73 177.18Z`,`M172.91 50.03Q0 0 112.89 140.2a180 180 0 0060.02-90.17Q0 0 112.89 140.2a180 180 0 0060.02-90.17Z`]);return(e,t)=>(g(),d(`div`,{id:G.value,class:ae({"vue-data-ui-component":!0,"vue-ui-skeleton":!0,"vue-ui-skeleton-animated":wi.value}),style:h(`background:${q.value.backgroundColor};color:${q.value.color};display:flex;align-items:center;justify-content:center;`)},[J.value===`chord`?(g(),d(`svg`,{key:0,xmlns:y(a),width:`100%`,viewBox:`0 0 600 600`,style:h({background:q.value.backgroundColor})},[m(s),f(`g`,ce,[(g(!0),d(c,null,v(ji.value,(e,t)=>(g(),d(`path`,{key:e,d:e,fill:q.value.chord.color,stroke:q.value.backgroundColor,"stroke-width":`2`,style:h({opacity:t>3?.6:1})},null,12,le))),128))])],12,se)):u(``,!0),J.value===`ridgeline`?(g(),d(`svg`,{key:1,xmlns:y(a),width:`100%`,viewBox:`20 0 512 200`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`defs`,null,[m(ie,{t:`linear`,id:`ridgeline-gradient-${G.value}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,q.value.ridgeline.color,1],[`30%`,q.value.ridgeline.color,.7],[`70%`,q.value.ridgeline.color,.3],[`100%`,q.value.ridgeline.color,.1]]},null,8,[`id`,`stops`])]),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 60c6.18-.6 12.36-1.11 18.55-1.79 6.18-.68 12.37-2.38 18.55-2.4 6.19-.01 12.37 0 18.56-.01 6.18-.02 12.37-5.3 18.55-5.3 6.19 0 12.37 4.95 18.56 4.95 6.18 0 12.37-2.78 18.55-2.78 6.19 0 12.37 1.02 18.56 1.92 6.18.9 12.37 4.58 18.55 4.58s12.37-6.71 18.55-6.71c6.19 0 12.37.89 18.56.89 6.18 0 12.37-4.48 18.55-4.48 6.19 0 12.37 4.79 18.56 4.79 6.18 0 12.37-26.07 18.55-26.07 6.19 0 12.37 9.31 18.56 13.85 6.18 4.54 12.37 13.39 18.55 13.39 6.19 0 12.37-36.14 18.56-36.14 6.18 0 12.36 38.45 18.55 38.45 6.18 0 12.37-11.46 18.55-16.94 6.19-5.48 12.37-15.97 18.56-15.97 6.18 0 12.37 16.4 18.55 16.4 6.19 0 12.37-.12 18.56-.35 6.18-.22 12.37-38.08 18.55-38.08 6.19 0 12.37 24.07 18.56 36.1V60`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,x),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 90c6.18-.22 12.36-.35 18.55-.67 6.18-.32 12.37-1.65 18.55-1.65 6.19 0 12.37 1.66 18.56 1.66 6.18 0 12.37-8.76 18.55-8.76 6.19 0 12.37 4.15 18.56 4.15 6.18 0 12.37-8.44 18.55-8.44 6.19 0 12.37 10.87 18.56 10.87 6.18 0 12.37-9.21 18.55-12.16 6.18-2.96 12.37-6.97 18.55-6.97 6.19 0 12.37 9.59 18.56 12.77 6.18 3.18 12.37 7.6 18.55 7.6 6.19 0 12.37-24.44 18.56-24.44 6.18 0 12.37 16.97 18.55 16.97 6.19 0 12.37-20.62 18.56-20.62 6.18 0 12.37 20.37 18.55 20.37 6.19 0 12.37-13.13 18.56-13.13 6.18 0 12.36 13.51 18.55 13.51 6.18 0 12.37-26.41 18.55-26.41 6.19 0 12.37.49 18.56 1.26 6.18.78 12.37 13.82 18.55 13.82 6.19 0 12.37-5.3 18.56-8.3 6.18-3 12.37-9.81 18.55-9.81 6.19 0 12.37 19.82 18.56 29.72V90`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,S),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 120c6.18-.34 12.36-.55 18.55-1.01 6.18-.46 12.37-1.17 18.55-2.15 6.19-.99 12.37-3.7 18.56-4.69 6.18-.98 12.37-2.15 18.55-2.15 6.19 0 12.37.52 18.56 1.2 6.18.68 12.37 6.67 18.55 6.67 6.19 0 12.37-12.15 18.56-12.15 6.18 0 12.37 4.6 18.55 4.6S227.5 99.7 233.68 98.99c6.19-.71 12.37-1.18 18.56-1.18 6.18 0 12.37 17.75 18.55 18.22 6.19.48 12.37.74 18.56.74 6.18 0 12.37-17.09 18.55-17.09 6.19 0 12.37 12.68 18.56 12.68 6.18 0 12.37-.33 18.55-.67 6.19-.34 12.37-.79 18.56-2.06 6.18-1.26 12.36-25.45 18.55-25.45 6.18 0 12.37 10.35 18.55 10.35 6.19 0 12.37-21.07 18.56-21.07 6.18 0 12.37 33.27 18.55 33.27 6.19 0 12.37-26.97 18.56-26.97 6.18 0 12.37 26.97 18.55 27.36 6.19.4 12.37.41 18.56.61V120`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,C),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 150c6.18-.52 12.36-1.57 18.55-1.57 6.18 0 12.37 1.36 18.55 1.36 6.19 0 12.37-1.75 18.56-3.18 6.18-1.43 12.37-6.62 18.55-6.62 6.19 0 12.37 9.98 18.56 9.98 6.18 0 12.37-4.94 18.55-5.64 6.19-.71 12.37-.52 18.56-1.31 6.18-.78 12.37-12.43 18.55-12.43s12.37 18.52 18.55 18.52c6.19 0 12.37-2.49 18.56-2.49 6.18 0 12.37 3.02 18.55 3.02 6.19 0 12.37-29.39 18.56-29.39 6.18 0 12.37 5.56 18.55 8.36 6.19 2.81 12.37 5.14 18.56 8.47 6.18 3.34 12.37 12.25 18.55 12.25 6.19 0 12.37-4.3 18.56-8.78 6.18-4.48 12.36-28.77 18.55-28.77 6.18 0 12.37 1.29 18.55 3.02 6.19 1.72 12.37 18.36 18.56 18.36 6.18 0 12.37-7.68 18.55-12.92 6.19-5.24 12.37-18.51 18.56-20.1 6.18-1.58 12.37-2.7 18.55-2.7 6.19 0 12.37 34.69 18.56 52.04V150`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,w),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 180c6.18-.6 12.36-1.07 18.55-1.81 6.18-.74 12.37-2.86 18.55-2.86 6.19 0 12.37 2.14 18.56 2.14 6.18 0 12.37-7.08 18.55-7.08 6.19 0 12.37 1.08 18.56 2.03 6.18.95 12.37 4.75 18.55 4.75 6.19 0 12.37-2.45 18.56-4.62 6.18-2.17 12.37-10.99 18.55-10.99s12.37 9.58 18.55 9.58c6.19 0 12.37-.25 18.56-.69 6.18-.43 12.37-13.6 18.55-13.6 6.19 0 12.37 17.23 18.56 17.23 6.18 0 12.37-2.5 18.55-5.19 6.19-2.68 12.37-15.45 18.56-18 6.18-2.55 12.37-4.86 18.55-4.86 6.19 0 12.37 18.61 18.56 18.61 6.18 0 12.36-24.22 18.55-26.66 6.18-2.45 12.37-4.25 18.55-4.25 6.19 0 12.37 7.92 18.56 7.92 6.18 0 12.37-1.95 18.55-1.95 6.19 0 12.37 29.69 18.56 29.69 6.18 0 12.37-2.55 18.55-6.14 6.19-3.58 12.37-28.83 18.56-43.25v60`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,T)],12,ue)):u(``,!0),J.value===`historyPlot`?(g(),d(`svg`,{key:2,xmlns:y(a),width:`100%`,viewBox:`0 0 612 512`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`line`,{x1:`12`,x2:`12`,y1:`12`,y2:`500`,stroke:q.value.historyPlot.color,"stroke-width":`3`,"stroke-linecap":`round`},null,8,D),f(`line`,{x1:`12`,x2:`600`,y1:`500`,y2:`500`,stroke:q.value.historyPlot.color,"stroke-width":`3`,"stroke-linecap":`round`},null,8,O),f(`path`,{d:`M 80,100 300,200 400,150 560,230 360,420 230,320`,fill:`none`,stroke:q.value.historyPlot.color,"stroke-width":`3`},null,8,k),f(`circle`,{cx:`80`,cy:`100`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,A),f(`text`,{x:`80`,y:`108`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 1 `,8,j),f(`circle`,{cx:`300`,cy:`200`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,M),f(`text`,{x:`300`,y:`208`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 2 `,8,N),f(`circle`,{cx:`400`,cy:`150`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,P),f(`text`,{x:`400`,y:`158`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 3 `,8,F),f(`circle`,{cx:`560`,cy:`230`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,I),f(`text`,{x:`560`,y:`238`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 4 `,8,L),f(`circle`,{cx:`360`,cy:`420`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,R),f(`text`,{x:`360`,y:`428`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 5 `,8,z),f(`circle`,{cx:`230`,cy:`320`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,B),f(`text`,{x:`230`,y:`328`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 6 `,8,V)],12,E)):u(``,!0),J.value===`circlePack`?(g(),d(`svg`,{key:3,xmlns:y(a),width:`100%`,viewBox:`0 0 100 100`,style:h(`background:${q.value.backgroundColor}`)},[f(`circle`,{cx:50,cy:50,r:20,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,U),f(`circle`,{cx:80,cy:50,r:10,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,de),f(`circle`,{cx:28,cy:30,r:10,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,fe),f(`circle`,{cx:25,cy:76,r:16,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,pe),f(`circle`,{cx:60,cy:78.5,r:10,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,me),f(`circle`,{cx:64,cy:20,r:13,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,he),f(`circle`,{cx:72,cy:37,r:5,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,ge),f(`circle`,{cx:25,cy:45,r:5,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,_e),f(`circle`,{cx:70,cy:66,r:5,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,ve)],12,H)):u(``,!0),J.value===`flow`?(g(),d(`svg`,{key:4,xmlns:y(a),width:`100%`,viewBox:`0 0 80 60`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`path`,{d:`M5 5V55M75 5V55M28 5V55M52 5V55M5 8l23 4L52 9 75 8v4H52L28 21 5 29ZM5 34l23 1L52 24l23-3v6L52 30 28 44l24-5 23 2v6L52 45 28 52H5Z`,stroke:q.value.flow.color,"stroke-width":.8,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:q.value.flow.color},null,8,be)],12,ye)):u(``,!0),J.value===`parallelCoordinatePlot`?(g(),d(`svg`,{key:5,xmlns:y(a),width:`100%`,viewBox:`0 0 80 60`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`path`,{d:`M5 5V55M75 5V55M28 5V55M52 5V55M5 10a1 1 0 000 2 1 1 0 000-2m23 5a1 1 0 000 2 1 1 0 000-2M52 8a1 1 0 000 2 1 1 0 000-2m23 3a1 1 0 000 2 1 1 0 000-2M6 11l21 5m2 0L51 9m2 0 21 3M5 50a1 1 0 000-2 1 1 0 000 2M28 39a1 1 0 000 2 1 1 0 000-2m24 6a1 1 0 000 2 1 1 0 000-2m23 0a1 1 0 000 2 1 1 0 000-2M6 49l21-9m2 0 22 6m2 0H74M5 25a1 1 0 000 2 1 1 0 000-2m23 6a1 1 0 000 2 1 1 0 000-2m24-8a1 1 0 000 2 1 1 0 000-2m23-2a1 1 0 000 2 1 1 0 000-2M6 26l21 6m2 0 22-8m2 0 21-2`,stroke:q.value.parallelCoordinatePlot.color,"stroke-width":.8,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:q.value.parallelCoordinatePlot.color},null,8,Se)],12,xe)):u(``,!0),J.value===`bullet`?(g(),d(`svg`,{key:6,xmlns:y(a),width:`100%`,viewBox:`0 0 600 96`,style:h(`background:${q.value.backgroundColor}`)},[f(`rect`,{fill:q.value.bullet.color,x:24,y:12,width:300,height:72,style:{opacity:`0.8`}},null,8,we),f(`rect`,{fill:q.value.bullet.color,x:324,y:12,width:150,height:72,style:{opacity:`0.6`}},null,8,Te),f(`rect`,{fill:q.value.bullet.color,x:474,y:12,width:102,height:72,style:{opacity:`0.3`}},null,8,Ee),f(`rect`,{fill:q.value.bullet.color,x:24,y:36,width:490,height:24,style:{opacity:`1`}},null,8,De)],12,Ce)):u(``,!0),J.value===`dumbbell`?(g(),d(`svg`,{key:7,xmlns:y(a),width:`100%`,viewBox:`0 0 100 55`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`line`,{x1:`3`,x2:`3`,y1:`3`,y2:`67`,stroke:q.value.dumbbell.color,"stroke-width":.5,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,ke),f(`path`,{d:`
2
2
  M 30,11
3
3
  C 39,10 39,10
4
4
  45,11
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Yt as r,at as i,i as a,t as o,zt as s}from"./lib-rPeBMZrn.js";import{n as c,t as l}from"./useHints-BH9r_0Vd.js";import{t as u}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as d}from"./useNestedProp-DnGoh-XS.js";import{t as f}from"./DefGrad-DKMq1REY.js";import{Fragment as p,computed as m,createCommentVNode as h,createElementBlock as g,createElementVNode as _,createTextVNode as v,createVNode as y,normalizeClass as b,normalizeStyle as x,onMounted as S,openBlock as C,ref as w,renderList as T,renderSlot as E,toDisplayString as D,unref as O,useSlots as k,watch as A,withCtx as j,withKeys as M}from"vue";var N=[`xmlns`,`stroke`],P=[`stroke`],F=[`xmlns`,`viewBox`,`stroke`],I=[`viewBox`,`stroke`],L=/*#__PURE__*/ u({__name:`BaseSmilingUnit`,props:{config:{type:Object},unit:{type:Number},currentRating:{type:Number},getActiveColor:{type:Function},calcShapeFill:{type:Function},isReadonly:{type:Boolean},hasBreakdown:{type:Boolean},hoveredValue:{type:Number},isCursorPointer:{type:Boolean}},emits:[`rate`,`mouseenter`,`mouseleave`],setup(e,{emit:t}){let n=e,i=t;return(t,a)=>(C(),g(`div`,{tabindex:`0`,class:b({"vue-ui-smiley-rated":!e.config.readonly&&e.currentRating===e.unit}),style:x({cursor:e.config.readonly?`default`:n.isCursorPointer?`pointer`:`default`,height:e.config.style.itemSize+`px`,aspectRatio:`1/1`,position:`relative`}),onMouseenter:a[0]||=e=>i(`mouseenter`),onMouseleave:a[1]||=e=>i(`mouseleave`),onClick:a[2]||=t=>i(`rate`,e.unit),onKeyup:a[3]||=M(t=>i(`rate`,e.unit),[`enter`])},[e.config.style.tooltip.show&&e.hasBreakdown&&e.isReadonly?(C(),g(`div`,{key:0,class:`vue-ui-rating-tooltip`,style:x({border:`1px solid ${e.config.style.tooltip.borderColor}`,position:`absolute`,top:`${e.config.style.tooltip.offsetY-48}px`,left:`50%`,transform:`translateX(-50%)`,width:`fit-content`,textAlign:`center`,background:e.config.style.tooltip.backgroundColor,display:e.hoveredValue===e.unit-1?`block`:`none`,padding:`2px 12px`,borderRadius:e.config.style.tooltip.borderRadius+`px`,boxShadow:e.config.style.tooltip.boxShadow})},[_(`div`,{style:x({width:`100%`,display:`flex`,flexDirection:`row`,gap:`6px`,position:`relative`,textAlign:`center`,color:e.config.style.tooltip.color})},[_(`span`,{style:x(`font-size:${e.config.style.tooltip.fontSize}px`)},D(e.unit)+`:`,5),_(`span`,{style:x(`font-weight:${e.config.style.tooltip.bold?`bold`:`normal`};font-size:${e.config.style.tooltip.fontSize}px`)},[E(t.$slots,`rating`,{},void 0,!0)],4),_(`div`,{style:x(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${e.config.style.tooltip.borderColor}`)},` ▼ `,4)],4)],4)):h(``,!0),e.config.style.icons.filled?(C(),g(`svg`,{key:1,xmlns:O(o),style:{transition:`all 0.1s ease-in-out`,position:`absolute`,top:`0`,left:`0`},height:`100%`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:e.getActiveColor(e.unit-1),fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[_(`defs`,null,[y(f,{t:`radial`,id:`vueUiSmiley${e.unit-1}`,stops:[[`0%`,O(r)(e.config.style.colors.active[e.unit-1],.05),1],[`100%`,e.config.style.colors.active[e.unit-1],1]]},null,8,[`id`,`stops`])]),E(t.$slots,`path-icon-filled`,{},void 0,!0)],8,N)):(C(),g(`svg`,{key:2,style:{position:`absolute`,top:`0`,left:`0`,transition:`all 0.1s ease-in-out`},height:`100%`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:e.getActiveColor(e.unit-1),fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[E(t.$slots,`path-icon`,{},void 0,!0)],8,P)),e.config.style.icons.filled&&e.isReadonly?(C(),g(`svg`,{key:3,xmlns:O(o),style:{transition:`all 0.1s ease-in-out`,position:`absolute`,top:`0`,left:`0`},height:`100%`,viewBox:`0 0 ${e.calcShapeFill(e.unit-1)} 24`,"stroke-width":`1.5`,stroke:e.config.style.colors.activeReadonly[e.unit-1],fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[_(`defs`,null,[y(f,{t:`radial`,id:`vueUiSmiley${e.unit-1}`,stops:[[`0%`,O(r)(e.config.style.colors.activeReadonly[e.unit-1],.05),1],[`100%`,e.config.style.colors.activeReadonly[e.unit-1],1]]},null,8,[`id`,`stops`])]),E(t.$slots,`path-icon-filled-readonly`,{},void 0,!0)],8,F)):h(``,!0),!e.config.style.icons.filled&&e.isReadonly?(C(),g(`svg`,{key:4,style:{position:`absolute`,top:`0`,left:`0`,transition:`all 0.1s ease-in-out`},height:`100%`,viewBox:`0 0 ${e.calcShapeFill(e.unit-1)} 24`,"stroke-width":`1.5`,stroke:e.config.style.colors.activeReadonly[e.unit-1],fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[E(t.$slots,`path-icon-readonly`,{},void 0,!0)],8,I)):h(``,!0)],38))}},[[`__scopeId`,`data-v-9734e83c`]]),R=/* @__PURE__ */ e({default:()=>W}),z={key:0,class:`vue-ui-rating-title`,style:{width:`100%`}},B=[`d`,`fill`],V=[`d`],H=[`d`,`fill`],U=[`d`],W={__name:`vue-ui-smiley`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`rate`],setup(e,{expose:r,emit:o}){let{vue_ui_smiley:u}=t(),f=e,b=k(),E=o,O=w(null),M=w(W()),N=m(()=>M.value.style.rating),P=m(()=>M.value.style),F=m(()=>M.value.debug);S(()=>{b[`chart-background`]&&F.value&&console.warn(`VueUiSmiley does not support the #chart-background slot.`)});function I(){(!Object.hasOwn(f.dataset,`rating`)||s(f.dataset))&&i({componentName:`VueUiSmiley`,type:`datasetAttribute`,property:`rating`,debug:F.value})}S(I),c({config:()=>M.value,dataset:()=>[],component:`VueUiSmiley`,rules:[l.noHint]});let R=m(()=>M.value.useCursorPointer);function W(){return d({userConfig:f.config,defaultConfig:u})}A(()=>f.config,e=>{M.value=W(),J.value=M.value.readonly,I()},{deep:!0});let G=m(()=>{let e=f.dataset.rating;return e&&typeof e==`object`&&!Array.isArray(e)?X(e):e??null}),K=m(()=>typeof f.dataset.rating==`object`&&!Array.isArray(f.dataset.rating)),q=w(G.value);A(G,e=>{q.value=e});let J=w(M.value.readonly),Y=[{key:`smiley_0`,pathIconFilled:`M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zm-5 9.86a4.5 4.5 0 00-3.214 1.35 1 1 0 101.428 1.4 2.5 2.5 0 013.572 0 1 1 0 001.428-1.4A4.5 4.5 0 0012 13.2zM9.01 9l-.127.007a1 1 0 000 1.986L9 11l.127-.007a1 1 0 000-1.986L9.01 9zm6 0-.127.007a1 1 0 000 1.986L15 11l.127-.007a1 1 0 000-1.986L15.01 9z`,pathIcon:`M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01M9.5 15.25a3.5 3.5 0 015 0`,pathIconFilledReadonly:`M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zm-5 9.86a4.5 4.5 0 00-3.214 1.35 1 1 0 101.428 1.4 2.5 2.5 0 013.572 0 1 1 0 001.428-1.4A4.5 4.5 0 0012 13.2zM9.01 9l-.127.007a1 1 0 000 1.986L9 11l.127-.007a1 1 0 000-1.986L9.01 9zm6 0-.127.007a1 1 0 000 1.986L15 11l.127-.007a1 1 0 000-1.986L15.01 9z`,pathIconReadonly:`M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01M9.5 15.25a3.5 3.5 0 015 0`},{key:`smiley_1`,pathIconFilled:`M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zM15 14H9l-.117.007a1 1 0 000 1.986L9 16h6l.117-.007a1 1 0 000-1.986L15 14zm-5.99-5-.127.007a1 1 0 000 1.986L9 11l.127-.007a1 1 0 000-1.986L9.01 9zm6 0-.127.007a1 1 0 000 1.986L15 11l.127-.007a1 1 0 000-1.986L15.01 9z`,pathIcon:`M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01M9 15h6`,pathIconFilledReadonly:`M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zM15 14H9l-.117.007a1 1 0 000 1.986L9 16h6l.117-.007a1 1 0 000-1.986L15 14zm-5.99-5-.127.007a1 1 0 000 1.986L9 11l.127-.007a1 1 0 000-1.986L9.01 9zm6 0-.127.007a1 1 0 000 1.986L15 11l.127-.007a1 1 0 000-1.986L15.01 9z`,pathIconReadonly:`M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01M9 15h6`},{key:`smiley_2`,pathIconFilled:`M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zM9.01 9l-.127.007a1 1 0 000 1.986L9 11l.127-.007a1 1 0 000-1.986L9.01 9zm6 0-.127.007a1 1 0 000 1.986L15 11l.127-.007a1 1 0 000-1.986L15.01 9z`,pathIcon:`M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01`,pathIconFilledReadonly:`M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zM9.01 9l-.127.007a1 1 0 000 1.986L9 11l.127-.007a1 1 0 000-1.986L9.01 9zm6 0-.127.007a1 1 0 000 1.986L15 11l.127-.007a1 1 0 000-1.986L15.01 9z`,pathIconReadonly:`M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01`},{key:`smiley_3`,pathIconFilled:`M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zm-1.8 10.946a1 1 0 00-1.414.014 2.5 2.5 0 01-3.572 0 1 1 0 00-1.428 1.4 4.5 4.5 0 006.428 0 1 1 0 00-.014-1.414zM9.01 9l-.127.007A1 1 0 009 11l.127-.007A1 1 0 009.01 9zm6 0-.127.007A1 1 0 0015 11l.127-.007A1 1 0 0015.01 9z`,pathIcon:`M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01M9.5 15a3.5 3.5 0 005 0`,pathIconFilledReadonly:`M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zm-1.8 10.946a1 1 0 00-1.414.014 2.5 2.5 0 01-3.572 0 1 1 0 00-1.428 1.4 4.5 4.5 0 006.428 0 1 1 0 00-.014-1.414zM9.01 9l-.127.007A1 1 0 009 11l.127-.007A1 1 0 009.01 9zm6 0-.127.007A1 1 0 0015 11l.127-.007A1 1 0 0015.01 9z`,pathIconReadonly:`M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01M9.5 15a3.5 3.5 0 005 0`},{key:`smiley_4`,pathIconFilled:`M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zM15 13H9a1 1 0 00-1 1v.05a3.975 3.975 0 003.777 3.97l.227.005a4.026 4.026 0 003.99-3.79l.006-.206A1 1 0 0015 13zm-5.99-5-.127.007A1 1 0 009 10l.127-.007A1 1 0 009.01 8zm6 0-.127.007A1 1 0 0015 10l.127-.007A1 1 0 0015.01 8z`,pathIcon:`M3 12a9 9 0 1018 0A9 9 0 103 12M9 9h.01M15 9h.01M8 13a4 4 0 108 0H8`,pathIconFilledReadonly:`M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zM15 13H9a1 1 0 00-1 1v.05a3.975 3.975 0 003.777 3.97l.227.005a4.026 4.026 0 003.99-3.79l.006-.206A1 1 0 0015 13zm-5.99-5-.127.007A1 1 0 009 10l.127-.007A1 1 0 009.01 8zm6 0-.127.007A1 1 0 0015 10l.127-.007A1 1 0 0015.01 8z`,pathIconReadonly:`M3 12a9 9 0 1018 0A9 9 0 103 12M9 9h.01M15 9h.01M8 13a4 4 0 108 0H8`}];function X(e){if(e==null)return null;let t=0,n=0;for(let r in e){let i=Number(r),a=e[r];Number.isFinite(i)&&(t+=i*a,n+=a)}return n===0?0:t/n}function Z(e){let t=q.value-e;switch(!0){case t<0:return 0;case t>1:return 24;default:return t*24}}function Q(e){return M.value.readonly?P.value.colors.inactive[e]:q.value===e+1||O.value!==null&&O.value===e?P.value.icons.useGradient&&P.value.icons.filled?`url(#vueUiSmiley${e})`:P.value.colors.active[e]:P.value.colors.inactive[e]}let $=m(()=>({value:e,tooltip:t=!1})=>a(t?P.value.tooltip.formatter:N.value.formatter,e,n({v:e,r:t?P.value.tooltip.roundingValue:N.value.roundingValue}),M.value));function ee(e){J.value||(q.value=e,E(`rate`,e))}function te(){return q.value}function ne(e=!0){J.value=e}return r({getData:te,toggleReadonly:ne}),(e,t)=>(C(),g(`div`,{class:`vue-data-ui-component vue-ui-smiley`,style:x(`background:${P.value.backgroundColor};font-family:${P.value.fontFamily};width:100%;`),onMouseleave:t[1]||=e=>O.value=void 0},[P.value.title.text?(C(),g(`div`,z,[_(`div`,{style:x(`color:${P.value.title.color};font-weight:${P.value.title.bold?`bold`:`normal`};text-align:${P.value.title.textAlign};margin-bottom:${P.value.title.offsetY}px;font-size:${P.value.title.fontSize}px`)},D(P.value.title.text),5),P.value.title.subtitle.text?(C(),g(`div`,{key:0,style:x(`color:${P.value.title.subtitle.color};font-size:${P.value.title.subtitle.fontSize}px;text-align:${P.value.title.textAlign};margin-bottom:${P.value.title.subtitle.offsetY}px;font-weight:${P.value.title.subtitle.bold?`bold`:`normal`}`)},D(P.value.title.subtitle.text),5)):h(``,!0)])):h(``,!0),N.value.show&&N.value.position===`top`?(C(),g(`div`,{key:1,style:x(`width:100%;text-align:center;margin-bottom:${N.value.offsetY}px;font-size:${N.value.fontSize}px;font-weight:${N.value.bold?`bold`:`normal`};margin-left:${N.value.offsetX}px`)},D($.value({value:q.value})),5)):h(``,!0),_(`div`,{class:`vue-ui-smiley-wrapper`,style:x(`overflow:visible;height:${P.value.itemSize}px;width:fit-content;margin:0 auto;display:flex;align-items:center;justify-content:center;`)},[N.value.show&&N.value.position===`left`?(C(),g(`div`,{key:0,style:x(`width:fit-content;text-align:center;margin-bottom:${N.value.offsetY}px;font-size:${N.value.fontSize}px;font-weight:${N.value.bold?`bold`:`normal`};padding-right:${N.value.offsetX}px`)},D($.value({value:q.value})),5)):h(``,!0),(C(),g(p,null,T(Y,(e,n)=>y(L,{key:e.key,config:M.value,unit:n+1,currentRating:q.value,isReadonly:J.value,hasBreakdown:K.value,hoveredValue:O.value,getActiveColor:Q,calcShapeFill:Z,isCursorPointer:R.value,onMouseenter:e=>O.value=n,onMouseleave:t[0]||=e=>O.value=null,onRate:e=>ee(n+1)},{rating:j(()=>[v(D($.value({value:f.dataset.rating[String(n+1)],tooltip:!0})),1)]),"path-icon-filled":j(()=>[_(`path`,{d:e.pathIconFilled,"stroke-width":`0`,fill:Q(n)},null,8,B)]),"path-icon":j(()=>[_(`path`,{d:e.pathIcon},null,8,V)]),"path-icon-filled-readonly":j(()=>[_(`path`,{d:e.pathIconFilledReadonly,"stroke-width":`0`,fill:P.value.icons.useGradient?`url(#vueUiSmiley${n})`:P.value.colors.activeReadonly[n]},null,8,H)]),"path-icon-readonly":j(()=>[_(`path`,{d:e.pathIconReadonly},null,8,U)]),_:2},1032,[`config`,`unit`,`currentRating`,`isReadonly`,`hasBreakdown`,`hoveredValue`,`isCursorPointer`,`onMouseenter`,`onRate`])),64)),N.value.show&&N.value.position===`right`?(C(),g(`div`,{key:1,style:x(`width:fit-content;text-align:center;margin-bottom:${N.value.offsetY}px;font-size:${N.value.fontSize}px;font-weight:${N.value.bold?`bold`:`normal`};padding-left:${N.value.offsetX}px`)},D($.value({value:q.value})),5)):h(``,!0)],4),N.value.show&&N.value.position===`bottom`?(C(),g(`div`,{key:2,style:x(`width:100%;text-align:center;margin-top:${N.value.offsetY}px;font-size:${N.value.fontSize}px;font-weight:${N.value.bold?`bold`:`normal`};margin-left:${N.value.offsetX}px`)},D($.value({value:q.value})),5)):h(``,!0)],36))}};export{R as n,W as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Yt as r,at as i,i as a,t as o,zt as s}from"./lib-rPeBMZrn.js";import{n as c,t as l}from"./useHints-C-TwxM0Y.js";import{t as u}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as d}from"./useNestedProp-DnGoh-XS.js";import{t as f}from"./DefGrad-DKMq1REY.js";import{Fragment as p,computed as m,createCommentVNode as h,createElementBlock as g,createElementVNode as _,createTextVNode as v,createVNode as y,normalizeClass as b,normalizeStyle as x,onMounted as S,openBlock as C,ref as w,renderList as T,renderSlot as E,toDisplayString as D,unref as O,useSlots as k,watch as A,withCtx as j,withKeys as M}from"vue";var N=[`xmlns`,`stroke`],P=[`stroke`],F=[`xmlns`,`viewBox`,`stroke`],I=[`viewBox`,`stroke`],L=/*#__PURE__*/ u({__name:`BaseSmilingUnit`,props:{config:{type:Object},unit:{type:Number},currentRating:{type:Number},getActiveColor:{type:Function},calcShapeFill:{type:Function},isReadonly:{type:Boolean},hasBreakdown:{type:Boolean},hoveredValue:{type:Number},isCursorPointer:{type:Boolean}},emits:[`rate`,`mouseenter`,`mouseleave`],setup(e,{emit:t}){let n=e,i=t;return(t,a)=>(C(),g(`div`,{tabindex:`0`,class:b({"vue-ui-smiley-rated":!e.config.readonly&&e.currentRating===e.unit}),style:x({cursor:e.config.readonly?`default`:n.isCursorPointer?`pointer`:`default`,height:e.config.style.itemSize+`px`,aspectRatio:`1/1`,position:`relative`}),onMouseenter:a[0]||=e=>i(`mouseenter`),onMouseleave:a[1]||=e=>i(`mouseleave`),onClick:a[2]||=t=>i(`rate`,e.unit),onKeyup:a[3]||=M(t=>i(`rate`,e.unit),[`enter`])},[e.config.style.tooltip.show&&e.hasBreakdown&&e.isReadonly?(C(),g(`div`,{key:0,class:`vue-ui-rating-tooltip`,style:x({border:`1px solid ${e.config.style.tooltip.borderColor}`,position:`absolute`,top:`${e.config.style.tooltip.offsetY-48}px`,left:`50%`,transform:`translateX(-50%)`,width:`fit-content`,textAlign:`center`,background:e.config.style.tooltip.backgroundColor,display:e.hoveredValue===e.unit-1?`block`:`none`,padding:`2px 12px`,borderRadius:e.config.style.tooltip.borderRadius+`px`,boxShadow:e.config.style.tooltip.boxShadow})},[_(`div`,{style:x({width:`100%`,display:`flex`,flexDirection:`row`,gap:`6px`,position:`relative`,textAlign:`center`,color:e.config.style.tooltip.color})},[_(`span`,{style:x(`font-size:${e.config.style.tooltip.fontSize}px`)},D(e.unit)+`:`,5),_(`span`,{style:x(`font-weight:${e.config.style.tooltip.bold?`bold`:`normal`};font-size:${e.config.style.tooltip.fontSize}px`)},[E(t.$slots,`rating`,{},void 0,!0)],4),_(`div`,{style:x(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${e.config.style.tooltip.borderColor}`)},` ▼ `,4)],4)],4)):h(``,!0),e.config.style.icons.filled?(C(),g(`svg`,{key:1,xmlns:O(o),style:{transition:`all 0.1s ease-in-out`,position:`absolute`,top:`0`,left:`0`},height:`100%`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:e.getActiveColor(e.unit-1),fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[_(`defs`,null,[y(f,{t:`radial`,id:`vueUiSmiley${e.unit-1}`,stops:[[`0%`,O(r)(e.config.style.colors.active[e.unit-1],.05),1],[`100%`,e.config.style.colors.active[e.unit-1],1]]},null,8,[`id`,`stops`])]),E(t.$slots,`path-icon-filled`,{},void 0,!0)],8,N)):(C(),g(`svg`,{key:2,style:{position:`absolute`,top:`0`,left:`0`,transition:`all 0.1s ease-in-out`},height:`100%`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:e.getActiveColor(e.unit-1),fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[E(t.$slots,`path-icon`,{},void 0,!0)],8,P)),e.config.style.icons.filled&&e.isReadonly?(C(),g(`svg`,{key:3,xmlns:O(o),style:{transition:`all 0.1s ease-in-out`,position:`absolute`,top:`0`,left:`0`},height:`100%`,viewBox:`0 0 ${e.calcShapeFill(e.unit-1)} 24`,"stroke-width":`1.5`,stroke:e.config.style.colors.activeReadonly[e.unit-1],fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[_(`defs`,null,[y(f,{t:`radial`,id:`vueUiSmiley${e.unit-1}`,stops:[[`0%`,O(r)(e.config.style.colors.activeReadonly[e.unit-1],.05),1],[`100%`,e.config.style.colors.activeReadonly[e.unit-1],1]]},null,8,[`id`,`stops`])]),E(t.$slots,`path-icon-filled-readonly`,{},void 0,!0)],8,F)):h(``,!0),!e.config.style.icons.filled&&e.isReadonly?(C(),g(`svg`,{key:4,style:{position:`absolute`,top:`0`,left:`0`,transition:`all 0.1s ease-in-out`},height:`100%`,viewBox:`0 0 ${e.calcShapeFill(e.unit-1)} 24`,"stroke-width":`1.5`,stroke:e.config.style.colors.activeReadonly[e.unit-1],fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[E(t.$slots,`path-icon-readonly`,{},void 0,!0)],8,I)):h(``,!0)],38))}},[[`__scopeId`,`data-v-9734e83c`]]),R=/* @__PURE__ */ e({default:()=>W}),z={key:0,class:`vue-ui-rating-title`,style:{width:`100%`}},B=[`d`,`fill`],V=[`d`],H=[`d`,`fill`],U=[`d`],W={__name:`vue-ui-smiley`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`rate`],setup(e,{expose:r,emit:o}){let{vue_ui_smiley:u}=t(),f=e,b=k(),E=o,O=w(null),M=w(W()),N=m(()=>M.value.style.rating),P=m(()=>M.value.style),F=m(()=>M.value.debug);S(()=>{b[`chart-background`]&&F.value&&console.warn(`VueUiSmiley does not support the #chart-background slot.`)});function I(){(!Object.hasOwn(f.dataset,`rating`)||s(f.dataset))&&i({componentName:`VueUiSmiley`,type:`datasetAttribute`,property:`rating`,debug:F.value})}S(I),c({config:()=>M.value,dataset:()=>[],component:`VueUiSmiley`,rules:[l.noHint]});let R=m(()=>M.value.useCursorPointer);function W(){return d({userConfig:f.config,defaultConfig:u})}A(()=>f.config,e=>{M.value=W(),J.value=M.value.readonly,I()},{deep:!0});let G=m(()=>{let e=f.dataset.rating;return e&&typeof e==`object`&&!Array.isArray(e)?X(e):e??null}),K=m(()=>typeof f.dataset.rating==`object`&&!Array.isArray(f.dataset.rating)),q=w(G.value);A(G,e=>{q.value=e});let J=w(M.value.readonly),Y=[{key:`smiley_0`,pathIconFilled:`M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zm-5 9.86a4.5 4.5 0 00-3.214 1.35 1 1 0 101.428 1.4 2.5 2.5 0 013.572 0 1 1 0 001.428-1.4A4.5 4.5 0 0012 13.2zM9.01 9l-.127.007a1 1 0 000 1.986L9 11l.127-.007a1 1 0 000-1.986L9.01 9zm6 0-.127.007a1 1 0 000 1.986L15 11l.127-.007a1 1 0 000-1.986L15.01 9z`,pathIcon:`M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01M9.5 15.25a3.5 3.5 0 015 0`,pathIconFilledReadonly:`M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zm-5 9.86a4.5 4.5 0 00-3.214 1.35 1 1 0 101.428 1.4 2.5 2.5 0 013.572 0 1 1 0 001.428-1.4A4.5 4.5 0 0012 13.2zM9.01 9l-.127.007a1 1 0 000 1.986L9 11l.127-.007a1 1 0 000-1.986L9.01 9zm6 0-.127.007a1 1 0 000 1.986L15 11l.127-.007a1 1 0 000-1.986L15.01 9z`,pathIconReadonly:`M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01M9.5 15.25a3.5 3.5 0 015 0`},{key:`smiley_1`,pathIconFilled:`M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zM15 14H9l-.117.007a1 1 0 000 1.986L9 16h6l.117-.007a1 1 0 000-1.986L15 14zm-5.99-5-.127.007a1 1 0 000 1.986L9 11l.127-.007a1 1 0 000-1.986L9.01 9zm6 0-.127.007a1 1 0 000 1.986L15 11l.127-.007a1 1 0 000-1.986L15.01 9z`,pathIcon:`M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01M9 15h6`,pathIconFilledReadonly:`M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zM15 14H9l-.117.007a1 1 0 000 1.986L9 16h6l.117-.007a1 1 0 000-1.986L15 14zm-5.99-5-.127.007a1 1 0 000 1.986L9 11l.127-.007a1 1 0 000-1.986L9.01 9zm6 0-.127.007a1 1 0 000 1.986L15 11l.127-.007a1 1 0 000-1.986L15.01 9z`,pathIconReadonly:`M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01M9 15h6`},{key:`smiley_2`,pathIconFilled:`M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zM9.01 9l-.127.007a1 1 0 000 1.986L9 11l.127-.007a1 1 0 000-1.986L9.01 9zm6 0-.127.007a1 1 0 000 1.986L15 11l.127-.007a1 1 0 000-1.986L15.01 9z`,pathIcon:`M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01`,pathIconFilledReadonly:`M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zM9.01 9l-.127.007a1 1 0 000 1.986L9 11l.127-.007a1 1 0 000-1.986L9.01 9zm6 0-.127.007a1 1 0 000 1.986L15 11l.127-.007a1 1 0 000-1.986L15.01 9z`,pathIconReadonly:`M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01`},{key:`smiley_3`,pathIconFilled:`M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zm-1.8 10.946a1 1 0 00-1.414.014 2.5 2.5 0 01-3.572 0 1 1 0 00-1.428 1.4 4.5 4.5 0 006.428 0 1 1 0 00-.014-1.414zM9.01 9l-.127.007A1 1 0 009 11l.127-.007A1 1 0 009.01 9zm6 0-.127.007A1 1 0 0015 11l.127-.007A1 1 0 0015.01 9z`,pathIcon:`M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01M9.5 15a3.5 3.5 0 005 0`,pathIconFilledReadonly:`M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zm-1.8 10.946a1 1 0 00-1.414.014 2.5 2.5 0 01-3.572 0 1 1 0 00-1.428 1.4 4.5 4.5 0 006.428 0 1 1 0 00-.014-1.414zM9.01 9l-.127.007A1 1 0 009 11l.127-.007A1 1 0 009.01 9zm6 0-.127.007A1 1 0 0015 11l.127-.007A1 1 0 0015.01 9z`,pathIconReadonly:`M3 12a9 9 0 1018 0A9 9 0 103 12m6-2h.01M15 10h.01M9.5 15a3.5 3.5 0 005 0`},{key:`smiley_4`,pathIconFilled:`M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zM15 13H9a1 1 0 00-1 1v.05a3.975 3.975 0 003.777 3.97l.227.005a4.026 4.026 0 003.99-3.79l.006-.206A1 1 0 0015 13zm-5.99-5-.127.007A1 1 0 009 10l.127-.007A1 1 0 009.01 8zm6 0-.127.007A1 1 0 0015 10l.127-.007A1 1 0 0015.01 8z`,pathIcon:`M3 12a9 9 0 1018 0A9 9 0 103 12M9 9h.01M15 9h.01M8 13a4 4 0 108 0H8`,pathIconFilledReadonly:`M17 3.34A10 10 0 112.005 12.324L2 12l.005-.324A10 10 0 0117 3.34zM15 13H9a1 1 0 00-1 1v.05a3.975 3.975 0 003.777 3.97l.227.005a4.026 4.026 0 003.99-3.79l.006-.206A1 1 0 0015 13zm-5.99-5-.127.007A1 1 0 009 10l.127-.007A1 1 0 009.01 8zm6 0-.127.007A1 1 0 0015 10l.127-.007A1 1 0 0015.01 8z`,pathIconReadonly:`M3 12a9 9 0 1018 0A9 9 0 103 12M9 9h.01M15 9h.01M8 13a4 4 0 108 0H8`}];function X(e){if(e==null)return null;let t=0,n=0;for(let r in e){let i=Number(r),a=e[r];Number.isFinite(i)&&(t+=i*a,n+=a)}return n===0?0:t/n}function Z(e){let t=q.value-e;switch(!0){case t<0:return 0;case t>1:return 24;default:return t*24}}function Q(e){return M.value.readonly?P.value.colors.inactive[e]:q.value===e+1||O.value!==null&&O.value===e?P.value.icons.useGradient&&P.value.icons.filled?`url(#vueUiSmiley${e})`:P.value.colors.active[e]:P.value.colors.inactive[e]}let $=m(()=>({value:e,tooltip:t=!1})=>a(t?P.value.tooltip.formatter:N.value.formatter,e,n({v:e,r:t?P.value.tooltip.roundingValue:N.value.roundingValue}),M.value));function ee(e){J.value||(q.value=e,E(`rate`,e))}function te(){return q.value}function ne(e=!0){J.value=e}return r({getData:te,toggleReadonly:ne}),(e,t)=>(C(),g(`div`,{class:`vue-data-ui-component vue-ui-smiley`,style:x(`background:${P.value.backgroundColor};font-family:${P.value.fontFamily};width:100%;`),onMouseleave:t[1]||=e=>O.value=void 0},[P.value.title.text?(C(),g(`div`,z,[_(`div`,{style:x(`color:${P.value.title.color};font-weight:${P.value.title.bold?`bold`:`normal`};text-align:${P.value.title.textAlign};margin-bottom:${P.value.title.offsetY}px;font-size:${P.value.title.fontSize}px`)},D(P.value.title.text),5),P.value.title.subtitle.text?(C(),g(`div`,{key:0,style:x(`color:${P.value.title.subtitle.color};font-size:${P.value.title.subtitle.fontSize}px;text-align:${P.value.title.textAlign};margin-bottom:${P.value.title.subtitle.offsetY}px;font-weight:${P.value.title.subtitle.bold?`bold`:`normal`}`)},D(P.value.title.subtitle.text),5)):h(``,!0)])):h(``,!0),N.value.show&&N.value.position===`top`?(C(),g(`div`,{key:1,style:x(`width:100%;text-align:center;margin-bottom:${N.value.offsetY}px;font-size:${N.value.fontSize}px;font-weight:${N.value.bold?`bold`:`normal`};margin-left:${N.value.offsetX}px`)},D($.value({value:q.value})),5)):h(``,!0),_(`div`,{class:`vue-ui-smiley-wrapper`,style:x(`overflow:visible;height:${P.value.itemSize}px;width:fit-content;margin:0 auto;display:flex;align-items:center;justify-content:center;`)},[N.value.show&&N.value.position===`left`?(C(),g(`div`,{key:0,style:x(`width:fit-content;text-align:center;margin-bottom:${N.value.offsetY}px;font-size:${N.value.fontSize}px;font-weight:${N.value.bold?`bold`:`normal`};padding-right:${N.value.offsetX}px`)},D($.value({value:q.value})),5)):h(``,!0),(C(),g(p,null,T(Y,(e,n)=>y(L,{key:e.key,config:M.value,unit:n+1,currentRating:q.value,isReadonly:J.value,hasBreakdown:K.value,hoveredValue:O.value,getActiveColor:Q,calcShapeFill:Z,isCursorPointer:R.value,onMouseenter:e=>O.value=n,onMouseleave:t[0]||=e=>O.value=null,onRate:e=>ee(n+1)},{rating:j(()=>[v(D($.value({value:f.dataset.rating[String(n+1)],tooltip:!0})),1)]),"path-icon-filled":j(()=>[_(`path`,{d:e.pathIconFilled,"stroke-width":`0`,fill:Q(n)},null,8,B)]),"path-icon":j(()=>[_(`path`,{d:e.pathIcon},null,8,V)]),"path-icon-filled-readonly":j(()=>[_(`path`,{d:e.pathIconFilledReadonly,"stroke-width":`0`,fill:P.value.icons.useGradient?`url(#vueUiSmiley${n})`:P.value.colors.activeReadonly[n]},null,8,H)]),"path-icon-readonly":j(()=>[_(`path`,{d:e.pathIconReadonly},null,8,U)]),_:2},1032,[`config`,`unit`,`currentRating`,`isReadonly`,`hasBreakdown`,`hoveredValue`,`isCursorPointer`,`onMouseenter`,`onRate`])),64)),N.value.show&&N.value.position===`right`?(C(),g(`div`,{key:1,style:x(`width:fit-content;text-align:center;margin-bottom:${N.value.offsetY}px;font-size:${N.value.fontSize}px;font-weight:${N.value.bold?`bold`:`normal`};padding-left:${N.value.offsetX}px`)},D($.value({value:q.value})),5)):h(``,!0)],4),N.value.show&&N.value.position===`bottom`?(C(),g(`div`,{key:2,style:x(`width:100%;text-align:center;margin-top:${N.value.offsetY}px;font-size:${N.value.fontSize}px;font-weight:${N.value.bold?`bold`:`normal`};margin-left:${N.value.offsetX}px`)},D($.value({value:q.value})),5)):h(``,!0)],36))}};export{R as n,W as t};
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Jt as r,Mt as i,P as a,X as ee,at as te,b as o,g as ne,i as re,in as ie,t as ae,zt as s}from"./lib-rPeBMZrn.js";import{n as oe,t as se}from"./BaseScanner-8NdoBs7B.js";import{n as ce,t as le}from"./useHints-BH9r_0Vd.js";import{t as c}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ue}from"./resolveChartConfig-CIhClE5R.js";import{c as de}from"./canvas-lib-22VpOI4_.js";import{t as fe}from"./useResponsive-CENUxfEL.js";import{t as pe}from"./DefGrad-DKMq1REY.js";import{t as me}from"./usePrefersMotion-XLHwega2.js";import{t as he}from"./useFitSvgText-C1QC4P5G.js";import{t as ge}from"./vue_ui_spark_trend-BOM3zo64.js";import{computed as l,createBlock as _e,createCommentVNode as u,createElementBlock as d,createElementVNode as ve,createVNode as ye,defineAsyncComponent as be,nextTick as xe,normalizeStyle as Se,onMounted as Ce,openBlock as f,ref as p,renderSlot as m,toDisplayString as h,toRefs as we,unref as g,watch as _}from"vue";var Te=/* @__PURE__ */ e({default:()=>v}),Ee=[`id`,`aria-describedby`],De=[`id`],Oe=[`xmlns`,`viewBox`],ke=[`width`,`height`],Ae={key:1},je=[`d`,`fill`],Me=[`d`,`fill`],Ne=[`d`,`stroke`,`stroke-width`,`stroke-linecap`,`stroke-linejoin`],Pe=[`d`,`stroke`,`stroke-width`,`stroke-linecap`,`stroke-linejoin`],Fe=[`d`],Ie=[`fill`,`d`],Le=[`x`,`y`,`width`,`height`],Re=[`x`,`y`,`fill`,`font-size`,`font-weight`],ze=[`stroke`,`cx`,`cy`,`fill`],Be=[`x`,`y`,`font-size`,`fill`,`font-weight`],v=/*#__PURE__*/ c({__name:`vue-ui-spark-trend`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(e){let c=be(()=>import(`./PackageVersion-BIhjLNBU.js`).then(e=>e.t)),{vue_ui_spark_trend:Te}=t(),v=me(),y=e,b=p(null),Ve=p(null),x=p(null),S=p(null),C=p(null),w=p(!1),T=p(null),E=p(ee()),D=p(I()),O=l(()=>D.value.style.dataLabel),k=l(()=>D.value.style.trendLabel),A=l(()=>D.value.style.line),j=l(()=>D.value.style.area),M=l(()=>D.value.style);ce({config:()=>D.value,dataset:()=>y.dataset,component:`VueUiSparkTrend`,rules:[le.emptyArray,{test:e=>e.length>1095,message:[`👀 The dataset has > 1095 datapoints. Above this threshold, the dataset is computed through an LTTB algorithm, to preserve the shape of the data without increasing the number of datapoints.`,``,`▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance will be impacted.`]}]});let He=l(()=>ie({defaultConfig:{style:{animation:{show:!1},backgroundColor:`#99999930`,line:{stroke:`#6A6A6A`,useColorTrend:!1},dataLabel:{show:!1,useColorTrend:!1,color:`#6A6A6A`}}},userConfig:D.value.skeletonConfig??{}})),{loading:N,FINAL_DATASET:P,manualLoading:F}=oe({...we(y),FINAL_CONFIG:D,prepareConfig:I,skeletonDataset:y.config?.skeletonDataset??[1,2,3,5,8,13,21,34,55,89,144,233],skeletonConfig:ie({defaultConfig:D.value,userConfig:He.value})});function I(){return ue(y.config,Te,ge)}let L=l(()=>i({data:P.value,threshold:D.value.downsample.threshold}));_(()=>y.config,e=>{D.value=I(),H.value=M.value.width,U.value=M.value.height,V()},{deep:!0});function R(e){return e.map(e=>o(e))}let z=p(i({data:P.value,threshold:D.value.downsample.threshold}).map(e=>M.value.animation.show&&!v.value||[void 0,1/0,-1/0,null,NaN].includes(e)?null:e));_(L,e=>{T.value&&=(cancelAnimationFrame(T.value),null),M.value.animation.show&&!v.value?z.value=Array(e.length).fill(null):z.value=e.map(e=>![void 0,1/0,-1/0,null].includes(e)&&!Number.isNaN(e)?e:null),B(),xe(()=>$(`.vue-ui-sparktrend-progress-label`,6))},{deep:!0,immediate:!0}),_(()=>JSON.stringify(y.dataset),()=>{T.value&&=(cancelAnimationFrame(T.value),null),F.value=s(y.dataset);let e=L.value;z.value=M.value.animation.show&&!v.value?Array(e.length).fill(null):e.map(e=>Number.isFinite(e)?e:null),B(),xe(()=>$(`.vue-ui-sparktrend-progress-label`,6))},{deep:!1,immediate:!0});function B(){let e=1e3/M.value.animation.animationFrames,t=performance.now();if(!N.value&&M.value.animation.show&&!v.value&&M.value.animation.animationFrames&&P.value.length>1){z.value=[];let n=0;function r(){w.value=!0;let i=performance.now(),a=i-t;a>e?(t=i-a%e,n<L.value.length?(z.value.push(L.value[n]),n+=1,T.value=requestAnimationFrame(r)):(cancelAnimationFrame(T.value),z.value=R(L.value),w.value=!1,$(`.vue-ui-sparktrend-progress-label`,6))):T.value=requestAnimationFrame(r)}r()}}Ce(()=>{V()});let Ue=l(()=>D.value.debug);function V(){if(s(y.dataset)&&(te({componentName:`VueUiSparkTrend`,type:`dataset`,debug:Ue.value}),F.value=!0),s(y.dataset)||(F.value=!1),D.value.responsive){let e=de(()=>{let{width:e,height:t}=fe({chart:b.value,source:x.value});requestAnimationFrame(()=>{H.value=e,U.value=t})});S.value&&(C.value&&S.value.unobserve(C.value),S.value.disconnect()),S.value=new ResizeObserver(e),C.value=b.value.parentNode,S.value.observe(C.value)}B(),$(`.vue-ui-sparktrend-progress-label`,6)}let H=p(M.value.width),U=p(M.value.height),W=l(()=>({height:U.value,width:H.value})),G=l(()=>({top:M.value.padding.top,left:M.value.padding.left,right:W.value.width-M.value.padding.right,bottom:W.value.height-M.value.padding.bottom,height:W.value.height-(M.value.padding.top+M.value.padding.bottom)-(O.value.show?O.value.fontSize:0),width:W.value.width-(M.value.padding.left+M.value.padding.right)})),K=l(()=>{let e=R(L.value).filter(Number.isFinite);if(!e.length)return{max:0,min:0};let t=e[0],n=e[0];for(let r=1;r<e.length;r++){let i=e[r];i>t&&(t=i),i<n&&(n=i)}return{max:t,min:n}}),We=l(()=>{let e=L.value,t=e.length?e[e.length-1]:`x`;return[E.value,e.length,Number.isFinite(t)?t:`x`,D.value.downsample.threshold,A.value.smooth?`s`:`l`].join(`-`)}),q=l(()=>{let e=K.value.min>=0?0:K.value.min;return Math.abs(e)}),Ge=l(()=>K.value.max+q.value);function Ke(e){return e/Ge.value}let qe=l(()=>L.value.length),J=l(()=>z.value.map((e,t)=>{let n=isNaN(e)||[void 0,null,`NaN`,NaN,1/0,-1/0].includes(e)?0:e||0;return{value:o(e),absoluteValue:o(n),plotValue:o(n+q.value),toMax:Ke(n+q.value),x:G.value.left+o(t*(G.value.width/(qe.value-1)))-M.value.padding.right,y:G.value.bottom-o(G.value.height*Ke(n+q.value))}})),Y=l(()=>{let e=R(L.value);return k.value.trendType===`global`?ne(e):k.value.trendType===`n-1`&&e.length>1?(e.at(-1)/e.at(-2)-1)*100:k.value.trendType===`lastToFirst`?(e.at(-1)/e[0]-1)*100:0}),X=l(()=>w.value||Y.value===0?`neutral`:Y.value>0?`positive`:`negative`),Z=l(()=>M.value.arrow.colors[X.value]),Je=l(()=>{let e={x:J.value[0].x,y:W.value.height-6},t={x:J.value[J.value.length-1].x,y:W.value.height-6},n=[];return J.value.forEach(e=>{n.push(`${e.x},${e.y} `)}),[e.x,e.y,...n,t.x,t.y].toString()}),Ye=l(()=>{let e=[];return J.value.forEach(t=>{e.push(`${t.x},${t.y} `)}),`M ${e.toString()}`}),Q=l(()=>U.value/2-k.value.fontSize),Xe=l(()=>G.value.left*.8),{fitText:$}=he({svgRef:Ve,unitWidth:Xe,fontSize:k.value.fontSize}),Ze=l(()=>{if(N.value||w.value)return`Trend chart loading`;let e=J.value?.at(-1),t=e?.value,r=n({p:Y.value>0?`+`:``,v:Y.value,s:`%`,r:k.value.rounding}),i=t==null?`not available`:re(O.value.formatter,t,n({p:O.value.prefix,v:t,s:O.value.suffix,r:O.value.rounding}),{datapoint:e});return`Progression ${X.value===`positive`?`up ${r}`:X.value===`negative`?`down ${r}`:`stable at ${r}`}. Last value ${i}.`}),Qe=l(()=>`sparktrend-a11y-${E.value}`);return(e,t)=>(f(),d(`div`,{ref_key:`sparkTrendChart`,ref:b,class:`vue-data-ui-component vue-ui-spark-trend`,id:E.value,style:Se(`width:100%;font-family:${M.value.fontFamily};background:${M.value.backgroundColor}`),role:`img`,"aria-describedby":Qe.value},[ve(`p`,{id:Qe.value,class:`sr-only`,"aria-live":`polite`},h(Ze.value),9,De),(f(),d(`svg`,{key:We.value,ref_key:`svgRef`,ref:Ve,xmlns:g(ae),viewBox:`0 0 ${W.value.width} ${W.value.height}`,style:`width:100%;background:transparent;overflow:visible`,"aria-hidden":`true`},[ye(g(c)),e.$slots[`chart-background`]?(f(),d(`foreignObject`,{key:0,x:0,y:0,width:W.value.width<=0?10:W.value.width,height:W.value.height<=0?10:W.value.height,style:{pointerEvents:`none`}},[m(e.$slots,`chart-background`,{},void 0,!0)],8,ke)):u(``,!0),ve(`defs`,null,[ye(pe,{t:`linear`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,id:`pill_gradient_${E.value}`,stops:[[`0%`,g(r)(A.value.useColorTrend?Z.value:A.value.stroke,j.value.opacity),1],[`100%`,M.value.backgroundColor,1]]},null,8,[`id`,`stops`])]),j.value.show&&J.value[0]?(f(),d(`g`,Ae,[A.value.smooth?(f(),d(`path`,{key:0,d:`M ${J.value[0].x},${G.value.bottom} ${g(a)(J.value)} L ${J.value.at(-1).x},${G.value.bottom} Z`,fill:j.value.useGradient?`url(#pill_gradient_${E.value})`:g(r)(A.value.useColorTrend?Z.value:A.value.stroke,j.value.opacity),stroke:`none`},null,8,je)):(f(),d(`path`,{key:1,d:`M${Je.value}Z`,fill:j.value.useGradient?`url(#pill_gradient_${E.value})`:g(r)(A.value.useColorTrend?Z.value:A.value.stroke,j.value.opacity),stroke:`none`},null,8,Me))])):u(``,!0),A.value.smooth&&J.value.length?(f(),d(`path`,{key:2,d:`M ${g(a)(J.value)}`,stroke:A.value.useColorTrend?Z.value:A.value.stroke,fill:`none`,"stroke-width":A.value.strokeWidth,"stroke-linecap":A.value.strokeLinecap,"stroke-linejoin":A.value.strokeLinejoin},null,8,Ne)):u(``,!0),!A.value.smooth&&J.value.length?(f(),d(`path`,{key:3,d:Ye.value,stroke:A.value.useColorTrend?Z.value:A.value.stroke,fill:`none`,"stroke-width":A.value.strokeWidth,"stroke-linecap":A.value.strokeLinecap,"stroke-linejoin":A.value.strokeLinejoin},null,8,Pe)):u(``,!0),g(N)?(f(),d(`path`,{key:4,fill:`#6A6A6A`,d:`M ${G.value.left/2+6}, ${Q.value+7} ${G.value.left/2-7}, ${Q.value} ${G.value.left/2-7}, ${Q.value+14} Z`},null,8,Fe)):(f(),d(`path`,{key:5,fill:Z.value,d:X.value===`positive`?`M ${G.value.left/2}, ${Q.value} ${G.value.left/2-7}, ${Q.value+12} ${G.value.left/2+7}, ${Q.value+12} Z`:X.value===`negative`?`M ${G.value.left/2}, ${Q.value+12} ${G.value.left/2-7}, ${Q.value} ${G.value.left/2+7}, ${Q.value} Z`:`M ${G.value.left/2+6}, ${Q.value+7} ${G.value.left/2-7}, ${Q.value} ${G.value.left/2-7}, ${Q.value+14} Z`},null,8,Ie)),g(N)?(f(),d(`rect`,{key:6,x:G.value.left/2-k.value.fontSize-2,y:U.value/2+k.value.fontSize-2,width:k.value.fontSize*2,height:k.value.fontSize,fill:`#6A6A6A80`,rx:`3`},null,8,Le)):u(``,!0),!w.value&&!g(N)?(f(),d(`text`,{key:7,class:`vue-ui-sparktrend-progress-label`,x:G.value.left/2,y:U.value/2+k.value.fontSize*2,"text-anchor":`middle`,fill:k.value.useColorTrend?Z.value:k.value.color,"font-size":k.value.fontSize,"font-weight":k.value.bold?`bold`:`normal`},h(g(n)({p:Y.value>0?`+`:``,v:Y.value,s:`%`,r:k.value.rounding})),9,Re)):u(``,!0),J.value.length&&J.value.at(-1).x!==void 0?(f(),d(`circle`,{key:8,stroke:M.value.backgroundColor,"stroke-width":2,cx:J.value.at(-1).x,cy:J.value.at(-1).y,r:4,fill:g(N)?`#6A6A6A`:Z.value},null,8,ze)):u(``,!0),J.value.length&&J.value.at(-1).x!==void 0&&O.value.show?(f(),d(`text`,{key:9,"text-anchor":`middle`,x:J.value.at(-1).x,y:J.value.at(-1).y-O.value.fontSize/1.5,"font-size":O.value.fontSize,fill:O.value.useColorTrend?Z.value:O.value.color,"font-weight":O.value.bold?`bold`:`normal`},h(g(re)(O.value.formatter,J.value.at(-1).value,g(n)({p:O.value.prefix,v:J.value.at(-1).value,s:O.value.suffix,r:O.value.rounding}),{datapoint:J.value.at(-1)})),9,Be)):u(``,!0)],8,Oe)),e.$slots.source?(f(),d(`div`,{key:0,ref_key:`source`,ref:x,dir:`auto`},[m(e.$slots,`source`,{},void 0,!0)],512)):u(``,!0),m(e.$slots,`skeleton`,{},()=>[g(N)?(f(),_e(se,{key:0})):u(``,!0)],!0)],12,Ee))}},[[`__scopeId`,`data-v-814f1b0f`]]);export{Te as n,v as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Jt as r,Mt as i,P as a,X as ee,at as te,b as o,g as ne,i as re,in as ie,t as ae,zt as s}from"./lib-rPeBMZrn.js";import{n as oe,t as se}from"./BaseScanner-8NdoBs7B.js";import{n as ce,t as le}from"./useHints-C-TwxM0Y.js";import{t as c}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ue}from"./resolveChartConfig-CIhClE5R.js";import{c as de}from"./canvas-lib-22VpOI4_.js";import{t as fe}from"./useResponsive-CENUxfEL.js";import{t as pe}from"./DefGrad-DKMq1REY.js";import{t as me}from"./usePrefersMotion-XLHwega2.js";import{t as he}from"./useFitSvgText-C1QC4P5G.js";import{t as ge}from"./vue_ui_spark_trend-BOM3zo64.js";import{computed as l,createBlock as _e,createCommentVNode as u,createElementBlock as d,createElementVNode as ve,createVNode as ye,defineAsyncComponent as be,nextTick as xe,normalizeStyle as Se,onMounted as Ce,openBlock as f,ref as p,renderSlot as m,toDisplayString as h,toRefs as we,unref as g,watch as _}from"vue";var Te=/* @__PURE__ */ e({default:()=>v}),Ee=[`id`,`aria-describedby`],De=[`id`],Oe=[`xmlns`,`viewBox`],ke=[`width`,`height`],Ae={key:1},je=[`d`,`fill`],Me=[`d`,`fill`],Ne=[`d`,`stroke`,`stroke-width`,`stroke-linecap`,`stroke-linejoin`],Pe=[`d`,`stroke`,`stroke-width`,`stroke-linecap`,`stroke-linejoin`],Fe=[`d`],Ie=[`fill`,`d`],Le=[`x`,`y`,`width`,`height`],Re=[`x`,`y`,`fill`,`font-size`,`font-weight`],ze=[`stroke`,`cx`,`cy`,`fill`],Be=[`x`,`y`,`font-size`,`fill`,`font-weight`],v=/*#__PURE__*/ c({__name:`vue-ui-spark-trend`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(e){let c=be(()=>import(`./PackageVersion-DhptF5oD.js`).then(e=>e.t)),{vue_ui_spark_trend:Te}=t(),v=me(),y=e,b=p(null),Ve=p(null),x=p(null),S=p(null),C=p(null),w=p(!1),T=p(null),E=p(ee()),D=p(I()),O=l(()=>D.value.style.dataLabel),k=l(()=>D.value.style.trendLabel),A=l(()=>D.value.style.line),j=l(()=>D.value.style.area),M=l(()=>D.value.style);ce({config:()=>D.value,dataset:()=>y.dataset,component:`VueUiSparkTrend`,rules:[le.emptyArray,{test:e=>e.length>1095,message:[`👀 The dataset has > 1095 datapoints. Above this threshold, the dataset is computed through an LTTB algorithm, to preserve the shape of the data without increasing the number of datapoints.`,``,`▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance will be impacted.`]}]});let He=l(()=>ie({defaultConfig:{style:{animation:{show:!1},backgroundColor:`#99999930`,line:{stroke:`#6A6A6A`,useColorTrend:!1},dataLabel:{show:!1,useColorTrend:!1,color:`#6A6A6A`}}},userConfig:D.value.skeletonConfig??{}})),{loading:N,FINAL_DATASET:P,manualLoading:F}=oe({...we(y),FINAL_CONFIG:D,prepareConfig:I,skeletonDataset:y.config?.skeletonDataset??[1,2,3,5,8,13,21,34,55,89,144,233],skeletonConfig:ie({defaultConfig:D.value,userConfig:He.value})});function I(){return ue(y.config,Te,ge)}let L=l(()=>i({data:P.value,threshold:D.value.downsample.threshold}));_(()=>y.config,e=>{D.value=I(),H.value=M.value.width,U.value=M.value.height,V()},{deep:!0});function R(e){return e.map(e=>o(e))}let z=p(i({data:P.value,threshold:D.value.downsample.threshold}).map(e=>M.value.animation.show&&!v.value||[void 0,1/0,-1/0,null,NaN].includes(e)?null:e));_(L,e=>{T.value&&=(cancelAnimationFrame(T.value),null),M.value.animation.show&&!v.value?z.value=Array(e.length).fill(null):z.value=e.map(e=>![void 0,1/0,-1/0,null].includes(e)&&!Number.isNaN(e)?e:null),B(),xe(()=>$(`.vue-ui-sparktrend-progress-label`,6))},{deep:!0,immediate:!0}),_(()=>JSON.stringify(y.dataset),()=>{T.value&&=(cancelAnimationFrame(T.value),null),F.value=s(y.dataset);let e=L.value;z.value=M.value.animation.show&&!v.value?Array(e.length).fill(null):e.map(e=>Number.isFinite(e)?e:null),B(),xe(()=>$(`.vue-ui-sparktrend-progress-label`,6))},{deep:!1,immediate:!0});function B(){let e=1e3/M.value.animation.animationFrames,t=performance.now();if(!N.value&&M.value.animation.show&&!v.value&&M.value.animation.animationFrames&&P.value.length>1){z.value=[];let n=0;function r(){w.value=!0;let i=performance.now(),a=i-t;a>e?(t=i-a%e,n<L.value.length?(z.value.push(L.value[n]),n+=1,T.value=requestAnimationFrame(r)):(cancelAnimationFrame(T.value),z.value=R(L.value),w.value=!1,$(`.vue-ui-sparktrend-progress-label`,6))):T.value=requestAnimationFrame(r)}r()}}Ce(()=>{V()});let Ue=l(()=>D.value.debug);function V(){if(s(y.dataset)&&(te({componentName:`VueUiSparkTrend`,type:`dataset`,debug:Ue.value}),F.value=!0),s(y.dataset)||(F.value=!1),D.value.responsive){let e=de(()=>{let{width:e,height:t}=fe({chart:b.value,source:x.value});requestAnimationFrame(()=>{H.value=e,U.value=t})});S.value&&(C.value&&S.value.unobserve(C.value),S.value.disconnect()),S.value=new ResizeObserver(e),C.value=b.value.parentNode,S.value.observe(C.value)}B(),$(`.vue-ui-sparktrend-progress-label`,6)}let H=p(M.value.width),U=p(M.value.height),W=l(()=>({height:U.value,width:H.value})),G=l(()=>({top:M.value.padding.top,left:M.value.padding.left,right:W.value.width-M.value.padding.right,bottom:W.value.height-M.value.padding.bottom,height:W.value.height-(M.value.padding.top+M.value.padding.bottom)-(O.value.show?O.value.fontSize:0),width:W.value.width-(M.value.padding.left+M.value.padding.right)})),K=l(()=>{let e=R(L.value).filter(Number.isFinite);if(!e.length)return{max:0,min:0};let t=e[0],n=e[0];for(let r=1;r<e.length;r++){let i=e[r];i>t&&(t=i),i<n&&(n=i)}return{max:t,min:n}}),We=l(()=>{let e=L.value,t=e.length?e[e.length-1]:`x`;return[E.value,e.length,Number.isFinite(t)?t:`x`,D.value.downsample.threshold,A.value.smooth?`s`:`l`].join(`-`)}),q=l(()=>{let e=K.value.min>=0?0:K.value.min;return Math.abs(e)}),Ge=l(()=>K.value.max+q.value);function Ke(e){return e/Ge.value}let qe=l(()=>L.value.length),J=l(()=>z.value.map((e,t)=>{let n=isNaN(e)||[void 0,null,`NaN`,NaN,1/0,-1/0].includes(e)?0:e||0;return{value:o(e),absoluteValue:o(n),plotValue:o(n+q.value),toMax:Ke(n+q.value),x:G.value.left+o(t*(G.value.width/(qe.value-1)))-M.value.padding.right,y:G.value.bottom-o(G.value.height*Ke(n+q.value))}})),Y=l(()=>{let e=R(L.value);return k.value.trendType===`global`?ne(e):k.value.trendType===`n-1`&&e.length>1?(e.at(-1)/e.at(-2)-1)*100:k.value.trendType===`lastToFirst`?(e.at(-1)/e[0]-1)*100:0}),X=l(()=>w.value||Y.value===0?`neutral`:Y.value>0?`positive`:`negative`),Z=l(()=>M.value.arrow.colors[X.value]),Je=l(()=>{let e={x:J.value[0].x,y:W.value.height-6},t={x:J.value[J.value.length-1].x,y:W.value.height-6},n=[];return J.value.forEach(e=>{n.push(`${e.x},${e.y} `)}),[e.x,e.y,...n,t.x,t.y].toString()}),Ye=l(()=>{let e=[];return J.value.forEach(t=>{e.push(`${t.x},${t.y} `)}),`M ${e.toString()}`}),Q=l(()=>U.value/2-k.value.fontSize),Xe=l(()=>G.value.left*.8),{fitText:$}=he({svgRef:Ve,unitWidth:Xe,fontSize:k.value.fontSize}),Ze=l(()=>{if(N.value||w.value)return`Trend chart loading`;let e=J.value?.at(-1),t=e?.value,r=n({p:Y.value>0?`+`:``,v:Y.value,s:`%`,r:k.value.rounding}),i=t==null?`not available`:re(O.value.formatter,t,n({p:O.value.prefix,v:t,s:O.value.suffix,r:O.value.rounding}),{datapoint:e});return`Progression ${X.value===`positive`?`up ${r}`:X.value===`negative`?`down ${r}`:`stable at ${r}`}. Last value ${i}.`}),Qe=l(()=>`sparktrend-a11y-${E.value}`);return(e,t)=>(f(),d(`div`,{ref_key:`sparkTrendChart`,ref:b,class:`vue-data-ui-component vue-ui-spark-trend`,id:E.value,style:Se(`width:100%;font-family:${M.value.fontFamily};background:${M.value.backgroundColor}`),role:`img`,"aria-describedby":Qe.value},[ve(`p`,{id:Qe.value,class:`sr-only`,"aria-live":`polite`},h(Ze.value),9,De),(f(),d(`svg`,{key:We.value,ref_key:`svgRef`,ref:Ve,xmlns:g(ae),viewBox:`0 0 ${W.value.width} ${W.value.height}`,style:`width:100%;background:transparent;overflow:visible`,"aria-hidden":`true`},[ye(g(c)),e.$slots[`chart-background`]?(f(),d(`foreignObject`,{key:0,x:0,y:0,width:W.value.width<=0?10:W.value.width,height:W.value.height<=0?10:W.value.height,style:{pointerEvents:`none`}},[m(e.$slots,`chart-background`,{},void 0,!0)],8,ke)):u(``,!0),ve(`defs`,null,[ye(pe,{t:`linear`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,id:`pill_gradient_${E.value}`,stops:[[`0%`,g(r)(A.value.useColorTrend?Z.value:A.value.stroke,j.value.opacity),1],[`100%`,M.value.backgroundColor,1]]},null,8,[`id`,`stops`])]),j.value.show&&J.value[0]?(f(),d(`g`,Ae,[A.value.smooth?(f(),d(`path`,{key:0,d:`M ${J.value[0].x},${G.value.bottom} ${g(a)(J.value)} L ${J.value.at(-1).x},${G.value.bottom} Z`,fill:j.value.useGradient?`url(#pill_gradient_${E.value})`:g(r)(A.value.useColorTrend?Z.value:A.value.stroke,j.value.opacity),stroke:`none`},null,8,je)):(f(),d(`path`,{key:1,d:`M${Je.value}Z`,fill:j.value.useGradient?`url(#pill_gradient_${E.value})`:g(r)(A.value.useColorTrend?Z.value:A.value.stroke,j.value.opacity),stroke:`none`},null,8,Me))])):u(``,!0),A.value.smooth&&J.value.length?(f(),d(`path`,{key:2,d:`M ${g(a)(J.value)}`,stroke:A.value.useColorTrend?Z.value:A.value.stroke,fill:`none`,"stroke-width":A.value.strokeWidth,"stroke-linecap":A.value.strokeLinecap,"stroke-linejoin":A.value.strokeLinejoin},null,8,Ne)):u(``,!0),!A.value.smooth&&J.value.length?(f(),d(`path`,{key:3,d:Ye.value,stroke:A.value.useColorTrend?Z.value:A.value.stroke,fill:`none`,"stroke-width":A.value.strokeWidth,"stroke-linecap":A.value.strokeLinecap,"stroke-linejoin":A.value.strokeLinejoin},null,8,Pe)):u(``,!0),g(N)?(f(),d(`path`,{key:4,fill:`#6A6A6A`,d:`M ${G.value.left/2+6}, ${Q.value+7} ${G.value.left/2-7}, ${Q.value} ${G.value.left/2-7}, ${Q.value+14} Z`},null,8,Fe)):(f(),d(`path`,{key:5,fill:Z.value,d:X.value===`positive`?`M ${G.value.left/2}, ${Q.value} ${G.value.left/2-7}, ${Q.value+12} ${G.value.left/2+7}, ${Q.value+12} Z`:X.value===`negative`?`M ${G.value.left/2}, ${Q.value+12} ${G.value.left/2-7}, ${Q.value} ${G.value.left/2+7}, ${Q.value} Z`:`M ${G.value.left/2+6}, ${Q.value+7} ${G.value.left/2-7}, ${Q.value} ${G.value.left/2-7}, ${Q.value+14} Z`},null,8,Ie)),g(N)?(f(),d(`rect`,{key:6,x:G.value.left/2-k.value.fontSize-2,y:U.value/2+k.value.fontSize-2,width:k.value.fontSize*2,height:k.value.fontSize,fill:`#6A6A6A80`,rx:`3`},null,8,Le)):u(``,!0),!w.value&&!g(N)?(f(),d(`text`,{key:7,class:`vue-ui-sparktrend-progress-label`,x:G.value.left/2,y:U.value/2+k.value.fontSize*2,"text-anchor":`middle`,fill:k.value.useColorTrend?Z.value:k.value.color,"font-size":k.value.fontSize,"font-weight":k.value.bold?`bold`:`normal`},h(g(n)({p:Y.value>0?`+`:``,v:Y.value,s:`%`,r:k.value.rounding})),9,Re)):u(``,!0),J.value.length&&J.value.at(-1).x!==void 0?(f(),d(`circle`,{key:8,stroke:M.value.backgroundColor,"stroke-width":2,cx:J.value.at(-1).x,cy:J.value.at(-1).y,r:4,fill:g(N)?`#6A6A6A`:Z.value},null,8,ze)):u(``,!0),J.value.length&&J.value.at(-1).x!==void 0&&O.value.show?(f(),d(`text`,{key:9,"text-anchor":`middle`,x:J.value.at(-1).x,y:J.value.at(-1).y-O.value.fontSize/1.5,"font-size":O.value.fontSize,fill:O.value.useColorTrend?Z.value:O.value.color,"font-weight":O.value.bold?`bold`:`normal`},h(g(re)(O.value.formatter,J.value.at(-1).value,g(n)({p:O.value.prefix,v:J.value.at(-1).value,s:O.value.suffix,r:O.value.rounding}),{datapoint:J.value.at(-1)})),9,Be)):u(``,!0)],8,Oe)),e.$slots.source?(f(),d(`div`,{key:0,ref_key:`source`,ref:x,dir:`auto`},[m(e.$slots,`source`,{},void 0,!0)],512)):u(``,!0),m(e.$slots,`skeleton`,{},()=>[g(N)?(f(),_e(se,{key:0})):u(``,!0)],!0)],12,Ee))}},[[`__scopeId`,`data-v-814f1b0f`]]);export{Te as n,v as t};
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Ht as r,Jt as i,S as a,X as ee,Yt as te,at as o,i as s,in as c,t as ne,w as re,yt as ie,zt as ae}from"./lib-rPeBMZrn.js";import{n as oe,t as se}from"./BaseScanner-8NdoBs7B.js";import{n as ce,t as le}from"./useHints-BH9r_0Vd.js";import{n as ue}from"./resolveChartConfig-CIhClE5R.js";import{t as de}from"./DefGrad-DKMq1REY.js";import{t as l}from"./usePrefersMotion-XLHwega2.js";import{t as u}from"./vue_ui_sparkbar-Bpx7QrFq.js";import{Fragment as d,computed as f,createBlock as fe,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createVNode as g,defineAsyncComponent as pe,guardReactiveProps as me,mergeProps as he,nextTick as ge,normalizeProps as _e,normalizeStyle as _,onMounted as v,openBlock as y,ref as b,renderList as ve,renderSlot as x,toDisplayString as S,toRefs as ye,unref as C,useSlots as w,watch as T}from"vue";var E=/* @__PURE__ */ e({default:()=>P}),D=[`onClick`,`onMouseenter`,`onMouseleave`],O={key:1,class:`vue-ui-sparkbar-datapoint-value`},k=[`xmlns`,`viewBox`],A=[`height`,`width`,`fill`,`rx`],j=[`height`,`width`,`fill`,`rx`],M=[`height`,`width`,`fill`,`rx`],N={key:2,ref:`source`,dir:`auto`},P={__name:`vue-ui-sparkbar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},backgroundOpacity:{type:Number,default:null}},emits:[`selectDatapoint`],setup(e,{emit:E}){let P=pe(()=>import(`./PackageVersion-BIhjLNBU.js`).then(e=>e.t)),{vue_ui_sparkbar:be}=t(),F=l(),I=e,xe=w(),L=b(ee()),R=b(G()),z=f(()=>R.value.style.bar),B=f(()=>R.value.style.labels),V=f(()=>R.value.style),H=f(()=>R.value.debug);v(()=>{xe[`chart-background`]&&H.value&&console.warn(`VueUiSparkbar does not support the #chart-background slot.`)}),ce({config:()=>R.value,dataset:()=>I.dataset,component:`VueUiSparkbar`,rules:[le.noHint]});let Se=f(()=>c({defaultConfig:{style:{backgroundColor:`#99999930`,animation:{show:!1},layout:{independant:!0},gutter:{backgroundColor:`#6A6A6A`,opacity:50},bar:{gradient:{underlayerColor:`#6A6A6A`}}}},userConfig:R.value.skeletonConfig??{}})),{loading:U,FINAL_DATASET:W,manualLoading:Ce}=oe({...ye(I),FINAL_CONFIG:R,prepareConfig:G,skeletonDataset:I.config?.skeletonDataset??[{name:`_`,value:21,target:25,color:`#808080`},{name:`_`,value:13,target:25,color:`#ADADAD`},{name:`_`,value:8,target:25,color:`#DBDBDB`}],skeletonConfig:c({defaultConfig:R.value,userConfig:Se.value})});function G(){return ue(I.config,be,u)}T(()=>I.config,e=>{R.value=G()},{deep:!0});let we=f(()=>re(R.value.customPalette)),K=b(W.value.map(e=>({...e,value:V.value.animation.show?0:e.value||0,formatter:e.formatter||null}))),q=b(null);v(async()=>{ae(I.dataset)&&o({componentName:`VueUiSparkbar`,type:`dataset`,debug:H.value}),J()});function J(){if(V.value.animation.show&&!F.value){let e=V.value.animation.animationFrames,t=W.value.map((t,n)=>t.value/e),n=W.value.map(e=>e.value||0).reduce((e,t)=>e+t,0),r=0;function i(){r+=n/e,r<n?(K.value=K.value.map((e,n)=>({...e,value:e.value+=t[n]})),q.value=requestAnimationFrame(i)):K.value=W.value.map(e=>({...e,value:e.value||0,formatter:e.formatter||null}))}i()}}T(()=>W.value,async e=>{cancelAnimationFrame(q.value),K.value=W.value.map(e=>({...e,value:V.value.animation.show&&!F.value?0:e.value||0,formatter:e.formatter||null})),ge(J)},{deep:!0});let Y=b({width:500,height:16}),Te=f(()=>Math.max(...W.value.map(e=>e.value))),Ee=f(()=>(H.value&&W.value.forEach((e,t)=>{ie({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{o({componentName:`VueUiSparkbar`,type:`datasetSerieAttribute`,property:e,index:t})})}),K.value.map((e,t)=>({...e,value:e.value||0,color:a(e.color)||we.value[t]||r[t]||r[t%r.length]}))));function X(e){return e/Te.value}function Z(e){return V.value.layout.independant?e.target?e.value/e.target:V.value.layout.percentage?e.value>100?1:e.value/100:V.value.layout.target===0?1:e.value/V.value.layout.target:X(e.value)}function Q(e){return V.value.layout.independant&&e.target||V.value.layout.target}let De=E;function Oe(e,t){De(`selectDatapoint`,{datapoint:e,index:t}),R.value.events.datapointClick&&R.value.events.datapointClick({datapoint:e,seriesIndex:t})}function ke(e,t){R.value.events.datapointEnter&&R.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function Ae(e,t){R.value.events.datapointLeave&&R.value.events.datapointLeave({datapoint:e,seriesIndex:t})}let $=f(()=>z.value.borderRadius==null?Y.value.height/2:Math.min(Y.value.height/2,z.value.borderRadius));return(e,t)=>(y(),m(`div`,{class:`vue-data-ui-component vue-ui-sparkbar`,style:_({width:`100%`,position:`relative`,fontFamily:V.value.fontFamily,background:I.backgroundOpacity===null?V.value.backgroundColor:C(i)(V.value.backgroundColor,I.backgroundOpacity)})},[e.$slots.title?x(e.$slots,`title`,_e(me({title:{...e.title,title:V.value.title.text,subtitle:V.value.title.subtitle.text}})),void 0,void 0,0):p(``,!0),!e.$slots.title&&V.value.title.text?(y(),m(`div`,{key:1,class:`vue-ui-sparkbar-title-container`,style:_({background:V.value.title.backgroundColor,margin:V.value.title.margin,textAlign:V.value.title.textAlign})},[h(`div`,{class:`vue-ui-sparkbar-title`,style:_({fontSize:V.value.title.fontSize+`px`,color:V.value.title.color,fontWeight:V.value.title.bold?`bold`:`normal`})},S(V.value.title.text),5),V.value.title.subtitle.text?(y(),m(`div`,{key:0,class:`vue-ui-sparkbar-subtitle`,style:_({fontSize:V.value.title.subtitle.fontSize+`px`,color:V.value.title.subtitle.color,fontWeight:V.value.title.subtitle.bold?`bold`:`normal`})},S(V.value.title.subtitle.text),5)):p(``,!0)],4)):p(``,!0),(y(!0),m(d,null,ve(Ee.value,(t,r)=>(y(),m(`div`,{style:_(`display:flex !important;${[`left`,`right`].includes(B.value.name.position)?`flex-direction: ${B.value.name.position===`right`?`row-reverse`:`row`} !important`:`flex-direction:column !important`};gap:${V.value.gap}px !important;align-items:center;${C(W).length>0&&r!==C(W).length-1?`margin-bottom:6px`:``}`),onClick:e=>Oe(t,r),onMouseenter:e=>ke(t,r),onMouseleave:e=>Ae(t,r)},[C(U)?p(``,!0):x(e.$slots,`data-label`,he({ref_for:!0},{bar:{...t,target:Q(t),valueLabel:C(s)(t.formatter,t.value,C(n)({p:t.prefix||``,v:t.value,s:t.suffix||``,r:t.rounding||0}),{datapoint:t,seriesIndex:r}),targetLabel:C(s)(t.formatter,Q(t),C(n)({p:t.prefix||``,v:Q(t),s:t.suffix||``,r:t.rounding||0}),{datapoint:t,seriesIndex:r})}}),void 0,void 0,0),!e.$slots[`data-label`]||C(U)?(y(),m(`div`,{key:1,style:_({display:`flex`,justifyContent:[`right`,`top-right`].includes(B.value.name.position)?`flex-end`:[`top-center`].includes(B.value.name.position)?`center`:`flex-start`,alignItems:`center`,width:B.value.name.width,color:B.value.name.color,fontSize:B.value.fontSize+`px`,fontWeight:B.value.name.bold?`bold`:`normal`,flexWrap:`wrap`})},[C(U)?(y(),m(`div`,{key:0,class:`vue-ui-sparkbar-skeleton-name`,style:_({width:`60px`,height:B.value.fontSize+`px`,borderRadius:B.value.fontSize/4+`px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginTop:`5px`})},[h(`div`,{style:_({height:`100%`,width:`40px`,borderRadius:B.value.fontSize/4+`px`,backgroundColor:`#6A6A6A80`})},null,4),h(`div`,{style:_({height:`100%`,width:`15px`,borderRadius:B.value.fontSize/4+`px`,backgroundColor:`#6A6A6A80`})},null,4)],4)):(y(),m(d,{key:1},[h(`span`,null,S(t.name),1),B.value.value.show?(y(),m(`span`,{key:0,style:_(`font-weight:${B.value.value.bold?`bold`:`normal`}`),class:`vue-ui-sparkbar-datapoint-name`},`: `+S(C(s)(t.formatter,t.value,C(n)({p:t.prefix||``,v:t.value,s:t.suffix||``,r:t.rounding||0}),{datapoint:t,seriesIndex:r})),5)):p(``,!0),V.value.layout.showTargetValue?(y(),m(`span`,O,S(` `+V.value.layout.targetValueText)+` `+S(C(s)(t.formatter,Q(t),C(n)({p:t.prefix||``,v:Q(t),s:t.suffix||``,r:t.rounding||0}),{datapoint:t,seriesIndex:r})),1)):p(``,!0)],64))],4)):p(``,!0),(y(),m(`svg`,{role:`img`,xmlns:C(ne),viewBox:`0 0 ${Y.value.width} ${Y.value.height}`,width:`100%`},[g(C(P)),h(`defs`,null,[g(de,{t:`linear`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,id:`sparkbar_gradient_${r}_${L.value}`,stops:[[`0%`,C(i)(C(te)(t.color,.03),100-z.value.gradient.intensity),1],[`100%`,t.color,1]]},null,8,[`id`,`stops`])]),h(`rect`,{height:Y.value.height,width:Y.value.width,x:0,y:0,fill:C(i)(V.value.gutter.backgroundColor,V.value.gutter.opacity),rx:$.value},null,8,A),h(`rect`,{height:Y.value.height,width:Y.value.width*Z(t),x:0,y:0,fill:z.value.gradient.underlayerColor,rx:$.value},null,8,j),h(`rect`,{height:Y.value.height,width:Y.value.width*Z(t),x:0,y:0,fill:z.value.gradient.show?`url(#sparkbar_gradient_${r}_${L.value})`:t.color,rx:$.value},null,8,M)],8,k))],44,D))),256)),e.$slots.source?(y(),m(`div`,N,[x(e.$slots,`source`)],512)):p(``,!0),C(U)?(y(),fe(se,{key:3})):p(``,!0)],4))}};export{E as n,P as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Ht as r,Jt as i,S as a,X as ee,Yt as te,at as o,i as s,in as c,t as ne,w as re,yt as ie,zt as ae}from"./lib-rPeBMZrn.js";import{n as oe,t as se}from"./BaseScanner-8NdoBs7B.js";import{n as ce,t as le}from"./useHints-C-TwxM0Y.js";import{n as ue}from"./resolveChartConfig-CIhClE5R.js";import{t as de}from"./DefGrad-DKMq1REY.js";import{t as l}from"./usePrefersMotion-XLHwega2.js";import{t as u}from"./vue_ui_sparkbar-Bpx7QrFq.js";import{Fragment as d,computed as f,createBlock as fe,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createVNode as g,defineAsyncComponent as pe,guardReactiveProps as me,mergeProps as he,nextTick as ge,normalizeProps as _e,normalizeStyle as _,onMounted as v,openBlock as y,ref as b,renderList as ve,renderSlot as x,toDisplayString as S,toRefs as ye,unref as C,useSlots as w,watch as T}from"vue";var E=/* @__PURE__ */ e({default:()=>P}),D=[`onClick`,`onMouseenter`,`onMouseleave`],O={key:1,class:`vue-ui-sparkbar-datapoint-value`},k=[`xmlns`,`viewBox`],A=[`height`,`width`,`fill`,`rx`],j=[`height`,`width`,`fill`,`rx`],M=[`height`,`width`,`fill`,`rx`],N={key:2,ref:`source`,dir:`auto`},P={__name:`vue-ui-sparkbar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},backgroundOpacity:{type:Number,default:null}},emits:[`selectDatapoint`],setup(e,{emit:E}){let P=pe(()=>import(`./PackageVersion-DhptF5oD.js`).then(e=>e.t)),{vue_ui_sparkbar:be}=t(),F=l(),I=e,xe=w(),L=b(ee()),R=b(G()),z=f(()=>R.value.style.bar),B=f(()=>R.value.style.labels),V=f(()=>R.value.style),H=f(()=>R.value.debug);v(()=>{xe[`chart-background`]&&H.value&&console.warn(`VueUiSparkbar does not support the #chart-background slot.`)}),ce({config:()=>R.value,dataset:()=>I.dataset,component:`VueUiSparkbar`,rules:[le.noHint]});let Se=f(()=>c({defaultConfig:{style:{backgroundColor:`#99999930`,animation:{show:!1},layout:{independant:!0},gutter:{backgroundColor:`#6A6A6A`,opacity:50},bar:{gradient:{underlayerColor:`#6A6A6A`}}}},userConfig:R.value.skeletonConfig??{}})),{loading:U,FINAL_DATASET:W,manualLoading:Ce}=oe({...ye(I),FINAL_CONFIG:R,prepareConfig:G,skeletonDataset:I.config?.skeletonDataset??[{name:`_`,value:21,target:25,color:`#808080`},{name:`_`,value:13,target:25,color:`#ADADAD`},{name:`_`,value:8,target:25,color:`#DBDBDB`}],skeletonConfig:c({defaultConfig:R.value,userConfig:Se.value})});function G(){return ue(I.config,be,u)}T(()=>I.config,e=>{R.value=G()},{deep:!0});let we=f(()=>re(R.value.customPalette)),K=b(W.value.map(e=>({...e,value:V.value.animation.show?0:e.value||0,formatter:e.formatter||null}))),q=b(null);v(async()=>{ae(I.dataset)&&o({componentName:`VueUiSparkbar`,type:`dataset`,debug:H.value}),J()});function J(){if(V.value.animation.show&&!F.value){let e=V.value.animation.animationFrames,t=W.value.map((t,n)=>t.value/e),n=W.value.map(e=>e.value||0).reduce((e,t)=>e+t,0),r=0;function i(){r+=n/e,r<n?(K.value=K.value.map((e,n)=>({...e,value:e.value+=t[n]})),q.value=requestAnimationFrame(i)):K.value=W.value.map(e=>({...e,value:e.value||0,formatter:e.formatter||null}))}i()}}T(()=>W.value,async e=>{cancelAnimationFrame(q.value),K.value=W.value.map(e=>({...e,value:V.value.animation.show&&!F.value?0:e.value||0,formatter:e.formatter||null})),ge(J)},{deep:!0});let Y=b({width:500,height:16}),Te=f(()=>Math.max(...W.value.map(e=>e.value))),Ee=f(()=>(H.value&&W.value.forEach((e,t)=>{ie({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{o({componentName:`VueUiSparkbar`,type:`datasetSerieAttribute`,property:e,index:t})})}),K.value.map((e,t)=>({...e,value:e.value||0,color:a(e.color)||we.value[t]||r[t]||r[t%r.length]}))));function X(e){return e/Te.value}function Z(e){return V.value.layout.independant?e.target?e.value/e.target:V.value.layout.percentage?e.value>100?1:e.value/100:V.value.layout.target===0?1:e.value/V.value.layout.target:X(e.value)}function Q(e){return V.value.layout.independant&&e.target||V.value.layout.target}let De=E;function Oe(e,t){De(`selectDatapoint`,{datapoint:e,index:t}),R.value.events.datapointClick&&R.value.events.datapointClick({datapoint:e,seriesIndex:t})}function ke(e,t){R.value.events.datapointEnter&&R.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function Ae(e,t){R.value.events.datapointLeave&&R.value.events.datapointLeave({datapoint:e,seriesIndex:t})}let $=f(()=>z.value.borderRadius==null?Y.value.height/2:Math.min(Y.value.height/2,z.value.borderRadius));return(e,t)=>(y(),m(`div`,{class:`vue-data-ui-component vue-ui-sparkbar`,style:_({width:`100%`,position:`relative`,fontFamily:V.value.fontFamily,background:I.backgroundOpacity===null?V.value.backgroundColor:C(i)(V.value.backgroundColor,I.backgroundOpacity)})},[e.$slots.title?x(e.$slots,`title`,_e(me({title:{...e.title,title:V.value.title.text,subtitle:V.value.title.subtitle.text}})),void 0,void 0,0):p(``,!0),!e.$slots.title&&V.value.title.text?(y(),m(`div`,{key:1,class:`vue-ui-sparkbar-title-container`,style:_({background:V.value.title.backgroundColor,margin:V.value.title.margin,textAlign:V.value.title.textAlign})},[h(`div`,{class:`vue-ui-sparkbar-title`,style:_({fontSize:V.value.title.fontSize+`px`,color:V.value.title.color,fontWeight:V.value.title.bold?`bold`:`normal`})},S(V.value.title.text),5),V.value.title.subtitle.text?(y(),m(`div`,{key:0,class:`vue-ui-sparkbar-subtitle`,style:_({fontSize:V.value.title.subtitle.fontSize+`px`,color:V.value.title.subtitle.color,fontWeight:V.value.title.subtitle.bold?`bold`:`normal`})},S(V.value.title.subtitle.text),5)):p(``,!0)],4)):p(``,!0),(y(!0),m(d,null,ve(Ee.value,(t,r)=>(y(),m(`div`,{style:_(`display:flex !important;${[`left`,`right`].includes(B.value.name.position)?`flex-direction: ${B.value.name.position===`right`?`row-reverse`:`row`} !important`:`flex-direction:column !important`};gap:${V.value.gap}px !important;align-items:center;${C(W).length>0&&r!==C(W).length-1?`margin-bottom:6px`:``}`),onClick:e=>Oe(t,r),onMouseenter:e=>ke(t,r),onMouseleave:e=>Ae(t,r)},[C(U)?p(``,!0):x(e.$slots,`data-label`,he({ref_for:!0},{bar:{...t,target:Q(t),valueLabel:C(s)(t.formatter,t.value,C(n)({p:t.prefix||``,v:t.value,s:t.suffix||``,r:t.rounding||0}),{datapoint:t,seriesIndex:r}),targetLabel:C(s)(t.formatter,Q(t),C(n)({p:t.prefix||``,v:Q(t),s:t.suffix||``,r:t.rounding||0}),{datapoint:t,seriesIndex:r})}}),void 0,void 0,0),!e.$slots[`data-label`]||C(U)?(y(),m(`div`,{key:1,style:_({display:`flex`,justifyContent:[`right`,`top-right`].includes(B.value.name.position)?`flex-end`:[`top-center`].includes(B.value.name.position)?`center`:`flex-start`,alignItems:`center`,width:B.value.name.width,color:B.value.name.color,fontSize:B.value.fontSize+`px`,fontWeight:B.value.name.bold?`bold`:`normal`,flexWrap:`wrap`})},[C(U)?(y(),m(`div`,{key:0,class:`vue-ui-sparkbar-skeleton-name`,style:_({width:`60px`,height:B.value.fontSize+`px`,borderRadius:B.value.fontSize/4+`px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginTop:`5px`})},[h(`div`,{style:_({height:`100%`,width:`40px`,borderRadius:B.value.fontSize/4+`px`,backgroundColor:`#6A6A6A80`})},null,4),h(`div`,{style:_({height:`100%`,width:`15px`,borderRadius:B.value.fontSize/4+`px`,backgroundColor:`#6A6A6A80`})},null,4)],4)):(y(),m(d,{key:1},[h(`span`,null,S(t.name),1),B.value.value.show?(y(),m(`span`,{key:0,style:_(`font-weight:${B.value.value.bold?`bold`:`normal`}`),class:`vue-ui-sparkbar-datapoint-name`},`: `+S(C(s)(t.formatter,t.value,C(n)({p:t.prefix||``,v:t.value,s:t.suffix||``,r:t.rounding||0}),{datapoint:t,seriesIndex:r})),5)):p(``,!0),V.value.layout.showTargetValue?(y(),m(`span`,O,S(` `+V.value.layout.targetValueText)+` `+S(C(s)(t.formatter,Q(t),C(n)({p:t.prefix||``,v:Q(t),s:t.suffix||``,r:t.rounding||0}),{datapoint:t,seriesIndex:r})),1)):p(``,!0)],64))],4)):p(``,!0),(y(),m(`svg`,{role:`img`,xmlns:C(ne),viewBox:`0 0 ${Y.value.width} ${Y.value.height}`,width:`100%`},[g(C(P)),h(`defs`,null,[g(de,{t:`linear`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,id:`sparkbar_gradient_${r}_${L.value}`,stops:[[`0%`,C(i)(C(te)(t.color,.03),100-z.value.gradient.intensity),1],[`100%`,t.color,1]]},null,8,[`id`,`stops`])]),h(`rect`,{height:Y.value.height,width:Y.value.width,x:0,y:0,fill:C(i)(V.value.gutter.backgroundColor,V.value.gutter.opacity),rx:$.value},null,8,A),h(`rect`,{height:Y.value.height,width:Y.value.width*Z(t),x:0,y:0,fill:z.value.gradient.underlayerColor,rx:$.value},null,8,j),h(`rect`,{height:Y.value.height,width:Y.value.width*Z(t),x:0,y:0,fill:z.value.gradient.show?`url(#sparkbar_gradient_${r}_${L.value})`:t.color,rx:$.value},null,8,M)],8,k))],44,D))),256)),e.$slots.source?(y(),m(`div`,N,[x(e.$slots,`source`)],512)):p(``,!0),C(U)?(y(),fe(se,{key:3})):p(``,!0)],4))}};export{E as n,P as t};