vue-data-ui 2.6.43 → 2.6.44-beta.1

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 (161) hide show
  1. package/README.md +1 -1
  2. package/dist/{Arrow-Bz8n6ycZ.js → Arrow-BIsMVdtn.js} +1 -1
  3. package/dist/{Arrow-C0LFlY5e.cjs → Arrow-DGay3Mq4.cjs} +1 -1
  4. package/dist/{BaseIcon-BySu2V3d.js → BaseIcon-BkG8oy7S.js} +4 -3
  5. package/dist/{BaseIcon-Bolmn50v.cjs → BaseIcon-CNr0ynIA.cjs} +1 -1
  6. package/dist/{ColorPicker-DxSpy5e2.js → ColorPicker-BolaeJP4.js} +3 -3
  7. package/dist/{ColorPicker-DUYztfXY.cjs → ColorPicker-Dk1k_q80.cjs} +1 -1
  8. package/dist/{DataTable-C5EKEHsp.js → DataTable-CMtUsL3k.js} +2 -2
  9. package/dist/{DataTable-DLUrhKkw.cjs → DataTable-ChXRV1c1.cjs} +1 -1
  10. package/dist/{Legend-DSzoXS-3.js → Legend-CNvH8CO_.js} +2 -2
  11. package/dist/{Legend-CHEbsxt2.cjs → Legend-DpeobB-J.cjs} +1 -1
  12. package/dist/PackageVersion-C9u9Pwxk.cjs +1 -0
  13. package/dist/{PackageVersion-BtrpyUPC.js → PackageVersion-DpTw0H2K.js} +3 -3
  14. package/dist/{PenAndPaper-DO7-xSYx.cjs → PenAndPaper-B3u1FDG_.cjs} +1 -1
  15. package/dist/{PenAndPaper-zjBsZuuq.js → PenAndPaper-CdyjU7Bn.js} +3 -3
  16. package/dist/{Shape-DzIamXsi.js → Shape--0X0ca4a.js} +1 -1
  17. package/dist/{Shape-_vXgfvZP.cjs → Shape-gapU-fux.cjs} +1 -1
  18. package/dist/{Slicer-DfOxim5W.js → Slicer-CZQhXgqN.js} +2 -2
  19. package/dist/{Slicer-oUyDkRff.cjs → Slicer-hryDvXmh.cjs} +1 -1
  20. package/dist/{Title-BS1zFx79.js → Title-CUTRN3ig.js} +1 -1
  21. package/dist/{Title-BuZQSd23.cjs → Title-DRo5NxnS.cjs} +1 -1
  22. package/dist/{Tooltip-BNOd4lK1.js → Tooltip-BvEZcxbc.js} +1 -1
  23. package/dist/{Tooltip-BiBcMMP3.cjs → Tooltip-Cbjcw6Jz.cjs} +1 -1
  24. package/dist/documentation/installation.md +2 -2
  25. package/dist/{index-CzjsUYng.js → index-DQCJDAtd.js} +1 -1
  26. package/dist/{index-Zf2fUMIO.cjs → index-hcakVXU6.cjs} +1 -1
  27. package/dist/style.css +1 -1
  28. package/dist/types/vue-data-ui.d.cts +2 -1
  29. package/dist/types/vue-data-ui.d.ts +2 -1
  30. package/dist/{useNestedProp-BcSwG6N0.cjs → useNestedProp-DCfCPrTU.cjs} +1 -1
  31. package/dist/{useNestedProp-RC28MVml.js → useNestedProp-WD6Qn-jr.js} +1 -1
  32. package/dist/{usePrinter-BGPa8G48.cjs → usePrinter-Dv0RMCX1.cjs} +1 -1
  33. package/dist/{usePrinter-CUsjlfpk.js → usePrinter-FM1PheWO.js} +1 -1
  34. package/dist/{vue-data-ui-UWKC8R6X.js → vue-data-ui-Byi8FBJM.js} +61 -61
  35. package/dist/{vue-data-ui-BjDb6Vux.cjs → vue-data-ui-CDVMMv3d.cjs} +1 -1
  36. package/dist/vue-data-ui.cjs +1 -1
  37. package/dist/vue-data-ui.js +1 -1
  38. package/dist/{vue-ui-3d-bar-5IdXbLb9.js → vue-ui-3d-bar-CZJ6Zo23.js} +9 -9
  39. package/dist/{vue-ui-3d-bar-WS8tL_FC.cjs → vue-ui-3d-bar-DJUNcjtc.cjs} +1 -1
  40. package/dist/{vue-ui-accordion-ConQex-C.js → vue-ui-accordion-BckkmphN.js} +3 -3
  41. package/dist/{vue-ui-accordion-CnGQYWdI.cjs → vue-ui-accordion-BfFg-sVJ.cjs} +1 -1
  42. package/dist/{vue-ui-age-pyramid-CP6Fd6zD.js → vue-ui-age-pyramid-DgGMb_Xp.js} +10 -10
  43. package/dist/{vue-ui-age-pyramid-CehCcwLC.cjs → vue-ui-age-pyramid-DunUSOpu.cjs} +1 -1
  44. package/dist/{vue-ui-annotator-CZ1F-VY2.cjs → vue-ui-annotator-B3G-FQLy.cjs} +1 -1
  45. package/dist/{vue-ui-annotator-C5NyXYkj.js → vue-ui-annotator-B_MQz1AA.js} +1 -1
  46. package/dist/{vue-ui-bullet-Djg_HER0.cjs → vue-ui-bullet-8Kk3qeH_.cjs} +1 -1
  47. package/dist/{vue-ui-bullet-DKqr4Rcd.js → vue-ui-bullet-DYpgP9uL.js} +8 -8
  48. package/dist/{vue-ui-candlestick-BU9MfLPt.cjs → vue-ui-candlestick-BSB_x1u_.cjs} +1 -1
  49. package/dist/{vue-ui-candlestick-DtVpSOzB.js → vue-ui-candlestick-DnY1Z5sA.js} +11 -11
  50. package/dist/{vue-ui-carousel-table-CYcrhcdv.js → vue-ui-carousel-table-Cd_2r90R.js} +4 -4
  51. package/dist/{vue-ui-carousel-table-EhzhIcW2.cjs → vue-ui-carousel-table-DNnBKojP.cjs} +1 -1
  52. package/dist/{vue-ui-chestnut-D5LH5zdq.js → vue-ui-chestnut-B1NWviH6.js} +8 -8
  53. package/dist/{vue-ui-chestnut-C3UVgMQo.cjs → vue-ui-chestnut-WcoV2zl6.cjs} +1 -1
  54. package/dist/{vue-ui-circle-pack-BL753_Uo.js → vue-ui-circle-pack-CxxPZDLO.js} +9 -9
  55. package/dist/{vue-ui-circle-pack-CJNBxO1N.cjs → vue-ui-circle-pack-D32Zo62g.cjs} +1 -1
  56. package/dist/{vue-ui-cursor-B2MxKYNM.cjs → vue-ui-cursor-BNdKosWF.cjs} +1 -1
  57. package/dist/{vue-ui-cursor-Fe70t9Bl.js → vue-ui-cursor-Df3A3tId.js} +2 -2
  58. package/dist/{vue-ui-dashboard-QOSGNhC9.js → vue-ui-dashboard-BD3v2yB2.js} +2 -2
  59. package/dist/{vue-ui-dashboard-C11-dJEl.cjs → vue-ui-dashboard-SRIs3xRd.cjs} +1 -1
  60. package/dist/{vue-ui-digits-C5D_xk6r.js → vue-ui-digits-6ixh72pY.js} +2 -2
  61. package/dist/{vue-ui-digits-H19fVeIu.cjs → vue-ui-digits-DiwdDWIi.cjs} +1 -1
  62. package/dist/{vue-ui-donut-Bd1mIoux.js → vue-ui-donut-BLrLvjYC.js} +12 -12
  63. package/dist/{vue-ui-donut-CwJg0emK.cjs → vue-ui-donut-O_bMKpp0.cjs} +1 -1
  64. package/dist/{vue-ui-donut-evolution-DTjfMlNh.cjs → vue-ui-donut-evolution-COqxvgDm.cjs} +1 -1
  65. package/dist/{vue-ui-donut-evolution-CFQ4lMWd.js → vue-ui-donut-evolution-DFeCoFLD.js} +11 -11
  66. package/dist/{vue-ui-dumbbell-KJd6G5qD.js → vue-ui-dumbbell-BdpORbsw.js} +10 -10
  67. package/dist/{vue-ui-dumbbell-CBsxNWVV.cjs → vue-ui-dumbbell-CnvbgjAc.cjs} +1 -1
  68. package/dist/{vue-ui-flow-DAxMQfhu.js → vue-ui-flow-Bq5TNf0q.js} +9 -9
  69. package/dist/{vue-ui-flow-D3gtil-H.cjs → vue-ui-flow-DZW6HtMG.cjs} +1 -1
  70. package/dist/{vue-ui-funnel-CkCNCQ1F.cjs → vue-ui-funnel-BTs69xlm.cjs} +1 -1
  71. package/dist/{vue-ui-funnel-PvEDGsfj.js → vue-ui-funnel-CdTmW2Dv.js} +9 -9
  72. package/dist/{vue-ui-galaxy-DjeZUCuE.cjs → vue-ui-galaxy-Bks-C0T9.cjs} +1 -1
  73. package/dist/{vue-ui-galaxy-DfAfjTDr.js → vue-ui-galaxy-Dc38cJm-.js} +11 -11
  74. package/dist/{vue-ui-gauge-DBGqwPZs.js → vue-ui-gauge-BPe-Wpxa.js} +7 -7
  75. package/dist/{vue-ui-gauge-BfDY3XHF.cjs → vue-ui-gauge-BTCMT6kZ.cjs} +1 -1
  76. package/dist/{vue-ui-gizmo-yWBMeY1e.cjs → vue-ui-gizmo-CUKcPiKM.cjs} +1 -1
  77. package/dist/{vue-ui-gizmo-BT0DknqD.js → vue-ui-gizmo-DBnHMb9H.js} +3 -3
  78. package/dist/{vue-ui-heatmap-Bkd2G7uW.cjs → vue-ui-heatmap-BufOxGx7.cjs} +1 -1
  79. package/dist/{vue-ui-heatmap-D_Tr1Hot.js → vue-ui-heatmap-C1YhyvNx.js} +10 -10
  80. package/dist/{vue-ui-history-plot-B-VBGxRa.cjs → vue-ui-history-plot-DWAkb7b_.cjs} +1 -1
  81. package/dist/{vue-ui-history-plot-BG4nMlp7.js → vue-ui-history-plot-oMjKnlp3.js} +11 -11
  82. package/dist/{vue-ui-kpi-WqBG4upX.js → vue-ui-kpi-BLHpMBxd.js} +3 -3
  83. package/dist/{vue-ui-kpi-LMze0lWI.cjs → vue-ui-kpi-ufMTcMPT.cjs} +1 -1
  84. package/dist/{vue-ui-mini-loader-eRXubESG.js → vue-ui-mini-loader-BLsy0k_A.js} +2 -2
  85. package/dist/{vue-ui-mini-loader-CoVSw6EU.cjs → vue-ui-mini-loader-T1GcVUKb.cjs} +1 -1
  86. package/dist/{vue-ui-molecule-Cu6_FpHD.cjs → vue-ui-molecule-B3GExfFV.cjs} +1 -1
  87. package/dist/{vue-ui-molecule-BcpPXHgo.js → vue-ui-molecule-BnCvFuus.js} +10 -10
  88. package/dist/{vue-ui-mood-radar-DlTYq1OE.cjs → vue-ui-mood-radar-Cxt_fhUy.cjs} +1 -1
  89. package/dist/{vue-ui-mood-radar-CBFN1PfU.js → vue-ui-mood-radar-Yso-s4of.js} +11 -11
  90. package/dist/{vue-ui-nested-donuts-c6Dc8R-H.cjs → vue-ui-nested-donuts-BBzhXq6P.cjs} +1 -1
  91. package/dist/{vue-ui-nested-donuts-Cq0PWd1N.js → vue-ui-nested-donuts-BfRWRgkw.js} +11 -11
  92. package/dist/{vue-ui-onion-BFDD4SN8.js → vue-ui-onion-Dt4TWe6t.js} +11 -11
  93. package/dist/{vue-ui-onion-Bd2D2Vld.cjs → vue-ui-onion-OEnDmiOB.cjs} +1 -1
  94. package/dist/{vue-ui-parallel-coordinate-plot-BTCld26y.cjs → vue-ui-parallel-coordinate-plot-BnAAzLae.cjs} +1 -1
  95. package/dist/{vue-ui-parallel-coordinate-plot-YF_ssmB7.js → vue-ui-parallel-coordinate-plot-DGLh0ael.js} +12 -12
  96. package/dist/{vue-ui-quadrant-B659Q5iR.cjs → vue-ui-quadrant-B6E6v1xG.cjs} +1 -1
  97. package/dist/{vue-ui-quadrant-BeEBWrsG.js → vue-ui-quadrant-nHh7YqG6.js} +12 -12
  98. package/dist/{vue-ui-quick-chart-w0LaPcFd.cjs → vue-ui-quick-chart-Dr20RPOf.cjs} +1 -1
  99. package/dist/{vue-ui-quick-chart-Ba6-ZZk9.js → vue-ui-quick-chart-SGvhac9d.js} +9 -9
  100. package/dist/{vue-ui-radar-DAUGZC3X.cjs → vue-ui-radar-BRtf9Ps5.cjs} +1 -1
  101. package/dist/{vue-ui-radar-Dgu656_F.js → vue-ui-radar-CcdphM-O.js} +12 -12
  102. package/dist/{vue-ui-rating-BIk1Ip7B.js → vue-ui-rating-DRlCBElN.js} +2 -2
  103. package/dist/{vue-ui-rating-BPgLpyoa.cjs → vue-ui-rating-DgwurE4x.cjs} +1 -1
  104. package/dist/{vue-ui-relation-circle-Dz_Du_5e.cjs → vue-ui-relation-circle-B4TErNPT.cjs} +1 -1
  105. package/dist/{vue-ui-relation-circle-CUU2Y66i.js → vue-ui-relation-circle-g1JlL2f2.js} +7 -7
  106. package/dist/{vue-ui-rings-DnZ3fSvL.js → vue-ui-rings-BM9uYCUU.js} +12 -12
  107. package/dist/{vue-ui-rings-B7kPmx8M.cjs → vue-ui-rings-CBeL3HIa.cjs} +1 -1
  108. package/dist/{vue-ui-scatter-Cej6ox0t.js → vue-ui-scatter-DT_QBIeo.js} +12 -12
  109. package/dist/{vue-ui-scatter-GfJALpzt.cjs → vue-ui-scatter-gkSm6cYR.cjs} +1 -1
  110. package/dist/{vue-ui-screenshot-DkuLYple.cjs → vue-ui-screenshot-2leQxim8.cjs} +1 -1
  111. package/dist/{vue-ui-screenshot-B4HNd362.js → vue-ui-screenshot-DGbuK-RT.js} +1 -1
  112. package/dist/{vue-ui-skeleton-XUKIcV-3.js → vue-ui-skeleton-BTfzoolB.js} +3 -3
  113. package/dist/{vue-ui-skeleton-CiGqKHDK.cjs → vue-ui-skeleton-FXF7pMM8.cjs} +1 -1
  114. package/dist/{vue-ui-smiley-Dfo5zjHi.cjs → vue-ui-smiley-Dijs1HRf.cjs} +1 -1
  115. package/dist/{vue-ui-smiley-BUgxzenz.js → vue-ui-smiley-rwgYU3A2.js} +2 -2
  116. package/dist/{vue-ui-spark-trend-CvsL1wxJ.js → vue-ui-spark-trend-Cj0B6A_8.js} +5 -5
  117. package/dist/{vue-ui-spark-trend-EK-zZg4U.cjs → vue-ui-spark-trend-D62Z0XyP.cjs} +1 -1
  118. package/dist/{vue-ui-sparkbar-QL_FFOna.js → vue-ui-sparkbar-B3R7uA_h.js} +4 -4
  119. package/dist/{vue-ui-sparkbar-CvWbFKnW.cjs → vue-ui-sparkbar-BB_OXsVx.cjs} +1 -1
  120. package/dist/{vue-ui-sparkgauge-g51bSap-.js → vue-ui-sparkgauge-20iVOcBv.js} +4 -4
  121. package/dist/{vue-ui-sparkgauge-CX9L1CCZ.cjs → vue-ui-sparkgauge-CV3MRct2.cjs} +1 -1
  122. package/dist/{vue-ui-sparkhistogram-C_RkgtwV.cjs → vue-ui-sparkhistogram-ASA1Izuq.cjs} +1 -1
  123. package/dist/{vue-ui-sparkhistogram-TwShrJAd.js → vue-ui-sparkhistogram-C8WGWsjQ.js} +5 -5
  124. package/dist/{vue-ui-sparkline-PoXP19tk.js → vue-ui-sparkline-C4MRWUBA.js} +4 -4
  125. package/dist/{vue-ui-sparkline-B-1mFAFf.cjs → vue-ui-sparkline-jX03CtPG.cjs} +1 -1
  126. package/dist/{vue-ui-sparkstackbar-BtOZ3Xvo.cjs → vue-ui-sparkstackbar-BcCB8Id3.cjs} +1 -1
  127. package/dist/{vue-ui-sparkstackbar-C6K5d1a8.js → vue-ui-sparkstackbar-C6jgtbtu.js} +5 -5
  128. package/dist/{vue-ui-stackbar-DP0kLFaZ.cjs → vue-ui-stackbar-CVS_1WMe.cjs} +1 -1
  129. package/dist/{vue-ui-stackbar-DoAp1q1k.js → vue-ui-stackbar-CkEnBXay.js} +13 -13
  130. package/dist/{vue-ui-strip-plot-C6r7wmgw.cjs → vue-ui-strip-plot-DBabY03i.cjs} +1 -1
  131. package/dist/{vue-ui-strip-plot-DFyDRMeJ.js → vue-ui-strip-plot-ES7BwMoF.js} +11 -11
  132. package/dist/{vue-ui-table-COQQvYVK.js → vue-ui-table-CCwzUTnA.js} +1 -1
  133. package/dist/{vue-ui-table-BoFUMpxE.cjs → vue-ui-table-Cf1g82vY.cjs} +1 -1
  134. package/dist/{vue-ui-table-heatmap-DEmDa6Mg.cjs → vue-ui-table-heatmap-CyHzz9rv.cjs} +1 -1
  135. package/dist/{vue-ui-table-heatmap-D1a4Jbfq.js → vue-ui-table-heatmap-DtzKVrpK.js} +4 -4
  136. package/dist/{vue-ui-table-sparkline-CH1R9R6a.js → vue-ui-table-sparkline-95pS3pBt.js} +5 -5
  137. package/dist/{vue-ui-table-sparkline-bsEJsgny.cjs → vue-ui-table-sparkline-CLAybURJ.cjs} +1 -1
  138. package/dist/{vue-ui-thermometer-CZIBISGi.js → vue-ui-thermometer-BQTWXeqU.js} +7 -7
  139. package/dist/{vue-ui-thermometer-1Gl2tpWy.cjs → vue-ui-thermometer-Cm_KBNVZ.cjs} +1 -1
  140. package/dist/{vue-ui-timer-DXZ_7lOR.cjs → vue-ui-timer-B0D_sZmm.cjs} +1 -1
  141. package/dist/{vue-ui-timer-CL0vPqGn.js → vue-ui-timer-tLNMbgLM.js} +5 -5
  142. package/dist/{vue-ui-tiremarks-D8rdzzQb.cjs → vue-ui-tiremarks-CWIZflLH.cjs} +1 -1
  143. package/dist/{vue-ui-tiremarks-DdwzlfZg.js → vue-ui-tiremarks-nIj267dw.js} +7 -7
  144. package/dist/vue-ui-treemap-DRDVV_Da.cjs +1 -0
  145. package/dist/vue-ui-treemap-Js5dG3BL.js +931 -0
  146. package/dist/{vue-ui-vertical-bar-BOpex-Xq.js → vue-ui-vertical-bar-NCB7yZQF.js} +12 -12
  147. package/dist/{vue-ui-vertical-bar-pwqVkPXV.cjs → vue-ui-vertical-bar-fh2mIy4s.cjs} +1 -1
  148. package/dist/{vue-ui-waffle-Bd_6bbdt.cjs → vue-ui-waffle-BTz72Vui.cjs} +1 -1
  149. package/dist/{vue-ui-waffle-CW6THuE8.js → vue-ui-waffle-C70QQeU2.js} +12 -12
  150. package/dist/{vue-ui-wheel-9xdDEq_q.js → vue-ui-wheel-BKAEI3lz.js} +7 -7
  151. package/dist/{vue-ui-wheel-BO3Xqux3.cjs → vue-ui-wheel-C9DYeu9D.cjs} +1 -1
  152. package/dist/{vue-ui-word-cloud-CJjvWjsc.cjs → vue-ui-word-cloud-BgxihpLV.cjs} +1 -1
  153. package/dist/{vue-ui-word-cloud-DAlBxzeY.js → vue-ui-word-cloud-ChIuYeMe.js} +10 -10
  154. package/dist/{vue-ui-xy-BIBSJN48.cjs → vue-ui-xy-BSKwWGbp.cjs} +1 -1
  155. package/dist/{vue-ui-xy-CDGKX79V.js → vue-ui-xy-DHgnF-1N.js} +14 -14
  156. package/dist/{vue-ui-xy-canvas-BN7OU1Ak.cjs → vue-ui-xy-canvas-BstJgVjY.cjs} +1 -1
  157. package/dist/{vue-ui-xy-canvas-C8YlVwjI.js → vue-ui-xy-canvas-xQvriWI0.js} +12 -12
  158. package/package.json +1 -1
  159. package/dist/PackageVersion-B6sWtTA0.cjs +0 -1
  160. package/dist/vue-ui-treemap-B3N6hzO2.js +0 -857
  161. package/dist/vue-ui-treemap-CTcY1Qxh.cjs +0 -1
