vue-data-ui 2.5.6 → 2.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/dist/{Arrow-D0mlKPSd.js → Arrow-5QI0f9hp.js} +1 -1
  2. package/dist/{Arrow-DsebY7M5.cjs → Arrow-BQy5IqAX.cjs} +1 -1
  3. package/dist/{BaseIcon-C_HpYm7J.js → BaseIcon-BXpK120h.js} +1 -1
  4. package/dist/{BaseIcon-C8K0PDCr.cjs → BaseIcon-Dk8gByg1.cjs} +1 -1
  5. package/dist/{DataTable-C6-IwvDN.js → DataTable-CpOh1tx3.js} +2 -2
  6. package/dist/{DataTable-CvEk_3ue.cjs → DataTable-D93-QmC8.cjs} +1 -1
  7. package/dist/{Legend-_VSW3gtH.cjs → Legend-Dh9aF6uH.cjs} +1 -1
  8. package/dist/{Legend-BMQRE4wt.js → Legend-DqRstaxU.js} +2 -2
  9. package/dist/{PackageVersion-D3FEDqJ4.cjs → PackageVersion-CdmZAhdE.cjs} +1 -1
  10. package/dist/{PackageVersion-CT0EYzFv.js → PackageVersion-iscNRe7N.js} +1 -1
  11. package/dist/{PenAndPaper-DhMT8zUE.js → PenAndPaper-B-VQ8eSo.js} +3 -3
  12. package/dist/{PenAndPaper-0PiYibYi.cjs → PenAndPaper-BsncKiRE.cjs} +1 -1
  13. package/dist/{Shape-DUv8_NIN.js → Shape-CB0mE9KP.js} +1 -1
  14. package/dist/{Shape-Cilordd5.cjs → Shape-DZRynz5E.cjs} +1 -1
  15. package/dist/{Slicer-CS9co0ra.cjs → Slicer-Cm0a7Otv.cjs} +1 -1
  16. package/dist/{Slicer-CT-dGY0K.js → Slicer-DiUftIFQ.js} +2 -2
  17. package/dist/{Title-BH26TG78.js → Title-CiQQgFbV.js} +1 -1
  18. package/dist/{Title-BX4Wt59j.cjs → Title-DFq_8HYJ.cjs} +1 -1
  19. package/dist/{Tooltip-vdsIKE2_.js → Tooltip-ZYQUXVWv.js} +1 -1
  20. package/dist/{Tooltip-BRF0SCJo.cjs → Tooltip-pcZXVRMj.cjs} +1 -1
  21. package/dist/index-C_VTEz1N.cjs +9 -0
  22. package/dist/{index-BpkxOytt.js → index-DiqenHrX.js} +3 -1
  23. package/dist/style.css +1 -1
  24. package/dist/types/vue-data-ui.d.cts +2 -0
  25. package/dist/types/vue-data-ui.d.ts +2 -0
  26. package/dist/{useNestedProp-XW-Jo5ax.js → useNestedProp-B3CQkP95.js} +1 -1
  27. package/dist/{useNestedProp-C5bsAL3S.cjs → useNestedProp-C7bLHE7v.cjs} +1 -1
  28. package/dist/{usePrinter-Cbh3Ya4M.js → usePrinter-CHAgX1f-.js} +1 -1
  29. package/dist/{usePrinter-DOZ7DmEX.cjs → usePrinter-DWCqeYW6.cjs} +1 -1
  30. package/dist/{vue-data-ui-CwBKTkGS.js → vue-data-ui-BAAnNikX.js} +61 -61
  31. package/dist/{vue-data-ui-Dbznz6XK.cjs → vue-data-ui-VikO3yRe.cjs} +1 -1
  32. package/dist/vue-data-ui.cjs +1 -1
  33. package/dist/vue-data-ui.js +1 -1
  34. package/dist/{vue-ui-3d-bar-DC0EeOla.cjs → vue-ui-3d-bar-BR-ihA3S.cjs} +1 -1
  35. package/dist/{vue-ui-3d-bar-B0smLY_E.js → vue-ui-3d-bar-C4OjP6pi.js} +9 -9
  36. package/dist/{vue-ui-accordion-BFGSPdZa.cjs → vue-ui-accordion-CtBhoUw4.cjs} +1 -1
  37. package/dist/{vue-ui-accordion-DSCrwQ1c.js → vue-ui-accordion-DA6XnWaz.js} +3 -3
  38. package/dist/{vue-ui-age-pyramid-Cshs8aQx.js → vue-ui-age-pyramid-2AgqaHOS.js} +10 -10
  39. package/dist/{vue-ui-age-pyramid-Ddrrqt6J.cjs → vue-ui-age-pyramid-E0fCV03f.cjs} +1 -1
  40. package/dist/{vue-ui-annotator-axaLgcSw.js → vue-ui-annotator-CdLA2R6h.js} +1 -1
  41. package/dist/{vue-ui-annotator-CZavUoIP.cjs → vue-ui-annotator-UcABxDAz.cjs} +1 -1
  42. package/dist/{vue-ui-bullet-BZ5bRAeI.js → vue-ui-bullet-AFqmPWo3.js} +8 -8
  43. package/dist/{vue-ui-bullet-ChqQFfgl.cjs → vue-ui-bullet-C4wEiJn8.cjs} +1 -1
  44. package/dist/{vue-ui-candlestick-DnyNK5cD.cjs → vue-ui-candlestick-BkQsD1Yi.cjs} +1 -1
  45. package/dist/{vue-ui-candlestick-Bgh8xG_8.js → vue-ui-candlestick-Bs0DE1Xi.js} +11 -11
  46. package/dist/{vue-ui-carousel-table-C5VY-kzI.cjs → vue-ui-carousel-table-KX-cLx3F.cjs} +1 -1
  47. package/dist/{vue-ui-carousel-table-CesPP16e.js → vue-ui-carousel-table-NYlYQbo9.js} +4 -4
  48. package/dist/{vue-ui-chestnut-CCYod_9i.js → vue-ui-chestnut-BAJjfgKR.js} +8 -8
  49. package/dist/{vue-ui-chestnut-Lcrru7aA.cjs → vue-ui-chestnut-BzHRBq_Z.cjs} +1 -1
  50. package/dist/{vue-ui-circle-pack-BCk8TBYV.js → vue-ui-circle-pack-BoolEIij.js} +126 -120
  51. package/dist/vue-ui-circle-pack-BrmdreXG.cjs +1 -0
  52. package/dist/{vue-ui-cursor-71zF-JDU.cjs → vue-ui-cursor-BjQLjw1a.cjs} +1 -1
  53. package/dist/{vue-ui-cursor-DBtL_mGd.js → vue-ui-cursor-ut60ihG1.js} +2 -2
  54. package/dist/{vue-ui-dashboard-CjUkRkFX.cjs → vue-ui-dashboard-BXVdZdEF.cjs} +1 -1
  55. package/dist/{vue-ui-dashboard-C4naVahi.js → vue-ui-dashboard-FQxiN7Jj.js} +2 -2
  56. package/dist/{vue-ui-digits-DsjcFYeL.js → vue-ui-digits-Rb48H8et.js} +2 -2
  57. package/dist/{vue-ui-digits-DJ053E_1.cjs → vue-ui-digits-j2WKJUNf.cjs} +1 -1
  58. package/dist/{vue-ui-donut-CgK9ni10.cjs → vue-ui-donut-CbFW--I1.cjs} +1 -1
  59. package/dist/{vue-ui-donut-WZ50Vvo0.js → vue-ui-donut-DUKnsxUu.js} +12 -12
  60. package/dist/{vue-ui-donut-evolution-DWmEdszT.cjs → vue-ui-donut-evolution-9mJgbwpR.cjs} +1 -1
  61. package/dist/{vue-ui-donut-evolution-CNLISKb_.js → vue-ui-donut-evolution-n-ue754h.js} +11 -11
  62. package/dist/{vue-ui-dumbbell-Di6hNJyp.js → vue-ui-dumbbell-C4r0NeY_.js} +10 -10
  63. package/dist/{vue-ui-dumbbell-CNk9SRIK.cjs → vue-ui-dumbbell-sXSCnY75.cjs} +1 -1
  64. package/dist/{vue-ui-flow-BVRCJKqg.cjs → vue-ui-flow-C8-oqGo7.cjs} +1 -1
  65. package/dist/{vue-ui-flow-wzudVfwo.js → vue-ui-flow-CuZbUegy.js} +9 -9
  66. package/dist/{vue-ui-funnel-BkQ729Lk.cjs → vue-ui-funnel-Cb0LSIxk.cjs} +1 -1
  67. package/dist/{vue-ui-funnel-DDgrNiIx.js → vue-ui-funnel-D9whnJ6X.js} +9 -9
  68. package/dist/{vue-ui-galaxy-DDR33VLd.js → vue-ui-galaxy-CRECMRY6.js} +11 -11
  69. package/dist/{vue-ui-galaxy-CCxgO-Ut.cjs → vue-ui-galaxy-DUHSlUJQ.cjs} +1 -1
  70. package/dist/{vue-ui-gauge-BmYimTMu.js → vue-ui-gauge-BEhMYmCg.js} +7 -7
  71. package/dist/{vue-ui-gauge-6nNhmzjK.cjs → vue-ui-gauge-BfmvvI7e.cjs} +1 -1
  72. package/dist/{vue-ui-gizmo-BEDeV0ju.cjs → vue-ui-gizmo-BkZTXg7I.cjs} +1 -1
  73. package/dist/{vue-ui-gizmo-D7n0y9Xb.js → vue-ui-gizmo-DtXR6xgr.js} +3 -3
  74. package/dist/{vue-ui-heatmap-BRouZjc0.cjs → vue-ui-heatmap-B1XZnqbm.cjs} +1 -1
  75. package/dist/{vue-ui-heatmap-DcvyIipN.js → vue-ui-heatmap-BlBHNDJV.js} +10 -10
  76. package/dist/{vue-ui-history-plot-CdsNfUw3.js → vue-ui-history-plot-BmzpDPL6.js} +11 -11
  77. package/dist/{vue-ui-history-plot-OAR3Zmfr.cjs → vue-ui-history-plot-DqM3d3p7.cjs} +1 -1
  78. package/dist/{vue-ui-kpi-eAJqL_IN.cjs → vue-ui-kpi-D1i-2otW.cjs} +1 -1
  79. package/dist/{vue-ui-kpi-7w8bSN5A.js → vue-ui-kpi-XdIADLDq.js} +3 -3
  80. package/dist/{vue-ui-mini-loader-DgW6tqQq.js → vue-ui-mini-loader-BdDY5AwD.js} +2 -2
  81. package/dist/{vue-ui-mini-loader-Iil3HNis.cjs → vue-ui-mini-loader-DZgbFjuS.cjs} +1 -1
  82. package/dist/{vue-ui-molecule-Dbzc2SXh.js → vue-ui-molecule-DstYXfTV.js} +11 -11
  83. package/dist/{vue-ui-molecule-Cdoog-Pu.cjs → vue-ui-molecule-a0IHQMkN.cjs} +1 -1
  84. package/dist/{vue-ui-mood-radar-U7w0Tah2.cjs → vue-ui-mood-radar-BafPNccC.cjs} +1 -1
  85. package/dist/{vue-ui-mood-radar-BDHEAPC5.js → vue-ui-mood-radar-DjtnprtG.js} +11 -11
  86. package/dist/{vue-ui-nested-donuts-hCTBO5wt.cjs → vue-ui-nested-donuts-DC7oX5GH.cjs} +1 -1
  87. package/dist/{vue-ui-nested-donuts-BfFnlW9x.js → vue-ui-nested-donuts-XQ_auu4H.js} +11 -11
  88. package/dist/{vue-ui-onion-CuVCB7RM.cjs → vue-ui-onion-DEfVifyj.cjs} +1 -1
  89. package/dist/{vue-ui-onion-B1AiYUgS.js → vue-ui-onion-D_myFmJv.js} +11 -11
  90. package/dist/{vue-ui-parallel-coordinate-plot-CHSzunQI.cjs → vue-ui-parallel-coordinate-plot-Bv3lIZ0J.cjs} +1 -1
  91. package/dist/{vue-ui-parallel-coordinate-plot-Box7xMhZ.js → vue-ui-parallel-coordinate-plot-DQsyE4kf.js} +12 -12
  92. package/dist/{vue-ui-quadrant-DAWxPvEO.js → vue-ui-quadrant-DBvqgk3y.js} +12 -12
  93. package/dist/{vue-ui-quadrant-CWNw-UWV.cjs → vue-ui-quadrant-DXU4OdLD.cjs} +1 -1
  94. package/dist/{vue-ui-quick-chart-r3ohg6Cy.js → vue-ui-quick-chart-C-bsRZf1.js} +9 -9
  95. package/dist/{vue-ui-quick-chart-5OT4sNfY.cjs → vue-ui-quick-chart-Dl-94hQE.cjs} +1 -1
  96. package/dist/{vue-ui-radar-C1CdBUUI.js → vue-ui-radar-He8orFXJ.js} +12 -12
  97. package/dist/{vue-ui-radar-nniZ57pv.cjs → vue-ui-radar-QQ8vOOYq.cjs} +1 -1
  98. package/dist/{vue-ui-rating-B6KkUn_L.cjs → vue-ui-rating-6kyP3DDH.cjs} +1 -1
  99. package/dist/{vue-ui-rating-BOB44E6x.js → vue-ui-rating-qUauyHHk.js} +2 -2
  100. package/dist/{vue-ui-relation-circle-CGcO1q75.cjs → vue-ui-relation-circle-BO4wP-bR.cjs} +1 -1
  101. package/dist/{vue-ui-relation-circle-BHA9HuI0.js → vue-ui-relation-circle-DfVg4VBp.js} +7 -7
  102. package/dist/{vue-ui-rings-DnrxCB5o.cjs → vue-ui-rings-D_cVoXDa.cjs} +1 -1
  103. package/dist/{vue-ui-rings-BJPit1Ra.js → vue-ui-rings-DjoVPXun.js} +12 -12
  104. package/dist/{vue-ui-scatter-BZ027kSK.cjs → vue-ui-scatter-45hc4NIf.cjs} +1 -1
  105. package/dist/{vue-ui-scatter-DNB5bka2.js → vue-ui-scatter-DBcO00g4.js} +12 -12
  106. package/dist/{vue-ui-screenshot-CtUiJQiA.cjs → vue-ui-screenshot-lJJxoLDu.cjs} +1 -1
  107. package/dist/{vue-ui-screenshot-DymukoBK.js → vue-ui-screenshot-zc-jsepS.js} +1 -1
  108. package/dist/{vue-ui-skeleton-CwwH64lu.js → vue-ui-skeleton-BwWHgSoq.js} +3 -3
  109. package/dist/{vue-ui-skeleton-BVhUJapg.cjs → vue-ui-skeleton-D1bJntn7.cjs} +1 -1
  110. package/dist/{vue-ui-smiley-DAOVxquy.js → vue-ui-smiley-BVFxYYJl.js} +2 -2
  111. package/dist/{vue-ui-smiley-BgYL5aLw.cjs → vue-ui-smiley-CZPe292C.cjs} +1 -1
  112. package/dist/{vue-ui-spark-trend-Pj2sDKI5.js → vue-ui-spark-trend-8LZqy_wz.js} +5 -5
  113. package/dist/{vue-ui-spark-trend-D-UfGnMi.cjs → vue-ui-spark-trend-BJ3_K1DU.cjs} +1 -1
  114. package/dist/{vue-ui-sparkbar-D-odOB5o.cjs → vue-ui-sparkbar-B3idsjFj.cjs} +1 -1
  115. package/dist/{vue-ui-sparkbar-CouWvtoJ.js → vue-ui-sparkbar-C93PvNz6.js} +4 -4
  116. package/dist/{vue-ui-sparkgauge-Dp2myRtH.cjs → vue-ui-sparkgauge-66qZ-DgD.cjs} +1 -1
  117. package/dist/{vue-ui-sparkgauge-ntZ966hh.js → vue-ui-sparkgauge-B1uABI9w.js} +4 -4
  118. package/dist/{vue-ui-sparkhistogram-BBqNkAC9.cjs → vue-ui-sparkhistogram-D7ECtpUW.cjs} +1 -1
  119. package/dist/{vue-ui-sparkhistogram-CVcHSsRt.js → vue-ui-sparkhistogram-vAgBJK79.js} +5 -5
  120. package/dist/{vue-ui-sparkline-B4YkZ8aR.js → vue-ui-sparkline-B2JarTjo.js} +4 -4
  121. package/dist/{vue-ui-sparkline-D-jKCztU.cjs → vue-ui-sparkline-YOIgP_Dl.cjs} +1 -1
  122. package/dist/{vue-ui-sparkstackbar-SlfuB973.js → vue-ui-sparkstackbar-C2E7YRP0.js} +5 -5
  123. package/dist/{vue-ui-sparkstackbar-CgSpNVWV.cjs → vue-ui-sparkstackbar-DMClZgds.cjs} +1 -1
  124. package/dist/{vue-ui-stackbar-Do0cVXn_.cjs → vue-ui-stackbar-BP_qrJ-s.cjs} +1 -1
  125. package/dist/{vue-ui-stackbar-BNHmR_5M.js → vue-ui-stackbar-n27TJh0C.js} +13 -13
  126. package/dist/{vue-ui-strip-plot-DfvoiHgh.js → vue-ui-strip-plot-Bjy7C_Ry.js} +11 -11
  127. package/dist/{vue-ui-strip-plot-CUIM6p_e.cjs → vue-ui-strip-plot-DN7X6zBk.cjs} +1 -1
  128. package/dist/{vue-ui-table-IRFF_yye.cjs → vue-ui-table-6rqw4Gi-.cjs} +1 -1
  129. package/dist/{vue-ui-table-B1yvOggj.js → vue-ui-table-DnHvIIqi.js} +1 -1
  130. package/dist/{vue-ui-table-heatmap-BXY52SRf.cjs → vue-ui-table-heatmap-BQKXP9Na.cjs} +1 -1
  131. package/dist/{vue-ui-table-heatmap-GItg9-dC.js → vue-ui-table-heatmap-Dt8DAC4A.js} +4 -4
  132. package/dist/{vue-ui-table-sparkline-iGFAWMYo.js → vue-ui-table-sparkline-CLQJbHX8.js} +5 -5
  133. package/dist/{vue-ui-table-sparkline-BHfIm9UT.cjs → vue-ui-table-sparkline-DmNJFPHo.cjs} +1 -1
  134. package/dist/{vue-ui-thermometer-UICgp_zs.js → vue-ui-thermometer-BTmiPdUs.js} +7 -7
  135. package/dist/{vue-ui-thermometer-DvqP69hY.cjs → vue-ui-thermometer-DnVSE7_V.cjs} +1 -1
  136. package/dist/{vue-ui-timer-DJzscIpZ.cjs → vue-ui-timer-CINerMki.cjs} +1 -1
  137. package/dist/{vue-ui-timer-p0KgWSfy.js → vue-ui-timer-D6j-aYnJ.js} +5 -5
  138. package/dist/{vue-ui-tiremarks-DpXsBy1-.cjs → vue-ui-tiremarks-CRGMkwwv.cjs} +1 -1
  139. package/dist/{vue-ui-tiremarks-Bq6ciZp0.js → vue-ui-tiremarks-ztoJZwQn.js} +7 -7
  140. package/dist/{vue-ui-treemap-B9TKmG5Z.js → vue-ui-treemap-B0NYnKie.js} +11 -11
  141. package/dist/{vue-ui-treemap-BIXzY6rt.cjs → vue-ui-treemap-CbqRlXgA.cjs} +1 -1
  142. package/dist/{vue-ui-vertical-bar-p8nAYFrW.cjs → vue-ui-vertical-bar-Cosr8beH.cjs} +1 -1
  143. package/dist/{vue-ui-vertical-bar-CBsaQ0m4.js → vue-ui-vertical-bar-DzcpRwPF.js} +12 -12
  144. package/dist/{vue-ui-waffle-CecnWv5a.js → vue-ui-waffle-CE1MnOqa.js} +12 -12
  145. package/dist/{vue-ui-waffle-CMDTMHXM.cjs → vue-ui-waffle-DkVKQERp.cjs} +1 -1
  146. package/dist/{vue-ui-wheel-ChZI90Rv.cjs → vue-ui-wheel-CGYGLKyG.cjs} +1 -1
  147. package/dist/{vue-ui-wheel-BvML9VG5.js → vue-ui-wheel-DMS12xPv.js} +7 -7
  148. package/dist/{vue-ui-word-cloud-0Kj2o6G9.cjs → vue-ui-word-cloud-C1klEiea.cjs} +1 -1
  149. package/dist/{vue-ui-word-cloud-T_f0AHVo.js → vue-ui-word-cloud-D_CyZOE0.js} +10 -10
  150. package/dist/{vue-ui-xy-DYGyMln-.js → vue-ui-xy-GgA45y9X.js} +14 -14
  151. package/dist/{vue-ui-xy-wLaSuJNp.cjs → vue-ui-xy-Nj-5ko1z.cjs} +1 -1
  152. package/dist/{vue-ui-xy-canvas-D00_TYAC.js → vue-ui-xy-canvas-BRPQBL8l.js} +11 -11
  153. package/dist/{vue-ui-xy-canvas-BB8ojPuv.cjs → vue-ui-xy-canvas-CQt5pre_.cjs} +1 -1
  154. package/package.json +1 -1
  155. package/dist/index--Qj2S12-.cjs +0 -9
  156. package/dist/vue-ui-circle-pack-nfi25HeN.cjs +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index--Qj2S12-.cjs"),M=require("./useNestedProp-C5bsAL3S.cjs"),B=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),r=y=>(e.pushScopeId("data-v-69afe185"),y=y(),e.popScopeId(),y),C={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},R=["xmlns","stroke"],L={id:"vueUiSmiley0"},H=["stop-color"],X=["stop-color"],j=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),D=["fill"],U=["stroke"],G=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 10l.01 0" data-v-69afe185></path><path d="M15 10l.01 0" data-v-69afe185></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-69afe185></path>',5),A=[G],Y=["xmlns","viewBox","stroke"],K={id:"vueUiSmiley0"},I=["stop-color"],T=["stop-color"],F=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),O=["fill"],q=["viewBox","stroke"],P=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 10l.01 0" data-v-69afe185></path><path d="M15 10l.01 0" data-v-69afe185></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-69afe185></path>',5),J=[P],Q=["xmlns","stroke"],W={id:"vueUiSmiley1"},Z=["stop-color"],ee=["stop-color"],te=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),le=["fill"],oe=["xmlns","stroke"],ae=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 10l.01 0" data-v-69afe185></path><path d="M15 10l.01 0" data-v-69afe185></path><path d="M9 15l6 0" data-v-69afe185></path>',5),ne=[ae],se=["xmlns","viewBox","stroke"],ie={id:"vueUiSmiley1"},re=["stop-color"],de=["stop-color"],ue=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),ce=["fill"],pe=["viewBox","stroke"],ve=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 10l.01 0" data-v-69afe185></path><path d="M15 10l.01 0" data-v-69afe185></path><path d="M9 15l6 0" data-v-69afe185></path>',5),ye=[ve],fe=["xmlns","stroke"],me={id:"vueUiSmiley2"},he=["stop-color"],ke=["stop-color"],ge=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),xe=["fill"],_e=["xmlns","stroke"],Ne=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),be=r(()=>e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1)),Ve=r(()=>e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1)),ze=r(()=>e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)),Ee=[Ne,be,Ve,ze],Se=["xmlns","viewBox","stroke"],$e=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),we={id:"vueUiSmiley2"},Me=["stop-color"],Be=["stop-color"],Ce=["fill"],Re=["xmlns","viewBox","stroke"],Le=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),He=r(()=>e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1)),Xe=r(()=>e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1)),je=r(()=>e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)),De=[Le,He,Xe,je],Ue=["xmlns","stroke"],Ge={id:"vueUiSmiley3"},Ae=["stop-color"],Ye=["stop-color"],Ke=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Ie=["fill"],Te=["xmlns","stroke"],Fe=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 10l.01 0" data-v-69afe185></path><path d="M15 10l.01 0" data-v-69afe185></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-69afe185></path>',5),Oe=[Fe],qe=["xmlns","viewBox","stroke"],Pe=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Je={id:"vueUiSmiley3"},Qe=["stop-color"],We=["stop-color"],Ze=["fill"],et=["xmlns","viewBox","stroke"],tt=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 10l.01 0" data-v-69afe185></path><path d="M15 10l.01 0" data-v-69afe185></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-69afe185></path>',5),lt=[tt],ot=["xmlns","stroke"],at={id:"vueUiSmiley4"},nt=["stop-color"],st=["stop-color"],it=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),rt=["fill"],dt=["xmlns","stroke"],ut=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 9l.01 0" data-v-69afe185></path><path d="M15 9l.01 0" data-v-69afe185></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-69afe185></path>',5),ct=[ut],pt=["xmlns","viewBox","stroke"],vt=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),yt={id:"vueUiSmiley4"},ft=["stop-color"],mt=["stop-color"],ht=["fill"],kt=["xmlns","viewBox","stroke"],gt=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 9l.01 0" data-v-69afe185></path><path d="M15 9l.01 0" data-v-69afe185></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-69afe185></path>',5),xt=[gt],_t={__name:"vue-ui-smiley",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(y,{expose:_,emit:N}){const s=y,{vue_ui_smiley:b}=o.useConfig(),V=e.useSlots();e.onMounted(()=>{V["chart-background"]&&console.warn("VueUiSmiley does not support the #chart-background slot.")}),e.onMounted(()=>{m()});function m(){o.objectIsEmpty(s.dataset)&&o.error({componentName:"VueUiSmiley",type:"dataset"})}const h=e.ref(!1),i=e.ref(void 0),t=e.computed({get:()=>k(),set:n=>n});function k(){return M.useNestedProp({userConfig:s.config,defaultConfig:b})}e.watch(()=>s.config,n=>{t.value=k(),m()},{deep:!0});const z=e.computed(()=>typeof s.dataset.rating=="object"&&!Array.isArray(s.dataset.rating)?E(s.dataset.rating):s.dataset.rating||null),f=e.computed(()=>typeof s.dataset.rating=="object"&&!Array.isArray(s.dataset.rating)),d=e.ref(z.value),u=e.computed(()=>t.value.readonly);function E(n){if(n===null)return null;let l=0,a=0;for(const g in n){const w=parseInt(g),x=n[g];l+=w*x,a+=x}return a===0?0:l/a}function p(n){const l=d.value-n,a=24;switch(!0){case l<0:return 0;case l>1:return 1*a;default:return l*a}}function v(n){u.value||(d.value=n,N("rate",n))}function S(){return d.value}function $(n=!0){u.value=n}_({getData:S,toggleReadonly:$});function c(n){return t.value.readonly?t.value.style.colors.inactive[n]:d.value===n+1?t.value.style.icons.useGradient&&t.value.style.icons.filled?`url(#vueUiSmiley${n})`:t.value.style.colors.active[n]:i.value!==void 0&&i.value===n?t.value.style.icons.useGradient&&t.value.style.icons.filled?`url(#vueUiSmiley${n})`:t.value.style.colors.active[n]:t.value.style.colors.inactive[n]}return(n,l)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%;`),onMouseover:l[20]||(l[20]=a=>h.value=!0),onMouseleave:l[21]||(l[21]=a=>{h.value=!1,i.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,d.value,e.unref(o.dataLabel)({v:d.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-smiley-wrapper",style:e.normalizeStyle(`overflow:visible;height:${t.value.style.itemSize}px;width:fit-content;margin:0 auto;display:flex;align-items:center;justify-content:center;`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,d.value,e.unref(o.dataLabel)({v:d.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&d.value===1}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-C_VTEz1N.cjs"),M=require("./useNestedProp-C7bLHE7v.cjs"),B=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),r=y=>(e.pushScopeId("data-v-69afe185"),y=y(),e.popScopeId(),y),C={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},R=["xmlns","stroke"],L={id:"vueUiSmiley0"},H=["stop-color"],X=["stop-color"],j=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),D=["fill"],U=["stroke"],G=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 10l.01 0" data-v-69afe185></path><path d="M15 10l.01 0" data-v-69afe185></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-69afe185></path>',5),A=[G],Y=["xmlns","viewBox","stroke"],K={id:"vueUiSmiley0"},I=["stop-color"],T=["stop-color"],F=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),O=["fill"],q=["viewBox","stroke"],P=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 10l.01 0" data-v-69afe185></path><path d="M15 10l.01 0" data-v-69afe185></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-69afe185></path>',5),J=[P],Q=["xmlns","stroke"],W={id:"vueUiSmiley1"},Z=["stop-color"],ee=["stop-color"],te=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),le=["fill"],oe=["xmlns","stroke"],ae=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 10l.01 0" data-v-69afe185></path><path d="M15 10l.01 0" data-v-69afe185></path><path d="M9 15l6 0" data-v-69afe185></path>',5),ne=[ae],se=["xmlns","viewBox","stroke"],ie={id:"vueUiSmiley1"},re=["stop-color"],de=["stop-color"],ue=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),ce=["fill"],pe=["viewBox","stroke"],ve=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 10l.01 0" data-v-69afe185></path><path d="M15 10l.01 0" data-v-69afe185></path><path d="M9 15l6 0" data-v-69afe185></path>',5),ye=[ve],fe=["xmlns","stroke"],me={id:"vueUiSmiley2"},he=["stop-color"],ke=["stop-color"],ge=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),xe=["fill"],_e=["xmlns","stroke"],Ne=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),be=r(()=>e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1)),Ve=r(()=>e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1)),ze=r(()=>e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)),Ee=[Ne,be,Ve,ze],Se=["xmlns","viewBox","stroke"],$e=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),we={id:"vueUiSmiley2"},Me=["stop-color"],Be=["stop-color"],Ce=["fill"],Re=["xmlns","viewBox","stroke"],Le=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),He=r(()=>e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1)),Xe=r(()=>e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1)),je=r(()=>e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)),De=[Le,He,Xe,je],Ue=["xmlns","stroke"],Ge={id:"vueUiSmiley3"},Ae=["stop-color"],Ye=["stop-color"],Ke=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Ie=["fill"],Te=["xmlns","stroke"],Fe=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 10l.01 0" data-v-69afe185></path><path d="M15 10l.01 0" data-v-69afe185></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-69afe185></path>',5),Oe=[Fe],qe=["xmlns","viewBox","stroke"],Pe=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Je={id:"vueUiSmiley3"},Qe=["stop-color"],We=["stop-color"],Ze=["fill"],et=["xmlns","viewBox","stroke"],tt=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 10l.01 0" data-v-69afe185></path><path d="M15 10l.01 0" data-v-69afe185></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-69afe185></path>',5),lt=[tt],ot=["xmlns","stroke"],at={id:"vueUiSmiley4"},nt=["stop-color"],st=["stop-color"],it=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),rt=["fill"],dt=["xmlns","stroke"],ut=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 9l.01 0" data-v-69afe185></path><path d="M15 9l.01 0" data-v-69afe185></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-69afe185></path>',5),ct=[ut],pt=["xmlns","viewBox","stroke"],vt=r(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),yt={id:"vueUiSmiley4"},ft=["stop-color"],mt=["stop-color"],ht=["fill"],kt=["xmlns","viewBox","stroke"],gt=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-69afe185></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-69afe185></path><path d="M9 9l.01 0" data-v-69afe185></path><path d="M15 9l.01 0" data-v-69afe185></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-69afe185></path>',5),xt=[gt],_t={__name:"vue-ui-smiley",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(y,{expose:_,emit:N}){const s=y,{vue_ui_smiley:b}=o.useConfig(),V=e.useSlots();e.onMounted(()=>{V["chart-background"]&&console.warn("VueUiSmiley does not support the #chart-background slot.")}),e.onMounted(()=>{m()});function m(){o.objectIsEmpty(s.dataset)&&o.error({componentName:"VueUiSmiley",type:"dataset"})}const h=e.ref(!1),i=e.ref(void 0),t=e.computed({get:()=>k(),set:n=>n});function k(){return M.useNestedProp({userConfig:s.config,defaultConfig:b})}e.watch(()=>s.config,n=>{t.value=k(),m()},{deep:!0});const z=e.computed(()=>typeof s.dataset.rating=="object"&&!Array.isArray(s.dataset.rating)?E(s.dataset.rating):s.dataset.rating||null),f=e.computed(()=>typeof s.dataset.rating=="object"&&!Array.isArray(s.dataset.rating)),d=e.ref(z.value),u=e.computed(()=>t.value.readonly);function E(n){if(n===null)return null;let l=0,a=0;for(const g in n){const w=parseInt(g),x=n[g];l+=w*x,a+=x}return a===0?0:l/a}function p(n){const l=d.value-n,a=24;switch(!0){case l<0:return 0;case l>1:return 1*a;default:return l*a}}function v(n){u.value||(d.value=n,N("rate",n))}function S(){return d.value}function $(n=!0){u.value=n}_({getData:S,toggleReadonly:$});function c(n){return t.value.readonly?t.value.style.colors.inactive[n]:d.value===n+1?t.value.style.icons.useGradient&&t.value.style.icons.filled?`url(#vueUiSmiley${n})`:t.value.style.colors.active[n]:i.value!==void 0&&i.value===n?t.value.style.icons.useGradient&&t.value.style.icons.filled?`url(#vueUiSmiley${n})`:t.value.style.colors.active[n]:t.value.style.colors.inactive[n]}return(n,l)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%;`),onMouseover:l[20]||(l[20]=a=>h.value=!0),onMouseleave:l[21]||(l[21]=a=>{h.value=!1,i.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,d.value,e.unref(o.dataLabel)({v:d.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-smiley-wrapper",style:e.normalizeStyle(`overflow:visible;height:${t.value.style.itemSize}px;width:fit-content;margin:0 auto;display:flex;align-items:center;justify-content:center;`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,d.value,e.unref(o.dataLabel)({v:d.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&d.value===1}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;
2
2
  position:relative`),onMouseenter:l[0]||(l[0]=a=>i.value=0),onMouseleave:l[1]||(l[1]=a=>i.value=void 0),onClick:l[2]||(l[2]=a=>v(1)),onKeyup:l[3]||(l[3]=e.withKeys(a=>v(1),["enter"]))},[t.value.style.tooltip.show&&f.value&&u.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${i.value===0?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},"1:",4),e.createTextVNode(),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.tooltip.formatter,s.dataset.rating[1],e.unref(o.dataLabel)({v:s.dataset.rating[1],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0),t.value.style.icons.filled?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),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:c(0),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",L,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.active[0],.05)},null,8,H),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.active[0]},null,8,X)])]),j,e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-5 9.86a4.5 4.5 0 0 0 -3.214 1.35a1 1 0 1 0 1.428 1.4a2.5 2.5 0 0 1 3.572 0a1 1 0 0 0 1.428 -1.4a4.5 4.5 0 0 0 -3.214 -1.35zm-2.99 -4.2l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:c(0)},null,8,D)],8,R)):(e.openBlock(),e.createElementBlock("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:c(0),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},A,8,U)),t.value.style.icons.filled&&u.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),style:{transition:"all 0.1s ease-in-out",position:"absolute",top:"0",left:"0"},height:"100%",viewBox:`0 0 ${p(0)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[0],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",K,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[0],.05)},null,8,I),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[0]},null,8,T)])]),F,e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-5 9.86a4.5 4.5 0 0 0 -3.214 1.35a1 1 0 1 0 1.428 1.4a2.5 2.5 0 0 1 3.572 0a1 1 0 0 0 1.428 -1.4a4.5 4.5 0 0 0 -3.214 -1.35zm-2.99 -4.2l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:t.value.style.icons.useGradient?"url(#vueUiSmiley0)":t.value.style.colors.activeReadonly[0]},null,8,O)],8,Y)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&u.value?(e.openBlock(),e.createElementBlock("svg",{key:4,style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(0)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[0],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},J,8,q)):e.createCommentVNode("",!0)],38),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&d.value===2}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),onMouseenter:l[4]||(l[4]=a=>i.value=1),onMouseleave:l[5]||(l[5]=a=>i.value=void 0),onClick:l[6]||(l[6]=a=>v(2)),onKeyup:l[7]||(l[7]=e.withKeys(a=>v(2),["enter"]))},[t.value.style.tooltip.show&&f.value&&u.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${i.value===1?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},"2:",4),e.createTextVNode(),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.tooltip.formatter,s.dataset.rating[2],e.unref(o.dataLabel)({v:s.dataset.rating[2],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0),t.value.style.icons.filled?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),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:c(1),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",W,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.active[1],.05)},null,8,Z),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.active[1]},null,8,ee)])]),te,e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 10.66h-6l-.117 .007a1 1 0 0 0 0 1.986l.117 .007h6l.117 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-5.99 -5l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:c(1)},null,8,le)],8,Q)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),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:c(1),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},ne,8,oe)),t.value.style.icons.filled&&u.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(1)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[1],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",ie,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[1],.05)},null,8,re),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[1]},null,8,de)])]),ue,e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 10.66h-6l-.117 .007a1 1 0 0 0 0 1.986l.117 .007h6l.117 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-5.99 -5l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:t.value.style.icons.useGradient?"url(#vueUiSmiley1)":t.value.style.colors.activeReadonly[1]},null,8,ce)],8,se)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&u.value?(e.openBlock(),e.createElementBlock("svg",{key:4,style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(1)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[1],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},ye,8,pe)):e.createCommentVNode("",!0)],38),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&d.value===3}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),onMouseenter:l[8]||(l[8]=a=>i.value=2),onMouseleave:l[9]||(l[9]=a=>i.value=void 0),onClick:l[10]||(l[10]=a=>v(3)),onKeyup:l[11]||(l[11]=e.withKeys(a=>v(3),["enter"]))},[t.value.style.tooltip.show&&f.value&&u.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${i.value===2?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},"3:",4),e.createTextVNode(),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.tooltip.formatter,s.dataset.rating[3],e.unref(o.dataLabel)({v:s.dataset.rating[3],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0),t.value.style.icons.filled?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),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:c(2),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",me,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[2],.05)},null,8,he),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[2]},null,8,ke)])]),ge,e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-7.99 5.66l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:c(2)},null,8,xe)],8,fe)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),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:c(2),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Ee,8,_e)),t.value.style.icons.filled&&u.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(2)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[2],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[$e,e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",we,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[2],.05)},null,8,Me),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[2]},null,8,Be)])]),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-7.99 5.66l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:t.value.style.icons.useGradient?"url(#vueUiSmiley2)":t.value.style.colors.activeReadonly[2]},null,8,Ce)],8,Se)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&u.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(2)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[2],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},De,8,Re)):e.createCommentVNode("",!0)],38),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&d.value===4}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),onMouseenter:l[12]||(l[12]=a=>i.value=3),onMouseleave:l[13]||(l[13]=a=>i.value=void 0),onClick:l[14]||(l[14]=a=>v(4)),onKeyup:l[15]||(l[15]=e.withKeys(a=>v(4),["enter"]))},[t.value.style.tooltip.show&&f.value&&u.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${i.value===3?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},"4:",4),e.createTextVNode(),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.tooltip.formatter,s.dataset.rating[4],e.unref(o.dataLabel)({v:s.dataset.rating[4],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0),t.value.style.icons.filled?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),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:c(3),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",Ge,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[3],.95)},null,8,Ae),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[3]},null,8,Ye)])]),Ke,e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.8 10.946a1 1 0 0 0 -1.414 .014a2.5 2.5 0 0 1 -3.572 0a1 1 0 0 0 -1.428 1.4a4.5 4.5 0 0 0 6.428 0a1 1 0 0 0 -.014 -1.414zm-6.19 -5.286l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z","stroke-width":"0",fill:c(3)},null,8,Ie)],8,Ue)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),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:c(3),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Oe,8,Te)),t.value.style.icons.filled&&u.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(3)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[3],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[Pe,e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",Je,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[3],.95)},null,8,Qe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[3]},null,8,We)])]),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.8 10.946a1 1 0 0 0 -1.414 .014a2.5 2.5 0 0 1 -3.572 0a1 1 0 0 0 -1.428 1.4a4.5 4.5 0 0 0 6.428 0a1 1 0 0 0 -.014 -1.414zm-6.19 -5.286l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z","stroke-width":"0",fill:t.value.style.icons.useGradient?"url(#vueUiSmiley3)":t.value.style.colors.activeReadonly[3]},null,8,Ze)],8,qe)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&u.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(3)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[3],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},lt,8,et)):e.createCommentVNode("",!0)],38),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&d.value===5}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),onMouseenter:l[16]||(l[16]=a=>i.value=4),onMouseleave:l[17]||(l[17]=a=>i.value=void 0),onClick:l[18]||(l[18]=a=>v(5)),onKeyup:l[19]||(l[19]=e.withKeys(a=>v(5),["enter"]))},[t.value.style.tooltip.show&&f.value&&u.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${i.value===4?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},"5:",4),e.createTextVNode(),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.tooltip.formatter,s.dataset.rating[5],e.unref(o.dataLabel)({v:s.dataset.rating[5],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0),t.value.style.icons.filled?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),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:c(4),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",at,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[4],.9)},null,8,nt),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[4]},null,8,st)])]),it,e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 9.66h-6a1 1 0 0 0 -1 1v.05a3.975 3.975 0 0 0 3.777 3.97l.227 .005a4.026 4.026 0 0 0 3.99 -3.79l.006 -.206a1 1 0 0 0 -1 -1.029zm-5.99 -5l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z","stroke-width":"0",fill:c(4)},null,8,rt)],8,ot)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),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:c(4),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},ct,8,dt)),t.value.style.icons.filled&&u.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(4)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[4],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[vt,e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",yt,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[4],.9)},null,8,ft),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[4]},null,8,mt)])]),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 9.66h-6a1 1 0 0 0 -1 1v.05a3.975 3.975 0 0 0 3.777 3.97l.227 .005a4.026 4.026 0 0 0 3.99 -3.79l.006 -.206a1 1 0 0 0 -1 -1.029zm-5.99 -5l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z","stroke-width":"0",fill:t.value.style.icons.useGradient?"url(#vueUiSmiley4)":t.value.style.colors.activeReadonly[4]},null,8,ht)],8,pt)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&u.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(4)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[4],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},xt,8,kt)):e.createCommentVNode("",!0)],38),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,d.value,e.unref(o.dataLabel)({v:d.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,d.value,e.unref(o.dataLabel)({v:d.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},Nt=B._export_sfc(_t,[["__scopeId","data-v-69afe185"]]);exports.default=Nt;
@@ -1,9 +1,9 @@
1
1
  import { computed as s, ref as k, watch as E, onMounted as K, openBlock as o, createElementBlock as u, normalizeStyle as Q, createBlock as L, unref as h, createVNode as Y, renderSlot as D, createCommentVNode as r, createElementVNode as _, toDisplayString as O } from "vue";
2
- import { u as ee, c as te, t as ae, _ as S, o as le, e as ne, v as c, $ as oe, X as se, s as M, S as G, f as U, i as ue } from "./index-BpkxOytt.js";
3
- import { u as q } from "./useNestedProp-XW-Jo5ax.js";
4
- import I from "./BaseIcon-C_HpYm7J.js";
5
- import re from "./vue-ui-skeleton-CwwH64lu.js";
6
- import { _ as ie } from "./PackageVersion-CT0EYzFv.js";
2
+ import { u as ee, c as te, t as ae, _ as S, o as le, e as ne, v as c, $ as oe, X as se, s as M, S as G, f as U, i as ue } from "./index-DiqenHrX.js";
3
+ import { u as q } from "./useNestedProp-B3CQkP95.js";
4
+ import I from "./BaseIcon-BXpK120h.js";
5
+ import re from "./vue-ui-skeleton-BwWHgSoq.js";
6
+ import { _ as ie } from "./PackageVersion-iscNRe7N.js";
7
7
  import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
8
  const ve = ["id"], he = ["xmlns", "viewBox"], ce = ["width", "height"], ye = ["id"], fe = ["stop-color"], pe = ["stop-color"], ge = { key: 1 }, me = ["d", "fill"], ke = ["d", "fill"], _e = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], be = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], we = ["height", "width", "x"], xe = { style: { width: "100%" } }, Ce = ["x", "y", "fill", "font-size", "font-weight"], Le = ["stroke", "cx", "cy", "fill"], $e = ["x", "y", "font-size", "fill", "font-weight"], Ne = {
9
9
  key: 2,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index--Qj2S12-.cjs"),T=require("./useNestedProp-C5bsAL3S.cjs"),w=require("./BaseIcon-C8K0PDCr.cjs"),A=require("./vue-ui-skeleton-BVhUJapg.cjs"),F=require("./PackageVersion-D3FEDqJ4.cjs"),q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),O=["id"],D=["xmlns","viewBox"],P=["width","height"],G=["id"],U=["stop-color"],W=["stop-color"],Z={key:1},H=["d","fill"],R=["d","fill"],X=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],J=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],K=["height","width","x"],Q={style:{width:"100%"}},Y=["x","y","fill","font-size","font-weight"],ee=["stroke","cx","cy","fill"],te=["x","y","font-size","fill","font-weight"],le={key:2,ref:"source",dir:"auto"},ae={__name:"vue-ui-spark-trend",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(E){const u=E,{vue_ui_spark_trend:$}=a.useConfig(),S=e.computed(()=>!!u.dataset&&u.dataset.length),y=e.ref(a.createUid()),t=e.computed({get:()=>x(),set:l=>l});function x(){const l=T.useNestedProp({userConfig:u.config,defaultConfig:$});return l.theme?{...T.useNestedProp({userConfig:a.themes.vue_ui_spark_trend[l.theme]||u.config,defaultConfig:l})}:l}const c=e.computed(()=>a.largestTriangleThreeBucketsArray({data:u.dataset,threshold:t.value.downsample.threshold}));e.watch(()=>u.config,l=>{t.value=x(),C()},{deep:!0}),e.watch(()=>u.dataset,l=>{h.value=a.largestTriangleThreeBucketsArray({data:u.dataset,threshold:t.value.downsample.threshold}).map(r=>[void 0,1/0,-1/0,null,NaN].includes(r)?null:r)},{deep:!0});function g(l){return l.map(r=>a.checkNaN(r))}const h=e.ref(a.largestTriangleThreeBucketsArray({data:u.dataset,threshold:t.value.downsample.threshold}).map(l=>t.value.style.animation.show||[void 0,1/0,-1/0,null,NaN].includes(l)?null:l)),p=e.ref(!1),_=e.ref(null);e.onMounted(()=>{C();let r=1e3/t.value.style.animation.animationFrames,i=performance.now();if(t.value.style.animation.show&&t.value.style.animation.animationFrames&&u.dataset.length>1){let N=function(){p.value=!0;let L=performance.now(),V=L-i;V>r?(i=L-V%r,v<c.value.length?(h.value.push(c.value[v]),v+=1,_.value=requestAnimationFrame(N)):(cancelAnimationFrame(_.value),h.value=g(c.value),p.value=!1)):_.value=requestAnimationFrame(N)};h.value=[];let v=0;N()}});function C(){a.objectIsEmpty(u.dataset)&&a.error({componentName:"VueUiSparkTrend",type:"dataset"})}const n=e.ref({height:80,width:300}),d=e.computed(()=>({top:t.value.style.padding.top,left:t.value.style.padding.left,right:n.value.width-t.value.style.padding.right,bottom:n.value.height-t.value.style.padding.bottom,height:n.value.height-(t.value.style.padding.top+t.value.style.padding.bottom)-(t.value.style.dataLabel.show?t.value.style.dataLabel.fontSize:0),width:n.value.width-(t.value.style.padding.left+t.value.style.padding.right)})),b=e.computed(()=>{const l=g(c.value);return{max:Math.max(...l.map(r=>a.checkNaN(r))),min:Math.min(...l.map(r=>a.checkNaN(r)))}}),m=e.computed(()=>{const l=b.value.min>=0?0:b.value.min;return Math.abs(l)}),z=e.computed(()=>b.value.max+m.value);function B(l){return l/z.value}const M=e.computed(()=>c.value.length),o=e.computed(()=>h.value.map((l,r)=>{const i=isNaN(l)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l)?0:l||0;return{value:a.checkNaN(l),absoluteValue:a.checkNaN(i),plotValue:a.checkNaN(i+m.value),toMax:B(i+m.value),x:d.value.left+a.checkNaN(r*(d.value.width/(M.value-1)))-t.value.style.padding.right,y:d.value.bottom-a.checkNaN(d.value.height*B(i+m.value))}})),f=e.computed(()=>{const l=g(c.value);return t.value.style.trendLabel.trendType==="global"?a.calcTrend(l):t.value.style.trendLabel.trendType==="n-1"&&l.length>1?(l.at(-1)/l.at(-2)-1)*100:t.value.style.trendLabel.trendType==="lastToFirst"?(l.at(-1)/l[0]-1)*100:0}),k=e.computed(()=>p.value||f.value===0?"neutral":f.value>0?"positive":"negative"),s=e.computed(()=>t.value.style.arrow.colors[k.value]),I=e.computed(()=>{const l={x:o.value[0].x,y:n.value.height-6},r={x:o.value[o.value.length-1].x,y:n.value.height-6},i=[];return o.value.forEach(v=>{i.push(`${v.x},${v.y} `)}),[l.x,l.y,...i,r.x,r.y].toString()}),j=e.computed(()=>{let l=[];return o.value.forEach(r=>{l.push(`${r.x},${r.y} `)}),`M ${l.toString()}`});return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-spark-trend",id:y.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily};background:${t.value.style.backgroundColor}`)},[S.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${n.value.width} ${n.value.height}`,style:"width:100%;background:transparent;overflow:visible"},[e.createVNode(F._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,P)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"0%",y2:"100%",id:`pill_gradient_${y.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity)},null,8,U),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,W)],8,G)]),t.value.style.area.show&&o.value[0]?(e.openBlock(),e.createElementBlock("g",Z,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${o.value[0].x},${d.value.bottom} ${e.unref(a.createSmoothPath)(o.value)} L ${o.value.at(-1).x},${d.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${y.value})`:e.unref(a.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity),stroke:"none"},null,8,H)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${I.value}Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${y.value})`:e.unref(a.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity),stroke:"none"},null,8,R))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&o.value.length?(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${e.unref(a.createSmoothPath)(o.value)}`,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,X)):e.createCommentVNode("",!0),!t.value.style.line.smooth&&o.value.length?(e.openBlock(),e.createElementBlock("path",{key:3,d:j.value,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,J)):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("foreignObject",{key:4,height:n.value.height/2,width:n.value.height/2,x:n.value.height/5,y:8},[e.createElementVNode("div",Q,[k.value==="positive"?(e.openBlock(),e.createBlock(w.default,{key:0,stroke:s.value,name:"arrowTop",size:n.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),k.value==="negative"?(e.openBlock(),e.createBlock(w.default,{key:1,stroke:s.value,name:"arrowBottom",size:n.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),k.value==="neutral"?(e.openBlock(),e.createBlock(w.default,{key:2,stroke:s.value,name:"arrowRight",size:n.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0)])],8,K)),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:5,x:n.value.height/2-n.value.height/20,y:d.value.bottom,"text-anchor":"middle",fill:t.value.style.trendLabel.useColorTrend?s.value:t.value.style.trendLabel.color,"font-size":t.value.style.trendLabel.fontSize,"font-weight":t.value.style.trendLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(a.dataLabel)({p:f.value>0?"+":"",v:f.value,s:"%",r:t.value.style.trendLabel.rounding})),9,Y)),o.value.length&&o.value.at(-1).x!==void 0?(e.openBlock(),e.createElementBlock("circle",{key:6,stroke:t.value.style.backgroundColor,"stroke-width":2,cx:o.value.at(-1).x,cy:o.value.at(-1).y,r:4,fill:s.value},null,8,ee)):e.createCommentVNode("",!0),o.value.length&&o.value.at(-1).x!==void 0&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:7,"text-anchor":"middle",x:o.value.at(-1).x,y:o.value.at(-1).y-t.value.style.dataLabel.fontSize/1.5,"font-size":t.value.style.dataLabel.fontSize,fill:t.value.style.dataLabel.useColorTrend?s.value:t.value.style.dataLabel.color,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.dataLabel.formatter,o.value.at(-1).value,e.unref(a.dataLabel)({p:t.value.style.dataLabel.prefix,v:o.value.at(-1).value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:o.value.at(-1)})),9,te)):e.createCommentVNode("",!0)],8,D)):(e.openBlock(),e.createBlock(A.default,{key:0,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"])),l.$slots.source?(e.openBlock(),e.createElementBlock("div",le,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],12,O))}},oe=q._export_sfc(ae,[["__scopeId","data-v-38d02804"]]);exports.default=oe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-C_VTEz1N.cjs"),T=require("./useNestedProp-C7bLHE7v.cjs"),w=require("./BaseIcon-Dk8gByg1.cjs"),A=require("./vue-ui-skeleton-D1bJntn7.cjs"),F=require("./PackageVersion-CdmZAhdE.cjs"),q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),O=["id"],D=["xmlns","viewBox"],P=["width","height"],G=["id"],U=["stop-color"],W=["stop-color"],Z={key:1},H=["d","fill"],R=["d","fill"],X=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],J=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],K=["height","width","x"],Q={style:{width:"100%"}},Y=["x","y","fill","font-size","font-weight"],ee=["stroke","cx","cy","fill"],te=["x","y","font-size","fill","font-weight"],le={key:2,ref:"source",dir:"auto"},ae={__name:"vue-ui-spark-trend",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(E){const u=E,{vue_ui_spark_trend:$}=a.useConfig(),S=e.computed(()=>!!u.dataset&&u.dataset.length),y=e.ref(a.createUid()),t=e.computed({get:()=>x(),set:l=>l});function x(){const l=T.useNestedProp({userConfig:u.config,defaultConfig:$});return l.theme?{...T.useNestedProp({userConfig:a.themes.vue_ui_spark_trend[l.theme]||u.config,defaultConfig:l})}:l}const c=e.computed(()=>a.largestTriangleThreeBucketsArray({data:u.dataset,threshold:t.value.downsample.threshold}));e.watch(()=>u.config,l=>{t.value=x(),C()},{deep:!0}),e.watch(()=>u.dataset,l=>{h.value=a.largestTriangleThreeBucketsArray({data:u.dataset,threshold:t.value.downsample.threshold}).map(r=>[void 0,1/0,-1/0,null,NaN].includes(r)?null:r)},{deep:!0});function g(l){return l.map(r=>a.checkNaN(r))}const h=e.ref(a.largestTriangleThreeBucketsArray({data:u.dataset,threshold:t.value.downsample.threshold}).map(l=>t.value.style.animation.show||[void 0,1/0,-1/0,null,NaN].includes(l)?null:l)),p=e.ref(!1),_=e.ref(null);e.onMounted(()=>{C();let r=1e3/t.value.style.animation.animationFrames,i=performance.now();if(t.value.style.animation.show&&t.value.style.animation.animationFrames&&u.dataset.length>1){let N=function(){p.value=!0;let L=performance.now(),V=L-i;V>r?(i=L-V%r,v<c.value.length?(h.value.push(c.value[v]),v+=1,_.value=requestAnimationFrame(N)):(cancelAnimationFrame(_.value),h.value=g(c.value),p.value=!1)):_.value=requestAnimationFrame(N)};h.value=[];let v=0;N()}});function C(){a.objectIsEmpty(u.dataset)&&a.error({componentName:"VueUiSparkTrend",type:"dataset"})}const n=e.ref({height:80,width:300}),d=e.computed(()=>({top:t.value.style.padding.top,left:t.value.style.padding.left,right:n.value.width-t.value.style.padding.right,bottom:n.value.height-t.value.style.padding.bottom,height:n.value.height-(t.value.style.padding.top+t.value.style.padding.bottom)-(t.value.style.dataLabel.show?t.value.style.dataLabel.fontSize:0),width:n.value.width-(t.value.style.padding.left+t.value.style.padding.right)})),b=e.computed(()=>{const l=g(c.value);return{max:Math.max(...l.map(r=>a.checkNaN(r))),min:Math.min(...l.map(r=>a.checkNaN(r)))}}),m=e.computed(()=>{const l=b.value.min>=0?0:b.value.min;return Math.abs(l)}),z=e.computed(()=>b.value.max+m.value);function B(l){return l/z.value}const M=e.computed(()=>c.value.length),o=e.computed(()=>h.value.map((l,r)=>{const i=isNaN(l)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l)?0:l||0;return{value:a.checkNaN(l),absoluteValue:a.checkNaN(i),plotValue:a.checkNaN(i+m.value),toMax:B(i+m.value),x:d.value.left+a.checkNaN(r*(d.value.width/(M.value-1)))-t.value.style.padding.right,y:d.value.bottom-a.checkNaN(d.value.height*B(i+m.value))}})),f=e.computed(()=>{const l=g(c.value);return t.value.style.trendLabel.trendType==="global"?a.calcTrend(l):t.value.style.trendLabel.trendType==="n-1"&&l.length>1?(l.at(-1)/l.at(-2)-1)*100:t.value.style.trendLabel.trendType==="lastToFirst"?(l.at(-1)/l[0]-1)*100:0}),k=e.computed(()=>p.value||f.value===0?"neutral":f.value>0?"positive":"negative"),s=e.computed(()=>t.value.style.arrow.colors[k.value]),I=e.computed(()=>{const l={x:o.value[0].x,y:n.value.height-6},r={x:o.value[o.value.length-1].x,y:n.value.height-6},i=[];return o.value.forEach(v=>{i.push(`${v.x},${v.y} `)}),[l.x,l.y,...i,r.x,r.y].toString()}),j=e.computed(()=>{let l=[];return o.value.forEach(r=>{l.push(`${r.x},${r.y} `)}),`M ${l.toString()}`});return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-spark-trend",id:y.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily};background:${t.value.style.backgroundColor}`)},[S.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${n.value.width} ${n.value.height}`,style:"width:100%;background:transparent;overflow:visible"},[e.createVNode(F._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,P)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"0%",y2:"100%",id:`pill_gradient_${y.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity)},null,8,U),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,W)],8,G)]),t.value.style.area.show&&o.value[0]?(e.openBlock(),e.createElementBlock("g",Z,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${o.value[0].x},${d.value.bottom} ${e.unref(a.createSmoothPath)(o.value)} L ${o.value.at(-1).x},${d.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${y.value})`:e.unref(a.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity),stroke:"none"},null,8,H)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${I.value}Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${y.value})`:e.unref(a.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity),stroke:"none"},null,8,R))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&o.value.length?(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${e.unref(a.createSmoothPath)(o.value)}`,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,X)):e.createCommentVNode("",!0),!t.value.style.line.smooth&&o.value.length?(e.openBlock(),e.createElementBlock("path",{key:3,d:j.value,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,J)):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("foreignObject",{key:4,height:n.value.height/2,width:n.value.height/2,x:n.value.height/5,y:8},[e.createElementVNode("div",Q,[k.value==="positive"?(e.openBlock(),e.createBlock(w.default,{key:0,stroke:s.value,name:"arrowTop",size:n.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),k.value==="negative"?(e.openBlock(),e.createBlock(w.default,{key:1,stroke:s.value,name:"arrowBottom",size:n.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),k.value==="neutral"?(e.openBlock(),e.createBlock(w.default,{key:2,stroke:s.value,name:"arrowRight",size:n.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0)])],8,K)),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:5,x:n.value.height/2-n.value.height/20,y:d.value.bottom,"text-anchor":"middle",fill:t.value.style.trendLabel.useColorTrend?s.value:t.value.style.trendLabel.color,"font-size":t.value.style.trendLabel.fontSize,"font-weight":t.value.style.trendLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(a.dataLabel)({p:f.value>0?"+":"",v:f.value,s:"%",r:t.value.style.trendLabel.rounding})),9,Y)),o.value.length&&o.value.at(-1).x!==void 0?(e.openBlock(),e.createElementBlock("circle",{key:6,stroke:t.value.style.backgroundColor,"stroke-width":2,cx:o.value.at(-1).x,cy:o.value.at(-1).y,r:4,fill:s.value},null,8,ee)):e.createCommentVNode("",!0),o.value.length&&o.value.at(-1).x!==void 0&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:7,"text-anchor":"middle",x:o.value.at(-1).x,y:o.value.at(-1).y-t.value.style.dataLabel.fontSize/1.5,"font-size":t.value.style.dataLabel.fontSize,fill:t.value.style.dataLabel.useColorTrend?s.value:t.value.style.dataLabel.color,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.dataLabel.formatter,o.value.at(-1).value,e.unref(a.dataLabel)({p:t.value.style.dataLabel.prefix,v:o.value.at(-1).value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:o.value.at(-1)})),9,te)):e.createCommentVNode("",!0)],8,D)):(e.openBlock(),e.createBlock(A.default,{key:0,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"])),l.$slots.source?(e.openBlock(),e.createElementBlock("div",le,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],12,O))}},oe=q._export_sfc(ae,[["__scopeId","data-v-38d02804"]]);exports.default=oe;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index--Qj2S12-.cjs"),b=require("./useNestedProp-C5bsAL3S.cjs"),D=require("./vue-ui-skeleton-BVhUJapg.cjs"),$=require("./PackageVersion-D3FEDqJ4.cjs"),z=["onClick"],L={key:1},P=["xmlns","viewBox"],A=["id"],F=["stop-color"],O=["stop-color"],I=["height","width","fill","rx"],T=["height","width","fill","rx"],q=["height","width","fill","rx"],M={key:2,ref:"source",dir:"auto"},U={__name:"vue-ui-sparkbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},backgroundOpacity:{type:Number,default:null}},emits:["selectDatapoint"],setup(p,{emit:C}){const n=p,{vue_ui_sparkbar:S}=o.useConfig(),w=e.useSlots();e.onMounted(()=>{w["chart-background"]&&console.warn("VueUiSparkbar does not support the #chart-background slot.")});const v=e.computed(()=>!!n.dataset&&n.dataset.length),y=e.ref(o.createUid()),t=e.computed({get:()=>f(),set:l=>l});function f(){const l=b.useNestedProp({userConfig:n.config,defaultConfig:S});return l.theme?{...b.useNestedProp({userConfig:o.themes.vue_ui_sparkbar[l.theme]||n.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}e.watch(()=>n.config,l=>{t.value=f()},{deep:!0});const N=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),c=e.ref(n.dataset.map(l=>({...l,value:t.value.style.animation.show?0:l.value||0,formatter:l.formatter||null}))),g=e.ref(null);e.onMounted(async()=>{o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiSparkbar",type:"dataset"}),h()});function h(){if(t.value.style.animation.show){let x=function(){i+=a/l,i<a?(c.value=c.value.map((u,m)=>({...u,value:u.value+=r[m]})),g.value=requestAnimationFrame(x)):c.value=n.dataset.map(u=>({...u,value:u.value||0,formatter:u.formatter||null}))};const l=t.value.style.animation.animationFrames,r=n.dataset.map((u,m)=>u.value/l),a=n.dataset.map(u=>u.value||0).reduce((u,m)=>u+m,0);let i=0;x()}}e.watch(()=>n.dataset,async l=>{cancelAnimationFrame(g.value),c.value=n.dataset.map(r=>({...r,value:t.value.style.animation.show?0:r.value||0,formatter:r.formatter||null})),e.nextTick(h)},{deep:!0});const s=e.ref({width:500,height:16}),_=e.computed(()=>Math.max(...n.dataset.map(l=>l.value))),B=e.computed(()=>(n.dataset.forEach((l,r)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkbar",type:"datasetSerieAttribute",property:a,index:r})})}),c.value.map((l,r)=>({...l,value:l.value||0,color:o.convertColorToHex(l.color)||N.value[r]||o.palette[r]||o.palette[r%o.palette.length]}))));function V(l){return l/_.value}function k(l){return t.value.style.layout.independant?l.target?l.value/l.target:t.value.style.layout.percentage?l.value>100?1:l.value/100:t.value.style.layout.target===0?1:l.value/t.value.style.layout.target:V(l.value)}function d(l){return t.value.style.layout.independant&&l.target||t.value.style.layout.target}function E(l,r){C("selectDatapoint",{datapoint:l,index:r})}return(l,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:"100%",fontFamily:t.value.style.fontFamily,background:n.backgroundOpacity!==null?e.unref(o.setOpacity)(t.value.style.backgroundColor,n.backgroundOpacity):t.value.style.backgroundColor})},[l.$slots.title?e.renderSlot(l.$slots,"title",e.normalizeProps(e.mergeProps({key:0},{title:{...l.title,title:t.value.style.title.text,subtitle:t.value.style.title.subtitle.text}}))):e.createCommentVNode("",!0),!l.$slots.title&&t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:"vue-ui-sparkbar-title-container",style:e.normalizeStyle({background:t.value.style.title.backgroundColor,margin:t.value.style.title.margin,textAlign:t.value.style.title.textAlign})},[e.createElementVNode("div",{class:"vue-ui-sparkbar-title",style:e.normalizeStyle({fontSize:t.value.style.title.fontSize+"px",color:t.value.style.title.color,fontWeight:t.value.style.title.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-sparkbar-subtitle",style:e.normalizeStyle({fontSize:t.value.style.title.subtitle.fontSize+"px",color:t.value.style.title.subtitle.color,fontWeight:t.value.style.title.subtitle.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(a,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`display:flex !important;${["left","right"].includes(t.value.style.labels.name.position)?`flex-direction: ${t.value.style.labels.name.position==="right"?"row-reverse":"row"} !important`:"flex-direction:column !important"};gap:${t.value.style.gap}px !important;align-items:center;${p.dataset.length>0&&i!==p.dataset.length-1?"margin-bottom:6px":""}`),onClick:()=>E(a,i)},[e.renderSlot(l.$slots,"data-label",e.normalizeProps(e.guardReactiveProps({bar:{...a,target:d(a),valueLabel:e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i}),targetLabel:e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i})}}))),l.$slots["data-label"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({width:t.value.style.labels.name.width,color:t.value.style.labels.name.color,fontSize:t.value.style.labels.fontSize+"px",fontWeight:t.value.style.labels.name.bold?"bold":"normal",textAlign:["left","right"].includes(t.value.style.labels.name.position)||["top","top-left"].includes(t.value.style.labels.name.position)?"left":t.value.style.labels.name.position==="top-center"?"center":"right"})},[e.createElementVNode("span",null,e.toDisplayString(a.name),1),t.value.style.labels.value.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.labels.value.bold?"bold":"normal"}`)},": "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i})),5)):e.createCommentVNode("",!0),t.value.style.layout.showTargetValue?(e.openBlock(),e.createElementBlock("span",L,e.toDisplayString(" "+t.value.style.layout.targetValueText)+" "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i})),1)):e.createCommentVNode("",!0)],4)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${s.value.width} ${s.value.height}`,width:"100%"},[e.createVNode($._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkbar_gradient_${i}_${y.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(a.color,.03),100-t.value.style.bar.gradient.intensity)},null,8,F),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,O)],8,A)]),e.createElementVNode("rect",{height:s.value.height,width:s.value.width,x:0,y:0,fill:e.unref(o.setOpacity)(t.value.style.gutter.backgroundColor,t.value.style.gutter.opacity),rx:s.value.height/2},null,8,I),e.createElementVNode("rect",{height:s.value.height,width:s.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.underlayerColor,rx:s.value.height/2},null,8,T),e.createElementVNode("rect",{height:s.value.height,width:s.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.show?`url(#sparkbar_gradient_${i}_${y.value})`:a.color,rx:s.value.height/2},null,8,q)],8,P))],12,z)):e.createCommentVNode("",!0)],64))),256)),l.$slots.source?(e.openBlock(),e.createElementBlock("div",M,[e.renderSlot(l.$slots,"source")],512)):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D.default,{key:3,config:{type:"sparkbar",style:{backgroundColor:t.value.style.backgroundColor,sparkbar:{color:"#CCCCCC"}}}},null,8,["config"]))],4))}};exports.default=U;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-C_VTEz1N.cjs"),b=require("./useNestedProp-C7bLHE7v.cjs"),D=require("./vue-ui-skeleton-D1bJntn7.cjs"),$=require("./PackageVersion-CdmZAhdE.cjs"),z=["onClick"],L={key:1},P=["xmlns","viewBox"],A=["id"],F=["stop-color"],O=["stop-color"],I=["height","width","fill","rx"],T=["height","width","fill","rx"],q=["height","width","fill","rx"],M={key:2,ref:"source",dir:"auto"},U={__name:"vue-ui-sparkbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},backgroundOpacity:{type:Number,default:null}},emits:["selectDatapoint"],setup(p,{emit:C}){const n=p,{vue_ui_sparkbar:S}=o.useConfig(),w=e.useSlots();e.onMounted(()=>{w["chart-background"]&&console.warn("VueUiSparkbar does not support the #chart-background slot.")});const v=e.computed(()=>!!n.dataset&&n.dataset.length),y=e.ref(o.createUid()),t=e.computed({get:()=>f(),set:l=>l});function f(){const l=b.useNestedProp({userConfig:n.config,defaultConfig:S});return l.theme?{...b.useNestedProp({userConfig:o.themes.vue_ui_sparkbar[l.theme]||n.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}e.watch(()=>n.config,l=>{t.value=f()},{deep:!0});const N=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),c=e.ref(n.dataset.map(l=>({...l,value:t.value.style.animation.show?0:l.value||0,formatter:l.formatter||null}))),g=e.ref(null);e.onMounted(async()=>{o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiSparkbar",type:"dataset"}),h()});function h(){if(t.value.style.animation.show){let x=function(){i+=a/l,i<a?(c.value=c.value.map((u,m)=>({...u,value:u.value+=r[m]})),g.value=requestAnimationFrame(x)):c.value=n.dataset.map(u=>({...u,value:u.value||0,formatter:u.formatter||null}))};const l=t.value.style.animation.animationFrames,r=n.dataset.map((u,m)=>u.value/l),a=n.dataset.map(u=>u.value||0).reduce((u,m)=>u+m,0);let i=0;x()}}e.watch(()=>n.dataset,async l=>{cancelAnimationFrame(g.value),c.value=n.dataset.map(r=>({...r,value:t.value.style.animation.show?0:r.value||0,formatter:r.formatter||null})),e.nextTick(h)},{deep:!0});const s=e.ref({width:500,height:16}),_=e.computed(()=>Math.max(...n.dataset.map(l=>l.value))),B=e.computed(()=>(n.dataset.forEach((l,r)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkbar",type:"datasetSerieAttribute",property:a,index:r})})}),c.value.map((l,r)=>({...l,value:l.value||0,color:o.convertColorToHex(l.color)||N.value[r]||o.palette[r]||o.palette[r%o.palette.length]}))));function V(l){return l/_.value}function k(l){return t.value.style.layout.independant?l.target?l.value/l.target:t.value.style.layout.percentage?l.value>100?1:l.value/100:t.value.style.layout.target===0?1:l.value/t.value.style.layout.target:V(l.value)}function d(l){return t.value.style.layout.independant&&l.target||t.value.style.layout.target}function E(l,r){C("selectDatapoint",{datapoint:l,index:r})}return(l,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:"100%",fontFamily:t.value.style.fontFamily,background:n.backgroundOpacity!==null?e.unref(o.setOpacity)(t.value.style.backgroundColor,n.backgroundOpacity):t.value.style.backgroundColor})},[l.$slots.title?e.renderSlot(l.$slots,"title",e.normalizeProps(e.mergeProps({key:0},{title:{...l.title,title:t.value.style.title.text,subtitle:t.value.style.title.subtitle.text}}))):e.createCommentVNode("",!0),!l.$slots.title&&t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:"vue-ui-sparkbar-title-container",style:e.normalizeStyle({background:t.value.style.title.backgroundColor,margin:t.value.style.title.margin,textAlign:t.value.style.title.textAlign})},[e.createElementVNode("div",{class:"vue-ui-sparkbar-title",style:e.normalizeStyle({fontSize:t.value.style.title.fontSize+"px",color:t.value.style.title.color,fontWeight:t.value.style.title.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-sparkbar-subtitle",style:e.normalizeStyle({fontSize:t.value.style.title.subtitle.fontSize+"px",color:t.value.style.title.subtitle.color,fontWeight:t.value.style.title.subtitle.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(a,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`display:flex !important;${["left","right"].includes(t.value.style.labels.name.position)?`flex-direction: ${t.value.style.labels.name.position==="right"?"row-reverse":"row"} !important`:"flex-direction:column !important"};gap:${t.value.style.gap}px !important;align-items:center;${p.dataset.length>0&&i!==p.dataset.length-1?"margin-bottom:6px":""}`),onClick:()=>E(a,i)},[e.renderSlot(l.$slots,"data-label",e.normalizeProps(e.guardReactiveProps({bar:{...a,target:d(a),valueLabel:e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i}),targetLabel:e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i})}}))),l.$slots["data-label"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({width:t.value.style.labels.name.width,color:t.value.style.labels.name.color,fontSize:t.value.style.labels.fontSize+"px",fontWeight:t.value.style.labels.name.bold?"bold":"normal",textAlign:["left","right"].includes(t.value.style.labels.name.position)||["top","top-left"].includes(t.value.style.labels.name.position)?"left":t.value.style.labels.name.position==="top-center"?"center":"right"})},[e.createElementVNode("span",null,e.toDisplayString(a.name),1),t.value.style.labels.value.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.labels.value.bold?"bold":"normal"}`)},": "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i})),5)):e.createCommentVNode("",!0),t.value.style.layout.showTargetValue?(e.openBlock(),e.createElementBlock("span",L,e.toDisplayString(" "+t.value.style.layout.targetValueText)+" "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i})),1)):e.createCommentVNode("",!0)],4)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${s.value.width} ${s.value.height}`,width:"100%"},[e.createVNode($._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkbar_gradient_${i}_${y.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(a.color,.03),100-t.value.style.bar.gradient.intensity)},null,8,F),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,O)],8,A)]),e.createElementVNode("rect",{height:s.value.height,width:s.value.width,x:0,y:0,fill:e.unref(o.setOpacity)(t.value.style.gutter.backgroundColor,t.value.style.gutter.opacity),rx:s.value.height/2},null,8,I),e.createElementVNode("rect",{height:s.value.height,width:s.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.underlayerColor,rx:s.value.height/2},null,8,T),e.createElementVNode("rect",{height:s.value.height,width:s.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.show?`url(#sparkbar_gradient_${i}_${y.value})`:a.color,rx:s.value.height/2},null,8,q)],8,P))],12,z)):e.createCommentVNode("",!0)],64))),256)),l.$slots.source?(e.openBlock(),e.createElementBlock("div",M,[e.renderSlot(l.$slots,"source")],512)):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D.default,{key:3,config:{type:"sparkbar",style:{backgroundColor:t.value.style.backgroundColor,sparkbar:{color:"#CCCCCC"}}}},null,8,["config"]))],4))}};exports.default=U;
@@ -1,8 +1,8 @@
1
1
  import { useSlots as X, onMounted as z, computed as g, ref as x, watch as L, nextTick as R, openBlock as n, createElementBlock as c, normalizeStyle as p, unref as s, renderSlot as C, normalizeProps as O, mergeProps as J, createCommentVNode as v, createElementVNode as d, toDisplayString as f, Fragment as T, renderList as K, guardReactiveProps as Q, createVNode as Y, createBlock as Z } from "vue";
2
- import { u as ee, c as te, t as le, a as ae, p as k, b as oe, o as se, e as V, g as ue, d as ne, s as $, i as b, f as w, X as re, w as ie } from "./index-BpkxOytt.js";
3
- import { u as E } from "./useNestedProp-XW-Jo5ax.js";
4
- import ce from "./vue-ui-skeleton-CwwH64lu.js";
5
- import { _ as ve } from "./PackageVersion-CT0EYzFv.js";
2
+ import { u as ee, c as te, t as le, a as ae, p as k, b as oe, o as se, e as V, g as ue, d as ne, s as $, i as b, f as w, X as re, w as ie } from "./index-DiqenHrX.js";
3
+ import { u as E } from "./useNestedProp-B3CQkP95.js";
4
+ import ce from "./vue-ui-skeleton-BwWHgSoq.js";
5
+ import { _ as ve } from "./PackageVersion-iscNRe7N.js";
6
6
  const de = ["onClick"], pe = { key: 1 }, fe = ["xmlns", "viewBox"], ye = ["id"], me = ["stop-color"], ge = ["stop-color"], he = ["height", "width", "fill", "rx"], xe = ["height", "width", "fill", "rx"], ke = ["height", "width", "fill", "rx"], be = {
7
7
  key: 2,
8
8
  ref: "source",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index--Qj2S12-.cjs"),b=require("./useNestedProp-C5bsAL3S.cjs"),w=require("./vue-ui-skeleton-BVhUJapg.cjs"),x=require("./PackageVersion-D3FEDqJ4.cjs"),S=["xmlns","viewBox"],B=["width","height"],E=["id"],L=["stop-color"],M=["stop-color"],V=["d","stroke","stroke-linecap"],z=["d","stroke","stroke-linecap","stroke-dashoffset"],A=["x","y","font-size","fill","font-weight"],O={key:4,ref:"source",dir:"auto"},j={__name:"vue-ui-sparkgauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(C){const o=C,{vue_ui_sparkgauge:_}=n.useConfig(),c=e.computed(()=>!!o.dataset&&Object.keys(o.dataset).length);e.onMounted(()=>{d()});function d(){n.objectIsEmpty(o.dataset)?n.error({componentName:"VueUiSparkgauge",type:"dataset"}):n.getMissingDatasetAttributes({datasetObject:o.dataset,requiredAttributes:["value","min","max"]}).forEach(a=>{n.error({componentName:"VueUiSparkgauge",type:"datasetAttribute",property:a})})}const v=e.ref(n.createUid()),t=e.computed({get:()=>m(),set:a=>a});function m(){const a=b.useNestedProp({userConfig:o.config,defaultConfig:_});return a.theme?{...b.useNestedProp({userConfig:n.themes.vue_ui_sparkgauge[a.theme]||o.config,defaultConfig:a})}:a}e.watch(()=>o.config,a=>{t.value=m(),d()},{deep:!0});const u=e.computed(()=>({height:t.value.style.height,width:128,base:t.value.style.basePosition})),s=e.computed(()=>{const a=o.dataset.min??0,r=o.dataset.max??0,$=r-a;return{min:a,max:r,diff:$}}),l=e.ref(t.value.style.animation.show?s.value.min:o.dataset.value);e.watch(()=>o.dataset.value,()=>{y(o.dataset.value||0)});const f=e.computed(()=>l.value>s.value.max?s.value.max:l.value<s.value.min?s.value.min:l.value),p=e.computed(()=>s.value.diff/t.value.style.animation.speedMs);e.onMounted(()=>{y(o.dataset.value||0)});function y(a){function r(){l.value<a?l.value=Math.min(l.value+p.value,a):l.value>a&&(l.value=Math.max(l.value-p.value,a)),l.value!==a&&requestAnimationFrame(r)}r()}const i=e.computed(()=>o.dataset.title??""),g=e.computed(()=>l.value>=0?(f.value-s.value.min)/s.value.diff:(Math.abs(s.value.min)-Math.abs(f.value))/s.value.diff),h=e.computed(()=>n.interpolateColorHex(t.value.style.colors.min,t.value.style.colors.max,s.value.min,s.value.max,l.value)),k=e.computed(()=>t.value.style.dataLabel.autoColor?h.value:t.value.style.dataLabel.color),N=e.computed(()=>t.value.style.track.autoColor?h.value:t.value.style.track.color);return(a,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width: 100%; background:${t.value.style.background}`)},[t.value.style.title.show&&i.value&&t.value.style.title.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(i.value),5)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${u.value.width} ${u.value.height}`,style:"overflow: visible; background:transparent; width:100%;"},[e.createVNode(x._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width,height:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background")],8,B)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`gradient_${v.value}`,x1:"-10%",y1:"100%",x2:"110%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.colors.min},null,8,L),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.max},null,8,M)],8,E)]),e.createElementVNode("path",{d:`M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,stroke:t.value.style.gutter.color,"stroke-width":8,"stroke-linecap":t.value.style.gutter.strokeLinecap,fill:"none"},null,8,V),g.value!==0?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,stroke:t.value.style.colors.showGradient?`url(#gradient_${v.value})`:N.value,"stroke-width":8,"stroke-linecap":t.value.style.track.strokeLinecap,fill:"none","stroke-dasharray":169.5,"stroke-dashoffset":169.5-169.5*g.value,class:e.normalizeClass({"vue-ui-sparkgauge-track":t.value.style.animation.show}),style:e.normalizeStyle(t.value.style.animation.show?`animation: vue-ui-sparkgauge-animation ${t.value.style.animation.speedMs}ms ease-in;`:"")},null,14,z)):e.createCommentVNode("",!0),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.width/2,y:u.value.base+6+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,fill:k.value,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.dataLabel.formatter,e.unref(n.checkNaN)(l.value),e.unref(n.dataLabel)({p:t.value.style.dataLabel.prefix,v:e.unref(n.checkNaN)(l.value),s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:e.unref(n.checkNaN)(l.value),color:k.value})),9,A)],8,S)):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(w.default,{key:2,config:{type:"gauge",style:{backgroundColor:t.value.style.background,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.title.show&&i.value&&t.value.style.title.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:3,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(i.value),5)):e.createCommentVNode("",!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",O,[e.renderSlot(a.$slots,"source")],512)):e.createCommentVNode("",!0)],4))}};exports.default=j;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-C_VTEz1N.cjs"),b=require("./useNestedProp-C7bLHE7v.cjs"),w=require("./vue-ui-skeleton-D1bJntn7.cjs"),x=require("./PackageVersion-CdmZAhdE.cjs"),S=["xmlns","viewBox"],B=["width","height"],E=["id"],L=["stop-color"],M=["stop-color"],V=["d","stroke","stroke-linecap"],z=["d","stroke","stroke-linecap","stroke-dashoffset"],A=["x","y","font-size","fill","font-weight"],O={key:4,ref:"source",dir:"auto"},j={__name:"vue-ui-sparkgauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(C){const o=C,{vue_ui_sparkgauge:_}=n.useConfig(),c=e.computed(()=>!!o.dataset&&Object.keys(o.dataset).length);e.onMounted(()=>{d()});function d(){n.objectIsEmpty(o.dataset)?n.error({componentName:"VueUiSparkgauge",type:"dataset"}):n.getMissingDatasetAttributes({datasetObject:o.dataset,requiredAttributes:["value","min","max"]}).forEach(a=>{n.error({componentName:"VueUiSparkgauge",type:"datasetAttribute",property:a})})}const v=e.ref(n.createUid()),t=e.computed({get:()=>m(),set:a=>a});function m(){const a=b.useNestedProp({userConfig:o.config,defaultConfig:_});return a.theme?{...b.useNestedProp({userConfig:n.themes.vue_ui_sparkgauge[a.theme]||o.config,defaultConfig:a})}:a}e.watch(()=>o.config,a=>{t.value=m(),d()},{deep:!0});const u=e.computed(()=>({height:t.value.style.height,width:128,base:t.value.style.basePosition})),s=e.computed(()=>{const a=o.dataset.min??0,r=o.dataset.max??0,$=r-a;return{min:a,max:r,diff:$}}),l=e.ref(t.value.style.animation.show?s.value.min:o.dataset.value);e.watch(()=>o.dataset.value,()=>{y(o.dataset.value||0)});const f=e.computed(()=>l.value>s.value.max?s.value.max:l.value<s.value.min?s.value.min:l.value),p=e.computed(()=>s.value.diff/t.value.style.animation.speedMs);e.onMounted(()=>{y(o.dataset.value||0)});function y(a){function r(){l.value<a?l.value=Math.min(l.value+p.value,a):l.value>a&&(l.value=Math.max(l.value-p.value,a)),l.value!==a&&requestAnimationFrame(r)}r()}const i=e.computed(()=>o.dataset.title??""),g=e.computed(()=>l.value>=0?(f.value-s.value.min)/s.value.diff:(Math.abs(s.value.min)-Math.abs(f.value))/s.value.diff),h=e.computed(()=>n.interpolateColorHex(t.value.style.colors.min,t.value.style.colors.max,s.value.min,s.value.max,l.value)),k=e.computed(()=>t.value.style.dataLabel.autoColor?h.value:t.value.style.dataLabel.color),N=e.computed(()=>t.value.style.track.autoColor?h.value:t.value.style.track.color);return(a,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width: 100%; background:${t.value.style.background}`)},[t.value.style.title.show&&i.value&&t.value.style.title.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(i.value),5)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${u.value.width} ${u.value.height}`,style:"overflow: visible; background:transparent; width:100%;"},[e.createVNode(x._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width,height:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background")],8,B)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`gradient_${v.value}`,x1:"-10%",y1:"100%",x2:"110%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.colors.min},null,8,L),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.max},null,8,M)],8,E)]),e.createElementVNode("path",{d:`M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,stroke:t.value.style.gutter.color,"stroke-width":8,"stroke-linecap":t.value.style.gutter.strokeLinecap,fill:"none"},null,8,V),g.value!==0?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,stroke:t.value.style.colors.showGradient?`url(#gradient_${v.value})`:N.value,"stroke-width":8,"stroke-linecap":t.value.style.track.strokeLinecap,fill:"none","stroke-dasharray":169.5,"stroke-dashoffset":169.5-169.5*g.value,class:e.normalizeClass({"vue-ui-sparkgauge-track":t.value.style.animation.show}),style:e.normalizeStyle(t.value.style.animation.show?`animation: vue-ui-sparkgauge-animation ${t.value.style.animation.speedMs}ms ease-in;`:"")},null,14,z)):e.createCommentVNode("",!0),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.width/2,y:u.value.base+6+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,fill:k.value,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.dataLabel.formatter,e.unref(n.checkNaN)(l.value),e.unref(n.dataLabel)({p:t.value.style.dataLabel.prefix,v:e.unref(n.checkNaN)(l.value),s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:e.unref(n.checkNaN)(l.value),color:k.value})),9,A)],8,S)):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(w.default,{key:2,config:{type:"gauge",style:{backgroundColor:t.value.style.background,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.title.show&&i.value&&t.value.style.title.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:3,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(i.value),5)):e.createCommentVNode("",!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",O,[e.renderSlot(a.$slots,"source")],512)):e.createCommentVNode("",!0)],4))}};exports.default=j;
@@ -1,8 +1,8 @@
1
1
  import { computed as s, onMounted as N, ref as A, watch as M, openBlock as n, createElementBlock as i, normalizeStyle as m, toDisplayString as y, createCommentVNode as r, unref as c, createVNode as D, renderSlot as S, createElementVNode as d, normalizeClass as G, createBlock as I } from "vue";
2
- import { u as U, o as q, e as z, g as P, c as R, t as T, O as X, X as H, i as V, v as g, f as Y } from "./index-BpkxOytt.js";
3
- import { u as O } from "./useNestedProp-XW-Jo5ax.js";
4
- import J from "./vue-ui-skeleton-CwwH64lu.js";
5
- import { _ as K } from "./PackageVersion-CT0EYzFv.js";
2
+ import { u as U, o as q, e as z, g as P, c as R, t as T, O as X, X as H, i as V, v as g, f as Y } from "./index-DiqenHrX.js";
3
+ import { u as O } from "./useNestedProp-B3CQkP95.js";
4
+ import J from "./vue-ui-skeleton-BwWHgSoq.js";
5
+ import { _ as K } from "./PackageVersion-iscNRe7N.js";
6
6
  const Q = ["xmlns", "viewBox"], W = ["width", "height"], Z = ["id"], ee = ["stop-color"], te = ["stop-color"], ae = ["d", "stroke", "stroke-linecap"], le = ["d", "stroke", "stroke-linecap", "stroke-dashoffset"], oe = ["x", "y", "font-size", "fill", "font-weight"], se = {
7
7
  key: 4,
8
8
  ref: "source",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index--Qj2S12-.cjs"),_=require("./useNestedProp-C5bsAL3S.cjs"),F=require("./Shape-Cilordd5.cjs"),M=require("./vue-ui-skeleton-BVhUJapg.cjs"),O=require("./PackageVersion-D3FEDqJ4.cjs"),A=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),H={key:0},q={key:1},I=["xmlns","viewBox"],U=["width","height"],W=["id"],j=["stop-color"],P=["stop-color"],G=["id"],T=["stop-color"],X=["stop-color"],Y=["id"],R=["stop-color"],J=["stop-color"],K={key:1},Q=["x","y","height","width","fill","stroke","stroke-width","rx"],Z={key:2},ee=["x","y","font-size","font-weight","fill"],te=["x","y","font-size","fill"],le=["x","y","font-size","fill"],oe=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],ae={key:2,ref:"source",dir:"auto"},ne={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(B,{emit:x}){const c=B;e.useCssVars(o=>({"9e84af8a":S.value}));const{vue_ui_sparkhistogram:E}=a.useConfig(),f=e.computed(()=>!!c.dataset&&c.dataset.length);e.onMounted(()=>{k()});function k(){a.objectIsEmpty(c.dataset)?a.error({componentName:"VueUiSparkHistogram",type:"dataset"}):c.dataset.forEach((o,r)=>{a.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["value"]}).forEach(l=>{a.error({componentName:"VueUiSparkHistogram",type:"datasetSerieAttribute",property:l,index:r})})})}const v=e.ref(a.createUid()),t=e.computed({get:()=>b(),set:o=>o});function b(){const o=_.useNestedProp({userConfig:c.config,defaultConfig:E});return o.theme?{..._.useNestedProp({userConfig:a.themes.vue_ui_sparkhistogram[o.theme]||c.config,defaultConfig:o})}:o}e.watch(()=>c.config,o=>{t.value=b(),k()},{deep:!0});const u=e.computed(()=>{const o=t.value.style.layout.height,r=t.value.style.layout.width,l=t.value.style.layout.padding.top,n=o-t.value.style.layout.padding.bottom,d=t.value.style.layout.padding.left,y=r-t.value.style.layout.padding.right,p=l+(o-l-t.value.style.layout.padding.bottom)/2,h=o-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,m=r-t.value.style.layout.padding.left-t.value.style.layout.padding.right;return{bottom:n,centerY:p,drawingHeight:h,drawingWidth:m,height:o,left:d,right:y,top:l,width:r}}),w=e.computed(()=>Math.max(...c.dataset.map(o=>Math.abs(o.value||0))));function C(o){return Math.abs(o)/w.value}const i=e.computed(()=>c.dataset.map((o,r)=>{const l=C(o.value||0),n=u.value.drawingHeight*l,d=u.value.drawingWidth/c.dataset.length,y=d*(t.value.style.bars.gap/100),p=d-y,h=u.value.centerY-n/2,m=u.value.left+(y/2+r*d),N=u.value.left+r*d,g=typeof o.intensity>"u"?100:Math.round(o.intensity*100),L=o.color?o.color:o.value>=0?a.setOpacity(t.value.style.bars.colors.positive,g):a.setOpacity(t.value.style.bars.colors.negative,g),V=o.color?o.color:o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,z=o.color?`url(#gradient_datapoint_${r}_${v.value})`:o.value>=0?`url(#gradient_positive_${r}_${v.value})`:`url(#gradient_negative_${r}_${v.value})`,D=m+p/2;return{...o,color:L,gradient:z,height:n,intensity:g,proportion:l,stroke:V,textAnchor:D,trapX:N,unitWidth:d,width:p,x:m,y:h}})),s=e.ref(null);function $(o,r){x("selectDatapoint",{datapoint:o,index:r})}const S=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily}`),onMouseleave:r[1]||(r[1]=l=>s.value=null)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),s.value!==null?(e.openBlock(),e.createElementBlock("span",H,"- "+e.toDisplayString(i.value[s.value].timeLabel||"")+" "+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,i.value[s.value].value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:i.value[s.value].value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[s.value],seriesIndex:s.value})),1)):e.createCommentVNode("",!0),![void 0,null].includes(s.value)&&![null,void 0].includes(i.value[s.value].valueLabel)?(e.openBlock(),e.createElementBlock("span",q,"("+e.toDisplayString(i.value[s.value].valueLabel||0)+")",1)):e.createCommentVNode("",!0)],4),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${u.value.width} ${u.value.height}`,style:{overflow:"visible"}},[e.createVNode(O._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width,height:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,U)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_positive_${n}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(t.value.style.bars.colors.positive,.05),l.intensity)},null,8,j),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.positive,l.intensity)},null,8,P)],8,W))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_negative_${n}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(t.value.style.bars.colors.negative,.05),l.intensity)},null,8,T),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.negative,l.intensity)},null,8,X)],8,G))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_datapoint_${n}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(l.color,.05),l.intensity)},null,8,R),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(l.color,l.intensity)},null,8,J)],8,Y))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,height:l.height,width:l.width,fill:t.value.style.bars.colors.gradient.show?l.gradient:l.color,stroke:l.stroke,"stroke-width":t.value.style.bars.strokeWidth,rx:`${t.value.style.bars.borderRadius*l.proportion/12}%`,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,10,Q))),256))])):(e.openBlock(),e.createElementBlock("g",Z,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createBlock(F._sfc_main,{plot:{x:l.x+l.width/2,y:l.y+l.height/2},color:t.value.style.bars.colors.gradient.show?l.gradient:l.color,shape:t.value.style.bars.shape,radius:l.height*.4,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,8,["plot","color","shape","radius","class"]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle",x:l.textAnchor,y:l.y-t.value.style.labels.value.fontSize/3+t.value.style.labels.value.offsetY,"font-size":t.value.style.labels.value.fontSize,"font-weight":t.value.style.labels.value.bold?"bold":"normal",fill:t.value.style.labels.value.color},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,l.value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:l.value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[s.value],seriesIndex:s.value})),9,ee))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[l.valueLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:l.y+l.height+t.value.style.labels.valueLabel.fontSize,"font-size":t.value.style.labels.valueLabel.fontSize,"text-anchor":"middle",fill:t.value.style.labels.valueLabel.color},e.toDisplayString(l.valueLabel),9,te)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[l.timeLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:u.value.height-t.value.style.labels.timeLabel.fontSize/2,"font-size":t.value.style.labels.timeLabel.fontSize,fill:t.value.style.labels.timeLabel.color,"text-anchor":"middle"},e.toDisplayString(l.timeLabel),9,le)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{height:u.value.height,width:l.unitWidth,fill:"transparent",x:l.trapX,y:0,onMouseover:d=>s.value=n,onMouseleave:r[0]||(r[0]=d=>s.value=null),stroke:s.value!==null&&s.value===n?t.value.style.selector.stroke:"","stroke-width":s.value!==null&&s.value===n?t.value.style.selector.strokeWidth:0,rx:t.value.style.selector.borderRadius,"stroke-dasharray":t.value.style.selector.strokeDasharray,onClick:()=>$(l,n)},null,40,oe)]))),256))],8,I)):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",ae,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M.default,{key:3,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},se=A._export_sfc(ne,[["__scopeId","data-v-ad438c17"]]);exports.default=se;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-C_VTEz1N.cjs"),_=require("./useNestedProp-C7bLHE7v.cjs"),F=require("./Shape-DZRynz5E.cjs"),M=require("./vue-ui-skeleton-D1bJntn7.cjs"),O=require("./PackageVersion-CdmZAhdE.cjs"),A=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),H={key:0},q={key:1},I=["xmlns","viewBox"],U=["width","height"],W=["id"],j=["stop-color"],P=["stop-color"],G=["id"],T=["stop-color"],X=["stop-color"],Y=["id"],R=["stop-color"],J=["stop-color"],K={key:1},Q=["x","y","height","width","fill","stroke","stroke-width","rx"],Z={key:2},ee=["x","y","font-size","font-weight","fill"],te=["x","y","font-size","fill"],le=["x","y","font-size","fill"],oe=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],ae={key:2,ref:"source",dir:"auto"},ne={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(B,{emit:x}){const c=B;e.useCssVars(o=>({"9e84af8a":S.value}));const{vue_ui_sparkhistogram:E}=a.useConfig(),f=e.computed(()=>!!c.dataset&&c.dataset.length);e.onMounted(()=>{k()});function k(){a.objectIsEmpty(c.dataset)?a.error({componentName:"VueUiSparkHistogram",type:"dataset"}):c.dataset.forEach((o,r)=>{a.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["value"]}).forEach(l=>{a.error({componentName:"VueUiSparkHistogram",type:"datasetSerieAttribute",property:l,index:r})})})}const v=e.ref(a.createUid()),t=e.computed({get:()=>b(),set:o=>o});function b(){const o=_.useNestedProp({userConfig:c.config,defaultConfig:E});return o.theme?{..._.useNestedProp({userConfig:a.themes.vue_ui_sparkhistogram[o.theme]||c.config,defaultConfig:o})}:o}e.watch(()=>c.config,o=>{t.value=b(),k()},{deep:!0});const u=e.computed(()=>{const o=t.value.style.layout.height,r=t.value.style.layout.width,l=t.value.style.layout.padding.top,n=o-t.value.style.layout.padding.bottom,d=t.value.style.layout.padding.left,y=r-t.value.style.layout.padding.right,p=l+(o-l-t.value.style.layout.padding.bottom)/2,h=o-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,m=r-t.value.style.layout.padding.left-t.value.style.layout.padding.right;return{bottom:n,centerY:p,drawingHeight:h,drawingWidth:m,height:o,left:d,right:y,top:l,width:r}}),w=e.computed(()=>Math.max(...c.dataset.map(o=>Math.abs(o.value||0))));function C(o){return Math.abs(o)/w.value}const i=e.computed(()=>c.dataset.map((o,r)=>{const l=C(o.value||0),n=u.value.drawingHeight*l,d=u.value.drawingWidth/c.dataset.length,y=d*(t.value.style.bars.gap/100),p=d-y,h=u.value.centerY-n/2,m=u.value.left+(y/2+r*d),N=u.value.left+r*d,g=typeof o.intensity>"u"?100:Math.round(o.intensity*100),L=o.color?o.color:o.value>=0?a.setOpacity(t.value.style.bars.colors.positive,g):a.setOpacity(t.value.style.bars.colors.negative,g),V=o.color?o.color:o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,z=o.color?`url(#gradient_datapoint_${r}_${v.value})`:o.value>=0?`url(#gradient_positive_${r}_${v.value})`:`url(#gradient_negative_${r}_${v.value})`,D=m+p/2;return{...o,color:L,gradient:z,height:n,intensity:g,proportion:l,stroke:V,textAnchor:D,trapX:N,unitWidth:d,width:p,x:m,y:h}})),s=e.ref(null);function $(o,r){x("selectDatapoint",{datapoint:o,index:r})}const S=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily}`),onMouseleave:r[1]||(r[1]=l=>s.value=null)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),s.value!==null?(e.openBlock(),e.createElementBlock("span",H,"- "+e.toDisplayString(i.value[s.value].timeLabel||"")+" "+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,i.value[s.value].value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:i.value[s.value].value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[s.value],seriesIndex:s.value})),1)):e.createCommentVNode("",!0),![void 0,null].includes(s.value)&&![null,void 0].includes(i.value[s.value].valueLabel)?(e.openBlock(),e.createElementBlock("span",q,"("+e.toDisplayString(i.value[s.value].valueLabel||0)+")",1)):e.createCommentVNode("",!0)],4),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${u.value.width} ${u.value.height}`,style:{overflow:"visible"}},[e.createVNode(O._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width,height:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,U)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_positive_${n}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(t.value.style.bars.colors.positive,.05),l.intensity)},null,8,j),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.positive,l.intensity)},null,8,P)],8,W))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_negative_${n}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(t.value.style.bars.colors.negative,.05),l.intensity)},null,8,T),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.negative,l.intensity)},null,8,X)],8,G))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_datapoint_${n}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(l.color,.05),l.intensity)},null,8,R),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(l.color,l.intensity)},null,8,J)],8,Y))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,height:l.height,width:l.width,fill:t.value.style.bars.colors.gradient.show?l.gradient:l.color,stroke:l.stroke,"stroke-width":t.value.style.bars.strokeWidth,rx:`${t.value.style.bars.borderRadius*l.proportion/12}%`,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,10,Q))),256))])):(e.openBlock(),e.createElementBlock("g",Z,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createBlock(F._sfc_main,{plot:{x:l.x+l.width/2,y:l.y+l.height/2},color:t.value.style.bars.colors.gradient.show?l.gradient:l.color,shape:t.value.style.bars.shape,radius:l.height*.4,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,8,["plot","color","shape","radius","class"]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle",x:l.textAnchor,y:l.y-t.value.style.labels.value.fontSize/3+t.value.style.labels.value.offsetY,"font-size":t.value.style.labels.value.fontSize,"font-weight":t.value.style.labels.value.bold?"bold":"normal",fill:t.value.style.labels.value.color},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,l.value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:l.value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[s.value],seriesIndex:s.value})),9,ee))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[l.valueLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:l.y+l.height+t.value.style.labels.valueLabel.fontSize,"font-size":t.value.style.labels.valueLabel.fontSize,"text-anchor":"middle",fill:t.value.style.labels.valueLabel.color},e.toDisplayString(l.valueLabel),9,te)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[l.timeLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:u.value.height-t.value.style.labels.timeLabel.fontSize/2,"font-size":t.value.style.labels.timeLabel.fontSize,fill:t.value.style.labels.timeLabel.color,"text-anchor":"middle"},e.toDisplayString(l.timeLabel),9,le)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{height:u.value.height,width:l.unitWidth,fill:"transparent",x:l.trapX,y:0,onMouseover:d=>s.value=n,onMouseleave:r[0]||(r[0]=d=>s.value=null),stroke:s.value!==null&&s.value===n?t.value.style.selector.stroke:"","stroke-width":s.value!==null&&s.value===n?t.value.style.selector.strokeWidth:0,rx:t.value.style.selector.borderRadius,"stroke-dasharray":t.value.style.selector.strokeDasharray,onClick:()=>$(l,n)},null,40,oe)]))),256))],8,I)):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",ae,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M.default,{key:3,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},se=A._export_sfc(ne,[["__scopeId","data-v-ad438c17"]]);exports.default=se;
@@ -1,9 +1,9 @@
1
1
  import { useCssVars as K, computed as _, onMounted as Q, ref as N, watch as Z, openBlock as a, createElementBlock as s, normalizeStyle as $, createElementVNode as h, createTextVNode as ee, toDisplayString as p, unref as n, createCommentVNode as c, createVNode as te, renderSlot as D, Fragment as f, renderList as g, normalizeClass as I, createBlock as V } from "vue";
2
- import { u as le, o as ae, e as E, g as se, c as oe, t as ue, s as b, i as H, f as F, X as re, w as z } from "./index-BpkxOytt.js";
3
- import { u as O } from "./useNestedProp-XW-Jo5ax.js";
4
- import { _ as ie } from "./Shape-DUv8_NIN.js";
5
- import ne from "./vue-ui-skeleton-CwwH64lu.js";
6
- import { _ as ve } from "./PackageVersion-CT0EYzFv.js";
2
+ import { u as le, o as ae, e as E, g as se, c as oe, t as ue, s as b, i as H, f as F, X as re, w as z } from "./index-DiqenHrX.js";
3
+ import { u as O } from "./useNestedProp-B3CQkP95.js";
4
+ import { _ as ie } from "./Shape-CB0mE9KP.js";
5
+ import ne from "./vue-ui-skeleton-BwWHgSoq.js";
6
+ import { _ as ve } from "./PackageVersion-iscNRe7N.js";
7
7
  import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
8
  const ce = { key: 0 }, ye = { key: 1 }, he = ["xmlns", "viewBox"], fe = ["width", "height"], ge = ["id"], pe = ["stop-color"], be = ["stop-color"], me = ["id"], _e = ["stop-color"], xe = ["stop-color"], ke = ["id"], we = ["stop-color"], $e = ["stop-color"], Ce = { key: 1 }, Le = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], ze = { key: 2 }, Se = ["x", "y", "font-size", "font-weight", "fill"], Me = ["x", "y", "font-size", "fill"], Ae = ["x", "y", "font-size", "fill"], Ne = ["height", "width", "x", "onMouseover", "stroke", "stroke-width", "rx", "stroke-dasharray", "onClick"], De = {
9
9
  key: 2,
@@ -1,9 +1,9 @@
1
1
  import { computed as c, ref as b, watch as U, onMounted as re, openBlock as r, createElementBlock as i, normalizeStyle as C, renderSlot as M, normalizeProps as ie, guardReactiveProps as de, createElementVNode as f, toDisplayString as X, createCommentVNode as h, unref as v, createVNode as ve, Fragment as D, renderList as P, createBlock as ce } from "vue";
2
- import { u as he, c as ye, t as fe, C as q, a0 as T, o as pe, e as Z, g as ge, w as I, a1 as me, a2 as be, X as ke, s as V, S as H, a3 as Y, i as J, f as K } from "./index-BpkxOytt.js";
3
- import { u as Q } from "./useNestedProp-XW-Jo5ax.js";
4
- import _e from "./vue-ui-skeleton-CwwH64lu.js";
2
+ import { u as he, c as ye, t as fe, C as q, a0 as T, o as pe, e as Z, g as ge, w as I, a1 as me, a2 as be, X as ke, s as V, S as H, a3 as Y, i as J, f as K } from "./index-DiqenHrX.js";
3
+ import { u as Q } from "./useNestedProp-B3CQkP95.js";
4
+ import _e from "./vue-ui-skeleton-BwWHgSoq.js";
5
5
  import { t as xe, u as we } from "./useResponsive-CoxXLe23.js";
6
- import { _ as $e } from "./PackageVersion-CT0EYzFv.js";
6
+ import { _ as $e } from "./PackageVersion-iscNRe7N.js";
7
7
  import { _ as Le } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
8
  const Ne = ["id"], Ce = ["xmlns", "viewBox"], Me = ["width", "height"], Ie = ["id"], Ve = ["stop-color"], Se = ["stop-color"], ze = ["id"], Ae = ["stop-color"], We = ["stop-color"], De = ["id"], Pe = ["stop-color"], Te = ["stop-color"], Fe = { key: 1 }, Oe = ["d", "fill"], Be = ["d", "fill"], Ee = ["d", "stroke", "stroke-width"], Ge = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], je = ["x", "y", "width", "height", "fill", "rx"], Re = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Ue = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], Xe = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], qe = ["x", "y", "font-size", "font-weight", "fill"], Ze = ["x", "y", "height", "width", "onMouseenter", "onClick"], He = {
9
9
  __name: "vue-ui-sparkline",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index--Qj2S12-.cjs"),S=require("./useNestedProp-C5bsAL3S.cjs"),q=require("./vue-ui-skeleton-BVhUJapg.cjs"),P=require("./useResponsive-BJ7DTGpm.cjs"),G=require("./PackageVersion-D3FEDqJ4.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),H=["id"],U=["xmlns","viewBox"],X=["width","height"],Z=["id"],Y=["stop-color"],J=["stop-color"],K=["id"],Q=["stop-color"],ee=["stop-color"],te=["id"],le=["stop-color"],ae=["stop-color"],oe={key:1},ne=["d","fill"],re=["d","fill"],ue=["d","stroke","stroke-width"],se=["x1","x2","y1","y2","stroke","stroke-width"],ie=["x","y","width","height","fill","rx"],de=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ce=["x1","x2","y1","y2","stroke","stroke-dasharray","stroke-width"],ve=["cx","cy","r","fill","stroke","stroke-width"],he=["x","y","font-size","font-weight","fill"],ye=["x","y","height","width","onMouseenter","onClick"],fe={__name:"vue-ui-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},showInfo:{type:Boolean,default:!0},selectedIndex:{type:Number,default:void 0},heightRatio:{type:Number,default:1},forcedPadding:{type:Number,default:30}},emits:["hoverIndex","selectDatapoint"],setup(p,{emit:x}){const u=p,{vue_ui_sparkline:z}=r.useConfig(),k=e.computed(()=>!!u.dataset&&u.dataset.length),v=e.ref(r.createUid()),w=e.ref(null),V=e.ref(null),C=e.ref(null),t=e.computed({get:()=>L(),set:l=>l});function L(){const l=S.useNestedProp({userConfig:u.config,defaultConfig:z});let o={};return l.theme?o={...S.useNestedProp({userConfig:r.themes.vue_ui_sparkline[l.theme]||u.config,defaultConfig:l})}:o=l,u.config&&r.hasDeepProperty(u.config,"style.scaleMin")?o.style.scaleMin=u.config.style.scaleMin:o.style.scaleMin=null,u.config&&r.hasDeepProperty(u.config,"style.scaleMax")?o.style.scaleMax=u.config.style.scaleMax:o.style.scaleMax=null,o}const b=e.computed(()=>r.largestTriangleThreeBucketsArrayObjects({data:u.dataset,threshold:t.value.downsample.threshold}));e.watch(()=>u.config,l=>{t.value=L(),$(),n.value.chartWidth=t.value.style.chartWidth},{deep:!0}),e.watch(()=>u.dataset,l=>{f.value=r.largestTriangleThreeBucketsArrayObjects({data:u.dataset.map(o=>({...o,value:[void 0].includes(o.value)?null:o.value})),threshold:t.value.downsample.threshold})},{deep:!0});const f=e.ref(A());function A(){return r.largestTriangleThreeBucketsArrayObjects({data:u.dataset.map(l=>t.value.style.animation.show?{...l,value:null}:{...l,value:[void 0].includes(l.value)?null:l.value}),threshold:t.value.downsample.threshold})}const E=e.ref(null);e.onMounted(()=>{if($(),t.value.style.animation.show&&u.dataset.length>1){let a=function(){o<b.value.length?(f.value.push(b.value[o]),setTimeout(()=>{requestAnimationFrame(a)},l)):f.value=b.value,o+=1};f.value=[];const l=t.value.style.animation.animationFrames/u.dataset.length;let o=0;a()}});function $(){if(r.objectIsEmpty(u.dataset)?r.error({componentName:"VueUiSparkline",type:"dataset"}):u.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["period","value"]}).forEach(a=>{r.error({componentName:"VueUiSparkline",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=P.throttle(()=>{const{width:o,height:a}=P.useResponsive({chart:w.value,title:t.value.style.title.show&&u.showInfo?V.value:null,source:C.value});requestAnimationFrame(()=>{n.value.width=o,n.value.height=a,n.value.chartWidth=t.value.style.chartWidth/500*o,n.value.padding=u.forcedPadding/500*o})});E.value=new ResizeObserver(l),E.value.observe(w.value.parentNode)}}const n=e.ref({height:80*u.heightRatio,width:500,chartWidth:t.value.style.chartWidth,padding:u.forcedPadding}),s=e.computed(()=>{const{top:l,right:o,bottom:a,left:i}=t.value.style.padding;return{top:l,left:i,right:n.value.width-o,bottom:n.value.height-a,start:u.showInfo&&t.value.style.dataLabel.show&&t.value.style.dataLabel.position==="left"?n.value.width-n.value.chartWidth+i:n.value.padding+i,width:u.showInfo&&t.value.style.dataLabel.show?n.value.chartWidth-i-o:n.value.width-n.value.padding-i-o,height:n.value.height-l-a}}),N=e.computed(()=>[null,void 0].includes(t.value.style.scaleMin)?Math.min(...f.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0)):t.value.style.scaleMin),D=e.computed(()=>[null,void 0].includes(t.value.style.scaleMax)?Math.max(...f.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0)):t.value.style.scaleMax),m=e.computed(()=>{const l=N.value>=0?0:N.value;return Math.abs(l)}),O=e.computed(()=>D.value+m.value),_=e.computed(()=>s.value.bottom-s.value.height*B(m.value));function B(l){return l/O.value}const h=e.computed(()=>b.value.length-1),d=e.computed(()=>f.value.map((l,o)=>{const a=isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0;return{absoluteValue:a,period:l.period,plotValue:a+m.value,toMax:B(a+m.value),x:s.value.start+o*(s.value.width/(h.value+1)>n.padding?n.padding:s.value.width/(h.value+1)),y:s.value.bottom-s.value.height*B(a+m.value),id:`plot_${v.value}_${o}`,color:g.value?t.value.style.bar.color:t.value.style.area.useGradient?r.shiftHue(t.value.style.line.color,.05*(1-o/h.value)):t.value.style.line.color,width:s.value.width/(h.value+1)>n.padding?n.padding:s.value.width/(h.value+1)}})),T=e.computed(()=>{const l={x:d.value[0].x||0,y:(n.value.height||0)-6},o={x:d.value[d.value.length-1].x||0,y:(n.value.height||0)-6},a=[];return d.value.forEach(i=>{a.push(`${i.x||0},${i.y||0} `)}),[l.x,l.y,...a,o.x,o.y].toString()}),c=e.ref(void 0);function W(l,o){c.value=l,x("hoverIndex",{index:o})}function F(){c.value=void 0,x("hoverIndex",{index:void 0})}const y=e.computed(()=>{if(k.value){const l=d.value.map(a=>a.absoluteValue),o=l.reduce((a,i)=>a+i,0);return{latest:d.value[d.value.length-1].absoluteValue,sum:o,average:o/d.value.length,median:r.calcMedian(l),trend:r.calcLinearProgression(d.value.map(({x:a,y:i,absoluteValue:I})=>({x:a,y:i,value:I}))).trend}}else return{latest:null,sum:null,average:null,median:null,trend:null}}),M=e.computed(()=>k.value?t.value.style.dataLabel.valueType==="latest"?y.value.latest:t.value.style.dataLabel.valueType==="sum"?y.value.sum:t.value.style.dataLabel.valueType==="average"?y.value.average:0:0),g=e.computed(()=>t.value.type&&t.value.type==="bar");function j(l,o){x("selectDatapoint",{datapoint:l,index:o})}return(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"sparklineChart",ref:w,class:"vue-ui-sparkline",id:v.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily};`)},[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps({selected:c.value,latest:y.value.latest,sum:y.value.sum,average:y.value.average,median:y.value.median,trend:y.value.trend})),void 0,!0),t.value.style.title.show&&p.showInfo?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:V,class:"vue-ui-sparkline-title",style:e.normalizeStyle(`display:flex;align-items:center;width:100%;color:${t.value.style.title.color};background:${t.value.style.backgroundColor};justify-content:${t.value.style.title.textAlign==="left"?"flex-start":t.value.style.title.textAlign==="right"?"flex-end":"center"};height:${t.value.style.title.fontSize*2}px;font-size:${t.value.style.title.fontSize}px;font-weight:${t.value.style.title.bold?"bold":"normal"};`)},[e.createElementVNode("span",{style:e.normalizeStyle(`padding:${t.value.style.title.textAlign==="left"?"0 0 0 12px":t.value.style.title.textAlign==="right"?"0 12px 0 0":"0"}`)},e.toDisplayString(c.value?c.value.period:t.value.style.title.text),5)],4)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${n.value.width} ${n.value.height}`,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};overflow:visible`)},[e.createVNode(G._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,X)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkline_gradient_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.area.color,.05),t.value.style.area.opacity)},null,8,Y),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,J)],8,Z),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_pos_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.bar.color},null,8,Q),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.shiftHue)(t.value.style.bar.color,.05)},null,8,ee)],8,K),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_neg_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.shiftHue)(t.value.style.bar.color,.05)},null,8,le),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.bar.color},null,8,ae)],8,te)]),t.value.style.area.show&&!g.value&&d.value[0]?(e.openBlock(),e.createElementBlock("g",oe,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${d.value[0].x},${s.value.bottom} ${e.unref(r.createSmoothPath)(d.value)} L ${d.value.at(-1).x},${s.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,ne)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${T.value}Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,re))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&!g.value?(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${e.unref(r.createSmoothPath)(d.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,ue)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,i)=>(e.openBlock(),e.createElementBlock("g",null,[i<d.value.length-1&&!t.value.style.line.smooth&&!g.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:d.value[i+1].x,y1:a.y||0,y2:d.value[i+1].y||0,stroke:a.color,"stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round","shape-rendering":"geometricPrecision"},null,8,se)):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("rect",{key:1,x:a.x-a.width/2,y:a.absoluteValue>0?a.y:_.value,width:a.width,height:Math.abs(a.y-_.value),fill:a.absoluteValue>0?`url(#sparkline_bar_gradient_pos_${v.value})`:`url(#sparkline_bar_gradient_neg_${v.value})`,rx:t.value.style.bar.borderRadius},null,8,ie)):e.createCommentVNode("",!0),t.value.style.verticalIndicator.show&&(c.value&&a.id===c.value.id||p.selectedIndex===i)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.x,x2:a.x,y1:s.value.top-6,y2:s.value.bottom,stroke:t.value.style.verticalIndicator.color||a.color,"stroke-width":t.value.style.verticalIndicator.strokeWidth,"stroke-linecap":"round","stroke-dasharray":t.value.style.verticalIndicator.strokeDasharray||0},null,8,de)):e.createCommentVNode("",!0)]))),256)),N.value<0?(e.openBlock(),e.createElementBlock("line",{key:3,x1:s.value.start,x2:s.value.start+s.value.width-16,y1:e.unref(r.forceValidValue)(_.value,s.value.bottom),y2:e.unref(r.forceValidValue)(_.value,s.value.bottom),stroke:t.value.style.zeroLine.color,"stroke-dasharray":t.value.style.zeroLine.strokeWidth*2,"stroke-width":t.value.style.zeroLine.strokeWidth,"stroke-linecap":"round"},null,8,ce)):e.createCommentVNode("",!0),t.value.style.plot.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:4},e.renderList(d.value,(a,i)=>(e.openBlock(),e.createElementBlock("g",null,[c.value&&a.id===c.value.id||p.selectedIndex===i?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:a.x,cy:a.y,r:t.value.style.plot.radius,fill:a.color,stroke:t.value.style.plot.stroke,"stroke-width":t.value.style.plot.strokeWidth},null,8,ve)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),p.showInfo&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:5,x:t.value.style.dataLabel.position==="left"?12+t.value.style.dataLabel.offsetX:s.value.width+12+t.value.style.dataLabel.offsetX,y:n.value.height/2+t.value.style.dataLabel.fontSize/2.5+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,"font-weight":t.value.style.dataLabel.bold?"bold":"normal",fill:t.value.style.dataLabel.color},e.toDisplayString(c.value?e.unref(r.applyDataLabel)(t.value.style.dataLabel.formatter,c.value.absoluteValue,e.unref(r.dataLabel)({p:t.value.style.dataLabel.prefix,v:c.value.absoluteValue,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}),{datapoint:c.value}):e.unref(r.applyDataLabel)(t.value.style.dataLabel.formatter,M.value,e.unref(r.dataLabel)({p:t.value.style.dataLabel.prefix,v:M.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}))),9,he)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,i)=>(e.openBlock(),e.createElementBlock("rect",{x:a.x-(s.value.width/(h.value+1)>n.value.padding?n.value.padding:s.value.width/(h.value+1))/2,y:s.value.top-6,height:s.value.height+6,width:s.value.width/(h.value+1)>n.value.padding?n.value.padding:s.value.width/(h.value+1),fill:"transparent",onMouseenter:I=>W(a,i),onMouseleave:F,onClick:()=>j(a,i)},null,40,ye))),256)),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],12,U)):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"source",ref:C,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(q.default,{key:3,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,H))}},pe=R._export_sfc(fe,[["__scopeId","data-v-db8c64e5"]]);exports.default=pe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-C_VTEz1N.cjs"),S=require("./useNestedProp-C7bLHE7v.cjs"),q=require("./vue-ui-skeleton-D1bJntn7.cjs"),P=require("./useResponsive-BJ7DTGpm.cjs"),G=require("./PackageVersion-CdmZAhdE.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),H=["id"],U=["xmlns","viewBox"],X=["width","height"],Z=["id"],Y=["stop-color"],J=["stop-color"],K=["id"],Q=["stop-color"],ee=["stop-color"],te=["id"],le=["stop-color"],ae=["stop-color"],oe={key:1},ne=["d","fill"],re=["d","fill"],ue=["d","stroke","stroke-width"],se=["x1","x2","y1","y2","stroke","stroke-width"],ie=["x","y","width","height","fill","rx"],de=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ce=["x1","x2","y1","y2","stroke","stroke-dasharray","stroke-width"],ve=["cx","cy","r","fill","stroke","stroke-width"],he=["x","y","font-size","font-weight","fill"],ye=["x","y","height","width","onMouseenter","onClick"],fe={__name:"vue-ui-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},showInfo:{type:Boolean,default:!0},selectedIndex:{type:Number,default:void 0},heightRatio:{type:Number,default:1},forcedPadding:{type:Number,default:30}},emits:["hoverIndex","selectDatapoint"],setup(p,{emit:x}){const u=p,{vue_ui_sparkline:z}=r.useConfig(),k=e.computed(()=>!!u.dataset&&u.dataset.length),v=e.ref(r.createUid()),w=e.ref(null),V=e.ref(null),C=e.ref(null),t=e.computed({get:()=>L(),set:l=>l});function L(){const l=S.useNestedProp({userConfig:u.config,defaultConfig:z});let o={};return l.theme?o={...S.useNestedProp({userConfig:r.themes.vue_ui_sparkline[l.theme]||u.config,defaultConfig:l})}:o=l,u.config&&r.hasDeepProperty(u.config,"style.scaleMin")?o.style.scaleMin=u.config.style.scaleMin:o.style.scaleMin=null,u.config&&r.hasDeepProperty(u.config,"style.scaleMax")?o.style.scaleMax=u.config.style.scaleMax:o.style.scaleMax=null,o}const b=e.computed(()=>r.largestTriangleThreeBucketsArrayObjects({data:u.dataset,threshold:t.value.downsample.threshold}));e.watch(()=>u.config,l=>{t.value=L(),$(),n.value.chartWidth=t.value.style.chartWidth},{deep:!0}),e.watch(()=>u.dataset,l=>{f.value=r.largestTriangleThreeBucketsArrayObjects({data:u.dataset.map(o=>({...o,value:[void 0].includes(o.value)?null:o.value})),threshold:t.value.downsample.threshold})},{deep:!0});const f=e.ref(A());function A(){return r.largestTriangleThreeBucketsArrayObjects({data:u.dataset.map(l=>t.value.style.animation.show?{...l,value:null}:{...l,value:[void 0].includes(l.value)?null:l.value}),threshold:t.value.downsample.threshold})}const E=e.ref(null);e.onMounted(()=>{if($(),t.value.style.animation.show&&u.dataset.length>1){let a=function(){o<b.value.length?(f.value.push(b.value[o]),setTimeout(()=>{requestAnimationFrame(a)},l)):f.value=b.value,o+=1};f.value=[];const l=t.value.style.animation.animationFrames/u.dataset.length;let o=0;a()}});function $(){if(r.objectIsEmpty(u.dataset)?r.error({componentName:"VueUiSparkline",type:"dataset"}):u.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["period","value"]}).forEach(a=>{r.error({componentName:"VueUiSparkline",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=P.throttle(()=>{const{width:o,height:a}=P.useResponsive({chart:w.value,title:t.value.style.title.show&&u.showInfo?V.value:null,source:C.value});requestAnimationFrame(()=>{n.value.width=o,n.value.height=a,n.value.chartWidth=t.value.style.chartWidth/500*o,n.value.padding=u.forcedPadding/500*o})});E.value=new ResizeObserver(l),E.value.observe(w.value.parentNode)}}const n=e.ref({height:80*u.heightRatio,width:500,chartWidth:t.value.style.chartWidth,padding:u.forcedPadding}),s=e.computed(()=>{const{top:l,right:o,bottom:a,left:i}=t.value.style.padding;return{top:l,left:i,right:n.value.width-o,bottom:n.value.height-a,start:u.showInfo&&t.value.style.dataLabel.show&&t.value.style.dataLabel.position==="left"?n.value.width-n.value.chartWidth+i:n.value.padding+i,width:u.showInfo&&t.value.style.dataLabel.show?n.value.chartWidth-i-o:n.value.width-n.value.padding-i-o,height:n.value.height-l-a}}),N=e.computed(()=>[null,void 0].includes(t.value.style.scaleMin)?Math.min(...f.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0)):t.value.style.scaleMin),D=e.computed(()=>[null,void 0].includes(t.value.style.scaleMax)?Math.max(...f.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0)):t.value.style.scaleMax),m=e.computed(()=>{const l=N.value>=0?0:N.value;return Math.abs(l)}),O=e.computed(()=>D.value+m.value),_=e.computed(()=>s.value.bottom-s.value.height*B(m.value));function B(l){return l/O.value}const h=e.computed(()=>b.value.length-1),d=e.computed(()=>f.value.map((l,o)=>{const a=isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0;return{absoluteValue:a,period:l.period,plotValue:a+m.value,toMax:B(a+m.value),x:s.value.start+o*(s.value.width/(h.value+1)>n.padding?n.padding:s.value.width/(h.value+1)),y:s.value.bottom-s.value.height*B(a+m.value),id:`plot_${v.value}_${o}`,color:g.value?t.value.style.bar.color:t.value.style.area.useGradient?r.shiftHue(t.value.style.line.color,.05*(1-o/h.value)):t.value.style.line.color,width:s.value.width/(h.value+1)>n.padding?n.padding:s.value.width/(h.value+1)}})),T=e.computed(()=>{const l={x:d.value[0].x||0,y:(n.value.height||0)-6},o={x:d.value[d.value.length-1].x||0,y:(n.value.height||0)-6},a=[];return d.value.forEach(i=>{a.push(`${i.x||0},${i.y||0} `)}),[l.x,l.y,...a,o.x,o.y].toString()}),c=e.ref(void 0);function W(l,o){c.value=l,x("hoverIndex",{index:o})}function F(){c.value=void 0,x("hoverIndex",{index:void 0})}const y=e.computed(()=>{if(k.value){const l=d.value.map(a=>a.absoluteValue),o=l.reduce((a,i)=>a+i,0);return{latest:d.value[d.value.length-1].absoluteValue,sum:o,average:o/d.value.length,median:r.calcMedian(l),trend:r.calcLinearProgression(d.value.map(({x:a,y:i,absoluteValue:I})=>({x:a,y:i,value:I}))).trend}}else return{latest:null,sum:null,average:null,median:null,trend:null}}),M=e.computed(()=>k.value?t.value.style.dataLabel.valueType==="latest"?y.value.latest:t.value.style.dataLabel.valueType==="sum"?y.value.sum:t.value.style.dataLabel.valueType==="average"?y.value.average:0:0),g=e.computed(()=>t.value.type&&t.value.type==="bar");function j(l,o){x("selectDatapoint",{datapoint:l,index:o})}return(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"sparklineChart",ref:w,class:"vue-ui-sparkline",id:v.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily};`)},[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps({selected:c.value,latest:y.value.latest,sum:y.value.sum,average:y.value.average,median:y.value.median,trend:y.value.trend})),void 0,!0),t.value.style.title.show&&p.showInfo?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:V,class:"vue-ui-sparkline-title",style:e.normalizeStyle(`display:flex;align-items:center;width:100%;color:${t.value.style.title.color};background:${t.value.style.backgroundColor};justify-content:${t.value.style.title.textAlign==="left"?"flex-start":t.value.style.title.textAlign==="right"?"flex-end":"center"};height:${t.value.style.title.fontSize*2}px;font-size:${t.value.style.title.fontSize}px;font-weight:${t.value.style.title.bold?"bold":"normal"};`)},[e.createElementVNode("span",{style:e.normalizeStyle(`padding:${t.value.style.title.textAlign==="left"?"0 0 0 12px":t.value.style.title.textAlign==="right"?"0 12px 0 0":"0"}`)},e.toDisplayString(c.value?c.value.period:t.value.style.title.text),5)],4)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${n.value.width} ${n.value.height}`,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};overflow:visible`)},[e.createVNode(G._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,X)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkline_gradient_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.area.color,.05),t.value.style.area.opacity)},null,8,Y),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,J)],8,Z),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_pos_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.bar.color},null,8,Q),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.shiftHue)(t.value.style.bar.color,.05)},null,8,ee)],8,K),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_neg_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.shiftHue)(t.value.style.bar.color,.05)},null,8,le),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.bar.color},null,8,ae)],8,te)]),t.value.style.area.show&&!g.value&&d.value[0]?(e.openBlock(),e.createElementBlock("g",oe,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${d.value[0].x},${s.value.bottom} ${e.unref(r.createSmoothPath)(d.value)} L ${d.value.at(-1).x},${s.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,ne)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${T.value}Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,re))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&!g.value?(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${e.unref(r.createSmoothPath)(d.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,ue)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,i)=>(e.openBlock(),e.createElementBlock("g",null,[i<d.value.length-1&&!t.value.style.line.smooth&&!g.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:d.value[i+1].x,y1:a.y||0,y2:d.value[i+1].y||0,stroke:a.color,"stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round","shape-rendering":"geometricPrecision"},null,8,se)):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("rect",{key:1,x:a.x-a.width/2,y:a.absoluteValue>0?a.y:_.value,width:a.width,height:Math.abs(a.y-_.value),fill:a.absoluteValue>0?`url(#sparkline_bar_gradient_pos_${v.value})`:`url(#sparkline_bar_gradient_neg_${v.value})`,rx:t.value.style.bar.borderRadius},null,8,ie)):e.createCommentVNode("",!0),t.value.style.verticalIndicator.show&&(c.value&&a.id===c.value.id||p.selectedIndex===i)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.x,x2:a.x,y1:s.value.top-6,y2:s.value.bottom,stroke:t.value.style.verticalIndicator.color||a.color,"stroke-width":t.value.style.verticalIndicator.strokeWidth,"stroke-linecap":"round","stroke-dasharray":t.value.style.verticalIndicator.strokeDasharray||0},null,8,de)):e.createCommentVNode("",!0)]))),256)),N.value<0?(e.openBlock(),e.createElementBlock("line",{key:3,x1:s.value.start,x2:s.value.start+s.value.width-16,y1:e.unref(r.forceValidValue)(_.value,s.value.bottom),y2:e.unref(r.forceValidValue)(_.value,s.value.bottom),stroke:t.value.style.zeroLine.color,"stroke-dasharray":t.value.style.zeroLine.strokeWidth*2,"stroke-width":t.value.style.zeroLine.strokeWidth,"stroke-linecap":"round"},null,8,ce)):e.createCommentVNode("",!0),t.value.style.plot.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:4},e.renderList(d.value,(a,i)=>(e.openBlock(),e.createElementBlock("g",null,[c.value&&a.id===c.value.id||p.selectedIndex===i?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:a.x,cy:a.y,r:t.value.style.plot.radius,fill:a.color,stroke:t.value.style.plot.stroke,"stroke-width":t.value.style.plot.strokeWidth},null,8,ve)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),p.showInfo&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:5,x:t.value.style.dataLabel.position==="left"?12+t.value.style.dataLabel.offsetX:s.value.width+12+t.value.style.dataLabel.offsetX,y:n.value.height/2+t.value.style.dataLabel.fontSize/2.5+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,"font-weight":t.value.style.dataLabel.bold?"bold":"normal",fill:t.value.style.dataLabel.color},e.toDisplayString(c.value?e.unref(r.applyDataLabel)(t.value.style.dataLabel.formatter,c.value.absoluteValue,e.unref(r.dataLabel)({p:t.value.style.dataLabel.prefix,v:c.value.absoluteValue,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}),{datapoint:c.value}):e.unref(r.applyDataLabel)(t.value.style.dataLabel.formatter,M.value,e.unref(r.dataLabel)({p:t.value.style.dataLabel.prefix,v:M.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}))),9,he)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,i)=>(e.openBlock(),e.createElementBlock("rect",{x:a.x-(s.value.width/(h.value+1)>n.value.padding?n.value.padding:s.value.width/(h.value+1))/2,y:s.value.top-6,height:s.value.height+6,width:s.value.width/(h.value+1)>n.value.padding?n.value.padding:s.value.width/(h.value+1),fill:"transparent",onMouseenter:I=>W(a,i),onMouseleave:F,onClick:()=>j(a,i)},null,40,ye))),256)),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],12,U)):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"source",ref:C,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(q.default,{key:3,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,H))}},pe=R._export_sfc(fe,[["__scopeId","data-v-db8c64e5"]]);exports.default=pe;
@@ -1,9 +1,9 @@
1
1
  import { useSlots as ne, onMounted as Y, computed as m, ref as d, watch as G, openBlock as s, createElementBlock as r, normalizeStyle as v, createElementVNode as p, toDisplayString as w, createCommentVNode as y, unref as C, createVNode as q, Fragment as x, renderList as $, normalizeClass as F, createBlock as ue, withCtx as H, renderSlot as U, normalizeProps as X, guardReactiveProps as J } from "vue";
2
- import { u as ie, c as K, t as ce, a as de, p as i, d as N, b as ve, o as pe, e as Q, g as ge, f as V, X as fe, s as he, w as ye, i as Z, x as me } from "./index-BpkxOytt.js";
3
- import { u as ee } from "./useNestedProp-XW-Jo5ax.js";
4
- import ke from "./vue-ui-skeleton-CwwH64lu.js";
5
- import { _ as be } from "./PackageVersion-CT0EYzFv.js";
6
- import { _ as _e } from "./Tooltip-vdsIKE2_.js";
2
+ import { u as ie, c as K, t as ce, a as de, p as i, d as N, b as ve, o as pe, e as Q, g as ge, f as V, X as fe, s as he, w as ye, i as Z, x as me } from "./index-DiqenHrX.js";
3
+ import { u as ee } from "./useNestedProp-B3CQkP95.js";
4
+ import ke from "./vue-ui-skeleton-BwWHgSoq.js";
5
+ import { _ as be } from "./PackageVersion-iscNRe7N.js";
6
+ import { _ as _e } from "./Tooltip-ZYQUXVWv.js";
7
7
  import { _ as we } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
8
  const Ce = ["xmlns", "viewBox"], xe = ["id"], $e = ["stop-color"], Se = ["stop-color"], ze = ["stop-color"], Pe = {
9
9
  id: "stackPill",