ghost 6.52.0 → 6.52.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 (220) hide show
  1. package/components/tryghost-kg-card-factory-5.2.3.tgz +0 -0
  2. package/components/tryghost-kg-clean-basic-html-4.3.3.tgz +0 -0
  3. package/components/tryghost-kg-converters-1.2.3.tgz +0 -0
  4. package/components/tryghost-kg-default-cards-10.3.3.tgz +0 -0
  5. package/components/tryghost-kg-default-nodes-2.1.3.tgz +0 -0
  6. package/components/tryghost-kg-default-transforms-1.3.3.tgz +0 -0
  7. package/components/tryghost-kg-html-to-lexical-1.3.3.tgz +0 -0
  8. package/components/tryghost-kg-lexical-html-renderer-1.4.3.tgz +0 -0
  9. package/components/tryghost-kg-markdown-html-renderer-7.2.3.tgz +0 -0
  10. package/components/tryghost-kg-utils-1.1.3.tgz +0 -0
  11. package/core/built/admin/assets/Growth-CczbRexv.js +3 -0
  12. package/core/built/admin/assets/Newsletters-rFycX4x8.js +1 -0
  13. package/core/built/admin/assets/Overview-DFubBJaR.js +1 -0
  14. package/core/built/admin/assets/Web-BDE2lN4_.js +2 -0
  15. package/core/built/admin/assets/{account-migration-DiS76mRS.js → account-migration-gvH5a8ea.js} +1 -1
  16. package/core/built/admin/assets/audience-CMWMCxFS.js +1 -0
  17. package/core/built/admin/assets/{automated-emails-Cel18g7S.js → automated-emails-293Lcj5S.js} +1 -1
  18. package/core/built/admin/assets/automations-BxnjfCKn.js +1 -0
  19. package/core/built/admin/assets/automations-kPr44AmD.js +1 -0
  20. package/core/built/admin/assets/bluesky-sharing-Cww54F3Y.js +1 -0
  21. package/core/built/admin/assets/{chunk.912.9d6df5a6da679d905bbf.js → chunk.251.dd82df30188bb633b4ae.js} +9 -9
  22. package/core/built/admin/assets/{chunk.730.2457b7fede040aa52c88.js → chunk.341.20e7d2936dfa5877deea.js} +3 -3
  23. package/core/built/admin/assets/{chunk.524.d6d399b571454ea0234d.js → chunk.524.697bf0ded48e7c994fc3.js} +5 -5
  24. package/core/built/admin/assets/{chunk.582.50a9a5cbab6996daf0fe.js → chunk.582.6b742e9ba932688c442c.js} +6 -6
  25. package/core/built/admin/assets/{code-editor-view-BLGzcLub.js → code-editor-view-DSY5RHLf.js} +1 -1
  26. package/core/built/admin/assets/comments-BwNUmaNM.js +1 -0
  27. package/core/built/admin/assets/constants-c-JNF9c2.js +1 -0
  28. package/core/built/admin/assets/container-CD33Rm0u.js +1 -0
  29. package/core/built/admin/assets/content-helpers-CNBPrwsi.js +1 -0
  30. package/core/built/admin/assets/date-range-select-BkkNN98H.js +1 -0
  31. package/core/built/admin/assets/disabled-sources-indicator-ChHTF69d.js +1 -0
  32. package/core/built/admin/assets/{domain-2REz20SO.js → domain-CGk9SMa-.js} +1 -1
  33. package/core/built/admin/assets/dropzone-9zocztX0.js +5 -0
  34. package/core/built/admin/assets/{edit-profile-7QEh0VtN.js → edit-profile-C0B2Kbsl.js} +1 -1
  35. package/core/built/admin/assets/editor-Bz2Sm2O8.js +8 -0
  36. package/core/built/admin/assets/{esm-CEtFqV1y.js → esm-CsHLKmLh.js} +1 -1
  37. package/core/built/admin/assets/explore-CpRAMnx7.js +1 -0
  38. package/core/built/admin/assets/feed-BRoOWghO.js +1 -0
  39. package/core/built/admin/assets/filter-sources-DhxqZID1.js +1 -0
  40. package/core/built/admin/assets/{filters-DUy8rzI5.js → filters-B8nLLYGO.js} +1 -1
  41. package/core/built/admin/assets/{gh-chart-DdBGmBS8.js → gh-chart-Cqy9gGq7.js} +1 -1
  42. package/core/built/admin/assets/{gift-link-modal-CSgyxenA.js → gift-link-modal-v55u0VUL.js} +1 -1
  43. package/core/built/admin/assets/growth-BIfM3w1p.js +1 -0
  44. package/core/built/admin/assets/{inbox-CTD-ix6u.js → inbox-CDX57fXK.js} +11 -11
  45. package/core/built/admin/assets/index-B5yxmQNp.js +69 -0
  46. package/core/built/admin/assets/inline-DdrWe7D3.js +1 -0
  47. package/core/built/admin/assets/{input-group-DkR63-nk.js → input-group-DUPGQck1.js} +1 -1
  48. package/core/built/admin/assets/{koenig-lexical-D09TwwLs.js → koenig-lexical-CUVpp-dC.js} +1 -1
  49. package/core/built/admin/assets/{kpi-card-Fr_HJH78.js → kpi-card-DyDbok3h.js} +1 -1
  50. package/core/built/admin/assets/kpi-helpers-Bx9IHIMq.js +1 -0
  51. package/core/built/admin/assets/{kpi-tabs-Dc4Nt4a5.js → kpi-tabs-DmUcThFc.js} +1 -1
  52. package/core/built/admin/assets/labels-DLL8dl-7.js +1 -0
  53. package/core/built/admin/assets/layout-B7K3SmL0.js +1 -0
  54. package/core/built/admin/assets/{links-CfAB2Yeq.js → link-helpers-DHG_8GIT.js} +1 -1
  55. package/core/built/admin/assets/list-page-COAUFrmV.js +1 -0
  56. package/core/built/admin/assets/members-BxWs_mjq.js +10 -0
  57. package/core/built/admin/assets/{modals-Bu-1Uxdc.js → modals-DF2sECo6.js} +4 -4
  58. package/core/built/admin/assets/moderation-DYKTx5x0.js +1 -0
  59. package/core/built/admin/assets/newsletter-C-ZD1dI8.js +1 -0
  60. package/core/built/admin/assets/note-oaRdU_5z.js +1 -0
  61. package/core/built/admin/assets/notifications-BF4fAiP1.js +1 -0
  62. package/core/built/admin/assets/{nql-lang-CvCSOQG3.js → nql-lang-BoHzkNg5.js} +1 -1
  63. package/core/built/admin/assets/{onboarding-route-BDaa9hd3.js → onboarding-route-SS-e9Aeb.js} +1 -1
  64. package/core/built/admin/assets/overview-Cbn6bIoR.js +1 -0
  65. package/core/built/admin/assets/post-analytics-Bk9-KEgB.js +1 -0
  66. package/core/built/admin/assets/post-analytics-context-C8t_048I.js +1 -0
  67. package/core/built/admin/assets/post-analytics-header-xTjcg4H0.js +1 -0
  68. package/core/built/admin/assets/post-analytics-provider-CqnWwLMk.js +1 -0
  69. package/core/built/admin/assets/{post-share-modal-59Ujf4t1.js → post-share-modal-ZUCX7JZo.js} +1 -1
  70. package/core/built/admin/assets/preferences-BgjgxiBB.js +5 -0
  71. package/core/built/admin/assets/profile-qIwaxKTm.js +1 -0
  72. package/core/built/admin/assets/{router-provider-DcttGCQn.js → router-provider-S8Wf6jdu.js} +1 -1
  73. package/core/built/admin/assets/select-Cp27ScMR.js +1 -0
  74. package/core/built/admin/assets/{settings-dLraw6et.js → settings-CdDfyF90.js} +1 -1
  75. package/core/built/admin/assets/{settings-CIslWMfh.js → settings-CynBh-YN.js} +4 -4
  76. package/core/built/admin/assets/{share-modal-CI3E67kW.js → share-modal-DTIFYNI1.js} +1 -1
  77. package/core/built/admin/assets/social-urls-DVvRfwEp.js +16 -0
  78. package/core/built/admin/assets/{sort-button-BYwI0xdN.js → sort-button-BHh5Ba1K.js} +1 -1
  79. package/core/built/admin/assets/source-icon--egCE7iN.js +1 -0
  80. package/core/built/admin/assets/stats-DkqCtrPh.js +1 -0
  81. package/core/built/admin/assets/stats-view-BvWWxegf.js +1 -0
  82. package/core/built/admin/assets/step-1-DWjw7rIn.js +1 -0
  83. package/core/built/admin/assets/{step-2-CVOvLQ2n.js → step-2-D1LrETIB.js} +1 -1
  84. package/core/built/admin/assets/{step-3-BsVXcpWU.js → step-3-BAdJdZw4.js} +2 -2
  85. package/core/built/admin/assets/{tabs-Bw8aEqsd.js → tabs-DSrHPjWP.js} +1 -1
  86. package/core/built/admin/assets/tags-BWZqBj19.js +1 -0
  87. package/core/built/admin/assets/{textarea-CNaqhk5P.js → textarea-CUVQjsrM.js} +1 -1
  88. package/core/built/admin/assets/{toggle-group-CMp1taHd.js → toggle-group-CrFpl-Xz.js} +1 -1
  89. package/core/built/admin/assets/{topic-filter-D2_9eEw4.js → topic-filter-jAxwwd9I.js} +1 -1
  90. package/core/built/admin/assets/types-uYQ1HgqL.js +1 -0
  91. package/core/built/admin/assets/url-helpers-CCyfRrKj.js +1 -0
  92. package/core/built/admin/assets/use-analytics-data-DXG7mpgK.js +1 -0
  93. package/core/built/admin/assets/use-filter-params-EoQBXfP3.js +1 -0
  94. package/core/built/admin/assets/use-growth-stats-DJoXxVfD.js +1 -0
  95. package/core/built/admin/assets/use-post-referrers-B-onYbuS.js +1 -0
  96. package/core/built/admin/assets/use-reply-chain-data-D8IFALoz.js +1 -0
  97. package/core/built/admin/assets/{use-tinybird-query-CNCaUn39.js → use-tinybird-query-BSL3iVCc.js} +1 -1
  98. package/core/built/admin/assets/{use-tinybird-token-1T80Odca.js → use-tinybird-token-DHgOnrNu.js} +1 -1
  99. package/core/built/admin/assets/virtual-list-AQrbRAXP.js +1 -0
  100. package/core/built/admin/assets/web-zEFi98DS.js +1 -0
  101. package/core/built/admin/index.html +6 -6
  102. package/core/server/services/automations/automations-api.js +20 -0
  103. package/core/server/services/automations/automations-api.ts +31 -0
  104. package/core/server/services/automations/poll.js +7 -7
  105. package/core/server/services/automations/poll.ts +12 -9
  106. package/core/server/services/email-analytics/email-analytics-provider-mailgun.js +2 -2
  107. package/core/server/services/email-analytics/email-analytics-service-wrapper.js +1 -4
  108. package/core/server/services/email-analytics/email-analytics-service.js +5 -7
  109. package/core/server/services/webhooks/serialize.js +6 -5
  110. package/package.json +1 -1
  111. package/pnpm-lock.yaml +14 -14
  112. package/pnpm-workspace.yaml +5 -0
  113. package/core/built/admin/assets/Growth-Dx0vv-BS.js +0 -3
  114. package/core/built/admin/assets/Newsletters-v1GnbUjW.js +0 -1
  115. package/core/built/admin/assets/Overview-BgM7o-Z8.js +0 -1
  116. package/core/built/admin/assets/Web-DRv-83Ow.js +0 -2
  117. package/core/built/admin/assets/automations-DFLgH14-.js +0 -1
  118. package/core/built/admin/assets/automations-Dc4DUKBb.js +0 -1
  119. package/core/built/admin/assets/bluesky-sharing-Dk1RTUaz.js +0 -1
  120. package/core/built/admin/assets/comments-DgH1rC7w.js +0 -1
  121. package/core/built/admin/assets/constants-BlvYJTqz.js +0 -1
  122. package/core/built/admin/assets/content-helpers-BEgGpvyE.js +0 -1
  123. package/core/built/admin/assets/editor-u3BPqQed.js +0 -8
  124. package/core/built/admin/assets/en-DA2zVD_n.js +0 -1
  125. package/core/built/admin/assets/explore-BgHmdFVz.js +0 -1
  126. package/core/built/admin/assets/feed-Cs7-F3I5.js +0 -1
  127. package/core/built/admin/assets/filter-query-core-D6GjHUFB.js +0 -1
  128. package/core/built/admin/assets/growth-IkQZ1ZV9.js +0 -1
  129. package/core/built/admin/assets/index-BMhs4O3N.js +0 -69
  130. package/core/built/admin/assets/inline-C1CpHxuO.js +0 -1
  131. package/core/built/admin/assets/kpis-BTZ8cyw-.js +0 -1
  132. package/core/built/admin/assets/labels-sA9m188H.js +0 -5
  133. package/core/built/admin/assets/layout-szLkuQ88.js +0 -1
  134. package/core/built/admin/assets/list-page-DWkOdljb.js +0 -1
  135. package/core/built/admin/assets/main-layout-B-K8KliJ.js +0 -1
  136. package/core/built/admin/assets/members-PNNhalbu.js +0 -10
  137. package/core/built/admin/assets/moderation-DqnsNTiw.js +0 -1
  138. package/core/built/admin/assets/newsletter-BhuQeWFL.js +0 -1
  139. package/core/built/admin/assets/note-DFy2JTpP.js +0 -1
  140. package/core/built/admin/assets/notifications-BVu-JOkB.js +0 -1
  141. package/core/built/admin/assets/overview-Bhg8M7VS.js +0 -1
  142. package/core/built/admin/assets/pagemenu-C4paivNj.js +0 -1
  143. package/core/built/admin/assets/post-analytics-BhQUmZyA.js +0 -1
  144. package/core/built/admin/assets/post-analytics-context-Dy17HR1_.js +0 -1
  145. package/core/built/admin/assets/post-analytics-header-DAQep1VQ.js +0 -1
  146. package/core/built/admin/assets/posts/_react-dom-Blmuc0OL.js +0 -21
  147. package/core/built/admin/assets/posts/alert-dialog-DBJeQQTK.js +0 -154
  148. package/core/built/admin/assets/posts/app-provider-BJr9fdEC.js +0 -22
  149. package/core/built/admin/assets/posts/app-utils-9O53Czfw.js +0 -83
  150. package/core/built/admin/assets/posts/automations-BM0oBTjO.js +0 -275
  151. package/core/built/admin/assets/posts/automations-Dbp-gdHS.js +0 -223
  152. package/core/built/admin/assets/posts/avatar-kOk1tTvT.js +0 -144
  153. package/core/built/admin/assets/posts/badge-DnByIHe9.js +0 -25
  154. package/core/built/admin/assets/posts/button-Dd8Xreln.js +0 -40844
  155. package/core/built/admin/assets/posts/chunk-KS7C4IRE-ECXkcZq6.js +0 -7740
  156. package/core/built/admin/assets/posts/comments-D-7hbbdw.js +0 -8032
  157. package/core/built/admin/assets/posts/data-list-DdD_glQ-.js +0 -14219
  158. package/core/built/admin/assets/posts/dialog-DDkTy_np.js +0 -229
  159. package/core/built/admin/assets/posts/editor-D7-01KV_.js +0 -14633
  160. package/core/built/admin/assets/posts/empty-indicator-Ze-bwJ27.js +0 -38
  161. package/core/built/admin/assets/posts/filters-CmKfKtpS.js +0 -5611
  162. package/core/built/admin/assets/posts/get-site-timezone-DVbWc-NA.js +0 -39
  163. package/core/built/admin/assets/posts/growth-DlhFUzVg.js +0 -299
  164. package/core/built/admin/assets/posts/heading-BBl-8tMC.js +0 -92
  165. package/core/built/admin/assets/posts/hooks-gZAmj4Al.js +0 -5429
  166. package/core/built/admin/assets/posts/input-DuPLeCGW.js +0 -16
  167. package/core/built/admin/assets/posts/input-surface-ClwNIxfd.js +0 -17
  168. package/core/built/admin/assets/posts/jsx-runtime-BfZnKD4L.js +0 -95
  169. package/core/built/admin/assets/posts/koenig-lexical-DCHiJJou.js +0 -77579
  170. package/core/built/admin/assets/posts/kpis-Fsx0XmYK.js +0 -2061
  171. package/core/built/admin/assets/posts/label-D1wSl69p.js +0 -32
  172. package/core/built/admin/assets/posts/links-DLozzgMh.js +0 -1243
  173. package/core/built/admin/assets/posts/loading-indicator-BgU2kK3v.js +0 -44
  174. package/core/built/admin/assets/posts/main-layout-DDlTMrnF.js +0 -15
  175. package/core/built/admin/assets/posts/newsletter-DAQJ1GLe.js +0 -736
  176. package/core/built/admin/assets/posts/overview-G3MfRm-S.js +0 -426
  177. package/core/built/admin/assets/posts/page-header-CanFyB95.js +0 -284
  178. package/core/built/admin/assets/posts/popover-Cta8ZDHJ.js +0 -221
  179. package/core/built/admin/assets/posts/post-analytics-cS07-wo_.js +0 -121
  180. package/core/built/admin/assets/posts/post-analytics-context-D868SMoq.js +0 -150
  181. package/core/built/admin/assets/posts/post-analytics-header-CZYiuaEL.js +0 -42249
  182. package/core/built/admin/assets/posts/post-share-modal-BJfswZzf.js +0 -352
  183. package/core/built/admin/assets/posts/posts-CpusjBC0.js +0 -37
  184. package/core/built/admin/assets/posts/posts-app-context-CPC7dOlt.js +0 -26
  185. package/core/built/admin/assets/posts/posts.js +0 -145
  186. package/core/built/admin/assets/posts/router-provider-DrqpOc8m.js +0 -114
  187. package/core/built/admin/assets/posts/separator-DAZNzARU.js +0 -37
  188. package/core/built/admin/assets/posts/settings-CMfUn5Hq.js +0 -66
  189. package/core/built/admin/assets/posts/shade-app-DLbeExcd-NeEZjE3R.js +0 -4764
  190. package/core/built/admin/assets/posts/sheet-CEuv-0a5.js +0 -62
  191. package/core/built/admin/assets/posts/site-WJ6ldary.js +0 -10
  192. package/core/built/admin/assets/posts/skeleton-CO0qCdQF.js +0 -2426
  193. package/core/built/admin/assets/posts/source-icon-Bs6o84W3.js +0 -143
  194. package/core/built/admin/assets/posts/stats-B1Z8H0JT.js +0 -92
  195. package/core/built/admin/assets/posts/table-CbJ9bOpM.js +0 -77
  196. package/core/built/admin/assets/posts/tabs-BvzzwQ4P.js +0 -242
  197. package/core/built/admin/assets/posts/tags-D-4TwsD0.js +0 -462
  198. package/core/built/admin/assets/posts/tooltip-BI7VtFUY.js +0 -380
  199. package/core/built/admin/assets/posts/update-queries-DiUznIQ1.js +0 -60
  200. package/core/built/admin/assets/posts/users-UgRPrTKW.js +0 -83
  201. package/core/built/admin/assets/posts/value-DF_wOhJe.js +0 -415
  202. package/core/built/admin/assets/posts/virtual-list-window-DP63Onpm.js +0 -853
  203. package/core/built/admin/assets/posts/web-axp2l3kK.js +0 -8077
  204. package/core/built/admin/assets/preferences-ChOzBKcF.js +0 -5
  205. package/core/built/admin/assets/profile-DlcrYKay.js +0 -1
  206. package/core/built/admin/assets/select-BbtNHCBq.js +0 -1
  207. package/core/built/admin/assets/social-urls-DVzIHh2W.js +0 -16
  208. package/core/built/admin/assets/source-icon-Uuhttjun.js +0 -1
  209. package/core/built/admin/assets/source-utils-BchD0sF0.js +0 -1
  210. package/core/built/admin/assets/stats-CrlPzgdd.js +0 -1
  211. package/core/built/admin/assets/stats-view-UNMhTMCZ.js +0 -1
  212. package/core/built/admin/assets/step-1-C2HY6pyi.js +0 -1
  213. package/core/built/admin/assets/tags-DjCsJo0X.js +0 -1
  214. package/core/built/admin/assets/typeof-Ca-duI-z.js +0 -1
  215. package/core/built/admin/assets/url-helpers-DxA844rA.js +0 -1
  216. package/core/built/admin/assets/use-growth-stats-DNIGdI8h.js +0 -1
  217. package/core/built/admin/assets/use-reply-chain-data-DtEC2Azp.js +0 -1
  218. package/core/built/admin/assets/virtual-list-window-BTXGwpf5.js +0 -1
  219. package/core/built/admin/assets/web-Cj8VEw3s.js +0 -1
  220. /package/core/built/admin/assets/{chunk.912.9d6df5a6da679d905bbf.js.LICENSE.txt → chunk.251.dd82df30188bb633b4ae.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-Bb3IsNbi.js";import{l as n,n as r,t as i}from"./stats-DkqCtrPh.js";import{t as a}from"./currency-CQsJu8iC.js";import{Xn as o,Zn as s,ir as c,rr as l}from"./button-DiwO9Rof.js";import{cr as u,ur as d}from"./index-B5yxmQNp.js";c();var f=e(t()),p=(e,t,n,r)=>{if(!e.length)return{totalMembers:0,freeMembers:0,paidMembers:0,mrr:0,percentChanges:{total:`0%`,free:`0%`,paid:`0%`,mrr:`0%`},directions:{total:`same`,free:`same`,paid:`same`,mrr:`same`}};let i=r||e[e.length-1],a=e.length>0?e[e.length-1]:{free:0,paid:0,comped:0,gift:0},o=t.length>0?t[t.length-1]:{mrr:0},c=i.free+i.paid+i.comped+(i.gift??0),u=o.mrr,d={total:`0%`,free:`0%`,paid:`0%`,mrr:`0%`},f={total:`same`,free:`same`,paid:`same`,mrr:`same`};if(e.length>1){let t=e[0],n=t.free+t.paid+t.comped+(t.gift??0);if(n>0){let e=(c-n)/n*100;d.total=s(e/100),f.total=e>0?`up`:e<0?`down`:`same`}if(t.free>0){let e=(a.free-t.free)/t.free*100;d.free=s(e/100),f.free=e>0?`up`:e<0?`down`:`same`}let r=t.paid+t.comped+(t.gift??0),i=a.paid+a.comped+(a.gift??0);if(r>0){let e=(i-r)/r*100;d.paid=s(e/100),f.paid=e>0?`up`:e<0?`down`:`same`}}if(t.length>1){let e=l(n).format(`YYYY-MM-DD`),r=t.find(t=>l(t.date).isSameOrAfter(e)),i=l(n).isSame(l().startOf(`year`),`day`)||l(n).year()<l().year(),a=0;if(a=r&&l(r.date).isSame(e,`day`)?r.mrr:i?0:u,a>=0){let e=a===0?u>0?100:0:(u-a)/a*100;d.mrr=s(e/100),f.mrr=e>0?`up`:e<0?`down`:`same`}}return{totalMembers:c,freeMembers:i.free,paidMembers:i.paid+i.comped+(i.gift??0),mrr:u,percentChanges:d,directions:f}},m=(e,t)=>{let n=[...e].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()),r=[...t].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()),i=n.map(e=>e.date),a=r.map(e=>e.date),s=[...new Set([...i,...a])].sort((e,t)=>new Date(e).getTime()-new Date(t).getTime()),c=null,l=null,u=new Map(n.map(e=>[e.date,e])),d=new Map(r.map(e=>[e.date,e]));return s.map(e=>{let t=u.get(e);t&&(c=t);let n=d.get(e);n&&(l=n);let r=c?.free??0,i=c?.paid??0,a=c?.comped??0,s=c?.gift??0,f=i+a+s,p=r+f;return{date:e,value:p,free:r,paid:f,comped:a,gift:s,mrr:l?.mrr??0,paid_subscribed:c?.paid_subscribed??0,paid_canceled:c?.paid_canceled??0,formattedValue:o(p),label:`Total members`}})},h=e=>{let{startDate:t,endDate:o}=(0,f.useMemo)(()=>d(e),[e]),s=u(t),c=e===1?l(s).subtract(1,`day`).format(`YYYY-MM-DD`):s,{data:h,isLoading:g}=i({searchParams:{date_from:c}}),{data:_,isLoading:v}=r({searchParams:{date_from:c}}),{data:y,isLoading:b}=n(),x=(0,f.useMemo)(()=>{let t=[];if(h?.stats?t=h.stats:Array.isArray(h)&&(t=h),e===1&&t.length>=2){let e=t[t.length-2],n=t[t.length-1],r=l(s).format(`YYYY-MM-DD`),i=l(s).add(1,`day`).format(`YYYY-MM-DD`);return[{...e,date:r},{...n,date:i}]}return t},[h,e,s]),{mrrData:S,selectedCurrency:C}=(0,f.useMemo)(()=>{let t=l(s),n=e===1?l().endOf(`day`):l().startOf(`day`);if(_?.stats&&_?.meta?.totals){let r=_.meta.totals,i=r[0];if(!i)return{mrrData:[],selectedCurrency:`usd`};for(let e of r)e.mrr>i.mrr&&(i=e);let a=i.currency,o=_.stats.filter(e=>e.currency===a),s=o.filter(e=>l(e.date).isSameOrAfter(t)),c=[...o].sort((e,t)=>new Date(t.date).getTime()-new Date(e.date).getTime()),u=[...s];if(!u.some(e=>l(e.date).isSame(t,`day`))){let e=c.find(e=>l(e.date).isBefore(t));if(e)u.unshift({...e,date:t.format(`YYYY-MM-DD`)});else if(u.length>0){let e=[...u].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime())[0];u.unshift({...e,date:t.format(`YYYY-MM-DD`)})}}let d=e===1?l().startOf(`day`):n;if(!u.some(e=>l(e.date).isSame(d,`day`))&&u.length>0){let e=[...u].sort((e,t)=>new Date(t.date).getTime()-new Date(e.date).getTime())[0];u.push({...e,date:d.format(`YYYY-MM-DD`)})}return{mrrData:u.sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()),selectedCurrency:a}}return{mrrData:[],selectedCurrency:`usd`}},[_,s,e]),w=(0,f.useMemo)(()=>p(x,S,s,h?.meta?.totals),[x,S,s,h?.meta?.totals]),T=(0,f.useMemo)(()=>m(x,S),[x,S]),E=(0,f.useMemo)(()=>a(C),[C]);return{isLoading:(0,f.useMemo)(()=>g||v||b,[g,v,b]),memberData:x,mrrData:S,dateFrom:s,endDate:o,totals:w,chartData:T,subscriptionData:(0,f.useMemo)(()=>{if(!y?.stats)return[];let e=y.stats.reduce((e,t)=>{let n=t.date;return e[n]||(e[n]={date:n,signups:0,cancellations:0}),e[n].signups+=t.signups,e[n].cancellations+=t.cancellations,e},{}),t=Object.values(e).sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()),n=l(s),r=l(o);return t.filter(e=>{let t=l(e.date);return t.isSameOrAfter(n)&&t.isSameOrBefore(r)})},[y,s,o]),selectedCurrency:C,currencySymbol:E}};export{h as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-Bb3IsNbi.js";import{a as n,n as r,o as i}from"./stats-DkqCtrPh.js";import{t as a}from"./currency-CQsJu8iC.js";var o=e=>Math.round(e/100),s=e(t()),c=e=>{let{data:t,isLoading:o}=i(e),{data:c,isLoading:l}=n(e),{data:u,isLoading:d}=r(),f=(0,s.useMemo)(()=>t?.stats||[],[t]),p=(0,s.useMemo)(()=>c?.stats.length===0?{free_members:0,paid_members:0,mrr:0}:c?.stats[0],[c]),{selectedCurrency:m,currencySymbol:h}=(0,s.useMemo)(()=>{if(u?.stats&&u?.meta?.totals){let e=u.meta.totals,t=e[0];if(!t)return{selectedCurrency:`usd`,currencySymbol:a(`usd`)};for(let n of e)n.mrr>t.mrr&&(t=n);let n=t.currency;return{selectedCurrency:n,currencySymbol:a(n)}}return{selectedCurrency:`usd`,currencySymbol:a(`usd`)}},[u]);return{isLoading:(0,s.useMemo)(()=>o||l||d,[o,l,d]),stats:f,totals:p,selectedCurrency:m,currencySymbol:h}};export{o as n,c as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-Bb3IsNbi.js";import{t as n}from"./jsx-runtime-CtMZ-PAS.js";import{S as r,t as i}from"./button-DiwO9Rof.js";import{$ as a,At as o,N as s,Nt as c,On as l,Ot as u,xt as d}from"./index-B5yxmQNp.js";var f=e(t()),p=n(),m=({object:e,onReply:t,onReplyError:n,className:r,...i})=>{let{data:o}=u(`index`),[l,d]=(0,f.useState)(!1);if(!o)return null;let m=e.attributedTo,h=`Reply...`;return m?.preferredUsername&&m?.id&&(h=`Reply to ${c(m)}...`),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(`div`,{className:`flex w-full cursor-pointer gap-x-3 py-6 ${r||``}`,onClick:()=>d(!0),...i,children:[(0,p.jsx)(a,{author:o}),(0,p.jsx)(`div`,{className:`flex w-full items-center`,children:(0,p.jsx)(`div`,{className:`w-full text-[1.5rem] text-gray-500 transition-colors dark:text-gray-700`,children:h})})]}),l&&(0,p.jsx)(s,{open:l,replyTo:{object:e,actor:e.attributedTo},onOpenChange:e=>{d(e)},onReply:()=>{t?.(),d(!1)},onReplyError:()=>{n?.()}})]})},h=({last:e})=>(0,p.jsxs)(`div`,{className:`relative mt-[-5px] py-5`,children:[(0,p.jsxs)(`div`,{className:`flex h-12 grow items-center gap-2 rounded-lg border border-gray-200 p-2 px-[10px] text-gray-600`,children:[(0,p.jsx)(r,{size:18,strokeWidth:1.25}),`This post has been deleted`]}),!e&&(0,p.jsx)(`div`,{className:`absolute top-[70px] bottom-0 left-[18px] z-0 mb-[-13px] w-[2px] rounded-sm bg-gray-200`})]}),g=({count:e,onClick:t,variant:n=`default`,preserveScroll:r=!0,loading:a=!1})=>{let o=(0,f.useRef)(null),s=()=>{if(e&&e>0)return`Show ${e} more ${e===1?`reply`:`replies`}`;switch(n){case`expand`:return`Show replies`;case`loadMore`:return`Show more replies`;default:return`Show replies`}},c=()=>{if(r){let e=document.querySelector(`[data-scrollable-container]`),n=e?e.scrollTop:window.scrollY;t(),setTimeout(()=>{e?e.scrollTop=n:window.scrollTo(0,n)},0)}else t()};return(0,p.jsxs)(`div`,{ref:o,className:`mt-[-7px] flex items-center pb-3`,children:[(0,p.jsxs)(`div`,{className:`flex w-10 flex-col items-center justify-center gap-1`,children:[(0,p.jsx)(`div`,{className:`size-0.5 rounded-sm bg-gray-300`}),(0,p.jsx)(`div`,{className:`size-0.5 rounded-sm bg-gray-300`}),(0,p.jsx)(`div`,{className:`size-0.5 rounded-sm bg-gray-300`})]}),(0,p.jsx)(i,{className:`text-sm font-medium text-blue-600 hover:text-blue-800`,variant:`ghost`,onClick:e=>{e.preventDefault(),e.stopPropagation(),e.target.blur(),c()},children:a?(0,p.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,p.jsx)(l,{size:`sm`}),(0,p.jsx)(`span`,{children:`Loading...`})]}):s()})]})};function _(e,t={}){let{includeAncestors:n=!1}=t,{data:r,isLoading:i,loadMoreChildren:a,loadMoreChildReplies:s,hasMoreChildren:c,hasMoreChildReplies:l}=d(`index`,e);return{threadParents:n&&r?.ancestors?.chain?.map(o)||[],post:r?.post?o(r.post):void 0,processedReplies:(r?.children??[]).map(e=>({mainReply:o(e.post),chain:e.chain?e.chain.map(o):[]})),isLoading:i,loadMoreChildren:a,loadMoreChildReplies:s,hasMoreChildren:c,hasMoreChildReplies:l}}export{m as i,g as n,h as r,_ as t};
@@ -1,4 +1,4 @@
1
- import{o as e,r as t}from"./rolldown-runtime-DAXXjFlN.js";import{t as n}from"./react-Bb3IsNbi.js";import{k as r}from"./hooks-tBACnBdQ.js";import{n as i,r as a}from"./Combination-BPFTKsTn.js";import{t as o}from"./use-tinybird-token-1T80Odca.js";import{Ii as s}from"./index-BMhs4O3N.js";var c=(e,t,n=``)=>{if(!e)return``;let r;r=e.local?.enabled?e.local.endpoint||``:e.endpointBrowser?e.endpointBrowser:e.endpoint||``;let i=e.version?`${t}_${e.version}`:t;return`${r}/v0/pipes/${i}.json?${n}`},l=e(n(),1),u={0:`#FFFFFF`,4:`#F6F7F9`,12:`#E8E9ED`,24:`#CBCCD1`,40:`#A5A7B4`,64:`#636679`,100:`#25283D`},d={default:`#27F795`,light:`#EBFEF5`,dark:`#008060`},f={default:`#DE1616`,dark:`#DE1616`,light:`#FDECEC`},p={default:`#2D27F7`,code:`#00C1FF`,light:`#E0EFFF`,dark:`#1170D9`},m={neutral:u,primary:d,error:f,alternative:p,secondary:{default:u[100],light:u[40],dark:`#161724`},background:{default:u[0],1:u[4],2:u[12],dark:u[100],brandLight:d.light,brand:d.default,brandDark:d.default},border:{inverse:u[0],1:u[12],2:u[24],3:u[64],brand:d.default,brandDark:d.dark,error:f.default},text:{default:u[100],1:u[64],2:u[40],3:u[40],inverse:u[0],brand:d.default,brandDark:d.dark,blue:p.default,error:f.default},icon:{default:u[100],1:u[64],2:u[40],3:u[40],inverse:u[0],brand:d.default,brandDark:d.dark,error:f.default},warning:{light:`#FFFBD6`,dark:`#856100`},quarantine:{light:`#fef5f1`,dark:`#f9844a`},information:{light:`#E0EFFF`,dark:`#1170D9`},datasource:`#AB49D0`,node:`#FEA827`,git:`#F03C2E`,workspace:{pro:`#FF631A`}},h=[`#27F795`,`#008060`,`#0EB1B9`,`#9263AF`,`#5A6FC0`,`#86BFDB`,`#FFC145`,`#FF6B6C`,`#DC82C8`,`#FFC0F1`],g=m.text.default;m.border[1];var _=m.background.default,v=`Inter, sans-serif`,y=`12px`,b=r(),x=Object.prototype.hasOwnProperty;function S(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&S(e[r],t[r]););return r===-1}if(!n||typeof e==`object`){for(n in r=0,e)if(x.call(e,n)&&++r&&!x.call(t,n)||!(n in t)||!S(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var C=new WeakMap,w=()=>{},T=Object,E=e=>e===void 0,D=e=>typeof e==`function`,O=(e,t)=>({...e,...t}),k=e=>D(e.then),A={},j={},M=`undefined`,ee=typeof window!=M,te=typeof document!=M,ne=ee&&`Deno`in window,re=()=>ee&&typeof window.requestAnimationFrame!=M,ie=(e,t)=>{let n=C.get(e);return[()=>!E(t)&&e.get(t)||A,r=>{if(!E(t)){let i=e.get(t);t in j||(j[t]=i),n[5](t,O(i,r),i||A)}},n[6],()=>!E(t)&&t in j?j[t]:!E(t)&&e.get(t)||A]},ae=!0,oe=()=>ae,[se,ce]=ee&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[w,w],le=()=>{let e=te&&document.visibilityState;return E(e)||e!==`hidden`},ue=e=>(te&&document.addEventListener(`visibilitychange`,e),se(`focus`,e),()=>{te&&document.removeEventListener(`visibilitychange`,e),ce(`focus`,e)}),de=e=>{let t=()=>{ae=!0,e()},n=()=>{ae=!1};return se(`online`,t),se(`offline`,n),()=>{ce(`online`,t),ce(`offline`,n)}},fe={isOnline:oe,isVisible:le},pe={initFocus:ue,initReconnect:de},me=!l.useId,he=!ee||ne,ge=e=>re()?window.requestAnimationFrame(e):setTimeout(e,1),_e=he?l.useEffect:l.useLayoutEffect,ve=typeof navigator<`u`&&navigator.connection,ye=!he&&ve&&([`slow-2g`,`2g`].includes(ve.effectiveType)||ve.saveData),be=new WeakMap,xe=e=>T.prototype.toString.call(e),Se=(e,t)=>e===`[object ${t}]`,Ce=0,we=e=>{let t=typeof e,n=xe(e),r=Se(n,`Date`),i=Se(n,`RegExp`),a=Se(n,`Object`),o,s;if(T(e)===e&&!r&&!i){if(o=be.get(e),o)return o;if(o=++Ce+`~`,be.set(e,o),Array.isArray(e)){for(o=`@`,s=0;s<e.length;s++)o+=we(e[s])+`,`;be.set(e,o)}if(a){o=`#`;let t=T.keys(e).sort();for(;!E(s=t.pop());)E(e[s])||(o+=s+`:`+we(e[s])+`,`);be.set(e,o)}}else o=r?e.toJSON():t==`symbol`?e.toString():t==`string`?JSON.stringify(e):``+e;return o},Te=e=>{if(D(e))try{e=e()}catch{e=``}let t=e;return e=typeof e==`string`?e:(Array.isArray(e)?e.length:e)?we(e):``,[e,t]},Ee=0,De=()=>++Ee;async function Oe(...e){let[t,n,r,i]=e,a=O({populateCache:!0,throwOnError:!0},typeof i==`boolean`?{revalidate:i}:i||{}),o=a.populateCache,s=a.rollbackOnError,c=a.optimisticData,l=e=>typeof s==`function`?s(e):s!==!1,u=a.throwOnError;if(D(n)){let e=n,r=[],i=t.keys();for(let n of i)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&r.push(n);return Promise.all(r.map(d))}return d(n);async function d(n){let[i]=Te(n);if(!i)return;let[s,d]=ie(t,i),[f,p,m,h]=C.get(t),g=()=>{let e=f[i];return(D(a.revalidate)?a.revalidate(s().data,n):a.revalidate!==!1)&&(delete m[i],delete h[i],e&&e[0])?e[0](2).then(()=>s().data):s().data};if(e.length<3)return g();let _=r,v,y=!1,b=De();p[i]=[b,0];let x=!E(c),S=s(),w=S.data,T=S._c,O=E(T)?w:T;if(x&&(c=D(c)?c(O,w):c,d({data:c,_c:O})),D(_))try{_=_(O)}catch(e){v=e,y=!0}if(_&&k(_))if(_=await _.catch(e=>{v=e,y=!0}),b!==p[i][0]){if(y)throw v;return _}else y&&x&&l(v)&&(o=!0,d({data:O,_c:void 0}));if(o&&(y||(D(o)?d({data:o(_,O),error:void 0,_c:void 0}):d({data:_,error:void 0,_c:void 0}))),p[i][1]=De(),Promise.resolve(g()).then(()=>{d({_c:void 0})}),y){if(u)throw v;return}return _}}var ke=(e,t)=>{for(let n in e)e[n][0]&&e[n][0](t)},Ae=(e,t)=>{if(!C.has(e)){let n=O(pe,t),r=Object.create(null),i=Oe.bind(void 0,e),a=w,o=Object.create(null),s=(e,t)=>{let n=o[e]||[];return o[e]=n,n.push(t),()=>{let e=n.indexOf(t);e>=0&&(n[e]=n[n.length-1],n.pop())}},c=(t,n,r)=>{e.set(t,n);let i=o[t];if(i)for(let e of i)e(n,r)},l=()=>{if(!C.has(e)&&(C.set(e,[r,Object.create(null),Object.create(null),Object.create(null),i,c,s]),!he)){let t=n.initFocus(setTimeout.bind(void 0,ke.bind(void 0,r,0))),i=n.initReconnect(setTimeout.bind(void 0,ke.bind(void 0,r,1)));a=()=>{t&&t(),i&&i(),C.delete(e)}}};return l(),[e,i,l,a]}return[e,C.get(e)[4]]},je=(e,t,n,r,i)=>{let a=n.errorRetryCount,o=i.retryCount,s=~~((Math.random()+.5)*(1<<(o<8?o:8)))*n.errorRetryInterval;!E(a)&&o>a||setTimeout(r,s,i)},Me=S,[Ne,Pe]=Ae(new Map),Fe=O({onLoadingSlow:w,onSuccess:w,onError:w,onErrorRetry:je,onDiscarded:w,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:ye?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:ye?5e3:3e3,compare:Me,isPaused:()=>!1,cache:Ne,mutate:Pe,fallback:{}},fe),Ie=(e,t)=>{let n=O(e,t);if(t){let{use:r,fallback:i}=e,{use:a,fallback:o}=t;r&&a&&(n.use=r.concat(a)),i&&o&&(n.fallback=O(i,o))}return n},Le=(0,l.createContext)({}),Re=e=>{let{value:t}=e,n=(0,l.useContext)(Le),r=D(t),i=(0,l.useMemo)(()=>r?t(n):t,[r,n,t]),a=(0,l.useMemo)(()=>r?i:Ie(n,i),[r,n,i]),o=i&&i.provider,s=(0,l.useRef)(void 0);o&&!s.current&&(s.current=Ae(o(a.cache||Ne),i));let c=s.current;return c&&(a.cache=c[0],a.mutate=c[1]),_e(()=>{if(c)return c[2]&&c[2](),c[3]},[]),(0,l.createElement)(Le.Provider,O(e,{value:a}))},ze=ee&&window.__SWR_DEVTOOLS_USE__,Be=ze?window.__SWR_DEVTOOLS_USE__:[],Ve=()=>{ze&&(window.__SWR_DEVTOOLS_REACT__=l.default)},He=e=>D(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],Ue=()=>{let e=(0,l.useContext)(Le);return(0,l.useMemo)(()=>O(Fe,e),[e])},We=Be.concat(e=>(t,n,r)=>e(t,n&&((...e)=>{let[r]=Te(t),[,,,i]=C.get(Ne);if(r.startsWith(`$inf$`))return n(...e);let a=i[r];return E(a)?n(...e):(delete i[r],a)}),r)),Ge=e=>function(...t){let n=Ue(),[r,i,a]=He(t),o=Ie(n,a),s=e,{use:c}=o,l=(c||[]).concat(We);for(let e=l.length;e--;)s=l[e](s);return s(r,i||o.fetcher||null,o)},Ke=(e,t,n)=>{let r=t[e]||(t[e]=[]);return r.push(n),()=>{let e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}};Ve();var qe=l.default.use||(e=>{switch(e.status){case`pending`:throw e;case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:throw e.status=`pending`,e.then(t=>{e.status=`fulfilled`,e.value=t},t=>{e.status=`rejected`,e.reason=t}),e}}),Je={dedupe:!0},Ye=Promise.resolve(void 0);Ye.status=`fulfilled`,Ye.value=void 0;var Xe=()=>w,Ze=(e,t,n)=>{let{cache:r,compare:i,suspense:a,fallbackData:o,revalidateOnMount:s,revalidateIfStale:c,refreshInterval:u,refreshWhenHidden:d,refreshWhenOffline:f,keepPreviousData:p,strictServerPrefetchWarning:m}=n,[h,g,_,v]=C.get(r),[y,x]=Te(e),S=(0,l.useRef)(!1),w=(0,l.useRef)(!1),T=(0,l.useRef)(y),A=(0,l.useRef)(t),j=(0,l.useRef)(n),M=()=>j.current,ee=()=>M().isVisible()&&M().isOnline(),[te,ne,re,ae]=ie(r,y),oe=(0,l.useRef)({}).current,se=E(o)?E(n.fallback)?void 0:n.fallback[y]:o,ce=(e,t)=>{for(let n in oe){let r=n;if(r===`data`){if(!i(e[r],t[r])&&(!E(e[r])||!i(xe,t[r])))return!1}else if(t[r]!==e[r])return!1}return!0},le=!S.current,ue=(0,l.useMemo)(()=>{let e=te(),n=ae(),r=e=>{let n=O(e);return delete n._k,!(!y||!t||M().isPaused())&&(le&&!E(s)?s:E(E(se)?n.data:se)||c)?{isValidating:!0,isLoading:!0,...n}:n},i=r(e),a=e===n?i:r(n),o=i;return[()=>{let e=r(te());return ce(e,o)?(o.data=e.data,o.isLoading=e.isLoading,o.isValidating=e.isValidating,o.error=e.error,o):(o=e,e)},()=>a]},[r,y]),de=(0,b.useSyncExternalStore)((0,l.useCallback)(e=>re(y,(t,n)=>{ce(n,t)||e()}),[r,y]),ue[0],ue[1]),fe=h[y]&&h[y].length>0,pe=de.data,ve=E(pe)?se&&k(se)?qe(se):se:pe,ye=de.error,be=(0,l.useRef)(ve),xe=p?E(pe)?E(be.current)?ve:be.current:pe:ve,Se=y&&E(ve),Ce=(0,l.useRef)(null);!he&&(0,b.useSyncExternalStore)(Xe,()=>(Ce.current=!1,Ce),()=>(Ce.current=!0,Ce));let we=Ce.current;m&&we&&!a&&Se&&console.warn(`Missing pre-initiated data for serialized key "${y}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);let Ee=!y||!t||M().isPaused()||fe&&!E(ye)?!1:le&&!E(s)?s:a?E(ve)?!1:c:E(ve)||c,ke=le&&Ee,Ae=E(de.isValidating)?ke:de.isValidating,je=E(de.isLoading)?ke:de.isLoading,Me=(0,l.useCallback)(async e=>{let t=A.current;if(!y||!t||w.current||M().isPaused())return!1;let r,a,o=!0,s=e||{},c=!_[y]||!s.dedupe,l=()=>me?!w.current&&y===T.current&&S.current:y===T.current,u={isValidating:!1,isLoading:!1},d=()=>{ne(u)},f=()=>{let e=_[y];e&&e[1]===a&&delete _[y]},p={isValidating:!0};E(te().data)&&(p.isLoading=!0);try{if(c&&(ne(p),n.loadingTimeout&&E(te().data)&&setTimeout(()=>{o&&l()&&M().onLoadingSlow(y,n)},n.loadingTimeout),_[y]=[t(x),De()]),[r,a]=_[y],r=await r,c&&setTimeout(f,n.dedupingInterval),!_[y]||_[y][1]!==a)return c&&l()&&M().onDiscarded(y),!1;u.error=void 0;let e=g[y];if(!E(e)&&(a<=e[0]||a<=e[1]||e[1]===0))return d(),c&&l()&&M().onDiscarded(y),!1;let s=te().data;u.data=i(s,r)?s:r,c&&l()&&M().onSuccess(r,y,n)}catch(e){f();let t=M(),{shouldRetryOnError:n}=t;t.isPaused()||(u.error=e,c&&l()&&(t.onError(e,y,t),(n===!0||D(n)&&n(e))&&(!M().revalidateOnFocus||!M().revalidateOnReconnect||ee())&&t.onErrorRetry(e,y,t,e=>{let t=h[y];t&&t[0]&&t[0](3,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return o=!1,d(),!0},[y,r]),Ne=(0,l.useCallback)((...e)=>Oe(r,T.current,...e),[]);if(_e(()=>{A.current=t,j.current=n,E(pe)||(be.current=pe)}),_e(()=>{if(!y)return;let e=Me.bind(void 0,Je),t=0;M().revalidateOnFocus&&(t=Date.now()+M().focusThrottleInterval);let n=Ke(y,h,(n,r={})=>{if(n==0){let n=Date.now();M().revalidateOnFocus&&n>t&&ee()&&(t=n+M().focusThrottleInterval,e())}else if(n==1)M().revalidateOnReconnect&&ee()&&e();else if(n==2)return Me();else if(n==3)return Me(r)});return w.current=!1,T.current=y,S.current=!0,ne({_k:x}),Ee&&(_[y]||(E(ve)||he?e():ge(e))),()=>{w.current=!0,n()}},[y]),_e(()=>{let e;function t(){let t=D(u)?u(te().data):u;t&&e!==-1&&(e=setTimeout(n,t))}function n(){!te().error&&(d||M().isVisible())&&(f||M().isOnline())?Me(Je).then(t):t()}return t(),()=>{e&&=(clearTimeout(e),-1)}},[u,d,f,y]),(0,l.useDebugValue)(xe),a){if(!me&&he&&Se)throw Error(`Fallback data is required when using Suspense in SSR.`);Se&&(A.current=t,j.current=n,w.current=!1);let e=v[y];if(qe(!E(e)&&Se?Ne(e):Ye),!E(ye)&&Se)throw ye;let r=Se?Me(Je):Ye;!E(xe)&&Se&&(r.status=`fulfilled`,r.value=!0),qe(r)}return{mutate:Ne,get data(){return oe.data=!0,xe},get error(){return oe.error=!0,ye},get isValidating(){return oe.isValidating=!0,Ae},get isLoading(){return oe.isLoading=!0,je}}};T.defineProperty(Re,`defaultValue`,{value:Fe});var Qe=Ge(Ze);function $e(e){return Object.entries(e).reduce((e,[t,n])=>n===void 0?e:Object.assign(Object.assign({},e),{[t]:n}),{})}function et(e,t,n){let r;if(e)try{r=new URL(e);for(let[e,t]of Object.entries(n))typeof t!=`string`&&typeof t!=`number`||r.searchParams.set(e,String(t));r.searchParams.has(`from`)||r.searchParams.set(`from`,`chart`),t&&r.searchParams.set(`token`,t)}catch(e){console.error(e)}return r}function tt(e,t){return i(this,void 0,void 0,function*(){let n=new URL(e),r=Object.assign({},t);if(n.toString().length>2048){let e={};for(let[t,r]of n.searchParams.entries())t!==`token`&&t!==`from`&&(n.searchParams.delete(t),e[t]=r);r={method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(Object.assign(Object.assign({},r),e))}}let i=yield fetch(n,r);if(!i.ok)throw Error(`Error: ${(yield i.text())||`Could not fetch data`}`);return yield i.json()})}l.createContext({backgroundColor:_,borderColor:void 0,borderRadius:void 0,boxShadow:void 0,colorPalette:h,padding:void 0,fontFamily:v,fontSize:y,textColor:g});var nt=l.createContext({endpoint:void 0,token:void 0});function rt(e){let{fetcher:t=tt,refreshInterval:n,onError:r,onSuccess:i}=Ue(),a=l.useContext(nt),o=$e(e),s=$e(Object.assign(Object.assign({},a),{fetcher:t,refreshInterval:n,onError:r,onSuccess:i}));return Object.assign(Object.assign({},s),o)}l.createContext({fallbackLoading:void 0,fallbackError:void 0}),m.icon.default,m.icon.default;function it(e){var{params:t={}}=e;let n=rt(a(e,[`params`])),{endpoint:r,token:i}=n,o=a(n,[`endpoint`,`token`]),s=et(r,i,t),{data:c,error:l,isLoading:u,mutate:d}=Qe(()=>s?s.toString():null,Object.assign(Object.assign({},o),{shouldRetryOnError:!1}));return{data:c?.data||null,meta:c?.meta||null,statistics:c?.statistics||null,error:l?.message||null,loading:u,endpoint:r,token:i,refresh:d}}var at=function(e,t){return at=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},at(e,t)};function N(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);at(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ot=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),st=new(function(){function e(){this.browser=new ot,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(st.wxa=!0,st.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?st.worker=!0:!st.hasGlobalWindow||`Deno`in window?(st.node=!0,st.svgSupported=!0):ct(navigator.userAgent,st);function ct(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`;var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}var lt=`12px sans-serif`,ut=20,dt=100,ft=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function pt(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32);t[r]=(e.charCodeAt(n)-ut)/dt}return t}var mt=pt(ft),ht={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=ht.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n||=``,r||=`12px sans-serif`;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||12,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var l=mt[n[c]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r}},gt=Ft([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),_t=Ft([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),vt=Object.prototype.toString,yt=Array.prototype,bt=yt.forEach,xt=yt.filter,St=yt.slice,Ct=yt.map,wt=function(){}.constructor,Tt=wt?wt.prototype:null,Et=`__proto__`,Dt=2311;function Ot(){return Dt++}function kt(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function P(e){if(typeof e!=`object`||!e)return e;var t=e,n=vt.call(e);if(n===`[object Array]`){if(!rn(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=P(e[r])}}else if(_t[n]){if(!rn(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!gt[n]&&!rn(e)&&!Wt(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==Et&&(t[o]=P(e[o]));return t}function F(e,t,n){if(!G(t)||!G(e))return n?P(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==Et){var i=e[r],a=t[r];G(a)&&G(i)&&!H(a)&&!H(i)&&!Wt(a)&&!Wt(i)&&!Ht(a)&&!Ht(i)&&!rn(a)&&!rn(i)?F(i,a,n):(n||!(r in e))&&(e[r]=P(t[r]))}return e}function At(e,t){for(var n=e[0],r=1,i=e.length;r<i;r++)n=F(n,e[r],t);return n}function I(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==Et&&(e[n]=t[n]);return e}function L(e,t,n){for(var r=Rt(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}ht.createCanvas;function jt(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function Mt(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}function Nt(e,t,n){if(e=`prototype`in e?e.prototype:e,t=`prototype`in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];a!==`constructor`&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else L(e,t,n)}function Pt(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function R(e,t,n){if(e&&t)if(e.forEach&&e.forEach===bt)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}function z(e,t,n){if(!e)return[];if(!t)return Zt(e);if(e.map&&e.map===Ct)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}function Ft(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function It(e,t,n){if(!e)return[];if(!t)return Zt(e);if(e.filter&&e.filter===xt)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function Lt(e,t,n){if(e&&t){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}}function Rt(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function zt(e,t){var n=[...arguments].slice(2);return function(){return e.apply(t,n.concat(St.call(arguments)))}}var B=Tt&&U(Tt.bind)?Tt.call.bind(Tt.bind):zt;function V(e){var t=[...arguments].slice(1);return function(){return e.apply(this,t.concat(St.call(arguments)))}}function H(e){return Array.isArray?Array.isArray(e):vt.call(e)===`[object Array]`}function U(e){return typeof e==`function`}function W(e){return typeof e==`string`}function Bt(e){return vt.call(e)===`[object String]`}function Vt(e){return typeof e==`number`}function G(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function Ht(e){return!!gt[vt.call(e)]}function Ut(e){return!!_t[vt.call(e)]}function Wt(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function Gt(e){return e.colorStops!=null}function Kt(e){return e.image!=null}function qt(e){return vt.call(e)===`[object RegExp]`}function Jt(e){return e!==e}function Yt(){for(var e=[...arguments],t=0,n=e.length;t<n;t++)if(e[t]!=null)return e[t]}function K(e,t){return e??t}function Xt(e,t,n){return e??t??n}function Zt(e){var t=[...arguments].slice(1);return St.apply(e,t)}function Qt(e){if(typeof e==`number`)return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function $t(e,t){if(!e)throw Error(t)}function en(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var tn=`__ec_primitive__`;function nn(e){e[tn]=!0}function rn(e){return e[tn]}var an=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return Rt(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),on=typeof Map==`function`;function sn(){return on?new Map:new an}var cn=function(){function e(t){var n=H(t);this.data=sn();var r=this;t instanceof e?t.each(i):t&&R(t,i);function i(e,t){n?r.set(e,t):r.set(t,e)}}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return on?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function q(e){return new cn(e)}function ln(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}function un(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&I(n,t),n}function dn(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function J(e,t){return e.hasOwnProperty(t)}function fn(){}var pn=180/Math.PI;function mn(e,t){return e??=0,t??=0,[e,t]}function hn(e,t){return e[0]=t[0],e[1]=t[1],e}function gn(e){return[e[0],e[1]]}function _n(e,t,n){return e[0]=t,e[1]=n,e}function vn(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function yn(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e}function bn(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function xn(e){return Math.sqrt(Sn(e))}function Sn(e){return e[0]*e[0]+e[1]*e[1]}function Cn(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function wn(e,t){var n=xn(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Tn(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var En=Tn;function Dn(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var On=Dn;function kn(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function An(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function jn(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function Mn(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var Nn=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),Pn=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Nn(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new Nn(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new Nn(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new Nn(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Nn(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new Nn(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),Fn=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o<i[e].length;o++)if(i[e][o].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},c=i[e].length-1,l=i[e][c];return l&&l.callAtLast?i[e].splice(c,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,a=n[e].length;i<a;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=n.length,o=0;o<a;o++){var s=n[o];if(!(r&&r.filter&&s.query!=null&&!r.filter(e,s.query)))switch(i){case 0:s.h.call(s.ctx);break;case 1:s.h.call(s.ctx,t[0]);break;case 2:s.h.call(s.ctx,t[0],t[1]);break;default:s.h.apply(s.ctx,t);break}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=t[i-1],o=n.length,s=0;s<o;s++){var c=n[s];if(!(r&&r.filter&&c.query!=null&&!r.filter(e,c.query)))switch(i){case 0:c.h.call(a);break;case 1:c.h.call(a,t[0]);break;case 2:c.h.call(a,t[0],t[1]);break;default:c.h.apply(a,t.slice(1,i-1));break}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e}(),In=Math.log(2);function Ln(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<<s)-1&~i)/In);return e[n][c]}for(var l=r|1<<n,u=n+1;r&1<<u;)u++;for(var d=0,f=0,p=0;f<s;f++){var m=1<<f;m&i||(d+=(p%2?-1:1)*e[n][f]*Ln(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function Rn(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=Ln(n,8,0,0,0,r);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]??(a[s]=0),a[s]+=((o+s)%2?-1:1)*Ln(n,7,+(o===0),1<<o,1<<s,r)/i*t[o];return function(e,t,n){var r=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/r,e[1]=(t*a[3]+n*a[4]+a[5])/r}}}var zn=`___zrEVENTSAVED`,Bn=[];function Vn(e,t,n,r,i){return Hn(Bn,t,r,i,!0)&&Hn(e,n,Bn[0],Bn[1])}function Hn(e,t,n,r,i){if(t.getBoundingClientRect&&st.domSupported&&!Gn(t)){var a=t[zn]||(t[zn]={}),o=Wn(Un(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function Un(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=[`left`,`right`],i=[`top`,`bottom`],a=0;a<4;a++){var o=document.createElement(`div`),s=o.style,c=a%2,l=(a>>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return n}function Wn(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?Rn(s,o):Rn(o,s))}function Gn(e){return e.nodeName.toUpperCase()===`CANVAS`}var Kn=/([&<>"'])/g,qn={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`};function Jn(e){return e==null?``:(e+``).replace(Kn,function(e,t){return qn[t]})}var Yn=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Xn=[],Zn=st.browser.firefox&&+st.browser.version.split(`.`)[0]<39;function Qn(e,t,n,r){return n||={},r?$n(e,t,n):Zn&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?$n(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function $n(e,t,n){if(st.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Gn(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}else if(Hn(Xn,e,r,i)){n.zrX=Xn[0],n.zrY=Xn[1];return}}n.zrX=n.zrY=0}function er(e){return e||window.event}function tr(e,t,n){if(t=er(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&Qn(e,i,t,n)}else{Qn(e,t,t,n);var a=nr(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&Yn.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function nr(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function rr(e,t,n,r){e.addEventListener(t,n,r)}function ir(e,t,n,r){e.removeEventListener(t,n,r)}var ar=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function or(e){return e.which===2||e.which===3}var sr=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a<o;a++){var s=r[a],c=Qn(n,s,{});i.points.push([c.zrX,c.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in ur)if(ur.hasOwnProperty(t)){var n=ur[t](this._track,e);if(n)return n}},e}();function cr(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function lr(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var ur={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=cr(r)/cr(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=lr(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}};function dr(){return[1,0,0,1,0,0]}function fr(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function pr(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function mr(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function hr(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function gr(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function _r(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function vr(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}function yr(e){var t=dr();return pr(t,e),t}var Y=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),br=Math.min,xr=Math.max,Sr=new Y,Cr=new Y,wr=new Y,Tr=new Y,Er=new Y,Dr=new Y,X=function(){function e(e,t,n,r){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r),this.x=e,this.y=t,this.width=n,this.height=r}return e.prototype.union=function(e){var t=br(e.x,this.x),n=br(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=xr(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=xr(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,r=e.height/t.height,i=dr();return hr(i,i,[-t.x,-t.y]),_r(i,i,[n,r]),hr(i,i,[e.x,e.y]),i},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this,i=r.x,a=r.x+r.width,o=r.y,s=r.y+r.height,c=t.x,l=t.x+t.width,u=t.y,d=t.y+t.height,f=!(a<c||l<i||s<u||d<o);if(n){var p=1/0,m=0,h=Math.abs(a-c),g=Math.abs(l-i),_=Math.abs(s-u),v=Math.abs(d-o),y=Math.min(h,g),b=Math.min(_,v);a<c||l<i?y>m&&(m=y,h<g?Y.set(Dr,-h,0):Y.set(Dr,g,0)):y<p&&(p=y,h<g?Y.set(Er,h,0):Y.set(Er,-g,0)),s<u||d<o?b>m&&(m=b,_<v?Y.set(Dr,0,-_):Y.set(Dr,0,v)):y<p&&(p=y,_<v?Y.set(Er,0,_):Y.set(Er,0,-v))}return n&&Y.copy(n,f?Er:Dr),f},e.prototype.contain=function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},e.applyTransform=function(t,n,r){if(!r){t!==n&&e.copy(t,n);return}if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],a=r[3],o=r[4],s=r[5];t.x=n.x*i+o,t.y=n.y*a+s,t.width=n.width*i,t.height=n.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Sr.x=wr.x=n.x,Sr.y=Tr.y=n.y,Cr.x=Tr.x=n.x+n.width,Cr.y=wr.y=n.y+n.height,Sr.transform(r),Tr.transform(r),Cr.transform(r),wr.transform(r),t.x=br(Sr.x,Cr.x,wr.x,Tr.x),t.y=br(Sr.y,Cr.y,wr.y,Tr.y);var c=xr(Sr.x,Cr.x,wr.x,Tr.x),l=xr(Sr.y,Cr.y,wr.y,Tr.y);t.width=c-t.x,t.height=l-t.y},e}(),Or=`silent`;function kr(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Ar}}function Ar(){ar(this.event)}var jr=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Fn),Mr=function(){function e(e,t){this.x=e,this.y=t}return e}(),Nr=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],Pr=new X(0,0,0,0),Fr=function(e){N(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new Mr(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new jr,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new Pn(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(R(Nr,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=Rr(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new Mr(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new Mr(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=kr(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new Mr(e,t);if(Lr(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new X(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(Pr.copy(u.getBoundingRect()),u.transform&&Pr.applyTransform(u.transform),Pr.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m<s;m+=d)for(var h=0;h<p;h+=f)if(Lr(a,i,e+m*Math.cos(h),t+m*Math.sin(h),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||=new sr;var n=this._gestureMgr;t===`start`&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(t===`end`&&n.clear(),r){var i=r.type;e.gestureEvent=i;var a=new Mr;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(Fn);R([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){Fr.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=Rr(this,n,r),a,o;if((e!==`mouseup`||!i)&&(a=this.findHover(n,r),o=a.target),e===`mousedown`)this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e===`mouseup`)this._upEl=o;else if(e===`click`){if(this._downEl!==this._upEl||!this._downPoint||En(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function Ir(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0),r=r.__hostTarget||r.parent}return i?Or:!0}return!1}function Lr(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=Ir(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==Or)){t.target=o;break}}}function Rr(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var zr=32,Br=7;function Vr(e){for(var t=0;e>=zr;)t|=e&1,e>>=1;return e+t}function Hr(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;Ur(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function Ur(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function Wr(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a=e[r],o=t,s=r,c;o<s;)c=o+s>>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function Gr(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c<s&&a(e,t[n+i+c])>0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;c<s&&a(e,t[n+i-c])<=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function Kr(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;c<s&&a(e,t[n+i-c])<0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c<s&&a(e,t[n+i+c])>=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function qr(e,t){var n=Br,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,u(e)}}function u(n){var o=r[n],s=i[n],c=r[n+1],l=i[n+1];i[n]=s+l,n===a-3&&(r[n+1]=r[n+2],i[n+1]=i[n+2]),a--;var u=Kr(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=Gr(e[o+s-1],e,c,l,l-1,t),l!==0&&(s<=l?d(o,s,c,l):f(o,s,c,l)))}function d(r,i,a,s){var c=0;for(c=0;c<i;c++)o[c]=e[r+c];var l=0,u=a,d=r;if(e[d++]=e[u++],--s===0){for(c=0;c<i;c++)e[d+c]=o[l+c];return}if(i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l];return}for(var f=n,p,m,h;;){p=0,m=0,h=!1;do if(t(e[u],o[l])<0){if(e[d++]=e[u++],m++,p=0,--s===0){h=!0;break}}else if(e[d++]=o[l++],p++,m=0,--i===1){h=!0;break}while((p|m)<f);if(h)break;do{if(p=Kr(e[u],o,l,i,0,t),p!==0){for(c=0;c<p;c++)e[d+c]=o[l+c];if(d+=p,l+=p,i-=p,i<=1){h=!0;break}}if(e[d++]=e[u++],--s===0){h=!0;break}if(m=Gr(o[l],e,u,s,0,t),m!==0){for(c=0;c<m;c++)e[d+c]=e[u+c];if(d+=m,u+=m,s-=m,s===0){h=!0;break}}if(e[d++]=o[l++],--i===1){h=!0;break}f--}while(p>=Br||m>=Br);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else if(i===0)throw Error();else for(c=0;c<i;c++)e[d+c]=o[l+c]}function f(r,i,a,s){var c=0;for(c=0;c<s;c++)o[c]=e[a+c];var l=r+i-1,u=s-1,d=a+s-1,f=0,p=0;if(e[d--]=e[l--],--i===0){for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c];return}if(s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)<m);if(_)break;do{if(h=i-Kr(o[u],e,r,i,i-1,t),h!==0){for(d-=h,l-=h,i-=h,p=d+1,f=l+1,c=h-1;c>=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-Gr(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c<g;c++)e[p+c]=o[f+c];if(s<=1){_=!0;break}}if(e[d--]=e[l--],--i===0){_=!0;break}m--}while(h>=Br||g>=Br);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c]}return{mergeRuns:c,forceMergeRuns:l,pushRun:s}}function Jr(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<zr){a=Hr(e,n,r,t),Wr(e,n,r,n+a,t);return}var o=qr(e,t),s=Vr(i);do{if(a=Hr(e,n,r,t),a<s){var c=i;c>s&&(c=s),Wr(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var Yr=!1;function Xr(){Yr||(Yr=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function Zr(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Qr=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Zr}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t||=!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,Jr(n,Zr)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath();if(e.ignoreClip)t=null;else if(r){t=t?t.slice():[];for(var i=r,a=e;i;)i.parent=a,i.updateTransform(),t.push(i),a=i,i=i.getClipPath()}if(e.childrenRef){for(var o=e.childrenRef(),s=0;s<o.length;s++){var c=o[s];e.__dirty&&(c.__dirty|=1),this._updateAndAddDisplayable(c,t,n)}e.__dirty=0}else{var l=e;t&&t.length?l.__clipPaths=t:l.__clipPaths&&l.__clipPaths.length>0&&(l.__clipPaths=[]),isNaN(l.z)&&(Xr(),l.z=0),isNaN(l.z2)&&(Xr(),l.z2=0),isNaN(l.zlevel)&&(Xr(),l.zlevel=0),this._displayList[this._displayListLen++]=l}var u=e.getDecalElement&&e.getDecalElement();u&&this._updateAndAddDisplayable(u,t,n);var d=e.getTextGuideLine();d&&this._updateAndAddDisplayable(d,t,n);var f=e.getTextContent();f&&this._updateAndAddDisplayable(f,t,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var r=jt(this._roots,e);r>=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),$r=st.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},ei={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=1.70158*1.525;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-ei.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?ei.bounceIn(e*2)*.5:ei.bounceOut(e*2-1)*.5+.5}},ti=Math.pow,ni=Math.sqrt,ri=1e-8,ii=1e-4,ai=ni(3),oi=1/3,si=mn(),ci=mn(),li=mn();function ui(e){return e>-ri&&e<ri}function di(e){return e>ri||e<-ri}function fi(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function pi(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function mi(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(ui(u)&&ui(d))if(ui(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}else{var h=d*d-4*u*f;if(ui(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=ni(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-ti(-y,oi):ti(y,oi),b=b<0?-ti(-b,oi):ti(b,oi);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*ni(u*u*u)),S=Math.acos(x)/3,C=ni(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+ai*Math.sin(S)))/(3*o),T=(-s+C*(w-ai*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function hi(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(ui(o)){if(di(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(ui(u))i[0]=-a/(2*o);else if(u>0){var d=ni(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function gi(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function _i(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;si[0]=c,si[1]=l;for(var v=0;v<1;v+=.05)ci[0]=fi(e,n,i,o,v),ci[1]=fi(t,r,a,s,v),g=On(si,ci),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<ii);y++)m=d-f,h=d+f,ci[0]=fi(e,n,i,o,m),ci[1]=fi(t,r,a,s,m),g=On(ci,si),m>=0&&g<p?(d=m,p=g):(li[0]=fi(e,n,i,o,h),li[1]=fi(t,r,a,s,h),_=On(li,si),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=fi(e,n,i,o,d),u[1]=fi(t,r,a,s,d)),ni(p)}function vi(e,t,n,r,i,a,o,s,c){for(var l=e,u=t,d=0,f=1/c,p=1;p<=c;p++){var m=p*f,h=fi(e,n,i,o,m),g=fi(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function yi(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function bi(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function xi(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(ui(a)){if(di(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(ui(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=ni(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Si(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Ci(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function wi(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;si[0]=o,si[1]=s;for(var f=0;f<1;f+=.05){ci[0]=yi(e,n,i,f),ci[1]=yi(t,r,a,f);var p=On(si,ci);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<ii);m++){var h=l-u,g=l+u;ci[0]=yi(e,n,i,h),ci[1]=yi(t,r,a,h);var p=On(ci,si);if(h>=0&&p<d)l=h,d=p;else{li[0]=yi(e,n,i,g),li[1]=yi(t,r,a,g);var _=On(li,si);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=yi(e,n,i,l),c[1]=yi(t,r,a,l)),ni(d)}function Ti(e,t,n,r,i,a,o){for(var s=e,c=t,l=0,u=1/o,d=1;d<=o;d++){var f=d*u,p=yi(e,n,i,f),m=yi(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var Ei=/cubic-bezier\(([0-9,\.e ]+)\)/;function Di(e){var t=e&&Ei.exec(e);if(t){var n=t[1].split(`,`),r=+en(n[0]),i=+en(n[1]),a=+en(n[2]),o=+en(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:mi(0,r,a,1,e,s)&&fi(0,i,o,1,s[0])}}}var Oi=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||fn,this.ondestroy=e.ondestroy||fn,this.onrestart=e.onrestart||fn,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1)if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=U(e)?e:ei[e]||Di(e)},e}(),ki=function(){function e(e){this.value=e}return e}(),Ai=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new ki(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),ji=function(){function e(e){this._list=new Ai,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new ki(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),Mi={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ni(e){return e=Math.round(e),e<0?0:e>255?255:e}function Pi(e){return e=Math.round(e),e<0?0:e>360?360:e}function Fi(e){return e<0?0:e>1?1:e}function Ii(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Ni(parseFloat(t)/100*255):Ni(parseInt(t,10))}function Li(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Fi(parseFloat(t)/100):Fi(parseFloat(t))}function Ri(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function zi(e,t,n){return e+(t-e)*n}function Bi(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Vi(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Hi=new ji(20),Ui=null;function Wi(e,t){Ui&&Vi(Ui,t),Ui=Hi.put(e,Ui||t.slice())}function Gi(e,t){if(e){t||=[];var n=Hi.get(e);if(n)return Vi(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in Mi)return Vi(t,Mi[r]),Wi(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){Bi(t,0,0,0,1);return}return Bi(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Wi(e,t),t}else if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Bi(t,0,0,0,1);return}return Bi(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Wi(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?Bi(t,+l[0],+l[1],+l[2],1):Bi(t,0,0,0,1);u=Li(l.pop());case`rgb`:if(l.length>=3)return Bi(t,Ii(l[0]),Ii(l[1]),Ii(l[2]),l.length===3?u:Li(l[3])),Wi(e,t),t;Bi(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Bi(t,0,0,0,1);return}return l[3]=Li(l[3]),Ki(l,t),Wi(e,t),t;case`hsl`:if(l.length!==3){Bi(t,0,0,0,1);return}return Ki(l,t),Wi(e,t),t;default:return}}Bi(t,0,0,0,1)}}function Ki(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Li(e[1]),i=Li(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Bi(t,Ni(Ri(o,a,n+1/3)*255),Ni(Ri(o,a,n)*255),Ni(Ri(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function qi(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Ji(e,t){var n=Gi(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return $i(n,n.length===4?`rgba`:`rgb`)}}function Yi(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Ni(zi(o[0],s[0],c)),n[1]=Ni(zi(o[1],s[1],c)),n[2]=Ni(zi(o[2],s[2],c)),n[3]=Fi(zi(o[3],s[3],c)),n}}function Xi(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=Gi(t[i]),s=Gi(t[a]),c=r-i,l=$i([Ni(zi(o[0],s[0],c)),Ni(zi(o[1],s[1],c)),Ni(zi(o[2],s[2],c)),Fi(zi(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Zi(e,t,n,r){var i=Gi(e);if(e)return i=qi(i),t!=null&&(i[0]=Pi(t)),n!=null&&(i[1]=Li(n)),r!=null&&(i[2]=Li(r)),$i(Ki(i),`rgba`)}function Qi(e,t){var n=Gi(e);if(n&&t!=null)return n[3]=Fi(t),$i(n,`rgba`)}function $i(e,t){if(!(!e||!e.length)){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function ea(e,t){var n=Gi(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var ta=new ji(100);function na(e){if(W(e)){var t=ta.get(e);return t||(t=Ji(e,-.1),ta.put(e,t)),t}else if(Gt(e)){var n=I({},e);return n.colorStops=z(e.colorStops,function(e){return{offset:e.offset,color:Ji(e.color,-.1)}}),n}return e}var ra=Math.round;function ia(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=Gi(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var aa=1e-4;function oa(e){return e<aa&&e>-aa}function sa(e){return ra(e*1e3)/1e3}function ca(e){return ra(e*1e4)/1e4}function la(e){return`matrix(`+sa(e[0])+`,`+sa(e[1])+`,`+sa(e[2])+`,`+sa(e[3])+`,`+ca(e[4])+`,`+ca(e[5])+`)`}var ua={left:`start`,right:`end`,center:`middle`,middle:`middle`};function da(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function fa(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function pa(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function ma(e){return e&&!!e.image}function ha(e){return e&&!!e.svgElement}function ga(e){return ma(e)||ha(e)}function _a(e){return e.type===`linear`}function va(e){return e.type===`radial`}function ya(e){return e&&(e.type===`linear`||e.type===`radial`)}function ba(e){return`url(#`+e+`)`}function xa(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Sa(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*pn,i=K(e.scaleX,1),a=K(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+ra(o*pn)+`deg, `+ra(s*pn)+`deg)`),c.join(` `)}var Ca=(function(){return st.hasGlobalWindow&&U(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<`u`?function(e){return Buffer.from(e).toString(`base64`)}:function(e){return null}})(),wa=Array.prototype.slice;function Ta(e,t,n){return(t-e)*n+e}function Ea(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=Ta(t[a],n[a],r);return e}function Da(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=Ta(t[o][s],n[o][s],r)}return e}function Oa(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function ka(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+n[o][s]*r}return e}function Aa(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(n,r);s++)i.push({offset:o.offset,color:o.color.slice()})}function ja(e,t,n){var r=e,i=t;if(!(!r.push||!i.push)){var a=r.length,o=i.length;if(a!==o)if(a>o)r.length=o;else for(var s=a;s<o;s++)r.push(n===1?i[s]:wa.call(i[s]));for(var c=r[0]&&r[0].length,s=0;s<r.length;s++)if(n===1)isNaN(r[s])&&(r[s]=i[s]);else for(var l=0;l<c;l++)isNaN(r[s][l])&&(r[s][l]=i[s][l])}}function Ma(e){if(Pt(e)){var t=e.length;if(Pt(e[0])){for(var n=[],r=0;r<t;r++)n.push(wa.call(e[r]));return n}return wa.call(e)}return e}function Na(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],`rgba(`+e.join(`,`)+`)`}function Pa(e){return Pt(e&&e[0])?2:1}var Fa=0,Ia=1,La=2,Ra=3,za=4,Ba=5,Va=6;function Ha(e){return e===za||e===Ba}function Ua(e){return e===Ia||e===La}var Wa=[0,0,0,0],Ga=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Va,s=t;if(Pt(t)){var c=Pa(t);o=c,(c===1&&!Vt(t[0])||c===2&&!Vt(t[0][0]))&&(a=!0)}else if(Vt(t)&&!Jt(t))o=Fa;else if(W(t))if(!isNaN(+t))o=Fa;else{var l=Gi(t);l&&(s=l,o=Ra)}else if(Gt(t)){var u=I({},s);u.colorStops=z(t.colorStops,function(e){return{offset:e.offset,color:Gi(e.color)}}),_a(t)?o=za:va(t)&&(o=Ba),s=u}i===0?this.valType=o:(o!==this.valType||o===Va)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=U(n)?n:ei[n]||Di(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Ua(r),c=Ha(r),l=0;l<i;l++){var u=n[l],d=u.value,f=a.value;u.percent=u.time/e,o||(s&&l!==i-1?ja(d,f,r):c&&Aa(d.colorStops,f.colorStops))}if(!o&&r!==Ba&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,l=0;l<i;l++)r===Fa?n[l].additiveValue=n[l].value-p:r===Ra?n[l].additiveValue=Oa([],n[l].value,p,-1):Ua(r)&&(n[l].additiveValue=r===Ia?Oa([],n[l].value,p,-1):ka([],n[l].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,r=n?`additiveValue`:`value`,i=this.valType,a=this.keyframes,o=a.length,s=this.propName,c=i===Ra,l,u=this._lastFr,d=Math.min,f,p;if(o===1)f=p=a[0];else{if(t<0)l=0;else if(t<this._lastFrP){for(l=d(u+1,o-1);l>=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;l<o&&!(a[l].percent>t);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Wa:e[s];if((Ua(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Ua(i))i===Ia?Ea(g,f[r],p[r],h):Da(g,f[r],p[r],h);else if(Ha(i)){var _=f[r],v=p[r],y=i===za;e[s]={type:y?`linear`:`radial`,x:Ta(_.x,v.x,h),y:Ta(_.y,v.y,h),colorStops:z(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Ta(e.offset,n.offset,h),color:Na(Ea([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Ta(_.x2,v.x2,h),e[s].y2=Ta(_.y2,v.y2,h)):e[s].r=Ta(_.r,v.r,h)}else if(c)Ea(g,f[r],p[r],h),n||(e[s]=Na(g));else{var b=Ta(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===Fa?e[n]=e[n]+r:t===Ra?(Gi(e[n],Wa),Oa(Wa,Wa,r,1),e[n]=Na(Wa)):t===Ia?Oa(e[n],e[n],r,1):t===La&&ka(e[n],e[n],r,1)},e}(),Ka=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){kt(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,Rt(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a<n.length;a++){var o=n[a],s=i[o];if(!s){s=i[o]=new Ga(o);var c=void 0,l=this._getAdditiveTrack(o);if(l){var u=l.keyframes,d=u[u.length-1];c=d&&d.value,l.valType===Ra&&c&&(c=Na(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,Ma(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Ma(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var a=this._trackKeys[i],o=this._tracks[a],s=this._getAdditiveTrack(a),c=o.keyframes,l=c.length;if(o.prepare(r,s),o.needsAnimate())if(!this._allowDiscrete&&o.discrete){var u=c[l-1];u&&(t._target[o.propName]=u.rawValue),o.setFinished()}else n.push(o)}if(n.length||this._force){var d=new Oi({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,a=0;a<r.length;a++)if(r[a]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(var a=0;a<n.length;a++)n[a].step(t._target,e);var o=t._onframeCbs;if(o)for(var a=0;a<o.length;a++)o[a](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||=[],this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||=[],this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||=[],this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return z(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var a=n[e[i]];a&&!a.isFinished()&&(t?a.step(this._target,1):this._started===1&&a.step(this._target,0),a.setFinished())}for(var o=!0,i=0;i<r.length;i++)if(!n[r[i]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},e.prototype.saveTo=function(e,t,n){if(e){t||=this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(!(!a||a.isFinished())){var o=a.keyframes,s=o[n?0:o.length-1];s&&(e[i]=Ma(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=Rt(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var a=i.keyframes;if(a.length>1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function qa(){return new Date().getTime()}var Ja=function(e){N(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=qa()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&($r(t),!e._paused&&e.update())}$r(t)},t.prototype.start=function(){this._running||(this._time=qa(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=qa(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=qa()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new Ka(e,t.loop);return this.addAnimator(n),n},t}(Fn),Ya=300,Xa=st.domSupported,Za=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:z(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),Qa={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},$a=!1;function eo(e){var t=e.pointerType;return t===`pen`||t===`touch`}function to(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function no(e){e&&(e.zrByTouch=!0)}function ro(e,t){return tr(e.dom,new ao(e,t),!0)}function io(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var ao=function(){function e(e,t){this.stopPropagation=fn,this.stopImmediatePropagation=fn,this.preventDefault=fn,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),oo={mousedown:function(e){e=tr(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=tr(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=tr(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=tr(this.dom,e);var t=e.toElement||e.relatedTarget;io(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){$a=!0,e=tr(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){$a||(e=tr(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=tr(this.dom,e),no(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),oo.mousemove.call(this,e),oo.mousedown.call(this,e)},touchmove:function(e){e=tr(this.dom,e),no(e),this.handler.processGesture(e,`change`),oo.mousemove.call(this,e)},touchend:function(e){e=tr(this.dom,e),no(e),this.handler.processGesture(e,`end`),oo.mouseup.call(this,e),new Date-+this.__lastTouchMoment<Ya&&oo.click.call(this,e)},pointerdown:function(e){oo.mousedown.call(this,e)},pointermove:function(e){eo(e)||oo.mousemove.call(this,e)},pointerup:function(e){oo.mouseup.call(this,e)},pointerout:function(e){eo(e)||oo.mouseout.call(this,e)}};R([`click`,`dblclick`,`contextmenu`],function(e){oo[e]=function(t){t=tr(this.dom,t),this.trigger(e,t)}});var so={pointermove:function(e){eo(e)||so.mousemove.call(this,e)},pointerup:function(e){so.mouseup.call(this,e)},mousemove:function(e){this.trigger(`mousemove`,e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger(`mouseup`,e),t&&(e.zrEventControl=`only_globalout`,this.trigger(`mouseout`,e))}};function co(e,t){var n=t.domHandlers;st.pointerEventsSupported?R(Za.pointer,function(r){uo(t,r,function(t){n[r].call(e,t)})}):(st.touchEventsSupported&&R(Za.touch,function(r){uo(t,r,function(i){n[r].call(e,i),to(t)})}),R(Za.mouse,function(r){uo(t,r,function(i){i=er(i),t.touching||n[r].call(e,i)})}))}function lo(e,t){st.pointerEventsSupported?R(Qa.pointer,n):st.touchEventsSupported||R(Qa.mouse,n);function n(n){function r(r){r=er(r),io(e,r.target)||(r=ro(e,r),t.domHandlers[n].call(e,r))}uo(t,n,r,{capture:!0})}}function uo(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,rr(e.domTarget,t,n,r)}function fo(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&ir(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var po=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),mo=function(e){N(t,e);function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new po(t,oo),Xa&&(r._globalHandlerScope=new po(document,so)),co(r,r._localHandlerScope),r}return t.prototype.dispose=function(){fo(this._localHandlerScope),Xa&&fo(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||`default`)},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,Xa&&this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?lo(this,t):fo(t)}},t}(Fn),ho=1;st.hasGlobalWindow&&(ho=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var go=ho,_o=.4,vo=`#333`,yo=`#ccc`,bo=`#eee`,xo=fr,So=5e-5;function Co(e){return e>So||e<-So}var wo=[],To=[],Eo=dr(),Do=Math.abs,Oo=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Co(this.rotation)||Co(this.x)||Co(this.y)||Co(this.scaleX-1)||Co(this.scaleY-1)||Co(this.skewX)||Co(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(xo(n),this.invTransform=null);return}n||=dr(),t?this.getLocalTransform(n):xo(n),e&&(t?mr(n,e,n):pr(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(wo);var n=wo[0]<0?-1:1,r=wo[1]<0?-1:1,i=((wo[0]-n)*t+n)/wo[0]||0,a=((wo[1]-r)*t+r)/wo[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}this.invTransform=this.invTransform||dr(),vr(this.invTransform,e)},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||dr(),mr(To,e.invTransform,t),t=To);var n=this.originX,r=this.originY;(n||r)&&(Eo[4]=n,Eo[5]=r,mr(To,t,Eo),To[4]-=n,To[5]-=r,t=To),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&An(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&An(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Do(e[0]-1)>1e-10&&Do(e[3]-1)>1e-10?Math.sqrt(Do(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){Ao(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&gr(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),ko=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function Ao(e,t){for(var n=0;n<ko.length;n++){var r=ko[n];e[r]=t[r]}}var jo={};function Mo(e,t){t||=`12px sans-serif`;var n=jo[t];n||=jo[t]=new ji(500);var r=n.get(e);return r??(r=ht.measureText(e,t).width,n.put(e,r)),r}function No(e,t,n,r){var i=Mo(e,t),a=Lo(t);return new X(Fo(0,i,n),Io(0,a,r),i,a)}function Po(e,t,n,r){var i=((e||``)+``).split(`
1
+ import{o as e,r as t}from"./rolldown-runtime-DAXXjFlN.js";import{t as n}from"./react-Bb3IsNbi.js";import{k as r}from"./hooks-tBACnBdQ.js";import{n as i,r as a}from"./Combination-BPFTKsTn.js";import{t as o}from"./use-tinybird-token-DHgOnrNu.js";import{Fi as s}from"./index-B5yxmQNp.js";var c=(e,t,n=``)=>{if(!e)return``;let r;r=e.local?.enabled?e.local.endpoint||``:e.endpointBrowser?e.endpointBrowser:e.endpoint||``;let i=e.version?`${t}_${e.version}`:t;return`${r}/v0/pipes/${i}.json?${n}`},l=e(n(),1),u={0:`#FFFFFF`,4:`#F6F7F9`,12:`#E8E9ED`,24:`#CBCCD1`,40:`#A5A7B4`,64:`#636679`,100:`#25283D`},d={default:`#27F795`,light:`#EBFEF5`,dark:`#008060`},f={default:`#DE1616`,dark:`#DE1616`,light:`#FDECEC`},p={default:`#2D27F7`,code:`#00C1FF`,light:`#E0EFFF`,dark:`#1170D9`},m={neutral:u,primary:d,error:f,alternative:p,secondary:{default:u[100],light:u[40],dark:`#161724`},background:{default:u[0],1:u[4],2:u[12],dark:u[100],brandLight:d.light,brand:d.default,brandDark:d.default},border:{inverse:u[0],1:u[12],2:u[24],3:u[64],brand:d.default,brandDark:d.dark,error:f.default},text:{default:u[100],1:u[64],2:u[40],3:u[40],inverse:u[0],brand:d.default,brandDark:d.dark,blue:p.default,error:f.default},icon:{default:u[100],1:u[64],2:u[40],3:u[40],inverse:u[0],brand:d.default,brandDark:d.dark,error:f.default},warning:{light:`#FFFBD6`,dark:`#856100`},quarantine:{light:`#fef5f1`,dark:`#f9844a`},information:{light:`#E0EFFF`,dark:`#1170D9`},datasource:`#AB49D0`,node:`#FEA827`,git:`#F03C2E`,workspace:{pro:`#FF631A`}},h=[`#27F795`,`#008060`,`#0EB1B9`,`#9263AF`,`#5A6FC0`,`#86BFDB`,`#FFC145`,`#FF6B6C`,`#DC82C8`,`#FFC0F1`],g=m.text.default;m.border[1];var _=m.background.default,v=`Inter, sans-serif`,y=`12px`,b=r(),x=Object.prototype.hasOwnProperty;function S(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&S(e[r],t[r]););return r===-1}if(!n||typeof e==`object`){for(n in r=0,e)if(x.call(e,n)&&++r&&!x.call(t,n)||!(n in t)||!S(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var C=new WeakMap,w=()=>{},T=Object,E=e=>e===void 0,D=e=>typeof e==`function`,O=(e,t)=>({...e,...t}),k=e=>D(e.then),A={},j={},M=`undefined`,ee=typeof window!=M,te=typeof document!=M,ne=ee&&`Deno`in window,re=()=>ee&&typeof window.requestAnimationFrame!=M,ie=(e,t)=>{let n=C.get(e);return[()=>!E(t)&&e.get(t)||A,r=>{if(!E(t)){let i=e.get(t);t in j||(j[t]=i),n[5](t,O(i,r),i||A)}},n[6],()=>!E(t)&&t in j?j[t]:!E(t)&&e.get(t)||A]},ae=!0,oe=()=>ae,[se,ce]=ee&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[w,w],le=()=>{let e=te&&document.visibilityState;return E(e)||e!==`hidden`},ue=e=>(te&&document.addEventListener(`visibilitychange`,e),se(`focus`,e),()=>{te&&document.removeEventListener(`visibilitychange`,e),ce(`focus`,e)}),de=e=>{let t=()=>{ae=!0,e()},n=()=>{ae=!1};return se(`online`,t),se(`offline`,n),()=>{ce(`online`,t),ce(`offline`,n)}},fe={isOnline:oe,isVisible:le},pe={initFocus:ue,initReconnect:de},me=!l.useId,he=!ee||ne,ge=e=>re()?window.requestAnimationFrame(e):setTimeout(e,1),_e=he?l.useEffect:l.useLayoutEffect,ve=typeof navigator<`u`&&navigator.connection,ye=!he&&ve&&([`slow-2g`,`2g`].includes(ve.effectiveType)||ve.saveData),be=new WeakMap,xe=e=>T.prototype.toString.call(e),Se=(e,t)=>e===`[object ${t}]`,Ce=0,we=e=>{let t=typeof e,n=xe(e),r=Se(n,`Date`),i=Se(n,`RegExp`),a=Se(n,`Object`),o,s;if(T(e)===e&&!r&&!i){if(o=be.get(e),o)return o;if(o=++Ce+`~`,be.set(e,o),Array.isArray(e)){for(o=`@`,s=0;s<e.length;s++)o+=we(e[s])+`,`;be.set(e,o)}if(a){o=`#`;let t=T.keys(e).sort();for(;!E(s=t.pop());)E(e[s])||(o+=s+`:`+we(e[s])+`,`);be.set(e,o)}}else o=r?e.toJSON():t==`symbol`?e.toString():t==`string`?JSON.stringify(e):``+e;return o},Te=e=>{if(D(e))try{e=e()}catch{e=``}let t=e;return e=typeof e==`string`?e:(Array.isArray(e)?e.length:e)?we(e):``,[e,t]},Ee=0,De=()=>++Ee;async function Oe(...e){let[t,n,r,i]=e,a=O({populateCache:!0,throwOnError:!0},typeof i==`boolean`?{revalidate:i}:i||{}),o=a.populateCache,s=a.rollbackOnError,c=a.optimisticData,l=e=>typeof s==`function`?s(e):s!==!1,u=a.throwOnError;if(D(n)){let e=n,r=[],i=t.keys();for(let n of i)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&r.push(n);return Promise.all(r.map(d))}return d(n);async function d(n){let[i]=Te(n);if(!i)return;let[s,d]=ie(t,i),[f,p,m,h]=C.get(t),g=()=>{let e=f[i];return(D(a.revalidate)?a.revalidate(s().data,n):a.revalidate!==!1)&&(delete m[i],delete h[i],e&&e[0])?e[0](2).then(()=>s().data):s().data};if(e.length<3)return g();let _=r,v,y=!1,b=De();p[i]=[b,0];let x=!E(c),S=s(),w=S.data,T=S._c,O=E(T)?w:T;if(x&&(c=D(c)?c(O,w):c,d({data:c,_c:O})),D(_))try{_=_(O)}catch(e){v=e,y=!0}if(_&&k(_))if(_=await _.catch(e=>{v=e,y=!0}),b!==p[i][0]){if(y)throw v;return _}else y&&x&&l(v)&&(o=!0,d({data:O,_c:void 0}));if(o&&(y||(D(o)?d({data:o(_,O),error:void 0,_c:void 0}):d({data:_,error:void 0,_c:void 0}))),p[i][1]=De(),Promise.resolve(g()).then(()=>{d({_c:void 0})}),y){if(u)throw v;return}return _}}var ke=(e,t)=>{for(let n in e)e[n][0]&&e[n][0](t)},Ae=(e,t)=>{if(!C.has(e)){let n=O(pe,t),r=Object.create(null),i=Oe.bind(void 0,e),a=w,o=Object.create(null),s=(e,t)=>{let n=o[e]||[];return o[e]=n,n.push(t),()=>{let e=n.indexOf(t);e>=0&&(n[e]=n[n.length-1],n.pop())}},c=(t,n,r)=>{e.set(t,n);let i=o[t];if(i)for(let e of i)e(n,r)},l=()=>{if(!C.has(e)&&(C.set(e,[r,Object.create(null),Object.create(null),Object.create(null),i,c,s]),!he)){let t=n.initFocus(setTimeout.bind(void 0,ke.bind(void 0,r,0))),i=n.initReconnect(setTimeout.bind(void 0,ke.bind(void 0,r,1)));a=()=>{t&&t(),i&&i(),C.delete(e)}}};return l(),[e,i,l,a]}return[e,C.get(e)[4]]},je=(e,t,n,r,i)=>{let a=n.errorRetryCount,o=i.retryCount,s=~~((Math.random()+.5)*(1<<(o<8?o:8)))*n.errorRetryInterval;!E(a)&&o>a||setTimeout(r,s,i)},Me=S,[Ne,Pe]=Ae(new Map),Fe=O({onLoadingSlow:w,onSuccess:w,onError:w,onErrorRetry:je,onDiscarded:w,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:ye?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:ye?5e3:3e3,compare:Me,isPaused:()=>!1,cache:Ne,mutate:Pe,fallback:{}},fe),Ie=(e,t)=>{let n=O(e,t);if(t){let{use:r,fallback:i}=e,{use:a,fallback:o}=t;r&&a&&(n.use=r.concat(a)),i&&o&&(n.fallback=O(i,o))}return n},Le=(0,l.createContext)({}),Re=e=>{let{value:t}=e,n=(0,l.useContext)(Le),r=D(t),i=(0,l.useMemo)(()=>r?t(n):t,[r,n,t]),a=(0,l.useMemo)(()=>r?i:Ie(n,i),[r,n,i]),o=i&&i.provider,s=(0,l.useRef)(void 0);o&&!s.current&&(s.current=Ae(o(a.cache||Ne),i));let c=s.current;return c&&(a.cache=c[0],a.mutate=c[1]),_e(()=>{if(c)return c[2]&&c[2](),c[3]},[]),(0,l.createElement)(Le.Provider,O(e,{value:a}))},ze=ee&&window.__SWR_DEVTOOLS_USE__,Be=ze?window.__SWR_DEVTOOLS_USE__:[],Ve=()=>{ze&&(window.__SWR_DEVTOOLS_REACT__=l.default)},He=e=>D(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],Ue=()=>{let e=(0,l.useContext)(Le);return(0,l.useMemo)(()=>O(Fe,e),[e])},We=Be.concat(e=>(t,n,r)=>e(t,n&&((...e)=>{let[r]=Te(t),[,,,i]=C.get(Ne);if(r.startsWith(`$inf$`))return n(...e);let a=i[r];return E(a)?n(...e):(delete i[r],a)}),r)),Ge=e=>function(...t){let n=Ue(),[r,i,a]=He(t),o=Ie(n,a),s=e,{use:c}=o,l=(c||[]).concat(We);for(let e=l.length;e--;)s=l[e](s);return s(r,i||o.fetcher||null,o)},Ke=(e,t,n)=>{let r=t[e]||(t[e]=[]);return r.push(n),()=>{let e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}};Ve();var qe=l.default.use||(e=>{switch(e.status){case`pending`:throw e;case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:throw e.status=`pending`,e.then(t=>{e.status=`fulfilled`,e.value=t},t=>{e.status=`rejected`,e.reason=t}),e}}),Je={dedupe:!0},Ye=Promise.resolve(void 0);Ye.status=`fulfilled`,Ye.value=void 0;var Xe=()=>w,Ze=(e,t,n)=>{let{cache:r,compare:i,suspense:a,fallbackData:o,revalidateOnMount:s,revalidateIfStale:c,refreshInterval:u,refreshWhenHidden:d,refreshWhenOffline:f,keepPreviousData:p,strictServerPrefetchWarning:m}=n,[h,g,_,v]=C.get(r),[y,x]=Te(e),S=(0,l.useRef)(!1),w=(0,l.useRef)(!1),T=(0,l.useRef)(y),A=(0,l.useRef)(t),j=(0,l.useRef)(n),M=()=>j.current,ee=()=>M().isVisible()&&M().isOnline(),[te,ne,re,ae]=ie(r,y),oe=(0,l.useRef)({}).current,se=E(o)?E(n.fallback)?void 0:n.fallback[y]:o,ce=(e,t)=>{for(let n in oe){let r=n;if(r===`data`){if(!i(e[r],t[r])&&(!E(e[r])||!i(xe,t[r])))return!1}else if(t[r]!==e[r])return!1}return!0},le=!S.current,ue=(0,l.useMemo)(()=>{let e=te(),n=ae(),r=e=>{let n=O(e);return delete n._k,!(!y||!t||M().isPaused())&&(le&&!E(s)?s:E(E(se)?n.data:se)||c)?{isValidating:!0,isLoading:!0,...n}:n},i=r(e),a=e===n?i:r(n),o=i;return[()=>{let e=r(te());return ce(e,o)?(o.data=e.data,o.isLoading=e.isLoading,o.isValidating=e.isValidating,o.error=e.error,o):(o=e,e)},()=>a]},[r,y]),de=(0,b.useSyncExternalStore)((0,l.useCallback)(e=>re(y,(t,n)=>{ce(n,t)||e()}),[r,y]),ue[0],ue[1]),fe=h[y]&&h[y].length>0,pe=de.data,ve=E(pe)?se&&k(se)?qe(se):se:pe,ye=de.error,be=(0,l.useRef)(ve),xe=p?E(pe)?E(be.current)?ve:be.current:pe:ve,Se=y&&E(ve),Ce=(0,l.useRef)(null);!he&&(0,b.useSyncExternalStore)(Xe,()=>(Ce.current=!1,Ce),()=>(Ce.current=!0,Ce));let we=Ce.current;m&&we&&!a&&Se&&console.warn(`Missing pre-initiated data for serialized key "${y}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);let Ee=!y||!t||M().isPaused()||fe&&!E(ye)?!1:le&&!E(s)?s:a?E(ve)?!1:c:E(ve)||c,ke=le&&Ee,Ae=E(de.isValidating)?ke:de.isValidating,je=E(de.isLoading)?ke:de.isLoading,Me=(0,l.useCallback)(async e=>{let t=A.current;if(!y||!t||w.current||M().isPaused())return!1;let r,a,o=!0,s=e||{},c=!_[y]||!s.dedupe,l=()=>me?!w.current&&y===T.current&&S.current:y===T.current,u={isValidating:!1,isLoading:!1},d=()=>{ne(u)},f=()=>{let e=_[y];e&&e[1]===a&&delete _[y]},p={isValidating:!0};E(te().data)&&(p.isLoading=!0);try{if(c&&(ne(p),n.loadingTimeout&&E(te().data)&&setTimeout(()=>{o&&l()&&M().onLoadingSlow(y,n)},n.loadingTimeout),_[y]=[t(x),De()]),[r,a]=_[y],r=await r,c&&setTimeout(f,n.dedupingInterval),!_[y]||_[y][1]!==a)return c&&l()&&M().onDiscarded(y),!1;u.error=void 0;let e=g[y];if(!E(e)&&(a<=e[0]||a<=e[1]||e[1]===0))return d(),c&&l()&&M().onDiscarded(y),!1;let s=te().data;u.data=i(s,r)?s:r,c&&l()&&M().onSuccess(r,y,n)}catch(e){f();let t=M(),{shouldRetryOnError:n}=t;t.isPaused()||(u.error=e,c&&l()&&(t.onError(e,y,t),(n===!0||D(n)&&n(e))&&(!M().revalidateOnFocus||!M().revalidateOnReconnect||ee())&&t.onErrorRetry(e,y,t,e=>{let t=h[y];t&&t[0]&&t[0](3,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return o=!1,d(),!0},[y,r]),Ne=(0,l.useCallback)((...e)=>Oe(r,T.current,...e),[]);if(_e(()=>{A.current=t,j.current=n,E(pe)||(be.current=pe)}),_e(()=>{if(!y)return;let e=Me.bind(void 0,Je),t=0;M().revalidateOnFocus&&(t=Date.now()+M().focusThrottleInterval);let n=Ke(y,h,(n,r={})=>{if(n==0){let n=Date.now();M().revalidateOnFocus&&n>t&&ee()&&(t=n+M().focusThrottleInterval,e())}else if(n==1)M().revalidateOnReconnect&&ee()&&e();else if(n==2)return Me();else if(n==3)return Me(r)});return w.current=!1,T.current=y,S.current=!0,ne({_k:x}),Ee&&(_[y]||(E(ve)||he?e():ge(e))),()=>{w.current=!0,n()}},[y]),_e(()=>{let e;function t(){let t=D(u)?u(te().data):u;t&&e!==-1&&(e=setTimeout(n,t))}function n(){!te().error&&(d||M().isVisible())&&(f||M().isOnline())?Me(Je).then(t):t()}return t(),()=>{e&&=(clearTimeout(e),-1)}},[u,d,f,y]),(0,l.useDebugValue)(xe),a){if(!me&&he&&Se)throw Error(`Fallback data is required when using Suspense in SSR.`);Se&&(A.current=t,j.current=n,w.current=!1);let e=v[y];if(qe(!E(e)&&Se?Ne(e):Ye),!E(ye)&&Se)throw ye;let r=Se?Me(Je):Ye;!E(xe)&&Se&&(r.status=`fulfilled`,r.value=!0),qe(r)}return{mutate:Ne,get data(){return oe.data=!0,xe},get error(){return oe.error=!0,ye},get isValidating(){return oe.isValidating=!0,Ae},get isLoading(){return oe.isLoading=!0,je}}};T.defineProperty(Re,`defaultValue`,{value:Fe});var Qe=Ge(Ze);function $e(e){return Object.entries(e).reduce((e,[t,n])=>n===void 0?e:Object.assign(Object.assign({},e),{[t]:n}),{})}function et(e,t,n){let r;if(e)try{r=new URL(e);for(let[e,t]of Object.entries(n))typeof t!=`string`&&typeof t!=`number`||r.searchParams.set(e,String(t));r.searchParams.has(`from`)||r.searchParams.set(`from`,`chart`),t&&r.searchParams.set(`token`,t)}catch(e){console.error(e)}return r}function tt(e,t){return i(this,void 0,void 0,function*(){let n=new URL(e),r=Object.assign({},t);if(n.toString().length>2048){let e={};for(let[t,r]of n.searchParams.entries())t!==`token`&&t!==`from`&&(n.searchParams.delete(t),e[t]=r);r={method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(Object.assign(Object.assign({},r),e))}}let i=yield fetch(n,r);if(!i.ok)throw Error(`Error: ${(yield i.text())||`Could not fetch data`}`);return yield i.json()})}l.createContext({backgroundColor:_,borderColor:void 0,borderRadius:void 0,boxShadow:void 0,colorPalette:h,padding:void 0,fontFamily:v,fontSize:y,textColor:g});var nt=l.createContext({endpoint:void 0,token:void 0});function rt(e){let{fetcher:t=tt,refreshInterval:n,onError:r,onSuccess:i}=Ue(),a=l.useContext(nt),o=$e(e),s=$e(Object.assign(Object.assign({},a),{fetcher:t,refreshInterval:n,onError:r,onSuccess:i}));return Object.assign(Object.assign({},s),o)}l.createContext({fallbackLoading:void 0,fallbackError:void 0}),m.icon.default,m.icon.default;function it(e){var{params:t={}}=e;let n=rt(a(e,[`params`])),{endpoint:r,token:i}=n,o=a(n,[`endpoint`,`token`]),s=et(r,i,t),{data:c,error:l,isLoading:u,mutate:d}=Qe(()=>s?s.toString():null,Object.assign(Object.assign({},o),{shouldRetryOnError:!1}));return{data:c?.data||null,meta:c?.meta||null,statistics:c?.statistics||null,error:l?.message||null,loading:u,endpoint:r,token:i,refresh:d}}var at=function(e,t){return at=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},at(e,t)};function N(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);at(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ot=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),st=new(function(){function e(){this.browser=new ot,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(st.wxa=!0,st.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?st.worker=!0:!st.hasGlobalWindow||`Deno`in window?(st.node=!0,st.svgSupported=!0):ct(navigator.userAgent,st);function ct(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`;var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}var lt=`12px sans-serif`,ut=20,dt=100,ft=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function pt(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32);t[r]=(e.charCodeAt(n)-ut)/dt}return t}var mt=pt(ft),ht={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=ht.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n||=``,r||=`12px sans-serif`;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||12,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var l=mt[n[c]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r}},gt=Ft([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),_t=Ft([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),vt=Object.prototype.toString,yt=Array.prototype,bt=yt.forEach,xt=yt.filter,St=yt.slice,Ct=yt.map,wt=function(){}.constructor,Tt=wt?wt.prototype:null,Et=`__proto__`,Dt=2311;function Ot(){return Dt++}function kt(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function P(e){if(typeof e!=`object`||!e)return e;var t=e,n=vt.call(e);if(n===`[object Array]`){if(!rn(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=P(e[r])}}else if(_t[n]){if(!rn(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!gt[n]&&!rn(e)&&!Wt(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==Et&&(t[o]=P(e[o]));return t}function F(e,t,n){if(!G(t)||!G(e))return n?P(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==Et){var i=e[r],a=t[r];G(a)&&G(i)&&!H(a)&&!H(i)&&!Wt(a)&&!Wt(i)&&!Ht(a)&&!Ht(i)&&!rn(a)&&!rn(i)?F(i,a,n):(n||!(r in e))&&(e[r]=P(t[r]))}return e}function At(e,t){for(var n=e[0],r=1,i=e.length;r<i;r++)n=F(n,e[r],t);return n}function I(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==Et&&(e[n]=t[n]);return e}function L(e,t,n){for(var r=Rt(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}ht.createCanvas;function jt(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function Mt(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}function Nt(e,t,n){if(e=`prototype`in e?e.prototype:e,t=`prototype`in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];a!==`constructor`&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else L(e,t,n)}function Pt(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function R(e,t,n){if(e&&t)if(e.forEach&&e.forEach===bt)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}function z(e,t,n){if(!e)return[];if(!t)return Zt(e);if(e.map&&e.map===Ct)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}function Ft(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function It(e,t,n){if(!e)return[];if(!t)return Zt(e);if(e.filter&&e.filter===xt)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function Lt(e,t,n){if(e&&t){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}}function Rt(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function zt(e,t){var n=[...arguments].slice(2);return function(){return e.apply(t,n.concat(St.call(arguments)))}}var B=Tt&&U(Tt.bind)?Tt.call.bind(Tt.bind):zt;function V(e){var t=[...arguments].slice(1);return function(){return e.apply(this,t.concat(St.call(arguments)))}}function H(e){return Array.isArray?Array.isArray(e):vt.call(e)===`[object Array]`}function U(e){return typeof e==`function`}function W(e){return typeof e==`string`}function Bt(e){return vt.call(e)===`[object String]`}function Vt(e){return typeof e==`number`}function G(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function Ht(e){return!!gt[vt.call(e)]}function Ut(e){return!!_t[vt.call(e)]}function Wt(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function Gt(e){return e.colorStops!=null}function Kt(e){return e.image!=null}function qt(e){return vt.call(e)===`[object RegExp]`}function Jt(e){return e!==e}function Yt(){for(var e=[...arguments],t=0,n=e.length;t<n;t++)if(e[t]!=null)return e[t]}function K(e,t){return e??t}function Xt(e,t,n){return e??t??n}function Zt(e){var t=[...arguments].slice(1);return St.apply(e,t)}function Qt(e){if(typeof e==`number`)return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function $t(e,t){if(!e)throw Error(t)}function en(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var tn=`__ec_primitive__`;function nn(e){e[tn]=!0}function rn(e){return e[tn]}var an=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return Rt(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),on=typeof Map==`function`;function sn(){return on?new Map:new an}var cn=function(){function e(t){var n=H(t);this.data=sn();var r=this;t instanceof e?t.each(i):t&&R(t,i);function i(e,t){n?r.set(e,t):r.set(t,e)}}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return on?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function q(e){return new cn(e)}function ln(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}function un(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&I(n,t),n}function dn(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function J(e,t){return e.hasOwnProperty(t)}function fn(){}var pn=180/Math.PI;function mn(e,t){return e??=0,t??=0,[e,t]}function hn(e,t){return e[0]=t[0],e[1]=t[1],e}function gn(e){return[e[0],e[1]]}function _n(e,t,n){return e[0]=t,e[1]=n,e}function vn(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function yn(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e}function bn(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function xn(e){return Math.sqrt(Sn(e))}function Sn(e){return e[0]*e[0]+e[1]*e[1]}function Cn(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function wn(e,t){var n=xn(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Tn(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var En=Tn;function Dn(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var On=Dn;function kn(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function An(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function jn(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function Mn(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var Nn=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),Pn=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Nn(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new Nn(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new Nn(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new Nn(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Nn(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new Nn(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),Fn=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o<i[e].length;o++)if(i[e][o].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},c=i[e].length-1,l=i[e][c];return l&&l.callAtLast?i[e].splice(c,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,a=n[e].length;i<a;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=n.length,o=0;o<a;o++){var s=n[o];if(!(r&&r.filter&&s.query!=null&&!r.filter(e,s.query)))switch(i){case 0:s.h.call(s.ctx);break;case 1:s.h.call(s.ctx,t[0]);break;case 2:s.h.call(s.ctx,t[0],t[1]);break;default:s.h.apply(s.ctx,t);break}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=t[i-1],o=n.length,s=0;s<o;s++){var c=n[s];if(!(r&&r.filter&&c.query!=null&&!r.filter(e,c.query)))switch(i){case 0:c.h.call(a);break;case 1:c.h.call(a,t[0]);break;case 2:c.h.call(a,t[0],t[1]);break;default:c.h.apply(a,t.slice(1,i-1));break}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e}(),In=Math.log(2);function Ln(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<<s)-1&~i)/In);return e[n][c]}for(var l=r|1<<n,u=n+1;r&1<<u;)u++;for(var d=0,f=0,p=0;f<s;f++){var m=1<<f;m&i||(d+=(p%2?-1:1)*e[n][f]*Ln(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function Rn(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=Ln(n,8,0,0,0,r);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]??(a[s]=0),a[s]+=((o+s)%2?-1:1)*Ln(n,7,+(o===0),1<<o,1<<s,r)/i*t[o];return function(e,t,n){var r=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/r,e[1]=(t*a[3]+n*a[4]+a[5])/r}}}var zn=`___zrEVENTSAVED`,Bn=[];function Vn(e,t,n,r,i){return Hn(Bn,t,r,i,!0)&&Hn(e,n,Bn[0],Bn[1])}function Hn(e,t,n,r,i){if(t.getBoundingClientRect&&st.domSupported&&!Gn(t)){var a=t[zn]||(t[zn]={}),o=Wn(Un(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function Un(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=[`left`,`right`],i=[`top`,`bottom`],a=0;a<4;a++){var o=document.createElement(`div`),s=o.style,c=a%2,l=(a>>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return n}function Wn(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?Rn(s,o):Rn(o,s))}function Gn(e){return e.nodeName.toUpperCase()===`CANVAS`}var Kn=/([&<>"'])/g,qn={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`};function Jn(e){return e==null?``:(e+``).replace(Kn,function(e,t){return qn[t]})}var Yn=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Xn=[],Zn=st.browser.firefox&&+st.browser.version.split(`.`)[0]<39;function Qn(e,t,n,r){return n||={},r?$n(e,t,n):Zn&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?$n(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function $n(e,t,n){if(st.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Gn(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}else if(Hn(Xn,e,r,i)){n.zrX=Xn[0],n.zrY=Xn[1];return}}n.zrX=n.zrY=0}function er(e){return e||window.event}function tr(e,t,n){if(t=er(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&Qn(e,i,t,n)}else{Qn(e,t,t,n);var a=nr(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&Yn.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function nr(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function rr(e,t,n,r){e.addEventListener(t,n,r)}function ir(e,t,n,r){e.removeEventListener(t,n,r)}var ar=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function or(e){return e.which===2||e.which===3}var sr=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a<o;a++){var s=r[a],c=Qn(n,s,{});i.points.push([c.zrX,c.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in ur)if(ur.hasOwnProperty(t)){var n=ur[t](this._track,e);if(n)return n}},e}();function cr(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function lr(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var ur={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=cr(r)/cr(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=lr(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}};function dr(){return[1,0,0,1,0,0]}function fr(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function pr(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function mr(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function hr(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function gr(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function _r(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function vr(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}function yr(e){var t=dr();return pr(t,e),t}var Y=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),br=Math.min,xr=Math.max,Sr=new Y,Cr=new Y,wr=new Y,Tr=new Y,Er=new Y,Dr=new Y,X=function(){function e(e,t,n,r){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r),this.x=e,this.y=t,this.width=n,this.height=r}return e.prototype.union=function(e){var t=br(e.x,this.x),n=br(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=xr(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=xr(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,r=e.height/t.height,i=dr();return hr(i,i,[-t.x,-t.y]),_r(i,i,[n,r]),hr(i,i,[e.x,e.y]),i},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this,i=r.x,a=r.x+r.width,o=r.y,s=r.y+r.height,c=t.x,l=t.x+t.width,u=t.y,d=t.y+t.height,f=!(a<c||l<i||s<u||d<o);if(n){var p=1/0,m=0,h=Math.abs(a-c),g=Math.abs(l-i),_=Math.abs(s-u),v=Math.abs(d-o),y=Math.min(h,g),b=Math.min(_,v);a<c||l<i?y>m&&(m=y,h<g?Y.set(Dr,-h,0):Y.set(Dr,g,0)):y<p&&(p=y,h<g?Y.set(Er,h,0):Y.set(Er,-g,0)),s<u||d<o?b>m&&(m=b,_<v?Y.set(Dr,0,-_):Y.set(Dr,0,v)):y<p&&(p=y,_<v?Y.set(Er,0,_):Y.set(Er,0,-v))}return n&&Y.copy(n,f?Er:Dr),f},e.prototype.contain=function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},e.applyTransform=function(t,n,r){if(!r){t!==n&&e.copy(t,n);return}if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],a=r[3],o=r[4],s=r[5];t.x=n.x*i+o,t.y=n.y*a+s,t.width=n.width*i,t.height=n.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Sr.x=wr.x=n.x,Sr.y=Tr.y=n.y,Cr.x=Tr.x=n.x+n.width,Cr.y=wr.y=n.y+n.height,Sr.transform(r),Tr.transform(r),Cr.transform(r),wr.transform(r),t.x=br(Sr.x,Cr.x,wr.x,Tr.x),t.y=br(Sr.y,Cr.y,wr.y,Tr.y);var c=xr(Sr.x,Cr.x,wr.x,Tr.x),l=xr(Sr.y,Cr.y,wr.y,Tr.y);t.width=c-t.x,t.height=l-t.y},e}(),Or=`silent`;function kr(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Ar}}function Ar(){ar(this.event)}var jr=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Fn),Mr=function(){function e(e,t){this.x=e,this.y=t}return e}(),Nr=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],Pr=new X(0,0,0,0),Fr=function(e){N(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new Mr(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new jr,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new Pn(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(R(Nr,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=Rr(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new Mr(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new Mr(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=kr(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new Mr(e,t);if(Lr(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new X(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(Pr.copy(u.getBoundingRect()),u.transform&&Pr.applyTransform(u.transform),Pr.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m<s;m+=d)for(var h=0;h<p;h+=f)if(Lr(a,i,e+m*Math.cos(h),t+m*Math.sin(h),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||=new sr;var n=this._gestureMgr;t===`start`&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(t===`end`&&n.clear(),r){var i=r.type;e.gestureEvent=i;var a=new Mr;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(Fn);R([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){Fr.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=Rr(this,n,r),a,o;if((e!==`mouseup`||!i)&&(a=this.findHover(n,r),o=a.target),e===`mousedown`)this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e===`mouseup`)this._upEl=o;else if(e===`click`){if(this._downEl!==this._upEl||!this._downPoint||En(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function Ir(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0),r=r.__hostTarget||r.parent}return i?Or:!0}return!1}function Lr(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=Ir(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==Or)){t.target=o;break}}}function Rr(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var zr=32,Br=7;function Vr(e){for(var t=0;e>=zr;)t|=e&1,e>>=1;return e+t}function Hr(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;Ur(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function Ur(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function Wr(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a=e[r],o=t,s=r,c;o<s;)c=o+s>>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function Gr(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c<s&&a(e,t[n+i+c])>0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;c<s&&a(e,t[n+i-c])<=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function Kr(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;c<s&&a(e,t[n+i-c])<0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c<s&&a(e,t[n+i+c])>=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function qr(e,t){var n=Br,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,u(e)}}function u(n){var o=r[n],s=i[n],c=r[n+1],l=i[n+1];i[n]=s+l,n===a-3&&(r[n+1]=r[n+2],i[n+1]=i[n+2]),a--;var u=Kr(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=Gr(e[o+s-1],e,c,l,l-1,t),l!==0&&(s<=l?d(o,s,c,l):f(o,s,c,l)))}function d(r,i,a,s){var c=0;for(c=0;c<i;c++)o[c]=e[r+c];var l=0,u=a,d=r;if(e[d++]=e[u++],--s===0){for(c=0;c<i;c++)e[d+c]=o[l+c];return}if(i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l];return}for(var f=n,p,m,h;;){p=0,m=0,h=!1;do if(t(e[u],o[l])<0){if(e[d++]=e[u++],m++,p=0,--s===0){h=!0;break}}else if(e[d++]=o[l++],p++,m=0,--i===1){h=!0;break}while((p|m)<f);if(h)break;do{if(p=Kr(e[u],o,l,i,0,t),p!==0){for(c=0;c<p;c++)e[d+c]=o[l+c];if(d+=p,l+=p,i-=p,i<=1){h=!0;break}}if(e[d++]=e[u++],--s===0){h=!0;break}if(m=Gr(o[l],e,u,s,0,t),m!==0){for(c=0;c<m;c++)e[d+c]=e[u+c];if(d+=m,u+=m,s-=m,s===0){h=!0;break}}if(e[d++]=o[l++],--i===1){h=!0;break}f--}while(p>=Br||m>=Br);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else if(i===0)throw Error();else for(c=0;c<i;c++)e[d+c]=o[l+c]}function f(r,i,a,s){var c=0;for(c=0;c<s;c++)o[c]=e[a+c];var l=r+i-1,u=s-1,d=a+s-1,f=0,p=0;if(e[d--]=e[l--],--i===0){for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c];return}if(s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)<m);if(_)break;do{if(h=i-Kr(o[u],e,r,i,i-1,t),h!==0){for(d-=h,l-=h,i-=h,p=d+1,f=l+1,c=h-1;c>=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-Gr(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c<g;c++)e[p+c]=o[f+c];if(s<=1){_=!0;break}}if(e[d--]=e[l--],--i===0){_=!0;break}m--}while(h>=Br||g>=Br);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c]}return{mergeRuns:c,forceMergeRuns:l,pushRun:s}}function Jr(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<zr){a=Hr(e,n,r,t),Wr(e,n,r,n+a,t);return}var o=qr(e,t),s=Vr(i);do{if(a=Hr(e,n,r,t),a<s){var c=i;c>s&&(c=s),Wr(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var Yr=!1;function Xr(){Yr||(Yr=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function Zr(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Qr=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Zr}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t||=!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,Jr(n,Zr)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath();if(e.ignoreClip)t=null;else if(r){t=t?t.slice():[];for(var i=r,a=e;i;)i.parent=a,i.updateTransform(),t.push(i),a=i,i=i.getClipPath()}if(e.childrenRef){for(var o=e.childrenRef(),s=0;s<o.length;s++){var c=o[s];e.__dirty&&(c.__dirty|=1),this._updateAndAddDisplayable(c,t,n)}e.__dirty=0}else{var l=e;t&&t.length?l.__clipPaths=t:l.__clipPaths&&l.__clipPaths.length>0&&(l.__clipPaths=[]),isNaN(l.z)&&(Xr(),l.z=0),isNaN(l.z2)&&(Xr(),l.z2=0),isNaN(l.zlevel)&&(Xr(),l.zlevel=0),this._displayList[this._displayListLen++]=l}var u=e.getDecalElement&&e.getDecalElement();u&&this._updateAndAddDisplayable(u,t,n);var d=e.getTextGuideLine();d&&this._updateAndAddDisplayable(d,t,n);var f=e.getTextContent();f&&this._updateAndAddDisplayable(f,t,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var r=jt(this._roots,e);r>=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),$r=st.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},ei={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=1.70158*1.525;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-ei.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?ei.bounceIn(e*2)*.5:ei.bounceOut(e*2-1)*.5+.5}},ti=Math.pow,ni=Math.sqrt,ri=1e-8,ii=1e-4,ai=ni(3),oi=1/3,si=mn(),ci=mn(),li=mn();function ui(e){return e>-ri&&e<ri}function di(e){return e>ri||e<-ri}function fi(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function pi(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function mi(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(ui(u)&&ui(d))if(ui(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}else{var h=d*d-4*u*f;if(ui(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=ni(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-ti(-y,oi):ti(y,oi),b=b<0?-ti(-b,oi):ti(b,oi);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*ni(u*u*u)),S=Math.acos(x)/3,C=ni(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+ai*Math.sin(S)))/(3*o),T=(-s+C*(w-ai*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function hi(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(ui(o)){if(di(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(ui(u))i[0]=-a/(2*o);else if(u>0){var d=ni(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function gi(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function _i(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;si[0]=c,si[1]=l;for(var v=0;v<1;v+=.05)ci[0]=fi(e,n,i,o,v),ci[1]=fi(t,r,a,s,v),g=On(si,ci),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<ii);y++)m=d-f,h=d+f,ci[0]=fi(e,n,i,o,m),ci[1]=fi(t,r,a,s,m),g=On(ci,si),m>=0&&g<p?(d=m,p=g):(li[0]=fi(e,n,i,o,h),li[1]=fi(t,r,a,s,h),_=On(li,si),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=fi(e,n,i,o,d),u[1]=fi(t,r,a,s,d)),ni(p)}function vi(e,t,n,r,i,a,o,s,c){for(var l=e,u=t,d=0,f=1/c,p=1;p<=c;p++){var m=p*f,h=fi(e,n,i,o,m),g=fi(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function yi(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function bi(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function xi(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(ui(a)){if(di(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(ui(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=ni(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Si(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Ci(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function wi(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;si[0]=o,si[1]=s;for(var f=0;f<1;f+=.05){ci[0]=yi(e,n,i,f),ci[1]=yi(t,r,a,f);var p=On(si,ci);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<ii);m++){var h=l-u,g=l+u;ci[0]=yi(e,n,i,h),ci[1]=yi(t,r,a,h);var p=On(ci,si);if(h>=0&&p<d)l=h,d=p;else{li[0]=yi(e,n,i,g),li[1]=yi(t,r,a,g);var _=On(li,si);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=yi(e,n,i,l),c[1]=yi(t,r,a,l)),ni(d)}function Ti(e,t,n,r,i,a,o){for(var s=e,c=t,l=0,u=1/o,d=1;d<=o;d++){var f=d*u,p=yi(e,n,i,f),m=yi(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var Ei=/cubic-bezier\(([0-9,\.e ]+)\)/;function Di(e){var t=e&&Ei.exec(e);if(t){var n=t[1].split(`,`),r=+en(n[0]),i=+en(n[1]),a=+en(n[2]),o=+en(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:mi(0,r,a,1,e,s)&&fi(0,i,o,1,s[0])}}}var Oi=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||fn,this.ondestroy=e.ondestroy||fn,this.onrestart=e.onrestart||fn,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1)if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=U(e)?e:ei[e]||Di(e)},e}(),ki=function(){function e(e){this.value=e}return e}(),Ai=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new ki(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),ji=function(){function e(e){this._list=new Ai,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new ki(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),Mi={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ni(e){return e=Math.round(e),e<0?0:e>255?255:e}function Pi(e){return e=Math.round(e),e<0?0:e>360?360:e}function Fi(e){return e<0?0:e>1?1:e}function Ii(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Ni(parseFloat(t)/100*255):Ni(parseInt(t,10))}function Li(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Fi(parseFloat(t)/100):Fi(parseFloat(t))}function Ri(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function zi(e,t,n){return e+(t-e)*n}function Bi(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Vi(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Hi=new ji(20),Ui=null;function Wi(e,t){Ui&&Vi(Ui,t),Ui=Hi.put(e,Ui||t.slice())}function Gi(e,t){if(e){t||=[];var n=Hi.get(e);if(n)return Vi(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in Mi)return Vi(t,Mi[r]),Wi(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){Bi(t,0,0,0,1);return}return Bi(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Wi(e,t),t}else if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Bi(t,0,0,0,1);return}return Bi(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Wi(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?Bi(t,+l[0],+l[1],+l[2],1):Bi(t,0,0,0,1);u=Li(l.pop());case`rgb`:if(l.length>=3)return Bi(t,Ii(l[0]),Ii(l[1]),Ii(l[2]),l.length===3?u:Li(l[3])),Wi(e,t),t;Bi(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Bi(t,0,0,0,1);return}return l[3]=Li(l[3]),Ki(l,t),Wi(e,t),t;case`hsl`:if(l.length!==3){Bi(t,0,0,0,1);return}return Ki(l,t),Wi(e,t),t;default:return}}Bi(t,0,0,0,1)}}function Ki(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Li(e[1]),i=Li(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Bi(t,Ni(Ri(o,a,n+1/3)*255),Ni(Ri(o,a,n)*255),Ni(Ri(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function qi(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Ji(e,t){var n=Gi(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return $i(n,n.length===4?`rgba`:`rgb`)}}function Yi(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Ni(zi(o[0],s[0],c)),n[1]=Ni(zi(o[1],s[1],c)),n[2]=Ni(zi(o[2],s[2],c)),n[3]=Fi(zi(o[3],s[3],c)),n}}function Xi(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=Gi(t[i]),s=Gi(t[a]),c=r-i,l=$i([Ni(zi(o[0],s[0],c)),Ni(zi(o[1],s[1],c)),Ni(zi(o[2],s[2],c)),Fi(zi(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Zi(e,t,n,r){var i=Gi(e);if(e)return i=qi(i),t!=null&&(i[0]=Pi(t)),n!=null&&(i[1]=Li(n)),r!=null&&(i[2]=Li(r)),$i(Ki(i),`rgba`)}function Qi(e,t){var n=Gi(e);if(n&&t!=null)return n[3]=Fi(t),$i(n,`rgba`)}function $i(e,t){if(!(!e||!e.length)){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function ea(e,t){var n=Gi(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var ta=new ji(100);function na(e){if(W(e)){var t=ta.get(e);return t||(t=Ji(e,-.1),ta.put(e,t)),t}else if(Gt(e)){var n=I({},e);return n.colorStops=z(e.colorStops,function(e){return{offset:e.offset,color:Ji(e.color,-.1)}}),n}return e}var ra=Math.round;function ia(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=Gi(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var aa=1e-4;function oa(e){return e<aa&&e>-aa}function sa(e){return ra(e*1e3)/1e3}function ca(e){return ra(e*1e4)/1e4}function la(e){return`matrix(`+sa(e[0])+`,`+sa(e[1])+`,`+sa(e[2])+`,`+sa(e[3])+`,`+ca(e[4])+`,`+ca(e[5])+`)`}var ua={left:`start`,right:`end`,center:`middle`,middle:`middle`};function da(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function fa(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function pa(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function ma(e){return e&&!!e.image}function ha(e){return e&&!!e.svgElement}function ga(e){return ma(e)||ha(e)}function _a(e){return e.type===`linear`}function va(e){return e.type===`radial`}function ya(e){return e&&(e.type===`linear`||e.type===`radial`)}function ba(e){return`url(#`+e+`)`}function xa(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Sa(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*pn,i=K(e.scaleX,1),a=K(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+ra(o*pn)+`deg, `+ra(s*pn)+`deg)`),c.join(` `)}var Ca=(function(){return st.hasGlobalWindow&&U(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<`u`?function(e){return Buffer.from(e).toString(`base64`)}:function(e){return null}})(),wa=Array.prototype.slice;function Ta(e,t,n){return(t-e)*n+e}function Ea(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=Ta(t[a],n[a],r);return e}function Da(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=Ta(t[o][s],n[o][s],r)}return e}function Oa(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function ka(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+n[o][s]*r}return e}function Aa(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(n,r);s++)i.push({offset:o.offset,color:o.color.slice()})}function ja(e,t,n){var r=e,i=t;if(!(!r.push||!i.push)){var a=r.length,o=i.length;if(a!==o)if(a>o)r.length=o;else for(var s=a;s<o;s++)r.push(n===1?i[s]:wa.call(i[s]));for(var c=r[0]&&r[0].length,s=0;s<r.length;s++)if(n===1)isNaN(r[s])&&(r[s]=i[s]);else for(var l=0;l<c;l++)isNaN(r[s][l])&&(r[s][l]=i[s][l])}}function Ma(e){if(Pt(e)){var t=e.length;if(Pt(e[0])){for(var n=[],r=0;r<t;r++)n.push(wa.call(e[r]));return n}return wa.call(e)}return e}function Na(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],`rgba(`+e.join(`,`)+`)`}function Pa(e){return Pt(e&&e[0])?2:1}var Fa=0,Ia=1,La=2,Ra=3,za=4,Ba=5,Va=6;function Ha(e){return e===za||e===Ba}function Ua(e){return e===Ia||e===La}var Wa=[0,0,0,0],Ga=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Va,s=t;if(Pt(t)){var c=Pa(t);o=c,(c===1&&!Vt(t[0])||c===2&&!Vt(t[0][0]))&&(a=!0)}else if(Vt(t)&&!Jt(t))o=Fa;else if(W(t))if(!isNaN(+t))o=Fa;else{var l=Gi(t);l&&(s=l,o=Ra)}else if(Gt(t)){var u=I({},s);u.colorStops=z(t.colorStops,function(e){return{offset:e.offset,color:Gi(e.color)}}),_a(t)?o=za:va(t)&&(o=Ba),s=u}i===0?this.valType=o:(o!==this.valType||o===Va)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=U(n)?n:ei[n]||Di(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Ua(r),c=Ha(r),l=0;l<i;l++){var u=n[l],d=u.value,f=a.value;u.percent=u.time/e,o||(s&&l!==i-1?ja(d,f,r):c&&Aa(d.colorStops,f.colorStops))}if(!o&&r!==Ba&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,l=0;l<i;l++)r===Fa?n[l].additiveValue=n[l].value-p:r===Ra?n[l].additiveValue=Oa([],n[l].value,p,-1):Ua(r)&&(n[l].additiveValue=r===Ia?Oa([],n[l].value,p,-1):ka([],n[l].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,r=n?`additiveValue`:`value`,i=this.valType,a=this.keyframes,o=a.length,s=this.propName,c=i===Ra,l,u=this._lastFr,d=Math.min,f,p;if(o===1)f=p=a[0];else{if(t<0)l=0;else if(t<this._lastFrP){for(l=d(u+1,o-1);l>=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;l<o&&!(a[l].percent>t);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Wa:e[s];if((Ua(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Ua(i))i===Ia?Ea(g,f[r],p[r],h):Da(g,f[r],p[r],h);else if(Ha(i)){var _=f[r],v=p[r],y=i===za;e[s]={type:y?`linear`:`radial`,x:Ta(_.x,v.x,h),y:Ta(_.y,v.y,h),colorStops:z(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Ta(e.offset,n.offset,h),color:Na(Ea([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Ta(_.x2,v.x2,h),e[s].y2=Ta(_.y2,v.y2,h)):e[s].r=Ta(_.r,v.r,h)}else if(c)Ea(g,f[r],p[r],h),n||(e[s]=Na(g));else{var b=Ta(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===Fa?e[n]=e[n]+r:t===Ra?(Gi(e[n],Wa),Oa(Wa,Wa,r,1),e[n]=Na(Wa)):t===Ia?Oa(e[n],e[n],r,1):t===La&&ka(e[n],e[n],r,1)},e}(),Ka=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){kt(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,Rt(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a<n.length;a++){var o=n[a],s=i[o];if(!s){s=i[o]=new Ga(o);var c=void 0,l=this._getAdditiveTrack(o);if(l){var u=l.keyframes,d=u[u.length-1];c=d&&d.value,l.valType===Ra&&c&&(c=Na(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,Ma(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Ma(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var a=this._trackKeys[i],o=this._tracks[a],s=this._getAdditiveTrack(a),c=o.keyframes,l=c.length;if(o.prepare(r,s),o.needsAnimate())if(!this._allowDiscrete&&o.discrete){var u=c[l-1];u&&(t._target[o.propName]=u.rawValue),o.setFinished()}else n.push(o)}if(n.length||this._force){var d=new Oi({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,a=0;a<r.length;a++)if(r[a]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(var a=0;a<n.length;a++)n[a].step(t._target,e);var o=t._onframeCbs;if(o)for(var a=0;a<o.length;a++)o[a](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||=[],this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||=[],this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||=[],this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return z(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var a=n[e[i]];a&&!a.isFinished()&&(t?a.step(this._target,1):this._started===1&&a.step(this._target,0),a.setFinished())}for(var o=!0,i=0;i<r.length;i++)if(!n[r[i]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},e.prototype.saveTo=function(e,t,n){if(e){t||=this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(!(!a||a.isFinished())){var o=a.keyframes,s=o[n?0:o.length-1];s&&(e[i]=Ma(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=Rt(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var a=i.keyframes;if(a.length>1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function qa(){return new Date().getTime()}var Ja=function(e){N(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=qa()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&($r(t),!e._paused&&e.update())}$r(t)},t.prototype.start=function(){this._running||(this._time=qa(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=qa(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=qa()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new Ka(e,t.loop);return this.addAnimator(n),n},t}(Fn),Ya=300,Xa=st.domSupported,Za=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:z(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),Qa={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},$a=!1;function eo(e){var t=e.pointerType;return t===`pen`||t===`touch`}function to(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function no(e){e&&(e.zrByTouch=!0)}function ro(e,t){return tr(e.dom,new ao(e,t),!0)}function io(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var ao=function(){function e(e,t){this.stopPropagation=fn,this.stopImmediatePropagation=fn,this.preventDefault=fn,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),oo={mousedown:function(e){e=tr(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=tr(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=tr(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=tr(this.dom,e);var t=e.toElement||e.relatedTarget;io(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){$a=!0,e=tr(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){$a||(e=tr(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=tr(this.dom,e),no(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),oo.mousemove.call(this,e),oo.mousedown.call(this,e)},touchmove:function(e){e=tr(this.dom,e),no(e),this.handler.processGesture(e,`change`),oo.mousemove.call(this,e)},touchend:function(e){e=tr(this.dom,e),no(e),this.handler.processGesture(e,`end`),oo.mouseup.call(this,e),new Date-+this.__lastTouchMoment<Ya&&oo.click.call(this,e)},pointerdown:function(e){oo.mousedown.call(this,e)},pointermove:function(e){eo(e)||oo.mousemove.call(this,e)},pointerup:function(e){oo.mouseup.call(this,e)},pointerout:function(e){eo(e)||oo.mouseout.call(this,e)}};R([`click`,`dblclick`,`contextmenu`],function(e){oo[e]=function(t){t=tr(this.dom,t),this.trigger(e,t)}});var so={pointermove:function(e){eo(e)||so.mousemove.call(this,e)},pointerup:function(e){so.mouseup.call(this,e)},mousemove:function(e){this.trigger(`mousemove`,e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger(`mouseup`,e),t&&(e.zrEventControl=`only_globalout`,this.trigger(`mouseout`,e))}};function co(e,t){var n=t.domHandlers;st.pointerEventsSupported?R(Za.pointer,function(r){uo(t,r,function(t){n[r].call(e,t)})}):(st.touchEventsSupported&&R(Za.touch,function(r){uo(t,r,function(i){n[r].call(e,i),to(t)})}),R(Za.mouse,function(r){uo(t,r,function(i){i=er(i),t.touching||n[r].call(e,i)})}))}function lo(e,t){st.pointerEventsSupported?R(Qa.pointer,n):st.touchEventsSupported||R(Qa.mouse,n);function n(n){function r(r){r=er(r),io(e,r.target)||(r=ro(e,r),t.domHandlers[n].call(e,r))}uo(t,n,r,{capture:!0})}}function uo(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,rr(e.domTarget,t,n,r)}function fo(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&ir(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var po=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),mo=function(e){N(t,e);function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new po(t,oo),Xa&&(r._globalHandlerScope=new po(document,so)),co(r,r._localHandlerScope),r}return t.prototype.dispose=function(){fo(this._localHandlerScope),Xa&&fo(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||`default`)},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,Xa&&this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?lo(this,t):fo(t)}},t}(Fn),ho=1;st.hasGlobalWindow&&(ho=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var go=ho,_o=.4,vo=`#333`,yo=`#ccc`,bo=`#eee`,xo=fr,So=5e-5;function Co(e){return e>So||e<-So}var wo=[],To=[],Eo=dr(),Do=Math.abs,Oo=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Co(this.rotation)||Co(this.x)||Co(this.y)||Co(this.scaleX-1)||Co(this.scaleY-1)||Co(this.skewX)||Co(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(xo(n),this.invTransform=null);return}n||=dr(),t?this.getLocalTransform(n):xo(n),e&&(t?mr(n,e,n):pr(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(wo);var n=wo[0]<0?-1:1,r=wo[1]<0?-1:1,i=((wo[0]-n)*t+n)/wo[0]||0,a=((wo[1]-r)*t+r)/wo[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}this.invTransform=this.invTransform||dr(),vr(this.invTransform,e)},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||dr(),mr(To,e.invTransform,t),t=To);var n=this.originX,r=this.originY;(n||r)&&(Eo[4]=n,Eo[5]=r,mr(To,t,Eo),To[4]-=n,To[5]-=r,t=To),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&An(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&An(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Do(e[0]-1)>1e-10&&Do(e[3]-1)>1e-10?Math.sqrt(Do(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){Ao(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&gr(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),ko=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function Ao(e,t){for(var n=0;n<ko.length;n++){var r=ko[n];e[r]=t[r]}}var jo={};function Mo(e,t){t||=`12px sans-serif`;var n=jo[t];n||=jo[t]=new ji(500);var r=n.get(e);return r??(r=ht.measureText(e,t).width,n.put(e,r)),r}function No(e,t,n,r){var i=Mo(e,t),a=Lo(t);return new X(Fo(0,i,n),Io(0,a,r),i,a)}function Po(e,t,n,r){var i=((e||``)+``).split(`
2
2
  `);if(i.length===1)return No(i[0],t,n,r);for(var a=new X(0,0,0,0),o=0;o<i.length;o++){var s=No(i[o],t,n,r);o===0?a.copy(s):a.union(s)}return a}function Fo(e,t,n){return n===`right`?e-=t:n===`center`&&(e-=t/2),e}function Io(e,t,n){return n===`middle`?e-=t/2:n===`bottom`&&(e-=t),e}function Lo(e){return Mo(`国`,e)}function Ro(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function zo(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=Ro(r[0],n.width),l+=Ro(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`;break}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var Bo=`__zr_normal__`,Vo=ko.concat([`ignore`]),Ho=Ft(ko,function(e,t){return e[t]=!0,e},{ignore:!1}),Uo={},Wo=new X(0,0,0,0),Go=function(){function e(e){this.id=Ot(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0;break}var r=this.transform;r||=this.transform=[1,0,0,1,0,0],r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||={};var n=this.textConfig,r=n.local,i=t.innerTransformable,a=void 0,o=void 0,s=!1;i.parent=r?this:null;var c=!1;if(i.copyTransform(t),n.position!=null){var l=Wo;n.layoutRect?l.copy(n.layoutRect):l.copy(this.getBoundingRect()),r||l.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Uo,n,l):zo(Uo,n,l),i.x=Uo.x,i.y=Uo.y,a=Uo.align,o=Uo.verticalAlign;var u=n.origin;if(u&&n.rotation!=null){var d=void 0,f=void 0;u===`center`?(d=l.width*.5,f=l.height*.5):(d=Ro(u[0],l.width),f=Ro(u[1],l.height)),c=!0,i.originX=-i.x+d+(r?0:l.x),i.originY=-i.y+f+(r?0:l.y)}}n.rotation!=null&&(i.rotation=n.rotation);var p=n.offset;p&&(i.x+=p[0],i.y+=p[1],c||(i.originX=-p[0],i.originY=-p[1]));var m=n.inside==null?typeof n.position==`string`&&n.position.indexOf(`inside`)>=0:n.inside,h=this._innerTextDefaultStyle||={},g=void 0,_=void 0,v=void 0;m&&this.canBeInsideText()?(g=n.insideFill,_=n.insideStroke,(g==null||g===`auto`)&&(g=this.getInsideTextFill()),(_==null||_===`auto`)&&(_=this.getInsideTextStroke(g),v=!0)):(g=n.outsideFill,_=n.outsideStroke,(g==null||g===`auto`)&&(g=this.getOutsideFill()),(_==null||_===`auto`)&&(_=this.getOutsideStroke(g),v=!0)),g||=`#000`,(g!==h.fill||_!==h.stroke||v!==h.autoStroke||a!==h.align||o!==h.verticalAlign)&&(s=!0,h.fill=g,h.stroke=_,h.autoStroke=v,h.align=a,h.verticalAlign=o,t.setDefaultTextStyle(h)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?yo:vo},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Gi(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,$i(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},I(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(G(e))for(var n=Rt(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!(r.getLoop()||i&&i!==`__zr_normal__`)){var a=r.targetName,o=a?t[a]:t;r.saveTo(o)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||=this._normalState={},e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,Vo)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];e[i]!=null&&!(i in t)&&(t[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(Bo,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===Bo;if(!(!this.hasState()&&i)){var a=this.currentStates,o=this.stateTransition;if(!(jt(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){kt(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=!!(s&&s.hoverLayer||r);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,t,!n&&!this.__inHover&&o&&o.duration>0,o);var l=this._textContent,u=this._textGuide;return l&&l.useState(e,t,n,c),u&&u.useState(e,t,n,c),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s<a;s++)if(e[s]!==i[s]){o=!1;break}}if(o)return;for(var s=0;s<a;s++){var c=e[s],l=void 0;this.stateProxy&&(l=this.stateProxy(c,e)),l||=this.states[c],l&&r.push(l)}var u=r[a-1],d=!!(u&&u.hoverLayer||n);d&&this._toggleHoverLayerFlag(!0);var f=this._mergeStates(r),p=this.stateTransition;this.saveCurrentToNormalState(f),this._applyStateObj(e.join(`,`),f,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var m=this._textContent,h=this._textGuide;m&&m.useStates(e,t,d),h&&h.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}},e.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=jt(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=jt(r,e),a=jt(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r<e.length;r++){var i=e[r];I(t,i),i.textConfig&&(n||={},I(n,i.textConfig))}return n&&(t.textConfig=n),t},e.prototype._applyStateObj=function(e,t,n,r,i,a){var o=!(t&&r);t&&t.textConfig?(this.textConfig=I({},r?this.textConfig:n.textConfig),I(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<Vo.length;l++){var u=Vo[l],d=i&&Ho[u];t&&t[u]!=null?d?(c=!0,s[u]=t[u]):this[u]=t[u]:o&&n[u]!=null&&(d?(c=!0,s[u]=n[u]):this[u]=n[u])}if(!i)for(var l=0;l<this.animators.length;l++){var f=this.animators[l],p=f.targetName;f.getLoop()||f.__changeFinalValue(p?(t||n)[p]:t||n)}c&&this._transitionState(e,s,a)},e.prototype._attachComponent=function(e){if(!(e.__zr&&!e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new Oo,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||={},I(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var r=new Ka(e?this[e]:this,t,n);return e&&(r.targetName=e),this.addAnimator(r,e),r},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,n=jt(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a<r;a++){var o=n[a];!e||e===o.scope?o.stop(t):i.push(o)}return this.animators=i,this},e.prototype.animateTo=function(e,t,n){Ko(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){Ko(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=Ko(this,t,n,r),a=0;a<i.length;a++)i[a].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=(function(){var t=e.prototype;t.type=`element`,t.name=``,t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=1;function n(e,n,r,i){Object.defineProperty(t,e,{get:function(){if(!this[n]){var e=this[n]=[];a(this,e)}return this[n]},set:function(e){this[r]=e[0],this[i]=e[1],this[n]=e,a(this,e)}});function a(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}}Object.defineProperty&&(n(`position`,`_legacyPos`,`x`,`y`),n(`scale`,`_legacyScale`,`scaleX`,`scaleY`),n(`origin`,`_legacyOrigin`,`originX`,`originY`))})(),e}();Nt(Go,Fn),Nt(Go,Oo);function Ko(e,t,n,r,i){n||={};var a=[];Qo(e,``,e,t,n,r,a,i);var o=a.length,s=!1,c=n.done,l=n.aborted,u=function(){s=!0,o--,o<=0&&(s?c&&c():l&&l())},d=function(){o--,o<=0&&(s?c&&c():l&&l())};o||c&&c(),a.length>0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f<a.length;f++){var p=a[f];u&&p.done(u),d&&p.aborted(d),n.force&&p.duration(n.duration),p.start(n.easing)}return a}function qo(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function Jo(e){return Pt(e[0])}function Yo(e,t,n){if(Pt(t[n]))if(Pt(e[n])||(e[n]=[]),Ut(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),qo(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(Jo(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?qo(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else qo(a,i,o);a.length=i.length}else e[n]=t[n]}function Xo(e,t){return e===t||Pt(e)&&Pt(t)&&Zo(e,t)}function Zo(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function Qo(e,t,n,r,i,a,o,s){for(var c=Rt(r),l=i.duration,u=i.delay,d=i.additive,f=i.setToFinal,p=!G(a),m=e.animators,h=[],g=0;g<c.length;g++){var _=c[g],v=r[_];if(v!=null&&n[_]!=null&&(p||a[_]))if(G(v)&&!Pt(v)&&!Gt(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}Qo(e,_,n[_],v,i,a&&a[_],o,s)}else h.push(_);else s||(n[_]=v,e.updateDuringAnimation(t),h.push(_))}var y=h.length;if(!d&&y)for(var b=0;b<m.length;b++){var x=m[b];if(x.targetName===t&&x.stopTracks(h)){var S=jt(m,x);m.splice(S,1)}}if(i.force||(h=It(h,function(e){return!Xo(r[e],n[e])}),y=h.length),y>0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b<y;b++){var _=h[b];w[_]=n[_],f?C[_]=r[_]:n[_]=r[_]}}else if(f){T={};for(var b=0;b<y;b++){var _=h[b];T[_]=Ma(n[_]),Yo(n,r,_)}}var x=new Ka(n,!1,!1,d?It(m,function(e){return e.targetName===t}):null);x.targetName=t,i.scope&&(x.scope=i.scope),f&&C&&x.whenWithKeys(0,C,h),T&&x.whenWithKeys(0,T,h),x.whenWithKeys(l??500,s?w:r,h).delay(u||0),e.addAnimator(x,t),o.push(x)}}var Z=function(e){N(t,e);function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=jt(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=jt(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(t)},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(t)},t.prototype.getBoundingRect=function(e){for(var t=new X(0,0,0,0),n=e||this._children,r=[],i=null,a=0;a<n.length;a++){var o=n[a];if(!(o.ignore||o.invisible)){var s=o.getBoundingRect(),c=o.getLocalTransform(r);c?(X.applyTransform(t,s,c),i||=t.clone(),i.union(t)):(i||=s.clone(),i.union(s))}}return i||t},t}(Go);Z.prototype.type=`group`;var $o={},es={};function ts(e){delete es[e]}function ns(e){if(!e)return!1;if(typeof e==`string`)return ea(e,1)<_o;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=ea(t[i].color,1);return n/=r,n<_o}return!1}var rs=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n||={},this.dom=t,this.id=e;var i=new Qr,a=n.renderer||`canvas`;$o[a]||(a=Rt($o)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var o=new $o[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!st.node&&!st.worker&&!s?new mo(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?st.touchEventsSupported:!!l,d=44,f;u&&(f=K(n.pointerSize,d)),this.handler=new Fr(i,o,c,o.root,f),this.animation=new Ja({stage:{update:s?null:function(){return r._flush(!0)}}}),s||this.animation.start()}return e.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=ns(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!1)},e.prototype._flush=function(e){var t,n=qa();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var r=qa();t?(this._stillFrameAccum=0,this.trigger(`rendered`,{elapsedTime:r-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()===`canvas`&&this.painter.refreshHover())},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Z&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,ts(this.id))},e}();function is(e,t){var n=new rs(Ot(),e,t);return es[n.id]=n,n}function as(e,t){$o[e]=t}var os;function ss(e){if(typeof os==`function`)return os(e)}function cs(e){os=e}var ls=1e-4,us=20;function ds(e){return e.replace(/^\s+|\s+$/g,``)}function fs(e,t,n,r){var i=t[0],a=t[1],o=n[0],s=n[1],c=a-i,l=s-o;if(c===0)return l===0?o:(o+s)/2;if(r){if(c>0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}function Q(e,t){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`;break}return W(e)?ds(e).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):e==null?NaN:+e}function ps(e,t,n){return t??=10,t=Math.min(Math.max(0,t),us),e=(+e).toFixed(t),n?e:+e}function ms(e){return e.sort(function(e,t){return e-t}),e}function hs(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n}return gs(e)}function gs(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`),o=a<0?0:i-1-a;return Math.max(0,o-r)}function _s(e,t){var n=Math.log,r=Math.LN10,i=Math.floor(n(e[1]-e[0])/r),a=Math.round(n(Math.abs(t[1]-t[0]))/r),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function vs(e,t){var n=Ft(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=10**t,i=z(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=z(i,function(e){return Math.floor(e)}),s=Ft(o,function(e,t){return e+t},0),c=z(i,function(e,t){return e-o[t]});s<a;){for(var l=-1/0,u=null,d=0,f=c.length;d<f;++d)c[d]>l&&(l=c[d],u=d);++o[u],c[u]=0,++s}return z(o,function(e){return e/r})}function ys(e,t){var n=Math.max(hs(e),hs(t)),r=e+t;return n>us?r:ps(r,n)}function bs(e){var t=Math.PI*2;return(e%t+t)%t}function xs(e){return e>-ls&&e<ls}var Ss=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Cs(e){if(e instanceof Date)return e;if(W(e)){var t=Ss.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return t[8].toUpperCase()!==`Z`&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else return new Date(+t[1],(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}else if(e==null)return new Date(NaN);return new Date(Math.round(e))}function ws(e){return 10**Ts(e)}function Ts(e){if(e===0)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/10**t>=10&&t++,t}function Es(e,t){var n=Ts(e),r=10**n,i=e/r;return e=(t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,n>=-20?+e.toFixed(n<0?-n:0):e}function Ds(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],a=n-r;return a?i+a*(e[r]-i):i}function Os(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r<e.length;){for(var i=e[r].interval,a=e[r].close,o=0;o<2;o++)i[o]<=t&&(i[o]=t,a[o]=o?1:1-n),t=i[o],n=a[o];i[0]===i[1]&&a[0]*a[1]!==1?e.splice(r,1):r++}return e;function s(e,t,n){return e.interval[n]<t.interval[n]||e.interval[n]===t.interval[n]&&(e.close[n]-t.close[n]===(n?-1:1)||!n&&s(e,t,1))}}function ks(e){var t=parseFloat(e);return t==e&&(t!==0||!W(e)||e.indexOf(`x`)<=0)?t:NaN}function As(e){return!isNaN(ks(e))}function js(){return Math.round(Math.random()*9)}function Ms(e,t){return t===0?e:Ms(t,e%t)}function Ns(e,t){return e==null?t:t==null?e:e*t/Ms(e,t)}function Ps(e){throw Error(e)}function Fs(e,t,n){return(t-e)*n+e}var Is=`series\0`,Ls=`\0_ec_\0`;function Rs(e){return e instanceof Array?e:e==null?[]:[e]}function zs(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var a=n[r];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}}var Bs=`fontStyle.fontWeight.fontSize.fontFamily.rich.tag.color.textBorderColor.textBorderWidth.width.height.lineHeight.align.verticalAlign.baseline.shadowColor.shadowBlur.shadowOffsetX.shadowOffsetY.textShadowColor.textShadowBlur.textShadowOffsetX.textShadowOffsetY.backgroundColor.borderColor.borderWidth.borderRadius.padding`.split(`.`);function Vs(e){return G(e)&&!H(e)&&!(e instanceof Date)?e.value:e}function Hs(e){return G(e)&&!(e instanceof Array)}function Us(e,t,n){var r=n===`normalMerge`,i=n===`replaceMerge`,a=n===`replaceAll`;e||=[],t=(t||[]).slice();var o=q();R(t,function(e,n){if(!G(e)){t[n]=null;return}});var s=Ws(e,o,n);return(r||i)&&Gs(s,e,o,t),r&&Ks(s,t),r||i?qs(s,t,i):a&&Js(s,t),Ys(s),s}function Ws(e,t,n){var r=[];if(n===`replaceAll`)return r;for(var i=0;i<e.length;i++){var a=e[i];a&&a.id!=null&&t.set(a.id,i),r.push({existing:n===`replaceMerge`||ec(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function Gs(e,t,n,r){R(r,function(i,a){if(!(!i||i.id==null)){var o=Zs(i.id),s=n.get(o);if(s!=null){var c=e[s];$t(!c.newOption,`Duplicated option on id "`+o+`".`),c.newOption=i,c.existing=t[s],r[a]=null}}})}function Ks(e,t){R(t,function(n,r){if(!(!n||n.name==null))for(var i=0;i<e.length;i++){var a=e[i].existing;if(!e[i].newOption&&a&&(a.id==null||n.id==null)&&!ec(n)&&!ec(a)&&Xs(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function qs(e,t,n){R(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||ec(r.existing)||r.existing&&t.id!=null&&!Xs(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function Js(e,t){R(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function Ys(e){var t=q();R(e,function(e){var n=e.existing;n&&t.set(n.id,e)}),R(e,function(e){var n=e.newOption;$t(!n||n.id==null||!t.get(n.id)||t.get(n.id)===e,`id duplicates: `+(n&&n.id)),n&&n.id!=null&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})}),R(e,function(e,n){var r=e.existing,i=e.newOption,a=e.keyInfo;if(G(i)){if(a.name=i.name==null?r?r.name:Is+n:Zs(i.name),r)a.id=Zs(r.id);else if(i.id!=null)a.id=Zs(i.id);else{var o=0;do a.id=`\0`+a.name+`\0`+o++;while(t.get(a.id))}t.set(a.id,e)}})}function Xs(e,t,n){var r=Qs(t[e],null),i=Qs(n[e],null);return r!=null&&i!=null&&r===i}function Zs(e){return Qs(e,``)}function Qs(e,t){return e==null?t:W(e)?e:Vt(e)||Bt(e)?e+``:t}function $s(e){var t=e.name;return!!(t&&t.indexOf(Is))}function ec(e){return e&&e.id!=null&&Zs(e.id).indexOf(Ls)===0}function tc(e){return Ls+e}function nc(e,t,n){R(e,function(e){var r=e.newOption;G(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=rc(t,r,e.existing,n))})}function rc(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function ic(e,t){var n={},r={};return i(e||[],n),i(t||[],r,n),[a(n),a(r)];function i(e,t,n){for(var r=0,i=e.length;r<i;r++){var a=Qs(e[r].seriesId,null);if(a==null)return;for(var o=Rs(e[r].dataIndex),s=n&&n[a],c=0,l=o.length;c<l;c++){var u=o[c];s&&s[u]?s[u]=null:(t[a]||(t[a]={}))[u]=1}}}function a(e,t){var n=[];for(var r in e)if(e.hasOwnProperty(r)&&e[r]!=null)if(t)n.push(+r);else{var i=a(e[r],!0);i.length&&n.push({seriesId:r,dataIndex:i})}return n}}function ac(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return H(t.dataIndex)?z(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return H(t.name)?z(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name)}function oc(){var e=`__ec_inner_`+sc++;return function(t){return t[e]||(t[e]={})}}var sc=js();function cc(e,t,n){var r=lc(t,n),i=r.mainTypeSpecified,a=r.queryOptionMap,o=r.others,s=n?n.defaultMainType:null;return!i&&s&&a.set(s,{}),a.each(function(t,r){var i=fc(e,r,t,{useDefault:s===r,enableAll:n&&n.enableAll!=null?n.enableAll:!0,enableNone:n&&n.enableNone!=null?n.enableNone:!0});o[r+`Models`]=i.models,o[r+`Model`]=i.models[0]}),o}function lc(e,t){var n;if(W(e)){var r={};r[e+`Index`]=0,n=r}else n=e;var i=q(),a={},o=!1;return R(n,function(e,n){if(n===`dataIndex`||n===`dataIndexInside`){a[n]=e;return}var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],c=(r[2]||``).toLowerCase();if(!(!s||!c||t&&t.includeMainTypes&&jt(t.includeMainTypes,s)<0)){o||=!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var uc={useDefault:!0,enableAll:!1,enableNone:!1},dc={useDefault:!1,enableAll:!0,enableNone:!0};function fc(e,t,n,r){r||=uc;var i=n.index,a=n.id,o=n.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var c=void 0;return s.models=r.useDefault&&(c=e.getComponent(t))?[c]:[],s}return i===`none`||i===!1?($t(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(i===`all`&&($t(r.enableAll,'`"all"` is not a valid value on index option.'),i=a=o=null),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s)}function pc(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function mc(e){return e===`auto`?st.domSupported?`html`:`richText`:e||`html`}function hc(e,t){var n=q(),r=[];return R(e,function(e){var i=t(e);(n.get(i)||(r.push(i),n.set(i,[]))).push(e)}),{keys:r,buckets:n}}function gc(e,t,n,r,i){var a=t==null||t===`auto`;if(r==null)return r;if(Vt(r)){var o=Fs(n||0,r,i);return ps(o,a?Math.max(hs(n||0),hs(r)):t)}else if(W(r))return i<1?n:r;else{for(var s=[],c=n,l=r,u=Math.max(c?c.length:0,l.length),d=0;d<u;++d){var f=e.getDimensionInfo(d);if(f&&f.type===`ordinal`)s[d]=(i<1&&c?c:l)[d];else{var p=c&&c[d]?c[d]:0,m=l[d],o=Fs(p,m,i);s[d]=ps(o,a?Math.max(hs(p),hs(m)):t)}}return s}}var _c=`.`,vc=`___EC__COMPONENT__CONTAINER___`,yc=`___EC__EXTENDED_CLASS___`;function bc(e){var t={main:``,sub:``};if(e){var n=e.split(_c);t.main=n[0]||``,t.sub=n[1]||``}return t}function xc(e){$t(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function Sc(e){return!!(e&&e[yc])}function Cc(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return wc(t)?n=function(e){N(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},Mt(n,this)),I(n.prototype,e),n[yc]=!0,n.extend=this.extend,n.superCall=Oc,n.superApply=kc,n.superClass=t,n}}function wc(e){return U(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function Tc(e,t){e.extend=t.extend}var Ec=Math.round(Math.random()*10);function Dc(e){var t=[`__\0is_clz`,Ec++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function Oc(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function kc(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Ac(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){xc(r),e.prototype.type=r;var i=bc(r);if(!i.sub)t[i.main]=e;else if(i.sub!==vc){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[vc]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=bc(e),r=[],i=t[n.main];return i&&i[vc]?R(i,function(e,t){t!==vc&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[bc(e).main]},e.getAllClassMainTypes=function(){var e=[];return R(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[bc(e).main];return n&&n[vc]};function n(e){var n=t[e.main];return(!n||!n[vc])&&(n=t[e.main]={},n[vc]=!0),n}}function jc(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t||=!1,function(n,r,i){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(r&&jt(r,s)>=0||i&&jt(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var Mc=jc([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),Nc=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Mc(this,e,t)},e}(),Pc=new ji(50);function Fc(e){if(typeof e==`string`){var t=Pc.get(e);return t&&t.image}else return e}function Ic(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=Pc.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!Rc(t)&&a.pending.push(o)):(t=ht.loadImage(e,Lc,Lc),t.__zrImageSrc=e,Pc.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e}function Lc(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function Rc(e){return e&&e.width&&e.height}var zc=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Bc(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(`
3
3
  `);a=Vc(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l<u;l++)Hc(c,o[l],a),o[l]=c.textLine,s||=c.isTruncated;e.text=o.join(`
4
4
  `),e.isTruncated=s}function Vc(e,t,n,r){r||={};var i=I({},r);i.font=t,n=K(n,`...`),i.maxIterations=K(r.maxIterations,2);var a=i.minChar=K(r.minChar,0);i.cnCharWidth=Mo(`国`,t);var o=i.ascCharWidth=Mo(`a`,t);i.placeholder=K(r.placeholder,``);for(var s=e=Math.max(0,e-1),c=0;c<a&&s>=o;c++)s-=o;var l=Mo(n,t);return l>s&&(n=``,l=0),s=e-l,i.ellipsis=n,i.ellipsisWidth=l,i.contentWidth=s,i.containerWidth=e,i}function Hc(e,t,n){var r=n.containerWidth,i=n.font,a=n.contentWidth;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=Mo(t,i);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?Uc(t,a,n.ascCharWidth,n.cnCharWidth):o>0?Math.floor(t.length*a/o):0;t=t.substr(0,c),o=Mo(t,i)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function Uc(e,t,n,r){for(var i=0,a=0,o=e.length;a<o&&i<t;a++){var s=e.charCodeAt(a);i+=0<=s&&s<=127?n:r}return a}function Wc(e,t){e!=null&&(e+=``);var n=t.overflow,r=t.padding,i=t.font,a=n===`truncate`,o=Lo(i),s=K(t.lineHeight,o),c=!!t.backgroundColor,l=t.lineOverflow===`truncate`,u=!1,d=t.width,f=d!=null&&(n===`break`||n===`breakAll`)?e?$c(e,t.font,d,n===`breakAll`,0).lines:[]:e?e.split(`
@@ -1 +1 @@
1
- import{r as e}from"./hooks-tBACnBdQ.js";import{Ii as t}from"./index-BMhs4O3N.js";var n=`TinybirdTokenResponseType`,r={refetchInterval:7200*1e3,refetchIntervalInBackground:!0,staleTime:6600*1e3},i=e({dataType:n,path:`/tinybird/token/`}),a=(e={})=>i({...r,...e}),o=!1,s=(e={})=>{let{enabled:n=!0}=e,r=t(),i=n&&r,s=a({enabled:i});if(!i)return{token:void 0,isLoading:!1,error:null,refetch:s.refetch};let c=s.data?.tinybird?.token,l=s.error;return!s.isLoading&&s.data&&!c&&!o&&(console.warn(`Tinybird analytics: No valid token received. Check your Tinybird configuration (workspaceId and adminToken must be non-empty strings).`),o=!0),{token:c&&typeof c==`string`?c:void 0,isLoading:s.isLoading,error:l,refetch:s.refetch}};export{s as t};
1
+ import{r as e}from"./hooks-tBACnBdQ.js";import{Fi as t}from"./index-B5yxmQNp.js";var n=`TinybirdTokenResponseType`,r={refetchInterval:7200*1e3,refetchIntervalInBackground:!0,staleTime:6600*1e3},i=e({dataType:n,path:`/tinybird/token/`}),a=(e={})=>i({...r,...e}),o=!1,s=(e={})=>{let{enabled:n=!0}=e,r=t(),i=n&&r,s=a({enabled:i});if(!i)return{token:void 0,isLoading:!1,error:null,refetch:s.refetch};let c=s.data?.tinybird?.token,l=s.error;return!s.isLoading&&s.data&&!c&&!o&&(console.warn(`Tinybird analytics: No valid token received. Check your Tinybird configuration (workspaceId and adminToken must be non-empty strings).`),o=!0),{token:c&&typeof c==`string`?c:void 0,isLoading:s.isLoading,error:l,refetch:s.refetch}};export{s as t};