@@ -1,11 +1,11 @@
1
1
  import { useCssVars as ke, computed as d, onMounted as be, ref as p, watch as xe, createElementBlock as u, openBlock as l, unref as h, normalizeStyle as te, normalizeClass as F, createBlock as I, createCommentVNode as i, createSlots as _e, withCtx as x, renderSlot as f, normalizeProps as O, guardReactiveProps as A, createVNode as we, createElementVNode as v, Fragment as M, renderList as se, toDisplayString as Ce } from "vue";
2
- import { u as $e, o as Pe, e as oe, g as Fe, c as Ie, t as Oe, p as _, a as Ae, b as Me, v as g, d as U, X as Ue, s as Ye, i as Ne, f as Se } from "./index-CzjsUYng.js";
3
- import { _ as Te } from "./Title-BS1zFx79.js";
4
- import { u as qe, U as Le } from "./usePrinter-CUsjlfpk.js";
5
- import Ve from "./vue-ui-skeleton-XUKIcV-3.js";
6
- import { u as le } from "./useNestedProp-RC28MVml.js";
7
- import { _ as Ee } from "./PackageVersion-BtrpyUPC.js";
8
- import { P as Ge } from "./PenAndPaper-zjBsZuuq.js";
2
+ import { u as $e, o as Pe, e as oe, g as Fe, c as Ie, t as Oe, p as _, a as Ae, b as Me, v as g, d as U, X as Ue, s as Ye, i as Ne, f as Se } from "./index-DQCJDAtd.js";
3
+ import { _ as Te } from "./Title-CUTRN3ig.js";
4
+ import { u as qe, U as Le } from "./usePrinter-FM1PheWO.js";
5
+ import Ve from "./vue-ui-skeleton-BTfzoolB.js";
6
+ import { u as le } from "./useNestedProp-WD6Qn-jr.js";
7
+ import { _ as Ee } from "./PackageVersion-DpTw0H2K.js";
8
+ import { P as Ge } from "./PenAndPaper-CdyjU7Bn.js";
9
9
  import { u as We } from "./useUserOptionState-BIvW1Kz7.js";
