@wildo-ai/application-creation-workbench 1.1.15 → 1.1.16

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 (232) hide show
  1. package/dist/.vite/manifest.json +553 -564
  2. package/dist/assets/{ChartEmptyState-ZXRcbrLV.js → ChartEmptyState-DWIzkRcF.js} +1 -1
  3. package/dist/assets/ChartLoadingSkeleton-DJK8tr0I.js +1 -0
  4. package/dist/assets/{ChartView-B6f1J6Er.js → ChartView-Db94VZQx.js} +2 -2
  5. package/dist/assets/ChartWidget-YVF2hpZO.js +5 -0
  6. package/dist/assets/{abnfDiagram-VCTEODGH-BuQmdgCH.js → abnfDiagram-VCTEODGH-CM0NR9TO.js} +1 -1
  7. package/dist/assets/af-CaISKfkL.js +1 -0
  8. package/dist/assets/ar-Dd3Ww6Iw.js +1 -0
  9. package/dist/assets/{architectureDiagram-5GKGNRK7-BVyAQs-b.js → architectureDiagram-5GKGNRK7-BSvNpQhN.js} +1 -1
  10. package/dist/assets/badge-tone-CARgRBWT.js +5 -0
  11. package/dist/assets/bg-DNLi91F0.js +1 -0
  12. package/dist/assets/{blockDiagram-I7D4REHJ-R2VdOZ1H.js → blockDiagram-I7D4REHJ-BSXJV2rP.js} +1 -1
  13. package/dist/assets/bn-BGBjHoNg.js +1 -0
  14. package/dist/assets/{c4Diagram-7LVT6UL2-Bslw228e.js → c4Diagram-7LVT6UL2-B17JSkcB.js} +1 -1
  15. package/dist/assets/ca-BJH1_2-1.js +1 -0
  16. package/dist/assets/channel-CADOmcrk.js +1 -0
  17. package/dist/assets/{chunk-4HAMMTFA-DUDg3eHK.js → chunk-4HAMMTFA-CA0aHXNY.js} +1 -1
  18. package/dist/assets/{chunk-75Z2AOVW-DaeXzHyk.js → chunk-75Z2AOVW-eNHd3ECu.js} +1 -1
  19. package/dist/assets/{chunk-DU6HZSFF-B3UMRfg8.js → chunk-DU6HZSFF-DC0oD3wd.js} +2 -2
  20. package/dist/assets/{chunk-F27PBJKO-BEX6D1-n.js → chunk-F27PBJKO-CTaZkd0r.js} +1 -1
  21. package/dist/assets/{chunk-GMAD6QVW-ZsbK8Hyz.js → chunk-GMAD6QVW-DAXYHrRx.js} +1 -1
  22. package/dist/assets/{chunk-GVQU2GXP-CFgk1428.js → chunk-GVQU2GXP-pi_3BL4L.js} +1 -1
  23. package/dist/assets/{chunk-IMKFNOWR-Bl09s7a_.js → chunk-IMKFNOWR-D4wsR2Nz.js} +1 -1
  24. package/dist/assets/{chunk-L3NEJ4N5-zKVzE7OW.js → chunk-L3NEJ4N5-kKzd7vmD.js} +1 -1
  25. package/dist/assets/{chunk-OSK3NFVY-BmuNqHzQ.js → chunk-OSK3NFVY-B0dd8EQD.js} +1 -1
  26. package/dist/assets/{chunk-P2QGCYS3-C2tydC-M.js → chunk-P2QGCYS3-uHc1UExe.js} +1 -1
  27. package/dist/assets/{chunk-POPQ4Y6H-DNak0l6w.js → chunk-POPQ4Y6H-BygwP6r8.js} +1 -1
  28. package/dist/assets/{chunk-PWAF6VOD-D95y-mRG.js → chunk-PWAF6VOD-UE_jt_hM.js} +1 -1
  29. package/dist/assets/{chunk-SHT3W25Y-BK0XKr9M.js → chunk-SHT3W25Y-Cv1i544N.js} +1 -1
  30. package/dist/assets/{chunk-SVP7TREG-CD0633UP.js → chunk-SVP7TREG-Ck1iP-B9.js} +1 -1
  31. package/dist/assets/{chunk-TICWLB2K-C_TN_qXz.js → chunk-TICWLB2K-Dxy0ug7B.js} +1 -1
  32. package/dist/assets/classDiagram-ZZMXUADV-BXHE8nXn.js +1 -0
  33. package/dist/assets/classDiagram-v2-VYDZK3BY-BXHE8nXn.js +1 -0
  34. package/dist/assets/{cm6-editor-CsI0AZDl.js → cm6-editor-DhiCRNY6.js} +3 -3
  35. package/dist/assets/{code-block-IT6T5CEO-rh8d07_F.js → code-block-IT6T5CEO-DFDUp6nm.js} +1 -1
  36. package/dist/assets/context-JIvi_Be4.js +1 -0
  37. package/dist/assets/cs-QrUc_2-B.js +1 -0
  38. package/dist/assets/cy-C9ToLciu.js +1 -0
  39. package/dist/assets/{cynefinDiagram-5FMLGOSQ-DxRmh9t5.js → cynefinDiagram-5FMLGOSQ-C69B-hF_.js} +1 -1
  40. package/dist/assets/da-BeV-TIte.js +1 -0
  41. package/dist/assets/{dagre-GXQ25YYZ-w2hLzSss.js → dagre-GXQ25YYZ-CF3-iQQv.js} +1 -1
  42. package/dist/assets/de-AT-DsKGWx9m.js +1 -0
  43. package/dist/assets/de-DHWuASHw.js +1 -0
  44. package/dist/assets/{diagram-S7CK7UJ4-CNrSaCrT.js → diagram-S7CK7UJ4-fI0poyzR.js} +1 -1
  45. package/dist/assets/{diagram-UQ7AKVKN-BEoR36FG.js → diagram-UQ7AKVKN-Cejsbc8J.js} +1 -1
  46. package/dist/assets/{diagram-VSXAHHWV-Dy8S8rIp.js → diagram-VSXAHHWV-CBv4QF-r.js} +1 -1
  47. package/dist/assets/{diagram-VX7I27RA-BC8Xf9f0.js → diagram-VX7I27RA-BzXmKCQv.js} +1 -1
  48. package/dist/assets/{diagram-Z3DM3KII-CKiC1nrY.js → diagram-Z3DM3KII-DlMWqIOm.js} +1 -1
  49. package/dist/assets/{dist-DXUYhDMM.js → dist-7qRR8v9X.js} +1 -1
  50. package/dist/assets/{dist-Ble3IUnd.js → dist-AFETXPuM.js} +1 -1
  51. package/dist/assets/{dist-CY9MvaM1.js → dist-B3zMf34l.js} +1 -1
  52. package/dist/assets/{dist-Dek2gQIT.js → dist-B7LZVqmi.js} +1 -1
  53. package/dist/assets/{dist-ngz3bapC.js → dist-B8dHtIF5.js} +1 -1
  54. package/dist/assets/{dist-DChuQCpL.js → dist-BNqD4FF5.js} +1 -1
  55. package/dist/assets/{dist-DOFuKjhK.js → dist-BPi3amKg.js} +1 -1
  56. package/dist/assets/{dist-D7MnPcGE.js → dist-Bqd9H35D.js} +1 -1
  57. package/dist/assets/{dist-Cj_xL7Es.js → dist-BxMdxgPi.js} +1 -1
  58. package/dist/assets/{dist-Ciqde0Ol.js → dist-BzKBUPIc.js} +1 -1
  59. package/dist/assets/{dist-1-HCT6qM.js → dist-C1JIB7wk.js} +1 -1
  60. package/dist/assets/{dist-CgVofDKX.js → dist-CGO-gA39.js} +1 -1
  61. package/dist/assets/{dist-BuE0_QYF.js → dist-CKvrtylC.js} +1 -1
  62. package/dist/assets/{dist-jCSCdtJ7.js → dist-CnWzIIZp.js} +1 -1
  63. package/dist/assets/{dist-DBEagOph.js → dist-CvaYKnIn.js} +1 -1
  64. package/dist/assets/{dist-BQ8k61qr.js → dist-DAIjOsvl.js} +1 -1
  65. package/dist/assets/{dist-ddtYIZHC.js → dist-DHiazivQ.js} +1 -1
  66. package/dist/assets/{dist-Bi-7RiEi.js → dist-DIV2542b.js} +1 -1
  67. package/dist/assets/{dist-DCP6b5Yp.js → dist-DJE-oKsX.js} +1 -1
  68. package/dist/assets/{dist-BYbvqYeK.js → dist-DXJIV6Zs.js} +1 -1
  69. package/dist/assets/{dist-C2PLdFfo.js → dist-Da70oAVH.js} +1 -1
  70. package/dist/assets/{dist-CSrdLN_Y.js → dist-iVGPtgrw.js} +1 -1
  71. package/dist/assets/{dist-ssfnxGX1.js → dist-nXT3Wtvb.js} +1 -1
  72. package/dist/assets/{ebnfDiagram-PWID7BFC-CBnxtxcg.js → ebnfDiagram-PWID7BFC-DTMbd2mv.js} +1 -1
  73. package/dist/assets/el-DMuXcfim.js +1 -0
  74. package/dist/assets/en-AU-DjLnSRR3.js +1 -0
  75. package/dist/assets/en-CA-DXNydqY9.js +1 -0
  76. package/dist/assets/en-GB-D4GWT5GI.js +1 -0
  77. package/dist/assets/{erDiagram-RLTQ6QDP-ZW5EDEeK.js → erDiagram-RLTQ6QDP-BZEe8VTH.js} +1 -1
  78. package/dist/assets/es-lfpxt6Ut.js +1 -0
  79. package/dist/assets/esm-Cbe65KfA.js +46 -0
  80. package/dist/assets/et-Bf88JUsX.js +1 -0
  81. package/dist/assets/eu-DV_CNSeH.js +1 -0
  82. package/dist/assets/fa-IR-DNJeY-Q5.js +1 -0
  83. package/dist/assets/fi-NNzsVdSt.js +1 -0
  84. package/dist/assets/flow-execution-BwY1ThjF.js +8 -0
  85. package/dist/assets/flowDiagram-HODETNUW-DbMxzAr_.js +1 -0
  86. package/dist/assets/flows-actors-graph-runtime-D-xOavtY.js +1 -0
  87. package/dist/assets/fr-B-yJDVw6.js +1 -0
  88. package/dist/assets/fr-CA-D84edDay.js +1 -0
  89. package/dist/assets/{ganttDiagram-EL5Y4UJY-D0NWXhSy.js → ganttDiagram-EL5Y4UJY-BdBwCB1x.js} +1 -1
  90. package/dist/assets/{gitGraphDiagram-WWUBYQGX-C16HvgtP.js → gitGraphDiagram-WWUBYQGX-CIy0NCq6.js} +1 -1
  91. package/dist/assets/gl-Dp9qpDLE.js +1 -0
  92. package/dist/assets/graph-runtime-DcJcdZxk.js +1 -0
  93. package/dist/assets/he-Bq6yvypU.js +1 -0
  94. package/dist/assets/hi-CMOY0SGV.js +1 -0
  95. package/dist/assets/hr-tEZvbTHh.js +1 -0
  96. package/dist/assets/hu-4gHWGYaX.js +1 -0
  97. package/dist/assets/id-DWXCGwjx.js +1 -0
  98. package/dist/assets/index-B-LZopDR.js +202 -0
  99. package/dist/assets/{infoDiagram-27XIBGKW-BB9zejj7.js → infoDiagram-27XIBGKW-cmptKZNt.js} +1 -1
  100. package/dist/assets/is-CyAuvYgU.js +1 -0
  101. package/dist/assets/isSameWeek-BwCmz51m.js +1 -0
  102. package/dist/assets/{ishikawaDiagram-5VMMS53U-D0VdeBWj.js → ishikawaDiagram-5VMMS53U-BGkoqgNl.js} +1 -1
  103. package/dist/assets/it-D--xgPTt.js +1 -0
  104. package/dist/assets/ja-PiU5hzs0.js +1 -0
  105. package/dist/assets/{journeyDiagram-3NMN7TZE-BAlcsabK.js → journeyDiagram-3NMN7TZE-BOELkE0a.js} +1 -1
  106. package/dist/assets/{kanban-definition-UXKFOSKX-DpR1bfHx.js → kanban-definition-UXKFOSKX-DMZEjs2i.js} +1 -1
  107. package/dist/assets/katex-CI0JW3i6.js +1 -0
  108. package/dist/assets/ko-CGrMXw-3.js +1 -0
  109. package/dist/assets/{line-sQ28MnTc.js → line-s3zM1O9a.js} +1 -1
  110. package/dist/assets/linear-BUYtyba4.js +1 -0
  111. package/dist/assets/lt-wHK-2djA.js +1 -0
  112. package/dist/assets/lv-B305-5TD.js +1 -0
  113. package/dist/assets/{markdown-stream-runtime-kB8TMEpF.js → markdown-stream-runtime-JIhfRcVj.js} +33 -33
  114. package/dist/assets/match-DcrfiQ0n.js +1 -0
  115. package/dist/assets/match-szcpBoWK.js +1 -0
  116. package/dist/assets/mermaid-VLURNSYL-DDUIX3qH.js +1 -0
  117. package/dist/assets/{mermaid.core-DY7EfcRK.js → mermaid.core-a9Ql5m3p.js} +4 -4
  118. package/dist/assets/{mindmap-definition-YA3MSWOX-DAHZInIk.js → mindmap-definition-YA3MSWOX-DUzblAeW.js} +1 -1
  119. package/dist/assets/ms-DOzy1eba.js +1 -0
  120. package/dist/assets/mt-Cyhk7ljW.js +1 -0
  121. package/dist/assets/nb-CHftFpq-.js +1 -0
  122. package/dist/assets/nl-BLyVSbSF.js +1 -0
  123. package/dist/assets/{pdf-viewer-CslUZhU5.js → pdf-viewer-BZVcG_S1.js} +2 -2
  124. package/dist/assets/{pegDiagram-XKGWAZYB-Dq7UThjR.js → pegDiagram-XKGWAZYB-BZ3P1nUf.js} +1 -1
  125. package/dist/assets/{pieDiagram-E7YTZNPT-Dl3n9rSp.js → pieDiagram-E7YTZNPT-B9NGIjBe.js} +1 -1
  126. package/dist/assets/pl-DcuB_1rF.js +1 -0
  127. package/dist/assets/pt-BLKOuKD1.js +1 -0
  128. package/dist/assets/pt-BR-DDPfvEv6.js +1 -0
  129. package/dist/assets/{quadrantDiagram-AXDQQJYC-_GKiRjuD.js → quadrantDiagram-AXDQQJYC-CjNDgU43.js} +1 -1
  130. package/dist/assets/{railroadDiagram-O6MQD6OU-6CUNSmGg.js → railroadDiagram-O6MQD6OU-BBDx0rdy.js} +1 -1
  131. package/dist/assets/{requirementDiagram-BXWQKSXE-BPl-usp2.js → requirementDiagram-BXWQKSXE-BrhlVjUT.js} +1 -1
  132. package/dist/assets/ro-DbI8OToC.js +1 -0
  133. package/dist/assets/ru-BLDhwwC9.js +1 -0
  134. package/dist/assets/{sankeyDiagram-P5KCCOFB-DZKA85RO.js → sankeyDiagram-P5KCCOFB-DgJzdqPr.js} +1 -1
  135. package/dist/assets/{sequenceDiagram-WJ2MYXX4-BJQcyiuO.js → sequenceDiagram-WJ2MYXX4-nO_0feCR.js} +1 -1
  136. package/dist/assets/sk-7eBEpg_i.js +1 -0
  137. package/dist/assets/sl-D8mz35xz.js +1 -0
  138. package/dist/assets/{stateDiagram-D77RDMKH-B-0Pxnb4.js → stateDiagram-D77RDMKH-DiHY7fmj.js} +1 -1
  139. package/dist/assets/stateDiagram-v2-MP3YSRHH-B-ln1J6g.js +1 -0
  140. package/dist/assets/sv-BRKZ4Z4y.js +1 -0
  141. package/dist/assets/{swimlanes-42K2YHIH-oICSfvZv.js → swimlanes-42K2YHIH-CYk23GX2.js} +1 -1
  142. package/dist/assets/swimlanesDiagram-VR7AAH4N-Bz8yiJQl.js +8 -0
  143. package/dist/assets/ta-DKAQy049.js +1 -0
  144. package/dist/assets/th-BuRbTdYq.js +1 -0
  145. package/dist/assets/{timeline-definition-24CTP7MA-DmKkaTSI.js → timeline-definition-24CTP7MA-DoWeIqkB.js} +1 -1
  146. package/dist/assets/tr-_9-Ip53s.js +1 -0
  147. package/dist/assets/useI18n-V1cysfvg.js +171 -0
  148. package/dist/assets/value-CHmTzbgv.js +1 -0
  149. package/dist/assets/{vennDiagram-4TSXK5OY-CnK77vBm.js → vennDiagram-4TSXK5OY-be67wLzm.js} +1 -1
  150. package/dist/assets/vi-DOgzte8u.js +1 -0
  151. package/dist/assets/{wardleyDiagram-VM6X3IG4-DkkVnAra.js → wardleyDiagram-VM6X3IG4-AWMVCRIW.js} +1 -1
  152. package/dist/assets/{xychartDiagram-S5SC5T6Z-DXVlr43t.js → xychartDiagram-S5SC5T6Z-BpEpObCO.js} +1 -1
  153. package/dist/assets/zh-CN-Be160TvV.js +1 -0
  154. package/dist/assets/zh-HK-izvou4UE.js +1 -0
  155. package/dist/assets/zh-TW-B7tQDnE2.js +1 -0
  156. package/dist/index.html +9 -8
  157. package/package.json +9 -9
  158. package/dist/assets/ChartLoadingSkeleton-BRWWLwJE.js +0 -1
  159. package/dist/assets/ChartWidget-29BcqLsQ.js +0 -5
  160. package/dist/assets/af-CBNa7AYn.js +0 -1
  161. package/dist/assets/ar-RghUrw-U.js +0 -1
  162. package/dist/assets/badge-tone-Ci8vno_R.js +0 -5
  163. package/dist/assets/bg-D_WdYZi3.js +0 -1
  164. package/dist/assets/bn-Do7unCCm.js +0 -1
  165. package/dist/assets/ca-CRZTbRqC.js +0 -1
  166. package/dist/assets/channel-DxaB-rRG.js +0 -1
  167. package/dist/assets/classDiagram-ZZMXUADV-Cb5NNOFP.js +0 -1
  168. package/dist/assets/classDiagram-v2-VYDZK3BY-Cb5NNOFP.js +0 -1
  169. package/dist/assets/context-9KbckYZi.js +0 -1
  170. package/dist/assets/cs-LJwt8LR2.js +0 -1
  171. package/dist/assets/cy-BlvpCYgb.js +0 -1
  172. package/dist/assets/da-BUvDMABw.js +0 -1
  173. package/dist/assets/de-AT-CMYX-FSX.js +0 -1
  174. package/dist/assets/de-Cg_5asH4.js +0 -1
  175. package/dist/assets/el-5l_HfQh-.js +0 -1
  176. package/dist/assets/en-AU-DIy7kJ-6.js +0 -1
  177. package/dist/assets/en-CA-BY8gTlj5.js +0 -1
  178. package/dist/assets/en-GB-BGqFfEzK.js +0 -1
  179. package/dist/assets/es-Bb0Mmwm4.js +0 -1
  180. package/dist/assets/esm-CfFZhCCl.js +0 -7
  181. package/dist/assets/esm-DDY4jF6a.js +0 -46
  182. package/dist/assets/et-BSa6lvqX.js +0 -1
  183. package/dist/assets/eu-9Yfh6o5v.js +0 -1
  184. package/dist/assets/fa-IR-BlqDoYrh.js +0 -1
  185. package/dist/assets/fi-Cj9cD91h.js +0 -1
  186. package/dist/assets/flowDiagram-HODETNUW-Br3H18HF.js +0 -1
  187. package/dist/assets/flows-actors-graph-runtime-YwzVDPst.js +0 -1
  188. package/dist/assets/fr-B0qYMnPX.js +0 -1
  189. package/dist/assets/fr-CA-C2acOTEv.js +0 -1
  190. package/dist/assets/gl-Ce_1v5yA.js +0 -1
  191. package/dist/assets/graph-runtime-BDCDECWS.js +0 -1
  192. package/dist/assets/he-fssXNSLh.js +0 -1
  193. package/dist/assets/hi-wjit_WaO.js +0 -1
  194. package/dist/assets/hr-CZcH_ib_.js +0 -1
  195. package/dist/assets/hu-DmApBwDg.js +0 -1
  196. package/dist/assets/id-CaQxvUk5.js +0 -1
  197. package/dist/assets/index-Da7nRw0z.js +0 -202
  198. package/dist/assets/is-C7YkCQSO.js +0 -1
  199. package/dist/assets/isSameWeek-B-QyK2gA.js +0 -1
  200. package/dist/assets/it--OaDSi8G.js +0 -1
  201. package/dist/assets/ja-BZII__KN.js +0 -1
  202. package/dist/assets/katex-CHQwrTZL.js +0 -1
  203. package/dist/assets/ko-RpFeRS3z.js +0 -1
  204. package/dist/assets/linear-B5bg3HtL.js +0 -1
  205. package/dist/assets/lt-Mb4LqnAa.js +0 -1
  206. package/dist/assets/lv-D333_Qfx.js +0 -1
  207. package/dist/assets/match-BwzNbvxk.js +0 -1
  208. package/dist/assets/match-DQpkdx9H.js +0 -1
  209. package/dist/assets/mermaid-VLURNSYL-DUd6jtzD.js +0 -1
  210. package/dist/assets/ms-CLbOeyRX.js +0 -1
  211. package/dist/assets/mt-PLOofk2t.js +0 -1
  212. package/dist/assets/nb-DxwrcYvh.js +0 -1
  213. package/dist/assets/nl-CzRLOR7M.js +0 -1
  214. package/dist/assets/node-YCCWYXNI.js +0 -2
  215. package/dist/assets/pl-gbLhckq3.js +0 -1
  216. package/dist/assets/pt-BR-R1rW_1OL.js +0 -1
  217. package/dist/assets/pt-BwcWNQjq.js +0 -1
  218. package/dist/assets/ro-DdDjuWNa.js +0 -1
  219. package/dist/assets/ru-BawxQnYH.js +0 -1
  220. package/dist/assets/sk-MRZEZ2K_.js +0 -1
  221. package/dist/assets/sl-BBub_-u1.js +0 -1
  222. package/dist/assets/stateDiagram-v2-MP3YSRHH-Ctzs0iNL.js +0 -1
  223. package/dist/assets/sv-C4z9pgWx.js +0 -1
  224. package/dist/assets/swimlanesDiagram-VR7AAH4N-Bhf7f3Wn.js +0 -8
  225. package/dist/assets/ta-1G1MUVAA.js +0 -1
  226. package/dist/assets/th-CbVjLGeK.js +0 -1
  227. package/dist/assets/tr-CL1-pTfR.js +0 -1
  228. package/dist/assets/useI18n-DcSZnYEx.js +0 -171
  229. package/dist/assets/vi-1ZMJLve8.js +0 -1
  230. package/dist/assets/zh-CN-uOTSXSf7.js +0 -1
  231. package/dist/assets/zh-HK-CNYirMD2.js +0 -1
  232. package/dist/assets/zh-TW-DB-dAf15.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a as e,r as t,t as n}from"./rolldown-runtime-BWaJ3C7D.js";import{t as r}from"./jsx-runtime-lTuChwRC.js";import{t as i}from"./react-9WV3M1gM.js";import{Du as a,Eu as o,ND as s,Nt as c,PS as l,Su as u,ZS as d,gw as f,oy as p,t as m,tT as h,xu as g}from"./useI18n-DcSZnYEx.js";import{B as _,E as v,V as y,a as b,r as x}from"./badge-tone-Ci8vno_R.js";import{a as S,i as C,n as w,o as T,p as E,r as D,t as O,u as k}from"./ChartEmptyState-ZXRcbrLV.js";import{Gt as A,Qt as j,nt as ee,t as te}from"./ChartLoadingSkeleton-BRWWLwJE.js";var{__extends:M,__assign:ne,__rest:re,__decorate:ie,__param:ae,__metadata:oe,__awaiter:se,__generator:ce,__exportStar:le,__createBinding:ue,__values:de,__read:fe,__spread:pe,__spreadArrays:me,__spreadArray:he,__await:ge,__asyncGenerator:_e,__asyncDelegator:ve,__asyncValues:ye,__makeTemplateObject:be,__importStar:xe,__importDefault:Se,__classPrivateFieldGet:Ce,__classPrivateFieldSet:we}=e(n(((e,t)=>{var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T;(function(e){var n=typeof global==`object`?global:typeof self==`object`?self:typeof this==`object`?this:{};typeof define==`function`&&define.amd?define(`tslib`,[`exports`],function(t){e(r(n,r(t)))}):typeof t==`object`&&typeof t.exports==`object`?e(r(n,r(t.exports))):e(r(n));function r(e,t){return e!==n&&(typeof Object.create==`function`?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(n,r){return e[n]=t?t(n,r):r}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])};n=function(e,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)},r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},a=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},o=function(e,t){return function(n,r){t(n,r,e)}},s=function(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)},c=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},l=function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o={next:s(0),throw:s(1),return:s(2)};return typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},u=function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&T(t,e,n)},T=Object.create?(function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),d=function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},f=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},p=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(f(arguments[t]));return e},m=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r},h=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||t)},g=function(e){return this instanceof g?(this.v=e,this):new g(e)},_=function(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i={},o(`next`),o(`throw`),o(`return`),i[Symbol.asyncIterator]=function(){return this},i;function o(e){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||s(e,t)})})}function s(e,t){try{c(r[e](t))}catch(e){d(a[0][3],e)}}function c(e){e.value instanceof g?Promise.resolve(e.value.v).then(l,u):d(a[0][2],e)}function l(e){s(`next`,e)}function u(e){s(`throw`,e)}function d(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}},v=function(e){var t={},n;return r(`next`),r(`throw`,function(e){throw e}),r(`return`),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:g(e[r](t)),done:r===`return`}:i?i(t):t}:i}},y=function(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof d==`function`?d(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}},b=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};var E=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t};x=function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&T(t,e,n);return E(t,e),t},S=function(e){return e&&e.__esModule?e:{default:e}},C=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},w=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},e(`__extends`,n),e(`__assign`,r),e(`__rest`,i),e(`__decorate`,a),e(`__param`,o),e(`__metadata`,s),e(`__awaiter`,c),e(`__generator`,l),e(`__exportStar`,u),e(`__createBinding`,T),e(`__values`,d),e(`__read`,f),e(`__spread`,p),e(`__spreadArrays`,m),e(`__spreadArray`,h),e(`__await`,g),e(`__asyncGenerator`,_),e(`__asyncDelegator`,v),e(`__asyncValues`,y),e(`__makeTemplateObject`,b),e(`__importStar`,x),e(`__importDefault`,S),e(`__classPrivateFieldGet`,C),e(`__classPrivateFieldSet`,w)})}))()).default,Te=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),N=new(function(){function e(){this.browser=new Te,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(N.wxa=!0,N.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?N.worker=!0:!N.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(N.node=!0,N.svgSupported=!0):Ee(navigator.userAgent,N);function Ee(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var De=`12px sans-serif`,Oe=20,ke=100,Ae=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function je(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32);t[r]=(e.charCodeAt(n)-Oe)/ke}return t}var Me=je(Ae),Ne={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=Ne.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n||=``,r||=`12px sans-serif`;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||12,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var l=Me[n[c]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r},getTime:function(){return Date.now?Date.now():+new Date}},Pe=et([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),Fe=et([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),Ie=Object.prototype.toString,Le=Array.prototype,Re=Le.forEach,ze=Le.filter,Be=Le.slice,Ve=Le.map,He=function(){}.constructor,Ue=He?He.prototype:null,We=`__proto__`,Ge=2311,Ke=2**53-1;function qe(){return Ge>=Ke&&(Ge=0),Ge++}function Je(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function P(e){if(typeof e!=`object`||!e)return e;var t=e,n=Ie.call(e);if(n===`[object Array]`){if(!xt(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=P(e[r])}}else if(Fe[n]){if(!xt(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!Pe[n]&&!xt(e)&&!lt(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==We&&(t[o]=P(e[o]));return t}function F(e,t,n){if(!G(t)||!G(e))return n?P(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==We){var i=e[r],a=t[r];G(a)&&G(i)&&!H(a)&&!H(i)&&!lt(a)&&!lt(i)&&!st(a)&&!st(i)&&!xt(a)&&!xt(i)?F(i,a,n):(n||!(r in e))&&(e[r]=P(t[r]))}return e}function I(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==We&&(e[n]=t[n]);return e}function Ye(e,t,n){e||={};for(var r=0;r<n.length;r++){var i=n[r];e[i]=t[i]}return e}function Xe(e,t,n){for(var r=rt(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}Ne.createCanvas;function L(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function Ze(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}function Qe(e,t,n){if(e=`prototype`in e?e.prototype:e,t=`prototype`in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];a!==`constructor`&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else Xe(e,t,n)}function $e(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function R(e,t,n){if(e&&t){if(e.forEach&&e.forEach===Re)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}}function z(e,t,n){if(!e)return[];if(!t)return ht(e);if(e.map&&e.map===Ve)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}function et(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function tt(e,t,n){if(!e)return[];if(!t)return ht(e);if(e.filter&&e.filter===ze)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function nt(e,t,n){if(e&&t){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}}function rt(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function it(e,t){var n=[...arguments].slice(2);return function(){return e.apply(t,n.concat(Be.call(arguments)))}}var B=Ue&&U(Ue.bind)?Ue.call.bind(Ue.bind):it;function V(e){var t=[...arguments].slice(1);return function(){return e.apply(this,t.concat(Be.call(arguments)))}}function H(e){return Array.isArray?Array.isArray(e):Ie.call(e)===`[object Array]`}function U(e){return typeof e==`function`}function W(e){return typeof e==`string`}function at(e){return Ie.call(e)===`[object String]`}function ot(e){return typeof e==`number`}function G(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function st(e){return!!Pe[Ie.call(e)]}function ct(e){return!!Fe[Ie.call(e)]}function lt(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function ut(e){return e.colorStops!=null}function dt(e){return e.image!=null}function ft(e){return e!==e}function pt(){for(var e=[...arguments],t=0,n=e.length;t<n;t++)if(e[t]!=null)return e[t]}function K(e,t){return e??t}function mt(e,t,n){return e??t??n}function ht(e){var t=[...arguments].slice(1);return Be.apply(e,t)}function gt(e){if(typeof e==`number`)return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function _t(e,t){if(!e)throw Error(t)}function vt(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var yt=`__ec_primitive__`;function bt(e){e[yt]=!0}function xt(e){return e[yt]}var St=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return rt(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),Ct=typeof Map==`function`;function wt(){return Ct?new Map:new St}var Tt=function(){function e(t){var n=H(t);this.data=wt();var r=this;t instanceof e?t.each(i):t&&R(t,i);function i(e,t){n?r.set(e,t):r.set(t,e)}}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return Ct?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function q(e){return new Tt(e)}function Et(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}function Dt(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&I(n,t),n}function Ot(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function kt(e,t){return e.hasOwnProperty(t)}function At(){}var jt=180/Math.PI;function Mt(e,t){return e??=0,t??=0,[e,t]}function Nt(e,t){return e[0]=t[0],e[1]=t[1],e}function Pt(e){return[e[0],e[1]]}function Ft(e,t,n){return e[0]=t,e[1]=n,e}function It(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function Lt(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function Rt(e){return Math.sqrt(zt(e))}function zt(e){return e[0]*e[0]+e[1]*e[1]}function Bt(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function Vt(e,t){var n=Rt(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Ht(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var Ut=Ht;function Wt(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Gt=Wt;function Kt(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function qt(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function Jt(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function Yt(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var Xt=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),Zt=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Xt(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new Xt(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new Xt(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new Xt(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Xt(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new Xt(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),Qt=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o<i[e].length;o++)if(i[e][o].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},c=i[e].length-1,l=i[e][c];return l&&l.callAtLast?i[e].splice(c,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,a=n[e].length;i<a;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=n.length,o=0;o<a;o++){var s=n[o];if(!(r&&r.filter&&s.query!=null&&!r.filter(e,s.query)))switch(i){case 0:s.h.call(s.ctx);break;case 1:s.h.call(s.ctx,t[0]);break;case 2:s.h.call(s.ctx,t[0],t[1]);break;default:s.h.apply(s.ctx,t)}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=t[i-1],o=n.length,s=0;s<o;s++){var c=n[s];if(!(r&&r.filter&&c.query!=null&&!r.filter(e,c.query)))switch(i){case 0:c.h.call(a);break;case 1:c.h.call(a,t[0]);break;case 2:c.h.call(a,t[0],t[1]);break;default:c.h.apply(a,t.slice(1,i-1))}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e}(),$t=Math.log(2);function en(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<<s)-1&~i)/$t);return e[n][c]}for(var l=r|1<<n,u=n+1;r&1<<u;)u++;for(var d=0,f=0,p=0;f<s;f++){var m=1<<f;m&i||(d+=(p%2?-1:1)*e[n][f]*en(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function tn(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=en(n,8,0,0,0,r);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]??(a[s]=0),a[s]+=((o+s)%2?-1:1)*en(n,7,+(o===0),1<<o,1<<s,r)/i*t[o];return function(e,t,n){var r=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/r,e[1]=(t*a[3]+n*a[4]+a[5])/r}}}var nn=`___zrEVENTSAVED`,rn=[];function an(e,t,n,r,i){return sn(rn,t,r,i,!0)&&sn(e,n,rn[0],rn[1])}function on(e,t){e&&n(e),t&&n(t);function n(e){var t=e[nn];t&&(t.clearMarkers&&t.clearMarkers(),delete e[nn])}}function sn(e,t,n,r,i){if(t.getBoundingClientRect&&N.domSupported&&!un(t)){var a=t[nn]||(t[nn]={}),o=ln(cn(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function cn(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=[`left`,`right`],i=[`top`,`bottom`],a=0;a<4;a++){var o=document.createElement(`div`),s=o.style,c=a%2,l=(a>>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){R(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function ln(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?tn(s,o):tn(o,s))}function un(e){return e.nodeName.toUpperCase()===`CANVAS`}var dn=/([&<>"'])/g,fn={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`};function pn(e){return e==null?``:(e+``).replace(dn,function(e,t){return fn[t]})}var mn=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,hn=[],gn=N.browser.firefox&&+N.browser.version.split(`.`)[0]<39;function _n(e,t,n,r){return n||={},r?vn(e,t,n):gn&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?vn(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function vn(e,t,n){if(N.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(un(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(sn(hn,e,r,i)){n.zrX=hn[0],n.zrY=hn[1];return}}n.zrX=n.zrY=0}function yn(e){return e||window.event}function bn(e,t,n){if(t=yn(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&_n(e,i,t,n)}else{_n(e,t,t,n);var a=xn(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&mn.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function xn(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function Sn(e,t,n,r){e.addEventListener(t,n,r)}function Cn(e,t,n,r){e.removeEventListener(t,n,r)}var wn=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function Tn(e){return e.which===2||e.which===3}var En=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a<o;a++){var s=r[a],c=_n(n,s,{});i.points.push([c.zrX,c.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in kn)if(kn.hasOwnProperty(t)){var n=kn[t](this._track,e);if(n)return n}},e}();function Dn(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function On(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var kn={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=Dn(r)/Dn(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=On(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}};function An(){return[1,0,0,1,0,0]}function jn(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Mn(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Nn(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function Pn(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function Fn(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function In(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function Ln(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}var J=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),Rn=Math.min,zn=Math.max,Bn=Math.abs,Vn=[`x`,`y`],Hn=[`width`,`height`],Un=new J,Wn=new J,Gn=new J,Kn=new J,qn=sr(),Jn=qn.minTv,Yn=qn.maxTv,Xn=[0,0],Y=function(){function e(e,t,n,r){Qn(this,e,t,n,r)}return e.set=function(e,t,n,r,i){return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),e.x=t,e.y=n,e.width=r,e.height=i,e},e.prototype.union=function(e){var t=Rn(e.x,this.x),n=Rn(e.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?zn(e.x+e.width,this.x+this.width)-t:e.width,this.height=isFinite(this.y)&&isFinite(this.height)?zn(e.y+e.height,this.y+this.height)-n:e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){return er(An(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&J.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=Qn(rr,t.x,t.y,t.width,t.height)),n instanceof e||(n=Qn(ir,n.x,n.y,n.width,n.height));var s=!!r;qn.reset(i,s);var c=qn.touchThreshold,l=t.x+c,u=t.x+t.width-c,d=t.y+c,f=t.y+t.height-c,p=n.x+c,m=n.x+n.width-c,h=n.y+c,g=n.y+n.height-c;if(l>u||d>f||p>m||h>g)return!1;var _=!(u<p||m<l||f<h||g<d);return(s||a)&&(Xn[0]=1/0,Xn[1]=0,or(l,u,p,m,0,s,a,o),or(d,f,h,g,1,s,a,o),s&&J.copy(r,_?qn.useDir?qn.dirMinTv:Jn:Yn)),_},e.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){$n(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n)e!==t&&$n(e,t);else if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height)}else{Un.x=Gn.x=t.x,Un.y=Kn.y=t.y,Wn.x=Kn.x=t.x+t.width,Wn.y=Gn.y=t.y+t.height,Un.transform(n),Kn.transform(n),Wn.transform(n),Gn.transform(n),e.x=Rn(Un.x,Wn.x,Gn.x,Kn.x),e.y=Rn(Un.y,Wn.y,Gn.y,Kn.y);var s=zn(Un.x,Wn.x,Gn.x,Kn.x),c=zn(Un.y,Wn.y,Gn.y,Kn.y);e.width=s-e.x,e.height=c-e.y}},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=jn(e||[]),Pn(e,e,Ft(ar,-t.x,-t.y)),In(e,e,Ft(ar,r,i)),Pn(e,e,Ft(ar,n.x,n.y)),e},e}(),Zn=Y.create,Qn=Y.set,$n=Y.copy,er=Y.calculateTransform,tr=Y.applyTransform,nr=Y.contain,rr=new Y(0,0,0,0),ir=new Y(0,0,0,0),ar=[];function or(e,t,n,r,i,a,o,s){var c=Bn(t-n),l=Bn(r-e),u=Rn(c,l),d=Vn[i],f=Vn[1-i],p=Hn[i];t<n||r<e?c<l?(a&&(Yn[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(Yn[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=zn(e,n),o[p]=Rn(t,r)-o[d]),a&&(u<Xn[0]||qn.useDir)&&(Xn[0]=Rn(u,Xn[0]),(c<l||!qn.bidirectional)&&(Jn[d]=c,Jn[f]=0,qn.useDir&&qn.calcDirMTV()),(c>=l||!qn.bidirectional)&&(Jn[d]=-l,Jn[f]=0,qn.useDir&&qn.calcDirMTV())))}function sr(){var e=0,t=new J,n=new J,r={minTv:new J,maxTv:new J,useDir:!1,dirMinTv:new J,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=zn(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;i(u)?i(a.x)&&i(a.y)&&o.set(0,0):(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)?o.set(0,0):(r.bidirectional||t.dot(n)>0)&&n.len()<o.len()&&o.copy(n))}};function i(e){return Bn(e)<1e-10}return r}var cr=`silent`;function lr(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:ur}}function ur(){wn(this.event)}var dr=function(e){M(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Qt),fr=function(){function e(e,t){this.x=e,this.y=t}return e}(),pr=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],mr=new Y(0,0,0,0),hr=function(e){M(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new fr(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new dr,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new Zt(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(R(pr,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=vr(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new fr(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new fr(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=lr(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new fr(e,t);if(_r(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new Y(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u===n||u.ignore||u.ignoreCoarsePointer||u.parent&&u.parent.ignoreCoarsePointer||(mr.copy(u.getBoundingRect()),u.transform&&mr.applyTransform(u.transform),mr.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m<s;m+=d)for(var h=0;h<p;h+=f)if(_r(a,i,e+m*Math.cos(h),t+m*Math.sin(h),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||=new En;var n=this._gestureMgr;t===`start`&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(t===`end`&&n.clear(),r){var i=r.type;e.gestureEvent=i;var a=new fr;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(Qt);R([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){hr.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=vr(this,n,r),a,o;if(e===`mouseup`&&i||(a=this.findHover(n,r),o=a.target),e===`mousedown`)this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e===`mouseup`)this._upEl=o;else if(e===`click`){if(this._downEl!==this._upEl||!this._downPoint||Ut(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function gr(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||cr}return!1}function _r(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=gr(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==cr)){t.target=o;break}}}function vr(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var yr=32,br=7;function xr(e){for(var t=0;e>=yr;)t|=e&1,e>>=1;return e+t}function Sr(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;Cr(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function Cr(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function wr(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a=e[r],o=t,s=r,c;o<s;)c=o+s>>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function Tr(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c<s&&a(e,t[n+i+c])>0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;c<s&&a(e,t[n+i-c])<=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function Er(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;c<s&&a(e,t[n+i-c])<0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c<s&&a(e,t[n+i+c])>=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function Dr(e,t){var n=br,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,u(e)}}function u(n){var o=r[n],s=i[n],c=r[n+1],l=i[n+1];i[n]=s+l,n===a-3&&(r[n+1]=r[n+2],i[n+1]=i[n+2]),a--;var u=Er(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=Tr(e[o+s-1],e,c,l,l-1,t),l!==0&&(s<=l?d(o,s,c,l):f(o,s,c,l)))}function d(r,i,a,s){var c=0;for(c=0;c<i;c++)o[c]=e[r+c];var l=0,u=a,d=r;if(e[d++]=e[u++],--s===0)for(c=0;c<i;c++)e[d+c]=o[l+c];else if(i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else{for(var f=n,p,m,h;;){p=0,m=0,h=!1;do if(t(e[u],o[l])<0){if(e[d++]=e[u++],m++,p=0,--s===0){h=!0;break}}else if(e[d++]=o[l++],p++,m=0,--i===1){h=!0;break}while((p|m)<f);if(h)break;do{if(p=Er(e[u],o,l,i,0,t),p!==0){for(c=0;c<p;c++)e[d+c]=o[l+c];if(d+=p,l+=p,i-=p,i<=1){h=!0;break}}if(e[d++]=e[u++],--s===0){h=!0;break}if(m=Tr(o[l],e,u,s,0,t),m!==0){for(c=0;c<m;c++)e[d+c]=e[u+c];if(d+=m,u+=m,s-=m,s===0){h=!0;break}}if(e[d++]=o[l++],--i===1){h=!0;break}f--}while(p>=br||m>=br);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else if(i===0)throw Error();else for(c=0;c<i;c++)e[d+c]=o[l+c]}}function f(r,i,a,s){var c=0;for(c=0;c<s;c++)o[c]=e[a+c];var l=r+i-1,u=s-1,d=a+s-1,f=0,p=0;if(e[d--]=e[l--],--i===0)for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c];else if(s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else{for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)<m);if(_)break;do{if(h=i-Er(o[u],e,r,i,i-1,t),h!==0){for(d-=h,l-=h,i-=h,p=d+1,f=l+1,c=h-1;c>=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-Tr(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c<g;c++)e[p+c]=o[f+c];if(s<=1){_=!0;break}}if(e[d--]=e[l--],--i===0){_=!0;break}m--}while(h>=br||g>=br);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c]}}return{mergeRuns:c,forceMergeRuns:l,pushRun:s}}function Or(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<yr)a=Sr(e,n,r,t),wr(e,n,r,n+a,t);else{var o=Dr(e,t),s=xr(i);do{if(a=Sr(e,n,r,t),a<s){var c=i;c>s&&(c=s),wr(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}}var kr=!1;function Ar(){kr||(kr=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function jr(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Mr=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=jr}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t||=!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,Or(n,jr)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath(),i=t&&t.length,a=0,o=e.__clipPaths;if(!e.ignoreClip&&(i||r)){if(o||=e.__clipPaths=[],i)for(var s=0;s<t.length;s++)o[a++]=t[s];for(var c=r,l=e;c;)c.parent=l,c.updateTransform(),o[a++]=c,l=c,c=c.getClipPath()}if(o&&(o.length=a),e.childrenRef){for(var u=e.childrenRef(),d=0;d<u.length;d++){var f=u[d];e.__dirty&&(f.__dirty|=1),this._updateAndAddDisplayable(f,o,n)}e.__dirty=0}else{var p=e;isNaN(p.z)&&(Ar(),p.z=0),isNaN(p.z2)&&(Ar(),p.z2=0),isNaN(p.zlevel)&&(Ar(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var m=e.getDecalElement&&e.getDecalElement();m&&this._updateAndAddDisplayable(m,o,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,o,n);var g=e.getTextContent();g&&this._updateAndAddDisplayable(g,o,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array)for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);else{var r=L(this._roots,e);r>=0&&this._roots.splice(r,1)}},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Nr=N.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},Pr={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Pr.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Pr.bounceIn(e*2)*.5:Pr.bounceOut(e*2-1)*.5+.5}},Fr=Math.pow,Ir=Math.sqrt,Lr=1e-8,Rr=1e-4,zr=Ir(3),Br=1/3,Vr=Mt(),Hr=Mt(),Ur=Mt();function Wr(e){return e>-Lr&&e<Lr}function Gr(e){return e>Lr||e<-Lr}function Kr(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function qr(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function Jr(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(Wr(u)&&Wr(d)){if(Wr(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(Wr(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=Ir(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-Fr(-y,Br):Fr(y,Br),b=b<0?-Fr(-b,Br):Fr(b,Br);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*Ir(u*u*u)),S=Math.acos(x)/3,C=Ir(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+zr*Math.sin(S)))/(3*o),T=(-s+C*(w-zr*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function Yr(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(Wr(o)){if(Gr(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(Wr(u))i[0]=-a/(2*o);else if(u>0){var d=Ir(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Xr(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function Zr(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;Vr[0]=c,Vr[1]=l;for(var v=0;v<1;v+=.05)Hr[0]=Kr(e,n,i,o,v),Hr[1]=Kr(t,r,a,s,v),g=Gt(Vr,Hr),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<Rr);y++)m=d-f,h=d+f,Hr[0]=Kr(e,n,i,o,m),Hr[1]=Kr(t,r,a,s,m),g=Gt(Hr,Vr),m>=0&&g<p?(d=m,p=g):(Ur[0]=Kr(e,n,i,o,h),Ur[1]=Kr(t,r,a,s,h),_=Gt(Ur,Vr),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=Kr(e,n,i,o,d),u[1]=Kr(t,r,a,s,d)),Ir(p)}function Qr(e,t,n,r,i,a,o,s,c){for(var l=e,u=t,d=0,f=1/c,p=1;p<=c;p++){var m=p*f,h=Kr(e,n,i,o,m),g=Kr(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function $r(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function ei(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function ti(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(Wr(a)){if(Gr(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(Wr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=Ir(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function ni(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function ri(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function ii(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;Vr[0]=o,Vr[1]=s;for(var f=0;f<1;f+=.05){Hr[0]=$r(e,n,i,f),Hr[1]=$r(t,r,a,f);var p=Gt(Vr,Hr);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<Rr);m++){var h=l-u,g=l+u;Hr[0]=$r(e,n,i,h),Hr[1]=$r(t,r,a,h);var p=Gt(Hr,Vr);if(h>=0&&p<d)l=h,d=p;else{Ur[0]=$r(e,n,i,g),Ur[1]=$r(t,r,a,g);var _=Gt(Ur,Vr);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=$r(e,n,i,l),c[1]=$r(t,r,a,l)),Ir(d)}function ai(e,t,n,r,i,a,o){for(var s=e,c=t,l=0,u=1/o,d=1;d<=o;d++){var f=d*u,p=$r(e,n,i,f),m=$r(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var oi=/cubic-bezier\(([0-9,\.e ]+)\)/;function si(e){var t=e&&oi.exec(e);if(t){var n=t[1].split(`,`),r=+vt(n[0]),i=+vt(n[1]),a=+vt(n[2]),o=+vt(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:Jr(0,r,a,1,e,s)&&Kr(0,i,o,1,s[0])}}}var ci=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||At,this.ondestroy=e.ondestroy||At,this.onrestart=e.onrestart||At,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused)this._pausedTime+=t;else{var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1}},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=U(e)?e:Pr[e]||si(e)},e}(),li=function(){function e(e){this.value=e}return e}(),ui=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new li(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),di=function(){function e(e){this._list=new ui,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new li(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),fi={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function pi(e){return e=Math.round(e),e<0?0:e>255?255:e}function mi(e){return e=Math.round(e),e<0?0:e>360?360:e}function hi(e){return e<0?0:e>1?1:e}function gi(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?pi(parseFloat(t)/100*255):pi(parseInt(t,10))}function _i(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?hi(parseFloat(t)/100):hi(parseFloat(t))}function vi(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function yi(e,t,n){return e+(t-e)*n}function bi(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function xi(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Si=new di(20),Ci=null;function wi(e,t){Ci&&xi(Ci,t),Ci=Si.put(e,Ci||t.slice())}function Ti(e,t){if(e){t||=[];var n=Si.get(e);if(n)return xi(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in fi)return xi(t,fi[r]),wi(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){bi(t,0,0,0,1);return}return bi(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),wi(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){bi(t,0,0,0,1);return}return bi(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),wi(e,t),t}}else{var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?bi(t,+l[0],+l[1],+l[2],1):bi(t,0,0,0,1);u=_i(l.pop());case`rgb`:if(l.length>=3)return bi(t,gi(l[0]),gi(l[1]),gi(l[2]),l.length===3?u:_i(l[3])),wi(e,t),t;bi(t,0,0,0,1);return;case`hsla`:if(l.length!==4){bi(t,0,0,0,1);return}return l[3]=_i(l[3]),Ei(l,t),wi(e,t),t;case`hsl`:if(l.length!==3){bi(t,0,0,0,1);return}return Ei(l,t),wi(e,t),t;default:return}}bi(t,0,0,0,1)}}}function Ei(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=_i(e[1]),i=_i(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],bi(t,pi(vi(o,a,n+1/3)*255),pi(vi(o,a,n)*255),pi(vi(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Di(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Oi(e,t){var n=Ti(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return Ni(n,n.length===4?`rgba`:`rgb`)}}function ki(e,t,n){if(t&&t.length&&e>=0&&e<=1){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=pi(yi(o[0],s[0],c)),n[1]=pi(yi(o[1],s[1],c)),n[2]=pi(yi(o[2],s[2],c)),n[3]=hi(yi(o[3],s[3],c)),n}}function Ai(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=Ti(t[i]),s=Ti(t[a]),c=r-i,l=Ni([pi(yi(o[0],s[0],c)),pi(yi(o[1],s[1],c)),pi(yi(o[2],s[2],c)),hi(yi(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function ji(e,t,n,r){var i=Ti(e);if(e)return i=Di(i),t!=null&&(i[0]=mi(U(t)?t(i[0]):t)),n!=null&&(i[1]=_i(U(n)?n(i[1]):n)),r!=null&&(i[2]=_i(U(r)?r(i[2]):r)),Ni(Ei(i),`rgba`)}function Mi(e,t){var n=Ti(e);if(n&&t!=null)return n[3]=hi(t),Ni(n,`rgba`)}function Ni(e,t){if(e&&e.length){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function Pi(e,t){var n=Ti(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Fi=new di(100);function Ii(e){if(W(e)){var t=Fi.get(e);return t||(t=Oi(e,-.1),Fi.put(e,t)),t}if(ut(e)){var n=I({},e);return n.colorStops=z(e.colorStops,function(e){return{offset:e.offset,color:Oi(e.color,-.1)}}),n}return e}function Li(e){return e.type===`linear`}function Ri(e){return e.type===`radial`}(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})();var zi=Array.prototype.slice;function Bi(e,t,n){return(t-e)*n+e}function Vi(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=Bi(t[a],n[a],r);return e}function Hi(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=Bi(t[o][s],n[o][s],r)}return e}function Ui(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function Wi(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+n[o][s]*r}return e}function Gi(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(n,r);s++)i.push({offset:o.offset,color:o.color.slice()})}function Ki(e,t,n){var r=e,i=t;if(r.push&&i.push){var a=r.length,o=i.length;if(a!==o){if(a>o)r.length=o;else for(var s=a;s<o;s++)r.push(n===1?i[s]:zi.call(i[s]))}for(var c=r[0]&&r[0].length,s=0;s<r.length;s++)if(n===1)isNaN(r[s])&&(r[s]=i[s]);else for(var l=0;l<c;l++)isNaN(r[s][l])&&(r[s][l]=i[s][l])}}function qi(e){if($e(e)){var t=e.length;if($e(e[0])){for(var n=[],r=0;r<t;r++)n.push(zi.call(e[r]));return n}return zi.call(e)}return e}function Ji(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],`rgba(`+e.join(`,`)+`)`}function Yi(e){return $e(e&&e[0])?2:1}var Xi=0,Zi=1,Qi=2,$i=3,ea=4,ta=5,na=6;function ra(e){return e===ea||e===ta}function ia(e){return e===Zi||e===Qi}var aa=[0,0,0,0],oa=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=na,s=t;if($e(t)){var c=Yi(t);o=c,(c===1&&!ot(t[0])||c===2&&!ot(t[0][0]))&&(a=!0)}else if(ot(t)&&!ft(t))o=Xi;else if(W(t)){if(!isNaN(+t))o=Xi;else{var l=Ti(t);l&&(s=l,o=$i)}}else if(ut(t)){var u=I({},s);u.colorStops=z(t.colorStops,function(e){return{offset:e.offset,color:Ti(e.color)}}),Li(t)?o=ea:Ri(t)&&(o=ta),s=u}i===0?this.valType=o:(o!==this.valType||o===na)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=U(n)?n:Pr[n]||si(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=ia(r),c=ra(r),l=0;l<i;l++){var u=n[l],d=u.value,f=a.value;u.percent=u.time/e,o||(s&&l!==i-1?Ki(d,f,r):c&&Gi(d.colorStops,f.colorStops))}if(!o&&r!==ta&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,l=0;l<i;l++)r===Xi?n[l].additiveValue=n[l].value-p:r===$i?n[l].additiveValue=Ui([],n[l].value,p,-1):ia(r)&&(n[l].additiveValue=r===Zi?Ui([],n[l].value,p,-1):Wi([],n[l].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,r=n?`additiveValue`:`value`,i=this.valType,a=this.keyframes,o=a.length,s=this.propName,c=i===$i,l,u=this._lastFr,d=Math.min,f,p;if(o===1)f=p=a[0];else{if(t<0)l=0;else if(t<this._lastFrP){for(l=d(u+1,o-1);l>=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;l<o&&!(a[l].percent>t);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?aa:e[s];if((ia(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(ia(i))i===Zi?Vi(g,f[r],p[r],h):Hi(g,f[r],p[r],h);else if(ra(i)){var _=f[r],v=p[r],y=i===ea;e[s]={type:y?`linear`:`radial`,x:Bi(_.x,v.x,h),y:Bi(_.y,v.y,h),colorStops:z(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Bi(e.offset,n.offset,h),color:Ji(Vi([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Bi(_.x2,v.x2,h),e[s].y2=Bi(_.y2,v.y2,h)):e[s].r=Bi(_.r,v.r,h)}else if(c)Vi(g,f[r],p[r],h),n||(e[s]=Ji(g));else{var b=Bi(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===Xi?e[n]=e[n]+r:t===$i?(Ti(e[n],aa),Ui(aa,aa,r,1),e[n]=Ji(aa)):t===Zi?Ui(e[n],e[n],r,1):t===Qi&&Wi(e[n],e[n],r,1)},e}(),sa=function(){function e(e,t,n,r){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r?Je(`Can' use additive animation on looped animation.`):(this._additiveAnimators=r,this._allowDiscrete=n)}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,rt(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a<n.length;a++){var o=n[a],s=i[o];if(!s){s=i[o]=new oa(o);var c=void 0,l=this._getAdditiveTrack(o);if(l){var u=l.keyframes,d=u[u.length-1];c=d&&d.value,l.valType===$i&&c&&(c=Ji(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,qi(c),r),this._trackKeys.push(o)}s.addKeyframe(e,qi(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var a=this._trackKeys[i],o=this._tracks[a],s=this._getAdditiveTrack(a),c=o.keyframes,l=c.length;if(o.prepare(r,s),o.needsAnimate()){if(!this._allowDiscrete&&o.discrete){var u=c[l-1];u&&(t._target[o.propName]=u.rawValue),o.setFinished()}else n.push(o)}}if(n.length||this._force){var d=new ci({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,a=0;a<r.length;a++)if(r[a]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(var a=0;a<n.length;a++)n[a].step(t._target,e);var o=t._onframeCbs;if(o)for(var a=0;a<o.length;a++)o[a](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||=[],this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||=[],this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||=[],this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return z(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var a=n[e[i]];a&&!a.isFinished()&&(t?a.step(this._target,1):this._started===1&&a.step(this._target,0),a.setFinished())}for(var o=!0,i=0;i<r.length;i++)if(!n[r[i]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},e.prototype.saveTo=function(e,t,n){if(e){t||=this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(a&&!a.isFinished()){var o=a.keyframes,s=o[n?0:o.length-1];s&&(e[i]=qi(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=rt(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var a=i.keyframes;if(a.length>1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function ca(){return new Date().getTime()}var la=function(e){M(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=ca()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)&&(r.ondestroy(),this.removeClip(r)),r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(Nr(t),!e._paused&&e.update())}Nr(t)},t.prototype.start=function(){this._running||(this._time=ca(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=ca(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=ca()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new sa(e,t.loop);return this.addAnimator(n),n},t}(Qt),ua=300,da=N.domSupported,fa=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:z(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),pa={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},ma=!1;function ha(e){var t=e.pointerType;return t===`pen`||t===`touch`}function ga(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function _a(e){e&&(e.zrByTouch=!0)}function va(e,t){return bn(e.dom,new ba(e,t),!0)}function ya(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var ba=function(){function e(e,t){this.stopPropagation=At,this.stopImmediatePropagation=At,this.preventDefault=At,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),xa={mousedown:function(e){e=bn(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=bn(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=bn(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=bn(this.dom,e);var t=e.toElement||e.relatedTarget;ya(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){ma=!0,e=bn(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){ma||(e=bn(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=bn(this.dom,e),_a(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),xa.mousemove.call(this,e),xa.mousedown.call(this,e)},touchmove:function(e){e=bn(this.dom,e),_a(e),this.handler.processGesture(e,`change`),xa.mousemove.call(this,e)},touchend:function(e){e=bn(this.dom,e),_a(e),this.handler.processGesture(e,`end`),xa.mouseup.call(this,e),+new Date-this.__lastTouchMoment<ua&&xa.click.call(this,e)},pointerdown:function(e){xa.mousedown.call(this,e)},pointermove:function(e){ha(e)||xa.mousemove.call(this,e)},pointerup:function(e){xa.mouseup.call(this,e)},pointerout:function(e){ha(e)||xa.mouseout.call(this,e)}};R([`click`,`dblclick`,`contextmenu`],function(e){xa[e]=function(t){t=bn(this.dom,t),this.trigger(e,t)}});var Sa={pointermove:function(e){ha(e)||Sa.mousemove.call(this,e)},pointerup:function(e){Sa.mouseup.call(this,e)},mousemove:function(e){this.trigger(`mousemove`,e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger(`mouseup`,e),t&&(e.zrEventControl=`only_globalout`,this.trigger(`mouseout`,e))}};function Ca(e,t){var n=t.domHandlers;N.pointerEventsSupported?R(fa.pointer,function(r){Ta(t,r,function(t){n[r].call(e,t)})}):(N.touchEventsSupported&&R(fa.touch,function(r){Ta(t,r,function(i){n[r].call(e,i),ga(t)})}),R(fa.mouse,function(r){Ta(t,r,function(i){i=yn(i),t.touching||n[r].call(e,i)})}))}function wa(e,t){N.pointerEventsSupported?R(pa.pointer,n):N.touchEventsSupported||R(pa.mouse,n);function n(n){function r(r){r=yn(r),ya(e,r.target)||(r=va(e,r),t.domHandlers[n].call(e,r))}Ta(t,n,r,{capture:!0})}}function Ta(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,Sn(e.domTarget,t,n,r)}function Ea(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&Cn(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var Da=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),Oa=function(e){M(t,e);function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new Da(t,xa),da&&(r._globalHandlerScope=new Da(document,Sa)),Ca(r,r._localHandlerScope),r}return t.prototype.dispose=function(){Ea(this._localHandlerScope),da&&Ea(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||`default`)},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,da&&+this.__pointerCapturing^e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?wa(this,t):Ea(t)}},t}(Qt),ka=1;N.hasGlobalWindow&&(ka=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Aa=ka,ja=.4,Ma=`#333`,Na=`#ccc`,Pa=`#eee`,Fa=jn,Ia=5e-5;function La(e){return e>Ia||e<-Ia}var Ra=[],za=[],Ba=An(),Va=Math.abs,Ha=function(){function e(){}return e.prototype.getLocalTransform=function(e){return Ua(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return La(this.rotation)||La(this.x)||La(this.y)||La(this.scaleX-1)||La(this.scaleY-1)||La(this.skewX)||La(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;t||e?(n||=An(),t?this.getLocalTransform(n):Fa(n),e&&(t?Nn(n,e,n):Mn(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||An(),Ln(this.invTransform,n)):n&&(Fa(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Ra);var n=Ra[0]<0?-1:1,r=Ra[1]<0?-1:1,i=((Ra[0]-n)*t+n)/Ra[0]||0,a=((Ra[1]-r)*t+r)/Ra[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||An(),Nn(za,e.invTransform,t),t=za);var n=this.originX,r=this.originY;(n||r)&&(Ba[4]=n,Ba[5]=r,Nn(za,t,Ba),za[4]-=n,za[5]-=r,t=za),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&qt(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&qt(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Va(e[0]-1)>1e-10&&Va(e[3]-1)>1e-10?Math.sqrt(Va(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){Ka(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&Fn(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),Ua=Ha.getLocalTransform;function Wa(){return new Ha}var Ga=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function Ka(e,t){return Ye(e,t,Ga)}function qa(e){Ja||=new di(100),e||=`12px sans-serif`;var t=Ja.get(e);return t||(t={font:e,strWidthCache:new di(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:Ne.measureText(`国`,e).width,asciiCharWidth:Ne.measureText(`a`,e).width},Ja.put(e,t)),t}var Ja;function Ya(e){if(!(Xa>=Za)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=Ne.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?Xa=Za:i>2&&Xa++,t}}var Xa=0,Za=5;function Qa(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=Ya(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function $a(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=Ne.measureText(t,e.font).width,n.put(t,r)),r}function eo(e,t,n,r){var i=$a(qa(t),e),a=io(t);return new Y(no(0,i,n),ro(0,a,r),i,a)}function to(e,t,n,r){var i=((e||``)+``).split(`
1
+ import{a as e,r as t,t as n}from"./rolldown-runtime-BWaJ3C7D.js";import{t as r}from"./jsx-runtime-lTuChwRC.js";import{t as i}from"./react-9WV3M1gM.js";import{Cu as a,Ew as o,Nt as s,UD as c,WS as l,dT as u,gy as d,sC as f,t as p,vu as m,wu as h,yu as g}from"./useI18n-V1cysfvg.js";import{B as _,E as v,V as y,a as b,r as x}from"./badge-tone-CARgRBWT.js";import{a as S,i as C,n as w,o as T,p as E,r as D,t as O,u as k}from"./ChartEmptyState-DWIzkRcF.js";import{Gt as A,Qt as j,nt as ee,t as te}from"./ChartLoadingSkeleton-DJK8tr0I.js";var{__extends:M,__assign:ne,__rest:re,__decorate:ie,__param:ae,__metadata:oe,__awaiter:se,__generator:ce,__exportStar:le,__createBinding:ue,__values:de,__read:fe,__spread:pe,__spreadArrays:me,__spreadArray:he,__await:ge,__asyncGenerator:_e,__asyncDelegator:ve,__asyncValues:ye,__makeTemplateObject:be,__importStar:xe,__importDefault:Se,__classPrivateFieldGet:Ce,__classPrivateFieldSet:we}=e(n(((e,t)=>{var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T;(function(e){var n=typeof global==`object`?global:typeof self==`object`?self:typeof this==`object`?this:{};typeof define==`function`&&define.amd?define(`tslib`,[`exports`],function(t){e(r(n,r(t)))}):typeof t==`object`&&typeof t.exports==`object`?e(r(n,r(t.exports))):e(r(n));function r(e,t){return e!==n&&(typeof Object.create==`function`?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(n,r){return e[n]=t?t(n,r):r}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])};n=function(e,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)},r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},a=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},o=function(e,t){return function(n,r){t(n,r,e)}},s=function(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)},c=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},l=function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o={next:s(0),throw:s(1),return:s(2)};return typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},u=function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&T(t,e,n)},T=Object.create?(function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),d=function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},f=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},p=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(f(arguments[t]));return e},m=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r},h=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||t)},g=function(e){return this instanceof g?(this.v=e,this):new g(e)},_=function(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i={},o(`next`),o(`throw`),o(`return`),i[Symbol.asyncIterator]=function(){return this},i;function o(e){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||s(e,t)})})}function s(e,t){try{c(r[e](t))}catch(e){d(a[0][3],e)}}function c(e){e.value instanceof g?Promise.resolve(e.value.v).then(l,u):d(a[0][2],e)}function l(e){s(`next`,e)}function u(e){s(`throw`,e)}function d(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}},v=function(e){var t={},n;return r(`next`),r(`throw`,function(e){throw e}),r(`return`),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:g(e[r](t)),done:r===`return`}:i?i(t):t}:i}},y=function(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof d==`function`?d(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}},b=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};var E=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t};x=function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&T(t,e,n);return E(t,e),t},S=function(e){return e&&e.__esModule?e:{default:e}},C=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},w=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},e(`__extends`,n),e(`__assign`,r),e(`__rest`,i),e(`__decorate`,a),e(`__param`,o),e(`__metadata`,s),e(`__awaiter`,c),e(`__generator`,l),e(`__exportStar`,u),e(`__createBinding`,T),e(`__values`,d),e(`__read`,f),e(`__spread`,p),e(`__spreadArrays`,m),e(`__spreadArray`,h),e(`__await`,g),e(`__asyncGenerator`,_),e(`__asyncDelegator`,v),e(`__asyncValues`,y),e(`__makeTemplateObject`,b),e(`__importStar`,x),e(`__importDefault`,S),e(`__classPrivateFieldGet`,C),e(`__classPrivateFieldSet`,w)})}))()).default,Te=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),N=new(function(){function e(){this.browser=new Te,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(N.wxa=!0,N.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?N.worker=!0:!N.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(N.node=!0,N.svgSupported=!0):Ee(navigator.userAgent,N);function Ee(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var De=`12px sans-serif`,Oe=20,ke=100,Ae=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function je(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32);t[r]=(e.charCodeAt(n)-Oe)/ke}return t}var Me=je(Ae),Ne={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=Ne.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n||=``,r||=`12px sans-serif`;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||12,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var l=Me[n[c]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r},getTime:function(){return Date.now?Date.now():+new Date}},Pe=et([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),Fe=et([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),Ie=Object.prototype.toString,Le=Array.prototype,Re=Le.forEach,ze=Le.filter,Be=Le.slice,Ve=Le.map,He=function(){}.constructor,Ue=He?He.prototype:null,We=`__proto__`,Ge=2311,Ke=2**53-1;function qe(){return Ge>=Ke&&(Ge=0),Ge++}function Je(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function P(e){if(typeof e!=`object`||!e)return e;var t=e,n=Ie.call(e);if(n===`[object Array]`){if(!xt(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=P(e[r])}}else if(Fe[n]){if(!xt(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!Pe[n]&&!xt(e)&&!lt(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==We&&(t[o]=P(e[o]));return t}function F(e,t,n){if(!G(t)||!G(e))return n?P(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==We){var i=e[r],a=t[r];G(a)&&G(i)&&!H(a)&&!H(i)&&!lt(a)&&!lt(i)&&!st(a)&&!st(i)&&!xt(a)&&!xt(i)?F(i,a,n):(n||!(r in e))&&(e[r]=P(t[r]))}return e}function I(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==We&&(e[n]=t[n]);return e}function Ye(e,t,n){e||={};for(var r=0;r<n.length;r++){var i=n[r];e[i]=t[i]}return e}function Xe(e,t,n){for(var r=rt(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}Ne.createCanvas;function L(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function Ze(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}function Qe(e,t,n){if(e=`prototype`in e?e.prototype:e,t=`prototype`in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];a!==`constructor`&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else Xe(e,t,n)}function $e(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function R(e,t,n){if(e&&t){if(e.forEach&&e.forEach===Re)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}}function z(e,t,n){if(!e)return[];if(!t)return ht(e);if(e.map&&e.map===Ve)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}function et(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function tt(e,t,n){if(!e)return[];if(!t)return ht(e);if(e.filter&&e.filter===ze)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function nt(e,t,n){if(e&&t){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}}function rt(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function it(e,t){var n=[...arguments].slice(2);return function(){return e.apply(t,n.concat(Be.call(arguments)))}}var B=Ue&&U(Ue.bind)?Ue.call.bind(Ue.bind):it;function V(e){var t=[...arguments].slice(1);return function(){return e.apply(this,t.concat(Be.call(arguments)))}}function H(e){return Array.isArray?Array.isArray(e):Ie.call(e)===`[object Array]`}function U(e){return typeof e==`function`}function W(e){return typeof e==`string`}function at(e){return Ie.call(e)===`[object String]`}function ot(e){return typeof e==`number`}function G(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function st(e){return!!Pe[Ie.call(e)]}function ct(e){return!!Fe[Ie.call(e)]}function lt(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function ut(e){return e.colorStops!=null}function dt(e){return e.image!=null}function ft(e){return e!==e}function pt(){for(var e=[...arguments],t=0,n=e.length;t<n;t++)if(e[t]!=null)return e[t]}function K(e,t){return e??t}function mt(e,t,n){return e??t??n}function ht(e){var t=[...arguments].slice(1);return Be.apply(e,t)}function gt(e){if(typeof e==`number`)return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function _t(e,t){if(!e)throw Error(t)}function vt(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var yt=`__ec_primitive__`;function bt(e){e[yt]=!0}function xt(e){return e[yt]}var St=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return rt(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),Ct=typeof Map==`function`;function wt(){return Ct?new Map:new St}var Tt=function(){function e(t){var n=H(t);this.data=wt();var r=this;t instanceof e?t.each(i):t&&R(t,i);function i(e,t){n?r.set(e,t):r.set(t,e)}}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return Ct?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function q(e){return new Tt(e)}function Et(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}function Dt(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&I(n,t),n}function Ot(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function kt(e,t){return e.hasOwnProperty(t)}function At(){}var jt=180/Math.PI;function Mt(e,t){return e??=0,t??=0,[e,t]}function Nt(e,t){return e[0]=t[0],e[1]=t[1],e}function Pt(e){return[e[0],e[1]]}function Ft(e,t,n){return e[0]=t,e[1]=n,e}function It(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function Lt(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function Rt(e){return Math.sqrt(zt(e))}function zt(e){return e[0]*e[0]+e[1]*e[1]}function Bt(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function Vt(e,t){var n=Rt(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Ht(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var Ut=Ht;function Wt(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Gt=Wt;function Kt(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function qt(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function Jt(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function Yt(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var Xt=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),Zt=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Xt(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new Xt(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new Xt(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new Xt(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Xt(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new Xt(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),Qt=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o<i[e].length;o++)if(i[e][o].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},c=i[e].length-1,l=i[e][c];return l&&l.callAtLast?i[e].splice(c,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,a=n[e].length;i<a;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=n.length,o=0;o<a;o++){var s=n[o];if(!(r&&r.filter&&s.query!=null&&!r.filter(e,s.query)))switch(i){case 0:s.h.call(s.ctx);break;case 1:s.h.call(s.ctx,t[0]);break;case 2:s.h.call(s.ctx,t[0],t[1]);break;default:s.h.apply(s.ctx,t)}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=t[i-1],o=n.length,s=0;s<o;s++){var c=n[s];if(!(r&&r.filter&&c.query!=null&&!r.filter(e,c.query)))switch(i){case 0:c.h.call(a);break;case 1:c.h.call(a,t[0]);break;case 2:c.h.call(a,t[0],t[1]);break;default:c.h.apply(a,t.slice(1,i-1))}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e}(),$t=Math.log(2);function en(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<<s)-1&~i)/$t);return e[n][c]}for(var l=r|1<<n,u=n+1;r&1<<u;)u++;for(var d=0,f=0,p=0;f<s;f++){var m=1<<f;m&i||(d+=(p%2?-1:1)*e[n][f]*en(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function tn(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=en(n,8,0,0,0,r);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]??(a[s]=0),a[s]+=((o+s)%2?-1:1)*en(n,7,+(o===0),1<<o,1<<s,r)/i*t[o];return function(e,t,n){var r=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/r,e[1]=(t*a[3]+n*a[4]+a[5])/r}}}var nn=`___zrEVENTSAVED`,rn=[];function an(e,t,n,r,i){return sn(rn,t,r,i,!0)&&sn(e,n,rn[0],rn[1])}function on(e,t){e&&n(e),t&&n(t);function n(e){var t=e[nn];t&&(t.clearMarkers&&t.clearMarkers(),delete e[nn])}}function sn(e,t,n,r,i){if(t.getBoundingClientRect&&N.domSupported&&!un(t)){var a=t[nn]||(t[nn]={}),o=ln(cn(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function cn(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=[`left`,`right`],i=[`top`,`bottom`],a=0;a<4;a++){var o=document.createElement(`div`),s=o.style,c=a%2,l=(a>>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){R(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function ln(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?tn(s,o):tn(o,s))}function un(e){return e.nodeName.toUpperCase()===`CANVAS`}var dn=/([&<>"'])/g,fn={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`};function pn(e){return e==null?``:(e+``).replace(dn,function(e,t){return fn[t]})}var mn=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,hn=[],gn=N.browser.firefox&&+N.browser.version.split(`.`)[0]<39;function _n(e,t,n,r){return n||={},r?vn(e,t,n):gn&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?vn(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function vn(e,t,n){if(N.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(un(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(sn(hn,e,r,i)){n.zrX=hn[0],n.zrY=hn[1];return}}n.zrX=n.zrY=0}function yn(e){return e||window.event}function bn(e,t,n){if(t=yn(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&_n(e,i,t,n)}else{_n(e,t,t,n);var a=xn(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&mn.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function xn(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function Sn(e,t,n,r){e.addEventListener(t,n,r)}function Cn(e,t,n,r){e.removeEventListener(t,n,r)}var wn=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function Tn(e){return e.which===2||e.which===3}var En=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a<o;a++){var s=r[a],c=_n(n,s,{});i.points.push([c.zrX,c.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in kn)if(kn.hasOwnProperty(t)){var n=kn[t](this._track,e);if(n)return n}},e}();function Dn(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function On(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var kn={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=Dn(r)/Dn(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=On(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}};function An(){return[1,0,0,1,0,0]}function jn(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Mn(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Nn(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function Pn(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function Fn(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function In(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function Ln(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}var J=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),Rn=Math.min,zn=Math.max,Bn=Math.abs,Vn=[`x`,`y`],Hn=[`width`,`height`],Un=new J,Wn=new J,Gn=new J,Kn=new J,qn=sr(),Jn=qn.minTv,Yn=qn.maxTv,Xn=[0,0],Y=function(){function e(e,t,n,r){Qn(this,e,t,n,r)}return e.set=function(e,t,n,r,i){return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),e.x=t,e.y=n,e.width=r,e.height=i,e},e.prototype.union=function(e){var t=Rn(e.x,this.x),n=Rn(e.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?zn(e.x+e.width,this.x+this.width)-t:e.width,this.height=isFinite(this.y)&&isFinite(this.height)?zn(e.y+e.height,this.y+this.height)-n:e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){return er(An(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&J.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=Qn(rr,t.x,t.y,t.width,t.height)),n instanceof e||(n=Qn(ir,n.x,n.y,n.width,n.height));var s=!!r;qn.reset(i,s);var c=qn.touchThreshold,l=t.x+c,u=t.x+t.width-c,d=t.y+c,f=t.y+t.height-c,p=n.x+c,m=n.x+n.width-c,h=n.y+c,g=n.y+n.height-c;if(l>u||d>f||p>m||h>g)return!1;var _=!(u<p||m<l||f<h||g<d);return(s||a)&&(Xn[0]=1/0,Xn[1]=0,or(l,u,p,m,0,s,a,o),or(d,f,h,g,1,s,a,o),s&&J.copy(r,_?qn.useDir?qn.dirMinTv:Jn:Yn)),_},e.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){$n(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n)e!==t&&$n(e,t);else if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height)}else{Un.x=Gn.x=t.x,Un.y=Kn.y=t.y,Wn.x=Kn.x=t.x+t.width,Wn.y=Gn.y=t.y+t.height,Un.transform(n),Kn.transform(n),Wn.transform(n),Gn.transform(n),e.x=Rn(Un.x,Wn.x,Gn.x,Kn.x),e.y=Rn(Un.y,Wn.y,Gn.y,Kn.y);var s=zn(Un.x,Wn.x,Gn.x,Kn.x),c=zn(Un.y,Wn.y,Gn.y,Kn.y);e.width=s-e.x,e.height=c-e.y}},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=jn(e||[]),Pn(e,e,Ft(ar,-t.x,-t.y)),In(e,e,Ft(ar,r,i)),Pn(e,e,Ft(ar,n.x,n.y)),e},e}(),Zn=Y.create,Qn=Y.set,$n=Y.copy,er=Y.calculateTransform,tr=Y.applyTransform,nr=Y.contain,rr=new Y(0,0,0,0),ir=new Y(0,0,0,0),ar=[];function or(e,t,n,r,i,a,o,s){var c=Bn(t-n),l=Bn(r-e),u=Rn(c,l),d=Vn[i],f=Vn[1-i],p=Hn[i];t<n||r<e?c<l?(a&&(Yn[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(Yn[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=zn(e,n),o[p]=Rn(t,r)-o[d]),a&&(u<Xn[0]||qn.useDir)&&(Xn[0]=Rn(u,Xn[0]),(c<l||!qn.bidirectional)&&(Jn[d]=c,Jn[f]=0,qn.useDir&&qn.calcDirMTV()),(c>=l||!qn.bidirectional)&&(Jn[d]=-l,Jn[f]=0,qn.useDir&&qn.calcDirMTV())))}function sr(){var e=0,t=new J,n=new J,r={minTv:new J,maxTv:new J,useDir:!1,dirMinTv:new J,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=zn(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;i(u)?i(a.x)&&i(a.y)&&o.set(0,0):(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)?o.set(0,0):(r.bidirectional||t.dot(n)>0)&&n.len()<o.len()&&o.copy(n))}};function i(e){return Bn(e)<1e-10}return r}var cr=`silent`;function lr(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:ur}}function ur(){wn(this.event)}var dr=function(e){M(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Qt),fr=function(){function e(e,t){this.x=e,this.y=t}return e}(),pr=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],mr=new Y(0,0,0,0),hr=function(e){M(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new fr(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new dr,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new Zt(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(R(pr,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=vr(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new fr(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new fr(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=lr(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new fr(e,t);if(_r(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new Y(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u===n||u.ignore||u.ignoreCoarsePointer||u.parent&&u.parent.ignoreCoarsePointer||(mr.copy(u.getBoundingRect()),u.transform&&mr.applyTransform(u.transform),mr.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m<s;m+=d)for(var h=0;h<p;h+=f)if(_r(a,i,e+m*Math.cos(h),t+m*Math.sin(h),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||=new En;var n=this._gestureMgr;t===`start`&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(t===`end`&&n.clear(),r){var i=r.type;e.gestureEvent=i;var a=new fr;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(Qt);R([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){hr.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=vr(this,n,r),a,o;if(e===`mouseup`&&i||(a=this.findHover(n,r),o=a.target),e===`mousedown`)this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e===`mouseup`)this._upEl=o;else if(e===`click`){if(this._downEl!==this._upEl||!this._downPoint||Ut(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function gr(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||cr}return!1}function _r(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=gr(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==cr)){t.target=o;break}}}function vr(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var yr=32,br=7;function xr(e){for(var t=0;e>=yr;)t|=e&1,e>>=1;return e+t}function Sr(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;Cr(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function Cr(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function wr(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a=e[r],o=t,s=r,c;o<s;)c=o+s>>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function Tr(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c<s&&a(e,t[n+i+c])>0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;c<s&&a(e,t[n+i-c])<=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function Er(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;c<s&&a(e,t[n+i-c])<0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c<s&&a(e,t[n+i+c])>=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function Dr(e,t){var n=br,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,u(e)}}function u(n){var o=r[n],s=i[n],c=r[n+1],l=i[n+1];i[n]=s+l,n===a-3&&(r[n+1]=r[n+2],i[n+1]=i[n+2]),a--;var u=Er(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=Tr(e[o+s-1],e,c,l,l-1,t),l!==0&&(s<=l?d(o,s,c,l):f(o,s,c,l)))}function d(r,i,a,s){var c=0;for(c=0;c<i;c++)o[c]=e[r+c];var l=0,u=a,d=r;if(e[d++]=e[u++],--s===0)for(c=0;c<i;c++)e[d+c]=o[l+c];else if(i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else{for(var f=n,p,m,h;;){p=0,m=0,h=!1;do if(t(e[u],o[l])<0){if(e[d++]=e[u++],m++,p=0,--s===0){h=!0;break}}else if(e[d++]=o[l++],p++,m=0,--i===1){h=!0;break}while((p|m)<f);if(h)break;do{if(p=Er(e[u],o,l,i,0,t),p!==0){for(c=0;c<p;c++)e[d+c]=o[l+c];if(d+=p,l+=p,i-=p,i<=1){h=!0;break}}if(e[d++]=e[u++],--s===0){h=!0;break}if(m=Tr(o[l],e,u,s,0,t),m!==0){for(c=0;c<m;c++)e[d+c]=e[u+c];if(d+=m,u+=m,s-=m,s===0){h=!0;break}}if(e[d++]=o[l++],--i===1){h=!0;break}f--}while(p>=br||m>=br);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else if(i===0)throw Error();else for(c=0;c<i;c++)e[d+c]=o[l+c]}}function f(r,i,a,s){var c=0;for(c=0;c<s;c++)o[c]=e[a+c];var l=r+i-1,u=s-1,d=a+s-1,f=0,p=0;if(e[d--]=e[l--],--i===0)for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c];else if(s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else{for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)<m);if(_)break;do{if(h=i-Er(o[u],e,r,i,i-1,t),h!==0){for(d-=h,l-=h,i-=h,p=d+1,f=l+1,c=h-1;c>=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-Tr(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c<g;c++)e[p+c]=o[f+c];if(s<=1){_=!0;break}}if(e[d--]=e[l--],--i===0){_=!0;break}m--}while(h>=br||g>=br);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c]}}return{mergeRuns:c,forceMergeRuns:l,pushRun:s}}function Or(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<yr)a=Sr(e,n,r,t),wr(e,n,r,n+a,t);else{var o=Dr(e,t),s=xr(i);do{if(a=Sr(e,n,r,t),a<s){var c=i;c>s&&(c=s),wr(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}}var kr=!1;function Ar(){kr||(kr=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function jr(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Mr=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=jr}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t||=!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,Or(n,jr)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath(),i=t&&t.length,a=0,o=e.__clipPaths;if(!e.ignoreClip&&(i||r)){if(o||=e.__clipPaths=[],i)for(var s=0;s<t.length;s++)o[a++]=t[s];for(var c=r,l=e;c;)c.parent=l,c.updateTransform(),o[a++]=c,l=c,c=c.getClipPath()}if(o&&(o.length=a),e.childrenRef){for(var u=e.childrenRef(),d=0;d<u.length;d++){var f=u[d];e.__dirty&&(f.__dirty|=1),this._updateAndAddDisplayable(f,o,n)}e.__dirty=0}else{var p=e;isNaN(p.z)&&(Ar(),p.z=0),isNaN(p.z2)&&(Ar(),p.z2=0),isNaN(p.zlevel)&&(Ar(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var m=e.getDecalElement&&e.getDecalElement();m&&this._updateAndAddDisplayable(m,o,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,o,n);var g=e.getTextContent();g&&this._updateAndAddDisplayable(g,o,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array)for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);else{var r=L(this._roots,e);r>=0&&this._roots.splice(r,1)}},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Nr=N.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},Pr={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Pr.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Pr.bounceIn(e*2)*.5:Pr.bounceOut(e*2-1)*.5+.5}},Fr=Math.pow,Ir=Math.sqrt,Lr=1e-8,Rr=1e-4,zr=Ir(3),Br=1/3,Vr=Mt(),Hr=Mt(),Ur=Mt();function Wr(e){return e>-Lr&&e<Lr}function Gr(e){return e>Lr||e<-Lr}function Kr(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function qr(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function Jr(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(Wr(u)&&Wr(d)){if(Wr(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(Wr(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=Ir(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-Fr(-y,Br):Fr(y,Br),b=b<0?-Fr(-b,Br):Fr(b,Br);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*Ir(u*u*u)),S=Math.acos(x)/3,C=Ir(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+zr*Math.sin(S)))/(3*o),T=(-s+C*(w-zr*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function Yr(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(Wr(o)){if(Gr(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(Wr(u))i[0]=-a/(2*o);else if(u>0){var d=Ir(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Xr(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function Zr(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;Vr[0]=c,Vr[1]=l;for(var v=0;v<1;v+=.05)Hr[0]=Kr(e,n,i,o,v),Hr[1]=Kr(t,r,a,s,v),g=Gt(Vr,Hr),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<Rr);y++)m=d-f,h=d+f,Hr[0]=Kr(e,n,i,o,m),Hr[1]=Kr(t,r,a,s,m),g=Gt(Hr,Vr),m>=0&&g<p?(d=m,p=g):(Ur[0]=Kr(e,n,i,o,h),Ur[1]=Kr(t,r,a,s,h),_=Gt(Ur,Vr),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=Kr(e,n,i,o,d),u[1]=Kr(t,r,a,s,d)),Ir(p)}function Qr(e,t,n,r,i,a,o,s,c){for(var l=e,u=t,d=0,f=1/c,p=1;p<=c;p++){var m=p*f,h=Kr(e,n,i,o,m),g=Kr(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function $r(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function ei(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function ti(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(Wr(a)){if(Gr(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(Wr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=Ir(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function ni(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function ri(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function ii(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;Vr[0]=o,Vr[1]=s;for(var f=0;f<1;f+=.05){Hr[0]=$r(e,n,i,f),Hr[1]=$r(t,r,a,f);var p=Gt(Vr,Hr);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<Rr);m++){var h=l-u,g=l+u;Hr[0]=$r(e,n,i,h),Hr[1]=$r(t,r,a,h);var p=Gt(Hr,Vr);if(h>=0&&p<d)l=h,d=p;else{Ur[0]=$r(e,n,i,g),Ur[1]=$r(t,r,a,g);var _=Gt(Ur,Vr);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=$r(e,n,i,l),c[1]=$r(t,r,a,l)),Ir(d)}function ai(e,t,n,r,i,a,o){for(var s=e,c=t,l=0,u=1/o,d=1;d<=o;d++){var f=d*u,p=$r(e,n,i,f),m=$r(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var oi=/cubic-bezier\(([0-9,\.e ]+)\)/;function si(e){var t=e&&oi.exec(e);if(t){var n=t[1].split(`,`),r=+vt(n[0]),i=+vt(n[1]),a=+vt(n[2]),o=+vt(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:Jr(0,r,a,1,e,s)&&Kr(0,i,o,1,s[0])}}}var ci=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||At,this.ondestroy=e.ondestroy||At,this.onrestart=e.onrestart||At,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused)this._pausedTime+=t;else{var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1}},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=U(e)?e:Pr[e]||si(e)},e}(),li=function(){function e(e){this.value=e}return e}(),ui=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new li(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),di=function(){function e(e){this._list=new ui,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new li(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),fi={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function pi(e){return e=Math.round(e),e<0?0:e>255?255:e}function mi(e){return e=Math.round(e),e<0?0:e>360?360:e}function hi(e){return e<0?0:e>1?1:e}function gi(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?pi(parseFloat(t)/100*255):pi(parseInt(t,10))}function _i(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?hi(parseFloat(t)/100):hi(parseFloat(t))}function vi(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function yi(e,t,n){return e+(t-e)*n}function bi(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function xi(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Si=new di(20),Ci=null;function wi(e,t){Ci&&xi(Ci,t),Ci=Si.put(e,Ci||t.slice())}function Ti(e,t){if(e){t||=[];var n=Si.get(e);if(n)return xi(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in fi)return xi(t,fi[r]),wi(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){bi(t,0,0,0,1);return}return bi(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),wi(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){bi(t,0,0,0,1);return}return bi(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),wi(e,t),t}}else{var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?bi(t,+l[0],+l[1],+l[2],1):bi(t,0,0,0,1);u=_i(l.pop());case`rgb`:if(l.length>=3)return bi(t,gi(l[0]),gi(l[1]),gi(l[2]),l.length===3?u:_i(l[3])),wi(e,t),t;bi(t,0,0,0,1);return;case`hsla`:if(l.length!==4){bi(t,0,0,0,1);return}return l[3]=_i(l[3]),Ei(l,t),wi(e,t),t;case`hsl`:if(l.length!==3){bi(t,0,0,0,1);return}return Ei(l,t),wi(e,t),t;default:return}}bi(t,0,0,0,1)}}}function Ei(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=_i(e[1]),i=_i(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],bi(t,pi(vi(o,a,n+1/3)*255),pi(vi(o,a,n)*255),pi(vi(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Di(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Oi(e,t){var n=Ti(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return Ni(n,n.length===4?`rgba`:`rgb`)}}function ki(e,t,n){if(t&&t.length&&e>=0&&e<=1){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=pi(yi(o[0],s[0],c)),n[1]=pi(yi(o[1],s[1],c)),n[2]=pi(yi(o[2],s[2],c)),n[3]=hi(yi(o[3],s[3],c)),n}}function Ai(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=Ti(t[i]),s=Ti(t[a]),c=r-i,l=Ni([pi(yi(o[0],s[0],c)),pi(yi(o[1],s[1],c)),pi(yi(o[2],s[2],c)),hi(yi(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function ji(e,t,n,r){var i=Ti(e);if(e)return i=Di(i),t!=null&&(i[0]=mi(U(t)?t(i[0]):t)),n!=null&&(i[1]=_i(U(n)?n(i[1]):n)),r!=null&&(i[2]=_i(U(r)?r(i[2]):r)),Ni(Ei(i),`rgba`)}function Mi(e,t){var n=Ti(e);if(n&&t!=null)return n[3]=hi(t),Ni(n,`rgba`)}function Ni(e,t){if(e&&e.length){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function Pi(e,t){var n=Ti(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Fi=new di(100);function Ii(e){if(W(e)){var t=Fi.get(e);return t||(t=Oi(e,-.1),Fi.put(e,t)),t}if(ut(e)){var n=I({},e);return n.colorStops=z(e.colorStops,function(e){return{offset:e.offset,color:Oi(e.color,-.1)}}),n}return e}function Li(e){return e.type===`linear`}function Ri(e){return e.type===`radial`}(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})();var zi=Array.prototype.slice;function Bi(e,t,n){return(t-e)*n+e}function Vi(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=Bi(t[a],n[a],r);return e}function Hi(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=Bi(t[o][s],n[o][s],r)}return e}function Ui(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function Wi(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+n[o][s]*r}return e}function Gi(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(n,r);s++)i.push({offset:o.offset,color:o.color.slice()})}function Ki(e,t,n){var r=e,i=t;if(r.push&&i.push){var a=r.length,o=i.length;if(a!==o){if(a>o)r.length=o;else for(var s=a;s<o;s++)r.push(n===1?i[s]:zi.call(i[s]))}for(var c=r[0]&&r[0].length,s=0;s<r.length;s++)if(n===1)isNaN(r[s])&&(r[s]=i[s]);else for(var l=0;l<c;l++)isNaN(r[s][l])&&(r[s][l]=i[s][l])}}function qi(e){if($e(e)){var t=e.length;if($e(e[0])){for(var n=[],r=0;r<t;r++)n.push(zi.call(e[r]));return n}return zi.call(e)}return e}function Ji(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],`rgba(`+e.join(`,`)+`)`}function Yi(e){return $e(e&&e[0])?2:1}var Xi=0,Zi=1,Qi=2,$i=3,ea=4,ta=5,na=6;function ra(e){return e===ea||e===ta}function ia(e){return e===Zi||e===Qi}var aa=[0,0,0,0],oa=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=na,s=t;if($e(t)){var c=Yi(t);o=c,(c===1&&!ot(t[0])||c===2&&!ot(t[0][0]))&&(a=!0)}else if(ot(t)&&!ft(t))o=Xi;else if(W(t)){if(!isNaN(+t))o=Xi;else{var l=Ti(t);l&&(s=l,o=$i)}}else if(ut(t)){var u=I({},s);u.colorStops=z(t.colorStops,function(e){return{offset:e.offset,color:Ti(e.color)}}),Li(t)?o=ea:Ri(t)&&(o=ta),s=u}i===0?this.valType=o:(o!==this.valType||o===na)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=U(n)?n:Pr[n]||si(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=ia(r),c=ra(r),l=0;l<i;l++){var u=n[l],d=u.value,f=a.value;u.percent=u.time/e,o||(s&&l!==i-1?Ki(d,f,r):c&&Gi(d.colorStops,f.colorStops))}if(!o&&r!==ta&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,l=0;l<i;l++)r===Xi?n[l].additiveValue=n[l].value-p:r===$i?n[l].additiveValue=Ui([],n[l].value,p,-1):ia(r)&&(n[l].additiveValue=r===Zi?Ui([],n[l].value,p,-1):Wi([],n[l].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,r=n?`additiveValue`:`value`,i=this.valType,a=this.keyframes,o=a.length,s=this.propName,c=i===$i,l,u=this._lastFr,d=Math.min,f,p;if(o===1)f=p=a[0];else{if(t<0)l=0;else if(t<this._lastFrP){for(l=d(u+1,o-1);l>=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;l<o&&!(a[l].percent>t);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?aa:e[s];if((ia(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(ia(i))i===Zi?Vi(g,f[r],p[r],h):Hi(g,f[r],p[r],h);else if(ra(i)){var _=f[r],v=p[r],y=i===ea;e[s]={type:y?`linear`:`radial`,x:Bi(_.x,v.x,h),y:Bi(_.y,v.y,h),colorStops:z(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Bi(e.offset,n.offset,h),color:Ji(Vi([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Bi(_.x2,v.x2,h),e[s].y2=Bi(_.y2,v.y2,h)):e[s].r=Bi(_.r,v.r,h)}else if(c)Vi(g,f[r],p[r],h),n||(e[s]=Ji(g));else{var b=Bi(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===Xi?e[n]=e[n]+r:t===$i?(Ti(e[n],aa),Ui(aa,aa,r,1),e[n]=Ji(aa)):t===Zi?Ui(e[n],e[n],r,1):t===Qi&&Wi(e[n],e[n],r,1)},e}(),sa=function(){function e(e,t,n,r){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r?Je(`Can' use additive animation on looped animation.`):(this._additiveAnimators=r,this._allowDiscrete=n)}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,rt(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a<n.length;a++){var o=n[a],s=i[o];if(!s){s=i[o]=new oa(o);var c=void 0,l=this._getAdditiveTrack(o);if(l){var u=l.keyframes,d=u[u.length-1];c=d&&d.value,l.valType===$i&&c&&(c=Ji(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,qi(c),r),this._trackKeys.push(o)}s.addKeyframe(e,qi(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var a=this._trackKeys[i],o=this._tracks[a],s=this._getAdditiveTrack(a),c=o.keyframes,l=c.length;if(o.prepare(r,s),o.needsAnimate()){if(!this._allowDiscrete&&o.discrete){var u=c[l-1];u&&(t._target[o.propName]=u.rawValue),o.setFinished()}else n.push(o)}}if(n.length||this._force){var d=new ci({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,a=0;a<r.length;a++)if(r[a]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(var a=0;a<n.length;a++)n[a].step(t._target,e);var o=t._onframeCbs;if(o)for(var a=0;a<o.length;a++)o[a](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||=[],this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||=[],this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||=[],this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return z(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var a=n[e[i]];a&&!a.isFinished()&&(t?a.step(this._target,1):this._started===1&&a.step(this._target,0),a.setFinished())}for(var o=!0,i=0;i<r.length;i++)if(!n[r[i]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},e.prototype.saveTo=function(e,t,n){if(e){t||=this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(a&&!a.isFinished()){var o=a.keyframes,s=o[n?0:o.length-1];s&&(e[i]=qi(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=rt(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var a=i.keyframes;if(a.length>1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function ca(){return new Date().getTime()}var la=function(e){M(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=ca()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)&&(r.ondestroy(),this.removeClip(r)),r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(Nr(t),!e._paused&&e.update())}Nr(t)},t.prototype.start=function(){this._running||(this._time=ca(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=ca(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=ca()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new sa(e,t.loop);return this.addAnimator(n),n},t}(Qt),ua=300,da=N.domSupported,fa=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:z(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),pa={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},ma=!1;function ha(e){var t=e.pointerType;return t===`pen`||t===`touch`}function ga(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function _a(e){e&&(e.zrByTouch=!0)}function va(e,t){return bn(e.dom,new ba(e,t),!0)}function ya(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var ba=function(){function e(e,t){this.stopPropagation=At,this.stopImmediatePropagation=At,this.preventDefault=At,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),xa={mousedown:function(e){e=bn(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=bn(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=bn(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=bn(this.dom,e);var t=e.toElement||e.relatedTarget;ya(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){ma=!0,e=bn(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){ma||(e=bn(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=bn(this.dom,e),_a(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),xa.mousemove.call(this,e),xa.mousedown.call(this,e)},touchmove:function(e){e=bn(this.dom,e),_a(e),this.handler.processGesture(e,`change`),xa.mousemove.call(this,e)},touchend:function(e){e=bn(this.dom,e),_a(e),this.handler.processGesture(e,`end`),xa.mouseup.call(this,e),+new Date-this.__lastTouchMoment<ua&&xa.click.call(this,e)},pointerdown:function(e){xa.mousedown.call(this,e)},pointermove:function(e){ha(e)||xa.mousemove.call(this,e)},pointerup:function(e){xa.mouseup.call(this,e)},pointerout:function(e){ha(e)||xa.mouseout.call(this,e)}};R([`click`,`dblclick`,`contextmenu`],function(e){xa[e]=function(t){t=bn(this.dom,t),this.trigger(e,t)}});var Sa={pointermove:function(e){ha(e)||Sa.mousemove.call(this,e)},pointerup:function(e){Sa.mouseup.call(this,e)},mousemove:function(e){this.trigger(`mousemove`,e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger(`mouseup`,e),t&&(e.zrEventControl=`only_globalout`,this.trigger(`mouseout`,e))}};function Ca(e,t){var n=t.domHandlers;N.pointerEventsSupported?R(fa.pointer,function(r){Ta(t,r,function(t){n[r].call(e,t)})}):(N.touchEventsSupported&&R(fa.touch,function(r){Ta(t,r,function(i){n[r].call(e,i),ga(t)})}),R(fa.mouse,function(r){Ta(t,r,function(i){i=yn(i),t.touching||n[r].call(e,i)})}))}function wa(e,t){N.pointerEventsSupported?R(pa.pointer,n):N.touchEventsSupported||R(pa.mouse,n);function n(n){function r(r){r=yn(r),ya(e,r.target)||(r=va(e,r),t.domHandlers[n].call(e,r))}Ta(t,n,r,{capture:!0})}}function Ta(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,Sn(e.domTarget,t,n,r)}function Ea(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&Cn(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var Da=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),Oa=function(e){M(t,e);function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new Da(t,xa),da&&(r._globalHandlerScope=new Da(document,Sa)),Ca(r,r._localHandlerScope),r}return t.prototype.dispose=function(){Ea(this._localHandlerScope),da&&Ea(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||`default`)},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,da&&+this.__pointerCapturing^e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?wa(this,t):Ea(t)}},t}(Qt),ka=1;N.hasGlobalWindow&&(ka=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Aa=ka,ja=.4,Ma=`#333`,Na=`#ccc`,Pa=`#eee`,Fa=jn,Ia=5e-5;function La(e){return e>Ia||e<-Ia}var Ra=[],za=[],Ba=An(),Va=Math.abs,Ha=function(){function e(){}return e.prototype.getLocalTransform=function(e){return Ua(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return La(this.rotation)||La(this.x)||La(this.y)||La(this.scaleX-1)||La(this.scaleY-1)||La(this.skewX)||La(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;t||e?(n||=An(),t?this.getLocalTransform(n):Fa(n),e&&(t?Nn(n,e,n):Mn(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||An(),Ln(this.invTransform,n)):n&&(Fa(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Ra);var n=Ra[0]<0?-1:1,r=Ra[1]<0?-1:1,i=((Ra[0]-n)*t+n)/Ra[0]||0,a=((Ra[1]-r)*t+r)/Ra[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||An(),Nn(za,e.invTransform,t),t=za);var n=this.originX,r=this.originY;(n||r)&&(Ba[4]=n,Ba[5]=r,Nn(za,t,Ba),za[4]-=n,za[5]-=r,t=za),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&qt(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&qt(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Va(e[0]-1)>1e-10&&Va(e[3]-1)>1e-10?Math.sqrt(Va(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){Ka(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&Fn(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),Ua=Ha.getLocalTransform;function Wa(){return new Ha}var Ga=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function Ka(e,t){return Ye(e,t,Ga)}function qa(e){Ja||=new di(100),e||=`12px sans-serif`;var t=Ja.get(e);return t||(t={font:e,strWidthCache:new di(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:Ne.measureText(`国`,e).width,asciiCharWidth:Ne.measureText(`a`,e).width},Ja.put(e,t)),t}var Ja;function Ya(e){if(!(Xa>=Za)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=Ne.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?Xa=Za:i>2&&Xa++,t}}var Xa=0,Za=5;function Qa(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=Ya(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function $a(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=Ne.measureText(t,e.font).width,n.put(t,r)),r}function eo(e,t,n,r){var i=$a(qa(t),e),a=io(t);return new Y(no(0,i,n),ro(0,a,r),i,a)}function to(e,t,n,r){var i=((e||``)+``).split(`
2
2
  `);if(i.length===1)return eo(i[0],t,n,r);for(var a=new Y(0,0,0,0),o=0;o<i.length;o++){var s=eo(i[o],t,n,r);o===0?a.copy(s):a.union(s)}return a}function no(e,t,n,r){return n===`right`?r?e+=t:e-=t:n===`center`&&(r?e+=t/2:e-=t/2),e}function ro(e,t,n,r){return n===`middle`?r?e+=t/2:e-=t/2:n===`bottom`&&(r?e+=t:e-=t),e}function io(e){return qa(e).stWideCharWidth}function ao(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function oo(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=ao(r[0],n.width),l+=ao(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var so=`__zr_normal__`,co=Ga.concat([`ignore`]),lo=et(Ga,function(e,t){return e[t]=!0,e},{ignore:!1}),uo={},fo=new Y(0,0,0,0),po=[],mo=function(){function e(e){this.id=qe(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0}var r=this.transform;r||=this.transform=[1,0,0,1,0,0],r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||={};var n=this.textConfig,r=n.local,i=t.innerTransformable,a=void 0,o=void 0,s=!1;i.parent=r?this:null;var c=!1;i.copyTransform(t);var l=n.position!=null,u=n.autoOverflowArea,d=void 0;if((u||l)&&(d=fo,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(uo,n,d):oo(uo,n,d),i.x=uo.x,i.y=uo.y,a=uo.align,o=uo.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var p=void 0,m=void 0;f===`center`?(p=d.width*.5,m=d.height*.5):(p=ao(f[0],d.width),m=ao(f[1],d.height)),c=!0,i.originX=-i.x+p+(r?0:d.x),i.originY=-i.y+m+(r?0:d.y)}}n.rotation!=null&&(i.rotation=n.rotation);var h=n.offset;h&&(i.x+=h[0],i.y+=h[1],c||(i.originX=-h[0],i.originY=-h[1]));var g=this._innerTextDefaultStyle||={};if(u){var _=g.overflowRect=g.overflowRect||new Y(0,0,0,0);i.getLocalTransform(po),Ln(po,po),Y.copy(_,d),_.applyTransform(po)}else g.overflowRect=null;var v=n.inside==null?typeof n.position==`string`&&n.position.indexOf(`inside`)>=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Na:Ma},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Ti(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,Ni(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},I(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(G(e))for(var n=rt(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!(r.getLoop()||i&&i!==`__zr_normal__`)){var a=r.targetName,o=a?t[a]:t;r.saveTo(o)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||=this._normalState={},e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,co)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];e[i]!=null&&!(i in t)&&(t[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(so,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===so;if(this.hasState()||!i){var a=this.currentStates,o=this.stateTransition;if(!(L(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i)Je(`State `+e+` not exists.`);else{i||this.saveCurrentToNormalState(s);var c=this._textContent,l=So(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,wo(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s<a;s++)if(e[s]!==i[s]){o=!1;break}}if(o)return;for(var s=0;s<a;s++){var c=e[s],l=void 0;this.stateProxy&&(l=this.stateProxy(c,e)),l||=this.states[c],l&&r.push(l)}var u=r[a-1],d=this._textContent,f=So(this,d,u,n);f&&!this.__inHover&&(this.__inHover=f);var p=this._mergeStates(r),m=this.stateTransition;this.saveCurrentToNormalState(p),this._applyStateObj(e.join(`,`),p,this._normalState,!1,wo(this,t,m),m);var h=this._textGuide;d&&d.useStates(e,t,!!f),h&&h.useStates(e,t,!!f),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!f&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2)}},e.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=L(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=L(r,e),a=L(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r<e.length;r++){var i=e[r];I(t,i),i.textConfig&&(n||={},I(n,i.textConfig))}return n&&(t.textConfig=n),t},e.prototype._applyStateObj=function(e,t,n,r,i,a){if(this.__inHover!==1){var o=!(t&&r);t&&t.textConfig?(this.textConfig=I({},r?this.textConfig:n.textConfig),I(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<co.length;l++){var u=co[l],d=i&&lo[u];t&&t[u]!=null?d?(c=!0,s[u]=t[u]):this[u]=t[u]:o&&n[u]!=null&&(d?(c=!0,s[u]=n[u]):this[u]=n[u])}if(!i)for(var l=0;l<this.animators.length;l++){var f=this.animators[l],p=f.targetName;f.getLoop()||f.__changeFinalValue(p?(t||n)[p]:t||n)}c&&this._transitionState(e,s,a)}},e.prototype._attachComponent=function(e){if((!e.__zr||e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new Ha,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||={},I(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var r=new sa(e?this[e]:this,t,n);return e&&(r.targetName=e),this.addAnimator(r,e),r},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,n=L(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a<r;a++){var o=n[a];!e||e===o.scope?o.stop(t):i.push(o)}return this.animators=i,this},e.prototype.animateTo=function(e,t,n){ho(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){ho(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=ho(this,t,n,r),a=0;a<i.length;a++)i[a].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=(function(){var t=e.prototype;t.type=`element`,t.name=``,t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=!1,t.__inHover=0,t.__dirty=1;function n(e,n,r,i){Object.defineProperty(t,e,{get:function(){if(!this[n]){var e=this[n]=[];a(this,e)}return this[n]},set:function(e){this[r]=e[0],this[i]=e[1],this[n]=e,a(this,e)}});function a(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}}Object.defineProperty&&(n(`position`,`_legacyPos`,`x`,`y`),n(`scale`,`_legacyScale`,`scaleX`,`scaleY`),n(`origin`,`_legacyOrigin`,`originX`,`originY`))})(),e}();Qe(mo,Qt),Qe(mo,Ha);function ho(e,t,n,r,i){n||={};var a=[];xo(e,``,e,t,n,r,a,i);var o=a.length,s=!1,c=n.done,l=n.aborted,u=function(){s=!0,o--,o<=0&&(s?c&&c():l&&l())},d=function(){o--,o<=0&&(s?c&&c():l&&l())};o||c&&c(),a.length>0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f<a.length;f++){var p=a[f];u&&p.done(u),d&&p.aborted(d),n.force&&p.duration(n.duration),p.start(n.easing)}return a}function go(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function _o(e){return $e(e[0])}function vo(e,t,n){if($e(t[n])){if($e(e[n])||(e[n]=[]),ct(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),go(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(_o(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?go(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else go(a,i,o);a.length=i.length}}else e[n]=t[n]}function yo(e,t){return e===t||$e(e)&&$e(t)&&bo(e,t)}function bo(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function xo(e,t,n,r,i,a,o,s){for(var c=rt(r),l=i.duration,u=i.delay,d=i.additive,f=i.setToFinal,p=!G(a),m=e.animators,h=[],g=0;g<c.length;g++){var _=c[g],v=r[_];if(v!=null&&n[_]!=null&&(p||a[_])){if(G(v)&&!$e(v)&&!ut(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}xo(e,_,n[_],v,i,a&&a[_],o,s)}else h.push(_)}else s||(n[_]=v,e.updateDuringAnimation(t),h.push(_))}var y=h.length;if(!d&&y)for(var b=0;b<m.length;b++){var x=m[b];if(x.targetName===t&&x.stopTracks(h)){var S=L(m,x);m.splice(S,1)}}if(i.force||(h=tt(h,function(e){return!yo(r[e],n[e])}),y=h.length),y>0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b<y;b++){var _=h[b];w[_]=n[_],f?C[_]=r[_]:n[_]=r[_]}}else if(f){T={};for(var b=0;b<y;b++){var _=h[b];T[_]=qi(n[_]),vo(n,r,_)}}var x=new sa(n,!1,!1,d?tt(m,function(e){return e.targetName===t}):null);x.targetName=t,i.scope&&(x.scope=i.scope),f&&C&&x.whenWithKeys(0,C,h),T&&x.whenWithKeys(0,T,h),x.whenWithKeys(l??500,s?w:r,h).delay(u||0),e.addAnimator(x,t),o.push(x)}}function So(e,t,n,r){return!(n&&n.hoverLayer||r)||Co(e)||t&&Co(t)?0:1}function Co(e){return e.type===`text`||e.type===`tspan`}function wo(e,t,n){return!t&&!e.__inHover&&n&&n.duration>0}var To=function(e){M(t,e);function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=L(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=L(n,e);return r<0||(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(t)},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(t)},t.prototype.getBoundingRect=function(e){for(var t=new Y(0,0,0,0),n=e||this._children,r=[],i=null,a=0;a<n.length;a++){var o=n[a];if(!(o.ignore||o.invisible)){var s=o.getBoundingRect(),c=o.getLocalTransform(r);c?(Y.applyTransform(t,s,c),i||=t.clone(),i.union(t)):(i||=s.clone(),i.union(s))}}return i||t},t}(mo);To.prototype.type=`group`;var Eo={},Do={};function Oo(e){delete Do[e]}function ko(e){if(!e)return!1;if(typeof e==`string`)return Pi(e,1)<ja;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=Pi(t[i].color,1);return n/=r,n<ja}return!1}var Ao=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!1,this._darkMode=!1,n||={},this.dom=t,this.id=e;var i=new Mr,a=n.renderer||`canvas`;Eo[a]||(a=rt(Eo)[0]),n.useDirtyRect=n.useDirtyRect!=null&&n.useDirtyRect;var o=new Eo[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!N.node&&!N.worker&&!s?new Oa(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?N.touchEventsSupported:!!l,d=44,f;u&&(f=K(n.pointerSize,d)),this.handler=new hr(i,o,c,o.root,f),this.animation=new la({stage:{update:s?null:function(){return r._flush(!1)}}}),s||this.animation.start()}return e.prototype.add=function(e){!this._disposed&&e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){!this._disposed&&e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=ko(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||this._refresh({animUpdate:!e,refresh:!0,refreshHover:!1})},e.prototype._refresh=function(e){e.animUpdate&&this.animation.update(!0),this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh({refresh:e.refresh,refreshHover:e.refreshHover}),this._needsRefresh=this._needsRefreshHover=!1},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!0)},e.prototype._flush=function(e){var t,n=ca(),r=this._needsRefresh,i=this._needsRefreshHover;(r||i)&&(t=!0,this._refresh({animUpdate:e,refresh:r,refreshHover:i}));var a=ca();t?(this._stillFrameAccum=0,this.trigger(`rendered`,{elapsedTime:a-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof To&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,Oo(this.id))},e}();function jo(e,t){var n=new Ao(qe(),e,t);return Do[n.id]=n,n}function Mo(e,t){Eo[e]=t}var No=1e-4,Po=20;function Fo(e){return e.replace(/^\s+|\s+$/g,``)}var Io=Math.min,Lo=Math.max,Ro=Math.abs,zo=Math.round,Bo=Math.floor,Vo=Math.ceil,Ho=Math.pow,Uo=Math.log,Wo=Math.LN10,Go=Math.PI,Ko=Math.random;function qo(e,t,n,r){var i=t[0],a=t[1],o=n[0],s=n[1],c=a-i,l=s-o;if(c===0)return l===0?o:(o+s)/2;if(r){if(c>0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var X=Jo;function Jo(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return Yo(e,t,n)}function Yo(e,t,n){return W(e)?Zo(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Xo(e){return W(e)&&Zo(e)}function Zo(e){return!!Fo(e).match(/%$/)}function Qo(e,t,n){return isNaN(t)?n?``+e:+e:(t=Io(Lo(0,t),Po),e=(+e).toFixed(t),n?e:+e)}function $o(e){return e.sort(function(e,t){return e-t}),e}function es(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(zo(e*t)/t===e)return n}return ts(e)}function ts(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return Lo(0,(a<0?0:i-1-a)-r)}function ns(e,t,n){var r=Ro(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=Uo(2*Ro(n||1)*Ro(r))/Wo,a=Uo(Ro(t))/Wo,o=Lo(0,Vo(-i+a));return isFinite(o)||(o=NaN),o}function rs(e,t){var n=et(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=Ho(10,t),i=z(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=z(i,function(e){return Bo(e)}),s=et(o,function(e,t){return e+t},0),c=z(i,function(e,t){return e-o[t]});s<a;){for(var l=-1/0,u=null,d=0,f=c.length;d<f;++d)c[d]>l&&(l=c[d],u=d);++o[u],c[u]=0,++s}return z(o,function(e){return e/r})}function is(e,t){var n=Lo(es(e),es(t)),r=e+t;return n>Po?r:Qo(r,n)}var as=Ho(2,53)-1;function os(e){var t=Go*2;return(e%t+t)%t}function ss(e){return e>-No&&e<No}var cs=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function ls(e){if(e instanceof Date)return e;if(W(e)){var t=cs.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return t[8].toUpperCase()!==`Z`&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return e==null?new Date(NaN):new Date(zo(e))}function us(e){return Ho(10,ds(e))}function ds(e){if(e===0)return 0;var t=Bo(Uo(e)/Wo);return e/Ho(10,t)>=10&&t++,t}function fs(e,t){var n=ds(e),r=Ho(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,Qo(e,-n)}function ps(e,t){var n=(e.length-1)*t+1,r=Bo(n),i=+e[r-1],a=n-r;return a?i+a*(e[r]-i):i}function ms(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r<e.length;){for(var i=e[r].interval,a=e[r].close,o=0;o<2;o++)i[o]<=t&&(i[o]=t,a[o]=o?1:1-n),t=i[o],n=a[o];i[0]===i[1]&&a[0]*a[1]!==1?e.splice(r,1):r++}return e;function s(e,t,n){return e.interval[n]<t.interval[n]||e.interval[n]===t.interval[n]&&(e.close[n]-t.close[n]===(n?-1:1)||!n&&s(e,t,1))}}function hs(e){var t=parseFloat(e);return t==e&&(t!==0||!W(e)||e.indexOf(`x`)<=0)?t:NaN}function gs(e){return!isNaN(hs(e))}function _s(){return zo(Ko()*9)}function vs(e,t){return t===0?e:vs(t,e%t)}function ys(e,t){return e==null?t:t==null?e:e*t/vs(e,t)}function bs(e){return e!=null&&isFinite(e)}var xs=`[ECharts] `,Ss={},Cs=typeof console<`u`&&console.warn&&console.log;function ws(e,t,n){if(Cs){if(n){if(Ss[t])return;Ss[t]=!0}console[e](xs+t)}}function Ts(e,t){ws(`error`,e,t)}function Es(e){throw Error(e)}function Ds(e,t,n){return(t-e)*n+e}var Os=`series\0`,ks=`\0_ec_\0`;function As(e){return e instanceof Array?e:e==null?[]:[e]}function js(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var a=n[r];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}}var Ms=`fontStyle.fontWeight.fontSize.fontFamily.rich.tag.color.textBorderColor.textBorderWidth.width.height.lineHeight.align.verticalAlign.baseline.shadowColor.shadowBlur.shadowOffsetX.shadowOffsetY.textShadowColor.textShadowBlur.textShadowOffsetX.textShadowOffsetY.backgroundColor.borderColor.borderWidth.borderRadius.padding`.split(`.`);function Ns(e){return G(e)&&!H(e)&&!(e instanceof Date)?e.value:e}function Ps(e){return G(e)&&!(e instanceof Array)}function Fs(e,t,n){var r=n===`normalMerge`,i=n===`replaceMerge`,a=n===`replaceAll`;e||=[],t=(t||[]).slice();var o=q();R(t,function(e,n){G(e)||(t[n]=null)});var s=Is(e,o,n);return(r||i)&&Ls(s,e,o,t),r&&Rs(s,t),r||i?zs(s,t,i):a&&Bs(s,t),Vs(s),s}function Is(e,t,n){var r=[];if(n===`replaceAll`)return r;for(var i=0;i<e.length;i++){var a=e[i];a&&a.id!=null&&t.set(a.id,i),r.push({existing:n===`replaceMerge`||Ks(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function Ls(e,t,n,r){R(r,function(i,a){if(i&&i.id!=null){var o=Us(i.id),s=n.get(o);if(s!=null){var c=e[s];_t(!c.newOption,`Duplicated option on id "`+o+`".`),c.newOption=i,c.existing=t[s],r[a]=null}}})}function Rs(e,t){R(t,function(n,r){if(n&&n.name!=null)for(var i=0;i<e.length;i++){var a=e[i].existing;if(!e[i].newOption&&a&&(a.id==null||n.id==null)&&!Ks(n)&&!Ks(a)&&Hs(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function zs(e,t,n){R(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||Ks(r.existing)||r.existing&&t.id!=null&&!Hs(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function Bs(e,t){R(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function Vs(e){var t=q();R(e,function(e){var n=e.existing;n&&t.set(n.id,e)}),R(e,function(e){var n=e.newOption;_t(!n||n.id==null||!t.get(n.id)||t.get(n.id)===e,`id duplicates: `+(n&&n.id)),n&&n.id!=null&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})}),R(e,function(e,n){var r=e.existing,i=e.newOption,a=e.keyInfo;if(G(i)){if(a.name=i.name==null?r?r.name:Os+n:Us(i.name),r)a.id=Us(r.id);else if(i.id!=null)a.id=Us(i.id);else{var o=0;do a.id=`\0`+a.name+`\0`+o++;while(t.get(a.id))}t.set(a.id,e)}})}function Hs(e,t,n){var r=Ws(t[e],null),i=Ws(n[e],null);return r!=null&&i!=null&&r===i}function Us(e){return Ws(e,``)}function Ws(e,t){return e==null?t:W(e)?e:ot(e)||at(e)?e+``:t}function Gs(e){var t=e.name;return!!(t&&t.indexOf(Os))}function Ks(e){return e&&e.id!=null&&Us(e.id).indexOf(ks)===0}function qs(e){return ks+e}function Js(e,t,n){R(e,function(e){var r=e.newOption;G(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=Ys(t,r,e.existing,n))})}function Ys(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function Xs(e,t){var n={},r={};return i(e||[],n),i(t||[],r,n),[a(n),a(r)];function i(e,t,n){for(var r=0,i=e.length;r<i;r++){var a=Ws(e[r].seriesId,null);if(a==null)return;for(var o=As(e[r].dataIndex),s=n&&n[a],c=0,l=o.length;c<l;c++){var u=o[c];s&&s[u]?s[u]=null:(t[a]||(t[a]={}))[u]=1}}}function a(e,t){var n=[];for(var r in e)if(e.hasOwnProperty(r)&&e[r]!=null){if(t)n.push(+r);else{var i=a(e[r],!0);i.length&&n.push({seriesId:r,dataIndex:i})}}return n}}function Zs(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return H(t.dataIndex)?z(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return H(t.name)?z(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name)}function Qs(){var e=`__ec_inner_`+$s++;return function(t){return t[e]||(t[e]={})}}var $s=_s();function ec(e,t,n){var r=tc(t,n),i=r.mainTypeSpecified,a=r.queryOptionMap,o=r.others,s=n?n.defaultMainType:null;return!i&&s&&a.set(s,{}),a.each(function(t,r){var i=ic(e,r,t,{useDefault:s===r,enableAll:n&&n.enableAll!=null?n.enableAll:!0,enableNone:n&&n.enableNone!=null?n.enableNone:!0});o[r+`Models`]=i.models,o[r+`Model`]=i.models[0]}),o}function tc(e,t){var n;if(W(e)){var r={};r[e+`Index`]=0,n=r}else n=e;var i=q(),a={},o=!1;return R(n,function(e,n){if(n===`dataIndex`||n===`dataIndexInside`)a[n]=e;else{var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],c=(r[2]||``).toLowerCase();if(!(!s||!c||t&&t.includeMainTypes&&L(t.includeMainTypes,s)<0)){o||=!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var nc={useDefault:!0,enableAll:!1,enableNone:!1},rc={useDefault:!1,enableAll:!0,enableNone:!0};function ic(e,t,n,r){r||=nc;var i=n.index,a=n.id,o=n.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var c=void 0;return s.models=r.useDefault&&(c=e.getComponent(t))?[c]:[],s}if(i===`none`||i===!1){if(r.enableNone)return s.models=[],s;i=-1}return i===`all`&&(i=r.enableAll?a=o=null:-1),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s}function ac(e,t,n){var r={};r[t+`Id`]=e[t+`Id`],r[t+`Index`]=e[t+`Index`],r[t+`Name`]=e[t+`Name`];var i={mainType:t,query:r};return n&&(i.subType=n),i}function oc(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function sc(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function cc(e){return e===`auto`?N.domSupported?`html`:`richText`:e||`html`}function lc(e,t){var n=q(),r=[];return R(e,function(e){var i=t(e);(n.get(i)||(r.push(i),n.set(i,[]))).push(e)}),{keys:r,buckets:n}}function uc(e,t,n,r,i){var a=t==null||t===`auto`;if(r==null)return r;if(ot(r)){var o=Ds(n||0,r,i);return Qo(o,a?Math.max(es(n||0),es(r)):t)}if(W(r))return i<1?n:r;for(var s=[],c=n,l=r,u=Math.max(c?c.length:0,l.length),d=0;d<u;++d){var f=e.getDimensionInfo(d);if(f&&f.type===`ordinal`)s[d]=(i<1&&c?c:l)[d];else{var p=c&&c[d]?c[d]:0,m=l[d],o=Ds(p,m,i);s[d]=Qo(o,a?Math.max(es(p),es(m)):t)}}return s}(function(){function e(){}return e.prototype.reset=function(e,t,n,r){return this._list=e,this._step=r||=1,this._idx=t,this._end=n??(r>0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})();function dc(){return[1/0,-1/0]}function fc(e,t){gc(t)&&(t<e[0]&&(e[0]=t),t>e[1]&&(e[1]=t))}function pc(e,t){gc(t)&&t<e[0]&&(e[0]=t)}function mc(e,t){gc(t)&&t>e[1]&&(e[1]=t)}function hc(e,t){_c(t[0],t[1])&&(t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]))}function gc(e){return e!=null&&isFinite(e)}function _c(e,t){return gc(e)&&gc(t)&&e<=t}function vc(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function yc(e){_c(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function bc(){var e=`__ec_once_`+xc++;return function(t,n){kt(t,e)||(t[e]=1,n())}}var xc=_s();function Sc(e,t,n){var r=q(),i=0;R(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Cc(e){return e.value+``}function wc(e){return e+``}function Tc(e,t){return K(t,!0)?e.seriesIndex+2:0}function Ec(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function Dc(e,t){return{seriesType:e,overallReset:t}}function Oc(e){return{overallReset:e}}var kc=`.`,Ac=`___EC__COMPONENT__CONTAINER___`,jc=`___EC__EXTENDED_CLASS___`;function Mc(e){var t={main:``,sub:``};if(e){var n=e.split(kc);t.main=n[0]||``,t.sub=n[1]||``}return t}function Nc(e){_t(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function Pc(e){return!!(e&&e[jc])}function Fc(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return Ic(t)?n=function(e){M(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},Ze(n,this)),I(n.prototype,e),n[jc]=!0,n.extend=this.extend,n.superCall=Bc,n.superApply=Vc,n.superClass=t,n}}function Ic(e){return U(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function Lc(e,t){e.extend=t.extend}var Rc=Math.round(Math.random()*10);function zc(e){var t=[`__\0is_clz`,Rc++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function Bc(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function Vc(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Hc(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){Nc(r),e.prototype.type=r;var i=Mc(r);if(!i.sub)t[i.main]=e;else if(i.sub!==Ac){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[Ac]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=Mc(e),r=[],i=t[n.main];return i&&i[Ac]?R(i,function(e,t){t!==Ac&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[Mc(e).main]},e.getAllClassMainTypes=function(){var e=[];return R(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[Mc(e).main];return n&&n[Ac]};function n(e){var n=t[e.main];return n&&n[Ac]||(n=t[e.main]={},n[Ac]=!0),n}}function Uc(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t||=!1,function(n,r,i){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(r&&L(r,s)>=0||i&&L(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var Wc=Uc([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),Gc=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Wc(this,e,t)},e}(),Kc=new di(50);function qc(e){if(typeof e==`string`){var t=Kc.get(e);return t&&t.image}return e}function Jc(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=Kc.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!Xc(t)&&a.pending.push(o)):(t=Ne.loadImage(e,Yc,Yc),t.__zrImageSrc=e,Kc.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function Yc(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function Xc(e){return e&&e.width&&e.height}var Zc=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Qc(e,t,n,r,i,a){if(!n)e.text=``,e.isTruncated=!1;else{var o=(t+``).split(`
3
3
  `);a=$c(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l<u;l++)el(c,o[l],a),o[l]=c.textLine,s||=c.isTruncated;e.text=o.join(`
4
4
  `),e.isTruncated=s}}function $c(e,t,n,r){r||={};var i=I({},r);n=K(n,`...`),i.maxIterations=K(r.maxIterations,2);var a=i.minChar=K(r.minChar,0),o=i.fontMeasureInfo=qa(t),s=o.asciiCharWidth;i.placeholder=K(r.placeholder,``);for(var c=e=Math.max(0,e-1),l=0;l<a&&c>=s;l++)c-=s;var u=$a(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function el(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r)e.textLine=``,e.isTruncated=!1;else{var o=$a(a,t);if(o<=r)e.textLine=t,e.isTruncated=!1;else{for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?tl(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=$a(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}}}function tl(e,t,n){for(var r=0,i=0,a=e.length;i<a&&r<t;i++)r+=Qa(n,e.charCodeAt(i));return i}function nl(e,t,n,r){var i=hl(e),a=t.overflow,o=t.padding,s=o?o[1]+o[3]:0,c=o?o[0]+o[2]:0,l=t.font,u=a===`truncate`,d=io(l),f=K(t.lineHeight,d),p=t.lineOverflow===`truncate`,m=!1,h=t.width;h==null&&n!=null&&(h=n-s);var g=t.height;g==null&&r!=null&&(g=r-c);var _=h!=null&&(a===`break`||a===`breakAll`)?i?dl(i,t.font,h,a===`breakAll`,0).lines:[]:i?i.split(`
@@ -32,4 +32,4 @@ import{a as e,r as t,t as n}from"./rolldown-runtime-BWaJ3C7D.js";import{t as r}f
32
32
 
33
33
  `:`<br/>`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Z(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=YU([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new hb;h.marker=g.makeTooltipMarker(`item`,Wg(h.color),d);var _=hy(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?ob(y?I({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=Z(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(W(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=P(a),a.content=pn(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=YU(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new hb;this._showOrMove(d,function(){var n=P(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,e.get(`showContent`)&&e.get(`show`)){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(W(u)){var p=e.ecModel.get(`useUTC`),m=H(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=vg(m.axisValue,d,p)),d=Hg(d,n,!0)}else if(U(u)){var g=B(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||H(t))return{color:r||i};if(!H(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),U(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),H(t))n=X(t[0],s),r=X(t[1],c);else if(G(t)){var p=t;p.width=l[0],p.height=l[1];var m=l_(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(W(t)&&o){var h=$U(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=ZU(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=eW(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=eW(d)?l[1]/2:d===`bottom`?l[1]:0),EU(e)){var h=QU(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&R(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&R(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&R(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&R(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){!N.node&&t.getDom()&&(Wb(this,`_updatePosition`),this._tooltipContent.dispose(),FV(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(kb);function YU(e,t,n){var r=t.ecModel,i;n?(i=new jh(n,r,r),i=new jh(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof jh&&(o=o.get(`tooltip`,!0)),W(o)&&(o={formatter:o}),o&&(i=new jh(o,i,r)))}return i}function XU(e,t){return e.dispatchAction||B(t.dispatchAction,t)}function ZU(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function QU(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function $U(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function eW(e){return e===`center`||e===`middle`}function tW(e,t,n){var r=tc(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=ic(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=Z(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function nW(e){jD(XV),e.registerComponentModel(TU),e.registerComponentView(JU),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},At),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},At)}var rW=R;function iW(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function aW(e,t,n){var r={};return rW(t,function(t){var a=r[t]=i();rW(e[t],function(e,r){if(MI.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new MI(i),r===`opacity`&&(i=P(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new MI(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function oW(e,t,n){var r;R(n,function(e){t.hasOwnProperty(e)&&iW(t[e])&&(r=!0)}),r&&R(n,function(n){t.hasOwnProperty(n)&&iW(t[n])?e[n]=P(t[n]):delete e[n]})}function sW(e,t,n,r){var i={};return R(e,function(e){i[e]=MI.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return Dx(a,l,e)}function c(e,t){kx(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}var cW=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.type=`title`,t.defaultOption={z:6,show:!0,text:``,target:`blank`,subtext:``,subtarget:`blank`,left:`center`,top:Q.size.m,backgroundColor:Q.color.transparent,borderColor:Q.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:`bold`,color:Q.color.primary},subtextStyle:{fontSize:12,color:Q.color.quaternary}},t}(v_),lW=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get(`show`)){var r=this.group,i=e.getModel(`textStyle`),a=e.getModel(`subtextStyle`),o=e.get(`textAlign`),s=K(e.get(`textBaseline`),e.get(`textVerticalAlign`)),c=new Xu({style:ch(i,{text:e.get(`text`),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),u=e.get(`subtext`),d=new Xu({style:ch(a,{text:u,fill:a.getTextColor(),y:l.height+e.get(`itemGap`),verticalAlign:`top`},{disableBox:!0}),z2:10}),f=e.get(`link`),p=e.get(`sublink`),m=e.get(`triggerEvent`,!0);c.silent=!f&&!m,d.silent=!p&&!m,f&&c.on(`click`,function(){Gg(f,`_`+e.get(`target`))}),p&&d.on(`click`,function(){Gg(p,`_`+e.get(`subtarget`))}),Z(c).eventData=Z(d).eventData=m?{componentType:`title`,componentIndex:e.componentIndex}:null,r.add(c),u&&r.add(d);var h=r.getBoundingRect(),g=e.getBoxLayoutParams();g.width=h.width,g.height=h.height;var _=l_(g,d_(e,n).refContainer,e.get(`padding`));o||(o=e.get(`left`)||e.get(`right`),o===`middle`&&(o=`center`),o===`right`?_.x+=_.width:o===`center`&&(_.x+=_.width/2)),s||(s=e.get(`top`)||e.get(`bottom`),s===`center`&&(s=`middle`),s===`bottom`?_.y+=_.height:s===`middle`&&(_.y+=_.height/2),s||=`top`),r.x=_.x,r.y=_.y,r.markRedraw();var v={align:o,verticalAlign:s};c.setStyle(v),d.setStyle(v),h=r.getBoundingRect();var y=_.margin,b=e.getItemStyle([`color`,`opacity`]);b.fill=e.get(`backgroundColor`);var x=new Gu({shape:{x:h.x-y[3],y:h.y-y[0],width:h.width+y[1]+y[3],height:h.height+y[0]+y[2],r:e.get(`borderRadius`)},style:b,subPixelOptimize:!0,silent:!0});r.add(x)}},t.type=`title`,t}(kb);function uW(e){e.registerComponentModel(cW),e.registerComponentView(lW)}function dW(e,t){if(!e)return!1;for(var n=H(e)?e:[e],r=0;r<n.length;r++)if(n[r]&&n[r][t])return!0;return!1}function fW(e){js(e,`label`,[`show`])}var pW=Qs(),mW=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.createdBySelf=!1,n.preventAutoZ=!0,n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(N.node)return!1;var e=this.__hostSeries;return this.getShallow(`animation`)&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,t){this._mergeOption(e,t,!1,!1)},t.prototype._mergeOption=function(e,t,n,r){var i=this.mainType;n||t.eachSeries(function(e){var n=e.get(this.mainType,!0),a=pW(e)[i];!n||!n.data?pW(e)[i]=null:(a?a._mergeOption(n,t,!0):(r&&fW(n),R(n.data,function(e){e instanceof Array?(fW(e[0]),fW(e[1])):fW(e)}),a=this.createMarkerModelFromSeries(n,this,t),I(a,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),a.__hostSeries=e),pW(e)[i]=a)},this)},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e),a=r.getName(e);return eb(`section`,{header:this.name,blocks:[eb(`nameValue`,{name:a,value:i,noName:!a,noValue:i==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,t){var n=my.prototype.getDataParams.call(this,e,t),r=this.__hostSeries;return r&&(n.seriesId=r.id,n.seriesName=r.name,n.seriesType=r.subType),n},t.getMarkerModelFromSeries=function(e,t){return pW(e)[t]},t.type=`marker`,t.dependencies=[`series`,`grid`,`polar`,`geo`],t}(v_);Qe(mW,my.prototype);var hW=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markPoint`,t.defaultOption={z:5,symbol:`pin`,symbolSize:50,tooltip:{trigger:`item`},label:{show:!0,position:`inside`},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(mW);function gW(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function _W(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function vW(e,t,n,r,i,a,o){var s=[],c=pT(t,i)?t.getCalculationInfo(`stackResultDimension`):i,l=TW(t,c,e),u=t.hostModel.indicesOfNearest(n,c,l)[0];s[a]=t.get(r,u),s[o]=t.get(c,u);var d=t.get(i,u),f=es(t.get(i,u));return f=Math.min(f,20),f>=0&&(s[o]=+s[o].toFixed(f)),[s,d]}var yW={min:V(vW,`min`),max:V(vW,`max`),average:V(vW,`average`),median:V(vW,`median`)};function bW(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!_W(t)&&!H(t.coord)&&H(i)){var a=xW(t,n,r,e);if(t=P(t),t.type&&yW[t.type]&&a.baseAxis&&a.valueAxis){var o=L(i,a.baseAxis.dim),s=L(i,a.valueAxis.dim),c=yW[t.type](n,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=c[0],t.value=c[1]}else t.coord=[t.xAxis==null?t.radiusAxis:t.xAxis,t.yAxis==null?t.angleAxis:t.yAxis]}if(t.coord==null||!H(i)){t.coord=[];var l=e.getBaseAxis();if(l&&t.type&&yW[t.type]){var u=r.getOtherAxis(l);u&&(t.value=TW(n,n.mapDimension(u.dim),t.type))}}else for(var d=t.coord,f=0;f<2;f++)yW[d[f]]&&(d[f]=TW(n,n.mapDimension(i[f]),d[f]));return t}}function xW(e,t,n,r){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex==null?e.valueDim:t.getDimension(e.valueIndex),i.valueAxis=n.getAxis(SW(r,i.valueDataDim)),i.baseAxis=n.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=n.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function SW(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function CW(e,t){return e&&e.containData&&t.coord&&!gW(t)?e.containData(t.coord):!0}function wW(e,t){return e?function(e,n,r,i){return yy(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return yy(e.value,t[i])}}function TW(e,t,n){if(n===`average`){var r=0,i=0;return e.each(t,function(e,t){isNaN(e)||(r+=e,i++)}),r/i}return n===`median`?e.getMedian(t):e.getDataExtent(t)[+(n===`max`)]}var EW=Qs(),DW=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){this.markerGroupMap=q()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){EW(e).keep=!1}),t.eachSeries(function(e){var i=mW.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){!EW(e).keep&&r.group.remove(e.group)}),OW(t,i,this.type)},t.prototype.markKeep=function(e){EW(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;R(e,function(e){var r=mW.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?rf(e):af(e))})})},t.type=`marker`,t}(kb);function OW(e,t,n){e.eachSeries(function(e){var r=mW.getMarkerModelFromSeries(e,n),i=t.get(e.id);if(r&&i&&i.group){var a=Ym(r),o=a.z,s=a.zlevel;Zm(i.group,o,s)}})}function kW(e,t,n){var r=t.coordinateSystem,i=n.getWidth(),a=n.getHeight(),o=r&&r.getArea&&r.getArea();e.each(function(n){var s=e.getItemModel(n),c=s.get(`relativeTo`)===`coordinate`,l=c?o?o.width:0:i,u=c?o?o.height:0:a,d=c&&o?o.x:0,f=c&&o?o.y:0,p,m=X(s.get(`x`),l)+d,h=X(s.get(`y`),u)+f;if(!isNaN(m)&&!isNaN(h))p=[m,h];else if(t.getMarkerPosition)p=t.getMarkerPosition(e.getValues(e.dimensions,n));else if(r){var g=e.get(r.dimensions[0],n),_=e.get(r.dimensions[1],n);p=r.dataToPoint([g,_])}isNaN(m)||(p[0]=m),isNaN(h)||(p[1]=h),e.setItemLayout(n,p)})}var AW=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=mW.getMarkerModelFromSeries(e,`markPoint`);t&&(kW(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new FA),l=jW(i,e,t);t.setData(l),kW(t.getData(),e,r),l.each(function(e){var n=l.getItemModel(e),r=n.getShallow(`symbol`),i=n.getShallow(`symbolSize`),a=n.getShallow(`symbolRotate`),s=n.getShallow(`symbolOffset`),c=n.getShallow(`symbolKeepAspect`);if(U(r)||U(i)||U(a)||U(s)){var u=t.getRawValue(e),d=t.getDataParams(e);U(r)&&(r=r(u,d)),U(i)&&(i=i(u,d)),U(a)&&(a=a(u,d)),U(s)&&(s=s(u,d))}var f=n.getModel(`itemStyle`).getItemStyle(),p=n.get(`z2`),m=Ox(o,`color`);f.fill||=m,l.setItemVisual(e,{z2:K(p,0),symbol:r,symbolSize:i,symbolRotate:a,symbolOffset:s,symbolKeepAspect:c,style:f})}),c.updateData(l),this.group.add(c.group),l.eachItemGraphicEl(function(e){e.traverse(function(e){Z(e).dataModel=t})}),this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markPoint`,t}(DW);function jW(e,t,n){var r=e?z(e&&e.dimensions,function(e){var n=t.getData();return I(I({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new rT(r,n),a=z(n.get(`data`),V(bW,t));e&&(a=tt(a,V(CW,e)));var o=wW(!!e,r);return i.initData(a,null,o),i}function MW(e){e.registerComponentModel(hW),e.registerComponentView(AW),e.registerPreprocessor(function(e){dW(e.series,`markPoint`)&&(e.markPoint=e.markPoint||{})})}var NW=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markLine`,t.defaultOption={z:5,symbol:[`circle`,`arrow`],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:`item`},label:{show:!0,position:`end`,distance:5},lineStyle:{type:`dashed`},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:`linear`},t}(mW),PW=Qs(),FW=function(e,t,n,r){var i=e.getData(),a;if(H(r))a=r;else{var o=r.type;if(o===`min`||o===`max`||o===`average`||o===`median`||r.xAxis!=null||r.yAxis!=null){var s=void 0,c=void 0;if(r.yAxis!=null||r.xAxis!=null)s=t.getAxis(r.yAxis==null?`x`:`y`),c=pt(r.yAxis,r.xAxis);else{var l=xW(r,i,t,e);s=l.valueAxis,c=TW(i,mT(i,l.valueDataDim),o)}var u=s.dim===`x`?0:1,d=1-u,f=P(r),p={coord:[]};f.type=null,f.coord=[],f.coord[d]=-1/0,p.coord[d]=1/0;var m=n.get(`precision`);m>=0&&ot(c)&&(c=+c.toFixed(Math.min(m,20))),f.coord[u]=p.coord[u]=c,a=[f,p,{type:o,valueIndex:r.valueIndex,value:c}]}else a=[]}var h=[bW(e,a[0]),bW(e,a[1]),I({},a[2])];return h[2].type=h[2].type||null,F(h[2],h[0]),F(h[2],h[1]),h};function IW(e){return!isNaN(e)&&!isFinite(e)}function LW(e,t,n,r){var i=1-e,a=r.dimensions[e];return IW(t[i])&&IW(n[i])&&t[e]===n[e]&&r.getAxis(a).containData(t[e])}function RW(e,t){if(e.type===`cartesian2d`){var n=t[0].coord,r=t[1].coord;if(n&&r&&(LW(1,n,r,e)||LW(0,n,r,e)))return!0}return CW(e,t[0])&&CW(e,t[1])}function zW(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=X(o.get(`x`),i.getWidth()),l=X(o.get(`y`),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition)s=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var u=a.dimensions,d=e.get(u[0],t),f=e.get(u[1],t);s=a.dataToPoint([d,f])}if(Wj(a,`cartesian2d`)){var p=a.getAxis(`x`),m=a.getAxis(`y`),u=a.dimensions;IW(e.get(u[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[+!n]):IW(e.get(u[1],t))&&(s[1]=m.toGlobalCoord(m.getExtent()[+!n]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}e.setItemLayout(t,s)}var BW=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=mW.getMarkerModelFromSeries(e,`markLine`);if(t){var r=t.getData(),i=PW(t).from,a=PW(t).to;i.each(function(t){zW(i,t,!0,e,n),zW(a,t,!1,e,n)}),r.each(function(e){r.setItemLayout(e,[i.getItemLayout(e),a.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new SL);this.group.add(c.group);var l=VW(i,e,t),u=l.from,d=l.to,f=l.line;PW(t).from=u,PW(t).to=d,t.setData(f);var p=t.get(`symbol`),m=t.get(`symbolSize`),h=t.get(`symbolRotate`),g=t.get(`symbolOffset`);H(p)||(p=[p,p]),H(m)||(m=[m,m]),H(h)||(h=[h,h]),H(g)||(g=[g,g]),l.from.each(function(e){_(u,e,!0),_(d,e,!1)}),f.each(function(e){var t=f.getItemModel(e),n=t.getModel(`lineStyle`).getLineStyle();f.setItemLayout(e,[u.getItemLayout(e),d.getItemLayout(e)]);var r=t.get(`z2`);n.stroke??=u.getItemVisual(e,`style`).fill,f.setItemVisual(e,{z2:K(r,0),fromSymbolKeepAspect:u.getItemVisual(e,`symbolKeepAspect`),fromSymbolOffset:u.getItemVisual(e,`symbolOffset`),fromSymbolRotate:u.getItemVisual(e,`symbolRotate`),fromSymbolSize:u.getItemVisual(e,`symbolSize`),fromSymbol:u.getItemVisual(e,`symbol`),toSymbolKeepAspect:d.getItemVisual(e,`symbolKeepAspect`),toSymbolOffset:d.getItemVisual(e,`symbolOffset`),toSymbolRotate:d.getItemVisual(e,`symbolRotate`),toSymbolSize:d.getItemVisual(e,`symbolSize`),toSymbol:d.getItemVisual(e,`symbol`),style:n})}),c.updateData(f),l.line.eachItemGraphicEl(function(e){Z(e).dataModel=t,e.traverse(function(e){Z(e).dataModel=t})});function _(t,n,i){var a=t.getItemModel(n);zW(t,n,i,e,r);var s=a.getModel(`itemStyle`).getItemStyle();s.fill??=Ox(o,`color`),t.setItemVisual(n,{symbolKeepAspect:a.get(`symbolKeepAspect`),symbolOffset:K(a.get(`symbolOffset`,!0),g[+!i]),symbolRotate:K(a.get(`symbolRotate`,!0),h[+!i]),symbolSize:K(a.get(`symbolSize`),m[+!i]),symbol:K(a.get(`symbol`,!0),p[+!i]),style:s})}this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markLine`,t}(DW);function VW(e,t,n){var r=e?z(e&&e.dimensions,function(e){var n=t.getData();return I(I({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new rT(r,n),a=new rT(r,n),o=new rT([],n),s=z(n.get(`data`),V(FW,t,e,n));e&&(s=tt(s,V(RW,e)));var c=wW(!!e,r);return i.initData(z(s,function(e){return e[0]}),null,c),a.initData(z(s,function(e){return e[1]}),null,c),o.initData(z(s,function(e){return e[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function HW(e){e.registerComponentModel(NW),e.registerComponentView(BW),e.registerPreprocessor(function(e){dW(e.series,`markLine`)&&(e.markLine=e.markLine||{})})}var UW=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},WW=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),H(t)&&R(t,function(e,r){W(e)&&(e={type:e}),t[r]=F(e,UW(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get(`name`);if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get(`name`))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries(function(r){var i=r.name;n.push(i);var a;if(r.legendVisualProvider){var o=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(o)),o.length?t=t.concat(o):a=!0}else a=!0;a&&Gs(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get(`data`)||t,i=q(),a=z(r,function(e){return(W(e)||ot(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new jh(e,this,this.ecModel))},this);this._data=tt(a,function(e){return!!e})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;if(this.get(`selectedMode`)===`single`){var n=this._data;R(n,function(e){t[e.get(`name`)]=!1})}t[e]=!0},t.prototype.unSelect=function(e){this.get(`selectedMode`)!==`single`&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?`unSelect`:`select`](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;R(e,function(e){t[e.get(`name`,!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;R(e,function(e){var n=e.get(`name`,!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]})},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&L(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:Q.size.m,align:`auto`,backgroundColor:Q.color.transparent,borderColor:Q.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Q.color.disabled,inactiveBorderColor:Q.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:Q.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Q.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Q.color.tertiary,borderWidth:1,borderColor:Q.color.border},emphasis:{selectorLabel:{show:!0,color:Q.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(v_),GW=V,KW=R,qW=To,JW=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new qW),this.group.add(this._selectorGroup=new qW),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);i&&i!==`auto`||(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=d_(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=l_(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=l_(Xe({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=EH(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=q(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),KW(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===`
34
34
  `)){var p=new qW;p.newline=!0,s.add(p)}else{var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,GW(ZW,f,null,r,d)).on(`mouseover`,GW(QW,m.name,null,r,d)).on(`mouseout`,GW($W,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=Z(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=Ti(h.fill);_&&_[3]===0&&(_[3]=.2,h=I(I({},h),{fill:Ni(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,GW(ZW,null,f,r,d)).on(`mouseover`,GW(QW,null,f,r,d)).on(`mouseout`,GW($W,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=Z(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};Z(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();KW(e,function(e){var r=e.type,i=new Xu({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),oh(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),yf(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=YW(c,r,o,s,d,m,u),y=new qW,b=r.getModel(`textStyle`);if(U(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(XW({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;W(w)&&w?T=w.replace(`{name}`,t??``):U(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Xu({style:ch(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Gu({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&Hm({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),yf(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();a_(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){a_(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(kb);function YW(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),KW(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:US(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function XW(e){var t=e.icon||`roundRect`,n=eS(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Q.color.neutral00,n.style.lineWidth=2),n}function ZW(e,t,n,r){$W(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),QW(e,t,n,r)}function QW(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function $W(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function eG(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),tG(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){R(i,function(t,n){e[t?`select`:`unSelect`](n)}),tG(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function tG(e,t){var n=t||{};return R(e.getData(),function(t){var r=t.get(`name`);if(r!==`
35
- `&&r!==``){var i=e.isSelected(r);n[r]=kt(n,r)?n[r]&&i:i}}),n}function nG(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,V(eG,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,V(eG,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,V(eG,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,V(eG,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,V(eG,`unSelect`))}var rG=Oc(iG);function iG(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function aG(e){e.registerComponentModel(WW),e.registerComponentView(JW),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,rG),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),nG(e)}var oG=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=h_(t);e.prototype.init.call(this,t,n,r),sG(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),sG(this,this.option,t)},t.type=`legend.scroll`,t.defaultOption=Ih(WW.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:`end`,pageFormatter:`{current}/{total}`,pageIcons:{horizontal:[`M0,0L12,-10L12,10z`,`M0,0L-12,-10L-12,10z`],vertical:[`M0,0L20,0L10,-20z`,`M0,0L20,0L10,20z`]},pageIconColor:Q.color.accent50,pageIconInactiveColor:Q.color.accent10,pageIconSize:15,pageTextStyle:{color:Q.color.tertiary},animationDurationUpdate:800}),t}(WW);function sG(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,m_(t,n,{type:`box`,ignoreSize:!!i})}var cG=To,lG=[`width`,`height`],uG=[`x`,`y`],dG=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new cG),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new cG)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,a,o,s){var c=this;e.prototype.renderInner.call(this,t,n,r,i,a,o,s);var l=this._controllerGroup,u=n.get(`pageIconSize`,!0),d=H(u)?u:[u,u];p(`pagePrev`,0);var f=n.getModel(`pageTextStyle`);l.add(new Xu({name:`pageText`,style:{text:`xx/xx`,fill:f.getTextColor(),font:f.getFont(),verticalAlign:`middle`,align:`center`},silent:!0})),p(`pageNext`,1);function p(e,t){var r=e+`DataIndex`,a=Pm(n.get(`pageIcons`,!0)[n.getOrient().name][t],{onclick:B(c._pageGo,c,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});a.name=e,l.add(a)}},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getSelectorGroup(),s=e.getOrient().index,c=lG[s],l=uG[s],u=lG[1-s],d=uG[1-s];i&&a_(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=P(n);i&&(h[c]=n[c]-p[c]-f);var g=this._layoutContentAndController(e,r,h,s,c,u,d,l);if(i){if(a===`end`)m[s]+=g[c]+f;else{var _=p[c]+f;m[s]-=_,g[l]-=_}g[c]+=p[c]+f,m[1-s]+=g[d]+g[u]/2-p[u]/2,g[u]=Math.max(g[u],p[u]),g[d]=Math.min(g[d],p[d]+m[1-s]),o.x=m[0],o.y=m[1],o.markRedraw()}return g},t.prototype._layoutContentAndController=function(e,t,n,r,i,a,o,s){var c=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;a_(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),a_(`horizontal`,u,e.get(`pageButtonItemGap`,!0));var d=c.getBoundingRect(),f=u.getBoundingRect(),p=this._showController=d[i]>n[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=K(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Gu({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&nm(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;R([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,W(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=lG[i],o=uG[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i<g.i&&(g=h,f.pagePrevDataIndex??=h.i,++f.pageCount,++f.pageIndex),h=_;return f;function v(e){if(e){var t=e.getBoundingRect(),n=t[o]+e[o];return{s:n,e:n+t[a],i:e.__legendDataIndex}}}function y(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(JW);function fG(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function pG(e){jD(aG),e.registerComponentModel(oG),e.registerComponentView(dG),fG(e)}function mG(e){jD(aG),jD(pG)}var hG=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.inside`,t.defaultOption=Ih(uH.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(uH),gG=Qs();function _G(e,t,n){gG(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}function vG(e,t){for(var n=gG(e).coordSysRecordMap,r=n.keys(),i=0;i<r.length;i++){var a=r[i],o=n.get(a),s=o.dataZoomInfoMap;if(s){var c=t.uid;s.get(c)&&(s.removeKey(c),s.keys().length||yG(n,o))}}}function yG(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function bG(e,t){var n={model:t,containsPoint:V(SG,t),dispatchAction:V(xG,e),dataZoomInfoMap:null,controller:null},r=n.controller=new cP(e.getZr());return R([`pan`,`zoom`,`scrollMove`],function(e){r.on(e,function(t){var r=[];n.dataZoomInfoMap.each(function(i){if(t.isAvailableBehavior(i.model.option)){var a=(i.getRange||{})[e],o=a&&a(i.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!i.model.get(`disabled`,!0)&&o&&r.push({dataZoomId:i.model.id,start:o[0],end:o[1]})}}),r.length&&n.dispatchAction(r)})}),n}function xG(e,t){e.isDisposed()||e.dispatchAction({type:`dataZoom`,animation:{easing:`cubicOut`,duration:100},batch:t})}function SG(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function CG(e,t,n){var r,i=`type_`,a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0,s,c;return e.each(function(e){var t=e.model,n=t.get(`disabled`,!0)?!1:!t.get(`zoomLock`,!0)||`move`;a[i+n]>a[i+r]&&(r=n),o&&=t.get(`preventDefaultMouseMove`,!0),s=K(t.get(`cursorGrab`,!0),s),c=K(t.get(`cursorGrabbing`,!0),c)}),{controlType:r,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:n,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint},cursorGrab:s,cursorGrabbing:c}}}function wG(e){e.registerUpdateLifecycle(`coordsys:aftercreate`,function(e,t){var n=gG(t),r=n.coordSysRecordMap||=q();r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:`dataZoom`,subType:`inside`},function(e){R(iH(e).infoList,function(n){var i=n.model.uid,a=r.get(i)||r.set(i,bG(t,n.model));(a.dataZoomInfoMap||=q()).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),r.each(function(e){var n=e.controller,i,a=e.dataZoomInfoMap;if(a){var o=a.keys()[0];o!=null&&(i=a.get(o))}if(!i)yG(r,e);else{var s=CG(a,e,t);n.enable(s.controlType,s.opt),Ub(e,`dispatchAction`,i.model.get(`throttle`,!0),`fixRate`)}})})}var TG=function(e){M(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataZoom.inside`,t}return t.prototype.render=function(t,n,r){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),_G(r,t,{pan:B(EG.pan,this),zoom:B(EG.zoom,this),scrollMove:B(EG.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){vG(this.api,this.dataZoomModel),this.range=null},t.type=`dataZoom.inside`,t}(pH),EG={zoom:function(e,t,n,r){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=OG[t](null,[r.originX,r.originY],o,n,e),c=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],l=Math.max(1/r.scale,0);a[0]=(a[0]-c)*l+c,a[1]=(a[1]-c)*l+c;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(hR(0,a,[0,100],0,u.minSpan,u.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:DG(function(e,t,n,r,i,a){var o=OG[r]([a.oldX,a.oldY],[a.newX,a.newY],t,i,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:DG(function(e,t,n,r,i,a){return OG[r]([0,0],[a.scrollDelta,a.scrollDelta],t,i,n).signal*(e[1]-e[0])*a.scrollDelta})};function DG(e){return function(t,n,r,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s&&(hR(e(o,s,t,n,r,i),o,[0,100],`all`),this.range=o,a[0]!==o[0]||a[1]!==o[1]))return o}}var OG={grid:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem.getRect();return e||=[0,0],a.dim===`x`?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem,c=s.getRadiusAxis().getExtent(),l=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),n.mainType===`radiusAxis`?(o.pixel=t[0]-e[0],o.pixelLength=c[1]-c[0],o.pixelStart=c[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,n,r,i){var a=n.axis,o=i.model.coordinateSystem.getRect(),s={};return e||=[0,0],a.orient===`horizontal`?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function kG(e){yH(e),e.registerComponentModel(hG),e.registerComponentView(TG),wG(e)}var AG=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.slider`,t.layoutMode=`box`,t.defaultOption=Ih(uH.defaultOption,{show:!0,right:`ph`,top:`ph`,width:`ph`,height:`ph`,left:null,bottom:null,borderColor:Q.color.accent10,borderRadius:0,backgroundColor:Q.color.transparent,dataBackground:{lineStyle:{color:Q.color.accent30,width:.5},areaStyle:{color:Q.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:Q.color.accent40,width:.5},areaStyle:{color:Q.color.accent20,opacity:.3}},fillerColor:`rgba(135,175,274,0.2)`,handleIcon:`path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z`,handleSize:`100%`,handleStyle:{color:Q.color.neutral00,borderColor:Q.color.accent20},moveHandleSize:7,moveHandleIcon:`path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z`,moveHandleStyle:{color:Q.color.accent40,opacity:.5},showDetail:!0,showDataShadow:`auto`,realtime:!0,zoomLock:!1,textStyle:{color:Q.color.tertiary},brushSelect:!0,brushStyle:{color:Q.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:Q.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(uH),jG=Gu,MG=1,NG=30,PG=7,FG=`horizontal`,IG=`vertical`,LG=5,RG=[`line`,`bar`,`candlestick`,`scatter`],zG={easing:`cubicOut`,duration:100,delay:0},BG=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return t.prototype.init=function(e,t){this.api=t,this._onBrush=B(this._onBrush,this),this._onBrushEnd=B(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){e.prototype.render.apply(this,arguments),Ub(this,`_dispatchZoomAction`,t.get(`throttle`),`fixRate`),this._orient=t.getOrient(),t.get(`show`)===!1?this.group.removeAll():t.noTarget()?(this._clear(),this.group.removeAll()):(i&&i.type===`dataZoom`&&i.from===this.uid||this._buildView(),this._updateView())},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Wb(this,`_dispatchZoomAction`);var e=this.api.getZr();e.off(`mousemove`,this._onBrush),e.off(`mouseup`,this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new To;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get(`brushSelect`)?PG:0,r=d_(e,t).refContainer,i=this._findCoordRect(),a=e.get(`defaultLocationEdgeGap`,!0)||0,o=this._orient===FG?{right:r.width-i.x-i.width,top:r.height-NG-a-n,width:i.width,height:NG}:{right:a,top:i.y,width:NG,height:i.height},s=h_(e.option);R([`right`,`top`,`width`,`height`],function(e){s[e]===`ph`&&(s[e]=o[e])});var c=l_(s,r);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===IG&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get(`inverse`),a=this._displayables.sliderGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(n===FG&&!i?{scaleY:o?1:-1,scaleX:1}:n===FG&&i?{scaleY:o?1:-1,scaleX:-1}:n===IG&&!i?{scaleY:o?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:o?-1:1,scaleX:-1,rotation:Math.PI/2});var s=e.getBoundingRect([a]),c=isNaN(s.x)?0:s.x,l=isNaN(s.y)?0:s.y;e.x=t.x-c,e.y=t.y-l,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get(`brushSelect`);n.add(new jG({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get(`backgroundColor`)},z2:-40}));var i=new jG({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:`transparent`},z2:0,onclick:B(this._onClickPanel,this)}),a=this.api.getZr();r?(i.on(`mousedown`,this._onBrushStart,this),i.cursor=`crosshair`,a.on(`mousemove`,this._onBrush),a.on(`mouseup`,this._onBrushEnd)):(a.off(`mousemove`,this._onBrush),a.off(`mouseup`,this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),a=r.getShadowDim&&r.getShadowDim(),o=a&&i.getDimensionInfo(a)?r.getShadowDim():e.otherDim;if(o==null)return;var s=this._shadowPolygonPts,c=this._shadowPolylinePts;if(i!==this._shadowData||o!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var l=i.getDataExtent(e.thisDim),u=i.getDataExtent(o),d=(u[1]-u[0])*.3;u=[u[0]-d,u[1]+d];var f=[0,t[1]],p=[0,t[0]],m=[[t[0],0],[0,0]],h=[],g=p[1]/Math.max(1,i.count()-1),_=t[0]/(l[1]-l[0]),v=e.thisAxis.type===`time`,y=-g,b=Math.round(i.count()/t[0]),x;i.each([e.thisDim,o],function(e,t,n){if(b>0&&n%b)v||(y+=g);else{y=v?(+e-l[0])*_:y+g;var r=t==null||isNaN(t)||t===``,i=r?0:qo(t,u,f,!0);r&&!x&&n?(m.push([m[m.length-1][0],0]),h.push([h[h.length-1][0],0])):!r&&x&&(m.push([y,0]),h.push([y,0])),r||(m.push([y,i]),h.push([y,i])),x=r}}),s=this._shadowPolygonPts=m,c=this._shadowPolylinePts=h}this._shadowData=i,this._shadowDim=o,this._shadowSize=[t[0],t[1]];var S=this.dataZoomModel;function C(e){var t=S.getModel(e?`selectedDataBackground`:`dataBackground`),n=new To,r=new Ep({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel(`areaStyle`).getAreaStyle(),silent:!0,z2:-20}),i=new Op({shape:{points:c},segmentIgnoreThreshold:1,style:t.getModel(`lineStyle`).getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}for(var w=0;w<3;w++){var T=C(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get(`showDataShadow`);if(t!==!1){var n,r=this.ecModel;return e.eachTargetAxis(function(i,a){R(e.getAxisProxy(i,a).getTargetSeriesModels(),function(e){if(!n&&!(t!==!0&&L(RG,e.get(`type`))<0)){var o=r.getComponent(nH(i),a).axis,s=HG(i),c,l=e.coordinateSystem;s!=null&&l.getOtherAxis&&(c=l.getOtherAxis(o).inverse),s=e.getData().mapDimension(s),n={thisAxis:o,series:e,thisDim:e.getData().mapDimension(i),otherDim:s,otherAxisInverse:c}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,a=this._size,o=this.dataZoomModel,s=this.api,c=o.get(`borderRadius`)||0,l=o.get(`brushSelect`),u=t.filler=new jG({silent:l,style:{fill:o.get(`fillerColor`)},textConfig:{position:`inside`}});i.add(u),i.add(new jG({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1],r:c},style:{stroke:o.get(`dataBackgroundColor`)||o.get(`borderColor`),lineWidth:MG,fill:Q.color.transparent}})),R([0,1],function(t){var a=o.get(`handleIcon`);!Zx[a]&&a.indexOf(`path://`)<0&&a.indexOf(`image://`)<0&&(a=`path://`+a);var s=eS(a,-1,0,2,2,null,!0);s.attr({cursor:UG(this._orient),draggable:!0,drift:B(this._onDragMove,this,t),ondragend:B(this._onDragEnd,this),onmouseover:B(this._onOverDataInfoTriggerArea,this,!0),onmouseout:B(this._onOverDataInfoTriggerArea,this,!1),z2:5});var c=s.getBoundingRect(),l=o.get(`handleSize`);this._handleHeight=X(l,this._size[1]),this._handleWidth=c.width/c.height*this._handleHeight,s.setStyle(o.getModel(`handleStyle`).getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState(`emphasis`).style=o.getModel([`emphasis`,`handleStyle`]).getItemStyle(),yf(s);var u=o.get(`handleColor`);u!=null&&(s.style.fill=u),i.add(n[t]=s);var d=o.getModel(`textStyle`),f=(o.get(`handleLabel`)||{}).show||!1;e.add(r[t]=new Xu({silent:!0,invisible:!f,style:ch(d,{x:0,y:0,text:``,verticalAlign:`middle`,align:`center`,fill:d.getTextColor(),font:d.getFont()}),z2:10}))},this);var d=u;if(l){var f=X(o.get(`moveHandleSize`),a[1]),p=t.moveHandle=new Gu({style:o.getModel(`moveHandleStyle`).getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:a[1]-.5,height:f}}),m=f*.8,h=t.moveHandleIcon=eS(o.get(`moveHandleIcon`),-m/2,-m/2,m,m,Q.color.neutral00,!0);h.silent=!0,h.y=a[1]+f/2-.5,p.ensureState(`emphasis`).style=o.getModel([`emphasis`,`moveHandleStyle`]).getItemStyle();var g=Math.min(a[1]/2,Math.max(f,10));d=t.moveZone=new Gu({invisible:!0,shape:{y:a[1]-g,height:f+g}}),d.on(`mouseover`,function(){s.enterEmphasis(p)}).on(`mouseout`,function(){s.leaveEmphasis(p)}),i.add(p),i.add(h),i.add(d)}d.attr({draggable:!0,cursor:`grab`,drift:B(this._onActualMoveZoneDrift,this),ondragstart:B(this._onActualMoveZoneDragStart,this),ondragend:B(this._onActualMoveZoneDragEnd,this),onmouseover:B(this._onOverDataInfoTriggerArea,this,!0),onmouseout:B(this._onOverDataInfoTriggerArea,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[qo(e[0],[0,100],t,!0),qo(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),a=n.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];hR(t,r,i,n.get(`zoomLock`)?`all`:e,a.minSpan==null?null:qo(a.minSpan,o,i,!0),a.maxSpan==null?null:qo(a.maxSpan,o,i,!0));var s=this._range,c=this._range=$o([qo(r[0],i,o,!0),qo(r[1],i,o,!0)]);return!s||s[0]!==c[0]||s[1]!==c[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=$o(n.slice()),i=this._size;R([0,1],function(e){var r=t.handles[e],a=this._handleHeight;r.attr({scaleX:a/2,scaleY:a/2,x:n[e]+(e?-1:1),y:i[1]/2-a/2})},this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var a={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(a),t.moveZone.setShape(a),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr(`x`,a.x+a.width/2));for(var o=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],c=0;c<o.length;c++){var l=o[c],u=l.getClipPath();u||(u=new Gu,l.setClipPath(u)),u.setShape({x:s[c],y:0,width:s[c+1]-s[c],height:i[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,i=this._orient,a=[``,``];if(t.get(`showDetail`)){var o=t.findRepresentativeAxisProxy(),s=o.getAxisModel().axis.scale;if(o){var c=this._range,l;if(e){var u={start:c[0],end:c[1]},d=cH(t,o);if(d){var f=d.calculateDataWindow(u).percentInverted;u={start:f[0],end:f[1]}}l=o.calculateDataWindow(u)}else l=o.getWindow();a=[VG(t,0,l,s),VG(t,1,l,s)]}}var p=$o(this._handleEnds.slice());m.call(this,0),m.call(this,1);function m(e){var t=Em(n.handles[e].parent,this.group),o=Om(e===0?`right`:`left`,t),s=this._handleWidth/2+LG,c=Dm([p[e]+(e===0?-s:s),this._size[1]/2],t);r[e].setStyle({x:c[0],y:c[1],verticalAlign:i===FG?`middle`:o,align:i===FG?o:`center`,text:a[e]})}},t.prototype._onOverDataInfoTriggerArea=function(e){this._isOverDataInfoTriggerArea=e,this._showDataInfo(e)},t.prototype._showDataInfo=function(e){var t=(this.dataZoomModel.get(`handleLabel`)||{}).show||!1,n=this.dataZoomModel.getModel([`emphasis`,`handleLabel`]).get(`show`)||!1,r=e||this._dragging?n:t,i=this._displayables,a=i.handleLabels;a[0].attr(`invisible`,!r),a[1].attr(`invisible`,!r),i.moveHandle&&this.api[r?`enterEmphasis`:`leaveEmphasis`](i.moveHandle,1)},t.prototype._onActualMoveZoneDrift=function(e,t,n){this.api.getZr().setCursorStyle(`grabbing`),this._onDragMove(`all`,e,t,n)},t.prototype._onActualMoveZoneDragStart=function(e){e.target.attr(`cursor`,`grabbing`),this._showDataInfo(!0)},t.prototype._onActualMoveZoneDragEnd=function(e){e.target.attr(`cursor`,`grab`),this._onDragEnd()},t.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,wn(r.event);var i=this._displayables.sliderGroup.getLocalTransform(),a=Dm([t,n],i,!0),o=this._updateInterval(e,a[0]),s=this.dataZoomModel.get(`realtime`);this._updateView(!s),o&&s&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._isOverDataInfoTriggerArea||this._showDataInfo(!1),!this.dataZoomModel.get(`realtime`)&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,a=this._updateInterval(`all`,n[0]-i);this._updateView(),a&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new J(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr(`ignore`,!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100],a=this._handleEnds=[n.x,n.x+n.width],o=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();hR(0,a,r,0,o.minSpan==null?null:qo(o.minSpan,i,r,!0),o.maxSpan==null?null:qo(o.maxSpan,i,r,!0)),this._range=$o([qo(a[0],r,i,!0),qo(a[1],r,i,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(wn(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new jG({silent:!0,style:r.getModel(`brushStyle`).getItemStyle()}),n.sliderGroup.add(i)),i.attr(`ignore`,!1);var a=this._brushStart,o=this._displayables.sliderGroup,s=o.transformCoordToLocal(e,t),c=o.transformCoordToLocal(a.x,a.y),l=this._size;s[0]=Math.max(Math.min(l[0],s[0]),0),i.setShape({x:c[0],y:0,width:s[0]-c[0],height:l[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:`dataZoom`,from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?zG:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=iH(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:r*.2,y:i*.2,width:r*.6,height:i*.6}}return e},t.type=`dataZoom.slider`,t}(pH);function VG(e,t,n,r){var i=e.get(`labelFormatter`),a=e.get(`labelPrecision`);(a==null||a===`auto`)&&(a=n.valuePrecision);var o=n.value[t],s=o==null||isNaN(o)?``:zT(r)||LT(r)?r.getLabel({value:Math.round(o)}):isFinite(a)?Qo(o,a,!0):o+``;return U(i)?i(o,s):W(i)?i.replace(`{value}`,s):s}function HG(e){return{x:`y`,y:`x`,radius:`angle`,angle:`radius`}[e]}function UG(e){return e===`vertical`?`ns-resize`:`ew-resize`}function WG(e){e.registerComponentModel(AG),e.registerComponentView(BG),yH(e)}function GG(e){jD(kG),jD(WG)}var KG={get:function(e,t,n){var r=P((qG[e]||{})[t]);return n&&H(r)?r[r.length-1]:r}},qG={color:{active:[`#006edd`,`#e0ffff`],inactive:[Q.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},JG=MI.mapVisual,YG=MI.eachVisual,XG=H,ZG=R,QG=$o,$G=qo,eK=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&oW(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=B(e,this),this.controllerVisuals=aW(this.option.controller,t,e),this.targetVisuals=aW(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return ZG(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=ic(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return z(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){R(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],H(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);return W(o)?o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c):U(o)?s?o(e[0],e[1]):o(e):s?e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1]:c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=QG([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=nt(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};F(r,n),F(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){XG(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},ZG(r,function(e,t){if(MI.isValidType(t)){var n=KG.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;ZG(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&P(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&P(n)||(a?s[0]:[s[0],s[0]])),c.symbol=JG(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;YG(l,function(e){e>u&&(u=e)}),c.symbolSize=JG(l,function(e){return $G(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:Q.color.transparent,borderColor:Q.color.borderTint,contentColor:Q.color.theme[0],inactiveColor:Q.color.disabled,borderWidth:0,padding:Q.size.m,textGap:10,precision:0,textStyle:{color:Q.color.secondary}},t}(v_),tK=[20,140],nK=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=tK[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=tK[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):H(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),R(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=$o((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},t.prototype.getValueState=function(e){var t=this.option.range,n=this.getExtent(),r=K(this.option.unboundedRange,!0);return(r&&t[0]<=n[0]||t[0]<=e)&&(r&&t[1]>=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=rK(this,`outOfRange`,this.getExtent()),n=rK(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;o<c&&(!n.length||t[o]<=n[0]);o++)t[o]<n[a]&&i(t[o],`outOfRange`);for(var l=1;a<s;a++,l=0)l&&r.length&&i(n[a],`outOfRange`),i(n[a],`inRange`);for(var l=1;o<c;o++)(!n.length||n[n.length-1]<t[o])&&(l&&=(r.length&&i(r[r.length-1].value,`outOfRange`),0),i(t[o],`outOfRange`));var u=r.length;return{stops:r,outerColors:[u?r[0].color:`transparent`,u?r[u-1].color:`transparent`]}},t.type=`visualMap.continuous`,t.defaultOption=Ih(eK.defaultOption,{align:`auto`,calculable:!1,hoverLink:!0,realtime:!0,handleIcon:`path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z`,handleSize:`120%`,handleStyle:{borderColor:Q.color.neutral00,borderWidth:1},indicatorIcon:`circle`,indicatorSize:`50%`,indicatorStyle:{borderColor:Q.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:Q.color.shadow}}),t}(eK);function rK(e,t,n){if(n[0]===n[1])return n.slice();for(var r=200,i=(n[1]-n[0])/r,a=n[0],o=[],s=0;s<=r&&a<n[1];s++)o.push(a),a+=i;return o.push(n[1]),o}var iK=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.autoPositionValues={left:1,right:1,top:1,bottom:1},n}return t.prototype.init=function(e,t){this.ecModel=e,this.api=t},t.prototype.render=function(e,t,n,r){this.visualMapModel=e,e.get(`show`)===!1?this.group.removeAll():this.doRender(e,t,n,r)},t.prototype.renderBackground=function(e){var t=this.visualMapModel,n=Rg(t.get(`padding`)||0),r=e.getBoundingRect();e.add(new Gu({z2:-1,silent:!0,shape:{x:r.x-n[3],y:r.y-n[0],width:r.width+n[3]+n[1],height:r.height+n[0]+n[2]},style:{fill:t.get(`backgroundColor`),stroke:t.get(`borderColor`),lineWidth:t.get(`borderWidth`)}}))},t.prototype.getControllerVisual=function(e,t,n){n||={};var r=n.forceState,i=this.visualMapModel,a={};t===`color`&&(a.color=i.get(`contentColor`));function o(e){return a[e]}function s(e,t){a[e]=t}var c=i.controllerVisuals[r||i.getValueState(e)];return R(MI.prepareVisualTypes(c),function(r){var i=c[r];n.convertOpacityToAlpha&&r===`opacity`&&(r=`colorAlpha`,i=c.__alphaForOpacity),MI.dependsOn(r,t)&&i&&i.applyVisual(e,o,s)}),a[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api,r=d_(t,n).refContainer;f_(e,t.getBoxLayoutParams(),r)},t.prototype.doRender=function(e,t,n,r){},t.type=`visualMap`,t}(kb),aK=[[`left`,`right`,`width`],[`top`,`bottom`,`height`]];function oK(e,t,n){var r=e.option,i=r.align;if(i!=null&&i!==`auto`)return i;for(var a={width:t.getWidth(),height:t.getHeight()},o=+(r.orient===`horizontal`),s=aK[o],c=[0,null,10],l={},u=0;u<3;u++)l[aK[1-o][u]]=c[u],l[s[u]]=u===2?n[0]:r[s[u]];var d=[[`x`,`width`,3],[`y`,`height`,0]][o],f=l_(l,a,r.padding);return s[(f.margin[d[2]]||0)+f[d[0]]+f[d[1]]*.5<a[d[1]]*.5?0:1]}function sK(e,t){return R(e||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey=`visualMap`+(t?t.componentIndex:``)}),e}var cK=qo,lK=R,uK=Math.min,dK=Math.max,fK=12,pK=6,mK=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._shapes={},n._dataInterval=[],n._handleEnds=[],n._hoverLinkDataIndices=[],n}return t.prototype.init=function(t,n){e.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=B(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=B(this._hideIndicator,this)},t.prototype.doRender=function(e,t,n,r){r&&r.type===`selectDataRange`&&r.from===this.uid||this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get(`orient`),this._useHandle=e.get(`calculable`),this._resetInterval(),this._renderBar(t);var n=e.get(`text`);this._renderEndsText(t,n,0),this._renderEndsText(t,n,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},t.prototype._renderEndsText=function(e,t,n){if(t){var r=t[1-n];r=r==null?``:r+``;var i=this.visualMapModel,a=i.get(`textGap`),o=i.itemSize,s=this._shapes.mainGroup,c=this._applyTransform([o[0]/2,n===0?-a:o[1]+a],s),l=this._applyTransform(n===0?`bottom`:`top`,s),u=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new Xu({style:ch(d,{x:c[0],y:c[1],verticalAlign:d.get(`verticalAlign`)||(u===`horizontal`?`middle`:l),align:d.get(`align`)||(u===`horizontal`?l:`center`),text:r})}))}},t.prototype._renderBar=function(e){var t=this.visualMapModel,n=this._shapes,r=t.itemSize,i=this._orient,a=this._useHandle,o=oK(t,this.api,r),s=n.mainGroup=this._createBarGroup(o),c=new To;s.add(c),c.add(n.outOfRange=hK()),c.add(n.inRange=hK(null,a?vK(this._orient):null,B(this._dragHandle,this,`all`,!1),B(this._dragHandle,this,`all`,!0))),c.setClipPath(new Gu({shape:{x:0,y:0,width:r[0],height:r[1],r:3}}));var l=t.textStyleModel.getTextRect(`国`),u=dK(l.width,l.height);a&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(t,s,0,r,u,i),this._createHandle(t,s,1,r,u,i)),this._createIndicator(t,s,r,u,i),e.add(s)},t.prototype._createHandle=function(e,t,n,r,i,a){var o=B(this._dragHandle,this,n,!1),s=B(this._dragHandle,this,n,!0),c=ao(e.get(`handleSize`),r[0]),l=eS(e.get(`handleIcon`),-c/2,-c/2,c,c,null,!0),u=vK(this._orient);l.attr({cursor:u,draggable:!0,drift:o,ondragend:s,onmousemove:function(e){wn(e.event)}}),l.x=r[0]/2,l.useStyle(e.getModel(`handleStyle`).getItemStyle()),l.setStyle({strokeNoScale:!0,strokeFirst:!0}),l.style.lineWidth*=2,l.ensureState(`emphasis`).style=e.getModel([`emphasis`,`handleStyle`]).getItemStyle(),Ef(l,!0),t.add(l);var d=this.visualMapModel.textStyleModel,f=new Xu({cursor:u,draggable:!0,drift:o,onmousemove:function(e){wn(e.event)},ondragend:s,style:ch(d,{x:0,y:0,text:``})});f.ensureState(`blur`).style={opacity:.1},f.stateTransition={duration:200},this.group.add(f);var p=[c,0],m=this._shapes;m.handleThumbs[n]=l,m.handleLabelPoints[n]=p,m.handleLabels[n]=f},t.prototype._createIndicator=function(e,t,n,r,i){var a=ao(e.get(`indicatorSize`),n[0]),o=eS(e.get(`indicatorIcon`),-a/2,-a/2,a,a,null,!0);o.attr({cursor:`move`,invisible:!0,silent:!0,x:n[0]/2});var s=e.getModel(`indicatorStyle`).getItemStyle();if(o instanceof Lu){var c=o.style;o.useStyle(I({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},s))}else o.useStyle(s);t.add(o);var l=this.visualMapModel.textStyleModel,u=new Xu({silent:!0,invisible:!0,style:ch(l,{x:0,y:0,text:``})});this.group.add(u);var d=[(i===`horizontal`?r/2:pK)+n[0]/2,0],f=this._shapes;f.indicator=o,f.indicatorLabel=u,f.indicatorLabelPoint=d,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,t,n,r){if(this._useHandle){if(this._dragging=!t,!t){var i=this._applyTransform([n,r],this._shapes.mainGroup,!0);this._updateInterval(e,i[1]),this._hideIndicator(),this._updateView()}t===!this.visualMapModel.get(`realtime`)&&this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():_K(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),n=e.getExtent(),r=[0,e.itemSize[1]];this._handleEnds=[cK(t[0],n,r,!0),cK(t[1],n,r,!0)]},t.prototype._updateInterval=function(e,t){t||=0;var n=this.visualMapModel,r=this._handleEnds,i=[0,n.itemSize[1]];hR(t,r,i,e,0);var a=n.getExtent();this._dataInterval=[cK(r[0],i,a,!0),cK(r[1],i,a,!0)]},t.prototype._updateView=function(e){var t=this.visualMapModel,n=t.getExtent(),r=this._shapes,i=[0,t.itemSize[1]],a=e?i:this._handleEnds,o=this._createBarVisual(this._dataInterval,n,a,`inRange`),s=this._createBarVisual(n,n,i,`outOfRange`);r.inRange.setStyle({fill:o.barColor}).setShape(`points`,o.barPoints),r.outOfRange.setStyle({fill:s.barColor}).setShape(`points`,s.barPoints),this._updateHandle(a,o)},t.prototype._createBarVisual=function(e,t,n,r){var i={forceState:r,convertOpacityToAlpha:!0},a=this._makeColorGradient(e,i),o=[this.getControllerVisual(e[0],`symbolSize`,i),this.getControllerVisual(e[1],`symbolSize`,i)],s=this._createBarPoints(n,o);return{barColor:new Bp(0,0,0,1,a),barPoints:s,handlesColor:[a[0].color,a[a.length-1].color]}},t.prototype._makeColorGradient=function(e,t){var n=100,r=[],i=(e[1]-e[0])/n;r.push({color:this.getControllerVisual(e[0],`color`,t),offset:0});for(var a=1;a<n;a++){var o=e[0]+i*a;if(o>e[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new To(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);lK([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=cK(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=Dm(n.handleLabelPoints[l],Em(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=cK(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=Dm(c.indicatorLabelPoint,Em(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;C<S.length;C++)this.api.enterBlur(S[C])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on(`mousemove`,function(t){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,r=e._applyTransform([t.offsetX,t.offsetY],e._shapes.mainGroup,!0,!0);r[1]=uK(dK(0,r[1]),n[1]),e._doHoverLinkToSeries(r[1],0<=r[0]&&r[0]<=n[0])}}).on(`mouseout`,function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on(`mouseover`,this._hoverLinkFromSeriesMouseOver,this),e.on(`mouseout`,this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,t){var n=this.visualMapModel,r=n.itemSize;if(n.option.hoverLink){var i=[0,r[1]],a=n.getExtent();e=uK(dK(i[0],e),i[1]);var o=gK(n,a,i),s=[e-o,e+o],c=cK(e,i,a,!0),l=[cK(s[0],i,a,!0),cK(s[1],i,a,!0)];s[0]<i[0]&&(l[0]=-1/0),s[1]>i[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||_K(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=Xs(u,d);this._dispatchHighDown(`downplay`,sK(f[0],n)),this._dispatchHighDown(`highlight`,sK(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(Nx(e.target,function(e){var n=Z(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n<t.length;n++)this.api.leaveBlur(t[n])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown(`downplay`,sK(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off(`mouseover`,this._hoverLinkFromSeriesMouseOver),e.off(`mouseout`,this._hideIndicator)},t.prototype._applyTransform=function(e,t,n,r){var i=Em(t,r?null:this.group);return H(e)?Dm(e,i,n):Om(e,i,n)},t.prototype._dispatchHighDown=function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type=`visualMap.continuous`,t}(iK);function hK(e,t,n,r){return new Ep({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(e){wn(e.event)},ondragend:r})}function gK(e,t,n){var r=fK/2,i=e.get(`hoverLinkDataSize`);return i&&(r=cK(i,t,n,!0)/2),r}function _K(e){return!!(e.get(`hoverLinkOnHandle`)??e.get(`realtime`))}function vK(e){return e===`vertical`?`ns-resize`:`ew-resize`}var yK={type:`selectDataRange`,event:`dataRangeSelected`,update:`update`},bK=function(e,t){t.eachComponent({mainType:`visualMap`,query:e},function(t){t.setSelected(e.selected)})},xK=[{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent(`visualMap`,function(t){var r=e.pipelineContext;!t.isTargetSeries(e)||r&&r.large||n.push(sW(t.stateList,t.targetVisuals,B(t.getValueState,t),t.getDataDimensionIndex(e.getData())))}),n}},{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),r=[];t.eachComponent(`visualMap`,function(t){if(t.isTargetSeries(e)){var i=t.getVisualMeta(B(SK,null,e,t))||{stops:[],outerColors:[]},a=t.getDataDimensionIndex(n);a>=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function SK(e,t,n,r){for(var i=t.targetVisuals[r],a=MI.prepareVisualTypes(i),o={color:Ox(e.getData(),`color`)},s=0,c=a.length;s<c;s++){var l=a[s],u=i[l===`opacity`?`__alphaForOpacity`:l];u&&u.applyVisual(n,d,f)}return o.color;function d(e){return o[e]}function f(e,t){o[e]=t}}var CK=R;function wK(e){var t=e&&e.visualMap;H(t)||(t=t?[t]:[]),CK(t,function(e){if(e){TK(e,`splitList`)&&!TK(e,`pieces`)&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&H(t)&&CK(t,function(e){G(e)&&(TK(e,`start`)&&!TK(e,`min`)&&(e.min=e.start),TK(e,`end`)&&!TK(e,`max`)&&(e.max=e.end))})}})}function TK(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var EK=!1;function DK(e){EK||(EK=!0,e.registerSubTypeDefaulter(`visualMap`,function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(yK,bK),R(xK,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(wK))}function OK(e){e.registerComponentModel(nK),e.registerComponentView(mK),DK(e)}var kK=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],AK[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=P(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=z(this._pieceList,function(e){return e=P(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=MI.listVisualTypes(),i=this.isCategory();R(t.pieces,function(e){R(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),R(n,function(e,n){var r=!1;R(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&R(this.stateList,function(e){(t[e]||(t[e]={}))[n]=KG.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,R(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;R(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=P(e)},t.prototype.getValueState=function(e){var t=MI.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){MI.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return R(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=Ih(eK.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(eK),AK={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o<i;s+=a,o++){var c=o===i-1?r[1]:s+a;e.push({interval:[s,c],close:[1,1]})}t.maxOpen&&e.push({interval:[r[1],1/0],close:[0,0]}),ms(e),R(e,function(e,t){e.index=t,e.text=this.formatValueText(e.interval)},this)},categories:function(e){var t=this.option;R(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),jK(t,e)},pieces:function(e){var t=this.option;R(t.pieces,function(t,n){G(t)||(t={value:t});var r={text:``,index:n};if(t.label!=null&&(r.text=t.label),t.hasOwnProperty(`value`)){var i=r.value=t.value;r.interval=[i,i],r.close=[1,1]}else{for(var a=r.interval=[],o=r.close=[0,0],s=[1,0,1],c=[-1/0,1/0],l=[],u=0;u<2;u++){for(var d=[[`gte`,`gt`,`min`],[`lte`,`lt`,`max`]][u],f=0;f<3&&a[u]==null;f++)a[u]=t[d[f]],o[u]=s[f],l[u]=f===2;a[u]??(a[u]=c[u])}l[0]&&a[1]===1/0&&(o[0]=0),l[1]&&a[0]===-1/0&&(o[1]=0),a[0]===a[1]&&o[0]&&o[1]&&(r.value=a[0])}r.visual=MI.retrieveVisuals(t),e.push(r)},this),jK(t,e),ms(e),R(e,function(e){var t=e.close,n=[[`<`,`≤`][t[1]],[`>`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function jK(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var MK=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=pt(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),R(o.viewPieceList,function(o){var s=o.piece,u=new To;u.onclick=B(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new Xu({style:ch(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:K(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),a_(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:sK(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return oK(e,this.api,e.itemSize);var n=t.align;return n&&n!==`auto`||(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new To,o=this.visualMapModel.textStyleModel;a.add(new Xu({style:ch(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=z(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=eS(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=P(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,R(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(iK);function NK(e){e.registerComponentModel(kK),e.registerComponentView(MK),DK(e)}function PK(e){jD(OK),jD(NK)}var FK=function(e){M(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataset`,t}return t.prototype.init=function(t,n,r){e.prototype.init.call(this,t,n,r),this._sourceManager=new Gy(this),Ky(this)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),Ky(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type=`dataset`,t.defaultOption={seriesLayoutBy:yd},t}(v_),IK=function(e){M(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataset`,t}return t.type=`dataset`,t}(kb);function LK(e){e.registerComponentModel(FK),e.registerComponentView(IK)}var RK=e(i(),1),zK=r();jD([sk,pN,fM,IN,kj,WL,NL,tP,dB,nV,rL,LB,AB,Mz,ZV,nW,mG,GG,wU,uW,LK,PK,HW,MW,jz,CA]);var BK=`wildo`;function VK(e){return e.length}function HK(e,t){return typeof document>`u`?t:getComputedStyle(document.documentElement).getPropertyValue(e).trim()||t}function UK(){if(typeof document>`u`)return!1;let e=document.documentElement;return e.classList.contains(`dark`)||e.getAttribute(`data-theme`)===`dark`}function WK(e,t){return GK(HK(e,t))}function GK(e){return e.startsWith(`#`)||e.startsWith(`rgb`)?e:/^[\d.]+\s+[\d.]+\s+[\d.]+$/.test(e)?`oklch(${e})`:/^\d/.test(e)?`hsl(${e.replace(/\s+/g,`, `)})`:e}function KK(){return{...v}}function qK(e){let t=e??v,n=UK(),r=GK(HK(`--background`,`#ffffff`)),i=GK(HK(`--foreground`,`#0a0a0a`)),a=GK(HK(`--muted-foreground`,`#737373`)),o=GK(HK(`--border`,`#e5e5e5`)),s=GK(HK(`--surface-raised`,HK(`--popover`,`#ffffff`))),c=GK(HK(`--surface-raised-foreground`,HK(`--popover-foreground`,`#0a0a0a`))),l=HK(`--radius`,`0.5rem`),u=parseFloat(l)*(l.includes(`rem`)?16:1),d=n?t.colorShadeDark:t.colorShadeLight,f=_(),p=y(VK(f),{shade:d,palette:f}),m=t.axis.splitLineType===`none`?{show:!1}:{lineStyle:{color:o,type:t.axis.splitLineType}},h=t.typography??v.typography,g=h.axisLabelFontSize;return{color:p,backgroundColor:`transparent`,textStyle:{color:i,fontFamily:`inherit`},title:{textStyle:{color:i,fontSize:h.titleFontSize,fontWeight:h.titleFontWeight},subtextStyle:{color:a,fontSize:h.subtitleFontSize}},legend:{textStyle:{color:a,fontSize:h.legendFontSize}},tooltip:{backgroundColor:s,borderColor:o,borderWidth:t.tooltip.borderWidth,borderRadius:u,textStyle:{color:c,fontSize:h.tooltipFontSize},extraCssText:t.tooltip.extraCss},axisPointer:{lineStyle:{color:o},crossStyle:{color:o}},categoryAxis:{axisLine:{show:t.axis.showAxisLine,lineStyle:{color:o}},axisTick:{show:t.axis.showTicks,lineStyle:{color:o}},axisLabel:{color:a,fontSize:g},splitLine:m},valueAxis:{axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:a,fontSize:g},nameTextStyle:{color:a,fontSize:h.axisNameFontSize},splitLine:m},timeAxis:{axisLine:{show:t.axis.showAxisLine,lineStyle:{color:o}},axisTick:{show:t.axis.showTicks,lineStyle:{color:o}},axisLabel:{color:a,fontSize:g},splitLine:m},line:{smooth:!1,symbol:`circle`,symbolSize:t.series.pointSize,lineStyle:{width:t.series.lineWidth}},bar:{itemStyle:{borderRadius:t.series.barBorderRadius},emphasis:{itemStyle:{color:`inherit`}}},pie:{itemStyle:{borderColor:r,borderWidth:t.series.pieBorderWidth},label:{color:i,textBorderWidth:0,textBorderColor:`transparent`}},scatter:{symbolSize:t.series.pointSize},radar:{axisLine:{lineStyle:{color:o}},splitLine:{lineStyle:{color:o}},splitArea:{show:!1}},gauge:{axisLine:{lineStyle:{color:[[1,o]]}}},dataZoom:{backgroundColor:`transparent`,borderColor:o,fillerColor:GK(HK(`--muted`,`#f5f5f5`)),handleColor:a,textStyle:{color:a}}}}function JK(e){dw(BK,qK(e))}function YK(){return BK}function XK(e){let t=UK(),n=e??v,r=t?n.colorShadeDark:n.colorShadeLight,i=_();return y(VK(i),{shade:r,palette:i})}function ZK(e){let t=(0,RK.useRef)(void 0),n=UK();(0,RK.useMemo)(()=>{JK(e)},[e,n]);let r=(0,RK.useCallback)(()=>{JK(e)},[e]),i=(0,RK.useCallback)(()=>{clearTimeout(t.current),t.current=setTimeout(r,50)},[r]);return(0,RK.useEffect)(()=>{r();let e=new MutationObserver(()=>{i()});return e.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`,`data-theme`,`style`]}),()=>{e.disconnect(),clearTimeout(t.current)}},[r,i]),{themeName:BK}}var QK={[d.INFO]:{token:`--info`,fallback:`#3b82f6`},[d.SUCCESS]:{token:`--success`,fallback:`#22c55e`},[d.WARNING]:{token:`--warning`,fallback:`#f59e0b`},[d.ERROR]:{token:`--destructive`,fallback:`#ef4444`},[d.NEUTRAL]:{token:`--muted-foreground`,fallback:`#737373`}};function $K(e){let{token:t,fallback:n}=QK[x(e)];return WK(t,n)}function eq(e,t,n){let r={},i={},a={},o=t(e.dataQuery.mainResourceType),s=o?.mainSchema;if(!s)return{colors:r,order:i,labels:a};let c={...h(s)};for(let e of p(o?.inheritenceSchemaDefinition))for(let[t,n]of Object.entries(h(e)??{}))t in c||(c[t]=n);for(let t of e.dataQuery.dimensions){let o=c[t.field];if(!o)continue;let s=f(o);s.length>0&&(i[t.ref]=s),s.length>0&&n&&(a[t.ref]=Object.fromEntries(s.map(r=>[r,n(e.dataQuery.mainResourceType,t.field,r,o)])));let l=k(o);if(!l)continue;let u={};for(let[e,t]of Object.entries(l.values??{})){let n=t?.color??l.defaultColor;n&&(u[e]=$K(n))}let d=l.defaultColor?$K(l.defaultColor):void 0;(Object.keys(u).length>0||d)&&(r[t.ref]={values:u,defaultColor:d})}return{colors:r,order:i,labels:a}}function tq(e){return e.definition.dataQuery.dimensions[0]?.ref??``}function nq(e,t){return e.map(e=>e[t])}function rq(e,t){return e.map(e=>{let n=e[t];if(n==null)return null;let r=typeof n==`number`?n:Number(n);return Number.isFinite(r)?r:null})}function iq(e,t,n){return e.style?.color??n[t%n.length]}function aq(e,t,n){let r=new Map(n.map((e,t)=>[e,t]));return e.map((e,t)=>({row:e,originalIndex:t})).sort((e,n)=>{let i=r.get(String(e.row[t]))??1/0,a=r.get(String(n.row[t]))??1/0;return i===a?e.originalIndex-n.originalIndex:i-a}).map(({row:e})=>e)}function oq(e,t,n){let r=new Set;for(let n of e){let e=n[t];e!=null&&r.add(String(e))}let i=Array.from(r);if(n.splitConfig?.exclude){let e=new Set(n.splitConfig.exclude);i=i.filter(t=>!e.has(t))}if(n.splitConfig?.order){let e=new Map(n.splitConfig.order.map((e,t)=>[e,t]));i.sort((t,n)=>{let r=e.get(t)??1/0,i=e.get(n)??1/0;return r===i?t.localeCompare(n):r-i})}return i}function sq(e,t,n,r,i){return n.splitConfig?.colorMap?.[e]??i?.values[e]??i?.defaultColor??r[t%r.length]}function cq(e,t,n,r){if(n?.definition.i18n?.splitValueKeys){let t=n.definition.i18n.splitValueKeys[e];if(t){let e=n.t(t);if(e!==t)return e}}return t.splitConfig?.labelMap?.[e]??(r?n?.dimensionEnumLabels?.[r]?.[e]:void 0)??e}function lq(e,t){if(e.nameKey&&t){let n=t(e.nameKey);if(n!==e.nameKey)return n}return e.name}function uq(e,t,n,r){let i=nq(e,t);return{type:`category`,data:r?i.map(e=>r[String(e)]??e):i,axisLabel:{hideOverlap:n?.axis.hideOverlap??!0}}}function dq(e,t){if(t.length===0)return!1;let n=new Map(e.definition.dataQuery.measures.map(e=>[e.ref,e]));return t.every(e=>{let t=n.get(e.measureRef)?.aggregate;return t===o.COUNT||t===o.COUNT_DISTINCT})}function fq(e,t,n){return{type:`value`,name:e,nameLocation:t?.axis.yAxisNameLocation??`middle`,nameGap:t?.axis.yAxisNameGap??50,...n?.integerValued?{minInterval:1}:{}}}function pq(e,t){let n=e.response.queryMeta;return(t===void 0?void 0:n?.dimensionTimezones?.[t])??n?.resolvedTimezone??`UTC`}function mq(e,t,n){if(e==null)return``;let r=e instanceof Date?e:new Date(e);if(isNaN(r.getTime()))return String(e);let i=n||`UTC`,o=new Intl.DateTimeFormat(`en-US`,{timeZone:i,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hourCycle:`h23`}).formatToParts(r),s=e=>o.find(t=>t.type===e)?.value??``,c=s(`year`),l=s(`month`),u=s(`day`),d=s(`hour`),f=s(`minute`);switch(t){case a.YEAR:return c;case a.QUARTER:return`${c}-Q${Math.floor((Number(l)-1)/3)+1}`;case a.MONTH:return`${c}-${l}`;case a.HOUR:return`${c}-${l}-${u} ${d}:00`;case a.MINUTE:return`${c}-${l}-${u} ${d}:${f}`;case a.WEEK:case a.DAY:default:return`${c}-${l}-${u}`}}function hq(e,t){if(e!==a.DAY&&e!==a.WEEK)return;let n=new Intl.DateTimeFormat(t,{month:`short`,day:`numeric`,timeZone:`UTC`});return e=>{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);return t?n.format(new Date(Date.UTC(Number(t[1]),Number(t[2])-1,Number(t[3])))):e}}function gq(e,t){let n=new Set,r=[];for(let i of e){let e=i[t];if(e==null)continue;let a=e instanceof Date?e.toISOString():String(e);n.has(a)||(n.add(a),r.push(a))}return r}function _q(e,t,n,r,i,a){let o=gq(e,t),s=hq(n,i);return{type:`category`,data:o.map(e=>mq(e,n,r)),axisLabel:{hideOverlap:a?.axis.hideOverlap??!0,...s?{formatter:s}:{}}}}function vq(e){return!!e._filled}function yq(e){return e.some(vq)}function bq(e,t,n=!1){let r=e?.responsive,i=r?.smallMaxWidth??400,a=r?.mediumMaxWidth??799,o=r?.smallGridPadding??{top:20,right:10,bottom:20,left:30},s=r?.mediumGridPadding??{left:50,right:20,bottom:40},c=r?.hideLegendOnSmall??!0;return[{query:{maxWidth:i},option:{legend:{show:!c},...t?{grid:o,xAxis:{axisLabel:{rotate:r?.smallAxisLabelRotate??45,fontSize:r?.smallFontSize??10}}}:{},...n&&c?{series:[{label:{position:`inside`,formatter:`{d}%`},labelLine:{show:!1}}]}:{}}},{query:{minWidth:i,maxWidth:a},option:{legend:{orient:`horizontal`,bottom:0},...t?{grid:s,xAxis:{axisLabel:{fontSize:r?.mediumFontSize??11}}}:{}}}]}function xq(e,t){let n=t.style;n&&(n.lineWidth!=null&&(e.lineStyle={...e.lineStyle||{},width:n.lineWidth}),n.lineType&&(e.lineStyle={...e.lineStyle||{},type:n.lineType}),n.areaOpacity!=null&&(e.areaStyle={opacity:n.areaOpacity}),n.smooth!=null&&(e.smooth=n.smooth),n.barWidth!=null&&(e.barWidth=n.barWidth),n.opacity!=null&&(e.opacity=n.opacity),n.pointSize!=null&&(e.symbolSize=n.pointSize,n.pointSize===0&&(e.showSymbol=!1)),n.pointShape&&(e.symbol=n.pointShape),n.connectNulls!=null&&(e.connectNulls=n.connectNulls),n.step&&(e.step=n.step),(n.showLabel!=null||n.labelPosition||n.labelFormatter)&&(e.label={...e.label||{},...n.showLabel==null?{}:{show:n.showLabel},...n.labelPosition?{position:n.labelPosition}:{},...n.labelFormatter?{formatter:n.labelFormatter}:{}}),n.emphasisScale!=null&&(e.emphasis={...e.emphasis||{},scale:n.emphasisScale}),n.markLines?.length&&(e.markLine={silent:!0,data:n.markLines.map(e=>{if(e.type)return{type:e.type,...e.label?{label:{formatter:e.label}}:{},...e.color?{lineStyle:{color:e.color,type:e.lineType??`dashed`}}:{lineStyle:{type:e.lineType??`dashed`}}};let t={};return e.yValue!=null&&(t.yAxis=e.yValue),e.xValue!=null&&(t.xAxis=e.xValue),e.label&&(t.label={formatter:e.label}),t.lineStyle={color:e.color,type:e.lineType??`dashed`},t})}),n.markPoints?.length&&(e.markPoint={data:n.markPoints.map(e=>({...e.type?{type:e.type}:{},...e.label?{label:{formatter:e.label}}:{},...e.symbol?{symbol:e.symbol}:{},...e.symbolSize?{symbolSize:e.symbolSize}:{}}))}))}var Sq=class{supportedTypes=[u.BAR,u.HORIZONTAL_BAR,u.GROUPED_BAR,u.STACKED_BAR,u.WATERFALL];build(e,t){let n=tq(e),r=e.definition.chartType,i=r===u.HORIZONTAL_BAR,a=r===u.STACKED_BAR,o=r===u.WATERFALL,s=e.definition.chartTypeConfig??{};if(o)return this.buildWaterfall(e,t,n,s);let c=fq(e.definition.i18n?.yAxisLabelKey?(()=>{let t=e.t(e.definition.i18n.yAxisLabelKey);return t===e.definition.i18n.yAxisLabelKey?void 0:t})():void 0,e.chartStylePreset,{integerValued:dq(e,t)}),l=nq(e.response.data,n).map(String),d=[...new Set(l)],f=e.definition.dataQuery.dimensions[0],p=!!f?.timeGranularity,m=t=>mq(t,f?.timeGranularity,pq(e,f?.ref)),h=t.some(e=>e.splitByDimension),g=p?hq(f?.timeGranularity,e.locale):void 0,_={hideOverlap:e.chartStylePreset.axis.hideOverlap??!0,...g?{formatter:g}:{}},v=h?{type:`category`,data:p?d.map(m):d.map(t=>e.dimensionEnumLabels?.[n]?.[t]??t),axisLabel:_}:p?{type:`category`,data:nq(e.response.data,n).map(m),axisLabel:_}:uq(e.response.data,n,e.chartStylePreset,e.dimensionEnumLabels?.[n]),y=[];for(let r=0;r<t.length;r++){let i=t[r];if(i.splitByDimension){let t=oq(e.response.data,i.splitByDimension,i);for(let r=0;r<t.length;r++){let o=t[r],c=new Map;for(let t of e.response.data)if(String(t[i.splitByDimension])===o){let e=String(t[n]),r=t[i.measureRef];c.set(e,typeof r==`number`?r:Number(r)||0)}let l=d.map(e=>c.get(e)??null),u={type:`bar`,name:cq(o,i,e,i.splitByDimension),data:l,itemStyle:{color:sq(o,r,i,e.colorPalette,e.dimensionEnumColors[i.splitByDimension])},stack:a?`stack`:void 0,...s.barGap==null?{}:{barGap:s.barGap},...s.barCategoryGap==null?{}:{barCategoryGap:s.barCategoryGap}};xq(u,i),y.push(u)}}else{let t=rq(e.response.data,i.measureRef),o=e.dimensionEnumColors[n],c=o?t.map((e,t)=>{let n=o.values[l[t]]??o.defaultColor;return n==null?e:{value:e,itemStyle:{color:n}}}):t,u={type:`bar`,name:lq(i,e.t),data:c,itemStyle:{color:iq(i,r,e.colorPalette)},stack:a?`stack`:void 0,yAxisIndex:i.yAxisIndex,...s.barGap==null?{}:{barGap:s.barGap},...s.barCategoryGap==null?{}:{barCategoryGap:s.barCategoryGap}};xq(u,i),y.push(u)}}return{series:y,xAxis:i?c:v,yAxis:i?v:c}}buildWaterfall(e,t,n,r){let i=t[0];if(!i)return{series:[]};let a=e.definition.dataQuery.dimensions[0],o=nq(e.response.data,n),s=a?.timeGranularity?o.map(t=>mq(t,a.timeGranularity,pq(e,a.ref))):o,c=a?.timeGranularity?hq(a.timeGranularity,e.locale):void 0,l=rq(e.response.data,i.measureRef),u=[],d=[],f=[],p=0;for(let e=0;e<l.length;e++){let t=l[e];t>=0?(u.push(p),d.push(t),f.push(`-`)):(u.push(p+t),d.push(`-`),f.push(Math.abs(t))),p+=t}let m=e.colorPalette,h=r.waterfall,g=h?.gainColor??m[0]??`#5470c6`,_=h?.lossColor??`#ee6666`,v=(h?.gainLabelKey?(()=>{let t=e.t(h.gainLabelKey);return t===h.gainLabelKey?void 0:t})():void 0)??h?.gainLabel??`Increase`,y=(h?.lossLabelKey?(()=>{let t=e.t(h.lossLabelKey);return t===h.lossLabelKey?void 0:t})():void 0)??h?.lossLabel??`Decrease`;return{series:[{type:`bar`,name:`__waterfall_base`,stack:`waterfall`,data:u,itemStyle:{color:`transparent`,borderColor:`transparent`},emphasis:{itemStyle:{color:`transparent`,borderColor:`transparent`}},tooltip:{show:!1},legendHoverLink:!1},{type:`bar`,name:v,stack:`waterfall`,data:d,itemStyle:{color:g}},{type:`bar`,name:y,stack:`waterfall`,data:f,itemStyle:{color:_}}],xAxis:{type:`category`,data:s,axisLabel:{hideOverlap:e.chartStylePreset.axis.hideOverlap??!0,...c?{formatter:c}:{}}},yAxis:{type:`value`}}}},Cq=class{supportedTypes=[u.LINE,u.AREA,u.STACKED_AREA,u.STEP_LINE];_t;build(e,t){this._t=e.t;let n=tq(e),r=e.definition.chartType,i=r===u.AREA||r===u.STACKED_AREA,a=r===u.STACKED_AREA,o=r===u.STEP_LINE,s=e.definition.chartTypeConfig??{},c=e.definition.dataQuery.dimensions[0],l=!!c?.timeGranularity,d=nq(e.response.data,n).map(String),f=[...new Set(d)],p=t.some(e=>e.splitByDimension)?f:d,m=hq(c?.timeGranularity,e.locale),h=l?{type:`category`,data:p.map(t=>mq(t,c?.timeGranularity,pq(e,c?.ref))),axisLabel:{hideOverlap:e.chartStylePreset.axis.hideOverlap??!0,...m?{formatter:m}:{}}}:uq(e.response.data,n,e.chartStylePreset,e.dimensionEnumLabels?.[n]),g=fq(e.definition.i18n?.yAxisLabelKey?(()=>{let t=e.t(e.definition.i18n.yAxisLabelKey);return t===e.definition.i18n.yAxisLabelKey?void 0:t})():void 0,e.chartStylePreset,{integerValued:dq(e,t)}),_=yq(e.response.data),v=[];for(let r=0;r<t.length;r++){let c=t[r];if(c.splitByDimension){let t=oq(e.response.data,c.splitByDimension,c);for(let r=0;r<t.length;r++){let l=t[r],u=sq(l,r,c,e.colorPalette,e.dimensionEnumColors[c.splitByDimension]),d=cq(l,c,e,c.splitByDimension),{realValues:p,filledValues:m}=this.buildCategorySplitDataWithOverlay(e,c,n,l,f),h=this.buildLineItem(d,p,u,i,a,o,c,s);if(v.push(h),m.some(e=>e!==null)){let e=this.buildDashedOverlayItem(d,m,u,i,a,o,c,s);v.push(e)}}}else{let t=iq(c,r,e.colorPalette),l=lq(c,e.t);if(_){let{realValues:r,filledValues:u}=this.buildDensifiedValueSeries(e.response.data,n,c.measureRef,f),d=this.buildLineItem(l,r,t,i,a,o,c,s);if(d.yAxisIndex=c.yAxisIndex,d.connectNulls=c.style?.connectNulls??!1,v.push(d),u.some(e=>e!==null)){let e=this.buildDashedOverlayItem(l,u,t,i,a,o,c,s);e.yAxisIndex=c.yAxisIndex,e.connectNulls=!1,v.push(e)}}else{let n=rq(e.response.data,c.measureRef),r=this.buildLineItem(l,n,t,i,a,o,c,s);r.yAxisIndex=c.yAxisIndex,v.push(r)}}}return{series:v,xAxis:h,yAxis:g}}buildLineItem(e,t,n,r,i,a,o,s){let c=s.symbolVisibilityThreshold??30,l={type:`line`,name:e,data:t,itemStyle:{color:n},lineStyle:{color:n},showSymbol:t.length<=c};return this.applyLineVariant(l,r,i,a,o),xq(l,o),l}buildDashedOverlayItem(e,t,n,r,i,a,o,s){let c=s.densifiedOverlay,l=s.densifiedOverlayNameKey?(()=>{let e=this._t?.(s.densifiedOverlayNameKey);return e&&e!==s.densifiedOverlayNameKey?e:`(filled)`})():`(filled)`,u={type:`line`,name:e?`${e} ${l}`:l,data:t,itemStyle:{color:n,opacity:c?.itemOpacity??.4},lineStyle:{color:n,type:c?.lineType??`dashed`,opacity:c?.lineOpacity??.5,width:c?.lineWidth??1},showSymbol:c?.showSymbol??!1,legendHoverLink:!1,emphasis:{disabled:!0}};return(r||i)&&(u.areaStyle={opacity:c?.areaOpacity??.1}),i&&(u.stack=`stack`),a&&(u.step=o.style?.step??`start`),u}buildDensifiedValueSeries(e,t,n,r){let i=new Map,a=new Map;for(let r of e){let e=String(r[t]),o=r[n];i.set(e,o==null?null:typeof o==`number`?o:Number(o)),a.set(e,vq(r))}let o=[],s=[];for(let e=0;e<r.length;e++){let t=r[e],n=i.get(t)??null;if(a.get(t)??!1)o.push(null),s.push(n);else{o.push(n);let t=e>0&&(a.get(r[e-1])??!1),i=e<r.length-1&&(a.get(r[e+1])??!1);s.push(t||i?n:null)}}return{realValues:o,filledValues:s}}buildCategorySplitDataWithOverlay(e,t,n,r,i){let a=new Map,o=new Map;for(let i of e.response.data)if(String(i[t.splitByDimension])===r){let e=String(i[n]),r=i[t.measureRef];a.set(e,typeof r==`number`?r:Number(r)||0),o.set(e,vq(i))}let s=[],c=[];for(let e=0;e<i.length;e++){let t=i[e],n=a.get(t)??null;if(o.get(t)??!1)s.push(null),c.push(n);else{s.push(n);let t=e>0&&(o.get(i[e-1])??!1),r=e<i.length-1&&(o.get(i[e+1])??!1);c.push(t||r?n:null)}}return{realValues:s,filledValues:c}}applyLineVariant(e,t,n,r,i){t&&(e.areaStyle={opacity:i.style?.areaOpacity??.3}),n&&(e.stack=`stack`,e.areaStyle={opacity:i.style?.areaOpacity??.3}),r&&(e.step=i.style?.step??`start`)}},wq=class{supportedTypes=[u.PIE,u.DONUT];build(e,t){let n=tq(e),r=e.definition.chartType===u.DONUT,i=e.definition.chartTypeConfig??{},a=t[0];if(!a)return{series:[]};let o=i.itemNameFallbackKey?(()=>{let t=e.t(i.itemNameFallbackKey);return t===i.itemNameFallbackKey?void 0:t})():void 0,s=e.dimensionEnumColors[n],c=e.response.data.map((t,r)=>{let i=o?`${o} ${r}`:`Item ${r}`,c=String(t[n]??i),l=typeof t[a.measureRef]==`number`?t[a.measureRef]:Number(t[a.measureRef])||0;return{name:cq(c,a,e,n),value:l,_rawName:c,itemStyle:{color:sq(c,r,a,e.colorPalette,s)}}});if(a.splitConfig?.exclude){let e=new Set(a.splitConfig.exclude);c=c.filter(t=>!e.has(t._rawName))}if(a.splitConfig?.order){let e=new Map(a.splitConfig.order.map((e,t)=>[e,t]));c.sort((t,n)=>{let r=e.get(t._rawName)??1/0,i=e.get(n._rawName)??1/0;return r===i?t._rawName.localeCompare(n._rawName):r-i})}let l=c.map(({_rawName:e,...t})=>t),d=r?[`40%`,`70%`]:`70%`,f=i.radius??d,p=e.definition.appearance?.emphasisShadow,m=e.chartStylePreset.emphasis;return{series:[{type:`pie`,name:lq(a,e.t),data:l,radius:f,...i.center?{center:i.center}:{},...i.startAngle==null?{}:{startAngle:i.startAngle},...i.minAngle==null?{}:{minAngle:i.minAngle},...i.roseType?{roseType:i.roseType}:{},...i.borderWidth!=null||i.borderColor?{itemStyle:{...i.borderWidth==null?{}:{borderWidth:i.borderWidth},...i.borderColor?{borderColor:i.borderColor}:{}}}:{},avoidLabelOverlap:!0,labelLayout:{hideOverlap:!0},label:{show:i.showLabel??!0,formatter:i.labelFormatter??`{b}: {d}%`,...i.labelPosition?{position:i.labelPosition}:{}},labelLine:{show:i.showLabel??!0},emphasis:{scale:!1,itemStyle:{color:`inherit`,shadowBlur:p?.blur??m?.shadowBlur??10,shadowOffsetX:p?.offsetX??m?.shadowOffsetX??0,shadowColor:p?.color??m?.shadowColor??`rgba(0, 0, 0, 0.2)`}}}]}}},Tq=class{supportedTypes=[u.SCATTER,u.BUBBLE];build(e,t){let n=e.definition.dataQuery.dimensions,r=n[0]?.ref??``,i=e.definition.chartType===u.BUBBLE,a=e.definition.chartTypeConfig??{},[o,s]=a.bubbleSizeRange??[4,60],c=n[0],l=c?.timeGranularity!=null,d=c?.timeGranularity,f=pq(e,r),p=[];for(let n=0;n<t.length;n++){let c=t[n],u=e.response.data.map(t=>{let n=[l?mq(t[r],d,f):t[r],t[c.measureRef]];if(i&&e.definition.dataQuery.measures.length>1){let r=e.definition.dataQuery.measures[1]?.ref;r&&n.push(t[r])}return n}),m={type:`scatter`,name:lq(c,e.t),data:u,itemStyle:{color:iq(c,n,e.colorPalette)},...a.symbolShape?{symbol:a.symbolShape}:{},symbolSize:i?e=>Math.min(Math.max(Number(e[2])||10,o),s):c.style?.pointSize??8};p.push(m)}let m=!l&&e.response.data.length>0&&e.response.data.every(e=>{let t=e[r];return typeof t==`number`||typeof t==`string`&&t.trim()!==``&&Number.isFinite(Number(t))});return{series:p,xAxis:l?_q(e.response.data,r,d,f,e.locale,e.chartStylePreset):m?{type:`value`}:uq(e.response.data,r,e.chartStylePreset,e.dimensionEnumLabels?.[r]),yAxis:fq(void 0,e.chartStylePreset,{integerValued:dq(e,t)})}}},Eq=class{supportedTypes=[u.GAUGE];build(e,t){let n=t[0];if(!n)return{series:[]};let r=e.definition.chartTypeConfig??{},i=lq(n,e.t),a=e.response.data[0];return{series:[{type:`gauge`,name:i,data:[{value:a&&Number(a[n.measureRef])||0,name:i}],min:r.min??0,max:r.max??100,...r.splitNumber==null?{}:{splitNumber:r.splitNumber},...r.radius?{radius:r.radius}:{},...r.startAngle==null?{}:{startAngle:r.startAngle},...r.endAngle==null?{}:{endAngle:r.endAngle},...r.pointer?{pointer:{...r.pointer.show==null?{}:{show:r.pointer.show},...r.pointer.length?{length:r.pointer.length}:{},...r.pointer.width==null?{}:{width:r.pointer.width}}}:{},...r.axisLineWidth||r.axisLineColors?{axisLine:{lineStyle:{...r.axisLineWidth?{width:r.axisLineWidth}:{},...r.axisLineColors?{color:r.axisLineColors}:{}}}}:{},detail:{formatter:r.detailFormatter??`{value}`,fontSize:r.detailFontSize??20},progress:{show:r.showProgress??!0}}]}}},Dq=class{supportedTypes=[u.FUNNEL];build(e,t){let n=tq(e),r=t[0];if(!r)return{series:[]};let i=e.definition.chartTypeConfig??{},a=e.response.data.map(t=>({name:cq(String(t[n]??``),r,e,n),value:typeof t[r.measureRef]==`number`?t[r.measureRef]:Number(t[r.measureRef])||0})),o=i.sort??`descending`;return{series:[{type:`funnel`,name:lq(r,e.t),data:a,left:i.left??`10%`,width:i.width??`80%`,label:{show:i.showLabel??!0,position:i.labelPosition??`inside`},gap:i.gap??2,sort:o,...i.funnelAlign?{funnelAlign:i.funnelAlign}:{},...i.minSize?{minSize:i.minSize}:{},...i.maxSize?{maxSize:i.maxSize}:{}}]}}},Oq=class{supportedTypes=[u.RADAR];build(e,t){let n=tq(e),r=e.definition.chartTypeConfig??{},i=e.response.data.map(r=>({name:cq(String(r[n]??``),t[0],e,n)})),a=[];for(let n=0;n<t.length;n++){let i=t[n],o=e.response.data.map(e=>{let t=e[i.measureRef];return typeof t==`number`?t:Number(t)||0});a.push({value:o,name:lq(i,e.t),areaStyle:{opacity:r.areaOpacity??.2},lineStyle:{color:iq(i,n,e.colorPalette)},itemStyle:{color:iq(i,n,e.colorPalette)}})}return{series:[{type:`radar`,data:a}],radar:{indicator:i,shape:r.shape??`polygon`,...r.center?{center:r.center}:{},...r.radius?{radius:r.radius}:{},...r.startAngle==null?{}:{startAngle:r.startAngle},...r.nameGap==null?{}:{nameGap:r.nameGap},splitArea:{show:r.showSplitArea??!1}}}}},kq=class{supportedTypes=[u.SANKEY];build(e,t){let n=t[0];if(!n)return{series:[]};let r=e.definition.chartTypeConfig??{},i=e.definition.dataQuery.dimensions,a=i[0]?.ref??``,o=i[1]?.ref??a,s=n.measureRef,c=new Set,l=[];for(let t of e.response.data){let e=String(t[a]??``),n=String(t[o]??``),r=Number(t[s])||0;c.add(e),c.add(n),l.push({source:e,target:n,value:r})}let u=Array.from(c).map(e=>({name:e})),d={type:`sankey`,name:lq(n,e.t),layout:`none`,emphasis:{focus:r.emphasisFocus??`adjacency`},...r.nodeWidth==null?{}:{nodeWidth:r.nodeWidth},...r.nodeGap==null?{}:{nodeGap:r.nodeGap},...r.orient?{orient:r.orient}:{},...r.draggable==null?{}:{draggable:r.draggable},...r.labelPosition?{label:{position:r.labelPosition}}:{},data:u,links:l};return n.style?.color&&(d.itemStyle={color:n.style.color}),{series:[d]}}},Aq=class{supportedTypes=[u.SUNBURST,u.TREEMAP];build(e,t){let n=t[0];if(!n)return{series:[]};let r=e.definition.chartTypeConfig??{},i=e.definition.dataQuery.dimensions,a=n.measureRef,o=i.map(e=>e.ref),s=this.buildTree(e.response.data,o,a),c=e.definition.chartType===u.SUNBURST,l={type:c?`sunburst`:`treemap`,name:lq(n,e.t),data:s};if(c){let[e,t]=r.sunburstRadius??[`15%`,`90%`];l.radius=[e,t],l.sort=void 0,l.emphasis={focus:r.sunburstEmphasisFocus??`ancestor`};let n=parseFloat(e)||15,i=(parseFloat(t)||90)-n,a=`${Math.round(n+i*.33)}%`,o=`${Math.round(n+i*.73)}%`,s=r.sunburstLevels;l.levels=[{},{r0:e,r:a,label:{rotate:s?.level1LabelRotate??`tangential`}},{r0:a,r:o,label:{align:s?.level2LabelAlign??`right`}},{r0:o,r:t,label:{position:s?.level3LabelPosition??`outside`,padding:s?.level3LabelPadding??3,silent:!1}}]}else l.leafDepth=r.treemapLeafDepth??(o.length>1?2:1),l.visibleMin=r.treemapVisibleMin??300,l.label={show:r.treemapShowLabel??!0,formatter:r.treemapLabelFormatter??`{b}`},l.upperLabel={show:r.treemapShowUpperLabel??!0,height:r.treemapUpperLabelHeight??30},l.breadcrumb={show:r.showBreadcrumb??!0};return{series:[l]}}buildTree(e,t,n){if(t.length===0)return[];if(t.length===1)return e.map(e=>({name:String(e[t[0]]??``),value:Number(e[n])||0}));let r=new Map;for(let i of e){let e=null;for(let a=0;a<t.length;a++){let o=String(i[t[a]]??``),s=a===t.length-1;if(a===0){if(!r.has(o)){let e={name:o,children:[]};r.set(o,{node:e,childMap:new Map})}e=r.get(o).node}else if(e){if(e.children||(e.children=[]),s)e.children.push({name:o,value:Number(i[n])||0});else{let t=e.children.find(e=>e.name===o);if(t)e=t;else{let t={name:o,children:[]};e.children.push(t),e=t}}}}}return Array.from(r.values()).map(e=>e.node)}},jq=class{supportedTypes=[u.HEATMAP];build(e,t){let n=t[0];if(!n)return{series:[]};let r=e.definition.chartTypeConfig??{},i=e.definition.dataQuery.dimensions,a=i[0]?.ref??``,o=i[1]?.ref??a,s=n.measureRef,c=[...new Set(e.response.data.map(e=>String(e[a]??``)))],l=[...new Set(e.response.data.map(e=>String(e[o]??``)))],u=new Map(c.map((e,t)=>[e,t])),d=new Map(l.map((e,t)=>[e,t])),f=1/0,p=-1/0,m=[];for(let t of e.response.data){let e=u.get(String(t[a]??``))??0,n=d.get(String(t[o]??``))??0,r=Number(t[s])||0;m.push([e,n,r]),r<f&&(f=r),r>p&&(p=r)}f===1/0&&(f=0),p===-1/0&&(p=0),f===p&&(p=f+1);let h=e.definition.appearance?.emphasisShadow,g=e.chartStylePreset.emphasis,_={type:`heatmap`,name:n.name,data:m,label:{show:r.showLabel??!0},emphasis:{itemStyle:{shadowBlur:h?.blur??g?.shadowBlur??10,shadowColor:h?.color??g?.shadowColor??`rgba(0, 0, 0, 0.5)`}}},v=r.visualMapOrient??`horizontal`,y=r.visualMapPosition??`bottom`,b=r.showSplitArea??!0;return{series:[_],xAxis:{type:`category`,data:c,splitArea:{show:b}},yAxis:{type:`category`,data:l,splitArea:{show:b}},visualMap:{min:r.visualMapMin??f,max:r.visualMapMax??p,calculable:r.visualMapCalculable??!0,orient:v,...r.visualMapInRange?{inRange:{color:r.visualMapInRange}}:{},...v===`horizontal`?{left:`center`,[y]:0}:{top:`center`,[y]:0}}}}},Mq=class{supportedTypes=[u.BOXPLOT];build(e,t){let n=t[0];if(!n)return{series:[]};let r=e.definition.chartTypeConfig??{},i=tq(e),a=nq(e.response.data,i),o=e.definition.dataQuery.measures,s=o.length>=5,c;if(s){let t=e=>o.find(t=>e.some(e=>t.ref.toLowerCase().endsWith(`_${e}`)||t.label?.toLowerCase()===e)),n=(()=>{let e=t([`min`]),n=t([`q1`,`lower_quartile`]),r=t([`median`,`med`,`p50`]),i=t([`q3`,`upper_quartile`]),a=t([`max`]);return e&&n&&r&&i&&a?[e,n,r,i,a]:o.slice(0,5)})();c=e.response.data.map(e=>n.map(t=>Number(e[t.ref])||0))}else c=e.response.data.map(e=>{let t=e[n.measureRef];if(Array.isArray(t))return this.computeBoxplotStats(t.map(Number).filter(e=>!isNaN(e)));let r=Number(t)||0;return[r,r,r,r,r]});let l=lq(n,e.t);return{series:[{type:`boxplot`,name:l,data:c}],xAxis:{type:`category`,data:a,boundaryGap:r.boundaryGap??!0,axisLabel:{hideOverlap:e.chartStylePreset.axis.hideOverlap??!0}},yAxis:{type:`value`,name:l}}}computeBoxplotStats(e){if(e.length===0)return[0,0,0,0,0];let t=[...e].sort((e,t)=>e-t),n=t.length,r=t[0],i=t[n-1],a=this.percentile(t,50);return[r,this.percentile(t,25),a,this.percentile(t,75),i]}percentile(e,t){let n=t/100*(e.length-1),r=Math.floor(n),i=Math.ceil(n);if(r===i)return e[r];let a=n-r;return e[r]+a*(e[i]-e[r])}},Nq=class{supportedTypes=[u.PARALLEL];build(e,t){let n=t[0];if(!n)return{series:[]};let r=e.definition.chartTypeConfig??{},i=e.definition.dataQuery.measures,a=tq(e),o=i.map((e,t)=>({dim:t,name:e.label||e.ref})),s=e.response.data.map(e=>i.map(t=>Number(e[t.ref])||0)),c=e.response.data.map(e=>String(e[a]??``)),l=iq(n,0,e.colorPalette),u=r.layoutMargins;return{series:[{type:`parallel`,name:lq(n,e.t),data:s.map((e,t)=>({value:e,name:c[t]})),lineStyle:{width:r.lineWidth??2,opacity:r.lineOpacity??.6,color:l},emphasis:{lineStyle:{width:r.emphasisLineWidth??4,opacity:r.emphasisOpacity??1}}}],parallelAxis:o,parallel:{left:u?.left??`5%`,right:u?.right??`13%`,bottom:u?.bottom??`10%`,top:u?.top??`10%`}}}};function Pq(e){switch(e){case u.LINE:case u.STEP_LINE:case u.AREA:case u.STACKED_AREA:return`line`;case u.SCATTER:case u.BUBBLE:return`scatter`;case u.BAR:case u.HORIZONTAL_BAR:case u.GROUPED_BAR:case u.STACKED_BAR:case u.WATERFALL:default:return`bar`}}var Fq=class{supportedTypes=[u.COMPOSED];build(e,t){let n=tq(e),r=[],i=!1;for(let n=0;n<t.length;n++){let a=t[n],o=Pq(a.chartType),s=iq(a,n,e.colorPalette),c=rq(e.response.data,a.measureRef),l={type:o,name:lq(a,e.t),data:c,itemStyle:{color:s},yAxisIndex:a.yAxisIndex??0};(a.chartType===u.AREA||a.chartType===u.STACKED_AREA)&&(l.areaStyle={opacity:a.style?.areaOpacity??.3}),(a.chartType===u.STACKED_BAR||a.chartType===u.STACKED_AREA)&&(l.stack=`composed_stack`),a.chartType===u.STEP_LINE&&(l.step=a.style?.step??`start`),xq(l,a),(a.yAxisIndex??0)>0&&(i=!0),r.push(l)}let a=e.definition.dataQuery.dimensions[0],o=hq(a?.timeGranularity,e.locale),s=a?.timeGranularity?{type:`category`,data:nq(e.response.data,n).map(t=>mq(t,a.timeGranularity,pq(e,a.ref))),axisLabel:{hideOverlap:e.chartStylePreset.axis.hideOverlap??!0,...o?{formatter:o}:{}}}:uq(e.response.data,n,e.chartStylePreset,e.dimensionEnumLabels?.[n]),c=e.definition.i18n?.yAxisLabelKey?(()=>{let t=e.t(e.definition.i18n.yAxisLabelKey);return t===e.definition.i18n.yAxisLabelKey?void 0:t})():void 0,l=t.filter(e=>(e.yAxisIndex??0)===0),d=t.filter(e=>(e.yAxisIndex??0)>0),f=[fq(c,e.chartStylePreset,{integerValued:dq(e,l)})];if(i){let t=fq(e.definition.i18n?.yAxisSecondaryLabelKey?(()=>{let t=e.t(e.definition.i18n.yAxisSecondaryLabelKey);return t===e.definition.i18n.yAxisSecondaryLabelKey?void 0:t})():void 0,e.chartStylePreset,{integerValued:dq(e,d)});t.position=`right`,t.splitLine={show:!1},f.push(t)}return{series:r,xAxis:s,yAxis:f.length===1?f[0]:f}}},Iq=[new Sq,new Cq,new wq,new Tq,new Eq,new Dq,new Oq,new kq,new Aq,new jq,new Mq,new Nq,new Fq],Lq=new Map;for(let e of Iq)for(let t of e.supportedTypes)Lq.set(t,e);var Rq=new Set([`pie`,`donut`,`funnel`,`radar`,`sankey`,`sunburst`,`treemap`,`gauge`,`heatmap`]),zq=new Set([`pie`,`donut`,`funnel`,`sankey`]);function Bq(e,t,n){let r={...e.gridPadding};if(n&&n>1&&(r.bottom=Math.max(r.bottom,e.multiSeriesLegendBottomPadding??50)),t?.gridPadding){let e=t.gridPadding;e.top!==void 0&&(r.top=e.top),e.right!==void 0&&(r.right=e.right),e.bottom!==void 0&&(r.bottom=e.bottom),e.left!==void 0&&(r.left=e.left)}return r}var Vq=e=>e;function Hq(e,t,n={width:800,height:400},r,i=Vq,a={colors:{},order:{},labels:{}},o){let s=r??KK(),c=e.appearance,l=e.i18n,d=e.dataQuery.dimensions[0]?.ref,f=d?a.order[d]:void 0,p=Array.isArray(e.dataQuery.orderBy)&&e.dataQuery.orderBy.length>0,m=d&&f&&!p?{...t,data:aq(t.data,d,f)}:t,h=c?.colorPalette?.length?c.colorPalette:XK(s),g=e.chartType,_=Lq.get(g);if(!_)return console.warn(`EChartsOptionBuilder: no builder for chart type '${g}'`),{series:[]};let v={definition:e,response:m,containerSize:n,colorPalette:h,chartStylePreset:s,t:i,dimensionEnumColors:a.colors,dimensionEnumLabels:a.labels,locale:o},y=_.build(v,e.series),b=zq.has(g)||e.series.length>1||e.series.some(e=>e.splitByDimension),x=c?.showLegend??b,S=c?.showTooltip??!0,C=Bq(s,c,e.series.length),w=c?.animated??s.animation.enabled,T=c?.animationDuration??s.animation.durationMs,E=c?.animationEasing??s.animation.easing,D=`transparent`;c?.background&&(D=c.background===`surface`?WK(`--background`,`#ffffff`):c.background);let O=c?.title,k=l?.titleKey?Uq(i,l.titleKey,O?.text):O?.text,A=l?.subtitleKey?Uq(i,l.subtitleKey,O?.subtext):O?.subtext,j=c?.tooltip,ee=Rq.has(g)?`item`:`axis`,te=c?.legend,M={series:y.series,...k?{title:{text:k,...A?{subtext:A}:{},left:O?.left??`left`,...O?.top==null?{}:{top:O.top},...O?.textAlign?{textAlign:O.textAlign}:{},textStyle:{fontSize:s.typography.titleFontSize,fontWeight:s.typography.titleFontWeight},subtextStyle:{fontSize:s.typography.subtitleFontSize}}}:{},tooltip:S?{trigger:j?.trigger??ee,confine:j?.confine??!0,...j?.formatter?{formatter:j.formatter}:{},...j?.axisPointerType&&j.axisPointerType!==`none`?{axisPointer:{type:j.axisPointerType}}:{}}:{show:!1},legend:{show:x,type:te?.type??`scroll`,...te?.position===`top`?{top:0}:te?.position===`left`?{left:0,orient:`vertical`}:te?.position===`right`?{right:0,orient:`vertical`}:{bottom:0},...te?.orient?{orient:te.orient}:{},...te?.itemGap==null?{}:{itemGap:te.itemGap},...te?.pageSize==null?{}:{pageSize:te.pageSize},...Rq.has(g)?{}:{data:y.series.map(e=>e.name).filter(e=>typeof e==`string`&&!e.startsWith(`__`))}},grid:{...C,containLabel:!0},...D===`transparent`?{}:{backgroundColor:D},animation:w,animationDuration:T,animationEasing:E,media:bq(s,!!(y.xAxis||y.yAxis),g===u.PIE||g===u.DONUT)};if(c?.toolbox?.show){let e=c.toolbox;M.toolbox={show:!0,right:e.right??10,top:e.top??10,feature:{...e.saveAsImage?{saveAsImage:{type:`png`}}:{},...e.dataView?{dataView:{readOnly:!0}}:{},...e.restore?{restore:{}}:{},...e.magicType?.length?{magicType:{type:e.magicType}}:{}}}}if(c?.dataZoom?.enabled){let e=c.dataZoom,t=e.type??[`slider`],n=[];for(let r of t){let t={type:r,start:e.start??0,end:e.end??100};e.axis!==`both`&&e.axis!==`x`&&e.axis||n.push({...t,xAxisIndex:0}),(e.axis===`both`||e.axis===`y`)&&n.push({...t,yAxisIndex:0})}M.dataZoom=n}y.xAxis&&(M.xAxis=y.xAxis),y.yAxis&&(M.yAxis=y.yAxis),y.radar&&(M.radar=y.radar);for(let[e,t]of Object.entries(y))![`series`,`xAxis`,`yAxis`,`radar`].includes(e)&&!e.startsWith(`_`)&&(M[e]=t);return M}function Uq(e,t,n){let r=e(t);return r===t?n:r}function Wq(e,t){let n=e.series[0]?.measureRef,r=n===void 0?void 0:t.data[0]?.[n];if(r==null||r===``)return null;let i=typeof r==`number`?r:typeof r==`string`?Number(r):NaN;return Number.isFinite(i)?i:null}function Gq(e,t,n){if(e===null)return null;let r=t?.maximumFractionDigits??0;return t?.valueFormat===g.PERCENT?n(e/100,{style:`percent`,maximumFractionDigits:r}):n(e,{maximumFractionDigits:r})}var Kq=`—`;function qq({definition:e,data:t,className:n}){let{formatNumber:r}=m(),i=e.chartTypeConfig,a=Wq(e,t),o=Gq(a,i,r),s=i?.showProgress===!0&&i.valueFormat===g.PERCENT&&a!==null;return(0,zK.jsxs)(`div`,{className:c(`chart-view flex min-w-0 flex-col justify-center gap-element`,n),"data-chart-kpi":e.ref,children:[(0,zK.jsx)(E,{as:`span`,typography:l.DATA,className:`text-3xl font-semibold text-foreground`,children:o??Kq}),s&&(0,zK.jsx)(T,{value:Math.min(100,Math.max(0,a)),"aria-hidden":!0,className:`h-1.5`})]})}var Jq=({option:e,theme:t,className:n,style:r,notMerge:i=!0,lazyUpdate:a=!1,onChartReady:o})=>{let s=(0,RK.useRef)(null),c=(0,RK.useRef)(null),l=(0,RK.useRef)(e);l.current=e;let u=(0,RK.useRef)(o);u.current=o,(0,RK.useEffect)(()=>{let e=s.current;if(!e)return;let n=lw(e,t);return c.current=n,l.current&&n.setOption(l.current,{notMerge:i,lazyUpdate:a}),u.current?.(n),()=>{n.dispose(),c.current=null}},[t]);let d=(0,RK.useRef)(!0);return(0,RK.useEffect)(()=>{if(d.current){d.current=!1;return}let t=c.current;t&&!t.isDisposed()&&e&&t.setOption(e,{notMerge:i,lazyUpdate:a})},[e,i,a]),(0,zK.jsx)(`div`,{ref:s,className:n,style:r})},Yq=({viewRef:e,document:t,viewDefinition:n,runtimeDescriptor:r,contextResourceIdentifiers:i,urlParamValues:a,inputs:o,className:l=``,width:d=`100%`,height:f=400,localErrorOnly:p=!1})=>{let{registry:h}=ee(),{getChartStylePreset:g,isDark:_}=b(),v=g(),{t:y,isReady:x,resolvedRegionalPreferences:T}=m({component:s.HIGH_LEVEL_VIEWS_CHART}),E=(0,RK.useRef)(null),k=(0,RK.useRef)(null);ZK(v);let M=(0,RK.useMemo)(()=>n?void 0:j({viewRef:e,registry:h}),[n,e,h]),ne=n??M?.chartView,re=(0,RK.useMemo)(()=>r??(M?A({identity:M.identity,chartView:M.chartView,contextResourceIdentifiers:i??{}}):void 0),[r,M,i]),ie=D({surfaceDefinition:ne,chartDefinition:t,runtimeDescriptor:re,explicitContextResourceIdentifiers:i,explicitInputs:o,urlParamValues:a}),ae=ie?.chartDefinition,{data:oe,loading:se,error:ce,refetch:le}=C(ae,ie?.executionChartRef,ie?.resolvedInputs,ie?.contextResourceIdentifiers,a,p,T.timezone),ue=(0,RK.useCallback)(e=>{if(E.current?.disconnect(),E.current=null,!e)return;let t=new ResizeObserver(()=>{let e=k.current?.getEchartsInstance?.();e&&!e.isDisposed?.()&&e.resize()});t.observe(e),E.current=t},[]),de=(0,RK.useCallback)(e=>{k.current={getEchartsInstance:()=>e}},[]),{tResourceFieldEnumValue:fe,isReady:pe}=m({resource:ae?.dataQuery.mainResourceType}),me=(0,RK.useMemo)(()=>ae?eq(ae,e=>h.resourceConfigurations[e],fe):{colors:{},order:{},labels:{}},[ae,h,_,fe,pe]),he=ae?.chartType===u.KPI,ge=(0,RK.useMemo)(()=>ae&&!he&&oe&&oe.data.length>0?Hq(ae,oe,void 0,v,y,me,T.locale):null,[ae,he,oe,v,y,me,T.locale]);return ae?se&&!oe?(0,zK.jsx)(te,{height:f}):ce?(0,zK.jsx)(w,{error:ce,onRetry:le}):he?oe&&oe.data.length>0?(0,zK.jsx)(qq,{definition:ae,data:oe,className:l}):(0,zK.jsx)(O,{}):ge?!x||!pe?null:(0,zK.jsx)(`div`,{ref:ue,className:c(`chart-view`,l),style:{width:d,height:f,position:`relative`},children:(0,zK.jsx)(Jq,{option:ge,theme:YK(),style:{width:`100%`,height:`100%`},notMerge:!0,lazyUpdate:!1,onChartReady:de},_?`dark`:`light`)}):(0,zK.jsx)(O,{}):(0,zK.jsx)(S,{viewKind:`chart`,viewRef:e})};export{Yq as ChartView,Yq as default};
35
+ `&&r!==``){var i=e.isSelected(r);n[r]=kt(n,r)?n[r]&&i:i}}),n}function nG(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,V(eG,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,V(eG,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,V(eG,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,V(eG,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,V(eG,`unSelect`))}var rG=Oc(iG);function iG(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function aG(e){e.registerComponentModel(WW),e.registerComponentView(JW),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,rG),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),nG(e)}var oG=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=h_(t);e.prototype.init.call(this,t,n,r),sG(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),sG(this,this.option,t)},t.type=`legend.scroll`,t.defaultOption=Ih(WW.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:`end`,pageFormatter:`{current}/{total}`,pageIcons:{horizontal:[`M0,0L12,-10L12,10z`,`M0,0L-12,-10L-12,10z`],vertical:[`M0,0L20,0L10,-20z`,`M0,0L20,0L10,20z`]},pageIconColor:Q.color.accent50,pageIconInactiveColor:Q.color.accent10,pageIconSize:15,pageTextStyle:{color:Q.color.tertiary},animationDurationUpdate:800}),t}(WW);function sG(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,m_(t,n,{type:`box`,ignoreSize:!!i})}var cG=To,lG=[`width`,`height`],uG=[`x`,`y`],dG=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new cG),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new cG)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,a,o,s){var c=this;e.prototype.renderInner.call(this,t,n,r,i,a,o,s);var l=this._controllerGroup,u=n.get(`pageIconSize`,!0),d=H(u)?u:[u,u];p(`pagePrev`,0);var f=n.getModel(`pageTextStyle`);l.add(new Xu({name:`pageText`,style:{text:`xx/xx`,fill:f.getTextColor(),font:f.getFont(),verticalAlign:`middle`,align:`center`},silent:!0})),p(`pageNext`,1);function p(e,t){var r=e+`DataIndex`,a=Pm(n.get(`pageIcons`,!0)[n.getOrient().name][t],{onclick:B(c._pageGo,c,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});a.name=e,l.add(a)}},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getSelectorGroup(),s=e.getOrient().index,c=lG[s],l=uG[s],u=lG[1-s],d=uG[1-s];i&&a_(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=P(n);i&&(h[c]=n[c]-p[c]-f);var g=this._layoutContentAndController(e,r,h,s,c,u,d,l);if(i){if(a===`end`)m[s]+=g[c]+f;else{var _=p[c]+f;m[s]-=_,g[l]-=_}g[c]+=p[c]+f,m[1-s]+=g[d]+g[u]/2-p[u]/2,g[u]=Math.max(g[u],p[u]),g[d]=Math.min(g[d],p[d]+m[1-s]),o.x=m[0],o.y=m[1],o.markRedraw()}return g},t.prototype._layoutContentAndController=function(e,t,n,r,i,a,o,s){var c=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;a_(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),a_(`horizontal`,u,e.get(`pageButtonItemGap`,!0));var d=c.getBoundingRect(),f=u.getBoundingRect(),p=this._showController=d[i]>n[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=K(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Gu({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&nm(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;R([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,W(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=lG[i],o=uG[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i<g.i&&(g=h,f.pagePrevDataIndex??=h.i,++f.pageCount,++f.pageIndex),h=_;return f;function v(e){if(e){var t=e.getBoundingRect(),n=t[o]+e[o];return{s:n,e:n+t[a],i:e.__legendDataIndex}}}function y(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(JW);function fG(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function pG(e){jD(aG),e.registerComponentModel(oG),e.registerComponentView(dG),fG(e)}function mG(e){jD(aG),jD(pG)}var hG=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.inside`,t.defaultOption=Ih(uH.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(uH),gG=Qs();function _G(e,t,n){gG(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}function vG(e,t){for(var n=gG(e).coordSysRecordMap,r=n.keys(),i=0;i<r.length;i++){var a=r[i],o=n.get(a),s=o.dataZoomInfoMap;if(s){var c=t.uid;s.get(c)&&(s.removeKey(c),s.keys().length||yG(n,o))}}}function yG(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function bG(e,t){var n={model:t,containsPoint:V(SG,t),dispatchAction:V(xG,e),dataZoomInfoMap:null,controller:null},r=n.controller=new cP(e.getZr());return R([`pan`,`zoom`,`scrollMove`],function(e){r.on(e,function(t){var r=[];n.dataZoomInfoMap.each(function(i){if(t.isAvailableBehavior(i.model.option)){var a=(i.getRange||{})[e],o=a&&a(i.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!i.model.get(`disabled`,!0)&&o&&r.push({dataZoomId:i.model.id,start:o[0],end:o[1]})}}),r.length&&n.dispatchAction(r)})}),n}function xG(e,t){e.isDisposed()||e.dispatchAction({type:`dataZoom`,animation:{easing:`cubicOut`,duration:100},batch:t})}function SG(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function CG(e,t,n){var r,i=`type_`,a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0,s,c;return e.each(function(e){var t=e.model,n=t.get(`disabled`,!0)?!1:!t.get(`zoomLock`,!0)||`move`;a[i+n]>a[i+r]&&(r=n),o&&=t.get(`preventDefaultMouseMove`,!0),s=K(t.get(`cursorGrab`,!0),s),c=K(t.get(`cursorGrabbing`,!0),c)}),{controlType:r,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:n,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint},cursorGrab:s,cursorGrabbing:c}}}function wG(e){e.registerUpdateLifecycle(`coordsys:aftercreate`,function(e,t){var n=gG(t),r=n.coordSysRecordMap||=q();r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:`dataZoom`,subType:`inside`},function(e){R(iH(e).infoList,function(n){var i=n.model.uid,a=r.get(i)||r.set(i,bG(t,n.model));(a.dataZoomInfoMap||=q()).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),r.each(function(e){var n=e.controller,i,a=e.dataZoomInfoMap;if(a){var o=a.keys()[0];o!=null&&(i=a.get(o))}if(!i)yG(r,e);else{var s=CG(a,e,t);n.enable(s.controlType,s.opt),Ub(e,`dispatchAction`,i.model.get(`throttle`,!0),`fixRate`)}})})}var TG=function(e){M(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataZoom.inside`,t}return t.prototype.render=function(t,n,r){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),_G(r,t,{pan:B(EG.pan,this),zoom:B(EG.zoom,this),scrollMove:B(EG.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){vG(this.api,this.dataZoomModel),this.range=null},t.type=`dataZoom.inside`,t}(pH),EG={zoom:function(e,t,n,r){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=OG[t](null,[r.originX,r.originY],o,n,e),c=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],l=Math.max(1/r.scale,0);a[0]=(a[0]-c)*l+c,a[1]=(a[1]-c)*l+c;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(hR(0,a,[0,100],0,u.minSpan,u.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:DG(function(e,t,n,r,i,a){var o=OG[r]([a.oldX,a.oldY],[a.newX,a.newY],t,i,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:DG(function(e,t,n,r,i,a){return OG[r]([0,0],[a.scrollDelta,a.scrollDelta],t,i,n).signal*(e[1]-e[0])*a.scrollDelta})};function DG(e){return function(t,n,r,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s&&(hR(e(o,s,t,n,r,i),o,[0,100],`all`),this.range=o,a[0]!==o[0]||a[1]!==o[1]))return o}}var OG={grid:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem.getRect();return e||=[0,0],a.dim===`x`?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem,c=s.getRadiusAxis().getExtent(),l=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),n.mainType===`radiusAxis`?(o.pixel=t[0]-e[0],o.pixelLength=c[1]-c[0],o.pixelStart=c[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,n,r,i){var a=n.axis,o=i.model.coordinateSystem.getRect(),s={};return e||=[0,0],a.orient===`horizontal`?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function kG(e){yH(e),e.registerComponentModel(hG),e.registerComponentView(TG),wG(e)}var AG=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.slider`,t.layoutMode=`box`,t.defaultOption=Ih(uH.defaultOption,{show:!0,right:`ph`,top:`ph`,width:`ph`,height:`ph`,left:null,bottom:null,borderColor:Q.color.accent10,borderRadius:0,backgroundColor:Q.color.transparent,dataBackground:{lineStyle:{color:Q.color.accent30,width:.5},areaStyle:{color:Q.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:Q.color.accent40,width:.5},areaStyle:{color:Q.color.accent20,opacity:.3}},fillerColor:`rgba(135,175,274,0.2)`,handleIcon:`path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z`,handleSize:`100%`,handleStyle:{color:Q.color.neutral00,borderColor:Q.color.accent20},moveHandleSize:7,moveHandleIcon:`path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z`,moveHandleStyle:{color:Q.color.accent40,opacity:.5},showDetail:!0,showDataShadow:`auto`,realtime:!0,zoomLock:!1,textStyle:{color:Q.color.tertiary},brushSelect:!0,brushStyle:{color:Q.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:Q.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(uH),jG=Gu,MG=1,NG=30,PG=7,FG=`horizontal`,IG=`vertical`,LG=5,RG=[`line`,`bar`,`candlestick`,`scatter`],zG={easing:`cubicOut`,duration:100,delay:0},BG=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return t.prototype.init=function(e,t){this.api=t,this._onBrush=B(this._onBrush,this),this._onBrushEnd=B(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){e.prototype.render.apply(this,arguments),Ub(this,`_dispatchZoomAction`,t.get(`throttle`),`fixRate`),this._orient=t.getOrient(),t.get(`show`)===!1?this.group.removeAll():t.noTarget()?(this._clear(),this.group.removeAll()):(i&&i.type===`dataZoom`&&i.from===this.uid||this._buildView(),this._updateView())},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Wb(this,`_dispatchZoomAction`);var e=this.api.getZr();e.off(`mousemove`,this._onBrush),e.off(`mouseup`,this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new To;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get(`brushSelect`)?PG:0,r=d_(e,t).refContainer,i=this._findCoordRect(),a=e.get(`defaultLocationEdgeGap`,!0)||0,o=this._orient===FG?{right:r.width-i.x-i.width,top:r.height-NG-a-n,width:i.width,height:NG}:{right:a,top:i.y,width:NG,height:i.height},s=h_(e.option);R([`right`,`top`,`width`,`height`],function(e){s[e]===`ph`&&(s[e]=o[e])});var c=l_(s,r);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===IG&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get(`inverse`),a=this._displayables.sliderGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(n===FG&&!i?{scaleY:o?1:-1,scaleX:1}:n===FG&&i?{scaleY:o?1:-1,scaleX:-1}:n===IG&&!i?{scaleY:o?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:o?-1:1,scaleX:-1,rotation:Math.PI/2});var s=e.getBoundingRect([a]),c=isNaN(s.x)?0:s.x,l=isNaN(s.y)?0:s.y;e.x=t.x-c,e.y=t.y-l,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get(`brushSelect`);n.add(new jG({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get(`backgroundColor`)},z2:-40}));var i=new jG({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:`transparent`},z2:0,onclick:B(this._onClickPanel,this)}),a=this.api.getZr();r?(i.on(`mousedown`,this._onBrushStart,this),i.cursor=`crosshair`,a.on(`mousemove`,this._onBrush),a.on(`mouseup`,this._onBrushEnd)):(a.off(`mousemove`,this._onBrush),a.off(`mouseup`,this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),a=r.getShadowDim&&r.getShadowDim(),o=a&&i.getDimensionInfo(a)?r.getShadowDim():e.otherDim;if(o==null)return;var s=this._shadowPolygonPts,c=this._shadowPolylinePts;if(i!==this._shadowData||o!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var l=i.getDataExtent(e.thisDim),u=i.getDataExtent(o),d=(u[1]-u[0])*.3;u=[u[0]-d,u[1]+d];var f=[0,t[1]],p=[0,t[0]],m=[[t[0],0],[0,0]],h=[],g=p[1]/Math.max(1,i.count()-1),_=t[0]/(l[1]-l[0]),v=e.thisAxis.type===`time`,y=-g,b=Math.round(i.count()/t[0]),x;i.each([e.thisDim,o],function(e,t,n){if(b>0&&n%b)v||(y+=g);else{y=v?(+e-l[0])*_:y+g;var r=t==null||isNaN(t)||t===``,i=r?0:qo(t,u,f,!0);r&&!x&&n?(m.push([m[m.length-1][0],0]),h.push([h[h.length-1][0],0])):!r&&x&&(m.push([y,0]),h.push([y,0])),r||(m.push([y,i]),h.push([y,i])),x=r}}),s=this._shadowPolygonPts=m,c=this._shadowPolylinePts=h}this._shadowData=i,this._shadowDim=o,this._shadowSize=[t[0],t[1]];var S=this.dataZoomModel;function C(e){var t=S.getModel(e?`selectedDataBackground`:`dataBackground`),n=new To,r=new Ep({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel(`areaStyle`).getAreaStyle(),silent:!0,z2:-20}),i=new Op({shape:{points:c},segmentIgnoreThreshold:1,style:t.getModel(`lineStyle`).getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}for(var w=0;w<3;w++){var T=C(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get(`showDataShadow`);if(t!==!1){var n,r=this.ecModel;return e.eachTargetAxis(function(i,a){R(e.getAxisProxy(i,a).getTargetSeriesModels(),function(e){if(!n&&!(t!==!0&&L(RG,e.get(`type`))<0)){var o=r.getComponent(nH(i),a).axis,s=HG(i),c,l=e.coordinateSystem;s!=null&&l.getOtherAxis&&(c=l.getOtherAxis(o).inverse),s=e.getData().mapDimension(s),n={thisAxis:o,series:e,thisDim:e.getData().mapDimension(i),otherDim:s,otherAxisInverse:c}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,a=this._size,o=this.dataZoomModel,s=this.api,c=o.get(`borderRadius`)||0,l=o.get(`brushSelect`),u=t.filler=new jG({silent:l,style:{fill:o.get(`fillerColor`)},textConfig:{position:`inside`}});i.add(u),i.add(new jG({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1],r:c},style:{stroke:o.get(`dataBackgroundColor`)||o.get(`borderColor`),lineWidth:MG,fill:Q.color.transparent}})),R([0,1],function(t){var a=o.get(`handleIcon`);!Zx[a]&&a.indexOf(`path://`)<0&&a.indexOf(`image://`)<0&&(a=`path://`+a);var s=eS(a,-1,0,2,2,null,!0);s.attr({cursor:UG(this._orient),draggable:!0,drift:B(this._onDragMove,this,t),ondragend:B(this._onDragEnd,this),onmouseover:B(this._onOverDataInfoTriggerArea,this,!0),onmouseout:B(this._onOverDataInfoTriggerArea,this,!1),z2:5});var c=s.getBoundingRect(),l=o.get(`handleSize`);this._handleHeight=X(l,this._size[1]),this._handleWidth=c.width/c.height*this._handleHeight,s.setStyle(o.getModel(`handleStyle`).getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState(`emphasis`).style=o.getModel([`emphasis`,`handleStyle`]).getItemStyle(),yf(s);var u=o.get(`handleColor`);u!=null&&(s.style.fill=u),i.add(n[t]=s);var d=o.getModel(`textStyle`),f=(o.get(`handleLabel`)||{}).show||!1;e.add(r[t]=new Xu({silent:!0,invisible:!f,style:ch(d,{x:0,y:0,text:``,verticalAlign:`middle`,align:`center`,fill:d.getTextColor(),font:d.getFont()}),z2:10}))},this);var d=u;if(l){var f=X(o.get(`moveHandleSize`),a[1]),p=t.moveHandle=new Gu({style:o.getModel(`moveHandleStyle`).getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:a[1]-.5,height:f}}),m=f*.8,h=t.moveHandleIcon=eS(o.get(`moveHandleIcon`),-m/2,-m/2,m,m,Q.color.neutral00,!0);h.silent=!0,h.y=a[1]+f/2-.5,p.ensureState(`emphasis`).style=o.getModel([`emphasis`,`moveHandleStyle`]).getItemStyle();var g=Math.min(a[1]/2,Math.max(f,10));d=t.moveZone=new Gu({invisible:!0,shape:{y:a[1]-g,height:f+g}}),d.on(`mouseover`,function(){s.enterEmphasis(p)}).on(`mouseout`,function(){s.leaveEmphasis(p)}),i.add(p),i.add(h),i.add(d)}d.attr({draggable:!0,cursor:`grab`,drift:B(this._onActualMoveZoneDrift,this),ondragstart:B(this._onActualMoveZoneDragStart,this),ondragend:B(this._onActualMoveZoneDragEnd,this),onmouseover:B(this._onOverDataInfoTriggerArea,this,!0),onmouseout:B(this._onOverDataInfoTriggerArea,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[qo(e[0],[0,100],t,!0),qo(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),a=n.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];hR(t,r,i,n.get(`zoomLock`)?`all`:e,a.minSpan==null?null:qo(a.minSpan,o,i,!0),a.maxSpan==null?null:qo(a.maxSpan,o,i,!0));var s=this._range,c=this._range=$o([qo(r[0],i,o,!0),qo(r[1],i,o,!0)]);return!s||s[0]!==c[0]||s[1]!==c[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=$o(n.slice()),i=this._size;R([0,1],function(e){var r=t.handles[e],a=this._handleHeight;r.attr({scaleX:a/2,scaleY:a/2,x:n[e]+(e?-1:1),y:i[1]/2-a/2})},this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var a={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(a),t.moveZone.setShape(a),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr(`x`,a.x+a.width/2));for(var o=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],c=0;c<o.length;c++){var l=o[c],u=l.getClipPath();u||(u=new Gu,l.setClipPath(u)),u.setShape({x:s[c],y:0,width:s[c+1]-s[c],height:i[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,i=this._orient,a=[``,``];if(t.get(`showDetail`)){var o=t.findRepresentativeAxisProxy(),s=o.getAxisModel().axis.scale;if(o){var c=this._range,l;if(e){var u={start:c[0],end:c[1]},d=cH(t,o);if(d){var f=d.calculateDataWindow(u).percentInverted;u={start:f[0],end:f[1]}}l=o.calculateDataWindow(u)}else l=o.getWindow();a=[VG(t,0,l,s),VG(t,1,l,s)]}}var p=$o(this._handleEnds.slice());m.call(this,0),m.call(this,1);function m(e){var t=Em(n.handles[e].parent,this.group),o=Om(e===0?`right`:`left`,t),s=this._handleWidth/2+LG,c=Dm([p[e]+(e===0?-s:s),this._size[1]/2],t);r[e].setStyle({x:c[0],y:c[1],verticalAlign:i===FG?`middle`:o,align:i===FG?o:`center`,text:a[e]})}},t.prototype._onOverDataInfoTriggerArea=function(e){this._isOverDataInfoTriggerArea=e,this._showDataInfo(e)},t.prototype._showDataInfo=function(e){var t=(this.dataZoomModel.get(`handleLabel`)||{}).show||!1,n=this.dataZoomModel.getModel([`emphasis`,`handleLabel`]).get(`show`)||!1,r=e||this._dragging?n:t,i=this._displayables,a=i.handleLabels;a[0].attr(`invisible`,!r),a[1].attr(`invisible`,!r),i.moveHandle&&this.api[r?`enterEmphasis`:`leaveEmphasis`](i.moveHandle,1)},t.prototype._onActualMoveZoneDrift=function(e,t,n){this.api.getZr().setCursorStyle(`grabbing`),this._onDragMove(`all`,e,t,n)},t.prototype._onActualMoveZoneDragStart=function(e){e.target.attr(`cursor`,`grabbing`),this._showDataInfo(!0)},t.prototype._onActualMoveZoneDragEnd=function(e){e.target.attr(`cursor`,`grab`),this._onDragEnd()},t.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,wn(r.event);var i=this._displayables.sliderGroup.getLocalTransform(),a=Dm([t,n],i,!0),o=this._updateInterval(e,a[0]),s=this.dataZoomModel.get(`realtime`);this._updateView(!s),o&&s&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._isOverDataInfoTriggerArea||this._showDataInfo(!1),!this.dataZoomModel.get(`realtime`)&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,a=this._updateInterval(`all`,n[0]-i);this._updateView(),a&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new J(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr(`ignore`,!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100],a=this._handleEnds=[n.x,n.x+n.width],o=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();hR(0,a,r,0,o.minSpan==null?null:qo(o.minSpan,i,r,!0),o.maxSpan==null?null:qo(o.maxSpan,i,r,!0)),this._range=$o([qo(a[0],r,i,!0),qo(a[1],r,i,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(wn(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new jG({silent:!0,style:r.getModel(`brushStyle`).getItemStyle()}),n.sliderGroup.add(i)),i.attr(`ignore`,!1);var a=this._brushStart,o=this._displayables.sliderGroup,s=o.transformCoordToLocal(e,t),c=o.transformCoordToLocal(a.x,a.y),l=this._size;s[0]=Math.max(Math.min(l[0],s[0]),0),i.setShape({x:c[0],y:0,width:s[0]-c[0],height:l[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:`dataZoom`,from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?zG:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=iH(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:r*.2,y:i*.2,width:r*.6,height:i*.6}}return e},t.type=`dataZoom.slider`,t}(pH);function VG(e,t,n,r){var i=e.get(`labelFormatter`),a=e.get(`labelPrecision`);(a==null||a===`auto`)&&(a=n.valuePrecision);var o=n.value[t],s=o==null||isNaN(o)?``:zT(r)||LT(r)?r.getLabel({value:Math.round(o)}):isFinite(a)?Qo(o,a,!0):o+``;return U(i)?i(o,s):W(i)?i.replace(`{value}`,s):s}function HG(e){return{x:`y`,y:`x`,radius:`angle`,angle:`radius`}[e]}function UG(e){return e===`vertical`?`ns-resize`:`ew-resize`}function WG(e){e.registerComponentModel(AG),e.registerComponentView(BG),yH(e)}function GG(e){jD(kG),jD(WG)}var KG={get:function(e,t,n){var r=P((qG[e]||{})[t]);return n&&H(r)?r[r.length-1]:r}},qG={color:{active:[`#006edd`,`#e0ffff`],inactive:[Q.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},JG=MI.mapVisual,YG=MI.eachVisual,XG=H,ZG=R,QG=$o,$G=qo,eK=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&oW(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=B(e,this),this.controllerVisuals=aW(this.option.controller,t,e),this.targetVisuals=aW(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return ZG(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=ic(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return z(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){R(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],H(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);return W(o)?o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c):U(o)?s?o(e[0],e[1]):o(e):s?e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1]:c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=QG([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=nt(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};F(r,n),F(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){XG(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},ZG(r,function(e,t){if(MI.isValidType(t)){var n=KG.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;ZG(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&P(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&P(n)||(a?s[0]:[s[0],s[0]])),c.symbol=JG(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;YG(l,function(e){e>u&&(u=e)}),c.symbolSize=JG(l,function(e){return $G(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:Q.color.transparent,borderColor:Q.color.borderTint,contentColor:Q.color.theme[0],inactiveColor:Q.color.disabled,borderWidth:0,padding:Q.size.m,textGap:10,precision:0,textStyle:{color:Q.color.secondary}},t}(v_),tK=[20,140],nK=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=tK[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=tK[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):H(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),R(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=$o((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},t.prototype.getValueState=function(e){var t=this.option.range,n=this.getExtent(),r=K(this.option.unboundedRange,!0);return(r&&t[0]<=n[0]||t[0]<=e)&&(r&&t[1]>=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=rK(this,`outOfRange`,this.getExtent()),n=rK(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;o<c&&(!n.length||t[o]<=n[0]);o++)t[o]<n[a]&&i(t[o],`outOfRange`);for(var l=1;a<s;a++,l=0)l&&r.length&&i(n[a],`outOfRange`),i(n[a],`inRange`);for(var l=1;o<c;o++)(!n.length||n[n.length-1]<t[o])&&(l&&=(r.length&&i(r[r.length-1].value,`outOfRange`),0),i(t[o],`outOfRange`));var u=r.length;return{stops:r,outerColors:[u?r[0].color:`transparent`,u?r[u-1].color:`transparent`]}},t.type=`visualMap.continuous`,t.defaultOption=Ih(eK.defaultOption,{align:`auto`,calculable:!1,hoverLink:!0,realtime:!0,handleIcon:`path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z`,handleSize:`120%`,handleStyle:{borderColor:Q.color.neutral00,borderWidth:1},indicatorIcon:`circle`,indicatorSize:`50%`,indicatorStyle:{borderColor:Q.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:Q.color.shadow}}),t}(eK);function rK(e,t,n){if(n[0]===n[1])return n.slice();for(var r=200,i=(n[1]-n[0])/r,a=n[0],o=[],s=0;s<=r&&a<n[1];s++)o.push(a),a+=i;return o.push(n[1]),o}var iK=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.autoPositionValues={left:1,right:1,top:1,bottom:1},n}return t.prototype.init=function(e,t){this.ecModel=e,this.api=t},t.prototype.render=function(e,t,n,r){this.visualMapModel=e,e.get(`show`)===!1?this.group.removeAll():this.doRender(e,t,n,r)},t.prototype.renderBackground=function(e){var t=this.visualMapModel,n=Rg(t.get(`padding`)||0),r=e.getBoundingRect();e.add(new Gu({z2:-1,silent:!0,shape:{x:r.x-n[3],y:r.y-n[0],width:r.width+n[3]+n[1],height:r.height+n[0]+n[2]},style:{fill:t.get(`backgroundColor`),stroke:t.get(`borderColor`),lineWidth:t.get(`borderWidth`)}}))},t.prototype.getControllerVisual=function(e,t,n){n||={};var r=n.forceState,i=this.visualMapModel,a={};t===`color`&&(a.color=i.get(`contentColor`));function o(e){return a[e]}function s(e,t){a[e]=t}var c=i.controllerVisuals[r||i.getValueState(e)];return R(MI.prepareVisualTypes(c),function(r){var i=c[r];n.convertOpacityToAlpha&&r===`opacity`&&(r=`colorAlpha`,i=c.__alphaForOpacity),MI.dependsOn(r,t)&&i&&i.applyVisual(e,o,s)}),a[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api,r=d_(t,n).refContainer;f_(e,t.getBoxLayoutParams(),r)},t.prototype.doRender=function(e,t,n,r){},t.type=`visualMap`,t}(kb),aK=[[`left`,`right`,`width`],[`top`,`bottom`,`height`]];function oK(e,t,n){var r=e.option,i=r.align;if(i!=null&&i!==`auto`)return i;for(var a={width:t.getWidth(),height:t.getHeight()},o=+(r.orient===`horizontal`),s=aK[o],c=[0,null,10],l={},u=0;u<3;u++)l[aK[1-o][u]]=c[u],l[s[u]]=u===2?n[0]:r[s[u]];var d=[[`x`,`width`,3],[`y`,`height`,0]][o],f=l_(l,a,r.padding);return s[(f.margin[d[2]]||0)+f[d[0]]+f[d[1]]*.5<a[d[1]]*.5?0:1]}function sK(e,t){return R(e||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey=`visualMap`+(t?t.componentIndex:``)}),e}var cK=qo,lK=R,uK=Math.min,dK=Math.max,fK=12,pK=6,mK=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._shapes={},n._dataInterval=[],n._handleEnds=[],n._hoverLinkDataIndices=[],n}return t.prototype.init=function(t,n){e.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=B(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=B(this._hideIndicator,this)},t.prototype.doRender=function(e,t,n,r){r&&r.type===`selectDataRange`&&r.from===this.uid||this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get(`orient`),this._useHandle=e.get(`calculable`),this._resetInterval(),this._renderBar(t);var n=e.get(`text`);this._renderEndsText(t,n,0),this._renderEndsText(t,n,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},t.prototype._renderEndsText=function(e,t,n){if(t){var r=t[1-n];r=r==null?``:r+``;var i=this.visualMapModel,a=i.get(`textGap`),o=i.itemSize,s=this._shapes.mainGroup,c=this._applyTransform([o[0]/2,n===0?-a:o[1]+a],s),l=this._applyTransform(n===0?`bottom`:`top`,s),u=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new Xu({style:ch(d,{x:c[0],y:c[1],verticalAlign:d.get(`verticalAlign`)||(u===`horizontal`?`middle`:l),align:d.get(`align`)||(u===`horizontal`?l:`center`),text:r})}))}},t.prototype._renderBar=function(e){var t=this.visualMapModel,n=this._shapes,r=t.itemSize,i=this._orient,a=this._useHandle,o=oK(t,this.api,r),s=n.mainGroup=this._createBarGroup(o),c=new To;s.add(c),c.add(n.outOfRange=hK()),c.add(n.inRange=hK(null,a?vK(this._orient):null,B(this._dragHandle,this,`all`,!1),B(this._dragHandle,this,`all`,!0))),c.setClipPath(new Gu({shape:{x:0,y:0,width:r[0],height:r[1],r:3}}));var l=t.textStyleModel.getTextRect(`国`),u=dK(l.width,l.height);a&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(t,s,0,r,u,i),this._createHandle(t,s,1,r,u,i)),this._createIndicator(t,s,r,u,i),e.add(s)},t.prototype._createHandle=function(e,t,n,r,i,a){var o=B(this._dragHandle,this,n,!1),s=B(this._dragHandle,this,n,!0),c=ao(e.get(`handleSize`),r[0]),l=eS(e.get(`handleIcon`),-c/2,-c/2,c,c,null,!0),u=vK(this._orient);l.attr({cursor:u,draggable:!0,drift:o,ondragend:s,onmousemove:function(e){wn(e.event)}}),l.x=r[0]/2,l.useStyle(e.getModel(`handleStyle`).getItemStyle()),l.setStyle({strokeNoScale:!0,strokeFirst:!0}),l.style.lineWidth*=2,l.ensureState(`emphasis`).style=e.getModel([`emphasis`,`handleStyle`]).getItemStyle(),Ef(l,!0),t.add(l);var d=this.visualMapModel.textStyleModel,f=new Xu({cursor:u,draggable:!0,drift:o,onmousemove:function(e){wn(e.event)},ondragend:s,style:ch(d,{x:0,y:0,text:``})});f.ensureState(`blur`).style={opacity:.1},f.stateTransition={duration:200},this.group.add(f);var p=[c,0],m=this._shapes;m.handleThumbs[n]=l,m.handleLabelPoints[n]=p,m.handleLabels[n]=f},t.prototype._createIndicator=function(e,t,n,r,i){var a=ao(e.get(`indicatorSize`),n[0]),o=eS(e.get(`indicatorIcon`),-a/2,-a/2,a,a,null,!0);o.attr({cursor:`move`,invisible:!0,silent:!0,x:n[0]/2});var s=e.getModel(`indicatorStyle`).getItemStyle();if(o instanceof Lu){var c=o.style;o.useStyle(I({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},s))}else o.useStyle(s);t.add(o);var l=this.visualMapModel.textStyleModel,u=new Xu({silent:!0,invisible:!0,style:ch(l,{x:0,y:0,text:``})});this.group.add(u);var d=[(i===`horizontal`?r/2:pK)+n[0]/2,0],f=this._shapes;f.indicator=o,f.indicatorLabel=u,f.indicatorLabelPoint=d,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,t,n,r){if(this._useHandle){if(this._dragging=!t,!t){var i=this._applyTransform([n,r],this._shapes.mainGroup,!0);this._updateInterval(e,i[1]),this._hideIndicator(),this._updateView()}t===!this.visualMapModel.get(`realtime`)&&this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():_K(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),n=e.getExtent(),r=[0,e.itemSize[1]];this._handleEnds=[cK(t[0],n,r,!0),cK(t[1],n,r,!0)]},t.prototype._updateInterval=function(e,t){t||=0;var n=this.visualMapModel,r=this._handleEnds,i=[0,n.itemSize[1]];hR(t,r,i,e,0);var a=n.getExtent();this._dataInterval=[cK(r[0],i,a,!0),cK(r[1],i,a,!0)]},t.prototype._updateView=function(e){var t=this.visualMapModel,n=t.getExtent(),r=this._shapes,i=[0,t.itemSize[1]],a=e?i:this._handleEnds,o=this._createBarVisual(this._dataInterval,n,a,`inRange`),s=this._createBarVisual(n,n,i,`outOfRange`);r.inRange.setStyle({fill:o.barColor}).setShape(`points`,o.barPoints),r.outOfRange.setStyle({fill:s.barColor}).setShape(`points`,s.barPoints),this._updateHandle(a,o)},t.prototype._createBarVisual=function(e,t,n,r){var i={forceState:r,convertOpacityToAlpha:!0},a=this._makeColorGradient(e,i),o=[this.getControllerVisual(e[0],`symbolSize`,i),this.getControllerVisual(e[1],`symbolSize`,i)],s=this._createBarPoints(n,o);return{barColor:new Bp(0,0,0,1,a),barPoints:s,handlesColor:[a[0].color,a[a.length-1].color]}},t.prototype._makeColorGradient=function(e,t){var n=100,r=[],i=(e[1]-e[0])/n;r.push({color:this.getControllerVisual(e[0],`color`,t),offset:0});for(var a=1;a<n;a++){var o=e[0]+i*a;if(o>e[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new To(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);lK([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=cK(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=Dm(n.handleLabelPoints[l],Em(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=cK(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=Dm(c.indicatorLabelPoint,Em(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;C<S.length;C++)this.api.enterBlur(S[C])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on(`mousemove`,function(t){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,r=e._applyTransform([t.offsetX,t.offsetY],e._shapes.mainGroup,!0,!0);r[1]=uK(dK(0,r[1]),n[1]),e._doHoverLinkToSeries(r[1],0<=r[0]&&r[0]<=n[0])}}).on(`mouseout`,function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on(`mouseover`,this._hoverLinkFromSeriesMouseOver,this),e.on(`mouseout`,this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,t){var n=this.visualMapModel,r=n.itemSize;if(n.option.hoverLink){var i=[0,r[1]],a=n.getExtent();e=uK(dK(i[0],e),i[1]);var o=gK(n,a,i),s=[e-o,e+o],c=cK(e,i,a,!0),l=[cK(s[0],i,a,!0),cK(s[1],i,a,!0)];s[0]<i[0]&&(l[0]=-1/0),s[1]>i[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||_K(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=Xs(u,d);this._dispatchHighDown(`downplay`,sK(f[0],n)),this._dispatchHighDown(`highlight`,sK(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(Nx(e.target,function(e){var n=Z(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n<t.length;n++)this.api.leaveBlur(t[n])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown(`downplay`,sK(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off(`mouseover`,this._hoverLinkFromSeriesMouseOver),e.off(`mouseout`,this._hideIndicator)},t.prototype._applyTransform=function(e,t,n,r){var i=Em(t,r?null:this.group);return H(e)?Dm(e,i,n):Om(e,i,n)},t.prototype._dispatchHighDown=function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type=`visualMap.continuous`,t}(iK);function hK(e,t,n,r){return new Ep({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(e){wn(e.event)},ondragend:r})}function gK(e,t,n){var r=fK/2,i=e.get(`hoverLinkDataSize`);return i&&(r=cK(i,t,n,!0)/2),r}function _K(e){return!!(e.get(`hoverLinkOnHandle`)??e.get(`realtime`))}function vK(e){return e===`vertical`?`ns-resize`:`ew-resize`}var yK={type:`selectDataRange`,event:`dataRangeSelected`,update:`update`},bK=function(e,t){t.eachComponent({mainType:`visualMap`,query:e},function(t){t.setSelected(e.selected)})},xK=[{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent(`visualMap`,function(t){var r=e.pipelineContext;!t.isTargetSeries(e)||r&&r.large||n.push(sW(t.stateList,t.targetVisuals,B(t.getValueState,t),t.getDataDimensionIndex(e.getData())))}),n}},{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),r=[];t.eachComponent(`visualMap`,function(t){if(t.isTargetSeries(e)){var i=t.getVisualMeta(B(SK,null,e,t))||{stops:[],outerColors:[]},a=t.getDataDimensionIndex(n);a>=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function SK(e,t,n,r){for(var i=t.targetVisuals[r],a=MI.prepareVisualTypes(i),o={color:Ox(e.getData(),`color`)},s=0,c=a.length;s<c;s++){var l=a[s],u=i[l===`opacity`?`__alphaForOpacity`:l];u&&u.applyVisual(n,d,f)}return o.color;function d(e){return o[e]}function f(e,t){o[e]=t}}var CK=R;function wK(e){var t=e&&e.visualMap;H(t)||(t=t?[t]:[]),CK(t,function(e){if(e){TK(e,`splitList`)&&!TK(e,`pieces`)&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&H(t)&&CK(t,function(e){G(e)&&(TK(e,`start`)&&!TK(e,`min`)&&(e.min=e.start),TK(e,`end`)&&!TK(e,`max`)&&(e.max=e.end))})}})}function TK(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var EK=!1;function DK(e){EK||(EK=!0,e.registerSubTypeDefaulter(`visualMap`,function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(yK,bK),R(xK,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(wK))}function OK(e){e.registerComponentModel(nK),e.registerComponentView(mK),DK(e)}var kK=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],AK[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=P(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=z(this._pieceList,function(e){return e=P(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=MI.listVisualTypes(),i=this.isCategory();R(t.pieces,function(e){R(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),R(n,function(e,n){var r=!1;R(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&R(this.stateList,function(e){(t[e]||(t[e]={}))[n]=KG.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,R(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;R(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=P(e)},t.prototype.getValueState=function(e){var t=MI.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){MI.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return R(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=Ih(eK.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(eK),AK={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o<i;s+=a,o++){var c=o===i-1?r[1]:s+a;e.push({interval:[s,c],close:[1,1]})}t.maxOpen&&e.push({interval:[r[1],1/0],close:[0,0]}),ms(e),R(e,function(e,t){e.index=t,e.text=this.formatValueText(e.interval)},this)},categories:function(e){var t=this.option;R(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),jK(t,e)},pieces:function(e){var t=this.option;R(t.pieces,function(t,n){G(t)||(t={value:t});var r={text:``,index:n};if(t.label!=null&&(r.text=t.label),t.hasOwnProperty(`value`)){var i=r.value=t.value;r.interval=[i,i],r.close=[1,1]}else{for(var a=r.interval=[],o=r.close=[0,0],s=[1,0,1],c=[-1/0,1/0],l=[],u=0;u<2;u++){for(var d=[[`gte`,`gt`,`min`],[`lte`,`lt`,`max`]][u],f=0;f<3&&a[u]==null;f++)a[u]=t[d[f]],o[u]=s[f],l[u]=f===2;a[u]??(a[u]=c[u])}l[0]&&a[1]===1/0&&(o[0]=0),l[1]&&a[0]===-1/0&&(o[1]=0),a[0]===a[1]&&o[0]&&o[1]&&(r.value=a[0])}r.visual=MI.retrieveVisuals(t),e.push(r)},this),jK(t,e),ms(e),R(e,function(e){var t=e.close,n=[[`<`,`≤`][t[1]],[`>`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function jK(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var MK=function(e){M(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=pt(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),R(o.viewPieceList,function(o){var s=o.piece,u=new To;u.onclick=B(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new Xu({style:ch(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:K(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),a_(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:sK(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return oK(e,this.api,e.itemSize);var n=t.align;return n&&n!==`auto`||(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new To,o=this.visualMapModel.textStyleModel;a.add(new Xu({style:ch(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=z(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=eS(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=P(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,R(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(iK);function NK(e){e.registerComponentModel(kK),e.registerComponentView(MK),DK(e)}function PK(e){jD(OK),jD(NK)}var FK=function(e){M(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataset`,t}return t.prototype.init=function(t,n,r){e.prototype.init.call(this,t,n,r),this._sourceManager=new Gy(this),Ky(this)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),Ky(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type=`dataset`,t.defaultOption={seriesLayoutBy:yd},t}(v_),IK=function(e){M(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataset`,t}return t.type=`dataset`,t}(kb);function LK(e){e.registerComponentModel(FK),e.registerComponentView(IK)}var RK=e(i(),1),zK=r();jD([sk,pN,fM,IN,kj,WL,NL,tP,dB,nV,rL,LB,AB,Mz,ZV,nW,mG,GG,wU,uW,LK,PK,HW,MW,jz,CA]);var BK=`wildo`;function VK(e){return e.length}function HK(e,t){return typeof document>`u`?t:getComputedStyle(document.documentElement).getPropertyValue(e).trim()||t}function UK(){if(typeof document>`u`)return!1;let e=document.documentElement;return e.classList.contains(`dark`)||e.getAttribute(`data-theme`)===`dark`}function WK(e,t){return GK(HK(e,t))}function GK(e){return e.startsWith(`#`)||e.startsWith(`rgb`)?e:/^[\d.]+\s+[\d.]+\s+[\d.]+$/.test(e)?`oklch(${e})`:/^\d/.test(e)?`hsl(${e.replace(/\s+/g,`, `)})`:e}function KK(){return{...v}}function qK(e){let t=e??v,n=UK(),r=GK(HK(`--background`,`#ffffff`)),i=GK(HK(`--foreground`,`#0a0a0a`)),a=GK(HK(`--muted-foreground`,`#737373`)),o=GK(HK(`--border`,`#e5e5e5`)),s=GK(HK(`--surface-raised`,HK(`--popover`,`#ffffff`))),c=GK(HK(`--surface-raised-foreground`,HK(`--popover-foreground`,`#0a0a0a`))),l=HK(`--radius`,`0.5rem`),u=parseFloat(l)*(l.includes(`rem`)?16:1),d=n?t.colorShadeDark:t.colorShadeLight,f=_(),p=y(VK(f),{shade:d,palette:f}),m=t.axis.splitLineType===`none`?{show:!1}:{lineStyle:{color:o,type:t.axis.splitLineType}},h=t.typography??v.typography,g=h.axisLabelFontSize;return{color:p,backgroundColor:`transparent`,textStyle:{color:i,fontFamily:`inherit`},title:{textStyle:{color:i,fontSize:h.titleFontSize,fontWeight:h.titleFontWeight},subtextStyle:{color:a,fontSize:h.subtitleFontSize}},legend:{textStyle:{color:a,fontSize:h.legendFontSize}},tooltip:{backgroundColor:s,borderColor:o,borderWidth:t.tooltip.borderWidth,borderRadius:u,textStyle:{color:c,fontSize:h.tooltipFontSize},extraCssText:t.tooltip.extraCss},axisPointer:{lineStyle:{color:o},crossStyle:{color:o}},categoryAxis:{axisLine:{show:t.axis.showAxisLine,lineStyle:{color:o}},axisTick:{show:t.axis.showTicks,lineStyle:{color:o}},axisLabel:{color:a,fontSize:g},splitLine:m},valueAxis:{axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:a,fontSize:g},nameTextStyle:{color:a,fontSize:h.axisNameFontSize},splitLine:m},timeAxis:{axisLine:{show:t.axis.showAxisLine,lineStyle:{color:o}},axisTick:{show:t.axis.showTicks,lineStyle:{color:o}},axisLabel:{color:a,fontSize:g},splitLine:m},line:{smooth:!1,symbol:`circle`,symbolSize:t.series.pointSize,lineStyle:{width:t.series.lineWidth}},bar:{itemStyle:{borderRadius:t.series.barBorderRadius},emphasis:{itemStyle:{color:`inherit`}}},pie:{itemStyle:{borderColor:r,borderWidth:t.series.pieBorderWidth},label:{color:i,textBorderWidth:0,textBorderColor:`transparent`}},scatter:{symbolSize:t.series.pointSize},radar:{axisLine:{lineStyle:{color:o}},splitLine:{lineStyle:{color:o}},splitArea:{show:!1}},gauge:{axisLine:{lineStyle:{color:[[1,o]]}}},dataZoom:{backgroundColor:`transparent`,borderColor:o,fillerColor:GK(HK(`--muted`,`#f5f5f5`)),handleColor:a,textStyle:{color:a}}}}function JK(e){dw(BK,qK(e))}function YK(){return BK}function XK(e){let t=UK(),n=e??v,r=t?n.colorShadeDark:n.colorShadeLight,i=_();return y(VK(i),{shade:r,palette:i})}function ZK(e){let t=(0,RK.useRef)(void 0),n=UK();(0,RK.useMemo)(()=>{JK(e)},[e,n]);let r=(0,RK.useCallback)(()=>{JK(e)},[e]),i=(0,RK.useCallback)(()=>{clearTimeout(t.current),t.current=setTimeout(r,50)},[r]);return(0,RK.useEffect)(()=>{r();let e=new MutationObserver(()=>{i()});return e.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`,`data-theme`,`style`]}),()=>{e.disconnect(),clearTimeout(t.current)}},[r,i]),{themeName:BK}}var QK={[f.INFO]:{token:`--info`,fallback:`#3b82f6`},[f.SUCCESS]:{token:`--success`,fallback:`#22c55e`},[f.WARNING]:{token:`--warning`,fallback:`#f59e0b`},[f.ERROR]:{token:`--destructive`,fallback:`#ef4444`},[f.NEUTRAL]:{token:`--muted-foreground`,fallback:`#737373`}};function $K(e){let{token:t,fallback:n}=QK[x(e)];return WK(t,n)}function eq(e,t,n){let r={},i={},a={},s=t(e.dataQuery.mainResourceType),c=s?.mainSchema;if(!c)return{colors:r,order:i,labels:a};let l={...u(c)};for(let e of d(s?.inheritenceSchemaDefinition))for(let[t,n]of Object.entries(u(e)??{}))t in l||(l[t]=n);for(let t of e.dataQuery.dimensions){let s=l[t.field];if(!s)continue;let c=o(s);c.length>0&&(i[t.ref]=c),c.length>0&&n&&(a[t.ref]=Object.fromEntries(c.map(r=>[r,n(e.dataQuery.mainResourceType,t.field,r,s)])));let u=k(s);if(!u)continue;let d={};for(let[e,t]of Object.entries(u.values??{})){let n=t?.color??u.defaultColor;n&&(d[e]=$K(n))}let f=u.defaultColor?$K(u.defaultColor):void 0;(Object.keys(d).length>0||f)&&(r[t.ref]={values:d,defaultColor:f})}return{colors:r,order:i,labels:a}}function tq(e){return e.definition.dataQuery.dimensions[0]?.ref??``}function nq(e,t){return e.map(e=>e[t])}function rq(e,t){return e.map(e=>{let n=e[t];if(n==null)return null;let r=typeof n==`number`?n:Number(n);return Number.isFinite(r)?r:null})}function iq(e,t,n){return e.style?.color??n[t%n.length]}function aq(e,t,n){let r=new Map(n.map((e,t)=>[e,t]));return e.map((e,t)=>({row:e,originalIndex:t})).sort((e,n)=>{let i=r.get(String(e.row[t]))??1/0,a=r.get(String(n.row[t]))??1/0;return i===a?e.originalIndex-n.originalIndex:i-a}).map(({row:e})=>e)}function oq(e,t,n){let r=new Set;for(let n of e){let e=n[t];e!=null&&r.add(String(e))}let i=Array.from(r);if(n.splitConfig?.exclude){let e=new Set(n.splitConfig.exclude);i=i.filter(t=>!e.has(t))}if(n.splitConfig?.order){let e=new Map(n.splitConfig.order.map((e,t)=>[e,t]));i.sort((t,n)=>{let r=e.get(t)??1/0,i=e.get(n)??1/0;return r===i?t.localeCompare(n):r-i})}return i}function sq(e,t,n,r,i){return n.splitConfig?.colorMap?.[e]??i?.values[e]??i?.defaultColor??r[t%r.length]}function cq(e,t,n,r){if(n?.definition.i18n?.splitValueKeys){let t=n.definition.i18n.splitValueKeys[e];if(t){let e=n.t(t);if(e!==t)return e}}return t.splitConfig?.labelMap?.[e]??(r?n?.dimensionEnumLabels?.[r]?.[e]:void 0)??e}function lq(e,t){if(e.nameKey&&t){let n=t(e.nameKey);if(n!==e.nameKey)return n}return e.name}function uq(e,t,n,r){let i=nq(e,t);return{type:`category`,data:r?i.map(e=>r[String(e)]??e):i,axisLabel:{hideOverlap:n?.axis.hideOverlap??!0}}}function dq(e,t){if(t.length===0)return!1;let n=new Map(e.definition.dataQuery.measures.map(e=>[e.ref,e]));return t.every(e=>{let t=n.get(e.measureRef)?.aggregate;return t===a.COUNT||t===a.COUNT_DISTINCT})}function fq(e,t,n){return{type:`value`,name:e,nameLocation:t?.axis.yAxisNameLocation??`middle`,nameGap:t?.axis.yAxisNameGap??50,...n?.integerValued?{minInterval:1}:{}}}function pq(e,t){let n=e.response.queryMeta;return(t===void 0?void 0:n?.dimensionTimezones?.[t])??n?.resolvedTimezone??`UTC`}function mq(e,t,n){if(e==null)return``;let r=e instanceof Date?e:new Date(e);if(isNaN(r.getTime()))return String(e);let i=n||`UTC`,a=new Intl.DateTimeFormat(`en-US`,{timeZone:i,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hourCycle:`h23`}).formatToParts(r),o=e=>a.find(t=>t.type===e)?.value??``,s=o(`year`),c=o(`month`),l=o(`day`),u=o(`hour`),d=o(`minute`);switch(t){case h.YEAR:return s;case h.QUARTER:return`${s}-Q${Math.floor((Number(c)-1)/3)+1}`;case h.MONTH:return`${s}-${c}`;case h.HOUR:return`${s}-${c}-${l} ${u}:00`;case h.MINUTE:return`${s}-${c}-${l} ${u}:${d}`;case h.WEEK:case h.DAY:default:return`${s}-${c}-${l}`}}function hq(e,t){if(e!==h.DAY&&e!==h.WEEK)return;let n=new Intl.DateTimeFormat(t,{month:`short`,day:`numeric`,timeZone:`UTC`});return e=>{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);return t?n.format(new Date(Date.UTC(Number(t[1]),Number(t[2])-1,Number(t[3])))):e}}function gq(e,t){let n=new Set,r=[];for(let i of e){let e=i[t];if(e==null)continue;let a=e instanceof Date?e.toISOString():String(e);n.has(a)||(n.add(a),r.push(a))}return r}function _q(e,t,n,r,i,a){let o=gq(e,t),s=hq(n,i);return{type:`category`,data:o.map(e=>mq(e,n,r)),axisLabel:{hideOverlap:a?.axis.hideOverlap??!0,...s?{formatter:s}:{}}}}function vq(e){return!!e._filled}function yq(e){return e.some(vq)}function bq(e,t,n=!1){let r=e?.responsive,i=r?.smallMaxWidth??400,a=r?.mediumMaxWidth??799,o=r?.smallGridPadding??{top:20,right:10,bottom:20,left:30},s=r?.mediumGridPadding??{left:50,right:20,bottom:40},c=r?.hideLegendOnSmall??!0;return[{query:{maxWidth:i},option:{legend:{show:!c},...t?{grid:o,xAxis:{axisLabel:{rotate:r?.smallAxisLabelRotate??45,fontSize:r?.smallFontSize??10}}}:{},...n&&c?{series:[{label:{position:`inside`,formatter:`{d}%`},labelLine:{show:!1}}]}:{}}},{query:{minWidth:i,maxWidth:a},option:{legend:{orient:`horizontal`,bottom:0},...t?{grid:s,xAxis:{axisLabel:{fontSize:r?.mediumFontSize??11}}}:{}}}]}function xq(e,t){let n=t.style;n&&(n.lineWidth!=null&&(e.lineStyle={...e.lineStyle||{},width:n.lineWidth}),n.lineType&&(e.lineStyle={...e.lineStyle||{},type:n.lineType}),n.areaOpacity!=null&&(e.areaStyle={opacity:n.areaOpacity}),n.smooth!=null&&(e.smooth=n.smooth),n.barWidth!=null&&(e.barWidth=n.barWidth),n.opacity!=null&&(e.opacity=n.opacity),n.pointSize!=null&&(e.symbolSize=n.pointSize,n.pointSize===0&&(e.showSymbol=!1)),n.pointShape&&(e.symbol=n.pointShape),n.connectNulls!=null&&(e.connectNulls=n.connectNulls),n.step&&(e.step=n.step),(n.showLabel!=null||n.labelPosition||n.labelFormatter)&&(e.label={...e.label||{},...n.showLabel==null?{}:{show:n.showLabel},...n.labelPosition?{position:n.labelPosition}:{},...n.labelFormatter?{formatter:n.labelFormatter}:{}}),n.emphasisScale!=null&&(e.emphasis={...e.emphasis||{},scale:n.emphasisScale}),n.markLines?.length&&(e.markLine={silent:!0,data:n.markLines.map(e=>{if(e.type)return{type:e.type,...e.label?{label:{formatter:e.label}}:{},...e.color?{lineStyle:{color:e.color,type:e.lineType??`dashed`}}:{lineStyle:{type:e.lineType??`dashed`}}};let t={};return e.yValue!=null&&(t.yAxis=e.yValue),e.xValue!=null&&(t.xAxis=e.xValue),e.label&&(t.label={formatter:e.label}),t.lineStyle={color:e.color,type:e.lineType??`dashed`},t})}),n.markPoints?.length&&(e.markPoint={data:n.markPoints.map(e=>({...e.type?{type:e.type}:{},...e.label?{label:{formatter:e.label}}:{},...e.symbol?{symbol:e.symbol}:{},...e.symbolSize?{symbolSize:e.symbolSize}:{}}))}))}var Sq=class{supportedTypes=[g.BAR,g.HORIZONTAL_BAR,g.GROUPED_BAR,g.STACKED_BAR,g.WATERFALL];build(e,t){let n=tq(e),r=e.definition.chartType,i=r===g.HORIZONTAL_BAR,a=r===g.STACKED_BAR,o=r===g.WATERFALL,s=e.definition.chartTypeConfig??{};if(o)return this.buildWaterfall(e,t,n,s);let c=fq(e.definition.i18n?.yAxisLabelKey?(()=>{let t=e.t(e.definition.i18n.yAxisLabelKey);return t===e.definition.i18n.yAxisLabelKey?void 0:t})():void 0,e.chartStylePreset,{integerValued:dq(e,t)}),l=nq(e.response.data,n).map(String),u=[...new Set(l)],d=e.definition.dataQuery.dimensions[0],f=!!d?.timeGranularity,p=t=>mq(t,d?.timeGranularity,pq(e,d?.ref)),m=t.some(e=>e.splitByDimension),h=f?hq(d?.timeGranularity,e.locale):void 0,_={hideOverlap:e.chartStylePreset.axis.hideOverlap??!0,...h?{formatter:h}:{}},v=m?{type:`category`,data:f?u.map(p):u.map(t=>e.dimensionEnumLabels?.[n]?.[t]??t),axisLabel:_}:f?{type:`category`,data:nq(e.response.data,n).map(p),axisLabel:_}:uq(e.response.data,n,e.chartStylePreset,e.dimensionEnumLabels?.[n]),y=[];for(let r=0;r<t.length;r++){let i=t[r];if(i.splitByDimension){let t=oq(e.response.data,i.splitByDimension,i);for(let r=0;r<t.length;r++){let o=t[r],c=new Map;for(let t of e.response.data)if(String(t[i.splitByDimension])===o){let e=String(t[n]),r=t[i.measureRef];c.set(e,typeof r==`number`?r:Number(r)||0)}let l=u.map(e=>c.get(e)??null),d={type:`bar`,name:cq(o,i,e,i.splitByDimension),data:l,itemStyle:{color:sq(o,r,i,e.colorPalette,e.dimensionEnumColors[i.splitByDimension])},stack:a?`stack`:void 0,...s.barGap==null?{}:{barGap:s.barGap},...s.barCategoryGap==null?{}:{barCategoryGap:s.barCategoryGap}};xq(d,i),y.push(d)}}else{let t=rq(e.response.data,i.measureRef),o=e.dimensionEnumColors[n],c=o?t.map((e,t)=>{let n=o.values[l[t]]??o.defaultColor;return n==null?e:{value:e,itemStyle:{color:n}}}):t,u={type:`bar`,name:lq(i,e.t),data:c,itemStyle:{color:iq(i,r,e.colorPalette)},stack:a?`stack`:void 0,yAxisIndex:i.yAxisIndex,...s.barGap==null?{}:{barGap:s.barGap},...s.barCategoryGap==null?{}:{barCategoryGap:s.barCategoryGap}};xq(u,i),y.push(u)}}return{series:y,xAxis:i?c:v,yAxis:i?v:c}}buildWaterfall(e,t,n,r){let i=t[0];if(!i)return{series:[]};let a=e.definition.dataQuery.dimensions[0],o=nq(e.response.data,n),s=a?.timeGranularity?o.map(t=>mq(t,a.timeGranularity,pq(e,a.ref))):o,c=a?.timeGranularity?hq(a.timeGranularity,e.locale):void 0,l=rq(e.response.data,i.measureRef),u=[],d=[],f=[],p=0;for(let e=0;e<l.length;e++){let t=l[e];t>=0?(u.push(p),d.push(t),f.push(`-`)):(u.push(p+t),d.push(`-`),f.push(Math.abs(t))),p+=t}let m=e.colorPalette,h=r.waterfall,g=h?.gainColor??m[0]??`#5470c6`,_=h?.lossColor??`#ee6666`,v=(h?.gainLabelKey?(()=>{let t=e.t(h.gainLabelKey);return t===h.gainLabelKey?void 0:t})():void 0)??h?.gainLabel??`Increase`,y=(h?.lossLabelKey?(()=>{let t=e.t(h.lossLabelKey);return t===h.lossLabelKey?void 0:t})():void 0)??h?.lossLabel??`Decrease`;return{series:[{type:`bar`,name:`__waterfall_base`,stack:`waterfall`,data:u,itemStyle:{color:`transparent`,borderColor:`transparent`},emphasis:{itemStyle:{color:`transparent`,borderColor:`transparent`}},tooltip:{show:!1},legendHoverLink:!1},{type:`bar`,name:v,stack:`waterfall`,data:d,itemStyle:{color:g}},{type:`bar`,name:y,stack:`waterfall`,data:f,itemStyle:{color:_}}],xAxis:{type:`category`,data:s,axisLabel:{hideOverlap:e.chartStylePreset.axis.hideOverlap??!0,...c?{formatter:c}:{}}},yAxis:{type:`value`}}}},Cq=class{supportedTypes=[g.LINE,g.AREA,g.STACKED_AREA,g.STEP_LINE];_t;build(e,t){this._t=e.t;let n=tq(e),r=e.definition.chartType,i=r===g.AREA||r===g.STACKED_AREA,a=r===g.STACKED_AREA,o=r===g.STEP_LINE,s=e.definition.chartTypeConfig??{},c=e.definition.dataQuery.dimensions[0],l=!!c?.timeGranularity,u=nq(e.response.data,n).map(String),d=[...new Set(u)],f=t.some(e=>e.splitByDimension)?d:u,p=hq(c?.timeGranularity,e.locale),m=l?{type:`category`,data:f.map(t=>mq(t,c?.timeGranularity,pq(e,c?.ref))),axisLabel:{hideOverlap:e.chartStylePreset.axis.hideOverlap??!0,...p?{formatter:p}:{}}}:uq(e.response.data,n,e.chartStylePreset,e.dimensionEnumLabels?.[n]),h=fq(e.definition.i18n?.yAxisLabelKey?(()=>{let t=e.t(e.definition.i18n.yAxisLabelKey);return t===e.definition.i18n.yAxisLabelKey?void 0:t})():void 0,e.chartStylePreset,{integerValued:dq(e,t)}),_=yq(e.response.data),v=[];for(let r=0;r<t.length;r++){let c=t[r];if(c.splitByDimension){let t=oq(e.response.data,c.splitByDimension,c);for(let r=0;r<t.length;r++){let l=t[r],u=sq(l,r,c,e.colorPalette,e.dimensionEnumColors[c.splitByDimension]),f=cq(l,c,e,c.splitByDimension),{realValues:p,filledValues:m}=this.buildCategorySplitDataWithOverlay(e,c,n,l,d),h=this.buildLineItem(f,p,u,i,a,o,c,s);if(v.push(h),m.some(e=>e!==null)){let e=this.buildDashedOverlayItem(f,m,u,i,a,o,c,s);v.push(e)}}}else{let t=iq(c,r,e.colorPalette),l=lq(c,e.t);if(_){let{realValues:r,filledValues:u}=this.buildDensifiedValueSeries(e.response.data,n,c.measureRef,d),f=this.buildLineItem(l,r,t,i,a,o,c,s);if(f.yAxisIndex=c.yAxisIndex,f.connectNulls=c.style?.connectNulls??!1,v.push(f),u.some(e=>e!==null)){let e=this.buildDashedOverlayItem(l,u,t,i,a,o,c,s);e.yAxisIndex=c.yAxisIndex,e.connectNulls=!1,v.push(e)}}else{let n=rq(e.response.data,c.measureRef),r=this.buildLineItem(l,n,t,i,a,o,c,s);r.yAxisIndex=c.yAxisIndex,v.push(r)}}}return{series:v,xAxis:m,yAxis:h}}buildLineItem(e,t,n,r,i,a,o,s){let c=s.symbolVisibilityThreshold??30,l={type:`line`,name:e,data:t,itemStyle:{color:n},lineStyle:{color:n},showSymbol:t.length<=c};return this.applyLineVariant(l,r,i,a,o),xq(l,o),l}buildDashedOverlayItem(e,t,n,r,i,a,o,s){let c=s.densifiedOverlay,l=s.densifiedOverlayNameKey?(()=>{let e=this._t?.(s.densifiedOverlayNameKey);return e&&e!==s.densifiedOverlayNameKey?e:`(filled)`})():`(filled)`,u={type:`line`,name:e?`${e} ${l}`:l,data:t,itemStyle:{color:n,opacity:c?.itemOpacity??.4},lineStyle:{color:n,type:c?.lineType??`dashed`,opacity:c?.lineOpacity??.5,width:c?.lineWidth??1},showSymbol:c?.showSymbol??!1,legendHoverLink:!1,emphasis:{disabled:!0}};return(r||i)&&(u.areaStyle={opacity:c?.areaOpacity??.1}),i&&(u.stack=`stack`),a&&(u.step=o.style?.step??`start`),u}buildDensifiedValueSeries(e,t,n,r){let i=new Map,a=new Map;for(let r of e){let e=String(r[t]),o=r[n];i.set(e,o==null?null:typeof o==`number`?o:Number(o)),a.set(e,vq(r))}let o=[],s=[];for(let e=0;e<r.length;e++){let t=r[e],n=i.get(t)??null;if(a.get(t)??!1)o.push(null),s.push(n);else{o.push(n);let t=e>0&&(a.get(r[e-1])??!1),i=e<r.length-1&&(a.get(r[e+1])??!1);s.push(t||i?n:null)}}return{realValues:o,filledValues:s}}buildCategorySplitDataWithOverlay(e,t,n,r,i){let a=new Map,o=new Map;for(let i of e.response.data)if(String(i[t.splitByDimension])===r){let e=String(i[n]),r=i[t.measureRef];a.set(e,typeof r==`number`?r:Number(r)||0),o.set(e,vq(i))}let s=[],c=[];for(let e=0;e<i.length;e++){let t=i[e],n=a.get(t)??null;if(o.get(t)??!1)s.push(null),c.push(n);else{s.push(n);let t=e>0&&(o.get(i[e-1])??!1),r=e<i.length-1&&(o.get(i[e+1])??!1);c.push(t||r?n:null)}}return{realValues:s,filledValues:c}}applyLineVariant(e,t,n,r,i){t&&(e.areaStyle={opacity:i.style?.areaOpacity??.3}),n&&(e.stack=`stack`,e.areaStyle={opacity:i.style?.areaOpacity??.3}),r&&(e.step=i.style?.step??`start`)}},wq=class{supportedTypes=[g.PIE,g.DONUT];build(e,t){let n=tq(e),r=e.definition.chartType===g.DONUT,i=e.definition.chartTypeConfig??{},a=t[0];if(!a)return{series:[]};let o=i.itemNameFallbackKey?(()=>{let t=e.t(i.itemNameFallbackKey);return t===i.itemNameFallbackKey?void 0:t})():void 0,s=e.dimensionEnumColors[n],c=e.response.data.map((t,r)=>{let i=o?`${o} ${r}`:`Item ${r}`,c=String(t[n]??i),l=typeof t[a.measureRef]==`number`?t[a.measureRef]:Number(t[a.measureRef])||0;return{name:cq(c,a,e,n),value:l,_rawName:c,itemStyle:{color:sq(c,r,a,e.colorPalette,s)}}});if(a.splitConfig?.exclude){let e=new Set(a.splitConfig.exclude);c=c.filter(t=>!e.has(t._rawName))}if(a.splitConfig?.order){let e=new Map(a.splitConfig.order.map((e,t)=>[e,t]));c.sort((t,n)=>{let r=e.get(t._rawName)??1/0,i=e.get(n._rawName)??1/0;return r===i?t._rawName.localeCompare(n._rawName):r-i})}let l=c.map(({_rawName:e,...t})=>t),u=r?[`40%`,`70%`]:`70%`,d=i.radius??u,f=e.definition.appearance?.emphasisShadow,p=e.chartStylePreset.emphasis;return{series:[{type:`pie`,name:lq(a,e.t),data:l,radius:d,...i.center?{center:i.center}:{},...i.startAngle==null?{}:{startAngle:i.startAngle},...i.minAngle==null?{}:{minAngle:i.minAngle},...i.roseType?{roseType:i.roseType}:{},...i.borderWidth!=null||i.borderColor?{itemStyle:{...i.borderWidth==null?{}:{borderWidth:i.borderWidth},...i.borderColor?{borderColor:i.borderColor}:{}}}:{},avoidLabelOverlap:!0,labelLayout:{hideOverlap:!0},label:{show:i.showLabel??!0,formatter:i.labelFormatter??`{b}: {d}%`,...i.labelPosition?{position:i.labelPosition}:{}},labelLine:{show:i.showLabel??!0},emphasis:{scale:!1,itemStyle:{color:`inherit`,shadowBlur:f?.blur??p?.shadowBlur??10,shadowOffsetX:f?.offsetX??p?.shadowOffsetX??0,shadowColor:f?.color??p?.shadowColor??`rgba(0, 0, 0, 0.2)`}}}]}}},Tq=class{supportedTypes=[g.SCATTER,g.BUBBLE];build(e,t){let n=e.definition.dataQuery.dimensions,r=n[0]?.ref??``,i=e.definition.chartType===g.BUBBLE,a=e.definition.chartTypeConfig??{},[o,s]=a.bubbleSizeRange??[4,60],c=n[0],l=c?.timeGranularity!=null,u=c?.timeGranularity,d=pq(e,r),f=[];for(let n=0;n<t.length;n++){let c=t[n],p=e.response.data.map(t=>{let n=[l?mq(t[r],u,d):t[r],t[c.measureRef]];if(i&&e.definition.dataQuery.measures.length>1){let r=e.definition.dataQuery.measures[1]?.ref;r&&n.push(t[r])}return n}),m={type:`scatter`,name:lq(c,e.t),data:p,itemStyle:{color:iq(c,n,e.colorPalette)},...a.symbolShape?{symbol:a.symbolShape}:{},symbolSize:i?e=>Math.min(Math.max(Number(e[2])||10,o),s):c.style?.pointSize??8};f.push(m)}let p=!l&&e.response.data.length>0&&e.response.data.every(e=>{let t=e[r];return typeof t==`number`||typeof t==`string`&&t.trim()!==``&&Number.isFinite(Number(t))});return{series:f,xAxis:l?_q(e.response.data,r,u,d,e.locale,e.chartStylePreset):p?{type:`value`}:uq(e.response.data,r,e.chartStylePreset,e.dimensionEnumLabels?.[r]),yAxis:fq(void 0,e.chartStylePreset,{integerValued:dq(e,t)})}}},Eq=class{supportedTypes=[g.GAUGE];build(e,t){let n=t[0];if(!n)return{series:[]};let r=e.definition.chartTypeConfig??{},i=lq(n,e.t),a=e.response.data[0];return{series:[{type:`gauge`,name:i,data:[{value:a&&Number(a[n.measureRef])||0,name:i}],min:r.min??0,max:r.max??100,...r.splitNumber==null?{}:{splitNumber:r.splitNumber},...r.radius?{radius:r.radius}:{},...r.startAngle==null?{}:{startAngle:r.startAngle},...r.endAngle==null?{}:{endAngle:r.endAngle},...r.pointer?{pointer:{...r.pointer.show==null?{}:{show:r.pointer.show},...r.pointer.length?{length:r.pointer.length}:{},...r.pointer.width==null?{}:{width:r.pointer.width}}}:{},...r.axisLineWidth||r.axisLineColors?{axisLine:{lineStyle:{...r.axisLineWidth?{width:r.axisLineWidth}:{},...r.axisLineColors?{color:r.axisLineColors}:{}}}}:{},detail:{formatter:r.detailFormatter??`{value}`,fontSize:r.detailFontSize??20},progress:{show:r.showProgress??!0}}]}}},Dq=class{supportedTypes=[g.FUNNEL];build(e,t){let n=tq(e),r=t[0];if(!r)return{series:[]};let i=e.definition.chartTypeConfig??{},a=e.response.data.map(t=>({name:cq(String(t[n]??``),r,e,n),value:typeof t[r.measureRef]==`number`?t[r.measureRef]:Number(t[r.measureRef])||0})),o=i.sort??`descending`;return{series:[{type:`funnel`,name:lq(r,e.t),data:a,left:i.left??`10%`,width:i.width??`80%`,label:{show:i.showLabel??!0,position:i.labelPosition??`inside`},gap:i.gap??2,sort:o,...i.funnelAlign?{funnelAlign:i.funnelAlign}:{},...i.minSize?{minSize:i.minSize}:{},...i.maxSize?{maxSize:i.maxSize}:{}}]}}},Oq=class{supportedTypes=[g.RADAR];build(e,t){let n=tq(e),r=e.definition.chartTypeConfig??{},i=e.response.data.map(r=>({name:cq(String(r[n]??``),t[0],e,n)})),a=[];for(let n=0;n<t.length;n++){let i=t[n],o=e.response.data.map(e=>{let t=e[i.measureRef];return typeof t==`number`?t:Number(t)||0});a.push({value:o,name:lq(i,e.t),areaStyle:{opacity:r.areaOpacity??.2},lineStyle:{color:iq(i,n,e.colorPalette)},itemStyle:{color:iq(i,n,e.colorPalette)}})}return{series:[{type:`radar`,data:a}],radar:{indicator:i,shape:r.shape??`polygon`,...r.center?{center:r.center}:{},...r.radius?{radius:r.radius}:{},...r.startAngle==null?{}:{startAngle:r.startAngle},...r.nameGap==null?{}:{nameGap:r.nameGap},splitArea:{show:r.showSplitArea??!1}}}}},kq=class{supportedTypes=[g.SANKEY];build(e,t){let n=t[0];if(!n)return{series:[]};let r=e.definition.chartTypeConfig??{},i=e.definition.dataQuery.dimensions,a=i[0]?.ref??``,o=i[1]?.ref??a,s=n.measureRef,c=new Set,l=[];for(let t of e.response.data){let e=String(t[a]??``),n=String(t[o]??``),r=Number(t[s])||0;c.add(e),c.add(n),l.push({source:e,target:n,value:r})}let u=Array.from(c).map(e=>({name:e})),d={type:`sankey`,name:lq(n,e.t),layout:`none`,emphasis:{focus:r.emphasisFocus??`adjacency`},...r.nodeWidth==null?{}:{nodeWidth:r.nodeWidth},...r.nodeGap==null?{}:{nodeGap:r.nodeGap},...r.orient?{orient:r.orient}:{},...r.draggable==null?{}:{draggable:r.draggable},...r.labelPosition?{label:{position:r.labelPosition}}:{},data:u,links:l};return n.style?.color&&(d.itemStyle={color:n.style.color}),{series:[d]}}},Aq=class{supportedTypes=[g.SUNBURST,g.TREEMAP];build(e,t){let n=t[0];if(!n)return{series:[]};let r=e.definition.chartTypeConfig??{},i=e.definition.dataQuery.dimensions,a=n.measureRef,o=i.map(e=>e.ref),s=this.buildTree(e.response.data,o,a),c=e.definition.chartType===g.SUNBURST,l={type:c?`sunburst`:`treemap`,name:lq(n,e.t),data:s};if(c){let[e,t]=r.sunburstRadius??[`15%`,`90%`];l.radius=[e,t],l.sort=void 0,l.emphasis={focus:r.sunburstEmphasisFocus??`ancestor`};let n=parseFloat(e)||15,i=(parseFloat(t)||90)-n,a=`${Math.round(n+i*.33)}%`,o=`${Math.round(n+i*.73)}%`,s=r.sunburstLevels;l.levels=[{},{r0:e,r:a,label:{rotate:s?.level1LabelRotate??`tangential`}},{r0:a,r:o,label:{align:s?.level2LabelAlign??`right`}},{r0:o,r:t,label:{position:s?.level3LabelPosition??`outside`,padding:s?.level3LabelPadding??3,silent:!1}}]}else l.leafDepth=r.treemapLeafDepth??(o.length>1?2:1),l.visibleMin=r.treemapVisibleMin??300,l.label={show:r.treemapShowLabel??!0,formatter:r.treemapLabelFormatter??`{b}`},l.upperLabel={show:r.treemapShowUpperLabel??!0,height:r.treemapUpperLabelHeight??30},l.breadcrumb={show:r.showBreadcrumb??!0};return{series:[l]}}buildTree(e,t,n){if(t.length===0)return[];if(t.length===1)return e.map(e=>({name:String(e[t[0]]??``),value:Number(e[n])||0}));let r=new Map;for(let i of e){let e=null;for(let a=0;a<t.length;a++){let o=String(i[t[a]]??``),s=a===t.length-1;if(a===0){if(!r.has(o)){let e={name:o,children:[]};r.set(o,{node:e,childMap:new Map})}e=r.get(o).node}else if(e){if(e.children||(e.children=[]),s)e.children.push({name:o,value:Number(i[n])||0});else{let t=e.children.find(e=>e.name===o);if(t)e=t;else{let t={name:o,children:[]};e.children.push(t),e=t}}}}}return Array.from(r.values()).map(e=>e.node)}},jq=class{supportedTypes=[g.HEATMAP];build(e,t){let n=t[0];if(!n)return{series:[]};let r=e.definition.chartTypeConfig??{},i=e.definition.dataQuery.dimensions,a=i[0]?.ref??``,o=i[1]?.ref??a,s=n.measureRef,c=[...new Set(e.response.data.map(e=>String(e[a]??``)))],l=[...new Set(e.response.data.map(e=>String(e[o]??``)))],u=new Map(c.map((e,t)=>[e,t])),d=new Map(l.map((e,t)=>[e,t])),f=1/0,p=-1/0,m=[];for(let t of e.response.data){let e=u.get(String(t[a]??``))??0,n=d.get(String(t[o]??``))??0,r=Number(t[s])||0;m.push([e,n,r]),r<f&&(f=r),r>p&&(p=r)}f===1/0&&(f=0),p===-1/0&&(p=0),f===p&&(p=f+1);let h=e.definition.appearance?.emphasisShadow,g=e.chartStylePreset.emphasis,_={type:`heatmap`,name:n.name,data:m,label:{show:r.showLabel??!0},emphasis:{itemStyle:{shadowBlur:h?.blur??g?.shadowBlur??10,shadowColor:h?.color??g?.shadowColor??`rgba(0, 0, 0, 0.5)`}}},v=r.visualMapOrient??`horizontal`,y=r.visualMapPosition??`bottom`,b=r.showSplitArea??!0;return{series:[_],xAxis:{type:`category`,data:c,splitArea:{show:b}},yAxis:{type:`category`,data:l,splitArea:{show:b}},visualMap:{min:r.visualMapMin??f,max:r.visualMapMax??p,calculable:r.visualMapCalculable??!0,orient:v,...r.visualMapInRange?{inRange:{color:r.visualMapInRange}}:{},...v===`horizontal`?{left:`center`,[y]:0}:{top:`center`,[y]:0}}}}},Mq=class{supportedTypes=[g.BOXPLOT];build(e,t){let n=t[0];if(!n)return{series:[]};let r=e.definition.chartTypeConfig??{},i=tq(e),a=nq(e.response.data,i),o=e.definition.dataQuery.measures,s=o.length>=5,c;if(s){let t=e=>o.find(t=>e.some(e=>t.ref.toLowerCase().endsWith(`_${e}`)||t.label?.toLowerCase()===e)),n=(()=>{let e=t([`min`]),n=t([`q1`,`lower_quartile`]),r=t([`median`,`med`,`p50`]),i=t([`q3`,`upper_quartile`]),a=t([`max`]);return e&&n&&r&&i&&a?[e,n,r,i,a]:o.slice(0,5)})();c=e.response.data.map(e=>n.map(t=>Number(e[t.ref])||0))}else c=e.response.data.map(e=>{let t=e[n.measureRef];if(Array.isArray(t))return this.computeBoxplotStats(t.map(Number).filter(e=>!isNaN(e)));let r=Number(t)||0;return[r,r,r,r,r]});let l=lq(n,e.t);return{series:[{type:`boxplot`,name:l,data:c}],xAxis:{type:`category`,data:a,boundaryGap:r.boundaryGap??!0,axisLabel:{hideOverlap:e.chartStylePreset.axis.hideOverlap??!0}},yAxis:{type:`value`,name:l}}}computeBoxplotStats(e){if(e.length===0)return[0,0,0,0,0];let t=[...e].sort((e,t)=>e-t),n=t.length,r=t[0],i=t[n-1],a=this.percentile(t,50);return[r,this.percentile(t,25),a,this.percentile(t,75),i]}percentile(e,t){let n=t/100*(e.length-1),r=Math.floor(n),i=Math.ceil(n);if(r===i)return e[r];let a=n-r;return e[r]+a*(e[i]-e[r])}},Nq=class{supportedTypes=[g.PARALLEL];build(e,t){let n=t[0];if(!n)return{series:[]};let r=e.definition.chartTypeConfig??{},i=e.definition.dataQuery.measures,a=tq(e),o=i.map((e,t)=>({dim:t,name:e.label||e.ref})),s=e.response.data.map(e=>i.map(t=>Number(e[t.ref])||0)),c=e.response.data.map(e=>String(e[a]??``)),l=iq(n,0,e.colorPalette),u=r.layoutMargins;return{series:[{type:`parallel`,name:lq(n,e.t),data:s.map((e,t)=>({value:e,name:c[t]})),lineStyle:{width:r.lineWidth??2,opacity:r.lineOpacity??.6,color:l},emphasis:{lineStyle:{width:r.emphasisLineWidth??4,opacity:r.emphasisOpacity??1}}}],parallelAxis:o,parallel:{left:u?.left??`5%`,right:u?.right??`13%`,bottom:u?.bottom??`10%`,top:u?.top??`10%`}}}};function Pq(e){switch(e){case g.LINE:case g.STEP_LINE:case g.AREA:case g.STACKED_AREA:return`line`;case g.SCATTER:case g.BUBBLE:return`scatter`;case g.BAR:case g.HORIZONTAL_BAR:case g.GROUPED_BAR:case g.STACKED_BAR:case g.WATERFALL:default:return`bar`}}var Fq=class{supportedTypes=[g.COMPOSED];build(e,t){let n=tq(e),r=[],i=!1;for(let n=0;n<t.length;n++){let a=t[n],o=Pq(a.chartType),s=iq(a,n,e.colorPalette),c=rq(e.response.data,a.measureRef),l={type:o,name:lq(a,e.t),data:c,itemStyle:{color:s},yAxisIndex:a.yAxisIndex??0};(a.chartType===g.AREA||a.chartType===g.STACKED_AREA)&&(l.areaStyle={opacity:a.style?.areaOpacity??.3}),(a.chartType===g.STACKED_BAR||a.chartType===g.STACKED_AREA)&&(l.stack=`composed_stack`),a.chartType===g.STEP_LINE&&(l.step=a.style?.step??`start`),xq(l,a),(a.yAxisIndex??0)>0&&(i=!0),r.push(l)}let a=e.definition.dataQuery.dimensions[0],o=hq(a?.timeGranularity,e.locale),s=a?.timeGranularity?{type:`category`,data:nq(e.response.data,n).map(t=>mq(t,a.timeGranularity,pq(e,a.ref))),axisLabel:{hideOverlap:e.chartStylePreset.axis.hideOverlap??!0,...o?{formatter:o}:{}}}:uq(e.response.data,n,e.chartStylePreset,e.dimensionEnumLabels?.[n]),c=e.definition.i18n?.yAxisLabelKey?(()=>{let t=e.t(e.definition.i18n.yAxisLabelKey);return t===e.definition.i18n.yAxisLabelKey?void 0:t})():void 0,l=t.filter(e=>(e.yAxisIndex??0)===0),u=t.filter(e=>(e.yAxisIndex??0)>0),d=[fq(c,e.chartStylePreset,{integerValued:dq(e,l)})];if(i){let t=fq(e.definition.i18n?.yAxisSecondaryLabelKey?(()=>{let t=e.t(e.definition.i18n.yAxisSecondaryLabelKey);return t===e.definition.i18n.yAxisSecondaryLabelKey?void 0:t})():void 0,e.chartStylePreset,{integerValued:dq(e,u)});t.position=`right`,t.splitLine={show:!1},d.push(t)}return{series:r,xAxis:s,yAxis:d.length===1?d[0]:d}}},Iq=[new Sq,new Cq,new wq,new Tq,new Eq,new Dq,new Oq,new kq,new Aq,new jq,new Mq,new Nq,new Fq],Lq=new Map;for(let e of Iq)for(let t of e.supportedTypes)Lq.set(t,e);var Rq=new Set([`pie`,`donut`,`funnel`,`radar`,`sankey`,`sunburst`,`treemap`,`gauge`,`heatmap`]),zq=new Set([`pie`,`donut`,`funnel`,`sankey`]);function Bq(e,t,n){let r={...e.gridPadding};if(n&&n>1&&(r.bottom=Math.max(r.bottom,e.multiSeriesLegendBottomPadding??50)),t?.gridPadding){let e=t.gridPadding;e.top!==void 0&&(r.top=e.top),e.right!==void 0&&(r.right=e.right),e.bottom!==void 0&&(r.bottom=e.bottom),e.left!==void 0&&(r.left=e.left)}return r}var Vq=e=>e;function Hq(e,t,n={width:800,height:400},r,i=Vq,a={colors:{},order:{},labels:{}},o){let s=r??KK(),c=e.appearance,l=e.i18n,u=e.dataQuery.dimensions[0]?.ref,d=u?a.order[u]:void 0,f=Array.isArray(e.dataQuery.orderBy)&&e.dataQuery.orderBy.length>0,p=u&&d&&!f?{...t,data:aq(t.data,u,d)}:t,m=c?.colorPalette?.length?c.colorPalette:XK(s),h=e.chartType,_=Lq.get(h);if(!_)return console.warn(`EChartsOptionBuilder: no builder for chart type '${h}'`),{series:[]};let v={definition:e,response:p,containerSize:n,colorPalette:m,chartStylePreset:s,t:i,dimensionEnumColors:a.colors,dimensionEnumLabels:a.labels,locale:o},y=_.build(v,e.series),b=zq.has(h)||e.series.length>1||e.series.some(e=>e.splitByDimension),x=c?.showLegend??b,S=c?.showTooltip??!0,C=Bq(s,c,e.series.length),w=c?.animated??s.animation.enabled,T=c?.animationDuration??s.animation.durationMs,E=c?.animationEasing??s.animation.easing,D=`transparent`;c?.background&&(D=c.background===`surface`?WK(`--background`,`#ffffff`):c.background);let O=c?.title,k=l?.titleKey?Uq(i,l.titleKey,O?.text):O?.text,A=l?.subtitleKey?Uq(i,l.subtitleKey,O?.subtext):O?.subtext,j=c?.tooltip,ee=Rq.has(h)?`item`:`axis`,te=c?.legend,M={series:y.series,...k?{title:{text:k,...A?{subtext:A}:{},left:O?.left??`left`,...O?.top==null?{}:{top:O.top},...O?.textAlign?{textAlign:O.textAlign}:{},textStyle:{fontSize:s.typography.titleFontSize,fontWeight:s.typography.titleFontWeight},subtextStyle:{fontSize:s.typography.subtitleFontSize}}}:{},tooltip:S?{trigger:j?.trigger??ee,confine:j?.confine??!0,...j?.formatter?{formatter:j.formatter}:{},...j?.axisPointerType&&j.axisPointerType!==`none`?{axisPointer:{type:j.axisPointerType}}:{}}:{show:!1},legend:{show:x,type:te?.type??`scroll`,...te?.position===`top`?{top:0}:te?.position===`left`?{left:0,orient:`vertical`}:te?.position===`right`?{right:0,orient:`vertical`}:{bottom:0},...te?.orient?{orient:te.orient}:{},...te?.itemGap==null?{}:{itemGap:te.itemGap},...te?.pageSize==null?{}:{pageSize:te.pageSize},...Rq.has(h)?{}:{data:y.series.map(e=>e.name).filter(e=>typeof e==`string`&&!e.startsWith(`__`))}},grid:{...C,containLabel:!0},...D===`transparent`?{}:{backgroundColor:D},animation:w,animationDuration:T,animationEasing:E,media:bq(s,!!(y.xAxis||y.yAxis),h===g.PIE||h===g.DONUT)};if(c?.toolbox?.show){let e=c.toolbox;M.toolbox={show:!0,right:e.right??10,top:e.top??10,feature:{...e.saveAsImage?{saveAsImage:{type:`png`}}:{},...e.dataView?{dataView:{readOnly:!0}}:{},...e.restore?{restore:{}}:{},...e.magicType?.length?{magicType:{type:e.magicType}}:{}}}}if(c?.dataZoom?.enabled){let e=c.dataZoom,t=e.type??[`slider`],n=[];for(let r of t){let t={type:r,start:e.start??0,end:e.end??100};e.axis!==`both`&&e.axis!==`x`&&e.axis||n.push({...t,xAxisIndex:0}),(e.axis===`both`||e.axis===`y`)&&n.push({...t,yAxisIndex:0})}M.dataZoom=n}y.xAxis&&(M.xAxis=y.xAxis),y.yAxis&&(M.yAxis=y.yAxis),y.radar&&(M.radar=y.radar);for(let[e,t]of Object.entries(y))![`series`,`xAxis`,`yAxis`,`radar`].includes(e)&&!e.startsWith(`_`)&&(M[e]=t);return M}function Uq(e,t,n){let r=e(t);return r===t?n:r}function Wq(e,t){let n=e.series[0]?.measureRef,r=n===void 0?void 0:t.data[0]?.[n];if(r==null||r===``)return null;let i=typeof r==`number`?r:typeof r==`string`?Number(r):NaN;return Number.isFinite(i)?i:null}function Gq(e,t,n){if(e===null)return null;let r=t?.maximumFractionDigits??0;return t?.valueFormat===m.PERCENT?n(e/100,{style:`percent`,maximumFractionDigits:r}):n(e,{maximumFractionDigits:r})}var Kq=`—`;function qq({definition:e,data:t,className:n}){let{formatNumber:r}=p(),i=e.chartTypeConfig,a=Wq(e,t),o=Gq(a,i,r),c=i?.showProgress===!0&&i.valueFormat===m.PERCENT&&a!==null;return(0,zK.jsxs)(`div`,{className:s(`chart-view flex min-w-0 flex-col justify-center gap-element`,n),"data-chart-kpi":e.ref,children:[(0,zK.jsx)(E,{as:`span`,typography:l.DATA,className:`text-3xl font-semibold text-foreground`,children:o??Kq}),c&&(0,zK.jsx)(T,{value:Math.min(100,Math.max(0,a)),"aria-hidden":!0,className:`h-1.5`})]})}var Jq=({option:e,theme:t,className:n,style:r,notMerge:i=!0,lazyUpdate:a=!1,onChartReady:o})=>{let s=(0,RK.useRef)(null),c=(0,RK.useRef)(null),l=(0,RK.useRef)(e);l.current=e;let u=(0,RK.useRef)(o);u.current=o,(0,RK.useEffect)(()=>{let e=s.current;if(!e)return;let n=lw(e,t);return c.current=n,l.current&&n.setOption(l.current,{notMerge:i,lazyUpdate:a}),u.current?.(n),()=>{n.dispose(),c.current=null}},[t]);let d=(0,RK.useRef)(!0);return(0,RK.useEffect)(()=>{if(d.current){d.current=!1;return}let t=c.current;t&&!t.isDisposed()&&e&&t.setOption(e,{notMerge:i,lazyUpdate:a})},[e,i,a]),(0,zK.jsx)(`div`,{ref:s,className:n,style:r})},Yq=({viewRef:e,document:t,viewDefinition:n,runtimeDescriptor:r,contextResourceIdentifiers:i,urlParamValues:a,inputs:o,className:l=``,width:u=`100%`,height:d=400,localErrorOnly:f=!1})=>{let{registry:m}=ee(),{getChartStylePreset:h,isDark:_}=b(),v=h(),{t:y,isReady:x,resolvedRegionalPreferences:T}=p({component:c.HIGH_LEVEL_VIEWS_CHART}),E=(0,RK.useRef)(null),k=(0,RK.useRef)(null);ZK(v);let M=(0,RK.useMemo)(()=>n?void 0:j({viewRef:e,registry:m}),[n,e,m]),ne=n??M?.chartView,re=(0,RK.useMemo)(()=>r??(M?A({identity:M.identity,chartView:M.chartView,contextResourceIdentifiers:i??{}}):void 0),[r,M,i]),ie=D({surfaceDefinition:ne,chartDefinition:t,runtimeDescriptor:re,explicitContextResourceIdentifiers:i,explicitInputs:o,urlParamValues:a}),ae=ie?.chartDefinition,{data:oe,loading:se,error:ce,refetch:le}=C(ae,ie?.executionChartRef,ie?.resolvedInputs,ie?.contextResourceIdentifiers,a,f,T.timezone),ue=(0,RK.useCallback)(e=>{if(E.current?.disconnect(),E.current=null,!e)return;let t=new ResizeObserver(()=>{let e=k.current?.getEchartsInstance?.();e&&!e.isDisposed?.()&&e.resize()});t.observe(e),E.current=t},[]),de=(0,RK.useCallback)(e=>{k.current={getEchartsInstance:()=>e}},[]),{tResourceFieldEnumValue:fe,isReady:pe}=p({resource:ae?.dataQuery.mainResourceType}),me=(0,RK.useMemo)(()=>ae?eq(ae,e=>m.resourceConfigurations[e],fe):{colors:{},order:{},labels:{}},[ae,m,_,fe,pe]),he=ae?.chartType===g.KPI,ge=(0,RK.useMemo)(()=>ae&&!he&&oe&&oe.data.length>0?Hq(ae,oe,void 0,v,y,me,T.locale):null,[ae,he,oe,v,y,me,T.locale]);return ae?se&&!oe?(0,zK.jsx)(te,{height:d}):ce?(0,zK.jsx)(w,{error:ce,onRetry:le}):he?oe&&oe.data.length>0?(0,zK.jsx)(qq,{definition:ae,data:oe,className:l}):(0,zK.jsx)(O,{}):ge?!x||!pe?null:(0,zK.jsx)(`div`,{ref:ue,className:s(`chart-view`,l),style:{width:u,height:d,position:`relative`},children:(0,zK.jsx)(Jq,{option:ge,theme:YK(),style:{width:`100%`,height:`100%`},notMerge:!0,lazyUpdate:!1,onChartReady:de},_?`dark`:`light`)}):(0,zK.jsx)(O,{}):(0,zK.jsx)(S,{viewKind:`chart`,viewRef:e})};export{Yq as ChartView,Yq as default};