@fudanda/admin-antd 0.0.0-stage → 2.20261024.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (482) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +58 -3
  3. package/THIRD_PARTY_NOTICES.md +55 -0
  4. package/dist/assets/libarchive-DxGirPmi.wasm +0 -0
  5. package/dist/assets/pdfium-BJ2Yip8Q.wasm +0 -0
  6. package/dist/assets/ppt-font-cjk-DxgKpThH.otf +0 -0
  7. package/dist/assets/ppt-native-Cz5DBbag.wasm +0 -0
  8. package/dist/assets/pptx.worker-CtaL8LO_.js +30 -0
  9. package/dist/assets/worker-C5LZNsKY.mjs +1650 -0
  10. package/dist/assets/worker-CDeo9jS-.js +40 -0
  11. package/dist/assets/worker-bundle-Dx5mKZOL.js +6 -0
  12. package/dist/automation.d.ts +3 -0
  13. package/dist/automation.js +15 -0
  14. package/dist/chunks/App-DNjXLysb.js +79 -0
  15. package/dist/chunks/AppModal-DJzQA6FR.js +1 -0
  16. package/dist/chunks/ArcBaseAdmin-BZrHGq2f.js +1 -0
  17. package/dist/chunks/ConfigurableTable-DzmZDd8F.js +55 -0
  18. package/dist/chunks/DashboardPage-BohGodSl.js +22 -0
  19. package/dist/chunks/DataScopePanel-B2-x8Jcz.js +1 -0
  20. package/dist/chunks/DateTimeText-CIt0Qy45.js +1 -0
  21. package/dist/chunks/DepartmentsPage-DMWY__Y_.js +1 -0
  22. package/dist/chunks/DictTag-2-adKbYg.js +1 -0
  23. package/dist/chunks/DictsPage-DILDyHi-.js +15 -0
  24. package/dist/chunks/EditFormModal-DNHOZHxM.js +1 -0
  25. package/dist/chunks/EmptyIllustration-DUC3RZmF.js +1 -0
  26. package/dist/chunks/EntityContextRuntime-DMklAv-k.js +1 -0
  27. package/dist/chunks/EntityContextRuntime-sslBZqYD.js +1 -0
  28. package/dist/chunks/EntityRelationButton-DWn1rC2J.js +8 -0
  29. package/dist/chunks/ExportButton-AzH4D0oW.js +1 -0
  30. package/dist/chunks/FileNameCell-DPyi64Rv.js +1 -0
  31. package/dist/chunks/FileStorageConfigsPage-CzuOgeK0.js +15 -0
  32. package/dist/chunks/FileTypeIcon-DIih3XQG.js +1 -0
  33. package/dist/chunks/FileViewerPreviewPanel-CMqVtGCr.js +41 -0
  34. package/dist/chunks/FilesPage-BaEBCOCs.js +43 -0
  35. package/dist/chunks/IdentitySecurityPage-BO7nY8id.js +1 -0
  36. package/dist/chunks/JsonPreviewPanel-Dhbza-Uu.js +1 -0
  37. package/dist/chunks/LogStatsScaffold-CLycj3da.js +1 -0
  38. package/dist/chunks/LoginLogsPage-DTmHi8u0.js +1 -0
  39. package/dist/chunks/LoginLogsTable-DVmHnC6V.js +1 -0
  40. package/dist/chunks/MarkdownPreviewPanel-DoiaAeRv.js +51 -0
  41. package/dist/chunks/MasterDetailLayout-sjPWw8BI.js +8 -0
  42. package/dist/chunks/MemberAssignmentSheet-Czbt6_zv.js +1 -0
  43. package/dist/chunks/MenuCommandPalette-BCOzf-Kq.js +8 -0
  44. package/dist/chunks/MenusPage-DN8DTGB1.js +1 -0
  45. package/dist/chunks/ModalFooter-RMlvqrO9.js +1 -0
  46. package/dist/chunks/MonacoPreviewPanel-Dnz7xpWP.js +1 -0
  47. package/dist/chunks/NavListPanel-vjIOIqK0.js +1 -0
  48. package/dist/chunks/OnlineSessionsPage-FoHYZKlR.js +1 -0
  49. package/dist/chunks/OperationLogsPage-BeRnGcBJ.js +1 -0
  50. package/dist/chunks/OperationLogsTable-COI-Lp-y.js +1 -0
  51. package/dist/chunks/PDFPreviewPanel-BIQuBnZZ.js +37 -0
  52. package/dist/chunks/PasswordInput-DGEJO9yx.js +1 -0
  53. package/dist/chunks/PositionsPage-DohI0luX.js +1 -0
  54. package/dist/chunks/PreferencesSheetBody-B9niQABW.js +43 -0
  55. package/dist/chunks/ProfilePage-CVTRv7xb.js +15 -0
  56. package/dist/chunks/RelationPanel-B1X6AVaM.js +36 -0
  57. package/dist/chunks/ResponsiveTableActions-y54aSdhs.js +1 -0
  58. package/dist/chunks/RolesPage-CtUw93L8.js +1 -0
  59. package/dist/chunks/ScrollArea-DqjJmHDN.js +11 -0
  60. package/dist/chunks/SearchToolbar-CvgYKUjr.js +1 -0
  61. package/dist/chunks/SessionClientTag-DIwnYodW.js +22 -0
  62. package/dist/chunks/SessionConflictModal-BLNuDsN_.js +1 -0
  63. package/dist/chunks/SettingRow-DVNmTJWC.js +1 -0
  64. package/dist/chunks/SettingsPage-BRnCxYQm.js +26 -0
  65. package/dist/chunks/StatCard-Czjfs0fa.js +4 -0
  66. package/dist/chunks/UTIF-QUtClmQd.js +1 -0
  67. package/dist/chunks/UserAvatar-B8CFnTCn.js +1 -0
  68. package/dist/chunks/UserDisplay-J0Re8z-7.js +1 -0
  69. package/dist/chunks/UserGroupsPage-CNwbejx-.js +1 -0
  70. package/dist/chunks/UserLogsPanels-BHeSxWrk.js +36 -0
  71. package/dist/chunks/UserTransferSelect-CAeyxdor.js +22 -0
  72. package/dist/chunks/UsersPage-BXt9fOru.js +36 -0
  73. package/dist/chunks/abnfDiagram-VCTEODGH-Z6OhNjoW.js +1 -0
  74. package/dist/chunks/activity-DBu4axwF.js +8 -0
  75. package/dist/chunks/arc-B3K1fDeF.js +1 -0
  76. package/dist/chunks/architecture-7GRP2DOG-CMtoOwin.js +1 -0
  77. package/dist/chunks/architectureDiagram-5GKGNRK7-V5A7S5fY.js +36 -0
  78. package/dist/chunks/archive-B_IKvysI.js +72 -0
  79. package/dist/chunks/array-BrHhzP_A.js +1 -0
  80. package/dist/chunks/arrow-left-CsxBMzKY.js +8 -0
  81. package/dist/chunks/avsc-C0VoJRmm.js +160 -0
  82. package/dist/chunks/blockDiagram-I7D4REHJ-CFKGJkc_.js +129 -0
  83. package/dist/chunks/browser-BKLM0ThC-mnGPrtB_.js +1 -0
  84. package/dist/chunks/browser-index-JqxD-45S.js +1 -0
  85. package/dist/chunks/builtin_esm-external-require-react-BsBndGeN.js +1 -0
  86. package/dist/chunks/bundle-DbfUnEV1.js +29 -0
  87. package/dist/chunks/c4Diagram-7LVT6UL2-BqYYoXPe.js +38 -0
  88. package/dist/chunks/channel-C9Dr7Z-W.js +1 -0
  89. package/dist/chunks/chart-data-DImT_Mzn.js +5 -0
  90. package/dist/chunks/chart-renderer-k-Rd8vdL.js +7 -0
  91. package/dist/chunks/chevron-down-mn2tSKQd.js +8 -0
  92. package/dist/chunks/chevron-right-EBApfX6q.js +15 -0
  93. package/dist/chunks/chevrons-up-down-2M6hY6wt.js +15 -0
  94. package/dist/chunks/chunk-2E4U76K2-DNbbdpCx.js +1 -0
  95. package/dist/chunks/chunk-2Q5K7J3B-CmAE3Vs0.js +1 -0
  96. package/dist/chunks/chunk-2ZTRR5NV-BjsSRgBv.js +2 -0
  97. package/dist/chunks/chunk-3Z5EZCMW-uYiqz-6y.js +1 -0
  98. package/dist/chunks/chunk-4HAMMTFA-Aw59LwS3.js +62 -0
  99. package/dist/chunks/chunk-5V3GS4D5-B_CVcJic.js +1 -0
  100. package/dist/chunks/chunk-5VM5RSS4-DMlsEAcl.js +15 -0
  101. package/dist/chunks/chunk-6AZGARVD-CgAiC5mV.js +1 -0
  102. package/dist/chunks/chunk-6EIED4P4-CXz5D9B0.js +1 -0
  103. package/dist/chunks/chunk-6K3QC6MW-DtaQ52mY.js +1 -0
  104. package/dist/chunks/chunk-6TQVIW2G-D0YDxefI.js +1 -0
  105. package/dist/chunks/chunk-747NJXEK-DGoElbDa.js +2 -0
  106. package/dist/chunks/chunk-75Z2AOVW-IO9R6faP.js +2 -0
  107. package/dist/chunks/chunk-CLGD4ZFX-tRS89bnq.js +1 -0
  108. package/dist/chunks/chunk-DU6HZSFF-Bx48E1rg.js +125 -0
  109. package/dist/chunks/chunk-F27PBJKO-DtLva7y0.js +1 -0
  110. package/dist/chunks/chunk-FOHPRMQF-B8MMrnxV.js +255 -0
  111. package/dist/chunks/chunk-GMAD6QVW-D41KnniX.js +72 -0
  112. package/dist/chunks/chunk-GVQU2GXP-CVzgM_ui.js +1 -0
  113. package/dist/chunks/chunk-I5DQTOEV-CoecQT42.js +1 -0
  114. package/dist/chunks/chunk-ICYGCRZG-lH3opfCY.js +1 -0
  115. package/dist/chunks/chunk-IH6LHLGP-tD-j3Rsy.js +1 -0
  116. package/dist/chunks/chunk-IMKFNOWR-CL9pLQhV.js +231 -0
  117. package/dist/chunks/chunk-JWPE2WC7-Wk0BVLn5.js +1 -0
  118. package/dist/chunks/chunk-KI3K4JFJ-C-3Y_9er.js +1 -0
  119. package/dist/chunks/chunk-L3NEJ4N5-CmvrS7Dt.js +1 -0
  120. package/dist/chunks/chunk-LNGE3PJU-BP1fsJRz.js +34 -0
  121. package/dist/chunks/chunk-OSK3NFVY-C9uWOXTC.js +10 -0
  122. package/dist/chunks/chunk-OUJLGHUK-Cm55l9bx.js +2 -0
  123. package/dist/chunks/chunk-P2QGCYS3-C9bc1yiM.js +1 -0
  124. package/dist/chunks/chunk-POPQ4Y6H-P1s5xaxM.js +1 -0
  125. package/dist/chunks/chunk-PWAF6VOD-IORmPx9D.js +1 -0
  126. package/dist/chunks/chunk-SHT3W25Y-Bip4melZ.js +168 -0
  127. package/dist/chunks/chunk-SVP7TREG-BKCgUOuy.js +88 -0
  128. package/dist/chunks/chunk-TICWLB2K-12W2EmSx.js +206 -0
  129. package/dist/chunks/chunk-TLUHSLCS-DsqF476v.js +1 -0
  130. package/dist/chunks/chunk-UY3FDG6J-71d_M6t3.js +1 -0
  131. package/dist/chunks/chunk-XHIXRSVI-C2X1-xC6.js +1 -0
  132. package/dist/chunks/chunk-XXDRQBXY-Bl6AoSZF.js +1 -0
  133. package/dist/chunks/chunk-Y2CYZVJY-DjEHBC-3.js +1 -0
  134. package/dist/chunks/circle-check-RKAno__V.js +8 -0
  135. package/dist/chunks/circle-x-BB5x-D-8.js +8 -0
  136. package/dist/chunks/classDiagram-ZZMXUADV-CZrpYcfK.js +1 -0
  137. package/dist/chunks/classDiagram-v2-VYDZK3BY-CZrpYcfK.js +1 -0
  138. package/dist/chunks/clipboard-ERcMSMRH.js +1 -0
  139. package/dist/chunks/clock-CniP1gZS.js +8 -0
  140. package/dist/chunks/confirm-BtBBEqk8.js +1 -0
  141. package/dist/chunks/controls-C5dPckUT.js +1 -0
  142. package/dist/chunks/copy-ofLPH1I0.js +8 -0
  143. package/dist/chunks/cose-bilkent-JH36ORCC-D9OUqkk5.js +1 -0
  144. package/dist/chunks/createLucideIcon-BtwfYE6A.js +83 -0
  145. package/dist/chunks/cynefin-OW5HDTMX-B8_kUynj.js +1 -0
  146. package/dist/chunks/cynefinDiagram-5FMLGOSQ-DhQChnCg.js +62 -0
  147. package/dist/chunks/cytoscape.esm-wDUnleWx.js +339 -0
  148. package/dist/chunks/dagre-GXQ25YYZ-CfbwC_a5.js +4 -0
  149. package/dist/chunks/dagre-ZVAWSfFw.js +1 -0
  150. package/dist/chunks/data-B05HzECj.js +28 -0
  151. package/dist/chunks/date-picker-CPUxgHVv.js +1 -0
  152. package/dist/chunks/defaultLocale-BvxIcb9Y.js +1 -0
  153. package/dist/chunks/deleteAction-CCocr5uV.js +1 -0
  154. package/dist/chunks/diagram-D9cwc7QH.js +5 -0
  155. package/dist/chunks/diagram-S7CK7UJ4-DVPbdtMm.js +30 -0
  156. package/dist/chunks/diagram-UQ7AKVKN-D_ZBhGLL.js +41 -0
  157. package/dist/chunks/diagram-VSXAHHWV-Dqypp-OX.js +3 -0
  158. package/dist/chunks/diagram-VX7I27RA-CbWJVJ_L.js +24 -0
  159. package/dist/chunks/diagram-Z3DM3KII-CUyP4-RY.js +24 -0
  160. package/dist/chunks/direct-engine-thps0u7R.js +5 -0
  161. package/dist/chunks/dist-Bauqz5on.js +1 -0
  162. package/dist/chunks/dist-CWj_XYki.js +1 -0
  163. package/dist/chunks/dist-D_KGQS7-.js +11 -0
  164. package/dist/chunks/dist-DdW4yNBK.js +1 -0
  165. package/dist/chunks/docx-preview-CPN81HCr.js +11 -0
  166. package/dist/chunks/download--5IybXxz.js +8 -0
  167. package/dist/chunks/drawing-D2Qrun-P.js +48 -0
  168. package/dist/chunks/ebnfDiagram-PWID7BFC-C5NMigjm.js +1 -0
  169. package/dist/chunks/ellipsis-Dux1Nxa5.js +8 -0
  170. package/dist/chunks/email-ByshRsFv.js +61 -0
  171. package/dist/chunks/emailHtml-BAKcRhSm.js +1 -0
  172. package/dist/chunks/erDiagram-RLTQ6QDP-B5rUHJPJ.js +99 -0
  173. package/dist/chunks/eventmodeling-NTZA5JFV-C74no5BH.js +1 -0
  174. package/dist/chunks/export-BkwewH6Q.js +1 -0
  175. package/dist/chunks/export-DlTz5dc2.js +341 -0
  176. package/dist/chunks/eye-off-BtJoIT5n.js +8 -0
  177. package/dist/chunks/feedback-BnjMKZpz.js +1 -0
  178. package/dist/chunks/file-utils-DyvnVEoH.js +1 -0
  179. package/dist/chunks/fit-CsnhEncA.js +1 -0
  180. package/dist/chunks/flowDiagram-HODETNUW-BuMvaSeo.js +1 -0
  181. package/dist/chunks/form-CQutQFiD.js +1 -0
  182. package/dist/chunks/funnel-BwQjQI4Y.js +8 -0
  183. package/dist/chunks/ganttDiagram-EL5Y4UJY-DIAlbvVg.js +292 -0
  184. package/dist/chunks/geo-DR0fL7r2.js +38 -0
  185. package/dist/chunks/gitGraph-4MIJSDKK-Ce5mOfp1.js +1 -0
  186. package/dist/chunks/gitGraphDiagram-WWUBYQGX-DN3G9xiQ.js +106 -0
  187. package/dist/chunks/graphlib-CYBMTUbW.js +1 -0
  188. package/dist/chunks/icons-CbRx5Om7.js +1 -0
  189. package/dist/chunks/illustrations-DT1eq6jI.js +1 -0
  190. package/dist/chunks/image-ez9hvzKT.js +17 -0
  191. package/dist/chunks/index.es-OAWlVkoK.js +16 -0
  192. package/dist/chunks/info-A6RAGUB7-BP6lMBIR.js +1 -0
  193. package/dist/chunks/info-BQa8C31Y.js +8 -0
  194. package/dist/chunks/infoDiagram-27XIBGKW-BhQtr_Ti.js +2 -0
  195. package/dist/chunks/init-Ca_Ibf4y.js +1 -0
  196. package/dist/chunks/ishikawaDiagram-5VMMS53U-CLR6CAi4.js +70 -0
  197. package/dist/chunks/journeyDiagram-3NMN7TZE-_-Q7sjsP.js +139 -0
  198. package/dist/chunks/json-viewer-DHYRjY8I.js +1 -0
  199. package/dist/chunks/jszip.min-hNOoGCeG.js +14 -0
  200. package/dist/chunks/kanban-definition-UXKFOSKX-D97mHeUZ.js +89 -0
  201. package/dist/chunks/katex-D5qu7EYh.js +257 -0
  202. package/dist/chunks/layout-grid-Bp9bwiQZ.js +8 -0
  203. package/dist/chunks/lib-BlRm3nk1.js +15 -0
  204. package/dist/chunks/lib-C1nFUu19.js +4 -0
  205. package/dist/chunks/lib-CqYXBtHb.js +1 -0
  206. package/dist/chunks/libarchive-DRzzJvQl.js +7 -0
  207. package/dist/chunks/line-BV7qVRkM.js +1 -0
  208. package/dist/chunks/line-qVHaOdPp.js +1 -0
  209. package/dist/chunks/linear-DXABSWHW.js +1 -0
  210. package/dist/chunks/list-0CbyOlT9.js +1 -0
  211. package/dist/chunks/list-DCcWnjUg.js +8 -0
  212. package/dist/chunks/listTableProps-DDynsnLF.js +1 -0
  213. package/dist/chunks/log-in-OzbNes8i.js +8 -0
  214. package/dist/chunks/lucide-react-VfAPsQQ5.js +8 -0
  215. package/dist/chunks/maplibre-gl-Bxi83GUP.js +819 -0
  216. package/dist/chunks/maplibre-shared-Oo0L8Lll.js +6 -0
  217. package/dist/chunks/maximize-CnmQ11E7.js +8 -0
  218. package/dist/chunks/media-DoGe_p4O.js +1 -0
  219. package/dist/chunks/menu-mQgsexFx.js +15 -0
  220. package/dist/chunks/mermaid-parser.core-DvCAQkzY.js +3 -0
  221. package/dist/chunks/mermaid.core-CxOC6yPr.js +15 -0
  222. package/dist/chunks/messages-CFyOVxEM.js +1 -0
  223. package/dist/chunks/mindmap-definition-YA3MSWOX-A2UgnMwx.js +96 -0
  224. package/dist/chunks/minimize-Bpau_zCe.js +8 -0
  225. package/dist/chunks/msg-BzZbudMm.js +7 -0
  226. package/dist/chunks/ofd-C7DKqJ6Z.js +33 -0
  227. package/dist/chunks/ofd-DrJyXIpS.js +14 -0
  228. package/dist/chunks/openDocument-DGzqlyJg.js +12 -0
  229. package/dist/chunks/options-B65xkxOY.js +1 -0
  230. package/dist/chunks/ordinal-NuFkISw7.js +1 -0
  231. package/dist/chunks/packet-AYTQ26CC-DS6h3a5l.js +1 -0
  232. package/dist/chunks/panzoom.es-DnuzxUQi.js +1 -0
  233. package/dist/chunks/parse-6ZQGx714.js +1 -0
  234. package/dist/chunks/parser-DC3PvpL4.js +72 -0
  235. package/dist/chunks/path-VUNELGFR.js +1 -0
  236. package/dist/chunks/pegDiagram-XKGWAZYB-DxQqpKfh.js +1 -0
  237. package/dist/chunks/pie-WAS4IAKB-BsaegmNA.js +1 -0
  238. package/dist/chunks/pieDiagram-E7YTZNPT-BUsnkTkJ.js +39 -0
  239. package/dist/chunks/postal-mime-DMcA5b7k.js +28 -0
  240. package/dist/chunks/ppt-B0WY5Gks.js +30 -0
  241. package/dist/chunks/ppt-BIiNnCyj.js +1 -0
  242. package/dist/chunks/pptx-DX5KDFZ7.js +109 -0
  243. package/dist/chunks/preload-helper-C-73SErw.js +1 -0
  244. package/dist/chunks/print-mask-Dguzv0rv.js +17 -0
  245. package/dist/chunks/printLayout-oeudvFkr.js +34 -0
  246. package/dist/chunks/printMask-LefOTJqk.js +8 -0
  247. package/dist/chunks/psd-hjeNFQZ-.js +36 -0
  248. package/dist/chunks/purify.es-BsWMI_aG.js +5 -0
  249. package/dist/chunks/quadrantDiagram-AXDQQJYC-BmQNSzhY.js +7 -0
  250. package/dist/chunks/radar-RG4KPBEZ-BoHdw2h7.js +1 -0
  251. package/dist/chunks/railroad-74A4TZTK-BifJffb4.js +1 -0
  252. package/dist/chunks/railroad-abnf-HS5TGJTU-CMEPumRO.js +1 -0
  253. package/dist/chunks/railroad-ebnf-LZEXJU2U-B06BgAeN.js +1 -0
  254. package/dist/chunks/railroad-peg-WCYAUIDC-CMjriUEs.js +1 -0
  255. package/dist/chunks/railroadDiagram-O6MQD6OU-B2t5KY26.js +1 -0
  256. package/dist/chunks/react-runtime-x2lFbSKq.js +11 -0
  257. package/dist/chunks/refresh-cw-Dz8O9-Hp.js +8 -0
  258. package/dist/chunks/rendered-slot-YhfmcMJr.js +1 -0
  259. package/dist/chunks/requirementDiagram-BXWQKSXE-CBBfNOAp.js +84 -0
  260. package/dist/chunks/rolldown-runtime-BKuNeK48.js +1 -0
  261. package/dist/chunks/rotate-ccw-D2__Zisi.js +8 -0
  262. package/dist/chunks/rotate-cw-BSTVLlWY.js +8 -0
  263. package/dist/chunks/rough.esm-CVrpq1dW.js +1 -0
  264. package/dist/chunks/sankeyDiagram-P5KCCOFB-Cp8SrFyb.js +40 -0
  265. package/dist/chunks/save-w-NwiMMY.js +8 -0
  266. package/dist/chunks/search-DYZU68h1.js +8 -0
  267. package/dist/chunks/search-filters-CRIhZ0gL.js +1 -0
  268. package/dist/chunks/sequenceDiagram-WJ2MYXX4-PDtVfEoj.js +162 -0
  269. package/dist/chunks/shield-alert-De_Hx56I.js +8 -0
  270. package/dist/chunks/sizeCapture-INFHLROL-DA-kAaXB.js +1 -0
  271. package/dist/chunks/skeleton-CrjMjJNr.js +1 -0
  272. package/dist/chunks/spreadsheet-BzbBEhmY.js +1 -0
  273. package/dist/chunks/spreadsheet-LR3SOG-x.js +58 -0
  274. package/dist/chunks/sql-wasm-browser-CFddXd9f.js +2 -0
  275. package/dist/chunks/src-C1iDJpBK.js +1 -0
  276. package/dist/chunks/src-vLpLkuQx.js +1 -0
  277. package/dist/chunks/stateDiagram-D77RDMKH-C1Sx8KUD.js +1 -0
  278. package/dist/chunks/stateDiagram-v2-MP3YSRHH-7wYLSzBX.js +1 -0
  279. package/dist/chunks/swimlanes-42K2YHIH-BmybX9eL.js +1 -0
  280. package/dist/chunks/swimlanesDiagram-VR7AAH4N-DxhXklfm.js +8 -0
  281. package/dist/chunks/tabs-BobA_IcO.js +1 -0
  282. package/dist/chunks/theme-controller-D-ATwFal.js +1 -0
  283. package/dist/chunks/timeline-definition-24CTP7MA-QS9QNm2i.js +120 -0
  284. package/dist/chunks/tinycolor-CG1wnM-U.js +1 -0
  285. package/dist/chunks/togeojson.es-BE8iM7U6.js +1 -0
  286. package/dist/chunks/toolbar-controls-CThS0xuP.js +15 -0
  287. package/dist/chunks/trash-tHBT8Mpw.js +8 -0
  288. package/dist/chunks/treeView-Q6P3EWNA-CN0l7whJ.js +1 -0
  289. package/dist/chunks/treemap-WGGIJYW6-C4P1fQxS.js +1 -0
  290. package/dist/chunks/typography-DKK_iHcj.js +1 -0
  291. package/dist/chunks/ui-BFsHoY7a.js +1 -0
  292. package/dist/chunks/ui-utils-ClxYogUQ.js +1 -0
  293. package/dist/chunks/upload-M-n6woFv.js +8 -0
  294. package/dist/chunks/useCrudOperationColumn-D935tixd.js +1 -0
  295. package/dist/chunks/useListPage-CbcOQG4m.js +1 -0
  296. package/dist/chunks/useModalViewport-HF7te75S.js +1 -0
  297. package/dist/chunks/useRowSelection-4GOMFmjG.js +1 -0
  298. package/dist/chunks/useStatusToggle-B2qZaoc-.js +1 -0
  299. package/dist/chunks/user-round-kYfBkPNu.js +15 -0
  300. package/dist/chunks/users-BXZLb4TY.js +8 -0
  301. package/dist/chunks/vennDiagram-4TSXK5OY-CVd73ycc.js +34 -0
  302. package/dist/chunks/view-B8ZvC8z3.js +1 -0
  303. package/dist/chunks/viewer-Ct88ypIL.js +24 -0
  304. package/dist/chunks/wardley-WFR3VGLG-cG9pRFwD.js +1 -0
  305. package/dist/chunks/wardleyDiagram-VM6X3IG4-B42d0Gqz.js +78 -0
  306. package/dist/chunks/wordDoc-BZY3ZnxN.js +152 -0
  307. package/dist/chunks/wordDocx-Bt2mlB3C.js +77 -0
  308. package/dist/chunks/wordMl-Y_ghyTZ8.js +1 -0
  309. package/dist/chunks/worker-engine-B4e92GsN.js +17369 -0
  310. package/dist/chunks/x-Ak9hw1R9.js +8 -0
  311. package/dist/chunks/xmind-CF9YwkOD.js +58 -0
  312. package/dist/chunks/xychartDiagram-S5SC5T6Z-B_Owv9Ho.js +7 -0
  313. package/dist/file-viewer/flyfish-viewer-assets.json +46 -0
  314. package/dist/file-viewer/vendor/docx/docx.worker.js +5 -0
  315. package/dist/file-viewer/vendor/docx/jszip.min.js +13 -0
  316. package/dist/file-viewer/vendor/xlsx/sheet.worker.js +107 -0
  317. package/dist/file-viewer/wasm/data/sql-wasm.wasm +0 -0
  318. package/dist/index.d.ts +5 -0
  319. package/dist/index.js +1 -0
  320. package/dist/public/avatars/avatar-01.svg +1 -0
  321. package/dist/public/avatars/avatar-02.svg +1 -0
  322. package/dist/public/avatars/avatar-03.svg +1 -0
  323. package/dist/public/avatars/avatar-04.svg +1 -0
  324. package/dist/public/avatars/avatar-05.svg +1 -0
  325. package/dist/public/avatars/avatar-06.svg +1 -0
  326. package/dist/public/avatars/avatar-07.svg +1 -0
  327. package/dist/public/avatars/avatar-08.svg +1 -0
  328. package/dist/public/avatars/avatar-09.svg +1 -0
  329. package/dist/public/avatars/avatar-10.svg +1 -0
  330. package/dist/public/avatars/avatar-11.svg +1 -0
  331. package/dist/public/avatars/avatar-12.svg +1 -0
  332. package/dist/public/monaco/vs/abap-D-t0cyap.js +1 -0
  333. package/dist/public/monaco/vs/apex-CcIm7xu6.js +1 -0
  334. package/dist/public/monaco/vs/assets/css.worker-URu8fCFR.js +97 -0
  335. package/dist/public/monaco/vs/assets/editor.worker-lj3bdIIn.js +30 -0
  336. package/dist/public/monaco/vs/assets/editorWebWorkerMain-CA_vMoUU.js +30 -0
  337. package/dist/public/monaco/vs/assets/html.worker-D1SL3iM8.js +474 -0
  338. package/dist/public/monaco/vs/assets/json.worker-CoJx_OPf.js +62 -0
  339. package/dist/public/monaco/vs/assets/ts.worker-BWKtMYOk.js +67722 -0
  340. package/dist/public/monaco/vs/azcli-BA0tQDCg.js +1 -0
  341. package/dist/public/monaco/vs/basic-languages/monaco.contribution.js +1 -0
  342. package/dist/public/monaco/vs/bat-C397hTD6.js +1 -0
  343. package/dist/public/monaco/vs/bicep-DF5aW17k.js +2 -0
  344. package/dist/public/monaco/vs/cameligo-plsz8qhj.js +1 -0
  345. package/dist/public/monaco/vs/clojure-Y2auQMzK.js +1 -0
  346. package/dist/public/monaco/vs/coffee-Bu45yuWE.js +1 -0
  347. package/dist/public/monaco/vs/cpp-CkKPQIni.js +1 -0
  348. package/dist/public/monaco/vs/csharp-CX28MZyh.js +1 -0
  349. package/dist/public/monaco/vs/csp-D8uWnyxW.js +1 -0
  350. package/dist/public/monaco/vs/css-CaeNmE3S.js +3 -0
  351. package/dist/public/monaco/vs/css.worker-CyhWkhHo.js +1 -0
  352. package/dist/public/monaco/vs/cssMode-CV6Ay48H.js +1 -0
  353. package/dist/public/monaco/vs/cypher-DVThT8BS.js +1 -0
  354. package/dist/public/monaco/vs/dart-CmGfCvrO.js +1 -0
  355. package/dist/public/monaco/vs/dockerfile-CZqqYdch.js +1 -0
  356. package/dist/public/monaco/vs/ecl-30fUercY.js +1 -0
  357. package/dist/public/monaco/vs/editor/editor.main.css +1 -0
  358. package/dist/public/monaco/vs/editor/editor.main.js +1 -0
  359. package/dist/public/monaco/vs/editor-KLE6jdfb.js +831 -0
  360. package/dist/public/monaco/vs/editor.js +1 -0
  361. package/dist/public/monaco/vs/editorWorkerHost-fVE1cjcC.js +35 -0
  362. package/dist/public/monaco/vs/elixir-xjPaIfzF.js +1 -0
  363. package/dist/public/monaco/vs/flow9-DqtmStfK.js +1 -0
  364. package/dist/public/monaco/vs/freemarker2-FWreY7v7.js +3 -0
  365. package/dist/public/monaco/vs/fsharp-BOMdg4U1.js +1 -0
  366. package/dist/public/monaco/vs/go-D_hbi-Jt.js +1 -0
  367. package/dist/public/monaco/vs/graphql-CKUU4kLG.js +1 -0
  368. package/dist/public/monaco/vs/handlebars-CZi4pHCH.js +1 -0
  369. package/dist/public/monaco/vs/hcl-DTaboeZW.js +1 -0
  370. package/dist/public/monaco/vs/html-j_7ZTNRU.js +1 -0
  371. package/dist/public/monaco/vs/html.worker-CA3iAimZ.js +1 -0
  372. package/dist/public/monaco/vs/htmlMode-27by_KM4.js +1 -0
  373. package/dist/public/monaco/vs/index-049xrXrp.js +1 -0
  374. package/dist/public/monaco/vs/index-CBVt3dzv.js +5 -0
  375. package/dist/public/monaco/vs/index.js +1 -0
  376. package/dist/public/monaco/vs/ini-CsNwO04R.js +1 -0
  377. package/dist/public/monaco/vs/initialize-DL0l1TGY.js +1 -0
  378. package/dist/public/monaco/vs/java-CI4ZMsH9.js +1 -0
  379. package/dist/public/monaco/vs/javascript-DTJl4Jn1.js +1 -0
  380. package/dist/public/monaco/vs/json.worker-BizpAl9O.js +1 -0
  381. package/dist/public/monaco/vs/jsonMode-DLUiMUrI.js +1 -0
  382. package/dist/public/monaco/vs/julia-BwzEvaQw.js +1 -0
  383. package/dist/public/monaco/vs/kotlin-IUYPiTV8.js +1 -0
  384. package/dist/public/monaco/vs/language/css/monaco.contribution.js +1 -0
  385. package/dist/public/monaco/vs/language/html/monaco.contribution.js +1 -0
  386. package/dist/public/monaco/vs/language/json/monaco.contribution.js +1 -0
  387. package/dist/public/monaco/vs/language/typescript/monaco.contribution.js +1 -0
  388. package/dist/public/monaco/vs/less-C0eDYdqa.js +2 -0
  389. package/dist/public/monaco/vs/lexon-iON-Kj97.js +1 -0
  390. package/dist/public/monaco/vs/liquid-CLJYelW6.js +1 -0
  391. package/dist/public/monaco/vs/loader.js +1368 -0
  392. package/dist/public/monaco/vs/lspLanguageFeatures-BIkJOWLw.js +2 -0
  393. package/dist/public/monaco/vs/lua-DtygF91M.js +1 -0
  394. package/dist/public/monaco/vs/m3-CsR4AuFi.js +1 -0
  395. package/dist/public/monaco/vs/main-BEx-Fmlo.js +15 -0
  396. package/dist/public/monaco/vs/main-DsK8pnKg.js +3 -0
  397. package/dist/public/monaco/vs/markdown-C_rD0bIw.js +1 -0
  398. package/dist/public/monaco/vs/mdx-CpzZIPHF.js +1 -0
  399. package/dist/public/monaco/vs/mips-CiYP61RB.js +1 -0
  400. package/dist/public/monaco/vs/monaco.contribution-9cKT3C7t.js +1 -0
  401. package/dist/public/monaco/vs/monaco.contribution-BE88ZNGY.js +1 -0
  402. package/dist/public/monaco/vs/monaco.contribution-BPhsneLd.js +1 -0
  403. package/dist/public/monaco/vs/monaco.contribution-BgRy6xDf.js +1 -0
  404. package/dist/public/monaco/vs/msdax-C38-sJlp.js +1 -0
  405. package/dist/public/monaco/vs/mysql-CdtbpvbG.js +1 -0
  406. package/dist/public/monaco/vs/nls/lang/cs.d.ts +1 -0
  407. package/dist/public/monaco/vs/nls/lang/cs.js +9 -0
  408. package/dist/public/monaco/vs/nls/lang/de.d.ts +1 -0
  409. package/dist/public/monaco/vs/nls/lang/de.js +9 -0
  410. package/dist/public/monaco/vs/nls/lang/es.d.ts +1 -0
  411. package/dist/public/monaco/vs/nls/lang/es.js +9 -0
  412. package/dist/public/monaco/vs/nls/lang/fr.d.ts +1 -0
  413. package/dist/public/monaco/vs/nls/lang/fr.js +9 -0
  414. package/dist/public/monaco/vs/nls/lang/it.d.ts +1 -0
  415. package/dist/public/monaco/vs/nls/lang/it.js +9 -0
  416. package/dist/public/monaco/vs/nls/lang/ja.d.ts +1 -0
  417. package/dist/public/monaco/vs/nls/lang/ja.js +9 -0
  418. package/dist/public/monaco/vs/nls/lang/ko.d.ts +1 -0
  419. package/dist/public/monaco/vs/nls/lang/ko.js +9 -0
  420. package/dist/public/monaco/vs/nls/lang/pl.d.ts +1 -0
  421. package/dist/public/monaco/vs/nls/lang/pl.js +9 -0
  422. package/dist/public/monaco/vs/nls/lang/pt-br.d.ts +1 -0
  423. package/dist/public/monaco/vs/nls/lang/pt-br.js +9 -0
  424. package/dist/public/monaco/vs/nls/lang/ru.d.ts +1 -0
  425. package/dist/public/monaco/vs/nls/lang/ru.js +9 -0
  426. package/dist/public/monaco/vs/nls/lang/tr.d.ts +1 -0
  427. package/dist/public/monaco/vs/nls/lang/tr.js +9 -0
  428. package/dist/public/monaco/vs/nls/lang/zh-cn.d.ts +1 -0
  429. package/dist/public/monaco/vs/nls/lang/zh-cn.js +9 -0
  430. package/dist/public/monaco/vs/nls/lang/zh-tw.d.ts +1 -0
  431. package/dist/public/monaco/vs/nls/lang/zh-tw.js +9 -0
  432. package/dist/public/monaco/vs/nls.messages-loader.js +1 -0
  433. package/dist/public/monaco/vs/objective-c-CntZFaHX.js +1 -0
  434. package/dist/public/monaco/vs/pascal-r6kuqfl_.js +1 -0
  435. package/dist/public/monaco/vs/pascaligo-BiXoTmXh.js +1 -0
  436. package/dist/public/monaco/vs/perl-DABw_TcH.js +1 -0
  437. package/dist/public/monaco/vs/pgsql-me_jFXeX.js +1 -0
  438. package/dist/public/monaco/vs/php-D_kh-9LK.js +1 -0
  439. package/dist/public/monaco/vs/pla-VfZjczW0.js +1 -0
  440. package/dist/public/monaco/vs/postiats-BBSzz8Pk.js +1 -0
  441. package/dist/public/monaco/vs/powerquery-Dt-g_2cc.js +1 -0
  442. package/dist/public/monaco/vs/powershell-B-7ap1zc.js +1 -0
  443. package/dist/public/monaco/vs/protobuf-BmtuEB1A.js +2 -0
  444. package/dist/public/monaco/vs/pug-BRpRNeEb.js +1 -0
  445. package/dist/public/monaco/vs/python-CqWUUgfu.js +1 -0
  446. package/dist/public/monaco/vs/qsharp-BzsFaUU9.js +1 -0
  447. package/dist/public/monaco/vs/r-f8dDdrp4.js +1 -0
  448. package/dist/public/monaco/vs/razor-hok5y9Km.js +1 -0
  449. package/dist/public/monaco/vs/redis-fvZQY4PI.js +1 -0
  450. package/dist/public/monaco/vs/redshift-45Et0LQi.js +1 -0
  451. package/dist/public/monaco/vs/restructuredtext-C7UUFKFD.js +1 -0
  452. package/dist/public/monaco/vs/ruby-CZO8zYTz.js +1 -0
  453. package/dist/public/monaco/vs/rust-Bfetafyc.js +1 -0
  454. package/dist/public/monaco/vs/sb-3GYllVck.js +1 -0
  455. package/dist/public/monaco/vs/scala-foMgrKo1.js +1 -0
  456. package/dist/public/monaco/vs/scheme-CHdMtr7p.js +1 -0
  457. package/dist/public/monaco/vs/scss-C1cmLt9V.js +3 -0
  458. package/dist/public/monaco/vs/shell-ClXCKCEW.js +1 -0
  459. package/dist/public/monaco/vs/solidity-MZ6ExpPy.js +1 -0
  460. package/dist/public/monaco/vs/sophia-DWkuSsPQ.js +1 -0
  461. package/dist/public/monaco/vs/sparql-AUGFYSyk.js +1 -0
  462. package/dist/public/monaco/vs/sql-32GpJSV2.js +1 -0
  463. package/dist/public/monaco/vs/st-CuDFIVZ_.js +1 -0
  464. package/dist/public/monaco/vs/swift-t-PfMj7W.js +1 -0
  465. package/dist/public/monaco/vs/systemverilog-Ch4vA8Yt.js +1 -0
  466. package/dist/public/monaco/vs/tcl-D74tq1nH.js +1 -0
  467. package/dist/public/monaco/vs/toggleHighContrast-qGX7E9o7.js +61 -0
  468. package/dist/public/monaco/vs/ts.worker-2QLmBukE.js +1 -0
  469. package/dist/public/monaco/vs/tsMode-B0S_kp2q.js +11 -0
  470. package/dist/public/monaco/vs/twig-C6taOxMV.js +1 -0
  471. package/dist/public/monaco/vs/typescript-_2t_511t.js +1 -0
  472. package/dist/public/monaco/vs/typespec-8OfoLt6R.js +1 -0
  473. package/dist/public/monaco/vs/vb-Dyb2648j.js +1 -0
  474. package/dist/public/monaco/vs/wgsl-BhLXMOR0.js +298 -0
  475. package/dist/public/monaco/vs/workers-BBttULjf.js +1 -0
  476. package/dist/public/monaco/vs/xml-cZjNDqDT.js +1 -0
  477. package/dist/public/monaco/vs/yaml-A1fOIdH6.js +1 -0
  478. package/dist/src-LbWcrSWe.js +3 -0
  479. package/dist/styles.css +2 -0
  480. package/dist/styles.d.ts +1 -0
  481. package/dist/types.d.ts +1 -0
  482. package/package.json +113 -4
@@ -0,0 +1,4 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t,r as n}from"./theme-controller-D-ATwFal.js";import{$ as r,A as i,An as a,Ar as o,B as s,Bn as c,Bt as l,C as u,Cr as d,Ct as f,D as p,Dn as m,Dr as h,E as g,En as _,Er as v,Et as y,F as ee,Ft as te,Gn as b,H as x,Hn as ne,In as S,Jn as C,Jt as re,K as ie,Kn as ae,Ln as w,Lt as oe,M as se,Mn as ce,Mr as le,N as ue,Nn as T,Nr as de,O as fe,Or as E,P as pe,Pt as me,Q as he,Rn as ge,S as _e,Sn as ve,Sr as ye,T as be,Tn as xe,Tr as D,U as Se,Un as Ce,V as we,Vt as Te,Wn as O,X as Ee,Xn as De,Xt as Oe,Yn as ke,Z as Ae,Zn as je,_ as k,_r as A,a as Me,b as Ne,bn as Pe,br as Fe,bt as Ie,c as Le,cr as Re,ct as ze,d as Be,er as Ve,et as He,f as Ue,fn as We,fr as Ge,g as Ke,gr as j,hn as qe,hr as Je,i as Ye,j as Xe,jn as Ze,jr as M,jt as Qe,k as $e,kr as N,kt as et,l as tt,lr as P,m as nt,mn as rt,mr as it,n as at,nn as ot,nr as st,o as ct,on as lt,p as ut,pn as dt,pr as ft,q as pt,r as mt,rr as F,s as ht,sn as gt,t as _t,tr as vt,tt as yt,u as bt,ut as xt,v as St,vr as Ct,w as wt,wr as Tt,x as Et,xn as Dt,xr as Ot,y as kt,yr as I,z as At,zn as jt,zt as Mt}from"./chart-data-DImT_Mzn.js";import{$ as Nt,$t as Pt,A as Ft,An as It,Ar as Lt,At as Rt,B as zt,Bn as Bt,Br as Vt,Bt as Ht,C as Ut,Cn as Wt,Cr as Gt,Ct as Kt,D as qt,Dn as Jt,Dr as Yt,Dt as Xt,E as Zt,En as Qt,Er as $t,Et as en,F as tn,Fn as nn,Fr as rn,Ft as an,G as on,Gn as sn,Gt as cn,H as ln,Hn as un,Hr as dn,Ht as fn,I as pn,In as mn,Ir as hn,It as gn,J as _n,Jn as vn,Jt as yn,K as bn,Kn as xn,Kt as Sn,L as Cn,Ln as wn,Lr as Tn,Lt as En,M as Dn,Mn as On,Mr as kn,Mt as An,N as jn,Nn as Mn,Nr as Nn,Nt as Pn,O as Fn,On as In,Or as Ln,Ot as Rn,P as zn,Pn as Bn,Pr as Vn,Pt as Hn,Q as Un,Qn as Wn,Qt as Gn,Rn as Kn,Rr as qn,Rt as Jn,S as Yn,Sn as Xn,Sr as Zn,St as Qn,T as $n,Tn as er,Tr as tr,Tt as nr,U as rr,Un as ir,Ur as ar,Ut as or,V as sr,Vn as cr,Vr as lr,Vt as ur,W as dr,Wn as fr,Wr as pr,Wt as mr,X as hr,Xn as gr,Xt as _r,Y as vr,Yn as yr,Yt as br,Z as xr,Zn as Sr,Zt as Cr,_ as wr,_n as Tr,_r as Er,_t as Dr,an as Or,ar as kr,at as Ar,b as jr,bn as Mr,br as Nr,bt as Pr,c as Fr,cn as Ir,cr as Lr,ct as Rr,d as zr,dn as Br,dr as Vr,dt as Hr,en as Ur,er as Wr,et as Gr,f as Kr,fn as qr,fr as Jr,ft as Yr,g as Xr,gn as Zr,gr as Qr,gt as $r,h as ei,hn as ti,hr as ni,ht as ri,i as ii,in as ai,ir as oi,it as si,j as ci,jn as li,jr as ui,jt as di,k as fi,kn as pi,kr as mi,kt as hi,l as gi,ln as _i,lr as vi,lt as yi,m as bi,mn as xi,mr as Si,mt as Ci,n as wi,nn as Ti,nr as L,nt as Ei,on as Di,or as Oi,ot as ki,p as Ai,pn as ji,pr as Mi,pt as Ni,q as Pi,qn as Fi,qt as Ii,r as Li,rn as Ri,rr as zi,rt as Bi,s as Vi,sn as Hi,sr as Ui,st as Wi,t as Gi,tn as Ki,tr as qi,tt as Ji,u as Yi,un as R,ur as Xi,ut as Zi,v as Qi,vn as $i,vr as ea,vt as ta,w as na,wn as ra,wr as ia,wt as aa,x as oa,xn as sa,xr as ca,xt as la,y as ua,yn as da,yr as fa,yt as pa,zn as ma,zr as ha,zt as ga}from"./chart-renderer-k-Rd8vdL.js";import{t as _a}from"./react-runtime-x2lFbSKq.js";import{i as va,r as ya}from"./OperationLogsPage-BeRnGcBJ.js";import ba,{useEffect as xa,useImperativeHandle as Sa,useLayoutEffect as Ca,useRef as wa,useState as Ta}from"react";import{Fragment as Ea,jsx as Da,jsxs as Oa}from"react/jsx-runtime";import{createPortal as ka}from"react-dom";var Aa;function ja(){return(ja=e((()=>{Aa=e=>e})))()}var z;function Ma(){return(Ma=e((()=>{(function(e){e[`desktop-browser`]=`desktop-browser`,e[`mobile-browser`]=`mobile-browser`,e.node=`node`,e.worker=`worker`,e.miniApp=`miniApp`,e.wx=`wx`,e.tt=`tt`,e.harmony=`harmony`,e[`desktop-miniApp`]=`desktop-miniApp`,e.lynx=`lynx`})(z||={})})))()}var B;function V(){return(V=e((()=>{(function(e){e.cartesianAxis=`cartesianAxis`,e.cartesianBandAxis=`cartesianAxis-band`,e.cartesianLinearAxis=`cartesianAxis-linear`,e.cartesianTimeAxis=`cartesianAxis-time`,e.cartesianLogAxis=`cartesianAxis-log`,e.cartesianSymlogAxis=`cartesianAxis-symlog`,e.polarAxis=`polarAxis`,e.polarBandAxis=`polarAxis-band`,e.polarLinearAxis=`polarAxis-linear`,e.crosshair=`crosshair`,e.cartesianCrosshair=`cartesianCrosshair`,e.polarCrosshair=`polarCrosshair`,e.dataZoom=`dataZoom`,e.geoCoordinate=`geoCoordinate`,e.indicator=`indicator`,e.discreteLegend=`discreteLegend`,e.continuousLegend=`continuousLegend`,e.colorLegend=`colorLegend`,e.sizeLegend=`sizeLegend`,e.markLine=`markLine`,e.markArea=`markArea`,e.markPoint=`markPoint`,e.polarMarkLine=`polarMarkLine`,e.polarMarkArea=`polarMarkArea`,e.polarMarkPoint=`polarMarkPoint`,e.geoMarkPoint=`geoMarkPoint`,e.tooltip=`tooltip`,e.title=`title`,e.player=`player`,e.scrollBar=`scrollBar`,e.label=`label`,e.totalLabel=`totalLabel`,e.brush=`brush`,e.poptip=`poptip`,e.customMark=`customMark`})(B||={})})))()}var Na;function Pa(){return(Pa=e((()=>{Vn(),kn(),Lt(),Vr(),hn(),Ln(),$t(),ia(),Zn(),Nr(),ea(),Qr(),Mi(),Ui(),Vt(),Oi(),oi(),yr(),sn(),fr(),un(),Bt(),Kn(),mn(),Bn(),On(),It(),pi(),Jt(),Qt(),ra(),Xn(),Mr(),$i(),Na=e=>new Promise((e=>{Lr.getRequestAnimationFrame()((()=>{e(null)}))})).then((()=>{let t=[];return e.getChildren().forEach((e=>{var n;(n=e.subLayers)!=null&&n.size&&e.subLayers.forEach((e=>{let n=e.drawContribution;n!=null&&n.hooks&&n.rendering&&t.push(new Promise((e=>{n.hooks.completeDraw.tap(`outWait`,(()=>{n.hooks.completeDraw.taps=n.hooks.completeDraw.taps.filter((e=>e.name!==`outWait`)),e(null)}))})))}))})),Promise.all(t)}))})))()}function Fa(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];n!==0&&r[0]===t[t.length-1]||t.push(r[0]),t.push(r[1])}return t}function Ia(){return(Ia=e((()=>{S()})))()}var La,Ra,za,Ba;function Va(){return(Va=e((()=>{o(),ce(),La=(e,...t)=>Ba.silent?null:a.getInstance().info(`[VChart log]: ${e}`,...t),Ra=(e,t)=>(M(Ba.warnHandler)&&Ba.warnHandler.call(null,e,t),t?a.getInstance().warn(`[VChart warn]: ${e}`,t):a.getInstance().warn(`[VChart warn]: ${e}`)),za=(e,t,n)=>{if(!Ba.silent){if(!M(Ba.errorHandler))throw Error(e);Ba.errorHandler.call(null,e,t)}},Ba={silent:!1,warnHandler:!1,errorHandler:!1}})))()}function Ha(e){return(e===`desktop-browser`||e===`mobile-browser`)&&Ga}function Ua(e){return Wa(e)||e===`mobile-browser`}function Wa(e){return e.includes(`miniApp`)||e===`lynx`||e===`wx`||e===`harmony`}var Ga,Ka;function qa(){return(qa=e((()=>{vi(),Ga=Xi(),Ka=Ga&&globalThis?globalThis.document:void 0})))()}function Ja(){return Ya>=9999999&&(Ya=0),Ya++}var Ya;function Xa(){return(Xa=e((()=>{Ya=0})))()}function Za(e){return e!=null&&e!==``&&(!!ft(e)||+e==+e)}function Qa(e){if(P(e))return e;let t=+e;return P(t)?t:0}function $a(e){return!(!e||e.length===0)&&!N(e[0])&&!N(e[0].dataId)&&A(e[0].fields)}function eo(e){return typeof e==`function`&&/^class\s/.test(e.toString())}function to(){return(to=e((()=>{Tt(),o(),j(),Ct(),Ge(),le(),it(),Fe(),E(),v(),Je(),Re(),ye()})))()}function no(e,t){let n=0,r=2*Math.PI,i=h(e),a=h(t);for(i||a?a?i?(n=e,r=t):(n=t-2*Math.PI,r=t):(n=e,r=e+2*Math.PI):(n=0,r=2*Math.PI);r<=n;)r+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI,r-=2*Math.PI;for(;r<0;)n+=2*Math.PI,r+=2*Math.PI;return{startAngle:n,endAngle:r}}function ro(e,t,n){return e.x1>t||e.x2<t||e.y1>n||e.y2<n}function io(e,t){let n=[];return e.forEach((e=>{let r=+e[t];P(r)&&n.push(r)})),n.length===0?null:jt(n)}function ao(e,t){let n=[];return e.forEach((e=>{let r=+e[t];P(r)&&n.push(r)})),n.length===0?null:ge(n)}function oo(e,t){return e.reduce(((e,n)=>{let r=t?+n[t]:+n;return P(r)&&(e+=r),e}),0)}function so(e,t){let n=0,r=0;return e.forEach((e=>{let i=t?+e[t]:+e;P(i)&&(n+=i,r++)})),n/r}function co(e,t){let n=so(e,t);return e.length<=1?0:e.reduce(((e,r)=>e+(t?+r[t]:+r-n)**2),0)/(e.length-1)}function lo(e,t){return Math.sqrt(co(e,t))}function uo(e,t){return m(e.map((e=>e[t])))}function fo(e,t,n){let{predict:r}=gt(e,(e=>e[t]),(e=>e[n])),i=io(e,t),a=ao(e,t),o=r(i),s=r(a);return[{[t]:i,[n]:o},{[t]:a,[n]:s}]}function po(e,t){let n=mo(e),r=mo(t),i=Math.asin((e.x*t.y-t.x*e.y)/n/r),a=Math.acos((e.x*t.x+e.y*t.y)/n/r);return i<0?-a:a}function mo(e,t={x:0,y:0}){return Mt.distancePP(e,t)}function ho(e,t=2){let n=e.reduce(((e,t)=>e+(isNaN(t)?0:t)),0);if(n===0)return 0;let r=10**t,i=e.map((e=>(isNaN(e)?0:e)/n*r*100)),a=100*r,o=i.map((e=>Math.floor(e))),s=o.reduce(((e,t)=>e+t),0),c=i.map(((e,t)=>e-o[t]));for(;s<a;){let e=-1/0,t=null;for(let n=0;n<c.length;n++)c[n]>e&&(e=c[n],t=n);++o[t],c[t]=0,++s}return o.map((e=>e/r))}var go;function _o(){return(_o=e((()=>{to(),ve(),v(),_(),S(),lt(),l(),te(),ti(),go=xe})))()}function vo(e,t,n){let r=!1;if(t&&M(t)){for(let i of e)for(let e of i.getSeries(n))if(r=!!t.call(null,e),r)return r}return r}function yo(e,t){let n=[];for(let r of e)for(let e of r.getSeries(t))n.push(e);return n}var bo;function xo(){return(xo=e((()=>{to(),bo=(e,t)=>{for(let n=0;n<e.length;n++){let r=e[n].getSeries();for(let e=0;e<r.length;e++){let n=r[e];if(t&&n&&n.coordinate===t||!t&&n)return n}}return null}})))()}function So(e){return function(t){let n;return n=A(e)?e.reduce(((e,t)=>e?.[t]),t):t?.[e],n}}function Co(e,t=!1){if(typeof e!=`object`||!e)return e;for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(e[n]===void 0){delete e[n];continue}t&&Co(e[n],t)}}function wo(){return(wo=e((()=>{vt(),je(),j()})))()}var To,Eo;function Do(){return(Do=e((()=>{(function(e){e.area=`area`,e.line=`line`,e.bar=`bar`,e.rangeColumn=`rangeColumn`,e.rangeArea=`rangeArea`,e.dot=`dot`,e.geo=`geo`,e.link=`link`,e.map=`map`,e.pie=`pie`,e.radar=`radar`,e.rose=`rose`,e.scatter=`scatter`,e.circularProgress=`circularProgress`,e.wordCloud=`wordCloud`,e.funnel=`funnel`,e.linearProgress=`linearProgress`,e.boxPlot=`boxPlot`,e.sankey=`sankey`,e.gaugePointer=`gaugePointer`,e.gauge=`gauge`,e.treemap=`treemap`,e.sunburst=`sunburst`,e.circlePacking=`circlePacking`,e.waterfall=`waterfall`,e.heatmap=`heatmap`,e.correlation=`correlation`,e.liquid=`liquid`,e.venn=`venn`,e.mosaic=`mosaic`,e.pictogram=`pictogram`})(To||={}),(function(e){e.label=`label`,e.point=`point`,e.line=`line`,e.area=`area`,e.bar=`bar`,e.boxPlot=`boxPlot`,e.outlier=`outlier`,e.circlePacking=`circlePacking`,e.group=`group`,e.gridBackground=`gridBackground`,e.grid=`grid`,e.dot=`dot`,e.title=`title`,e.subTitle=`subTitle`,e.symbol=`symbol`,e.funnel=`funnel`,e.transform=`transform`,e.transformLabel=`transformLabel`,e.outerLabel=`outerLabel`,e.outerLabelLine=`outerLabelLine`,e.pin=`pin`,e.pinBackground=`pinBackground`,e.pointer=`pointer`,e.segment=`segment`,e.track=`track`,e.cell=`cell`,e.cellBackground=`cellBackground`,e.link=`link`,e.arrow=`arrow`,e.pie=`pie`,e.labelLine=`labelLine`,e.progress=`progress`,e.minLabel=`minLabel`,e.maxLabel=`maxLabel`,e.rose=`rose`,e.node=`node`,e.sunburst=`sunburst`,e.nonLeaf=`nonLeaf`,e.leaf=`leaf`,e.nonLeafLabel=`nonLeafLabel`,e.leaderLine=`leaderLine`,e.stackLabel=`stackLabel`,e.word=`word`,e.fillingWord=`fillingWord`,e.wordMask=`wordMask`,e.nodePoint=`nodePoint`,e.ripplePoint=`ripplePoint`,e.centerPoint=`centerPoint`,e.centerLabel=`centerLabel`,e.barBackground=`barBackground`,e.lineLabel=`lineLabel`,e.areaLabel=`areaLabel`,e.liquidGroup=`liquidGroup`,e.liquid=`liquid`,e.liquidBackground=`liquidBackground`,e.liquidOutline=`liquidOutline`,e.circle=`circle`,e.overlap=`overlap`,e.overlapLabel=`overlapLabel`})(Eo||={})})))()}function Oo(e){let{type:t}=e;return t===To.sankey?e.direction??`horizontal`:e.direction??`vertical`}function ko(){return(ko=e((()=>{Do()})))()}function Ao(e,t){let n=jo[t];if(n&&e[n])return e[n];if(e[t])return e[t];let r=Mo[t];return r?e[r]:void 0}var jo,Mo;function No(){return(No=e((()=>{jo={primaryFontColor:`titleFontColor`,tertiaryFontColor:`labelFontColor`,axisLabelFontColor:`axisFontColor`,axisMarkerFontColor:`labelReverseFontColor`,dataZoomHandleStrokeColor:`dataZoomHandlerStrokeColor`,sliderHandleColor:`dataZoomHandlerFillColor`,sliderRailColor:`dataZoomBackgroundColor`,sliderTrackColor:`dataZoomSelectedColor`,playerControllerColor:`dataZoomSelectedColor`,popupBackgroundColor:`tooltipBackgroundColor`,hoverBackgroundColor:`axisGridColor`},Mo={titleFontColor:`primaryFontColor`,labelFontColor:`tertiaryFontColor`,axisFontColor:`axisLabelFontColor`,labelReverseFontColor:`axisMarkerFontColor`,dataZoomHandlerStrokeColor:`dataZoomHandleStrokeColor`,dataZoomHandlerFillColor:`sliderHandleColor`,dataZoomBackgroundColor:`sliderRailColor`,dataZoomSelectedColor:`sliderTrackColor`,tooltipBackgroundColor:`popupBackgroundColor`}})))()}function Po(e,t){if(!e)return[];let n=Bo(e,t);if(!n||A(n))return n??[];if(D(n)){let{dataScheme:r}=n;return r?Ro(r)?r.map((n=>Object.assign(Object.assign({},n),{scheme:n.scheme.map((n=>Lo(n)?Io(e,n,t):n)).filter(h)}))):r.map((n=>Lo(n)?Io(e,n,t):n)).filter(h):[]}return[]}function Fo(e,t){return Ro(e)?e.find((e=>h(e.isAvailable)?M(e.isAvailable)?e.isAvailable(t):!!e.isAvailable:!h(e.maxDomainLength)||t?.length<=e.maxDomainLength))?.scheme??e[e.length-1].scheme:e}function Io(e,t,n){let i=Bo(e,n);if(!i)return;let a,{palette:o}=i;if(D(o)&&(a=Ao(o,t.key)??t.default),!a)return;if(N(t.a)&&N(t.l)||!I(a))return a;let s=new Ee(a);if(h(t.l)){let{r:e,g:n,b:i}=s.color,{h:a,s:o}=r(e,n,i),c=He(a,o,t.l),l=new Ee(`rgb(${c.r}, ${c.g}, ${c.b})`);l.setOpacity(s.color.opacity),s=l}return h(t.a)&&s.setOpacity(t.a),s.toRGBA()}function Lo(e){return e&&e.type===`palette`&&!!e.key}function Ro(e){return!(!A(e)||e.length===0)&&e.every((e=>h(e.scheme)))}function zo(e){return A(e)?{dataScheme:e}:e}function Bo(e,t){let{type:n}=t??{},r;if(!t||N(n))r=e?.default;else{let i=Oo(t);r=e?.[`${n}_${i}`]??e?.[n]??e?.default}return r}var Vo;function Ho(){return(Ho=e((()=>{j(),o(),Tt(),Ct(),v(),E(),Ae(),he(),yt(),ko(),No(),Vo=(e,t)=>{if(t&&Lo(e)){let n=Io(t,e);if(n)return n}return e}})))()}var Uo;function Wo(){return(Wo=e((()=>{Ue(),Ho(),Uo=class extends Be{setSpecified(e){return this._specified=e?Object.assign({},e):{},this}range(e){return e?(this._range=e,this._resetRange(),this):super.range()}domain(e){return e?(super.domain(e),this._resetRange(),this):super.domain()}_resetRange(){if(!Ro(this._range))return void super.range(this._range);let e=Fo(this._range,this._domain);super.range(e)}}})))()}function Go(e){let t=Zo[e];return t?new t:null}function Ko(e,t){if(`scale`in e&&e.scale)return I(e.scale)&&t?.globalScale?t.globalScale.registerMarkAttributeScale(e,t.seriesId):e.scale;let n=Go(e.type);return n&&qo(n,e),n}function qo(e,t){e&&t&&(t.domain&&e.domain(t.domain),t.range&&e.range(t.range),t.specified&&e.specified&&e.specified(t.specified),t.clamp&&e.clamp&&e.clamp(t.clamp))}function Jo(e,t,n){if(!t)return e;let r=t.range(),i=n&&t._calculateWholeRange?t._calculateWholeRange(r):t.range(),a=Math.min(i[0],i[i.length-1]),o=Math.max(i[0],i[i.length-1]);return Math.min(Math.max(a,e),o)}function Yo(e,t,n){if(!t)return!0;let r=t.range(),i=(n&&t._calculateWholeRange?t._calculateWholeRange(r):t.range()).map((e=>t.invert(e))),a=Math.min(i[0],i[i.length-1]),o=Math.max(i[0],i[i.length-1]);return Array.isArray(e)?e.every((e=>e>=a&&e<=o)):e>=a&&e<=o}function Xo(e){return h(e?.field)&&h(e?.scale)}var Zo;function Qo(){return(Qo=e((()=>{Ct(),v(),bt(),Le(),Ue(),Ye(),at(),Wo(),Zo={linear:ht,band:tt,point:mt,ordinal:Be,threshold:_t,colorOrdinal:Uo}})))()}function $o(e){switch(e){case`left`:case`right`:case`top`:case`bottom`:return!0;default:return!1}}function es(e){return!!I(e)&&!!e.endsWith(`%`)&&Za(e.substring(0,e.length-1))}function ts(e){return!!D(e)&&(`percent`in e||`offset`in e)}function ns(e,t,n,r=0){return ft(e)?e:es(e)?Number(e.substring(0,e.length-1))*t/100:M(e)?e(n):D(e)?t*(e.percent??0)+(e.offset??0):r}function rs(e,t,n){let r={top:0,bottom:0,left:0,right:0};return Object.values(e).every((e=>ft(e)))?(r.top=e.top??0,r.right=e.right??0,r.bottom=e.bottom??0,r.left=e.left??0,r):([{orients:[`left`,`right`],size:t.width},{orients:[`top`,`bottom`],size:t.height}].forEach((t=>{t.orients.forEach((i=>{r[i]=ns(e[i],t.size,n)}))})),r)}function is(e,t){return e?{width:Math.ceil(Math.min(e.x2-e.x1,t.width)),height:Math.ceil(Math.min(e.y2-e.y1,t.height))}:{width:0,height:0}}function as(e){let t={};return A(e)?(N(e[0])||(t.top=t.left=t.bottom=t.right=e[0]),N(e[1])||(t.left=t.right=e[1]),N(e[2])||(t.bottom=e[2]),N(e[3])||(t.left=e[3]),t):ft(e)||es(e)||M(e)||ts(e)?(t.top=t.left=t.bottom=t.right=e,t):(D(e)&&(t=Object.assign({},e)),t)}function os(e,t,n){return n?{x:e.x+t.x,y:e.y+t.y}:e}var ss;function cs(){return(cs=e((()=>{j(),to(),ss=(e,t)=>{let n=Number(e),r=e.toString();return isNaN(n)&&r[r.length-1]===`%`?t*(Number(r.slice(0,r.length-1))/100):n}})))()}var ls;function us(){return(us=e((()=>{ls=[{maxDomainLength:10,scheme:[`#1664FF`,`#1AC6FF`,`#FF8A00`,`#3CC780`,`#7442D4`,`#FFC400`,`#304D77`,`#B48DEB`,`#009488`,`#FF7DDA`]},{scheme:[`#1664FF`,`#B2CFFF`,`#1AC6FF`,`#94EFFF`,`#FF8A00`,`#FFCE7A`,`#3CC780`,`#B9EDCD`,`#7442D4`,`#DDC5FA`,`#FFC400`,`#FAE878`,`#304D77`,`#8B959E`,`#B48DEB`,`#EFE3FF`,`#009488`,`#59BAA8`,`#FF7DDA`,`#FFCFEE`]}]})))()}var ds;function fs(){return(fs=e((()=>{us(),ds={default:{dataScheme:ls,palette:{backgroundColor:`#ffffff`,borderColor:`#e3e5e8`,shadowColor:`rgba(33,37,44,0.1)`,hoverBackgroundColor:`#f1f2f5`,sliderRailColor:`#f1f3f4`,sliderHandleColor:`#ffffff`,sliderTrackColor:`#0040ff`,popupBackgroundColor:`#ffffff`,primaryFontColor:`#21252c`,secondaryFontColor:`#606773`,tertiaryFontColor:`#89909d`,axisLabelFontColor:`#89909d`,disableFontColor:`#bcc1cb`,axisMarkerFontColor:`#ffffff`,axisGridColor:`#f1f2f5`,axisDomainColor:`#d9dde4`,dataZoomHandleStrokeColor:`#aeb5be`,dataZoomChartColor:`#c9ced8`,playerControllerColor:`#0040ff`,scrollBarSliderColor:`rgba(0,0,0,0.3)`,axisMarkerBackgroundColor:`#21252c`,markLabelBackgroundColor:`#f1f2f5`,markLineStrokeColor:`#606773`,dangerColor:`#e33232`,warningColor:`#ffc528`,successColor:`#07a35a`,infoColor:`#3073f2`,discreteLegendPagerTextColor:`rgb(51, 51, 51)`,discreteLegendPagerHandlerColor:`rgb(47, 69, 84)`,discreteLegendPagerHandlerDisableColor:`rgb(170, 170, 170)`,emptyCircleColor:`#e3e5e8`,linearProgressTrackColor:`#E7EBED`}}}})))()}var ps,ms;function hs(){return(hs=e((()=>{ps={text:{style:{fontSize:{type:`token`,key:`l4FontSize`},fontWeight:`normal`,fillOpacity:1}}},ms={label:{style:{fontSize:{type:`token`,key:`l4FontSize`},fontWeight:`normal`,fillOpacity:1,lineJoin:`bevel`}},area:{style:{fillOpacity:.2}},line:{style:{lineWidth:2,lineCap:`round`,lineJoin:`round`}},point:{style:{size:8,stroke:{type:`palette`,key:`backgroundColor`},lineWidth:1,fillOpacity:1}},word:{style:{fontWeight:null,fontSize:null}},fillingWord:{style:{fontWeight:null,fontSize:null}},barBackground:{visible:!1,style:{fill:{type:`palette`,key:`primaryFontColor`,a:.06},stroke:`transparent`}}}})))()}function gs(e,t){return e&&t.key in e?e[t.key]:t.default}function _s(e){return e&&e.type===`token`&&!!e.key}var vs;function ys(){return(ys=e((()=>{vs={fontFamily:`PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,'-apple-system',segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol`,fontSize:14,l1FontSize:32,l1LineHeight:`150%`,l2FontSize:20,l2LineHeight:`140%`,l3FontSize:16,l3LineHeight:`150%`,l4FontSize:14,l4LineHeight:`150%`,l5FontSize:12,l5LineHeight:`130%`,l6FontSize:10,l6LineHeight:`120%`}})))()}var bs;function xs(){return(xs=e((()=>{bs={visible:!0,position:`auto`,padding:8,titleStyle:{fontSize:{type:`token`,key:`l5FontSize`},fontWeight:`bold`,fill:{type:`palette`,key:`primaryFontColor`}},contentStyle:{fontSize:{type:`token`,key:`l5FontSize`},fill:{type:`palette`,key:`primaryFontColor`}},panel:{visible:!0,fill:{type:`palette`,key:`popupBackgroundColor`},cornerRadius:3,lineWidth:0,shadowBlur:12,shadowOffsetX:0,shadowOffsetY:4,shadowColor:{type:`palette`,key:`shadowColor`},size:0,space:12}}})))()}var Ss;function Cs(){return(Cs=e((()=>{fs(),hs(),ys(),xs(),Ss={name:`light`,background:{type:`palette`,key:`backgroundColor`},padding:20,fontFamily:{type:`token`,key:`fontFamily`},colorScheme:ds,token:vs,component:{poptip:bs},mark:ps,markByName:ms,animationThreshold:2e3}})))()}var ws;function Ts(){return(Ts=e((()=>{us(),ws={default:{dataScheme:ls,palette:{backgroundColor:`#202226`,borderColor:`#404349`,shadowColor:`rgba(0,0,0,0.1)`,hoverBackgroundColor:`#404349`,sliderRailColor:`#404349`,sliderHandleColor:`#202226`,sliderTrackColor:`#4284FF`,popupBackgroundColor:`#404349`,primaryFontColor:`#fdfdfd`,secondaryFontColor:`#bbbdc3`,tertiaryFontColor:`#888c93`,axisLabelFontColor:`#888c93`,disableFontColor:`#55595f`,axisMarkerFontColor:`#202226`,axisGridColor:`#404349`,axisDomainColor:`#4b4f54`,dataZoomHandleStrokeColor:`#bbbdc3`,dataZoomChartColor:`#55595F`,playerControllerColor:`#4284FF`,scrollBarSliderColor:`rgba(255,255,255,0.3)`,axisMarkerBackgroundColor:`#fdfdfd`,markLabelBackgroundColor:`#404349`,markLineStrokeColor:`#bbbdc3`,dangerColor:`#eb4b4b`,warningColor:`#f0bd30`,successColor:`#14b267`,infoColor:`#4284ff`,discreteLegendPagerTextColor:`#BBBDC3`,discreteLegendPagerHandlerColor:`#BBBDC3`,discreteLegendPagerHandlerDisableColor:`#55595F`,emptyCircleColor:`#bbbdc3`,linearProgressTrackColor:`#404349`}}}})))()}var Es;function Ds(){return(Ds=e((()=>{Ts(),Es={name:`dark`,colorScheme:ws,component:{dataZoom:{selectedBackground:{style:{fillOpacity:.4,outerBorder:{strokeOpacity:.4}}}}}}})))()}var Os,ks,As;function js(){return(js=e((()=>{Xe(),ee(),ue(),fe(),Os=Symbol.for(`@visactor/vchart/factory-registry@2.1.7`),ks=globalThis,As=ks[Os]??(ks[Os]={charts:{},series:{},components:{},graphicComponents:{},marks:{},regions:{},animations:{},implements:{},chartPlugin:{},vChartPlugin:{},componentPlugin:{},transforms:{fields:i,filter:pe,fold:se},dataParser:{csv:g,dsv:p,tsv:$e},layout:{},grammarTransforms:{},stageEventPlugins:{},interactionTriggers:{},composedEventMap:{},tooltipProcessors:{},runtimePluginInstallers:{},formatter:void 0})})))()}var H;function U(){return(U=e((()=>{js(),H=class e{static registerChart(t,n){e._charts[t]=n}static registerSeries(t,n){e._series[t]=n}static registerComponent(t,n,r,i){e._components[t]={cmp:n,alwaysCheck:r,createOrder:i??0}}static registerGraphicComponent(t,n){e._graphicComponents[t]=n}static createGraphicComponent(t,n,r){let i=e._graphicComponents[t];return i?i(n,r):null}static registerMark(t,n){e._marks[t]=n}static registerRegion(t,n){e._regions[t]=n}static registerTransform(t,n){e.transforms[t]=n}static registerGrammarTransform(t,n){e._grammarTransforms[t]=n}static getGrammarTransform(t){return e._grammarTransforms[t]}static registerLayout(t,n){e._layout[t]=n}static registerAnimation(t,n){e._animations[t]=n}static registerImplement(t,n){e._implements[t]=n}static registerChartPlugin(t,n){e._chartPlugin[t]=n}static registerVChartPlugin(t,n){e._vChartPlugin[t]=n}static registerComponentPlugin(t,n){e._componentPlugin[t]=n}static createChart(t,n,r){return e._charts[t]?new e._charts[t](n,r):null}static getChart(t){return e._charts[t]}static createChartSpecTransformer(t,n){if(!e._charts[t])return null;let r=e._charts[t];return new r.transformerConstructor(Object.assign({seriesType:r.seriesType},n))}static createRegion(t,n,r){return e._regions[t]?new e._regions[t](n,r):null}static createRegionSpecTransformer(t,n){return e._regions[t]?new e._regions[t].transformerConstructor(n):null}static createSeries(t,n,r){return e._series[t]?new e._series[t](n,r):null}static createSeriesSpecTransformer(t,n){return e._series[t]?new e._series[t].transformerConstructor(n):null}static createMark(t,n,r){if(!e._marks[t])return null;let i=new e._marks[t](n,r);return i.type===`group`&&i.setMarkConfig({interactive:!1}),i}static getComponents(){return Object.values(e._components)}static getComponentInKey(t){return e._components[t].cmp}static getLayout(){return Object.values(e._layout)}static getLayoutInKey(t){return e._layout[t]}static getSeries(){return Object.values(e._series)}static getSeriesInType(t){return e._series[t]}static getRegionInType(t){return e._regions[t]}static getAnimationInKey(t){return e._animations[t]}static getImplementInKey(t){return e._implements[t]}static getSeriesMarkMap(t){return e._series[t]?e._series[t].mark:{}}static getSeriesBuiltInTheme(t){for(let n in e._series){let r=e._series[n];if(r&&r.builtInTheme&&r.builtInTheme[t])return r.builtInTheme[t]}return null}static getComponentBuiltInTheme(t){for(let n in e._components){let r=e._components[n];if(r&&r.cmp&&r.cmp.builtInTheme&&r.cmp.builtInTheme[t])return r.cmp.builtInTheme[t]}return null}static getChartPlugins(){return Object.values(e._chartPlugin)}static getVChartPlugins(){return Object.values(e._vChartPlugin)}static getComponentPlugins(){return Object.values(e._componentPlugin)}static getComponentPluginInType(t){return e._componentPlugin[t]}static registerFormatter(e){this._formatter=e,As.formatter=e}static getFormatter(){return As.formatter??this._formatter}static createInteractionTrigger(t,n){let r=e._interactionTriggers[t];return r?new r(n):null}static hasInteractionTrigger(t){return!!e._interactionTriggers[t]}static getComposedEvent(t){return e._composedEventMap[t]}},H._charts=As.charts,H._series=As.series,H._components=As.components,H._graphicComponents=As.graphicComponents,H._marks=As.marks,H._regions=As.regions,H._animations=As.animations,H._implements=As.implements,H._chartPlugin=As.chartPlugin,H._vChartPlugin=As.vChartPlugin,H._componentPlugin=As.componentPlugin,H.transforms=As.transforms,H.dataParser=As.dataParser,H._layout=As.layout,H._grammarTransforms=As.grammarTransforms,H._stageEventPlugins=As.stageEventPlugins,H.registerStageEventPlugin=(e,t)=>{H._stageEventPlugins[e]=t},H.getStageEventPlugin=e=>H._stageEventPlugins[e],H._interactionTriggers=As.interactionTriggers,H.registerInteractionTrigger=(e,t)=>{H._interactionTriggers[e]=t},H._composedEventMap=As.composedEventMap,H.registerComposedEvent=(e,t)=>{H._composedEventMap[e]=t},H._tooltipProcessors=As.tooltipProcessors,H.registerTooltipProcessor=(e,t)=>{H._tooltipProcessors[e]=t},H.createTooltipProcessor=(e,t)=>{let n=H._tooltipProcessors[e];return n?new n(t):null},H._runtimePluginInstallers=As.runtimePluginInstallers,H.registerRuntimePluginInstaller=(e,t)=>{H._runtimePluginInstallers[e]=t},H.getRuntimePluginInstaller=e=>H._runtimePluginInstallers[e]})))()}function Ms(e,...t){return R(Ns(e),...t.map(Ns))}function Ns(e){if(!e)return e;let t=Ps(e.colorScheme);return Object.assign({},e,{colorScheme:t,token:e.token??{},series:Object.assign({},e.series)})}function Ps(e){return e&&=Object.keys(e).reduce(((t,n)=>{let r=e[n];return t[n]=zo(r),t}),{}),e}function Fs(e,t,n){let r=H.getSeriesMarkMap(t);if(!r)return e;let i={};return Object.values(r).forEach((({type:t,name:r})=>{i[r]=R({},n(`mark`,T(t)[0]),n(`markByName`,r),e?.[r])})),Object.assign(Object.assign({},e),i)}function Is(){return(Is=e((()=>{S(),Ho(),_i(),U()})))()}var Ls,Rs,zs,Bs,Vs,Hs,Us,Ws,Gs,Ks;function qs(){return(qs=e((()=>{Cs(),Ds(),Ct(),Is(),Ls={[Ss.name]:Ss},Rs=Ss.name,zs=new Map(Object.keys(Ls).map((e=>[e,Ls[e]]))),Bs=/* @__PURE__ */ new Map,Vs=new Map(Object.keys(Ls).map((e=>[e,e===Rs]))),Hs=(e,t)=>{if(!e)return;let n=Ks(t);zs.set(e,n),Vs.set(e,!0)},Us=(e=Rs)=>(Vs.has(e)&&!Vs.get(e)&&Hs(e,zs.get(e)),zs.get(e)),Ws=e=>zs.delete(e)&&Bs.delete(e)&&Vs.delete(e),Gs=e=>!!I(e)&&zs.has(e),Ks=e=>{let t=e.type??Rs;return Ms({},Us(t),e)}})))()}var Js;function Ys(){return(Ys=e((()=>{S(),Js=class e{static registerInstance(t){e.instances.set(t.id,t)}static unregisterInstance(t){e.instances.delete(t.id)}static getInstance(t){return e.instances.get(t)}static instanceExist(t){return e.instances.has(t)}static forEach(t,n=[],r){let i=T(n);return e.instances.forEach(((e,n,r)=>{i.includes(n)||t(e,n,r)}),r)}},Js.instances=/* @__PURE__ */ new Map})))()}var Xs;function Zs(){return(Zs=e((()=>{qs(),Ys(),Xs=class e{static registerTheme(e,t){Hs(e,t)}static getTheme(e,t=!1){return Us(e)}static removeTheme(e){return Ws(e)}static themeExist(e){return Gs(e)}static getDefaultTheme(){return e.themes.get(Rs)}static setCurrentTheme(t){e.themeExist(t)&&(e._currentThemeName=t,Js.forEach((e=>e?.setCurrentTheme(t))))}static getCurrentTheme(t=!1){return e.getTheme(e._currentThemeName,t)}static getCurrentThemeName(){return e._currentThemeName}},Xs.themes=zs,Xs._currentThemeName=Rs})))()}function Qs(e){return I(e)?Xs.themeExist(e)?Xs.getTheme(e):{}:D(e)?e:{}}function $s(){return($s=e((()=>{Zs(),Tt(),Ct()})))()}function ec(e,t,n){if(!e)return e;t||=e.colorScheme,n||=e.token;let r={};return Object.keys(e).forEach((i=>{let a=e[i];tc.includes(i)?r[i]=a:d(a)?Lo(a)?r[i]=Vo(a,t):_s(a)?r[i]=gs(n,a):r[i]=ec(a,t,n):r[i]=a})),r}var tc;function nc(){return(nc=e((()=>{ye(),Ho(),tc=[`animationThreshold`,`colorScheme`,`name`,`padding`]})))()}function rc(e,t={data:e=>e}){if(!e)return e;if(e.constructor===Object){let n={};for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t[r]){n[r]=t[r](e[r]);continue}n[r]=rc(e[r],t)}return n}return A(e)?e.map((e=>rc(e,t))):e}function ic(e,t){if(!e)return e;if(I(e))return t.getFunction(e)??e;if(d(e)){let n={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=ic(e[r],t));return n}return A(e)?e.map((e=>ic(e,t))):e}function ac(e,...t){return M(e)?e(...t):e}function oc(){return(oc=e((()=>{j(),o(),ye(),Ct()})))()}var sc,cc;function lc(){return(lc=e((()=>{Tr(),ys(),sc=(e,t,n)=>Zr(e,t,n,{fontFamily:vs.fontFamily,fontSize:vs.fontSize}),cc=(e,t,n,r)=>sc(t,n,r).measure(e)})))()}var W;function uc(){return(uc=e((()=>{W=`__VCHART`})))()}var dc,fc,pc,mc,hc,gc,_c,vc,yc,bc,xc,Sc,Cc,wc,Tc,Ec;function Dc(){return(Dc=e((()=>{uc(),`${W}`,dc=`${W}_DEFAULT_DATA_INDEX`,fc=`${W}_DEFAULT_DATA_KEY`,pc=`${W}_DEFAULT_DATA_SERIES_FIELD`,mc=`${W}_DEFAULT_SERIES_STYLE_NAME`,hc=`${W}_STACK_KEY`,gc=`${W}_STACK_START`,_c=`${W}_STACK_END`,vc=`${W}_STACK_START_PERCENT`,yc=`${W}_STACK_END_PERCENT`,bc=`${W}_STACK_START_OffsetSilhouette`,xc=`${W}_STACK_END_OffsetSilhouette`,Sc=`${W}_STACK_TOTAL`,Cc=`${W}_STACK_TOTAL_PERCENT`,wc=`${W}_STACK_TOTAL_TOP`,Tc=`${W}_STACK_TOTAL_BOTTOM`,`${W}`,`${W}`,`${W}`,`${W}`,`${W}`,`${W}`,Ec=`${W}_KEY`,`${W}`})))()}function Oc(e,t){for(let n=0;n<t.length;n++){let r=t[n],i=kc(e,r.key);i?i.operations=[...new Set(i.operations.concat(r.operations))]:e.push(r)}return e}function kc(e,t){return e.find((e=>e.key===t))}function Ac(e,t){if(!e)return t??null;let n=e.getFields();return n&&n[t]?n[t].alias??t:t??null}function jc(e,t,n){let r=e.getStackSort(),i={},a=null;return r&&(a={},e.getSeries().forEach((e=>{let t=e.getSeriesField();if(t){let n=e.getRawDataStatisticsByField(t);n.values&&(a[t]||(a[t]={lastIndex:0,sort:{}}),n.values.forEach(((e,n)=>{e in a[t].sort||(a[t].sort[e]=a[t].lastIndex,a[t].lastIndex++)})))}}))),e.getSeries().forEach((e=>{let r=e.getStackData(),o=e.getStackValue(),s=e.getStackValueField(),c=!n||n(e);r&&s&&c&&(i[o]=i[o]??{groupField:r.groupField,nodes:{}},Ic(e,r,i[o],s,t,a))})),r?Mc(i,a):i}function Mc(e,t){for(let n in e)e[n].sortDatums?.length?(e[n].sortDatums.sort(((e,t)=>e.index-t.index)),e[n].values=e[n].sortDatums.map((e=>e.datum))):Mc(e[n].nodes,t);return e}function Nc(e,t){if(`values`in e&&e.values.length){let n=oo(e.values,t),r=ao(e.values,yc);e.values.forEach((e=>{e[Sc]=n,e[Cc]=r}))}else for(let n in e.nodes)Nc(e.nodes[n],t)}function Pc(e){if(!e.values.length)return;let t=e.values[e.values.length-1][_c]/2;for(let n=0;n<e.values.length;n++)e.values[n][bc]=e.values[n][gc]-t,e.values[n][xc]=e.values[n][_c]-t}function Fc(e,t,n,r,i={key:hc,start:gc,end:_c,startPercent:vc,endPercent:yc,max:wc,min:Tc}){let a=r&&h(i.min),o=r&&h(i.max);if(e.values.length>0){let r=0,s=0,c=1,l=0,u=null,d=null,f=e.values.length;for(let n=0;n<f;n++){let c=e.values[t?f-1-n:n];l=c[i.end],l>=0?(c[i.start]=r,r+=c[i.end],c[i.end]=r):(c[i.start]=s,s+=c[i.end],c[i.end]=s),c[i.key]=e.key,o&&(delete c[i.max],(!d||c[i.end]>d[i.end])&&(d=c)),a&&(delete c[i.min],(!u||c[i.start]<u[i.start])&&(u=c))}if(o&&d&&(d[i.max]=!0),a&&u&&(u[i.min]=!0),n)for(let n=0;n<f;n++){let a=e.values[t?f-1-n:n];l=a[i.end];let o=l>=0?r:s;c=l>=0?1:-1,a[i.startPercent]=o===0?0:Math.min(1,a[i.start]/o)*c,a[i.endPercent]=o===0?0:Math.min(1,a[i.end]/o)*c}}for(let a in e.nodes)Fc(e.nodes[a],t,n,r,i)}function Ic(e,t,n,r,i,a,o){if(`values`in t){if(i&&t.values.forEach((e=>e[_c]=Qa(e[r]))),n.series.push({s:e,values:t.values}),a){let r=e.getSeriesField();t.values.forEach((t=>{n.sortDatums.push({series:e,datum:t,index:r?a[r].sort[t[r]]:0})}))}else n.values.push(...t.values)}else for(let s in t.nodes){let c=o?`${o}_${s}`:s;n.nodes[s]||(n.nodes[s]={values:[],series:[],nodes:{},sortDatums:[],key:c},h(t.nodes[s]?.groupField)&&(n.nodes[s].groupField=t.nodes[s].groupField)),Ic(e,t.nodes[s],n.nodes[s],r,i,a,c)}}function Lc(){return(Lc=e((()=>{Dc(),to(),_o()})))()}function Rc(e,t=`value`,n=`children`){return!!D(e)&&!!e.hasOwnProperty(n)&&Array.isArray(e[n])}function zc(e,t,n,r=`value`,i=`children`){return Array.isArray(e)?e.map((e=>{let a=Object.assign({},e);return Array.isArray(a[i])&&(a[i]=zc(a[i],t,n,r,i)),a})).filter((e=>+e[r]>=t&&+e[r]<=n||e[i]&&e[i].length>0)):e}var Bc,Vc,Hc;function Uc(){return(Uc=e((()=>{Tt(),Bc=(e,t,n=`key`,r=`children`)=>{for(let i=0;i<e.length;i++){let a=e[i];if(a[n]===t)return a;if(a[r]){let e=Bc(a[r],t,n,r);if(e)return e}}return null},Vc=(e,t,n=`key`,r=`children`)=>{for(let i=0;i<e.length;i++){let a=e[i];if(a[r])for(let e=0;e<a[r].length;e++){let i=a[r][e];if(i[n]===t)return a;let o=Vc([i],t,n,r);if(o)return o}}return null},Hc=(e,t,n=`key`,r=`children`)=>{let i=[],a=(e,o)=>{for(let s of e){if(s[n]===t)return i.push(...o,s[n].toString()),!0;if(s[r]){let e=a(s[r],[...o,s[n]]);if(!0===e)return e}}return!1};return a(e,[]),i}})))()}function Wc(e){let t=e?.datum;return t&&typeof t==`object`?Object.assign(Object.assign({},t),e):e}function Gc(e){return!M(e)&&!F(e)&&Object.keys(e).some((t=>M(e[t])))}function Kc(e,t,n,r,i){let a=Wc(t);if(M(e))return G(e(a,n,r,i));if(Gc(e)){let t=Object.assign({},e);return Object.keys(t).forEach((e=>{M(t[e])&&(t[e]=t[e](a,n,r,i))})),G(t)}return G(e)}function qc(e={}){let t=Object.assign({},e);if(M(e.style)||Gc(e.style)?t.style=(t,n,r,i)=>Kc(e.style,t,n,r,i):F(e.style)||(t.style=G(e.style)),!F(e.state)){let n={};Object.keys(e.state).forEach((t=>{M(e.state[t])||Gc(e.state[t])?n[t]=(n,r,i,a)=>Kc(e.state[t],n,r,i,a):F(e.state[t])||(n[t]=G(e.state[t]))})),t.state=n}return t}function Jc(e){if(F(e))return null;let t={};return Object.keys(e).forEach((n=>{M(e[n])?t[n]=(t,r,i,a)=>G(e[n](t,r,i,a)):F(e[n])||(t[n]=G(e[n]))})),t}function Yc(e){if(F(e))return null;let t={};return Object.keys(e).forEach((n=>{M(e[n])?t[n]=(t,r,i,a)=>G(e[n](t.rawValue,r,t,i,a)):F(e[n])||(t[n]=G(e[n]))})),t}function Xc(e,t){if(F(e))return null;let n={};return Object.keys(e).forEach((r=>{M(e[r])?n[r]=e[r](t):n[r]=e[r]})),G(n)}function G(e){return e?.angle?Object.assign(Object.assign({},e),{angle:me(e.angle)}):e}function Zc(){return(Zc=e((()=>{st(),o(),te()})))()}var Qc,$c,el,tl,nl;function rl(){return(rl=e((()=>{Qc=e=>e?.glyphHost??e,$c=e=>e===`line`||e===`area`,el=e=>{if(!e||!e.context)return null;let{data:t,markType:n}=e.context;return(r=n)===`line`||r===`area`?t:t?.[0];var r},tl=(e,t)=>{let n=Qc(t);if(n?.context)return n;for(;n?.parent&&n.parent!==e;)if(n=Qc(n.parent),n.context)return n;return null},nl=(e,t)=>{let n=e.getAttributes(!0),r={};return Object.keys(t).forEach((e=>{n[e]!==t[e]&&(r[e]=t[e])})),r}})))()}var il;function al(){return(al=e((()=>{U(),il=class{getComposedEventMap(){return this._composedEventMap}constructor(e,t){this._composedEventMap=/* @__PURE__ */ new Map,this._eventHandlerMap=/* @__PURE__ */ new Map,this._eventDispatcher=e,this._mode=t}on(e,t,n){let r=typeof t==`function`?{query:null,callback:t}:{query:t,callback:n},i=H.getComposedEvent(e);if(i){let t=new i(this._eventDispatcher,this._mode);t.register(e,r),this._composedEventMap.set(r.callback,{eventType:e,event:t})}else this._eventDispatcher.register(e,r),this._addEventHandler(e,r);return this}off(e,t,n){var r,i;let a=n??t;if(H.getComposedEvent(e)){if(a)(r=this._composedEventMap.get(a))==null||r.event.unregister(),this._composedEventMap.delete(a);else for(let t of this._composedEventMap.entries())t[1].eventType===e&&((i=this._composedEventMap.get(t[0]))==null||i.event.unregister(),this._composedEventMap.delete(t[0]))}else if(a){let n=this._getEventHandler(e,a)??{callback:a,query:null,filter:{nodeName:null,type:e,level:null,source:t.source,markName:null,filter:null,userId:null}};this._eventDispatcher.unregister(e,n),this._removeEventHandler(e,a)}else this._eventDispatcher.unregister(e),this._eventHandlerMap.delete(e);return this}emit(e,t,n){return this._eventDispatcher.dispatch(e,t,n),this}prevent(e,t){return this._eventDispatcher.prevent(e,t),this}allow(e){return this._eventDispatcher.allow(e),this}release(){this._eventHandlerMap.forEach(((e,t)=>{e.forEach((e=>{this._eventDispatcher.unregister(t,e)}))})),this._eventHandlerMap.clear(),this._composedEventMap.forEach((e=>{e.event.unregister()})),this._composedEventMap.clear()}_addEventHandler(e,t){t.callback&&(this._eventHandlerMap.has(e)||this._eventHandlerMap.set(e,/* @__PURE__ */ new Map),this._eventHandlerMap.get(e).set(t.callback,t))}_getEventHandler(e,t){return this._eventHandlerMap.get(e)?.get(t)}_removeEventHandler(e,t){let n=this._eventHandlerMap.get(e);n&&(n.delete(t),n.size||this._eventHandlerMap.delete(e))}}})))()}var ol,sl,K,q,J,cl;function Y(){return(Y=e((()=>{(function(e){e.BEFORE_EVALUATE_DATA=`beforeEvaluateData`,e.AFTER_EVALUATE_DATA=`afterEvaluateData`,e.BEFORE_EVALUATE_SCALE=`beforeEvaluateScale`,e.AFTER_EVALUATE_SCALE=`afterEvaluateScale`,e.BEFORE_PARSE_VIEW=`beforeParseView`,e.AFTER_PARSE_VIEW=`afterParseView`,e.BEFORE_TRANSFORM=`beforeTransform`,e.AFTER_TRANSFORM=`afterTransform`,e.BEFORE_CREATE_VRENDER_STAGE=`beforeCreateVRenderStage`,e.AFTER_CREATE_VRENDER_STAGE=`afterCreateVRenderStage`,e.BEFORE_CREATE_VRENDER_LAYER=`beforeCreateVRenderLayer`,e.AFTER_CREATE_VRENDER_LAYER=`afterCreateVRenderLayer`,e.BEFORE_STAGE_RESIZE=`beforeStageResize`,e.AFTER_STAGE_RESIZE=`afterStageResize`,e.BEFORE_VRENDER_DRAW=`beforeVRenderDraw`,e.AFTER_VRENDER_DRAW=`afterVRenderDraw`,e.BEFORE_MARK_JOIN=`beforeMarkJoin`,e.AFTER_MARK_JOIN=`afterMarkJoin`,e.BEFORE_MARK_UPDATE=`beforeMarkUpdate`,e.AFTER_MARK_UPDATE=`afterMarkUpdate`,e.BEFORE_MARK_STATE=`beforeMarkState`,e.AFTER_MARK_STATE=`afterMarkState`,e.BEFORE_MARK_ENCODE=`beforeMarkEncode`,e.AFTER_MARK_ENCODE=`afterMarkEncode`,e.BEFORE_DO_LAYOUT=`beforeDoLayout`,e.AFTER_DO_LAYOUT=`afterDoLayout`,e.BEFORE_MARK_LAYOUT_END=`beforeMarkLayoutEnd`,e.AFTER_MARK_LAYOUT_END=`afterMarkLayoutEnd`,e.BEFORE_DO_RENDER=`beforeDoRender`,e.AFTER_DO_RENDER=`afterDoRender`,e.BEFORE_MARK_RENDER_END=`beforeMarkRenderEnd`,e.AFTER_MARK_RENDER_END=`afterMarkRenderEnd`,e.BEFORE_CREATE_VRENDER_MARK=`beforeCreateVRenderMark`,e.AFTER_CREATE_VRENDER_MARK=`afterCreateVRenderMark`,e.BEFORE_ADD_VRENDER_MARK=`beforeAddVRenderMark`,e.AFTER_ADD_VRENDER_MARK=`afterAddVRenderMark`,e.AFTER_VRENDER_NEXT_RENDER=`afterVRenderNextRender`,e.BEFORE_ELEMENT_UPDATE_DATA=`beforeElementUpdateData`,e.AFTER_ELEMENT_UPDATE_DATA=`afterElementUpdateData`,e.BEFORE_ELEMENT_STATE=`beforeElementState`,e.AFTER_ELEMENT_STATE=`afterElementState`,e.BEFORE_ELEMENT_ENCODE=`beforeElementEncode`,e.AFTER_ELEMENT_ENCODE=`afterElementEncode`,e.ANIMATION_START=`animationStart`,e.ANIMATION_END=`animationEnd`,e.ELEMENT_ANIMATION_START=`elementAnimationStart`,e.ELEMENT_ANIMATION_END=`elementAnimationEnd`,e.ALL_ANIMATION_START=`allAnimationStart`,e.ALL_ANIMATION_END=`allAnimationEnd`})(ol||={}),sl=/* @__PURE__ */ `pointerdown.pointerup.pointerupoutside.pointertap.pointerover.pointermove.pointerenter.pointerleave.pointerout.mousedown.mouseup.mouseupoutside.rightdown.rightup.rightupoutside.click.dblclick.mousemove.mouseover.mouseout.mouseenter.mouseleave.wheel.touchstart.touchend.touchendoutside.touchmove.touchcancel.tap.dragstart.drag.dragenter.dragleave.dragover.dragend.drop.pan.panstart.panend.press.pressup.pressend.pinch.pinchstart.pinchend.swipe`.split(`.`),(function(e){e.initialized=`initialized`,e.rendered=`rendered`,e.renderFinished=`renderFinished`,e.animationFinished=`animationFinished`,e.regionSeriesDataFilterOver=`regionSeriesDataFilterOver`,e.afterInitData=`afterInitData`,e.afterInitEvent=`afterInitEvent`,e.afterInitMark=`afterInitMark`,e.rawDataUpdate=`rawDataUpdate`,e.viewDataFilterOver=`viewDataFilterOver`,e.viewDataUpdate=`viewDataUpdate`,e.viewDataStatisticsUpdate=`viewDataStatisticsUpdate`,e.markDeltaYUpdate=`markDeltaYUpdate`,e.viewDataLabelUpdate=`viewDataLabelUpdate`,e.scaleDomainUpdate=`scaleDomainUpdate`,e.scaleRawDomainUpdate=`scaleRawDomainUpdate`,e.scaleUpdate=`scaleUpdate`,e.dataZoomChange=`dataZoomChange`,e.drill=`drill`,e.layoutStart=`layoutStart`,e.layoutEnd=`layoutEnd`,e.layoutRectUpdate=`layoutRectUpdate`,e.playerPlay=`playerPlay`,e.playerPause=`playerPause`,e.playerEnd=`playerEnd`,e.playerChange=`playerChange`,e.playerForward=`playerForward`,e.playerBackward=`playerBackward`,e.scrollBarChange=`scrollBarChange`,e.brushStart=`brushStart`,e.brushChange=`brushChange`,e.brushEnd=`brushEnd`,e.brushClear=`brushClear`,e.brushActive=`brushActive`,e.legendSelectedDataChange=`legendSelectedDataChange`,e.legendFilter=`legendFilter`,e.legendItemClick=`legendItemClick`,e.legendItemHover=`legendItemHover`,e.legendItemUnHover=`legendItemUnHover`,e.tooltipShow=`tooltipShow`,e.tooltipHide=`tooltipHide`,e.tooltipRelease=`tooltipRelease`,e.afterResize=`afterResize`,e.afterRender=`afterRender`,e.afterLayout=`afterLayout`,e.afterMarkLayoutEnd=`afterMarkLayoutEnd`,e.afterWordcloudShapeDraw=`afterWordcloudShapeDraw`})(K||={}),(function(e){e.chart=`chart`,e.window=`window`,e.canvas=`canvas`})(q||={}),(function(e){e.vchart=`vchart`,e.chart=`chart`,e.model=`model`,e.mark=`mark`})(J||={}),cl=[J.mark,J.model,J.chart,J.vchart]})))()}var ll;function ul(){return(ul=e((()=>{Y(),ll=class{constructor(){this._map=/* @__PURE__ */ new Map,this._levelNodes=/* @__PURE__ */ new Map,this._levelNodes.set(J.vchart,[]),this._levelNodes.set(J.chart,[]),this._levelNodes.set(J.model,[]),this._levelNodes.set(J.mark,[])}addHandler(e,t){var n;let r={level:t,handler:e};return(n=this._levelNodes.get(t))==null||n.push(r),this._map.set(e.callback,r),this}removeHandler(e){let t=this._map.get(e.callback);if(!t)return this;this._map.delete(e.callback);let n=this._levelNodes.get(t.level),r=n?.findIndex((t=>t.handler.callback===e.callback));return r!==void 0&&r>=0&&n?.splice(r,1),this}preventHandler(e){return e&&(e.prevented=!0),this}allowHandler(e){return e&&(e.prevented=!1),this}getHandlers(e){return this._levelNodes.get(e)?.map((e=>e.handler))||[]}getAllHandlers(){return Array.from(this._map.values()).map((e=>e.handler))||[]}getCount(){return this._map.size}release(){this._map.clear(),this._levelNodes.clear()}}})))()}var dl,fl;function pl(){return(pl=e((()=>{ul(),v(),qe(),We(),vt(),o(),Y(),U(),rl(),dl={cartesianAxis:`axis`,"cartesianAxis-band":`axis`,"cartesianAxis-linear":`axis`,"cartesianAxis-time":`axis`,polarAxis:`axis`,"polarAxis-band":`axis`,"polarAxis-linear":`axis`,discreteLegend:`legend`,continuousLegend:`legend`,colorLegend:`legend`,sizeLegend:`legend`},fl=class{constructor(e,t){this._viewBubbles=/* @__PURE__ */ new Map,this._windowBubbles=/* @__PURE__ */ new Map,this._canvasBubbles=/* @__PURE__ */ new Map,this._viewListeners=/* @__PURE__ */ new Map,this._windowListeners=/* @__PURE__ */ new Map,this._canvasListeners=/* @__PURE__ */ new Map,this._onDelegate=e=>{let t=this.globalInstance.getChart(),n=h(e.modelId)&&t?.getModelById(e.modelId)||void 0,r=h(e.markId)&&t?.getMarkById(e.markId)||null,i=Ve(e.event,`target`),a=e.datum;n&&n.modelType===`component`&&(a=n.getDatum(i)??a);let o={event:e.event,item:e.item,source:e.source,datum:a,chart:t,model:n,mark:r??void 0,node:i};this.dispatch(e.type,o)},this._onDelegateInteractionEvent=e=>{let t=this.globalInstance.getChart(),n=e.event,r=null;n.graphics&&(r=n.graphics);let i={event:e.event,chart:t,graphics:r,datums:r&&r.map((e=>el(e)))};this.dispatch(e.type,i)},this.globalInstance=e,this._compiler=t}register(e,t){this._parseQuery(t);let n=this.getEventBubble(t.filter?.source||q.chart),r=this.getEventListeners(t.filter?.source||q.chart);if(n.get(e)||n.set(e,new ll),n.get(e).addHandler(t,t.filter?.level),this._isValidEvent(e)&&!r.has(e)){let n=this._onDelegate.bind(this);this._compiler.addEventListener(t.filter?.source,e,n),r.set(e,n)}else if(this._isInteractionEvent(e)&&!r.has(e)){let n=this._onDelegateInteractionEvent.bind(this);this._compiler.addEventListener(t.filter?.source,e,n),r.set(e,n)}return this}unregister(e,t){var n;let r=!1,i=this.getEventBubble(t?.filter?.source||q.chart),a=this.getEventListeners(t?.filter?.source||q.chart);if(t){let a=i.get(e);a?.removeHandler(t),a?.getCount()===0&&(a?.release(),i.delete(e),r=!0),(n=t?.wrappedCallback)!=null&&n.cancel&&t.wrappedCallback.cancel()}else i.get(e)?.release(),i.delete(e),r=!0;if(r&&this._isValidEvent(e)){let n=a.get(e);this._compiler.removeEventListener(t?.filter?.source||q.chart,e,n),a.delete(e)}return this}dispatch(e,t,n){let r=this.getEventBubble(t.source||q.chart).get(e);if(!r)return this;let i=!1;if(n){let a=r.getHandlers(n);i=this._invoke(a,e,t)}else{let n=0;for(;!i&&n<cl.length;)i=this._invoke(r.getHandlers(cl[n]),e,t),n++}return this}prevent(e,t){return[`canvas`,`chart`,`window`].forEach((n=>{let r=this.getEventBubble(n).get(e);r&&r.getAllHandlers().forEach((e=>{t?cl.indexOf(e.filter.level)<cl.indexOf(t.level)&&e.callback!==t.handler&&r.preventHandler(e):r.preventHandler(e)}))})),this}allow(e){return[`canvas`,`chart`,`window`].forEach((t=>{let n=this.getEventBubble(t).get(e);n&&n.getAllHandlers().forEach((e=>n.allowHandler(e)))})),this}clear(){[q.chart,q.window,q.canvas].forEach((e=>{let t=this.getEventListeners(e);for(let n of t.entries())this._compiler.removeEventListener(e,n[0],n[1]);t.clear()})),[this._viewBubbles,this._windowBubbles,this._canvasBubbles].forEach((e=>{for(let t of e.values())t.release();e.clear()}))}release(){this.clear(),this.globalInstance=null,this._compiler=null}_filter(e,t,n){if(M(e.filter)&&!e.filter(n)||e.nodeName&&Ve(n,`node.name`)!==e.nodeName||e.markName&&n?.mark?.name!==e.markName)return!1;let r=n.model?.type;return dl[r]&&(r=dl[r]),(!e.type||r===e.type)&&!(e.level===`mark`&&!e.type&&!n?.mark)&&!(e.level===`model`&&!e.type&&!n?.model)&&(!h(e.userId)||n.model?.userId===e.userId)}_invoke(e,t,n){return e.map((e=>{var r,i;let a=e.filter;if(!e.prevented&&(!e.query||this._filter(a,t,n))){let t=(e.wrappedCallback||e.callback).call(null,Object.assign({},n))??e.query?.consume;return t&&((r=n.event)==null||r.stopPropagation(),(i=n.event)==null||i.preventDefault()),!!t}})).some((e=>!0===e))}_getQueryLevel(e){return e?e.level?e.level:h(e.id)?J.model:J.vchart:J.vchart}_parseQuery(e){let t=e.query;t?.throttle?e.wrappedCallback=dt(e.callback,t.throttle):t!=null&&t.debounce&&(e.wrappedCallback=rt(e.callback,t.debounce));let n=this._getQueryLevel(t),r=null,i=q.chart,a=null,o=null,s=null;return t!=null&&t.nodeName&&(a=t.nodeName),t!=null&&t.markName&&(o=t.markName),!(t!=null&&t.type)||n!==J.model&&n!==J.mark||(r=t.type),t!=null&&t.source&&(i=t.source),h(t?.id)&&(s=t?.id,n=J.model),e.filter={level:n,markName:o,type:r,source:i,nodeName:a,userId:s,filter:t?.filter??null},e}getEventBubble(e){switch(e){case q.chart:return this._viewBubbles;case q.window:return this._windowBubbles;case q.canvas:return this._canvasBubbles;default:return this._viewBubbles}}getEventListeners(e){switch(e){case q.chart:return this._viewListeners;case q.window:return this._windowListeners;case q.canvas:return this._canvasListeners;default:return this._viewListeners}}_isValidEvent(e){return sl.includes(e)||Object.values(ol).includes(e)}_isInteractionEvent(e){let t;return e&&(t=e.split(`:`)[0],t)&&H.hasInteractionTrigger(t)}}})))()}function X(e,t,n){e.getTransform(t)||e.registerTransform(t,n)}function ml(e,t,n){e.getParser(t)||e.registerParser(t,n)}function hl(){return(hl=e((()=>{})))()}function gl(e){return _l.get(e)}var _l;function vl(){return(vl=e((()=>{_l=/* @__PURE__ */ new Map})))()}function yl(e,t=!1){let n=t;return e.latestData instanceof Ne&&(n=!1),n?De(e.latestData):e.latestData&&e.latestData.slice()}var bl;function xl(){return(xl=e((()=>{je(),Et(),bl=(e,t)=>e.length===0?[]:e.length===1?yl(e[0],t?.deep):e.map((e=>yl(e,t?.deep)))})))()}function Sl(e,t,n){t=t instanceof _e?t:e.dataSet,X(t,`copyDataView`,bl);let r=new Ne(t,n);return r.parse([e],{type:`dataview`}),r.transform({type:`copyDataView`,level:Tl.copyDataView}),r}function Cl(e,t,n=[]){if(e instanceof Ne)return e;let{id:r,values:i=[],fromDataIndex:a,fromDataId:o,transforms:s=[]}=e,c=e.parser?De(e.parser):{clone:!0},l=De(e.fields),u;c.clone=!1!==c.clone;let d=n.find((e=>e.name===r));if(d)u=d;else{let e={name:r};if(l&&(e.fields=l),u=new Ne(t,e),typeof o==`string`){let e=n.find((e=>e.name===o));if(!e)return Ra(`no data matches fromDataId ${o}`),null;u.parse([e],{type:`dataview`}),u.transform({type:`copyDataView`})}else if(typeof a==`number`){let e=n[a];if(!e)return Ra(`no data matches fromDataIndex ${a}`),null;u.parse([e],{type:`dataview`}),u.transform({type:`copyDataView`})}else Array.isArray(i)?u.parse(i,c):!I(i)||c&&![`csv`,`dsv`,`tsv`].includes(c.type)?(u.parse([]),Ra(`values should be array`)):u.parse(i,c??{type:`csv`});s&&s.length&&s.forEach((e=>{t.getTransform(e.type)&&u.transform(e)}))}return u}function wl(e,t,n){e&&(t.fields&&e.setFields(t.fields,n),e.parseNewData(t.values,t.parser))}var Tl;function El(){return(El=e((()=>{Va(),Ct(),je(),u(),Et(),xl(),(function(e){e[e.copyDataView=-10]=`copyDataView`,e[e.treemapFilter=-8]=`treemapFilter`,e[e.treemapFlatten=-7]=`treemapFlatten`,e[e.dotObjFlat=-7]=`dotObjFlat`,e[e.linkDotInfo=-7]=`linkDotInfo`,e[e.sankeyLayout=-7]=`sankeyLayout`,e[e.dataZoomFilter=-6]=`dataZoomFilter`,e[e.legendFilter=-5]=`legendFilter`})(Tl||={})})))()}var Dl;function Ol(){return(Ol=e((()=>{(function(e){e.appear=`appear`,e.disappear=`disappear`,e.enter=`enter`,e.update=`update`,e.state=`state`,e.exit=`exit`,e.normal=`normal`,e.none=`none`})(Dl||={})})))()}var kl;function Al(){return(Al=e((()=>{(function(e){e.before=`before`,e.layouting=`layouting`,e.reevaluate=`reevaluate`,e.after=`after`})(kl||={})})))()}function jl(e){return Pl.includes(e)}function Ml(e,t){return e===`monotone`?t===`horizontal`?`monotoneY`:`monotoneX`:e}function Nl(e,t,n){let r=/* @__PURE__ */ new Map;if(!e||e.length===0)return{keys:[],data:r};if(!t)return r.set(Ec,n?e.slice().sort(n):e.slice()),{keys:[Ec],data:r};if(e.length===1){let n=t(e[0],0);return r.set(n,[e[0]]),{keys:[n],data:r}}let i=/* @__PURE__ */ new Set;return e.forEach(((e,n)=>{let a=t(e,n),o=r.get(a)??[];o.push(e),r.set(a,o),i.add(a)})),n&&i.forEach((e=>{r.get(e).sort(n)})),{keys:Array.from(i),data:r}}var Pl,Fl;function Il(){return(Il=e((()=>{Dc(),Pl=[`line`,`area`,`trail`],Fl=(e,t,n={})=>(e&&Object.keys(e).forEach((r=>{n[r]=e[r](t)})),n)})))()}function Ll(e){switch(e){case z[`desktop-browser`]:case z[`mobile-browser`]:return`browser`;case z.node:case z.worker:return`node`;case z.miniApp:case z[`desktop-miniApp`]:return`feishu`;case z.lynx:return`lynx`;case z.wx:return`wx`;case z.tt:return`tt`;case z.harmony:return`harmony`}return`browser`}function Rl(e,t,n,r,i){let a=e=>{if(!r&&e&&(!n||n(e))){let n=t.call(null,e);if(i&&n)return n}if(e.type===`group`){let t=e.getMarks();if(t)for(let e=0;e<t.length;e++){let n=a(t[e]);if(n&&i)return n}}if(r&&e&&(!n||n(e))){let n=t.call(null,e);if(n&&i)return n}};return a(e)}function zl(e){let t=[];return e.forEach((e=>{Rl(e,(e=>{e.type!==`group`&&e.type!==`component`&&t.push(e)}))})),t}function Bl(e,t,n,r){let i=Nl(e,(e=>n(e))),a=Nl(t,(e=>r(e))),o=e,s=t,c=[];return a.keys.forEach((e=>{if(!N(e)){let t=i.data.get(e),n=a.data.get(e);t&&n&&(c.push({prev:t,next:n}),o=o.filter((e=>!t.includes(e))),s=s.filter((e=>!n.includes(e))))}})),{prev:o,next:s,update:c}}function Vl(e,t,n){let r={enter:[],exit:[],update:[]},i=[],a=[];e.forEach((e=>{n.morph&&e.getMarkConfig().morph||n.morphAll||n.reuse?i.push(e):r.exit.push({prev:[e]})})),t.forEach((e=>{n.morph&&e.getMarkConfig().morph||n.morphAll||n.reuse?a.push(e):r.enter.push({next:[e]})}));let o=Bl(i,a,(e=>e.getMarkConfig().morphKey),(e=>e.getMarkConfig().morphKey));i=o.prev,a=o.next,r.update=r.update.concat(o.update);let s=Bl(i,a,(e=>`${e.getUserId()}`),(e=>`${e.getUserId()}`));i=s.prev,a=s.next,r.update=r.update.concat(s.update);let c=Nl(i,(e=>{var t;return((t=e.group)?.id)?.call(t)})),l=Nl(a,(e=>{var t;return((t=e.group)?.id)?.call(t)}));return Object.keys(l).forEach((e=>{let t=c.data.get(e),n=l.data.get(e);if(t&&n){for(let e=0;e<Math.max(t.length,n.length);e+=1){let i=t[e],a=n[e];i&&a?r.update.push({prev:[i],next:[a]}):i?r.exit.push({prev:[i]}):a&&r.enter.push({next:[a]})}i=i.filter((e=>!t.includes(e))),a=a.filter((e=>!n.includes(e)))}})),i.forEach((e=>r.exit.push({prev:[e]}))),a.forEach((e=>r.enter.push({next:[e]}))),r}function Hl(){return(Hl=e((()=>{E(),Il(),Ma()})))()}var Ul,Wl;function Gl(){return(Gl=e((()=>{uc(),Ul=`${W}_BuiltIn_CallBack_Disappear`,(function(e){e.render=`render`,e.disappear=`disappear`})(Wl||={})})))()}var Kl,ql,Jl,Yl,Xl,Zl,Ql;function $l(){return($l=e((()=>{Ir(),Ma(),Kl=e=>{switch(e){case z.node:case z.worker:return`node`;case z.miniApp:case z[`desktop-miniApp`]:return`feishu`;case z.wx:return`wx`;case z.tt:return`tt`;case z.harmony:return`harmony`;case z.lynx:return`lynx`;default:return`browser`}},ql={lynx:[`pixelRatio`,`lynx`,`runtime`,`canvasFactory`],harmony:[`pixelRatio`,`harmony`,`runtime`,`canvasFactory`]},Jl=(e,t)=>{let n=Kl(e),r=ql[n];if(!r)return t;if((i=t)==null||typeof i!=`object`&&typeof i!=`function`)return;var i;let a={};return r.forEach((e=>{t[e]!==void 0&&(a[e]=t[e])})),Object.keys(a).length?a:void 0},Yl=(e,t)=>{return!e||(n=e)&&typeof n.createStage==`function`?{app:e,mode:t}:e;var n},Xl=(e,t)=>{let n=Hi(Object.assign({env:e},t===void 0?{}:{envParams:t}));return{app:n.app,releaseAppRef:()=>n.release()}},Zl=(e,t)=>{let n=Yl(e,t);if(n.app)return{app:n.app};let r=Kl(n.mode),i=Jl(n.mode,n.modeParams);return Xl(r,i)},Ql=(e,t)=>e.createStage(t)})))()}var eu;function tu(){return(tu=e((()=>{Y(),Al(),qa(),to(),j(),Tt(),v(),Pa(),U(),rl(),Hl(),Va(),Ol(),Gl(),$l(),eu=class{get stateAnimationConfig(){return this._stateAnimationConfig}getRootGroup(){return this._rootGroup}getOption(){return this._option}constructor(e,t){this._count=0,this._rootMarks=[],this._isExternalStage=!1,this._viewListeners=/* @__PURE__ */ new Map,this._windowListeners=/* @__PURE__ */ new Map,this._canvasListeners=/* @__PURE__ */ new Map,this.isInited=!1,this._released=!1,this._compileChart=null,this.handleLayoutEnd=()=>{var e;(e=this._compileChart?.getEvent())==null||e.emit(K.afterMarkLayoutEnd,{chart:this._compileChart})},this.handleStageRender=()=>{var e;(e=this._compileChart?.getEvent())==null||e.emit(K.afterRender,{chart:this._compileChart})},this._handleAfterNextRender=()=>{var e,t,n;this._stage&&!this._option.disableDirtyBounds&&this._stage.enableDirtyBounds(),this._compileChart&&((e=this._compileChart.getEvent())==null||e.emit(K.renderFinished,{chart:this._compileChart,vchart:this._compileChart.getOption()?.globalInstance})),(n=(t=this._option.performanceHook)?.afterVRenderDraw)==null||n.call(t,this._compileChart.getOption().globalInstance)},this.handleProgressiveFrame=()=>{this._progressiveMarks.length&&this._progressiveMarks.forEach((e=>{e.isDoingProgressive()&&e.renderProgressive()})),this.doPreProgressive()},this._container=e,this._option=t}getChart(){return this._compileChart}getCanvas(){return this._stage?.window.getNativeHandler().nativeCanvas}getStage(){return this._stage}_dedupeStagePlugin(e){let t=this._stage?.pluginService;if(!t?.findPluginsByName)return;let n=t.findPluginsByName(e);if(n.length<=1)return;let r=n[0];t.uninstall?(t.uninstall(e),t.register(r)):n.slice(1).forEach((e=>{t.unRegister(e)}))}_dedupePoptipPlugin(){var e;(e=this._option.pluginList)!=null&&e.includes(`poptipForText`)&&this._dedupeStagePlugin(`poptipForText`)}initView(){var e,t;if(this._released||(this.isInited=!0,this._stage))return;let{autoRefreshDpr:n,dpr:r,mode:i,modeParams:a,gestureConfig:o,interactive:s,clickInterval:c,autoPreventDefault:l,background:u}=this._option,d=Jl(i,a);Lr.setEnv(Ll(i),d??{});let f=this._option.stage;if(this._isExternalStage=!!f,this._releaseVRenderAppRef=void 0,this._stage=f,!this._stage){let o=Zl({app:this._option.app,mode:i,modeParams:a});this._releaseVRenderAppRef=o.releaseAppRef,(e=this._option.runtimePluginInstallers)==null||e.forEach((e=>e(o.app)));try{this._stage=Ql(o.app,Object.assign({background:u,width:this._width,height:this._height,container:this._container.dom??null,canvas:this._container.canvas??null,dpr:r,viewBox:this._option.viewBox,canvasControled:this._option.canvasControled,beforeRender:e=>{var t,n,r;(t=this._compileChart)==null||t.onBeforeRender(),(r=(n=this._option).beforeRender)==null||r.call(n,e)},afterRender:this._option.afterRender,disableDirtyBounds:!0,autoRender:!0,ticker:this._option.ticker,pluginList:this._option.pluginList,enableHtmlAttribute:this._option.enableHtmlAttribute,optimize:this._option.optimize,supportsTouchEvents:this._option.supportsTouchEvents,supportsPointerEvents:this._option.supportsPointerEvents,event:{clickInterval:c,autoPreventDefault:l},ReactDOM:this._option.ReactDOM,autoRefresh:h(n)?n:!h(r)},this._option.renderHooks??{}))}catch(e){throw(t=this._releaseVRenderAppRef)==null||t.call(this),this._releaseVRenderAppRef=void 0,e}}this._dedupePoptipPlugin(),this._stage.enableIncrementalAutoRender(),this._stage.setTheme({symbol:{shape:`circle`,size:8},text:{fontSize:14,fill:`#000000`}});let p=rn({x:0,y:0,width:this._width,height:this._height});p.name=`root`,this._stage.defaultLayer.appendChild(p),this._rootGroup=p;let m=(h(o)?o:Ua(i))&&!1!==s&&H.getStageEventPlugin(`gesture`);m&&(this._gestureController=new m(this._stage,D(o)?o:{})),this._setCanvasStyle(),this.getStage().hooks.afterRender.tap(`chart-event`,this.handleStageRender),!1!==s&&this._viewListeners.forEach((e=>{}))}getLayoutState(){return this._layoutState}updateLayoutTag(){this._layoutState=kl.before}_isGeoRegionRoamDragEnabled(){var e;let t=((e=this._compileChart)?.getSpec)?.call(e)?.region;return!!A(t)&&t.some((e=>{var t;return!(e?.coordinate!==`geo`||!e.roam)&&(!0===e.roam||(t=e.roam.drag)==null||t)}))}_shouldDisableCanvasTouchAction(){return Ha(this._option.mode)?!1===(h(this._option.supportsTouchEvents)?this._option.supportsTouchEvents:Lr.supportsTouchEvents)&&this._isGeoRegionRoamDragEnabled():!1}_setCanvasStyle(){if(this._stage&&this._container.dom&&!I(this._container.dom)){this._container.dom.style.display=`block`,this._container.dom.style.position=`relative`;let e=this.getCanvas();e&&(e.style.display=`block`,e.style.touchAction=this._shouldDisableCanvasTouchAction()?`none`:``)}}compile(e,t){if(this._released)return;let{chart:n}=e;this._compileChart=n,this.initView(),this._stage&&(t?.actionSource!==`render`&&this._cachedMarks&&(this.reuseOrMorphing(t.morphConfig),this._cachedMarks=null),n.compile(),this._setCanvasStyle(),n.afterCompile())}clearNextRender(){return!!this._nextRafId&&(Lr.getSpecifiedCancelAnimationFrame(10)(this._nextRafId),this._nextRafId=null,!0)}clear(e){let{chart:t}=e;this.clearNextRender(),t.clear()}renderNextTick(e){this._released||(this._nextRafId&&this.clearNextRender(),this._nextRafId=Lr.getSpecifiedRequestAnimationFrame(10)((()=>{this._nextRafId=null,this.render(e)})))}_commitedAll(){return this._rootMarks.some((e=>Rl(e,(e=>e.commit()))))}_hasCommitedMark(){return this._rootMarks.some((e=>Rl(e,(e=>e.isCommited()),null,null,!0)))}_doRender(e){var t,n,r,i,a,o;(n=(t=this._option.performanceHook)?.beforeDoRender)==null||n.call(t,this._compileChart.getOption().globalInstance),this._stage&&(this._rootMarks.forEach((e=>{Rl(e,(e=>{e.needClear&&=(this._progressiveMarks||e.runAnimation(),e.clearExitGraphics(),!1)}),null,!0)})),(i=(r=this._option.performanceHook)?.beforeVRenderDraw)==null||i.call(r,this._compileChart.getOption().globalInstance),this._stage.disableDirtyBounds(),this._stage.afterNextRender(this._handleAfterNextRender),e&&(this._stage.render(),(o=(a=this._option.performanceHook)?.afterVRenderDraw)==null||o.call(a,this._compileChart.getOption().globalInstance)))}renderMarks(){var e;let t=this._hasCommitedMark(),n=this._layoutState===kl.before;(t||n)&&(La(`--- start of renderMarks(${this._count}) ---`),this.clearProgressive(),t&&this._rootMarks.forEach((e=>{e.render()})),n&&(this._layoutState=kl.layouting,(e=this._compileChart)==null||e.onLayout(),this._layoutState=kl.reevaluate,t=this._hasCommitedMark(),t&&this._rootMarks.forEach((e=>{e.render()})),this.handleLayoutEnd()),t&&(this.findProgressiveMarks(),this.updateStateAnimation()),this._doRender(!0),t&&this.doPreProgressive(),La(`--- start of renderMarks(${this._count}) ---`),this._count++)}reuseOrMorphing(e={}){let{reuse:t=!0,morph:n=!0,morphAll:r=!1,animation:i={},enableExitAnimation:a=!1}=e,o=zl(this._rootMarks),{update:s,exit:c}=Vl(this._cachedMarks,o,{morph:n,morphAll:r,reuse:t});s.forEach((({prev:e,next:n})=>{if(t&&e.length===1&&n.length===1&&e[0].type===n[0].type)n[0].reuse(e[0]);else{let t=e.filter((e=>e.getMarkConfig().morph))[0];t&&n.forEach((e=>{e.getMarkConfig().morph&&e.prepareMorph(t)}))}})),c.forEach((({prev:e})=>{e.forEach((e=>{e.removeProduct()}))}))}render(e){if(this._released||(this.clearNextRender(),this.initView(),!this._stage))return;let{width:t,height:n}=this._rootGroup.attribute;this._width===t&&this._height===n||this._rootGroup.setAttributes({width:this._width,height:this._height}),this.renderMarks(),this.clearNextRender()&&this.renderMarks()}setStageAnimationConfig(e){let t={};Object.keys(e).forEach((n=>{let r=e[n];A(r)?t[n]=n===`disappear`?r.map((e=>eo(e.callBack)?Object.assign(Object.assign({},e),{custom:e.callBack}):Object.assign(Object.assign({},e),{type:Ul,customParameters:{callBack:e.callBack}}))):r.map((e=>{let t=e.options??{};return Object.assign(Object.assign({},e),{options:(...e)=>{let n=typeof t==`function`?t(...e):t;return Object.assign({},n)}})})):t[n]=Object.assign({},e[n])})),this._stateAnimationConfig=t}updateStateAnimation(){let e=[];this._rootMarks.forEach((t=>{Rl(t,(t=>{e.push(t)}))}));let t=e.map((e=>e.getAnimationState())),n=t.every((e=>e===Dl.appear))?Dl.appear:t.every((e=>e===Dl.disappear))?Dl.disappear:Dl.none;this._stage.context||(this._stage.context={}),this._stage.context.animationState=n}updateViewBox(e,t=!0){if(!this._stage)return;let n=this._stage.viewBox;!e||n&&n.x1===e.x1&&n.y1===e.y1&&n.x2===e.x2&&n.y2===e.y2||this._stage.setViewBox(e,t)}resize(e,t,n=!0){if(!this._stage)return;let r=this._width!==e||this._height!==t;this._width=e,this._height=t,r&&(this._stage.resize(e,t),this._commitedAll(),n&&this.render({morph:!1}))}setBackground(e){this._stage&&(this._stage.background=e)}setSize(e,t){this._width=e,this._height=t,this._stage}setViewBox(e,t=!0){this.updateViewBox(e,t)}addEventListener(e,t,n){var r;if(!1!==this._option.interactive){if(e===q.chart){let i=this.getRootGroup(),a=function(r){let a=r.target,o=null;a&&(o=h(a.context)?a:tl(i,a));let s=o?.context??{},c=h(s.markId)?s.markId:null,l=h(s.modelId)?s.modelId:null,u=h(s.modelUserId)?s.modelUserId:null,d=h(s.markUserId)?s.markUserId:null,f={event:r,type:t,source:e,item:o,datum:el(o),markId:c,modelId:l,markUserId:d,modelUserId:u};n.call(null,f)}.bind(this);this._viewListeners.set(n,{type:t,callback:a}),(r=this._stage)==null||r.addEventListener(t,a)}else if(e===q.window){let r=function(r){let i={event:r,type:t,source:e,item:null,datum:null,markId:null,modelId:null,markUserId:null,modelUserId:null};n.call(null,i)}.bind(this);this._windowListeners.set(n,{type:t,callback:r}),this._getGlobalThis()?.addEventListener(t,r)}else if(e===q.canvas){let r=function(r){let i={event:r,type:t,source:e,item:null,datum:null,markId:null,modelId:null,markUserId:null,modelUserId:null};n.call(null,i)}.bind(this);this._canvasListeners.set(n,{type:t,callback:r}),(this.getStage()?.window)?.addEventListener(t,r)}}}removeEventListener(e,t,n){var r;if(!1!==this._option.interactive){if(e===q.chart){let e=this._viewListeners.get(n)?.callback;e&&((r=this._stage)==null||r.removeEventListener(t,e)),this._viewListeners.delete(n)}else if(e===q.window){let e=this._getGlobalThis(),r=this._windowListeners.get(n)?.callback;r&&e?.removeEventListener(t,r),this._windowListeners.delete(n)}else if(e===q.canvas){let e=this.getStage()?.window,r=this._canvasListeners.get(n)?.callback;e&&r&&e?.removeEventListener(t,r),this._canvasListeners.delete(n)}}}releaseEvent(){let e=this.getStage();e&&e.hooks.afterRender.unTap(`chart-event`,this.handleStageRender),this._viewListeners.clear(),this._windowListeners.clear(),this._canvasListeners.clear()}release(){let e=this._stage,t=this._rootGroup,n=!!e&&!this._isExternalStage,r=this._releaseVRenderAppRef;this.clearNextRender(),this.releaseEvent(),this.releaseGrammar(!0),e&&(n?e.release():t&&(e.defaultLayer.removeChild(t,!0),t.release())),r?.(),this._stage=null,this._rootGroup=null,this._isExternalStage=!1,this._releaseVRenderAppRef=void 0,this._option=this._container=null,this.isInited=!1,this._compileChart=null,this._released=!0}releaseGrammar(e=!1){e?this._rootMarks.forEach((e=>{Rl(e,(e=>{e.removeProduct(!0)}),null,!0)})):this._cachedMarks=zl(this._rootMarks),this._rootMarks=[]}addRootMark(e){this._rootMarks.includes(e)||this._rootMarks.push(e)}getRootMarks(){return this._rootMarks}removeRootMark(e){let t=this._rootMarks.findIndex((t=>t===e));return t>=0&&(this._rootMarks.splice(t,1),!0)}_getGlobalThis(){return Ha(this._option.mode)?globalThis:this.getStage()?.window}_combineIncrementalLayers(){this._stage&&Na(this._stage).then((()=>{this._stage&&this._stage.defaultLayer.combineSubLayer()}))}findProgressiveMarks(){let e=[];return this._rootMarks.forEach((t=>{Rl(t,(t=>{t.isProgressive()&&e.push(t)}))})),e.length?(this._progressiveMarks=e,this._combineIncrementalLayers(),e):(this._progressiveMarks=null,null)}doPreProgressive(){if(this._progressiveMarks&&this._progressiveMarks.some((e=>e.isDoingProgressive()))){let e=Lr.getSpecifiedRequestAnimationFrame(10);this._progressiveRafId=e(this.handleProgressiveFrame)}else this._progressiveMarks&&this._progressiveMarks.every((e=>e.canAnimateAfterProgressive()))?this._progressiveMarks.forEach((e=>{e.runAnimation(),e.clearExitGraphics()})):this._progressiveMarks&&=null}clearProgressive(){this._progressiveRafId&&Lr.getSpecifiedCancelAnimationFrame(10)(this._progressiveRafId),this._progressiveMarks&&this._progressiveMarks.length&&(this._progressiveMarks.forEach((e=>{e.clearProgressive()})),this._progressiveMarks=null)}}})))()}function nu(e=`vchart`,t){let n=document.createElement(`a`);n.setAttribute(`href`,t),n.setAttribute(`target`,`_blank`),n.setAttribute(`download`,`${e}.png`),n.dispatchEvent(new MouseEvent(`click`))}function ru(e){return new Promise((t=>{e.convertToBlob().then((e=>{let n=new FileReader;n.readAsDataURL(e),n.onload=()=>{t(n.result)}}))}))}function iu(e,t){return au(this,void 0,void 0,(function*(){if(!e)return``;try{if(OffscreenCanvas!==void 0&&e instanceof OffscreenCanvas)return ru(e)}catch(e){(t?.onError??za)(`getCanvasDataURL error : ${e.toString()}`)}return e.toDataURL()}))}var au;function ou(){return(ou=e((()=>{Va(),au=function(e,t,n,r){return new(n||=Promise)((function(i,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){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((r=r.apply(e,t||[])).next())}))}})))()}function su(e){e.crosshair=T(e.crosshair||{}).map((t=>R({[e.direction===`horizontal`?`yField`:`xField`]:{visible:!0,line:{visible:!0,type:`rect`}}},t)))}function cu(e,t,n){let{width:r,height:i}=e;if(h(r)&&h(i))return{width:r,height:i};let a=n.width,o=n.height,s=t.container,c=t.canvas;if(s){let{width:e,height:t}=we(s,n.width,n.height);a=e,o=t}else if(c&&Ha(t.mode)){let e;e=I(c)?Lr.getElementById(c):c;let{width:t,height:r}=we(e,n.width,n.height);a=t,o=r}else if(Wa(t.mode)&&t.modeParams?.domref){let e=t.modeParams.domref;a=e.width,o=e.height}return a=r??a,o=i??o,{width:a,height:o}}function lu(e,...t){t.forEach((t=>{let n=t?.effects;if(!n)return;e.effects||={};let r=e.effects;mu.forEach((e=>{n[e]&&(r[e]=r[e]||n[e])}))}))}function uu(e){let t=e.effects;return!(!t?.localOnly||e.reMake||e.reCompile||e.reRender||e.reSize||t.remake||t.compile||t.render||t.layout||t.data||t.scaleDomain||t.series||e.reTransformSpec||e.reAnimate||e.changeTheme||e.changeBackground)}function du(e){let t=e.effects;return!(!t?.component||e.reMake||e.reCompile||e.reSize||t.remake||t.compile||t.data||t.scaleDomain||t.series||t.animation||e.reTransformSpec||e.reAnimate||e.changeTheme||e.changeBackground)}function fu(e,...t){let n=n=>t.reduce(((e,t)=>e||t?.[n]),e[n]);return Object.assign(e,{change:n(`change`),reCompile:n(`reCompile`),reMake:n(`reMake`),reRender:n(`reRender`),reSize:n(`reSize`),reTransformSpec:n(`reTransformSpec`),changeTheme:n(`changeTheme`),changeBackground:n(`changeBackground`)}),lu(e,...t),e}function pu(e,t){return e===`line`||e===`area`||e===`common`&&t.series.every((e=>e.type===`area`||e.type===`line`))?{paddingInner:1,paddingOuter:0}:{paddingOuter:0}}var mu;function hu(){return(hu=e((()=>{Ct(),Se(),S(),qa(),v(),_i(),Pa(),mu=[`remake`,`compile`,`render`,`layout`,`data`,`scaleDomain`,`series`,`component`,`animation`,`localOnly`]})))()}var gu,_u;function vu(){return(vu=e((()=>{(function(e){e[e.SeriesGroup=0]=`SeriesGroup`,e[e.Axis_Grid=50]=`Axis_Grid`,e[e.CrossHair_Grid=100]=`CrossHair_Grid`,e[e.Region=450]=`Region`,e[e.Mark=300]=`Mark`,e[e.Node=400]=`Node`,e[e.Axis=100]=`Axis`,e[e.MarkLine=500]=`MarkLine`,e[e.MarkArea=100]=`MarkArea`,e[e.MarkPoint=500]=`MarkPoint`,e[e.DataZoom=500]=`DataZoom`,e[e.ScrollBar=500]=`ScrollBar`,e[e.Player=500]=`Player`,e[e.Legend=500]=`Legend`,e[e.CrossHair=500]=`CrossHair`,e[e.Indicator=500]=`Indicator`,e[e.Title=500]=`Title`,e[e.Label=500]=`Label`,e[e.Brush=500]=`Brush`,e[e.CustomMark=500]=`CustomMark`,e[e.Interaction=700]=`Interaction`})(gu||={}),(function(e){e[e.Indicator=10]=`Indicator`,e[e.Region=20]=`Region`,e[e.Axis=30]=`Axis`,e[e.DataZoom=40]=`DataZoom`,e[e.Player=40]=`Player`,e[e.ScrollBar=40]=`ScrollBar`,e[e.Legend=50]=`Legend`,e[e.Title=70]=`Title`,e[e.CustomMark=70]=`CustomMark`})(_u||={})})))()}var Z;function yu(){return(yu=e((()=>{(function(e){e[e.Default=0]=`Default`,e[e.Theme=1]=`Theme`,e[e.Chart=2]=`Chart`,e[e.Base_Series=3]=`Base_Series`,e[e.Series=4]=`Series`,e[e.Mark=5]=`Mark`,e[e.User_Chart=6]=`User_Chart`,e[e.User_Series=7]=`User_Series`,e[e.User_Mark=8]=`User_Mark`,e[e.User_SeriesStyle=9]=`User_SeriesStyle`,e[e.Built_In=99]=`Built_In`})(Z||={})})))()}var bu;function xu(){return(xu=e((()=>{S(),E(),C(),bu=class e{constructor(){this._children=[],this._markNameMap={},this._infoMap=/* @__PURE__ */ new Map}getMarkNameMap(){return this._markNameMap}addMark(t,n){N(t)||(this._children.push(t),this._markNameMap[t.name]=t,this._infoMap.set(t,ke({},e.defaultMarkInfo,n)))}removeMark(e){let t=this._children.findIndex((t=>t.name===e));t>=0&&(this._infoMap.delete(this._children[t]),delete this._markNameMap[e],this._children.splice(t,1))}clear(){this._children=[],this._markNameMap={},this._infoMap.clear()}forEach(e){this._children.forEach(e)}includes(e,t){return this._children.includes(e,t)}get(e){return isNaN(Number(e))?this._markNameMap[e]:this._children[e]}getMarks(){return this._children.slice()}getMarksInType(e){let t=T(e);return this._children.filter((e=>t.includes(e.type)))}getMarkInId(e){return this._children.find((t=>t.id===e))}getMarkWithInfo(e){return this._children.find((t=>Object.keys(e).every((n=>e[n]===this._infoMap.get(t)[n]))))}},bu.defaultMarkInfo={}})))()}var Su;function Cu(){return(Cu=e((()=>{Su=class{getOption(){return this._option}constructor(e){this._option=e,this.getCompiler=this._option.getCompiler}getStage(){return this.getCompiler()?.getStage()}release(){this._option=null,this.getCompiler=null}}})))()}var wu;function Tu(){return(Tu=e((()=>{j(),_i(),wu=class{constructor(e){this._option=e,this.type=e.type}_initTheme(e,t){return this._theme=this.getTheme(e,t),this._mergeThemeToSpec(e,t)}getTheme(e,t){}transformSpec(e,t,n){this._transformSpecBeforeMergingTheme(e,t,n);let r=this._initTheme(e,t);return this._transformSpecAfterMergingTheme(r.spec,t,n),r}_transformSpecBeforeMergingTheme(e,t,n){}_transformSpecAfterMergingTheme(e,t,n){}_mergeThemeToSpec(e,t){let n=this._theme;if(this._shouldMergeThemeToSpec()){let r=this._getDefaultSpecFromChart(t),i=e=>R({},n,r,e);return A(e)?{spec:e.map((e=>i(e))),theme:n}:{spec:i(e),theme:n}}return{spec:e,theme:n}}_shouldMergeThemeToSpec(){return!0}_getDefaultSpecFromChart(e){}}})))()}var Eu,Du;function Ou(){return(Ou=e((()=>{Xa(),al(),v(),U(),xu(),Cu(),uc(),Tu(),ji(),Eu=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`){var i=0;for(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},Du=class extends Su{getSpec(){return this._spec||{}}getSpecPath(){return this._option?.specPath}getSpecInfoPath(){return this._option?.specInfoPath??this._option?.specPath}getData(){return this._data}get layout(){return this._layout}getOption(){return this._option}getMarks(){return this._marks?.getMarks()??[]}getMarkNameMap(){return this._marks?.getMarkNameMap()}getMarkSet(){return this._marks}getChart(){return this._option.getChart()}get _theme(){return this.getSpecInfo()?.theme}constructor(e,t){var n;super(t),this.transformerConstructor=wu,this.type=`null`,this.modelType=`null`,this.userId=void 0,this._data=null,this._layout=null,this.specKey=``,this._marks=new bu,this._lastLayoutRect=null,this.id=Ja(),this.userId=e.id,this._spec=e,this.effect={},this.event=new il(t.eventDispatcher,t.mode),(n=t.map)==null||n.set(this.id,this)}_releaseEvent(){this.event.release()}created(){this.setAttrFromSpec()}init(e){}afterInit(){}getVisible(){return!1!==this._spec?.visible}onLayoutStart(e,t){var n;(n=this._layout)==null||n.onLayoutStart(e,t)}onLayoutEnd(){var e;(e=this._layout)==null||e.onLayoutEnd(),this.getMarks().forEach((e=>e.commit(!1,!0)))}onEvaluateEnd(e){}onBeforeRender(){}onDataUpdate(){}beforeRelease(){}clear(){this.getMarks().forEach((e=>e.clear?.call(e)))}release(){var e;this._releaseEvent(),this._spec=void 0,this.getMarks().forEach((e=>e.release())),(e=this._data)==null||e.release(),this._data=null,this._marks.clear(),super.release()}updateSpec(e){var t;let n=this._compareSpec(e,this._spec);return(n.reRender||n.reMake||n.reCompile)&&((t=this._layout)==null||t.setWillLayoutTag()),this._spec=e,n}_compareSpec(e,t){return{change:!1,reMake:!1,reRender:!1,reSize:!1,reCompile:!1}}reInit(e){e&&(this._spec=e),this.setAttrFromSpec()}updateLayoutAttribute(){}setAttrFromSpec(){var e;(e=this._layout)==null||e.setAttrFromSpec(this._spec,this._option.getChartViewRect())}_convertMarkStyle(e){return Object.assign({},e)}setMarkStyle(e,t,n,r){h(e)&&h(t)&&e.setStyle(this._convertMarkStyle(t),n,r)}initMarkStyleWithSpec(e,t){if(!h(e)||!h(t))return;let{style:n,state:r}=t,i=Object.assign({},t);n&&(i.style=this._convertMarkStyle(n)),r&&(i.state={},Object.keys(r).forEach((e=>{i.state[e]=this._convertMarkStyle(r[e])}))),e.initStyleWithSpec(i)}stateKeyToSignalName(e,t){let n=`${W}_${this.modelType}_${this.type}_${this.id}_${e}`;return t&&(n+=`_${t}`),n}compileData(){var e;(e=this._data)==null||e.compile()}compileMarks(e){this.getMarks().forEach((t=>{t.compile({group:e})}))}_createMark(e,t={},n){let{type:r,name:i}=e,{parent:a}=t,o=Eu(t,[`parent`]),s=H.createMark(r,i,Object.assign({model:this,map:this._option.map,getCompiler:this.getCompiler,globalScale:this._option.globalScale},o));return a?a.addMark(s):this.getCompiler().addRootMark(s),s&&(s.created(),n&&s.setMarkConfig(n)),s}_getDataIdKey(){}getColorScheme(){var e;return(e=this._option).getTheme?.call(e,`colorScheme`)}getSpecInfo(){var e;let t=(e=this._option).getSpecInfo?.call(e)??{};return qr(t,this.getSpecInfoPath())}getSpecIndex(){let e=this.getSpecPath();if(!e?.length)return 0;let t=Number(e[e.length-1]);return isNaN(t)?0:t}updateAnimateStateCallback(e){this._aniamtionStateCallback=e}getAnimationStateCallback(){return this._aniamtionStateCallback}}})))()}var ku;function Au(){return(Au=e((()=>{E(),Re(),cs(),vu(),ku=class{getSpec(){return this._spec||{}}getLayoutStartPoint(){return this._layoutStartPoint}get layoutRectLevelMap(){return this._layoutRectLevelMap}get minWidth(){return this._minWidth}set minWidth(e){this._minWidth=e}get maxWidth(){return this._maxWidth}set maxWidth(e){this._maxWidth=e}get minHeight(){return this._minHeight}set minHeight(e){this._minHeight=e}get maxHeight(){return this._maxHeight}set maxHeight(e){this._maxHeight=e}get lastComputeRect(){return this._lastComputeRect}getLastComputeOutBounds(){return this._lastComputeOutBounds}get layoutOrient(){return this._layoutOrient}set layoutOrient(e){this._layoutOrient=e}get model(){return this._model}get type(){return this._model.type}get willLayoutTag(){return this._willLayoutTag}constructor(e,t){this.layoutClip=!1,this.autoIndent=!1,this._layoutStartPoint={x:0,y:0},this._layoutRect={width:0,height:0},this._layoutRectLevelMap={width:0,height:0},this._minWidth=null,this._maxWidth=null,this._minHeight=null,this._maxHeight=null,this._lastComputeRect=null,this._lastComputeOutBounds={x1:0,x2:0,y1:0,y2:0},this.getLayoutRect=()=>this._layoutRect,this.layoutType=`normal`,this._layoutOrient=`left`,this.layoutPaddingLeft=0,this.layoutPaddingTop=0,this.layoutPaddingRight=0,this.layoutPaddingBottom=0,this.layoutOffsetX=0,this.layoutOffsetY=0,this.layoutLevel=_u.Region,this._willLayoutTag=!0,this._model=e,this._option=t,this.layoutLevel=t.layoutLevel,this.layoutType=t.layoutType,t.layoutOrient&&(this.layoutOrient=t.layoutOrient),this._spec=(e?.getSpec)?.call(e)}_setLayoutAttributeFromSpec(e,t){if(this._spec&&!1!==this._spec.visible){let n=rs(as(e.padding),t,t);this._option.transformLayoutPadding&&(n=this._option.transformLayoutPadding(n)),this.layoutPaddingLeft=n.left,this.layoutPaddingRight=n.right,this.layoutPaddingTop=n.top,this.layoutPaddingBottom=n.bottom,this._minHeight=N(e.minHeight)?this._minHeight??null:ns(e.minHeight,t.height,t),this._maxHeight=N(e.maxHeight)?this._maxHeight??null:ns(e.maxHeight,t.height,t),this._minWidth=N(e.minWidth)?this._minWidth??null:ns(e.minWidth,t.width,t),this._maxWidth=N(e.maxWidth)?this._maxWidth??null:ns(e.maxWidth,t.width,t),e.width&&this.setLayoutRect({width:ns(e.width,t.width,t)},{width:9}),e.height&&this.setLayoutRect({height:ns(e.height,t.height,t)},{height:9}),N(e.offsetX)||(this.layoutOffsetX=ns(e.offsetX,t.width,t)),N(e.offsetY)||(this.layoutOffsetY=ns(e.offsetY,t.height,t)),e.alignSelf&&(this.alignSelf=e.alignSelf)}}setAttrFromSpec(e,t){this._spec=e,this.layoutType=e.layoutType??this.layoutType,this.layoutLevel=e.layoutLevel??this.layoutLevel,this.layoutOrient=e.orient??this.layoutOrient,this._setLayoutAttributeFromSpec(e,t),this.layoutClip=e.clip??this.layoutClip}onLayoutStart(e,t){this._setLayoutAttributeFromSpec(this._spec,t)}onLayoutEnd(){}_getAbsoluteSpecValue(e){let t={top:null,bottom:null,left:null,right:null};return[`top`,`bottom`,`left`,`right`].forEach((n=>{N(this._spec[n])||(t[n]=ns(this._spec[n],n===`top`||n===`bottom`?e.height:e.width,e))})),t}absoluteLayoutInRect(e){let{top:t,bottom:n,left:r,right:i}=this._getAbsoluteSpecValue(e),a={width:e.width-this.layoutPaddingLeft-this.layoutPaddingRight,height:e.height-this.layoutPaddingTop-this.layoutPaddingBottom};N(r)||(a.width-=r),N(i)||(a.width-=i),N(t)||(a.height-=t),N(n)||(a.height-=n),this.setLayoutRect(a);let{width:o,height:s}=this.computeBoundsInRect(this.getLayoutRect());this.setLayoutRect({width:o,height:s});let c={x:e.x,y:e.y};!0===this._spec.center?(c.x=e.x+.5*e.width-.5*o,c.y=e.y+.5*e.height-.5*s):(N(r)?N(i)||(c.x=e.x+e.width-this.layoutPaddingRight-i-o):c.x=e.x+r+this.layoutPaddingLeft,N(t)?N(n)||(c.y=e.y+e.height-this.layoutPaddingBottom-n-s):c.y=e.y+t+this.layoutPaddingTop),this.setLayoutStartPosition(c)}setLayoutStartPosition(e){var t,n;this._option.transformLayoutPosition&&(e=this._option.transformLayoutPosition(e)),P(e.x)&&(this._layoutStartPoint.x=e.x),P(e.y)&&(this._layoutStartPoint.y=e.y),(n=(t=this._model).afterSetLayoutStartPoint)==null||n.call(t,this._layoutStartPoint)}setLayoutRect({width:e,height:t},n){P(e)&&(n?.width??0)>=this._layoutRectLevelMap.width&&(this._layoutRect.width=e,this._layoutRectLevelMap.width=n?.width??0),P(t)&&(n?.height??0)>=this._layoutRectLevelMap.height&&(this._layoutRect.height=t,this._layoutRectLevelMap.height=n?.height??0),this.setRectInSpec(this._layoutRect)}getLayout(){return{x:this._layoutStartPoint.x,y:this._layoutStartPoint.y,width:this._layoutRect.width,height:this._layoutRect.height}}mergeLayoutRect({width:e,height:t}){let n={width:e,height:t};return this._layoutRectLevelMap.width>0&&(n.width=this._layoutRect.width),this._layoutRectLevelMap.height>0&&(n.height=this._layoutRect.height),n}getOrientPosAttribute(){return this._layoutOrient===`bottom`||this._layoutOrient===`top`?`x`:`y`}getOrientSizeAttribute(){return this._layoutOrient===`bottom`||this._layoutOrient===`top`?`width`:`height`}changeBoundsBySetting(e){return this._layoutRectLevelMap.width>0&&(e.x2=e.x1+this._layoutRect.width),this._layoutRectLevelMap.height>0&&(e.y2=e.y1+this._layoutRect.height),e.x1-=this._layoutStartPoint.x,e.x2-=this._layoutStartPoint.x,e.y1-=this._layoutStartPoint.y,e.y2-=this._layoutStartPoint.y,e}setRectInSpec(e){let t=Object.assign({},e);return this._layoutRectLevelMap.width<9?(N(this._minWidth)||(t.width=Math.max(t.width,this._minWidth)),N(this._maxWidth)||(t.width=Math.min(t.width,this._maxWidth))):t.width=this._layoutRect.width,this._layoutRectLevelMap.height<9?(N(this._minHeight)||(t.height=Math.max(t.height,this._minHeight)),N(this._maxHeight)||(t.height=Math.min(t.height,this._maxHeight))):t.height=this._layoutRect.height,t}computeBoundsInRect(e){if(this._lastComputeRect=e,!(this.layoutType!==`region-relative`&&this.layoutType!==`region-relative-overlap`||(this._layoutRectLevelMap.width!==9||this.layoutOrient!==`left`&&this.layoutOrient!==`right`)&&(this._layoutRectLevelMap.height!==9||this.layoutOrient!==`bottom`&&this.layoutOrient!==`top`)))return this._layoutRect;let t=Object.assign({},this._model.getBoundsInRect(this.setRectInSpec(e),e));this.changeBoundsBySetting(t),this.autoIndent&&t.x2-t.x1>0&&t.y2-t.y1>0&&(this._lastComputeOutBounds.x1=Math.ceil(-t.x1),this._lastComputeOutBounds.x2=Math.ceil(t.x2-e.width),this._lastComputeOutBounds.y1=Math.ceil(-t.y1),this._lastComputeOutBounds.y2=Math.ceil(t.y2-e.height));let n=this.setRectInSpec(is(t,e));return this._option.transformLayoutRect&&(n=this._option.transformLayoutRect(n)),n}getModelId(){return this._model.id}getModelVisible(){return this._model.getVisible()}setWillLayoutTag(){this._willLayoutTag=!0}clearWillLayoutTag(){this._willLayoutTag=!1}}})))()}var ju;function Mu(){return(Mu=e((()=>{Ce(),C(),Ou(),Au(),ju=class extends Du{constructor(){super(...arguments),this.layoutType=`normal`,this.layoutLevel=0,this.layoutZIndex=0,this._forceLayoutTag=!1,this._layout=null,this._orient=null,this._layoutRect={width:0,height:0},this._layoutStartPos={x:0,y:0},this._isLayout=!0,this.getGraphicBounds=()=>this._layout?{x1:this._layout.getLayoutStartPoint().x,y1:this._layout.getLayoutStartPoint().y,x2:this._layout.getLayoutStartPoint().x+this._layout.getLayoutRect().width,y2:this._layout.getLayoutStartPoint().y+this._layout.getLayoutRect().height}:{x1:0,x2:0,y1:0,y2:0},this._transformLayoutRect=null,this._transformLayoutPosition=null,this._transformLayoutPadding=null}get layoutOrient(){return this._orient}set layoutOrient(e){this._orient=e,this._layout&&(this._layout.layoutOrient=e)}initLayout(){this.layoutType!==`none`&&(this._layout=new ku(this,{layoutType:this.layoutType,layoutLevel:this.layoutLevel,layoutOrient:this._orient,transformLayoutRect:this._transformLayoutRect,transformLayoutPosition:this._transformLayoutPosition,transformLayoutPadding:this._transformLayoutPadding}),this._orient&&this._orient!==`radius`&&this._orient!==`angle`&&this._layout&&(this._layout.layoutOrient=this._orient))}onLayoutStart(e,t){this._isLayout=!0,super.onLayoutStart(e,t)}onLayoutEnd(){super.onLayoutEnd(),this.updateLayoutAttribute();let e=this.getLayoutRect();!this._forceLayoutTag&&O(this._lastLayoutRect,e)||(this._lastLayoutRect=Object.assign({},e)),this._forceLayoutTag=!1,this._isLayout=!1}afterSetLayoutStartPoint(e){}_forceLayout(){var e,t;this._isLayout||((e=this._layout)==null||e.setWillLayoutTag(),this._forceLayoutTag=!0,(t=this._option.globalInstance.getChart())==null||t.setLayoutTag(!0))}getLayoutStartPoint(){return this._layout?this._layout.getLayoutStartPoint():this._layoutStartPos}setLayoutStartPosition(e){return this._layout?this._layout.setLayoutStartPosition(e):this._layoutStartPos=ke(this._layoutStartPos,e)}getLayoutRect(){return this._layout?this._layout.getLayoutRect():this._layoutRect}setLayoutRect(e,t){return this._layout?this._layout.setLayoutRect(e):this._lastLayoutRect=ke(this._layoutRect,e)}getLastComputeOutBounds(){return this._layout?.getLastComputeOutBounds()}setAttrFromSpec(){super.setAttrFromSpec(),this.layoutClip=this._spec.clip??this.layoutClip,this.layoutZIndex=this._spec.zIndex??this.layoutZIndex,this.layoutType=this._spec.layoutType??this.layoutType,this._orient=this._spec.orient??this._orient,this.layoutLevel=this._spec.layoutLevel??this.layoutLevel}}})))()}var Nu;function Pu(){return(Pu=e((()=>{Tu(),Nu=class extends wu{_initTheme(e,t){return{spec:e,theme:this._theme}}}})))()}var Fu;function Iu(){return(Iu=e((()=>{st(),Ce(),S(),v(),Y(),vu(),yu(),Mu(),Pu(),Fu=class e extends ju{getMaxWidth(){return this._layout.maxWidth}setMaxWidth(e){this._layout.maxWidth=e}getMaxHeight(){return this._layout.maxHeight}setMaxHeight(e){this._layout.maxHeight=e}getGroupMark(){return this._groupMark}getInteractionMark(){return this._interactionMark}getStackInverse(){return!0===this._spec.stackInverse}getStackSort(){return!0===this._spec.stackSort}constructor(t,n){super(t,n),this.transformerConstructor=Nu,this.modelType=`region`,this.specKey=`region`,this.type=e.type,this._series=[],this.layoutType=`region`,this.layoutZIndex=gu.Region,this.seriesDataFilterOver=()=>{this.event.emit(K.regionSeriesDataFilterOver,{model:this,chart:this.getChart()}),this._series.forEach((e=>{e.getViewDataFilter()&&e.reTransformViewData()}))},this.getBoundsInRect=()=>({x1:this._layout.getLayoutStartPoint().x,y1:this._layout.getLayoutStartPoint().y,x2:this._layout.getLayoutStartPoint().x+this._layout.getLayoutRect().width,y2:this._layout.getLayoutStartPoint().y+this._layout.getLayoutRect().height}),this.userId=t.id,this.coordinate=t.coordinate??`cartesian`}_getClipDefaultValue(){var e,t;let n=this._option.getChart().getSpec(),r=((e=n.dataZoom)?.some)?.call(e,(e=>(e.filterMode??`filter`)===`axis`)),i=((t=n.scrollBar)?.some)?.call(t,(e=>(e.filterMode??`axis`)===`axis`));return!(!r&&!i)||this._layout.layoutClip}created(){this.initLayout(),super.created();let e=this._spec.clip??this._getClipDefaultValue();this._groupMark=this._createGroupMark(`regionGroup`,this.userId,this.layoutZIndex),this._spec.roam&&this._groupMark.setMarkConfig({interactive:!0}),this._interactionMark=this._createGroupMark(`regionInteractionGroup`,(this.userId??this.type)+`_interaction`,gu.Interaction),F(this._spec.style)||(this._backgroundMark=this._createMark({type:`rect`,name:`regionBackground`},{parent:this._groupMark}),e&&(this._foregroundMark=this._createMark({type:`rect`,name:`regionForeground`},{parent:this._groupMark})),[this._backgroundMark,this._foregroundMark].forEach((e=>{e&&(e.created(),this.setMarkStyle(e,{width:()=>this.getLayoutRect().width,height:()=>this.getLayoutRect().height},`normal`,Z.Built_In),this._groupMark.addMark(e))})),this._backgroundMark&&this._backgroundMark.setMarkConfig({zIndex:gu.SeriesGroup-1}),this._foregroundMark&&this._foregroundMark.setMarkConfig({zIndex:gu.Mark+1}))}_createGroupMark(e,t,n){let r=this._createMark({type:`group`,name:e});r.setUserId(t),r.setMarkConfig({zIndex:n});let i=this._spec.clip??this._getClipDefaultValue();return this.setMarkStyle(r,{x:()=>this.getLayoutStartPoint().x,y:()=>this.getLayoutStartPoint().y,width:()=>this.getLayoutRect().width,height:()=>this.getLayoutRect().height,clip:i},`normal`,Z.Built_In),this.setMarkStyle(r,{cornerRadius:this._spec.style?.cornerRadius},`normal`,Z.User_Mark),this._marks.addMark(r),r}init(e){super.init(e),this.initMark(),this.initSeriesDataflow()}initMark(){this._initBackgroundMarkStyle(),this._initForegroundMarkStyle()}_initBackgroundMarkStyle(){this._backgroundMark&&(this.setMarkStyle(this._backgroundMark,Object.assign({fillOpacity:+!!this._spec.style?.fill},this._spec.style),`normal`,Z.User_Mark),(this._spec.clip??this._getClipDefaultValue())&&this.setMarkStyle(this._backgroundMark,{strokeOpacity:0},`normal`,Z.Built_In))}_initForegroundMarkStyle(){this._foregroundMark&&this.setMarkStyle(this._foregroundMark,Object.assign(Object.assign({},this._spec.style),{fillOpacity:0,pickable:!1}),`normal`,Z.User_Mark)}_compareSpec(e,t){let n=super._compareSpec(e,t);return O(t?.style,e?.style)||(n.reMake=!0),n}reInit(e){super.reInit(e),this._initBackgroundMarkStyle(),this._initForegroundMarkStyle()}addSeries(e){e&&(this._series.includes(e)||this._series.push(e))}removeSeries(e){if(!e)return;let t=this._series.findIndex((t=>t===e));t>=0&&this._series.splice(t,1)}getSeries(e={}){return this._series.filter((t=>(!e.name||t?.name===e.name)&&(!e.userId||T(e.userId).includes(t.userId))&&(!h(e.specIndex)||T(e.specIndex).includes(t.getSpecIndex()))&&(!e.id||t.id===e.id)&&(!e.type||t.type===e.type)&&(!e.coordinateType||t.coordinate===e.coordinateType)&&(!e.dataName||t.getRawData?.call(t)?.name===e.dataName)))}getSeriesInName(e){return this.getSeries({name:e})[0]}getSeriesInUserId(e){return this.getSeries({userId:e})[0]}getSeriesInId(e){return this.getSeries({id:e})[0]}getSeriesInType(e){return this.getSeries({type:e})}getSeriesInCoordinateType(e){return this.getSeries({coordinateType:e})}getSeriesInDataName(e){return this.getSeries({dataName:e})}initSeriesDataflow(){let e=this._series.map((e=>e.getViewDataFilter()??e.getViewData())).filter((e=>!!e));this._option.dataSet.multipleDataViewAddListener(e,`change`,this.seriesDataFilterOver)}release(){super.release(),this._series=[]}compileMarks(e){this.getMarks().forEach((t=>{t.compile({group:e,context:{model:this}})}))}compile(){this.compileMarks()}onLayoutEnd(){this._series.forEach((e=>e.onLayoutEnd())),super.onLayoutEnd()}},Fu.type=`region`,Fu.transformerConstructor=Nu,Fu.specKey=`region`})))()}function Lu(e){let t=[],n=[],r=[];return e.forEach((e=>{N(e.getSpec().position)||e.getSpec().position===`start`?t.push(e):e.getSpec().position===`middle`?n.push(e):e.getSpec().position===`end`&&r.push(e)})),{startItems:t,endItems:r,middleItems:n}}function Ru(e,t,n){t?e.forEach((e=>{let t=w(e),r=(n-(t.getLayoutStartPoint().y+t.getLayoutRect().height-e[0].getLayoutStartPoint().y))/2;e.forEach((e=>{e.setLayoutStartPosition({x:e.getLayoutStartPoint().x,y:e.getLayoutStartPoint().y+r})}))})):e.forEach((e=>{let t=w(e),r=(n-(t.getLayoutStartPoint().x+t.getLayoutRect().width-e[0].getLayoutStartPoint().x))/2;e.forEach((e=>{e.setLayoutStartPosition({x:e.getLayoutStartPoint().x+r,y:e.getLayoutStartPoint().y})}))}))}function zu(e,t,n,r){let i;e.forEach(((e,a)=>{e.length>1&&(i=n[a],e.forEach((e=>{if(!e.alignSelf||e.alignSelf===`start`)return;let n=e.getLayoutStartPoint(),a=e.alignSelf===`middle`?.5:1,o=t?i-(e.getLayoutRect().width+e.layoutPaddingLeft+e.layoutPaddingRight):i-(e.getLayoutRect().height+e.layoutPaddingTop+e.layoutPaddingBottom);t?e.setLayoutStartPosition({x:n.x+r*o*a,y:n.y}):e.setLayoutStartPosition({x:n.x,y:n.y+r*o*a})})))}))}function Bu(e,t,n,r,i,a){if(e.length){let o=0,s=i===`right`,c=s?-1:1,l=s?t.rightCurrent:t.leftCurrent,u=t.topCurrent,d=[],f=[],p=[];e.forEach((e=>{let{rect:r}=Ju(e,t,a),i=r.height+e.layoutPaddingTop+e.layoutPaddingBottom,m=r.width+e.layoutPaddingLeft+e.layoutPaddingRight,h=s?-r.width-e.layoutPaddingRight:e.layoutPaddingLeft;e.setLayoutStartPosition({x:l+e.layoutOffsetX+h,y:u+e.layoutOffsetY+e.layoutPaddingTop}),u+=i,u>n&&f.length?(p.push(o),l+=c*o,o=m,u=t.topCurrent+i,e.setLayoutStartPosition({x:l+e.layoutOffsetX+h,y:t.topCurrent+e.layoutOffsetY+e.layoutPaddingTop}),d.push(f),f=[e]):(o=Math.max(o,m),f.push(e))})),p.push(o),d.push(f),zu(d,!0,p,c),r&&Ru(d,!0,n),s?t.rightCurrent=l+c*o:t.leftCurrent=l+c*o}}function Vu(e,t,n,r,i){if(e.length){let n=0,a=r===`right`,o=a?-1:1,s=a?t.rightCurrent:t.leftCurrent,c=t.bottomCurrent,l=[],u=[],d=[];e.forEach((e=>{let{rect:r}=Ju(e,t,i),f=r.height+e.layoutPaddingTop+e.layoutPaddingBottom,p=r.width+e.layoutPaddingLeft+e.layoutPaddingRight,m=a?-r.width-e.layoutPaddingRight:e.layoutPaddingLeft;c<f&&u.length?(d.push(n),s+=o*n,n=p,c=t.bottomCurrent,e.setLayoutStartPosition({x:s+e.layoutOffsetX+m,y:c+e.layoutOffsetY-r.height-e.layoutPaddingBottom}),l.push(u),u=[e]):(e.setLayoutStartPosition({x:s+e.layoutOffsetX+m,y:c+e.layoutOffsetY-r.height-e.layoutPaddingBottom}),n=Math.max(n,p),c-=f,u.push(e))})),d.push(n),l.push(u),zu(l,!0,d,o),a?t.rightCurrent=s+o*n:t.leftCurrent=s+o*n}}function Hu(e,t,n,r,i,a){if(e.length){let o=i===`top`,s=o?1:-1,c=0,l=t.leftCurrent,u=o?t.topCurrent:t.bottomCurrent,d=[],f=[],p=[];e.forEach((e=>{let{rect:r}=Ju(e,t,a),i=r.height+e.layoutPaddingTop+e.layoutPaddingBottom,m=r.width+e.layoutPaddingLeft+e.layoutPaddingRight,h=o?e.layoutPaddingTop:-r.height-e.layoutPaddingBottom;e.setLayoutStartPosition({x:l+e.layoutOffsetX+e.layoutPaddingLeft,y:u+e.layoutOffsetY+h}),l+=m,l>n&&f.length?(p.push(c),l=t.leftCurrent+m,u+=s*c,c=i,e.setLayoutStartPosition({x:t.leftCurrent+e.layoutOffsetX+e.layoutPaddingLeft,y:u+e.layoutOffsetY+h}),d.push(f),f=[e]):(c=Math.max(c,i),f.push(e))})),p.push(c),d.push(f),zu(d,!1,p,s),r&&Ru(d,!1,n),o?t.topCurrent=u+s*c:t.bottomCurrent=u+s*c}}function Uu(e,t,n,r,i){if(e.length){let n=r===`top`,a=n?1:-1,o=0,s=t.rightCurrent,c=n?t.topCurrent:t.bottomCurrent,l=[],u=[],d=[];e.forEach((e=>{let{layoutTag:r,layoutRect:d,rect:f}=Ju(e,t,i),p=f.height+e.layoutPaddingTop+e.layoutPaddingBottom,m=f.width+e.layoutPaddingLeft+e.layoutPaddingRight,h=n?e.layoutPaddingTop:-f.height-e.layoutPaddingBottom;s<m&&u.length?(s=t.rightCurrent,c+=a*o,o=p,e.setLayoutStartPosition({x:t.rightCurrent+e.layoutOffsetX-f.width-e.layoutPaddingRight,y:c+e.layoutOffsetY+h}),l.push(u),u=[e]):(u.push(e),e.setLayoutStartPosition({x:s+e.layoutOffsetX-f.width-e.layoutPaddingRight,y:c+e.layoutOffsetY+h}),o=Math.max(o,p),s-=m)})),d.push(o),l.push(u),zu(l,!1,d,a),n?t.topCurrent=c+a*o:t.bottomCurrent=c+a*o}}function Wu(e,t,n,r){let{startItems:i,middleItems:a,endItems:o}=Lu(e);i.length&&Bu(i,t,n,!1,`left`,r),a.length&&Bu(a,t,n,!0,`left`,r),o.length&&Vu(o,t,n,`left`,r)}function Gu(e,t,n,r){let{startItems:i,middleItems:a,endItems:o}=Lu(e);i.length&&Bu(i,t,n,!1,`right`,r),a.length&&Bu(a,t,n,!0,`right`,r),o.length&&Vu(o,t,n,`right`,r)}function Ku(e,t,n,r){let{startItems:i,middleItems:a,endItems:o}=Lu(e);i.length&&Hu(i,t,n,!1,`top`,r),a.length&&Hu(a,t,n,!0,`top`,r),o.length&&Uu(o,t,n,`top`,r)}function qu(e,t,n,r){let{startItems:i,middleItems:a,endItems:o}=Lu(e);i.length&&Hu(i,t,n,!1,`bottom`,r),a.length&&Hu(a,t,n,!0,`bottom`,r),o.length&&Uu(o,t,n,`bottom`,r)}function Ju(e,t,n,r=!0){let i,a,o=`recomputeHeight`,s=`recomputeWidth`,c=`width`;e.layoutOrient!==`top`&&e.layoutOrient!==`bottom`||(o=`recomputeWidth`,s=`recomputeHeight`,c=`height`);let l=!(!e.willLayoutTag&&!1===n[o]);if(l){let o=Object.assign({},e.getLayoutRect()),u=e.lastComputeRect;i=t.getItemComputeLayoutRect(e),!e.willLayoutTag&&O(i,u)?(l=!1,a=e.getLayoutRect()):(a=e.computeBoundsInRect(i),O(o[c],a[c])?l=!1:(r&&e.setLayoutRect(a),n[s]=!0))}else i=e.getLastComputeOutBounds(),a=e.getLayoutRect();return{layoutRect:i,rect:a,layoutTag:l}}function Yu(){return(Yu=e((()=>{E(),S(),Ce()})))()}var Xu;function Zu(){return(Zu=e((()=>{Ce(),Va(),Yu(),Xu=class{constructor(e,t){this.leftCurrent=0,this.topCurrent=0,this.rightCurrent=0,this.bottomCurrent=0,this.recomputeWidth=!1,this.recomputeHeight=!1,this._onError=t?.onError}_layoutInit(e,t,n,r){this._chartLayoutRect=n,this._chartViewBox=r,this.leftCurrent=n.x,this.topCurrent=n.y,this.rightCurrent=n.x+n.width,this.bottomCurrent=n.height+n.y,this.recomputeWidth=!1,this.recomputeHeight=!1,t.sort(((e,t)=>t.layoutLevel-e.layoutLevel))}_layoutNormalItems(e,t){this.layoutNormalInlineItems(e.filter((e=>e.layoutType===`normal-inline`)),t),this.layoutNormalItems(e.filter((e=>e.layoutType===`normal`)),t)}_groupItems(e){let t=e.filter((e=>e.layoutType===`region`)),n=e.filter((e=>e.layoutType===`region-relative`)),r=e.filter((e=>e.layoutType===`region-relative-overlap`)),i=n.concat(r),a={left:{items:[],rect:{width:0,height:0}},right:{items:[],rect:{width:0,height:0}},top:{items:[],rect:{width:0,height:0}},bottom:{items:[],rect:{width:0,height:0}},z:{items:[],rect:{width:0,height:0}}};return r.forEach((e=>{a[e.layoutOrient].items.push(e)})),{regionItems:t,relativeItems:n,relativeOverlapItems:r,allRelatives:i,overlapItems:a}}layoutItems(e,t,n,r){var i;this._layoutInit(e,t,n,r);let a={recomputeWidth:this.recomputeWidth,recomputeHeight:this.recomputeHeight},o=(i=e?.getSpec()?.layout?.secondLayoutLeftRight)!=null&&i;this._layoutNormalItems(t,a);let s={left:this.leftCurrent,top:this.topCurrent,right:this.rightCurrent,bottom:this.bottomCurrent},{regionItems:c,relativeItems:l,relativeOverlapItems:u,allRelatives:d,overlapItems:f}=this._groupItems(t);this.layoutRegionItems(c,l,u,f,a,o),this._processAutoIndent(c,l,u,f,d,s,a,o),this.layoutAbsoluteItems(t.filter((e=>e.layoutType===`absolute`))),t.forEach((e=>{e.clearWillLayoutTag()}))}_processAutoIndent(e,t,n,r={left:{items:[],rect:{width:0,height:0}},right:{items:[],rect:{width:0,height:0}},top:{items:[],rect:{width:0,height:0}},bottom:{items:[],rect:{width:0,height:0}},z:{items:[],rect:{width:0,height:0}}},i,a,o,s=!1){if(i.some((e=>e.autoIndent))){let{top:c,bottom:l,left:u,right:d}=this._checkAutoIndent(i,a);(c||l||u||d)&&(this.topCurrent=a.top+c,this.bottomCurrent=a.bottom-l,this.leftCurrent=a.left+u,this.rightCurrent=a.right-d,this.layoutRegionItems(e,t,n,r,o,s))}}layoutNormalItems(e,t){e.forEach((e=>{let{rect:n}=Ju(e,this,t);e.layoutOrient===`left`?(e.setLayoutStartPosition({x:this.leftCurrent+e.layoutOffsetX+e.layoutPaddingLeft,y:this.topCurrent+e.layoutOffsetY+e.layoutPaddingTop}),this.leftCurrent+=n.width+e.layoutPaddingLeft+e.layoutPaddingRight):e.layoutOrient===`top`?(e.setLayoutStartPosition({x:this.leftCurrent+e.layoutOffsetX+e.layoutPaddingLeft,y:this.topCurrent+e.layoutOffsetY+e.layoutPaddingTop}),this.topCurrent+=n.height+e.layoutPaddingTop+e.layoutPaddingBottom):e.layoutOrient===`right`?(e.setLayoutStartPosition({x:this.rightCurrent+e.layoutOffsetX-n.width-e.layoutPaddingRight,y:this.topCurrent+e.layoutOffsetY+e.layoutPaddingTop}),this.rightCurrent-=n.width+e.layoutPaddingLeft+e.layoutPaddingRight):e.layoutOrient===`bottom`&&(e.setLayoutStartPosition({x:this.leftCurrent+e.layoutOffsetX+e.layoutPaddingRight,y:this.bottomCurrent+e.layoutOffsetY-n.height-e.layoutPaddingBottom}),this.bottomCurrent-=n.height+e.layoutPaddingTop+e.layoutPaddingBottom)}))}layoutNormalInlineItems(e,t){let n=e.filter((e=>e.layoutOrient===`left`)),r=e.filter((e=>e.layoutOrient===`right`)),i=e.filter((e=>e.layoutOrient===`top`)),a=e.filter((e=>e.layoutOrient===`bottom`)),o=this._chartLayoutRect.width+this._chartLayoutRect.x,s=this._chartLayoutRect.height+this._chartLayoutRect.y;return n.length&&Wu(n,this,s,t),i.length&&Ku(i,this,o,t),r.length&&Gu(r,this,s,t),a.length&&qu(a,this,o,t),!0}_layoutRelativeOverlap(e,t,n){t.items.forEach((e=>{let{rect:r}=Ju(e,this,n);t.rect.width=Math.max(r.width+e.layoutPaddingLeft+e.layoutPaddingRight,t.rect.width),t.rect.height=Math.max(r.height+e.layoutPaddingTop+e.layoutPaddingBottom,t.rect.height)})),t.items.forEach((n=>{O(n.getLayoutRect(),t.rect)||n.setLayoutRect(t.rect),e===`left`?n.setLayoutStartPosition({x:this.leftCurrent+n.layoutOffsetX}):e===`right`?n.setLayoutStartPosition({x:this.rightCurrent-t.rect.width+n.layoutOffsetX}):e===`top`?n.setLayoutStartPosition({x:this.topCurrent+n.layoutOffsetY}):n.setLayoutStartPosition({x:this.bottomCurrent-t.rect.height+n.layoutOffsetY})})),e===`left`?this.leftCurrent+=t.rect.width:e===`right`?this.rightCurrent-=t.rect.width:e===`top`?this.topCurrent+=t.rect.height:this.bottomCurrent-=t.rect.height}_layoutRelativeItem(e,t){let{rect:n}=Ju(e,this,t,!1);e.layoutOrient===`left`||e.layoutOrient===`right`?e.setLayoutRect({width:n.width}):e.setLayoutRect({height:n.height}),e.layoutOrient===`left`?(e.setLayoutStartPosition({x:this.leftCurrent+e.layoutOffsetX+e.layoutPaddingLeft}),this.leftCurrent+=n.width+e.layoutPaddingLeft+e.layoutPaddingRight):e.layoutOrient===`right`?(this.rightCurrent-=n.width+e.layoutPaddingLeft+e.layoutPaddingRight,e.setLayoutStartPosition({x:this.rightCurrent+e.layoutOffsetX+e.layoutPaddingLeft})):e.layoutOrient===`top`?(e.setLayoutStartPosition({y:this.topCurrent+e.layoutOffsetY+e.layoutPaddingTop}),this.topCurrent+=n.height+e.layoutPaddingTop+e.layoutPaddingBottom):e.layoutOrient===`bottom`&&(this.bottomCurrent-=n.height+e.layoutPaddingTop+e.layoutPaddingBottom,e.setLayoutStartPosition({y:this.bottomCurrent+e.layoutOffsetY+e.layoutPaddingTop}))}_layoutRegionItem(e,t,n){let r=Math.max(Math.min(t,...e.map((e=>e.maxWidth??Number.MAX_VALUE))),0),i=Math.max(Math.min(n,...e.map((e=>e.maxHeight??Number.MAX_VALUE))),0);return e.forEach((e=>{let t=r-e.layoutPaddingLeft-e.layoutPaddingRight,n=i-e.layoutPaddingTop-e.layoutPaddingBottom;e.setLayoutRect({width:t,height:n}),e.setLayoutStartPosition({x:this.leftCurrent+e.layoutOffsetX+e.layoutPaddingLeft,y:this.topCurrent+e.layoutOffsetY+e.layoutPaddingTop})})),{regionHeight:i,regionWidth:r}}layoutRegionItems(e,t,n,r={left:{items:[],rect:{width:0,height:0}},right:{items:[],rect:{width:0,height:0}},top:{items:[],rect:{width:0,height:0}},bottom:{items:[],rect:{width:0,height:0}},z:{items:[],rect:{width:0,height:0}}},i,a=!1){let o=this.leftCurrent,s=this.rightCurrent,c=this.rightCurrent-this.leftCurrent,l=this.bottomCurrent-this.topCurrent;t.filter((e=>e.layoutOrient===`left`||e.layoutOrient===`right`)).forEach((e=>{this._layoutRelativeItem(e,i)})),this._layoutRelativeOverlap(`left`,r.left,i),this._layoutRelativeOverlap(`right`,r.right,i),c=this.rightCurrent-this.leftCurrent,t.filter((e=>e.layoutOrient===`top`||e.layoutOrient===`bottom`)).forEach((e=>{this._layoutRelativeItem(e,i)})),this._layoutRelativeOverlap(`top`,r.top,i),this._layoutRelativeOverlap(`bottom`,r.bottom,i),l=this.bottomCurrent-this.topCurrent,a&&(this.leftCurrent=o,this.rightCurrent=s,t.filter((e=>e.layoutOrient===`left`||e.layoutOrient===`right`)).forEach((e=>{this._layoutRelativeItem(e,i)})),c=this.rightCurrent-this.leftCurrent);let{regionWidth:u,regionHeight:d}=this._layoutRegionItem(e,c,l);t.concat(n).forEach((t=>{if([`left`,`right`].includes(t.layoutOrient)){let n=this.filterRegionsWithID(e,t.layoutBindRegionID[0]);t.setLayoutRect({height:n.getLayoutRect().height}),t.setLayoutStartPosition({y:n.getLayoutStartPoint().y+t.layoutOffsetY+t.layoutPaddingTop}),t.layoutOrient===`right`&&t.setLayoutStartPosition({x:t.getLayoutStartPoint().x+u-c})}else if([`top`,`bottom`].includes(t.layoutOrient)){let n=this.filterRegionsWithID(e,t.layoutBindRegionID[0]);t.setLayoutRect({width:n.getLayoutRect().width}),t.setLayoutStartPosition({x:n.getLayoutStartPoint().x+t.layoutOffsetX+t.layoutPaddingLeft}),t.layoutOrient===`bottom`&&t.setLayoutStartPosition({y:t.getLayoutStartPoint().y+d-l})}}))}layoutAbsoluteItems(e){e.forEach((e=>{e.willLayoutTag&&e.absoluteLayoutInRect(this._chartLayoutRect)}))}filterRegionsWithID(e,t){let n=e.find((e=>e.getModelId()===t));return n||(this._onError??za)(`can not find target region item, invalid id`),n}getItemComputeLayoutRect(e){return{width:this.rightCurrent-this.leftCurrent-e.layoutPaddingLeft-e.layoutPaddingRight,height:this.bottomCurrent-this.topCurrent-e.layoutPaddingTop-e.layoutPaddingBottom}}_checkAutoIndent(e,t){let n={top:0,left:0,bottom:0,right:0};return e.forEach((e=>{if(!e.getModelVisible()||!e.autoIndent)return;let r=e.layoutOrient===`left`||e.layoutOrient===`right`,i=e.getLastComputeOutBounds(),a=this._getOutInLayout(i,e,t);r?(n.top=Math.max(n.top,a.top),n.bottom=Math.max(n.bottom,a.bottom)):(n.left=Math.max(n.left,a.left),n.right=Math.max(n.right,a.right))})),n}_getOutInLayout(e,t,n){let{x:r,y:i}=t.getLayoutStartPoint(),{width:a,height:o}=t.getLayoutRect();return{left:n.left-(r-e.x1),right:r+a+e.x2-n.right,top:n.top-(i-e.y1),bottom:i+o+e.y2-n.bottom}}},Xu.type=`base`})))()}var Qu;function $u(){return($u=e((()=>{(function(e){e.enter=`enter`,e.update=`update`,e.exit=`exit`,e.unChange=`unChange`})(Qu||={})})))()}var Q,ed;function td(){return(td=e((()=>{(function(e){e.STATE_NORMAL=`normal`,e.STATE_HOVER=`hover`,e.STATE_HOVER_REVERSE=`hover_reverse`,e.STATE_DIMENSION_HOVER=`dimension_hover`,e.STATE_DIMENSION_HOVER_REVERSE=`dimension_hover_reverse`,e.STATE_SELECTED=`selected`,e.STATE_SELECTED_REVERSE=`selected_reverse`,e.STATE_SANKEY_EMPHASIS=`selected`,e.STATE_SANKEY_EMPHASIS_REVERSE=`blur`,e.STATE_HIGHLIGHT=`highlight`,e.STATE_BLUR=`blur`,e.STATE_ACTIVE=`active`})(Q||={}),(function(e){e.STATE_HOVER_REVERSE=`hover_reverse`,e.STATE_DIMENSION_HOVER_REVERSE=`dimension_hover_reverse`,e.STATE_SELECTED_REVERSE=`selected_reverse`})(ed||={})})))()}var nd,rd,id,ad,od;function sd(){return(sd=e((()=>{nd=[`linear`,`radial`,`conical`],rd={x0:0,y0:0,x1:1,y1:1},id={x0:0,y0:0,x1:1,y1:1,r0:0,r1:1},ad={x:.5,y:.5,startAngle:0,endAngle:2*Math.PI},od={linear:rd,radial:id,conical:ad}})))()}function cd(e,t,n){let r=t[e]?.style;return ld(e,r)||M(r)?!0:!(!r?.scale||r.field===n)}function ld(e,t){return(e===`fill`||e===`stroke`)&&t?.gradient&&t?.stops}function ud(e){return!!dd[e]}var dd;function fd(){return(fd=e((()=>{o(),td(),dd={},Object.values(Q).forEach((e=>{dd[e]=!0})),Q.STATE_HOVER,Q.STATE_HOVER_REVERSE,Q.STATE_SELECTED,Q.STATE_SELECTED_REVERSE,Q.STATE_DIMENSION_HOVER,Q.STATE_DIMENSION_HOVER_REVERSE})))()}var pd;function md(){return(md=e((()=>{C(),Cu(),pd=class extends Su{compile(){}getStateMap(){return this._stateMap}_getDefaultStateMap(){return{}}constructor(e){super(e),this.initStateMap()}initStateMap(e){this._stateMap=e??this._getDefaultStateMap()}updateState(e,t){if(e&&(ke(this._stateMap,e),!t))return this.getCompiler().renderNextTick()}}})))()}var hd;function gd(){return(gd=e((()=>{Ke(),j(),Tt(),v(),uc(),Il(),fd(),md(),hd=class extends pd{getStateInfoList(){return this._stateInfoList}constructor(e,t){super(e),this._stateInfoList=[],this._mark=t}_getDefaultStateMap(){return{markUpdateRank:1}}getStateInfo(e){return this._stateInfoList.find((t=>t.stateValue===e))}addStateInfo(e){if(this.getStateInfo(e.stateValue))return;e.level=e.level||0;let t=!0;for(let n=0;n<this._stateInfoList.length;n++){let r=this._stateInfoList[n].level;if(r&&r>e.level){this._stateInfoList.splice(n,0,e),t=!1;break}}t&&this._stateInfoList.push(e)}_clearStateBeforeSet(e){e.datums=null,e.items=null,e.fields=null,e.filter=null}changeStateInfo(e){let t=this.getStateInfo(e.stateValue);if(t){if(e.datums!==void 0&&(this._clearStateBeforeSet(t),t.datums=e.datums,t.datumKeys=e.datumKeys),e.items!==void 0&&(this._clearStateBeforeSet(t),t.items=e.items),e.fields!==void 0){if(this._clearStateBeforeSet(t),e.fields===null)t.fields=e.fields;else{t.fields=t.fields||{};for(let n in e.fields){let r=e.fields[n];t.fields[n]=t.fields[n]||{};let i=t.fields[n];h(r.domain)&&(i.domain=r.domain),h(r.type)&&(i.type=r.type)}}}e.filter&&(this._clearStateBeforeSet(t),t.filter=e.filter)}else this.addStateInfo(e)}clearStateInfo(e){e.forEach((e=>{this.getStateInfo(e)&&this.changeStateInfo({stateValue:e,datumKeys:null,datums:null,fields:null,items:null,filter:null,cache:{}})}))}clearAllStateInfo(){this._stateInfoList=[]}_isMultiMark(){return!this._mark||jl(this._mark.type)}checkOneState(e,t,n){var r;let i=!1,a=!1;if(h(n.datums)&&n.datums.length>0)i=this.checkDatumState(n,t),a=!0;else if(n.items)i=(r=this.checkItemsState(n,e))!=null&&r,a=!0;else if(n.fields)i=this.checkFieldsState(n,t,e),a=!0;else if(!i&&n.filter){let r={mark:this._mark,renderNode:e,type:this._mark.type};i=n.filter(t?.[0],r),a=!0}return a?i?`in`:`out`:`skip`}checkState(e,t){let n=(e.context.states??[]).filter((e=>ud(e))).map((e=>[e,10]));for(let r=0;r<this._stateInfoList.length;r++){let i=this._stateInfoList[r],a=this.checkOneState(e,t,i);a!==`skip`&&a===`in`&&n.push([i.stateValue,i.level])}return n.map((e=>e[0]))}checkDatumState(e,t){let n=!1,r=t[0];if(A(e.datums)){let t=this._isMultiMark(),i=e.datumKeys||Object.keys(e.datums[0]).filter((e=>!e.startsWith(`__VCHART`)));n=e.datums.some((e=>t&&A(e?.items)?i.every((t=>e?.items?.[0]?.[t]===r?.[t])):i.every((t=>e?.[t]===r?.[t]))))}else if(D(e.datums)){let t=e.datumKeys||Object.keys(e.datums).filter((e=>!e.startsWith(`__VCHART`))),i=this._isMultiMark();n=t.every((t=>i?e.datums.items?.[0][t]===r[t]:e.datums?.[t]===r[t]))}else n=t===e.datums;return n}checkItemsState(e,t){return e.items?.includes(t)}checkFieldsState(e,t,n){let r=!0;for(let i in e.fields){let a=e.fields[i],o=a.type,s=a.domain,c=t[0]?.[i];if(k(o)&&s.length>1){if(this.checkLinearFieldState(s,i,t,n)){r=!1;break}r=!0}else{if(!s.some((e=>e===c))){r=!1;break}r=!0}}return r}checkLinearFieldState(e,t,n,r){let i=this._isMultiMark()?n[0]?.[t]:n[t];return i<e[0]||i>e[e.length-1]}release(){}}})))()}var _d;function vd(){return(vd=e((()=>{Xa(),Cu(),U(),_d=class extends Su{constructor(){super(...arguments),this.id=Ja(),this._compiledProductId=null}getProductId(){return this._compiledProductId??this.generateProductId()}compile(e){this._compileProduct(e)}setTransform(e){this._transform=e}runTransforms(e,t){if(!e||!e.length)return t;let n=t;return e.forEach((e=>{n=H.getGrammarTransform(e.type)?.transform(e,n)})),n}}})))()}var yd;function bd(){return(bd=e((()=>{vd(),yd=class extends _d{getProduct(){return this._product||=this.runTransforms(this._transform,this.getLatestData()),this._product}getDataView(){return this._data}setDataView(e){this._data=e}getLatestData(){return this._data?.latestData}constructor(e,t){super(e),this._data=null,this._data=t}removeProduct(e){this._product=null,this._prevProduct=null,this._compiledProductId=null}release(){this.removeProduct(),super.release(),this._data=null}addRelatedMark(e){this._relatedMarks||={},this._relatedMarks[e.id]=e}updateData(e){if(this._compileProduct(),this._relatedMarks){let t=!1;if(Object.keys(this._relatedMarks).forEach((e=>{this._relatedMarks[e]&&(t=!0,this._relatedMarks[e].commit())})),!e&&t)return this.getCompiler().renderNextTick()}}_compileProduct(){this._prevProduct=this._product,this._product=null}generateProductId(){return`${this.getDataView()?.name}`}}})))()}var xd,Sd,Cd,wd,Td;function Ed(){return(Ed=e((()=>{Ki(),Ge(),v(),Re(),xd=(e,t,n,r)=>typeof e==`function`?e(t,n,r):e,Sd=(e,t,n,r,i)=>{let a={prev:e.map((e=>e.context?.data?.[0])),next:t.map((e=>e.context?.data?.[0]))},o={prev:e.slice(),next:t.slice()},s=n.animation??{},c=s.easing,l=xd(s.delay,i,a,o),u=xd(s.duration,i,a,o),d=xd(s.oneByOne,i,a,o),f=xd(s.splitPath,i,a,o),p=P(d)&&d>0?e=>ft(d)?e*d:!0===d?e*u:0:void 0;e.length!==1&&e.length!==0||t.length!==1?e.length===1&&t.length>1?ai(e[0],t,{delay:l,duration:u,easing:c,onEnd:r,individualDelay:p,splitPath:f}):e.length>1&&t.length===1&&Ri(e,t[0],{delay:l,duration:u,easing:c,onEnd:r,individualDelay:p,splitPath:f}):Ti(e[0],t[0],{delay:l,duration:u,easing:c,onEnd:r})},Cd=(e,t)=>{let n=Math.floor(e.length/t);return Array(t).fill(0).map(((r,i)=>e.slice(n*i,i===t-1?e.length:n*(i+1))))},wd=e=>{let t=e.getMarkConfig();h(t.morphElementKey)&&e.getGraphics().forEach((e=>{let n=e.context?.data?.[0];n&&(e.context.morphKey=n[t.morphElementKey])}))},Td=(e,t,n={})=>{let r=[],i=[];e.forEach((e=>{wd(e),r.push(...e.getGraphics())})),t.forEach((e=>{wd(e),i.push(...e.getGraphics())}));let a=e=>e.context?.morphKey??e.context?.key,o=/* @__PURE__ */ new Map,s=/* @__PURE__ */ new Map;if(r.forEach((e=>{let t=a(e);t&&(o.has(t)||o.set(t,[]),o.get(t).push(e))})),i.forEach((e=>{let t=a(e);t&&(s.has(t)||s.set(t,[]),s.get(t).push(e))})),o.size!==s.size||!Array.from(o.keys()).every((e=>s.has(e))))return!1;let c=[...new Set([...o.keys()].filter((e=>s.has(e))))],l=[...s.keys()].filter((e=>!o.has(e))),u=0,d=()=>{--u,u===0&&t.forEach((e=>{}))};return l.forEach((e=>{let t=s.get(e);Sd([],t,n,d,{}),u+=1})),c.forEach((e=>{let t=o.get(e),r=s.get(e),i=Math.min(t.length,r.length);if(i>0){let e=Cd(t,i),a=Cd(r,i);for(let t=0;t<i;t++)Sd(e[t],a[t],n,d,{}),u+=1}})),u===0&&d(),!0}})))()}var Dd,Od,kd,Ad,jd;function Md(){return(Md=e((()=>{Dd=e=>Array.isArray(e)?e:e?[e]:[],Od=(e,t)=>{let n=e??[];return n.length===t.length&&n.every(((e,n)=>e===t[n]))},kd=(e,t,n)=>{var r;if(e.setStates)return void e.setStates(t,{animate:n,animateSameStatePatchChange:!0});let i=t??[];Od(e.currentStates,i)?(r=e.invalidateResolver)==null||r.call(e):i.length?e.useStates(i,n):e.clearStates(n)},Ad=(e,t,n=!0,r)=>{var i;if(!t)return;let a=n&&(i=e.currentStates)!=null?i:[],o=n?Array.from(/* @__PURE__ */ new Set([...a,t])):[t];kd(e,o,r)},jd=(e,t,n)=>{let r=Dd(t);if(!r.length)return;let i=(e.currentStates??[]).filter((e=>!r.includes(e)));kd(e,i,n)}})))()}var Nd,Pd,Fd;function Id(){return(Id=e((()=>{$u(),td(),_i(),Ae(),Qo(),sd(),yu(),Ke(),Ho(),gd(),S(),j(),le(),o(),E(),Tt(),v(),te(),Il(),Al(),Pa(),fd(),U(),Dc(),vd(),vu(),Ol(),bd(),rl(),Va(),Ed(),Md(),Nd=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`){var i=0;for(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},Pd=Symbol(`statesClearedBeforeReInit`),Fd=class extends _d{commit(e,t){t&&this.getMarks().length>0&&this.getMarks().forEach((e=>e.commit(!1,t))),this._isCommited=!0,e&&this.getCompiler().renderNextTick()}uncommit(){this._isCommited=!1}isCommited(){return this._isCommited}getMarkConfig(){return this._markConfig}setMarkConfig(e){Object.keys(e).forEach((t=>{this._markConfig[t]=e[t]}))}getVisible(){return this._visible}setVisible(e){this._visible=e}getUserId(){return this._userId}setUserId(e){h(e)&&(this._userId=e)}getDataView(){return this._data?.getDataView()}setDataView(e){N(this._data)&&this.initMarkData(this._option),this._data.setDataView(e)}getData(){return this._data}setData(e){this._data=e,e&&e.addRelatedMark(this)}hasState(e){return e in this.state.getStateMap()}getState(e){return this.state.getStateMap()[e]}getAnimationConfig(){return this._animationConfig}setAnimationConfig(e){let t=this.type===`group`?{selfOnly:!0}:{},n=e=>{let n=e.options??{};return Object.assign(Object.assign(Object.assign({},t),e),{options:(e,t,r)=>{let i=typeof n==`function`?n(e,t,r):n;if(t&&t.context&&t.context.compiler&&h(t.context.modelId)){let e=t.context.compiler.getChart()?.getModelById(t.context.modelId);return Object.assign(Object.assign({},i),{layoutRect:(e?.getLayoutRect)?.call(e)})}return Object.assign({},i)}})},r={};Object.keys(e).forEach((t=>{let i=e[t];A(i)?r[t]=i.map(n):h(i)&&(r[t]=n(i))})),this._animationConfig=r}disableAnimationByState(e){let t=T(e);this._disabledAnimationStates=[.../* @__PURE__ */ new Set([...this._disabledAnimationStates,...t])]}enableAnimationByState(e){let t=T(e);this._disabledAnimationStates=this._disabledAnimationStates.filter((e=>!t.includes(e)))}setSkipBeforeLayouted(e){this._skipBeforeLayouted=e}setGroupKey(e){this._groupKey=e}getProduct(){return this._product}initMarkData(e){this._data=new yd(e),this._data.addRelatedMark(this)}_compileProduct(e){this.commit(),this._context=e?.context;let t=this.getProduct();if(this._visible){if(h(t))e!=null&&e.group&&t.parent!==e.group&&e.group.appendChild(t);else{if(!this.getCompiler().isInited)return;this._initProduct(e?.group)}N(this._product)||(this.compileData(),this.compileState(),this.compileEncode())}else h(t)&&this.removeProduct()}_initProduct(e){if(!this.getStage())return;let t=this.getProductId();this._product=rn(this.type===`group`?{}:{pickable:!1,zIndex:this._markConfig.zIndex,overflow:this._markConfig.overflow}),this._product.name=t,this._product.mark=this,(e??this.getCompiler()?.getRootGroup()).appendChild(this._product),this._compiledProductId=t}generateProductId(){return this._userId?`${this._userId}`:`${this.name}_${this.id}`}layout(e){}compileData(){N(this._data)||this._data.compile()}compileEncode(){}compileState(){}compileAnimation(){}compileContext(e){this._context=Object.assign({markId:this.id,modelId:this.model.id,markUserId:this._userId,modelUserId:this.model.userId},e)}getContext(){return this._context}compileTransform(){}updateState(e,t){return this.commit(),this.state.updateState(e,t)}getMarks(){return[]}runAnimationByState(e){}stopAnimationByState(e){}pauseAnimationByState(e){}resumeAnimationByState(e){}removeProduct(e){this._product&&this._product.parent&&this._product.parent.removeChild(this._product,e),this._product=null,this._compiledProductId=null}release(){this.state.release(),super.release(),this._lastMark=null}setSimpleStyle(e){this._simpleStyle=e}getSimpleStyle(){return this._simpleStyle}constructor(e,t){var n;super(t),this.type=void 0,this.name=`mark`,this._markConfig={zIndex:gu.Mark,morph:!1},this._visible=!0,this.stateStyle={},this._unCompileChannel={},this._disabledAnimationStates=[],this._skipBeforeLayouted=!1,this._sharedStateDefinitionRefIds=/* @__PURE__ */ new WeakMap,this._sharedStateDefinitionRefId=0,this._extensionChannel={},this._computeExChannel={},this._graphicMap=/* @__PURE__ */ new Map,this._graphics=[],this._getEncoderOfStyle=(e,t)=>{if(t&&e){let n={};return Object.keys(t).forEach((t=>{this._unCompileChannel[t]||(n[t]=this._computeAttribute(t,e))})),n}return null},this._setGraphicFromMarkConfig=e=>{let{setCustomizedShape:t,graphicName:n}=this._markConfig;t&&(e.pathProxy=n=>t(e.context.data,n,new ha)),n&&(e.name=M(n)?n(e):n)},this._setStateOfGraphic=(e,t)=>{let n=e.context.diffState===Qu.enter||e.context.diffState===Qu.update?e.context.states:void 0,r=!!(e.currentStates?.length||e.effectiveStates?.length||e.resolvedStatePatch||e.registeredActiveScopes?.size);(n!=null&&n.length||r)&&kd(e,n,t)},this.name=e,this.model=t.model,this.key=t.key,this.state=new hd(t,this),this._attributeContext=t.attributeContext,(n=t.map)==null||n.set(this.id,this)}created(){this._initStyle()}initStyleWithSpec(e){e&&(h(e.id)&&(this._userId=e.id),de(e.interactive)&&(this._markConfig.interactive=e.interactive),h(e.zIndex)&&(this._markConfig.zIndex=e.zIndex),de(e.visible)&&this.setVisible(e.visible),this._markConfig.setCustomizedShape=e.customShape,this._stateSort=e.stateSort,this._initSpecStyle(e))}_transformStyleValue(e,t){if(e.scale){let n=e.scale,r=n.range();return n.range(r.map(t)),e}return typeof e==`function`?(...n)=>t(e(...n)):t(e)}convertAngleToRadian(e){return this._transformStyleValue(e,me)}isUserLevel(e){return[Z.User_Mark,Z.User_Series,Z.User_Chart,Z.User_SeriesStyle].includes(e)}setStyle(e,t=`normal`,n=0){if(N(e))return;this.stateStyle[t]===void 0&&(this.stateStyle[t]={});let r=this.isUserLevel(n);Object.keys(e).forEach((i=>{let a=e[i];N(a)||(a=this._filterAttribute(i,a,t,n,r),this.setAttribute(i,a,t,n))}))}getStyle(e,t=`normal`){return this.stateStyle[t][e]?.style}_filterAttribute(e,t,n,r,i){let a=this._styleConvert(t);if(i)switch(e){case`angle`:a=this.convertAngleToRadian(a);break;case`innerPadding`:case`outerPadding`:a=this._transformStyleValue(a,(e=>-e));break;case`curveType`:a=this._transformStyleValue(a,(e=>Ml(e,this._option.model.direction)))}return a}setReferer(e,t,n){if(e){if(t&&n){let r=this.stateStyle[n]??{[t]:{}};this.stateStyle[n][t]=Object.assign(Object.assign({},r[t]),{referer:e})}else Object.entries(this.stateStyle).forEach((([t,n])=>{Object.entries(n).forEach((([n,r])=>{this.stateStyle[t][n].referer=e}))}))}}setPostProcess(e,t,n=`normal`){var r;(r=this.stateStyle[n])!=null&&r[e]&&(this.stateStyle[n][e].postProcess=t)}getAttribute(e,t,n=`normal`){return this._computeAttribute(e,n)(t)}getAttributesOfState(e,t=`normal`){let n=this.stateStyle[t];if(n){let r={};return Object.keys(n).forEach((n=>{this._unCompileChannel[n]||(r[n]=this._computeAttribute(n,t)(e))})),r}}setAttribute(e,t,n=`normal`,r=0){this.stateStyle[n]===void 0&&(this.stateStyle[n]={}),this.stateStyle[n][e]===void 0&&(this.stateStyle[n][e]={level:r,style:t,referer:void 0});let i=this.stateStyle[n][e]?.level;h(i)&&i<=r&&R(this.stateStyle[n][e],{style:t,level:r}),n!==`normal`&&e in this._extensionChannel&&this._extensionChannel[e].forEach((e=>{this.stateStyle[n][e]===void 0&&(this.stateStyle[n][e]=this.stateStyle.normal[e])}))}_getDefaultStyle(){return{visible:!0,x:0,y:0}}_styleConvert(e){if(!e)return e;if(kt(e.type)||e.scale){let t=Ko(e,{globalScale:this._option.globalScale,seriesId:this._option.seriesId});if(t)return{scale:t,field:e.field,changeDomain:e.changeDomain}}return e}_computeAttribute(e,t){let n=this.stateStyle[t]?.[e];n||=this.stateStyle.normal[e];let r=this._computeStateAttribute(n,e,t),i=M(n?.postProcess),a=e in this._computeExChannel;if(i&&a){let i=this._computeExChannel[e];return a=>{let o=r(a);return o=n.postProcess(o,a,this._attributeContext,this.getDataView()),i(e,a,t,o)}}if(i)return e=>n.postProcess(r(e),e,this._attributeContext,this.getDataView());if(a){let n=this._computeExChannel[e];return i=>n(e,i,t,r(i))}return r}_computeStateAttribute(e,t,n){return e?e.referer?e.referer._computeAttribute(t,n):e.style?typeof e.style==`function`?t=>e.style(t,this._attributeContext,{mark:this},this.getDataView()):nd.includes(e.style.gradient)?this._computeGradientAttr(e.style):[`outerBorder`,`innerBorder`].includes(t)?this._computeBorderAttr(e.style):kt(e.style.scale?.type)?t=>{let n=t;return this.model.modelType===`series`&&this.model.getMarkData&&(n=this.model.getMarkData(t)),e.style.scale.scale(n[e.style.field])}:t=>e.style:t=>e.style:e=>{}}_initStyle(){let e=this._getDefaultStyle();this.setStyle(e,`normal`,0)}_initSpecStyle(e){e.style&&this.setStyle(e.style,`normal`,Z.User_Mark);let t=e.state;t&&Object.keys(t).forEach((e=>{let n=t[e];if(`style`in n){let t=n.style,r={stateValue:e};`level`in n&&(r.level=n.level),`filter`in n&&(r=M(n.filter)?Object.assign({filter:n.filter},r):Object.assign(Object.assign({},n.filter),r)),this.state.addStateInfo(r),this.setStyle(t,e,Z.User_Mark)}else this.setStyle(n,e,Z.User_Mark)}))}_computeGradientAttr(e){var t,n;let{gradient:r,scale:i,field:a}=e,o=Nd(e,[`gradient`,`scale`,`field`]),s=i,c=a;if(!(i&&a||this.model.modelType!==`series`)){let{scale:e,field:t}=this.model.getColorAttribute();i||(s=e),c||=t}let l=Fo(Po(this.model.getColorScheme(),this.model.modelType===`series`?(t=this.model).getSpec?.call(t):void 0),((n=this.model)?.getDefaultColorDomain)?.call(n)??[]),u=Object.assign(Object.assign({},od[r]),o);return e=>{let t={},n=this.getDataView();return Object.keys(u).forEach((r=>{let i=u[r];r===`stops`?t.stops=i.map((t=>{let{opacity:r,color:i,offset:a}=t,o=i??s?.scale(e[c]);return M(i)&&(o=i(e,this._attributeContext,n)),h(r)&&(o=Ee.SetOpacity(o,r)),{offset:M(a)?a(e,this._attributeContext,n):a,color:o||l[0]}})):M(i)?t[r]=i(e,this._attributeContext,n):t[r]=i})),t.gradient=r,t}}_computeBorderAttr(e){let{scale:t,field:n}=e,r=Nd(e,[`scale`,`field`]);return e=>{var i;let a={};if(Object.keys(r).forEach((t=>{let n=r[t];M(n)?a[t]=n(e,this._attributeContext,this.getDataView()):a[t]=n})),`stroke`in a)nd.includes(r.stroke?.gradient)&&(a.stroke=this._computeGradientAttr(r.stroke)(e));else{let r=Fo(Po(this.model.getColorScheme(),this.model.modelType===`series`?(i=this.model).getSpec?.call(i):void 0),this.model.getDefaultColorDomain()),o=t,s=n;if(!(t&&n||this.model.modelType!==`series`)){let{scale:n,field:i}=this.model.getColorAttribute();t||(o=n),s||=i,a.stroke=o?.scale(e[s])||r[0]}}return a}}_getDataByKey(e){return Nl(e,((e,t)=>`${this._groupKeyGetter(e)}_${this._keyGetter(e)??t}`))}_getCommonContext(){return{compiler:this.getCompiler(),markType:this.type,markId:this.id,modelId:this.model.id,markUserId:this._userId,modelUserId:this.model.userId}}prepareMorph(e){this._lastMark=e}reuse(e){this.type===e.type&&(this._product=e.getProduct(),this._product&&(this._product.clearStates(),this._graphics=e.getGraphics(),this._graphics.forEach((e=>{e.clearStates()})),this._graphicMap=e._graphicMap,this._graphicMap.forEach((e=>{e.context=Object.assign(Object.assign({},e.context),this._getCommonContext())})),this._dataByKey=e._dataByKey,this._prevDataByKey=e._prevDataByKey,this.needClear=e.needClear))}_parseProgressiveContext(e){let t=this._markConfig.progressiveStep>0&&this._markConfig.progressiveThreshold>0&&this._markConfig.progressiveStep<this._markConfig.progressiveThreshold,n=this._markConfig.large&&this._markConfig.largeThreshold>0&&e.length>=this._markConfig.largeThreshold;if(t){let t=this._dataByGroup;return t&&t.keys&&t.keys.some((e=>t.data.get(e).length>this._markConfig.progressiveThreshold))?{large:n,progressive:{data:e,step:this._markConfig.progressiveStep,currentIndex:0,totalStep:t.keys.reduce(((e,n)=>Math.max(Math.ceil(t.data.get(n).length/this._markConfig.progressiveStep),e)),1),groupedData:t.data}}:{large:n}}return{large:n}}getGraphics(){return this._graphics}_createGraphic(e={}){return H.createGraphicComponent(this.type,e)}_afterCreateGraphic(e){}_getRuntimeStateKeys(){}_runGroupData(e){this._keyGetter=M(this.key)?this.key:h(this.key)?e=>e?.[this.key]:e=>e?.[fc],this._groupKeyGetter=h(this._groupKey)?e=>`${e?.[this._groupKey]}`:()=>`key`,this._dataByGroup=Nl(e,this._groupKeyGetter)}getAnimationState(){let e=this._graphics.map((e=>e.context.animationState));return(e.every((e=>e===Dl.appear))?Dl.appear:e.every((e=>e===Dl.disappear))?Dl.disappear:e[0])??Dl.none}createAnimationStateList(e,t){let n=t[e];return n&&Array.isArray(n)&&(n=n.length===1?n[0]:n),Array.isArray(n)?n.map(((e,t)=>Object.assign(Object.assign({},e),{priority:e.priority??1/0}))):n&&Object.assign(Object.assign({},n),{priority:e===`normal`?n.priority??1/0:n.priority})}tryRunMorphing(e){if(this._lastMark){e.forEach((e=>{e.context.animationState!==`appear`&&e.context.animationState!==`enter`||e.setAttributes(e.getAttributes(!0))}));let t=Td([this._lastMark],[this],{});return this._lastMark=null,t}return!1}_runStateAnimation(e){var t;if(!this._animationConfig||e.length===0||this.tryRunMorphing(e))return;let n=this.getAnimationConfig();if((t=this._markConfig.useSequentialAnimation)!=null&&t&&this._runSequentialAnimations)return void this._runSequentialAnimations(e);let r=e.every((e=>e.context.animationState===`appear`)),i=this.createAnimationStateList(`appear`,n);if(r&&this._product){let e=i?[`appear`]:[],t=i?[{name:`appear`,animation:i}]:[];if(n.normal){e.push(`normal`);let r={name:`normal`,animation:this.createAnimationStateList(`normal`,n)};t.push(r)}this._product.applyAnimationState(e,t)}let a=!1;if(e.forEach((e=>{let t=e.context.animationState;if(t===`appear`||t===`update`&&!this._hasDiffAttrs(e))return;let r=n[t];if(r&&r.length>0){let n=r.map(((e,n)=>({name:`${t}_${n}`,animation:e})));n.forEach((t=>{t.animation.customParameters=e.context}));let i=[t];e.applyAnimationState(i,[n.length===1?n[0]:n])}t===`enter`&&n.normal&&(a=!0)})),a&&this._product&&n.normal?.length){this._product.stopAnimationState(`normal`,`start`);let e={name:`normal`,animation:this.createAnimationStateList(`normal`,n)};this._product.applyAnimationState([`normal`],[e])}}_setAnimationState(e){var t;let n=((this.type===`component`?this.model.getAnimationStateCallback():((t=this.model).getRegion?.call(t))?.getAnimationStateCallback())||(e=>{let t=e.context?.diffState;return t===Dl.exit?Dl.exit:t===Dl.update?Dl.update:Dl.appear}))(e);e.context.animationState=n??e.context.diffState,e.context.animationState===Qu.exit&&(e.context.reusing=!0,e.stopAnimates())}_runJoin(e){let t=this._getDataByKey(e),n=this._prevDataByKey,r=[],i=new Set(this._graphics.filter((e=>e.context.diffState===Qu.enter))),a=(e,t,n)=>{let a,o;return N(t)?(a=this._graphicMap.get(e),a&&(o=Qu.exit)):N(n)?(a=this._graphicMap.has(e)?this._graphicMap.get(e):{},o=Qu.enter,a.isExiting=!1,this._graphicMap.set(e,a),r.push(a)):(a=this._graphicMap.get(e),a&&(o=Qu.update,r.push(a))),a&&(i.delete(a),a.context=Object.assign(Object.assign({},this._getCommonContext()),{diffState:o,reusing:a.context?.reusing,finalAttrs:a.context?.finalAttrs,originalFieldX:a.context?.originalFieldX,originalFieldY:a.context?.originalFieldY,fieldX:a.context?.fieldX,fieldY:a.context?.fieldY,data:t??a.context?.data,uniqueKey:e,key:t?this._keyGetter(t[0]):a.context?.key,groupKey:t?this._groupKeyGetter(t[0]):a.context?.groupKey,indexKey:`__VCHART_DEFAULT_DATA_INDEX`,stateAnimateConfig:this.getAnimationConfig()?.state}),this._setAnimationState(a)),a};if(n&&t){let e=new Map(n.data);t.keys.forEach((n=>{a(n,t.data.get(n),e.get(n)),e.delete(n)})),n.keys.forEach((t=>{e.has(t)&&a(t,null,e.get(t))}))}else t?t.keys.forEach((e=>{let n=a(e,t.data.get(e),null);n&&(n.context.animationState=Dl.appear)})):n&&n.keys.forEach((e=>{a(e,null,n.data.get(e)).context.animationState=Dl.disappear}));i.forEach((e=>{this._graphicMap.delete(e.context.uniqueKey),e.parent&&e.parent.removeChild(e),e.release()}));let o=r.length;r.forEach(((e,t)=>{e.context.graphicCount=o,e.context.graphicIndex=t,e.stateSort=this._stateSort})),this._dataByKey=t,this._graphics=r,this.needClear=!0}_runEncoderOfGraphic(e,t,n={}){return Fl(e,t.context.data[0],n)}_runGroupEncoder(e){if(!this._dataByGroup)return null;let t={};return this._dataByGroup.keys.forEach((n=>{t[n]=Fl(e,this._dataByGroup.data.get(n)[0])})),this._attrsByGroup=t,t}_transformGraphicAttributes(e,t,n){return Object.assign(Object.assign({},n),t)}_separateNormalStyle(e){let t={},n={};return Object.keys(e).forEach((r=>{this._unCompileChannel[r]||(this._option.noSeparateStyle||cd(r,e,this._groupKey)?t[r]=e[r]:n[r]=e[r])})),{updateStyles:t,groupStyles:n}}_getSharedStateDefinitionRefId(e){if(typeof e!=`object`&&typeof e!=`function`||e===null)return`${e}`;let t=e,n=this._sharedStateDefinitionRefIds.get(t);return n||(n=++this._sharedStateDefinitionRefId,this._sharedStateDefinitionRefIds.set(t,n)),`ref:${n}`}_getSharedStateDefinitionValueKey(e){try{return JSON.stringify(e)??`${e}`}catch{return this._getSharedStateDefinitionRefId(e)}}_isStaticSharedStateAttribute(e,t){let n=this.stateStyle[e]?.[t];if(!n||n.referer||M(n.postProcess)||t in this._computeExChannel)return!1;let r=n.style;return!M(r)&&!nd.includes(r?.gradient)&&![`outerBorder`,`innerBorder`].includes(t)&&!kt(r?.scale?.type)}_applySharedStateDefinitions(){if(!this._product)return;let e=this._getRuntimeStateKeys(),t=Object.keys(this._encoderOfState??{}).filter((e=>e!==`group`&&e!==`update`));if(e&&Object.keys(e).forEach((e=>{t.includes(e)||t.push(e)})),!t.length)return void(this._product.sharedStateDefinitions!==void 0&&(this._product.sharedStateDefinitions=void 0));let n=this._stateSort?t.slice().sort(this._stateSort):t,r=/* @__PURE__ */ new Map;n.forEach(((e,t)=>{r.set(e,t)}));let i={},a=[];if(t.forEach((t=>{let n=this._encoderOfState?.[t],o=e?.[t],s={},c={},l=[],u=[];if(Object.keys(n??{}).forEach((e=>{this._isStaticSharedStateAttribute(t,e)?(s[e]=this._computeAttribute(e,t)(void 0),l.push(e)):(c[e]=n[e],u.push(e))})),!l.length&&!u.length&&!o?.length)return;let d={priority:r.get(t)??0};l.length&&(d.patch=s),o?.length?(d.declaredAffectedKeys=Array.from(/* @__PURE__ */ new Set([...u,...o])),d.resolver=({graphic:e})=>{let n=u.length?this._runEncoderOfGraphic(c,e):{};return Object.assign(n,e.runtimeStateCache?.[t])}):u.length&&(d.declaredAffectedKeys=u,d.resolver=({graphic:e})=>this._runEncoderOfGraphic(c,e)),i[t]=d,a.push([t,d.priority,o?.join(`,`),l.sort().map((e=>`${e}:${this._getSharedStateDefinitionValueKey(s[e])}`)),u.sort().map((e=>{let n=this.stateStyle[t]?.[e];return`${e}:${this._getSharedStateDefinitionRefId(n?.style)}:${this._getSharedStateDefinitionRefId(n?.postProcess)}:${this._getSharedStateDefinitionRefId(n?.referer)}`}))].join(`|`))})),!a.length)return void(this._product.sharedStateDefinitions!==void 0&&(this._product.sharedStateDefinitions=void 0));let o=a.sort().join(`||`);o===this._sharedStateDefinitionsCacheKey&&this._sharedStateDefinitionsCache?this._product.sharedStateDefinitions!==this._sharedStateDefinitionsCache&&(this._product.sharedStateDefinitions=this._sharedStateDefinitionsCache):(this._sharedStateDefinitionsCacheKey=o,this._sharedStateDefinitionsCache=i,this._product.sharedStateDefinitions=i)}_addProgressiveGraphic(e,t){e.incrementalAppendChild(t)}_runEncoder(e,t){let n=t?null:this._runGroupEncoder(this._encoderOfState?.group);e.forEach((e=>{let t=this._runEncoderOfGraphic(this._encoderOfState?.update,e);N(this._markConfig.interactive)||(t.pickable=this._markConfig.interactive);let r=this._transformGraphicAttributes(e,t,n?.[e.context.groupKey]);e.context.finalAttrs=r}))}_excludeStateControlledDiffAttrs(e,t){if(!t||!Object.keys(t).length||!e.resolvedStatePatch)return t;let n;return Object.keys(e.resolvedStatePatch).forEach((e=>{e in t&&(n||=Object.assign({},t),delete n[e])})),n??t}_hasDiffAttrs(e){return!!e.context.diffAttrs&&Object.keys(e.context.diffAttrs).length>0}_commitPreventedAnimationStaticAttrs(e,t){var n,r;if(!t||!Object.keys(t).length)return;let i=e;(n=i.setFinalAttributes)==null||n.call(i,t),i._commitAnimationStaticAttributes?i._commitAnimationStaticAttributes(t):(r=i.commitInternalBaseAttributes)==null||r.call(i,t)}_runApplyGraphic(e){let t=this.hasAnimation();e.forEach(((n,r)=>{var i;let a=n.context.finalAttrs,o=this.hasAnimationByState(n.context.animationState);if(n.setAttributes){let e=this._excludeStateControlledDiffAttrs(n,nl(n,a));n.context.diffAttrs=e,n.context.reusing?(n.runtimeStateCache=void 0,n.context.lastAttrs=n.attribute,n.initAttributes(a),n.context.reusing=!1):o||(t?(n.setAttributesAndPreventAnimate(e),this._commitPreventedAnimationStaticAttrs(n,e)):n.setAttributes(e)),!((i=this.renderContext)!=null&&i.progressive)&&this._product&&n.parent!==this._product&&this._product.appendChild(n)}else{let t=n;(n=this._createGraphic(a)).context=t.context,n.context.diffAttrs=a,n.stateSort=this._stateSort,this._afterCreateGraphic(n);let i=this._graphics===e?r:r+this._graphics.length-e.length;if(i>=0&&(this._graphics[i]=n),this.renderContext?.progressive){let e=this._dataByGroup?this._dataByGroup.keys.indexOf(n.context.groupKey):0,t=e>=0?this._product.getChildAt(e):null;t&&this._addProgressiveGraphic(t,n)}else this._product.appendChild(n),this._graphicMap.set(n.context.uniqueKey,n)}this._setStateOfGraphic(n,o),this._setGraphicFromMarkConfig(n)}))}_updateEncoderByState(){let e={};Object.keys(this.stateStyle).forEach((t=>{if(t===Q.STATE_NORMAL){let{groupStyles:n,updateStyles:r}=this._separateNormalStyle(this.stateStyle[t]);e.group=this._getEncoderOfStyle(t,n),e.update=this._getEncoderOfStyle(t,r)}else e[t]=this._getEncoderOfStyle(t,this.stateStyle[t])})),this._encoderOfState=e}_runState(e){e.forEach((e=>{let t=[...(e.currentStates??[]).filter((e=>!this.state.getStateInfo(e))),...this.state.checkState(e,e.context.data)];this._stateSort&&t.length&&t.sort(this._stateSort),e.context.states=t}))}_getAttrsFromConfig(e={}){let{zIndex:t,clip:n,clipPath:r,overflow:i}=this._markConfig;if(N(t)||(e.zIndex=t),N(n)||(e.clip=n),!N(r)){let t=A(r)?r:r(this._graphics);t&&t.length||(e.clip=!1),e.path=t}return N(i)||(e.overflow=i),e}_updateAttrsOfGroup(){var e;let t=this._getAttrsFromConfig();(e=this._product)==null||e.setAttributes(t),this._markConfig.support3d&&this._product&&this._product.setMode(`3d`)}_runBeforeTransform(e){let t=this._transform?.filter((e=>{if(e.type){let t=H.getGrammarTransform(e.type);return t&&(!t.runType||t.runType===`beforeJoin`)}return!1}));return this.runTransforms(t,e)}_runEncoderTransform(e,t){let n=this._transform?.filter((e=>{if(e.type){let n=H.getGrammarTransform(e.type);return n&&n.runType===`afterEncode`&&!!n.canProgressive===t}return!1}));return this.runTransforms(n,e)}renderInner(){this._updateEncoderByState(),this._applySharedStateDefinitions();let e=this._data?.getProduct()??[{}],t=this._runBeforeTransform(e),n;if(t?.progressive){this.renderContext={beforeTransformProgressive:t.progressive};let e=t.progressive;if(e.canAnimate&&e.canAnimate()&&e.unfinished())return void this._updateAttrsOfGroup();n=e.output()}else n=T(t),this._runGroupData(n),this.renderContext=this._parseProgressiveContext(n);this.renderContext?.progressive?(this._graphicMap.clear(),this._runProgressiveStep()):(this._runJoin(n),this._runState(this._graphics),this._runEncoder(this._graphics),this._runEncoderTransform(this._graphics,!1),this._runApplyGraphic(this._graphics)),this._updateAttrsOfGroup()}render(){this.isCommited()&&(!this.getVisible()||this._skipBeforeLayouted&&this.getCompiler().getLayoutState()===kl.before||(this._product||this._initProduct(),La(`render mark: ${this.getProductId()}, type is ${this.type}`),this.renderInner()),this.uncommit())}updateMarkState(e){if(!this._product)return;let t=this.state.getStateInfo(e);this._graphics.forEach((n=>{let r=n,i=r[Pd],a=i?.includes(e),o=!a&&this.hasAnimationByState(`state`);if(this.state.checkOneState(n,n.context.data,t)===`in`?Ad(n,e,!0,o):jd(n,e,o),a){let t=i.filter((t=>t!==e));t.length?r[Pd]=t:delete r[Pd]}}))}clearExitGraphics(){this._prevDataByKey=this._dataByKey;let e=(e,t)=>{this._graphicMap.delete(t),e.parent&&e.parent.removeChild(e),e.release&&e.release()};this._graphicMap.forEach(((t,n)=>{if(t.context.diffState===Qu.exit&&!t.isExiting){if(t.context.animationState===Qu.exit&&this.hasAnimationByState(`exit`)){t.isExiting=!0;let r=this.getAnimationConfig();if(r.exit&&r.exit.length){let i=r.exit.map(((e,n)=>({name:`exit_${n}`,animation:Object.assign(Object.assign({},e),{customParameters:t.context})})));t.applyAnimationState([`exit`],[i.length===1?i[0]:i],(()=>{t.context.diffState===Qu.exit&&t.isExiting&&this._graphicMap.get(n)===t&&e(t,n)}))}}else e(t,n)}}))}isProgressive(){return this.renderContext&&(!!this.renderContext.progressive||!!this.renderContext.beforeTransformProgressive)}canAnimateAfterProgressive(){var e;return this.renderContext&&this.renderContext.beforeTransformProgressive&&(e=this.renderContext.beforeTransformProgressive).canAnimate?.call(e)}isDoingProgressive(){return this.renderContext&&(this.renderContext.progressive&&this.renderContext.progressive.currentIndex<this.renderContext.progressive.totalStep||this.renderContext.beforeTransformProgressive&&this.renderContext.beforeTransformProgressive.unfinished())}clearProgressive(){this.renderContext&&this.renderContext.progressive&&(this._graphics=[],this._product.children.forEach((e=>{e.incrementalClearChild()})),this._product.removeAllChild()),this.renderContext&&this.renderContext.beforeTransformProgressive&&this.renderContext.beforeTransformProgressive.release(),this.renderContext=null}restartProgressive(){this.renderContext&&this.renderContext.progressive&&(this.renderContext.progressive.currentIndex=0)}_runBeforeProgressive(){let e=this.renderContext.beforeTransformProgressive;e.progressiveRun();let t=e.output();if(e.canAnimate?.call(e)){if(e.unfinished())return;this._runGroupData(t),this._runJoin(t),this._runState(this._graphics),this._runEncoder(this._graphics),this._runApplyGraphic(this._graphics)}}_runProgressiveJoin(){let e=this.renderContext.progressive.currentIndex,t=[],n={};return this._dataByGroup.keys.forEach((r=>{let i=this.renderContext.progressive.groupedData.get(r),a=this.renderContext.progressive.step,o=i.slice(e*a,(e+1)*a),s=[];o.forEach(((n,i)=>{let o=this._keyGetter(n),c={context:Object.assign(Object.assign({},this._getCommonContext()),{diffState:Qu.enter,data:[n],uniqueKey:`${r}_${o??e*a+i}`,key:o,groupKey:r})};s.push(c),t.push(c)})),n[r]=s})),{graphicsByGroup:n,graphics:t,needUpdate:!0}}_createIncrementalGraphics(){this._product.removeAllChild(),this._dataByGroup.keys.forEach((e=>{let t=rn({pickable:!1,zIndex:this._markConfig.zIndex});t.incremental=this.renderContext.progressive.step,this._product.appendChild(t)}))}_setCommonAttributesToTheme(e){var t;if(this._attrsByGroup&&e){let n=e.parent;n&&(t=this._attrsByGroup)!=null&&t[e.context?.groupKey]&&n.setTheme({common:this._attrsByGroup[e.context?.groupKey]})}}_runProgressiveEncoder(e){this.renderContext.progressive.currentIndex===0?this._runEncoder(e):this._runEncoder(e,!0)}_runProgressiveApplyGraphic(e){this.renderContext.progressive.currentIndex===0?(this._runApplyGraphic(e),this._setCommonAttributesToTheme(e[0])):this._runApplyGraphic(e)}_runProgressiveStep(){let{graphics:e,graphicsByGroup:t,needUpdate:n}=this._runProgressiveJoin();this.renderContext.progressive.currentIndex===0?(this._createIncrementalGraphics(),this._graphics=e):n&&e.forEach((e=>{this._graphics.push(e)})),this._runState(e),Object.keys(t).forEach((e=>{this._runProgressiveEncoder(t[e])})),this._runEncoderTransform(this._graphics,!0),Object.keys(t).forEach((e=>{this._runProgressiveApplyGraphic(t[e])})),this.renderContext.progressive.currentIndex+=1}renderProgressive(){this.renderContext?.beforeTransformProgressive?this._runBeforeProgressive():this.renderContext.progressive&&this._runProgressiveStep()}hasAnimationByState(e){if(!e||!this._animationConfig||!this._animationConfig[e]||this._disabledAnimationStates.includes(e))return!1;let t=this._animationConfig[e];return t.length>0||D(t)}hasAnimation(){return!!this._animationConfig&&Object.keys(this._animationConfig).length>0}runAnimation(){this._runStateAnimation(this.getGraphics())}clearBeforeReInit(){this.state.clearAllStateInfo(),this.uncommit(),this.stateStyle={},this._initStyle(),this.getGraphics().forEach((e=>{var t;(t=e.currentStates)!=null&&t.length&&(e[Pd]=e.currentStates.slice())}))}}})))()}var Ld,Rd;function zd(){return(zd=e((()=>{U(),Va(),Id(),$u(),Pa(),E(),Hl(),rl(),Ld=class e extends Fd{constructor(){super(...arguments),this.type=e.type,this._marks=[],this._diffState=Qu.enter}getMarks(){return this._marks}isMarkExist(e){return this._marks.find((t=>t.id===e.id))!==void 0}addMark(e){return this.isMarkExist(e)?(Ra(`Mark already exists, add mark failed.`),!1):(this._marks.push(e),!0)}removeMark(e){let t=this._marks.findIndex((t=>t.id===e.id||t.name===e.name));return t===-1?(Ra(`Mark does not exists, removeMark failed.`),!1):(this._marks.splice(t,1),!0)}getMarkInType(e){return this._marks.filter((t=>t.type===e))}getMarkInId(e){return this._marks.find((t=>t.id===e))}getMarkInUserId(e){let t;return Rl(this,(e=>{t=e}),(t=>t.getUserId()===e),null,!0),t}getMarkInName(e){return this._marks.filter((t=>t.name===e))}_compileProduct(e){super._compileProduct(e),this.getMarks().forEach((e=>{e.compile({group:this._product})}))}_getAttrsFromConfig(e={}){let t=super._getAttrsFromConfig(e);return N(this._markConfig.interactive)||(t.pickable=this._markConfig.interactive),e}getGraphics(){return[this._product]}renderInner(){if(!this._product)return;let e=this._simpleStyle??this.getAttributesOfState({});this._product.context=Object.assign(Object.assign(Object.assign({},this._product.context),this._getCommonContext()),{diffState:this._diffState}),this._setAnimationState(this._product);let t=this._getAttrsFromConfig(e);if(this._product.context.finalAttrs=t,this._product.context.diffState===Qu.update){let e=this.hasAnimation(),n=nl(this._product,t);this._product.context.diffAttrs=n,this.hasAnimationByState(this._product.context.animationState)||(e?(this._product.setAttributesAndPreventAnimate(n),this._commitPreventedAnimationStaticAttrs(this._product,n)):this._product.setAttributes(n))}else this._product.setAttributes(t);this.needClear=!0}clearExitGraphics(){this._diffState=Qu.update}render(){this._isCommited&&(La(`render mark: ${this.getProductId()}, type is ${this.type}`),this.renderInner(),this.uncommit()),this.getMarks().forEach((e=>{e.render()}))}release(){super.release(),this.removeProduct(!0)}},Ld.type=`group`,Rd=()=>{Wt(),ma(),H.registerMark(Ld.type,Ld)}})))()}var Bd;function Vd(){return(Vd=e((()=>{lc(),Bd={measureText:cc}})))()}var Hd;function Ud(){return(Ud=e((()=>{Hd=class e{static instance(){return e.instance_||=new e,e.instance_}constructor(){this.functions={}}registerFunction(e,t){e&&t&&(this.functions[e]=t)}unregisterFunction(e){e&&delete this.functions[e]}getFunction(e){return this.functions[e]||null}getFunctionNameList(){return Object.keys(this.functions)}}})))()}var Wd,Gd;function Kd(){return(Kd=e((()=>{Pt(),Cr(),vn(),Wd=()=>{Ur(Fi)},Gd=()=>{Gn(Fi)}})))()}var qd;function Jd(){return(Jd=e((()=>{Xa(),Va(),qd=class{constructor(){this.id=Ja(),this._plugins=[]}add(e){if(!e||e.length===0)return null;let t=[];return e.forEach((e=>{this._plugins.find((t=>t.id===e.id))?Ra(`不要重复添加相同的plugin`):(this._plugins.push(e),t.push(e),e.onAdd&&e.onAdd(this))})),t}load(e){let t=this.add(e);t&&t.length&&this.activate(e)}activate(e){e.length&&e.forEach((e=>{e.init&&e.init()}))}get(e){return this._plugins.find((t=>t.id===e))}getAll(){return this._plugins.slice()}release(e){let t=this.get(e);t&&(t.release(this),this._plugins=this._plugins.filter((e=>e!==t)))}releaseAll(){this._plugins.forEach((e=>{e.release(this)})),this._plugins=[]}clear(e){let t=this.get(e);t&&t.clear(this)}clearAll(){this._plugins.forEach((e=>{var t;(t=e.clear)==null||t.call(e,this)}))}}})))()}var Yd;function Xd(){return(Xd=e((()=>{Jd(),Yd=class extends qd{constructor(e){super(),this.globalInstance=e}onInit(e){this._plugins.forEach((t=>{t.onInit&&t.onInit(this,e)}))}onBeforeResize(e,t){this._plugins.forEach((n=>{n.onBeforeResize&&n.onBeforeResize(this,e,t)}))}onAfterChartSpecTransform(e,t){this._plugins.forEach((n=>{n.onAfterChartSpecTransform&&n.onAfterChartSpecTransform(this,e,t)}))}onAfterModelSpecTransform(e,t,n){this._plugins.forEach((r=>{r.onAfterModelSpecTransform&&r.onAfterModelSpecTransform(this,e,t,n)}))}onBeforeInitChart(e,t){this._plugins.forEach((n=>{n.onBeforeInitChart&&n.onBeforeInitChart(this,e,t)}))}onAfterInitChart(e,t){this._plugins.forEach((n=>{n.onAfterInitChart&&n.onAfterInitChart(this,e,t)}))}releaseAll(){super.releaseAll(),this.globalInstance=null}}})))()}function Zd(e,t){switch(t){case`grow`:return ef(e);case`fadeIn`:return $d;default:return Qd(e)}}var Qd,$d,ef;function tf(){return(tf=e((()=>{Qd=e=>({type:`clipIn`,options:{clipDimension:e.direction===`horizontal`?`y`:`x`}}),$d={type:`fadeIn`},ef=e=>({type:e.direction===`horizontal`?`growPointsXIn`:`growPointsYIn`,options:{orient:e.direction===`horizontal`?`positive`:`negative`}})})))()}var nf;function rf(){return(rf=e((()=>{qi(),nf=class extends Wr{constructor(e,t,n,r,i){super(e,t,n,r,i),this.currentAnimationRatio=0,this.animationTime=0}onUpdate(e,t,n){super.onUpdate(e,t,n),this.currentAnimationRatio=t,this.animationTime=t*Math.PI*2}getAnimationTime(){return this.currentAnimationRatio>0?this.animationTime:Date.now()/1e3}afterStageRender(e,t){var n;return((n=this.params)?.callBack)?.call(n,e,t,this.currentAnimationRatio,this.animationTime)}}})))()}var af,of,sf,cf,lf,uf,df,ff,pf,mf,hf,gf,_f,vf;function yf(){return(yf=e((()=>{yn(),zi(),cn(),Wn(),fn(),ga(),gn(),Pn(),en(),Kt(),Pr(),Dr(),Ci(),Hr(),yi(),Wi(),tf(),U(),rf(),Gl(),af={appear:{duration:1e3,easing:`cubicOut`},update:{type:`update`,duration:300,easing:`linear`},enter:{duration:300,easing:`linear`},exit:{duration:300,easing:`linear`},disappear:{duration:500,easing:`cubicIn`},state:{duration:300,easing:`linear`}},of={appear:{type:`scaleIn`},enter:{type:`scaleIn`},exit:{type:`scaleOut`}},sf={appear:{type:`fadeIn`},enter:{type:`fadeIn`},exit:{type:`fadeOut`}},cf=()=>{H.registerAnimation(`scaleInOut`,(()=>of))},lf=()=>{H.registerAnimation(`fadeInOut`,(()=>sf))},uf=(e,t)=>({appear:Zd(e,t),enter:{type:`fadeIn`},exit:{type:`fadeOut`},update:[{type:`update`,options:{excludeChannels:[`points`,`defined`,`segments`]}},{channel:[`points`,`segments`],custom:Rr,duration:af.update.duration,easing:af.update.easing,customParameters:{clipRangeByDimension:e.direction===`horizontal`?`y`:`x`}}]}),df=()=>{H.registerAnimation(`line`,uf)},ff=()=>{H.registerAnimation(`area`,uf)},pf=()=>{L.registerBuiltInAnimate(`scaleIn`,Yr),L.registerBuiltInAnimate(`scaleOut`,Ni),L.registerBuiltInAnimate(`fadeIn`,or),L.registerBuiltInAnimate(`fadeOut`,mr),L.registerBuiltInAnimate(`moveIn`,ta),L.registerBuiltInAnimate(`moveOut`,pa),L.registerBuiltInAnimate(`rotateIn`,ri),L.registerBuiltInAnimate(`rotateOut`,$r),L.registerBuiltInAnimate(`update`,ki),L.registerBuiltInAnimate(`state`,Zi),L.registerBuiltInAnimate(`fromTo`,Sr)},mf=()=>{L.registerBuiltInAnimate(`growHeightIn`,Hn),L.registerBuiltInAnimate(`growHeightOut`,an),L.registerBuiltInAnimate(`growWidthIn`,la),L.registerBuiltInAnimate(`growWidthOut`,Qn),L.registerBuiltInAnimate(`growCenterIn`,En),L.registerBuiltInAnimate(`growCenterOut`,Jn)},hf=()=>{L.registerBuiltInAnimate(`growRadiusIn`,aa),L.registerBuiltInAnimate(`growRadiusOut`,nr),L.registerBuiltInAnimate(`growAngleIn`,Ht),L.registerBuiltInAnimate(`growAngleOut`,ur)},gf=()=>{L.registerBuiltInAnimate(`growPointsIn`,Xt),L.registerBuiltInAnimate(`growPointsOut`,Rn),L.registerBuiltInAnimate(`growPointsXIn`,hi),L.registerBuiltInAnimate(`growPointsXOut`,Rt),L.registerBuiltInAnimate(`growPointsYIn`,di),L.registerBuiltInAnimate(`growPointsYOut`,An),L.registerBuiltInAnimate(`clipIn`,Sn),L.registerBuiltInAnimate(`clipOut`,Ii)},_f=()=>{L.registerBuiltInAnimate(`growPointsOut`,Rn)},vf=()=>{L.registerBuiltInAnimate(Ul,nf)}})))()}var bf,xf;function Sf(){return(Sf=e((()=>{_r(),U(),yf(),Pa(),bf=()=>{gr(),pf(),vf()},xf=()=>{H.registerStageEventPlugin(`gesture`,br)}})))()}var Cf,wf,Tf;function Ef(){return(Ef=e((()=>{S(),Ge(),Ct(),td(),Cf=e=>{let t=T(e),n=[],r=[];return t.forEach((e=>{e===`empty`?n.push(`view`):I(e)&&e!==`none`?e.includes(`view:`)?(r.push(e.replace(`view:`,``)),n.push(`view`)):(r.push(e),n.push(`self`)):ft(e)&&n.push(`timeout`)})),{eventNames:r,resetType:n}},wf=(e,t)=>{if(!t||!e)return null;let n={};return e.forEach((e=>{let r=e.stateStyle;r&&t.forEach((t=>{t&&r[t]&&(n[t]||(n[t]=[]),n[t].push(e.id))}))})),n},Tf=(e,t)=>{if(!t||!t.length)return[];let n=[];return e.markIds?t.filter((t=>{e.markIds.includes(t.getProductId())&&n.push(t)})):e.markNames?t.forEach((t=>{e.markNames.includes(t.name)&&n.push(t)})):t.forEach((e=>{n.push(e)})),n},Q.STATE_HIGHLIGHT,Q.STATE_BLUR})))()}var Df;function Of(){return(Of=e((()=>{j(),xu(),Ef(),Df=class{constructor(e){this._markSet=new bu,this.options=e,e.marks&&e.marks.length&&e.marks.forEach((e=>{this.registerMark(e)}))}getMarks(){return this._markSet.getMarks()}getMarksByState(e){if(this._markIdByState&&this._markSet){let t=this._markIdByState[e];return t?this.getMarks().filter((e=>e&&t.includes(e.id))):[]}return[]}registerMark(e){A(e)?e.forEach((e=>{this._markSet.addMark(e)})):this._markSet.addMark(e)}updateMarkIdByState(e){this._markIdByState=wf(this.getMarks(),e)}getMarkIdByState(){return this._markIdByState??{}}isGraphicInStateMark(e,t){let n=this.getMarkIdByState();return n&&n[t]&&n[t].includes(e.context?.markId)}isGraphicInMark(e){return!!this._markSet.getMarkInId(e.context?.markId)}getStartState(){return null}getResetState(){return null}init(){let e=this.getEvents();e&&this.options.event&&e.forEach((e=>{e.type&&e.handler&&(A(e.type)?e.type.forEach((t=>{t&&t!==`none`&&this.options.event.on(t,e.handler)})):e.type!==`none`&&this.options.event.on(e.type,e.handler))}))}release(){let e=this.getEvents();e&&this.options.event&&(e??[]).forEach((e=>{e.type&&e.handler&&(A(e.type)?e.type.forEach((t=>{t&&t!==`none`&&this.options.event.off(t,e.handler)})):e.type!==`none`&&this.options.event.off(e.type,e.handler))}))}start(e,t){}reset(e,t){}dispatchEvent(e,t){this.options.event&&(this.options.event.emit(`${this.type}:${e}`,t),e===`start`&&this.options.onStart?this.options.onStart(t):e===`reset`&&this.options.onReset?this.options.onReset(t):e===`update`&&this.options.onUpdate?this.options.onUpdate(t):e===`end`&&this.options.onEnd&&this.options.onEnd(t))}}})))()}var kf,Af,jf;function Mf(){return(Mf=e((()=>{Ct(),td(),Of(),U(),Md(),kf={highlightState:Q.STATE_HIGHLIGHT,blurState:Q.STATE_BLUR,trigger:`pointerover`,triggerOff:`pointerout`},Af=class extends Df{constructor(e){super(e),this.type=`element-highlight`,this.resetAll=e=>{let{highlightState:t,blurState:n,interaction:r}=this.options;this._lastGraphic&&(r.clearAllStatesOfTrigger(this,t,n),this.dispatchEvent(`reset`,Object.assign({graphics:[this._lastGraphic],options:this.options},e)),this._lastGraphic=null,r.setStatedGraphics(this,[]))},this.handleStart=e=>{this.start(e.item,e)},this.handleReset=e=>{let{interaction:t}=this.options,n=t.getStatedGraphics(this);if(!n||!n.length)return;let r=e.item,i=r&&this._markSet.getMarkInId(r.context.markId);(this._resetType.includes(`view`)&&!i||this._resetType.includes(`self`)&&i)&&this.resetAll(e)},this.options=Object.assign({},kf,e),this.updateMarkIdByState([this.options.highlightState,this.options.blurState])}getStartState(){return this.options.highlightState}getResetState(){return this.options.blurState}getEvents(){let e=this.options.triggerOff,t=[{type:this.options.trigger,handler:this.handleStart}],n=e;return I(e)&&e.includes(`view:`)?(n=e.replace(`view:`,``),this._resetType=`view`):this._resetType=`self`,t.push({type:n,handler:this.handleReset}),t}start(e,t){if(e&&this._markSet.getMarkInId(e.context.markId)){let{highlightState:n,blurState:r,interaction:i}=this.options;if(this._lastGraphic===e)return;let a=i.updateStates(this,[e],i.getStatedGraphics(this),n,r);i.setStatedGraphics(this,a),this._lastGraphic=e,this.dispatchEvent(`start`,Object.assign({graphics:a,options:this.options},t))}else this._lastGraphic&&this._resetType===`view`&&this.resetAll(t)}reset(e,t){e?this._markSet.getMarkInId(e.context.markId)&&jd(e,[this.options.highlightState,this.options.blurState]):this.resetAll(t)}},Af.type=`element-highlight`,Af.defaultOptions=kf,jf=()=>{H.registerInteractionTrigger(Af.type,Af)}})))()}var Nf,Pf,Ff;function If(){return(If=e((()=>{j(),td(),Of(),Ef(),U(),Md(),Nf={state:Q.STATE_SELECTED,trigger:`click`},Pf=class extends Df{constructor(e){super(e),this.type=`element-select`,this._resetType=[],this.resetAll=e=>{let{state:t,reverseState:n,interaction:r}=this.options,i=r.getStatedGraphics(this);i&&i.length&&(r.clearAllStatesOfTrigger(this,t,n),this.dispatchEvent(`reset`,Object.assign({graphics:i,options:this.options},e)),r.setStatedGraphics(this,[]))},this.handleStart=e=>{this.start(e.item,e)},this.handleReset=e=>{let{interaction:t}=this.options,n=t.getStatedGraphics(this);if(!n||!n.length)return;let r=e.item,i=r&&this._markSet.getMarkInId(r.context.markId);(this._resetType.includes(`view`)&&!i||this._resetType.includes(`self`)&&i)&&this.resetAll(e)},this.options=Object.assign({},Nf,e),this.updateMarkIdByState([this.options.state,this.options.reverseState])}getStartState(){return this.options.state}getResetState(){return this.options.reverseState}getEvents(){let e=this.options.triggerOff,t=this.options.trigger,n=[{type:t,handler:this.handleStart}],{eventNames:r,resetType:i}=Cf(e);return r.forEach((e=>{e&&(A(t)?!t.includes(e):e!==t)&&n.push({type:e,handler:this.handleReset})})),this._resetType=i,n}start(e,t){let{state:n,reverseState:r,isMultiple:i,interaction:a}=this.options,o=a.getStatedGraphics(this);if(e&&this._markSet.getMarkInId(e.context.markId)){if(e.hasState(n)){if(this._resetType.includes(`self`)){let i=o&&o.filter((t=>t!==e));i&&i.length?a.setStatedGraphics(this,a.updateStates(this,i,o,n,r)):this.resetAll(t)}}else{this._timer&&clearTimeout(this._timer),Ad(e,n,!0);let s=this.options.interaction.updateStates(this,i&&o?[...o,e]:[e],o,n,r);a.setStatedGraphics(this,s),this.dispatchEvent(`start`,Object.assign({graphics:s,options:this.options},t)),this._resetType.includes(`timeout`)&&(this._timer=setTimeout((()=>{this.resetAll(t)}),this.options.triggerOff))}}else this._resetType.includes(`view`)&&o&&o.length&&this.resetAll(t)}reset(e,t){e?this._markSet.getMarkInId(e.context.markId)&&jd(e,[this.options.state,this.options.reverseState]):this.resetAll(t)}},Pf.type=`element-select`,Pf.defaultOptions=Nf,Ff=()=>{H.registerInteractionTrigger(Pf.type,Pf)}})))()}var Lf;function Rf(){return(Rf=e((()=>{Jd(),Lf=class extends qd{constructor(e){super(),this.globalInstance=e}onInit(){this._plugins.forEach((e=>{e.onInit&&e.onInit(this)}))}releaseAll(){super.releaseAll(),this.globalInstance=null}}})))()}var zf,Bf,Vf;function Hf(){return(Hf=e((()=>{zf=(e,t=!0)=>{var n,r,i,a;let o=e.parent;(n=e.release)==null||n.call(e,!0),(i=(r=e).removeAllChild)==null||i.call(r,!0),t&&((a=e.parent??o)==null||a.removeChild(e,!0))},Bf=e=>{var t,n;let r=[e];return(n=(t=e).forEachChildren)==null||n.call(t,(e=>{r.push(...Bf(e))})),r},Vf=(e,t={})=>{var n;let{enableExitAnimation:r=!0,removeFromParent:i=!0,onComplete:a}=t;return!(!r||!(n=e).releaseWithExitAnimation?.call(n,{removeFromParent:i,onComplete:a}))||(zf(e,i),!1)}})))()}var Uf,Wf,Gf;function Kf(){return(Kf=e((()=>{ja(),Ma(),V(),u(),be(),Et(),Pa(),Ct(),v(),E(),S(),oc(),wo(),Xa(),cs(),qa(),Va(),$s(),_i(),U(),al(),pl(),vl(),El(),xl(),Ol(),Zs(),tu(),ou(),Y(),uc(),j(),st(),o(),Ce(),je(),Tt(),We(),ce(),Ys(),Or(),hu(),Iu(),Zu(),zd(),Vd(),Ud(),Kd(),Is(),nc(),qs(),Xd(),Sf(),Mf(),If(),Rf(),Gl(),Hf(),Uf=function(e,t,n,r){return new(n||=Promise)((function(i,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){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((r=r.apply(e,t||[])).next())}))},Wf=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`){var i=0;for(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},Gf=class e{static useRegisters(e){e.forEach((e=>{typeof e==`function`?e():console.error(`Invalid function:`,e)}))}static useChart(e){e.forEach((e=>H.registerChart(e.type,e)))}static useSeries(e){e.forEach((e=>H.registerSeries(e.type,e)))}static useComponent(e){e.forEach((e=>H.registerComponent(e.type,e)))}static useMark(e){e.forEach((e=>H.registerMark(e.constructorType??e.type,e)))}static useLayout(e){e.forEach((e=>H.registerLayout(e.type,e)))}static registerDataSetTransform(e,t){H.registerTransform(e,t)}static registerFunction(e,t){e&&t&&Hd.instance().registerFunction(e,t)}static unregisterFunction(e){e&&Hd.instance().unregisterFunction(e)}static getFunction(e){return e?Hd.instance().getFunction(e):null}static getFunctionList(){return Hd.instance().getFunctionNameList()}static registerMap(e,t,n){let r=H.getImplementInKey(`registerMap`);r&&r(e,t,n)}static unregisterMap(e){let t=H.getImplementInKey(`unregisterMap`);t&&t(e)}static getMap(e){return gl(e)}static registerSVG(e,t,n){let r=H.getImplementInKey(`registerSVG`);r&&r(e,t,n)}static unregisterSVG(e){let t=H.getImplementInKey(`unregisterSVG`);t&&t(e)}static hideTooltip(e=[]){Js.forEach((e=>(e?.hideTooltip)?.call(e)),e)}static getLogger(){return a.getInstance()}getSpec(){return this._spec}getSpecInfo(){return this._specInfo}get event(){return this._event}getDataSet(){return this._dataSet}constructor(e,t){var n,r,i,o,s;this.id=Ja(),this._userEvents=[],this._autoSize=!0,this._option={mode:z[`desktop-browser`],onError:e=>{throw Error(e)},optimize:{disableCheckGraphicWidthOutRange:!0}},this._observer=null,this._context={},this._renderState=Wl.render,this._disableDimensionHoverEvent=!1,this._doResize=()=>{let{width:e,height:t}=this.getCurrentSize();this._currentSize.width===e&&this._currentSize.height===t||(this._currentSize={width:e,height:t},this.resizeSync(e,t))},this._renderSync=(e={})=>{var t;let n=this;return this._beforeRender(e)&&((t=this._compiler)==null||t.render(e.morphConfig),this._updateAnimateState(!1),this._afterRender()),n},this._updateSpec=(e,t=!1,n)=>{var r;if(this._isReleased)return;this._reSetRenderState();let i=this._spec,a={changeBackground:!1,reTransformSpec:!1,change:!1,reMake:!1,reCompile:!1,reSize:!1,changeTheme:!1};if(!this._setNewSpec(e,t))return;if(O(i.theme,this._spec.theme)||(a.changeTheme=!0),O(this._spec.background,i.background)||(a.reMake=!0,a.changeBackground=!0),a.reSize=this._shouldChartResize(i),this._spec.type!==i.type)return(r=this._compiler)==null||r.updateLayoutTag(),a.reMake=!0,a.reTransformSpec=!0,a.change=!0,a.changeTheme=!0,a;this._initChartSpec(this._spec,`updateSpec`);let o=fu(this._chart.updateSpec(this._spec),a);return n?Object.assign(Object.assign({},o),n):o},this.getTheme=(...e)=>{if(!this._currentTheme||!e||!e.length)return;this._cachedProcessedTheme||={};let t=e.join(`.`);if(this._cachedProcessedTheme[t])return this._cachedProcessedTheme[t];let n=this._currentTheme;return e.forEach(((t,r)=>{var i;if(r!==1||e[0]!==`series`&&e[0]!==`component`)n=n?.[t];else{let r=e[0]===`series`?H.getSeriesBuiltInTheme(t):H.getComponentBuiltInTheme(t);n=n?R({},r,n[t]):r}r===e.length-1&&h(n)&&(n=ec({[t]:n},this._currentTheme.colorScheme,this._currentTheme.token)[t],(i=this.getFunctionList())!=null&&i.length&&(n=ic(n,this)))})),this._cachedProcessedTheme[t]=n,n},Co(t),this._option=Object.assign(Object.assign({},this._option),t),t!=null&&t.optimize&&(this._option.optimize=Object.assign(Object.assign({},this._option.optimize),t.optimize)),this._onError=this._option?.onError;let c=this._option,{dom:l,renderCanvas:u,mode:d,stage:f,poptip:p}=c,m=Wf(c,[`dom`,`renderCanvas`,`mode`,`stage`,`poptip`]),g=Ha(d);if(g?Wd():d===`node`&&Gd(),g&&l&&(this._container=I(l)?Lr.getElementById(l):l),u&&(this._canvas=u),f&&(this._stage=f),d!==`node`&&!this._container&&!this._canvas&&!this._stage)return void((n=this._option)==null||n.onError(`please specify container or renderCanvas!`));this._viewBox=this._option.viewBox,this._currentThemeName=Xs.getCurrentThemeName(),this._setNewSpec(e),this._updateCurrentTheme(),this._currentSize=this.getCurrentSize();let _=[],v=[];if(!1!==p){let e=H.getRuntimePluginInstaller(`poptipForText`);e&&(e(),v.push(e)),_.push(`poptipForText`)}e.type===`sankey`&&_.push(`scrollbar`);let y=new a(this._option.logLevel??Ze.Error);a.setInstance(y),(r=this._option)!=null&&r.onError&&y.addErrorHandler(((...e)=>{var t,n;(n=(t=this._option)?.onError)==null||n.call(t,...e)})),this._compiler=new eu({dom:this._container??`none`,canvas:u},Object.assign(Object.assign({mode:this._option.mode,stage:f,pluginList:_,runtimePluginInstallers:v},m),{background:this._getBackground(),onError:this._onError})),this._compiler.setSize(this._currentSize.width,this._currentSize.height),this._eventDispatcher=new fl(this,this._compiler),this._event=new il(this._eventDispatcher,d),this._compiler.initView(),this._compiler.updateLayoutTag(),this._setFontFamilyTheme(this.getTheme(`fontFamily`)),this._initDataSet(this._option.dataSet),this._autoSize=!!g&&((i=e.autoFit??this._option.autoFit)==null||i),this._bindResizeEvent(),this._bindViewEvent(),this._initChartPlugin(),Js.registerInstance(this),(s=(o=this._option.performanceHook)?.afterCreateVChart)==null||s.call(o,this)}_setNewSpec(e,t){return!!e&&(I(e)&&(e=JSON.parse(e)),t&&this._originalSpec&&(e=R({},this._originalSpec,e)),this._originalSpec=e,this._spec=this._getSpecFromOriginalSpec(),!0)}_getSpecFromOriginalSpec(){let e=rc(this._originalSpec);return e.data=e.data??[],e}_initChartSpec(t,n){var r;e.getFunctionList()&&e.getFunctionList().length&&(t=ic(t,e)),this._spec=t,this._chartSpecTransformer||=H.createChartSpecTransformer(this._spec.type,this._getChartOption(this._spec.type)),(r=this._chartSpecTransformer)==null||r.transformSpec(this._spec),this._chartPluginApply(`onAfterChartSpecTransform`,this._spec,n),this._specInfo=this._chartSpecTransformer?.transformModelSpec(this._spec),this._chartPluginApply(`onAfterModelSpecTransform`,this._spec,this._specInfo,n)}_updateSpecInfo(){this._chartSpecTransformer||=H.createChartSpecTransformer(this._spec.type,this._getChartOption(this._spec.type)),this._specInfo=this._chartSpecTransformer?.createSpecInfo(this._spec)}_initChart(e){var t,n,r;if(!this._compiler)return void((t=this._option)==null||t.onError(`compiler is not initialized`));if(this._chart)return void((n=this._option)==null||n.onError(`chart is already initialized`));let i=H.createChart(e.type,e,this._getChartOption(e.type));i?(this._chart=i,this._chart.setCanvasRect(this._currentSize.width,this._currentSize.height),this._chart.created(this._chartSpecTransformer),this._chart.init(),this._event.emit(K.initialized,{chart:i,vchart:this})):(r=this._option)==null||r.onError(`init chart fail`)}_releaseData(){this._dataSet&&=(this._dataSet.dataViewMap={},null)}_bindViewEvent(){var e;this._compiler&&((e=this._compiler.getStage()?.getTimeline())==null||e.on(`animationEnd`,(()=>{this._event.emit(K.animationFinished,{chart:this._chart,vchart:this})})))}_bindResizeEvent(){var e;if(this._autoSize){if(this._onResize=dt(this._doResize,this._option.resizeDelay??100),this._container){let t=window.ResizeObserver;t&&(this._observer=new t(this._onResize),(e=this._observer)==null||e.observe(this._container))}window.addEventListener(`resize`,this._onResize)}}_unBindResizeEvent(){this._autoSize&&(window.removeEventListener(`resize`,this._onResize),this._observer&&=(this._observer.disconnect(),null))}getCurrentSize(){return cu(this._spec,{container:this._container,canvas:this._canvas,mode:this._getMode(),modeParams:this._option.modeParams},{width:this._currentSize?.width??500,height:this._currentSize?.height??500})}_initDataSet(e){this._dataSet=e instanceof _e?e:new _e,ml(this._dataSet,`dataview`,wt),ml(this._dataSet,`array`,Aa),X(this._dataSet,`copyDataView`,bl);for(let e in H.transforms)X(this._dataSet,e,H.transforms[e]);for(let e in H.dataParser)ml(this._dataSet,e,H.dataParser[e])}updateCustomConfigAndRerender(e,t,n={}){if(this._isReleased||!e)return;M(e)&&(e=e()),e.reAnimate&&(this.stopAnimation(),this._updateAnimateState(!0));let r=n.transformSpec&&e.changeTheme&&e.reMake&&e.reTransformSpec;return this._reCompile(e,n.morphConfig),uu(e)?this:(r&&(n=Object.assign(Object.assign({},n),{transformSpec:!1})),t?this._renderSync(n):this._renderAsync(n))}_updateCustomConfigAndRecompile(e,t={}){return!!e&&(this._reCompile(e,t.morphConfig),this._beforeRender(t))}_reCompile(e,t){var n,r,i,a,o,s,c;if(e.reMake&&(this._releaseData(),this._initDataSet(),(n=this._chart)==null||n.release(!1),this._chart=null),e.reTransformSpec&&(this._chartSpecTransformer=null),e.changeTheme?(this._setCurrentTheme(),this._setFontFamilyTheme(this.getTheme(`fontFamily`))):e.changeBackground&&((r=this._compiler)==null||r.setBackground(this._getBackground())),e.reMake){let e=this.isAnimationEnable()&&!1!==t?.morph;(i=this._compiler)==null||i.releaseGrammar(!e)}else e.reCompile&&((a=this._compiler)==null||a.clear({chart:this._chart,vChart:this}),(o=this._compiler)==null||o.compile({chart:this._chart,vChart:this}));if(e.reSize){let{width:e,height:t}=this.getCurrentSize();this._currentSize={width:e,height:t},(s=this._chart)==null||s.onResize(e,t,!1),(c=this._compiler)==null||c.resize(e,t,!1)}}_beforeRender(e={}){var t,n,r,i,a,o,s,c;if(this._isReleased)return!1;if(this._chart)return!0;let{transformSpec:l,actionSource:u}=e;return l&&this._initChartSpec(this._spec,`render`),this._chartPluginApply(`onBeforeInitChart`,this._spec,u),(n=(t=this._option.performanceHook)?.beforeInitializeChart)==null||n.call(t,this),this._initChart(this._spec),(i=(r=this._option.performanceHook)?.afterInitializeChart)==null||i.call(r,this),!(!this._chart||!this._compiler)&&(this._chartPluginApply(`onAfterInitChart`,this._spec,u),(o=(a=this._option.performanceHook)?.beforeCompileToVGrammar)==null||o.call(a,this),this._compiler.compile({chart:this._chart,vChart:this},e),(c=(s=this._option.performanceHook)?.afterCompileToVGrammar)==null||c.call(s,this),!0)}_afterRender(){return!this._isReleased&&(this._event.emit(K.rendered,{chart:this._chart,vchart:this}),!0)}renderSync(e){return this._renderSync({morphConfig:e,transformSpec:!0,actionSource:`render`})}renderAsync(e){return Uf(this,void 0,void 0,(function*(){return this._renderAsync({morphConfig:e,transformSpec:!0,actionSource:`render`})}))}_renderAsync(e={}){return Uf(this,void 0,void 0,(function*(){return this._renderSync(e)}))}_updateAnimateState(e){var t,n;if(this.isAnimationEnable()){let r=t=>{let n=t.context?.diffState;return e?n===`exit`?Dl.none:Dl.appear:n};(t=this._chart)==null||t.getAllRegions().forEach((e=>{e.updateAnimateStateCallback(r)})),(n=this._chart)==null||n.getAllComponents().forEach((e=>{e.updateAnimateStateCallback(r)}))}}release(){var e,t,n,r;(e=this._onResize)!=null&&e.cancel&&this._onResize.cancel(),this._chartPluginApply(`releaseAll`),this._chartPlugin=null,this._chartSpecTransformer=null,this._forceReleaseExitingVRenderComponents(),(t=this._chart)==null||t.release(),(n=this._eventDispatcher)==null||n.release(),(r=this._compiler)==null||r.release(),this._unBindResizeEvent(),this._releaseData(),this._onError=null,this._onResize=null,this._container=null,this._currentTheme=null,this._cachedProcessedTheme=null,this._option=null,this._chart=null,this._compiler=null,this._spec=null,this._specInfo=null,this._originalSpec=null,this._userEvents=null,this._event=null,this._eventDispatcher=null,this._isReleased=!0,Js.unregisterInstance(this)}_registerExitingVRenderComponent(e){this._exitingVRenderComponents=this._exitingVRenderComponents??/* @__PURE__ */ new Set,this._exitingVRenderComponents.add(e)}_unregisterExitingVRenderComponent(e){var t;(t=this._exitingVRenderComponents)==null||t.delete(e)}_forceReleaseExitingVRenderComponents(){var e;(e=this._exitingVRenderComponents)!=null&&e.size&&(this._exitingVRenderComponents.forEach((e=>{zf(e)})),this._exitingVRenderComponents.clear())}updateData(e,t,n,r){return Uf(this,void 0,void 0,(function*(){return this.updateDataSync(e,t,n,r)}))}_updateDataById(e,t,n){let r=this._spec.data.find((t=>t.name===e||t.id===e));r?r.id===e?r.values=t:r.name===e&&r.parse(t,n):A(t)?this._spec.data.push({id:e,values:t}):this._spec.data.push(t)}updateDataInBatches(e){return Uf(this,void 0,void 0,(function*(){return this._chart?(this._chart.updateFullData(e.map((({id:e,data:t,options:n})=>({id:e,values:t,parser:n})))),this._chart.updateGlobalScaleDomain(),this._compiler.render(),this):(this._spec.data=T(this._spec.data),e.forEach((({id:e,data:t,options:n})=>{this._updateDataById(e,t,n)})),this)}))}updateDataSync(e,t,n,r){return this._isReleased?this:(this._reSetRenderState(),N(this._dataSet)?this:this._chart?(this._chart.updateData(e,t,!0,n),r!=null&&r.reAnimate&&(this.stopAnimation(),this._updateAnimateState(!0)),this._compiler.render(),this):(this._spec.data=T(this._spec.data),this._updateDataById(e,t,n),this))}updateFullDataSync(e,t=!0,n){if(this._isReleased)return this;if(this._reSetRenderState(),this._chart)return this._chart.updateFullData(e),t&&(n!=null&&n.reAnimate&&(this.stopAnimation(),this._updateAnimateState(!0)),this._compiler.render()),this;let r=T(this._spec.data);return T(e).forEach((e=>{let{id:t,values:n,parser:i,fields:a}=e,o=r.find((e=>e.name===t));if(o)o instanceof Ne?(o.setFields(De(a)),o.parse(n,De(i))):(o.values=n,h(i)&&(o.parser=i),h(a)&&(o.fields=a));else{let t=Cl(e,this._dataSet,r);A(this._spec.data)&&this._spec.data.push(t)}})),this}updateFullData(e,t=!0){return Uf(this,void 0,void 0,(function*(){return this.updateFullDataSync(e,t)}))}updateSpec(e,t=!1,n,r){return Uf(this,void 0,void 0,(function*(){let i=this._updateSpec(e,t,r);return i&&(yield this.updateCustomConfigAndRerender(i,!1,{morphConfig:n,transformSpec:i.reTransformSpec,actionSource:`updateSpec`})),this}))}updateSpecSync(e,t=!1,n,r){let i=this._updateSpec(e,t,r);return i&&this.updateCustomConfigAndRerender(i,!0,{morphConfig:n,transformSpec:i.reTransformSpec,actionSource:`updateSpec`}),this}updateSpecAndRecompile(e,t=!1,n={}){let r=this._updateSpec(e,t);return this._updateCustomConfigAndRecompile(r,Object.assign({actionSource:`updateSpecAndRecompile`},n))}updateModelSpec(e,t,n=!1,r){return Uf(this,void 0,void 0,(function*(){return this.updateModelSpecSync(e,t,n,r)}))}updateModelSpecSync(e,t,n=!1,r){if(!t||!this._spec)return this;if(I(t)&&(t=JSON.parse(t)),M(e)||Br(this._spec,e,t,n),this._chart){let i=this._chart.getModelInFilter(e);if(i)return this._updateModelSpec(i,t,!0,n,r)}return this}_updateModelSpec(e,t,n=!1,r=!1,i){r&&(t=R({},e.getSpec(),t));let a=e.updateSpec(t),o=uu(a),s=du(a);return o||(e.reInit(t),!s&&(a.change||a.reCompile||a.reMake||a.reSize||a.reRender)&&this._chart.reDataFlow()),this.updateCustomConfigAndRerender(a,n,{morphConfig:i,transformSpec:!1,actionSource:`updateModelSpec`})}resize(e,t){return Uf(this,void 0,void 0,(function*(){return this.resizeSync(e,t)}))}resizeSync(e,t){var n,r;return this._beforeResize(e,t)?((r=(n=this._compiler).resize)==null||r.call(n,e,t),this._afterResize()):this}_beforeResize(e,t){var n,r,i,a;if(!this._chart||!this._compiler)return!1;let o=this._chart.getCanvasRect();return(!o||o.width!==e||o.height!==t)&&(this._chartPluginApply(`onBeforeResize`,e,t),(r=(n=this._option.performanceHook)?.beforeResizeWithUpdate)==null||r.call(n,this),this._chart.onResize(e,t,!1),(a=(i=this._option.performanceHook)?.afterResizeWithUpdate)==null||a.call(i,this),!0)}_afterResize(){return this._isReleased||this._event.emit(K.afterResize,{chart:this._chart}),this}updateViewBox(e,t=!0,n=!0){return this._chart&&this._compiler&&(this._viewBox=e,this._chart.updateViewBox(e,n),n&&(this._compiler.render(),this._chart.onEvaluateEnd()),this._compiler.updateViewBox(e,t)),this}on(e,t,n){var r;this._userEvents&&(this._userEvents.push({eType:e,query:typeof t==`function`?null:t,handler:typeof t==`function`?t:n}),(r=this._event)==null||r.on(e,t,n))}off(e,t){var n;if(this._userEvents&&this._userEvents.length!==0){if(t){let r=this._userEvents.findIndex((n=>n.eType===e&&n.handler===t));r>=0&&(this._userEvents.splice(r,1),(n=this._event)==null||n.off(e,t))}else this._userEvents.forEach((t=>{var n;t.eType===e&&((n=this._event)==null||n.off(e,t.handler))})),this._userEvents=this._userEvents.filter((t=>t.eType!==e))}}updateState(e,t){this._chart&&this._chart.updateState(e,t)}setSelected(e,t,n){this._chart&&this._chart.setSelected(e,t,n)}setHovered(e,t,n){this._chart&&this._chart.setHovered(e,t,n)}clearState(e){this._chart&&this._chart.clearState(e)}clearAllStates(){this._chart&&this._chart.clearAllStates()}clearSelected(){this._chart&&this._chart.clearSelected()}clearHovered(){this._chart&&this._chart.clearHovered()}_updateCurrentTheme(e){var t;let n=this._option.theme,r=this._spec?.theme,i=this._spec?.type;e&&(this._currentThemeName=e);let a=(e,t)=>{var n;return(n=t.chart)!=null&&n[e]&&(t=Ms({},t,t.chart[e])),t},o;if(F(n)&&F(r))o=Qs(this._currentThemeName),this._currentTheme=a(i,o);else{let e=Ms({},Qs(D(r)&&r.type?r.type:D(n)&&n.type?n.type:this._currentThemeName),Qs(n),Qs(r));this._currentTheme=a(i,e)}this._cachedProcessedTheme=null,Di(this.getTheme(`component`,`poptip`)),(t=this._compiler)==null||t.setBackground(this._getBackground())}_shouldChartResize(e){var t;let n=!1;N(this._spec.width)?!N(e.width)&&(this._spec.width=e.width):this._spec.width!==e.width&&(n=!0),N(this._spec.height)?!N(e.height)&&(this._spec.height=e.height):this._spec.height!==e.height&&(n=!0);let r=this._autoSize;return this._autoSize=!!Ha(this._option.mode)&&((t=this._spec.autoFit??this._option.autoFit)==null||t),this._autoSize!==r&&(n=!0),n}_getBackground(){return(typeof this._spec.background==`string`||D(this._spec.background)&&this._spec.background.gradient?this._spec.background:null)||this.getTheme(`background`)||this._option.background}getCurrentTheme(){return Qs(this._currentThemeName)}getCurrentThemeName(){return this._currentThemeName}setCurrentTheme(e){return Uf(this,void 0,void 0,(function*(){return this.setCurrentThemeSync(e)}))}setCurrentThemeSync(e){if(!Xs.themeExist(e))return this;let t=this._setCurrentTheme(e);return this._setFontFamilyTheme(this.getTheme(`fontFamily`)),this.updateCustomConfigAndRerender(t,!0,{transformSpec:!1,actionSource:`setCurrentTheme`}),this}_setCurrentTheme(e){var t;return this._updateCurrentTheme(e),this._initChartSpec(this._getSpecFromOriginalSpec(),`setCurrentTheme`),(t=this._chart)==null||t.setCurrentTheme(),{change:!0,reMake:!1}}_setFontFamilyTheme(e){var t;e&&((t=this.getStage())==null||t.setTheme({text:{fontFamily:e},richtext:{fontFamily:e}}))}_getTooltipComponent(){return this._chart?.getComponentsByType(B.tooltip)[0]}setTooltipHandler(e){var t,n;this._context.tooltipHandler=e;let r=this._getTooltipComponent();r&&((n=(t=r.tooltipHandler)?.release)==null||n.call(t),r.tooltipHandler=e)}getTooltipHandlerByUser(){return this._context?.tooltipHandler}getTooltipHandler(){let e=this._getTooltipComponent();return e?e.tooltipHandler:this._context.tooltipHandler}showTooltip(e,t){var n;let r=this._getTooltipComponent();return(n=h(e)&&r?.showTooltip(e,t)!==`none`)!=null&&n}hideTooltip(){var e;return(e=this._getTooltipComponent()?.hideTooltip())!=null&&e}getLegendDataById(e){let t=this._chart?.getComponentByUserId(e);return t?t.getLegendData():[]}getLegendDataByIndex(e=0){let t=this._chart?.getComponentsByType(B.discreteLegend);return t&&t[e]?t[e].getLegendData():[]}getLegendSelectedDataById(e){let t=this._chart?.getComponentByUserId(e);return t?t.getSelectedData():[]}getLegendSelectedDataByIndex(e=0){let t=this._chart?.getComponentsByType(B.discreteLegend);return t&&t[e]?t[e].getSelectedData():[]}setLegendSelectedDataById(e,t){let n=this._chart?.getComponentByUserId(e);n&&n.setSelectedData(t)}setLegendSelectedDataByIndex(e=0,t){let n=this._chart?.getComponentsByType(B.discreteLegend);n&&n[e]&&n[e].setSelectedData(t)}getDataURL(){var e;return Uf(this,void 0,void 0,(function*(){let t=this.getStage();return this._chart&&t?(t.render(),yield iu(this._chart.getCanvas(),{onError:this._onError})):((e=this._option)==null||e.onError(/* @__PURE__ */ ReferenceError(`render is not defined`)),null)}))}exportImg(e){var t,n;return Uf(this,void 0,void 0,(function*(){if(!Ha(this._option.mode))return void((t=this._option)==null||t.onError(/* @__PURE__ */ TypeError(`non-browser environment can not export img`)));let r=yield this.getDataURL();r?nu(e,r):(n=this._option)==null||n.onError(/* @__PURE__ */ ReferenceError(`render is not defined`))}))}exportCanvas(){var e;let t=this.getStage();if(this._chart&&t)return t.toCanvas();(e=this._option)==null||e.onError(/* @__PURE__ */ ReferenceError(`render is not defined`))}getImageBuffer(){var e,t;if(this._option.mode!==`node`)return void((e=this._option)==null||e.onError(/* @__PURE__ */ TypeError(`getImageBuffer() now only support node environment.`)));let n=this.getStage();return n?(n.render(),n.window.getImageBuffer()):((t=this._option)==null||t.onError(/* @__PURE__ */ ReferenceError(`render is not defined`)),null)}setLayout(e){var t;this._option.layout=e,(t=this._chart)==null||t.setLayout(e)}reLayout(){this._chart&&this._compiler&&!this._isReleased&&(this._chart.resetLayoutItemTag(),this._chart.setLayoutTag(!0,null,!1),this._compiler.render(),this._chart.onEvaluateEnd())}getCompiler(){return this._compiler}getChart(){return this._chart}getStage(){return this._compiler.getStage()}getCanvas(){return this._compiler?.getCanvas()}getContainer(){if(h(this._container))return this._container;let e;return e=I(this._canvas)?Lr.getElementById(this._canvas):this._canvas,h(e)?e.parentElement:this.getCanvas()?.parentElement}getComponents(){return this._chart.getAllComponents()}getScale(e){return(this._chart?.getGlobalScale())?.getScale(e)}setDimensionIndex(e,t={}){return this._chart?.setDimensionIndex(e,t)}disableDimensionHoverEvent(e){return e!==void 0&&(this._disableDimensionHoverEvent=e),this._disableDimensionHoverEvent}disableCrossHair(e=!0){this.getChart().getComponentsByKey(`crosshair`).forEach((t=>t.enable=!e))}disableTooltip(e=!0){this.getChart().getComponentsByKey(`tooltip`).forEach((t=>t.enable=!e))}showCrosshair(e){var t;(t=this._chart)==null||t.showCrosshair(e)}stopAnimation(){var e;(e=this.getStage())==null||e.stopAnimation(!0)}reRunNormalAnimation(){var e;(e=this.getStage())==null||e.reApplyAnimationState(`normal`,!0)}pauseAnimation(){var e;(e=this.getStage())==null||e.pauseAnimation(!0)}resumeAnimation(){var e;(e=this.getStage())==null||e.resumeAnimation(!0)}convertDatumToPosition(e,t={},n=!1,r){if(!this._chart||F(e))return null;let{seriesId:i,seriesIndex:a=0}=t,o;if(h(i)?o=this._chart.getSeriesInUserId(i):h(a)&&(o=this._chart.getSeriesInIndex([a])?.[0]),o){let t=Object.keys(e),i=o.getViewData().latestData.find((n=>t.every((t=>n[t]==e[t])))),a=o.getRegion().getLayoutStartPoint(),s;return s=i?o.dataToPosition(i,r):o.dataToPosition(e,r),s?os(s,a,n):null}return null}convertValueToPosition(e,t,n=!1){if(!this._chart||N(e)||F(t))return null;if(!A(e)){let{axisId:r,axisIndex:i}=t,a;if(h(r)?a=this._chart.getComponentsByKey(`axes`).find((e=>e.userId===r)):h(i)&&(a=this._chart.getComponentsByKey(`axes`)?.[i]),!a)return Ra("Please check whether the `axisId` or `axisIndex` is set!"),null;let o=a?.valueToPosition(e);if(n){let e=a.getLayoutStartPoint(),t=a.getOrient();return o+(t===`bottom`||t===`top`?e.x:e.y)}return o}let{seriesId:r,seriesIndex:i}=t,a;return h(r)?a=this._chart.getSeriesInUserId(r):h(i)&&(a=this._chart.getSeriesInIndex([i])?.[0]),a?os(a.valueToPosition(e[0],e[1]),a.getRegion().getLayoutStartPoint(),n):(Ra("Please check whether the `seriesId` or `seriesIndex` is set!"),null)}getFunction(e){return Hd.instance().getFunction(e)}registerFunction(e,t){e&&t&&Hd.instance().registerFunction(e,t)}unregisterFunction(e){e&&Hd.instance().unregisterFunction(e)}getFunctionList(){return Hd.instance().getFunctionNameList()}setRuntimeSpec(e){this._spec=e,this._updateSpecInfo()}updateIndicatorDataById(e,t){let n=this._chart?.getComponentByUserId(e);n&&n.updateDatum(t)}updateIndicatorDataByIndex(e=0,t){let n=this._chart?.getComponentsByType(B.indicator);n&&n[e]&&n[e].updateDatum(t)}geoZoomByIndex(e=0,t,n){this._geoZoomByQuery({regionIndex:e},t,n)}geoZoomById(e,t,n){this._geoZoomByQuery({regionId:e},t,n)}_geoZoomByQuery(e,t,n){let r=this._chart?.getRegionsInQuerier(e)[0],i=(this._chart?.getComponentsByType(B.geoCoordinate))?.find((e=>e.getRegions()?.includes(r)));i&&i.dispatchZoom(t,n)}_initChartPlugin(){let e=H.getChartPlugins();e.length>0&&(this._chartPlugin=new Yd(this),this._chartPlugin.load(e.map((e=>new e))),this._chartPluginApply(`onInit`,this._spec));let t=H.getVChartPlugins();t.length>0&&(this._vChartPlugin=new Lf(this),this._vChartPlugin.load(t.map((e=>new e))),this._vChartPlugin.onInit())}_chartPluginApply(e,...t){this._chartPlugin&&this._chartPlugin[e]&&this._chartPlugin[e].apply(this._chartPlugin,t)}_getMode(){return this._option.mode||z[`desktop-browser`]}isAnimationEnable(){return`animation`in this._option?!!this._option.animation:!1!==this._spec.animation}_getChartOption(e){return{type:e,globalInstance:this,eventDispatcher:this._eventDispatcher,dataSet:this._dataSet,container:this._container,canvas:this._canvas,map:/* @__PURE__ */ new Map,mode:this._getMode(),modeParams:this._option.modeParams,getCompiler:()=>this._compiler,viewBox:this._viewBox,getTheme:this.getTheme,getSpecInfo:()=>this._specInfo??{},layout:this._option.layout,onError:this._onError,disableTriggerEvent:!0===this._option.disableTriggerEvent,componentShowContent:this._option.componentShowContent}}runDisappearAnimation(){this._renderState=Wl.disappear,this.getStage().eventSystem.pauseTriggerEvent(),this.getStage().applyAnimationState([`disappear`],[{name:`disappear`,animation:this._compiler.stateAnimationConfig.disappear}])}_reSetRenderState(){var e;!this._isReleased&&this._compiler&&(this._renderState=Wl.render,(e=this.getStage()?.eventSystem)==null||e.resumeTriggerEvent())}},Gf.InstanceManager=Js,Gf.ThemeManager=Xs,Gf.globalConfig={uniqueTooltip:!0},Gf.Utils=Bd,Gf.vglobal=Lr,H.registerRegion(`region`,Fu),H.registerLayout(`base`,Xu),Rd(),xf(),jf(),Ff(),Hs(Es.name,Es)})))()}var qf,Jf;function Yf(){return(Yf=e((()=>{qf=`monotone`,Jf=`linear`})))()}var Xf;function Zf(){return(Zf=e((()=>{Xf=`bevel`})))()}function Qf(e,t){return t(`component`,e)}function $f(e,t,n,r){if(e)return{formatFunc:e,args:[n,r]};let i=H.getFormatter();return t&&i?{formatFunc:i,args:[n,r,t]}:{}}var ep;function tp(){return(tp=e((()=>{j(),E(),U(),ep=(e,t,n,r)=>{if(N(e[t]))return;let i=A(e[t]),a=i?e[t]:[e[t]],o=[];return a.forEach(((e,a)=>{!e||r&&!r(e)||o.push({spec:e,specPath:i?[t,a]:[t],specInfoPath:[`component`,t,a],type:n})})),o}})))()}var np;function rp(){return(rp=e((()=>{np=(e,t)=>{let n=t.beforeCall();return e&&e.forEach(((e,r)=>t.call(e,r,n))),n.keyMap&&=(n.keyMap.clear(),null),e}})))()}function ip(e){let t=e[0]?.series?[{data:e,value:``}]:e;for(let{data:e}of t)for(let{datum:t}of e)for(let e of t??[])if(e)return e}var ap,op;function sp(){return(sp=e((()=>{vt(),o(),E(),ye(),v(),tp(),ap=(e,t,n,r)=>{let i;if(i=M(e)?e(t,n):d(e)&&h(e.field)?Ve(t,e.field):e,r){let{formatFunc:n,args:a}=$f(void 0,r,e,t);n&&a&&(i=n(...a))}return i},op=(e,t,n)=>N(e)?e:M(e)?e(t,n):e})))()}function cp(e){return N(e.mark)&&N(e.model)&&N(e.datum)}function lp(e,t,n,r,i,a){let o=t=>{if(t){let o={datum:i},s=N(t.key)&&N(t.value)&&!F(t)?Object.assign(Object.assign(Object.assign({},r),n),t):Object.assign(Object.assign({},r),t),{key:c,keyFormatter:l,keyTimeFormat:u,keyTimeFormatMode:d,value:f,valueFormatter:p,valueTimeFormat:m,valueTimeFormatMode:g}=s,_=pp(s,[`key`,`keyFormatter`,`keyTimeFormat`,`keyTimeFormatMode`,`value`,`valueFormatter`,`valueTimeFormat`,`valueTimeFormatMode`]);o.key=gp(ap(c,i,a,l),u,d),o.value=gp(ap(f,i,a,p),m,g),Object.keys(_).forEach((e=>{o[e]=ap(s[e],i,a)})),!1!==o.visible&&(h(o.key)||h(o.value))&&e.push(o)}};A(t)?t.forEach((e=>{o(e)})):o(t)}function up(e,t,n,r,i,a,o){M(t)?lp(e,t(i,o),n,r,a,o):t&&lp(e,t,n,r,a,o)}function dp(e,t,n,r,i,a){if(i&&i.length){let o=[];return i.forEach((i=>{A(e)?e.forEach((e=>{up(o,e,t,n,r,i,a)})):M(e)?up(o,e,t,n,r,i,a):e&&lp(o,e,t,n,i,a)})),o}return null}function fp(e){if(!e||!e.length)return null;let t=[];return e.forEach((({content:e})=>{e&&e.forEach((e=>{t.push(e)}))})),t.length?Object.assign(Object.assign({},e[0]),{content:t}):e[0]}var pp,mp,hp,gp;function _p(){return(_p=e((()=>{j(),o(),E(),v(),st(),s(),sp(),pp=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`){var i=0;for(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},mp=e=>{if(!1===e?.visible)return[];let t={mark:!1!==e?.mark?.visible,dimension:!1!==e?.dimension?.visible,group:!1!==e?.group?.visible};return h(e?.activeType)&&Object.keys(t).forEach((n=>{t[n]=(e?.activeType)?.includes(n)})),Object.keys(t).filter((e=>t[e]))},hp=(e,t)=>!t||!1!==t.visible&&(!t[e]||!1!==t[e].visible)&&!(t.activeType&&!(A(t.activeType)?t.activeType.includes(e):t.activeType===e)),gp=(e,t,n)=>{if(!t&&!n)return typeof e==`object`?e:e?.toString();let r=At.getInstance();return t||=`%Y%m%d`,((n||=`local`)===`local`?r.timeFormat:r.timeUTCFormat)(t,e)}})))()}var vp;function yp(){return(yp=e((()=>{S(),o(),v(),_p(),sp(),E(),vp=class{constructor(e){this.activeTriggerSet={mark:/* @__PURE__ */ new Set,group:/* @__PURE__ */ new Set},this.ignoreTriggerSet={mark:/* @__PURE__ */ new Set},this._getSeriesCacheInfo=()=>{let{series:e}=this,t=e.getSeriesField();return{seriesFields:h(t)?T(t):e.getSeriesKeys()??[],dimensionFields:e.getDimensionField()??[],measureFields:e.getMeasureField()??[],type:e.type}},this._getDimensionData=e=>{let{dimensionFields:t}=this._seriesCacheInfo;return t[0]&&e?.[t[0]]},this._getMeasureData=e=>{let{measureFields:t}=this._seriesCacheInfo;return t[0]&&e?.[t[0]]},this._getSeriesFieldData=e=>{let{dimensionFields:t,seriesFields:n}=this._seriesCacheInfo;if(h(n[0])&&e?.[n[0]])return e?.[n[0]];let r=t[t.length-1];return t.length>1&&(n.length===0||this.series.getSeriesKeys().length),e?.[r]},this._getSeriesStyle=(e,t,n)=>{for(let n of T(t)){let t=this.series.getSeriesStyle(e)?.(n);if(h(t))return t}return n},this.markTooltipKeyCallback=(e,t)=>this._getSeriesFieldData(e),this.markTooltipValueCallback=(e,t)=>this._getMeasureData(e),this.shapeTypeCallback=(e,t)=>this._getSeriesStyle(e,`shape`,null)??this._getSeriesStyle(e,`symbolType`,this.series.getDefaultShapeType()),this.shapeColorCallback=(e,t)=>this._getSeriesStyle(e,[`fill`,`stroke`]),this.shapeStrokeCallback=(e,t)=>this._getSeriesStyle(e,[`stroke`,`fill`]),this.dimensionTooltipTitleCallback=(e,t)=>this._getDimensionData(e),this.groupTooltipTitleCallback=(e,t)=>this._getSeriesFieldData(e),this.groupTooltipKeyCallback=(e,t)=>{let{seriesFields:n}=this._seriesCacheInfo,r=this._seriesCacheInfo.dimensionFields;return n[0]&&(r=r.filter((e=>e!==n[0]))),r.map((t=>e?.[t])).join(`-`)},this.getHasShape=e=>!!e,this.series=e,this.updateTooltipSpec()}updateTooltipSpec(){let e=this.series.getSpec()?.tooltip;this.spec=e,this._seriesCacheInfo=this._getSeriesCacheInfo()}getShapeAttrs(e,t,n){var r;let i=t?`content`:`title`,a=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n?.style?.shape),n?.[e]),n?.[e]?.[i]),this.spec?.[e]),this.spec?.[e]?.[i]);return{shapeType:a.shapeType??this.shapeTypeCallback,shapeFill:a.shapeFill??a.shapeColor??this.shapeColorCallback,shapeStroke:a.shapeStroke??this.shapeStrokeCallback,shapeHollow:(r=a.shapeHollow)!=null&&r,shapeLineWidth:a.shapeLineWidth,shapeSize:a.shapeSize??a.size,hasShape:a.hasShape??this.getHasShape(t)}}enableByType(e){return!0}getDefaultContentList(e){return[this.getDefaultContentPattern(e)]}getContentList(e,t,n,r,i,a){return dp(t?.content??this.getDefaultContentList(e),this.getDefaultContentPattern(e),n,r,i,a)}getTitleResult(e,t,n,r,i){let a=M(t)?t(r,i):t;if(a?N(a.value)&&(a=Object.assign(Object.assign({},this.getDefaultTitlePattern(e)),a)):a=this.getDefaultTitlePattern(e),a&&!1!==a.visible){let e=ip(r),t={visible:ap(a.visible,e,i),value:gp(ap(a.value,e,i,a.valueFormatter),a.valueTimeFormat,a.valueTimeFormatMode),valueStyle:ap(a.valueStyle,e,i),hasShape:a.hasShape};return Object.keys(n).forEach((r=>{t[r]=ap(n[r],e,i)})),t}return{hasShape:!1,visible:!1}}getTooltipData(e,t,n,r,i){if(!(this.enableByType(e)&&hp(e,this.spec)&&(e!==`dimension`||r&&r.length)))return null;let a=this.spec?.[e]??t?.[e],o=this.getShapeAttrs(e,!0,t),s=this.getShapeAttrs(e,!1,t),c;return e===`dimension`?(c=[],this.getContentList(e,a,o,n,r,i).forEach((e=>{c.push(e)}))):c=this.getContentList(e,a,o,n,r,i),{visible:!0,activeType:e,data:n,title:this.getTitleResult(e,a?.title,s,n,i),content:c}}getDefaultTitlePattern(e){return{key:void 0,value:e===`group`?this.groupTooltipTitleCallback:this.dimensionTooltipTitleCallback}}getDefaultContentPattern(e){return{seriesId:this.series.id,key:e===`group`?this.groupTooltipKeyCallback:this.markTooltipKeyCallback,value:this.markTooltipValueCallback}}}})))()}var bp,xp,Sp;function Cp(){return(Cp=e((()=>{E(),o(),S(),to(),Lc(),bp={min:e=>e.length?jt(e.map((e=>1*e))):0,max:e=>e.length?ge(e.map((e=>1*e))):0,"array-min":e=>e.length?jt(e.map((e=>1*e))):0,"array-max":e=>e.length?ge(e.map((e=>1*e))):0,values:e=>{let t={},n=[];for(let r of e)t[r]||(n.push(r),t[r]=1);return n}},xp=(e,t)=>{var n;let r=t.fields;if(M(r)&&(r=r()),!r?.length||!e?.length)return{};r=Oc([],r);let i=t.target===`parser`?`parserData`:`latestData`,a=e[0][i]?e[0][i]:e||[],o=(n=e[0]).getFields?.call(n);return Sp(a,r,o)},Sp=(e,t,n)=>{let r={},i=[],a=[];return t.forEach((t=>{let o=t.key;r[o]={};let s=n?.[o],c=t.operations,l=c.some((e=>e===`min`||e===`max`||e===`allValid`)),u=!0;i.length=0,e&&e.forEach((e=>{e&&i.push(e[o])}));let d=i.length;if(l){a.length=0,i.forEach(((e,t)=>{Za(e)&&a.push(e)}));let e=i;i=a,a=e,u=i.length===d}else i=c.some((e=>e===`array-min`||e===`array-max`))?i.reduce(((e,t)=>(t&&t.forEach((t=>{Za(t)&&e.push(t)})),e)),[]):i.filter((e=>e!==void 0));t.filter&&(i=i.filter(t.filter)),c.forEach((e=>{if(t.customize)r[o][e]=t.customize;else{if(s&&!0===s.lockStatisticsByDomain&&!N(s.domain)){if(e===`values`)return void(r[o][e]=s.domain.slice())}else if(e===`allValid`)return;r[o][e]=bp[e](i),e===`array-max`&&(r[o].max=r[o][e]),e===`array-min`&&(r[o].min=r[o][e])}})),l&&(r[o].allValid=u)})),r}})))()}var wp;function Tp(){return(Tp=e((()=>{to(),wp=(e,t)=>{let{config:n}=t;if(!n)return e;let{invalidType:r,checkField:i}=n();return r!==`zero`||i&&i.length&&e.forEach((e=>{i.forEach((t=>{Za(e[t])||(e[t]=0)}))})),e}})))()}var Ep,Dp,Op;function kp(){return(kp=e((()=>{uc(),Ep=`${W}_HIERARCHY_DEPTH`,Dp=`${W}_HIERARCHY_ROOT`,Op=`${W}_HIERARCHY_ROOT_INDEX`})))()}function Ap(){return{keyMap:/* @__PURE__ */ new Map,needDefaultSeriesField:!this._seriesField,defaultSeriesField:this._seriesField?null:this.getSeriesKeys()[0],getKey:this.generateDefaultDataKey(this._spec.dataKey)}}function jp(e,t,n){e&&(n.needDefaultSeriesField&&(e[pc]=n.defaultSeriesField),e[dc]=t,e[fc]=n.getKey(e,t,n))}function Mp(){return{keyMap:/* @__PURE__ */ new Map,needDefaultSeriesField:!0,defaultSeriesField:this.getSeriesKeys()[0],getKey:this.generateDefaultDataKey(this._spec.dataKey),categoryField:this.getCategoryField()}}function Np(e,t,n,r=0,i,a){a===void 0&&(a=t),jp(e,t,n),e[Ep]=r,e[Dp]=i||e[n.categoryField],e[Op]=a,e.children&&e.children.length&&e.children.forEach(((t,r)=>Np(t,r,n,e[Ep]+1,e[Dp],a)))}function Pp(){return(Pp=e((()=>{Dc(),kp()})))()}var Fp,Ip,Lp,Rp,zp,Bp,Vp,Hp;function Up(){return(Up=e((()=>{uc(),Fp={label:{name:`label`,type:`text`}},Ip=`${W}_rect_x`,Lp=`${W}_rect_x1`,Rp=`${W}_rect_y`,zp=`${W}_rect_y1`,Bp={data:!0},Vp={xField:!0,yField:!0,invalidType:!0,animation:!0,animationAppear:!0,animationEnter:!0,animationUpdate:!0,animationExit:!0,animationNormal:!0},Hp={animationAppear:!0,animationEnter:!0,animationUpdate:!0,animationExit:!0,animationNormal:!0}})))()}function Wp(e={},t,n){let r={};for(let i=0;i<em.length;i++){let a=em[i],o=t?t[a]:void 0;if(!1===o)continue;if(a===`normal`){o&&(r.normal=o);continue}if(a===`state`){!1!==o&&(r.state=o??af.state);continue}if(a!==`update`&&!o&&!e[a])continue;let s,c;s=A(e[a])?e[a]:[Object.assign(Object.assign({},af[a]),e[a])],a===`exit`&&s.forEach((e=>{e.controlOptions={stopWhenStateChange:!0}})),o?(c=A(o)?o.map(((e,t)=>{let r=e;return Xp(r)&&delete r.type,r.oneByOne&&(r=Kp(r,n?.dataIndex??qp,n?.dataCount)),r})):s.map(((e,t)=>{let r=R({},s[t],o);return Xp(r)&&delete r.type,r.oneByOne&&(r=Kp(r,n?.dataIndex??qp,n?.dataCount)),r})),r[a]=c):r[a]=s}return r}function Gp(e,t,n){let r={};return h(t.animationAppear)&&(r.appear=t.animationAppear[e]??t.animationAppear),h(t.animationDisappear)&&(r.disappear=t.animationDisappear[e]??t.animationDisappear),h(t.animationEnter)&&(r.enter=t.animationEnter[e]??t.animationEnter),h(t.animationExit)&&(r.exit=t.animationExit[e]??t.animationExit),h(t.animationUpdate)&&(r.update=t.animationUpdate[e]??t.animationUpdate),h(t.animationState)&&(r.state=t.animationState[e]??t.animationState),t.animationNormal&&t.animationNormal[e]&&(r.normal=t.animationNormal[e]),Zp(r,n)}function Kp(e,t,n){let{oneByOne:r,duration:i,delay:a,delayAfter:o}=e;return e.delay=(e,n,o)=>{let s=t(e,o),c=M(i)?i(e,n,o):P(i)?i:0,l=M(a)?a(e,n,o):P(a)?a:0,u=M(r)?r(e,n,o):r;return!1===u?l:(u=!0===u?0:u,l+s*(c+u))},e.delayAfter=(e,a,s)=>{let c=t(e,s),l=M(i)?i(e,a,s):P(i)?i:0,u=M(o)?o(e,a,s):P(o)?o:0,d=M(r)?r(e,a,s):r;return!1===d?u:(d=!0===d?0:d,u+((n?n():a.parent.count-1)-c)*(l+d))},delete e.oneByOne,e}function qp(e,t){return e?.[dc]??t.context.graphicIndex}function Jp(e,t){if(!1===e.animation||!1===e.morph?.enable)return!1;let n=!1!==(e.animationAppear?.[t]??e.animationAppear),r=!1!==(e.animationUpdate?.[t]??e.animationUpdate);return!(!n||!r)}function Yp(e){return h(e.timeSlices)}function Xp(e){return!Yp(e)&&h(e.channel)}function Zp(e,t){if(!e)return e;let n=[`custom`,`customParameters`];return Qp(e=De(e,null,n),(e=>M(e)&&e.prototype?.constructor!==e?(...n)=>e(...n,t):e),n),e}function Qp(e,t,n=[]){if(A(e))e.forEach(((r,i)=>{e[i]=t(e[i],i),Qp(e[i],t,n)}));else if(D(e)&&typeof e!=`function`)for(let r in e)n.includes(r)||(e[r]=t(e[r],r),Qp(e[r],t,n))}function $p(e){var t;let n=e.getSpec();if(!1===n.animation||!1===(e.getOption()?.globalInstance)?.isAnimationEnable())return!1;let r=n.animationThreshold??2**53-1;return(t=e.getMarks())==null||t.forEach((e=>{let t=e.getMarkConfig();t&&(t.large&&t.largeThreshold&&(r=Math.min(r,t.largeThreshold)),t.progressiveThreshold&&(r=Math.min(r,t.progressiveThreshold)))})),!(e.getRawData()?.latestData?.length>=r)}var em;function tm(){return(tm=e((()=>{to(),Dc(),yf(),je(),j(),Tt(),v(),_i(),em=[...Object.keys(af),`normal`]})))()}var nm;function rm(){return(rm=e((()=>{le(),o(),E(),Tt(),Tu(),S(),j(),v(),Is(),_i(),ko(),U(),nm=class extends wu{constructor(){super(...arguments),this.markLabelSpec={}}getLabelSpec(e){return this.markLabelSpec[e]}setLabelSpec(e,t){this.markLabelSpec[e]=T(t)}addLabelSpec(e,t,n=!1){this.markLabelSpec[e]||(this.markLabelSpec[e]=[]),n?this.markLabelSpec[e].unshift(t):this.markLabelSpec[e].push(t)}getTheme(e,t){let n=Oo(e),r=this._option?.getTheme,i=this._option.type,a=H.getSeriesMarkMap(i)?Fs(r(`series`,i),i,r):{},o=r(`series`,`${i}_${n}`),s=this.stack??o?.stack??a?.stack?r(`series`,`${i}_stack`):void 0;return R({},a,o,s)}transformSpec(e,t,n){this._transformStack(e);let r=super.transformSpec(e,t,n);return this._transformLabelSpec(r.spec),Object.assign(Object.assign({},r),{markLabelSpec:this.markLabelSpec,stack:this.stack})}_transformLabelSpec(e){}_transformStack(e){de(e.stack)&&(this.stack=e.stack),de(e.percent)&&(this.stack=e.percent||this.stack),N(this.stack)&&this._supportStack&&e.seriesField&&(this.stack=!0)}_addMarkLabelSpec(e,t,n=`label`,r=`initLabelMarkStyle`,i=!0,a){e&&T(e[n]).forEach((n=>{if(n&&n.visible){let{animation:o=!0,animationUpdate:s=!0,animationEnter:c=!0,animationExit:l=!0}=n,{animationUpdate:u=!0,animationEnter:d=!0,animationExit:f=!0}=e,p=!!(this._option.globalInstance?.isAnimationEnable()??e.animation??n.animation)&&!!i;this.addLabelSpec(M(t)?t(n):t,Object.assign(Object.assign({},n),{animation:!!p&&o,animationUpdate:!!(p&&u&&s)&&u,animationEnter:!!(p&&d&&c)&&d,animationExit:!!(p&&d&&l)&&f,getStyleHandler:e=>e[r]?.bind(e)}),a)}}))}_getDefaultSpecFromChart(e){let t=super._getDefaultSpecFromChart(e)??{},{outerRadius:n,innerRadius:r,direction:i}=e;return h(n)&&(t.outerRadius=n),h(r)&&(t.innerRadius=r),h(i)&&(t.direction=i),Object.keys(t).length>0?t:void 0}_mergeThemeToSpec(e,t){let n=this._theme;if(this._shouldMergeThemeToSpec()){let r=this._getDefaultSpecFromChart(t),i=e=>{let t=R({},n,r,e),i=n.label;return i&&D(i)&&A(t.label)&&(t.label=t.label.map((e=>R({},i,e)))),t};return A(e)?{spec:e.map((e=>i(e))),theme:n}:{spec:i(e),theme:n}}return{spec:e,theme:n}}}})))()}function im(e){return e===z[`desktop-browser`]||e===z[`desktop-miniApp`]?{hover:{enable:!0,trigger:`pointermove`,triggerOff:`view:pointerleave`},select:{enable:!0,trigger:`pointertap`}}:Ua(e)||Wa(e)?{hover:{enable:!0,trigger:[`pointerdown`,`pointermove`],triggerOff:`view:pointerleave`},select:{enable:!0,trigger:`tap`}}:null}function am(){return(am=e((()=>{Ma(),qa()})))()}function om(e,t=!1){e.effects=Object.assign(Object.assign({},e.effects),{series:!0,compile:!0,layout:!0,render:!0}),t&&(e.effects.data=!0,e.effects.scaleDomain=!0)}function sm(e){e.change=!0,e.effects=Object.assign(Object.assign({},e.effects),{series:!0,render:!0})}var cm,lm,um,dm,fm,pm,mm;function hm(){return(hm=e((()=>{Y(),Dc(),yu(),uc(),Et(),Ou(),El(),Lc(),to(),_i(),rp(),yp(),Cp(),Tp(),Ho(),Pp(),td(),U(),S(),Ce(),E(),v(),le(),Ct(),o(),j(),Re(),Tt(),C(),Wo(),Up(),tm(),rm(),am(),vu(),bd(),Ef(),cm=Object.keys(Vp).reduce(((e,t)=>(Hp[t]||(e[t]=!0),e)),{}),lm={compileOnlyKeys:Hp,dataRelatedKeys:cm,seriesOnlyKeys:{tooltip:!0}},um={interactive:!0,zIndex:!0,visible:!0,style:!0,state:!0,stateSort:!0,customShape:!0},dm=e=>D(e)&&!A(e)&&!M(e),fm=e=>dm(e)?e:N(e)?{}:null,pm=(e,t,n)=>{let r=fm(e),i=fm(t);if(!r||!i)return!1;let a=!1,o=Array.from(/* @__PURE__ */ new Set([...Object.keys(i),...Object.keys(r)]));for(let e of o)if(!O(r[e],i[e])){if(!n[e])return!1;a=!0}return a},mm=class extends Du{getRegion(){return this._region}getLayoutStartPoint(){return this._region.getLayoutStartPoint()}getRootMark(){return this._rootMark}getSeriesMark(){return this._seriesMark}getRawData(){return this._rawData}getViewDataFilter(){return this._viewDataFilter}getViewData(){return this._data?.getDataView()}getViewDataProductId(){return this._data?.getProductId()}getViewDataStatistics(){return this._viewDataStatistics}getViewStackData(){return this._viewStackData}getSeriesField(){return this._seriesField}setSeriesField(e){h(e)&&(this._seriesField=e)}getGroups(){return this._groups}getStack(){return this.getSpecInfo()?.stack}getStackValue(){return this._spec.stackValue??`${W}_series_${this.type}`}getPercent(){return this._spec.percent}getStackOffsetSilhouette(){return this._spec.stackOffsetSilhouette}get tooltipHelper(){return this._tooltipHelper||this.initTooltip(),this._tooltipHelper}getInvalidType(){return this._invalidType}setInvalidType(e){var t;this._invalidType=e,(t=this.getViewData())==null||t.reRunAllTransform()}getMarkAttributeContext(){return this._markAttributeContext}constructor(e,t){var n;super(e,t),this.specKey=`series`,this.type=`series`,this.layoutType=`absolute`,this.modelType=`series`,this.name=void 0,this.transformerConstructor=nm,this.coordinate=`none`,this._region=null,this._layoutStartPoint={x:0,y:0},this._layoutRect={width:null,height:null},this.getLayoutRect=()=>({width:this._layoutRect.width??this._region.getLayoutRect().width,height:this._layoutRect.height??this._region.getLayoutRect().height}),this._rootMark=null,this._seriesMark=null,this._viewDataMap=/* @__PURE__ */ new Map,this._viewDataFilter=null,this._data=null,this.layoutZIndex=gu.SeriesGroup,this._invalidType=`break`,this._region=t.region,this._dataSet=t.dataSet,(n=this._spec)!=null&&n.name&&(this.name=this._spec.name)}created(){super.created(),this._buildMarkAttributeContext(),this.initData(),this.initGroups(),this.initStatisticalData(),this.event.emit(K.afterInitData,{model:this}),this.initRootMark(),this.initMark();let e=$p(this);this._initExtensionMark({hasAnimation:e}),this.initMarkStyle(),this.initMarkState(),e&&this.initAnimation(),this.afterInitMark(),this.initEvent(),this.event.emit(K.afterInitEvent,{model:this})}_buildMarkAttributeContext(){this._markAttributeContext={vchart:this._option.globalInstance,globalScale:(e,t)=>this._option.globalScale.getScale(e)?.scale(t),seriesColor:e=>(N(e)&&(e=this.getSeriesKeys()[0]),this._option.globalScale.getScale(`color`)?.scale(e)),getRegion:()=>this._region}}setAttrFromSpec(){super.setAttrFromSpec(),this.setSeriesField(this._spec.seriesField),h(this._spec.invalidType)&&(this._invalidType=this._spec.invalidType)}getInvalidCheckFields(){return[this.getStackValueField()]}initInvalidDataTransform(){var e,t;this._invalidType===`zero`&&(e=this._rawData)!=null&&e.dataSet&&(X(this._rawData.dataSet,`invalidTravel`,wp),(t=this._rawData)==null||t.transform({type:`invalidTravel`,options:{config:()=>({invalidType:this._invalidType,checkField:this.getInvalidCheckFields()})}},!1))}initData(){var e;let t=this._spec.data??this._option.getSeriesData(this._spec.dataId,this._spec.dataIndex);if(t&&(this._rawData=Cl(t,this._dataSet,this._option.sourceDataList)),(e=this._rawData?.target)==null||e.addListener(`change`,this.rawDataUpdate.bind(this)),this._addDataIndexAndKey(),this._rawData){this.getStack()&&(this._viewDataFilter=Sl(this._rawData,this._dataSet,{name:`${this.type}_${this.id}_viewDataFilter`}));let e=Sl(this.getStack()?this._viewDataFilter:this._rawData,this._dataSet,{name:`${this.type}_${this.id}_viewData`});this._data=new yd(this._option,e),this.getStack()&&this._viewDataFilter.target.removeListener(`change`,e.reRunAllTransform)}this.initInvalidDataTransform()}initGroups(){let e=this.getGroupFields();e&&e.length&&(this._groups={fields:e})}initStatisticalData(){this._data&&this._statisticViewData()}getRawDataStatisticsByField(e,t){if(this._rawStatisticsCache||={},!this._rawStatisticsCache[e]||t&&(N(this._rawStatisticsCache[e].min)||N(this._rawStatisticsCache[e].max))||!t&&N(this._rawStatisticsCache[e].values)){if(this._viewDataStatistics&&(!this._viewDataFilter||this._viewDataFilter.transformsArr.length<=1)&&this.getViewData().transformsArr.length<=1&&this._viewDataStatistics.latestData?.[e])this._rawStatisticsCache[e]=this._viewDataStatistics.latestData[e];else if(this._rawData){let n=this._rawData.getFields()?.[e];if(n&&n.lockStatisticsByDomain&&n.domain)this._rawStatisticsCache[e]={},t?(this._rawStatisticsCache[e].min=jt(n.domain),this._rawStatisticsCache[e].max=ge(n.domain)):this._rawStatisticsCache[e].values=n.domain;else{let n=Sp(this._rawData.latestData,[{key:e,operations:t?[`min`,`max`]:[`values`]}])[e];this._rawStatisticsCache[e]=ke(this._rawStatisticsCache[e]??{},n)}}}return this._rawStatisticsCache[e]}_statisticViewData(){X(this._dataSet,`dimensionStatistics`,xp);let e=`${this.type}_${this.id}_viewDataStatic`;this._viewDataStatistics=new Ne(this._dataSet,{name:e}),this._viewDataStatistics.parse([this._data.getDataView()],{type:`dataview`}),this._viewDataStatistics.transform({type:`dimensionStatistics`,options:{fields:()=>{let e=this.getStatisticFields();return this._seriesField&&Oc(e,[{key:this._seriesField,operations:[`values`]}]),e},target:`latest`}},!1),this._data.getDataView().target.removeListener(`change`,this._viewDataStatistics.reRunAllTransform),this.getStack()&&this.createdStackData()}createStatisticalData(e,t,n){X(this._dataSet,`dimensionStatistics`,xp);let r=new Ne(this._dataSet,{name:e});return r.parse([t],{type:`dataview`}),r.transform({type:`dimensionStatistics`,options:{operations:[`max`,`min`,`values`],fields:()=>{let e=Oc(this.getStatisticFields(),n?.(t.name)??[]);return this._seriesField&&Oc(e,[{key:this._seriesField,operations:[`values`]}]),e},target:`latest`}},!1),r}createdStackData(){let e=`${this.type}_${this.id}_viewStackData`;this._viewStackData=new Ne(this._dataSet,{name:e}),this._viewStackData.parse([this._viewDataFilter],{type:`dataview`}),this._viewStackData.transform({type:`stackSplit`,options:()=>({fields:this.getStackGroupFields()})},!1)}_noAnimationDataKey(e,t){return t}generateDefaultDataKey(e){var t;return N(e)?(e,t,n)=>{if(!1===this._spec.animation){let n=this._noAnimationDataKey(e,t);if(n!==void 0)return n}let{keyMap:r}=n,i=this._getSeriesDataKey(e);return r.get(i)===void 0?(r.set(i,0),i):(r.set(i,r.get(i)+1),`${i}_${r.get(i)}`)}:I(e)?t=>t[e]:A(e)&&e.every((e=>I(e)))?t=>e.map((e=>t[e])).join(`-`):M(e)?(t,n)=>e(t,n):((t=this._option)==null||t.onError(`invalid dataKey: ${e}`),(e,t)=>{})}_addDataIndexAndKey(){var e;(e=this._rawData)!=null&&e.dataSet&&(X(this._rawData.dataSet,`addVChartProperty`,np),this._rawData.transform({type:`addVChartProperty`,options:{beforeCall:Ap.bind(this),call:jp}},!1))}updateRawData(e){this._rawData&&this._rawData.updateRawData(e)}rawDataUpdate(e){var t;(t=this._rawDataStatistics)==null||t.reRunAllTransform(),this._rawStatisticsCache=null,this.event.emit(K.rawDataUpdate,{model:this})}viewDataFilterOver(e){this.event.emit(K.viewDataFilterOver,{model:this})}viewDataUpdate(e){var t;this.event.emit(K.viewDataUpdate,{model:this}),(t=this._data)==null||t.updateData(),this._viewDataStatistics&&this._viewDataStatistics.reRunAllTransform()}viewDataStatisticsUpdate(e){this.event.emit(K.viewDataStatisticsUpdate,{model:this})}getDatumPositionValue(e,t){return!e||N(t)?null:e[t]}getDatumPositionValues(e,t){return!e||N(t)?[]:I(t)?[e[t]]:t.map((t=>e[t]))}setValueFieldToStack(){}setValueFieldToPercent(){}setValueFieldToStackOffsetSilhouette(){}initRootMark(){var e;this._rootMark=this._createMark({type:`group`,name:`seriesGroup_${this.type}_${this.id}`},{parent:(e=this._region).getGroupMark?.call(e),dataView:!1}),this._rootMark.setMarkConfig({zIndex:this._spec.zIndex??this.layoutZIndex})}_getExtensionMarkNamePrefix(){return`${this.type}_${this.id}_extensionMark`}_initExtensionMark(e){var t;this._spec.extensionMark&&((t=this._spec.extensionMark)==null||t.forEach(((t,n)=>{this._createExtensionMark(t,null,this._getExtensionMarkNamePrefix(),n,e)})))}_createExtensionMark(e,t,n,r,i){var a;let o=this._createMark({type:e.type,name:h(e.name)?`${e.name}`:`${n}_${r}`},{skipBeforeLayouted:!0,markSpec:e,parent:t,dataView:!1,componentType:e.componentType,key:e.dataKey});if(o){if(h(e.id)&&o.setUserId(e.id),i.hasAnimation&&!1!==e.animation){let t=Wp({},Gp(e.type,e,this._markAttributeContext));o.setAnimationConfig(t)}if(e.type===`group`&&(n=`${n}_${r}`,(a=e.children)==null||a.forEach(((e,t)=>{this._createExtensionMark(e,o,n,t,i)}))),!N(e.dataId)||!N(e.dataIndex)){let t=this._option.getSeriesData(e.dataId,e.dataIndex);t===this._rawData?o.setData(this._data):(o.setDataView(t),t.target.addListener(`change`,(()=>{o.getData().updateData()})))}}}_updateExtensionMarkSpec(){var e;(e=this._spec.extensionMark)==null||e.forEach(((e,t)=>{let n=this._marks.getMarkWithInfo({name:h(e.name)?`${e.name}`:`${this._getExtensionMarkNamePrefix()}_${t}`});n&&(this.initMarkStyleWithSpec(n,e),n.commit(!1,!0))}))}getStackData(){return this._viewStackData?.latestData}_parseDefaultInteractionConfig(e){if(!e?.length)return[];let t=im(this._option.mode),n=Object.assign({},t?.hover),r=Object.assign({},t?.select),i=this._spec.hover;de(i)?n.enable=i:D(i)&&(n.enable=!0,n=R(n,i));let a=this._spec.select;de(a)?r.enable=a:D(a)&&(r.enable=!0,r=R(r,a));let o=[{trigger:{type:`dimension-hover`},marks:e}];if(n.enable){let t=Tf(n,e);t.length&&o.push({trigger:this._defaultHoverConfig(n),marks:t})}if(r.enable){let t=Tf(r,e);t.length&&o.push({trigger:this._defaultSelectConfig(r),marks:t})}return o}_defaultHoverConfig(e){return{type:`element-highlight`,trigger:e.trigger,triggerOff:e.triggerOff,blurState:Q.STATE_HOVER_REVERSE,highlightState:Q.STATE_HOVER}}_defaultSelectConfig(e){let t=e.mode===`multiple`,n=h(e.triggerOff)?e.triggerOff:t?[`empty`]:[`empty`,e.trigger];return{type:`element-select`,trigger:e.trigger,triggerOff:n,reverseState:Q.STATE_SELECTED_REVERSE,state:Q.STATE_SELECTED,isMultiple:t}}_parseInteractionConfig(e){let{interactions:t}=this._spec,n=this._parseDefaultInteractionConfig(e);return t&&t.length&&t.forEach((e=>{let t=Tf(e,this.getMarks());t.length&&n.push({trigger:e,marks:t})})),n}getInteractionTriggers(){if(!0!==this._option.disableTriggerEvent){let e=this.getMarksWithoutRoot();return this._parseInteractionConfig(e)}return[]}initAnimation(){}initMarkState(){this.initSeriesStyleState()}initSeriesStyleState(){let e=this._spec.seriesStyle;if(!e||!e.length)return;let t=this._seriesField??pc;this.getMarksWithoutRoot().forEach((n=>{let r={},i={},a={};e.forEach((e=>{let t=e[n.name]?.style;t&&(r[e.name]=!0,a[e.name]=a[e.name]||{},Object.keys(t).forEach((n=>{i[n]=!0,a[e.name][n]=t[n]})))})),n.state.addStateInfo({stateValue:mc,level:-1,filter:e=>Array.isArray(e)?e.length!==0&&!0===r[e[0][t]]:!0===r[e[t]]});let o={};Object.keys(i).forEach((e=>{o[e]=r=>{let i;if(Array.isArray(r)){if(r.length===0)return;i=a[r[0][t]]?.[e]}return i=a[r[t]]?.[e],h(i)?i:n.getAttribute(e,r)}})),this.setMarkStyle(n,o,mc,Z.User_SeriesStyle)}))}afterInitMark(){this.event.emit(K.afterInitMark,{model:this}),this.setSeriesField(this._spec.seriesField),this.getMarks().forEach((e=>{var t;(t=e.stateStyle?.normal)!=null&&t.lineWidth&&e.setAttribute(`stroke`,this.getColorAttribute(),`normal`,Z.Base_Series)}))}getMarksWithoutRoot(){return this.getMarks().filter((e=>!e.name?.includes(`seriesGroup`)))}_getMarkSpecNamesForCompare(){let e=/* @__PURE__ */ new Set;return this.getMarksWithoutRoot().forEach((t=>{t.name&&e.add(t.name)})),Object.values(H.getSeriesMarkMap(this.type)).forEach((t=>{t!=null&&t.name&&e.add(t.name)})),Array.from(e)}getMarksInType(e){return this._marks.getMarksInType(e)}getMarkInName(e){return this._marks.get(e)}getMarkInId(e){return this.getMarks().find((t=>t.id===e))}initEvent(){var e,t;(e=this._data?.getDataView())==null||e.target.addListener(`change`,this.viewDataUpdate.bind(this)),(t=this._viewDataStatistics)==null||t.target.addListener(`change`,this.viewDataStatisticsUpdate.bind(this))}_releaseEvent(){super._releaseEvent()}initTooltip(){this._tooltipHelper=new vp(this)}_compareExtensionMarksSpec(e,t,n){e.length!==t.length||t.some(((t,n)=>t.type!==e[n].type||t.id!==e[n].id||t.name!==e[n].name))?n.reMake=!0:t.some(((t,n)=>t.visible!==e[n].visible))&&(n.reCompile=!0)}_compareLabelSpec(e,t,n){e.length!==t.length||t.some(((t,n)=>t.labelLayout!==e[n].labelLayout||!1===t.visible&&e[n].visible))?n.reMake=!0:(!n.reCompile&&t.some(((t,n)=>t.visible&&!1===e[n].visible))||!n.reCompile&&t.some(((t,n)=>!O(t,e[n]))))&&(n.reCompile=!0,om(n))}_getSpecUpdatePolicy(){return lm}_compareSpec(e,t,n){var r;let i=super._compareSpec(e,t),a=Object.keys(t||{}).sort(),o=Object.keys(e||{}).sort();if(!O(a,o))return i.reMake=!0,i;let s=this._getSpecUpdatePolicy(),c=s.compileOnlyKeys??{},l=s.dataRelatedKeys??{},u=s.compileOnlySubKeys??{},d=s.seriesOnlyKeys??{},f=Object.assign(Object.assign({},c),l),p=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Bp),f),d),n),{extensionMark:!0,label:!0,totalLabel:!0});if(this._compareExtensionMarksSpec(T(e.extensionMark),T(t.extensionMark),i),!i.reMake&&this._compareLabelSpec(T(e.label),T(t.label),i),!i.reMake&&this._compareLabelSpec(T(e.totalLabel),T(t.totalLabel),i),i.reMake)return i;let m=this._getMarkSpecNamesForCompare().filter((n=>pm(e[n],t[n],um)));m.forEach((e=>{p[e]=!0})),!i.reCompile&&m.length&&(i.reCompile=!0);let h=a.filter((n=>f[n]&&!O(e[n],t[n]))),g=a.filter((n=>d[n]&&!O(e[n],t[n]))),_=a.filter((n=>u[n]&&pm(e[n],t[n],u[n])));return _.forEach((e=>{p[e]=!0})),i.reCompile||!h.length&&!_.length||(i.reCompile=!0),h.some((e=>l[e]))?om(i,!0):i.reCompile&&!((r=i.effects)!=null&&r.series)&&(h.length||_.length||m.length)&&om(i),g.length&&sm(i),a.some((n=>!p[n]&&!O(e[n],t[n])))&&(i.reMake=!0),i}_updateSpecData(){!this._rawData||!this._spec.data||this._spec.data instanceof Ne||wl(this._rawData,this._spec.data,!1)}reInit(e){super.reInit(e);let t=this.getMarksWithoutRoot();t.forEach((e=>{e.clearBeforeReInit(),this._spec[e.name]&&this.initMarkStyleWithSpec(e,this._spec[e.name])})),this.initMarkStyle(),this.initMarkState(),t.forEach((e=>{e.commit(!1)})),this._updateExtensionMarkSpec(),this._updateSpecData(),this._tooltipHelper&&this._tooltipHelper.updateTooltipSpec(),$p(this)&&this.initAnimation()}onEvaluateEnd(e){this._data.updateData()}release(){super.release(),this._viewDataMap.clear();let e=(this._rawData?.transformsArr)?.findIndex((e=>e.type===`addVChartProperty`));e>=0&&this._rawData.transformsArr.splice(e,1),this._dataSet=this._data=this._rawData=this._rawDataStatistics=this._spec=this._region=this._viewDataStatistics=this._viewStackData=null}setLayoutStartPosition(e){P(e.x)&&(this._layoutStartPoint.x=e.x),P(e.y)&&(this._layoutStartPoint.y=e.y)}setLayoutRect({width:e,height:t},n){P(e)&&(this._layoutRect.width=e),P(t)&&(this._layoutRect.height=t)}getSeriesKeys(){return this._seriesField?this.getRawDataStatisticsByField(this._seriesField)?.values??[]:this.name?[this.name]:this.userId?[`${this.userId}`]:[`${this.type}_${this.id}`]}getSeriesStyle(e){return t=>this._seriesMark?.getAttribute(t,e)??void 0}_getSeriesInfo(e,t){let n=this.getDefaultShapeType(),r=this.getRawData()?.latestData,i=/* @__PURE__ */ new Map;return r?.forEach((t=>{let n=this.getSeriesFieldValue(t,e);i.has(n)||i.set(n,t)})),t.map((t=>{let r=i.get(t)??{[e]:t};return{key:t,originalKey:t,datum:r,style:this.getSeriesStyle(r),shapeType:n}}))}getSeriesInfoInField(e){return this._getSeriesInfo(e,this.getRawDataStatisticsByField(e)?.values??[])}getSeriesInfoList(){return this._getSeriesInfo(this._seriesField??pc,this.getSeriesKeys())}_getDefaultColorScale(){var e;let t=this.getDefaultColorDomain(),n=this._getDataScheme();return(e=new Uo().domain(t)).range?.call(e,n)}_getDataScheme(){return Po(this.getColorScheme(),this.type)}getDefaultColorDomain(){return this._seriesField?this.getViewDataStatistics()?.latestData[this._seriesField]?.values:[]}getColorAttribute(){return{scale:this._option.globalScale.getScale(`color`)??this._getDefaultColorScale(),field:this._seriesField??pc}}getDimensionField(){return[]}getMeasureField(){return[]}onMarkPositionUpdate(){this.onMarkTreePositionUpdate(this.getMarksWithoutRoot())}onMarkTreePositionUpdate(e){}_createMark(e,t={},n={}){var r;let{key:i,groupKey:a,skipBeforeLayouted:o,themeSpec:s={},markSpec:c,dataView:l,parent:u,isSeriesMark:d,noSeparateStyle:f=!1}=t,p=super._createMark(e,{key:i??this._getDataIdKey(),seriesId:this.id,attributeContext:this._markAttributeContext,componentType:t.componentType,noSeparateStyle:f,parent:!1===u?null:u??this._rootMark});if(h(p)){let t=this.getSpec()||{};this._marks.addMark(p,{name:e.name}),d&&(this._seriesMark=p),N(l)?p.setData(this._data):!1!==l&&p.setDataView(l),p.setSkipBeforeLayouted(!1!==o),N(a)||p.setGroupKey(a);let i=(r=n.morph)!=null&&r,u=this.getMarks().filter((e=>e.type===`group`||e.getMarkConfig().morph)).length+ +!!i,f=t.morph?.morphKey||(i?`${this.getSpecIndex()}_${u}`:void 0),m=Object.assign(Object.assign({},n),{progressiveStep:t.progressiveStep,progressiveThreshold:t.progressiveThreshold,large:t.large,largeThreshold:t.largeThreshold,morph:i,useSequentialAnimation:t.useSequentialAnimation,support3d:n.support3d??(t.support3d||!!t.zField),morphKey:f,morphElementKey:t.morph?.morphElementKey??n.morphElementKey});p.setMarkConfig(m),this.initMarkStyleWithSpec(p,R({},s,c||t[p.name]))}return p}_getDataIdKey(){return super._getDataIdKey()??fc}_getSeriesDataKey(e){let t=``;if(!e)return t;let n=this.getSeriesField(),r=this.getDimensionField(),i=n?e[n]:void 0,a,o=!1;for(let i=0;i<r.length;i++){let s=r[i],c=e[s];t+=`${i>0?`_`:``}${N(c)?``:c}`,o||=s===n,a=c}return!n||o||r.length>1&&a===i||(t+=`_${i}`),t}addViewDataFilter(e){var t;(t=this._viewDataFilter??this.getViewData())==null||t.transform(e,!1)}reFilterViewData(){var e;(e=this._viewDataFilter??this.getViewData())==null||e.reRunAllTransform()}reTransformViewData(){var e;(e=this._data?.getDataView())==null||e.reRunAllTransform()}fillData(){var e;(e=this.getRawData())==null||e.reRunAllTransform()}compile(){this.compileData()}getDefaultShapeType(){return`circle`}getFieldAlias(e){return e!==_c&&e!==yc&&e!==gc&&e!==vc||(e=this.getStackValueField()),Ac(this.getRawData(),e)??e}_getInvalidConnectType(){return this._invalidType===`zero`?`zero`:this._invalidType===`link`?`connect`:`none`}_getInvalidDefined(e){let t=this.getInvalidCheckFields();return!t.length||t.every((t=>Za(e[t])))}_getRelatedComponentSpecInfo(e){let t=this.getSpecIndex();return this._option.getSpecInfo().component[e]?.filter((e=>e.seriesIndexes.includes(t)))??[]}_forEachStackGroup(e,t){(t??=this._viewStackData?.latestData)&&(t.values?.length?e(t):t.nodes&&Object.values(t.nodes).forEach((t=>{this._forEachStackGroup(e,t)})))}isDatumInViewData(e){if(!e)return!1;let t=this.getViewData().latestData;return!!t&&(!!t.includes(e)||t.some((t=>Object.keys(e).every((n=>e[n]===t[n])))))}getSeriesFieldValue(e,t){return e[t??this.getSeriesField()??pc]}},mm.mark=Fp,mm.transformerConstructor=nm})))()}function gm(e,t,n){let r=e.getScale(0),i=`isInverse`in e&&e.isInverse();k(r.type)?n.sort(((e,n)=>(e[t]-n[t])*(i?-1:1))):n.sort(((e,n)=>(r.index(e[t])-r.index(n[t]))*(i?-1:1)))}function _m(e){return{dataIndex:t=>{let n=e.direction===`horizontal`?e.fieldY[0]:e.fieldX[0],r=t?.[n],i=e.direction===`horizontal`?e.scaleY:e.scaleX;return((i?.domain)?.call(i)??[]).indexOf(r)||0},dataCount:()=>{let t=e.direction===`horizontal`?e.scaleY:e.scaleX;return((t?.domain)?.call(t)??[]).length??0}}}function vm(){return(vm=e((()=>{Ke()})))()}var ym;function bm(){return(bm=e((()=>{hm(),Dc(),S(),v(),Ke(),vm(),V(),Y(),uc(),ym=class extends mm{constructor(){super(...arguments),this.coordinate=`cartesian`,this._bandPosition=.5,this._scaleConfig={bandPosition:this._bandPosition},this._direction=`vertical`,this._sortDataByAxis=!1,this._getPositionXEncoder=()=>this._positionXEncoder?.bind(this),this._setPositionXEncoder=e=>{this._positionXEncoder=e.bind(this)},this._getPositionYEncoder=()=>this._positionYEncoder?.bind(this),this._setPositionYEncoder=e=>{this._positionYEncoder=e.bind(this)}}_buildScaleConfig(){this._scaleConfig={bandPosition:this._bandPosition}}get fieldX(){return this._fieldX}setFieldX(e){this._fieldX=T(e)}get fieldY(){return this._fieldY}setFieldY(e){this._fieldY=T(e)}get fieldZ(){return this._fieldZ}setFieldZ(e){this._fieldZ=e&&T(e)}get fieldX2(){return this._fieldX2}setFieldX2(e){this._fieldX2=e}get fieldY2(){return this._fieldY2}setFieldY2(e){this._fieldY2=e}get direction(){return this._direction}get scaleX(){return this._scaleX}setScaleX(e){this._scaleX=e}get scaleY(){return this._scaleY}setScaleY(e){this._scaleY=e}get scaleZ(){return this._scaleZ}setScaleZ(e){this._scaleZ=e}getXAxisHelper(){return this._xAxisHelper}setXAxisHelper(e){this._xAxisHelper=e,this.onXAxisHelperUpdate()}getYAxisHelper(){return this._yAxisHelper}setYAxisHelper(e){this._yAxisHelper=e,this.onYAxisHelperUpdate()}getZAxisHelper(){return this._zAxisHelper}setZAxisHelper(e){this._zAxisHelper=e,this.onYAxisHelperUpdate()}get sortDataByAxis(){return this._sortDataByAxis}getStatisticFields(){let e=[];return[{axisHelper:this.getXAxisHelper(),fields:this._fieldX2?[...this._fieldX,this._fieldX2]:this._fieldX},{axisHelper:this.getYAxisHelper(),fields:this._fieldY2?[...this._fieldY,this._fieldY2]:this._fieldY},{axisHelper:this.getZAxisHelper(),fields:this._fieldZ}].forEach((t=>{t.axisHelper&&t.axisHelper.getScale&&t.fields&&t.fields.forEach((n=>{let r={key:n,operations:[]},i=t.axisHelper.getScale(0);k(i.type)?(r.operations=[`max`,`min`],i.type===`log`&&(r.filter=e=>e>0)):r.operations=[`values`],e.push(r)}))})),this.getStack()&&e.push({key:this.getStackValueField(),operations:[`allValid`]}),e}getGroupFields(){return this.direction===`vertical`?this._fieldX:this._fieldY}getStackGroupFields(){return this.getGroupFields()}getStackValue(){let e=(this.direction===`horizontal`?this.getXAxisHelper():this.getYAxisHelper())?.getAxisId();return this._spec.stackValue??`${W}_series_${this.type}_${e}`}getStackValueField(){return this.direction===`horizontal`?T(this._spec.xField)[0]:T(this._spec.yField)[0]}setValueFieldToStack(){this.direction===`horizontal`?(this.setFieldX(_c),this.setFieldX2(gc)):(this.setFieldY(_c),this.setFieldY2(gc))}setValueFieldToPercent(){this.direction===`horizontal`?(this.setFieldX(yc),this.setFieldX2(vc)):(this.setFieldY(yc),this.setFieldY2(vc))}setValueFieldToStackOffsetSilhouette(){this.direction===`horizontal`?(this.setFieldX(xc),this.setFieldX2(bc)):(this.setFieldY(xc),this.setFieldY2(bc))}onXAxisHelperUpdate(){this.onMarkPositionUpdate()}onYAxisHelperUpdate(){this.onMarkPositionUpdate()}onZAxisHelperUpdate(){this.onMarkPositionUpdate()}setAttrFromSpec(){super.setAttrFromSpec(),this.setFieldX(this._spec.xField),this.setFieldY(this._spec.yField),this.setFieldZ(this._spec.zField),this._specXField=T(this._spec.xField),this._specYField=T(this._spec.yField),h(this._spec.direction)&&(this._direction=this._spec.direction),this.setFieldX2(this._spec?.x2Field),this.setFieldY2(this._spec?.y2Field),this.getStack()&&this.setValueFieldToStack(),this.getPercent()&&this.setValueFieldToPercent(),this.getStackOffsetSilhouette()&&this.setValueFieldToStackOffsetSilhouette(),h(this._spec.sortDataByAxis)&&(this._sortDataByAxis=!0===this._spec.sortDataByAxis)}dataToPosition(e,t){return e?t&&!this.isDatumInViewData(e)?null:{x:this.dataToPositionX(e),y:this.dataToPositionY(e)}:null}_buildMarkAttributeContext(){super._buildMarkAttributeContext(),this._markAttributeContext.valueToX=this.valueToPositionX.bind(this),this._markAttributeContext.valueToY=this.valueToPositionY.bind(this),this._markAttributeContext.xBandwidth=(e=0)=>{var t;return(t=this.getXAxisHelper()).getBandwidth?.call(t,e)??0},this._markAttributeContext.yBandwidth=(e=0)=>{var t;return(t=this.getYAxisHelper()).getBandwidth?.call(t,e)??0},this._markAttributeContext.valueToPosition=this.valueToPosition.bind(this)}valueToPosition(e,t){return{x:this.valueToPositionX(e),y:this.valueToPositionY(t)}}_axisPosition(e,t,n){return this._scaleConfig.datum=n,e.isContinuous?e.valueToPosition(t,this._scaleConfig):e.dataToPosition(T(t),this._scaleConfig)}valueToPositionX(e,t){return this._axisPosition(this._xAxisHelper,e,t)}valueToPositionY(e,t){return this._axisPosition(this._yAxisHelper,e,t)}_dataToPosition(e,t,n,r,i,a){let o=i();if(o)return o(e);if(!t)return a((e=>NaN)),NaN;let s=(t.getFields?t.getFields():n).slice(0,r);return s&&s.length!==0?(t.isContinuous?a((e=>(this._scaleConfig.datum=e,t.valueToPosition(this.getDatumPositionValue(e,s[0]),this._scaleConfig)))):a((e=>(this._scaleConfig.datum=e,t.dataToPosition(T(this.getDatumPositionValues(e,s)),this._scaleConfig)))),i()(e)):(a((e=>null)),null)}dataToPositionX(e){return this._dataToPosition(e,this._xAxisHelper,this.fieldX,void 0,this._getPositionXEncoder,this._setPositionXEncoder)}dataToPositionY(e){return this._dataToPosition(e,this._yAxisHelper,this.fieldY,void 0,this._getPositionYEncoder,this._setPositionYEncoder)}dataToPositionZ(e){if(!this._zAxisHelper)return NaN;let{dataToPosition:t}=this._zAxisHelper;return t(this.getDatumPositionValues(e,this._fieldZ),{bandPosition:this._bandPosition})}dataToPositionX1(e){return this._xAxisHelper?this._fieldX2&&this._fieldX2 in e?this.valueToPositionX(this.getDatumPositionValues(e,this._fieldX2)):this.valueToPositionX(0):NaN}dataToPositionY1(e){return this._yAxisHelper?this._fieldY2&&this._fieldY2 in e?this.valueToPositionY(this.getDatumPositionValues(e,this._fieldY2)):this.valueToPositionY(0):NaN}positionToData(e){return e?{x:this.positionToDataX(e.x),y:this.positionToDataY(e.y)}:null}positionToDataX(e){return this._scaleX?this._scaleX.invert(e):null}positionToDataY(e){return this._scaleY?this._scaleY.invert(e):null}getRegionRectLeft(){if(!this._xAxisHelper)return NaN;let{getScale:e}=this._xAxisHelper;return e(0).range()[0]}getRegionRectRight(){if(!this._xAxisHelper)return NaN;let{getScale:e}=this._xAxisHelper;return e(0).range()[1]}afterInitMark(){super.afterInitMark(),this.setFieldX(this._fieldX),this.setFieldY(this._fieldY),this._buildScaleConfig()}getDimensionField(){return this._direction===`horizontal`?this._specYField:this._specXField}getDimensionContinuousField(){return this._direction===`horizontal`?[this.fieldY[0],this.fieldY2]:[this.fieldX[0],this.fieldX2]}getMeasureField(){return this._direction===`horizontal`?this._specXField:this._specYField}initEvent(){super.initEvent(),this.sortDataByAxis&&this.event.on(K.scaleDomainUpdate,{filter:e=>e.model.id===(this._direction===`horizontal`?this._yAxisHelper:this._xAxisHelper)?.getAxisId()},(()=>{this._sortDataInAxisDomain()}))}_sortDataInAxisDomain(){var e,t;(e=this.getViewData()?.latestData)!=null&&e.length&&(gm(this._direction===`horizontal`?this._yAxisHelper:this._xAxisHelper,this._direction===`horizontal`?this._fieldY[0]:this._fieldX[0],this.getViewData().latestData),(t=this._data)==null||t.updateData(!0))}getInvalidCheckFields(){let e=[];return this._xAxisHelper&&this._xAxisHelper.isContinuous&&this._xAxisHelper.getAxisType()!==B.geoCoordinate&&(this._xAxisHelper.getFields?this._xAxisHelper.getFields():this._specXField).forEach((t=>{e.push(t)})),this._yAxisHelper&&this._yAxisHelper.isContinuous&&this._yAxisHelper.getAxisType()!==B.geoCoordinate&&(this._yAxisHelper.getFields?this._yAxisHelper.getFields():this._specYField).forEach((t=>{e.push(t)})),e}reInit(e){this._positionXEncoder&&=null,this._positionYEncoder&&=null,super.reInit(e)}}})))()}function $(e){return e===`bottom`||e===`top`}function xm(e){return e===`left`||e===`right`}function Sm(e){return e===`z`}function Cm(e,t){return t?$(e)?`linear`:`band`:$(e)?`band`:`linear`}function wm(e,t){return $o(e.orient)||t&&t.includes(e.orient)?e.orient:`left`}function Tm(e){return e===`top`||e===`bottom`?`horizontal`:`vertical`}function Em(e,t){let n=e.inverse;return t&&!$(e.orient)&&(n=!h(e.inverse)||!e.inverse),n}function Dm(e,t){let n=e.type??Cm(e.orient,t);return{axisType:n,componentName:`${B.cartesianAxis}-${n}`}}var Om;function km(){return(km=e((()=>{v(),cs(),V(),tp(),_i(),Om=(e,t,n)=>{let r=(t===`band`?Qf(`axisBand`,n):[`linear`,`log`,`symlog`].includes(t)?Qf(`axisLinear`,n):{})??{},i=$(e)?Qf(`axisX`,n):xm(e)?Qf(`axisY`,n):Qf(`axisZ`,n);return R({},Qf(`axis`,n),r,i)}})))()}var Am;function jm(){return(jm=e((()=>{Va(),Ke(),km(),Am=class{constructor(e,t){this._eventDispatcher=e,this._mode=t}get chart(){var e;return this._chart||=(e=this._eventDispatcher.globalInstance).getChart?.call(e),this._chart}register(e,t){(this.chart?.getOption().onError??za)(`Method not implemented.`)}unregister(){(this.chart?.getOption().onError??za)(`Method not implemented.`)}getTargetDimensionInfo(e,t){var n;let r=(n=this.chart.getModelOption()).getDimensionInfo?.call(n,this.chart,{x:e,y:t})??[];return r.length===0?null:r}dispatch(e,t){let n=this.chart?.getAllComponents().filter((e=>e.specKey===`axes`&&(!t?.filter||t.filter(e)))),r=n.filter((e=>{let t=e.getScale();return St(t.type)})),i=r.length?r:n.filter((e=>{let t=e.getOrient();return $(t)||t===`angle`})),a=[],o=this.chart?.getModelOption().getDimensionInfoByValue;return o&&i.forEach((t=>{let n=o(t,e);n&&a.push(n)})),this._callback.call(null,{action:`enter`,dimensionInfo:a}),a}}})))()}var Mm;function Nm(){return(Nm=e((()=>{Y(),jm(),Mm=class extends Am{constructor(){super(...arguments),this.onClick=e=>{if(!e)return;let t=e.event.viewX,n=e.event.viewY,r=this.getTargetDimensionInfo(t,n);r&&this._callback.call(null,Object.assign(Object.assign({},e),{action:`click`,dimensionInfo:r.slice()}))}}register(e,t){this._callback=t.callback,this._eventDispatcher.register(`pointertap`,{query:Object.assign(Object.assign({},t.query),{source:q.chart}),callback:this.onClick})}unregister(){this._eventDispatcher.unregister(`pointertap`,{query:null,callback:this.onClick})}}})))()}var Pm,Fm,Im,Lm,Rm,zm,Bm;function Vm(){return(Vm=e((()=>{E(),S(),v(),Re(),Ke(),Pm=(e,t,n)=>e.x>=t.x&&e.x<=n.x&&e.y>=t.y&&e.y<=n.y,Fm=(e,t,n)=>e.getRegionsInIds(T(t.layout.layoutBindRegionID))?.some((e=>{let t=e.getLayoutRect(),r=e.getLayoutStartPoint();return Pm(n,{x:r.x,y:r.y},{x:t.width+r.x,y:t.height+r.y})})),Im=(e,t)=>e===t||!N(e)&&!N(t)&&e.value===t.value&&e.axis?.id===t.axis?.id,Lm=(e,t)=>{let n=e.tooltipFilterRange,r=typeof n==`function`?n({scale:t}):n;return P(r)?[-r,r]:r},Rm=(e,t,n,r)=>{let i=t.getScale(),a=St(i.type),o=[],s=t.getOption().getChart().getSeriesInIndex(t.getSpecInfo().seriesIndexes);for(let c of s)if(c.coordinate===n){let n=T(r(c)),s=c.getViewData()?.latestData;if(n&&s){if(a){let t=[],r=[];s.forEach(((i,a)=>{i[n[0]]?.toString()===e?.toString()&&(t.push(i),r.push(a))})),o.push({series:c,datum:t,key:zm(c,r)})}else if(h(n[1])){let t=[],r=[];s.forEach(((i,a)=>{(i[n[0]]?.toString()===e?.toString()||h(i[n[0]])&&h(i[n[1]])&&e>=i[n[0]]&&e<i[n[1]])&&(t.push(i),r.push(a))})),o.push({series:c,datum:t,key:zm(c,r)})}else{let r=t.getSpec(),a=Lm(r,i),l=[],u=[];if(a)s.forEach(((t,r)=>{if(h(t[n[0]])){let i=t[n[0]]-e;i>=a[0]&&i<=a[1]&&(l.push(t),u.push(r))}}));else{let t=1/0,r=0;s.forEach(((i,a)=>{if(h(i[n[0]])){let o=Math.abs(i[n[0]]-e),s=Math.sign(i[n[0]]-e);o<t?(t=o,l=[i],u=[a],r=s):o===t&&s===r&&(l.push(i),u.push(a))}}))}o.push({series:c,datum:l,key:zm(c,u)})}}}return o},zm=(e,t)=>`${e.id}_${t.join(`_`)}`,Bm=(e,t,n)=>{let r=e.getAllComponents().filter((r=>r.specKey===`axes`&&t(r)&&Fm(e,r,n)));return r.length?r:null}})))()}var Hm;function Um(){return(Um=e((()=>{qa(),jm(),Vm(),Y(),Hm=class extends Am{constructor(){super(...arguments),this._cacheDimensionInfo=null,this.onMouseMove=e=>{var t;if(!e||((t=e.chart?.getOption()?.globalInstance)?.disableDimensionHoverEvent)?.call(t))return;let n=e.event.viewX,r=e.event.viewY,i=this.getTargetDimensionInfo(n,r);i===null&&this._cacheDimensionInfo!==null?(this._callback.call(null,Object.assign(Object.assign({},e),{action:`leave`,dimensionInfo:this._cacheDimensionInfo.slice()})),this._cacheDimensionInfo=i):i===null||this._cacheDimensionInfo!==null&&i.length===this._cacheDimensionInfo.length&&!i.some(((e,t)=>!Im(e,this._cacheDimensionInfo[t])))?i!==null&&this._callback.call(null,Object.assign(Object.assign({},e),{action:`move`,dimensionInfo:i.slice()})):(this._callback.call(null,Object.assign(Object.assign({},e),{action:`enter`,dimensionInfo:i.slice()})),this._cacheDimensionInfo=i)},this.onMouseOut=e=>{var t,n;e&&!((n=(t=e.chart?.getOption()?.globalInstance)?.disableDimensionHoverEvent)!=null&&n.call(t))&&(this._callback.call(null,Object.assign(Object.assign({},e),{action:`leave`,dimensionInfo:this._cacheDimensionInfo?this._cacheDimensionInfo.slice():[]})),this._cacheDimensionInfo=null)}}register(e,t){this._callback=t.callback,this._eventDispatcher.register(`pointermove`,{query:Object.assign(Object.assign({},t.query),{source:q.chart}),callback:this.onMouseMove}),this._eventDispatcher.register(`pointerout`,{query:Object.assign(Object.assign({},t.query),{source:q.canvas}),callback:this.onMouseOut}),Ua(this._mode)&&this._eventDispatcher.register(`pointerdown`,{query:Object.assign(Object.assign({},t.query),{source:q.chart}),callback:this.onMouseMove})}unregister(){this._eventDispatcher.unregister(`pointermove`,{query:null,callback:this.onMouseMove}),this._eventDispatcher.unregister(`pointerout`,{query:null,callback:this.onMouseOut}),Ua(this._mode)&&this._eventDispatcher.unregister(`pointerdown`,{query:null,callback:this.onMouseMove})}}})))()}var Wm;function Gm(){return(Gm=e((()=>{(function(e){e.dimensionHover=`dimensionHover`,e.dimensionClick=`dimensionClick`})(Wm||={})})))()}var Km;function qm(){return(qm=e((()=>{Km={point:{name:`point`,type:`symbol`},line:{name:`line`,type:`line`}}})))()}var Jm,Ym;function Xm(){return(Xm=e((()=>{uc(),Et(),Y(),yu(),Yf(),Zf(),tm(),Gm(),td(),qm(),_i(),Jm={sampling:!0,samplingFactor:!0},Ym=class{addSamplingCompile(){if(this._spec.sampling){let{width:e,height:t}=this._region.getLayoutRect(),n=this._fieldY,r=this._fieldX;this._data&&this._data.setTransform([{type:`dataSampling`,size:this._direction===`horizontal`?t:e,factor:this._spec.samplingFactor,yfield:this._direction===`horizontal`?r[0]:n[0],groupBy:this._seriesField,mode:this._spec.sampling}])}}addOverlapCompile(){var e;if(this._spec.markOverlap){let t=[];t.push({type:`symbolOverlap`,direction:this._direction===`horizontal`&&this.coordinate===`cartesian`?2:1,delta:this._spec.pointDis,deltaMul:this._spec.pointDisMul,groupBy:this._seriesField}),(e=this._symbolMark)==null||e.setTransform(t)}}reCompileSampling(){this._spec.sampling&&this.compile()}initLineMark(e){return this._lineMark=this._createMark(Km.line,{groupKey:this._seriesField,isSeriesMark:e==null||e},{morphElementKey:this.getDimensionField()[0]}),this._lineMark}initLineMarkStyle(e,t){let n=this._lineMark;if(n){if(this.setMarkStyle(n,{stroke:this.getColorAttribute()},`normal`,Z.Series),this._invalidType!==`zero`&&this.setMarkStyle(n,{defined:this._getInvalidDefined.bind(this),connectedType:this._getInvalidConnectType()},`normal`,Z.Series),this.event.on(K.viewDataStatisticsUpdate,{filter:e=>e.model===this},(()=>{this.encodeDefined(n,`defined`)})),this.coordinate===`polar`)this.setMarkStyle(n,{lineJoin:Xf,curveType:Jf,closePath:!0},`normal`,Z.Series);else{let r=t??this.getSpec().line?.style?.curveType,i=r===`monotone`?e===`horizontal`?`monotoneY`:`monotoneX`:r;this.setMarkStyle(n,{curveType:i},`normal`,Z.Built_In)}this.setMarkStyle(n,{x:this.dataToPositionX.bind(this),y:this.dataToPositionY.bind(this),z:this._fieldZ?this.dataToPositionZ.bind(this):null},`normal`,Z.Series)}return n}_getEventElement(e,t=!1){let n=[];return e.dimensionInfo.some((e=>(e.data.some((e=>e.series===this&&(n=e.datum,!0))),!n.length))),n}_dimensionTrigger(e){let t=this._getEventElement(e);switch(e.action){case`enter`:this._symbolActiveMark.getDataView().parse(t),this._symbolActiveMark.getData().updateData(!1);break;case`leave`:this._symbolActiveMark.getDataView().parse([]),this._symbolActiveMark.getData().updateData(!1)}}initSymbolMark(e){if(!1!==(this._spec.point||{}).visible&&(this._symbolMark=this._createMark(Km.point,{groupKey:this._seriesField,isSeriesMark:!!e},{morph:Jp(this._spec,Km.point.name),morphElementKey:this.getDimensionField()[0]})),!0===this._spec.activePoint){let e=new Ne(this._option.dataSet,{name:`${W}_series_${this.id}_active_point`});e.parse([]),this._symbolActiveMark=this._createMark({name:`active_point_${this.id}`,type:`symbol`},{groupKey:this._seriesField,isSeriesMark:!1,dataView:e,parent:this._region.getInteractionMark()},{morph:!1}),this._symbolActiveMark.setVisible(!1)}return this._symbolMark}initSymbolMarkStyle(){let e=this._symbolMark;if(!e)return this._initSymbolActiveMarkAlone(),e;if(this._initSymbolMark(e),this._symbolActiveMark&&this._symbolMark.stateStyle.dimension_hover){this._symbolActiveMark.setVisible(!0),this.event.on(Wm.dimensionHover,this._dimensionTrigger.bind(this));for(let t in this._symbolMark.stateStyle){this._symbolActiveMark.stateStyle[t]={};for(let n in this._symbolMark.stateStyle[t])n!==`visible`&&(this._symbolActiveMark.stateStyle[t][n]={style:null,level:Z.Series,referer:e})}this._symbolActiveMark.state.changeStateInfo({stateValue:Q.STATE_DIMENSION_HOVER,filter:()=>!0})}return e}_initSymbolMark(e){e&&(this.setMarkStyle(e,{fill:this.getColorAttribute()},`normal`,Z.Series),this.setMarkStyle(e,{x:e=>this._invalidType===`zero`||this._getInvalidDefined(e)?this.dataToPositionX(e):NaN,y:e=>this._invalidType===`zero`||this._getInvalidDefined(e)?this.dataToPositionY(e):NaN,z:this._fieldZ?this.dataToPositionZ.bind(this):null},`normal`,Z.Series))}_initSymbolActiveMarkAlone(){var e;let t=this._symbolActiveMark;t&&(this._initSymbolMark(t),t&&(e=this._spec[Km.point.name]?.state)!=null&&e.dimension_hover&&(t.setVisible(!0),this.event.on(Wm.dimensionHover,this._dimensionTrigger.bind(this)),this.initMarkStyleWithSpec(t,R({},this._spec[Km.point.name],{visible:!0})),this._symbolActiveMark.state.changeStateInfo({stateValue:Q.STATE_DIMENSION_HOVER,filter:()=>!0})))}initLabelMarkStyle(e){e&&(e.getTarget()?.type!==`symbol`&&e.setRule(`line-data`),this.setMarkStyle(e,{fill:this.getColorAttribute(),text:e=>e[this.getStackValueField()],z:this._fieldZ?this.dataToPositionZ.bind(this):null}),this._invalidType!==`zero`&&this.setMarkStyle(e,{visible:this._getInvalidDefined.bind(this)},`normal`,Z.Series),this.event.on(K.viewDataStatisticsUpdate,{filter:e=>e.model===this},(()=>{this.encodeDefined(e,`visible`)})))}initLineLabelMarkStyle(e){e&&this.setMarkStyle(e,{fill:this.getColorAttribute(),text:e=>e[this.getSeriesField()]??this.getSeriesKeys()[0],z:this._fieldZ?this.dataToPositionZ.bind(this):null})}encodeDefined(e,t){if(!e)return;let n=this._isFieldAllValid();if(this._invalidType===`zero`||n){if(!0===e.stateStyle.normal?.[t]?.style)return;this.setMarkStyle(e,{[t]:!0},`normal`,Z.Series)}else{if(!0!==e.stateStyle.normal?.[t]?.style)return;this.setMarkStyle(e,{[t]:this._getInvalidDefined.bind(this)},`normal`,Z.Series)}e.compileEncode()}_isFieldAllValid(){let e=this.getViewDataStatistics(),t=this.getStackValueField();return!!(e&&e.latestData&&t)&&e.latestData[t]&&e.latestData[t].allValid}}})))()}var Zm,Qm,$m,eh;function th(){return(th=e((()=>{E(),Ct(),j(),Zm=(e,t)=>{if(e===t)return!0;let n=(e&&e.length)??0;return n===((t&&t.length)??0)&&n!==0&&e.every(((e,n)=>!e&&!t[n]||e&&t[n]&&e.color===t[n].color&&e.offset===t[n].offset))},Qm=(e,t)=>{if(e===t)return!0;if(typeof e!=typeof t||I(e))return!1;if(A(e))return e.length===t.length&&e.every(((e,n)=>Qm(e,t[n])));if(e.gradient!==t.gradient)return!1;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((n=>n===`stops`?Zm(e[n],t[n]):e[n]===t[n]))},$m=(e,t)=>e.length===t.length&&e.join(`-`)===t.join(`-`),eh=(e,t,n)=>!(!N(e)||!N(t))||!N(e)&&!N(t)&&(n===`lineDash`?$m(e,t):n===`stroke`||n===`fill`?Qm(e,t):e===t)})))()}var nh,rh;function ih(){return(ih=e((()=>{Ke(),o(),E(),Id(),$u(),th(),Dc(),nh=[`stroke`,`strokeOpacity`,`lineDash`,`lineDashOffset`,`lineCap`,`lineJoin`,`lineWidth`,`miterLimit`],rh=class extends Fd{constructor(){super(...arguments),this._segmentStyleKeys=[],this._isValidPointChannel=e=>[`x`,`y`,`defined`].includes(e)}_getSegmentAttributes(){return nh}initStyleWithSpec(e){this._segmentStyleKeys=[],super.initStyleWithSpec(e)}setStyle(e,t=`normal`,n=0){if(N(e))return;this.stateStyle[t]===void 0&&(this.stateStyle[t]={});let r=this._getIgnoreAttributes(),i=this._getSegmentAttributes(),a=this.isUserLevel(n);Object.keys(e).forEach((o=>{let s=e[o];if(N(s)||r.includes(o))return;a&&i.includes(o)&&(kt(s?.type)||s!=null&&s.scale||M(s))&&(this._segmentStyleKeys.includes(o)||this._segmentStyleKeys.push(o));let c=this._filterAttribute(o,s,t,n,a);this.setAttribute(o,c,t,n)}))}_getLineSegments(e,t){if(!this._segmentStyleKeys||!this._segmentStyleKeys.length)return null;let n=[],r=null;return e.forEach(((e,t)=>{r&&this._segmentStyleKeys.every((t=>eh(r[t],e[t],t)))||(n.length&&(n[n.length-1].endIndex=t),r=e,n.push({attrs:r,startIndex:t}))})),n.length>=2?n.map((e=>Object.assign(Object.assign({},e.attrs),{points:t.slice(e.startIndex,N(e.endIndex)?t.length:e.endIndex)}))):null}_getPrevPoints(e){let{points:t,segments:n}=e.attribute;return t??(n?n.reduce(((e,t)=>(t.points&&t.points.forEach((t=>{e.push(t)})),e)),[]):null)}_runPointsEncoder(e,t,n={}){let r=t.context.data,i=[],a=[],o={},s=this.renderContext?.progressive,c=s&&s.currentIndex===0;if(r.forEach(((t,n)=>{a[n]={},i[n]={},Object.keys(e).forEach((r=>{this._isValidPointChannel(r)?a[n][r]=e[r](t):this._segmentStyleKeys.includes(r)&&!s?i[n][r]=e[r](t):n!==0||s&&!c||(o[r]=e[r](t))})),a[n].context=this._keyGetter(t)??n})),s){let e=t.attribute?.segments?[...t.attribute.segments]:[];return e.push({points:a}),c?Object.assign(Object.assign({},o),{segments:e}):{segments:e}}if(this._segmentStyleKeys&&this._segmentStyleKeys.length){let e=this._getLineSegments(i,a);if(e)return Object.assign(Object.assign(Object.assign({},o),i[0]),{segments:e,points:null})}return Object.assign(Object.assign(Object.assign({},o),i[0]),{points:a,segments:null})}_runEncoderOfGraphic(e,t,n={}){let r=t.context.data;return e&&Object.keys(e).some(this._isValidPointChannel)&&r&&r.length?this._runPointsEncoder(e,t,n):super._runEncoderOfGraphic(e,t,n)}_getDataByKey(e){return this._dataByGroup}_runProgressiveJoin(){let e=this.renderContext.progressive.currentIndex,t=[];this._dataByGroup.keys.forEach(((n,r)=>{let i=this.renderContext.progressive.groupedData.get(n),a=this.renderContext.progressive.step,o=i.slice(e*a,(e+1)*a);if(e===0){let e={context:Object.assign(Object.assign({},this._getCommonContext()),{diffState:Qu.enter,data:o,uniqueKey:n,key:n,groupKey:n})};t.push(e)}else this._graphics[r].context.data=o}));let n=e===0?t:this._graphics;return{graphicsByGroup:{[fc]:n},graphics:n,needUpdate:!1}}_setCommonAttributesToTheme(e){}_addProgressiveGraphic(e,t){t.incremental=1,e.appendChild(t)}}})))()}var ah,oh;function sh(){return(sh=e((()=>{U(),Do(),ih(),yf(),Pa(),si(),Ei(),ah=class e extends rh{constructor(){super(...arguments),this.type=e.type}_getDefaultStyle(){return Object.assign(Object.assign({},super._getDefaultStyle()),{lineWidth:1})}_getIgnoreAttributes(){return this.model?.type===To.radar&&this.model?.coordinate===`polar`?[]:[`fill`,`fillOpacity`]}},ah.type=`line`,oh=()=>{H.registerMark(ah.type,ah),Wt(),nn(),Ar(),Bi(),gf(),H.registerGraphicComponent(`line`,tr)}})))()}var ch,lh;function uh(){return(uh=e((()=>{U(),Id(),Pa(),Ei(),E(),ch=class e extends Fd{constructor(){super(...arguments),this.type=e.type}_getDefaultStyle(){return Object.assign(Object.assign({},super._getDefaultStyle()),{size:1,symbolType:`circle`,fill:void 0,lineWidth:0})}_transformGraphicAttributes(e,t,n){let r=super._transformGraphicAttributes(e,t,n),i=r.shape??r.symbolType??e.attribute?.symbolType;return r.symbolType=N(i)?`circle`:i,r}},ch.type=`symbol`,lh=()=>{H.registerMark(ch.type,ch),Wt(),sa(),Bi(),H.registerGraphicComponent(`symbol`,ni)}})))()}var dh;function fh(){return(fh=e((()=>{rm(),dh=class extends nm{_transformLabelSpec(e){!1!==e.point?.visible&&!1!==e.point?.style?.visible?this._addMarkLabelSpec(e,`point`):this._addMarkLabelSpec(e,`line`),this._addMarkLabelSpec(e,`line`,`lineLabel`,`initLineLabelMarkStyle`,void 0,!0)}}})))()}function ph(e){return e.length>=2&&P(e[0])&&P(w(e))&&w(e)>=e[0]}function mh(e,t){let n=w(t)-t[0],r=w(t)*t[0]<0,i=t[0]<=0?0-t[0]:0,a=w(t)>0?w(t)-0:0;n===0?t[0]<0?(i=1,a=0):t[0]>0&&(i=0,a=1):(i/=n,a/=n);let o=e.getDomainSpec(),s={total:n,negative:i,positive:a,includeZero:r,domain:t,extendable_min:!P(o.min),extendable_max:!P(o.max)};if(e._break?.scope){let n=t.findIndex((e=>e>=0)),r,i;n===0?(r=e._break.scope[n],i=[t[0],t[1]],s.positive=1,s.negative=0):w(t)<=0?(s.positive=0,s.negative=1,i=[t[t.length-2],t[t.length-1]]):(r=e._break.scope[n-1],i=[t[n-1],t[n]],s.negative=r[0]+(0-i[0])/(i[1]-i[0])*(r[1]-r[0]),s.positive=1-s.negative),s.break=!0,s.extendable_max=!1,s.extendable_min=!1,s.domain=i}return s}function hh(e,t){let{positive:n,negative:r,extendable_min:i,extendable_max:a,domain:o}=e,{positive:s,negative:c,extendable_min:l,extendable_max:u,domain:d}=t;if(s>0){if(!l)return!1;let e=r/n;a&&(e=r/Math.max(n,s),o[1]=-o[0]/e),d[0]=-d[1]*e}else if(c>0){if(!u)return!1;let e=n/r;i&&(e=n/Math.max(r,r),o[0]=-o[1]/e),d[1]=-d[0]*e}return!0}function gh(e,t){let{extendable_min:n,extendable_max:r,domain:i}=e,{positive:a,negative:o,domain:s}=t;return(a!==0||o!==0)&&!(a>0&&!r)&&!(o>0&&!n)&&(i[0]=s[0],i[1]=s[1],!0)}function _h(e,t){let{positive:n,negative:r,extendable_max:i,domain:a}=e,{positive:o,negative:s,extendable_min:c,domain:l}=t;if(i&&c){let e=Math.max(r,s)/Math.max(n,o);a[1]=-a[0]/e,l[0]=-l[1]*e}else if(c){let e=r/n;l[0]=-l[1]*e}else{if(!i)return!1;{let e=s/o;a[1]=-a[0]/e}}return!0}function vh(e,t){let{extendable_min:n,domain:r}=e,{extendable_max:i,domain:a}=t;return!(!n||!i)&&(r[0]=-r[1],a[1]=-a[0],!0)}var yh;function bh(){return(bh=e((()=>{Re(),S(),yh=(e,t)=>{var n,r;let i=e.getScale(),a=t.getScale();if(!i||!a)return;let o=(n=e).getDomainAfterSpec?.call(n)??[0,1],s=(r=t).getDomainAfterSpec?.call(r)??[0,1];if(!(o&&s&&ph(o)&&ph(s)))return;let c=mh(e,o),l=mh(t,s);if(!0===c.break&&!0===l.break)return;let{positive:u,negative:d,extendable_min:f,extendable_max:p,includeZero:m}=c,{positive:h,negative:g,extendable_min:_,extendable_max:v,includeZero:y}=l;if(u===0&&d===0){if(!gh(c,l))return}else if(h===0&&g===0){if(!gh(l,c))return}else if(m||y){if(m&&!y){if(!hh(c,l))return}else if(y&&!m){if(!hh(l,c))return}else{if(d===g)return;if(d>g){if(!_h(c,l))return}else if(!_h(l,c))return}}else{if(d===0&&h===0){if(!vh(c,l))return}else if(g===0&&u===0&&!vh(l,c))return;if(d===0&&g===0){if(o[0]===0&&s[0]>0){if(!_)return;s[0]=0}else{if(!(s[0]===0&&o[0]>0)||!f)return;o[0]=0}}if(u===0&&h===0){if(o[1]===0&&s[1]>0){if(!v)return;s[1]=0}else{if(!(s[1]===0&&o[1]>0)||!p)return;o[1]=0}}}i.domain(o),a.domain(s)}})))()}function xh(e,t,n,r,i){let a=ot(e,t),o=Math.max(re(n),re(a));return i*(Math.round(a*10**o)/Math.round(n*10**o))+r}var Sh;function Ch(){return(Ch=e((()=>{Ji(),S(),Oe(),Sh=(e,t)=>{if(!e)return e;let n=(t?.targetAxis)?.call(t);if(!n)return e;let r=(t?.currentAxis)?.call(t);if(!r)return e;let i=r.getTickData()?.getDataView();if(!i||!i.transformsArr.find((e=>e.type.includes(`ticks`))))return e;let a=r.getScale();if(!a)return e;let o=n.getTickData()?.getDataView()?.latestData;if(!o?.length)return e;let s=n.getScale();if(!s)return e;let c=s.domain(),l=w(c)-c[0];if(l===0)return e;let u=a.domain(),d=w(u)-u[0];if(l===0)return e;let f=o.map((e=>xh(e.value,c[0],l,u[0],d)));return Gr(f)}})))()}var wh;function Th(){return(Th=e((()=>{Xa(),wh=class{constructor(e){this.id=Ja(),this.name=`${e}_${this.id}`}onAdd(e){this.service=e}release(){this.service=null}}})))()}var Eh;function Dh(){return(Dh=e((()=>{Y(),bh(),Ke(),Ch(),Th(),Eh=class e extends wh{constructor(){super(e.type),this.type=`AxisSyncPlugin`}_checkEnableSync(e){if(!k(e.getScale().type))return!1;let t=e.getSpec().sync;return!!t?.axisId&&t}_getTargetAxis(e,t){let n=e.getOption().getChart().getComponentByUserId(t.axisId);return n?.type.startsWith(`cartesianAxis`)?n:null}onInit(e,t){let n=this._checkEnableSync(t);if(!n||!n.zeroAlign)return;let r=this._getTargetAxis(t,n);r&&t.event.on(K.scaleDomainUpdate,{filter:({model:e})=>e.id===t.id||e.id===r.id},(()=>{yh(r,t)}))}onDidCompile(e,t){let n=this._checkEnableSync(t);if(!n)return;let r=this._getTargetAxis(t,n);if(r&&n.tickAlign){X(t.getOption().dataSet,`tickAlign`,Sh);let e={targetAxis:()=>r,currentAxis:()=>t},n=r.getTickData()?.getDataView();n&&n.target.addListener(`change`,(()=>{var e;(e=t.getTickData()?.getDataView())==null||e.reRunAllTransform({skipEqual:!0})})),t.addTransformToTickData({type:`tickAlign`,options:e,level:2**53-1},!1)}}},Eh.pluginType=`component`,Eh.type=`AxisSyncPlugin`})))()}function Oh(e){return(e=qc(e)).startSymbol=qc(e.startSymbol),e.endSymbol=qc(e.endSymbol),e}function kh(e){let t=0;return Ve(e,`tick.visible`)&&(t+=Ve(e,`tick.tickSize`)),Ve(e,`label.visible`)&&(t+=Ve(e,`label.space`)),t}function Ah(e,t){return{min:e.min??e.range?.min??t?.min,max:e.max??e.range?.max??t?.max}}function jh(e){let t=e?.orient;return t===`top`||t===`bottom`||t===`left`||t===`right`||t===`z`}function Mh(e,t){return{id:e,label:e,value:t,rawValue:e}}function Nh(e,t,n){return n||!e||e.getAxisId()===t.getAxisId()}var Ph,Fh;function Ih(){return(Ih=e((()=>{vt(),Zc(),Ph={left:{textAlign:`center`,textBaseline:`bottom`},right:{textAlign:`center`,textBaseline:`bottom`},radius:{},angle:{}},Fh=e=>e===`band`||e===`ordinal`||e===`point`})))()}var Lh;function Rh(){return(Rh=e((()=>{Jd(),Lh=class extends qd{constructor(e){super(),this.component=e}releaseAll(){super.releaseAll(),this.component=null}}})))()}var zh,Bh,Vh,Hh,Uh,Wh,Gh,Kh,qh,Jh,Yh;function Xh(){return(Xh=e((()=>{uc(),zh=`${W}_ARC_TRANSFORM_VALUE`,Bh=`${W}_ARC_RATIO`,Vh=`${W}_ARC_START_ANGLE`,Hh=`${W}_ARC_END_ANGLE`,Uh=`${W}_ARC_K`,Wh=`${W}_ARC_MIDDLE_ANGLE`,Gh=`${W}_ARC_QUADRANT`,Kh=`${W}_ARC_RADIAN`,qh=-Math.PI/2,Jh=3*Math.PI/2,Yh=.6})))()}var Zh,Qh;function $h(){return($h=e((()=>{o(),Ge(),te(),tp(),_i(),Zh=(e,t,n,r)=>{let i=e();if(ft(i))return i;if(M(i))return i(t(),n());let a=t();if(i===`auto`&&a.width>0&&a.height>0){let{startAngle:e=0,endAngle:t=2*Math.PI}=r();return Qe(a,n(),e,t)}return Math.min(a.width/2,a.height/2)},Qh=(e,t,n)=>{let r=(t===`band`?Qf(`axisBand`,n):t===`linear`?Qf(`axisLinear`,n):{})??{},i=Qf(e===`angle`?`axisAngle`:`axisRadius`,n);return R({},Qf(`axis`,n),r,i)}})))()}function eg(e,t){let{x1:n,y1:r,x2:i,y2:a}=t,{x1:o,y1:s,x2:c,y2:l}=e.AABBBounds,{dx:u=0,dy:d=0}=e.attribute,f=0,p=0;o<n&&(f=n-o),s<r&&(p=r-s),c>i&&(f=i-c),l>a&&(p=a-l),f&&e.setAttribute(`dx`,f+u),p&&e.setAttribute(`dy`,p+d)}function tg(e,t,n,r){for(let i=0,a=e.length;i<a;i++){let a=e[i];if(a){let e=a[n],i=a[r||n];if(Math.min(e,i)<=t&&Math.max(e,i)>=t)return a}}return null}var ng,rg;function ig(){return(ig=e((()=>{S(),v(),km(),Ke(),tp(),V(),Ih(),_i(),ng=(e,t)=>{let n=T(t.axes??[]),{bandField:r,linearField:i,xField:a,yField:o,trigger:s,triggerOff:c}=Qf(B.crosshair,e)??{},l=n.find((e=>$(e.orient))),u;u=h(l)?R({},Fh(l.type)?r:i,a):a;let d=n.find((e=>xm(e.orient))),f;return f=h(d)?R({},St(d.type)?r:i,o):o,{xField:u,yField:f,trigger:s,triggerOff:c}},rg=(e,t)=>{let n=T(t.axes??[]),{bandField:r,linearField:i,categoryField:a,valueField:o,trigger:s,triggerOff:c}=Qf(B.crosshair,e)??{},l=n.find((e=>e.orient===`angle`)),u;u=h(l)?R({},Fh(l.type)?r:i,a):a;let d=n.find((e=>e.orient===`radius`)),f;return f=h(d)?R({},St(d.type)?r:i,o):o,{categoryField:u,valueField:f,trigger:s,triggerOff:c}}})))()}function ag(e,t,n,r){switch(e){case B.cartesianBandAxis:return Om(wm(n,[`z`]),`band`,t);case B.cartesianLinearAxis:return Om(wm(n,[`z`]),`linear`,t);case B.cartesianLogAxis:return Om(wm(n,[`z`]),`log`,t);case B.cartesianSymlogAxis:return Om(wm(n,[`z`]),`symlog`,t);case B.cartesianAxis:case B.cartesianTimeAxis:return Om(wm(n),void 0,t);case B.polarBandAxis:return Qh(n.orient,`band`,t);case B.polarLinearAxis:return Qh(n.orient,`linear`,t);case B.polarAxis:return Qh(n.orient,void 0,t);case B.cartesianCrosshair:return ng(t,r);case B.polarCrosshair:return rg(t,r);case B.colorLegend:case B.sizeLegend:case B.discreteLegend:case B.dataZoom:case B.scrollBar:return og(n,Qf(e,t));default:return Qf(e,t)}}var og;function sg(){return(sg=e((()=>{km(),$h(),ig(),V(),tp(),_i(),og=(e,t)=>{let n=t[Tm(e.orient??t.orient)],r=R({},t,n);return delete r.horizontal,delete r.vertical,r}})))()}var cg;function lg(){return(lg=e((()=>{Tu(),cs(),sg(),cg=class extends wu{getTheme(e,t){return ag(this.type,this._option.getTheme,e,t)}_mergeThemeToSpec(e,t){let{spec:n,theme:r}=super._mergeThemeToSpec(e,t);return this._adjustPadding(n),{spec:n,theme:r}}_adjustPadding(e){let{padding:t,noOuterPadding:n=!0,orient:r}=e;n&&t&&r&&(e.padding=Object.assign(Object.assign({},as(t)),{[r]:0}))}}})))()}var ug,dg;function fg(){return(fg=e((()=>{pr(),Rh(),Ce(),Y(),Mu(),lg(),Hf(),ug=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`){var i=0;for(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},dg=class extends ju{constructor(){super(...arguments),this.name=`component`,this.modelType=`component`,this.transformerConstructor=cg,this._forceReleaseVRenderComponents=!1,this._delegateEvent=(e,t,n,r=null,i=null)=>{t instanceof ar||this.event.emit(n,{model:this,node:e,event:t,item:r,datum:i,source:q.chart,chart:(this._option?.globalInstance)?.getChart()},`model`)}}static createComponent(e,t){let{spec:n}=e,r=ug(e,[`spec`]);return new this(n,Object.assign(Object.assign({},t),r))}getRegions(){return this._regions}created(){super.created(),this.initLayout(),this.pluginService=new Lh(this)}initLayout(){super.initLayout(),this._regions=this._regions??this._option.getRegionsInIndex(),this._layout&&(this._layout.layoutBindRegionID=this._regions.map((e=>e?.id)))}_getNeedClearVRenderComponents(){return[]}getVRenderComponents(){return this._getNeedClearVRenderComponents()}callPlugin(e){this.pluginService&&this.pluginService.getAll().forEach((t=>e(t)))}getContainer(){return this._container||=this._option?.globalInstance.getStage().find((e=>e.name===`root`),!0),this._container}_compareSpec(e,t){let n=super._compareSpec(e,t);return n.reMake||=[`seriesId`,`seriesIndex`,`regionId`,`regionIndex`].some((n=>!O(t?.[n],e[n]))),t?.visible!==e.visible&&(n.reCompile=!0),n}beforeRelease(){super.beforeRelease(),this._forceReleaseVRenderComponents=!0,this._forceReleaseExitingVRenderComponents()}release(){var e;this._shouldReleaseVRenderComponentsImmediately()&&this._forceReleaseExitingVRenderComponents(),this.clear(),super.release(),(e=this.pluginService)==null||e.releaseAll(),this.pluginService=null}_shouldReleaseVRenderComponentsImmediately(){return this._forceReleaseVRenderComponents}_forceReleaseExitingVRenderComponents(){var e;(e=this._exitingVRenderComponents)!=null&&e.size&&(this._exitingVRenderComponents.forEach((e=>{var t,n;zf(e),(n=(t=this._option?.globalInstance)?._unregisterExitingVRenderComponent)==null||n.call(t,e)})),this._exitingVRenderComponents.clear())}_releaseVRenderComponent(e){if(this._shouldReleaseVRenderComponentsImmediately())zf(e);else{let t=Bf(e);Vf(e,{enableExitAnimation:!0,removeFromParent:!0,onComplete:()=>{t.forEach((e=>{var t,n,r;(t=this._exitingVRenderComponents)==null||t.delete(e),(r=(n=this._option?.globalInstance)?._unregisterExitingVRenderComponent)==null||r.call(n,e)}))}})&&(this._exitingVRenderComponents=this._exitingVRenderComponents??/* @__PURE__ */ new Set,t.forEach((e=>{var t,n;this._exitingVRenderComponents.add(e),(n=(t=this._option?.globalInstance)?._registerExitingVRenderComponent)==null||n.call(t,e)})))}}clear(){var e;let t=this._getNeedClearVRenderComponents();t&&t.length&&t.forEach((e=>{e&&this._releaseVRenderComponent(e)})),this._container=null,(e=this.pluginService)==null||e.clearAll()}compile(){this.compileMarks(),this.reAppendComponents()}compileMarks(e){this.getMarks().forEach((t=>{t.compile({group:e,context:{model:this}})}))}reAppendComponents(){let e=this._getNeedClearVRenderComponents();e&&e.length&&e.forEach((e=>{var t;e&&!e.stage&&((t=this.getContainer())==null||t.appendChild(e))}))}getBoundsInRect(e,t){return{x1:0,x2:0,y1:0,y2:0}}getDatum(e){}},dg.transformerConstructor=cg})))()}var pg,mg;function hg(){return(hg=e((()=>{(function(e){e.lineAxis=`lineAxis`,e.circleAxis=`circleAxis`})(pg||={}),(function(e){e.lineAxisGrid=`lineAxisGrid`,e.circleAxisGrid=`circleAxisGrid`})(mg||={})})))()}var gg,_g;function vg(){return(vg=e((()=>{U(),Id(),E(),Y(),Hf(),gg=class extends Fd{constructor(e,t){super(e,t),this.type=`component`,this._componentType=t.componentType,this._mode=t.mode}_getDefaultStyle(){return{}}getComponent(){return this._component}_clearExitingComponent(e){this._exitingComponent===e&&(this._unregisterExitingComponent(e),this._exitingComponent=void 0,this._exitingProduct=void 0)}_removeProductAfterExit(e,t){t.parent&&t.parent.removeChild(t,!0),this._product===t&&(this._product=null,this._compiledProductId=null),this._clearExitingComponent(e)}_registerExitingComponent(e){var t,n,r;(r=(n=((t=this.model)?.getOption)?.call(t)?.globalInstance)?._registerExitingVRenderComponent)==null||r.call(n,e)}_unregisterExitingComponent(e){var t,n,r;(r=(n=((t=this.model)?.getOption)?.call(t)?.globalInstance)?._unregisterExitingVRenderComponent)==null||r.call(n,e)}_releaseComponentWithExitAnimation(e,t){var n;let r=this._product;if(!e||((n=this.model)?._shouldReleaseVRenderComponentsImmediately)?.call(n))return!1;let i=Vf(e,{enableExitAnimation:!0,removeFromParent:!0,onComplete:()=>{t&&r?this._removeProductAfterExit(e,r):this._clearExitingComponent(e)}});return i&&(this._exitingComponent=e,this._exitingProduct=t?r:void 0,this._registerExitingComponent(e)),i}clearComponent(){var e;let t=this._component;t&&(((e=this.model)?._shouldReleaseVRenderComponentsImmediately)?.call(e)?zf(t):this._releaseComponentWithExitAnimation(t,!1),this._component=null)}releaseWithExitAnimation(){let e=this._component;return!!this._releaseComponentWithExitAnimation(e,!0)&&(this._component=null,this._exitingComponent=e,!0)}forceReleaseExitAnimation(){var e;this._exitingComponent&&(zf(this._exitingComponent),this._unregisterExitingComponent(this._exitingComponent),(e=this._exitingProduct)!=null&&e.parent&&this._exitingProduct.parent.removeChild(this._exitingProduct,!0),this._exitingComponent=void 0,this._exitingProduct=void 0)}_getAttrsFromConfig(e={}){let t=super._getAttrsFromConfig(e);return N(this._markConfig.interactive)||(t.pickable=this._markConfig.interactive),e}setAttributeTransform(e){this._attributesTransform=e}renderInner(){let e=this._simpleStyle??this.getAttributesOfState({}),t=this._getAttrsFromConfig(e);this._attributesTransform&&(t=this._attributesTransform(t)),this._animationConfig&&(t=Object.assign(Object.assign({},t),{animation:!0,animationAppear:this._animationConfig.appear?Array.isArray(this._animationConfig.appear)?this._animationConfig.appear[0]:this._animationConfig.appear:void 0,animationEnter:this._animationConfig.enter?Array.isArray(this._animationConfig.enter)?this._animationConfig.enter[0]:this._animationConfig.enter:void 0,animationUpdate:this._animationConfig.update?Array.isArray(this._animationConfig.update)?this._animationConfig.update[0]:this._animationConfig.update:void 0,animationExit:this._animationConfig.exit?Array.isArray(this._animationConfig.exit)?this._animationConfig.exit[0]:this._animationConfig.exit:void 0})),this._component?(this._component.setAttributes(t),this._product&&this._component.parent!==this._product&&this._product.appendChild(this._component)):(this._component=H.createGraphicComponent(this._componentType,t,{mode:this._mode,skipDefault:this._markConfig.skipTheme}),this._component&&this._product.appendChild(this._component)),this._component&&(this._component.context=this._getCommonContext()),this._markConfig.support3d&&this._product&&this._product.setMode(`3d`),this.model.event.emit(ol.AFTER_ELEMENT_ENCODE,{mark:this,model:this.model}),this.needClear=!0}release(){var e;((e=this.model)?._shouldReleaseVRenderComponentsImmediately)?.call(e)?(this.forceReleaseExitAnimation(),super.release(),this.removeProduct(!0)):this._exitingComponent?(this._releaseComponentWithExitAnimation(this._exitingComponent,!0)||this.removeProduct(!0),super.release()):this.releaseWithExitAnimation()?super.release():(super.release(),this.removeProduct(!0))}},gg.type=`component`,_g=()=>{H.registerMark(gg.type,gg)}})))()}var yg;function bg(){return(bg=e((()=>{yg=e=>e})))()}var xg,Sg,Cg,wg;function Tg(){return(Tg=e((()=>{Ke(),fg(),bd(),hg(),V(),xo(),_i(),Y(),vu(),tm(),b(),Ce(),S(),vt(),j(),o(),E(),v(),te(),Ih(),Zc(),Et(),vg(),U(),Nt(),bg(),tp(),oc(),xg=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`){var i=0;for(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},Sg={grid:!0,subGrid:!0,tick:!0,subTick:!0,label:!0,domainLine:!0,title:!0,maxWidth:!0,minWidth:!0,maxHeight:!0,minHeight:!0},Cg=class extends dg{getOrient(){return this._orient}getScale(){return this._scale}getScales(){return this._scales}getTickData(e=0){return this._tickData[e]}getVisible(){return this._visible}get visible(){return this._visible}getInverse(){return this._inverse}getCoordinateType(){return this._coordinateType}constructor(e,t){var n,r;super(e,t),this.specKey=`axes`,this._scales=[],this._tickData=[],this._visible=!0,this._specVisible=!0,this._hideWhenEmpty=!1,this._tick=void 0,this._onTickDataChange=e=>{this._forceLayout(),e?.updateData()},this._specVisible=(n=e.visible)==null||n,this._hideWhenEmpty=(r=e.hideWhenEmpty)!=null&&r,this._visible=this._specVisible,this._coordinateType=`none`}setAttrFromSpec(){var e,t;super.setAttrFromSpec(),this._specVisible=(e=this._spec.visible)==null||e,this._hideWhenEmpty=(t=this._spec.hideWhenEmpty)!=null&&t,this._visible=this._specVisible,this._scale&&this._refreshVisibilityByData()}getVRenderComponents(){return[this._axisMark?.getProduct(),this._gridMark?.getProduct()].filter(h)}created(){if(super.created(),this.setSeriesAndRegionsFromSpec(),this.initEvent(),this.initScales(),this.updateSeriesScale(),this._refreshVisibilityByData(),this._shouldComputeTickData()&&this._initData(),this._specVisible){let e=this._createMark({type:`component`,name:`axis-${this.getOrient()}`},{componentType:this.getOrient()===`angle`?pg.circleAxis:pg.lineAxis,mode:this._spec.mode},{skipTheme:!0});if(this._updateTickDataMarks(e),this._axisMark=e,e.setMarkConfig({zIndex:this.layoutZIndex}),h(this._spec.id)&&e.setUserId(this._spec.id),e.setMarkConfig({interactive:this._spec.interactive??this.getDefaultInteractive()}),this._marks.addMark(e),this._spec.grid?.visible){let e=this._createMark({type:`component`,name:`axis-${this.getOrient()}-grid`},{componentType:this.getOrient()===`angle`?mg.circleAxisGrid:mg.lineAxisGrid,mode:this._spec.mode},{skipTheme:!0});this._updateTickDataMarks(e),e.setMarkConfig({zIndex:this._spec.grid?.style?.zIndex??this._spec.grid?.zIndex??gu.Axis_Grid,interactive:!1}),this._marks.addMark(e),this._gridMark=e}if(this._syncComponentVisibility(),this._option.globalInstance?.isAnimationEnable()&&!1!==Ve(this._option.getChart().getSpec(),`animation`)&&!0===this._spec.animation){let e=Wp(H.getAnimationInKey(`axis`)?.(),{appear:this._spec.animationAppear??Ve(this._option.getChart().getSpec(),`animationAppear.axis`)??Ve(this._option.getChart().getSpec(),`animationAppear`),disappear:this._spec.animationDisappear??Ve(this._option.getChart().getSpec(),`animationDisappear.axis`)??Ve(this._option.getChart().getSpec(),`animationDisappear`),enter:this._spec.animationEnter??Ve(this._option.getChart().getSpec(),`animationEnter.axis`)??Ve(this._option.getChart().getSpec(),`animationEnter`),exit:this._spec.animationExit??Ve(this._option.getChart().getSpec(),`animationExit.axis`)??Ve(this._option.getChart().getSpec(),`animationExit`),update:this._spec.animationUpdate??Ve(this._option.getChart().getSpec(),`animationUpdate.axis`)??Ve(this._option.getChart().getSpec(),`animationUpdate`)});e.enter&&(e.update[0].customParameters={enter:e.enter[0]}),this._marks.forEach((t=>t.setAnimationConfig(e)))}}}_shouldComputeTickData(){return this.getVisible()||this._spec.forceInitTick||this._specVisible&&this._hideWhenEmpty}_initData(){let e=this._initTickDataSet(this._tickTransformOption()),t=new yd(this._option,e);this._tickData=[t],e.target.addListener(`change`,(()=>{this._onTickDataChange(t)}))}collectData(e,t){let n=[];return this._regions&&vo(this._regions,(r=>{let i=this.collectSeriesField(e,r);if(i=A(i)?k(this._scale.type)?i:[i[0]]:[i],e||(this._dataFieldText=r.getFieldAlias(i[0])),i){let e=r.getViewData();if(t)i.forEach((e=>{n.push(r.getRawDataStatisticsByField(e,!!k(this._scale.type)))}));else if(e&&e.latestData&&e.latestData.length){let t=r.getViewDataStatistics?.call(r),a=this.type===B.cartesianLinearAxis&&this._spec.breaks&&this._spec.breaks.length;i.forEach((r=>{var i;(i=t?.latestData)!=null&&i[r]&&(a?n.push(Object.assign(Object.assign({},t.latestData[r]),{values:e.latestData.map((e=>e[r]))})):n.push(t.latestData[r]))}))}}}),{userId:this._seriesUserId,specIndex:this._seriesIndex}),n}isSeriesDataEnable(){let e=!0;return vo(this._regions,(t=>{A(t.getViewDataStatistics()?.latestData)&&(e=!1)}),{userId:this._seriesUserId,specIndex:this._seriesIndex}),e}setSeriesAndRegionsFromSpec(){let{seriesId:e,seriesIndex:t,regionId:n,regionIndex:r}=this._spec;h(e)&&(this._seriesUserId=T(e)),h(n)&&(this._regionUserId=T(n)),h(t)&&(this._seriesIndex=T(t)),h(r)&&(this._regionIndex=T(r)),this._regions=this._option.getRegionsInUserIdOrIndex(this._regionUserId,this._regionIndex),this.layout.layoutBindRegionID=this._regions.map((e=>e.id))}getBindSeriesFilter(){return{userId:this._seriesUserId,specIndex:this._seriesIndex}}initEvent(){this.event.on(K.scaleUpdate,{filter:({model:e})=>e?.id===this.id},this.effect.scaleUpdate.bind(this));let e=yo(this._regions,{userId:this._seriesUserId,specIndex:this._seriesIndex}).map((e=>e.getViewDataStatistics())).filter((e=>!!e));e.length>1?this._option.dataSet.multipleDataViewAddListener(e,`change`,(()=>{this.updateScaleDomain()})):e.length===1&&e[0].target.addListener(`change`,(()=>{this.updateScaleDomain()})),vo(this._regions,(e=>{e.event.on(K.rawDataUpdate,{filter:({model:t})=>t?.id===e.id},(()=>{this._clearRawDomain()}))}),{userId:this._seriesUserId,specIndex:this._seriesIndex})}updateScaleDomain(){}_hasCollectedSeriesData(){return this.collectData(0).length>0}_refreshVisibilityByData(){let e=this._specVisible&&(!this._hideWhenEmpty||this._hasCollectedSeriesData()),t=this._visible!==e;return this._visible=e,(this._axisMark||this._gridMark)&&this._syncComponentVisibility(),t&&this._forceLayout(),t}_syncComponentVisibility(){var e,t,n,r,i,a,o,s;(e=this._axisMark)==null||e.setVisible(this._visible),(t=this._gridMark)==null||t.setVisible(this._visible&&!1!==this._spec.grid?.visible),(i=(r=((n=this._axisMark)?.getComponent)?.call(n))?.setAttributes)==null||i.call(r,{visibleAll:this._visible}),(s=(o=((a=this._gridMark)?.getComponent)?.call(a))?.setAttributes)==null||s.call(o,{visibleAll:this._visible&&!1!==this._spec.grid?.visible})}_clearRawDomain(){}onLayoutEnd(){this.updateScaleRange(),this.event.emit(K.scaleUpdate,{model:this,value:`range`}),super.onLayoutEnd()}computeData(e){e!==`force`||this._tickData&&this._tickData.length?!this._tickData||!this._tickData.length||e!==`force`&&O(this._scale.range(),[0,1])||this._tickData.forEach((e=>{e.getDataView().reRunAllTransform({skipEqual:!0})})):vo(this._regions,(e=>{var t;(t=e.getViewData())==null||t.reRunAllTransform()}),{userId:this._seriesUserId,specIndex:this._seriesIndex})}_updateTickDataMarks(e){this._tickData&&this._tickData.forEach((t=>{t.addRelatedMark(e)}))}initScales(){this._scales=[this._scale];let e=[];if(vo(this._regions,(t=>{let n=t.getGroups();n&&e.push(n)}),{userId:this._seriesUserId,specIndex:this._seriesIndex}),e.length!==0){let t=ge(e.map((e=>e.fields.length)));for(let e=1;e<t;e++){let e=this._scale.clone();this._scales.push(e)}}}_compareSpec(e,t){let n=super._compareSpec(e,t);if(n.reMake)return n;let r=!O(t,e);return n.reRender=!0,t?.type!==e?.type||t?.visible!==e?.visible?(n.reMake=!0,n):!0!==e?.grid?.visible||!0===t?.grid?.visible||this._gridMark?(r&&!n.reMake&&this._isComponentOnlySpecChange(e,t)&&(n.effects=Object.assign(Object.assign({},n.effects),{component:!0,layout:!0,render:!0})),n):(n.reMake=!0,n)}_isComponentOnlySpecChange(e,t){return Object.keys(Object.assign(Object.assign({},t),e)).every((n=>O(t?.[n],e?.[n])||Sg[n]))}_getAxisAttributes(){let e=this._spec,t={orient:this.getOrient(),select:!0!==this._option.disableTriggerEvent&&e.select,hover:!0!==this._option.disableTriggerEvent&&e.hover};if(t.line=e.domainLine&&e.domainLine.visible?Oh(e.domainLine):{visible:!1},e.label&&e.label.visible?(t.label=ae(e.label,[`style`,`formatMethod`,`state`]),e.label.style&&(t.label.style=M(e.label.style)?(t,n,r,i)=>{let a=e.label.style(t.rawValue,n,t,r,i);return G(R({},this._theme.label?.style,a))}:G(e.label.style)),(e.label.formatMethod||e.label.formatter)&&(t.label.formatMethod=this._getLabelFormatMethod()),e.label.state&&(t.label.state=Yc(e.label.state)),M(e.label.dataFilter)&&(t.label.dataFilter=(t,n)=>e.label.dataFilter(t,n,{vchart:this._option.globalInstance}))):t.label={visible:!1},e.tick&&e.tick.visible?(t.tick={visible:e.tick.visible,length:e.tick.tickSize,inside:e.tick.inside,alignWithLabel:e.tick.alignWithLabel,dataFilter:M(e.tick.dataFilter)?t=>e.tick.dataFilter(t,{vchart:this._option.globalInstance}):void 0},e.tick.style&&(t.tick.style=M(e.tick.style)?(t,n,r,i)=>{let a=e.tick.style(t,n,r,i);return G(R({},this._theme.tick?.style,a))}:G(e.tick.style)),e.tick.state&&(t.tick.state=Jc(e.tick.state))):t.tick={visible:!1},e.subTick&&e.subTick.visible?(t.subTick={visible:e.subTick.visible,length:e.subTick.tickSize,inside:e.subTick.inside,count:e.subTick.tickCount},e.subTick.style&&(t.subTick.style=M(e.subTick.style)?(t,n,r,i)=>{let a=e.subTick.style(t,n,r,i);return G(R({},this._theme.subTick?.style,a))}:G(e.subTick.style)),e.subTick.state&&(t.subTick.state=Jc(e.subTick.state))):t.subTick={visible:!1},e.title&&e.title.visible){let n=e.title,{autoRotate:r,angle:i,style:a={},background:o,state:s,shape:c}=n,l=xg(n,[`autoRotate`,`angle`,`style`,`background`,`state`,`shape`]),u,d=i;e.orient!==`left`&&e.orient!==`right`||r&&N(d)&&(d=e.orient===`left`?-90:90,u=Ph[e.orient]),t.title=Object.assign(Object.assign({},l),{autoRotate:!1,angle:d?me(d):null,textStyle:R({},u,G(a)),pickable:!1!==a.pickable,childrenPickable:!1!==a.pickable,state:{}}),c&&c.visible?(t.title.shape=Object.assign(Object.assign({},c),{style:G(c.style)}),c.state&&(t.title.state.shape=Jc(c.state))):t.title.shape={visible:!1},o&&o.visible?(t.title.background=Object.assign(Object.assign({},o),{style:G(o.style)}),o.state&&(t.title.state.background=Jc(o.state))):t.title.background={visible:!1},s&&(t.title.state.text=Jc(s))}else t.title={visible:!1};return e.background&&e.background.visible?(t.panel={visible:!0},e.background.style&&(t.panel.style=G(e.background.style)),e.background.state&&(t.panel.state=Jc(e.background.state))):t.panel={visible:!1},t}_getGridAttributes(){let e=this._spec;return{alternateColor:ac(e.grid.alternateColor),alignWithLabel:e.grid.alignWithLabel,style:M(e.grid.style)?(t,n)=>{let r=e.grid.style(t.datum?.rawValue,n,t.datum);return G(R({},this._theme.grid?.style,r))}:G(e.grid.style),subGrid:!1===e.subGrid.visible?{visible:!1}:{type:`line`,visible:e.subGrid.visible,alternateColor:ac(e.subGrid.alternateColor),style:G(e.subGrid.style)}}}_getLabelFormatMethod(){let{formatMethod:e,formatter:t}=this._spec.label,{formatFunc:n}=$f(e,t);return n?(e,r,i)=>n(r.rawValue,r,t):null}_initTickDataSet(e,t=0){ml(this._option.dataSet,`scale`,yg);let n=this.registerTicksTransform();return new Ne(this._option.dataSet,{name:`${this.type}_${this.id}_ticks_${t}`}).parse(this._scales[t],{type:`scale`}).transform({type:n,options:e},!1)}_tickTransformOption(){let e=this._tick||{},t=this._spec.label||{},{tickCount:n,forceTickCount:r,tickStep:i,tickMode:a}=e,{style:o,formatMethod:s,minGap:c}=t;return{sampling:!1!==this._spec.sampling,tickCount:n,forceTickCount:r,tickStep:i,tickMode:a,axisOrientType:this._orient,coordinateType:this._coordinateType,labelStyle:G(o),labelFormatter:s,labelGap:c}}addTransformToTickData(e,t){this._tickData.forEach((n=>{var r;(r=n?.getDataView())==null||r.transform(e,t)}))}dataToPosition(e){return this._scale.scale(e)}getDatum(e){return e&&e.name===Un.label?e.data:this._axisMark?this._axisMark.getComponent()?.attribute.items:void 0}scaleRangeFactor(e,t,n){return this._onTickDataChange(this.getTickData()),this.getScale().rangeFactor(e,t,n)}scaleRangeFactorEnd(e,t,n){return this._onTickDataChange(this.getTickData()),this.getScale().rangeFactorEnd(e,t)}scaleRangeFactorStart(e,t,n){return this._onTickDataChange(this.getTickData()),this.getScale().rangeFactorStart(e,t)}},Cg.specKey=`axes`,wg=()=>{_g(),H.registerAnimation(`axis`,(()=>({appear:{type:`fadeIn`},enter:{type:`fadeIn`},update:{type:`update`},exit:{type:`fadeOut`}})))}})))()}var Eg;function Dg(){return(Dg=e((()=>{Eg=e=>{let{x:t,y:n}=e[0].getLayoutStartPoint(),r=t+e[0].getLayoutRect().width,i=n+e[0].getLayoutRect().height;for(let a=1;a<e.length;a++){let o=e[a],{x:s,y:c}=o.getLayoutStartPoint(),{width:l,height:u}=o.getLayoutRect();t=Math.min(t,s),r=Math.max(r,l+s),n=Math.min(n,c),i=Math.max(i,u+c)}let a=Math.abs(i-n);return{width:Math.abs(r-t),height:a}}})))()}var Og,kg,Ag;function jg(){return(jg=e((()=>{S(),xt(),_i(),j(),v(),Re(),xo(),E(),Fe(),cs(),Dt(),Ke(),U(),km(),Y(),vu(),Dh(),V(),Do(),Ih(),Tg(),Pa(),Dg(),Og=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`){var i=0;for(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},kg=[Eh],Ag=class extends Cg{getOrient(){return this._orient}getDefaultInteractive(){return!0}set autoIndentOnce(e){this._autoIndentOnce=e}getScales(){return this._scales}getInnerOffset(){return this._innerOffset}constructor(e,t){super(e,t),this.type=B.cartesianAxis,this.name=B.cartesianAxis,this._defaultBandPosition=.5,this._defaultBandInnerPadding=.1,this._defaultBandOuterPadding=.3,this.layoutType=`region-relative`,this.layoutZIndex=gu.Axis,this.layoutLevel=_u.Axis,this._orient=`left`,this._autoIndentOnce=!1,this._hasAutoIndent=!1,this._scales=[],this._tick=void 0,this._layoutCache={width:0,height:0,_lastComputeOutBounds:{x1:0,x2:0,y1:0,y2:0}},this._innerOffset={top:0,bottom:0,left:0,right:0},this.effect={scaleUpdate:e=>{this.computeData(e?.value),vo(this._regions,(e=>{let t=this.getOrient();$(t)?Nh(e.getXAxisHelper(),this.axisHelper(),h(this._seriesUserId)||h(this._seriesIndex))&&e.setXAxisHelper(this.axisHelper()):xm(t)?Nh(e.getYAxisHelper(),this.axisHelper(),h(this._seriesUserId)||h(this._seriesIndex))&&e.setYAxisHelper(this.axisHelper()):Sm(t)&&Nh(e.getZAxisHelper(),this.axisHelper(),h(this._seriesUserId)||h(this._seriesIndex))&&e.setZAxisHelper(this.axisHelper())}),{userId:this._seriesUserId,specIndex:this._seriesIndex})}},this._clearContinuousBarBandwidthCache=()=>{this._continuousBarBandwidthCache=void 0},this._transformLayoutPosition=e=>{let{x:t,y:n}=e;return P(t)&&(t+=Number(this._orient===`left`)*this.getLayoutRect().width),P(n)&&(n+=Number(this._orient===`top`)*this.getLayoutRect().height),{x:t,y:n}},this._transformLayoutRect=e=>{if(!this._visible)return e;let t=this._latestBounds.clone().translate(-this.getLayoutStartPoint().x,-this.getLayoutStartPoint().y);switch(this._layout.layoutOrient){case`left`:this._layout.layoutRectLevelMap.width===0&&(e.width=t.x1<0?-t.x1:0);break;case`right`:this._layout.layoutRectLevelMap.width===0&&(e.width=t.x2>0?t.x2:0);break;case`top`:this._layout.layoutRectLevelMap.height===0&&(e.height=t.y1<0?-t.y1:0);break;case`bottom`:this._layout.layoutRectLevelMap.height===0&&(e.height=t.y2>0?t.y2:0)}return e.width=Math.ceil(e.width),e.height=Math.ceil(e.height),this._layout.setRectInSpec(this._layoutCacheProcessing(e))},this._transformLayoutPadding=e=>(this.layoutOrient===`left`||this.layoutOrient===`right`?(e.top=0,e.bottom=0):this.layoutOrient!==`top`&&this.layoutOrient!==`bottom`||(e.left=0,e.right=0),e),this._updateAxisLayout=()=>{if(!this._visible)return void this._syncComponentVisibility();let e=this.getLayoutStartPoint(),t=this._getUpdateAttribute(!1),{grid:n}=t,r=Og(t,[`grid`]),i=R({x:e.x,y:e.y},this._axisStyle,r);this._axisMark.setSimpleStyle(i),this._gridMark&&this._gridMark.setSimpleStyle(R({x:e.x,y:e.y},this._getGridAttributes(),n)),this._syncComponentVisibility()},this._fixAxisOnZero=()=>{let{onZero:e,visible:t}=this._spec.domainLine;if(this.visible&&e&&!1!==t){let{onZeroAxisId:e,onZeroAxisIndex:t}=this._spec.domainLine,n=this._option.getComponentsByKey(`axes`),r=$(this.getOrient()),i=e=>(r?!$(e.getOrient()):$(e.getOrient()))&&k(e.getScale().type)&&(e.getTickData()?e.getTickData().getLatestData()?.find((e=>e.value===0)):e.getScale().domain()[0]<=0&&w(e.getScale().domain())>=0),a=n.filter((e=>i(e)));if(a.length){let o;if(h(e))o=a.find((t=>t.id===e));else if(h(t)){let e=n[t];i(e)&&(o=e)}else o=a[0];if(o){let e=this._axisMark,t=o.valueToPosition(0);r?e.setSimpleStyle(Object.assign(Object.assign({},e.getSimpleStyle()),{line:Object.assign(Object.assign({},this._axisStyle.line),{dy:this._orient===`bottom`?-((o.getInverse()?o.getScale().range()[1]:o.getScale().range()[0])-t):t})})):e.setSimpleStyle(Object.assign(Object.assign({},e.getSimpleStyle()),{line:Object.assign(Object.assign({},this._axisStyle.line),{dx:this._orient===`left`?t:-((o.getInverse()?o.getScale().range()[0]:o.getScale().range()[1])-t)})}))}}}},this._orient=wm(e,[`z`]),Sm(this._orient)&&(this.layoutType=`absolute`),this._dataSet=t.dataSet,this._coordinateType=`cartesian`}static getSpecInfo(e){let t=e[this.specKey];if(!t)return null;let n=e.direction===`horizontal`;if(!A(t)){if(!jh(t))return null;let{axisType:e,componentName:r}=Dm(t,n);return t.type=e,[{spec:t,specPath:[this.specKey],specInfoPath:[`component`,this.specKey,0],type:r}]}let r=!0;if(t.filter((e=>e.orient===`z`))[0]){let e=t.filter((e=>e.orient===`bottom`))[0],n=t.filter((e=>xm(e.orient)))[0];r=t.length===3&&e&&n}let i=t.map(((e,t)=>({spec:e,index:t})));r||(i=i.filter((({spec:e})=>e.orient!==`z`)));let a=[];return i.forEach((({spec:e,index:t})=>{if(!jh(e))return;let{axisType:r,componentName:i}=Dm(e,n);e.type=r,a.push({spec:e,specPath:[this.specKey,t],specInfoPath:[`component`,this.specKey,t],type:i})})),a}static createComponent(e,t){let{spec:n}=e,r=Og(e,[`spec`]),i=H.getComponentInKey(r.type);return i?new i(n,Object.assign(Object.assign({},t),r)):(t.onError(`Component ${r.type} not found`),null)}initLayout(){super.initLayout(),this._layout.autoIndent=!1!==this._spec.autoIndent,this._layout.layoutOrient=this._orient}getNewScaleRange(){let{width:e,height:t}=this.getLayoutRect(),{left:n,right:r,top:i,bottom:a}=this._innerOffset,o=[];return $(this.getOrient())?P(e)&&(o=this._inverse?[e-r,n]:[n,e-r]):Sm(this.getOrient())?P(e)&&(o=this._inverse?[e-r,n]:[n,e-r],this._scale.range(o)):P(t)&&(o=this._inverse?[i,t-a]:[t-a,i]),o}updateScaleRange(){let e=!1,t=this.getNewScaleRange(),n=this._scale.range();return t.length===n.length&&t.every(((e,t)=>e===n[t]))?e=!1:(e=!0,this._scale.range(t)),e}init(e){var t;super.init(e),(t=this.pluginService)==null||t.load(kg.map((e=>new e))),this.callPlugin((e=>{this.pluginService&&e.onInit&&e.onInit(this.pluginService,this)}))}setAttrFromSpec(){if(super.setAttrFromSpec(),this._specVisible){$(this.getOrient())?Ot(this._spec.maxHeight)&&(this._spec.maxHeight=`30%`):Ot(this._spec.maxWidth)&&(this._spec.maxWidth=`30%`);let e=this._getAxisAttributes();e.label.formatMethod=this._getLabelFormatMethod(),e.verticalFactor=this.getOrient()===`top`||this.getOrient()===`right`?-1:1,this._axisStyle=e}this._tick=this._spec.tick;let e=this._option.getChart()?.getSpec();this._inverse=Em(this._spec,e?.direction===`horizontal`)}onLayoutStart(e,t){if(super.onLayoutStart(e,t),!Sm(this.getOrient())&&this._spec.innerOffset){let e=this._spec;xm(this.getOrient())?[`top`,`bottom`].forEach((n=>{this._innerOffset[n]=ns(e.innerOffset[n],t.height,t)})):[`left`,`right`].forEach((n=>{this._innerOffset[n]=ns(e.innerOffset[n],t.width,t)}))}}getSeriesStatisticsField(e){let t;return t=$(this.getOrient())?e.fieldX:Sm(this.getOrient())?e.fieldZ:e.fieldY,k(this._scale.type)?t:[t[0]]}_tickTransformOption(){return Object.assign(Object.assign({},super._tickTransformOption()),{noDecimals:this._tick?.noDecimals,labelLastVisible:this._spec.label?.lastVisible,labelFirstVisible:this._spec.label?.firstVisible,labelFlush:this._spec.label?.flush})}axisHelper(){return{isContinuous:k(this._scale.type),dataToPosition:this.dataToPosition.bind(this),getScale:(e=0)=>this._scales[e],getBandwidth:(e=0)=>this._getContinuousBarBandwidth(e),getAxisType:()=>this.type,getAxisId:()=>this.id,isInverse:()=>!0===this._inverse,getSpec:()=>this._spec}}_getContinuousBarBandwidth(e=0){if(e!==0||!k(this._scale.type))return;let t=this._scales[0],n=t.domain(),r=t.range(),i=+n?.[0],a=+n?.[n.length-1],o=+r?.[0],s=+r?.[r.length-1];if(!(Number.isFinite(i)&&Number.isFinite(a)&&Number.isFinite(o)&&Number.isFinite(s)&&i!==a))return;let c=this._continuousBarBandwidthCache;if(c&&c.scale===t&&c.domainStart===i&&c.domainEnd===a&&c.rangeStart===o&&c.rangeEnd===s)return c.bandWidth;let l=/* @__PURE__ */ new Set,u=this.getOrient();vo(this._regions,(e=>{if(e.type!==To.bar)return;let t=e,n=$(u)&&t.direction===`vertical`?t.fieldX[0]:xm(u)&&t.direction===`horizontal`?t.fieldY[0]:void 0;(n?e.getViewDataStatistics?.call(e)?.latestData?.[n]?.values:void 0)?.forEach((e=>{let t=+e;Number.isFinite(t)&&l.add(t)}))}),{userId:this._seriesUserId,specIndex:this._seriesIndex});let d=Array.from(l).sort(((e,t)=>e-t));if(d.length<2)return;let f=1/0,p=d[0];for(let e=1;e<d.length;e++){let t=d[e],n=t-p;n>0&&n<f&&(f=n),p=t}let m=f<1/0?Math.abs((s-o)/(a-i)*f):void 0;return Number.isFinite(m)?(this._continuousBarBandwidthCache={scale:t,domainStart:i,domainEnd:a,rangeStart:o,rangeEnd:s,bandWidth:m},m):void 0}afterCompile(){var e;(e=this._axisMark)!=null&&e.getProduct()&&this.event.on(ol.AFTER_ELEMENT_ENCODE,(({mark:e})=>{if(e===this._axisMark&&!1===this._isLayout&&($(this.getOrient())?this.callPlugin((e=>{this.pluginService&&e.onDidLayoutHorizontal&&e.onDidLayoutHorizontal(this.pluginService,this)})):this.callPlugin((e=>{this.pluginService&&e.onDidLayoutVertical&&e.onDidLayoutVertical(this.pluginService,this)})),this._unitText)){let{x:e,y:t}=this.getLayoutStartPoint(),n=$(this._orient)?{x:ge(this._scale.range())+e,y:t}:{x:e,y:jt(this._scale.range())+t};this._unitText.setAttributes(n)}})),this.callPlugin((e=>{this.pluginService&&e.onDidCompile&&e.onDidCompile(this.pluginService,this)}))}collectScale(){let e=[];return vo(this._regions,(t=>{e.push(this.getOrient()===`left`||this.getOrient()===`right`?t.scaleY:t.scaleX)}),{userId:this._seriesUserId,specIndex:this._seriesIndex}),e}collectSeriesField(e,t){let n;return n=e>0?t.getGroups()?.fields?.[e]:$(this.getOrient())?t.getSpec().x2Field?[...t.fieldX,t.fieldX2]:t.fieldX:Sm(this.getOrient())?t.fieldZ:t.getSpec().y2Field?[...t.fieldY,t.fieldY2]:t.fieldY,n}updateSeriesScale(){let e=this.getOrient();vo(this._regions,(t=>{$(e)?Nh(t.getXAxisHelper(),this.axisHelper(),h(this._seriesUserId)||h(this._seriesIndex))&&(t.setScaleX(this._scale),t.setXAxisHelper(this.axisHelper())):xm(e)?Nh(t.getYAxisHelper(),this.axisHelper(),h(this._seriesUserId)||h(this._seriesIndex))&&(t.setScaleY(this._scale),t.setYAxisHelper(this.axisHelper())):Sm(e)&&Nh(t.getZAxisHelper(),this.axisHelper(),h(this._seriesUserId)||h(this._seriesIndex))&&(t.setScaleZ(this._scale),t.setZAxisHelper(this.axisHelper()))}),{userId:this._seriesUserId,specIndex:this._seriesIndex})}getBoundsInRect(e){let t={x1:0,y1:0,x2:0,y2:0};if(!this._visible)return t;this._verticalLimitSize=$(this.getOrient())?e.height:e.width,this.setLayoutRect(e),!this.updateScaleRange()&&A(this.getTickData()?.getLatestData())||this.computeData(`range`);let n={skipLayout:!1},r=$(this.getOrient());this.pluginService&&(r?this.callPlugin((e=>{e.onWillLayoutHorizontal&&e.onWillLayoutHorizontal(this.pluginService,n,this)})):this.callPlugin((e=>{e.onWillLayoutVertical&&e.onWillLayoutVertical(this.pluginService,n,this)})));let i=this._axisMark.getProduct(),a=!1;if(!n.skipLayout){let e=this._getUpdateAttribute(!0),n=this._axisMark.getComponent(),i=R(Object.assign({},this.getLayoutStartPoint()),this._axisStyle,e,{line:{visible:!1}}),o=n?.getBoundsWithoutRender(i);o&&!o.empty()||(o=new ze().set(i.x,i.y,i.x,i.y)),a=!0,this._latestBounds=o,t=this._appendAxisUnit(o,r)}return a||(this._latestBounds=i.AABBBounds),t}positionToData(e,t){let n=$(this.getOrient());t&&(e-=n?this.getLayoutStartPoint().x:this.getLayoutStartPoint().y),this._innerOffset&&(e=n?Pe(e,this._innerOffset.left,this.getLayoutRect().width-this._innerOffset.right):Pe(e,this._innerOffset.top,this.getLayoutRect().height-this._innerOffset.bottom));let r=this._scale.range();return(e-r[0])*(e-w(r))>0?null:this._scale.invert(e)}_getTitleLimit(e){let t=this._spec.title;if(t.visible&&N(t.style?.maxLineWidth)){let n=this._axisStyle.title?.angle??t.style?.angle??0;if(e){let e=this.getLayoutRect().width,t=Math.abs(Math.cos(n));return t<1e-6?1/0:e/t}let r=this.getLayoutRect().height,i=Math.abs(Math.sin(n));return i<1e-6?1/0:r/i}return null}_getUpdateAttribute(e){let t=0,n=0;if(!e){let e=Eg(this.getRegions());n=e.width,t=e.height}let{width:r,height:i}=this.getLayoutRect(),a=$(this._orient),o=xm(this._orient),s={x:0,y:0},c=t,l=r;a?s={x:r,y:0}:o&&(s={x:0,y:i},c=n,l=i);let u=this.getLabelItems(l),d={start:{x:0,y:0},end:s,title:{text:this._spec.title.text||this._dataFieldText,maxWidth:this._getTitleLimit(a)},items:u,scale:this._scale.clone(),maxWidth:this._layout.maxWidth,minWidth:this._layout.minWidth,width:this._spec.width?this.getLayoutRect().width:void 0};e||(d.grid={type:`line`,start:{x:0,y:0},end:s,items:u[0],verticalFactor:this._axisStyle.verticalFactor,length:c});let f=a?this.layout.minHeight:this.layout.minWidth;return(a&&this._layout.layoutRectLevelMap.height===9||o&&this._layout.layoutRectLevelMap.width===9)&&(f=this._verticalLimitSize),d.verticalLimitSize=this._verticalLimitSize,d.verticalMinSize=f,d.label={overflowLimitLength:this._getLabelOverflowLimit(a)},this._afterUpdateAttribute?this._afterUpdateAttribute(d,e):d}getLabelItems(e){let t=this.getTickData()?.getLatestData();return t&&t.length?[t.map((t=>{let n=this._getNormalizedValue([t.value],e);return Mh(t.value,n)})).filter((e=>{let{value:t,rawValue:n}=e,r=this._scale.domain();return this.getSpec().type===`log`?t>=0&&t<=1:k(this._scale.type)?n>=r[0]&&n<=w(r):r.includes(n)}))]:[]}initEvent(){super.initEvent(),vo(this._regions,(e=>{var t;(t=e.getViewDataStatistics?.call(e))==null||t.target.addListener(`change`,this._clearContinuousBarBandwidthCache)}),{userId:this._seriesUserId,specIndex:this._seriesIndex}),this._specVisible&&(this.event.on(K.layoutEnd,this._updateAxisLayout),this.event.on(K.layoutEnd,this._fixAxisOnZero),this.event.on(K.layoutRectUpdate,(()=>{this._clearLayoutCache()})))}_getNormalizedValue(e,t){return t===0?0:this.dataToPosition(e)/t}_layoutCacheProcessing(e){return[`width`,`height`].forEach((t=>{e[t]<this._layoutCache[t]?e[t]=this._layoutCache[t]:this._layoutCache[t]=e[t]})),this._autoIndentOnce&&this._hasAutoIndent?[`x1`,`x2`,`y1`,`y2`].forEach((e=>{this.layout.getLastComputeOutBounds()[e]=this._layoutCache._lastComputeOutBounds[e]})):(this._hasAutoIndent=!0,[`x1`,`x2`,`y1`,`y2`].forEach((e=>{this.layout.getLastComputeOutBounds()[e]<this._layoutCache._lastComputeOutBounds[e]?this.layout.getLastComputeOutBounds()[e]=this._layoutCache._lastComputeOutBounds[e]:this._layoutCache._lastComputeOutBounds[e]=this.layout.getLastComputeOutBounds()[e]}))),e}reInit(e){super.reInit(e),this._clearLayoutCache()}_clearLayoutCache(){this._hasAutoIndent=!1,this._layoutCache.width=0,this._layoutCache.height=0,this._layoutCache._lastComputeOutBounds={x1:0,x2:0,y1:0,y2:0}}onDataUpdate(){this._clearLayoutCache()}_appendAxisUnit(e,t){var n;if(this._spec.unit&&this._spec.unit.visible){let{text:r,style:i}=this._spec.unit,a,o,{x:s,y:c}=this.getLayoutStartPoint();t?(a={x:ge(this._scale.range())+s,y:c},o={textAlign:`left`,textBaseline:`middle`}):(a={x:s,y:jt(this._scale.range())+c},o={textAlign:this._orient===`left`?`left`:`right`,textBaseline:`bottom`}),o=Object.assign(Object.assign(Object.assign({},o),i),{x:a.x,y:a.y,text:r}),this._unitText?this._unitText.setAttributes(o):(this._unitText=Jr(o),this._unitText.name=`axis-unit`,(n=this.getContainer())==null||n.add(this._unitText));let l=this._unitText.AABBBounds;t?(e.x2+=l.x2>e.x2?l.x2-e.x2:0,e.y2+=l.y2>e.y2?l.y2-e.y2:0):(e.x1+=l.x1<e.x1?l.x1-e.x1:0,e.y1+=l.y1<e.y1?l.y1-e.y1:0)}return e}_getNeedClearVRenderComponents(){return this._unitText?[this._unitText]:[]}_getLabelOverflowLimit(e){if(e&&!1!==this._spec.label?.visible&&!0===this._spec.label?.autoLimit){let e=this._option.getComponentsByKey(`axes`),t=this.getRegions(),n=e.filter((e=>{let n=e.getOrient();return(n===`left`||n===`right`)&&e.getRegions().some((e=>t.includes(e)))})),r=0,i=0,a=this.getLayoutStartPoint().x,o=a+this.getLayoutRect().width;return n.forEach((e=>{let t=e.getLayoutStartPoint().x;if(e.getOrient()===`left`&&t===a){let t=e.getLayoutRect().width;r=Math.max(r,t)}else if(t===o){let t=e.getLayoutRect().width;i=Math.max(i,t)}})),{left:r,right:i}}}},Ag.type=B.cartesianAxis,Ag.specKey=`axes`})))()}var Mg;function Ng(){return(Ng=e((()=>{S(),j(),Y(),bd(),Ih(),Mg=class{constructor(){this._rawDomainIndex=[],this._rawDomain=[]}_initData(){if(this._spec.showAllGroupLayers&&this._scales.length>1)for(let e=0;e<this._scales.length;e++){let t=(this._spec.layers??[])[this._scales.length-1-e]||{};if(!1!==t.visible&&t.tickCount!==0&&t.forceTickCount!==0){let n=this._initTickDataSet(Object.assign(Object.assign({},this._tickTransformOption()),t),e),r=new yd(this._option,n);this._tickData.push(r),n.target.addListener(`change`,(()=>{this._onTickDataChange(r)})),this._tickDataMap||={},this._tickDataMap[e]=r}}else{let e=this._initTickDataSet(this._tickTransformOption()),t=new yd(this._option,e);e.target.addListener(`change`,(()=>{this._onTickDataChange(t)})),this._tickData=[t],this._tickDataMap={0:t}}}_updateData(){let e=this.registerTicksTransform();if(this._spec.showAllGroupLayers&&this._scales.length>1){let t=this._spec.layers??[];Object.keys(this._tickDataMap).forEach((n=>{let r=t[this._scales.length-1-n]||{},i=this._tickDataMap[n]?.getDataView().transformsArr.find((t=>t.type===e));i&&(i.options=Object.assign(Object.assign({},this._tickTransformOption()),r))}))}else{let t=(this._tickData?.[0])?.getDataView().transformsArr.find((t=>t.type===e));t&&(t.options=this._tickTransformOption())}}getRawDomain(){return this._rawDomain}dataToPosition(e,t={}){if(e.length===0||this._scales.length===0)return 0;let{position:n,bandScale:r}=this.getPosition(e);return n+r.bandwidth()*(t.bandPosition??this._spec.bandPosition??this._defaultBandPosition)}valueToPosition(e){return this._scale.scale(e)}updateGroupScaleRange(){let e=this._scale;this._scales.forEach(((t,n)=>{n>0&&(t.range([0,e.bandwidth()]),e=t)}))}getPosition(e){let t=0,n=this._scale;if(this._scales.length===1||e.length===1)t=this.valueToPosition(e[0]);else{let r=Math.min(e.length,this._scales.length);for(let n=0;n<r;n++)t+=this._scales[n].scale(e[n]);n=this._scales[r-1]}return{position:t,bandScale:n}}calcScales(e,t){let{bandPadding:n,paddingInner:r,paddingOuter:i}=this._spec,a=A(n),o=A(r),s=A(i);for(let c=0;c<this._scales.length;c++){let l=a?n[c]:n,u=o?r[c]:r,d=s?i[c]:i;this._scales[c].paddingInner(u??l??e,!0).paddingOuter(d??l??t,!0)}}computeBandDomain(e){if(!e.length)return[];if(e.length===1)return e[0].values;let t=/* @__PURE__ */ new Set;for(let n=0;n<e.length;n++)for(let r=0;r<e[n].values.length;r++)t.add(e[n].values[r]);return Array.from(t)}updateScaleDomain(){var e;if(!this.isSeriesDataEnable())return;!((e=this._rawDomainIndex)!=null&&e.length)&&this._scales.length&&this._updateRawDomain();let t=this._spec.domain;for(let e=0;e<this._scales.length;e++)if(t&&t.length&&e===0)this._scales[e].domain(t);else{let t=this.collectData(e),n=this.computeBandDomain(t);this._scales[e].domain(n.sort(((t,n)=>this._rawDomainIndex[e][t]-this._rawDomainIndex[e][n])))}this.transformScaleDomain(),this._refreshVisibilityByData(),this.event.emit(K.scaleDomainUpdate,{model:this}),this.event.emit(K.scaleUpdate,{model:this,value:`domain`})}getLabelItems(e){let t=[],n=[];return(this._spec.showAllGroupLayers?this._scales:[this._scales[0]]).forEach(((r,i)=>{let a=this._tickDataMap[i],o=a?.getLatestData()?.length,s=o?a.getLatestData().map((e=>e.value)):r.domain();if(s&&s.length){if(n&&n.length){let r=[],i=[];n.forEach((t=>{s.forEach((n=>{let a=T(t).concat(n);if(i.push(a),o){let t=Mh(n,this._getNormalizedValue(a,e));r.push(t)}}))})),o&&t.push(r.filter((e=>e.value>=0&&e.value<=1))),n=i}else s.forEach((e=>{n.push(e)})),o&&t.push(a.getLatestData().map((t=>Mh(t.value,this._getNormalizedValue([t.value],e)))).filter((e=>e.value>=0&&e.value<=1)))}})),t.reverse()}_updateRawDomain(){this._rawDomainIndex=[],this._rawDomain=[];let e=this._spec.domain;for(let t=0;t<this._scales.length;t++)if(e&&e.length&&t===0)this._scales[t].domain(e);else{let e=this.collectData(t,!0),n=this.computeBandDomain(e);this._rawDomainIndex[t]={},this._rawDomain[t]=n,n.forEach(((e,n)=>this._rawDomainIndex[t][e]=n))}this.event.emit(K.scaleRawDomainUpdate,{model:this})}_clearRawDomain(){this._rawDomainIndex=[],this._rawDomain=[]}}})))()}var Pg;function Fg(){return(Fg=e((()=>{Pg={domainLine:{visible:!0},grid:{visible:!1},subGrid:{visible:!1},tick:{visible:!0},subTick:{visible:!1}}})))()}var Ig;function Lg(){return(Lg=e((()=>{Ig={domainLine:{visible:!0,style:{lineWidth:1,stroke:{type:`palette`,key:`axisDomainColor`},strokeOpacity:1}},grid:{visible:!0,style:{lineWidth:1,stroke:{type:`palette`,key:`axisGridColor`},strokeOpacity:1,lineDash:[]}},subGrid:{visible:!1,style:{lineWidth:1,stroke:{type:`palette`,key:`axisGridColor`},strokeOpacity:1,lineDash:[4,4]}},tick:{visible:!0,inside:!1,tickSize:4,alignWithLabel:!0,style:{lineWidth:1,stroke:{type:`palette`,key:`axisDomainColor`},strokeOpacity:1}},subTick:{visible:!1,tickSize:2,style:{lineWidth:1,stroke:{type:`palette`,key:`axisDomainColor`},strokeOpacity:1}},label:{visible:!0,inside:!1,space:10,style:{fontSize:{type:`token`,key:`l5FontSize`},fill:{type:`palette`,key:`axisLabelFontColor`},fontWeight:`normal`,fillOpacity:1}},title:{space:10,padding:0,style:{fontSize:{type:`token`,key:`l5FontSize`},lineHeight:{type:`token`,key:`l5LineHeight`},fill:{type:`palette`,key:`secondaryFontColor`},fontWeight:`normal`,fillOpacity:1}}}})))()}var Rg,zg;function Bg(){return(Bg=e((()=>{Rg={label:{space:8},title:{space:8},maxHeight:`30%`,unit:{visible:!1,style:{fontSize:{type:`token`,key:`l5FontSize`},fill:{type:`palette`,key:`axisLabelFontColor`},fontWeight:`normal`,fillOpacity:1}}},zg={label:{space:12,autoLimit:!0},title:{space:12,autoRotate:!0},maxWidth:`30%`,unit:{visible:!1,style:{fontSize:{type:`token`,key:`l5FontSize`},fill:{type:`palette`,key:`axisLabelFontColor`},fontWeight:`normal`,fillOpacity:1}}}})))()}var Vg,Hg;function Ug(){return(Ug=e((()=>{bt(),ut(),jg(),V(),Ce(),E(),Ct(),v(),Ng(),U(),Tg(),hr(),vr(),on(),hg(),Fg(),Lg(),Bg(),Vg=class extends Ag{constructor(){super(...arguments),this.type=B.cartesianBandAxis,this._scale=new tt}computeDomain(e){return this.computeBandDomain(e)}updateScaleRange(){let e=super.updateScaleRange();return this.updateGroupScaleRange(),e}initScales(){super.initScales(),this.calcScales(this._defaultBandInnerPadding,this._defaultBandOuterPadding)}axisHelper(){let e=(e=0)=>this._scales[e];return{isContinuous:!1,dataToPosition:this.dataToPosition.bind(this),getScale:e,getBandwidth:(t=0)=>e(t).bandwidth(),getAxisType:()=>this.type,getAxisId:()=>this.id,isInverse:()=>this._inverse,getSpec:()=>this._spec}}registerTicksTransform(){let e=`${this.type}-ticks`;return X(this._option.dataSet,e,xr),e}transformScaleDomain(){this.updateFixedWholeLength()}updateFixedWholeLength(){if(this._scale){let{bandSize:e,maxBandSize:t,minBandSize:n}=this._getOuterBandSizeFromSpec();if(e&&this._scale.bandwidth(e),t&&this._scale.maxBandwidth(t),n&&this._scale.minBandwidth(n),this._scale.isBandwidthFixed()&&this._spec.autoRegionSize&&(e||t)){let n=nt(this._scale.domain().length,e??t,this._scale.paddingInner(),this._scale.paddingOuter());[`bottom`,`top`].includes(this._orient)?this._regions.forEach((e=>e.setMaxWidth(n))):[`left`,`right`].includes(this._orient)&&this._regions.forEach((e=>e.setMaxHeight(n)))}}}_getOuterBandSizeFromSpec(){let{bandSize:e,maxBandSize:t,minBandSize:n,bandSizeLevel:r=0}=this._spec,{gap:i,extend:a=0}=this._spec.bandSizeExtend??{};r=Math.min(r,this._scales.length-1);for(let o=r;o>0;o--){let s=this._scales[o],c=s.domain(),l=s.paddingInner(),u=s.paddingOuter(),d=e=>{let t=o===r?a:0;return N(i)||o<r?nt(c.length,e,l,u)+t:(e+(I(i)?e*(Number(i.substring(0,i.length-1))/100):i))*c.length/(this._scales[o-1].paddingInner()+1)+t};h(e)&&(e=d(e)),h(t)&&(t=d(t)),h(n)&&(n=d(n))}return{bandSize:e,maxBandSize:t,minBandSize:n}}_compareSpec(e,t){let n=super._compareSpec(e,t);return n.reMake||t?.showAllGroupLayers===e?.showAllGroupLayers&&O(t?.layers,e?.layers)||(n.reMake=!0),n}reInit(e){super.reInit(),this==null||this._updateData()}},Vg.type=B.cartesianBandAxis,Vg.specKey=`axes`,Vg.builtInTheme={axis:Ig,axisBand:Pg,axisX:Rg,axisY:zg},ne(Vg,Mg),Hg=()=>{H.registerGraphicComponent(pg.lineAxis,((e,t)=>new dr(e,t))),H.registerGraphicComponent(mg.lineAxisGrid,((e,t)=>new _n(e,t))),wg(),H.registerComponent(Vg.type,Vg,!1)}})))()}function Wg(e,t){let n=e[0],r=e[e.length-1],i=t.filter((e=>e>n&&e<r));return i.length===0?[[n,r]]:qg(n,r,i)}function Gg(e,t,n=`count`){let r=Yg(e,t),i=n===`count`?e.length:r.reduce(((e,t,n)=>t.count>0?e+t.max-t.min:e),0),a=[],o=0,s=0;return r.forEach(((e,t)=>{if(i===0)a.push([0,t/r.length-1]);else{let c=n===`count`?e.count:e.max-e.min,l=a[s-1]?a[s-1][1]:0,u=t===r.length-1?1:Math.min((o+c)/i,1);(l!==u||l!==0&&l!==1)&&(s+=1,a.push([l,u]),o+=c)}})),a}function Kg(e,t,n){return e.sort(Jg),t.sort(Jg),{domain:Wg(e,t),scope:Gg(e,t,n)}}var qg,Jg,Yg;function Xg(){return(Xg=e((()=>{qg=(e,t,n)=>n.reduce(((e,r,i)=>(e.push([r,n.length===i+1?t:n[i+1]]),e)),[[e,n[0]]]),Jg=(e,t)=>e-t,Yg=(e,t)=>{let n=[{count:0,sub:[],max:t[0],min:t[0]}],r=0,i=0;for(;r<t.length;)e[i]<=t[r]?(n[r].count+=1,n[r].sub.push(e[i]),i+=1):(r+=1,n[r]={count:0,sub:[],max:t[r],min:t[r]});n.forEach((e=>{e.count&&(e.min=Math.min.apply(null,e.sub))}));let a=e.slice(i);return n[r]={count:a.length,sub:a,min:t[t.length-1],max:Math.max.apply(null,a)},n}})))()}var Zg,Qg,$g,e_;function t_(){return(t_=e((()=>{Re(),E(),v(),o(),S(),Ia(),Ih(),Y(),km(),Xg(),Zg=Math.sqrt(50),Qg=Math.sqrt(10),$g=Math.sqrt(2),e_=class{constructor(){this._extend={},this._rawDomain=[],this.niceLabelFormatter=null}getRawDomain(){return this._rawDomain}setExtraAttrFromSpec(){h(this._spec.nice)&&(this._nice=this._spec.nice),h(this._spec.zero)&&(this._zero=this._spec.zero),this._expand=this._spec.expand,this._domain=Ah(this._spec)}transformScaleDomain(){this.setScaleNice()}setLinearScaleNice(){if(!this._nice)return!1;let e=5,t=this._spec.tick||{};if(P(t.forceTickCount))e=t.forceTickCount;else if(M(t.tickCount)){let n=this._scale.range(),r=Math.abs(w(n)-n[0]);r===1&&this._option&&(r=$(this._orient)?this._option.getChartViewRect().width:this._option.getChartViewRect().height),this._lastNiceAxisLength=r,e=t.tickCount({axisLength:r,labelStyle:this._spec.label&&this._spec.label.style})}else e=P(t.tickCount)?t.tickCount:5;this._spec.niceType===`accurateFirst`&&(e=Math.max(5,e));let{min:n,max:r}=this._domain??{};return N(n)&&N(r)&&N(this._softMaxValue)&&N(this._softMinValue)?this._scale.nice(e):(h(n)||h(this._softMinValue))&&N(r)&&N(this._softMaxValue)?this._scale.niceMax(e):!(!N(n)||!N(this._softMinValue)||!h(r)&&!h(this._softMaxValue))&&this._scale.niceMin(e)}setLogScaleNice(){if(!this._nice)return!1;let{min:e,max:t}=this._domain??{};return N(e)&&N(t)&&N(this._softMaxValue)&&N(this._softMinValue)?this._scale.nice():(h(e)||h(this._softMinValue))&&N(t)&&N(this._softMaxValue)?this._scale.niceMax():!(!N(e)||!N(this._softMinValue)||!h(t)&&!h(this._softMaxValue))&&this._scale.niceMin()}setScaleNice(){return this._spec.type===`log`?this.setLogScaleNice():this.setLinearScaleNice()}reTransformDomainByLayout(){if(!this._nice||!M(this._spec.tick?.tickCount))return;let e=this._scale.range(),t=Math.abs(w(e)-e[0]);t<=1||P(this._lastNiceAxisLength)&&Math.abs(this._lastNiceAxisLength-t)<1||this.updateScaleDomain()}dataToPosition(e,t){return this.valueToPosition(e[0])}valueToPosition(e){return this._scale.scale(e)}computeLinearDomain(e){let t=[];if(e.length){let n=this._spec.breaks&&this._spec.breaks.length,r,i,a=[];if(e.forEach((e=>{let{min:t,max:o}=e;r=r===void 0?t:Math.min(r,t),i=i===void 0?o:Math.max(i,o),n&&(a=a.concat(e.values))})),n){let e=[],n=[],o=N(this._domain.max)?i:this._domain.max;for(let t=0;t<this._spec.breaks.length;t++){let{range:r}=this._spec.breaks[t];r[0]<=r[1]&&r[1]<=o&&(e.push(r),n.push(this._spec.breaks[t]))}if(e.sort(((e,t)=>e[0]-t[0])),e.length){let{domain:r,scope:i}=Kg(a,Fa(e),this._spec.breaks[0].scopeType);t=Fa(r),this._break={domain:r,scope:i,breakDomains:e,breaks:n}}else t=[r,i]}else t=[r,i]}else t[0]=0,t[1]=0;return this.setSoftDomainMinMax(t),this.expandDomain(t),this.includeZero(t),this.setDomainMinMax(t),t}expandDomain(e){if(!this._expand)return;let t=e[0],n=w(e);t===n&&(n===0?n=1:n>0?t=0:n<0&&(n=0)),h(this._expand.min)&&(e[0]=t-(n-t)*this._expand.min),h(this._expand.max)&&(e[e.length-1]=n+(n-t)*this._expand.max)}niceDomain(e){let{min:t,max:n}=Ah(this._spec);if(h(t)||h(n)||this._spec.type!==`linear`)return e;if(Math.abs(jt(e)-ge(e))<=1e-12){let t=e[0],n=t>=0?1:-1;if(t=Math.abs(t),t<1)e[0]=0,e[e.length-1]=1;else{let n=t/5,r=Math.floor(Math.log(n)/Math.LN10),i=n/10**r;n=(i>=Zg?10:i>=Qg?5:i>=$g?2:1)*10**r,e[0]=0,e[e.length-1]=10*n}n<0&&(e.reverse(),e[0]*=-1,e[e.length-1]*=-1)}return e}includeZero(e){this._zero&&(e[0]=Math.min(e[0],0),e[e.length-1]=Math.max(w(e),0))}setExtendDomain(e,t){if(t===void 0){if(!Object.prototype.hasOwnProperty.call(this._extend,e))return;delete this._extend[e]}else{if(this._extend[e]===t)return;this._extend[e]=t}this.updateScaleDomain()}extendDomain(e){let t,n=e.length-1,r=e[0]-e[n]>0,i=r?n:0,a=r?0:n;for(let n in this._extend)t=this._extend[n],t>e[a]&&(e[a]=t),t<e[i]&&(e[i]=t)}getDomainSpec(){return this._domain}setDomainMinMax(e){if(!this._domain)return;let{min:t,max:n}=this._domain;h(t)&&(e[0]=t),h(n)&&(e[e.length-1]=n)}setSoftDomainMinMax(e){let{softMin:t,softMax:n}=this._spec;if(h(t)){let n=M(t)?t(e):t;N(n)&&(n=e[0]),n<=e[0]&&(e[0]=n,this._softMinValue=n)}if(h(n)){let t=M(n)?n(e):n;N(t)&&(t=w(e)),t>=w(e)&&(e[e.length-1]=t),this._softMaxValue=t}}setZero(e){this._zero!==e&&(this._zero=e,this.updateScaleDomain())}updateScaleDomain(){var e;if(!this.isSeriesDataEnable())return;!((e=this._rawDomain)!=null&&e.length)&&this._scale&&this._updateRawDomain();let t=this.collectData(),n=this.computeLinearDomain(t);this.updateScaleDomainByModel(n)}updateScaleDomainByModel(e){e??=this._scale.domain(),this.extendDomain(e),this.includeZero(e),this.setDomainMinMax(e),this.niceDomain(e),this._scale.domain(e,this._nice),this._nice&&!this.setScaleNice()&&this._scale.rescale(),this._updateNiceLabelFormatter(e),this._domainAfterSpec=this._scale.domain(),this._refreshVisibilityByData(),this.event.emit(K.scaleDomainUpdate,{model:this}),this.event.emit(K.scaleUpdate,{model:this,value:`domain`})}getDomainAfterSpec(){return this._domainAfterSpec}_updateNiceLabelFormatter(e){let t=Math.abs(w(e)-e[0]),n=10**(Math.max(-Math.floor(Math.log10(t)),0)+2);this.niceLabelFormatter=e=>P(+e)?Math.round(+e*n)/n:e}_updateRawDomain(){let e=this.collectData(0,!0),t=this.computeLinearDomain(e);this._rawDomain=t,this.event.emit(K.scaleRawDomainUpdate,{model:this})}_clearRawDomain(){this._rawDomain=[]}}})))()}var n_;function r_(){return(r_=e((()=>{n_={domainLine:{visible:!1},grid:{visible:!0},subGrid:{visible:!1},tick:{visible:!1},subTick:{visible:!1}}})))()}var i_,a_;function o_(){return(o_=e((()=>{Le(),jg(),v(),Re(),S(),V(),t_(),U(),Tg(),rr(),vr(),on(),km(),Ia(),cs(),hg(),r_(),Bg(),Lg(),i_=class extends Ag{constructor(){super(...arguments),this.type=B.cartesianLinearAxis,this._zero=!0,this._nice=!0,this._extend={},this._scale=new ht}setAttrFromSpec(){super.setAttrFromSpec(),this.setExtraAttrFromSpec();let e=(this._tickData?.[0])?.getDataView().transformsArr.find((e=>e.type===this.registerTicksTransform()));e&&(e.options=this._tickTransformOption())}initScales(){super.initScales();let e=[0,1];h(this._domain?.min)&&(e[0]=this._domain.min),h(this._domain?.max)&&(e[1]=this._domain.max),this._scale.domain(e)}updateScaleRange(){let e=super.updateScaleRange();return e&&this.reTransformDomainByLayout(),e}_tickTransformOption(){return Object.assign(Object.assign({},super._tickTransformOption()),{breakData:this._spec.breaks?.length?()=>this._break:null})}_getUpdateAttribute(e){let t=super._getUpdateAttribute(e);if(!Sm(this._orient)&&this._break?.breaks?.length){let{width:e,height:n}=this.getLayoutRect(),r=$(this._orient),i=r?e:n;t.breaks=this._break.breaks.map((e=>{let{range:t,breakSymbol:n,gap:a=6}=e,o=this.valueToPosition((t[0]+t[1])/2)/i,s;s=es(a)?Number(a.substring(0,a.length-1))/100:a/i;let c=P(n?.angle)?n.angle:r?60:15;return{range:[o-s/2,o+s/2],breakSymbol:Object.assign(Object.assign({visible:!0},n),{angle:c*Math.PI/180}),rawRange:t}}))}return t}getNewScaleRange(){var e,t;let n=super.getNewScaleRange();return(e=this._spec.breaks)!=null&&e.length&&(t=this._break)!=null&&t.scope&&(n=Fa(this._break.scope).map((e=>n[0]+(w(n)-n[0])*e))),n}computeDomain(e){return this.computeLinearDomain(e)}axisHelper(){let e=super.axisHelper();return e.setExtendDomain=this.setExtendDomain.bind(this),e.valueToPosition=this.valueToPosition.bind(this),e}registerTicksTransform(){let e=`${this.type}-ticks`;return X(this._option.dataSet,e,ln),e}},i_.type=B.cartesianLinearAxis,i_.specKey=`axes`,i_.builtInTheme={axis:Ig,axisLinear:n_,axisX:Rg,axisY:zg},ne(i_,e_),a_=()=>{H.registerGraphicComponent(pg.lineAxis,((e,t)=>new dr(e,t))),H.registerGraphicComponent(mg.lineAxisGrid,((e,t)=>new _n(e,t))),wg(),H.registerComponent(i_.type,i_)}})))()}function s_(e,t,n){let r=-1/0,i=0,a=N(t),o=t;e.forEach((e=>{if(!1===e.context.finalAttrs.visible)return;let t=e.context.finalAttrs.size/2,s=e.context.finalAttrs.x;a&&(o=(t+i)*n),Math.abs(s-r)<o+i+t?e.context.finalAttrs.forceShow||(e.context.finalAttrs.visible=!1):r=s,i=t}))}function c_(e,t,n){let r=-1/0,i=0,a=N(t),o=t;e.forEach((e=>{if(!1===e.context.finalAttrs.visible)return;let t=e.context.finalAttrs.size/2,s=e.context.finalAttrs.y;a&&(o=(t+i)*n),Math.abs(s-r)<o+i+t?e.context.finalAttrs.forceShow||(e.context.finalAttrs.visible=!1):r=s,i=t}))}function l_(e,t,n){let r=-1/0,i=0,a=0,o=N(t),s=t;e.forEach((e=>{if(!1===e.context.finalAttrs.visible)return;let t=e.context.finalAttrs.size/2,{x:c,y:l}=e.context.finalAttrs;o&&(s=(t+i)*n),a=(-1/0-c)**2+(r-l)**2,a<(s+i+t)**2?e.context.finalAttrs.forceShow||(e.context.finalAttrs.visible=!1):r=l,i=t}))}var u_,d_;function f_(){return(f_=e((()=>{E(),U(),u_=(e,t)=>{if(!t||t.length===0)return t;let{direction:n,delta:r,deltaMul:i=1,groupBy:a}=e,o=t=>{let a=e.sort?t.slice().sort(((e,t)=>e.context.finalAttrs.x-t.context.finalAttrs.x)):t;n===0?l_(a,r,i):n===1?s_(a,r,i):c_(a,r,i)};if(a){let e=t.reduce(((e,t)=>{let n=t.context.data?.[0]?.[a];return e[n]?e[n].push(t):e[n]=[t],e}),{});Object.keys(e).forEach((t=>{o(e[t])}))}else o(t);return t},d_=()=>{H.registerGrammarTransform(`symbolOverlap`,{transform:u_,runType:`afterEncode`})}})))()}function p_(e,t,n,r){let i=Math.floor(t.length/e),a=[],o=t.length,s,c,l,u=0,d=0;a[d++]=u;for(let e=1;e<o-1;e+=i){let n=Math.min(e+i,o-1),f=Math.min(e+2*i,o),p=(f+n)/2,m=0;for(let e=n;e<f;e++){let n=t[e][r];Number.isNaN(n)||(m+=n)}m/=f-n;let h=e,g=Math.min(e+i,o),_=e-1,v=t[u][r];s=-1,l=h;for(let e=h;e<g;e++){let n=t[e][r];Number.isNaN(r)||(c=Math.abs((_-p)*(n-v)-(_-e)*(m-v)),c>s&&(s=c,l=e))}a[d++]=l,u=l}return a[d-1]!==o-1&&(a[d++]=o-1),a.map((e=>n?t[e].i:e))}function m_(e,t,n,r,i){let a=Math.floor(t.length/e),o=[],s=t.length,c=0,l=[];o.push(c),t[c][i]=t[c][i];for(let e=1;e<s-1;e+=a){a>s-e&&(a=s-e,l.length=a),l=[];for(let n=0;n<a;n++)l.push(t[e+n][i]);let n=y_[r](l);c=Math.min(Math.round(e+l.length/2)||0,s-1),t[c][i]=n,o.push(c)}return o.map((e=>n?t[e].i:e))}function h_(e,t,n,r){return m_(e,t,n,`min`,r)}function g_(e,t,n,r){return m_(e,t,n,`max`,r)}function __(e,t,n,r){return m_(e,t,n,`average`,r)}function v_(e,t,n,r){return m_(e,t,n,`sum`,r)}var y_,b_,x_;function S_(){return(S_=e((()=>{o(),S(),_o(),U(),y_={min:jt,max:ge,average:so,sum:oo},b_=(e,t)=>{let n=M(e.size)?e.size():e.size,r=e.factor||1;if(Array.isArray(n)&&(n=Math.floor(n[1]-n[0])),n*=r,n<=0)return[];if(t.length<=n)return t;if(e.skipfirst)return t.slice(0,1);let{mode:i,yfield:a,groupBy:o}=e,s=a??`y`,c=p_;if(i===`min`?c=h_:i===`max`?c=g_:i===`average`?c=__:i===`sum`&&(c=v_),t.length){let e={};if(o){for(let n=0,r=t.length;n<r;n++){let r=t[n],i=r[o];e[i]||(e[i]=[]),e[i].push({[s]:r[s],i:n})}let r=[];return Object.keys(e).forEach((i=>{let a=e[i];if(a.length<=n){let e=a.map((e=>e.i));r=r.concat(e)}else{let e=c(n,a,!0,s);r=r.concat(e),a.forEach((e=>t[e.i][s]=e[s]))}})),r.sort(((e,t)=>e-t)),r.map((e=>t[e]))}return c(n,t,!1,s).map((e=>t[e]))}return[]},x_=()=>{H.registerGrammarTransform(`dataSampling`,{transform:b_})}})))()}var C_;function w_(){return(w_=e((()=>{S(),Et(),El(),Va(),C_=class{get dataList(){return this._dataArr}constructor(e){this._dataArr=[],this._dataSet=e}parseData(e){this._dataArr=[];let t=T(e);for(let e=0;e<t.length;e++)this._dataArr.push(Cl(t[e],this._dataSet,this._dataArr))}updateData(e,t=!1,n=!0){let r=T(e);return(!t||r.length===this._dataArr.length)&&(this._dataValueForEach(r,((e,t)=>{t.markRunning()})),this._dataValueForEach(r,((e,t)=>{wl(t,e,n)})),!0)}_dataValueForEach(e,t){e.forEach(((e,n)=>{if(e instanceof Ne)return;let r=this.getSeriesData(e.id,n);r&&t(e,r,n)}))}getSeriesData(e,t){if(!this._dataArr.length)return null;if(typeof e==`string`){let t=this._dataArr.filter((t=>t.name===e));if(t[0])return t[0];Ra(`no data matches dataId ${e}!`)}if(typeof t==`number`){if(this._dataArr[t])return this._dataArr[t];Ra(`no data matches dataIndex ${t}!`)}return this._dataArr[0]}}})))()}var T_;function E_(){return(E_=e((()=>{j(),st(),Ce(),E(),Ke(),Qo(),to(),Lc(),T_=class{constructor(e,t){this._scaleSpecMap=/* @__PURE__ */ new Map,this._scaleMap=/* @__PURE__ */ new Map,this._modelScaleSpecMap=/* @__PURE__ */ new Map,this._markAttributeScaleMap=/* @__PURE__ */ new Map,this._spec=null,this._chart=null,this.getStatisticalFields=e=>{let t=[];return this._scaleSpecMap.forEach(((n,r)=>{$a(n.domain)&&n.domain.forEach((r=>{r.dataId===e&&r.fields.forEach((e=>{Oc(t,[{key:e,operations:k(n.type)?[`max`,`min`]:[`values`]}])}))}))})),this._markAttributeScaleMap.forEach(((n,r)=>{let i=this.getScale(r);n.forEach((n=>{this._getSeriesBySeriesId(n.seriesId).getRawData().name===e&&n.field&&Oc(t,[{key:n.field,operations:k(i.type)?[`max`,`min`]:[`values`]}])}))})),t},this._spec=e,this._chart=t,this._setAttrFromSpec()}_createFromSpec(e){if(!e.id)return null;let t=this._scaleMap.get(e.id);return t||=e.type===`ordinal`&&e.id===`color`?Go(`colorOrdinal`):Go(e.type),t?(A(e.range)&&t.range(e.range),A(e.domain)&&($a(e.domain)||t.domain(e.domain)),e.specified&&t.specified&&t.specified(e.specified),e.clamp&&t.clamp&&t.clamp(e.clamp),t):null}_setAttrFromSpec(){if(!this._spec?.length)return;let e=/* @__PURE__ */ new Map,t=/* @__PURE__ */ new Map;this._spec.forEach((n=>{let r=this._createFromSpec(n);r&&(e.set(n.id,r),t.set(n.id,n))})),this._modelScaleSpecMap.forEach((n=>{let r=this._createFromSpec(n);r&&(e.set(n.id,r),t.set(n.id,n))})),this._scaleSpecMap=t,this._scaleMap=e}updateSpec(e){let t={change:!1,reMake:!1,reRender:!1,reSize:!1,reCompile:!1};if(O(e,this._spec))return t;t.change=!0;for(let n=0;n<e.length;n++){let r=e[n],i=this._scaleMap.get(r.id);if(!i)return t.reMake=!0,t;let a=this._spec.find((e=>e.id===r.id));if(!a.id||a.type!==r.type)return t.reMake=!0,t;if(!O(a.specified,r.specified)){if(r.id!==`color`)return t.reMake=!0,t;let e=i;if(e.setSpecified)e.setSpecified(r.specified);else{if(!r.specified||!e.specified)return t.reMake=!0,t;e.specified(r.specified)}t.reRender=!0}r.range&&!O(r.range,i.range())&&(i.range(r.range),t.reRender=!0),$a(r.domain)?t.reRender=!0:O(r.domain,i.domain())||(i.domain(r.domain),t.reRender=!0),this._scaleSpecMap.set(r.id,r)}return this._spec=e,t}registerModelScale(e){let t=this._createFromSpec(e);t&&(this._modelScaleSpecMap.set(e.id,e),this._scaleSpecMap.set(e.id,e),this._scaleMap.set(e.id,t))}removeModelScale(e){this._modelScaleSpecMap.forEach((t=>{e(t)&&(this._modelScaleSpecMap.delete(t.id),this._scaleSpecMap.delete(t.id),this._scaleMap.delete(t.id))}))}getScale(e){return this._scaleMap.get(e)}getScaleSpec(e){return this._scaleSpecMap.get(e)}_getSeriesByRawDataId(e){let t=this._chart.getAllSeries();for(let n=0;n<t.length;n++){let r=t[n];if(r.getRawData().name===e)return r}return null}_getSeriesBySeriesId(e){let t=this._chart.getAllSeries();for(let n=0;n<t.length;n++){let r=t[n];if(r.id===e)return r}return null}updateScaleDomain(e){this._scaleSpecMap.forEach(((t,n)=>{let r=this._scaleMap.get(n);if(!r)return;if(!$a(t.domain))return t.domain&&t.domain.length!==0||r.domain(e),void this._updateMarkScale(n,r,r.domain().slice());let i;i=k(t.type)?[null,null]:/* @__PURE__ */ new Set,t.domain.forEach((e=>{let n=this._getSeriesByRawDataId(e.dataId);if(!n)return;let r=k(t.type);e.fields.forEach((e=>{let t=n.getRawDataStatisticsByField(e,r);t&&(r?(N(i[0])?i[0]=t.min:i[0]=Math.min(t.min,i[0]),N(i[1])?i[1]=t.max:i[1]=Math.max(t.max,i[1])):t.values.forEach((e=>{i.add(e)})))}))}));let a=i;k(t.type)||(i=Array.from(i)),r.domain(i),this._updateMarkScale(n,r,a)}))}_updateMarkScale(e,t,n){let r=this._markAttributeScaleMap.get(e);r&&r.length!==0&&r.forEach((e=>{if(!e.field||!e.markScale||e.markScale===t)return;if(N(e.changeDomain)||e.changeDomain===`none`||N(e.seriesId))return void(k(t.type)?e.markScale.domain(n):t.domain(Array.from(n)));let r=this._getSeriesBySeriesId(e.seriesId),i=k(t.type),a=r.getRawDataStatisticsByField(e.field,i);if(!F(a))return e.changeDomain===`expand`?(i?(n[0]=Math.min(n[0],a.min),n[1]=Math.max(n[1],a.max)):(a.values.forEach((e=>{n.add(e)})),n=Array.from(n)),void e.markScale.domain(n)):void(e.changeDomain!==`replace`||(i?e.markScale.domain([a.min,a.max]):e.markScale.domain(a.values)));k(t.type)?e.markScale.domain(n):t.domain(Array.from(n))}))}registerMarkAttributeScale(e,t){let n=this._scaleMap.get(e.scale),r=this._markAttributeScaleMap.get(e.scale);r||(r=[],this._markAttributeScaleMap.set(e.scale,r));let i=n;return(N(e.field)||!N(e.changeDomain)&&e.changeDomain!==`none`&&!N(t))&&(i=n.clone()),r.push(Object.assign(Object.assign({},e),{seriesId:t,markScale:i})),i}}})))()}var D_;function O_(){return(O_=e((()=>{Md(),D_=class{constructor(){this._stateGraphicsByTrigger=/* @__PURE__ */ new Map,this._disableTriggerEvent=!1,this._triggerMapByState=/* @__PURE__ */ new Map}setDisableActiveEffect(e){this._disableTriggerEvent=e}addTrigger(e){e&&[e.getStartState(),e.getResetState()].forEach((t=>{if(t){let n=this._triggerMapByState.get(t);n?!n.includes(e)&&n.push(e):this._triggerMapByState.set(t,[e])}}))}setStatedGraphics(e,t){this._stateGraphicsByTrigger.set(e,t)}getStatedGraphics(e){return this._stateGraphicsByTrigger.get(e)}_getMarkById(e){let t=/* @__PURE__ */ new Map;return e.getMarks().forEach((e=>{e&&t.set(e.id,e)})),t}_hasAnimationByGraphicState(e,t){let n=e.parent?.mark??t.get(e.context.markId);return!!(n?.hasAnimationByState)?.call(n,`state`)}updateStates(e,t,n,r,i){return this._disableTriggerEvent?[]:t&&t.length?(r&&i?n&&n.length?(this.toggleReverseStateOfGraphics(e,t,n,i),this.toggleStateOfGraphics(e,t,n,r)):this.addBothStateOfGraphics(e,t,r,i):r&&(n&&n.length?this.toggleStateOfGraphics(e,t,n,r):this.addStateOfGraphics(e,t,r)),t):(n&&n.length&&this.clearAllStatesOfTrigger(e,r,i),[])}toggleReverseStateOfGraphics(e,t,n,r){let i=e.getMarkIdByState(),a=this._getMarkById(e);n.forEach((e=>{if(r&&i[r]&&i[r].includes(e.context.markId)){let t=this._hasAnimationByGraphicState(e,a);Ad(e,r,!0,t)}})),t.forEach((e=>{if(r&&i[r]&&i[r].includes(e.context.markId)){let t=this._hasAnimationByGraphicState(e,a);jd(e,r,t)}}))}toggleStateOfGraphics(e,t,n,r){let i=e.getMarkIdByState(),a=this._getMarkById(e);n.forEach((e=>{if(r&&i[r]&&i[r].includes(e.context.markId)){let t=this._hasAnimationByGraphicState(e,a);jd(e,r,t)}})),t.forEach((e=>{if(r&&i[r]&&i[r].includes(e.context.markId)){let t=this._hasAnimationByGraphicState(e,a);Ad(e,r,!0,t)}}))}addBothStateOfGraphics(e,t,n,r){let i=e.getMarks(),a=e.getMarkIdByState();i.forEach((e=>{var i;let o=r&&a[r]&&a[r].includes(e.id),s=n&&a[n]&&a[n].includes(e.id);if(!o&&!s)return;let c=e.hasAnimationByState&&e.hasAnimationByState(`state`);(i=e.getGraphics())==null||i.forEach((e=>{t&&t.includes(e)?s&&Ad(e,n,!0,c):o&&Ad(e,r,!0,c)}))}))}addStateOfGraphics(e,t,n){let r=e.getMarks(),i=e.getMarkIdByState();r.forEach((e=>{var r;let a=n&&i[n]&&i[n].includes(e.id);if(!a)return;let o=e.hasAnimationByState&&e.hasAnimationByState(`state`);(r=e.getGraphics())==null||r.forEach((e=>{t&&t.includes(e)&&a&&Ad(e,n,!0,o)}))}))}clearAllStatesOfTrigger(e,t,n){if(this._disableTriggerEvent)return;let r=this.getStatedGraphics(e);if(!r||!r.length)return;let i=e.getMarks(),a=e.getMarkIdByState();i.forEach((e=>{if(e){let i=e.getGraphics(),o=e.hasAnimationByState&&e.hasAnimationByState(`state`);i&&i.length&&(n&&a[n]&&a[n].includes(e.id)&&i.forEach((e=>{jd(e,n,o)})),t&&a[t]&&a[t].includes(e.id)&&i.forEach((e=>{r.includes(e)&&jd(e,t,o)})))}}))}clearAllStates(){this._disableTriggerEvent||this._triggerMapByState.forEach(((e,t)=>{e.forEach((e=>{this.clearAllStatesOfTrigger(e,t,e.getResetState())}))}))}clearByState(e){if(this._disableTriggerEvent)return;let t=this._triggerMapByState.get(e);t&&t.length&&t.forEach((t=>{this.clearAllStatesOfTrigger(t,e,t.getResetState()),this.setStatedGraphics(t,[])}))}updateStateOfGraphics(e,t){if(this._disableTriggerEvent)return;let n=this._triggerMapByState.get(e);n&&n.length&&n.forEach((e=>{let n=t.filter((t=>e.getMarks().some((e=>{let n=e&&e.getGraphics();return n&&n.includes(t)}))));this.updateStates(e,n,this.getStatedGraphics(e),e.getStartState(),e.getResetState()),this.setStatedGraphics(e,n)}))}}})))()}var k_,A_,j_,M_;function N_(){return(N_=e((()=>{w_(),E_(),V(),U(),al(),j(),v(),Xa(),cs(),S(),rl(),Ou(),Id(),uc(),o(),st(),E(),Ct(),Ce(),b(),Ho(),Cu(),td(),Y(),Gm(),hu(),Ke(),El(),vu(),O_(),tm(),k_=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`){var i=0;for(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_={[B.markPoint]:!0,[B.markLine]:!0,[B.markArea]:!0},j_={regionId:!0,regionIndex:!0,seriesId:!0,seriesIndex:!0,specifiedDataSeriesId:!0,specifiedDataSeriesIndex:!0},M_=class extends Su{getSpec(){return this._spec}setSpec(e){this._spec=e}getOption(){return this._option}getLayoutRect(){return this._layoutRect}getViewRect(){return this._viewRect}getLayoutTag(){return this._layoutTag}setLayoutTag(e,t,n=!0){this._layoutTag=e;let r=this.getCompiler();return r&&(r.updateLayoutTag(),e&&n&&r.renderNextTick(t)),this._layoutTag}resetLayoutItemTag(){this.getLayoutElements().forEach((e=>e.setWillLayoutTag()))}getModelOption(){return this._modelOption}getGlobalScale(){return this._globalScale}getEvent(){return this._event}get chartData(){return this._chartData}_setModelOption(){}constructor(e,t){super(t),this.type=`chart`,this.id=Ja(),this._regions=[],this._series=[],this._components=[],this._specTransformer=null,this._layoutRect={x:0,y:0,width:500,height:500},this._viewRect={width:500,height:500},this._viewBox={x1:0,y1:0,x2:500,y2:500},this._layoutTag=!0,this._idMap=/* @__PURE__ */ new Map,this.state={layoutUpdateRank:1},this.padding={top:0,left:0,right:0,bottom:0},this.getAllSeries=()=>this._series??[],this.getRegionsInIndex=e=>e&&e.length!==0?this._regions.filter(((t,n)=>e.includes(n))):[this._regions[0]],this.getAllRegions=()=>this._regions,this.getRegionsInIds=e=>e?this._regions.filter((t=>e.includes(t.id))):[],this.getRegionsInQuerier=e=>e?this._regions.filter(((t,n)=>T(e).some((e=>h(e.regionId)&&e.regionId===t.userId||e.regionIndex===n)))):this._regions,this.getRegionsInUserId=e=>{if(e)return this._regions.find((t=>t.userId===e))},this.getRegionsInUserIdOrIndex=(e,t)=>this.getAllRegions().filter((n=>e?.length?n.userId&&e.includes(n.userId):!t?.length||t.includes(n.getSpecIndex()))),this.getComponents=()=>this._components,this.getSeriesInIndex=e=>e&&e.length!==0?this._series.filter(((t,n)=>e.includes(n))):[this._series[0]],this.getSeriesInIds=e=>e?this._series.filter((t=>e.includes(t.id))):[],this.getSeriesInUserId=e=>{if(e)return this._series.find((t=>t.userId===e))},this.getSeriesInUserIdOrIndex=(e,t)=>this.getAllSeries().filter((n=>e?.length?n.userId&&e.includes(n.userId):!t?.length||t.includes(n.getSpecIndex()))),this.getComponentByIndex=(e,t)=>{let n=this._components.filter((t=>(t.specKey||t.type)===e));if(n&&n.length!==0)return n[t]},this.getComponentsByKey=e=>this._components.filter((t=>(t.specKey||t.type)===e)),this.getComponentByUserId=e=>{let t=this._components.find((t=>t.userId===e));if(t)return t},this.getComponentsByType=e=>this._components.filter((t=>t.type===e)),this._isMarkerAdditionSpecSafeWithoutRemake=e=>{if(!e||typeof e!=`object`)return!1;let t=e;return!1!==t.visible&&!Object.keys(j_).some((e=>!N(t[e])))},this._paddingSpec=as(e.padding??t.getTheme(`padding`)),this._event=new il(t.eventDispatcher,t.mode),this._dataSet=t.dataSet,this._chartData=new C_(this._dataSet),this._modelOption=Object.assign(Object.assign({},t),{mode:this._option.mode,map:this._idMap,getChartLayoutRect:()=>this._layoutRect,getChartViewRect:()=>this._viewRect,getChart:()=>this,globalScale:this._globalScale,onError:this._option?.onError,disableTriggerEvent:!0===this._option?.disableTriggerEvent,componentShowContent:this._option?.componentShowContent,getSeriesData:this._chartData.getSeriesData.bind(this._chartData),dispatchEvent:(e,t)=>this._option.globalInstance.event.emit(e,t)}),this._setModelOption&&this._setModelOption(),this._spec=e}created(e){this._specTransformer=e,this._chartData.parseData(this._spec.data),this._createGlobalScale(),this._createBackground(),this._createLayout(),e.forEachRegionInSpec(this._spec,this._createRegion.bind(this)),e.forEachSeriesInSpec(this._spec,this._createSeries.bind(this)),e.forEachComponentInSpec(this._spec,this._createComponent.bind(this),this._option.getSpecInfo())}_initInteractions(){if(this._option.disableTriggerEvent)return;this._interaction=new D_;let e=this.getAllSeries(),t=[],n=[];e.forEach((e=>{let r=e.getInteractionTriggers();if(r&&r.length){let i=e.getRegion().id;r.forEach((({trigger:e,marks:r})=>{let a=n.find((t=>t.regionId===i&&O(t.config,e)));if(a)a.trigger.marks.push(...r);else{let a=Object.assign(Object.assign({},e),{marks:[...r]});n.push({regionId:i,config:Object.assign({},e),trigger:a}),t.push(a)}}))}})),t.forEach((e=>{let t=H.createInteractionTrigger(e.type,Object.assign(Object.assign({},e),{event:this._event,interaction:this._interaction}));t&&(t.init(),this._interaction.addTrigger(t))}))}init(){var e,t;(e=this._beforeInit)==null||e.call(this),this._regions.forEach((e=>e.init({}))),this._series.forEach((e=>e.init({}))),this._components.forEach((e=>e.init({dataSet:this._dataSet}))),this._initEvent(),(t=this._initStack)==null||t.call(this),this.reDataFlow(),this._initInteractions(),this.initStageAnimation()}initStageAnimation(){let e=this._option.getCompiler();e!=null&&e.setStageAnimationConfig&&e.setStageAnimationConfig(Wp({},Gp(`stage`,this._spec,{}),null))}reDataFlow(){this._series.forEach((e=>e.getRawData()?.markRunning())),this._series.forEach((e=>e.fillData())),this.updateGlobalScaleDomain()}onResize(e,t,n=!0){let r={width:e,height:t};this._canvasRect=r,this._updateLayoutRect(this._option.viewBox),this.resetLayoutItemTag(),this.setLayoutTag(!0,null,n)}updateViewBox(e,t){this._option.viewBox=e,this._updateLayoutRect(e),this.resetLayoutItemTag(),this.setLayoutTag(!0,null,t)}_createBackground(){let e=this._spec.background;if(!e||typeof e!=`object`||h(e.gradient))return;let t=ae(e,[`x`,`y`,`width`,`height`,`x1`,`y1`,`image`]);t.background=e.image,this._backgroundMark=H.createMark(`group`,`chart-background`,{model:this,map:this._option.map,getCompiler:this.getCompiler,globalScale:this._globalScale}),this._backgroundMark.created(),this._backgroundMark.setStyle(Object.assign(Object.assign({},t),{x:()=>this._viewBox.x1,y:()=>this._viewBox.y1,width:()=>this._viewBox.x2-this._viewBox.x1,height:()=>this._viewBox.y2-this._viewBox.y1})),this._backgroundMark.setMarkConfig({zIndex:gu.SeriesGroup-2}),this.getCompiler().addRootMark(this._backgroundMark)}_createRegion(e,t){if(!e)return;let{spec:n}=t,r=k_(t,[`spec`]),i=new e(n,Object.assign(Object.assign({},this._modelOption),r));i&&(i.created(),this._regions.push(i))}_createSeries(e,t){if(!e)return;let{spec:n}=t,r=k_(t,[`spec`]),i;if(h(n.regionId)?i=this.getRegionsInUserId(n.regionId):h(n.regionIndex)&&(i=this.getRegionsInIndex([n.regionIndex])[0]),!i&&!(i=this._regions[0]))return;let a=new e(n,Object.assign(Object.assign(Object.assign({},this._modelOption),r),{type:n.type,region:i,globalScale:this._globalScale,sourceDataList:this._chartData.dataList}));a&&(a.created(),this._series.push(a),i.addSeries(a))}getSeriesById(e){return this._series.find((t=>t.id===e))}_createComponent(e,t){let n=e.createComponent(t,Object.assign(Object.assign({},this._modelOption),{type:e.type,getAllRegions:this.getAllRegions,getRegionsInIndex:this.getRegionsInIndex,getRegionsInIds:this.getRegionsInIds,getRegionsInUserIdOrIndex:this.getRegionsInUserIdOrIndex,getAllSeries:this.getAllSeries,getSeriesInIndex:this.getSeriesInIndex,getSeriesInIds:this.getSeriesInIds,getSeriesInUserIdOrIndex:this.getSeriesInUserIdOrIndex,getAllComponents:this.getComponents,getComponentByIndex:this.getComponentByIndex,getComponentByUserId:this.getComponentByUserId,getComponentsByKey:this.getComponentsByKey,getComponentsByType:this.getComponentsByType}));n&&(n.created(),this._components.push(n))}getAllComponents(){return this._components}getAllModels(){return[].concat(this.getAllSeries(),this.getAllComponents(),this.getAllRegions())}getModelInFilter(e){if(I(e))return this.getAllModels().find((t=>t.userId===e));if(M(e))return this.getAllModels().find((t=>e(t)));let t=0;return this.getAllModels().find((n=>{if((n.specKey??n.type)===e.type){if(t===e.index)return!0;t++}return!1}))}_createLayout(){this._updateLayoutRect(this._option.viewBox),this._initLayoutFunc()}setLayout(e){this._option.layout=e,this._initLayoutFunc()}_initLayoutFunc(){if(this._layoutFunc=this._option.layout,!this._layoutFunc){let e=H.getLayoutInKey(this._spec.layout?.type??`base`);if(e){let t=new e(this._spec.layout,{onError:this._option?.onError});this._layoutFunc=t.layoutItems.bind(t)}}}layout(){var e,t,n,r;if((t=(e=this._option.performanceHook)?.beforeLayoutWithSceneGraph)==null||t.call(e,this._option.globalInstance),this.getLayoutTag()){this._event.emit(K.layoutStart,{chart:this,vchart:this._option.globalInstance}),this.onLayoutStart();let e=this.getLayoutElements();this._layoutFunc(this,e,this._layoutRect,this._viewBox),this._event.emit(K.afterLayout,{elements:e,chart:this}),this.setLayoutTag(!1),this.onLayoutEnd(),this._event.emit(K.layoutEnd,{chart:this,vchart:this._option.globalInstance})}(r=(n=this._option.performanceHook)?.afterLayoutWithSceneGraph)==null||r.call(n,this._option.globalInstance)}onLayoutStart(){this.getAllModels().forEach((e=>e.onLayoutStart(this._layoutRect,this._viewRect)))}onLayoutEnd(){this.getAllModels().forEach((e=>{e.modelType!==`series`&&e.onLayoutEnd()}))}onEvaluateEnd(e){[...this._components,...this._regions,...this._series].forEach((t=>t.onEvaluateEnd(e)))}onBeforeRender(){[...this._components,...this._regions,...this._series].forEach((e=>e.onBeforeRender()))}getLayoutElements(){return this.getAllModels().map((e=>e.layout)).filter((e=>!!e))}getModelById(e){let t=this._idMap.get(e);if(t&&t instanceof Du)return t}getModelByUserId(e){return this.getSeriesInUserId(e)||this.getRegionsInUserId(e)||this.getComponentByUserId(e)||void 0}getAllMarks(){return Array.from(this._idMap.values()).filter((e=>e&&e instanceof Fd))}getMarkById(e){let t=this._idMap.get(e);if(t&&t instanceof Fd)return t}getMarkByUserName(e){return this.getAllMarks().filter((t=>t.name&&t.name===e))}updateData(e,t,n=!0,r){let i=this._dataSet.getDataView(e);i&&(i.markRunning(),i.parseNewData(t,r)),n&&this.updateGlobalScaleDomain(),this.getAllModels().forEach((e=>e.onDataUpdate()))}updateFullData(e,t=!0){T(e).forEach((e=>{let t=this._dataSet.getDataView(e.id);t&&t.markRunning()})),T(e).forEach((e=>{let t=this._dataSet.getDataView(e.id);t&&wl(t,e,!0)})),t&&this.updateGlobalScaleDomain(),this.getAllModels().forEach((e=>e.onDataUpdate()))}setCanvasRect(e,t){this._canvasRect={width:e,height:t}}getCanvasRect(){return this._canvasRect||=cu(this._spec,this._option,{width:500,height:500}),this._canvasRect}getSeriesData(e,t){return this._chartData.getSeriesData(e,t)}_transformSpecScale(){var e;let t=this._spec.scales?[...this._spec.scales]:[],n=t.find((e=>e.id===`color`)),r=this.getColorScheme();if(!n&&(n={type:`ordinal`,id:`color`,domain:null,range:null},t.push(n),this._spec.color)){let e=this._spec.color;if(A(e))n.range=e;else{let t=e;Object.prototype.hasOwnProperty.call(t,`type`)&&(n.type=t.type),Object.prototype.hasOwnProperty.call(t,`domain`)&&(n.domain=t.domain),Object.prototype.hasOwnProperty.call(t,`range`)&&(n.range=t.range),Object.prototype.hasOwnProperty.call(t,`specified`)&&(n.specified=t.specified),Object.prototype.hasOwnProperty.call(t,`clamp`)&&(n.clamp=t.clamp)}}return(e=n.range)!=null&&e.length||(n.range=Po(r),n.rangeTheme=!0),t}_createGlobalScale(){this._globalScale=new T_(this._transformSpecScale(),this),this._modelOption.globalScale=this._globalScale}updateGlobalScaleDomain(){let e=/* @__PURE__ */ new Set;this._series.forEach((t=>{let n=t.getSeriesKeys();n&&n.forEach((t=>e.add(t)))}));let t=Array.from(e);this._globalScale.updateScaleDomain(t)}updateGlobalScale(e){fu(e,this._globalScale.updateSpec(this._transformSpecScale()))}updateGlobalScaleTheme(){let e=this._globalScale.getScaleSpec(`color`),t=this.getColorScheme();e.rangeTheme&&(e.range=Po(t),this._globalScale.getScale(`color`).range(e.range))}_getSpecKeys(e){let t={width:!0,height:!0,xField:!0,yField:!0};return Object.keys(e).filter((e=>!t[e])).sort()}_isSeriesRelatedSpecKey(e){return!!this._specTransformer?.getSeriesRelatedSpecKeys()?.[e]}_canChangeSpecKeysWithoutRemake(e,t){let n=new Set(e),r=new Set(t),i=[...e.filter((e=>!r.has(e))),...t.filter((e=>!n.has(e)))];return i.length>0&&i.every((e=>this._isSeriesRelatedSpecKey(e)))}updateSpec(e){var t,n;let r={change:!1,reMake:!1,reRender:!1,reSize:!1,reCompile:!1};if(e.type!==this.type)return r.reMake=!0,this.setLayoutTag(!0,null,!1),r;let i=this._getSpecKeys(this._spec),a=this._getSpecKeys(e);if(!O(i,a)&&!this._canChangeSpecKeysWithoutRemake(i,a))return r.reMake=!0,this.setLayoutTag(!0,null,!1),r;let o=Array.from(/* @__PURE__ */ new Set([...i,...a])).sort();for(let t=0;t<o.length;t++){let n=o[t],i=this._spec[n],a=e[n];if(A(i)&&i.length!==T(a).length&&!this._canChangeMarkerComponentsWithoutRemake(n,i,a))return r.reMake=!0,this.setLayoutTag(!0,null,!1),r}let s=this._spec,c=this._isOnlyMarkerComponentsRemoved(this._spec,e,o),l=this._isOnlyComponentSpecsChanged(this._spec,e,o),u=this._isOnlySeriesSpecsChanged(this._spec,e,o),d=!(!l&&!u)||this._isOnlyComponentOrSeriesSpecsChanged(this._spec,e,o);if(this._spec=e,c)return this._removeMarkerComponentsForEmptySpecs(r),r;if(this.updateChartConfig(r,s),r.reMake||(this.updateGlobalScale(r),r.reMake)||(this.updateRegionSpec(r),r.reMake))return this.setLayoutTag(!0,null,!1),r;let f=this.updateComponentSpec(r);return r.reMake?(this.setLayoutTag(!0,null,!1),r):(!l&&(t=r.effects)!=null&&t.localOnly&&delete r.effects.localOnly,uu(r)?r:l&&!f.hasNonComponentOnlyUpdate&&(du(r)||this._isComponentScaleDomainOnlyUpdate(r))?(f.componentOnlyUpdatedComponents.forEach((e=>{e.reInit(e.getSpec())})),(n=r.effects)!=null&&n.layout&&this.setLayoutTag(!0,null,!1),r):(this.setLayoutTag(!0,null,!1),this.updateSeriesSpec(r),r.reMake||(this.reInit(),d&&this._canSkipChartDataStages(r)||(this.updateDataSpec(),this.reDataFlow(),this._reRunStackDataFlow(),this.getAllModels().forEach((e=>e.onDataUpdate())))),r))}updateChartConfig(e,t){this._paddingSpec=as(this._spec.padding??this._option?.getTheme(`padding`)),this._updateLayoutRect(this._viewBox)}updateDataSpec(){this._spec.data&&this._chartData.updateData(this._spec.data,!1,!0)}updateRegionSpec(e){var t;(t=this._spec)!=null&&t.region&&(this._spec.region.length===this._regions.length?this._regions.forEach((t=>{fu(e,t.updateSpec(this._spec.region[t.getSpecIndex()]))})):e.reMake=!0)}updateComponentSpec(e){let t=[],n=!1,r={},i={[B.title]:!0,[B.brush]:!0,[B.indicator]:!0},a=[],o=!1;this._components.forEach((s=>{if(s.type===B.label||s.type===B.totalLabel)return void(s.getSpecInfo()||(a.push(s),o=!0,n=!0));i[s.type]&&(i[s.type]=!1);let c=s.specKey||s.type,l=this._spec[c]??{};if(A(l)){if(r[c]=r[c]||{specCount:l.length,componentCount:0},this._canRemoveMarkerComponentsWithoutRemake(c,[s.getSpec()],l))return void a.push(s);r[c].componentCount++;let i=l[s.getSpecIndex()]??{},o=s.getSpec(),u=s.updateSpec(i,l);du(u)||this._isComponentScaleDomainOnlyUpdate(u)?t.push(s):O(o,i)||(n=!0),fu(e,u)}else{let r=s.getSpec(),i=s.updateSpec(l);du(i)||this._isComponentScaleDomainOnlyUpdate(i)?t.push(s):O(r,l)||(n=!0),fu(e,i)}})),e.reMake||this._createMissingMarkerComponentsForSpecs(e,r);for(let t in r)if(Object.prototype.hasOwnProperty.call(r,t)){let n=r[t];n.componentCount!==n.specCount&&(e.reMake=!0)}a.length&&(a.forEach((e=>{this._removeComponent(e)})),e.change=!0,e.effects=Object.assign(Object.assign(Object.assign({},e.effects),{component:!0}),o?{layout:!0,render:!0}:{localOnly:!0}));let s=e=>e&&!1!==e.visible;return Object.keys(i).forEach((t=>{if(i[t]){let n=this._spec[t];(A(n)?n.some(s):s(n))&&(e.reMake=!0)}})),{componentOnlyUpdatedComponents:t,hasNonComponentOnlyUpdate:n}}_canChangeMarkerComponentsWithoutRemake(e,t,n){return this._canRemoveMarkerComponentsWithoutRemake(e,t,n)||this._canAddMarkerComponentsWithoutRemake(e,t,n)}_canAddMarkerComponentsWithoutRemake(e,t,n){return!!(A_[e]&&A(t)&&A(n))&&!(n.length<=t.length)&&n.slice(t.length).every(this._isMarkerAdditionSpecSafeWithoutRemake)}_isAutoRangeMarkerSpec(e){return!!e&&typeof e==`object`&&!0===e.autoRange}_canRemoveMarkerComponentsWithoutRemake(e,t,n){return A_[e]&&A(t)&&t.length>0&&A(n)&&n.length===0}_isOnlyMarkerComponentsRemoved(e,t,n){let r=!1,i=n.every((n=>this._canRemoveMarkerComponentsWithoutRemake(n,e[n],t[n])?(r=!0,!0):O(e[n],t[n])));return r&&i}_isComponentSpecKey(e){return!!A_[e]||this._components.some((t=>(t.specKey||t.type)===e))}_isOnlyComponentSpecsChanged(e,t,n){let r=!1,i=e,a=t,o=n.every((e=>!!O(i[e],a[e])||!!this._isComponentSpecKey(e)&&(r=!0,!0)));return r&&o}_isOnlySeriesSpecsChanged(e,t,n){let r=!1,i=e,a=t,o=this._specTransformer?.getSeriesRelatedSpecKeys()??{},s=n.every((e=>!!O(i[e],a[e])||!!o[e]&&(r=!0,!0)));return r&&s}_isOnlyComponentOrSeriesSpecsChanged(e,t,n){let r=!1,i=e,a=t,o=this._specTransformer?.getSeriesRelatedSpecKeys()??{},s=n.every((e=>!!O(i[e],a[e])||!(!this._isComponentSpecKey(e)&&!o[e])&&(r=!0,!0)));return r&&s}_canSkipChartDataStages(e){let t=e.effects;return!(!t?.series||t.remake||t.data||t.scaleDomain||e.reMake)}_isComponentScaleDomainOnlyUpdate(e){let t=e.effects;return!(!t?.component||!t.scaleDomain||e.reMake||e.reCompile||e.reSize||t.remake||t.compile||t.data||t.series||t.animation||e.reTransformSpec||e.reAnimate||e.changeTheme||e.changeBackground)}_reRunStackDataFlow(){var e,t;this._series.some((e=>e.getStack?.call(e)))&&((t=(e=this._stack)?.stackAll)==null||t.call(e),this._series.forEach((e=>{e.getViewDataFilter()&&e.reTransformViewData()})))}_getModelSpecIndex(e){let t=e.specPath??[],n=t[t.length-1];return typeof n==`number`?n:0}_hasComponentForSpecInfo(e,t){let n=this._getModelSpecIndex(t);return this._components.some((t=>(t.specKey||t.type)===e&&t.getSpecIndex()===n))}_createMissingMarkerComponentsForSpecs(e,t){var n;let r=0,i=!1;(n=this._specTransformer)==null||n.forEachComponentInSpec(this._spec,((n,a)=>{if(e.reMake)return;let o=n.specKey||n.type;A_[o]&&!this._hasComponentForSpecInfo(o,a)&&(this._isMarkerAdditionSpecSafeWithoutRemake(a.spec)?(this._createComponent(n,a),t[o]&&t[o].componentCount++,r++,i||=this._isAutoRangeMarkerSpec(a.spec)):e.reMake=!0)}),this._option.getSpecInfo()),r&&(e.change=!0,e.effects=Object.assign(Object.assign(Object.assign(Object.assign({},e.effects),{component:!0}),i?{scaleDomain:!0}:null),{layout:!0,render:!0}))}_removeMarkerComponentsForEmptySpecs(e){let t=this._components.filter((e=>{let t=e.specKey||e.type,n=this._spec[t]??{};return this._canRemoveMarkerComponentsWithoutRemake(t,[e.getSpec()],n)}));t.length&&(t.forEach((e=>{this._removeComponent(e)})),e.change=!0,e.effects=Object.assign(Object.assign({},e.effects),{component:!0,localOnly:!0}))}_removeComponent(e){this._components=this._components.filter((t=>t!==e)),this._idMap.delete(e.id),e.getMarks().forEach((e=>{this.getCompiler().removeRootMark(e)})),e.release()}updateSeriesSpec(e){this._spec.series.length===this._series.length?this._series.forEach((t=>{let n=this._spec.series[t.getSpecIndex()];fu(e,t.updateSpec(n))})):e.reMake=!0}getCanvas(){return this.getCompiler()?.getCanvas()??null}_updateLayoutRect(e){let t=this.getCanvasRect();if(e){this._viewBox=e;let{x1:n=0,y1:r=0,x2:i,y2:a}=e;t={width:i-n,height:a-r}}else this._viewBox={x1:0,y1:0,x2:t.width,y2:t.height};this._viewRect=t,this.padding=rs(this._paddingSpec,t,t),this._layoutRect.width=t.width-this.padding.left-this.padding.right,this._layoutRect.height=t.height-this.padding.top-this.padding.bottom,this._layoutRect.x=this.padding.left,this._layoutRect.y=this.padding.top,this._event.emit(K.layoutRectUpdate,{chart:this})}setCurrentTheme(){this.updateChartConfig({change:!0,reMake:!1},this._spec),this.resetLayoutItemTag(),this.setLayoutTag(!0,null,!1),this.updateGlobalScaleTheme(),this.reInit()}reInit(){[...this._regions,...this._series,...this._components].forEach((e=>{let t=e.getSpecInfo();t&&t.spec&&e.reInit(t.spec)}))}clear(){this.getAllModels().forEach((e=>e.clear?.call(e)))}compile(){this.compileBackground(),this.compileLayout(),this.compileRegions(),this.compileSeries(),this.compileComponents()}afterCompile(){this.getAllRegions().forEach((e=>{var t;(t=e.afterCompile)==null||t.call(e)})),this.getAllSeries().forEach((e=>{var t;(t=e.afterCompile)==null||t.call(e)})),this.getAllComponents().forEach((e=>{var t;(t=e.afterCompile)==null||t.call(e)}))}compileLayout(){let{width:e,height:t}=this.getCanvasRect();this.getCompiler().setSize(e,t)}compileBackground(){this._backgroundMark&&this._backgroundMark.compile()}compileRegions(){var e,t,n,r;(t=(e=this._option.performanceHook)?.beforeRegionCompile)==null||t.call(e,this._option.globalInstance),this.getAllRegions().forEach((e=>{e.compile()})),(r=(n=this._option.performanceHook)?.afterRegionCompile)==null||r.call(n,this._option.globalInstance)}compileSeries(){var e,t,n,r;(t=(e=this._option.performanceHook)?.beforeSeriesCompile)==null||t.call(e,this._option.globalInstance),this.getAllSeries().forEach((e=>{e.compile()})),(r=(n=this._option.performanceHook)?.afterSeriesCompile)==null||r.call(n,this._option.globalInstance)}compileComponents(){var e,t,n,r;(t=(e=this._option.performanceHook)?.beforeComponentCompile)==null||t.call(e,this._option.globalInstance),this.getAllComponents().forEach((e=>{e.compile()})),(r=(n=this._option.performanceHook)?.afterComponentCompile)==null||r.call(n,this._option.globalInstance)}release(e=!0){e&&[...this._components,...this._regions,...this._series].forEach((e=>{e.beforeRelease()})),this._event.release(),super.release(),this.clear(),[...this._components,...this._regions,...this._series].forEach((e=>{e.release()})),this._components=this._regions=this._series=[],this._spec={},this._dataSet=this._globalScale=this._layoutFunc=null,this._layoutTag=!1,this._idMap.clear()}onLayout(){this.layout()}updateState(e,t){let n=this.getAllSeries();for(let r in e){if(F(e[r]))continue;let i=e[r],a={stateValue:r};a=M(i.filter)?Object.assign({filter:i.filter},a):Object.assign(Object.assign({},i.filter),a),i.level&&(a.level=i.level),n.forEach((e=>{e.getMarks().forEach((n=>{n.stateStyle[r]&&(t&&!t(e,n,r)||(n.state.changeStateInfo(a),n.updateMarkState(r)))}))}))}}setSelected(e,t,n){this._setStateInDatum(Q.STATE_SELECTED,e,t,n)}setHovered(e,t,n){this._setStateInDatum(Q.STATE_HOVER,e,t,n)}clearState(e){this._interaction.clearByState(e)}clearAllStates(){this._interaction.clearAllStates()}clearSelected(){this.clearState(Q.STATE_SELECTED)}clearHovered(){this.clearState(Q.STATE_HOVER)}_initEvent(){[K.dataZoomChange,K.scrollBarChange].forEach((e=>{this._event.on(e,(({value:e})=>{this._disableMarkAnimation([`exit`,`update`]);let t=()=>{this._enableMarkAnimation([`exit`,`update`]),this._event.off(ol.AFTER_MARK_RENDER_END,t)};this._event.on(ol.AFTER_MARK_RENDER_END,t)}))}))}_enableMarkAnimation(e){this.getAllMarks().forEach((t=>t.enableAnimationByState(e)))}_disableMarkAnimation(e){this.getAllMarks().forEach((t=>t.disableAnimationByState(e)))}filterGraphicsByDatum(e,t={}){let n=(e=e?T(e):null)?Object.keys(e[0]):null,r=[],i=t.getDatum??el;return this.getRegionsInQuerier(t.region).forEach((a=>{let o=[];e&&a.getSeries().forEach((s=>{s.getMarks().forEach((c=>{let l=c.getGraphics();if(l&&l.length&&(!t.filter||M(t.filter)&&t.filter(s,c))){if($c(c.type))l.filter((l=>{let u=i(l,c,s,a);u&&e.every(((e,t)=>n.every((n=>e[n]==u[t][n]))))&&(o.push(l),r.push(l),t.callback&&t.callback(l,c,s,a))}));else if(e.length>1){let u=e.slice();l.forEach((e=>{let l=i(e,c,s,a),d=l&&u.findIndex((e=>n.every((t=>e[t]==l[t]))));d>=0&&(u.splice(d,1),o.push(e),r.push(e),t.callback&&t.callback(e,c,s,a))}))}else{let u=l.find((t=>{let r=i(t,c,s,a);return r&&n.every((t=>e[0][t]==r[t]))}));u&&(o.push(u),r.push(u),t.callback&&t.callback(u,c,s,a))}}}))})),t.regionCallback&&t.regionCallback(o,a)})),r}_setStateInDatum(e,t,n,r){if(!t)return void this._interaction.clearByState(e);let i=this.filterGraphicsByDatum(t,{filter:n,region:r});this._interaction.updateStateOfGraphics(e,i)}setDimensionIndex(e,t){var n,r;let i=null;Array.from(this._event.getComposedEventMap().values()).forEach((n=>{let{eventType:r,event:a}=n;if(r===Wm.dimensionHover||r===Wm.dimensionClick){let n=a.dispatch(e,t);n!=null&&n.length&&(i=n)}}));let a=N(e)||!i||i.every((e=>St(e.axis.getScale().type)&&N(e.index))),o=a||i.every((e=>St(e.axis.getScale().type)&&e.data.every((e=>e.datum.length===0))));if(!1!==t.tooltip){let e=this.getComponentsByType(B.tooltip)[0];if(e?.getVisible()){if(a||o)(r=(n=e).hideTooltip)==null||r.call(n);else{let n={};i.forEach((e=>{let{axis:t,value:r,data:i}=e,a=t.getOrient()===`left`||t.getOrient()===`right`;i.forEach((e=>{let t=a?e.series.fieldY[0]:e.series.fieldX[0];n[t]=e.datum?.[0]?.[t]??r}))})),e.showTooltip(n,t.showTooltipOption)}}}if(!1!==t.crosshair){let e=this.getComponentsByType(B.cartesianCrosshair)[0];e&&e.clearAxisValue&&e.setAxisValue&&(a?e.hideCrosshair():e.showCrosshair(i))}}showCrosshair(e){let t=this.getComponentsByType(B.cartesianCrosshair)[0]??this.getComponentsByType(B.polarCrosshair)[0];if(!t)return;let n=this.getComponentsByKey(`axes`),r=[];n.forEach((t=>{let n=e(t);!1!==n&&r.push({axis:t,value:n})})),t.showCrosshair(r)}getColorScheme(){var e;return(e=this._option).getTheme?.call(e,`colorScheme`)}}})))()}var P_,F_;function I_(){return(I_=e((()=>{S(),v(),P_=(e,t)=>{let{regionId:n,regionIndex:r}=e.spec;if(h(n)){let e=T(n);return t.region?.filter((({spec:t})=>e.includes(t.id)))}if(h(r))return T(r).map((e=>t.region?.[e])).filter(h)},F_=(e,t)=>{let{seriesId:n,seriesIndex:r}=e.spec;if(h(n)){let e=T(n);return t.series?.filter((({spec:t})=>e.includes(t.id)))}if(h(r))return T(r).map((e=>t.series?.[e])).filter(h)}})))()}var L_,R_;function z_(){return(z_=e((()=>{j(),Ge(),v(),U(),V(),ji(),I_(),S(),tp(),L_={series:!0,label:!0,animationAppear:!0,animationEnter:!0,animationUpdate:!0,animationExit:!0,animationNormal:!0},R_=class{constructor(e){this._seriesRelatedSpecKeys=Object.assign({},L_),this._option=e,this.type=e.type,this.seriesType=e.seriesType}initChartSpec(e){return this.transformSpec(e),this.transformModelSpec(e)}transformSpec(e){e.region&&e.region.length!==0||(e.region=[{}]),e.tooltip===void 0&&(e.tooltip={}),h(e.stackInverse)&&e.region.forEach((t=>{!h(t.stackInverse)&&(t.stackInverse=e.stackInverse)})),h(e.stackSort)&&e.region.forEach((t=>{!h(t.stackSort)&&(t.stackSort=e.stackSort)}))}generateTransform(e,t){return(n,r,i)=>{let{spec:a,specPath:o,specInfoPath:s,type:c}=r,l=new n.transformerConstructor(Object.assign(Object.assign({},this._option),{type:c})),u=l.transformSpec(a,e,i),d=Object.assign(Object.assign({},r),u);t?d.theme=l.getTheme(a,e):xi(e,o,u.spec),xi(i,s??o,d)}}transformModelSpec(e){return this.createSpecInfo(e,this.generateTransform(e,!1))}createSpecInfo(e,t){var n;t||=this.generateTransform(e,!0);let r={};return this.forEachRegionInSpec(e,t,r),this.forEachSeriesInSpec(e,t,r),(n=r.series)==null||n.forEach(((e,t)=>{let n=(P_(e,r)??r.region??[])[0];n&&(n.seriesIndexes||=[],n.seriesIndexes.push(t),e.regionIndexes=n.regionIndexes.slice())})),this.forEachComponentInSpec(e,t,r),Object.values(r.component??{}).forEach((e=>e.forEach(((e,t)=>{if(e&&(e.regionIndexes||=(P_(e,r)??r.region??[]).map((e=>e.regionIndexes[0])),!e.seriesIndexes)){let t=F_(e,r);if(t)e.seriesIndexes=t.map((({seriesIndexes:e})=>e[0]));else{let t=/* @__PURE__ */ new Set;(e.regionIndexes??[]).forEach((e=>{var n;(n=r.region?.[e]?.seriesIndexes)==null||n.forEach((e=>t.add(e)))})),e.seriesIndexes=Array.from(t)}}})))),r}_isValidSeries(e){return!0}getSeriesRelatedSpecKeys(){return this._seriesRelatedSpecKeys}_addSeriesRelatedSpecKeys(...e){e.forEach((e=>{e?.forEach((e=>{this._seriesRelatedSpecKeys[e]=!0}))}))}_getDefaultSeriesSpec(e,t,n){var r;this._addSeriesRelatedSpecKeys(t,n);let i={dataKey:e.dataKey,hover:e.hover,select:e.select,label:e.label,seriesStyle:e.seriesStyle,animation:e.animation??this._option.globalInstance?.isAnimationEnable(),animationThreshold:e.animationThreshold??(r=this._option).getTheme?.call(r,`animationThreshold`),animationAppear:e.animationAppear,animationDisappear:e.animationDisappear,animationEnter:e.animationEnter,animationUpdate:e.animationUpdate,animationExit:e.animationExit,animationNormal:e.animationNormal,animationState:e.animationState,extensionMark:e.extensionMark,large:e.large,largeThreshold:e.largeThreshold,progressiveStep:e.progressiveStep,progressiveThreshold:e.progressiveThreshold,background:e.seriesBackground,invalidType:e.invalidType,seriesField:e.seriesField,morph:e.morph,interactions:e.interactions},a=this.seriesType;return a&&(this._addSeriesRelatedSpecKeys([a]),i.type=a,i[a]=e[a]),t&&t.length&&t.forEach((t=>{i[t]=e[t]})),n&&n.length&&n.forEach((t=>{i[t]=e[t]})),i}forEachRegionInSpec(e,t,n){return(e.region??[]).map(((e,r)=>t(H.getRegionInType(`region`),{spec:e,specPath:[`region`,r],type:`region`,regionIndexes:[r]},n)))}forEachSeriesInSpec(e,t,n){return(e.series??[]).map(((e,r)=>t(H.getSeriesInType(e.type),{spec:e,specPath:[`series`,r],type:e.type,seriesIndexes:[r]},n)))}forEachComponentInSpec(e,t,n){var r,i;let a=[],o=H.getComponents(),s,c,l,u,d=[];for(let t=0;t<o.length;t++){let{cmp:n,alwaysCheck:r}=o[t];n.type.startsWith(B.cartesianAxis)?s=n:n.type.startsWith(B.polarAxis)?c=n:n.type===B.geoCoordinate?l=n:(r||e[n.specKey??n.type])&&(n.type===B.tooltip?u=n:d.push(o[t]))}let f=!1;if(s){let r=s.getSpecInfo(e,n);r?.length>0&&(f=!0,r.forEach((e=>{let r=H.getComponentInKey(e.type);a.push(t(r,e,n))})))}if(c&&!f){let r=c.getSpecInfo(e,n);r?.length>0&&(f=!0,r.forEach((e=>{let r=H.getComponentInKey(e.type);a.push(t(r,e,n))})))}return l&&!f&&((r=l.getSpecInfo(e,n))==null||r.forEach((e=>{a.push(t(l,e,n))}))),d.sort(((e,t)=>e.createOrder-t.createOrder)),d.forEach((({cmp:r})=>{var i;(i=r.getSpecInfo?r.getSpecInfo(e,n):ep(e,r.specKey,r.type))==null||i.forEach((e=>{a.push(t(r,e,n))}))})),u&&((i=ep(e,u.specKey,u.type))==null||i.forEach((e=>{a.push(t(u,e,n))}))),a}transformSeriesSpec(e){let t=this._getDefaultSeriesSpec(e);e.series&&e.series.length!==0?e.series.forEach((e=>{this._isValidSeries(e.type)&&Object.keys(t).forEach((n=>{n in e||(e[n]=t[n])}))})):e.series=[t]}_findBandAxisBySeries(e,t,n){let r=e?.direction===`horizontal`?[`left`,`right`]:[`top`,`bottom`];return n.find((n=>{if(!r.includes(n.orient))return!1;if(h(n.seriesId)){if(T(n.seriesId).includes(e?.id))return!0}else if(h(n.seriesIndex)){if(T(n.seriesIndex).includes(t))return!0}else if(n.type===`band`)return!0;return!0}))}_applyAxisBandSize(e,t,n){let{barMaxWidth:r,barMinWidth:i,barWidth:a,barGapInGroup:o}=n,s=!1;ft(i)?(e.minBandSize=i,s=!0):ft(a)?(e.minBandSize=a,s=!0):ft(r)&&(e.minBandSize=r,s=!0),s&&(e.bandSizeLevel=Number.MAX_VALUE,e.bandSizeExtend={extend:t,gap:A(o)?o[o.length-1]:o})}}})))()}var B_;function V_(){return(V_=e((()=>{vt(),E(),z_(),hu(),_i(),B_=class extends R_{needAxes(){return!0}_isValidSeries(e){return!this.seriesType||e===this.seriesType}_getDefaultSeriesSpec(e,t){return super._getDefaultSeriesSpec(e,[`xField`,`yField`,`zField`,`direction`,`stack`,`percent`,`stackOffsetSilhouette`,`totalLabel`,`sortDataByAxis`],t)}transformSpec(e){super.transformSpec(e),super.transformSeriesSpec(e),this._transformAxisSpec(e)}_setDefaultXAxisSpec(e){return{orient:`bottom`}}_setDefaultYAxisSpec(e){return{orient:`left`}}_setDefaultZAxisSpec(e){return{orient:`z`}}_transformAxisSpec(e){if(this.needAxes()){e.axes||=[];let t={x:!1,y:!1,z:!1};e.axes.forEach((n=>{let{orient:r}=n,i=null;r!==`top`&&r!==`bottom`||(t.x=!0,i=this._setDefaultXAxisSpec(e)),r!==`left`&&r!==`right`||(t.y=!0,i=this._setDefaultYAxisSpec(e)),r===`z`&&(t.z=!0,i=this._setDefaultZAxisSpec(e)),i&&Object.keys(i).forEach((e=>{N(n[e])&&(n[e]=i[e])})),Ve(n,`trimPadding`)&&R(n,pu(this.type,e))})),t.x||e.axes.push(this._setDefaultXAxisSpec(e)),t.y||e.axes.push(this._setDefaultYAxisSpec(e)),e.zField&&!t.z&&e.axes.push(this._setDefaultZAxisSpec(e))}}}})))()}var H_;function U_(){return(U_=e((()=>{o(),E(),H_=(e,t)=>{let n={nodes:{}},{fields:r}=M(t)?t():t;if(!r?.length)return n;let i=r.length-1,a,o,s=n;return e.forEach((e=>{e.latestData&&e.latestData.forEach((e=>{s=n;for(let t=0;t<r.length;t++){let n=r[t],c=e[n];if(N(c))break;s.groupField=n,s.nodes[c]||(t===i?s.nodes[c]={values:[]}:(a={nodes:{}},s.nodes[c]=a)),t===i?(o=s.nodes[c],o.values.push(e)):s=s.nodes[c]}}))})),n}})))()}var W_,G_;function K_(){return(K_=e((()=>{Y(),Lc(),U_(),W_=class{constructor(e,t){this.stackRegion=({model:e})=>{var t;let n=e.getSeries();if(!n.some((e=>e.getStack())))return;let r=n.some((e=>!!e.getSpec()?.totalLabel?.alwayCalculateTotal||e.getSpec()?.totalLabel?.visible)),i=r||n.some((e=>e.getPercent())),a=n.some((e=>e.getStackOffsetSilhouette())),o=jc(e,!0);for(let t in o)for(let n in o[t].nodes)Fc(o[t].nodes[n],e.getStackInverse(),i,r);if(a)for(let e in o)for(let t in o[e].nodes)Pc(o[e].nodes[t]);r&&e.getSeries().forEach((e=>{let t=e.getStackData(),n=e.getStackValue(),r=e.getStackValueField();t&&r&&Nc(o[n],r)})),(t=this._options)!=null&&t.afterStackRegion&&this._options.afterStackRegion(e,o)},this._chart=e,this._options=t}init(){this._chart.getAllRegions().forEach((e=>{e.event.on(K.regionSeriesDataFilterOver,{filter:({model:t})=>t?.id===e.id},this.stackRegion)}))}stackAll(){this._chart.getAllRegions().forEach((e=>{this.stackRegion({model:e})}))}},G_=class{_beforeInit(){this._dataSet&&X(this._dataSet,`stackSplit`,H_)}_initStack(){this._stack=new W_(this),this._stack.init()}}})))()}var q_,J_,Y_;function X_(){return(X_=e((()=>{j(),Gm(),td(),rl(),Of(),U(),q_={state:Q.STATE_DIMENSION_HOVER,reverseState:Q.STATE_DIMENSION_HOVER_REVERSE,trigger:Wm.dimensionHover},J_=class extends Df{constructor(e){super(e),this.type=`dimension-hover`,this._resetType=[],this.resetAll=()=>{let{state:e,reverseState:t,interaction:n}=this.options,r=n.getStatedGraphics(this);r&&r.length&&(n.clearAllStatesOfTrigger(this,e,t),this.dispatchEvent(`reset`,{graphics:r,options:this.options}),n.setStatedGraphics(this,[]))},this.handleStart=e=>{let t=this.options.interaction;switch(e.action){case`enter`:let n=this.getStatedGraphics(e);t.updateStates(this,this.getStatedGraphics(e),t.getStatedGraphics(this),this.options.state,this.options.reverseState),t.setStatedGraphics(this,n);break;case`leave`:t.clearAllStatesOfTrigger(this,this.options.state,this.options.reverseState),t.setStatedGraphics(this,[])}},this.options=Object.assign({},q_,e),this.updateMarkIdByState([this.options.state,this.options.reverseState])}getStartState(){return this.options.state}getResetState(){return this.options.reverseState}getEvents(){return[{type:this.options.trigger,handler:this.handleStart}]}getStatedGraphics(e,t=!1){let n=this.getMarksByState(t?this.options.reverseState:this.options.state),r=[];return e.dimensionInfo.forEach((e=>{e.data.forEach((e=>{n.filter((t=>t.model===e.series&&t.getVisible())).forEach((n=>{let i=n.getGraphics();if(!i||!i.length)return;let a=i.filter((n=>{let r=el(n),i;return i=A(r)?r.every(((t,n)=>t===e.datum[n])):e.datum.some((e=>e===r)),t?!i:i}));r.push(...a)}))}))})),r}},J_.type=`dimension-hover`,J_.defaultOptions=q_,Y_=()=>{H.registerInteractionTrigger(J_.type,J_)}})))()}var Z_;function Q_(){return(Q_=e((()=>{U(),Um(),Gm(),Nm(),Z_=()=>{H.registerComposedEvent(Wm.dimensionHover,Hm),H.registerComposedEvent(Wm.dimensionClick,Mm)}})))()}var $_,ev,tv,nv,rv,iv,av,ov;function sv(){return(sv=e((()=>{Ke(),Vm(),E(),km(),$_=e=>e.fieldX[0],ev=e=>e.fieldY[0],tv=e=>[e.fieldX[0],e.fieldX2??e.fieldX[1]],nv=e=>[e.fieldY[0],e.fieldY2??e.fieldY[1]],rv=(e,t)=>e?t?$_:tv:t?ev:nv,iv=(e,t,n)=>{if(!e)return null;let{x:r,y:i}=t,a=Bm(e,(e=>$(e.getOrient())),t)??[],o=Bm(e,(e=>xm(e.getOrient())),t)??[];if(!a.length&&!o.length)return null;let s=/* @__PURE__ */ new Set,c=/* @__PURE__ */ new Set,l=/* @__PURE__ */ new Set;[a,o].forEach((e=>e.forEach((e=>{St(e.getScale().type)?s.add(e):c.add(e),n&&e.getSpec().hasDimensionTooltip&&l.add(e)}))));let u=[],d=e=>{let t=e===`x`,n=t?r:i;(t?a:o).forEach((e=>{if(l.size>0){if(l.has(e)){let r=av(e,n,rv(t,St(e.getScale().type)));r&&u.push(r)}}else{let r=s.size>0;if((r?s:c).has(e)){let i=av(e,n,rv(t,r));i&&u.push(i)}}}))};return e.getSpec().direction===`horizontal`?(d(`y`),u.length===0&&d(`x`)):(d(`x`),u.length===0&&d(`y`)),u.length?u:null},av=(e,t,n)=>{let r=e.positionToData(t,!0);return N(r)?null:ov(e,r,n)},ov=(e,t,n)=>{let r=e.getScale();if(N(t))return null;let i=r.domain().findIndex((e=>e?.toString()===t.toString()));i<0&&(i=void 0);let a=Rm(t,e,`cartesian`,n??($(e.getOrient())?$_:ev));return{index:i,value:t,position:r.scale(t),axis:e,data:a}}})))()}var cv,lv,uv,dv,fv,pv;function mv(){return(mv=e((()=>{Ke(),ig(),Ih(),v(),tp(),cv=(e,t,n,r=!1)=>(n||={x:0,y:0},Object.keys(e).forEach((i=>{let{currentValue:a,cacheInfo:o,labelsComp:s,attributes:c,coordKey:l}=e[i],u=null,d=0,f=null;if(a.size){let e=Array.from(a.values())[0];d=e.axis.getScale().scale(e.datum)+e.axis.getLayoutStartPoint()[l]-n[l],u=e.axis,f=(((((u.getVRenderComponents()[0]?.children[0])?.children[0])?.children[0])?.getChildByName(`axis-label-container`))?.getChildByName(`axis-label-container-layer-0`))?.children[0]}let p=!!a.size&&Number.isFinite(d)&&!Number.isNaN(d),m=r&&!p&&h(o),g=m?o:{coordRange:[0,0],sizeRange:[0,0],coord:d,labelsTextStyle:{},labels:s?Object.keys(s).reduce(((e,t)=>(e[t]={visible:!1,text:``,dx:0,dy:0},e)),{}):null,visible:p,axis:u,axisLabel:f},_;g&&(g._isCache=m);let v=0;if(c&&a.forEach((({axis:e,datum:n=``})=>{var r,a,o,s,u,p,h,y;let ee=null,te=e.getScale();if(St(te.type))_=te.bandwidth(),_===0&&te.step&&(v=te.step());else if(k(te.type)){let r=i===`xField`?t.fieldX[0]:t.fieldY[0],a=i===`xField`?t.fieldX2:t.fieldY2,o=t.getStack()&&l===(t.direction===`horizontal`?`x`:`y`)?null:tg(t.getViewData().latestData,+n,r,a);if(o){let e=i===`xField`?t.dataToPositionX(o):t.dataToPositionY(o);if(a){let s=i===`xField`?t.dataToPositionX1(o):t.dataToPositionY1(o);_=Math.abs(e-s),d=Math.min(e,s);let c=o[r],l=o[a];n=+c<=+l?`${c} ~ ${l}`:`${l} ~ ${c}`}else _=1,d=e}ee=e.niceLabelFormatter}if(g&&c.label?.visible&&!m){let t=kh(e.getSpec()),i=e.getOrient(),l=c.label?.syncAxisLabelAngle;g.labels[i]&&(g.labels[i].visible=!0,g.labels[i].text=n,i===`left`?(g.labels[i].dx=-t,g.labelsTextStyle[i]={textAlign:l&&f&&(r=f.attribute.textAlign)!=null?r:`right`,textBaseline:l&&f&&(a=f.attribute.textBaseline)!=null?a:`middle`}):i===`right`?(g.labels[i].dx=t,g.labelsTextStyle[i]={textAlign:l&&f&&(o=f.attribute.textAlign)!=null?o:`left`,textBaseline:l&&f&&(s=f.attribute.textBaseline)!=null?s:`middle`}):i===`top`?(g.labels[i].y=0,g.labels[i].dy=-t,g.labelsTextStyle[i]={textAlign:l&&f&&(u=f.attribute.textAlign)!=null?u:`center`,textBaseline:l&&f&&(p=f.attribute.textBaseline)!=null?p:`bottom`}):i===`bottom`&&(g.labels[i].dy=t,g.labelsTextStyle[i]={textAlign:l&&f&&(h=f.attribute.textAlign)!=null?h:`center`,textBaseline:l&&f&&(y=f.attribute.textBaseline)!=null?y:`top`}),g.labels[i].defaultFormatter=ee)}})),g&&!m){let e={x1:1/0,y1:1/0,x2:-1/0,y2:-1/0};uv(e,a),i===`xField`?(g.coordRange=[e.x1,e.x2],g.sizeRange=[e.y1,e.y2],g.coord=d+n.x,g.labels&&(g.labels.top.y=e.y1,g.labels.bottom.y=e.y2)):(g.coordRange=[e.y1,e.y2],g.sizeRange=[e.x1,e.x2],g.coord=d+n.y,g.labels&&(g.labels.left.x=e.x1,g.labels.right.x=e.x2)),(g.coord<g.coordRange[0]||g.coord>g.coordRange[1])&&(g.visible=!1),c&&c.label&&Object.keys(g.labels).forEach((e=>{g.labels[e].visible&&lv(g.labels[e],e,c.label)}))}e[i].bandSize=_??0,e[i].offsetSize=v,e[i].cacheInfo=g})),e),lv=(e,t,n)=>{let{formatMethod:r,formatter:i}=n,{formatFunc:a,args:o}=$f(r,i,e.text,{label:e.text,position:t});a?e.text=a(...o):e.defaultFormatter&&(e.text=e.defaultFormatter(e.text))},uv=(e,t)=>{t.forEach((({axis:t})=>{t.getRegions().forEach((t=>{let{x:n,y:r}=t.getLayoutStartPoint(),{width:i,height:a}=t.getLayoutRect();e.x1=Math.min(e.x1,n),e.y1=Math.min(e.y1,r),e.x2=Math.max(e.x2,n+i),e.y2=Math.max(e.y2,r+a)}))}))},dv=e=>{let{cacheInfo:t,attributes:n,bandSize:r,offsetSize:i,coordKey:a,anotherAxisKey:o}=e,{coord:s,sizeRange:c}=t,l=n.type,u;if(l===`line`){let e=s+r/2;u={visible:!0,start:{[a]:e,[o]:c[0]},end:{[a]:e,[o]:c[1]}}}else if(l===`rect`){let[e,l]=fv(n,r,i,t.axis),{coordRange:d}=t;u={visible:!0,start:{[a]:Math.max(s+e,d[0]),[o]:c[0]},end:{[a]:Math.min(s+l,d[1]),[o]:c[1]}}}return u},fv=(e,t,n,r)=>{let i=t===0?n:t,a=i;if(e.style?.sizePercent)a=i*e.style.sizePercent;else if(typeof e.style?.size==`number`)a=e.style.size;else if(typeof e.style?.size==`function`){let t=r.getLayoutRect();a=e.style.size(t,r)}return t===0?[-a/2,a/2]:[t/2-a/2,a/2+t/2]},pv=(e,t)=>{let n=/* @__PURE__ */ new Map,r=/* @__PURE__ */ new Map,{series:i,datum:a}=e,o=i.direction===`horizontal`,s=(o?i.getYAxisHelper():i.getXAxisHelper()).getAxisId(),c=i.getChart().getComponentsByKey(`axes`).find((e=>e.id===s));if(!c)return;(o?r:n).set(c.getSpecIndex(),{datum:i.getDatumPositionValues(a[0],i.getDimensionField())?.[0],axis:c});let l={xField:{coordKey:`x`,anotherAxisKey:`y`,currentValue:n,attributes:{visible:!!n.size,type:`rect`}},yField:{coordKey:`y`,anotherAxisKey:`x`,currentValue:r,attributes:{visible:!!r.size,type:`rect`}}};return cv(l,i,t),l.xField.cacheInfo?dv(l.xField):l.yField.cacheInfo?dv(l.yField):void 0}})))()}var hv,gv,_v;function vv(){return(vv=e((()=>{v(),_p(),hv=[`updateTitle`,`updateContent`,`updatePosition`,`maxLineCount`,`othersLine`],gv=(e,t,n,r,i)=>{let a={activeType:e};switch(e){case`mark`:case`group`:if(n){let o=n.getSpec()?.tooltip;return a.visible=!0,o!=null&&o.handler&&(a.handler=o.handler),a.handler?.showTooltip?a:(o!=null&&o[e]&&hv.forEach((t=>{h(o[e][t])&&(a[t]=o[e][t])})),Object.assign(Object.assign({},a),n.tooltipHelper.getTooltipData(e,t,r,r[0].datum,i)))}break;case`dimension`:if(r?.length){if(a.visible=!_v(r).every((e=>!hp(`dimension`,e.tooltipHelper?.spec))),a.handler=t.handler,a.handler?.showTooltip)return a;let n=[];return r.forEach((a=>a.data.forEach((a=>{let{series:o}=a,s=o.tooltipHelper.getTooltipData(e,t,r,a.datum,i);s&&n.push(s)})))),fp(n)}}return null},_v=e=>{let t=[];return e.forEach((e=>{e.data.forEach((e=>{h(e.series)&&t.push(e.series)}))})),t}})))()}var yv,bv,xv,Sv;function Cv(){return(Cv=e((()=>{uc(),yv={dom:`${W}_TOOLTIP_HANDLER_DOM`,canvas:`${W}_TOOLTIP_HANDLER_CANVAS`},bv=`vchart-tooltip-element`,xv={key:`其他`,value:`...`},(function(e){e.group=`group`,e.mark=`mark`,e.dimension=`dimension`})(Sv||={})})))()}var wv;function Tv(){return(Tv=e((()=>{E(),v(),Y(),vv(),_p(),Cv(),wv=class{constructor(e){this._showTooltipByHandler=(e,t)=>{var n;if(N(e))return 1;t.changePositionOnly||this.clearCache(),this._updateViewSpec(e,t);let r=this._cacheActiveSpec;if(N(r)||!1===r.visible)return 1;t.tooltipSpec=this.component.getSpec(),t.activeTooltipSpec=r;let{title:i,content:a}=r,o=N(i?.key)&&N(i?.value)&&!a?.length;if(this.component.event.emit(K.tooltipShow,Object.assign(Object.assign({},t),{isEmptyTooltip:o,tooltipData:e,activeType:this.activeType,tooltip:this.component})),o)return 1;let s;return r.handler?.showTooltip?s=r.handler.showTooltip.bind(r.handler):(n=this.component.tooltipHandler)!=null&&n.showTooltip&&(s=this.component.tooltipHandler.showTooltip.bind(this.component.tooltipHandler)),s?s(this.activeType,e,t)??0:1},this.component=e}_preprocessDimensionInfo(e){let t=[];if(e?.forEach((e=>{let n=Object.assign(Object.assign({},e),{data:e.data.filter((({series:e})=>!1!==e.getSpec()?.tooltip?.visible))});n.data.length>0&&t.push(n)})),t.length>0)return t}_updateViewSpec(e,t){let{changePositionOnly:n,model:r}=t;if(!n||!this._cacheActiveSpec){let n=this.component.getSpec();if(this._cacheActiveSpec=gv(this.activeType,this.component.getSpec(),r,e,t),this._cacheActiveSpec){N(this._cacheActiveSpec.handler)&&h(n.handler)&&(this._cacheActiveSpec.handler=n.handler);let r=n[this.activeType]??{},i=this._cacheActiveSpec.updateTitle??r.updateTitle,a=this._cacheActiveSpec.updateContent??r.updateContent,o=this._cacheActiveSpec.maxLineCount??r.maxLineCount??20;if(i&&(this._cacheActiveSpec.title=i(this._cacheActiveSpec.title,e,t)??this._cacheActiveSpec.title),a)this._cacheActiveSpec.content=a(this._cacheActiveSpec.content,e,t)??this._cacheActiveSpec.content;else if(o>=1&&this._cacheActiveSpec.content?.length>o){let e=this._cacheActiveSpec.othersLine??r.othersLine,t=e?Object.assign(Object.assign({},xv),e):xv;this._cacheActiveSpec.content=[...this._cacheActiveSpec.content.slice(0,o-1),Object.assign(Object.assign({},this._cacheActiveSpec.content[o-1]),t)]}}}}shouldHandleTooltip(e,t){return!!this.component.enable&&!N(t)&&hp(this.activeType,e.model?.tooltipHelper?.spec)}clearCache(){this._cacheActiveSpec=void 0}}})))()}var Ev,Dv;function Ov(){return(Ov=e((()=>{Tv(),v(),Ke(),U(),Ev=class extends wv{constructor(){super(...arguments),this.activeType=`dimension`}showTooltip(e,t,n){let r=Object.assign(Object.assign({},t),{dimensionInfo:this._preprocessDimensionInfo(e),changePositionOnly:n,tooltip:this.component});return this._showTooltipByHandler(e,r)}_getDimensionInfo(e){var t;let n,r=this.component.getChart(),i=r.getCompiler().getStage().getLayer(void 0),a={x:e.event.viewX,y:e.event.viewY};if(i.globalTransMatrix.transformPoint({x:e.event.viewX,y:e.event.viewY},a),n=(t=this.component.getOption()).getDimensionInfo?.call(t,r,a,!0)??[],n.length===0)n=void 0;else if(n.length>1){let e=n.filter((e=>{let t=e.axis;if(t.getSpec().hasDimensionTooltip)return!0;if(!St(t.getScale().type))return!1;let n;for(let e of t?.getRegions()??[]){for(let t of e.getSeries())if(t.coordinate===`cartesian`){n=t;break}if(h(n))break}return h(n)&&n.getDimensionField()[0]===n.fieldY[0]?t.getOrient()===`left`||t.getOrient()===`right`:t.getOrient()===`bottom`||t.getOrient()===`top`}));if(n=e.length?e:n.slice(0,1),n.length>1){let e=/* @__PURE__ */ new Set;n.forEach((t=>{t.data=t.data.filter((({key:t})=>!e.has(t)&&(e.add(t),!0)))}))}}return n}getMouseEventData(e){return{tooltipInfo:this._getDimensionInfo(e),ignore:!1}}},Dv=()=>{H.registerTooltipProcessor(`dimension`,Ev)}})))()}var kv,Av;function jv(){return(jv=e((()=>{Tv(),dn(),rl(),U(),kv=class extends wv{constructor(){super(...arguments),this.activeType=`mark`}showTooltip(e,t,n){let{datum:r,series:i}=e,a=this.component.getSpec(),o=[{datum:[r],series:i}],s=i.tooltipHelper,c=(i.getSpec()?.tooltip)?.mark?.checkOverlap,l=!1;if(!0===c||!0===a.mark?.checkOverlap&&!1!==c){let e=s?.activeTriggerSet.mark;if(e){l=!0;let n=this.component.getChart().getCompiler().getStage().getLayer(void 0),r={x:t.event.viewX,y:t.event.viewY};n.globalTransMatrix.transformPoint({x:t.event.viewX,y:t.event.viewY},r),e.forEach((e=>{e.getGraphics().forEach((e=>{e!==t.node&&e&&e.containsPoint(r.x,r.y,lr.GLOBAL,e.stage.getPickerService())&&o[0].datum.push(el(e))}))}))}}let u=Object.assign(Object.assign({},t),{model:i,changePositionOnly:n,tooltip:this.component});if(n&&l){let e=this._cacheActiveSpec&&this._cacheActiveSpec.data;e&&e[0].series===o[0].series&&e[0].datum.length===o[0].datum.length&&!e[0].datum.some(((e,t)=>e!==o[0].datum[t]))||(u.changePositionOnly=!1)}return this._showTooltipByHandler(o,u)}getMouseEventData(e){let t,n,r=e.model?.modelType;if(r===`series`){let r=e.model,i=r.tooltipHelper,a=i?.activeTriggerSet.mark,o=i?.ignoreTriggerSet.mark;a?.has(e.mark)?t={mark:e.mark,datum:e.datum,series:r}:o!=null&&o.has(e.mark)&&(n=!0)}else if(r===`component`){let r=e.model,i=e.node;if(r.name===`label`&&i){let{baseMark:e,series:a,labelMark:o}=r.getLabelInfoByTextGraphic(i)??{},s=a.tooltipHelper,c=s?.activeTriggerSet.mark,l=s?.ignoreTriggerSet.mark;c?.has(o)?t={mark:e,datum:i.attribute.data,series:a}:l!=null&&l.has(o)&&(n=!0)}}return{tooltipInfo:t,ignore:n}}},Av=()=>{H.registerTooltipProcessor(`mark`,kv)}})))()}var Mv,Nv;function Pv(){return(Pv=e((()=>{Tv(),S(),U(),Mv=class extends wv{constructor(){super(...arguments),this.activeType=`group`}showTooltip(e,t,n){let{datum:r,series:i}=e,a=[{datum:T(r),series:i}],o=Object.assign(Object.assign({},t),{groupDatum:this._getGroupDatum(t),changePositionOnly:n,tooltip:this.component});return this._showTooltipByHandler(a,o)}getMouseEventData(e){let t;if(e.model?.modelType===`series`){let n=e.model;if((n.tooltipHelper?.activeTriggerSet.group)?.has(e.mark)){let r=this.component.getSpec()[this.activeType];(r?.triggerMark?T(r.triggerMark):[]).includes(e.mark?.name)&&(t={mark:e.mark,datum:e.datum,series:n})}}return{tooltipInfo:t,ignore:!1}}_getGroupDatum(e){let{model:t,mark:n,datum:r}=e,i=t;if([`line`,`area`].includes(n.type))return T(r);let a=i.getViewData().latestData,o=i.getSeriesField();if(!o)return a;let s=T(r)[0][o];return a.filter((e=>e[o]===s))}},Nv=()=>{H.registerTooltipProcessor(`group`,Mv)}})))()}var Fv,Iv,Lv;function Rv(){return(Rv=e((()=>{U(),ih(),yf(),si(),Ei(),Pa(),Fv=[...nh,`fill`,`fillOpacity`,`background`,`texture`,`texturePadding`,`textureSize`,`textureColor`],Iv=class e extends rh{constructor(){super(...arguments),this.type=e.type,this._isValidPointChannel=e=>[`x`,`y`,`x1`,`y1`,`defined`].includes(e)}_getDefaultStyle(){return Object.assign(Object.assign({},super._getDefaultStyle()),{lineWidth:0})}_getSegmentAttributes(){return Fv}_getIgnoreAttributes(){return[]}},Iv.type=`area`,Lv=()=>{H.registerMark(Iv.type,Iv),Wt(),ir(),Ar(),Bi(),gf(),H.registerGraphicComponent(`area`,ui)}})))()}var zv,Bv;function Vv(){return(Vv=e((()=>{Et(),km(),v(),s(),xo(),o_(),V(),bd(),U(),Tg(),Ih(),_i(),rr(),on(),vr(),hg(),Lg(),Bg(),zv=class extends i_{constructor(){super(...arguments),this.type=B.cartesianTimeAxis,this._zero=!1,this.effect={scaleUpdate:e=>{this.computeData(e?.value),vo(this._regions,(e=>{$(this.getOrient())?Nh(e.getXAxisHelper(),this.axisHelper(),h(this._seriesUserId)||h(this._seriesIndex))&&e.setXAxisHelper(this.axisHelper()):Nh(e.getYAxisHelper(),this.axisHelper(),h(this._seriesUserId)||h(this._seriesIndex))&&e.setYAxisHelper(this.axisHelper())}),{userId:this._seriesUserId,specIndex:this._seriesIndex})}}}setAttrFromSpec(){super.setAttrFromSpec(),this._tick=R({},this._spec.tick,this._spec.layers?.[0])}_initData(){if(super._initData(),this._spec.layers?.[1]){let e=new Ne(this._option.dataSet,{name:`${this.type}_${this.id}_layer_1_ticks`}).parse(this._scale,{type:`scale`}).transform({type:`${this.type}-ticks`,options:Object.assign(Object.assign({},this._tickTransformOption()),{tickCount:this._spec.layers[1].tickCount,forceTickCount:this._spec.layers[1].forceTickCount,tickStep:this._spec.layers[1].tickStep})},!1);this._layerTickData=new yd(this._option,e)}}computeData(e){super.computeData(e),this._layerTickData&&(this._layerTickData.getDataView().reRunAllTransform(),this._layerTickData.updateData())}created(){super.created(),this._layerTickData&&(this._axisMark&&this._layerTickData.addRelatedMark(this._axisMark),this._gridMark&&this._layerTickData.addRelatedMark(this._gridMark))}_getLabelFormatMethod(){let e=At.getInstance(),t=this._spec.layers?.[1]?.timeFormat||`%Y%m%d`,n=(this._spec.layers?.[1]?.timeFormatMode||`local`)===`local`?e.timeFormat:e.timeUTCFormat,r=this._spec.layers?.[0]?.timeFormat||`%Y%m%d`,i=(this._spec.layers?.[0]?.timeFormatMode||`local`)===`local`?e.timeFormat:e.timeUTCFormat;return(e,a,o,s,c)=>{let l;return l=c===0?i(r,e):n(t,e),this._spec.label?.formatMethod?this._spec.label.formatMethod(l,a):l}}getLabelItems(e){let t=[],n=this.getTickData()?.getLatestData();n&&n.length&&t.push(n.map((t=>Mh(t.value,this._getNormalizedValue([t.value],e)))));let r=this._layerTickData?.getLatestData();return r&&r.length&&t.push(r.map((t=>Mh(t.value,this._getNormalizedValue([t.value],e))))),t}registerTicksTransform(){let e=`${this.type}-ticks`;return X(this._option.dataSet,e,ln),e}transformScaleDomain(){}},zv.type=B.cartesianTimeAxis,zv.specKey=`axes`,zv.builtInTheme={axis:Ig,axisX:Rg,axisY:zg},Bv=()=>{H.registerGraphicComponent(pg.lineAxis,((e,t)=>new dr(e,t))),H.registerGraphicComponent(mg.lineAxisGrid,((e,t)=>new _n(e,t))),wg(),H.registerComponent(zv.type,zv)}})))()}var Hv,Uv;function Wv(){return(Wv=e((()=>{o_(),V(),t_(),ct(),U(),Tg(),rr(),on(),vr(),hg(),Lg(),r_(),Bg(),Hv=class extends i_{constructor(){super(...arguments),this.type=B.cartesianLogAxis,this._zero=!1,this._scale=new Me}initScales(){super.initScales(),this._scale.base(this._spec.base??10),this._scale.clamp(!0,null,!1)}registerTicksTransform(){let e=`${this.type}-ticks`;return X(this._option.dataSet,e,ln),e}transformScaleDomain(){}},Hv.type=B.cartesianLogAxis,Hv.specKey=`axes`,Hv.builtInTheme={axis:Ig,axisLinear:n_,axisX:Rg,axisY:zg},ne(Hv,e_),Uv=()=>{H.registerGraphicComponent(pg.lineAxis,((e,t)=>new dr(e,t))),H.registerGraphicComponent(mg.lineAxisGrid,((e,t)=>new _n(e,t))),wg(),H.registerComponent(Hv.type,Hv)}})))()}function Gv(e,t=!0){return(n,r,i)=>{let a=e.direction===`vertical`?e.yField:e.xField,o=n?.[a];return e.direction===`vertical`?{overall:t&&e.growFrom(),orient:o>0?`negative`:`positive`}:{overall:!!t&&e.growFrom(),orient:o>0?`positive`:`negative`}}}function Kv(e,t){if(!1===t)return{};switch(t){case`fadeIn`:return Yv;case`scaleIn`:return Xv;default:return qv(e)}}var qv,Jv,Yv,Xv,Zv;function Qv(){return(Qv=e((()=>{U(),yf(),qv=(e,t=!0)=>({type:e.direction===`horizontal`?`growWidthIn`:`growHeightIn`,options:Gv(e,t)}),Jv=(e,t=!0)=>({type:e.direction===`horizontal`?`growWidthOut`:`growHeightOut`,options:Gv(e,t)}),Yv={type:`fadeIn`},Xv={type:`growCenterIn`},Zv=()=>{H.registerAnimation(`bar`,((e,t)=>({appear:Kv(e,t),enter:qv(e,!1),exit:Jv(e,!1),disappear:{duration:af.disappear.duration}})))}})))()}var $v,ey;function ty(){return(ty=e((()=>{U(),Id(),yf(),Dn(),Pa(),$v=class e extends Fd{constructor(){super(...arguments),this.type=e.type}_getDefaultStyle(){return Object.assign(Object.assign({},super._getDefaultStyle()),{width:void 0,height:void 0,lineWidth:0})}},$v.type=`rect`,ey=()=>{Wt(),In(),jn(),H.registerMark($v.type,$v),mf(),H.registerGraphicComponent(`rect`,fa)}})))()}var ny;function ry(){return(ry=e((()=>{Up(),ny=Object.assign(Object.assign({},Fp),{bar:{name:`bar`,type:`rect`},barBackground:{name:`barBackground`,type:`rect`}})})))()}function iy(e,t,n){var r;if(e.values.length>0){let i;if(e.sortDatums.length){let a=e.sortDatums;t&&(a=e.sortDatums.slice().reverse());for(let e=0;e<a.length;e++)i=ay(a[e].datum,i,a[e].series,n,(r=a[e].series[n.axisHelper]).getScale?.call(r,0),e===0)}else{let r=e.series;t&&(r=r.slice().reverse()),r.forEach((({s:e,values:r},a)=>{var o;let s=(o=e[n.axisHelper]).getScale?.call(o,0);for(let o=0;o<r.length;o++){let c=r[t?r.length-1-o:o];i=ay(c,i,e,n,s,o===0&&a===0)}}))}}for(let r in e.nodes)iy(e.nodes[r],t,n)}function ay(e,t,n,r,i,a){let o=n.getSpec().barMinHeight,s=n[r.axisHelper].isInverse(),c=Jo(n[r.startMethod](e),i),l=Jo(n[r.endMethod](e),i);a&&(t=c);let u=Math.abs(c-l);u<=0&&!Yo(e[n.getStackValueField()],i)?u=0:u<o&&(u=o);let d=1;return l<c?d=-1:l===c&&(d=r.isVertical?s?1:-1:s?-1:1),l=t+d*u,e[r.start]=t,e[r.end]=l,l}function oy(){return(oy=e((()=>{Qo()})))()}var sy;function cy(){return(cy=e((()=>{rm(),sy=class extends nm{constructor(){super(...arguments),this._supportStack=!0}_transformLabelSpec(e){this._addMarkLabelSpec(e,`bar`)}}})))()}var ly;function uy(){return(uy=e((()=>{ly={label:{visible:!1,position:`outside`,offset:5,style:{lineWidth:2,stroke:{type:`palette`,key:`backgroundColor`}}}}})))()}var dy,fy,py;function my(){return(my=e((()=>{Ke(),bm(),Dc(),yu(),Qo(),Lc(),cs(),Qv(),tm(),Do(),ty(),S(),o(),E(),v(),ry(),oy(),U(),Et(),rp(),Pp(),vm(),cy(),V(),Up(),Pa(),o_(),Ug(),bd(),S_(),Ia(),uy(),dy={barWidth:!0,barMinWidth:!0,barMaxWidth:!0,barGapInGroup:!0,barMinHeight:!0,stackCornerRadius:!0},fy=class e extends ym{constructor(){super(...arguments),this.type=To.bar,this._barMarkName=`bar`,this._barMarkType=`rect`,this.transformerConstructor=sy,this._bandPosition=0,this._getLinearBarRange=(e,t)=>{let[n,r]=[e,t].sort(((e,t)=>e-t)),i=r-n;if(this._spec.barGap){let e=.5*this._spec.barGap;n+=e,r-=e}let a=r-n,o=ss(this._spec.barMinWidth||2,i);if(a<o){let e=(o-a)/2;n-=e,r+=e}return[n,r]},this._getBarXStart=(e,t,n)=>this._shouldDoPreCalculate()?(this._calculateStackRectPosition(!1),e[Ip]):this._spec.barMinHeight?this._calculateRectPosition(e,!1,n):Jo(this._dataToPosX(e),t,n),this._getBarXEnd=(e,t,n)=>this._shouldDoPreCalculate()?(this._calculateStackRectPosition(!1),e[Lp]):Jo(this._dataToPosX1(e),t,n),this._getLinearBarXRange=(e,t,n)=>{let r=Jo(this._dataToPosX(e),t,n),i=Jo(this._dataToPosX1(e),t,n);return this._getLinearBarRange(r,i)},this._getBarYStart=(e,t)=>this._shouldDoPreCalculate()?(this._calculateStackRectPosition(!0),e[Rp]):this._spec.barMinHeight?this._calculateRectPosition(e,!0):Jo(this._dataToPosY(e),t),this._getBarYEnd=(e,t)=>this._shouldDoPreCalculate()?(this._calculateStackRectPosition(!0),e[zp]):Jo(this._dataToPosY1(e),t),this._getLinearBarYRange=(e,t,n)=>{let r=Jo(this._dataToPosY(e),t,n),i=Jo(this._dataToPosY1(e),t,n);return this._getLinearBarRange(r,i)},this._getBarBackgroundXStart=e=>{let t=e.range();return Math.min(t[0],t[t.length-1])},this._getBarBackgroundXEnd=e=>{let t=e.range();return Math.max(t[0],t[t.length-1])},this._getBarBackgroundYStart=e=>{let t=e.range();return Math.min(t[0],t[t.length-1])},this._getBarBackgroundYEnd=e=>{let t=e.range();return Math.max(t[0],t[t.length-1])},this._getBarBackgroundPositionXEncoder=()=>this._barBackgroundPositionXEncoder?.bind(this),this._setBarBackgroundPositionXEncoder=e=>{this._barBackgroundPositionXEncoder=e.bind(this)},this._getBarBackgroundPositionYEncoder=()=>this._barBackgroundPositionYEncoder?.bind(this),this._setBarBackgroundPositionYEncoder=e=>{this._barBackgroundPositionYEncoder=e.bind(this)}}_getSpecUpdatePolicy(){let e=super._getSpecUpdatePolicy();return Object.assign(Object.assign({},e),{compileOnlyKeys:Object.assign(Object.assign({},e.compileOnlyKeys),dy)})}getStatisticFields(){let e=super.getStatisticFields(),t=this.direction===`horizontal`?this.getYAxisHelper():this.getXAxisHelper(),n=this.direction===`horizontal`?this._fieldY:this._fieldX,r=(t?.getScale)?.call(t,0);return r&&k(r.type)&&n.forEach((t=>{let n=e.find((e=>e.key===t));n?n.operations.includes(`values`)||n.operations.push(`values`):e.push({key:t,operations:[`values`]})})),e}initMark(){this._initBarBackgroundMark(),this._barMark=this._createMark(Object.assign(Object.assign({},e.mark.bar),{name:this._barMarkName,type:this._barMarkType}),{groupKey:this._seriesField,isSeriesMark:!0},{morphElementKey:this.getDimensionField()[0],morph:Jp(this._spec,this._barMarkName)})}_initBarBackgroundMark(){this._spec.barBackground&&this._spec.barBackground.visible&&(this._barBackgroundMark=this._createMark(e.mark.barBackground,{dataView:this._barBackgroundViewData.getDataView(),dataProductId:this._barBackgroundViewData.getProductId()}))}initMarkStyle(){this._barMark&&this.setMarkStyle(this._barMark,{fill:this.getColorAttribute()},`normal`,Z.Series),this.initRectMarkStyle()}initRectMarkStyle(){if(!this._barMark)return;let e=this.direction===`vertical`?this._xAxisHelper:this._yAxisHelper,t=(e?.getScale)?.call(e,0);t&&(t.type===`band`?this.initBandRectMarkStyle():this.initLinearRectMarkStyle())}initLabelMarkStyle(e){e&&this.setMarkStyle(e,{fill:this.getColorAttribute(),text:e=>e[this.getStackValueField()],z:this._fieldZ?this.dataToPositionZ.bind(this):null})}initTooltip(){super.initTooltip();let{mark:e,group:t}=this._tooltipHelper.activeTriggerSet;this._barMark&&(e.add(this._barMark),t.add(this._barMark))}_statisticViewData(){var e;super._statisticViewData();let t=this._spec.barBackground??{};if(!t.visible)return;let n=this._getRelatedComponentSpecInfo(`axes`).some((e=>e.type===B.cartesianBandAxis)),r;if(X(this._option.dataSet,`addVChartProperty`,np),n)X(this._option.dataSet,`dimensionItems`,([e],{scaleDepth:t})=>{let n=[{}],r=this.getDimensionField(),i=N(t)?r.length:Math.min(r.length,t);for(let t=0;t<i;t++){let i=r[t],a=e.latestData[i]?.values;if(!a?.length)continue;let o=[],s=this._spec.dataKey??fc;for(let e=0;e<a.length;e++)for(let t=0;t<n.length;t++)o.push(Object.assign(Object.assign({},n[t]),{[i]:a[e],[s]:a[e]}));n=o}return n}),r=new Ne(this._option.dataSet).parse([this._viewDataStatistics],{type:`dataview`}).transform({type:`dimensionItems`,options:{scaleDepth:N(t.fieldLevel)?void 0:t.fieldLevel+1}},!1).transform({type:`addVChartProperty`,options:{beforeCall:Ap.bind(this),call:jp}},!1),(e=this._viewDataStatistics)==null||e.target.addListener(`change`,r.reRunAllTransform);else{X(this._option.dataSet,`dimensionItems`,([t])=>{let n=[],[r,i]=this.getDimensionContinuousField(),a={};return e.latestData.forEach((e=>{let t=`${e[r]}-${e[i]}`;a[t]||(a[t]={[r]:e[r],[i]:e[i]},n.push(a[t]))})),n});let e=this.getViewData();r=new Ne(this._option.dataSet).parse([e],{type:`dataview`}).transform({type:`dimensionItems`},!1).transform({type:`addVChartProperty`,options:{beforeCall:Ap.bind(this),call:jp}},!1),e?.target.addListener(`change`,r.reRunAllTransform)}this._barBackgroundViewData=new yd(this._option,r)}init(e){super.init(e),this.initRectMarkStyle()}_shouldDoPreCalculate(){let e=this.getRegion();return this.getStack()&&e.getSeries().filter((e=>e.type===this.type&&e.getSpec().barMinHeight)).length}_calculateStackRectPosition(e){let t=this.getRegion();if(t._bar_series_position_calculated)return;let n,r,i,a,o;t._bar_series_position_calculated=!0,e?(n=zp,r=Rp,i=`_dataToPosY1`,a=`_dataToPosY`,o=`_yAxisHelper`):(n=Lp,r=Ip,i=`_dataToPosX1`,a=`_dataToPosX`,o=`_xAxisHelper`);let s=jc(t,!1,(e=>e.type===this.type));for(let c in s)for(let l in s[c].nodes)iy(s[c].nodes[l],t.getStackInverse(),{isVertical:e,start:n,end:r,startMethod:i,endMethod:a,axisHelper:o})}_calculateRectPosition(e,t,n){var r;let i,a,o;t?(i=`_dataToPosY1`,a=`_dataToPosY`,o=`_yAxisHelper`):(i=`_dataToPosX1`,a=`_dataToPosX`,o=`_xAxisHelper`);let s=(r=this[o]).getScale?.call(r,0),c=this[o].isInverse(),l=this._spec.barMinHeight,u=Jo(this[i](e),s,n),d=Jo(this[a](e),s,n),f=Math.abs(u-d);f<=0&&!Yo(e[this.getStackValueField()],s)?f=0:f<l&&(f=l);let p=1;return d<u?p=-1:d===u&&(p=t?c?1:-1:c?-1:1),u+p*f}_dataToPosX(e){return this.dataToPositionX(e)}_dataToPosX1(e){return this.dataToPositionX1(e)}_dataToPosY(e){return this.dataToPositionY(e)}_dataToPosY1(e){return this.dataToPositionY1(e)}initBandRectMarkStyle(){var e,t;let n=((e=this._xAxisHelper)?.getScale)?.call(e,0),r=((t=this._yAxisHelper)?.getScale)?.call(t,0);this.direction===`horizontal`?this.setMarkStyle(this._barMark,{x:e=>this._getBarXStart(e,n),x1:e=>this._getBarXEnd(e,n),y:e=>this._getPosition(this.direction,e),height:()=>this._getBarWidth(this._yAxisHelper),width:()=>{},y1:()=>{}},`normal`,Z.Series):this.setMarkStyle(this._barMark,{y:e=>this._getBarYStart(e,r),y1:e=>this._getBarYEnd(e,r),x:e=>this._getPosition(this.direction,e),width:()=>this._getBarWidth(this._xAxisHelper),x1:()=>{},height:()=>{}},`normal`,Z.Series),this._initStackBarMarkStyle(),this._initBandBarBackgroundMarkStyle()}_initStackBarMarkStyle(){var e,t;if(!this._spec.stackCornerRadius){let e=this._barMark.getMarkConfig();!e.clip&&N(e.clipPath)||this._barMark.setMarkConfig({clip:!1,clipPath:[]});return}let n=((e=this._xAxisHelper)?.getScale)?.call(e,0),r=((t=this._yAxisHelper)?.getScale)?.call(t,0),i=this.direction===`vertical`;this._barMark.setMarkConfig({clip:!0,clipPath:()=>{let e=!!this._shouldDoPreCalculate();e&&this._calculateStackRectPosition(i);let t=[];return this._forEachStackGroup((a=>{let o=1/0,s=-1/0,c=1/0,l=-1/0,u=!1,d=1/0,f=-1/0;a.values.forEach((t=>{let n=t[gc],r=t[_c],a=t[vc],p=t[yc];if(o=Math.min(o,n,r),s=Math.max(s,n,r),e){let e=t[i?Rp:Ip],n=t[i?zp:Lp];c=Math.min(c,e,n),l=Math.max(l,e,n)}h(a)&&h(p)&&(u=!0,d=Math.min(d,a,p),f=Math.max(f,a,p))}));let p=Object.assign(Object.assign(Object.assign({},a.values[0]),{[gc]:o,[_c]:s}),u?{[vc]:d,[yc]:f}:void 0),m=this.direction===`horizontal`?{x:e?c:this._getBarXStart(p,n),x1:e?l:this._getBarXEnd(p,n),y:this._getPosition(this.direction,p),height:this._getBarWidth(this._yAxisHelper)}:{y:e?c:this._getBarYStart(p,r),y1:e?l:this._getBarYEnd(p,r),x:this._getPosition(this.direction,p),width:this._getBarWidth(this._xAxisHelper)};t.push(fa(Object.assign(Object.assign({},m),{cornerRadius:M(this._spec.stackCornerRadius)?this._spec.stackCornerRadius(m,p,this._markAttributeContext):this._spec.stackCornerRadius,fill:!0})))})),t}})}initLinearRectMarkStyle(){var e,t;let n=((e=this._xAxisHelper)?.getScale)?.call(e,0),r=((t=this._yAxisHelper)?.getScale)?.call(t,0);if(this.direction===`horizontal`){let e=h(this._fieldY2)?{y:e=>this._getLinearBarYRange(e,r,!0)[0],y1:e=>this._getLinearBarYRange(e,r,!0)[1]}:{y:e=>Jo(this._dataToPosY(e)-this._getBarWidth(this._yAxisHelper)/2,r,!0),height:e=>this._getBarWidth(this._yAxisHelper)};this.setMarkStyle(this._barMark,Object.assign({x:e=>this._getBarXStart(e,n,!0),x1:e=>this._getBarXEnd(e,n,!0)},e),`normal`,Z.Series),this.setMarkStyle(this._barBackgroundMark,Object.assign({x:()=>this._getBarBackgroundXStart(n),x1:()=>this._getBarBackgroundXEnd(n)},e),`normal`,Z.Series)}else{let e=h(this._fieldX2)?{x:e=>this._getLinearBarXRange(e,n,!0)[0],x1:e=>this._getLinearBarXRange(e,n,!0)[1]}:{x:e=>Jo(this._dataToPosX(e)-this._getBarWidth(this._xAxisHelper)/2,n,!0),width:e=>this._getBarWidth(this._xAxisHelper)};this.setMarkStyle(this._barMark,Object.assign(Object.assign({},e),{y:e=>this._getBarYStart(e,r),y1:e=>this._getBarYEnd(e,r)}),`normal`,Z.Series),this.setMarkStyle(this._barBackgroundMark,Object.assign(Object.assign({},e),{y:()=>this._getBarBackgroundYStart(r),y1:()=>this._getBarBackgroundYEnd(r)}),`normal`,Z.Series)}}_initBandBarBackgroundMarkStyle(){var e,t;if(!this._barBackgroundMark)return;let n=((e=this._xAxisHelper)?.getScale)?.call(e,0),r=((t=this._yAxisHelper)?.getScale)?.call(t,0),i=this._spec.barBackground??{},a=N(i.fieldLevel)?void 0:i.fieldLevel+1;this.direction===`horizontal`?this.setMarkStyle(this._barBackgroundMark,{x:()=>this._getBarBackgroundXStart(n),x1:()=>this._getBarBackgroundXEnd(n),y:e=>this._getPosition(this.direction,e,a,`barBackground`),height:()=>this._getBarWidth(this._yAxisHelper,a),width:()=>{},y1:()=>{}},`normal`,Z.Series):this.setMarkStyle(this._barBackgroundMark,{x:e=>this._getPosition(this.direction,e,a,`barBackground`),y:()=>this._getBarBackgroundYStart(r),y1:()=>this._getBarBackgroundYEnd(r),width:()=>this._getBarWidth(this._xAxisHelper,a),x1:()=>{},height:()=>{}},`normal`,Z.Series)}initAnimation(){let e={yField:this._fieldY[0],xField:this._fieldX[0],direction:this.direction,growFrom:()=>{let e=this.direction===`horizontal`?this._xAxisHelper?.getScale(0):this._yAxisHelper.getScale(0);if(e){let t=e.domain(),n=jt(t),r=ge(t);return r<0?e.scale(r):n>0?e.scale(n):e.scale(0)}}},t=this._spec.animationAppear?.preset,n=_m(this);this._barMark.setAnimationConfig(Wp(H.getAnimationInKey(`bar`)?.(e,t),Gp(this._barMarkName,this._spec,this._markAttributeContext),n))}_getBarWidth(e,t){var n;let r=this._groups?this._groups.fields.length:1,i=N(t)?r:Math.min(r,t),a=h(this._spec.barWidth)&&i===r,o=a&&typeof this._spec.barWidth==`number`&&typeof this._spec.barMinWidth!=`string`&&typeof this._spec.barMaxWidth!=`string`||(n=e.getBandwidth)==null?void 0:n.call(e,i-1),s=o??6,c=h(this._spec.barMinWidth),l=h(this._spec.barMaxWidth),u=!e.isContinuous||N(o)||a?s:.5*s;return a&&(u=ss(this._spec.barWidth,s)),c&&(u=Math.max(u,ss(this._spec.barMinWidth,s))),l&&(u=Math.min(u,ss(this._spec.barMaxWidth,s))),u}_getPosition(e,t,n,r){let i,a,o;e===`horizontal`?(i=this.getYAxisHelper(),a=`height`,o=r===`barBackground`?this.dataToBarBackgroundPositionY.bind(this):this.dataToPositionY.bind(this)):(i=this.getXAxisHelper(),a=`width`,o=r===`barBackground`?this.dataToBarBackgroundPositionX.bind(this):this.dataToPositionX.bind(this));let s=i.getScale(0),c=this._groups?this._groups.fields.length:1,l=N(n)?c:Math.min(c,n),u=i.getBandwidth?.call(i,l-1)??6,d=l===c?this._barMark.getAttribute(a,t):u;if(l>1&&h(this._spec.barGapInGroup)){let e=this._groups.fields,n=T(this._spec.barGapInGroup),r=0,a=0;for(let o=e.length-1;o>=1;o--){let s=e[o],c=i.getScale(o)?.domain()??[],l=c.length,f=ss(n[o-1]??w(n),u),p=c.indexOf(t[s]);o===e.length-1?(r+=l*d+(l-1)*f,a+=p*(d+f)):(a+=p*(r+f),r+=r+(l-1)*f)}return s.scale(t[e[0]])+(i.getBandwidth(0)??u)/2-r/2+a}let f=k(s.type||`band`);return o(t,l)+.5*(u-d)+(f?-u/2:0)}dataToBarBackgroundPositionX(e,t){return this._dataToPosition(e,this._xAxisHelper,this.fieldX,t,this._getBarBackgroundPositionXEncoder,this._setBarBackgroundPositionXEncoder)}dataToBarBackgroundPositionY(e,t){return this._dataToPosition(e,this._yAxisHelper,this.fieldY,t,this._getBarBackgroundPositionYEncoder,this._setBarBackgroundPositionYEncoder)}onLayoutEnd(){super.onLayoutEnd(),this.getRegion()._bar_series_position_calculated=!1,this._spec.sampling&&this.compile()}onDataUpdate(){super.onDataUpdate(),this.getRegion()._bar_series_position_calculated=!1}compile(){if(super.compile(),this._spec.sampling){let{width:e,height:t}=this._region.getLayoutRect(),n=this._fieldY,r=this._fieldX;this._data.setTransform([{type:`dataSampling`,size:this._direction===`horizontal`?t:e,factor:this._spec.samplingFactor,yfield:this._direction===`horizontal`?r[0]:n[0],groupBy:this._seriesField,mode:this._spec.sampling}])}}getDefaultShapeType(){return`square`}getActiveMarks(){return[this._barMark]}compileData(){var e;super.compileData(),(e=this._barBackgroundViewData)==null||e.compile()}fillData(){var e;super.fillData(),(e=this._barBackgroundViewData?.getDataView())==null||e.reRunAllTransform()}viewDataUpdate(e){var t,n;super.viewDataUpdate(e),(t=this._barBackgroundViewData?.getDataView())==null||t.reRunAllTransform(),(n=this._barBackgroundViewData)==null||n.updateData()}release(){var e;super.release(),(e=this._barBackgroundViewData)==null||e.release(),this._barBackgroundViewData=null}},fy.type=To.bar,fy.builtInTheme={bar:ly},fy.mark=ny,fy.transformerConstructor=sy,py=()=>{x_(),ey(),Zv(),Hg(),a_(),H.registerSeries(fy.type,fy)}})))()}var hy;function gy(){return(gy=e((()=>{Tt(),V_(),hu(),hy=class extends B_{_getDefaultSeriesSpec(e){return super._getDefaultSeriesSpec(e,[`barWidth`,`barMaxWidth`,`barMinWidth`,`barGapInGroup`,`barMinHeight`,`sampling`,`samplingFactor`,`barBackground`,`stackCornerRadius`,`useSequentialAnimation`])}transformSpec(e){super.transformSpec(e),su(e)}_transformAxisSpec(e){var t;if(super._transformAxisSpec(e),!e.axes)return;let n=e.series.some((e=>e.direction===`horizontal`)),r=e.axes.find((e=>e.type===`band`))??e.axes.find((e=>(n?[`left`,`right`]:[`top`,`bottom`]).includes(e.orient)));if(r&&!r.bandSize&&!r.maxBandSize&&!r.minBandSize&&e.autoBandSize){let n=D(e.autoBandSize)&&(t=e.autoBandSize.extend)!=null?t:0,{barMaxWidth:i,barMinWidth:a,barWidth:o,barGapInGroup:s}=e.series.find((e=>e.type===`bar`));this._applyAxisBandSize(r,n,{barMaxWidth:i,barMinWidth:a,barWidth:o,barGapInGroup:s})}}}})))()}var _y,vy;function yy(){return(yy=e((()=>{my(),Do(),U(),gy(),N_(),K_(),X_(),Q_(),sv(),mv(),Ov(),jv(),Pv(),_y=class extends M_{constructor(){super(...arguments),this.transformerConstructor=hy,this.type=`bar`,this.seriesType=To.bar}_setModelOption(){this._modelOption.getDimensionInfo=iv,this._modelOption.getDimensionInfoByValue=ov,this._modelOption.getRectByDimensionData=pv}},_y.type=`bar`,_y.seriesType=To.bar,_y.transformerConstructor=hy,ne(_y,G_),vy=()=>{Dv(),Av(),Nv(),Y_(),py(),Z_(),H.registerChart(_y.type,_y)}})))()}var by,xy;function Sy(){return(Sy=e((()=>{U(),Id(),Pa(),by=class e extends Fd{constructor(){super(...arguments),this.type=e.type}_getDefaultStyle(){return Object.assign(Object.assign({},super._getDefaultStyle()),{lineWidth:0,path:``})}},by.type=`path`,xy=()=>{H.registerMark(by.type,by),Wt(),Mn(),H.registerGraphicComponent(`path`,Gt)}})))()}var Cy;function wy(){return(wy=e((()=>{Cy=class{parserScrollEvent(e){return e&&!(e.ctrlKey||e.deltaY===0&&e.deltaX===0)&&(e.scrollX=e.deltaX,e.scrollY=e.deltaY,e)}parserZoomEvent(e){return e&&(e.zoomDelta=1.0005**(-e.deltaY*16**e.deltaMode),e.zoomX=e.canvasX,e.zoomY=e.canvasY,e)}clearZoom(){}clearScroll(){}clearDrag(){}}})))()}var Ty;function Ey(){return(Ey=e((()=>{Ty=class{constructor(){this._lastScale=0}clearZoom(){this._lastScale=0}parserZoomEvent(e){let t=e.scale;if(this._lastScale===0)return this._lastScale=t,e;e.zoomDelta=t/this._lastScale;let n=e.center;return e.zoomX=n.x,e.zoomY=n.y,this._lastScale=t,e}parserScrollEvent(e){return e}clearScroll(){}clearDrag(){}}})))()}function Dy(e){return e===z[`desktop-browser`]||e===z[`desktop-miniApp`]?{start:`pointerdown`,move:`pointermove`,end:[`pointerup`,`pointerupoutside`],zoom:`wheel`,zoomEnd:`pointerup`,scroll:`wheel`,trigger:Cy}:Ua(e)||Wa(e)?{start:`pointerdown`,move:`pointermove`,end:[`pointerup`,`pointerupoutside`,`pointerleave`],zoom:`pinch`,zoomEnd:`pinchend`,scroll:`pan`,scrollEnd:`panend`,trigger:Ty}:null}function Oy(){return(Oy=e((()=>{Ma(),qa(),wy(),Ey()})))()}var ky,Ay;function jy(){return(jy=e((()=>{qe(),E(),We(),y(),Ma(),Oy(),Y(),qa(),ky={debounce:rt,throttle:dt},Ay=class{constructor(){this._isGestureListener=!1}initZoomable(e,t=z[`desktop-browser`]){this._eventObj=e,this._renderMode=t,this._gestureController=this._option.getCompiler()._gestureController,this._isGestureListener=Ua(this._renderMode)||Wa(this._renderMode),Dy(this._renderMode)&&(this._clickEnable=!0,this._zoomableTrigger=new(this._getZoomTriggerEvent(`trigger`)))}_getZoomTriggerEvent(e){return Dy(this._renderMode)[e]}_zoomEventDispatch(e,t,n,r){if(!this._isGestureListener&&!e.event)return;let i=this._isGestureListener?e:e.event.clone();this._zoomableTrigger.parserZoomEvent(i);let{zoomDelta:a,zoomX:o,zoomY:s,path:c}=i;if(!r&&!c.some((e=>e.name&&e.name.includes(`region`)))||N(a)||!et({x:o,y:s},this._getRegionOrSeriesLayout(t),!1))return;this._clearDragEvent(),this._zoomableTrigger.clearScroll();let l={};n&&(l=n({zoomDelta:a,zoomX:o,zoomY:s},i)),this._eventObj.emit(`zoom`,Object.assign(Object.assign({scale:i.zoomDelta,scaleCenter:{x:i.zoomX,y:i.zoomY}},l),{model:this}))}_getRegionOrSeriesLayout(e){e.type!==`region`&&(e=e.getRegion());let{x:t,y:n,width:r,height:i}=e.layout.getLayout();return{x1:t,y1:n,x2:t+r,y2:n+i}}_bindZoomEventAsRegion(e,t,n,r){let i=r?.delayType??`throttle`,a=r?.delayTime??0,o=this._isGestureListener?this._gestureController:e,s=this._isGestureListener?[this._getZoomTriggerEvent(`zoom`)]:[this._getZoomTriggerEvent(`zoom`),{level:J.chart,consume:!0}],c=this._isGestureListener?[this._getZoomTriggerEvent(`zoomEnd`)]:[this._getZoomTriggerEvent(`zoomEnd`),{level:J.chart,consume:!1}];o.on(...c,ky[i]((e=>{this._zoomableTrigger.clearZoom()}),a)),o.on(...s,ky[i]((e=>{var i;this._zoomEventDispatch(e,t,n,(i=r?.allowComponentZoom)!=null&&i)}),a))}initZoomEventOfSeries(e,t,n){this._option.disableTriggerEvent||Dy(this._renderMode)&&this._bindZoomEventAsRegion(e.event,e,t,n)}initZoomEventOfRegions(e,t,n,r){this._option.disableTriggerEvent||Dy(this._renderMode)&&e.forEach((e=>{t?e.getSeries().forEach((e=>{t(e)&&this._bindZoomEventAsRegion(e.event,e,n,r)})):this._bindZoomEventAsRegion(this._eventObj,e,n,r)}))}_scrollEventDispatch(e,t,n){let r=!1;if(!this._isGestureListener&&(!e.event||this._option.disableTriggerEvent))return r;let i=this._isGestureListener?e:e.event;this._zoomableTrigger.parserScrollEvent(i);let{scrollX:a,scrollY:o,canvasX:s,canvasY:c}=i;return N(a)&&N(o)||et({x:s,y:c},this._getRegionOrSeriesLayout(t),!1)&&(this._clearDragEvent(),this._zoomableTrigger.clearZoom(),n&&(r=n({scrollX:a,scrollY:o},i)),this._eventObj.emit(`scroll`,{scrollX:a,scrollY:o,model:this})),r}_bindScrollEventAsRegion(e,t,n,r){let i=r?.delayType??`throttle`,a=r?.delayTime??0,o=this._isGestureListener?this._gestureController:e,s=this._isGestureListener?[this._getZoomTriggerEvent(`scroll`)]:[this._getZoomTriggerEvent(`scroll`),{level:J.chart,consume:!0}],c=this._isGestureListener?[this._getZoomTriggerEvent(`scrollEnd`)]:[this._getZoomTriggerEvent(`scrollEnd`),{level:J.chart,consume:!1}];o.on(...c,ky[i]((e=>{this._zoomableTrigger.clearScroll()}),a)),o.on(...s,ky[i]((e=>this._scrollEventDispatch(e,t,n)),a))}initScrollEventOfSeries(e,t,n){Dy(this._renderMode)&&this._bindScrollEventAsRegion(e.event,e,t,n)}initScrollEventOfRegions(e,t,n,r){this._option.disableTriggerEvent||Dy(this._renderMode)&&e.forEach((e=>{t?e.getSeries().forEach((e=>{t(e)&&this._bindScrollEventAsRegion(e.event,e,n,r)})):this._bindScrollEventAsRegion(this._eventObj,e,n,r)}))}_bindDragEventAsRegion(e,t,n,r){e.on(this._getZoomTriggerEvent(`start`),{level:J.chart},(e=>{if(!e.event)return;let{event:i}=e;et({x:i.canvasX,y:i.canvasY},this._getRegionOrSeriesLayout(t),!1)&&this._handleDrag(e,n,r)})),e.on(`click`,{level:J.chart},(()=>!this._clickEnable))}initDragEventOfSeries(e,t,n){this._option.disableTriggerEvent||Dy(this._renderMode)&&e.event.on(this._getZoomTriggerEvent(`start`),{level:J.model,filter:({model:t})=>t?.id===e.id},(e=>{this._handleDrag(e,t,n)}))}initDragEventOfRegions(e,t,n,r){this._option.disableTriggerEvent||Dy(this._renderMode)&&e.forEach((e=>{t?e.getSeries().forEach((e=>{t(e)&&(e.event.on(this._getZoomTriggerEvent(`start`),{level:J.model,filter:({model:t})=>t?.id===e.id},(e=>{this._handleDrag(e,n)})),e.event.on(`click`,{level:J.model,filter:({model:t})=>t?.id===e.id},(()=>!this._clickEnable)))})):this._bindDragEventAsRegion(this._eventObj,e,n,r)}))}_clearDragEvent(){let e=this._getZoomTriggerEvent(`move`),t=this._getZoomTriggerEvent(`end`);this._handleDragMouseMove&&=(this._eventObj.off(e,{level:J.chart,source:q.chart},this._handleDragMouseMove),void 0),this._handleDragMouseUp&&=(t.forEach((e=>{this._eventObj.off(e,{level:J.chart,source:q.chart},this._handleDragMouseUp),this._eventObj.allow(e)})),void 0)}isDragEnable(e){if(this._isGestureListener&&this._gestureController){let e=this._gestureController.cachedEvents;return!e||e.length<2}return!0}_handleDrag(e,t,n){var r;if(this._clearDragEvent(),this._option.disableTriggerEvent||(this._clickEnable=!1,!this.isDragEnable(e.event)))return;this._zoomableTrigger.clearZoom(),this._zoomableTrigger.clearScroll();let i=n?.delayType??`throttle`,a=n?.delayTime??0,o=(r=n?.realTime)==null||r,s=this._getZoomTriggerEvent(`move`),c=this._getZoomTriggerEvent(`end`),l=e.event,u=l.canvasX,d=l.canvasY,f=l.canvasX,p=l.canvasY;this._handleDragMouseUp=ky[i]((e=>{this._clickEnable=!0;let n=e.event,r=[n.canvasX-f,n.canvasY-p];f=n.canvasX,p=n.canvasY,!o&&t&&t(r,e.event),this._eventObj.emit(`panend`,{delta:r,model:this}),this._clearDragEvent()}),a),this._handleDragMouseMove=ky[i]((e=>{if(!this.isDragEnable(e.event))return;this._clickEnable=!1,c.forEach((e=>{this._eventObj.prevent(e,{handler:this._handleDragMouseUp,level:J.chart})}));let n=e.event,r=[n.canvasX-u,n.canvasY-d];u=n.canvasX,d=n.canvasY,o&&t&&t(r,e.event),this._eventObj.emit(`panmove`,{delta:r,model:this})}),a),this._eventObj.on(s,{level:J.chart,source:q.chart},this._handleDragMouseMove),c.forEach((e=>{this._eventObj.on(e,{level:J.chart,source:q.chart},this._handleDragMouseUp)}))}}})))()}var My,Ny,Py;function Fy(){return(Fy=e((()=>{U(),Id(),Pa(),My=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`){var i=0;for(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},Ny=class e extends Fd{constructor(){super(...arguments),this.type=e.type}_getDefaultStyle(){return Object.assign(Object.assign({},super._getDefaultStyle()),{x1:0,y1:0})}_transformGraphicAttributes(e,t,n){let r=super._transformGraphicAttributes(e,t,n),{x:i,x1:a,y:o,y1:s}=r,c=My(r,[`x`,`x1`,`y`,`y1`]);return Object.assign(Object.assign({},c),{points:[{x:i,y:o},{x:a,y:s}]})}_createGraphic(e={}){return tr(e)}},Ny.type=`rule`,Py=()=>{H.registerMark(Ny.type,Ny),Wt(),nn(),H.registerGraphicComponent(`line`,tr)}})))()}function Iy(e,t){let{labelSpec:n}=t;n.overlap&&!D(n.overlap)&&(n.overlap={});let r=tb[e]??tb.point;return t.series.type===To.sankey?Qy(t):r(t)}function Ly(e,t,n,r){let{labelMark:i,series:a}=e,o=a.getMeasureField()[0],s=i.getAttributesOfState(t);if(`text`in s||(s.text=s.text??t[o]),`textType`in s||(s.textType=e.labelSpec.textType??`text`),s.data=t,a.type!==To.sankey){let{formatFunc:e,args:i}=$f(n,r,s.text,t);e&&(s._originText=s.text,s.text=e(...i,{series:a}))}return s}function Ry(e){return M(e)?t=>e(t.data):e}function zy(e){let{series:t,labelSpec:n}=e,r=t.direction===`horizontal`?`right`:`top`,i=Ry(n.position)??r,a;return a=!1!==n.overlap&&{strategy:n.overlap?.strategy??Vy(),avoidBaseMark:i!==`center`},{position:i,overlap:a}}function By(e){let t=zy(e);return de(t.overlap)||(t.overlap.avoidBaseMark=!1,t.overlap.clampForce=!1),t}function Vy(){return[{type:`position`,position:[`top`,`bottom`,`right`,`left`,`top-right`,`top-left`,`bottom-left`,`bottom-right`]}]}function Hy(e){let{series:t,labelSpec:n={}}=e,r=Ry(n.position)??`outside`,i=t.direction??`vertical`,a=t.direction===`horizontal`?t.getXAxisHelper()?.isInverse():t.getYAxisHelper()?.isInverse(),o,s=r;return s=e=>{let{data:r}=e,o=(typeof n.position==`function`?n.position(r):n.position)??`outside`;if(o===`outside`){let e=t.getMeasureField()[0],n={vertical:[`top`,`bottom`],horizontal:[`right`,`left`]},o=r?.[e]>=0&&a||r?.[e]<0&&!a?1:0;return n[i][o]}return o},o=!1!==n.overlap&&{strategy:n.overlap?.strategy??Uy(t)},{position:s,overlap:o,smartInvert:n.smartInvert??(I(r)&&r.includes(`inside`))}}function Uy(e){return[{type:`position`,position:t=>{let{data:n}=t,r=e.getMeasureField()[0];return(e.direction===`horizontal`?e.getXAxisHelper()?.isInverse():e.getYAxisHelper()?.isInverse())?n?.[r]>=0?e.direction===`horizontal`?[`left`,`inside-left`]:[`bottom`,`inside-bottom`]:e.direction===`horizontal`?[`right`,`inside-right`]:[`top`,`inside-top`]:n?.[r]>=0?e.direction===`horizontal`?[`right`,`inside-right`]:[`top`,`inside-top`]:e.direction===`horizontal`?[`left`,`inside-left`]:[`bottom`,`inside-bottom`]}}]}function Wy(e){let{labelSpec:t}=e,n;return n=!1!==t.overlap&&{clampForce:!1,avoidBaseMark:!1},{position:`center`,overlap:n}}function Gy(e){let{labelSpec:t}=e,n=Ry(t.position)??`outside`;return{position:n,smartInvert:t.smartInvert??(I(n)&&n.includes(`inside`))}}function Ky(e,t,n,r){return t.direction===`horizontal`?n===`middle`?.5*(t.totalPositionX(e,`end`)+t.totalPositionY(e,`start`)):n===`max`?t.totalPositionX(e,e.end>=e.start?`end`:`start`)+r:n===`min`?t.totalPositionX(e,e.end>=e.start?`start`:`end`)-r:t.totalPositionX(e,`end`)+(e.end>=e.start?r:-r):t.totalPositionX(e,`index`,.5)}function qy(e,t,n,r){return t.direction===`horizontal`?t.totalPositionY(e,`index`,.5):n===`middle`?.5*(t.totalPositionY(e,`end`)+t.totalPositionY(e,`start`)):n===`max`?t.totalPositionY(e,e.end>=e.start?`end`:`start`)-r:n===`min`?t.totalPositionY(e,e.end>=e.start?`start`:`end`)+r:t.totalPositionY(e,`end`)+(e.end>=e.start?-r:r)}function Jy(e,t,n){let r=e.series,i=e.labelSpec||{},a=r.getTotalData();return{customLayoutFunc:a=>a.map((a=>{let o=i.position||`withChange`,s=i.offset||0,c=t?t(a.data):a.data,l=Ly(e,c,i.formatMethod);return l.x=Ky(c,r,o,s),l.y=qy(c,r,o,s),r.direction===`horizontal`?l.textAlign=o===`middle`?`center`:o===`withChange`&&c.end-c.start>=0||o===`max`?`left`:`right`:l.textBaseline=o===`middle`?o:o===`withChange`&&c.end-c.start>=0||o===`max`?`bottom`:`top`,n?.(a,c,l),Jr(Object.assign(Object.assign({},l),{id:a.id}))})),dataFilter:e=>{let t=[];return a.forEach((n=>{let i=e.find((e=>n.index===e.data?.[r.getDimensionField()[0]]));i&&(i.data=n,t.push(i))})),t},overlap:{strategy:[]}}}function Yy(e){return{customLayoutFunc:(e,t)=>t,overlap:!1}}function Xy(e){return{customLayoutFunc:(e,t)=>t,smartInvert:!0}}function Zy(e){let{labelSpec:t,series:n}=e,r=n.getViewDataStatistics?.call(n).latestData?.[n.getSeriesField()]?.values,i=r?r.map(((e,t)=>({[n.getSeriesField()]:e,index:t}))):[{index:0,[pc]:n.getSeriesKeys()[0]}];return{position:t.position??`end`,data:i,overlap:{avoidBaseMark:!1,clampForce:!1}}}function Qy(e){let{series:t,labelSpec:n={}}=e,r=Ry(n.position)??`outside`,i=t.direction,a,o=r;return I(r)&&(i===`vertical`?o=r===`inside-start`?e=>`inside-left`:r===`inside-middle`?e=>`center`:r===`inside-end`?e=>`inside-right`:e=>`bottom`:r===`inside-start`?o=e=>`inside-left`:r===`inside-middle`?o=e=>`center`:r===`inside-end`?o=e=>`inside-right`:r===`outside`&&(o=e=>`right`)),a=!1!==n.overlap&&(!I(r)||!r.includes(`inside`))&&{strategy:n.overlap?.strategy??$y(t)},{position:o,overlap:a,smartInvert:!1,offset:0,syncState:!0}}function $y(e){return[{type:`position`,position:t=>e.direction===`horizontal`?[`right`,`left`]:[`bottom`,`top`]}]}function eb(e){return{customLayoutFunc:(t,n,r)=>{for(let i=0;i<n.length;i++){let a=n[i],o=t[i];if(!a||!o)continue;let s=r(o),c=s.getSubGraphic().findIndex((e=>e.name===`median`));if(c!==-1){let t=s.getSubGraphic()[c].AABBBounds;e.series.direction===`horizontal`?a.setAttributes({x:t.x2+a.AABBBounds.width()/2,y:(t.y1+t.y2)/2}):a.setAttributes({x:(t.x1+t.x2)/2,y:t.y2+a.AABBBounds.height()/2})}else{let e=s.AABBBounds;a.setAttributes({x:(e.x1+e.x2)/2,y:(e.y1+e.y2)/2})}}return n}}}var tb;function nb(){return(nb=e((()=>{Do(),le(),o(),Tt(),Ct(),Pa(),tp(),Dc(),tb={rect:Hy,symbol:zy,arc:Gy,point:Wy,"line-data":By,stackLabel:Jy,line:Zy,area:Zy,rect3d:Hy,arc3d:Gy,treemap:Yy,venn:Xy,boxPlot:eb}})))()}var rb,ib;function ab(){return(ab=e((()=>{Id(),Pa(),U(),rb=class extends Fd{constructor(){super(...arguments),this._glyphEncodings=/* @__PURE__ */ new WeakMap,this._encodeGlyph=(e,t)=>{let n=this._getGlyphEncoderDefinition(),r=e.getSubGraphic(),i=this._glyphEncodings.get(e),a=!i||i.definition!==n||i.children!==r,o=a?{definition:n,children:r,inputs:[],parts:[]}:i,s=e.context.data,c=a||o.data!==s||e.context.reusing,l,u=(e,t)=>{l??=/* @__PURE__ */ new Map;let n=l.get(e);n||(n=/* @__PURE__ */ new Set,l.set(e,n)),n.add(t)},d=e=>{if(e)for(let t of Object.keys(e))for(let n of Object.keys(e[t]??{}))u(t,n)};a&&i&&i.parts.forEach(d);let f=(e,t)=>{let n=o.parts[e];if(c)d(n),d(t);else{if(n)for(let e of Object.keys(n)){let r=t?.[e];for(let t of Object.keys(n[e]??{}))r&&Object.prototype.hasOwnProperty.call(r,t)||u(e,t)}if(t)for(let e of Object.keys(t)){let r=n?.[e],i=t[e];for(let t of Object.keys(i??{}))r&&Object.prototype.hasOwnProperty.call(r,t)&&r[t]===i[t]||u(e,t)}}o.parts[e]=t},p=c,{positionKeys:m,channelKeys:h}=n;for(let t=0;t<m.length;t++){let n=e.attribute[m[t]];p||=o.inputs[t]!==n,o.inputs[t]=n}p&&f(0,this._positionEncoder?.call(this,e.attribute,s[0],e));for(let t=0;t<h.length;t++){let n=h[t],r=e.attribute[n],i=m.length+t;(c||o.inputs[i]!==r)&&f(t+1,r===void 0?void 0:this._channelEncoder[n](r)),o.inputs[i]=r}if(o.data=s,a&&this._glyphEncodings.set(e,o),l)for(let i of r){let r=l.get(i.name);if(!r)continue;let a,s,c=!1,u=i.baseAttributes,d=n.subMarks[i.name]?.defaultAttributes;r.forEach((e=>{let t,n=!1;for(let r=o.parts.length-1;r>=0;r--){let a=o.parts[r]?.[i.name];if(a&&Object.prototype.hasOwnProperty.call(a,e)){n=!0,t=a[e];break}}!n&&d&&Object.prototype.hasOwnProperty.call(d,e)&&(n=!0,t=d[e]);let r=Object.prototype.hasOwnProperty.call(u,e);n?r&&u[e]===t||((a??={})[e]=t,c=!0):r&&((s??=[]).push(e),c=!0)})),c&&e.commitSubGraphicAttributes(i,a??{},s,t)}}}getSubMarks(){return this._subMarks}setGlyphConfig(e){this._glyphConfig=e,this._glyphEncoderDefinition=void 0}getGlyphConfig(){return this._glyphConfig}getPositionChannels(){return this._positionChannels}_getGlyphEncoderDefinition(){let e=this._glyphEncoderDefinition;return e&&e.positionChannels===this._positionChannels&&e.channelEncoder===this._channelEncoder&&e.subMarks===this._subMarks||(e={positionChannels:this._positionChannels,channelEncoder:this._channelEncoder,subMarks:this._subMarks,positionKeys:Array.from(new Set(this._positionChannels??[])),channelKeys:Object.keys(this._channelEncoder??{})},this._glyphEncoderDefinition=e),e}_afterCreateGraphic(e){e.setSubGraphicEncoder(this._encodeGlyph)}_createGraphic(e={}){let t=mi(e),n=this._subMarks;if(n){let e=[];Object.keys(n).forEach((t=>{let r=H.createGraphicComponent(n[t].type,Object.assign({},n[t].defaultAttributes));r&&(e.push(r),r.name=t)})),t.setSubGraphic(e)}return t}_runProgressiveEncoder(e){this._runEncoder(e)}},ib=()=>{H.registerGraphicComponent(`glyph`,mi),Wt(),cr()}})))()}var ob,sb;function cb(){return(cb=e((()=>{U(),Id(),Pa(),Tt(),v(),ob=class e extends Fd{getTextType(){return this._textType}constructor(t,n){super(t,n),this.type=e.type,this._textType=`text`}_getDefaultStyle(){return Object.assign(Object.assign({},super._getDefaultStyle()),{angle:0,textAlign:`center`,lineWidth:0,lineDash:[],textConfig:[]})}initStyleWithSpec(e){super.initStyleWithSpec(e),e.textType&&(this._textType=e.textType)}_transformGraphicAttributes(e,t,n){let r=super._transformGraphicAttributes(e,t,n),{text:i}=r;return D(i)&&h(i.text)&&(this._textType===`rich`||i.type===`rich`)&&(r.textConfig=i.text),r}_createGraphic(e={}){let{text:t}=e;return this._textType===`rich`||t?.type===`rich`?Er(e):Jr(e)}},ob.type=`text`,sb=()=>{H.registerMark(ob.type,ob),Wt(),da(),er(),H.registerGraphicComponent(`text`,Jr),H.registerGraphicComponent(`richtext`,Er)}})))()}var lb,ub,db;function fb(){return(fb=e((()=>{U(),Xh(),Id(),yf(),te(),Pa(),Ft(),lb=class extends Fd{constructor(e,t){super(e,t),this.type=ub.type,this._unCompileChannel={centerOffset:!0,radiusOffset:!0},this.computeOuterRadius=(e,t,n=`normal`,r)=>r+(this.getAttribute(`radiusOffset`,t,n)??0),this.computeCenter=(e,t,n=`normal`,r)=>oe({x:0,y:0},this.getAttribute(`centerOffset`,t,n),t[Wh])[e]+r,this._computeExChannel.x=this.computeCenter,this._computeExChannel.y=this.computeCenter,this._computeExChannel.outerRadius=this.computeOuterRadius,this._extensionChannel.centerOffset=[`x`,`y`],this._extensionChannel.radiusOffset=[`outerRadius`]}_getDefaultStyle(){return Object.assign(Object.assign({},super._getDefaultStyle()),{startAngle:0,endAngle:0,outerRadius:0,innerRadius:0,cornerRadius:0,lineWidth:0,innerPadding:0,outerPadding:0})}},ub=class e extends lb{constructor(){super(...arguments),this.type=e.type}},ub.type=`arc`,db=()=>{Wt(),xn(),ci(),hf(),H.registerGraphicComponent(`arc`,Nn),H.registerMark(ub.type,ub)}})))()}var pb;function mb(){return(mb=e((()=>{Id(),pb=class extends Fd{_getDefaultStyle(){return Object.assign(Object.assign({},super._getDefaultStyle()),{points:[]})}}})))()}var hb,gb;function _b(){return(_b=e((()=>{U(),mb(),yf(),Pa(),hb=class e extends pb{constructor(){super(...arguments),this.type=e.type}_getDefaultStyle(){return Object.assign(Object.assign({},super._getDefaultStyle()),{lineWidth:0})}},hb.type=`polygon`,gb=()=>{H.registerMark(hb.type,hb),Wt(),li(),_f(),H.registerGraphicComponent(`polygon`,ca)}})))()}var vb,yb;function bb(){return(bb=e((()=>{U(),ab(),Pa(),Dt(),vb=class e extends rb{constructor(){super(...arguments),this.type=e.type,this._subMarks={ripple0:{type:`symbol`,defaultAttributes:{fillOpacity:.75}},ripple1:{type:`symbol`,defaultAttributes:{fillOpacity:.5}},ripple2:{type:`symbol`,defaultAttributes:{fillOpacity:.25}}},this._positionChannels=[`ripple`,`size`],this._positionEncoder=(e,t,n)=>{let{ripple:r=n.attribute.ripple,size:i=n.attribute.size}=e,a=Pe(r,0,1),o=.5*i;return{ripple0:{size:i+o*a,fillOpacity:.75-.25*a},ripple1:{size:i+o*(1+a),fillOpacity:.5-.25*a},ripple2:{size:i+o*(2+a),fillOpacity:.25-.25*a}}}}_getDefaultStyle(){return Object.assign(Object.assign({},super._getDefaultStyle()),{x:0,y:0,ripple:0})}},vb.type=`ripple`,yb=()=>{ib(),sa(),H.registerMark(vb.type,vb),H.registerGraphicComponent(`symbol`,(e=>ni(e)))}})))()}function xb(e){var t,n;let r=Object.assign({},e);return F(e.style)||(r.textStyle=G(e.style)),F(e.textStyle)||R(r.textStyle,G(e.textStyle)),(t=e.shape)!=null&&t.style&&G(r.shape.style),(n=e.background)!=null&&n.style&&G(r.background.style),r}function Sb(){return(Sb=e((()=>{st(),_i(),Zc()})))()}function Cb(e){return h(e?.texture)?Object.assign(Object.assign({},e),{texturePadding:h(e.texturePadding)?e.texturePadding:1,textureSize:h(e.textureSize)?e.textureSize:4}):e}function wb(e){let t=e=>Cb(e);if(M(e.style)){let n=e.style;e.style=(...e)=>t(n(...e))}else F(e.style)||(e.style=t(e.style));return F(e.state)||Object.keys(e.state).forEach((n=>{if(M(e.state[n])){let r=e.state[n];e.state[n]=(...e)=>t(r(...e))}else F(e.state[n])||(e.state[n]=t(e.state[n]))})),e}function Tb(e,t,n){let{title:r={},item:i={},pager:a={},background:o={},type:s,id:c,visible:l,orient:u,position:d,data:f,filter:p,regionId:m,regionIndex:g,seriesIndex:_,seriesId:v,padding:y}=e,ee=Eb(e,[`title`,`item`,`pager`,`background`,`type`,`id`,`visible`,`orient`,`position`,`data`,`filter`,`regionId`,`regionIndex`,`seriesIndex`,`seriesId`,`padding`]),{title:te={},item:b={},pager:x={},background:ne={}}=e;te=De(te),b=De(b),x=De(x),ne=De(ne);let S=ee,C=x.layout,re=x.position;if(M(S.maxRow)||M(S.maxCol)||M(C)||M(re)){let e=$o(n)?n:$o(u)?u:`left`;M(S.maxRow)&&(S.maxRow=S.maxRow({rect:t,orient:e,id:c})),M(S.maxCol)&&(S.maxCol=S.maxCol({rect:t,orient:e,id:c}));let r=x.type!==`scrollbar`,i={rect:t,orient:e,id:c,maxRow:S.maxRow,maxCol:S.maxCol};r&&M(C)&&(x.layout=C(i)),r&&M(re)&&(x.position=re(i))}return S.title=te.visible?xb(te):{visible:!1},F(b.focusIconStyle)||G(b.focusIconStyle),b.shape&&(b.shape=wb(qc(b.shape))),b.label&&(b.label=qc(b.label)),b.value&&(b.value=qc(b.value)),b.background&&(b.background=qc(b.background)),es(b.maxWidth)&&(b.maxWidth=Number(b.maxWidth.substring(0,b.maxWidth.length-1))*t.width/100),es(b.width)&&(b.width=Number(b.width.substring(0,b.width.length-1))*t.width/100),es(b.height)&&(b.height=Number(b.height.substring(0,b.height.length-1))*t.width/100),S.item=b,x.type===`scrollbar`?(F(x.railStyle)||G(x.railStyle),F(x.sliderStyle)||G(x.sliderStyle)):(F(x.textStyle)||G(x.textStyle),x.handler&&qc(x.handler)),S.pager=x,ne.visible&&!F(ne.style)&&(R(S,ne.style),h(ne.padding)&&(S.padding=ne.padding)),S}var Eb;function Db(){return(Db=e((()=>{je(),st(),o(),v(),cs(),_i(),Zc(),Sb(),Eb=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`){var i=0;for(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}})))()}var Ob,kb;function Ab(){return(Ab=e((()=>{v(),j(),Dc(),Ob=(e,t)=>{let n=[],r={},{series:i,seriesField:a}=t;return i().forEach((e=>{let t=a(e),i;i=t===e.getSeriesField()?e.getSeriesInfoList():e.getSeriesInfoInField(t),i.forEach((e=>{r[e.key]||(r[e.key]=!0,n.push(e))}))})),n},kb=(e,t)=>{var n;let{series:r,selected:i,field:a,data:o,customFilter:s}=t,c=i(),l=o();if(c.length===0&&l.length)return[];if(c.length===l.length)return e;let u={};c.forEach((e=>{u[e]=!0}));let d=a()??pc;return s?s(e,c,d):(A(e)&&e[0]?.nodes?(e[0].nodes=e[0].nodes.filter((e=>!0===u[e.key])),(n=e[0])!=null&&n.links&&(e[0].links=e[0].links.filter((e=>!0===u[e.source]&&!0===u[e.target])))):h(d)&&(e=e.filter((e=>!0===u[r.getSeriesFieldValue(e,d)]))),e)}})))()}var jb,Mb;function Nb(){return(Nb=e((()=>{E(),Ce(),v(),S(),Re(),fg(),vu(),Y(),xo(),cs(),_i(),bd(),jb={position:!0,item:!0,title:!0,pager:!0,background:!0},Mb=class extends dg{constructor(){super(...arguments),this.layoutType=`normal`,this.layoutZIndex=gu.Legend,this.layoutLevel=_u.Legend,this.specKey=`legends`,this._orient=`left`,this._visible=!0,this._position=`middle`,this._preSelectedData=[],this._selectedData=[],this.effect={onSelectedDataChange:()=>{vo(this._regions,(e=>{var t;(t=e.getViewData())==null||t.markRunning()}),{userId:this._seriesUserId,specIndex:this._seriesIndex}),vo(this._regions,(e=>{e.reFilterViewData()}),{userId:this._seriesUserId,specIndex:this._seriesIndex})}}}get orient(){return this._orient}get visible(){return this._visible}get position(){return this._position}getLegendData(){return this._legendData.getLatestData()}getSelectedData(){return this._selectedData}setAttrFromSpec(){super.setAttrFromSpec(),this._orient=$o(this._spec.orient)?this._spec.orient:`left`,this._position=this._spec.position??`middle`,this._visible=!1!==this._spec.visible;let{regionId:e,regionIndex:t,seriesId:n,seriesIndex:r}=this._spec;h(n)&&(this._seriesUserId=T(n)),h(e)&&(this._regionUserId=T(e)),h(r)&&(this._seriesIndex=T(r)),h(t)&&(this._regionUserIndex=T(t)),this._regions=this._option.getRegionsInUserIdOrIndex(this._regionUserId,this._regionUserIndex)}created(){super.created(),this.initData()}_compareSpec(e,t){let n=super._compareSpec(e,t);n.reRender=!0;let r=!O(t,e);return n.reMake?n:e?.orient===t?.orient?r&&!n.reCompile&&this._isComponentOnlySpecChange(e,t)?(n.effects=Object.assign(Object.assign({},n.effects),{component:!0,layout:!0,render:!0}),n):(r&&(n.reCompile=!0),n):(n.reMake=!0,n)}_isComponentOnlySpecChange(e,t){let n=t,r=e;return Object.keys(Object.assign(Object.assign({},t),e)).every((e=>O(n?.[e],r?.[e])||jb[e]))}_bindLegendDataChange(){this._preSelectedData=this._selectedData.slice(),this._initSelectedData(),this._forceLayout()}initData(){let e=this._initLegendData();e.target.addListener(`change`,this._bindLegendDataChange.bind(this)),this._legendData=new yd(this._option,e),this._initSelectedData(),vo(this._regions,(e=>{e.event.on(K.rawDataUpdate,{filter:({model:t})=>t?.id===e.id},(()=>{this._legendData.getDataView().reRunAllTransform({skipEqual:!0})}))}),{userId:this._seriesUserId,specIndex:this._seriesIndex})}setSelectedData(e){var t,n,r;let i=this._selectedData;N(e)||JSON.stringify(i)===JSON.stringify(e)||(vo(this._regions,(t=>{t.legendSelectedFilter&&(e=t.legendSelectedFilter(this,e))}),{userId:this._seriesUserId,specIndex:this._seriesIndex}),this._selectedData=[...e],(n=(t=this.effect).onSelectedDataChange)==null||n.call(t),this.event.emit(K.legendSelectedDataChange,{model:this}),(r=this._legendComponent)==null||r.setSelected(this._selectedData))}afterSetLayoutStartPoint(e){if(super.afterSetLayoutStartPoint(e),this._legendComponent){let{x:t,y:n}=e;P(t*n)&&this._legendComponent.setAttributes({x:t,y:n})}}getBoundsInRect(e,t){if(!this._visible)return this._legendComponent&&this._legendComponent.parent&&(this._legendComponent.parent.removeChild(this._legendComponent),this._legendComponent=null),{x1:0,y1:0,x2:0,y2:0};let n={x1:this.getLayoutStartPoint().x,y1:this.getLayoutStartPoint().y,x2:0,y2:0},r=this._getLegendAttributes(e);if(r.disableTriggerEvent=this._option.disableTriggerEvent,this._legendComponent)O(r,this._cacheAttrs)||this._legendComponent.setAttributes(R({},r,{defaultSelected:this._selectedData}));else{let e=new(this._getLegendConstructor())(R({},r,{defaultSelected:this._selectedData}));e.name=`legend`,this._legendComponent=e,this.getContainer().add(e),this._option.disableTriggerEvent||this._initEvent(),e.on(`*`,((e,t)=>this._delegateEvent(this._legendComponent,e,t)))}this._cacheAttrs=r;let i=isFinite(this._legendComponent.AABBBounds.width())?this._legendComponent.AABBBounds.width():0,a=isFinite(this._legendComponent.AABBBounds.height())?this._legendComponent.AABBBounds.height():0;if(this.layoutType!==`normal-inline`){let e=this.layoutOrient===`bottom`||this.layoutOrient===`top`?`horizontal`:`vertical`,n=this._position,{width:r,height:o}=t,s=0,c=0;e===`horizontal`?n===`middle`?s=(r-i)/2:n===`end`&&(s=r-i):n===`middle`?c=(o-a)/2:n===`end`&&(c=o-a),this._legendComponent.setAttributes({dx:s,dy:c})}return n.x2=n.x1+i,n.y2=n.y1+a,n}onDataUpdate(){var e,t;if(JSON.stringify(this._preSelectedData)!==JSON.stringify(this._selectedData)){if(this._legendComponent){let e=this._getLegendAttributes(this.getLayoutRect());O(e,this._cacheAttrs)||this._legendComponent.setAttributes(R({},e,{defaultSelected:this._selectedData}))}(t=(e=this.effect).onSelectedDataChange)==null||t.call(e),this.event.emit(K.legendSelectedDataChange,{model:this})}}_getNeedClearVRenderComponents(){return[this._legendComponent]}clear(){super.clear(),this._legendComponent=null,this._cacheAttrs=null,this._preSelectedData=null}},Mb.specKey=`legends`})))()}var Pb;function Fb(){return(Fb=e((()=>{Pb={orient:`bottom`,position:`middle`,padding:[16,24],title:{visible:!1,padding:0,textStyle:{fontSize:{type:`token`,key:`l5FontSize`},lineHeight:{type:`token`,key:`l5LineHeight`},fill:{type:`palette`,key:`primaryFontColor`},fontWeight:`normal`},space:12},pager:{textStyle:{fill:{type:`palette`,key:`discreteLegendPagerTextColor`}},handler:{style:{fill:{type:`palette`,key:`discreteLegendPagerHandlerColor`}},state:{disable:{fill:{type:`palette`,key:`discreteLegendPagerHandlerDisableColor`}}}}},item:{visible:!0,spaceCol:10,spaceRow:6,padding:2,background:{state:{selectedHover:{fill:{type:`palette`,key:`hoverBackgroundColor`}},unSelectedHover:{fill:{type:`palette`,key:`hoverBackgroundColor`}}}},shape:{space:6,style:{lineWidth:0,fillOpacity:1,opacity:1},state:{unSelected:{fillOpacity:.2,opacity:1}}},label:{space:6,style:{fill:{type:`palette`,key:`secondaryFontColor`,default:`#89909d`},fontSize:{type:`token`,key:`l5FontSize`},lineHeight:{type:`token`,key:`l5LineHeight`},opacity:1},state:{unSelected:{fill:{type:`palette`,key:`disableFontColor`},opacity:1}}}},allowAllCanceled:!1}})))()}var Ib,Lb;function Rb(){return(Rb=e((()=>{o(),E(),Re(),vt(),Et(),V(),Db(),xo(),Lc(),to(),Xr(),bi(),Ab(),Nb(),Y(),U(),El(),tp(),Fb(),Ib=class extends Mb{constructor(){super(...arguments),this.type=B.discreteLegend,this.name=B.discreteLegend}static getSpecInfo(e){return ep(e,this.specKey,this.type,(e=>!e.type||e.type===`discrete`))}init(e){super.init(e),vo(this._regions,(e=>{e.addViewDataFilter({type:`discreteLegendFilter`,options:{series:e,selected:()=>this._selectedData,field:()=>this._getSeriesLegendField(e),data:()=>this.getLegendDefaultData(),customFilter:this._spec.customFilter},level:Tl.legendFilter})}),{userId:this._seriesUserId,specIndex:this._seriesIndex})}_initLegendData(){X(this._option.dataSet,`discreteLegendFilter`,kb),X(this._option.dataSet,`discreteLegendDataMake`,Ob);let e=new Ne(this._option.dataSet,{name:`${this.type}_${this.id}_data`});return e.transform({type:`discreteLegendDataMake`,options:{series:()=>{let e=[];return vo(this._regions,(t=>{e.push(t)}),{specIndex:this._spec.seriesIndex,userId:this._spec.seriesId}),e},seriesField:e=>this._getSeriesLegendField(e)}}),e}_getSeriesLegendField(e){var t;let n=e.getSeriesField(),r=this._spec.scaleName??this._spec.scale;if(N(r)||!e.getRawData())return n;let i=this._option.globalScale.getScaleSpec(r);if(!i)return n;if(this._spec.field)return this._spec.field;if(!$a(i.domain))return n;let a=i.domain.find((t=>t.dataId===e.getRawData().name));return a&&(t=a.fields?.[0])!=null?t:n}_initSelectedData(){let e=this.getLegendDefaultData();if(this._unselectedData){let t=[],n=[];e.forEach((e=>{this._unselectedData.includes(e)?n.push(e):t.push(e)})),this._selectedData=t,this._unselectedData=n}else this._selectedData=this._spec.defaultSelected?[...this._spec.defaultSelected]:e}getLegendDefaultData(e){return M(this._spec.data)?this._getLegendItems().map((e=>e.label)):this._legendData.getLatestData().map(e?e=>e.originalKey:e=>e.key)}_addDefaultTitleText(e){if(e.title?.visible&&N(e.title.text)&&N(e.title.style?.text)){let t=(this._regions?.[0])?.getSeries()[0];if(!t)return;e.title.text=Ac(t.getRawData(),t.getSeriesField())}}_getLegendAttributes(e){let t=this.layoutOrient===`bottom`||this.layoutOrient===`top`?`horizontal`:`vertical`,n=Object.assign(Object.assign({layout:t,items:this._getLegendItems(),zIndex:this.layoutZIndex},Tb(this._spec,e,this.layoutOrient)),{maxWidth:e.width,maxHeight:e.height});return this._addDefaultTitleText(n),this._addLegendItemFormatMethods(n),n}_getLegendConstructor(){return Ai}setSelectedData(e){e&&(this._unselectedData=this.getLegendDefaultData().filter((t=>!e.includes(t)))),super.setSelectedData(e)}_initEvent(){if(this._legendComponent){let e=!1!==this._spec.filter;this._legendComponent.addEventListener(ei.legendItemClick,(t=>{let n=Ve(t,`detail.currentSelected`);e&&this.setSelectedData(n),this.event.emit(K.legendItemClick,{model:this,value:n,event:t})})),this._legendComponent.addEventListener(ei.legendItemHover,(e=>{let t=Ve(e,`detail`);this.event.emit(K.legendItemHover,{model:this,value:t,event:e})})),this._legendComponent.addEventListener(ei.legendItemUnHover,(e=>{let t=Ve(e,`detail`);this.event.emit(K.legendItemUnHover,{model:this,value:t,event:e})}))}}_getLegendItems(){let e=(this._legendData.getLatestData()||[]).map((e=>{let t=e.style(`fillOpacity`),n=e.style(`strokeOpacity`),r=e.style(`opacity`),i=e.style(`texture`);return{label:e.key,datum:e.datum,shape:{symbolType:e.style(`symbolType`)??e.shapeType??`circle`,fillOpacity:P(t)?t:1,strokeOpacity:P(n)?n:1,opacity:P(r)?r:1,texturePadding:i?1:null,textureSize:i?4:null,texture:i,fill:e.style(`fill`),stroke:e.style(`stroke`),textureColor:e.style(`textureColor`),innerBorder:e.style(`innerBorder`),outerBorder:e.style(`outerBorder`),lineDash:e.style(`lineDash`),lineDashOffset:e.style(`lineDashOffset`),lineWidth:e.style(`lineWidth`)}}}));return M(this._spec.data)?this._spec.data(e,this._option.globalScale.getScale(`color`),this._option.globalScale):e}_addLegendItemFormatMethods(e){let{formatMethod:t,formatter:n}=this._spec.item?.label??{},{formatMethod:r,formatter:i}=this._spec.item?.value??{},{formatFunc:a}=$f(t,n);n&&!t&&a&&(e.item.label.formatMethod=(e,t)=>a(e,t,n));let{formatFunc:o}=$f(r,i);i&&!r&&o&&(e.item.value.formatMethod=(e,t)=>o(i,e,t,n))}},Ib.specKey=`legends`,Ib.builtInTheme={discreteLegend:Pb},Ib.type=B.discreteLegend,Lb=()=>{H.registerComponent(Ib.type,Ib)}})))()}var zb,Bb;function Vb(){return(Vb=e((()=>{st(),Re(),Uc(),zb=(e,t)=>{let{series:n,field:r,scale:i}=t,a=r();if(r&&a){let e=1/0,t=-1/0;return n().forEach((n=>{let r=n.getRawDataStatisticsByField(a,!0),i=r?.min,o=r?.max;P(i)&&(e=Math.min(i,e)),P(o)&&(t=Math.max(o,t))})),[e,t]}if(i){let e=i();return e?e.domain():[]}return[]},Bb=(e,t)=>{let{selected:n,field:r,data:i,isHierarchyData:a,customFilter:o}=t,s=n(),c=r(),l=a||(e=>e&&e.some((e=>e&&Rc(e))));if(s===i())return e;if(c&&!F(s)){let[t,n]=s;return o?o(e,s,c):l(e)?zc(e,+t,+n,c):e.filter((e=>e[c]>=t&&e[c]<=n))}return e}})))()}function Hb(e){if(!e)return e;let t=Object.assign({},e),n=e.style;return M(n)?t.style=(e,t,r)=>G(n(e,t,r)):F(n)||(t.style=G(n)),t}function Ub(e){let t=R({},e),{title:n={},handler:r={},rail:i={},track:a={},startText:o,endText:s,handlerText:c,sizeBackground:l,background:u={},type:d,id:f,visible:p,orient:m,position:g,data:_,defaultSelected:v,field:y,filter:ee,regionId:te,regionIndex:b,seriesIndex:x,seriesId:ne,padding:S}=t,C=Gb(t,[`title`,`handler`,`rail`,`track`,`startText`,`endText`,`handlerText`,`sizeBackground`,`background`,`type`,`id`,`visible`,`orient`,`position`,`data`,`defaultSelected`,`field`,`filter`,`regionId`,`regionIndex`,`seriesIndex`,`seriesId`,`padding`]);return C.title=n.visible?xb(n):{visible:!1},C.showHandler=!1!==r.visible,F(r.style)||(C.handlerStyle=G(r.style)),h(i.width)&&(C.railWidth=i.width),h(i.height)&&(C.railHeight=i.height),F(i.style)||(C.railStyle=G(i.style)),F(a.style)||(C.trackStyle=G(a.style)),C.startText=qc(o),C.endText=qc(s),C.handlerText=Hb(c),F(l)||(C.sizeBackground=G(l)),u.visible&&!F(u.style)&&(R(C,u.style),h(u.padding)&&(C.padding=u.padding)),C}function Wb(e){return e===`color`||e===`size`}var Gb,Kb;function qb(){return(qb=e((()=>{Kr(),Yi(),st(),o(),v(),_i(),Zc(),Sb(),Gb=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`){var i=0;for(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},Kb={color:zr,size:gi}})))()}var Jb;function Yb(){return(Yb=e((()=>{Jb={orient:`right`,position:`middle`,padding:[16,24],title:{visible:!1,padding:0,textStyle:{fontSize:{type:`token`,key:`l5FontSize`},lineHeight:{type:`token`,key:`l5LineHeight`},fontWeight:`normal`,fill:{type:`palette`,key:`primaryFontColor`}},space:12},handler:{visible:!0},startText:{style:{fontSize:{type:`token`,key:`l5FontSize`},lineHeight:{type:`token`,key:`l5LineHeight`},fontWeight:`normal`,fill:{type:`palette`,key:`secondaryFontColor`,default:`#89909d`}},space:6},endText:{style:{fontSize:{type:`token`,key:`l5FontSize`},lineHeight:{type:`token`,key:`l5LineHeight`},fontWeight:`normal`,fill:{type:`palette`,key:`secondaryFontColor`,default:`#89909d`}},space:6},handlerText:{style:{fontSize:{type:`token`,key:`l5FontSize`},lineHeight:{type:`token`,key:`l5LineHeight`},fontWeight:`normal`,fill:{type:`palette`,key:`secondaryFontColor`,default:`#89909d`}},space:6}}})))()}var Xb,Zb;function Qb(){return(Qb=e((()=>{Yb(),Xb=e=>{let t={width:200,height:8,style:{fill:{type:`palette`,key:`sliderRailColor`}}};return e?(t.width=200,t.height=8):(t.width=8,t.height=200),Object.assign(Object.assign({},Jb),{rail:t,handler:{style:{symbolType:`circle`,lineWidth:0,outerBorder:{lineWidth:2,distance:.8,stroke:`#ffffff`},shadowBlur:12,shadowOffsetX:0,shadowOffsetY:4,shadowColor:{type:`palette`,key:`shadowColor`}}}})},Zb={horizontal:Xb(!0),vertical:Xb(!1)}})))()}var $b,ex;function tx(){return(tx=e((()=>{Yb(),$b=e=>{let t={style:{fill:{type:`palette`,key:`sliderRailColor`}}};return e?(t.width=200,t.height=4):(t.height=200,t.width=4),Object.assign(Object.assign({},Jb),{sizeBackground:{fill:{type:`palette`,key:`dataZoomChartColor`}},track:{style:{fill:{type:`palette`,key:`sliderTrackColor`,a:.8}}},rail:t,handler:{style:{symbolType:`circle`,lineWidth:0,outerBorder:{lineWidth:2,distance:.8,stroke:{type:`palette`,key:`sliderTrackColor`}},fill:{type:`palette`,key:`sliderHandleColor`}}}})},ex={horizontal:$b(!0),vertical:$b(!1)}})))()}var nx,rx,ix,ax;function ox(){return(ox=e((()=>{qe(),st(),E(),vt(),Et(),V(),xo(),Lc(),to(),Vb(),qb(),Nb(),Y(),U(),El(),tp(),Qb(),tx(),nx=[`#C4E7FF`,`#98CAFF`,`#75ACFF`,`#518FF9`,`#2775DC`,`#005CBE`,`#00429F`,`#00287E`],rx=[2,10],ix=class extends Mb{static getSpecInfo(e){let t=ep(e,this.specKey,this.type,(e=>Wb(e.type)));return t&&t.forEach((e=>{e.type=e.spec.type===`color`?B.colorLegend:B.sizeLegend})),t}constructor(e,t){super(e,t),this.type=B.colorLegend,this.name=B.colorLegend;let n=this._spec.type===`color`?B.colorLegend:B.sizeLegend;this.type=n,this.name=n}setAttrFromSpec(){super.setAttrFromSpec(),this._field=this._spec.field,this._legendType=this._spec.type}init(e){super.init(e),vo(this._regions,(e=>{e.addViewDataFilter({type:`continuousLegendFilter`,options:{selected:()=>this._selectedData,field:()=>this._field,data:()=>this._legendData.getLatestData(),isHierarchyData:e.isHierarchyData,customFilter:this._spec.customFilter},level:Tl.legendFilter})}),{userId:this._seriesUserId,specIndex:this._seriesIndex})}_getScaleInGlobal(){let e=this._option.globalScale,t=this._spec.scale;return t||=this._legendType,e.getScale(t)}_initLegendData(){X(this._option.dataSet,`continuousLegendFilter`,Bb),X(this._option.dataSet,`continuousLegendDataMake`,zb);let e=new Ne(this._option.dataSet,{name:`${this.type}_${this.id}_data`});return e.transform({type:`continuousLegendDataMake`,options:{series:()=>yo(this._regions,{userId:this._seriesUserId,specIndex:this._seriesIndex}),field:()=>this._field,scale:this._getScaleInGlobal.bind(this)}}),e}_initSelectedData(){this._selectedData=this._spec.defaultSelected?this._spec.defaultSelected.slice():this._legendData.getLatestData()}_addDefaultTitleText(e){if(e.title?.visible&&N(e.title.text)&&N(e.title.style?.text)){let t=this._field;if(t){let n=(this._regions?.[0])?.getSeries()[0];if(!n)return;e.title.text=Ac(n.getRawData(),t);return}let n=this._spec.scale;n||=this._legendType;let r=this._option.globalScale.getScaleSpec(n);if(!$a(r?.domain))return;let i=r.domain[0];if(i.fields.length===0)return;e.title.text=Ac(this._option.dataSet.getDataView(i.dataId),i.fields[0])}}_getLegendAttributes(e){let t=this.layoutOrient===`bottom`||this.layoutOrient===`top`?`horizontal`:`vertical`,n=t===`horizontal`?`bottom`:this.layoutOrient,r=[],i=this._getScaleInGlobal();i&&i.type===`linear`&&(r=i.range()),F(r)&&(r=this._legendType===`color`?nx:rx);let a=this._legendData.getLatestData()[0]??0,o=this._legendData.getLatestData()[1]??1;this._legendData.getLatestData()[0]===this._legendData.getLatestData()[1]&&(a=Math.min(0,this._legendData.getLatestData()[0]),o=this._legendData.getLatestData()[0]===0?1:Math.max(0,this._legendData.getLatestData()[0]));let s=Object.assign({layout:t,align:n,zIndex:this.layoutZIndex,min:a,max:o,value:this._spec.defaultSelected,[this._legendType===`color`?`colors`:`sizeRange`]:r},Ub(this._spec));return this._addDefaultTitleText(s),s}_getLegendConstructor(){return Kb[this._legendType]}_initEvent(){if(this._legendComponent){let e=!1!==this._spec.filter;this._legendComponent.addEventListener(`change`,rt((t=>{let n=Ve(t,`detail.value`);e&&this.setSelectedData(n),this.event.emit(K.legendFilter,{model:this,value:n,event:t})}),30))}}},ix.specKey=`legends`,ix.builtInTheme={colorLegend:Zb,sizeLegend:ex},ix.type=B.continuousLegend,ax=()=>{H.registerComponent(ix.type,ix)}})))()}function sx(e,t,n){var r,i;let a=Object.assign({regionIndex:0},t),o=n.getOption(),s=o.getRegionsInUserIdOrIndex(h(a.regionId)?[a.regionId]:void 0,h(a.regionIndex)?[a.regionIndex]:void 0)[0];if(!s)return`none`;let c=dx(e,s),l=a.activeType??(c.length>1?`dimension`:`mark`),u=s.getLayoutStartPoint(),d=s.getLayoutRect(),f=o.globalInstance.getContainer(),p=Object.assign({x:0,y:0},f?x(f):{}),m=e=>{let{dimensionFields:t,dimensionData:n,measureFields:r,measureData:i,groupField:a,groupData:o}=e.data;return e.series.getViewData()?.latestData.find((e=>lx(t,n)(e)&&lx(r,i)(e)&&(N(a)||lx([a],[o])(e))))},g=s.getOption().globalInstance.getStage().window.getViewBoxTransform().getInverse(),_=e=>{let t=(e=>({x:Math.min(Math.max(e.x,0),d.width),y:Math.min(Math.max(e.y,0),d.height)}))(e),n=a.x??u.x+t.x,r=a.y??u.y+t.y,i={x:0,y:0};g.transformPoint({x:n,y:r},i);let{x:o,y:s}=i;return{canvasX:o,canvasY:s,clientX:p.x+o,clientY:p.y+s}};if(l===`dimension`){let t=c[0];if(!t)return`none`;let a=/* @__PURE__ */ new Map;c.forEach((e=>{var t;a.has(e.series)||a.set(e.series,[]),(t=a.get(e.series))==null||t.push(e)}));let s=[{value:e[t.data.dimensionFields[0]],data:[...a.keys()].map((e=>({series:e,datum:a.get(e)?.map((e=>m(e)))??[]})))}];h(t.dimType)&&(s[0].position=t.pos[t.dimType],s[0].dimType=t.dimType);let u={changePositionOnly:!1,action:`enter`,tooltip:null,dimensionInfo:s,chart:o.globalInstance.getChart()??void 0,datum:void 0,model:void 0,source:q.chart,event:_({x:c.reduce(((e,t)=>e+t.pos.x),0)/c.length,y:c.reduce(((e,t)=>e+t.pos.y),0)/c.length}),item:void 0};(i=(r=n.processor?.dimension)?.showTooltip)==null||i.call(r,s,u,!1);let d=o.globalInstance;return Gf.globalConfig.uniqueTooltip&&Gf.hideTooltip(d.id),l}if(l===`mark`){let t=c[0];if(!t)return`none`;let r=t.data.originDatum??Object.assign(Object.assign({},m(t)),e),i=[{datum:[r],series:t.series}],a={changePositionOnly:!1,tooltip:null,dimensionInfo:[{value:r[t.data.dimensionFields[0]],data:i}],chart:o.globalInstance.getChart()??void 0,datum:r,model:t.series,source:q.chart,event:_(t.pos),item:void 0};n.processor.mark.showTooltip({datum:r,mark:null,series:t.series},a,!1);let s=o.globalInstance;return Gf.globalConfig.uniqueTooltip&&Gf.hideTooltip(s.id),l}return`none`}var cx,lx,ux,dx;function fx(){return(fx=e((()=>{Do(),Y(),j(),v(),E(),Se(),Kf(),Ke(),cx=(e,t)=>h(t)?e.map((e=>t[e])):void 0,lx=(e,t)=>n=>e.every(((e,r)=>n[e]===t?.[r])),ux=e=>!N(e)&&(A(e)?e.length>0&&e.every(h):Object.keys(e).length>0),dx=(e,t)=>{let n=t.getSeries(),r=[];return n.forEach((t=>{var n;let i=t.getDimensionField(),a=t.getMeasureField(),o=t.getSeriesField(),s=h(o)?e[o]:void 0,c=h(o)&&(n=(t.getViewDataStatistics?.call(t))?.latestData[o]?.values)!=null?n:[],l=cx(i,e),u=cx(a,e),d=ux(u),f=!d&&h(o)&&N(s)&&c.length>0,p=()=>{let e=t.getViewData()?.latestData.find(lx(i,l));if(!d&&(u=cx(a,e),!ux(u)))return;let n=t.type===To.pie?t.dataToCentralPosition(e):t.dataToPosition(e);N(n)||isNaN(n.x)||isNaN(n.y)||r.push({pos:n,data:{dimensionFields:i,dimensionData:l,measureFields:a,measureData:u,hasMeasureData:d,groupField:o,groupData:s},series:t})};if(t.coordinate===`cartesian`){let e=t,n=St(t.getYAxisHelper()?.getScale(0)?.type)?`y`:`x`,p=i.map(((e,t)=>[e,t])).filter((([,e])=>N(l?.[e]))),m=[l??[]];p.length>0&&p.forEach((([e,n])=>{let r=(t.getViewDataStatistics?.call(t))?.latestData[e]?.values??[],i=[];m.forEach((e=>{r.forEach((t=>{let r=e?.slice()??[];r[n]=t,i.push(r)}))})),m=i})),m.forEach((l=>{if(f){let s=e.getViewData()?.latestData.filter(lx(i,l));c.forEach((c=>{let f=s.find((e=>e[o]===c));if(u=cx(a,f),!ux(u))return;let p=e.dataToPosition(f);N(p)||isNaN(p.x)||isNaN(p.y)||r.push({pos:p,data:{dimensionFields:i,dimensionData:l,measureFields:a,measureData:u,hasMeasureData:d,groupField:o,groupData:c},series:t,dimType:n})}))}else{let c=e.getViewData()?.latestData.find(lx(i,l));if(!d&&(u=cx(a,c),!ux(u)))return;let f=e.dataToPosition(c);if(N(f)||isNaN(f.x)||isNaN(f.y))return;r.push({pos:f,data:{dimensionFields:i,dimensionData:l,measureFields:a,measureData:u,hasMeasureData:d,groupField:o,groupData:s},dimType:n,series:t})}}))}else if(t.coordinate===`polar`){if(t.type===To.pie)p();else{let e=t;if(f){let n=(e.getViewData()?.latestData.filter(lx(i,l))).find((e=>e[o]===s));c.forEach((s=>{if(u=cx(a,n),!ux(u))return;let c=e.dataToPosition(n);N(c)||isNaN(c.x)||isNaN(c.y)||r.push({pos:c,data:{dimensionFields:i,dimensionData:l,measureFields:a,measureData:u,hasMeasureData:d,groupField:o,groupData:s},series:t})}))}else p()}}else t.coordinate===`geo`&&(()=>{console.log(`parseMarkInfoOfGeoSeries`);let n=t.getViewData()?.latestData.find(lx(i,l)),c=t.getNameMap(),f=(t.getMapViewData?.call(t))?.latestData.find((e=>i.every(((t,n)=>t===`name`?c[e.properties[t]]===l?.[n]:e.properties[t]===l?.[n]))));if(!f)return;let p=u;if(f&&!n&&(n=Object.assign({},e)),!d){if(u=cx(a,n),p=u,!ux(u)&&!n)return;ux(u)||(u=[null])}let m=t.dataToPosition(n);N(m)||isNaN(m.x)||isNaN(m.y)||r.push({pos:m,data:{dimensionFields:i,dimensionData:l,measureFields:a,measureData:p,hasMeasureData:d,groupField:o,groupData:s,originDatum:n},series:t})})()})),r}})))()}var px,mx;function hx(){return(hx=e((()=>{j(),v(),px=e=>h(e)&&!A(e),mx=e=>h(e)&&A(e)})))()}var gx,_x;function vx(){return(vx=e((()=>{Pa(),qa(),Ct(),v(),lg(),Cv(),_p(),_i(),gx=[`panel`,`shape`,`titleLabel`,`keyLabel`,`valueLabel`,`spaceRow`,`maxContentHeight`,`align`],_x=class extends cg{_shouldMergeThemeToSpec(){return!1}_initTheme(e,t){let{spec:n,theme:r}=super._initTheme(e,t),i=R({},...gx.map((e=>r?.[e]===void 0?void 0:{[e]:r[e]})),r?.style),a=R({},r);gx.forEach((e=>{delete a[e]})),delete a.style;let o=R({},a,n);return o.style=R({},i,o.style),{spec:o,theme:r}}_transformSpecAfterMergingTheme(e,t,n){var r,i;super._transformSpecAfterMergingTheme(e,t,n),e.visible=(r=e.visible)==null||r,e.activeType=mp(e),e.renderMode=e.renderMode??(Wa(this._option.mode)||!Ha(this._option.mode)?`canvas`:`html`),e.trigger=e.trigger??`hover`,e.className=e.className??bv,e.enterable=(i=e.enterable)!=null&&i,e.transitionDuration=e.transitionDuration??150,e.confine=e.confine??e.renderMode===`canvas`,h(e.parentElement)?I(e.parentElement)&&(e.parentElement=Lr.getElementById(e.parentElement)):Ha(this._option.mode)&&(e.parentElement=Ka?.body)}}})))()}var yx;function bx(){return(bx=e((()=>{yx={offset:{x:10,y:10},panel:{padding:{top:10,left:10,right:10,bottom:10},backgroundColor:{type:`palette`,key:`popupBackgroundColor`},border:{color:{type:`palette`,key:`popupBackgroundColor`},width:0,radius:3},shadow:{x:0,y:4,blur:12,spread:0,color:{type:`palette`,key:`shadowColor`}}},spaceRow:6,titleLabel:{fontSize:{type:`token`,key:`l4FontSize`},lineHeight:{type:`token`,key:`l4LineHeight`},fontColor:{type:`palette`,key:`primaryFontColor`},fontWeight:`bold`,textBaseline:`middle`,spacing:0},shape:{size:8,spacing:6},keyLabel:{fontSize:{type:`token`,key:`l4FontSize`},lineHeight:{type:`token`,key:`l4LineHeight`},fontColor:{type:`palette`,key:`secondaryFontColor`},textBaseline:`middle`,spacing:26},valueLabel:{fontSize:{type:`token`,key:`l4FontSize`},lineHeight:{type:`token`,key:`l4LineHeight`},fontColor:{type:`palette`,key:`primaryFontColor`},fontWeight:`bold`,textBaseline:`middle`,spacing:0}}})))()}var xx,Sx;function Cx(){return(Cx=e((()=>{V(),fg(),qa(),fx(),_p(),Vm(),Y(),hx(),v(),E(),S(),Ge(),We(),Tt(),Ce(),Kf(),U(),vx(),Va(),Cv(),bx(),xx=class extends dg{constructor(){super(...arguments),this.layoutZIndex=1,this.type=B.tooltip,this.name=B.tooltip,this.transformerConstructor=_x,this.specKey=`tooltip`,this.layoutType=`none`,this._isReleased=!1,this.enable=!0,this._alwaysShow=!1,this._eventList=[],this._isTooltipShown=!1,this._clickLock=!1,this._mountEvent=(e,t,n)=>{this.event.on(e,t,n),this._eventList.push({eventType:e,handler:n})},this._handleClickToLock=e=>{var t;if(this._clickLock)this._handleChartMouseOut(e),this._clickLock=!1;else{if(!this._isTooltipShown&&!((t=this.tooltipHandler)?.isTooltipShown)?.call(t))return;this._clickLock=!0}},this._getMouseOutHandler=e=>t=>{var n;if(this._isReleased||this._alwaysShow||this._clickLock||!this._isTooltipShown&&!((n=this.tooltipHandler)?.isTooltipShown)?.call(n))return;let r=Ha(this._option?.mode),{clientX:i,clientY:a}=t.event;r&&e&&this._isPointerInChart({x:i,y:a})||(this._enterable?this._outTimer=setTimeout((()=>{this._handleChartMouseOut(t)}),this._spec?.showDelay??50):this._handleChartMouseOut(t))},this._handleChartMouseOut=e=>{var t;this._cacheActiveType&&(t=this._option)!=null&&t.componentShowContent&&(!1===this._option.componentShowContent.tooltip||D(this._option.componentShowContent.tooltip)&&!1===this._option.componentShowContent.tooltip[this._cacheActiveType])||this._alwaysShow||this._isReleased||this._isEnterTooltip||this._spec.triggerOff!==`none`&&(this._hideTooltipByHandler(Object.assign(Object.assign({},e),{tooltip:this})),this._handleMouseMove&&this._handleMouseMove.cancel&&this._handleMouseMove.cancel(),this._cacheEnterableRect=null,this._cacheInfo=void 0,this._cacheParams=void 0,this._cacheActiveType=void 0)},this._getMouseMoveHandler=e=>t=>{var n;this._isReleased||this._isEnterTooltip||(this._outTimer&&=(clearTimeout(this._outTimer),null),this.tooltipHandler||this._initHandler(),this.processor||this._initProcessor(),this._alwaysShow||(this._clickLock?e&&(this._handleChartMouseOut(t),this._clickLock=!1):!e&&this._enterable&&((n=this.tooltipHandler)?.isTooltipShown)?.call(n)?(this._showTimer&&clearTimeout(this._showTimer),this._showTimer=setTimeout((()=>{this._handleChartMouseMove(t,e)}),this._spec?.showDelay??50)):this._handleChartMouseMove(t,e)))},this._handleChartMouseMove=(e,t)=>{if(this._isReleased)return;let n=this._getMouseEventData(e),{tooltipInfo:{dimension:r},ignore:{mark:i}}=n,a={mark:!1,dimension:!1,group:!1},o=[`group`,`mark`,`dimension`];for(let r=0,i=o.length;r<i;r++){let i=o[r],s=!!this.processor[i]&&this._showTooltipByMouseEvent(i,n,e,t);if(s===`unShowByOption`)a[i]=`unShowByOption`;else if(s){a[i]=!0;break}}Object.values(a).every((e=>!e))&&!cp(e)&&(i&&px(this._cacheInfo)?a.mark=this._showTooltipByMouseEvent(`mark`,n,e,t,!0):h(r)&&(a.dimension=this._showTooltipByMouseEvent(`dimension`,n,e,t))),!0===a.mark||!0===a.group||!0===a.dimension&&!N(r)?this._initEventOfTooltipContent():this._cacheActiveType&&a[this._cacheActiveType]===`unShowByOption`||this._handleChartMouseOut(e)},this._showTooltipByMouseEvent=(e,t,n,r,i)=>{if(!this._showContentByEvent(e))return`unShowByOption`;let a=this.processor[e];if(!a.shouldHandleTooltip(n,t.tooltipInfo[e]))return!1;let o;if(this._hideTimer&&clearTimeout(this._hideTimer),i)o=!a.showTooltip(this._cacheInfo,n,!0);else{let r=t.tooltipInfo[e],i=this._isSameAsCache(r,n,e);o=!a.showTooltip(r,n,i),o&&(this._cacheInfo=r,this._cacheParams=n,this._cacheActiveType=e)}o&&(this._isTooltipShown=!0,r&&this._spec.lockAfterClick&&!this._clickLock?this._clickLock=!0:Number.isFinite(this._spec.hideTimer)&&(this._hideTimer=setTimeout((()=>{this._handleChartMouseOut()}),this._spec.hideTimer)));let s=this._option?.globalInstance;return o&&Gf.globalConfig.uniqueTooltip&&s&&Gf.hideTooltip(s.id),o},this._getMouseEventData=e=>{let t={tooltipInfo:{},ignore:{}};return Object.keys(this.processor).forEach((n=>{let{tooltipInfo:r,ignore:i}=this.processor[n].getMouseEventData(e);t.tooltipInfo[n]=r,t.ignore[n]=i})),t},this._hideTooltipByHandler=e=>{var t;if(!this._isTooltipShown&&!((t=this.tooltipHandler)?.isTooltipShown)?.call(t))return 0;this.event.emit(K.tooltipHide,Object.assign(Object.assign({},e),{source:q.chart,tooltip:this})),Object.values(this.processor).forEach((e=>{e.clearCache()}));let n=this._spec.handler??this.tooltipHandler;if(n?.hideTooltip){let t=n.hideTooltip.call(n,e);return t||(this._isTooltipShown=!1),t}return 1},this.hideTooltip=()=>{if(this._isReleased)return!1;let e={changePositionOnly:!1,tooltip:this,item:void 0,datum:void 0,source:q.chart};return this._alwaysShow=!1,!this._hideTooltipByHandler(e)}}isTooltipShown(){return this._isTooltipShown}_registerEvent(){}_releaseEvent(){}onLayoutEnd(){}created(){super.created(),this._regions=this._option.getAllRegions(),this._initEvent()}_compareSpec(e,t){let n=super._compareSpec(e,t);return O(t,e)||n.reMake||n.reCompile||(n.change=!0,n.reRender=!0,n.effects=Object.assign(Object.assign({},n.effects),{component:!0,render:!0})),n}release(){var e,t;super.release(),this._isReleased=!0,this._hideTimer&&clearTimeout(this._hideTimer),this._eventList.forEach((({eventType:e,handler:t})=>{this.event.off(e,t)})),this._eventList=[],(t=(e=this.tooltipHandler)?.release)==null||t.call(e),this._isTooltipShown=!1}beforeRelease(){this.event.emit(K.tooltipHide,{tooltip:this,chart:this.getChart()}),this.event.emit(K.tooltipRelease,{tooltip:this,chart:this.getChart()})}_initHandler(){var e;let t=this._spec.renderMode??`html`,n=this._option.globalInstance.getTooltipHandlerByUser();if(n)this.tooltipHandler=n,this._enterable=!1;else{let n=t===`canvas`?yv.canvas:yv.dom,r=H.getComponentPluginInType(n);r||za(`Can not find tooltip handler: `+n);let i=new r;i.name=`${this._spec.className}-${this._option.globalInstance.id??0}-${this.getSpecIndex()}`,(e=this.pluginService)==null||e.load([i]),this.tooltipHandler=i,this._spec.enterable&&t===`html`&&this.tooltipHandler?(this._enterable=!0,this._needInitEventOfTooltip=!0):this._enterable=!1}}_initEventOfTooltipContent(){var e;if(!this._needInitEventOfTooltip)return;let t=((e=this.tooltipHandler)?.getRootDom)?.call(e);t&&(t.addEventListener(`pointerenter`,(()=>{if(!this._enterable)return;this._isEnterTooltip=!0;let e=t.getBoundingClientRect?.call(t);e&&(this._cacheEnterableRect={width:e.width,height:e.height}),this._outTimer&&=(clearTimeout(this._outTimer),null),this._showTimer&&=(clearTimeout(this._showTimer),null)})),t.addEventListener(`pointerleave`,(()=>{if(this._enterable&&(this._isEnterTooltip=!1,this._spec.triggerOff!==`none`&&this._cacheEnterableRect)){let e=t.getBoundingClientRect?.call(t);e&&Object.keys(this._cacheEnterableRect).every((t=>this._cacheEnterableRect[t]===e[t]))&&(this._cacheEnterableRect=null,this._outTimer=setTimeout(this.hideTooltip,this._spec?.showDelay??50))}})),this._needInitEventOfTooltip=!1)}_initProcessor(){let e=this._spec.activeType;this.processor={},e.forEach((e=>{let t=H.createTooltipProcessor(e,this);t&&(this.processor[e]=t)}))}_initEvent(){if(this._option.disableTriggerEvent)return;let e=T(this._spec.trigger??`hover`),t=T(this._spec.triggerOff),n=this._option.mode;e.forEach((e=>{e===`hover`?(this._handleMouseMove=this._throttle(this._getMouseMoveHandler(!1)),this._mountEvent(`pointermove`,{source:`chart`},this._handleMouseMove),(Ua(n)||Wa(n))&&(this._mountEvent(`pointerdown`,{source:`chart`},this._getMouseMoveHandler(!1)),this._mountEvent(`pointerup`,{source:`window`},this._getMouseOutHandler(!0))),this._mountEvent(`pointerleave`,{source:`chart`},this._getMouseOutHandler(!1))):e===`click`?(this._mountEvent(`pointertap`,{source:`chart`},this._getMouseMoveHandler(!0)),this._mountEvent(`pointerup`,{source:`window`},this._getMouseOutHandler(!0))):D(e)&&this._mountEvent(e.eventType,{source:e.source??`chart`,consume:e.consume},this._getMouseMoveHandler(!0))})),t.filter((e=>D(e))).forEach((e=>{var t;this._mountEvent(e.eventType,{source:e.source??`chart`,consume:e.consume},this._getMouseOutHandler((t=e.checkOutside)!=null&&t))})),!e.includes(`click`)&&this._spec.lockAfterClick&&this._mountEvent(`pointertap`,{source:`chart`},this._handleClickToLock)}_throttle(e){let t;return t=ft(this._spec.throttleInterval)?this._spec.throttleInterval:this._spec.renderMode===`html`&&this._spec.transitionDuration?50:10,dt(e,t)}_showContentByEvent(e){return!(this._option?.componentShowContent&&(!1===this._option.componentShowContent.tooltip||D(this._option.componentShowContent.tooltip)&&!1===this._option.componentShowContent.tooltip[e]))}reInit(e){var t,n;if(super.reInit(e),this.tooltipHandler){let e=this._spec.renderMode??`html`,r=this._spec.enterable&&e===`html`;r&&!this._enterable&&(this._needInitEventOfTooltip=!0),this._enterable=r,(n=(t=this.tooltipHandler)?.reInit)==null||n.call(t)}else this._initHandler()}showTooltip(e,t){if(this.tooltipHandler||this._initHandler(),this.processor||this._initProcessor(),!this.tooltipHandler?.showTooltip)return!1;let n=sx(e,t,this);return n!==`none`&&(this._alwaysShow=!!t?.alwaysShow,this._cacheActiveType=n),n}_isSameAsCache(e,t,n){if(n!==this._cacheActiveType)return!1;if(e===this._cacheInfo)return!0;if(N(this._cacheInfo)||N(e))return!1;if(mx(e)){if(px(this._cacheInfo))return!1;let t=this._cacheInfo;return t.length===e.length&&e.every(((e,n)=>Im(e,t[n])))}if(mx(this._cacheInfo))return!1;let r=this._cacheInfo;if(e?.datum!==r.datum||e?.mark!==r.mark||e?.series!==r.series)return!1;let i=this._cacheParams;return!N(i)&&!N(t)&&i.mark===t.mark&&i.model===t.model&&i.datum===t.datum}_isPointerInChart(e){let t=this._option?.globalInstance;if(!t||!t.getChart())return!1;let{x:n,y:r}=e,{x:i,y:a,width:o,height:s}=t.getCanvas().getBoundingClientRect();return n>=i&&n<=i+o&&r>=a&&r<=a+s}getVisible(){return!1!==this._spec.visible}},xx.type=B.tooltip,xx.transformerConstructor=_x,xx.builtInTheme={tooltip:yx},xx.specKey=`tooltip`,Sx=()=>{H.registerComponent(xx.type,xx)}})))()}function wx(e){return e===z[`desktop-browser`]||e===z[`desktop-miniApp`]?{click:`pointertap`,hover:`pointermove`,hoverOut:`pointerleave`,clickOut:`pointerleave`}:Ua(e)||Wa(e)?{click:`tap`,hover:[`pointerdown`,`pointermove`],hoverOut:`pointerleave`,clickOut:`pointerleave`}:null}var Tx;function Ex(){return(Ex=e((()=>{Ma(),qa(),(function(e){e[e.ALL=3]=`ALL`,e[e.HORIZONTAL=2]=`HORIZONTAL`,e[e.VERTICAL=1]=`VERTICAL`})(Tx||={})})))()}var Dx,Ox,kx,Ax,jx,Mx;function Nx(){return(Nx=e((()=>{Pi(),We(),Ce(),j(),Ge(),vt(),le(),Tt(),S(),l(),Ma(),fg(),_o(),Y(),vu(),Ex(),ig(),Ke(),Dx=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`){var i=0;for(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},Ox={x:[`top`,`bottom`],y:[`left`,`right`],category:[`angle`],value:[`radius`]},kx={labelZIndex:!0,gridZIndex:!0},Ax={xField:!0,yField:!0,categoryField:!0,valueField:!0},jx={visible:!0,width:!0,style:!0},Mx=class extends dg{get enableRemain(){return this.triggerOff===`none`}constructor(e,t){super(e,t),this.specKey=`crosshair`,this.layoutType=`none`,this.gridZIndex=gu.CrossHair_Grid,this.labelZIndex=gu.CrossHair,this.trigger=`hover`,this._handleIn=e=>{if(!this._option)return;let{x:t,y:n}=this.calculateTriggerPoint(e);this.showDefault=!1,this._layoutCrosshair(t,n);let r=this._getNeedClearVRenderComponents();this._hasActive=r.some((e=>e&&!1!==e.attribute.visible))},this._handleClickInEvent=e=>{if(!this._hasActive||!this._spec.lockAfterClick||this._clickLock)return this._clickLock?(this._clickLock=!1,void this._handleOutEvent()):void(this._onlyLockClick||(this._handleIn(e),ft(this.triggerOff)&&(this._timer&&clearTimeout(this._timer),this._timer=setTimeout((()=>{this._handleOutEvent()}),this.triggerOff))));this._clickLock=!0},this._handleHoverInEvent=dt((e=>{this._clickLock||this._handleIn(e)}),10),this._handleOutEvent=()=>{this.enableRemain||this._clickLock||!this._hasActive||(this.clearOutEvent(),this.hideCrosshair())},this._handleTooltipShow=e=>{let t=e.tooltipData;if(e.isEmptyTooltip||!t||!t.length||D(this._spec.followTooltip)&&!1===this._spec.followTooltip[e.activeType])return void this._handleTooltipHideOrRelease();let{x:n,y:r}=this.calculateTriggerPoint(e);this.showDefault=!1,this._layoutCrosshair(n,r,t,e.activeType);let i=this._getNeedClearVRenderComponents();this._hasActive=i.some((e=>e&&!1!==e.attribute.visible))},this._handleTooltipHideOrRelease=()=>{this.clearOutEvent(),this.hideCrosshair()},this.enable=!0,this.showDefault=!0}_setAllAxisValues(e,t,n){let r=!1,i=!1,a=Ve(this._spec,`${n}.bindingAxesIndex`),o=A(a)&&a.length>0;if(e.forEach((e=>{St(e.axis.getScale().type)&&(r?i=!0:r=!0)})),i&&!o&&(this.enable=!1),!this.enable)return!1;let{currentValue:s}=this._stateByField[n];return e.forEach(((e,n)=>{let r=e.axis;s.set(n,{datum:this._getDatumAtPoint(r,t),axis:r})})),!0}clearAxisValue(){Object.keys(this._stateByField).forEach((e=>{this._stateByField[e].currentValue.clear()}))}hideCrosshair(){this.clearAxisValue(),this.hide()}showCrosshair(e){e&&e.length&&(this.showDefault=!1,this.clearAxisValue(),e.forEach((e=>{let{axis:t,value:n}=e;this.setAxisValue(n,t)})),this.layoutByValue(!1))}_getLimitBounds(){if(!this._limitBounds){let{width:e,height:t}=this._option.globalInstance.getChart()?.getViewRect()??{width:0,height:0};this._limitBounds={x1:0,y1:0,x2:e,y2:t}}return this._limitBounds}_showDefaultCrosshairBySpec(){let e=!1;return Object.keys(this._stateByField).forEach((t=>{let n=this._spec[t];if(n&&n.visible&&n.defaultSelect){let{axisIndex:r=0,datum:i}=n.defaultSelect,a=this._option.getComponentsByKey(`axes`).find((e=>e.getSpecIndex()===r));a&&(e=!0,this._stateByField[t].currentValue.clear(),this._stateByField[t].currentValue.set(r,{axis:a,datum:i}))}})),e}_updateVisibleCrosshair(){let e=!1;Object.keys(this._stateByField).forEach((t=>{let n=this._spec[t];n&&n.visible&&this._stateByField[t].currentValue.size?e=!0:this._hideByField(t)})),e&&this.layoutByValue(!1)}_showDefaultCrosshair(){this.showDefault?this._showDefaultCrosshairBySpec()&&this.layoutByValue(!1):this._updateVisibleCrosshair()}setAttrFromSpec(){super.setAttrFromSpec(),this._parseCrosshairSpec()}created(){super.created(),this._initEvent()}_compareSpec(e,t){let n=super._compareSpec(e,t);return!O(t,e)&&(n.change=!0,n.reRender=!0,n.reMake||(this._isComponentOnlySpecChange(e,t)?n.effects=Object.assign(Object.assign({},n.effects),{component:!0,layout:!0,render:!0}):n.reMake=!0)),n}_isComponentOnlySpecChange(e,t){return Object.keys(Object.assign(Object.assign({},t),e)).every((n=>O(t?.[n],e?.[n])||kx[n]||Ax[n]&&this._isFieldComponentOnlySpecChange(t?.[n],e?.[n])))}_isFieldComponentOnlySpecChange(e,t){return Object.keys(Object.assign(Object.assign({},e),t)).every((n=>O(e?.[n],t?.[n])||n===`label`||n===`line`&&this._isLineComponentOnlySpecChange(e?.line,t?.line)))}_isLineComponentOnlySpecChange(e,t){return Object.keys(Object.assign(Object.assign({},e),t)).every((n=>O(e?.[n],t?.[n])||jx[n]))}_initEvent(){if(!this._option.disableTriggerEvent){if(this._spec.followTooltip)this._registerTooltipEvent();else{let e=this._getTriggerEvent();e&&e.forEach((e=>{this._registerEvent(e.in,!1,e.click),e.out&&this._registerEvent(e.out,!0)}))}}}_registerEvent(e,t,n){if(!1===this._option.componentShowContent?.crosshair)return;let r=t?this._handleOutEvent:n?this._handleClickInEvent:this._handleHoverInEvent,i=t?{level:J.chart}:{source:q.chart};A(e)?e.forEach((e=>{this.event.on(e,i,r)})):this.event.on(e,i,r)}_eventOff(e,t,n){let r=t?this._handleOutEvent:n?this._handleClickInEvent:this._handleHoverInEvent;A(e)?e.forEach((e=>{this.event.off(e,r)})):this.event.off(e,r)}onBeforeRender(){this._limitBounds=null,this._showDefaultCrosshair()}calculateTriggerPoint(e){let{event:t}=e,n=this._option.getCompiler().getStage().getLayer(void 0),r={x:t.viewX,y:t.viewY};return n.globalTransMatrix.transformPoint({x:t.viewX,y:t.viewY},r),{x:r.x-this.getLayoutStartPoint().x,y:r.y-this.getLayoutStartPoint().y}}_getTriggerEvent(){let{mode:e=z[`desktop-browser`]}=this._option,t=wx(e);if(t){let e=T(this.trigger||`hover`),n=e=>e===`click`?this.triggerOff===`none`?null:t.clickOut:t.hoverOut;this._spec.lockAfterClick&&!e.includes(`click`)?(e.push(`click`),this._onlyLockClick=!0):this._onlyLockClick=!1;let r=[];return e.forEach((e=>{r.push({click:e===`click`,in:t[e],out:n(e)})})),r}return null}_registerTooltipEvent(){this.event.on(K.tooltipHide,{source:q.chart},this._handleTooltipHideOrRelease),this.event.on(K.tooltipShow,{source:q.chart},this._handleTooltipShow),this.event.on(K.tooltipRelease,{source:q.chart},this._handleTooltipHideOrRelease)}_getAxisInfoByField(e){var t;let n=(t=this._option).getComponentsByKey?.call(t,`axes`);if(!n?.length)return null;let r=Ve(this._spec,`${e}Field.bindingAxesIndex`);if(r||(r=[],n.forEach(((t,n)=>{Ox[e].includes(t.getOrient())&&r.push(n)}))),!r.length)return null;let i=/* @__PURE__ */ new Map,a=1/0,o=1/0,s=-1/0,c=-1/0,{x:l,y:u}=this.getLayoutStartPoint();return r.forEach((e=>{var t;a=1/0,o=1/0,s=-1/0,c=-1/0;let r=n.find((t=>t.getSpecIndex()===e));if(!r)return;let d=(t=r).getInnerOffset?.call(t)||{left:0,right:0,top:0,bottom:0};r.getRegions().forEach((e=>{let{x:t,y:n}=e.getLayoutStartPoint();a=Math.min(a,t-l+d.left),o=Math.min(o,n-u+d.top),s=Math.max(s,t+e.getLayoutRect().width-l-d.right),c=Math.max(c,n+e.getLayoutRect().height-u-d.bottom)})),i.set(e,{x1:a,y1:o,x2:s,y2:c,axis:r})})),i}onLayoutEnd(){let e=this._regions[0];this.setLayoutRect(e.getLayoutRect()),this.setLayoutStartPosition(e.getLayoutStartPoint()),super.onLayoutEnd()}_releaseEvent(){this.clearOutEvent();let e=this._getTriggerEvent();e&&e.forEach((e=>{this._eventOff(e.in,!1,e.click),e.out&&this._eventOff(e.out,!0)}))}_parseFieldInfo(){Object.keys(this._stateByField).forEach((e=>{let t=this._spec[e],{crosshairComp:n}=this._stateByField[e];if(t&&t.visible){if(this._stateByField[e].attributes=this._parseField(t,e),n){let{style:t,type:r}=this._stateByField[e].attributes,i=r===`rect`?`rectStyle`:`lineStyle`;n.setAttributes({[i]:t})}}else n&&n.parent&&n.parent.removeChild(n)}))}_parseCrosshairSpec(){this._parseFieldInfo();let{trigger:e,triggerOff:t,labelZIndex:n,gridZIndex:r}=this._spec;e&&(this.trigger=e),(t===`none`||ft(t)&&t>0)&&(this.triggerOff=t),n!==void 0&&(this.labelZIndex=n),r!==void 0&&(this.gridZIndex=r)}_parseField(e,t){var n,r;let i={},{line:a={},label:o={},visible:s}=e;if(i.visible=s,i.type=a.type||`line`,!1===a.visible)i.style={visible:!1};else{let t=a.style||{},{stroke:r,fill:o,lineWidth:s}=t,c=t,{strokeOpacity:l,fillOpacity:u,opacity:d}=c,f=Dx(c,[`strokeOpacity`,`fillOpacity`,`opacity`]),p=i.type===`line`,m=p?l:u;if(ft(d)&&(m=(m??1)*d),i.style=Object.assign({opacity:m,pickable:!1,visible:!0},f),p)i.style.stroke=r||o,i.style.lineWidth=Ve(a,`width`,s||2);else{i.style.fill=o||r,(n=e?.line?.style)!=null&&n.stroke&&(i.style.stroke=e.line.style.stroke);let t=Ve(a,`width`);if(typeof t==`string`){let e=parseInt(t.substring(0,t.length-1),10)/100;i.style.sizePercent=e}else typeof t!=`number`&&typeof t!=`function`||(i.style.size=t)}}if(o.visible){let e=o.labelBackground||{},t=(r=o.syncAxisLabelAngle)!=null&&r,n=o.style||{},a=e.style||{},{fill:s=`rgba(47, 59, 82, 0.9)`,stroke:c,outerBorder:l}=a,u=Dx(a,[`fill`,`stroke`,`outerBorder`]);i.label={visible:!0,formatMethod:o.formatMethod,formatter:o.formatter,minWidth:e.minWidth,maxWidth:e.maxWidth,padding:e.padding,syncAxisLabelAngle:t,textStyle:Object.assign(Object.assign({fontSize:14,pickable:!1},n),{fill:n.fill||`#fff`,stroke:Ve(n,`stroke`)}),panel:(de(e.visible)?e.visible:e)?Object.assign({visible:!0,pickable:!1,fill:s,stroke:c,outerBorder:Object.assign({stroke:s,distance:0,lineWidth:3},l)},u):{visible:!1},zIndex:this.labelZIndex,childrenPickable:!1,pickable:!1}}else i.label={visible:!1};return i}_filterAxisByPoint(e,t,n){return e&&e.forEach((r=>{let i=r.axis;if(ro(r,t,n)&&e.delete(i.getSpecIndex()),i.type.startsWith(`polarAxis`)){let r=i.getCenter(),a=i.getInnerRadius(),o=i.getOuterRadius(),s=Mt.distancePP({x:t,y:n},r);(s>o||s<a)&&e.delete(i.getSpecIndex())}})),e}_updateCrosshairLabel(e,t,n){let r=this.getContainer();e?e.setAttributes(t):(e=new bn(t),r?.add(e),n(e)),eg(e,this._getLimitBounds())}clearOutEvent(){this._timer&&=(clearTimeout(this._timer),null),this._clickLock&&=null,this._hasActive&&=null}_hideByField(e){let{crosshairComp:t,labelsComp:n}=this._stateByField[e];t&&t.hideAll(),n&&Object.keys(n).forEach((e=>{n[e]&&n[e].hideAll()}))}hide(){Object.keys(this._stateByField).forEach((e=>{this._hideByField(e)}))}_getNeedClearVRenderComponents(){return Object.keys(this._stateByField).reduce(((e,t)=>{let{crosshairComp:n,labelsComp:r}=this._stateByField[t];return n&&e.push(n),r&&Object.keys(r).forEach((t=>{r[t]&&e.push(r[t])})),e}),[])}},Mx.specKey=`crosshair`})))()}var Px;function Fx(){return(Fx=e((()=>{Px={trigger:`hover`,bandField:{visible:!1,line:{type:`rect`,visible:!0,style:{fill:{type:`palette`,key:`axisGridColor`},opacity:.7,lineWidth:0,stroke:{type:`palette`,key:`markLineStrokeColor`},lineDash:[2,3]}},label:{visible:!1,style:{fontWeight:`normal`,fill:{type:`palette`,key:`axisMarkerFontColor`},fontSize:{type:`token`,key:`l5FontSize`}},labelBackground:{padding:{bottom:0,top:0,left:2,right:2},style:{fill:{type:`palette`,key:`axisMarkerBackgroundColor`},cornerRadius:1}}}},linearField:{visible:!1,line:{type:`line`,visible:!0,style:{stroke:{type:`palette`,key:`markLineStrokeColor`},fill:`transparent`,opacity:.7,lineDash:[2,3]}},label:{visible:!1,style:{fontWeight:`normal`,fill:{type:`palette`,key:`axisMarkerFontColor`},fontSize:{type:`token`,key:`l5FontSize`}},labelBackground:{padding:{bottom:0,top:0,left:2,right:2},style:{fill:{type:`palette`,key:`axisMarkerBackgroundColor`},cornerRadius:1}}}}}})))()}var Ix,Lx;function Rx(){return(Rx=e((()=>{v(),V(),Cn(),tn(),Nx(),km(),U(),mv(),xo(),tp(),Fx(),Ix=class extends Mx{static getSpecInfo(e){return ep(e,this.specKey,this.type,(e=>e.xField&&!1!==e.xField.visible||e.yField&&!1!==e.yField.visible))}constructor(e,t){super(e,t),this.type=B.cartesianCrosshair,this.name=B.cartesianCrosshair,this._stateByField={xField:{coordKey:`x`,anotherAxisKey:`y`,currentValue:/* @__PURE__ */ new Map,labelsComp:{top:null,bottom:null}},yField:{coordKey:`y`,anotherAxisKey:`x`,currentValue:/* @__PURE__ */ new Map,labelsComp:{left:null,right:null}}}}_findAllAxisContains(e,t){let n=this._getAxisInfoByField(`x`),r=this._getAxisInfoByField(`y`);return{xAxisMap:this._filterAxisByPoint(n,e,t),yAxisMap:this._filterAxisByPoint(r,e,t)}}_getDatumAtPoint(e,t){let n=$(e.getOrient())?`x`:`y`,r=t[n]-(e.getLayoutStartPoint()[n]-this.getLayoutStartPoint()[n]);return e.getScale().invert(r)}setAxisValue(e,t){$(t.getOrient())?this._stateByField.xField.currentValue.set(t.getSpecIndex(),{datum:e,axis:t}):this._stateByField.yField.currentValue.set(t.getSpecIndex(),{datum:e,axis:t})}_layoutCrosshair(e,t,n,r){let i=e,a=t;if(n&&n.length){if(r===`dimension`){let e=n[0],t=e.data.findIndex((e=>e.datum.length>0)),r;if(t>-1){let n=e.data[t];r=n.series.dataToPosition(n.datum[0])}(h(e.dimType)?e.dimType===`y`:xm((e?.axis)?.getOrient()))?a=r?.y:i=r?.x}else if(r===`mark`){let e=n[0],t=e.series.dataToPosition(e.datum[0]);i=t?.x,a=t?.y}}this.clearAxisValue();let{xAxisMap:o,yAxisMap:s}=this._findAllAxisContains(i,a);if(o&&o.size===0||s&&s.size===0){if(this.enableRemain)return;this.hide()}else o&&o.size&&this._setAllAxisValues(o,{x:i,y:a},`xField`),s&&s.size&&this._setAllAxisValues(s,{x:i,y:a},`yField`),this.layoutByValue()}layoutByValue(e){if(!this.enable)return;let t=bo(this._regions,`cartesian`);t&&(cv(this._stateByField,t,this.getLayoutStartPoint(),e??this.enableRemain),Object.keys(this._stateByField).forEach((e=>{this._layoutByField(e)})))}_layoutByField(e){let{cacheInfo:t,attributes:n,labelsComp:r,bandSize:i,coordKey:a}=this._stateByField[e];if(!n||!t||t._isCache&&this.enableRemain)return;let{coord:o,labels:s,visible:c,labelsTextStyle:l}=t;if(c){let c=dv(this._stateByField[e]);this._updateCrosshairByField(e,c),Object.keys(s).forEach((c=>{var u;if(s[c].visible){let d=Object.assign(Object.assign(Object.assign({[a]:o+i/2},s[c]),n.label),{angle:n.label.syncAxisLabelAngle&&(u=t.axisLabel?.attribute.angle)!=null?u:0,textStyle:Object.assign(Object.assign({},n.label?.textStyle),l[c]),zIndex:this.labelZIndex,visible:!0});this._updateCrosshairLabel(r[c],d,(t=>{t.name=`crosshair-${e.replace(`Field`,``)}-${c}-label`,r[c]=t}))}else r[c]&&r[c].hideAll()}))}else this._hideByField(e)}_updateCrosshairByField(e,t){let n=this.getContainer(),{attributes:r}=this._stateByField[e],{crosshairComp:i}=this._stateByField[e];if(i)i.setAttributes(t);else{let a=r.style;r.type===`line`?i=new pn(Object.assign(Object.assign({},t),{lineStyle:a,zIndex:this.gridZIndex+1,disableTriggerEvent:this._option.disableTriggerEvent,pickable:!1})):r.type===`rect`&&(i=new zn(Object.assign(Object.assign({},t),{rectStyle:a,zIndex:this.gridZIndex,disableTriggerEvent:this._option.disableTriggerEvent,pickable:!1}))),n?.add(i),this._stateByField[e].crosshairComp=i}}},Ix.specKey=`crosshair`,Ix.builtInTheme={crosshair:Px},Ix.type=B.cartesianCrosshair,Lx=()=>{H.registerComponent(Ix.type,Ix)}})))()}var zx,Bx,Vx,Hx,Ux,Wx,Gx,Kx,qx,Jx;function Yx(){return(Yx=e((()=>{j(),v(),S(),E(),Ke(),zx=(e,t)=>{let{getNewDomain:n,isContinuous:r,field:i,originalFields:a}=t,o=i(),s=n();if(N(s)||N(o))return e;let c=a(),l=A(o)?o[0]:o;return e[l]&&c&&c[l]&&c[l].lockStatisticsByDomain&&!r()&&(e[l].values=s),e},Bx=(e,t)=>{let{getNewDomain:n,isContinuous:r,field:i}=t,a=i(),o=n();if(N(o)||N(a))return e;if(o.length===0)return[];let s={};o.forEach((e=>{s[e]||(s[e]=1)}));let c=null;return c=r()?e=>{let t=!1;return T(a).every((n=>{e[n]>=o[0]&&e[n]<=w(o)&&(t=!0)})),t}:e=>{let t=!1;return T(a).every((n=>{(s[e[n]+``]||s[e[n]])&&(t=!0)})),t},e.filter(c)},Vx=(e,t)=>{let{stateFields:n,valueFields:r,dataCollection:i,isCategoryState:a,seriesCollection:o}=t.input,{stateField:s,valueField:c}=t.output,l={},u=[],d=[],f=[],p=!1,m=!1;return i.forEach(((e,t)=>{if(N(n[t]))return;let i=o[t];if(i){let e=i.getRawDataStatisticsByField(n[t]);h(e?.max)&&h(e?.min)&&(m=!0)}let a=e.getFields()?.[n[t]];a&&a.lockStatisticsByDomain&&(p=!0,a.domain.forEach((e=>{N(l[e])&&(f.push(e),l[e]=0,u.push(e))}))),e.latestData.forEach((e=>{T(n[t]).forEach((n=>{N(e[n])||(N(l[e[n]])&&(f.push(e[n]),l[e[n]]=0,u.push(e[n])),N(r[t])||(l[e[n]]+=isNaN(parseFloat(e[r[t]]))?1:parseFloat(e[r[t]])))}))}))})),(p?f:!1===a||m?f.sort(((e,t)=>e-t)):u).forEach((e=>{let t={[s]:e};c&&(t[c]=l[e]),d.push(t)})),d},Hx=(e,t,n)=>{let r=t.domain();if(k(t.type))return n?r[0]+(w(r)-r[0])*(1-e):r[0]+(w(r)-r[0])*e;let i=t.range();n&&(i=i.slice().reverse());let a=i[0]+(w(i)-i[0])*e;return t.invert(a)},Ux=(e,t,n)=>{let r=t.scale(e),i=t.range();return!n&&k(t.type)&&(i=i.slice().reverse()),Math.max(0,Math.min(1,(r-i[0])/(w(i)-i[0])))},Wx=(e,t)=>{let n=e;if(!n)return!1;let r=n.getScale();return r.range()[0]>r.range()[1]&&(!n.getInverse()||t)},Gx=e=>{let t=e?.bandSize,n=e?.maxBandSize,r=e?.minBandSize;if(t||r||n)return{bandSize:t,maxBandSize:n,minBandSize:r}},Kx=(e,t,n)=>e===`start`?t===`percent`&&h(n.start)||t===`value`&&h(n.startValue):t===`percent`&&h(n.end)||t===`value`&&h(n.endValue),qx=(e,t,n)=>{if(k(n.type))return[Math.min(t,e),Math.max(t,e)];let r=n.domain(),i=r.indexOf(e),a=r.indexOf(t);return r.slice(Math.min(i,a),Math.max(i,a)+1)},Jx=(e,t,n,r,i)=>{if(k(i.type)){let a=i.domain(),o=a[0],s=w(a)-o,c=h(e)?o+s*e:+t,l=h(n)?o+s*n:+r;return[Math.min(l,c),Math.max(l,c)]}let a=i.domain(),o=i.range(),s=o[o.length-1]-o[0],c=h(e)?a.indexOf(i.invert(s*e+o[0])):a.indexOf(t),l=h(n)?a.indexOf(i.invert(s*n+o[0])):a.indexOf(r);return a.slice(Math.min(c,l),Math.max(c,l)+1)}})))()}var Xx;function Zx(){return(Zx=e((()=>{Dt(),C(),v(),le(),Re(),Oe(),jy(),km(),Xx=class{enableInteraction(){this._activeRoam=!0}disableInteraction(){this._activeRoam=!1}zoomIn(e){this.handleChartZoom({zoomDelta:1.2,zoomX:e?.x,zoomY:e?.y})}zoomOut(e){this.handleChartZoom({zoomDelta:.8,zoomX:e?.x,zoomY:e?.y})}constructor(e,t,n,r,i,a,o,s){this._activeRoam=!0,this._zoomAttr={enable:!0,rate:1,focus:!0},this._dragAttr={enable:!0,rate:1,reverse:!0},this._scrollAttr={enable:!0,rate:1,reverse:!0},this.initZoomEvent=()=>{var e;let t={delayType:this._spec?.delayType??`throttle`,delayTime:h(this._spec?.delayType)?this._spec?.delayTime??30:0,realTime:(e=this._spec?.realTime)==null||e,allowComponentZoom:!0};this._zoomAttr.enable&&this.initZoomEventOfRegions(this.getRegions(),null,this.handleChartZoom,t),this._scrollAttr.enable&&this.initScrollEventOfRegions(this.getRegions(),null,this.handleChartScroll,t),this._dragAttr.enable&&this.initDragEventOfRegions(this.getRegions(),null,this.handleChartDrag,t)},this.handleChartZoom=(e,t)=>{if(!this._activeRoam||this._zoomAttr.filter&&!this._zoomAttr.filter(e,t))return;let{zoomDelta:n,zoomX:r,zoomY:i}=e,{x:a,y:o}=this.getRegions()[0].getLayoutStartPoint(),{width:s,height:c}=this.getRegions()[0].getLayoutRect(),l=Math.abs(this.getState().start-this.getState().end),u=this._spec.roamZoom?.rate??1;if(l>=1&&n<1||l<=.01&&n>1)return;let d=this._isHorizontal?r:i,f=l*(n-1)*u,p=f/2,m=f/2;if(d){let e=this._isHorizontal?a:o,t=this._isHorizontal?s:c;p=Math.abs(e-d)/Math.abs(t-e)*f,m=Math.abs(t-d)/Math.abs(t-e)*f}let h=Pe(this.getState().start+p,0,1),g=Pe(this.getState().end-m,0,1);this._handleChange(Math.min(h,g),Math.max(h,g),!0)},this.handleChartScroll=(e,t)=>{if(!this._activeRoam||this._scrollAttr.filter&&!this._scrollAttr.filter(e,t))return!1;let{scrollX:n,scrollY:r}=e,i=this._isHorizontal?n:r,a=this._isHorizontal?Te(n/r)>=.5:Te(r/n)>=.5;if(this._scrollAttr.reverse||(i=-i),a){let e=this._spec.scrollStep;P(e)&&(i=(i>0?1:-1)*(e*(this.getState().end-this.getState().start)/1)),this.handleChartMove(i,this._scrollAttr.rate??1)}let o=this.getState().start!==0&&this.getState().end!==1;return a&&o},this.handleChartDrag=(e,t)=>{if(!this._activeRoam||this._dragAttr.filter&&!this._dragAttr.filter(e,t))return;let[n,r]=e,i=this._isHorizontal?n:r;this._dragAttr.reverse&&(i=-i),this.handleChartMove(i,this._dragAttr.rate??1)},this.handleChartMove=(e,t)=>{let n=this._isHorizontal?this.getLayoutRect().width:this.getLayoutRect().height;if(Math.abs(e)>=1e-6){if(e>0&&this.getState().end<1){let r=Math.min(1-this.getState().end,e/n)*t;this._handleChange(this.getState().start+r,this.getState().end+r,!0)}else if(e<0&&this.getState().start>0){let r=Math.max(-this.getState().start,e/n)*t;this._handleChange(this.getState().start+r,this.getState().end+r,!0)}}return!1},this._type=e,this._spec=t,this._handleChange=n,this.getLayoutRect=r,this.getState=i,this.getRegions=a,this._regions=a(),this.getOption=o,this._option=o(),this.getEvent=s,this._isHorizontal=Tm(wm(t))===`horizontal`}setEventAttrFromSpec(){!0===this._spec.roamZoom||this._spec.roamZoom?this._zoomAttr=ke({},this._zoomAttr,this._spec.roamZoom):this._zoomAttr.enable=!1,!0===this._spec.roamDrag||this._spec.roamDrag?this._dragAttr=ke({},this._dragAttr,this._spec.roamDrag):this._dragAttr.enable=!1,!0===this._spec.roamScroll||this._spec.roamScroll?this._scrollAttr=ke({},this._scrollAttr,this._spec.roamScroll):this._scrollAttr.enable=!1,de(this._spec.roam)&&(this._zoomAttr.enable=this._type!==`scrollBar`&&this._spec.roam,this._dragAttr.enable=this._spec.roam,this._scrollAttr.enable=this._spec.roam),(this._zoomAttr.enable||this._dragAttr.enable||this._scrollAttr.enable)&&this.initZoomable(this.getEvent(),this._option.mode)}},ne(Xx,Ay)})))()}var Qx;function $x(){return($x=e((()=>{xo(),fg(),V(),Yx(),bt(),Ke(),Le(),km(),E(),Ce(),v(),S(),Re(),be(),Et(),bd(),jy(),El(),yu(),Zx(),Y(),Qx=class extends dg{get isHorizontal(){return this._isHorizontal}get stateScale(){return this._stateScale}get relatedAxisComponent(){return this._relatedAxisComponent}setStartAndEnd(e,t,n=[`percent`,`percent`]){let[r=`percent`,i=`percent`]=n,a=r===`percent`?e:Ux(e,this._stateScale,this._isHorizontal),o=i===`percent`?t:Ux(t,this._stateScale,this._isHorizontal);this._handleChange(a,o,!0)}enableInteraction(){this._dataFilterEvent.enableInteraction()}disableInteraction(){this._dataFilterEvent.disableInteraction()}zoomIn(e){this._dataFilterEvent.zoomIn(e)}zoomOut(e){this._dataFilterEvent.zoomOut(e)}_initEvent(){var e;this._dataFilterEvent.initZoomEvent(),(e=this._relatedAxisComponent)==null||e.event.on(K.scaleRawDomainUpdate,(({model:e})=>{console.log(`scaleRawDomainUpdate`,e.getRawDomain())}))}_handleChange(e,t,n){var r;(r=this._spec?.zoomLock)!=null&&r||t-e!==this._spanCache&&(t-e<this._minSpan||t-e>this._maxSpan)?this._shouldChange=!1:(this._shouldChange=!0,this._spanCache=t-e)}_updateRangeFactor(e){let t=this._relatedAxisComponent,n=t.getScale(),r=Wx(t,this._isHorizontal),i=r?[1-this._end,1-this._start]:[this._start,this._end];if(r)switch(e){case`startHandler`:t.scaleRangeFactorEnd(i[1]);break;case`endHandler`:t.scaleRangeFactorStart(i[0]);break;default:t.scaleRangeFactorStart(i[0],!0),t.scaleRangeFactorEnd(i[1])}else switch(e){case`startHandler`:t.scaleRangeFactorStart(i[0]);break;case`endHandler`:t.scaleRangeFactorEnd(i[1]);break;default:t.scaleRangeFactorEnd(i[1],!0),t.scaleRangeFactorStart(i[0])}let a=n.rangeFactor();a?(this._start=r?1-a[1]:a[0],this._end=r?1-a[0]:a[1]):(this._start=0,this._end=1)}get visible(){return this._visible}constructor(e,t){super(e,t),this.layoutType=`none`,this._orient=`left`,this._cacheVisibility=void 0,this._dataUpdating=!1,this._hasInitStateScale=!1,this._shouldChange=!0,this._stateField=`x`,this._currentDataCollection=[],this._handleStateChange=(e,t,n)=>{var r,i;return this._startValue=e,this._endValue=t,this._newDomain=qx(this._startValue,this._endValue,this._stateScale),(i=(r=this.effect).onZoomChange)==null||i.call(r,n),!0},this.effect={onZoomChange:e=>{var t,n;let r=this._relatedAxisComponent;if(r&&this._filterMode===`axis`){let i=r.getScale(),a=r.getSpec();this._auto&&Gx(a)&&this._spec.ignoreBandSize&&(i.bandwidth(`auto`),i.maxBandwidth(`auto`),i.minBandwidth(`auto`)),this._updateRangeFactor(e),this._auto&&((n=(t=this._component)?.setStartAndEnd)==null||n.call(t,this._start,this._end)),r.effect.scaleUpdate({value:`force`})}else vo(this._regions,(e=>{var t;(t=e.getViewData())==null||t.markRunning()}),{userId:this._seriesUserId,specIndex:this._seriesIndex}),vo(this._regions,(e=>{e.reFilterViewData()}),{userId:this._seriesUserId,specIndex:this._seriesIndex})}},this._visible=!0,this._orient=wm(e),this._isHorizontal=Tm(this._orient)===`horizontal`,this._dataFilterEvent=new Xx(this.type,this._spec,this._handleChange.bind(this),this.getLayoutRect.bind(this),(()=>({start:this._start,end:this._end})),(()=>this._regions),(()=>this._option).bind(this),(()=>this.event))}created(){this._handleDataCollectionChangeBound=this._handleDataCollectionChange.bind(this),super.created(),this._setAxisFromSpec(),this._setRegionsFromSpec(),this._initEvent(),this._initData(),this._initStateScale(),this._setStateFromSpec()}initLayout(){super.initLayout(),this._layout&&(this._layout.layoutOrient=this._orient)}init(e){super.init(e),this._addTransformToSeries(),this._start===0&&this._end===1||this.effect.onZoomChange()}_compareSpec(e,t){let n=super._compareSpec(e,t);return n.reMake||O(t,e)||(n.change=!0,n.reRender=!0,!n.reCompile&&this._isComponentOnlySpecChange(e,t)?n.effects=Object.assign(Object.assign({},n.effects),{component:!0,layout:!0,render:!0}):n.reMake=!0),n}_getComponentOnlySpecKeys(){return null}_isComponentOnlySpecChange(e,t){let n=this._getComponentOnlySpecKeys();return n?Object.keys(Object.assign(Object.assign({},t),e)).every((r=>O(t?.[r],e?.[r])||n[r])):!1}reInit(e){super.reInit(e),this._marks.forEach((e=>{e.getMarks().forEach((e=>{this.initMarkStyleWithSpec(e,this._spec[e.name])}))}))}onLayoutStart(e,t){super.onLayoutStart(e,t);let n=this._autoUpdate(e);this._autoVisible(n),this._dataUpdating=!1}updateLayoutAttribute(){this._visible&&this._createOrUpdateComponent(),this._hasInitStateScale||=(this._start===0&&this._end===1||(this._newDomain=Jx(this._spec.start,this._startValue,this._spec.end,this._endValue,this._stateScale),this.effect.onZoomChange()),!0)}_initAfterLayout(){this._stateScale=null,this._initStateScale(),this._updateScaleRange(),this._setStateFromAxis()}_beforeLayoutEnd(){this._hasInitStateScale?this._updateScaleRange():this._initAfterLayout()}onLayoutEnd(){var e;this._beforeLayoutEnd();let t=this._start!==0||this._end!==1;this._autoVisible(t),super.onLayoutEnd(),(e=this._relatedAxisComponent)==null||e.updateScaleRange()}getBoundsInRect(e){let t={x1:this.getLayoutStartPoint().x,y1:this.getLayoutStartPoint().y,x2:0,y2:0};return this._isHorizontal?(t.y2=t.y1+this._height,t.x2=t.x1+e.width):(t.x2=t.x1+this._width,t.y2=t.y1+e.height),t}setAttrFromSpec(){var e;super.setAttrFromSpec(),this._dataFilterEvent.setEventAttrFromSpec(),this._field=this._spec.field,this._width=this._computeWidth(),this._height=this._computeHeight(),this._visible=(e=this._spec.visible)==null||e}_setAxisFromSpec(){if(h(this._spec.axisId)?this._relatedAxisComponent=this._option.getComponentByUserId(this._spec.axisId):h(this._spec.axisIndex)&&(this._relatedAxisComponent=this._option.getComponentByIndex(`axes`,this._spec.axisIndex)),N(this._spec.field)&&!this._relatedAxisComponent){let e=this._option.getComponentsByKey(`axes`),t=e.find((e=>Tm(e._orient)===Tm(this._orient)));if(t)this._relatedAxisComponent=t;else{let t=e.find((e=>!k(e.getScale().type)));this._relatedAxisComponent=t}}this._relatedAxisComponent&&this._filterMode===`axis`&&(this._relatedAxisComponent.autoIndentOnce=!0)}_setRegionsFromSpec(){var e;this._regions=this._relatedAxisComponent?this._relatedAxisComponent.getRegions():this._option.getAllRegions();let t=this._relatedAxisComponent?(e=this._relatedAxisComponent).getBindSeriesFilter?.call(e):null;if(h(t)&&(h(t.userId)&&(this._seriesUserId=T(t.userId)),h(t.specIndex)&&(this._seriesIndex=T(t.specIndex))),h(this._spec.seriesId)){let e=T(this._spec.seriesId);this._seriesUserId=this._seriesUserId?this._seriesUserId.filter((t=>e.includes(t))):e}if(h(this._spec.seriesIndex)){let e=T(this._spec.seriesIndex);this._seriesIndex=this._seriesIndex?this._seriesIndex.filter((t=>e.includes(t))):e}if(h(this._spec.regionIndex)){let e=this._option.getRegionsInIndex(T(this._spec.regionIndex));this._regions=this._regions.filter((t=>e.includes(t)))}else if(h(this._spec.regionId)){let e=T(this._spec.regionId);this._regions=e.length?this._regions.filter((t=>e.includes(t.id))):[]}}_collectDataInfo(){let e=[],t=[],n=[],r=[],i;if(this._relatedAxisComponent){let t={};vo(this._regions,(a=>{let o=a.coordinate===`cartesian`?a.getXAxisHelper():a.coordinate===`polar`?a.angleAxisHelper:null,s=a.coordinate===`cartesian`?a.getYAxisHelper():a.coordinate===`polar`?a.radiusAxisHelper:null;if(!o||!s)return;let c=o.getAxisId()===this._relatedAxisComponent.id?o:s.getAxisId()===this._relatedAxisComponent.id?s:this._isHorizontal?o:s,l=c===o?s:o,u=k(l.getScale(0).type),d=k(c.getScale(0).type);e.push(a.getRawData());let f=a.getSpec(),p=a.coordinate===`cartesian`?T(f.xField):T(f.angleField??f.categoryField),m=a.coordinate===`cartesian`?T(f.yField):T(f.radiusField??f.valueField);if(t[a.id]=a.type===`link`?[`from_xField`]:c===o?p:m,d?(i=!1,n.push(t[a.id])):(i=!0,n.push(t[a.id][0])),this._valueField){let e=a.type===`link`?[`from_yField`]:l===o?p:m;u&&r.push(...e)}}),{userId:this._seriesUserId,specIndex:this._seriesIndex}),this._originalStateFields=t}else vo(this._regions,(i=>{e.push(i.getRawData()),t.push(i),n.push(this._field),this._valueField&&r.push(this._spec.valueField)}),{userId:this._seriesUserId,specIndex:this._seriesIndex});return{dataCollection:e,seriesCollection:t,stateFields:n,valueFields:r,isCategoryState:i}}_initData(){let{dataCollection:e,seriesCollection:t,stateFields:n,valueFields:r,isCategoryState:i}=this._collectDataInfo(),{dataSet:a}=this._option;ml(a,`dataview`,wt),X(a,`dataFilterComputeDomain`,Vx);let o=new Ne(a,{name:`${this.type}_${this.id}_data`});o.transform({type:`dataFilterComputeDomain`,options:{input:{dataCollection:e,seriesCollection:t,stateFields:n,valueFields:r,isCategoryState:i},output:{stateField:this._stateField,valueField:this._valueField}}},!1),this._data=new yd(this._option,o),o.reRunAllTransform(),this._currentDataCollection=e,a.multipleDataViewAddListener(e,`change`,this._handleDataCollectionChangeBound)}_addTransformToSeries(){this._relatedAxisComponent&&this._filterMode===`axis`||(X(this._option.dataSet,`dataFilterWithNewDomain`,Bx),X(this._option.dataSet,`lockStatisticsFilter`,zx),vo(this._regions,(e=>{e.getViewDataStatistics().transform({type:`lockStatisticsFilter`,options:{originalFields:()=>e.getViewDataStatistics().getFields(),getNewDomain:()=>this._newDomain,field:()=>this._field??this._parseFieldOfSeries(e),isContinuous:()=>k(this._stateScale.type)},level:1},!1),e.addViewDataFilter({type:`dataFilterWithNewDomain`,options:{getNewDomain:()=>this._newDomain,field:()=>this._field??this._parseFieldOfSeries(e),isContinuous:()=>k(this._stateScale.type)},level:Tl.dataZoomFilter})}),{userId:this._seriesUserId,specIndex:this._seriesIndex}))}onDataUpdate(){var e;let{dataCollection:t,seriesCollection:n,stateFields:r,valueFields:i,isCategoryState:a}=this._collectDataInfo();if(this._currentDataCollection.length!==t.length||this._currentDataCollection.some(((e,n)=>e!==t[n]))){this._currentDataCollection.forEach((e=>{var t;(t=e?.target)==null||t.removeListener(`change`,this._handleDataCollectionChangeBound)})),this._currentDataCollection=t;let{dataSet:e}=this._option;e.multipleDataViewAddListener(this._currentDataCollection,`change`,this._handleDataCollectionChangeBound)}this._data.getDataView().transform({type:`dataFilterComputeDomain`,options:{input:{dataCollection:t,seriesCollection:n,stateFields:r,valueFields:i,isCategoryState:a},output:{stateField:this._stateField,valueField:this._valueField}}},!1),this._data.getDataView().reRunAllTransform();let o=this._computeDomainOfStateScale(k(this._stateScale.type));this._stateScale.domain(o,!1),(h(this._spec.start)||h(this._spec.end))&&this._setStateFromSpec(),this._handleChange(this._start,this._end,!0),this._spec.auto&&!O(this._domainCache,o)&&(this._domainCache=o,this._dataUpdating=!0,(e=this.getChart())==null||e.setLayoutTag(!0,null,!1))}_parseFieldOfSeries(e){return this._originalStateFields?.[e.id]}_setStateFromSpec(){let e,t;if(this._auto=!!this._spec.auto,this._spec.rangeMode){let[n,r]=this._spec.rangeMode;Kx(`start`,n,this._spec)&&Kx(`end`,r,this._spec)&&(e=n===`percent`?this._spec.start:Ux(this._spec.startValue,this._stateScale,this._isHorizontal),t=r===`percent`?this._spec.end:Ux(this._spec.endValue,this._stateScale,this._isHorizontal))}else e=this._spec.start?this._spec.start:this._spec.startValue?Ux(this._spec.startValue,this._stateScale,this._isHorizontal):0,t=this._spec.end?this._spec.end:this._spec.endValue?Ux(this._spec.endValue,this._stateScale,this._isHorizontal):1;this._start=Math.max(0,Math.min(1,e)),this._end=Math.max(0,Math.min(1,t))}_setStateFromAxis(){this._setStateFromSpec();let e=this._relatedAxisComponent;this._startValue=Hx(this._start,this._stateScale,Wx(e,this._isHorizontal)),this._endValue=Hx(this._end,this._stateScale,Wx(e,this._isHorizontal)),this._minSpan=this._spec.minSpan??0,this._maxSpan=this._spec.maxSpan??1,k(this._stateScale.type)&&this._stateScale.domain()[0]!==w(this._stateScale.domain())&&(this._spec.minValueSpan&&(this._minSpan=this._spec.minValueSpan/(w(this._stateScale.domain())-this._stateScale.domain()[0])),this._spec.maxValueSpan&&(this._maxSpan=this._spec.maxValueSpan/(w(this._stateScale.domain())-this._stateScale.domain()[0]))),this._minSpan=Math.max(0,this._minSpan),this._maxSpan=Math.min(this._maxSpan,1),e&&(e&&this._filterMode===`axis`||this._start===0&&this._end===1||(this._newDomain=qx(this._startValue,this._endValue,this._stateScale)))}_initStateScale(){var e,t,n,r,i,a;let o=[0,1];if(this._relatedAxisComponent){let s=this._relatedAxisComponent.getScale().clone();this._stateScale=s,(t=(e=s).maxBandwidth)==null||t.call(e,`auto`,!0),(r=(n=s).minBandwidth)==null||r.call(n,`auto`,!0),(a=(i=s).bandwidth)==null||a.call(i,`auto`,!0),s.rangeFactor(o,!0).range(o)}else{let e=!0;this._field&&vo(this._regions,(t=>{let n=t.getRawDataStatisticsByField(this._field);P(n?.min)&&P(n?.max)||(e=!1)}),{userId:this._seriesUserId,specIndex:this._seriesIndex}),this._stateScale=e?new ht:new tt,this._stateScale.domain(this._computeDomainOfStateScale(e),!0).range(o)}}_computeDomainOfStateScale(e){if(this._spec.customDomain)return this._spec.customDomain;let t=this._data.getLatestData().map((e=>e[this._stateField]));if(e){let e=t.map((e=>1*e));return t.length?[jt(e),ge(e)]:[-1/0,1/0]}return t}_autoVisible(e){if(!this._auto)return;e?this.show():this.hide();let t=this._isHorizontal?`height`:`width`;this.layout.setLayoutRect({[t]:e?this[`_${t}`]:0},{[t]:Z.Built_In})}hide(){var e;(e=this._component)==null||e.hideAll()}show(){var e;(e=this._component)==null||e.showAll()}_autoUpdate(e){if(!this._auto)return this._cacheVisibility=void 0,!0;let t=this._relatedAxisComponent,n=t?.getSpec(),r=t?.getScale(),i=Gx(n);if(!this._dataUpdating&&St(r.type)&&e?.height===this._cacheRect?.height&&e?.width===this._cacheRect?.width&&this._fixedBandSize===i?.bandSize)return this._cacheVisibility;let a=!0;if(this._isHorizontal&&e?.width!==this._cacheRect?.width?r.range(t.getInverse()?[e.width,0]:[0,e.width]):e?.height!==this._cacheRect?.height&&r.range(t.getInverse()?[0,e.height]:[e.height,0]),this._cacheRect={width:e?.width,height:e?.height},this._fixedBandSize=i?.bandSize,St(r.type)){i&&(this._start||this._end)&&(this.type===B.scrollBar&&(this._start=0,this._end=1),this._updateRangeFactor());let[e,t]=r.rangeFactor()??[];a=(!N(e)||!N(t))&&(e!==0||t!==1)}else{let[e,t]=r.rangeFactor()??[this._start,this._end];a=e!==0||t!==1}return this.setStartAndEnd(this._start,this._end),this._cacheVisibility=a,a}_getNeedClearVRenderComponents(){return[this._component]}},ne(Qx,Ay)})))()}var eS;function tS(){return(tS=e((()=>{j(),lg(),_i(),eS=class extends cg{_mergeThemeToSpec(e,t){let n=this._theme,r=e;if(this._shouldMergeThemeToSpec()){let t=e=>{let t=R({selectedBackgroundChart:{line:{},area:{}}},this._theme,e),{selectedBackgroundChart:n={}}=e,{line:r,area:i}=n;return r&&!1!==r.visible&&(t.selectedBackgroundChart.line.style=Object.assign(Object.assign({},t.selectedBackgroundChart.line.style),{visible:!0})),i&&!1!==i.visible&&(t.selectedBackgroundChart.area.style=Object.assign(Object.assign({},t.selectedBackgroundChart.area.style),{visible:!0})),t},n=e;r=A(n)?n.map((e=>t(e))):t(n)}return this._adjustPadding(r),{spec:r,theme:n}}}})))()}var nS,rS,iS,aS;function oS(){return(oS=e((()=>{nS=`M-0.5-2.4h0.9c0.4,0,0.7,0.3,0.7,0.7v3.3c0,0.4-0.3,0.7-0.7,0.7h-0.9c-0.4,0-0.7-0.3-0.7-0.7v-3.3
2
+ C-1.2-2-0.9-2.4-0.5-2.4z M-0.4-1.4L-0.4-1.4c0,0,0,0.1,0,0.1v2.6c0,0.1,0,0.1,0,0.1l0,0c0,0,0-0.1,0-0.1v-2.6
3
+ C-0.4-1.4-0.4-1.4-0.4-1.4z M0.3-1.4L0.3-1.4c0,0,0,0.1,0,0.1v2.6c0,0.1,0,0.1,0,0.1l0,0c0,0,0-0.1,0-0.1v-2.6
4
+ C0.3-1.4,0.3-1.4,0.3-1.4z;`,rS=()=>({style:{symbolType:nS,fill:{type:`palette`,key:`sliderHandleColor`},scaleX:1.2,scaleY:1.2,stroke:{type:`palette`,key:`dataZoomHandleStrokeColor`},lineWidth:1}}),iS=e=>({area:{style:{visible:e,stroke:!1,fill:{type:`palette`,key:`dataZoomChartColor`}}},line:{style:{visible:e,stroke:{type:`palette`,key:`dataZoomChartColor`},lineWidth:1}}}),aS={padding:[12,0],showDetail:`auto`,brushSelect:!1,middleHandler:{visible:!1,background:{size:6,style:{stroke:{type:`palette`,key:`dataZoomHandleStrokeColor`},cornerRadius:2}},icon:{style:{size:4,fill:{type:`palette`,key:`sliderHandleColor`},stroke:{type:`palette`,key:`dataZoomHandleStrokeColor`},symbolType:`M 0.3 -0.5 C 0.41 -0.5 0.5 -0.41 0.5 -0.3 C 0.5 -0.3 0.5 0.3 0.5 0.3 C 0.5 0.41 0.41 0.5 0.3 0.5 C 0.3 0.5 -0.3 0.5 -0.3 0.5 C -0.41 0.5 -0.5 0.41 -0.5 0.3 C -0.5 0.3 -0.5 -0.3 -0.5 -0.3 C -0.5 -0.41 -0.41 -0.5 -0.3 -0.5 C -0.3 -0.5 0.3 -0.5 0.3 -0.5 Z`,lineWidth:.5}}},background:{size:20,style:{fill:{type:`palette`,key:`sliderRailColor`},lineWidth:0}},selectedBackground:{style:{fill:{type:`palette`,key:`sliderTrackColor`},fillOpacity:.1,outerBorder:{stroke:{type:`palette`,key:`sliderTrackColor`},strokeOpacity:.2,distance:-.5,lineWidth:1}}},selectedBackgroundChart:iS(!1),startHandler:rS(),endHandler:rS(),startText:{padding:8,style:{fontSize:{type:`token`,key:`l5FontSize`},lineHeight:{type:`token`,key:`l5LineHeight`},fill:{type:`palette`,key:`secondaryFontColor`,default:`#89909d`}}},endText:{padding:8,style:{fontSize:{type:`token`,key:`l5FontSize`},lineHeight:{type:`token`,key:`l5LineHeight`},fill:{type:`palette`,key:`secondaryFontColor`,default:`#89909d`}}},backgroundChart:iS(!0)}})))()}var sS,cS,lS;function uS(){return(uS=e((()=>{o(),E(),Ge(),v(),S(),_i(),V(),$x(),qt(),Zc(),Le(),Ke(),vu(),Y(),U(),tS(),tp(),oS(),Yx(),sS={width:!0,height:!0,showDetail:!0,middleHandler:!0,background:!0,startHandler:!0,endHandler:!0,startText:!0,endText:!0,dragMask:!0,selectedBackground:!0,backgroundChart:!0,selectedBackgroundChart:!0,showBackgroundChart:!0},cS=class extends Qx{constructor(e,t){super(e,t),this.type=B.dataZoom,this.name=B.dataZoom,this.transformerConstructor=eS,this.specKey=`dataZoom`,this.layoutZIndex=gu.DataZoom,this.layoutLevel=_u.DataZoom,this.layoutType=`region-relative`,this._isReverseCache=!1,this._dataToPositionX=e=>{let t=this._isHorizontal?0:this._middleHandlerSize,n=this._isHorizontal?this._startHandlerSize/2:0,r=this._isHorizontal?this._stateScale:this._valueScale,i=this._isHorizontal?this._stateField:this._valueField;return r.scale(e[i])+this.getLayoutStartPoint().x+t+n},this._dataToPositionX2=e=>{let t=this._isHorizontal?0:this._middleHandlerSize,n=this._isHorizontal?this._startHandlerSize/2:0,r=this._isHorizontal?this._stateScale:this._valueScale,i=r.domain()[0];return r.scale(i)+this.getLayoutStartPoint().x+t+n},this._dataToPositionY=e=>{let t=this._isHorizontal?this._middleHandlerSize:0,n=this._isHorizontal?0:this._startHandlerSize/2,r=this._isHorizontal?this._valueScale:this._getPreviewStateScale(),i=this._isHorizontal?this._valueField:this._stateField;return r.scale(e[i])+this.getLayoutStartPoint().y+t+n},this._dataToPositionY2=e=>{let t=this._isHorizontal?this._middleHandlerSize:0,n=this._isHorizontal?0:this._startHandlerSize/2,r=this._isHorizontal?this._valueScale:this._getPreviewStateScale(),i=r.domain()[0];return r.scale(i)+this.getLayoutStartPoint().y+t+n},this._valueField=`y`,this._filterMode=e.filterMode??`filter`}_handleChange(e,t,n,r){if(super._handleChange(e,t,n),this._shouldChange){if(n&&this._component)this._component.setStartAndEnd(e,t);else{let n=this._relatedAxisComponent,i=Hx(e,this._stateScale,Wx(n,this._isHorizontal)),a=Hx(t,this._stateScale,Wx(n,this._isHorizontal));if(!h(i)||!h(a))return;this._start=e,this._end=t,(M(this._spec.updateDataAfterChange)?this._spec.updateDataAfterChange(e,t,i,a):this._handleStateChange(i,a,r))&&this.event.emit(K.dataZoomChange,{model:this,value:{filterData:this._filterMode!==`axis`,start:e,end:t,startValue:this._startValue,endValue:this._endValue,newDomain:this._newDomain}})}}}_handleDataCollectionChange(){this._data.getDataView().reRunAllTransform(),this._initAfterLayout();let e=this._computeDomainOfValueScale();e&&(this._valueScale||=new ht,this._valueScale.domain(e),this._updateValueScaleRange(),this._component&&this._createOrUpdateComponent(!0))}created(){super.created(),this._initValueScale()}updateLayoutAttribute(){!1!==this._cacheVisibility&&super.updateLayoutAttribute()}_beforeLayoutEnd(){super._beforeLayoutEnd();let e=this._relatedAxisComponent;(Wx(e,this._isHorizontal)&&!this._isReverseCache||this._auto)&&(this._isReverseCache=Wx(e,this._isHorizontal),this.effect.onZoomChange())}_getComponentOnlySpecKeys(){return sS}clear(){if(this._component){let e=this.getContainer();this._component.removeAllChild(),e&&e.removeChild(this._component),this._component=null}super.clear()}getBoundsInRect(e){let t={x1:this.getLayoutStartPoint().x,y1:this.getLayoutStartPoint().y,x2:0,y2:0},n=this._startHandlerSize*(this._spec.startHandler.style.scaleX??1),r=this._startHandlerSize*(this._spec.startHandler.style.scaleY??1),i=this._endHandlerSize*(this._spec.endHandler.style.scaleX??1),a=this._endHandlerSize*(this._spec.endHandler.style.scaleY??1),o=this._visible?this._isHorizontal?(n-this._startHandlerSize)/2+(i-this._endHandlerSize)/2:(Math.max(n,i)-this._width)/2:0,s=this._visible?this._isHorizontal?(Math.max(r,a)-this._height)/2:(r-this._startHandlerSize)/2+(a-this._endHandlerSize)/2:0;return this._isHorizontal?(t.y2=t.y1+this._height+s,t.x2=t.x1+e.width+o):(t.x2=t.x1+this._width+o,t.y2=t.y1+e.height+s),t}setAttrFromSpec(){var e,t;super.setAttrFromSpec();let n=this._isHorizontal?Number(this._spec.height):Number(this._spec.width);this._backgroundSize=this._spec.background?.size??30,this._middleHandlerSize=this._computeMiddleHandlerSize(),N(this._spec?.startHandler?.style?.size)&&(this._spec.startHandler.style.size=isNaN(n)?this._backgroundSize:n-this._middleHandlerSize),N(this._spec?.endHandler?.style?.size)&&(this._spec.endHandler.style.size=isNaN(n)?this._backgroundSize:n-this._middleHandlerSize);let r=(e=this._spec.startHandler.style.visible)==null||e,i=(t=this._spec.endHandler.style.visible)==null||t;this._startHandlerSize=r?this._spec.startHandler.style.size:0,this._endHandlerSize=i?this._spec.endHandler.style.size:0,this._width=this._computeWidth(),this._height=this._computeHeight()}_initValueScale(){let e=this._computeDomainOfValueScale();if(e){let t=new ht;t.domain(e),this._valueScale=t}}_updateScaleRange(){this._updateStateScaleRange(),this._updateValueScaleRange()}_updateStateScaleRange(){var e;let t=this._startHandlerSize+this._endHandlerSize;if(!this._stateScale)return;let n,r=this._isHorizontal?this.getLayoutRect().width-t:this.getLayoutRect().height-t,i=this._relatedAxisComponent?.getScale().range()??[this._startHandlerSize/2,r+this._startHandlerSize/2],a=this._computeWidth(),o=this._computeHeight();n=this._isHorizontal?this._visible?[this._startHandlerSize/2,a-t+this._startHandlerSize/2]:i:this._visible?[this._startHandlerSize/2,o-t+this._startHandlerSize/2]:i,this._stateScale.range(n),(e=this._previewStateScale)==null||e.range(Wx(this._relatedAxisComponent,this._isHorizontal)?n.reverse():n)}_updateValueScaleRange(){if(!this._valueScale)return;let e=this._computeWidth(),t=this._computeHeight();this._isHorizontal?this._valueScale.range([t-this._middleHandlerSize,0]):this.layoutOrient===`left`?this._valueScale.range([e-this._middleHandlerSize,0]):this._valueScale.range([0,e-this._middleHandlerSize])}_computeDomainOfValueScale(){let e=this._data.getLatestData().map((e=>e[this._valueField])),t=e.map((e=>1*e));return e.length?[jt(t),ge(t)]:null}_isScaleValid(e){if(!e||!e.domain())return!1;let t=e.domain();return(!k(e.type)||t[0]!==w(t))&&(!St(e.type)||c(t).length!==1)}_getXScale(){return this._relatedAxisComponent.getScale().type===this.stateScale.type&&this._isHorizontal?this.stateScale:this._isHorizontal?this._stateScale:this._valueScale}_getYScale(){return this._isHorizontal?this._valueScale:this._stateScale}_computeMiddleHandlerSize(){let e=0;if(this._spec?.middleHandler?.visible){let t=this._spec.middleHandler.icon.style.size??8,n=this._spec.middleHandler.background.size??40;e+=Math.max(t,n)}return e}_computeWidth(){return!1===this._visible?0:ft(this._spec.width)?this._spec.width:this._isHorizontal?this.getLayoutRect().width:Math.max(this._startHandlerSize||0,this._endHandlerSize||0,this._backgroundSize||0)+this._middleHandlerSize}_computeHeight(){return!1===this._visible?0:ft(this._spec.height)?this._spec.height:this._isHorizontal?Math.max(this._startHandlerSize||0,this._endHandlerSize||0,this._backgroundSize||0)+this._middleHandlerSize:this.getLayoutRect().height}_getAttrs(e){var t,n,r;let i=this._spec??{};return Object.assign({zIndex:this.layoutZIndex,start:this._start,end:this._end,position:{x:this.getLayoutStartPoint().x,y:this.getLayoutStartPoint().y},orient:this._orient,size:{width:this._computeWidth(),height:this._computeHeight()},showDetail:i.showDetail,brushSelect:(t=i.brushSelect)!=null&&t,zoomLock:(n=i.zoomLock)!=null&&n,minSpan:this._minSpan,maxSpan:this._maxSpan,delayType:i.delayType,delayTime:h(i.delayType)?i.delayTime??30:0,realTime:(r=i.realTime)==null||r,previewData:e&&this._data.getLatestData(),previewPointsX:e&&this._dataToPositionX,previewPointsY:e&&this._dataToPositionY,tolerance:this._spec.tolerance,isReverse:Wx(this._relatedAxisComponent,this._isHorizontal)},this._getComponentAttrs(e))}_getLayoutAttrs(){return{position:{x:this.getLayoutStartPoint().x,y:this.getLayoutStartPoint().y},size:{width:this._computeWidth(),height:this._computeHeight()}}}_createOrUpdateComponent(e){if(this._visible){let t=this._isHorizontal?this._stateScale:this._valueScale,n=this._isHorizontal?this._valueScale:this._stateScale,r=this._isScaleValid(t)&&this._isScaleValid(n)&&!1!==this._spec.showBackgroundChart,i=this._getAttrs(r),a=this._relatedAxisComponent;if(this._component)this._component.setAttributes(i),e&&(this._component.setPreviewData(this._data.getDataView().latestData),r&&(this._isHorizontal?this._component.setPreviewPointsY1(this._dataToPositionY2):this._component.setPreviewPointsX1(this._dataToPositionX2),this._component.setStatePointToData((e=>Hx(e,this._stateScale,Wx(a,this._isHorizontal))))));else{let e=this.getContainer();this._component=new Zt(i),this._component.setPreviewData(this._data.getDataView().latestData),this._isHorizontal?r&&this._component.setPreviewPointsY1(this._dataToPositionY2):r&&this._component.setPreviewPointsX1(this._dataToPositionX2),this._component.setStatePointToData((e=>Hx(e,this._stateScale,Wx(a,this._isHorizontal)))),this._component.addEventListener(`dataZoomChange`,(e=>{let{start:t,end:n,tag:r}=e.detail;this._handleChange(t,n,void 0,r)})),e.add(this._component)}}}_getComponentAttrs(e){let{middleHandler:t={},startText:n={},endText:r={},backgroundChart:i={},selectedBackgroundChart:a={}}=this._spec;return{backgroundStyle:G(this._spec.background?.style),startHandlerStyle:G(this._spec.startHandler?.style),middleHandlerStyle:t.visible?{visible:!0,icon:G(t.icon?.style),background:{size:t.background?.size,style:G(t.background?.style)}}:{visible:!1},endHandlerStyle:G(this._spec.endHandler?.style),startTextStyle:{padding:n.padding,formatMethod:this._getHandlerTextFormatMethod(n),textStyle:G(n.style)},endTextStyle:{padding:r.padding,formatMethod:this._getHandlerTextFormatMethod(r),textStyle:G(r.style)},selectedBackgroundStyle:G(this._spec.selectedBackground.style),dragMaskStyle:G(this._spec.dragMask?.style),backgroundChartStyle:e?{line:R(G(i.line?.style),{fill:!1}),area:Object.assign({curveType:`basis`,visible:!0},G(i.area?.style))}:{line:{visible:!1},area:{visible:!1}},selectedBackgroundChartStyle:e?{line:R(G(a.line?.style),{fill:!1}),area:Object.assign({curveType:`basis`,visible:!0},G(a.area?.style))}:{line:{visible:!1},area:{visible:!1}},disableTriggerEvent:this._option.disableTriggerEvent}}_getHandlerTextFormatMethod(e){let{formatMethod:t,formatter:n}=e,{formatFunc:r}=$f(t,n);return r?e=>r(e,{label:e},n):void 0}_getNeedClearVRenderComponents(){return[this._component]}onDataUpdate(){super.onDataUpdate(),this._previewStateScale!==this._stateScale&&(this._previewStateScale=null)}_getPreviewStateScale(){return this._previewStateScale||(Wx(this._relatedAxisComponent,this._isHorizontal)?(this._previewStateScale=this._stateScale.clone(),this._previewStateScale.range(this._stateScale.range().reverse())):this._previewStateScale=this._stateScale),this._previewStateScale}},cS.type=B.dataZoom,cS.transformerConstructor=eS,cS.builtInTheme={dataZoom:aS},cS.specKey=`dataZoom`,lS=()=>{H.registerComponent(cS.type,cS)}})))()}var dS;function fS(){return(fS=e((()=>{dS={horizontal:{height:10,slider:{style:{fill:{type:`palette`,key:`scrollBarSliderColor`}}}},vertical:{width:10,slider:{style:{fill:{type:`palette`,key:`scrollBarSliderColor`}}}}}})))()}var pS,mS,hS;function gS(){return(gS=e((()=>{st(),o(),E(),Ge(),v(),V(),$x(),sr(),Zc(),vu(),Y(),U(),_o(),fS(),Yx(),pS={width:!0,height:!0,rail:!0,slider:!0,round:!0,innerPadding:!0,minSliderSize:!0},mS=class extends Qx{constructor(e,t){super(e,t),this.type=B.scrollBar,this.name=B.scrollBar,this.specKey=`scrollBar`,this.layoutZIndex=gu.DataZoom,this.layoutLevel=_u.DataZoom,this.layoutType=`region-relative`,this._filterMode=e.filterMode??`axis`}_handleChange(e,t,n){super._handleChange(e,t,n);let r=go(this._start,e)&&go(this._end,t);if(this._shouldChange&&(!r||!1===this._spec.realTime)){n&&this._component&&this._component.setAttribute(`range`,[e,t]),this._start=e,this._end=t;let r=this._relatedAxisComponent,i=Wx(r,this._isHorizontal),a=Hx(e,this._stateScale,i),o=Hx(t,this._stateScale,i);(M(this._spec.updateDataAfterChange)?this._spec.updateDataAfterChange(e,t,a,o):this._handleStateChange(a,o))&&this.event.emit(K.scrollBarChange,{model:this,value:{filterData:this._filterMode!==`axis`,start:this._start,end:this._end,startValue:this._startValue,endValue:this._endValue,newDomain:this._newDomain}})}}_handleDataCollectionChange(){this._spec.auto&&this._data.getDataView().reRunAllTransform()}_getComponentOnlySpecKeys(){return pS}_beforeLayoutEnd(){var e,t;super._beforeLayoutEnd(),(t=(e=this.effect).onZoomChange)==null||t.call(e)}onLayoutEnd(){this._updateComponentBounds(),super.onLayoutEnd()}_updateScaleRange(){}_updateComponentBounds(){this._component&&this._component.setAttributes({x:this.getLayoutStartPoint().x,y:this.getLayoutStartPoint().y,width:this.getLayoutRect().width,height:this.getLayoutRect().height})}_computeWidth(){return!1===this._visible?0:ft(this._spec.width)?this._spec.width:this._isHorizontal?this.getLayoutRect().width:12}_computeHeight(){return!1===this._visible?0:ft(this._spec.height)?this._spec.height:this._isHorizontal?12:this.getLayoutRect().height}_getAttrs(){var e;return Object.assign({zIndex:this.layoutZIndex,x:this.getLayoutStartPoint().x,y:this.getLayoutStartPoint().y,width:this.getLayoutRect().width,height:this.getLayoutRect().height,range:[this._start,this._end],direction:this._isHorizontal?`horizontal`:`vertical`,delayType:this._spec?.delayType,delayTime:h(this._spec?.delayType)?this._spec?.delayTime??30:0,realTime:(e=this._spec?.realTime)==null||e,minSliderSize:this._spec?.minSliderSize},this._getComponentAttrs())}_createOrUpdateComponent(){let e=this._getAttrs();if(this._component)this._component.setAttributes(e);else{let t=this.getContainer();this._component=new zt(e),this._component.addEventListener(`scrollDrag`,(e=>{let t=e.detail.value;this._handleChange(t[0],t[1])})),this._component.addEventListener(`scrollUp`,(e=>{let t=e.detail.value;this._handleChange(t[0],t[1])})),t.add(this._component)}}_getComponentAttrs(){let{rail:e,slider:t,innerPadding:n}=this._spec,r={};return N(n)||(r.padding=n),F(e?.style)||(r.railStyle=G(e.style)),F(t?.style)||(r.sliderStyle=G(t.style)),r.disableTriggerEvent=this._option.disableTriggerEvent,r}_getNeedClearVRenderComponents(){return[this._component]}},mS.type=B.scrollBar,mS.builtInTheme={scrollBar:dS},mS.specKey=`scrollBar`,hS=()=>{H.registerComponent(mS.type,mS)}})))()}var _S;function vS(){return(vS=e((()=>{_S=[`sum`,`average`,`min`,`max`,`variance`,`standardDeviation`,`median`]})))()}function yS(e,t,n){if(!n)return!1;let r=e.map((e=>1*e)),i=jt(r),a=ge(r);return t<i||t>a}function bS(e,t){return e?`${e}_${t}_extend`:`marker_${t}_extend`}function xS(e,t,n,r,i,a,o){var s,c;let{relativeSeries:l}=r,u;return ft(e.x)&&yS(t,e.x,n)&&((c=l==null?void 0:(s=l.getXAxisHelper()).setExtendDomain)==null||c.call(s,bS(o,`xAxis`),e.x)),u=es(e.x)?CS(e.x,i)+a.x:wS(l.getXAxisHelper(),[e.x])+a.x,u}function SS(e,t,n,r,i,a,o){var s,c;let{relativeSeries:l}=r,u;return ft(e.y)&&yS(t,e.y,n)&&((c=(s=l.getYAxisHelper())?.setExtendDomain)==null||c.call(s,bS(o,`yAxis`),e.y)),u=es(e.y)?CS(e.y,i)+a.y:wS(l.getYAxisHelper(),[e.y])+a.y,u}function CS(e,t){return Number(e.substring(0,e.length-1))*t/100}function wS(e,t){let n=e.getScale(0);return k(n.type)&&n.domain()[0]===n.domain()[1]&&t[0]!==n.domain()[0]?NaN:e.dataToPosition(t)}function TS(e){return _S.includes(e)}function ES(e,t,n,r,i,a=!1,o){let s=t.getRegion(),c=s.getLayoutStartPoint(),l=n.getRegion(),u=l.getLayoutStartPoint(),d=Math.abs(Math.min(c.x,u.x)-Math.max(c.x+s.getLayoutRect().width,u.x+l.getLayoutRect().width)),f=Math.abs(Math.min(c.y,u.y)-Math.max(c.y+s.getLayoutRect().height,u.y+l.getLayoutRect().height)),p={relativeSeries:r,startRelativeSeries:t,endRelativeSeries:n},m=[],g=e.latestData[0]&&e.latestData[0].latestData?e.latestData[0].latestData:e.latestData,_=r.getXAxisHelper(),v=r.getYAxisHelper(),y=_.getScale(0).domain(),ee=v.getScale(0).domain(),te=a&&!_.isContinuous&&!!_.getBandwidth,b=a&&!v.isContinuous&&!!v.getBandwidth,x={min:null,max:null},ne={min:null,max:null};return g.forEach((e=>{let t=h(e.x),n=h(e.y),r,a;if(t&&n)r=xS(e,y,i,p,d,c,o),a=SS(e,ee,i,p,f,c,o),OS(r,te,x,m.length),OS(a,b,ne,m.length),m.push([{x:r,y:a}]);else if(t){r=xS(e,y,i,p,d,c,o),a=Math.max(c.y+s.getLayoutRect().height,u.y+l.getLayoutRect().height);let t=Math.min(c.y,u.y);OS(r,te,x,m.length),m.push([{x:r,y:a},{x:r,y:t}])}else if(n){r=Math.min(c.x,u.x),a=SS(e,ee,i,p,f,c,o);let t=Math.max(c.x+s.getLayoutRect().width,u.x+l.getLayoutRect().width);OS(a,b,ne,m.length),m.push([{x:r,y:a},{x:t,y:a}])}})),DS(m,_,v,x,ne),m}function DS(e,t,n,r,i){if(r.min||r.max){let n=t.getBandwidth(0)*(1+t.getScale(0).paddingInner());r.min&&e[r.min.index].forEach((e=>e.x-=n/2)),r.max&&e[r.max.index].forEach((e=>e.x+=n/2))}if(i.min||i.max){let t=n.getBandwidth(0)*(1+n.getScale(0).paddingInner());i.min&&e[i.min.index].forEach((e=>e.y-=t/2)),i.max&&e[i.max.index].forEach((e=>e.y+=t/2))}}function OS(e,t,n,r){return t&&((n.min===null||n.min.value>e)&&(n.min={value:e,index:r}),(n.max===null||n.max.value<e)&&(n.max={value:e,index:r})),e}function kS(e,t){return e?.getRefRelativeSeries?e.getRefRelativeSeries():t}function AS(e,t,n,r){var i,a,o,s;let c=t.getXAxisHelper().getScale(0).domain(),l=t.getYAxisHelper().getScale(0).domain(),u=T(e.x),d=T(e.y);u.length===1&&ft(u[0])&&yS(c,u[0],n)&&((a=(i=t.getXAxisHelper())?.setExtendDomain)==null||a.call(i,bS(r,`xAxis`),u[0])),d.length===1&&ft(d[0])&&yS(l,d[0],n)&&((s=(o=t.getYAxisHelper())?.setExtendDomain)==null||s.call(o,bS(r,`yAxis`),d[0]))}function jS(e,t,n,r,i){let a=[],o=e.latestData[0]&&e.latestData[0].latestData?e.latestData[0].latestData:e.latestData,s=A(r);return n&&o.forEach((e=>{AS(e,kS(e,t),n,i)})),o.forEach(((e,n)=>{let i=kS(e,t),o=i.getRegion(),c=o.getLayoutStartPoint(),{width:l,height:u}=o.getLayoutRect(),d=0,f=0;if(r){let e=s?r[n]:r,t=e.x,i=e.y;t&&(d=es(t)?Number(t.substring(0,t.length-1))*l/100:t),i&&(f=es(i)?Number(i.substring(0,i.length-1))*u/100:i)}let p=T(e.x),m=T(e.y);a.push({x:wS(i.getXAxisHelper(),p)+c.x+d,y:wS(i.getYAxisHelper(),m)+c.y+f})})),a}function MS(e,t,n){let{x:r,y:i}=e;return es(r)&&(r=CS(r,t)),es(i)&&(i=CS(i,n)),{x:r,y:i}}function NS(e,t,n){let r;if(r=M(e)?T(e(t.getData().getLatestData(),t)):T(e),n){let e=t.getRegion(),{x:n,y:i}=e.getLayoutStartPoint(),{width:a,height:o}=e.getLayoutRect();return r.map((e=>{let{x:t,y:r}=MS(e,a,o);return t+=n,r+=i,{x:t,y:r}}))}let{width:i,height:a}=t.getOption().getChart().getViewRect();return r.map((e=>MS(e,i,a)))}function PS(e){let t=1/0,n=-1/0,r=1/0,i=-1/0;return e.forEach((e=>{let a=e.getLayoutStartPoint(),o=e.getLayoutRect();a.x<t&&(t=a.x),a.x+o.width>n&&(n=a.x+o.width),a.y<r&&(r=a.y),a.y+o.height>i&&(i=a.y+o.height)})),{minX:t,maxX:n,minY:r,maxY:i}}function FS(e,t,n){let{labelBackground:r={},style:i,shape:a}=e,o=WS(e,[`labelBackground`,`style`,`shape`]);if(!1!==e.visible){let e=o;return e.shape=a?.visible?Object.assign({visible:!0},G(a.style)):{visible:!1},!1===r.visible?(e.panel={visible:!1},e.padding=0):(e.panel=Object.assign({visible:!0,customShape:r.customShape},LS(G(r.style),t,n)),h(r.padding)&&(e.padding=pt(r.padding))),i&&(e.textStyle=LS(G(i),t,n)),e}return{visible:!1}}function IS(e,t,n){for(let r in e)M(e[r])&&(e[r]=e[r](t,n));return e}function LS(e,t,n){return M(e)?e(t,n):e}function RS(e,t){return M(e)?e(t):e}function zS(e,t,n){return h(e)?t===`regionLeft`?n.getLayoutStartPoint().x-e.x:t===`regionRight`?n.getLayoutStartPoint().x+n.getLayoutRect().width-e.x:t===`regionTop`?n.getLayoutStartPoint().y-e.y:t===`regionBottom`?n.getLayoutStartPoint().y+n.getLayoutRect().height-e.y:t:t}function BS(e){return{isXProcess:h(e.x),isYProcess:h(e.y),isX1Process:h(e.x1),isY1Process:h(e.y1),isAngleProcess:h(e.angle),isRadiusProcess:h(e.radius),isAngle1Process:h(e.angle1),isRadius1Process:h(e.radius1),isCoordinatesProcess:h(e.coordinates),isValidProcess:h(e.process)}}function VS(e){let{isXProcess:t,isYProcess:n,isX1Process:r,isY1Process:i,isAngleProcess:a,isRadiusProcess:o,isAngle1Process:s,isRadius1Process:c,isCoordinatesProcess:l,isValidProcess:u}=BS(e);return{doXProcess:t&&!n&&!i,doXYY1Process:t&&n&&i,doYProcess:n&&!t&&!r,doYXX1Process:n&&t&&r,doXYProcess:t&&n&&r&&i,doAngleProcess:a&&!s&&!o&&!c,doRadiusProcess:o&&!c&&!a&&!s,doAngRadRad1Process:a&&!s&&o&&c,doRadAngAng1Process:o&&a&&s&&!c,doRadAngProcess:a&&o&&s&&c,doCoordinatesProcess:l&&(!u||`process`in e&&`xy`in e.process)}}function HS(e){let{isXProcess:t,isYProcess:n,isX1Process:r,isY1Process:i,isAngleProcess:a,isRadiusProcess:o,isAngle1Process:s,isRadius1Process:c,isCoordinatesProcess:l}=BS(e);return{doXProcess:t&&r&&!n&&!i,doYProcess:n&&i&&!t&&!r,doXYProcess:t&&r&&n&&i,doAngleProcess:a&&s&&!o&&!c,doRadiusProcess:o&&c&&!a&&!s,doRadAngProcess:a&&o&&s&&c,doCoordinatesProcess:l}}function US(e){return{doXYProcess:h(e.x)&&h(e.y),doPolarProcess:h(e.angle)&&h(e.radius),doGeoProcess:h(e.areaName)}}var WS;function GS(){return(GS=e((()=>{v(),Ge(),S(),j(),o(),ie(),cs(),Zc(),vS(),Ke(),WS=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`){var i=0;for(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}})))()}function KS(e,t,n,r=0){let i=[],a=e.y-t.y,o=e.x-t.x;switch(n){case`top`:i.push(e),i.push({x:e.x,y:a>0?e.y-r-Math.abs(a):e.y-r}),i.push({x:t.x,y:a>0?t.y-r:t.y-r-Math.abs(a)}),i.push(t);break;case`bottom`:i.push(e),i.push({x:e.x,y:a<0?e.y+r+Math.abs(a):e.y+r}),i.push({x:t.x,y:a<0?t.y+r:t.y+r+Math.abs(a)}),i.push(t);break;case`left`:i.push(e),i.push({x:o>0?e.x-r-Math.abs(o):e.x-r,y:e.y}),i.push({x:o>0?t.x-r:t.x-r-Math.abs(o),y:t.y}),i.push(t);break;case`right`:i.push(e),i.push({x:o>0?e.x+r:e.x+r+Math.abs(o),y:e.y}),i.push({x:o>0?t.x+r+Math.abs(o):t.x+r,y:t.y}),i.push(t)}return i}function qS(e,t,n,r=0){let i=e.y-t.y,a=e.x-t.x;return n===`bottom`?{dx:a>0?-a/2:Math.abs(a/2),dy:i>0?r:Math.abs(i)+r}:n===`top`?{dx:a>0?-Math.abs(a/2):+Math.abs(a/2),dy:i>0?-(Math.abs(i)+r):-r}:n===`left`?{dx:a>0?-a-r:-r,dy:i>0?-i/2:Math.abs(i/2)}:n===`right`?{dx:a>0?r:Math.abs(a)+r,dy:i>0?-i/2:Math.abs(i/2)}:{}}function JS(e,t){let n=e[0].latestData;return oo(n,t.field)}function YS(e,t){let n=e[0].latestData;return so(n,t.field)}function XS(e,t){let n=e[0].latestData;return co(n,t.field)}function ZS(e,t){let n=e[0].latestData;return lo(n,t.field)}function QS(e,t){let n=e[0].latestData;return uo(n,t.field)}function $S(e,t){let n;if(t.coordinates){let e=t,{coordinates:r,coordinateType:i,getSeriesByIdOrIndex:a}=e,o=tC(e,[`coordinates`,`coordinateType`,`getSeriesByIdOrIndex`]),s,c;if(M(r)){let e=t.getRelativeSeries();s=r(e.getData().getLatestData(),e)}else s=r;s=T(s),n=s.map((e=>{let t=a(e.refRelativeSeriesId,e.refRelativeSeriesIndex);if(i===`cartesian`){let{xField:n,yField:r}=t.getSpec(),{xFieldDim:i,xFieldIndex:a,yFieldDim:s,yFieldIndex:l}=e,u=n;h(a)&&(u=T(n)[a]),i&&T(n).includes(i)&&(u=i);let d=r;h(l)&&(d=T(r)[l]),s&&T(r).includes(s)&&(d=s),c=Object.assign({x:void 0,y:void 0},o),I(e[u])&&TS(e[u])?c.x={field:u,aggrType:e[u]}:c.x=T(u).map((t=>e[t])),I(e[d])&&TS(e[d])?c.y={field:d,aggrType:e[d]}:c.y=T(d).map((t=>e[t]))}else if(i===`polar`){let{valueField:n,categoryField:r}=t.getSpec(),{angleFieldDim:i,angleFieldIndex:a}=e,s=r;h(a)&&(s=T(r)[a]),i&&T(r).includes(i)&&(s=i);let l=n;c=Object.assign({angle:void 0,radius:void 0},o),I(e[s])&&TS(e[s])?c.angle={field:s,aggrType:e[s]}:c.angle=T(s).map((t=>e[t])),I(e[l])&&TS(e[l])?c.radius={field:l,aggrType:e[l]}:c.radius=T(l).map((t=>e[t]))}return c.getRefRelativeSeries=()=>t,c}))}else n=t;let r=[];return n.forEach((t=>{let n={x:null,y:null,angle:null,radius:null,areaName:null};if(h(t.x)){let r=t.x;n.x=A(r)?r.map((n=>eC(n,e,t))):eC(r,e,t)}if(h(t.y)){let r=t.y;n.y=A(r)?r.map((n=>eC(n,e,t))):eC(r,e,t)}if(h(t.angle)){let r=t.angle;n.angle=A(r)?r.map((n=>eC(n,e,t))):eC(r,e,t)}if(h(t.radius)){let r=t.radius;n.radius=A(r)?r.map((n=>eC(n,e,t))):eC(r,e,t)}if(h(t.areaName)){let r=t.areaName;n.areaName=eC(r,e,t)}t.getRefRelativeSeries&&(n.getRefRelativeSeries=t.getRefRelativeSeries),r.push(n)})),r}function eC(e,t,n){let r=n.getRelativeSeries(),i=n.getStartRelativeSeries(),a=n.getEndRelativeSeries(),o=r.getData().getLatestData(),s=i.getData().getLatestData(),c=a.getData().getLatestData();if(M(e))return e(o,s,c,r,i,a);if(d(e)){let{aggrType:n,field:r}=e;return iC[n](t,{field:r})}return e}var tC,nC,rC,iC;function aC(){return(aC=e((()=>{S(),j(),o(),ye(),Ct(),v(),_o(),GS(),tC=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`){var i=0;for(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},nC=(e,t)=>{let n=e[0].latestData;return io(n,t.field)},rC=(e,t)=>{let n=e[0].latestData;return ao(n,t.field)},iC={min:nC,max:rC,sum:JS,average:YS,variance:XS,standardDeviation:ZS,median:QS}})))()}function oC(e,t){if(t&&t.getRelativeSeries){let n=t.getRelativeSeries();if(n){let t=n.getViewData();return t&&t.latestData&&t.latestData.length?e:[]}}return e}var sC,cC,lC,uC,dC;function fC(){return(fC=e((()=>{sC=e=>{let t=e?.dataSet?.dataViewMap;return t?Object.values(t).filter(Boolean):[]},cC=(e,t)=>{var n,r;(n=e?.target)==null||n.removeListener(`change`,t.reRunAllTransform),(r=e?.target)==null||r.removeListener(`markRunning`,t.markRunning)},lC=e=>{if(!e)return;sC(e).forEach((t=>{cC(t,e)}));let t=e?.rawData;Array.isArray(t)&&t.forEach((t=>{cC(t,e)}))},uC=e=>{let t=Array.from(new Set(e.filter(Boolean)));t.length&&(t.forEach(lC),t.forEach((e=>{var t;(t=e.destroy)==null||t.call(e)})))},dC=(e,t)=>{if(!e)return;let n=new Set(sC(e)),r=[],i=e=>{let a=e?.rawData;Array.isArray(a)&&a.forEach((e=>{n.has(e)&&t(e)&&!r.includes(e)&&(r.push(e),i(e))}))};i(e),uC([e,...r])}})))()}var pC,mC,hC,gC,_C,vC,yC,bC,xC,SC,CC,wC;function TC(){return(TC=e((()=>{u(),Et(),S(),v(),E(),Ct(),Ce(),fg(),cs(),GS(),xo(),ja(),tp(),aC(),fC(),pC=`__vchart_marker_format_method__`,mC=`__vchart_marker_coordinate__`,hC=`__vchart_marker_text__`,gC=`__vchart_marker_auto_range__`,_C=`__vchart_marker_style__`,vC=[`coordinate`,`coordinates`,`x`,`y`,`x1`,`y1`,`angle`,`angle1`,`radius`,`radius1`],yC=[`position`,`positions`,`coordinatesOffset`,`regionRelative`],bC=[`offsetX`,`offsetY`,`confine`],xC=e=>Array.isArray(e)?e.map(xC):e&&typeof e==`object`&&typeof e.formatMethod==`function`?Object.assign(Object.assign({},e),{formatMethod:pC}):e,SC=e=>{if(Array.isArray(e))return e.map(SC);if(!e||typeof e!=`object`)return e;let t=Object.assign({},e);return Object.keys(t).forEach((e=>{e===`style`||e.endsWith(`Style`)?t[e]=_C:t[e]=SC(t[e])})),t},CC=(e,t)=>{if(!e||typeof e!=`object`)return e;let n=Object.assign({},e);t.normalizeDomainPosition&&vC.forEach((e=>{n[e]=mC})),t.normalizeAutoRange&&`autoRange`in n&&(n.autoRange=gC),yC.forEach((e=>{e in n&&(n[e]=mC)})),`label`in n&&(n.label=xC(n.label)),Object.keys(n).forEach((e=>{n[e]=SC(n[e])}));let r=n.itemContent;if(r&&typeof r==`object`){n.itemContent=Object.assign({},r),bC.forEach((e=>{e in n.itemContent&&(n.itemContent[e]=mC)}));let e=n.itemContent.text;e&&typeof e==`object`&&(n.itemContent.text=Object.assign(Object.assign({},xC(e)),{text:hC}))}return n},wC=class extends dg{constructor(){super(...arguments),this.layoutType=`none`,this._markerDataChangeHandler=null,this._markerDataOwned=!1,this._layoutOffsetX=0,this._layoutOffsetY=0}getRelativeSeries(){return this._relativeSeries}getMarkerData(){return this._markerData}static _getMarkerCoordinateType(e){return`cartesian`}static getSpecInfo(e){return ep(e,this.specKey,this.type,(e=>!1!==e.visible&&this._getMarkerCoordinateType(e)===this.coordinateType))}getMarkAttributeContext(){return this._markAttributeContext}_buildMarkerAttributeContext(){this._markAttributeContext={relativeSeries:this._relativeSeries,startRelativeSeries:this._startRelativeSeries,endRelativeSeries:this._endRelativeSeries,vchart:this._option.globalInstance}}created(){super.created(),this._bindSeries(),this._initDataView(),this.initEvent(),this._buildMarkerAttributeContext()}_getAllRelativeSeries(){return{getRelativeSeries:()=>this._relativeSeries,getStartRelativeSeries:()=>this._startRelativeSeries,getEndRelativeSeries:()=>this._endRelativeSeries}}_getAutoRangeExtendDomainKeyPrefix(){return`marker_${this.type}_${this.id}`}_getAutoRangeExtendDomainKey(e){return`${this._getAutoRangeExtendDomainKeyPrefix()}_${e}_extend`}_clearAutoRangeExtendDomain(){var e;T((e=this._option).getAllSeries?.call(e)).forEach((e=>{var t,n,r,i,a,o,s,c;(n=(t=(e?.getXAxisHelper)?.call(e))?.setExtendDomain)==null||n.call(t,this._getAutoRangeExtendDomainKey(`xAxis`),void 0),(i=(r=(e?.getYAxisHelper)?.call(e))?.setExtendDomain)==null||i.call(r,this._getAutoRangeExtendDomainKey(`yAxis`),void 0),(o=(a=e?.angleAxisHelper)?.setExtendDomain)==null||o.call(a,this._getAutoRangeExtendDomainKey(`angleAxis`),void 0),(c=(s=e?.radiusAxisHelper)?.setExtendDomain)==null||c.call(s,this._getAutoRangeExtendDomainKey(`radiusAxis`),void 0)}))}_updateMarkerLayout(){this._clearAutoRangeExtendDomain(),this._markerLayout()}_getFieldInfoFromSpec(e,t,n){return I(t)&&TS(t)?{field:n.getSpec()[{x:`xField`,y:`yField`,radius:`valueField`,angle:`categoryField`,areaName:`nameField`}[e]],aggrType:t}:t}_processSpecByDims(e){let t=this._relativeSeries,n={};return e.forEach((e=>n[e.dim]=this._getFieldInfoFromSpec(e.dim,e.specValue,t))),Object.assign(Object.assign({},n),this._getAllRelativeSeries())}_processSpecCoo(e){return Object.assign(Object.assign({coordinates:e.coordinates||e.coordinate},this._getAllRelativeSeries()),{getSeriesByIdOrIndex:(e,t)=>this._getSeriesByIdOrIndex(e,t),coordinateType:this.coordinateType})}_getRelativeDataView(){if(this._specifiedDataSeries){let e=[];T(this._specifiedDataSeries).forEach((t=>{e=e.concat(t.getViewData().latestData)}));let t=new _e;return t.registerParser(`array`,Aa),new Ne(t).parse(e,{type:`array`})}return this._relativeSeries.getViewData()}_setMarkerData(e,t=!1){this._releaseMarkerData(),this._markerData=e,this._markerDataOwned=t}_bindMarkerDataChange(){var e;(e=this._markerData)!=null&&e.target&&(this._markerDataChangeHandler=()=>{this._updateMarkerLayout()},this._markerData.target.on(`change`,this._markerDataChangeHandler))}_releaseMarkerData(){let e=this._markerData;e!=null&&e.target&&this._markerDataChangeHandler&&e.target.removeListener(`change`,this._markerDataChangeHandler),this._markerDataChangeHandler=null,this._markerDataOwned&&dC(e,(e=>e.name===`${this.type}_${this.id}_data`)),this._markerData=null,this._markerDataOwned=!1}updateLayoutAttribute(){var e;if((e=this._spec.visible)==null||e){if(!this._markerComponent){let e=this._createMarkerComponent();e.name=this._spec.name??this.type,e.id=this._spec.id??`${this.type}-${this.id}`,this._markerComponent=e,this.getContainer().add(this._markerComponent),this._markerComponent.on(`*`,((e,t)=>{this._delegateEvent(this._markerComponent,e,t,null,this.getMarkerData.bind(this))}))}this._updateMarkerLayout()}super.updateLayoutAttribute()}_getSeriesByIdOrIndex(e,t){let n;return n=this._option.getSeriesInUserIdOrIndex(h(e)?[e]:[],[t])?.[0],n||=this._relativeSeries??this._getFirstSeries(),n}_bindSeries(){let e=this._spec;this._relativeSeries=this._getSeriesByIdOrIndex(e.relativeSeriesId,e.relativeSeriesIndex),this._startRelativeSeries=this._getSeriesByIdOrIndex(e.startRelativeSeriesId,e.startRelativeSeriesIndex),this._endRelativeSeries=this._getSeriesByIdOrIndex(e.endRelativeSeriesId,e.endRelativeSeriesIndex),e.specifiedDataSeriesIndex&&e.specifiedDataSeriesIndex===`all`||e.specifiedDataSeriesId&&e.specifiedDataSeriesId===`all`?this._specifiedDataSeries=this._option.getAllSeries():(e.specifiedDataSeriesIndex||e.specifiedDataSeriesId)&&(this._specifiedDataSeries=this._getSeriesByIdOrIndex(e.specifiedDataSeriesId,e.specifiedDataSeriesIndex))}initEvent(){this._relativeSeries.coordinate!==`cartesian`&&(this._relativeSeries.event.on(`zoom`,this._updateMarkerLayout.bind(this)),this._relativeSeries.event.on(`panmove`,this._updateMarkerLayout.bind(this)),this._relativeSeries.event.on(`scroll`,this._updateMarkerLayout.bind(this)))}clear(){super.clear(),this._markerComponent=null,this._firstSeries=null}release(){this._releaseMarkerData(),super.release()}_getFirstSeries(){var e;if(this._firstSeries)return this._firstSeries;let t=bo(this._regions);return t?(this._firstSeries=t,t):((e=this._option)==null||e.onError(`need at least one series`),null)}_getNeedClearVRenderComponents(){return[this._markerComponent]}onLayoutStart(e,t){N(this._spec.offsetX)||(this._layoutOffsetX=ns(this._spec.offsetX,t.width,t)),N(this._spec.offsetY)||(this._layoutOffsetY=ns(this._spec.offsetY,t.height,t)),super.onLayoutStart(e,t)}_compareSpec(e,t){let n=super._compareSpec(e,t);return O(t,e)||(n.reRender=!0,n.change=!0,n.reMake||n.reCompile||!this._isComponentOnlySpecChange(e,t)?n.reMake||n.reCompile||!this._isAutoRangeSpecChange(e,t)?n.reMake=!0:n.effects=Object.assign(Object.assign({},n.effects),{component:!0,scaleDomain:!0,layout:!0,render:!0}):n.effects=Object.assign(Object.assign({},n.effects),{component:!0,layout:!0,render:!0})),n}_isComponentOnlySpecChange(e,t){let n=!e?.autoRange&&!t?.autoRange;return O(CC(t,{normalizeDomainPosition:n}),CC(e,{normalizeDomainPosition:n}))}_isAutoRangeSpecChange(e,t){return!(!e?.autoRange&&!t?.autoRange)&&O(CC(t,{normalizeDomainPosition:!0,normalizeAutoRange:!0}),CC(e,{normalizeDomainPosition:!0,normalizeAutoRange:!0}))}reInit(e){super.reInit(e),this._releaseMarkerData(),this._bindSeries(),this._initDataView(),this._buildMarkerAttributeContext(),this._markerComponent&&this._updateMarkerLayout()}_initCommonDataView(){let{options:e}=this._computeOptions(),t=this._getRelativeDataView();X(this._option.dataSet,`markerAggregation`,$S),X(this._option.dataSet,`markerFilter`,oC),this._releaseMarkerData();let n=new Ne(this._option.dataSet,{name:`${this.type}_${this.id}_data`});n.parse([t],{type:`dataview`}),n.transform({type:`markerAggregation`,options:e}),n.transform({type:`markerFilter`,options:this._getAllRelativeSeries()}),this._setMarkerData(n,!0),this._bindMarkerDataChange()}}})))()}function EC(e,t){let n=e[0].latestData;return fo(n,t.fieldX,t.fieldY)}function DC(){return(DC=e((()=>{_o()})))()}var OC;function kC(){return(kC=e((()=>{Et(),aC(),GS(),Zc(),TC(),DC(),vu(),S(),OC=class extends wC{constructor(){super(...arguments),this.specKey=`markLine`,this.layoutZIndex=gu.MarkLine}static _getMarkerCoordinateType(e){let{doAngleProcess:t,doRadiusProcess:n,doAngRadRad1Process:r,doRadAngAng1Process:i,doRadAngProcess:a}=VS(e);return e.coordinateType===`polar`||t||n||r||i||a?`polar`:`cartesian`}_createMarkerComponent(){var e,t,n,r,i;let{startSymbol:a={},endSymbol:o={}}=this._spec,s=T(this._spec.label??{}),c={zIndex:this.layoutZIndex,interactive:(e=this._spec.interactive)==null||e,hover:(t=this._spec.interactive)==null||t,select:(n=this._spec.interactive)==null||n,points:[{x:0,y:0},{x:0,y:0}],center:{x:0,y:0},radius:0,startAngle:0,endAngle:0,lineStyle:LS(G(this._spec.line?.style),this._markerData,this._markAttributeContext),clipInRange:(r=this._spec.clip)!=null&&r,label:s.map((e=>FS(e,this._markerData,this._markAttributeContext))),state:{line:IS(this._spec.line?.state??{},this._markerData,this._markAttributeContext),lineStartSymbol:IS(this._spec.startSymbol?.state??{},this._markerData,this._markAttributeContext),lineEndSymbol:IS(this._spec.endSymbol?.state??{},this._markerData,this._markAttributeContext),label:s.map((e=>IS(e.state??{},this._markerData,this._markAttributeContext))),labelBackground:s.map((e=>IS(e.labelBackground?.state??{},this._markerData,this._markAttributeContext)))},animation:(i=this._spec.animation)!=null&&i,animationEnter:this._spec.animationEnter,animationExit:this._spec.animationExit,animationUpdate:this._spec.animationUpdate};return c.startSymbol=a.visible?Object.assign(Object.assign({},a),{visible:!0,style:LS(G(a.style),this._markerData,this._markAttributeContext)}):{visible:!1},c.endSymbol=o.visible?Object.assign(Object.assign({},o),{visible:!0,style:LS(G(o.style),this._markerData,this._markAttributeContext)}):{visible:!1},this._newMarkLineComponent(c)}_getUpdateMarkerAttrs(){let e=this._spec,t=this._markerData,n=this._startRelativeSeries,r=this._endRelativeSeries,i=this._relativeSeries,a=this._computePointsAttr(),o=i.getViewData().latestData,s=t.latestData[0]&&t.latestData[0].latestData?t.latestData[0].latestData:t.latestData,c;if(e.clip||T(e.label).some((e=>e?.confine))){let{minX:e,maxX:t,minY:a,maxY:o}=PS([n.getRegion(),r.getRegion(),i.getRegion()]);c={x:e,y:a,width:t-e,height:o-a}}let l=this._markerComponent?.attribute??{},u=T(l.label),d=T(this._spec.label),f=u.map(((e,t)=>{let n=d[t]||{};return Object.assign(Object.assign({},e),{text:n.formatMethod?n.formatMethod(s,o):e?.text})}));return Object.assign(Object.assign({},a),{label:f,limitRect:c,dx:this._layoutOffsetX,dy:this._layoutOffsetY})}_markerLayout(){var e;let t=this._getUpdateMarkerAttrs();(e=this._markerComponent)==null||e.setAttributes(t)}_initDataView(){let e=this._spec,t=`coordinates`in e,{doXProcess:n,doYProcess:r,doXYY1Process:i,doYXX1Process:a,doXYProcess:o,doAngleProcess:s,doRadiusProcess:c,doAngRadRad1Process:l,doRadAngAng1Process:u,doRadAngProcess:d}=VS(e);if(this._setMarkerData(this._getRelativeDataView()),!(n||r||i||a||o||s||c||l||u||d||t))return;X(this._option.dataSet,`markerAggregation`,$S),X(this._option.dataSet,`markerRegression`,EC),X(this._option.dataSet,`markerFilter`,oC);let{options:f,needAggr:p,needRegr:m,processData:h}=this._computeOptions(),g=new Ne(this._option.dataSet);g.parse([h],{type:`dataview`}),p&&g.transform({type:`markerAggregation`,options:f}),m&&g.transform({type:`markerRegression`,options:f}),g.transform({type:`markerFilter`,options:this._getAllRelativeSeries()}),this._setMarkerData(g,!0),this._bindMarkerDataChange()}},OC.specKey=`markLine`})))()}var AC;function jC(){return(jC=e((()=>{AC=()=>({style:{fontSize:{type:`token`,key:`l4FontSize`},fontWeight:`normal`,fontStyle:`normal`,fill:{type:`palette`,key:`primaryFontColor`}},labelBackground:{padding:{top:2,bottom:2,right:4,left:4},style:{cornerRadius:3,fill:{type:`palette`,key:`markLabelBackgroundColor`}}}})})))()}var MC,NC,PC;function FC(){return(FC=e((()=>{jC(),MC=e=>({visible:e,symbolType:`triangle`,size:10,style:{fill:{type:`palette`,key:`markLineStrokeColor`},stroke:null,lineWidth:0}}),NC=AC(),NC.refY=5,PC={line:{style:{lineDash:[3,3],stroke:{type:`palette`,key:`markLineStrokeColor`}}},startSymbol:MC(!1),endSymbol:MC(!0),label:NC}})))()}var IC,LC;function RC(){return(RC=e((()=>{Et(),V(),GS(),na(),S(),o(),v(),Re(),U(),cs(),kC(),FC(),IC=class extends OC{constructor(){super(...arguments),this.type=B.markLine,this.name=B.markLine,this.coordinateType=`cartesian`}_newMarkLineComponent(e){return new Ut(e)}_computePointsAttr(){var e;let t=this._spec,n=this._markerData,r=this._startRelativeSeries,i=this._endRelativeSeries,a=this._relativeSeries,o=h(t.coordinates),s=h(t.process),c=s&&h(t.process.x),l=s&&h(t.process.y),u=h(t.positions),d=(e=t.autoRange)!=null&&e,{doXProcess:f,doYProcess:p,doXYY1Process:m,doYXX1Process:g,doXYProcess:_,doCoordinatesProcess:v}=VS(t),y=[];if(f||m||p||g||_||o&&c||o&&l){let e=ES(n,r,i,a,d,!1,this._getAutoRangeExtendDomainKeyPrefix());y=e.length===1?e[0]:e.map((e=>e[0]))}else v?y=jS(n,a,d,t.coordinatesOffset,this._getAutoRangeExtendDomainKeyPrefix()):u&&(y=NS(t.positions,a,t.regionRelative));return{points:y}}_markerLayout(){var e,t,n,r;let i=this._getUpdateMarkerAttrs();if(this._spec.type===`type-step`){let r=this._startRelativeSeries,a=this._endRelativeSeries,{multiSegment:o,mainSegmentIndex:s}=this._spec.line||{},{connectDirection:c}=this._spec,{expandDistance:l=0}=this._spec,{points:u,limitRect:d}=i,f=T(u).filter(Boolean);if(M(l)){let t=(r?.getRegion)?.call(r),n=(a?.getRegion)?.call(a);l=l(this._markerData,Object.assign(Object.assign({},this.getMarkAttributeContext()),{region:((e=this._relativeSeries)?.getRegion)?.call(e),startRegion:t,endRegion:n,coordinatePoints:f}))}let p;if(es(l)){let e=r.getRegion(),t=e.getLayoutStartPoint(),n=a.getRegion(),i=n.getLayoutStartPoint();if(c===`bottom`||c===`top`){let r=Math.abs(Math.min(t.y,i.y)-Math.max(t.y+e.getLayoutRect().height,i.y+n.getLayoutRect().height));p=Number(l.substring(0,l.length-1))*r/100}else{let r=Math.abs(Math.min(t.x,i.x)-Math.max(t.x+e.getLayoutRect().width,i.x+n.getLayoutRect().width));p=Number(l.substring(0,l.length-1))*r/100}}else p=l;if(!u||u.length<2)return void((t=this._markerComponent)==null||t.setAttributes(i));let m=KS(u[0],u[1],c,p),g;g=o&&h(s)?{position:`middle`,autoRotate:!1}:Object.assign({position:`start`,autoRotate:!1},qS(u[0],u[1],c,p));let _=this._markerComponent?.attribute??{},v=T(_.label),y=T(i.label),ee=T(this._spec.label);(n=this._markerComponent)==null||n.setAttributes({points:o?[[m[0],m[1]],[m[1],m[2]],[m[2],m[3]]]:m,label:y.map(((e,t)=>{let n=0,r=0,i=g.dx??0,a=g.dy??0,o=ee[t]??ee[0];return P(o?.refX)&&(n+=o.refX),P(o?.refY)&&(r+=o.refY),P(o?.dx)&&(i+=o.dx),P(o?.dy)&&(a+=o.dy),Object.assign(Object.assign(Object.assign({},e),g),{refX:n,refY:r,dx:i,dy:a,textStyle:Object.assign(Object.assign({},v[t]?.textStyle),{textAlign:`center`,textBaseline:`middle`})})})),limitRect:d,multiSegment:o,mainSegmentIndex:s,dx:this._layoutOffsetX,dy:this._layoutOffsetY})}else(r=this._markerComponent)==null||r.setAttributes(i)}_computeOptions(){let e,t=this._getRelativeDataView(),n=!0,r=!1,i=this._spec,a=this._relativeSeries,{doXProcess:o,doYProcess:s,doXYY1Process:c,doYXX1Process:l,doXYProcess:u,doCoordinatesProcess:d}=VS(i);if(u)e=[this._processSpecByDims([{dim:`x`,specValue:i.x},{dim:`y`,specValue:i.y}]),this._processSpecByDims([{dim:`x`,specValue:i.x1},{dim:`y`,specValue:i.y1}])];else if(o)e=[this._processSpecByDims([{dim:`x`,specValue:i.x}])];else if(s)e=[this._processSpecByDims([{dim:`y`,specValue:i.y}])];else if(c)e=[this._processSpecByDims([{dim:`x`,specValue:i.x},{dim:`y`,specValue:i.y}]),this._processSpecByDims([{dim:`x`,specValue:i.x},{dim:`y`,specValue:i.y1}])];else if(l)e=[this._processSpecByDims([{dim:`x`,specValue:i.x},{dim:`y`,specValue:i.y}]),this._processSpecByDims([{dim:`x`,specValue:i.x1},{dim:`y`,specValue:i.y}])];else if(d){if(e=this._processSpecCoo(i),n=!1,t=new Ne(this._option.dataSet,{name:`${this.type}_${this.id}_data`}).parse([a.getViewData()],{type:`dataview`}).transform({type:`markerAggregation`,options:e}),i.process&&h(i.process.x)&&(e=[this._processSpecByDims([{dim:`x`,specValue:i.process.x}])],n=!0),i.process&&h(i.process.y)&&(e=e=[this._processSpecByDims([{dim:`y`,specValue:i.process.y}])],n=!0),i.process&&h(i.process.xy)){let{xField:t,yField:n}=a.getSpec();e={fieldX:t,fieldY:n},r=!0}}else n=!1;return{options:e,needAggr:n,needRegr:r,processData:t}}},IC.type=B.markLine,IC.coordinateType=`cartesian`,IC.builtInTheme={markLine:PC},LC=()=>{H.registerComponent(IC.type,IC),$n()}})))()}var zC;function BC(){return(BC=e((()=>{zC={padding:{top:4,bottom:20},textStyle:{fontSize:{type:`token`,key:`l3FontSize`},lineHeight:{type:`token`,key:`l3LineHeight`},fill:{type:`palette`,key:`primaryFontColor`}},subtextStyle:{fontSize:{type:`token`,key:`l4FontSize`},lineHeight:{type:`token`,key:`l4LineHeight`},fill:{type:`palette`,key:`tertiaryFontColor`}}}})))()}var VC,HC;function UC(){return(UC=e((()=>{vu(),U(),cs(),fg(),V(),Fr(),Ce(),Re(),b(),v(),E(),tp(),BC(),VC=class extends dg{get orient(){return this._orient}constructor(e,t){super(e,t),this.type=B.title,this.specKey=B.title,this.layoutType=`normal`,this.layoutZIndex=gu.Title,this.layoutLevel=_u.Title,this._orient=`top`,this._orient=$o(e.orient)?e.orient:`top`}initLayout(){super.initLayout(),this._layout&&(this._layout.layoutOrient=this._orient)}static getSpecInfo(e){return ep(e,this.specKey,B.title,(e=>!1!==e.visible))}_compareSpec(e,t){let n=super._compareSpec(e,t),r=!O(t,e);return t?.orient===e?.orient&&t?.visible===e.visible||(n.reMake=!0),n.change=!0,n.reRender=!0,r&&!n.reMake&&(n.effects=Object.assign(Object.assign({},n.effects),{component:!0,layout:!0,render:!0})),n}afterSetLayoutStartPoint(e){P(e.x)&&this._titleComponent&&this._titleComponent.setAttribute(`x`,e.x),P(e.y)&&this._titleComponent&&this._titleComponent.setAttribute(`y`,e.y),super.afterSetLayoutStartPoint(e)}getBoundsInRect(e){let t={};this.setLayoutRect(e);let n=this._getTitleAttrs();this._createOrUpdateTitleComponent(n),t=this._getTitleLayoutRect();let{x:r,y:i}=this.getLayoutStartPoint();return{x1:r,y1:i,x2:r+t.width,y2:i+t.height}}_calcSpecSize(e,t){if(N(e))return;let n=this._option.getChartViewRect();return ns(e,t?n.width:n.height,n)}_getTitleLayoutRect(){let e=this._titleComponent.AABBBounds,t=this._calcSpecSize(this._spec.width,!0),n=this._calcSpecSize(this._spec.height,!1);return{width:t||(P(e.width())?e.width():0),height:n||(P(e.height())?e.height():0)}}_getTitleAttrs(){if(!1===this._spec.visible)return{visible:!1};let e=this.getLayoutRect(),t=this._calcSpecSize(this._spec.width,!0),n=this._calcSpecSize(this._spec.maxWidth,!0),r=Math.max(Math.min(t??e.width,n??e.width,e.width),0),i=h(this._spec.text)&&this._spec.text!==``,a=h(this._spec.subtext)&&this._spec.subtext!==``,o=Object.assign(Object.assign({},ae(this._spec,[`padding`])),{textType:this._spec.textType??`text`,text:i?this._spec.text:void 0,subtextType:this._spec.subtextType??`text`,subtext:a?this._spec.subtext:void 0,x:this._spec.x??0,y:this._spec.y??0,width:t,height:this._calcSpecSize(this._spec.height,!1),minWidth:this._calcSpecSize(this._spec.minWidth,!0),maxWidth:r,minHeight:this._calcSpecSize(this._spec.minHeight,!1),maxHeight:this._calcSpecSize(this._spec.maxHeight,!1),padding:this._spec.innerPadding,align:this._spec.align??`left`,verticalAlign:this._spec.verticalAlign??`top`,textStyle:Object.assign({maxLineWidth:r},this._spec.textStyle),subtextStyle:Object.assign({maxLineWidth:r},this._spec.subtextStyle)});if(i&&(o.textStyle.width=r),a&&(o.subtextStyle.width=r),h(this._spec.width)){let n=Math.max(Math.min(t,e.width),0);i?o.textStyle.width=n:delete o.textStyle.width,a&&(o.subtextStyle.width=n)}return o}_createOrUpdateTitleComponent(e){if(this._titleComponent)O(e,this._cacheAttrs)||this._titleComponent.setAttributes(e);else{let t=this.getContainer(),n=new Vi(e);n.name=`title`,t.add(n),this._titleComponent=n,n.on(`*`,((e,t)=>this._delegateEvent(n,e,t)))}return this._cacheAttrs=e,this._titleComponent}_getNeedClearVRenderComponents(){return[this._titleComponent]}clear(){super.clear(),this._cacheAttrs=null}},VC.type=B.title,VC.specKey=B.title,VC.builtInTheme={title:zC},HC=()=>{H.registerComponent(VC.type,VC)}})))()}var WC;function GC(){return(GC=e((()=>{GS(),Zc(),TC(),vu(),S(),WC=class extends wC{constructor(){super(...arguments),this.specKey=`markArea`,this.layoutZIndex=gu.MarkArea}static _getMarkerCoordinateType(e){let{doAngleProcess:t,doRadiusProcess:n,doRadAngProcess:r}=HS(e);return e.coordinateType===`polar`||t||n||r?`polar`:`cartesian`}_createMarkerComponent(){var e,t,n,r,i;let a=T(this._spec.label??{}),o={zIndex:this.layoutZIndex,interactive:(e=this._spec.interactive)==null||e,hover:(t=this._spec.interactive)==null||t,select:(n=this._spec.interactive)==null||n,points:[{x:0,y:0}],center:{x:0,y:0},innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,areaStyle:LS(G(this._spec.area?.style),this._markerData,this._markAttributeContext),clipInRange:(r=this._spec.clip)!=null&&r,label:a.map((e=>FS(e,this._markerData,this._markAttributeContext))),state:{area:IS(this._spec.area?.state,this._markerData,this._markAttributeContext),label:a.map((e=>IS(e.state,this._markerData,this._markAttributeContext))),labelBackground:a.map((e=>IS(e.labelBackground?.state,this._markerData,this._markAttributeContext)))},animation:(i=this._spec.animation)!=null&&i,animationEnter:this._spec.animationEnter,animationExit:this._spec.animationExit,animationUpdate:this._spec.animationUpdate};return this._newMarkAreaComponent(o)}_markerLayout(){let e=this._spec,t=this._markerData,n=this._startRelativeSeries,r=this._endRelativeSeries,i=this._relativeSeries,a=this._computePointsAttr(),o=this._getRelativeDataView().latestData,s=t?t.latestData[0]&&t.latestData[0].latestData?t.latestData[0].latestData:t.latestData:o,c;if(e.clip||T(e.label).some((e=>e?.confine))){let{minX:e,maxX:t,minY:a,maxY:o}=PS([n.getRegion(),r.getRegion(),i.getRegion()]);c={x:e,y:a,width:t-e,height:o-a}}if(this._markerComponent){let e=T(this._markerComponent.attribute?.label),t=T(this._spec.label);this._markerComponent.setAttributes(Object.assign(Object.assign({},a),{label:e.map(((e,n)=>{let r=t[n]||{};return Object.assign(Object.assign({},e),{text:r.formatMethod?r.formatMethod(s,o):e?.text})})),limitRect:c,dx:this._layoutOffsetX,dy:this._layoutOffsetY}))}}_initDataView(){let e=this._spec,{doXProcess:t,doYProcess:n,doXYProcess:r,doAngleProcess:i,doRadiusProcess:a,doRadAngProcess:o,doCoordinatesProcess:s}=HS(e);if(!(t||n||r||i||a||o||s))return null;this._initCommonDataView()}},WC.specKey=`markArea`})))()}var KC;function qC(){return(qC=e((()=>{jC(),KC={area:{style:{fill:{type:`palette`,key:`axisDomainColor`,a:.25}}},label:AC()}})))()}var JC,YC;function XC(){return(XC=e((()=>{V(),GS(),oa(),v(),U(),GC(),qC(),JC=class extends WC{constructor(){super(...arguments),this.type=B.markArea,this.name=B.markArea,this.coordinateType=`cartesian`}_newMarkAreaComponent(e){return new jr(e)}_computePointsAttr(){var e,t;let n=this._spec,r=this._markerData,i=this._startRelativeSeries,a=this._endRelativeSeries,o=this._relativeSeries,{doXProcess:s,doYProcess:c,doXYProcess:l,doCoordinatesProcess:u}=HS(n),d=h(n.positions),f=(e=n.autoRange)!=null&&e,p=(t=n.includeFullBand)!=null&&t,m=[],g=[];if(l){g=ES(r,i,a,o,f,p,this._getAutoRangeExtendDomainKeyPrefix());let[e,t]=g;e&&e.length&&t&&t.length&&(m=[{x:e[0].x,y:t[0].y},e[0],{x:t[0].x,y:e[0].y},t[0]])}else if(s||c){g=ES(r,i,a,o,f,p,this._getAutoRangeExtendDomainKeyPrefix());let[e,t]=g;e&&e.length&&t&&t.length&&(m=[...e,t[1],t[0]])}else u?m=jS(r,o,f,n.coordinatesOffset,this._getAutoRangeExtendDomainKeyPrefix()):d&&(m=NS(n.positions,o,n.regionRelative));return{points:m}}_computeOptions(){let e=this._spec,{doXProcess:t,doYProcess:n,doXYProcess:r,doCoordinatesProcess:i}=HS(e),a;return r?a=[this._processSpecByDims([{dim:`x`,specValue:e.x},{dim:`y`,specValue:e.y}]),this._processSpecByDims([{dim:`x`,specValue:e.x1},{dim:`y`,specValue:e.y1}])]:t?a=[this._processSpecByDims([{dim:`x`,specValue:e.x}]),this._processSpecByDims([{dim:`x`,specValue:e.x1}])]:n?a=[this._processSpecByDims([{dim:`y`,specValue:e.y}]),this._processSpecByDims([{dim:`y`,specValue:e.y1}])]:i&&(a=this._processSpecCoo(e)),{options:a}}},JC.type=B.markArea,JC.coordinateType=`cartesian`,JC.builtInTheme={markArea:KC},YC=()=>{H.registerComponent(JC.type,JC),Yn()}})))()}var ZC;function QC(){return(QC=e((()=>{fg(),V(),vu(),S(),Ce(),E(),ye(),$u(),Ho(),ZC=class extends dg{constructor(e,t){super(e,t),this.type=B.label,this.name=B.label,this.layoutType=`none`,this.layoutZIndex=gu.Label,this._regions=t.getRegionsInIndex(t.regionIndexes)}_interactiveConfig(e){let{interactive:t}=e,n={hover:!1,select:!1,state:e.state};if(!0!==t)return n;let{hover:r,select:i}=this._option.getChart().getSpec();return!1===r&&!1===r.enable||(n.hover=!0),!1===i&&!1===i.enable||(n.select=!0),n}_compareSpec(e,t){let n=super._compareSpec(e,t);return n.reRender=!0,O(t,e)||(n.change=!0,n.reMake||n.reCompile?n.reMake=!0:n.effects=Object.assign(Object.assign({},n.effects),{component:!0,layout:!0,render:!0})),n}_getDataLabelType(e,t){let n=e.type;return n===`line`||n===`area`?t??`line-data`:n===`rect`?`rect`:n===`arc`?`arc`:n===`symbol`||n===`cell`?`symbol`:e.setDataLabelType?e.setDataLabelType():``}_setTransformOfComponent(e,t){e.setAttributeTransform((({labelStyle:e,size:n,itemEncoder:r})=>{let i=n(),a=Vo({type:`palette`,key:`secondaryFontColor`},this.getColorScheme());return{dataLabels:T(t).map(((t,n)=>{let o=e(n),s=[],c=t.getGraphics();if(c)return o.data&&o.data.length?o.data.forEach(((e,t)=>{if(c[t]){let t=r(e,{labelIndex:n});N(t.fill)&&(t.fill=a),N(t.data)&&(t.data=e),s.push(t)}})):c.forEach((e=>{let{data:t,diffState:i}=e.context;i!==Qu.exit&&t.forEach(((e,{})=>{let t=r(e,{labelIndex:n});N(t.fill)&&(t.fill=a),N(t.data)&&(t.data=e),s.push(t)}))})),d(o.overlap)&&N(o.overlap.size)&&(o.overlap.size=Object.assign({},i)),Object.assign(Object.assign({smartInvert:!1,baseMarkGroupName:t.getProductId(),getBaseMarks:()=>c},o),{type:this._getDataLabelType(t,o.type),data:s})})),size:i}}))}getVRenderComponents(){let e=[];return this.getMarks().forEach((t=>{let n=t.getComponent();n&&e.push(n)})),e}clear(){super.clear(),this.getMarks().forEach((e=>{e&&e.clearComponent()}))}},ZC.type=B.label})))()}var $C,ew;function tw(){return(tw=e((()=>{U(),cb(),$C=class extends ob{constructor(){super(...arguments),this.skipEncode=!1}getRule(){return this._rule}setRule(e){this._rule=e}getTarget(){return this._target}setTarget(e){this._target=e,this._rule||this.setRule(e.type)}getComponent(){return this._component}setComponent(e){this._component=e}render(){}},$C.type=`text`,$C.constructorType=`label`,ew=()=>{sb(),H.registerMark($C.constructorType,$C)}})))()}var nw;function rw(){return(rw=e((()=>{lg(),nw=class extends cg{_initTheme(e,t){return{spec:e,theme:this._theme}}}})))()}var iw,aw;function ow(){return(ow=e((()=>{V(),Dc(),Y(),yu(),vu(),_i(),xo(),nb(),vg(),QC(),S(),j(),o(),v(),b(),U(),tw(),rw(),fi(),iw=class extends ZC{constructor(e,t){super(e,t),this.type=B.label,this.name=B.label,this.specKey=`label`,this.transformerConstructor=nw,this.layoutZIndex=gu.Label,this._layoutRule=e.labelLayout||`series`}static getSpecInfo(e,t){let n=[];return(t?.region||[]).forEach(((r,i)=>{(r.seriesIndexes||[]).some((e=>{let{markLabelSpec:n={}}=t.series[e];return Object.values(n).some((e=>Array.isArray(e)&&(e=>e.some((e=>e.visible)))(e)))}))&&n.push({spec:e,type:B.label,specInfoPath:[`component`,this.specKey,i],regionIndexes:[i]})})),n}init(e){super.init(e),this.initEvent(),this._initTextMark(),this._initLabelComponent(),this._initTextMarkStyle()}reInit(e){super.reInit(e),this._labelInfoMap&&(this._labelInfoMap.forEach((e=>{e.forEach((({labelMark:e})=>{e.release()}))})),this._labelInfoMap.clear()),this._labelInfoMap&&this._labelInfoMap.clear(),this._initTextMark(),this._initLabelComponent(),this._initTextMarkStyle()}initEvent(){this.event.on(K.dataZoomChange,(()=>{this._labelComponentMap.forEach(((e,t)=>{let n=t.getComponent();n&&n.disableAnimation()})),this.event.on(ol.AFTER_MARK_RENDER_END,e)}));let e=()=>{this._labelComponentMap.forEach(((e,t)=>{let n=t.getComponent();n&&n.enableAnimation()})),this.event.off(ol.AFTER_MARK_RENDER_END,e)}}_initTextMark(){this._labelInfoMap||=/* @__PURE__ */ new Map,this._labelComponentMap||=/* @__PURE__ */ new Map,vo(this._regions,(e=>{let{markLabelSpec:t={}}=e.getSpecInfo(),n=Object.keys(t),r=e.getRegion();this._labelInfoMap.get(r)||this._labelInfoMap.set(r,[]);for(let i=0;i<n.length;i++){let a=n[i],o=e.getMarkInName(a);o&&t[a].forEach(((t,n)=>{var i;if(t.visible){let s=this._labelInfoMap.get(r),c=this._createMark({type:`label`,name:`${e.userId??e.id}-${a}-label-${n}`},{attributeContext:e.getMarkAttributeContext()});t.showRelatedMarkTooltip&&((i=e.tooltipHelper?.activeTriggerSet.mark)==null||i.add(c)),c.setTarget(o),s.push({labelMark:c,baseMark:o,series:e,labelSpec:t})}}))}}))}_initLabelComponent(){let e={};this._labelComponentMap.forEach(((t,n)=>{e[n.name]=n})),this._labelInfoMap.forEach(((t,n)=>{if(this._layoutRule===`region`){let r=!1,i=`${n.getGroupMark().name}-label-component`,a=e[i];a||=(r=!0,this._createMark({type:`component`,name:i},{componentType:`label`},{support3d:this._spec.support3d})),a&&(r&&(a.setSkipBeforeLayouted(!0),this._marks.addMark(a),t.forEach((e=>{var t;(t=e.baseMark.getData())==null||t.addRelatedMark(a)}))),t[0]&&h(t[0].labelSpec.zIndex)&&a.setMarkConfig({zIndex:t[0].labelSpec.zIndex}),this._labelComponentMap.set(a,(()=>this._labelInfoMap.get(n))),e[i]=null)}else t.forEach(((t,r)=>{var i;let a=!1,o=`${t.labelMark.name}-component`,s=e[o];s||=(a=!0,this._createMark({type:`component`,name:o},{componentType:`label`,noSeparateStyle:!0},{support3d:t.baseMark.getMarkConfig().support3d})),s&&(h(t.labelSpec.zIndex)&&s.setMarkConfig({zIndex:t.labelSpec.zIndex}),a&&(s.setSkipBeforeLayouted(!0),this._marks.addMark(s),(i=t.baseMark.getData())==null||i.addRelatedMark(s)),this._labelComponentMap.set(s,(()=>this._labelInfoMap.get(n)[r])),e[o]=null)}))})),Object.keys(e).forEach((t=>{let n=e[t];n&&(n.releaseWithExitAnimation()||n.release(),this._labelComponentMap.delete(n))}))}_initTextMarkStyle(){this._labelComponentMap.forEach(((e,t)=>{T(e()).forEach((({labelMark:e})=>{e.setComponent(t)}))})),this._labelInfoMap.forEach((e=>{e.forEach((e=>{var t;let{labelMark:n,labelSpec:r,series:i}=e;this.initMarkStyleWithSpec(n,r),M(r?.getStyleHandler)&&r.getStyleHandler(i)?.call(i,n,r),(t=n.stateStyle?.normal)!=null&&t.lineWidth&&n.setAttribute(`stroke`,i.getColorAttribute(),`normal`,Z.Base_Series)}))}))}updateLayoutAttribute(){super.updateLayoutAttribute(),this._labelComponentMap.forEach(((e,t)=>{let n=e();A(n)?this._updateMultiLabelAttribute(n,t):this._updateSingleLabelAttribute(n,t)}))}_updateMultiLabelAttribute(e,t){this._updateLabelComponentAttribute(t,e.map((({baseMark:e})=>e)),e)}_updateSingleLabelAttribute(e,t){let{baseMark:n}=e;this._updateLabelComponentAttribute(t,n,[e])}_updateLabelComponentAttribute(e,t,n){let r=this._option.getComponentsByType(`totalLabel`);e.setMarkConfig({interactive:!1}),e.setSimpleStyle({labelStyle:e=>{let t=n[e],{labelSpec:i,labelMark:a,series:o}=t,s=a.getRule(),c=this._interactiveConfig(i),l=this._spec?.centerOffset??0,u=R({textStyle:Object.assign({pickable:!0===i.interactive},i.style),overlap:{avoidMarks:r.map((e=>e.getMarks()[0].getProductId()))}},Iy(s,t),Object.assign(Object.assign(Object.assign({},ae(i,[`position`,`style`,`state`,`type`,`stackDataFilterType`,`getStyleHandler`])),c),{centerOffset:l}),i.stackDataFilterType?{dataFilter:i.stackDataFilterType===`min`?e=>e.filter((e=>e.data[Tc])):e=>e.filter((e=>e.data[wc]))}:{});return o&&o.parseLabelStyle&&(u=o.parseLabelStyle(u,i,a)),s!==`line`&&s!==`area`||(u.type=s),u},size:()=>Object.assign({padding:n[0].labelSpec.overlap?.padding},n[0].series.getRegion().getLayoutRect()),itemEncoder:(e,{labelIndex:t})=>n[t]&&!n[t].labelMark.skipEncode?Ly(n[t],e,n[t].labelSpec.formatMethod,n[t].labelSpec.formatter):{data:e}}),this._setTransformOfComponent(e,t)}compileMarks(){this.getMarks().forEach((e=>{let t=this._labelComponentMap.get(e)(),n;n=A(t)?t[0].series.getRegion().getGroupMark().getProduct():t.series.getRegion().getGroupMark().getProduct(),e.compile({group:n})}))}getLabelInfoByTextGraphic(e){let t,n=e?.parent,r=n?.parent;if(r){let e=r.getChildren().indexOf(n);this._labelComponentMap.forEach(((n,i)=>{i.getComponent()===r&&(t=T(n())[e])}))}return t}},iw.type=B.label,iw.specKey=`label`,iw.transformerConstructor=nw,aw=()=>{H.registerGraphicComponent(iw.type,(e=>new Fn(e))),ew(),_g(),H.registerComponent(iw.type,iw,!0,1/0)}})))()}var sw;function cw(){return(cw=e((()=>{sw={visible:!1,offset:5,overlap:{clampForce:!0,strategy:[]},smartInvert:!1,animation:!1,style:{fontSize:{type:`token`,key:`l4FontSize`},fill:{type:`palette`,key:`primaryFontColor`}}}})))()}function lw(e,t,n=`top`){let r,{direction:i}=e,a;a=n===`bottom`?{vertical:[`bottom`,`top`],horizontal:[`left`,`right`]}:{vertical:[`top`,`bottom`],horizontal:[`right`,`left`]};let o=(i===`horizontal`?e.getXAxisHelper()?.isInverse():e.getYAxisHelper()?.isInverse())?1:0;switch(t){case`rect`:case`symbol`:r=a[i][o];break;default:r=`top`}return r}var uw,dw;function fw(){return(fw=e((()=>{tw(),V(),Dc(),vu(),yu(),_i(),nb(),QC(),U(),vg(),fi(),cw(),uw=class extends ZC{constructor(){super(...arguments),this.type=B.totalLabel,this.name=B.totalLabel,this.specKey=`totalLabel`,this.layoutZIndex=gu.Label}static getSpecInfo(e,t){var n;let r=[];return(n=t?.region)==null||n.forEach(((e,n)=>{var i;(i=e.seriesIndexes)==null||i.forEach((e=>{let{spec:i}=t.series[e],a=i[this.specKey];a!=null&&a.visible&&r.push({spec:a,type:B.totalLabel,specPath:[`series`,e,this.specKey],specInfoPath:[`component`,this.specKey,e],regionIndexes:[n],seriesIndexes:[e]})}))})),r}init(e){super.init(e),this._initTextMark(),this._initLabelComponent()}reInit(e){super.reInit(e),this._initTextMark()}_initTextMark(){let e=this._getSeries();if(e.getSpec().totalLabel?.visible){let t=e.getSeriesMark();if(t){let e=this._createMark({type:`label`,name:`${t.name}-total-label`});this._baseMark=t,this._textMark=e,this._initTextMarkStyle()}}}_initTextMarkStyle(){var e;super.initMarkStyleWithSpec(this._textMark,this._spec),this.setMarkStyle(this._textMark,{text:e=>e[Sc]},`normal`,Z.Default);let t=this._getSeries();(e=t.initTotalLabelMarkStyle)==null||e.call(t,this._textMark)}_initLabelComponent(){let e=this._getSeries(),t=this._createMark({type:`component`,name:`${e.name??e.type}-total-label-component`},{componentType:`label`},{support3d:this._spec.support3d});t&&(this._marks.addMark(t),e.getData().addRelatedMark(t))}updateLayoutAttribute(){super.updateLayoutAttribute();let e=this._getSeries();this._marks.forEach(((t,n)=>{t.setMarkConfig({interactive:!1}),t.setSimpleStyle({labelStyle:()=>{if(this._baseMark){let{offset:t,animation:n,overlap:r,position:i=`top`}=this._spec,a=this._interactiveConfig(this._spec);return R({textStyle:{pickable:!0===this._spec.interactive},position:lw(e,this._baseMark.type,i),x:0,y:0},e.getTotalLabelComponentStyle?.call(e,{baseMark:this._baseMark,labelMark:this._textMark})??{},Object.assign({offset:t,animation:n,overlap:r,dataFilter:e=>e.filter((e=>i===`bottom`?e.data[Tc]:e.data[wc]))},a))}},size:()=>Object.assign({padding:this._spec.overlap?.padding},this._regions[0].getLayoutRect()),itemEncoder:t=>Ly({baseMark:this._baseMark,labelMark:this._textMark,series:e,labelSpec:e.getSpec().totalLabel},t,this._spec.formatMethod)}),this._setTransformOfComponent(t,this._baseMark)}))}compileMarks(){this.getMarks().forEach((e=>{let t=this._regions[0].getGroupMark().getProduct();e.compile({group:t,context:{model:this}})}))}_getSeries(){return this._option.getSeriesInIndex([this.getSpecPath()[1]])[0]}},uw.type=B.totalLabel,uw.builtInTheme={totalLabel:sw},uw.specKey=`totalLabel`,dw=()=>{H.registerGraphicComponent(uw.type,(e=>new Fn(e))),ew(),_g(),H.registerComponent(uw.type,uw,!0)}})))()}var pw,mw,hw,gw;function _w(){return(_w=e((()=>{GS(),Qi(),S(),v(),C(),Zc(),TC(),vu(),td(),Gm(),pw=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`){var i=0;for(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},mw=e=>e?.type===`rich`,hw=e=>{if(!e)return e;let{type:t,text:n,textConfig:r}=e,i=pw(e,[`type`,`text`,`textConfig`]),a=Object.assign({},i),o=h(r)?r:n;return h(o)&&(a.textConfig=o),a},gw=class extends wC{constructor(){super(...arguments),this.specKey=`markPoint`,this.layoutZIndex=gu.MarkPoint,this._handleDimensionHover=e=>{var t;let n=this._getTargetSymbolGraphic();if(n)switch(e.action){case`enter`:n.removeState(Q.STATE_DIMENSION_HOVER),n.removeState(Q.STATE_DIMENSION_HOVER_REVERSE),this._isDimensionHoverTarget(e)?n.addState(Q.STATE_DIMENSION_HOVER,!0):(t=this._spec.targetSymbol?.state)!=null&&t.dimension_hover_reverse&&n.addState(Q.STATE_DIMENSION_HOVER_REVERSE,!0);break;case`leave`:n.removeState(Q.STATE_DIMENSION_HOVER),n.removeState(Q.STATE_DIMENSION_HOVER_REVERSE)}}}initEvent(){super.initEvent();let e=this._spec.targetSymbol?.state;this.coordinateType===`cartesian`&&(e!=null&&e.dimension_hover||e!=null&&e.dimension_hover_reverse)&&this.event.on(Wm.dimensionHover,this._handleDimensionHover)}_getTargetSymbolGraphic(){return this._markerComponent?.find((e=>e.name===`mark-point-targetItem`),!0)}_isDimensionHoverTarget(e){let t=this._markerData?.latestData,n=t?.[0]?.latestData??t;return T(n?.[0]?.x).filter(h).some((t=>e.dimensionInfo.some((e=>e.value===t))))}static _getMarkerCoordinateType(e){let{doPolarProcess:t,doGeoProcess:n}=US(e);return e.coordinateType===`polar`||t?`polar`:e.coordinateType===`geo`||n?`geo`:`cartesian`}_createMarkerComponent(){var e,t,n,r,i,a;let{itemContent:o={},itemLine:s={},targetSymbol:c={}}=this._spec,l=this._relativeSeries.getRegion(),u=o,{type:d=`text`,text:f,symbol:p,image:m,richText:h,customMark:g,textStyle:_,symbolStyle:v,imageStyle:y,richTextStyle:ee,customMarkStyle:te,style:b={},state:x={}}=u,ne=pw(u,[`type`,`text`,`symbol`,`image`,`richText`,`customMark`,`textStyle`,`symbolStyle`,`imageStyle`,`richTextStyle`,`customMarkStyle`,`style`,`state`]),S=null,C=null,re=d,ie={};if(d===`text`){S=f?.state??x;let e=f?.style??f?.textStyle??_??b;mw(e)?(re=`richText`,ie={width:100,height:100},C=LS(ke(ie,hw(e)),this._markerData,this._markAttributeContext)):(ie={dx:0,dy:0},C=FS(Object.assign(Object.assign({},f),{style:ke(ie,e)}),this._markerData,this._markAttributeContext))}else d===`richText`?(S=h?.state??x,ie={width:100,height:100},C=LS(ke(ie,h?.style??ee??b),this._markerData,this._markAttributeContext)):d===`symbol`?(S=p?.state??x,ie={symbolType:`star`,fill:`rgb(48, 115, 242)`,fillOpacity:.8,size:20},C=G(LS(ke(ie,p?.style??v??b),this._markerData,this._markAttributeContext))):d===`image`?(S=m?.state??x,ie={width:80,height:80},C=LS(ke(ie,m?.style??y??b),this._markerData,this._markAttributeContext)):d===`custom`&&(S=g?.state??x,C=LS(g?.style??te??b,this._markerData,this._markAttributeContext));let ae={zIndex:this.layoutZIndex,interactive:(e=this._spec.interactive)==null||e,hover:(t=this._spec.interactive)==null||t,select:(n=this._spec.interactive)==null||n,position:{x:0,y:0},clipInRange:(r=this._spec.clip)!=null&&r,itemContent:Object.assign(Object.assign({type:re,offsetX:RS(o.offsetX,l),offsetY:RS(o.offsetY,l)},ne),{style:LS(C,this._markerData,this._markAttributeContext)}),targetSymbol:{offset:c.offset??0,visible:(i=c.visible)!=null&&i,size:c.size??20,style:LS(c.style,this._markerData,this._markAttributeContext)},state:{line:IS(this._spec.itemLine.line?.state??{},this._markerData,this._markAttributeContext),lineStartSymbol:IS(this._spec.itemLine.startSymbol?.state??{},this._markerData,this._markAttributeContext),lineEndSymbol:IS(this._spec.itemLine.endSymbol?.state??{},this._markerData,this._markAttributeContext),itemContent:IS(S,this._markerData,this._markAttributeContext),textBackground:IS(this._spec.itemContent.text?.labelBackground?.state,this._markerData,this._markAttributeContext),targetItem:IS(this._spec.targetSymbol?.state??{},this._markerData,this._markAttributeContext)},animation:(a=this._spec.animation)!=null&&a,animationEnter:this._spec.animationEnter,animationExit:this._spec.animationExit,animationUpdate:this._spec.animationUpdate},{visible:w,line:oe={}}=s,se=pw(s,[`visible`,`line`]);return ae.itemLine=!1===w?{visible:!1}:Object.assign(Object.assign({},se),{visible:!0,lineStyle:G(oe.style)}),new wr(ae)}_markerLayout(){let e=this._spec,t=this._markerData,n=this._relativeSeries,{point:r}=this._computePointsAttr(),i=this._getRelativeDataView().latestData,a=t?t.latestData[0]&&t.latestData[0].latestData?t.latestData[0].latestData:t.latestData:i,{itemLine:o={},itemContent:s={}}=this._spec,c=this._relativeSeries.getRegion(),{visible:l,line:u={}}=o,d=pw(o,[`visible`,`line`]),f=!1===l?{visible:!1}:Object.assign(Object.assign({},d),{visible:!0,lineStyle:G(u.style)}),p=FS(Object.assign(Object.assign({},s.text),{style:ke({dx:0,dy:0},s.text?.style??s.style)}),t,this._markAttributeContext),m;if(e.clip||e.itemContent?.confine){let{minX:e,maxX:t,minY:r,maxY:i}=PS([n.getRegion()]);m={x:e,y:r,width:t-e,height:i-r}}if(this._markerComponent){let e=this._markerComponent.attribute??{},t=e.itemContent?.textStyle??{},n=this._spec.itemContent.text?.text,o=RS(s.offsetX,c),l=RS(s.offsetY,c);this._markerComponent.setAttributes({position:r===void 0?{x:null,y:null}:r,itemContent:Object.assign(Object.assign({},e.itemContent),{panel:p.panel??e.itemContent?.panel,padding:p.padding??e.itemContent?.padding,textStyle:Object.assign(Object.assign(Object.assign({},t),p.textStyle??{}),{text:this._spec.itemContent.text?.formatMethod?this._spec.itemContent.text.formatMethod(a,i):h(n)?n:t.text}),offsetX:zS(r,o,c),offsetY:zS(r,l,c)}),itemLine:f,limitRect:m,dx:this._layoutOffsetX,dy:this._layoutOffsetY})}}_initDataView(){let e=this._spec,{doXYProcess:t,doPolarProcess:n,doGeoProcess:r}=US(e);(h(e.coordinate)||t||n||r)&&this._initCommonDataView()}},gw.specKey=`markPoint`})))()}var vw;function yw(){return(yw=e((()=>{vw={itemLine:{decorativeLine:{visible:!1},startSymbol:{size:5,visible:!0,style:{fill:{type:`palette`,key:`markLineStrokeColor`},stroke:null,lineWidth:0}},endSymbol:{style:{fill:{type:`palette`,key:`markLineStrokeColor`},stroke:null,lineWidth:0}},line:{style:{stroke:{type:`palette`,key:`markLineStrokeColor`}}}},itemContent:{offsetY:-50}}})))()}var bw,xw;function Sw(){return(Sw=e((()=>{V(),GS(),Qi(),v(),U(),_w(),yw(),bw=class extends gw{constructor(){super(...arguments),this.type=B.markPoint,this.name=B.markPoint,this.coordinateType=`cartesian`}_computePointsAttr(){var e;let t=this._spec,n=this._markerData,r=this._relativeSeries,i=h(t.x)&&h(t.y),a=h(t.coordinate),o=h(t.position),s=(e=t?.autoRange)!=null&&e,c;return i?c=ES(n,r,r,r,s,!1,this._getAutoRangeExtendDomainKeyPrefix())?.[0]?.[0]:a?c=jS(n,r,s,t.coordinatesOffset,this._getAutoRangeExtendDomainKeyPrefix())[0]:o&&(c=NS(t.position,r,t.regionRelative)[0]),{point:c}}_computeOptions(){let e=this._spec,{doXYProcess:t}=US(e),n=h(e.coordinate),r;return t?r=[this._processSpecByDims([{dim:`x`,specValue:e.x},{dim:`y`,specValue:e.y}])]:n&&(r=this._processSpecCoo(e)),{options:r}}},bw.type=B.markPoint,bw.coordinateType=`cartesian`,bw.builtInTheme={markPoint:vw},xw=()=>{H.registerComponent(bw.type,bw),ua()}})))()}var Cw;function ww(){return(ww=e((()=>{Cw={style:{fill:`#B0C8F9`,fillOpacity:.2,stroke:`#B0C8F9`,lineWidth:2},brushMode:`single`,brushType:`rect`,brushMoved:!0,removeOnClick:!0,delayType:`throttle`,delayTime:0}})))()}var Tw,Ew,Dw;function Ow(){return(Ow=e((()=>{Y(),yu(),vu(),fg(),V(),wi(),ii(),S(),v(),Ce(),Ie(),Zc(),U(),tp(),ww(),Yx(),Md(),Tw={style:!0,inBrush:!0,outOfBrush:!0},Ew=class extends dg{constructor(){super(...arguments),this.layoutType=`none`,this.type=B.brush,this.name=B.brush,this.specKey=`brush`,this.layoutZIndex=gu.Brush,this._linkedSeries=[],this._itemMap={},this._linkedItemMap={},this._inBrushElementsMap={},this._outOfBrushElementsMap={},this._linkedInBrushElementsMap={},this._linkedOutOfBrushElementsMap={},this._cacheInteractiveRangeAttrs=[],this._releatedAxes=[],this._regionAxisMap={},this._axisDataZoomMap={},this._zoomRecord=[]}static getSpecInfo(e){return ep(e,this.specKey,this.type,(e=>!1!==e.visible))}init(){let e=this._transformBrushedMarkAttr(this._spec.inBrush),t=this._transformBrushedMarkAttr(this._spec.outOfBrush);this._option.getAllSeries().forEach((n=>{n.getActiveMarks().forEach((r=>{r&&(n.setMarkStyle(r,Object.assign({},e),`inBrush`,Z.Series),n.setMarkStyle(r,Object.assign({},t),`outOfBrush`,Z.Series))}))}))}reInit(e){super.reInit(e),this.init()}_initNeedOperatedItem(){let e=this._spec.seriesId,t=this._spec.seriesIndex;this._relativeRegions.forEach((n=>{let r=[];n.getSeries().forEach((i=>{(e&&T(e).includes(i.userId.toString())||t&&T(t).includes(i.getSpecIndex())||!t&&!e)&&r.push(...i.getMarksWithoutRoot()),this._itemMap[n.id]=r}))})),this._linkedSeries.forEach((e=>{this._linkedItemMap[e.id]=e.getMarksWithoutRoot()}))}created(){super.created(),this.initEvent(),this._bindRegions(),this._bindLinkedSeries(),this._initRegionAxisMap(),this._initAxisDataZoomMap(),this._initNeedOperatedItem()}_bindRegions(){this._relativeRegions=h(this._spec.regionId)||h(this._spec.regionIndex)?this._option.getRegionsInUserIdOrIndex(T(this._spec.regionId),T(this._spec.regionIndex)):this._option.getAllRegions()}_bindLinkedSeries(){(h(this._spec.brushLinkSeriesId)||h(this._spec.brushLinkSeriesIndex))&&(this._linkedSeries=this._option.getSeriesInUserIdOrIndex(T(this._spec.brushLinkSeriesId),T(this._spec.brushLinkSeriesIndex)))}_initRegionAxisMap(){h(this._spec.axisId)?T(this._spec.axisId).forEach((e=>{this._releatedAxes.push(this._option.getComponentByUserId(e))})):h(this._spec.axisIndex)?T(this._spec.axisIndex).forEach((e=>{this._releatedAxes.push(this._option.getComponentByIndex(`axes`,e))})):this._releatedAxes=this._option.getComponentsByKey(`axes`),this._releatedAxes.forEach((e=>{e?.getRegions().forEach((t=>{this._regionAxisMap[`region_`+t.id]?this._regionAxisMap[`region_`+t.id].push(e):this._regionAxisMap[`region_`+t.id]=[e]}))}))}_initAxisDataZoomMap(){this._option.getComponentsByKey(`dataZoom`).forEach((e=>{e.relatedAxisComponent&&(this._axisDataZoomMap[e.relatedAxisComponent.id]=e)}))}initEvent(){}_compareSpec(e,t){this._brushComponents&&this._relativeRegions.forEach(((e,t)=>{this._updateBrushComponent(e,t)}));let n=super._compareSpec(e,t);return O(t,e)||(n.change=!0,n.reRender=!0,n.reMake||n.reCompile||!this._isComponentOnlySpecChange(e,t)?n.reMake=!0:n.effects=Object.assign(Object.assign({},n.effects),{component:!0,layout:!0,render:!0})),n}_isComponentOnlySpecChange(e,t){return Object.keys(Object.assign(Object.assign({},t),e)).every((n=>O(t?.[n],e?.[n])||Tw[n]))}onLayoutEnd(){var e;super.onLayoutEnd(),!this._option.disableTriggerEvent&&((e=this._spec.visible)==null||e)&&(this._brushComponents?this._relativeRegions.forEach(((e,t)=>{this._updateBrushComponent(e,t)})):(this._brushComponents=[],this._relativeRegions.forEach(((e,t)=>{this._createBrushComponent(e,t)}))))}_updateBrushComponent(e,t){let n=this._getBrushInteractiveAttr(e),r=this._brushComponents[t];r.setAttributes(Object.assign({brushStyle:G(this._spec?.style)},n)),this._initMarkBrushState(t,``),r.children[0].removeAllChild()}_shouldEnableInteractive(){return!1!==this.getOption().getCompiler().getOption().interactive}_createBrushComponent(e,t){let n=this._getBrushInteractiveAttr(e),r=new Gi(Object.assign(Object.assign(Object.assign({zIndex:this.layoutZIndex,brushStyle:G(this._spec?.style)},n),this._spec),{disableTriggerEvent:this._option.disableTriggerEvent}));r.id=this._spec.id??`brush-${this.id}`,this.getContainer().add(r),this._brushComponents.push(r),this._cacheInteractiveRangeAttrs.push(n),r.addEventListener(Li.brushActive,(n=>{this._initMarkBrushState(t,`outOfBrush`),this._emitEvent(K.brushActive,e,n)})),r.addEventListener(Li.drawStart,(t=>{this._spec.disableDimensionHoverWhenBrushing&&this._option.globalInstance.disableDimensionHoverEvent(!0),this._setRegionMarkPickable(e,!0),this._emitEvent(K.brushStart,e,t)})),r.addEventListener(Li.moveStart,(t=>{this._spec.disableDimensionHoverWhenBrushing&&this._option.globalInstance.disableDimensionHoverEvent(!0),this._setRegionMarkPickable(e,!0),this._emitEvent(K.brushStart,e,t)})),r.addEventListener(Li.drawing,(t=>{this._setRegionMarkPickable(e,!1),this._handleBrushChange(e,t),this._emitEvent(K.brushChange,e,t)})),r.addEventListener(Li.moving,(t=>{this._setRegionMarkPickable(e,!1),this._handleBrushChange(e,t),this._emitEvent(K.brushChange,e,t)})),r.addEventListener(Li.brushClear,(n=>{this._spec.disableDimensionHoverWhenBrushing&&this._option.globalInstance.disableDimensionHoverEvent(!1),this._setRegionMarkPickable(e,!0),this._initMarkBrushState(t,``),this._emitEvent(K.brushClear,e,n)})),r.addEventListener(Li.drawEnd,(n=>{this._spec.disableDimensionHoverWhenBrushing&&this._option.globalInstance.disableDimensionHoverEvent(!1),this._setRegionMarkPickable(e,!0);let{operateMask:r}=n.detail,{updateElementsState:i=!0}=this._spec;if(i&&this._handleBrushChange(e,n),this._spec?.onBrushEnd)!0===this._spec.onBrushEnd(n)?(this.clearGraphic(),this._initMarkBrushState(t,``),this._emitEvent(K.brushClear,e,n)):(this._spec.onBrushEnd(n),this._emitEvent(K.brushEnd,e,n));else{let t=this._extendDataInBrush(this._inBrushElementsMap);(!this._spec.zoomWhenEmpty&&t.length>0||!i)&&this._setAxisAndDataZoom(r,e),this._emitEvent(K.brushEnd,e,n)}})),r.addEventListener(Li.moveEnd,(t=>{this._spec.disableDimensionHoverWhenBrushing&&this._option.globalInstance.disableDimensionHoverEvent(!1),this._setRegionMarkPickable(e,!0);let{operateMask:n}=t.detail,{updateElementsState:r=!0}=this._spec;r&&this._handleBrushChange(e,t);let i=this._extendDataInBrush(this._inBrushElementsMap);(!this._spec.zoomWhenEmpty&&i.length>0||r)&&this._setAxisAndDataZoom(n,e),this._emitEvent(K.brushEnd,e,t)}))}_getBrushInteractiveAttr(e){let t=e.getLayoutStartPoint(),n=e.getLayoutRect(),r=t.x,i=r+n.width,a=t.y,o=a+n.height;return{interactiveRange:{minY:a,maxY:o,minX:r,maxX:i},xRange:[r,i],yRange:[a,o],interactive:this._shouldEnableInteractive()}}_transformBrushedMarkAttr(e){let t={};return e!=null&&e.symbol&&(t.symbolType=e.symbol),e!=null&&e.symbolSize&&(t.size=e.symbolSize),e!=null&&e.color&&(t.fill=e.color),e!=null&&e.colorAlpha&&(t.fillOpacity=e.colorAlpha),Object.assign(Object.assign({},G(e)),t)}_handleBrushChange(e,t){let{operateMask:n}=t.detail;this._operateMask=n;let{updateElementsState:r=!0}=this._spec;r&&(this._reconfigItem(n,e),this._reconfigLinkedItem(n,e))}_extendDataInBrush(e){let t=[];for(let n in e)for(let r in e[n])t.push(Object.assign({},e[n][r].context?.data?.[0]));return t}_extendDatumOutOfBrush(e){let t=[];for(let n in e)t.push(e[n].context?.data?.[0]);return t}_emitEvent(e,t,n){this.event.emit(e,{model:this,value:{operateType:e,operateRegion:t,inBrushData:this._extendDataInBrush(this._inBrushElementsMap),outOfBrushData:this._extendDatumOutOfBrush(this._outOfBrushElementsMap),linkInBrushData:this._extendDataInBrush(this._linkedInBrushElementsMap),linkOutOfBrushData:this._extendDatumOutOfBrush(this._linkedOutOfBrushElementsMap),inBrushElementsMap:this._inBrushElementsMap,outOfBrushElementsMap:this._outOfBrushElementsMap,linkedInBrushElementsMap:this._linkedInBrushElementsMap,linkedOutOfBrushElementsMap:this._linkedOutOfBrushElementsMap,zoomRecord:this._zoomRecord},vchart:this._option?.globalInstance,event:n})}_setBrushState(e,t){let n=e.currentStates??[];kd(e,[...n.filter((e=>e!==`inBrush`&&e!==`outOfBrush`)),t])}_reconfigItem(e,t){if(!e?.globalTransMatrix||!e?.attribute?.points)return;let n=e?.attribute?.points??[],{a:r,b:i,c:a,d:o,e:s,f:c}=e.globalTransMatrix,l=n.map((e=>({x:r*e.x+a*e.y+s,y:i*e.x+o*e.y+c}))),{markTypeFilter:u=[]}=this._spec;this._itemMap[t.id].forEach((t=>{if(u.includes(t.type))return;let n=t.getGraphics();n&&n.length&&n.forEach((n=>{var r;let i=t.id+`_`+n.context.key,a=this._isBrushContainItem(e.globalAABBBounds,l,n);this._outOfBrushElementsMap?.[i]&&a?(this._setBrushState(n,`inBrush`),this._inBrushElementsMap[e?.name]||(this._inBrushElementsMap[e?.name]={}),this._inBrushElementsMap[e?.name][i]=n,delete this._outOfBrushElementsMap[i]):(r=this._inBrushElementsMap?.[e?.name])!=null&&r[i]&&!a&&(this._setBrushState(n,`outOfBrush`),this._outOfBrushElementsMap[i]=n,delete this._inBrushElementsMap[e.name][i])}))}))}_reconfigLinkedItem(e,t){if(!e?.globalTransMatrix||!e?.attribute?.points)return;let n=t.getLayoutStartPoint(),r=t.getSeries().map((e=>e.id));this._linkedSeries.forEach((t=>{if(!r.includes(t.id)){let r=t.getRegion().getLayoutStartPoint(),i=r.x-n.x,a=r.y-n.y,o=e?.attribute?.points??[],{a:s,b:c,c:l,d:u,e:d,f}=e.globalTransMatrix,p=i||0,m=a||0,h=o.map((e=>({x:s*e.x+l*e.y+d+p,y:c*e.x+u*e.y+f+m})));e.globalAABBBounds.clone().set(e.globalAABBBounds.x1+p,e.globalAABBBounds.y1+m,e.globalAABBBounds.x2+p,e.globalAABBBounds.y2+m);let{markTypeFilter:g=[]}=this._spec;this._linkedItemMap[t.id].forEach((t=>{if(g.includes(t.type))return;let n=t.getGraphics();n&&n.length&&n.forEach((n=>{var r;let{key:i}=n.context,a=t.id+`_`+n.context.key;this._linkedOutOfBrushElementsMap?.[a]&&this._isBrushContainItem(e.globalAABBBounds,h,n)?(this._setBrushState(n,`inBrush`),this._linkedInBrushElementsMap[e?.name]||(this._linkedInBrushElementsMap[e?.name]={}),this._linkedInBrushElementsMap[e?.name][a]=n,delete this._linkedOutOfBrushElementsMap[a]):(r=this._linkedInBrushElementsMap?.[e?.name])!=null&&r[a]&&!this._isBrushContainItem(e.globalAABBBounds,h,n)&&(this._setBrushState(n,`outOfBrush`),this._linkedOutOfBrushElementsMap[a]=n)}))}))}}))}_isBrushContainItem(e,t,n){let r=[];if([`symbol`,`rect`].includes(n.type)){let{x1:e,x2:i,y1:a,y2:o}=n?.globalAABBBounds;return r=[{x:e,y:a},{x:i,y:a},{x:i,y:o},{x:e,y:o}],f(t,r)}return e.intersects(n.globalAABBBounds)}_initItemMap(e,t,n){let{markTypeFilter:r=[]}=this._spec;Object.entries(e).forEach((([e,i])=>{i.forEach((e=>{if(r.includes(e.type))return;let i=e.getGraphics();i&&i.length&&i.forEach((r=>{let i=e.id+`_`+r.context.key;jd(r,[`inBrush`,`outOfBrush`]),n&&Ad(r,n,!0),t[i]=r}))}))}))}_initMarkBrushState(e,t){this._brushComponents.forEach(((t,n)=>{n!==e&&t.children[0].removeAllChild()})),this._inBrushElementsMap={},this._outOfBrushElementsMap={},this._linkedInBrushElementsMap={},this._linkedOutOfBrushElementsMap={},this._initItemMap(this._itemMap,this._outOfBrushElementsMap,t),this._initItemMap(this._linkedItemMap,this._linkedOutOfBrushElementsMap,t)}_setRegionMarkPickable(e,t){e.getGroupMark().getGraphics().forEach((e=>e.setAttribute(`childrenPickable`,t)))}_stateClamp(e){return Math.min(Math.max(0,e),1)}_setAxisAndDataZoom(e,t){var n;if(this._zoomRecord=[],this._spec.zoomAfterBrush){let r=e.AABBBounds;(n=this._regionAxisMap[`region_`+t.id])==null||n.forEach((e=>{let n=e.layoutOrient===`bottom`||e.layoutOrient===`top`,i=this._spec.axisRangeExpand??0,{x1:a,x2:o,y1:s,y2:c}=r,l=n?`x`:`y`,u=n?a:s,d=n?o:c,f=e.getScale().range(),p=e.scaleRangeFactor()??[0,1],m=w(f)<f[0],h=u-t.getLayoutStartPoint()[l],g=d-t.getLayoutStartPoint()[l],_=m?Math.min(h,g):Math.max(h,g),v=m?Math.max(h,g):Math.min(h,g),y=(v-f[0])/(w(f)-f[0])*(p[1]-p[0])+p[0],ee=(_-f[0])/(w(f)-f[0])*(p[1]-p[0])+p[0],te=this._stateClamp(y-i),b=this._stateClamp(ee+i);if(this._axisDataZoomMap[e.id]){let t=this._axisDataZoomMap[e.id],n=m?1-te:te,r=m?1-b:b;t.setStartAndEnd(Math.min(n,r),Math.max(n,r),[`percent`,`percent`]),this._zoomRecord.push({operateComponent:t,start:n,end:r,startValue:Hx(n,t.stateScale,Wx(t.relatedAxisComponent,t.isHorizontal)),endValue:Hx(r,t.stateScale,Wx(t.relatedAxisComponent,t.isHorizontal))})}else e.scaleRangeFactor([te,b]),e.effect.scaleUpdate(),this._zoomRecord.push({operateComponent:e,start:te,end:b,startValue:e.getScale().invert(v),endValue:e.getScale().invert(_)})}))}}_getNeedClearVRenderComponents(){return this._brushComponents}clearGraphic(){this._brushComponents&&this._brushComponents.forEach((e=>{e._container.incrementalClearChild()}))}clear(){if(this._brushComponents){let e=this.getContainer();this._brushComponents.forEach(((t,n)=>{this._initMarkBrushState(n,``),t.removeAllChild(),t.releaseBrushEvents(),e&&e.removeChild(t)})),this._brushComponents=null}}clearBrushStateAndMask(){this._relativeRegions.forEach(((e,t)=>{this._initMarkBrushState(t,``),this._brushComponents[t].children[0].removeAllChild()}))}},Ew.type=B.brush,Ew.builtInTheme={brush:Cw},Ew.specKey=`brush`,Dw=()=>{H.registerComponent(Ew.type,Ew)}})))()}var kw,Aw,jw;function Mw(){return(Mw=e((()=>{fg(),V(),vu(),uc(),Ce(),E(),v(),Re(),xt(),U(),tm(),kw={style:!0,state:!0},Aw=class extends dg{constructor(){super(...arguments),this.type=B.customMark,this.specKey=`customMark`,this.layoutType=`none`,this.layoutZIndex=gu.CustomMark,this.layoutLevel=_u.CustomMark}created(){super.created(),this.initMarks(),this.initEvent()}getMarkAttributeContext(){return this._markAttributeContext}_buildMarkAttributeContext(){this._markAttributeContext={vchart:this._option.globalInstance,globalScale:(e,t)=>this._option.globalScale.getScale(e)?.scale(t)}}initMarks(){if(!this._spec)return;let e=null;if(this._spec.parent){let t=this.getChart().getAllMarks().find((e=>e.getUserId()===this._spec.parent));t.type===`group`&&(e=t)}this._createExtensionMark(this._spec,e,`${W}_series_${this.id}_extensionMark`,0)}_createExtensionMark(e,t,n,r=0){var i;let a=this._createMark({type:e.type,name:h(e.name)?`${e.name}`:`${n}_${r}`},{skipBeforeLayouted:!0,attributeContext:this._getMarkAttributeContext(),componentType:e.componentType,key:e.dataKey});if(a){if(h(e.id)&&a.setUserId(e.id),this._option.globalInstance?.isAnimationEnable()&&e.animation){let t=Wp({},Gp(e.type,e,this._markAttributeContext));a.setAnimationConfig(t)}if(N(t)?this._marks.addMark(a):t&&t.addMark(a),this.initMarkStyleWithSpec(a,e),e.type===`group`&&(n=`${n}_${r}`,(i=e.children)==null||i.forEach(((e,t)=>{this._createExtensionMark(e,a,n,t)}))),h(e.dataId)||P(e.dataIndex)){let t=this.getChart().getSeriesData(e.dataId,e.dataIndex);t&&(a.setDataView(t),t.target.addListener(`change`,(()=>{a.getData().updateData()})))}}}initEvent(){}_compareSpec(e,t){let n=super._compareSpec(e,t);return O(t,e)||(n.reMake||n.reCompile||!this._isComponentOnlySpecChange(e,t)?n.reMake=!0:n.effects=Object.assign(Object.assign({},n.effects),{component:!0,render:!0})),n.change=!0,n.reRender=!0,n}_isComponentOnlySpecChange(e,t){return Object.keys(Object.assign(Object.assign({},t),e)).every((n=>O(t?.[n],e?.[n])||kw[n]))}reInit(e){super.reInit(e),this._updateMarkStyleWithSpec(this._spec,this.getMarks()[0]),this.getMarks().forEach((e=>{e.commit(!1,!0)}))}_updateMarkStyleWithSpec(e,t){var n,r;if(e&&t&&(this.initMarkStyleWithSpec(t,e),e.type===`group`)){let i=(n=t).getMarks?.call(n)??[];(r=e.children)==null||r.forEach(((e,t)=>{this._updateMarkStyleWithSpec(e,i[t])}))}}_getMarkAttributeContext(){return{vchart:this._option.globalInstance,chart:this.getChart(),globalScale:(e,t)=>this._option.globalScale.getScale(e)?.scale(t),getLayoutBounds:()=>{let{x:e,y:t}=this.getLayoutStartPoint(),{width:n,height:r}=this.getLayoutRect();return new ze().set(e,t,e+n,t+r)}}}_getLayoutRect(){let e=new ze;return this.getMarks().forEach((t=>{let n=t.getProduct();n&&e.union(n.AABBBounds)})),e.empty()?{width:0,height:0}:{width:e.width(),height:e.height()}}getBoundsInRect(e){this.setLayoutRect(e);let t=this._getLayoutRect(),{x:n,y:r}=this.getLayoutStartPoint();return{x1:n,y1:r,x2:n+t.width,y2:r+t.height}}getVRenderComponents(){let e=[],t=n=>{if(n&&n.type===`group`)n.getMarks().forEach((e=>{t(e)}));else if(n.type===`component`){let t=n?.getComponent();t&&e.push(t)}};return this.getMarks().forEach((e=>{t(e)})),e}},Aw.type=B.customMark,Aw.specKey=`customMark`,jw=()=>{H.registerComponent(Aw.type,Aw)}})))()}var Nw,Pw,Fw,Iw,Lw,Rw;function zw(){return(zw=e((()=>{Nw=`vchart-tooltip`,Pw=`${Nw}-container`,Fw=`${Nw}-title`,Iw=`${Nw}-content-box`,Lw={offsetX:10,offsetY:10},Rw=`99999999999999`})))()}function Bw(e){return String(e).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/\(/g,`&#40;`).replace(/ /g,` &nbsp;`)}var Vw,Hw;function Uw(){return(Uw=e((()=>{Ct(),Ge(),zw(),Vw=(e,t)=>e?(t||=e.getBoundingClientRect(),e.offsetWidth>0?t.width/e.offsetWidth:e.offsetHeight>0?t.height/e.offsetHeight:1):1,Hw=e=>I(e)&&e?.trim()!==``||ft(e)?Bw(e):``})))()}var Ww,Gw,Kw,qw,Jw;function Yw(){return(Yw=e((()=>{o(),Ge(),Tt(),v(),Ww=(e,t)=>{let n;if(h(e)){if(ft(e))n=e;else if(M(e)){let r=e(t);ft(r)&&(n=r)}}return n},Gw={left:[-2,0],right:[2,0],top:[0,-2],bottom:[0,2],insideTop:[0,-1.5],insideBottom:[0,1.5],insideLeft:[-1.5,0],insideRight:[1.5,0],insideTopLeft:[-1.5,-1.5],insideTopRight:[1.5,-1.5],insideBottomLeft:[-1.5,1.5],insideBottomRight:[1.5,1.5],lt:[-2,-2],tl:[-2,-2],rt:[2,-2],tr:[2,-2],bl:[-2,2],lb:[-2,2],br:[2,2],rb:[2,2],inside:[0,0],center:[0,0],centerBottom:[0,1],centerTop:[0,-1],centerLeft:[-1,0],centerRight:[1,0]},Kw=(e,t,n=2)=>Gw[e]?.[t===`x`?0:1]??n,qw=e=>D(e)&&(h(e.left)||h(e.right)||h(e.top)||h(e.bottom)),Jw=e=>D(e)&&(h(e.x)||h(e.y))})))()}var Xw;function Zw(){return(Zw=e((()=>{uc(),zw(),qa(),Uw(),Yw(),Ge(),Tt(),Re(),v(),o(),Th(),sp(),Xw=class extends wh{constructor(){super(...arguments),this._visible=!0,this._isReleased=!1,this.showTooltip=(e,t,n)=>{let{changePositionOnly:r}=n;return r?this.changeTooltipPosition(n,t):this.changeTooltip(!0,n,t)},this.changeTooltip=(e,t,n)=>this._isReleased?1:e?this.changeTooltipPosition(t,n):(this._updateTooltip(!1,t),0),this.changeTooltipPosition=(e,t)=>{var n;if(this._isReleased)return 1;let r=e.event,{tooltipSpec:i,activeTooltipSpec:a,changePositionOnly:o}=e;if(!a)return 1;let s=a.activeType;if(a.handler)return(n=a.handler).showTooltip?.call(n,s,t,e)??0;let c=a;a.position=this._getActualTooltipPosition(a,e,this._getTooltipBoxSize(a,o));let l=a.updatePosition??i[s]?.updatePosition;l&&(a.position=l(a.position,t,e));let u=!1!==c?.visible;return t&&r.type!==`pointerout`&&a.visible&&(a.title||a.content)||(u=!1),this._updateTooltip(u,Object.assign(Object.assign({},e),{changePositionOnly:o})),0},this._getActualTooltipPosition=(e,t,n)=>{let r=this._chartOption.getRectByDimensionData,{tooltipSpec:i}=t,a={x:1/0,y:1/0};if(!i)return a;let o=t.event,{activeType:s,data:c}=e,l=s===`dimension`?c[0]?.data?.[0]:c?.[0],{offsetX:u,offsetY:d}=this._option,f=i[s],p=op(f?.position,c,t),m=op(f?.positionMode,c,t)??(s===`mark`?`mark`:`pointer`),{width:g=0,height:_=0}=n??{},v=i.renderMode===`canvas`,y=(t?.chart)?.getCanvasRect(),ee=y?.width??500,te=y?.height??500,b=!1,x={width:0,height:0},ne,S={x:0,y:0},C={x:0,y:0},re=1,ie=1,ae=Ha(this._env);if(ae&&!i.confine?(x.width=window.innerWidth,x.height=window.innerHeight):(x.width=ee,x.height=te),ae&&!v){let e=this._getParentElement(i);C=(e?.getBoundingClientRect)?.call(e)??a;let t=this._compiler.getCanvas()??this._chartContainer;ne=t?.getBoundingClientRect(),S={x:ne.x-C.x,y:ne.y-C.y},re=Vw(t,ne),ie=Vw(e,C)}let w=ie/re,oe={},se={x:p,y:p},ce={x:[`left`,`right`],y:[`top`,`bottom`]},le=({orient:e,mode:n,offset:i},a)=>{let o,s,c=t.model?.getLayoutStartPoint(),f=i??(a===`x`?u:d);if(n===`mark`){b=!0;let e=t.item?.AABBBounds;e&&c&&(o=(a===`x`?e.x1:e.y1)+c[a],s=(a===`x`?e.x2:e.y2)+c[a])}else if(r&&n===`crosshair`&&l?.series?.coordinate===`cartesian`&&l.datum&&l.datum.length){b=!0;let e=r(l,c);e&&(o=e.start[a],s=e.end[a])}else se[a]=e;if(b){let t=ce[a][0],n=a===`x`?g:_;switch(Kw(e,a)){case-2:oe[t]=o-n*w-f;break;case-1.5:oe[t]=o+f;break;case 0:oe[t]=(o+s)/2-n*w/2;break;case-1:oe[t]=(o+s)/2-n*w-f;break;case 1:oe[t]=(o+s)/2+f;break;case 1.5:oe[t]=s-n*w-f;break;case 2:oe[t]=s+f}}},ue=[`x`,`y`];if(D(p)){if(qw(p)){let{left:e,right:t,top:n,bottom:r}=p;oe.left=Ww(e,o),oe.top=Ww(n,o),oe.right=Ww(t,o),oe.bottom=Ww(r,o)}else Jw(p)&&ue.forEach((e=>{let t=p[e];ft(t)||M(t)?oe[ce[e][0]]=Ww(t,o):le(t,e)}))}else h(p)&&(le({orient:p,mode:m},`x`),le({orient:p,mode:m},`y`));let T={x:null,y:null};return ue.forEach((e=>{let t=e===`x`?g:_,n=e===`x`?ee:te,r=e===`x`?u:d,a=Kw(se[e],e);if(P(oe[ce[e][0]]))T[e]=oe[ce[e][0]];else if(P(oe[ce[e][1]]))T[e]=n-t*w-oe[ce[e][1]];else{let n=e===`x`?o.canvasX:o.canvasY;T[e]=a>0?n+r:a===0?n-t*w/2:n-t*w-r}T[e]*=re,ae&&(T[e]+=S[e]),T[e]/=ie;let s=e===`x`?x.width:x.height,c=i.confine?-(C[e]-(ne?.[e]??0)/re)/ie:-C[e]/ie,l=s/ie+c-t;a!==2&&T[e]<c?b?T[e]=c:(T[e]+=a===0?r+t/2:2*r+t,T[e]>l&&(T[e]=l)):a!==-2&&T[e]>l&&(b?T[e]=l:(T[e]-=a===0?r+t/2:2*r+t,T[e]<c&&(T[e]=c)))})),T}}get env(){return this._env}onAdd(e){super.onAdd(e);let t=e.component;this._component=t,this._chartOption=t.getOption(),this._env=this._chartOption.mode,this._chartContainer=this._chartOption.globalInstance.getContainer(),this._compiler=t.getCompiler(),this._initFromSpec()}hideTooltip(e){return this.changeTooltip(!1,e)}release(){var e,t;let n=this._component?.getSpec()??{};n.handler?(t=(e=n.handler).release)==null||t.call(e):(this._removeTooltip(),this._isReleased=!0,this._chartOption=null,this._component=null)}_getDefaultOption(){let{offset:e}=this._component.getSpec();return e?{offsetX:e.x??Lw.offsetX,offsetY:e.y??Lw.offsetY}:Lw}_getParentElement(e){return e.parentElement}getTooltipContainer(){return this._container}_initFromSpec(){this._option=this._getDefaultOption()}reInit(){this._initFromSpec()}},Xw.specKey=`tooltip`})))()}function Qw(e,t){e&&e.style&&t&&Object.keys(t).forEach((n=>{e.style[n]=t[n]}))}var $w,eT,tT,nT,rT;function iT(){return(iT=e((()=>{j(),E(),v(),Re(),ie(),cs(),$w=(e,t)=>h(e)?A(e)?e.map((e=>`${e}px`)).join(` `):`${e}px`:t??`initial`,eT=(e={},t={})=>{h(e.fontFamily)&&(t.fontFamily=e.fontFamily);let n=e.fill??e.fontColor;return h(n)&&(t.color=n),h(e.fontWeight)&&(t.fontWeight=e.fontWeight),h(e.textAlign)&&(t.textAlign=e.textAlign),h(e.fontSize)&&(t.fontSize=$w(e.fontSize)),h(e.maxWidth)&&(t.maxWidth=$w(e.maxWidth)),e.multiLine||h(e.maxWidth)&&!1!==e.multiLine?(t.whiteSpace=`initial`,t.wordBreak=e.wordBreak??`break-word`):(t.wordBreak=`normal`,t.whiteSpace=`nowrap`),t},tT=(e={})=>{let{lineHeight:t}=e;return e.fontSize?ns(t,e.fontSize):0},nT=(e={})=>{let{style:t={},enterable:n,transitionDuration:r}=e,{panel:i={},titleLabel:a,shape:o,keyLabel:s,valueLabel:c,spaceRow:l,align:u}=t,{panelStyle:d,panelPadding:f}=rT(i),p={marginTop:`0px`,marginBottom:`0px`};d.pointerEvents=n?`auto`:`none`,r&&(d.transitionDuration=r?`${r}ms`:`initial`,d.transitionProperty=r?`transform`:`initial`,d.transitionTimingFunction=r?`ease-out`:`initial`),P(l)&&(p.marginBottom=`${l}px`);let m={width:$w(o?.size??8)},h=eT(a),g=eT(s),_=eT(c),v=u===`right`?`marginLeft`:`marginRight`;u===`right`&&(d.direction=`rtl`),N(h.textAlign)&&(h.textAlign=u===`right`?`right`:`left`),N(g.textAlign)&&(g.textAlign=u===`right`?`right`:`left`),N(_.textAlign)&&(_.textAlign=u===`right`?`left`:`right`),m[v]=$w(o.spacing??8),g[v]=$w(s.spacing??26),_[v]=$w(c.spacing??0);let y=Math.max(tT(c),tT(s));return p.lineHeight=y>0?`${y}px`:`20px`,{panelPadding:f,row:p,panel:d,title:h,shape:m,key:g,value:_}},rT=e=>{let{backgroundColor:t,border:n,shadow:r,padding:i}=e,a={borderWidth:`${n?.width??0}px`},o=null;n!=null&&n.color&&(a.borderColor=n.color),t&&(a.backgroundColor=t),a.boxShadow=r?`${r.x}px ${r.y}px ${r.blur}px ${r.spread}px ${r.color}`:`initial`;let{radius:s}=n??{};return h(s)&&(a.borderRadius=P(s)?`${s}px`:`${s}`),h(i)&&(o=pt(i),a.padding=$w(o)),{panelStyle:a,panelPadding:o}}})))()}var aT;function oT(){return(oT=e((()=>{U(),aT=e=>{H.registerComponentPlugin(e.type,e)}})))()}function sT(e,t){if(!e||!e.hasShape||!e.shapeType)return``;let n=`style="display:inline-block;vertical-align:middle;"`,{shapeType:r,shapeStroke:i,shapeHollow:a=!1,shapeFill:o}=e,s=e.shapeSize??8,c=e.shapeLineWidth?Bw(e.shapeLineWidth)+`px`:`0px`,l=`currentColor`,u=()=>i?Bw(i):l,d=s,f=e=>new Si({symbolType:e,size:d,fill:!0}),p=f(r),m=p.getParsedPath(),h,g;if(!m.path&&m.pathStr&&(p=f(m.pathStr)),p.getParsedPath().path){let e=p.getParsedPath().path;g=e.toString(),h=e.bounds}else m.isSvg&&m.svgCache&&(g=m.svgCache.map((e=>e.path.toString())).join(),h=m.svgCache.reduce(((e,t)=>e.union(t.path.bounds)),new ze));let _=`${h.x1} ${h.y1} ${h.width()} ${h.height()}`;if(c!==`0px`){let[e,t,n,r]=_.split(` `).map((e=>Number(e))),i=Number(c.slice(0,-2));_=`${e-i/2} ${t-i/2} ${n+i} ${r+i}`}let v=Tn.IsGradientStr(o);if(!o||I(o)&&!v||a)return l=a?`none`:o?Bw(o):`currentColor`,`\n <svg ${n} width="${s}" height="${s}" viewBox="${_}">\n <path\n d="${g}"\n style="fill: ${l}; stroke: ${u()}; stroke-width: ${c}"\n >\n </path>\n </svg>`;let y=v?Tn.Parse(o):D(o)?o:null;if(y){l=`gradientColor`+(t??``);let e=``,r=(y.stops??[]).map((e=>`<stop offset="${Bw(e.offset.toString())}" stop-color="${Bw(e.color)}"/>`)).join(``);return y.gradient===`radial`?e=`<radialGradient id="${l}" cx="50%" cy="50%" r="50%" fx="0%" fy="0%">\n ${r}\n </radialGradient>`:y.gradient===`linear`&&(e=`<linearGradient id="${l}" x1="${100*(y.x0??0)}%" y1="${100*(y.y0??0)}%" x2="${100*(y.x1??0)}%" y2="${100*(y.y1??0)}%">\n ${r}\n </linearGradient>`),`\n <svg ${n} width="${s}" height="${s}" viewBox="-0.5 -0.5 1 1">\n ${e}\n <path\n d="${g}"\n style="fill: url(#${l}); stroke: ${u()}; stroke-width: ${c}"\n >\n </path>\n </svg>`}return``}function cT(){return(cT=e((()=>{Uw(),Qr(),qn(),Tt(),Ct(),xt()})))()}var lT,uT,dT;function fT(){return(fT=e((()=>{Zw(),iT(),zw(),v(),qa(),oT(),Cv(),cT(),Uw(),ys(),cs(),lT=e=>!!e&&e.nodeType===1&&typeof e.appendChild==`function`&&!!e.children,uT=class e extends Xw{getVisibility(){return!!this._rootDom&&this._rootDom.style.visibility===`visible`}setVisibility(e){e!==this.getVisibility()&&this._rootDom&&(this._rootDom.style.visibility=e?`visible`:`hidden`)}getRootDom(){return this._rootDom}constructor(){super(e.type),this.type=yv.dom,this._tooltipContainer=Ka?.body}onAdd(e){super.onAdd(e),this._initStyle(),this.initEl()}_getTooltipParentElement(e){return lT(e.parentElement)?e.parentElement:lT(this._chartContainer)?this._chartContainer:lT(Ka?.body)?Ka.body:void 0}initEl(){let e=this._component.getSpec(),t=this._getTooltipParentElement(e);if(Ka&&t){for(let e=0;e<t.children.length;e++)if(t.children[e].classList.contains(Pw)){this._container=t.children[e];break}this._container||(this._container=Ka.createElement(`div`),this._container.style.position=`relative`,this._container.style.zIndex=`99999999999999`,this._container.classList.add(Pw),t.appendChild(this._container))}}initRootDom(){if(this._container||this.initEl(),!this._container)return;let e=this._component.getSpec(),t=Ka.createElement(`div`),n=this._chartOption?.getTheme(`fontFamily`);Qw(t,Object.assign({left:`0`,top:`0`,pointerEvents:`none`,padding:`12px`,position:`absolute`,zIndex:Rw,fontFamily:n??vs.fontFamily,fontSize:`11px`,borderRadius:`3px`,borderStyle:`solid`,lineHeight:`initial`,background:`#fff`,boxShadow:`2px 2px 4px rgba(0, 0, 0, 0.1)`,maxWidth:`100wh`,maxHeight:`100vh`,visibility:`hidden`},this._domStyle.panel)),t.classList.add(e.className),t.setAttribute(`vchart-tooltip-id`,`${this.id}`),this._container.appendChild(t),this._rootDom=t}_getTooltipBoxSize(e,t){this._rootDom||this.initRootDom(),t||this._updateDomStringByCol(e),this._updateDomStyle(`height`,t);let n=this._rootDom?.getBoundingClientRect();return{width:n?.width,height:n?.height}}_removeTooltip(){this._rootDom&&this._rootDom.parentNode&&(this._rootDom.parentNode.removeChild(this._rootDom),this._rootDom=null),this._container=null}_updateTooltip(e,t){if(e&&this._rootDom){let{tooltipSpec:n,activeTooltipSpec:r}=t;t.changePositionOnly||(this._tooltipActual=r);let i=this._rootDom;if(i){let{x:a=0,y:o=0}=r.position??{},s={x:a,y:o},c=this.getVisibility();n.updateElement&&(this._updatePosition(this._cacheCustomTooltipPosition??{x:a,y:o}),n.updateElement(i,r,t),s=this._getActualTooltipPosition(r,t,{width:i.offsetWidth,height:i.offsetHeight}),this._cacheCustomTooltipPosition=s),!c&&e&&(this._rootDom.style.transition=`none`,this._updatePosition(s,!1),this._rootDom.getBoundingClientRect()),this._updatePosition(s)}this.setVisibility(e)}else this.setVisibility(e),this._cacheCustomTooltipPosition=void 0}_initStyle(){let e=this._component.getSpec();this._domStyle=nT(e)}_updateDomStringByCol(e){let{title:t={},content:n}=e,r=n&&n.length,i=this._domStyle.row,a=[...this._rootDom.children],o=a.find((e=>e.className.includes(Fw))),s=a.find((e=>e.className.includes(Iw)));if(!o&&!1!==t.visible){o=document.createElement(`h2`);let e=document.createElement(`span`);o.appendChild(e),o.classList.add(Fw),this._rootDom.firstChild?this._rootDom.insertBefore(o,this._rootDom.firstChild):this._rootDom.appendChild(o)}o&&!1!==t.visible?(Qw(o,Object.assign(Object.assign(Object.assign({},this._domStyle.title),r?i:{marginBottom:`0px`}),{marginTop:`0px`})),o.firstChild.textContent=`${t.value??``}`):o&&!1===t.visible&&o.parentNode.removeChild(o);let c=[`shape`,`key`,`value`];if(!s&&r&&(s=document.createElement(`div`),c.forEach((e=>{let t=document.createElement(`div`);t.classList.add(`vchart-tooltip-column`),t.classList.add(`vchart-tooltip-${e}-column`),t.setAttribute(`data-col`,e),s.appendChild(t)})),s.classList.add(Iw),this._rootDom.appendChild(s)),s&&r){let e=[...s.children];Qw(s,{whiteSpace:`nowrap`}),e.forEach(((e,t)=>{let r=e.getAttribute(`data-col`);if(r&&c.includes(r)){let t=r===`shape`&&n.every((e=>!e.hasShape||!e.shapeType));Qw(e,Object.assign(Object.assign({},this._domStyle[r]),{display:t?`none`:`inline-block`,verticalAlign:`top`}));let a=[...e.children];a.slice(n.length).forEach((e=>{e.parentNode.removeChild(e)})),n.forEach(((t,o)=>{let s=a[o];s||(s=document.createElement(`div`),s.classList.add(`vchart-tooltip-${r}`),e.appendChild(s));let c=Object.assign({},i);o===n.length-1&&(c.marginBottom=`0px`),c.display=!1===t.visible?`none`:`block`,c.height=`initial`,r===`key`?(s.innerHTML=Hw(t.key),t.keyStyle&&eT(t.keyStyle,c)):r===`value`?(s.innerHTML=Hw(t.value),t.valueStyle&&eT(t.valueStyle,c)):r===`shape`&&(s.innerHTML=sT(t,`${this.id}_${o}`)),Qw(s,c)}))}}))}else s&&!r&&s.parentNode.removeChild(s)}_updateDomStyle(e=`width`,t){let n=this._rootDom,r=[...n.children].find((e=>e.className.includes(Iw))),i=[...n.children].find((e=>e.className.includes(Fw)));if(r){let n=this._component.getSpec(),a={},o=n.style?.titleLabel;if(o&&o.autoWidth&&!1!==o.multiLine&&i){let t=[...r.children].reduce(((t,n)=>e===`height`?t+n.getBoundingClientRect().width:Math.max(t,n.getBoundingClientRect().width)),0);t>0&&(i.style.maxWidth=`${t}px`,i.style.maxWidth=`${Math.ceil(r.getBoundingClientRect().width)}px`)}if(h(n?.style?.maxContentHeight)){let e=i&&i.className.includes(Fw)?i.getBoundingClientRect().height+(n.style.spaceRow??0):0,t=this._chartOption.getChartViewRect(),o=ns(n.style.maxContentHeight,Math.min(t.height,document.body.clientHeight)-e-(this._domStyle.panelPadding?this._domStyle.panelPadding[0]+this._domStyle.panelPadding[1]:0));o>0&&(a.maxHeight=`${o}px`,a.overflowY=`auto`,a.width=`calc(100% + ${this._domStyle.panelPadding?this._domStyle.panelPadding[1]+`px`:`10px`})`,Qw(r,a))}let s=r.children,c=[];if(s){for(let n=0;n<s.length;n++){let r=s[n].children??[];for(let n=0;n<r.length;n++){t&&(r[n].style[e]=`initial`);let i=r[n].getBoundingClientRect()[e];(c[n]===void 0||c[n]<i)&&(c[n]=i)}}for(let t=0;t<s.length;t++){let n=s[t].children??[];for(let t=0;t<n.length;t++)n[t].style[e]=`${c[t]}px`}}}}_getParentElement(e){return this._container??this._getTooltipParentElement(e)}isTooltipShown(){return this.getVisibility()}reInit(){super.reInit(),this._initStyle(),this._rootDom&&Qw(this._rootDom,this._domStyle.panel),this.getVisibility()&&(this._updateDomStringByCol(this._tooltipActual),this._updateDomStyle(`height`,!1))}_updatePosition({x:e,y:t},n=!0){this._rootDom&&(this._rootDom.style.transform=`translate3d(${e}px, ${t}px, 0)`,n&&this._rootDom.style.transition!==``&&(this._rootDom.style.transition=``,Object.assign(this._rootDom.style,this._domStyle.panel)))}},uT.type=yv.dom,dT=()=>{aT(uT)}})))()}var pT,mT;function hT(){return(hT=e((()=>{U(),Id(),Pa(),pT=class e extends Fd{constructor(){super(...arguments),this.type=e.type}_getDefaultStyle(){return Object.assign(Object.assign({},super._getDefaultStyle()),{width:void 0,height:void 0,lineWidth:0})}},pT.type=`image`,mT=()=>{H.registerMark(pT.type,pT),Wt(),wn(),H.registerGraphicComponent(`image`,Yt)}})))()}var gT;function _T(){return(_T=e((()=>{sh(),uh(),zd(),Fy(),cb(),Rv(),ty(),Sy(),fb(),vg(),bb(),ab(),Id(),_b(),hT(),va(),ya(),mb(),gT=()=>{Rd(),oh(),lh(),Py(),sb(),Lv(),ey(),xy(),db(),gb(),mT(),yb(),_g()}})))()}function vT(e,t=`ChartContainer`,n){let r=ba.forwardRef(((t,r)=>{let i=wa(null),[a,o]=Ta(!1),{className:s,style:c,width:l,height:u,id:d}=t,f=yT(t,[`className`,`style`,`width`,`height`,`id`]);return Ca((()=>{o(!0)}),[]),ba.createElement(`div`,{ref:i,id:d?.toString(),className:s,style:Object.assign({position:`relative`,height:u||`100%`,width:l||`100%`},c)},a?ba.createElement(e,Object.assign({ref:r,container:i.current},n?n(f):f)):ba.createElement(ba.Fragment,null))}));return r.displayName=t||e.name,r}var yT;function bT(){return(bT=e((()=>{yT=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`){var i=0;for(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}})))()}var xT;function ST(){return(ST=e((()=>{xT=ba.createContext(null),xT.displayName=`ChartContext`})))()}var CT,wT;function TT(){return(TT=e((()=>{E(),CT=_a(),wT=e=>{let t=[];return ba.Children.forEach(e,(e=>{N(e)||((0,CT.isFragment)(e)?t=t.concat(wT(e.props.children)):t.push(e))})),t}})))()}var ET;function DT(){return(DT=e((()=>{ET=[`children`,`hooks`,`ref`]})))()}var OT,kT,AT,jT,MT,NT,PT,FT,IT,LT,RT,zT,BT;function VT(){return(VT=e((()=>{OT={onPointerDown:`pointerdown`,onPointerUp:`pointerup`,onPointerUpOutside:`pointerupoutside`,onPointerTap:`pointertap`,onPointerOver:`pointerover`,onPointerMove:`pointermove`,onPointerEnter:`pointerenter`,onPointerLeave:`pointerleave`,onPointerOut:`pointerout`,onMouseDown:`mousedown`,onMouseUp:`mouseup`,onMouseUpOutside:`mouseupoutside`,onMouseMove:`mousemove`,onMouseOver:`mouseover`,onMouseOut:`mouseout`,onMouseEnter:`mouseenter`,onMouseLeave:`mouseleave`,onPinch:`pinch`,onPinchStart:`pinchstart`,onPinchEnd:`pinchend`,onPan:`pan`,onPanStart:`panstart`,onPanEnd:`panend`,onDrag:`drag`,onDragStart:`dragstart`,onDragEnter:`dragenter`,onDragLeave:`dragleave`,onDragOver:`dragover`,onDragEnd:`dragend`,onRightDown:`rightdown`,onRightUp:`rightup`,onRightUpOutside:`rightupoutside`,onTouchStart:`touchstart`,onTouchEnd:`touchend`,onTouchEndOutside:`touchendoutside`,onTouchMove:`touchmove`,onTouchCancel:`touchcancel`,onPress:`press`,onPressUp:`pressup`,onPressEnd:`pressend`,onSwipe:`swipe`,onDrop:`drop`,onWeel:`wheel`,onClick:`click`,onDblClick:`dblclick`},kT={onLegendItemHover:`legendItemHover`,onLegendItemUnHover:`legendItemUnHover`,onLegendItemClick:`legendItemClick`,onLegendFilter:`legendFilter`,onLegendSelectedDataChange:`legendSelectedDataChange`},AT={onBrushStart:`brushStart`,onBrushChange:`brushChange`,onBrushEnd:`brushEnd`,onBrushClear:`brushClear`},jT={onDataZoomChange:`dataZoomChange`},MT={onPlayerPlay:`playerPlay`,onPlayerPause:`playerPause`,onPlayerEnd:`playerEnd`,onPlayerChange:`playerChange`,onPlayerForward:`playerForward`,onPlayerBackward:`playerBackward`},NT={onScrollBarChange:`scrollBarChange`},PT={onDimensionHover:`dimensionHover`,onDimensionClick:`dimensionClick`},FT={onDrill:`drill`},IT={onInitialized:`initialized`,onRendered:`rendered`,onRenderFinished:`renderFinished`,onAnimationFinished:`animationFinished`,onLayoutStart:`layoutStart`,onLayoutEnd:`layoutEnd`},LT=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},kT),AT),MT),jT),NT),PT),IT),FT),OT),RT=Object.keys(LT).concat(Object.keys(OT).map((e=>`${e}Filter`))),Object.keys(OT),Object.keys(OT).reduce(((e,t)=>(e[OT[t]]=t,e)),{}),zT=(e,t=OT)=>{let n={};return Object.keys(e).forEach((r=>{t[r]&&e[r]&&(n[r]=e[r])})),n},BT=(e,t,n,r=OT)=>{if(!t&&!n||!e)return!1;let i=n?zT(n,r):null,a=t?zT(t,r):null;return i&&Object.keys(i).forEach((t=>{(!a||!a[t]||a[t]!==i[t])&&e.off(r[t],i[t])})),a&&Object.keys(a).forEach((n=>{if(!i||!i[n]||i[n]!==a[n]){let i=t[`${n}Filter`];i?e.on(r[n],i,a[n]):e.on(r[n],a[n])}})),!0}})))()}var HT;function UT(){return(UT=e((()=>{uc(),HT=`${W}_REACT_TOOLTIP`})))()}var WT;function GT(){return(GT=e((()=>{UT(),WT=(e,t,n)=>{let r=Object.assign({},n??{}),i;if(n?.tooltipRender?(i=n.tooltipRender,delete r.tooltipRender):t.tooltipRender&&(i=t.tooltipRender),i){let a;if(n?.reserveDefaultTooltip?(a=n.reserveDefaultTooltip,delete r.reserveDefaultTooltip):a=t.reserveDefaultTooltip,!a){let e=Object.assign({},r.style?.panel??{});e.padding=0,e.border=Object.assign(Object.assign({},e.border),{radius:0}),e.backgroundColor=`unset`,r.style=Object.assign(Object.assign({},r.style??{}),{panel:e})}return Object.assign(Object.assign({},r),{updateElement:(t,n,r)=>{let{changePositionOnly:o}=r;if(!o){if(!a){t.style.width=`auto`,t.style.height=`auto`,t.style.minHeight=`auto`;for(let e=0;e<t.children.length;e++){let n=t.children[e];n.className!==HT&&n.style.display!==`none`&&(n.style.display=`none`)}}e(ka(ba.createElement(`div`,{className:HT},i(t,n,r)),t))}}})}return n}})))()}var KT,qT,JT,YT,XT,ZT;function QT(){return(QT=e((()=>{bT(),ST(),Ce(),E(),v(),b(),TT(),DT(),VT(),GT(),KT=[...ET,...RT,`vchartConstructor`,`vchartConstrouctor`,`useSyncRender`,`skipFunctionDiff`,`onError`,`onReady`,`spec`,`container`,`options`,`morphConfig`],qT={morph:!1,enableExitAnimation:!1},JT=(e,t)=>`${e&&e.type&&(e.type.displayName||e.type.name)}-${t}`,YT=e=>{let t={};return wT(e.children).map(((e,n)=>{let r=e&&e.type&&e.type.parseSpec;if(r&&e.props){let i=r(N(e.props.componentId)?Object.assign(Object.assign({},e.props),{componentId:JT(e,n)}):e.props);i.isSingle?t[i.specName]=i.spec:(t[i.specName]||(t[i.specName]=[]),t[i.specName].push(i.spec))}})),t},XT=ba.forwardRef(((e,t)=>{let[n,r]=Ta(0),i=wa({});Sa(t,(()=>i.current?.chart));let a=!!e.spec,o=wa(!1),s=wa(ae(e,KT)),c=wa(null),l=ba.useRef(null),u=!!e.skipFunctionDiff,[d,f]=Ta(null),p=e=>{let t;a&&e.spec?(t=e.spec,h(e.data)&&(t=Object.assign(Object.assign({},e.spec),{data:e.data}))):t=Object.assign(Object.assign({},s.current),c.current);let n=WT(f,e,t.tooltip);return n&&(t.tooltip=n),t},m=t=>{if(!o.current){if(!i.current||!i.current.chart)return;t&&BT(i.current.chart,e,l.current,LT),r(n+1),e.onReady&&e.onReady(i.current.chart,n===0)}};return xa((()=>{let t=a?null:YT(e);if(!i.current?.chart)return a||(c.current=t),(e=>{let t=new(e.vchartConstructor??e.vchartConstrouctor)(p(e),Object.assign(Object.assign({},e.options),{onError:e.onError,autoFit:!0,dom:e.container}));i.current=Object.assign(Object.assign({},i.current),{chart:t}),o.current=!1})(e),i.current.chart&&(BT(i.current.chart,e,l.current,LT),i.current.chart.renderSync({reuse:!1}),m()),void(l.current=e);if(a)return void(O(l.current.spec,e.spec,{skipFunction:u})?l.current.data!==e.data&&(i.current.chart.updateFullDataSync(e.data),m(!0),l.current=e):(i.current.chart.updateSpecSync(p(e),void 0,e.morphConfig??qT),m(!0),l.current=e));let n=ae(e,KT);O(n,s.current,{skipFunction:u})&&O(t,c.current,{skipFunction:u})||(s.current=n,c.current=t,i.current.chart.updateSpecSync(p(e),void 0,e.morphConfig??qT),m(!0),l.current=e)}),[e]),xa((()=>()=>{i&&i.current&&i.current.chart&&(i.current.chart.release(),i.current.chart=null),l.current=null,o.current=!0}),[]),ba.createElement(xT.Provider,{value:i.current},wT(e.children).map(((e,t)=>{if(typeof e==`string`)return null;let r=JT(e,t);return ba.createElement(ba.Fragment,{key:r},ba.cloneElement(e,{updateId:n,componentId:r}))})),d)})),ZT=(e,t,n)=>{n&&n.length&&t.vchartConstructor&&t.vchartConstructor.useRegisters(n);let r=vT(XT,e,(e=>t?Object.assign(e,t):e));return r.displayName=e,r}})))()}var $T;function eE(){return(eE=e((()=>{Ow(),ox(),uS(),Rb(),Mw(),_T(),XC(),RC(),Sw(),gS(),UC(),o_(),Ug(),Vv(),Wv(),Rx(),Cx(),fT(),Sf(),oi(),$T=[bf,kr,Sx,dT,a_,Hg,Bv,Uv,Lx,Dw,ax,lS,Lb,jw,gT,YC,LC,xw,hS,HC]})))()}var tE;function nE(){return(nE=e((()=>{Kf(),yy(),ow(),fw(),QT(),eE(),tE=ZT(`BarChart`,{type:`bar`,vchartConstructor:Gf},[vy,aw,dw,...$T])})))()}function rE(e,t){return getComputedStyle(document.body).getPropertyValue(e).trim()||getComputedStyle(document.documentElement).getPropertyValue(e).trim()||t}function iE(e){let t=rE(`--arc-antd-color-primary`,e?`#6aa1ff`:`#1664ff`),n=rE(`--arc-antd-color-fill-0`,e?`rgba(255, 255, 255, 0.04)`:`rgba(28, 31, 35, 0.03)`),r=rE(`--arc-antd-color-fill-1`,e?`rgba(255, 255, 255, 0.08)`:`rgba(28, 31, 35, 0.06)`);return{success:rE(`--arc-antd-color-success`,e?`#37d196`:`#00b42a`),danger:rE(`--arc-antd-color-danger`,e?`#ff7875`:`#f53f3f`),warning:rE(`--arc-antd-color-warning`,e?`#ffb44b`:`#ff7d00`),risk:e?`#ff6b8a`:oE,active:rE(`--arc-antd-color-data-2`,e?`#74d8ff`:`#1ac6ff`),primary:t,text0:rE(`--arc-antd-color-text-0`,e?`rgba(255, 255, 255, 0.9)`:`rgba(0, 0, 0, 0.9)`),text1:rE(`--arc-antd-color-text-1`,e?`rgba(255, 255, 255, 0.75)`:`rgba(0, 0, 0, 0.62)`),text2:rE(`--arc-antd-color-text-2`,e?`rgba(255, 255, 255, 0.55)`:`rgba(0, 0, 0, 0.36)`),border:rE(`--arc-antd-color-border`,e?`rgba(255, 255, 255, 0.12)`:`rgba(28, 31, 35, 0.12)`),fill0:n,fill1:r,grid:e?`rgba(255, 255, 255, 0.12)`:`rgba(28, 31, 35, 0.10)`,bg1:rE(`--arc-antd-color-bg-1`,e?`#16161a`:`#ffffff`),tooltipBg:rE(`--arc-antd-color-bg-2`,e?`#2f3037`:`#ffffff`),tooltipShadow:e?`rgba(0, 0, 0, 0.35)`:`rgba(0, 0, 0, 0.10)`,dataColors:sE.map((e,t)=>rE(`--arc-antd-color-data-${e}`,cE[t]))}}function aE(){let{isDark:e,themeColor:t}=n(),[r,i]=Ta(()=>iE(e));return xa(()=>{let t=()=>i(iE(e));t();let n=window.requestAnimationFrame(t);return()=>window.cancelAnimationFrame(n)},[e,t]),r}var oE,sE,cE;function lE(){return(lE=e((()=>{t(),oE=`#f43f5e`,sE=[0,2,4,6,8,10,12,14,16,18],cE=[`#1664ff`,`#1ac6ff`,`#ff8a00`,`#3cc780`,`#7442d4`,`#ffc400`,`#304d77`,`#b48deb`,`#009488`,`#ff7dda`]})))()}function uE(e){return e>=1e4?`${(e/1e4).toFixed(1)}万`:String(e)}function dE(e){return Array.isArray(e)?e.join(``):e}function fE(e){return Number(dE(e))||0}function pE(e,t){let n=e?.[t];return typeof n==`string`||typeof n==`number`?String(n):``}function mE(e,t){let n=e?.[t];return typeof n==`number`?n:Number(n)||0}function hE(e){return{style:{panel:{backgroundColor:e.tooltipBg,border:{color:e.border,width:1},shadow:{x:0,y:8,blur:10,spread:0,color:e.tooltipShadow}},titleLabel:{fill:e.text1},keyLabel:{fill:e.text2},valueLabel:{fill:e.text0}}}}function gE(e){return{padding:{top:8,right:12,bottom:8,left:8},background:`transparent`,animation:!0,tooltip:hE(e)}}function _E(e){return e.length===0||e.every(e=>(e.count??e.value??0)===0)}function vE(e,t,n){let r=[];for(let i of e){let e=i[t],a=typeof e==`string`||typeof e==`number`?String(e):``;for(let e of n){let t=i[e.field];r.push({...i,__x:a,__type:e.name,__value:typeof t==`number`?t:Number(t)||0})}}return r}function yE(e,t){return e.map((e,n)=>e.color??t.dataColors[n%t.dataColors.length])}var bE,xE;function SE(){return(SE=e((()=>{bE={mode:`desktop-browser`,dpr:typeof window>`u`?1:window.devicePixelRatio},xE={fontSize:14,fontWeight:600,color:`var(--arc-antd-color-text-0)`,marginBottom:12}})))()}function CE(e,t,n){return{orient:e,type:`band`,tick:{visible:!1},domainLine:{visible:!1},grid:{visible:!1},label:{style:{fill:t.text2,fontSize:11},autoLimit:!0,...n?{formatMethod:e=>n(dE(e))}:{}}}}function wE(e,t,n){return{orient:e,type:`linear`,tick:{visible:!1},domainLine:{visible:!1},grid:{visible:!0,style:{stroke:t.grid,lineDash:[3,4],lineWidth:1}},label:{style:{fill:t.text2,fontSize:12},formatMethod:e=>n?n(fE(e)):uE(fE(e))}}}function TE(e){return Array.isArray(e)?e[0]:e}function EE(e){return{visible:!0,orient:`bottom`,position:`middle`,item:{label:{style:{fill:e.text1,fontSize:12}}}}}function DE(e){return{...hE(e.palette),mark:{title:{value:t=>pE(t,e.categoryField)},content:[{key:e.tooltipKey??`数值`,value:t=>e.valueFmt(mE(t,e.valueField))}]}}}function OE({palette:e,multi:t,xField:n,singleName:r,singleField:i,valueFmt:a,titleFmt:o}){return{...hE(e),...t?{dimension:{title:{value:e=>{let t=pE(TE(e),`__x`);return o?o(t):t}}},mark:{content:[{key:e=>pE(e,`__type`),value:e=>a(mE(e,`__value`),pE(e,`__type`),e)}]}}:{mark:{title:{value:e=>o?o(pE(e,n)):pE(e,n)},content:[{key:r,value:e=>a(mE(e,i),r,e)}]}}}}function kE(e,t){let{palette:n,series:r,xField:i,data:a}=e,o=r.length>1,s=e.smooth??!0?`monotone`:`linear`,c=e.legend??o,l=yE(r,n),u=r[0],d=u?.field??`__value`,f=u?.name??``,p=o?`__x`:i,m=o?`__value`:d,h=o?vE(a,i,r):[...a],g=e.tooltip?.value??(e=>uE(e)),_=e.tooltip?.title,v={...gE(n),data:[{id:`series`,values:h}],xField:p,yField:m,color:l,...o?{seriesField:`__type`,stack:e.stack??!1}:{},line:{style:{lineWidth:2,curveType:s}},point:{visible:e.point??!1,style:{size:e.pointSize??5}},axes:[CE(`bottom`,n,e.axis?.xLabel),wE(`left`,n,e.axis?.yLabel)],...c?{legends:EE(n)}:{},tooltip:OE({palette:n,multi:o,xField:i,singleName:f,singleField:d,valueFmt:g,titleFmt:_})};return t?{...v,area:{style:{fillOpacity:e.fillOpacity??.2,curveType:s}}}:v}function AE(e){return kE(e,!1)}function jE(e){return kE(e,!0)}function ME(e){let{palette:t,series:n,xField:r,data:i,horizontal:a}=e,o=n.length>1,s=e.legend??o,c=yE(n,t),l=o?`__x`:r,u=o?`__value`:n[0]?.field??`__value`,d=n[0]?.name??``,f=o?vE(i,r,n):[...i],p=e.tooltip?.value??(e=>uE(e)),m=e.tooltip?.title,h=e.cornerRadius??4,g=a?[0,h,h,0]:[h,h,0,0],_=CE(a?`left`:`bottom`,t,e.axis?.xLabel),v=wE(a?`bottom`:`left`,t,e.axis?.yLabel);a&&e.categoryAxisWidth&&(_.width=e.categoryAxisWidth);let y={cornerRadius:g,fillOpacity:.92};return!o&&e.colorByDatum&&(y.fill=t=>e.colorByDatum(t)),{...gE(t),data:[{id:`bar`,values:f}],...a?{direction:`horizontal`}:{},xField:a?u:l,yField:a?l:u,color:c,...o?{seriesField:`__type`,stack:e.stack??!1}:{},barMaxWidth:e.barMaxWidth??(a?16:22),...e.barMinHeight==null?{}:{barMinHeight:e.barMinHeight},bar:{style:y},...e.showLabel?{label:{visible:!0,position:a?`right`:`top`,formatMethod:(e,t)=>uE(mE(t,u)),style:{fill:e.labelColor??t.text2,fontSize:11}}}:{},axes:[_,v],...s?{legends:EE(t)}:{},tooltip:OE({palette:t,multi:o,xField:r,singleName:d,singleField:u,valueFmt:p,titleFmt:m})}}function NE(e){let{palette:t,data:n,categoryField:r,valueField:i}=e,a=e.donut??!0,o=e.label??`percent`,s=e.labelPosition??`outside`,c=e.colors?[...e.colors]:t.dataColors,l=n.reduce((e,t)=>{let n=t[i];return e+(typeof n==`number`?n:Number(n)||0)},0),u=e.valueFormatter??(t=>`${uE(t)}${e.valueUnit?` ${e.valueUnit}`:``}`),d={type:`pie`,background:`transparent`,animation:!0,data:[{id:`pie`,values:[...n]}],categoryField:r,valueField:i,color:c,outerRadius:e.outerRadius??.82,innerRadius:e.innerRadius??(a?.55:0),padAngle:e.padAngle??(a?1.2:0),cornerRadius:e.cornerRadius??(a?4:0),...e.legend===!1?{}:{legends:{visible:!0,orient:`bottom`,position:`middle`,item:{label:{style:{fill:t.text1,fontSize:e.legendLabelFontSize??12}}}}},label:{visible:o!==`none`,position:s,line:{visible:e.labelLine??s===`outside`},style:{fill:e.labelColor??t.text1,fontSize:e.labelFontSize??11,fontWeight:s===`inside`?600:400},formatMethod:(e,t)=>{let n=mE(t,i),a=pE(t,r);return o===`value`?n>0?uE(n):``:l<=0||n/l<.05?``:`${a} ${Math.round(n/l*100)}%`}},tooltip:DE({palette:t,categoryField:r,valueField:i,valueFmt:u,tooltipKey:e.tooltipKey})};return a&&e.indicator&&(d.indicator={visible:!0,title:{visible:!0,autoLimit:!0,style:{text:e.indicator.title,fill:t.text0,fontSize:e.indicatorTitleFontSize??26,fontWeight:700}},content:e.indicator.subtitle?[{visible:!0,style:{text:e.indicator.subtitle,fill:t.text2,fontSize:12}}]:[]}),d}function PE(e){let t=e?.datum;return Array.isArray(t)?t.map(e=>typeof e?.name==`string`||typeof e?.name==`number`?String(e.name):``).filter(Boolean).join(` / `):pE(e,`name`)}function FE(e){return Array.isArray(e)}function IE(e){let t=e.categoryField??`name`,n=e.valueField??`value`,r=e.valueFormatter??(e=>uE(e)),i=FE(e.data)?[...e.data]:[...e.data.children??[]],a=e.tooltipItems??[{key:`使用次数`,value:e=>r(mE(e,n))}];return{type:`treemap`,background:`transparent`,animation:!0,data:{id:`treemap`,values:i},categoryField:t,valueField:n,color:e.colors?[...e.colors]:e.palette.dataColors,drill:e.drill??!0,gapWidth:2,nodePadding:2,minVisibleArea:e.minVisibleArea??8,minChildrenVisibleArea:e.minChildrenVisibleArea??36,leaf:{style:{fillOpacity:.9,stroke:e.palette.bg1,lineWidth:1}},nonLeaf:{visible:!0,style:{fillOpacity:.1,stroke:e.palette.border,lineWidth:1}},label:{visible:!0,style:{fill:`#ffffff`,fontSize:e.labelFontSize??12,fontWeight:600}},nonLeafLabel:{visible:!0,position:`top`,padding:22,style:{fill:e.palette.text1,fontSize:12,fontWeight:600,textAlign:`left`,x:e=>(e?.labelRect?.x0??0)+4}},tooltip:{...hE(e.palette),mark:{title:{value:e=>PE(e)},content:a}}}}function LE(e){let t=e.valueFormatter??(e=>uE(e)),n=e.colors??e.palette.dataColors,r=(t,r)=>e.nodeColor?e.nodeColor(t,r):n[r%n.length],i=e.nodes.map((e,t)=>({...e,name:e.label,fill:r(e,t)})),a=new Map(i.map(e=>[e.id,e.fill])),o=new Map(i.map(e=>[e.id,e])),s=e=>{if(!e)return{};let t=e.datum,n=Array.isArray(t)?t[0]:t,r=n&&typeof n==`object`?{...n,...e}:{...e},i=r.key??r.id,a=typeof i==`string`?o.get(i):void 0;return a?{...a,...r}:r},c=t=>a.get(pE(t,`source`))??e.palette.primary,l=(e,t)=>e.map(e=>({key:e.key,value:t=>e.value(s(t)),visible:e=>RE(e)===t})),u=[{key:`流量`,value:e=>t(mE(e,`value`))}];return{type:`sankey`,background:`transparent`,animation:!0,data:[{id:`sankey`,values:[{nodes:i,links:[...e.links]}]}],categoryField:`id`,valueField:`value`,sourceField:`source`,targetField:`target`,nodeKey:`id`,nodeAlign:`justify`,...e.nodeLayer?{setNodeLayer:t=>e.nodeLayer(s(t))}:{},nodeGap:e.nodeGap??8,nodeWidth:e.nodeWidth??12,minLinkHeight:1,dropIsolatedNode:!1,node:{style:{fill:t=>pE(s(t),`fill`)||e.palette.primary}},link:{style:{fill:c,fillOpacity:.28}},label:{visible:!0,limit:e.labelLimit??140,style:{fill:e.palette.text1,fontSize:11,text:t=>{let n=s(t);return e.nodeLabel?e.nodeLabel(n):pE(n,`name`)}}},emphasis:{enable:!0,trigger:`hover`,effect:`adjacency`},tooltip:{...hE(e.palette),mark:{title:{value:t=>{let n=s(t);return RE(t)?e.tooltip?.linkTitle?.(n)??zE(n):e.tooltip?.nodeTitle?.(n)??pE(n,`name`)}},content:[...l(e.tooltip?.nodeItems??u,!1),...l(e.tooltip?.linkItems??u,!0)]}}}}function RE(e){return!!pE(e,`source`)&&!!pE(e,`target`)}function zE(e){return`${pE(e,`source`)} → ${pE(e,`target`)}`}function BE(e){let{palette:t}=e,n=[e.bar,...e.stackedBars??[]],r=[e.line,...e.extraLines??[]],i=n.length>1,a=e=>e.id??e.field,o=(e,n)=>e.color??t.dataColors[n]??t.primary,s=(e,n)=>e.color??t.dataColors[2+n]??t.active,c=e.tooltip?.titleField??e.xField,l=e.tooltip?.barValue??(e=>uE(e)),u=e.tooltip?.lineValue??(e=>uE(e)),d=[...e.data],f=e.dataId??`mixed`,p=`${a(e.bar)}-stack`,m={...wE(`left`,t,e.axis?.leftLabel),seriesId:i?[p]:[a(e.bar)]},h={...wE(`right`,t,e.axis?.rightLabel),seriesId:r.map(a),grid:{visible:!1}},g=i?[{type:`bar`,id:p,dataId:`${f}-bars`,xField:`__x`,yField:`__value`,seriesField:`__type`,stack:!0,bar:{style:{fill:e=>{let t=n.findIndex(t=>t.name===pE(e,`__type`));return o(n[Math.max(t,0)],Math.max(t,0))},fillOpacity:e.bar.fillOpacity??.92}}}]:[{type:`bar`,id:a(e.bar),dataId:f,xField:e.xField,yField:e.bar.field,name:e.bar.name,bar:{style:{fill:o(e.bar,0),cornerRadius:e.bar.cornerRadius??[4,4,0,0],fillOpacity:e.bar.fillOpacity??.92}}}];return{...gE(t),data:[{id:f,values:d},...i?[{id:`${f}-bars`,values:vE(d,e.xField,n.map(e=>({field:e.field,name:e.name})))}]:[]],series:[...g,...r.map((t,n)=>{let r=s(t,n);return{type:`line`,id:a(t),dataId:f,xField:e.xField,yField:t.field,name:t.name,line:{style:{stroke:r,lineWidth:t.lineWidth??2,curveType:t.smooth??!0?`monotone`:`linear`}},point:{visible:t.showPoint??!0,style:{fill:r,size:t.pointSize??5}}}})],axes:[CE(`bottom`,t,e.axis?.xLabel),m,h],...e.legend===!1?{}:{legends:EE(t)},tooltip:{...hE(t),dimension:{title:{value:t=>{let n=TE(t),r=pE(n,c);return e.tooltip?.title?e.tooltip.title(r,n):r}},content:[...n.map(e=>({key:e.name,value:t=>{let n=TE(t);return(e.format??l)(mE(n,e.field),n)}})),...r.map(e=>({key:e.name,value:t=>{let n=TE(t);return(e.format??u)(mE(n,e.field),n)}}))]}}}}function VE(e,t,n){return{...wE(e,t,n?.label),...n?.min==null?{}:{min:n.min},...n?.max==null?{}:{max:n.max},...n?.inverse==null?{}:{inverse:n.inverse}}}function HE(e){let t=e.point??{};return{...gE(e.palette),...e.padding?{padding:e.padding}:{},data:[{id:e.dataId??`scatter`,values:[...e.data]}],xField:e.xField,yField:e.yField,point:{style:{...t.size==null?{}:{size:t.size},...t.fill==null?{}:{fill:t.fill},...t.fillOpacity==null?{}:{fillOpacity:t.fillOpacity},...t.stroke==null?{}:{stroke:t.stroke},...t.lineWidth==null?{}:{lineWidth:t.lineWidth}}},axes:[VE(`bottom`,e.palette,e.xAxis),VE(`left`,e.palette,e.yAxis)],tooltip:{...hE(e.palette),mark:{...e.tooltip?.title?{title:{value:t=>e.tooltip.title(t)}}:{},...e.tooltip?.items?{content:e.tooltip.items.map(e=>({key:e.key,value:t=>e.value(t)}))}:{}}}}}function UE(e){let t=e.dataId??`heatmap`,n=e.colorRange?[...e.colorRange]:[e.palette.fill1,e.palette.dataColors[0]??e.palette.primary],r=e.tooltip?.value??(e=>uE(e)),i=e.tooltip?.valueName??`次数`;return{type:`heatmap`,background:`transparent`,animation:!0,data:[{id:t,values:[...e.data]}],xField:e.xField,yField:e.yField,valueField:e.valueField,cell:{style:{fill:{field:e.valueField,scale:`color`},stroke:e.palette.bg1,lineWidth:1}},color:{type:`linear`,domain:[{dataId:t,fields:[e.valueField]}],range:n},axes:[CE(`bottom`,e.palette,e.axis?.xLabel),{...CE(`left`,e.palette,e.axis?.yLabel),bandPadding:0}],legends:e.colorLegend===!1?void 0:{visible:!0,type:`color`,field:e.valueField,orient:`bottom`,position:`start`,railHeight:8,railWidth:160,handlerText:{style:{fill:e.palette.text2,fontSize:11}}},tooltip:{...hE(e.palette),mark:{title:{value:t=>e.tooltip?.title?e.tooltip.title(t):`${pE(t,e.yField)} ${pE(t,e.xField)}`},content:[{key:i,value:t=>r(mE(t,e.valueField),t)}]}}}}function WE(){return(WE=e((()=>{SE()})))()}function GE({children:e,minItemWidth:t=180,gap:n=14,className:r,style:i}){return/* @__PURE__ */ Da(`div`,{className:[`zx-stat-wrap`,r].filter(Boolean).join(` `),style:i,children:/* @__PURE__ */ Da(`div`,{className:`zx-stat-grid`,style:{"--zx-stat-min":`${t}px`,"--zx-stat-row-pad":`${n}px`},children:e})})}function KE({title:e,value:t,sub:n,icon:r,accent:i,delta:a,deltaLabel:o=`较昨日`,deltaFormat:s=`absolute`,onClick:c,active:l=!1,className:u}){let d=typeof c==`function`,f=/* @__PURE__ */ Oa(Ea,{children:[/* @__PURE__ */ Da(`span`,{className:`zx-stat__value`,style:i?{color:i}:void 0,children:t}),/* @__PURE__ */ Oa(`span`,{className:`zx-stat__title`,children:[r&&/* @__PURE__ */ Da(`span`,{className:`zx-stat__icon`,style:i?{color:i}:void 0,children:r}),e]}),n!=null&&n!==``&&/* @__PURE__ */ Da(`span`,{className:`zx-stat__sub`,children:n}),a!=null&&Number.isFinite(a)&&/* @__PURE__ */ Oa(`span`,{className:`zx-stat__delta zx-stat__delta--${a>=0?`up`:`down`}`,children:[o,` `,a>=0?`+`:``,s===`ratio`?`${(a*100).toFixed(1)}%`:a]})]}),p=[`zx-stat`,d&&`zx-stat--interactive`,d&&l&&`zx-stat--active`,u].filter(Boolean).join(` `);return d?/* @__PURE__ */ Da(`button`,{type:`button`,className:p,onClick:c,"aria-pressed":l,style:l&&i?{boxShadow:`inset 0 -2px 0 ${i}`}:void 0,children:f}):/* @__PURE__ */ Da(`div`,{className:p,children:f})}function qE(){return(qE=e((()=>{})))()}export{ab as $,ep as $n,Dc as $r,Gh as $t,fT as A,rm as An,hu as Ar,G_ as At,Rx as B,Mp as Bn,ol as Br,f_ as Bt,nE as C,Pa as Ci,bm as Cn,td as Cr,iv as Ct,QT as D,mm as Dn,gu as Dr,Z_ as Dt,ZT as E,gm as En,_u as Er,Q_ as Et,dw as F,Gp as Fn,El as Fr,z_ as Ft,ax as G,kp as Gn,Xc as Gr,Hg as Gt,Cx as H,Pp as Hn,el as Hr,o_ as Ht,ow as I,Fp as In,hl as Ir,M_ as It,fb as J,vp as Jn,Hc as Jr,Zh as Jt,Rb as K,xp as Kn,Bc as Kr,dg as Kt,aw as L,Up as Ln,X as Lr,N_ as Lt,Mw as M,tm as Mn,Dl as Mr,B_ as Mt,jw as N,$p as Nn,Ol as Nr,V_ as Nt,_T as O,hm as On,vu as Or,X_ as Ot,fw as P,Jp as Pn,Tl as Pr,R_ as Pt,rb as Q,$f as Qn,_c as Qr,Wh as Qt,UC as R,jp as Rn,K as Rr,S_ as Rt,tE as S,to as Si,ym as Sn,Q as Sr,mv as St,$T as T,V as Ti,vm as Tn,yu as Tr,sv as Tt,Sx as U,Ep as Un,rl as Ur,a_ as Ut,Lx as V,Ap as Vn,Y as Vr,d_ as Vt,ox as W,Dp as Wn,Zc as Wr,Ug as Wt,cb as X,np as Xn,dc as Xr,Hh as Xt,db as Y,yp as Yn,Uc as Yr,$h as Yt,sb as Z,rp as Zn,fc as Zr,Uh as Zt,SE as _,ho as _i,qm as _n,Ad as _r,jv as _t,jE as a,ss as ai,Jh as an,Sf as ar,my as at,lE as b,po as bi,Rm as bn,yd as br,Dv as bt,AE as c,Xo as ci,dh as cn,sf as cr,ey as ct,LE as d,Wo as di,lh as dn,ff as dr,Vv as dt,W as ei,Kh as en,tp as er,ib as et,HE as f,To as fi,sh as fn,lf as fr,Bv as ft,pE as g,mo as gi,Xm as gn,Id as gr,Nv as gt,mE as h,wo as hi,Ym as hn,Fd as hr,Pv as ht,WE as i,ns as ii,Yh as in,Kf as ir,Oy as it,dT as j,Wp as jn,su as jr,K_ as jt,gT as k,nm as kn,pu as kr,Y_ as kt,BE as l,Jo as li,fh as ln,of as lr,Wv as lt,bE as m,So as mi,Jm as mn,cf as mr,Lv as mt,GE as n,H as ni,Vh as nn,Yf as nr,jy as nt,ME as o,cs as oi,qh as on,bf as or,py as ot,IE as p,Do as pi,oh as pn,df as pr,Rv as pt,Lb as q,Cp as qn,Vc as qr,fg as qt,qE as r,U as ri,zh as rn,Gf as rr,Dy as rt,UE as s,Qo as si,Xh as sn,af as sr,ty as st,KE as t,uc as ti,Bh as tn,qf as tr,Ay as tt,NE as u,Uo as ui,uh as un,yf as ur,Uv as ut,_E as v,_o as vi,Km as vn,Md as vr,Av as vt,eE as w,B as wi,_m as wn,Z as wr,ov as wt,aE as x,Za as xi,Vm as xn,bd as xr,pv as xt,xE as y,no as yi,Bm as yn,jd as yr,Ov as yt,HC as z,Np as zn,J as zr,x_ as zt};