10
10
  import { u as je } from "./useChartAccessibility-BWojgys7.js";
11
11
  import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-Zf2fUMIO.cjs"),oe=require("./Title-BuZQSd23.cjs"),Y=require("./usePrinter-BGPa8G48.cjs"),re=require("./vue-ui-skeleton-CiGqKHDK.cjs"),z=require("./useNestedProp-BcSwG6N0.cjs"),le=require("./PackageVersion-B6sWtTA0.cjs"),ae=require("./PenAndPaper-DO7-xSYx.cjs"),se=require("./useUserOptionState-BgepsfED.cjs"),ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=["id"],ce={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},de={key:2,style:"width:100%"},he=["xmlns","viewBox"],ve=["width","height"],me={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},pe=["fill"],ye=["id"],fe=["stop-color"],ge=["stop-color"],ke=["stop-color"],be={"clip-path":"url(#vueUiPill)"},xe=["x","y","height","width"],Ce=["x","y","height","width","fill"],we=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],Ne=["x1","x2","y1","y2","stroke-width","stroke"],Be=["x1","x2","y1","y2","stroke-width","stroke"],Pe=["x1","x2","y1","y2","stroke-width","stroke"],Ve=["x1","x2","y1","y2","stroke-width","stroke"],Ee=["x1","x2","y1","y2","stroke-width","stroke"],$e=["x1","x2","y1","y2","stroke-width","stroke"],Fe=["x","y","height","width"],Oe=["y","x","fill","font-size","font-weight"],Ie={key:5,class:"vue-data-ui-watermark"},Se={key:6,ref:"source",dir:"auto"},qe={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:L}){e.useCssVars(r=>({"3272b184":X.value,"0885078a":D.value,"09e2f6f7":j.value}));const{vue_ui_thermometer:G}=a.useConfig(),s=m,g=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{B()});function B(){a.objectIsEmpty(s.dataset)?a.error({componentName:"VueUiThermometer",type:"dataset"}):a.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(r=>{a.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:r})})}const d=e.ref(a.createUid()),P=e.ref(null),V=e.ref(0),E=e.ref(0),t=e.computed({get:()=>I(),set:r=>r}),{userOptionsVisible:k,setUserOptionsVisibility:$,keepUserOptionState:F}=se.useUserOptionState({config:t.value}),{svgRef:O}=ne.useChartAccessibility({config:t.value.style.title});function I(){const r=z.useNestedProp({userConfig:s.config,defaultConfig:G});return r.theme?{...z.useNestedProp({userConfig:a.themes.vue_ui_thermometer[r.theme]||s.config,defaultConfig:r}),customPalette:a.themePalettes[r.theme]||a.palette}:r}e.watch(()=>s.config,r=>{t.value=I(),k.value=!t.value.userOptions.showOnChartHover,B(),E.value+=1},{deep:!0});const{isPrinting:S,isImaging:q,generatePdf:A,generateImage:T}=Y.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer",options:t.value.userOptions.print}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),R=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>s.dataset.steps||10),i=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function y(r,n,o){const u=[],_=M(r),N=M(n);for(let v=0;v<o;v++){const Q=b(_.red,N.red,v,o),Z=b(_.green,N.green,v,o),ee=b(_.blue,N.blue,v,o),te=`#${x(Q)}${x(Z)}${x(ee)}`;u.push(te)}return u}function M(r){const n=r.slice(1);return{red:parseInt(n.slice(0,2),16),green:parseInt(n.slice(2,4),16),blue:parseInt(n.slice(4,6),16)}}function b(r,n,o,u){return Math.round(r+(n-r)*o/u)}function x(r){return r.toString(16).padStart(2,"0")}const l=e.computed(()=>{const r=R.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:r,left:i.value.left,right:r-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),W=e.computed(()=>l.value),C=e.computed(()=>{const r=a.checkNaN(s.dataset.from)<0?Math.abs(a.checkNaN(s.dataset.from)):a.checkNaN(s.dataset.from),n=a.checkNaN(s.dataset.to)<0?Math.abs(a.checkNaN(s.dataset.to)):a.checkNaN(s.dataset.to);let o=0;return a.checkNaN(s.dataset.to)>0?o=r+n:r>n?o=r-n:o=n-r,(1-(Math.abs(a.checkNaN(s.dataset.from))+a.checkNaN(s.dataset.value))/o)*(l.value.height-i.value.top-i.value.bottom)}),j=e.computed(()=>`${C.value}px`),D=e.computed(()=>`${l.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),X=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),J=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return y(p.value[0]||a.palette[0],a.convertColorToHex(s.dataset.colors.to),c.value||10);if(!s.dataset.colors.to)return y(a.convertColorToHex(s.dataset.colors.from),p.value[1]||a.palette[1],c.value||10)}else return y(p.value[1]||a.palette[1],p.value[0]||a.palette[0],c.value||10);return y(a.convertColorToHex(s.dataset.colors.from),a.convertColorToHex(s.dataset.colors.to),c.value||10)}),U=e.computed(()=>{const r=[];let n=0;const o=l.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)r.push({x:l.value.left,y:l.value.top+u,qYLess:l.value.top+u+o/c.value/4,halfY:l.value.top+u+o/c.value/2,qYMore:l.value.top+u+o/c.value/4*3,color:J.value[n],height:o/c.value}),n+=1;return r}),h=e.ref(!1);function K(r){h.value=r,V.value+=1}const f=e.ref(!1);function w(){f.value=!f.value}return L({generatePdf:A,generateImage:T,toggleAnnotator:w}),(r,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:P,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref($)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref($)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ae.PenAndPaper,{key:0,svgRef:e.unref(O),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:w},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",ce,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",de,[(e.openBlock(),e.createBlock(oe._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&g.value&&(e.unref(F)||e.unref(k))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref:"details",key:`user_options_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(q),isPrinting:e.unref(S),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:P.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,onToggleFullscreen:K,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(T),onToggleAnnotator:w,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(k)?"visible":"hidden":"visible"})},e.createSlots({_:2},[r.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:u})=>[e.renderSlot(r.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:u})),void 0,!0)]),key:"0"}:void 0,r.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,r.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,r.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(r.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"3"}:void 0,r.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(r.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:O,xmlns:e.unref(a.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:"background:transparent"},[e.createVNode(le._sfc_main),r.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(r.$slots,"chart-background",{},void 0,!0)],8,ve)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",me,[e.createElementVNode("rect",{x:"0",y:"0",width:"1",height:"1",rx:"0.5",ry:"0.07",fill:t.value.style.chart.backgroundColor},null,8,pe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${u}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,fe),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(a.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,ge),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,ke)],8,ye))),256))]),e.createElementVNode("g",be,[e.createElementVNode("rect",{x:l.value.left,y:l.value.top,height:l.value.height-i.value.top-i.value.bottom,width:l.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,xe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,Ce),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,we)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,_e)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:o.x,x2:o.x+2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ne)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.x,x2:o.x+2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Be)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.value.right,x2:l.value.right-10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Pe)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.value.right,x2:l.value.right-5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ve)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:l.value.right,x2:l.value.right-2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ee)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.value.right,x2:l.value.right-2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,$e)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("rect",{class:e.normalizeClass({"vue-ui-thermometer-temperature":t.value.style.chart.animation.use}),x:l.value.left,y:l.value.top,height:C.value,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,Fe)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:C.value+l.value.top+t.value.style.chart.label.fontSize/3,x:l.value.left-10,"text-anchor":"end",fill:t.value.style.chart.label.color,"font-size":t.value.style.chart.label.fontSize,"font-weight":t.value.style.chart.label.bold?"bold":"normal"},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(a.dataLabel)({p:t.value.style.chart.label.prefix,v:m.dataset.value,s:t.value.style.chart.label.suffix,r:t.value.style.chart.label.rounding}),{datapoint:m.dataset})),11,Oe),e.renderSlot(r.$slots,"svg",{svg:W.value},void 0,!0)],10,he)):e.createCommentVNode("",!0),r.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(r.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),r.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(r.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ie))}},Ae=ue._export_sfc(qe,[["__scopeId","data-v-b0579fd1"]]);exports.default=Ae;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-hcakVXU6.cjs"),oe=require("./Title-DRo5NxnS.cjs"),Y=require("./usePrinter-Dv0RMCX1.cjs"),re=require("./vue-ui-skeleton-FXF7pMM8.cjs"),z=require("./useNestedProp-DCfCPrTU.cjs"),le=require("./PackageVersion-C9u9Pwxk.cjs"),ae=require("./PenAndPaper-B3u1FDG_.cjs"),se=require("./useUserOptionState-BgepsfED.cjs"),ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=["id"],ce={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},de={key:2,style:"width:100%"},he=["xmlns","viewBox"],ve=["width","height"],me={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},pe=["fill"],ye=["id"],fe=["stop-color"],ge=["stop-color"],ke=["stop-color"],be={"clip-path":"url(#vueUiPill)"},xe=["x","y","height","width"],Ce=["x","y","height","width","fill"],we=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],Ne=["x1","x2","y1","y2","stroke-width","stroke"],Be=["x1","x2","y1","y2","stroke-width","stroke"],Pe=["x1","x2","y1","y2","stroke-width","stroke"],Ve=["x1","x2","y1","y2","stroke-width","stroke"],Ee=["x1","x2","y1","y2","stroke-width","stroke"],$e=["x1","x2","y1","y2","stroke-width","stroke"],Fe=["x","y","height","width"],Oe=["y","x","fill","font-size","font-weight"],Ie={key:5,class:"vue-data-ui-watermark"},Se={key:6,ref:"source",dir:"auto"},qe={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:L}){e.useCssVars(r=>({"3272b184":X.value,"0885078a":D.value,"09e2f6f7":j.value}));const{vue_ui_thermometer:G}=a.useConfig(),s=m,g=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{B()});function B(){a.objectIsEmpty(s.dataset)?a.error({componentName:"VueUiThermometer",type:"dataset"}):a.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(r=>{a.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:r})})}const d=e.ref(a.createUid()),P=e.ref(null),V=e.ref(0),E=e.ref(0),t=e.computed({get:()=>I(),set:r=>r}),{userOptionsVisible:k,setUserOptionsVisibility:$,keepUserOptionState:F}=se.useUserOptionState({config:t.value}),{svgRef:O}=ne.useChartAccessibility({config:t.value.style.title});function I(){const r=z.useNestedProp({userConfig:s.config,defaultConfig:G});return r.theme?{...z.useNestedProp({userConfig:a.themes.vue_ui_thermometer[r.theme]||s.config,defaultConfig:r}),customPalette:a.themePalettes[r.theme]||a.palette}:r}e.watch(()=>s.config,r=>{t.value=I(),k.value=!t.value.userOptions.showOnChartHover,B(),E.value+=1},{deep:!0});const{isPrinting:S,isImaging:q,generatePdf:A,generateImage:T}=Y.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer",options:t.value.userOptions.print}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),R=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>s.dataset.steps||10),i=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function y(r,n,o){const u=[],_=M(r),N=M(n);for(let v=0;v<o;v++){const Q=b(_.red,N.red,v,o),Z=b(_.green,N.green,v,o),ee=b(_.blue,N.blue,v,o),te=`#${x(Q)}${x(Z)}${x(ee)}`;u.push(te)}return u}function M(r){const n=r.slice(1);return{red:parseInt(n.slice(0,2),16),green:parseInt(n.slice(2,4),16),blue:parseInt(n.slice(4,6),16)}}function b(r,n,o,u){return Math.round(r+(n-r)*o/u)}function x(r){return r.toString(16).padStart(2,"0")}const l=e.computed(()=>{const r=R.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:r,left:i.value.left,right:r-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),W=e.computed(()=>l.value),C=e.computed(()=>{const r=a.checkNaN(s.dataset.from)<0?Math.abs(a.checkNaN(s.dataset.from)):a.checkNaN(s.dataset.from),n=a.checkNaN(s.dataset.to)<0?Math.abs(a.checkNaN(s.dataset.to)):a.checkNaN(s.dataset.to);let o=0;return a.checkNaN(s.dataset.to)>0?o=r+n:r>n?o=r-n:o=n-r,(1-(Math.abs(a.checkNaN(s.dataset.from))+a.checkNaN(s.dataset.value))/o)*(l.value.height-i.value.top-i.value.bottom)}),j=e.computed(()=>`${C.value}px`),D=e.computed(()=>`${l.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),X=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),J=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return y(p.value[0]||a.palette[0],a.convertColorToHex(s.dataset.colors.to),c.value||10);if(!s.dataset.colors.to)return y(a.convertColorToHex(s.dataset.colors.from),p.value[1]||a.palette[1],c.value||10)}else return y(p.value[1]||a.palette[1],p.value[0]||a.palette[0],c.value||10);return y(a.convertColorToHex(s.dataset.colors.from),a.convertColorToHex(s.dataset.colors.to),c.value||10)}),U=e.computed(()=>{const r=[];let n=0;const o=l.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)r.push({x:l.value.left,y:l.value.top+u,qYLess:l.value.top+u+o/c.value/4,halfY:l.value.top+u+o/c.value/2,qYMore:l.value.top+u+o/c.value/4*3,color:J.value[n],height:o/c.value}),n+=1;return r}),h=e.ref(!1);function K(r){h.value=r,V.value+=1}const f=e.ref(!1);function w(){f.value=!f.value}return L({generatePdf:A,generateImage:T,toggleAnnotator:w}),(r,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:P,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref($)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref($)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ae.PenAndPaper,{key:0,svgRef:e.unref(O),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:w},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",ce,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",de,[(e.openBlock(),e.createBlock(oe._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&g.value&&(e.unref(F)||e.unref(k))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref:"details",key:`user_options_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(q),isPrinting:e.unref(S),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:P.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,onToggleFullscreen:K,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(T),onToggleAnnotator:w,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(k)?"visible":"hidden":"visible"})},e.createSlots({_:2},[r.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:u})=>[e.renderSlot(r.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:u})),void 0,!0)]),key:"0"}:void 0,r.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,r.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,r.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(r.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"3"}:void 0,r.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(r.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:O,xmlns:e.unref(a.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:"background:transparent"},[e.createVNode(le._sfc_main),r.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(r.$slots,"chart-background",{},void 0,!0)],8,ve)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",me,[e.createElementVNode("rect",{x:"0",y:"0",width:"1",height:"1",rx:"0.5",ry:"0.07",fill:t.value.style.chart.backgroundColor},null,8,pe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${u}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,fe),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(a.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,ge),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,ke)],8,ye))),256))]),e.createElementVNode("g",be,[e.createElementVNode("rect",{x:l.value.left,y:l.value.top,height:l.value.height-i.value.top-i.value.bottom,width:l.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,xe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,Ce),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,we)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,_e)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:o.x,x2:o.x+2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ne)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.x,x2:o.x+2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Be)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.value.right,x2:l.value.right-10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Pe)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.value.right,x2:l.value.right-5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ve)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:l.value.right,x2:l.value.right-2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ee)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.value.right,x2:l.value.right-2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,$e)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("rect",{class:e.normalizeClass({"vue-ui-thermometer-temperature":t.value.style.chart.animation.use}),x:l.value.left,y:l.value.top,height:C.value,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,Fe)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:C.value+l.value.top+t.value.style.chart.label.fontSize/3,x:l.value.left-10,"text-anchor":"end",fill:t.value.style.chart.label.color,"font-size":t.value.style.chart.label.fontSize,"font-weight":t.value.style.chart.label.bold?"bold":"normal"},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(a.dataLabel)({p:t.value.style.chart.label.prefix,v:m.dataset.value,s:t.value.style.chart.label.suffix,r:t.value.style.chart.label.rounding}),{datapoint:m.dataset})),11,Oe),e.renderSlot(r.$slots,"svg",{svg:W.value},void 0,!0)],10,he)):e.createCommentVNode("",!0),r.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(r.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),r.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(r.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ie))}},Ae=ue._export_sfc(qe,[["__scopeId","data-v-b0579fd1"]]);exports.default=Ae;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),j=require("./useNestedProp-BcSwG6N0.cjs"),w=require("./index-Zf2fUMIO.cjs"),D=require("./useResponsive-N8jl0-aC.cjs"),B=require("./BaseIcon-Bolmn50v.cjs"),O=require("./Title-BuZQSd23.cjs"),U=require("./PackageVersion-B6sWtTA0.cjs"),W=require("./useChartAccessibility-Cm7nkzTG.cjs"),G=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class X{constructor(T,V,S,M=!0,h=!0){this.interval=V,this.elapsed=0,this.isPaused=!1;const g=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),j=require("./useNestedProp-DCfCPrTU.cjs"),w=require("./index-hcakVXU6.cjs"),D=require("./useResponsive-N8jl0-aC.cjs"),B=require("./BaseIcon-CNr0ynIA.cjs"),O=require("./Title-DRo5NxnS.cjs"),U=require("./PackageVersion-C9u9Pwxk.cjs"),W=require("./useChartAccessibility-Cm7nkzTG.cjs"),G=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class X{constructor(T,V,S,M=!0,h=!0){this.interval=V,this.elapsed=0,this.isPaused=!1;const g=`
2
2
  let interval;
3
3
  let elapsed = 0;
4
4
  let paused = false;
@@ -1,10 +1,10 @@
1
1
  import { ref as i, onMounted as Z, computed as z, onBeforeUnmount as ee, watch as te, createElementBlock as o, openBlock as l, normalizeStyle as p, createCommentVNode as d, createElementVNode as _, createBlock as ae, unref as se, createVNode as C, renderSlot as H, mergeProps as q, normalizeProps as W, guardReactiveProps as G, toDisplayString as le } from "vue";
2
- import { u as oe } from "./useNestedProp-RC28MVml.js";
3
- import { u as re, c as ue, X as ie, F as V } from "./index-CzjsUYng.js";
2
+ import { u as oe } from "./useNestedProp-WD6Qn-jr.js";
3
+ import { u as re, c as ue, X as ie, F as V } from "./index-DQCJDAtd.js";
4
4
  import { t as ne, u as ce } from "./useResponsive-vZgZwV-S.js";
5
- import R from "./BaseIcon-BySu2V3d.js";
6
- import { _ as de } from "./Title-BS1zFx79.js";
7
- import { _ as he } from "./PackageVersion-BtrpyUPC.js";
5
+ import R from "./BaseIcon-BkG8oy7S.js";
6
+ import { _ as de } from "./Title-CUTRN3ig.js";
7
+ import { _ as he } from "./PackageVersion-DpTw0H2K.js";
8
8
  import { u as ve } from "./useChartAccessibility-BWojgys7.js";
9
9
  import { _ as pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
10
  class fe {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-BcSwG6N0.cjs"),c=require("./index-Zf2fUMIO.cjs"),K=require("./Title-BuZQSd23.cjs"),j=require("./usePrinter-BGPa8G48.cjs"),Q=require("./vue-ui-skeleton-CiGqKHDK.cjs"),W=require("./PackageVersion-B6sWtTA0.cjs"),Z=require("./PenAndPaper-DO7-xSYx.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./useChartAccessibility-Cm7nkzTG.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],le={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},re=["xmlns","viewBox"],ne=["width","height"],se={key:1},ue=["d","stroke-width","stroke"],ie={key:2},ce=["x1","y1","x2","y2","stroke-width","stroke"],ve=["x","y","font-size","fill","font-weight","text-anchor"],de={key:5,class:"vue-data-ui-watermark"},he={key:6,ref:"source",dir:"auto"},pe={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(G,{expose:H}){const{vue_ui_tiremarks:D}=c.useConfig(),v=G,$=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),P=e.ref(c.createUid()),O=e.ref(null),X=e.ref(null),S=e.ref(0),A=e.ref(0),t=e.computed({get:()=>E(),set:o=>o}),{userOptionsVisible:B,setUserOptionsVisibility:z,keepUserOptionState:N}=ee.useUserOptionState({config:t.value}),{svgRef:I}=te.useChartAccessibility({config:t.value.style.chart.title});function E(){const o=L.useNestedProp({userConfig:v.config,defaultConfig:D});return o.theme?{...L.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[o.theme]||v.config,defaultConfig:o})}:o}e.watch(()=>v.config,o=>{t.value=E(),B.value=!t.value.userOptions.showOnChartHover,U(),A.value+=1},{deep:!0});const{isPrinting:F,isImaging:V,generatePdf:q,generateImage:T}=j.usePrinter({elementId:P.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks",options:t.value.userOptions.print}),Y=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),s=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,o=>{t.value.style.chart.animation.use?M(o.percentage):s.value=o.percentage||0},{deep:!0}),e.onMounted(()=>{U()});function M(o){let n=t.value.style.chart.animation.speed;const a=Math.abs(o-s.value)/(n*120);function r(){s.value<o?s.value=Math.min(s.value+a,o):s.value>o&&(s.value=Math.max(s.value-a,o)),s.value!==o&&requestAnimationFrame(r)}r()}function U(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),M(v.dataset.percentage||0)}const m=e.computed(()=>t.value.style.chart.layout.display==="vertical"),u=e.computed(()=>{const o={top:48,left:64,right:64,bottom:48};return m.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?o.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?o.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?o.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?o.right:10}}),C=e.computed(()=>Object.values(u.value).reduce((o,n)=>o+n,0)),l=e.computed(()=>({height:m.value?312:56,width:m.value?56:312})),i=e.computed(()=>m.value?{mark:(l.value.height-C.value)/100*.5,space:(l.value.height-C.value)/100*.5}:{mark:(l.value.width-C.value)/100*.5,space:(l.value.width-C.value)/100*.5}),R=e.computed(()=>{const o=[];for(let a=0;a<100;a+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,a/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(m.value){const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.width-u.value.left-u.value.right)/100/3:0,d=u.value.left+4+y,h=l.value.width-u.value.right-4-y,p=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,f=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+a)/100);o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p-b}, ${h-k} ${f-b}, ${h} ${f}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.height-u.value.top-u.value.bottom)/100/3:0,d=u.value.left+a*i.value.mark+a*i.value.space-i.value.mark,h=d,p=u.value.top+4+y,f=l.value.height-u.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+a)/100),b=(f-p)/t.value.style.chart.layout.curveAngleX;o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p+b}, ${h+k} ${f-b}, ${h} ${f}`,color:r})}}return o}),g=e.computed(()=>{let o,n,a;const r=t.value.style.chart.percentage.fontSize/3;return m.value?t.value.style.chart.percentage.verticalPosition==="top"?(o=l.value.width/2,n=u.value.top/2,a="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(o=l.value.width/2,n=l.value.height-u.value.bottom/2+r,a="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(o=4,n=l.value.height/2+r,a="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(o=l.value.width-u.value.right+8,n=l.value.height/2+r,a="start"),{x:o,y:n,textAnchor:a,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),_=e.ref(!1);function J(o){_.value=o,S.value+=1}const w=e.ref(!1);function x(){w.value=!w.value}return H({generatePdf:q,generateImage:T,toggleAnnotator:x}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:O,class:e.normalizeClass(`vue-ui-tiremarks ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:P.value,onMouseenter:n[0]||(n[0]=()=>e.unref(z)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Z.PenAndPaper,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:x},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Y.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(),e.createBlock(K._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(N)||e.unref(B))?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(V),uid:P.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:O.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:J,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(T),onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(B)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:r})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(W._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ne)):e.createCommentVNode("",!0),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("path",{d:a.curve,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&r<=s.value})},null,10,ue))),256))])):(e.openBlock(),e.createElementBlock("g",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,ce))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:3,x:g.value.x,y:g.value.y,"font-size":g.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(c.shiftHue)(t.value.style.chart.layout.activeColor,s.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":g.value.bold?"bold":"normal","text-anchor":g.value.textAnchor},e.toDisplayString(e.unref(c.applyDataLabel)(t.value.style.chart.percentage.formatter,s.value,e.unref(c.dataLabel)({v:s.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:l.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",he,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Q.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ae))}},fe=oe._export_sfc(pe,[["__scopeId","data-v-fac4c918"]]);exports.default=fe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-DCfCPrTU.cjs"),c=require("./index-hcakVXU6.cjs"),K=require("./Title-DRo5NxnS.cjs"),j=require("./usePrinter-Dv0RMCX1.cjs"),Q=require("./vue-ui-skeleton-FXF7pMM8.cjs"),W=require("./PackageVersion-C9u9Pwxk.cjs"),Z=require("./PenAndPaper-B3u1FDG_.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./useChartAccessibility-Cm7nkzTG.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],le={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},re=["xmlns","viewBox"],ne=["width","height"],se={key:1},ue=["d","stroke-width","stroke"],ie={key:2},ce=["x1","y1","x2","y2","stroke-width","stroke"],ve=["x","y","font-size","fill","font-weight","text-anchor"],de={key:5,class:"vue-data-ui-watermark"},he={key:6,ref:"source",dir:"auto"},pe={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(G,{expose:H}){const{vue_ui_tiremarks:D}=c.useConfig(),v=G,$=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),P=e.ref(c.createUid()),O=e.ref(null),X=e.ref(null),S=e.ref(0),A=e.ref(0),t=e.computed({get:()=>E(),set:o=>o}),{userOptionsVisible:B,setUserOptionsVisibility:z,keepUserOptionState:N}=ee.useUserOptionState({config:t.value}),{svgRef:I}=te.useChartAccessibility({config:t.value.style.chart.title});function E(){const o=L.useNestedProp({userConfig:v.config,defaultConfig:D});return o.theme?{...L.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[o.theme]||v.config,defaultConfig:o})}:o}e.watch(()=>v.config,o=>{t.value=E(),B.value=!t.value.userOptions.showOnChartHover,U(),A.value+=1},{deep:!0});const{isPrinting:F,isImaging:V,generatePdf:q,generateImage:T}=j.usePrinter({elementId:P.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks",options:t.value.userOptions.print}),Y=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),s=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,o=>{t.value.style.chart.animation.use?M(o.percentage):s.value=o.percentage||0},{deep:!0}),e.onMounted(()=>{U()});function M(o){let n=t.value.style.chart.animation.speed;const a=Math.abs(o-s.value)/(n*120);function r(){s.value<o?s.value=Math.min(s.value+a,o):s.value>o&&(s.value=Math.max(s.value-a,o)),s.value!==o&&requestAnimationFrame(r)}r()}function U(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),M(v.dataset.percentage||0)}const m=e.computed(()=>t.value.style.chart.layout.display==="vertical"),u=e.computed(()=>{const o={top:48,left:64,right:64,bottom:48};return m.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?o.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?o.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?o.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?o.right:10}}),C=e.computed(()=>Object.values(u.value).reduce((o,n)=>o+n,0)),l=e.computed(()=>({height:m.value?312:56,width:m.value?56:312})),i=e.computed(()=>m.value?{mark:(l.value.height-C.value)/100*.5,space:(l.value.height-C.value)/100*.5}:{mark:(l.value.width-C.value)/100*.5,space:(l.value.width-C.value)/100*.5}),R=e.computed(()=>{const o=[];for(let a=0;a<100;a+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,a/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(m.value){const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.width-u.value.left-u.value.right)/100/3:0,d=u.value.left+4+y,h=l.value.width-u.value.right-4-y,p=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,f=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+a)/100);o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p-b}, ${h-k} ${f-b}, ${h} ${f}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.height-u.value.top-u.value.bottom)/100/3:0,d=u.value.left+a*i.value.mark+a*i.value.space-i.value.mark,h=d,p=u.value.top+4+y,f=l.value.height-u.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+a)/100),b=(f-p)/t.value.style.chart.layout.curveAngleX;o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p+b}, ${h+k} ${f-b}, ${h} ${f}`,color:r})}}return o}),g=e.computed(()=>{let o,n,a;const r=t.value.style.chart.percentage.fontSize/3;return m.value?t.value.style.chart.percentage.verticalPosition==="top"?(o=l.value.width/2,n=u.value.top/2,a="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(o=l.value.width/2,n=l.value.height-u.value.bottom/2+r,a="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(o=4,n=l.value.height/2+r,a="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(o=l.value.width-u.value.right+8,n=l.value.height/2+r,a="start"),{x:o,y:n,textAnchor:a,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),_=e.ref(!1);function J(o){_.value=o,S.value+=1}const w=e.ref(!1);function x(){w.value=!w.value}return H({generatePdf:q,generateImage:T,toggleAnnotator:x}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:O,class:e.normalizeClass(`vue-ui-tiremarks ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:P.value,onMouseenter:n[0]||(n[0]=()=>e.unref(z)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Z.PenAndPaper,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:x},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Y.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(),e.createBlock(K._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(N)||e.unref(B))?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(V),uid:P.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:O.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:J,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(T),onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(B)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:r})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(W._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ne)):e.createCommentVNode("",!0),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("path",{d:a.curve,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&r<=s.value})},null,10,ue))),256))])):(e.openBlock(),e.createElementBlock("g",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,ce))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:3,x:g.value.x,y:g.value.y,"font-size":g.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(c.shiftHue)(t.value.style.chart.layout.activeColor,s.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":g.value.bold?"bold":"normal","text-anchor":g.value.textAnchor},e.toDisplayString(e.unref(c.applyDataLabel)(t.value.style.chart.percentage.formatter,s.value,e.unref(c.dataLabel)({v:s.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:l.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",he,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Q.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ae))}},fe=oe._export_sfc(pe,[["__scopeId","data-v-fac4c918"]]);exports.default=fe;
@@ -1,11 +1,11 @@
1
1
  import { computed as h, ref as b, watch as Z, onMounted as ce, createElementBlock as c, openBlock as s, unref as r, normalizeStyle as G, normalizeClass as L, createBlock as F, createCommentVNode as d, createSlots as ve, withCtx as x, renderSlot as y, normalizeProps as z, guardReactiveProps as S, createVNode as he, Fragment as ee, renderList as te, toDisplayString as de } from "vue";
2
- import { u as ae } from "./useNestedProp-RC28MVml.js";
3
- import { u as fe, c as ge, a as ye, v as pe, o as me, e as ke, w as oe, X as be, i as _e, f as Ce } from "./index-CzjsUYng.js";
4
- import { _ as $e } from "./Title-BS1zFx79.js";
5
- import { u as we, U as Pe } from "./usePrinter-CUsjlfpk.js";
6
- import xe from "./vue-ui-skeleton-XUKIcV-3.js";
7
- import { _ as Oe } from "./PackageVersion-BtrpyUPC.js";
8
- import { P as Ae } from "./PenAndPaper-zjBsZuuq.js";
2
+ import { u as ae } from "./useNestedProp-WD6Qn-jr.js";
3
+ import { u as fe, c as ge, a as ye, v as pe, o as me, e as ke, w as oe, X as be, i as _e, f as Ce } from "./index-DQCJDAtd.js";
4
+ import { _ as $e } from "./Title-CUTRN3ig.js";
5
+ import { u as we, U as Pe } from "./usePrinter-FM1PheWO.js";
6
+ import xe from "./vue-ui-skeleton-BTfzoolB.js";
7
+ import { _ as Oe } from "./PackageVersion-DpTw0H2K.js";
8
+ import { P as Ae } from "./PenAndPaper-CdyjU7Bn.js";
9
9
  import { u as Ie } from "./useUserOptionState-BIvW1Kz7.js";
10
10
  import { u as Fe } from "./useChartAccessibility-BWojgys7.js";
11
11
  import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-hcakVXU6.cjs"),Fe=require("./Title-DRo5NxnS.cjs"),xe=require("./usePrinter-Dv0RMCX1.cjs"),Ie=require("./Tooltip-Cbjcw6Jz.cjs"),De=require("./Legend-DpeobB-J.cjs"),qe=require("./vue-ui-skeleton-FXF7pMM8.cjs"),Me=require("./DataTable-ChXRV1c1.cjs"),He=require("./vue-ui-accordion-BfFg-sVJ.cjs"),Te=require("./useResponsive-N8jl0-aC.cjs"),Se=require("./useNestedProp-DCfCPrTU.cjs"),Ue=require("./PackageVersion-C9u9Pwxk.cjs"),We=require("./PenAndPaper-B3u1FDG_.cjs"),Ge=require("./useUserOptionState-BgepsfED.cjs"),je=require("./useChartAccessibility-Cm7nkzTG.cjs"),Xe=require("./BaseIcon-CNr0ynIA.cjs"),Ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function $e(r,c){const i=r.length;if(i===0)throw new Error(`Max aspect ratio cannot be computed: ${r} is an empty array`);{let d=1/0,u=-1/0,v=0;for(let p=0;p<i;p+=1){const f=r[p].normalizedValue;f<d&&(d=f),f>u&&(u=f),v+=f}return Math.max(c**2*u/v**2,v**2/(c**2*d))}}function Be(r){const{xOffset:c,yOffset:i,width:d,height:u}=r;return{x0:c,y0:i,x1:c+d,y1:i+u}}function Ze(r,c,i){if(r.length===0)return!0;{const d=r.concat(c),u=$e(r,i),v=$e(d,i);return u>=v}}function Je(r){const c=[],i=r.length;for(let d=0;d<i;d+=1){const u=r[d],v=u.length;for(let h=0;h<v;h+=1)c.push(u[h])}return c}function Ke(r,c){const i={...c,children:r};return Oe(i)}function Qe(r){return(r.x1-r.x0)*(r.y1-r.y0)}function Ne(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=J(c),h=r.length,p=r.map(y=>y.normalizedValue||0).reduce((y,g)=>y+g,0),f=p/d,x=p/i;let C=u,T=v;const b=[];if(i>=d){for(let y=0;y<h;y+=1){const g=r[y],k=T+g.normalizedValue/f,O={x0:C,y0:T,x1:C+f,y1:k},S=Object.assign({},g,O);T=k,b.push(S)}return b}else{for(let y=0;y<h;y+=1){const g=r[y],k=C+g.normalizedValue/x,O={x0:C,y0:T,x1:k,y1:T+x},S=Object.assign({},g,O);C=k,b.push(S)}return b}}function et(r){const c=J(r),i=c.width,d=c.height;return Math.min(i,d)}function tt(r,c){const i=r.length,d=r.map(f=>f.value??0).reduce((f,x)=>f+x,0),u=c/d,v=[];let h,p;for(let f=0;f<i;f+=1)p=r[f],h=Object.assign({},p,{normalizedValue:p.value*(u||0)}),v.push(h);return v}function J(r){const{x0:c,y0:i,x1:d,y1:u}=r;return{xOffset:c,yOffset:i,width:d-c,height:u-i}}function ot(r,c,i,d){let u=r,v=c,h=i,p=d;for(;;){const f=u.length;if(f===0){const b=Ne(v,h);return p.concat(b)}const x=et(h),C=u[0],T=u.slice(1,f);if(Ze(v,C,x)){const b=v.concat(C);u=T,v=b,h=h,p=p}else{const b=v.length;let y=0;for(let S=0;S<b;S+=1)y+=v[S].normalizedValue;const g=lt(h,y),k=Ne(v,h),O=p.concat(k);u=u,v=[],h=g,p=O}}}function Oe(r){if(typeof r.children>"u"||!r.children.length)return[r];{const c=tt(r.children,Qe(r)),i=ot(c,[],r,[]),d=i.length,u=[];for(let h=0;h<d;h+=1)u.push(Oe(i[h]));return Je(u)}}function lt(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=J(r);if(i>=d){const h=c/d,p=i-h,f={xOffset:u+h,yOffset:v,width:p,height:d};return Be(f)}else{const h=c/i,p=d-h,f={xOffset:u,yOffset:v+h,width:i,height:p};return Be(f)}}const at=["id"],nt={key:4,class:"vue-ui-treemap-breadcrumbs","data-html2canvas-ignore":""},rt=["onClick","data-last-crumb"],st={class:"vue-ui-treemap-crumb-unit"},ut={class:"vue-ui-treemap-crumb-unit-label"},it={key:0,style:{width:"24px",display:"flex","align-items":"center"}},ct={key:0,class:"vue-ui-treemap-crumb-unit-arrow"},dt=["xmlns","viewBox"],vt={key:0},ht=["id"],pt=["stop-color"],ft=["stop-color"],mt=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],gt=["x","y","height","width"],yt={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},bt={key:6,class:"vue-data-ui-watermark"},kt=["onClick"],Ct={key:0},wt={key:1},xt=["innerHTML"],Tt={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(r,{expose:c,emit:i}){const{vue_ui_treemap:d}=s.useConfig(),u=r,v=i,h=e.useSlots();e.onMounted(()=>{h["chart-background"]&&console.warn("VueUiTreemap does not support the #chart-background slot.")});const p=e.computed(()=>!!u.dataset&&u.dataset.length),f=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),x=e.ref(s.createUid()),C=e.ref(!1),T=e.ref(""),b=e.ref(!1),y=e.ref(0),g=e.ref([]),k=e.ref(null),O=e.ref(null),S=e.ref(null),K=e.ref(null),Q=e.ref(null),ee=e.ref(0),te=e.ref(0),oe=e.ref(0),t=e.computed({get:()=>re(),set:o=>o}),{userOptionsVisible:X,setUserOptionsVisibility:le,keepUserOptionState:ae}=Ge.useUserOptionState({config:t.value}),{svgRef:ne}=je.useChartAccessibility({config:t.value.style.chart.title});function re(){const o=Se.useNestedProp({userConfig:u.config,defaultConfig:d});return o.theme?{...Se.useNestedProp({userConfig:s.themes.vue_ui_treemap[o.theme]||u.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>u.config,o=>{t.value=re(),X.value=!t.value.userOptions.showOnChartHover,ee.value+=1,te.value+=1,oe.value+=1,$.value.showTable=t.value.table.show,$.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:se,isImaging:ue,generatePdf:ie,generateImage:ce}=xe.usePrinter({elementId:`treemap_${x.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap",options:t.value.userOptions.print}),_e=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),H=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),$=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),_=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),z=e.computed(()=>({bottom:_.value.height-t.value.style.chart.padding.bottom,height:_.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:_.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:_.value.height,vbWidth:_.value.width,width:_.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function de(o){o.forEach((a,l)=>{a.id=s.createUid(),a.color=s.convertColorToHex(a.color)||H.value[l]||s.palette[l]||s.palette[l%s.palette.length],a.children&&(a.children.forEach(n=>{n.parentId=a.id,n.color=a.color}),de(a.children))})}const P=e.ref(u.dataset),U=e.ref(null);e.onMounted(()=>{Pe()});function Pe(){if(s.objectIsEmpty(u.dataset)&&s.error({componentName:"VueUiTreemap",type:"dataset"}),de(P.value),t.value.responsive){const o=Te.throttle(()=>{const{width:a,height:l}=Te.useResponsive({chart:k.value,title:t.value.style.chart.title.text?O.value:null,legend:t.value.style.chart.legend.show?S.value:null,source:K.value,noTitle:Q.value});requestAnimationFrame(()=>{_.value.width=a,_.value.height=l})});U.value=new ResizeObserver(o),U.value.observe(k.value.parentNode)}}e.onBeforeUnmount(()=>{U.value&&U.value.disconnect()});const A=e.ref(P.value),D=e.computed(()=>A.value.map((o,a)=>({...o,color:s.convertColorToHex(o.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length]})).filter(o=>!g.value.includes(o.id))),L=e.computed(()=>P.value.filter(o=>!g.value.includes(o.id)).map(o=>o.value||0).reduce((o,a)=>o+a,0)),ve=e.computed({get(){let o=[...D.value];return t.value.style.chart.layout.sorted&&(o=[...D.value].sort((a,l)=>l.value-a.value)),o.map(a=>({...a}))},set(o){return o}});function he(o,a){return o.value/a}function Ve(o,a,l){const n=t.value.style.chart.layout.rects.colorRatio-he(a,l);return s.lightenHexColor(o,n<0?0:n)}function pe(o,a,l,n){return o.map((m,V)=>{const j=Ve(s.convertColorToHex(a)||H.value[V]||s.palette[V]||s.palette[V%s.palette.length],m,n),Le=he(m,n);return{...m,color:j,proportion:Le,parentName:l,children:m.children?pe(m.children,j,m.name,n):void 0}})}const q=e.computed(()=>Ke(ve.value.map((o,a)=>{const l=o.children?o.children.reduce((n,m)=>n+m.value,0):o.value;return{value:o.value,id:o.id,children:o.children?pe(o.children.sort((n,m)=>m.value-n.value),o.color,o.name,l):void 0,color:o.color,name:o.name}}),{x0:z.value.left*2,y0:z.value.top,x1:z.value.width,y1:z.value.height}));function fe({y0:o,y1:a}){return a-o<=0?1e-4:a-o}function me({x0:o,x1:a}){return a-o<=0?1e-4:a-o}function E(o){const a=t.value.style.chart.layout.labels.fontSize*(o.proportion*2>1?1:o.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function ze(o){b.value=o,y.value+=1}const F=e.computed(()=>({startX:0,startY:0,width:z.value.vbWidth,height:z.value.vbHeight}));function I(o,a=P.value){for(const l of a){if(l.id===o)return l;if(l.children){const n=I(o,l.children);if(n)return n}}return null}const w=e.ref([]),R=e.computed(()=>w.value.length>0);function ge(o){var l;if(!o){A.value=P.value.slice(),v("selectDatapoint",void 0),w.value=[];return}const a=I(o.id);if(a&&((l=a.children)!=null&&l.length))w.value.push(a.id),A.value=a.children.slice(),v("selectDatapoint",o);else if(o.parentId){w.value.push(o.parentId);const n=I(o.parentId);A.value=n.children.slice(),v("selectDatapoint",o)}else if(w.value.length>0){w.value.pop();const n=w.value[w.value.length-1];if(n){const m=I(n);A.value=m.children.slice()}else A.value=P.value.slice(),w.value=[],v("selectDatapoint",void 0)}}const M=e.computed(()=>{const o=[{id:null,label:"All"}];if(w.value.length>0){let a=I(w.value[w.value.length-1]);const l=[];for(;a;)l.unshift(a),a=a.parentId?I(a.parentId):null;for(const n of l)o.push({id:n.id,label:n.name,node:n})}return o}),B=e.ref(null),ye=e.computed(()=>P.value.map((o,a)=>({...o,color:s.convertColorToHex(o.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length],shape:"square"})).sort((o,a)=>a.value-o.value).map((o,a)=>({...o,proportion:o.value/P.value.map(l=>l.value).reduce((l,n)=>l+n,0),opacity:g.value.includes(o.id)?.5:1}))),Ee=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function be(o){R.value=!1,B.value=null,g.value.includes(o.id)?g.value=g.value.filter(a=>a!==o.id):g.value.length<u.dataset.length-1&&g.value.push(o.id),v("selectLegend",ve.value)}const Y=e.ref(null);function Re({datapoint:o,seriesIndex:a}){B.value=o,Y.value={datapoint:o,seriesIndex:a,config:t.value,series:D.value};const l=t.value.style.chart.tooltip.customFormat;if(s.isFunction(l)&&s.functionReturnsString(()=>l({seriesIndex:a,datapoint:o,series:D.value,config:t.value})))T.value=l({seriesIndex:a,datapoint:o,series:D.value,config:t.value});else{let n="";n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${o.color}"/></svg>`,n+=`<b>${s.applyDataLabel(t.value.style.chart.layout.labels.formatter,o.value,s.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,seriesIndex:a})}</b>`,T.value=`<div>${n}</div>`}C.value=!0}const N=e.computed(()=>{const o=q.value.map(l=>({name:l.name,color:l.color})),a=q.value.map(l=>l.value);return{head:o,body:a}});function ke(){e.nextTick(()=>{const o=N.value.head.map((n,m)=>[[n.name],[N.value.body[m]],[isNaN(N.value.body[m]/L.value)?"-":N.value.body[m]/L.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const W=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=N.value.head.map((m,V)=>{const j=s.applyDataLabel(t.value.style.chart.layout.labels.formatter,N.value.body[V],s.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:N.value.body[V],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:m.color,name:m.name,shape:"square"},j,isNaN(N.value.body[V]/L.value)?"-":s.dataLabel({v:N.value.body[V]/L.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}});function Ae(){return q.value}function Ce(){$.value.showTable=!$.value.showTable}function we(){$.value.showTooltip=!$.value.showTooltip}const G=e.ref(!1);function Z(){G.value=!G.value}return c({getData:Ae,generateCsv:ke,generateImage:ce,generatePdf:ie,toggleTable:Ce,toggleTooltip:we,toggleAnnotator:Z}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:k,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`treemap_${x.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(le)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(le)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(We.PenAndPaper,{key:0,svgRef:e.unref(ne),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:G.value,onClose:Z},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),_e.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Q,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:O,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Fe._sfc_main,{key:`title_${ee.value}`,config:{title:{cy:"treemap-div-title",...t.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value&&(e.unref(ae)||e.unref(X))?(e.openBlock(),e.createBlock(xe.UserOptions,{ref:"details",key:`user_option_${y.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(se),isImaging:e.unref(ue),uid:x.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:$.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:G.value,onToggleFullscreen:ze,onGeneratePdf:e.unref(ie),onGenerateCsv:ke,onGenerateImage:e.unref(ce),onToggleTable:Ce,onToggleTooltip:we,onToggleAnnotator:Z,style:e.normalizeStyle({visibility:e.unref(ae)?e.unref(X)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),M.value.length>1?(e.openBlock(),e.createElementBlock("nav",nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,n)=>(e.openBlock(),e.createElementBlock("span",{key:l.id||"root",onClick:m=>n===M.value.length-1?()=>{}:ge(l.node),class:"vue-ui-treemap-crumb","data-last-crumb":n===M.value.length-1,style:e.normalizeStyle({color:t.value.style.chart.color})},[e.createElementVNode("span",st,[e.createElementVNode("span",ut,[e.renderSlot(o.$slots,"breadcrumb-label",e.mergeProps({ref_for:!0},{crumb:l,isRoot:n===0}),()=>[n===0?(e.openBlock(),e.createElementBlock("div",it,[e.createVNode(Xe.default,{name:"home",stroke:t.value.style.chart.color},null,8,["stroke"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.label),1)],64))],!0)]),n<M.value.length-1?(e.openBlock(),e.createElementBlock("span",ct,[e.renderSlot(o.$slots,"breadcrumb-arrow",{},()=>[a[5]||(a[5]=e.createTextVNode(" › "))],!0)])):e.createCommentVNode("",!0)])],12,rt))),128))])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:5,ref_key:"svgRef",ref:ne,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!R.value,"vue-data-ui-zoom-minus":R.value}),viewBox:`${F.value.startX} ${F.value.startY} ${F.value.width<=0?10:F.value.width} ${F.value.height<=0?10:F.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ue._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",vt,[e.createElementVNode("radialGradient",{id:`tgrad_${l.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":l.color},null,8,pt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.lightenHexColor)(l.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,ft)],8,ht)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:fe(l),width:me(l),fill:f.value?l.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:B.value&&B.value.id===l.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":B.value&&B.value.id===l.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:e.withModifiers(m=>ge(l),["stop"]),onMouseenter:()=>Re({datapoint:l,seriesIndex:n}),onMouseleave:a[0]||(a[0]=m=>{B.value=null,C.value=!1}),style:e.normalizeStyle(`opacity:${B.value?B.value.id===l.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,mt),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:fe(l),width:me(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",yt,[t.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||R.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${E(l)/1.5}px);text-align:left;line-height:${E(l)<14?14:E(l)}px;padding:${E(l)/3}px; color:${e.unref(s.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(l.name),5),a[6]||(a[6]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"rect",e.mergeProps({ref_for:!0},{rect:l,shouldShow:l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||R.value,fontSize:E(l),isZoom:R.value,textColor:e.unref(s.adaptColorToBackground)(l.color)}),void 0,!0)])],8,gt))]))),256)),e.renderSlot(o.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:z.value,isZoom:R.value,rect:B.value,config:t.value})),void 0,!0)],14,dt)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",bt,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(se)||e.unref(ue)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(qe.default,{key:7,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:S},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(De.Legend,{key:`legend_${oe.value}`,legendSet:ye.value,config:Ee.value,id:`treemap_legend_${x.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>be(l))},{item:e.withCtx(({legend:l,index:n})=>[e.createElementVNode("div",{onClick:m=>be(l),style:e.normalizeStyle(`opacity:${g.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l}))+" ",1),g.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",wt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Ct," ("+e.toDisplayString(isNaN(l.value/L.value)?"-":(l.value/L.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,kt)]),_:1},8,["legendSet","config","id"])):e.renderSlot(o.$slots,"legend",{key:1,legend:ye.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"source",ref:K,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ie._sfc_main,{show:$.value.showTooltip&&C.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:T.value,isFullscreen:b.value,isCustom:e.unref(s.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),p.value?(e.openBlock(),e.createBlock(He.default,{key:9,hideDetails:"",config:{open:$.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Me.DataTable,{key:`table_${te.value}`,colNames:W.value.colNames,head:W.value.head,body:W.value.body,config:W.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>$.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,xt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,at))}},St=Ye._export_sfc(Tt,[["__scopeId","data-v-a6058301"]]);exports.default=St;