chatlab-cli 0.36.1 → 0.37.0

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 (201) hide show
  1. package/dist/{chat-command-XPJ43KSW.mjs → chat-command-WBAJBKIE.mjs} +15 -16
  2. package/dist/{chat-command-XPJ43KSW.mjs.map → chat-command-WBAJBKIE.mjs.map} +1 -1
  3. package/dist/chunk-2TV7M4CC.mjs +101 -0
  4. package/dist/chunk-2TV7M4CC.mjs.map +1 -0
  5. package/dist/{chunk-Q3NEL2KK.mjs → chunk-4J4MA3RC.mjs} +2606 -671
  6. package/dist/chunk-4J4MA3RC.mjs.map +1 -0
  7. package/dist/{chunk-NFTCEJBJ.mjs → chunk-5YOHLJFB.mjs} +98 -284
  8. package/dist/chunk-5YOHLJFB.mjs.map +1 -0
  9. package/dist/{chunk-L7TIIVAY.mjs → chunk-CR2MU7LN.mjs} +49 -55
  10. package/dist/chunk-CR2MU7LN.mjs.map +1 -0
  11. package/dist/{chunk-2JPFBIAG.mjs → chunk-DKIYHA3O.mjs} +284 -31
  12. package/dist/chunk-DKIYHA3O.mjs.map +1 -0
  13. package/dist/{chunk-FJOGBUXU.mjs → chunk-DQR2YS3I.mjs} +1930 -33
  14. package/dist/chunk-DQR2YS3I.mjs.map +1 -0
  15. package/dist/{chunk-JOVL7OTW.mjs → chunk-EJBBVLUN.mjs} +3 -3
  16. package/dist/chunk-EJBBVLUN.mjs.map +1 -0
  17. package/dist/{chunk-X2QBH24F.mjs → chunk-FM3GXNEO.mjs} +1643 -3
  18. package/dist/chunk-FM3GXNEO.mjs.map +1 -0
  19. package/dist/{chunk-R73XMAB2.mjs → chunk-MSMDLDPB.mjs} +96 -5
  20. package/dist/chunk-MSMDLDPB.mjs.map +1 -0
  21. package/dist/{chunk-NQHZPSW2.mjs → chunk-N2WGG3MS.mjs} +2 -2
  22. package/dist/{chunk-67HNPYZJ.mjs → chunk-RXMSZIYD.mjs} +3 -3
  23. package/dist/{chunk-5MJO4AJB.mjs → chunk-SQWN4GTQ.mjs} +2 -2
  24. package/dist/cli.mjs +9 -9
  25. package/dist/contacts-worker.mjs +2 -2
  26. package/dist/global-insight-worker.mjs +1 -1
  27. package/dist/{http-5RVY5J5U.mjs → http-X6OEOOSH.mjs} +12 -12
  28. package/dist/{import-ILTWVHKU.mjs → import-WBJ6YIQ7.mjs} +7 -7
  29. package/dist/index.mjs +12 -12
  30. package/dist/{mcp-Y2YXOFB4.mjs → mcp-FR6OKWKL.mjs} +8 -8
  31. package/dist/people-relationships-worker.mjs +2 -2
  32. package/dist/semantic-index-worker.mjs +1 -1
  33. package/dist/{src-OV5ZNE3Z.mjs → src-WE5HNN2O.mjs} +44 -14
  34. package/dist/{stream-import-XOUM3Z5W.mjs → stream-import-YYQVZDGQ.mjs} +7 -7
  35. package/dist/{worker-runtime-JNGURHDM.mjs → worker-runtime-YGB5ZDE4.mjs} +5 -5
  36. package/dist-cli-web/assets/AISettingsTab-Co2sM1iY.js +1 -0
  37. package/dist-cli-web/assets/{AboutTab-CxI8zJNz.js → AboutTab-DQ8r6mYE.js} +1 -1
  38. package/dist-cli-web/assets/ActionToolsPanel-CmYpw8Mt.css +1 -0
  39. package/dist-cli-web/assets/ActionToolsPanel.vue_vue_type_script_setup_true_lang--RPlmfIu.js +75 -0
  40. package/dist-cli-web/assets/{Alert-_MYcI_E2.js → Alert-DU1tLAAg.js} +1 -1
  41. package/dist-cli-web/assets/ApiSettingsTab-D5g5b79L.js +2 -0
  42. package/dist-cli-web/assets/BatchManageTab-BFUyVaGU.js +1 -0
  43. package/dist-cli-web/assets/{BufferResource-i64DlwQT.js → BufferResource-C-RfYwQW.js} +1 -1
  44. package/dist-cli-web/assets/{CanvasRenderer-B76mEt9A.js → CanvasRenderer-Dz7JAMrR.js} +1 -1
  45. package/dist-cli-web/assets/CardDecoration-D28DI1G9.js +1 -0
  46. package/dist-cli-web/assets/ChatRecordDrawer-Cph819yY.js +1 -0
  47. package/dist-cli-web/assets/{ChatRecordWorkspace-CyfPIlIy.js → ChatRecordWorkspace-BAfERdPc.js} +1 -1
  48. package/dist-cli-web/assets/Checkbox-B8uqt13j.js +1 -0
  49. package/dist-cli-web/assets/DataDirCleanupNotice-3sGBE5vU.js +1 -0
  50. package/dist-cli-web/assets/{DatePicker.vue_vue_type_script_setup_true_lang-DqNBNa1D.js → DatePicker.vue_vue_type_script_setup_true_lang-CQuub8-f.js} +1 -1
  51. package/dist-cli-web/assets/{DebugToolsPanel-CbNsD9co.js → DebugToolsPanel-Cwkr0BOY.js} +1 -1
  52. package/dist-cli-web/assets/EChart.vue_vue_type_script_setup_true_lang-BuLujQCF.js +1 -0
  53. package/dist-cli-web/assets/EChartBar.vue_vue_type_script_setup_true_lang-DuA5xbcC.js +1 -0
  54. package/dist-cli-web/assets/EChartLine.vue_vue_type_script_setup_true_lang-CvmMEfYq.js +1 -0
  55. package/dist-cli-web/assets/EChartWordcloud-CHVtyPR7.js +1 -0
  56. package/dist-cli-web/assets/FileDropZone.vue_vue_type_script_setup_true_lang-BKPy9Qv-.js +1 -0
  57. package/dist-cli-web/assets/{Filter-yxkeHO78.js → Filter-CMfRHIoK.js} +1 -1
  58. package/dist-cli-web/assets/GlobalTaskBar-Jz6MASCu.js +1 -0
  59. package/dist-cli-web/assets/GlobalTaskBar-haLzezqY.css +1 -0
  60. package/dist-cli-web/assets/GroupRelationshipGalaxyView-Ch4obfEq.js +1 -0
  61. package/dist-cli-web/assets/Label-CuryuymO.js +1 -0
  62. package/dist-cli-web/assets/LoadingState.vue_vue_type_script_setup_true_lang-CoeQsaiL.js +1 -0
  63. package/dist-cli-web/assets/MessageExportModal-JqGZ-iLr.js +1 -0
  64. package/dist-cli-web/assets/PageHeader-CPLgiKT8.css +1 -0
  65. package/dist-cli-web/assets/PageHeader-D4up77TB.js +1 -0
  66. package/dist-cli-web/assets/{PageTabs.vue_vue_type_script_setup_true_lang-_j82asQU.js → PageTabs.vue_vue_type_script_setup_true_lang-DYQRFk9s.js} +1 -1
  67. package/dist-cli-web/assets/{RelationshipGalaxyCanvas-BODk18aA.js → RelationshipGalaxyCanvas-Cn7Eta5U.js} +3 -3
  68. package/dist-cli-web/assets/{RelationshipGalaxyThreeCanvas-BJyuRiC-.js → RelationshipGalaxyThreeCanvas-LlaX57z6.js} +1 -1
  69. package/dist-cli-web/assets/{RenderTargetSystem-CVMvAUSv.js → RenderTargetSystem-JhA2PUFi.js} +1 -1
  70. package/dist-cli-web/assets/{RovingFocusItem-DC_06OmN.js → RovingFocusItem-DHaiTb4j.js} +1 -1
  71. package/dist-cli-web/assets/{ScreenCaptureModal-DrBFDOtC.js → ScreenCaptureModal-Bxhyt5g1.js} +1 -1
  72. package/dist-cli-web/assets/SectionTabs.vue_vue_type_script_setup_true_lang-BlAje3Tf.js +1 -0
  73. package/dist-cli-web/assets/Select-Beeqv0wU.js +1 -0
  74. package/dist-cli-web/assets/SettingsModal-DV8yDBJs.js +2 -0
  75. package/dist-cli-web/assets/{StorageTab-B0ebN0f8.js → StorageTab-B7GHadia.js} +1 -1
  76. package/dist-cli-web/assets/Switch-u4zlvUMa.js +1 -0
  77. package/dist-cli-web/assets/{Tabs-N3Q-Mpqi.js → Tabs-B7-Koq3x.js} +1 -1
  78. package/dist-cli-web/assets/Tabs-RWKHwtfM.js +1 -0
  79. package/dist-cli-web/assets/ThemeCard.vue_vue_type_script_setup_true_lang-ndsa3-aT.js +1 -0
  80. package/dist-cli-web/assets/{TimeSelect.vue_vue_type_script_setup_true_lang-Ccunouyf.js → TimeSelect.vue_vue_type_script_setup_true_lang-DKa1flT-.js} +1 -1
  81. package/dist-cli-web/assets/{VisuallyHiddenInput-OAJEt_Y5.js → VisuallyHiddenInput-DGDqcvUy.js} +1 -1
  82. package/dist-cli-web/assets/{WebGLRenderer-DuUeftYD.js → WebGLRenderer-ifvgA1fe.js} +1 -1
  83. package/dist-cli-web/assets/{WebGPURenderer-DoWQxiWZ.js → WebGPURenderer-DwzmuWF0.js} +1 -1
  84. package/dist-cli-web/assets/aiChat-BY4C3UQe.js +8 -0
  85. package/dist-cli-web/assets/base-BWDX-164.js +1 -0
  86. package/dist-cli-web/assets/{browserAll-Cb-mtR2y.js → browserAll-CSIIETeE.js} +1 -1
  87. package/dist-cli-web/assets/chatMessages--r0obAVw.css +1 -0
  88. package/dist-cli-web/assets/chatMessages-Zywjea1n.js +147 -0
  89. package/dist-cli-web/assets/cli-web-BRY49NWe.js +1 -0
  90. package/dist-cli-web/assets/{fetch-BbcFaCRB.js → fetch-Bf4cqeM3.js} +1 -1
  91. package/dist-cli-web/assets/{fetch-B-6tyYWu.js → fetch-BiXab0IF.js} +1 -1
  92. package/dist-cli-web/assets/{fetch-DEub4tOo.js → fetch-C8CcoTWY.js} +1 -1
  93. package/dist-cli-web/assets/{fetch-Qs38Hx1V.js → fetch-Co2vLmiE.js} +1 -1
  94. package/dist-cli-web/assets/{fetch-DLTlYnDB.js → fetch-D3nLtFBi.js} +1 -1
  95. package/dist-cli-web/assets/{fetch-BkA_so1e.js → fetch-DNSDHSqQ.js} +1 -1
  96. package/dist-cli-web/assets/{fetch-sYDJ-Zs8.js → fetch-DeHqF6yL.js} +1 -1
  97. package/dist-cli-web/assets/{fetch-B4PYy5JS.js → fetch-jx1VdM9j.js} +3 -3
  98. package/dist-cli-web/assets/{fetch-CW2fKvGp.js → fetch-mYSeL4Ki.js} +1 -1
  99. package/dist-cli-web/assets/fetch-qBaUXqFt.js +1 -0
  100. package/dist-cli-web/assets/{fetch-BzXuAaT3.js → fetch-r6mhEGrP.js} +1 -1
  101. package/dist-cli-web/assets/{fetch-AvsnJLWJ.js → fetch-wzv71PYy.js} +1 -1
  102. package/dist-cli-web/assets/{host-DYIkQqvY.js → host-1emQf9_4.js} +1 -1
  103. package/dist-cli-web/assets/{host-B6SQ6OGo.js → host-jXJHyyOX.js} +1 -1
  104. package/dist-cli-web/assets/index-2dJCozDq.js +64 -0
  105. package/dist-cli-web/assets/index-6ejRbH3h.js +2 -0
  106. package/dist-cli-web/assets/index-B4mJkX_d.js +1 -0
  107. package/dist-cli-web/assets/index-B7biznha.js +1 -0
  108. package/dist-cli-web/assets/index-BOcFyPCa.js +1 -0
  109. package/dist-cli-web/assets/index-BQ463TS7.js +1 -0
  110. package/dist-cli-web/assets/index-BZpR015e.css +1 -0
  111. package/dist-cli-web/assets/index-BgelKQTW.css +1 -0
  112. package/dist-cli-web/assets/index-C1A1FwpO.css +1 -0
  113. package/dist-cli-web/assets/index-CIIyg_o9.css +1 -0
  114. package/dist-cli-web/assets/{index-CShh95fU.js → index-CYc_VLgK.js} +1 -1
  115. package/dist-cli-web/assets/index-ClHMs0-a.js +2 -0
  116. package/dist-cli-web/assets/{index-D64XYYts.js → index-Cw0IhKZ6.js} +10 -10
  117. package/dist-cli-web/assets/{index-C_OS8Y8W.js → index-DOqbUvhA.js} +1 -1
  118. package/dist-cli-web/assets/index-DnpnIyle.js +135 -0
  119. package/dist-cli-web/assets/index-LV9LfFNu.js +1 -0
  120. package/dist-cli-web/assets/index-kePiJ3ca.js +137 -0
  121. package/dist-cli-web/assets/index-slDUxib2.js +1 -0
  122. package/dist-cli-web/assets/{people-page-header-0jvXFFnh.js → people-page-header-Cx5r9Bk2.js} +1 -1
  123. package/dist-cli-web/assets/{prompt-BPYj29Vq.js → prompt-BggEDxxi.js} +1 -1
  124. package/dist-cli-web/assets/{semantic-index-config-builder-vO37z355.js → semantic-index-config-builder-1sO0aEc1.js} +1 -1
  125. package/dist-cli-web/assets/{service-D29Vftq9.js → service-Bvq1fRkC.js} +1 -1
  126. package/dist-cli-web/assets/service-DkPheDt8.js +1 -0
  127. package/dist-cli-web/assets/service-DvI8O_7K.js +1 -0
  128. package/dist-cli-web/assets/useFormControl-B0aShtLp.js +1 -0
  129. package/dist-cli-web/assets/useTable-DC7oxmBl.js +1 -0
  130. package/dist-cli-web/assets/{useToast-BA0EwImD.js → useToast-CCPBE-Sy.js} +1 -1
  131. package/dist-cli-web/assets/{vendor-echarts-hTLhTs52.js → vendor-echarts-C9ugTmum.js} +1 -1
  132. package/dist-cli-web/assets/{vendor-echarts-wordcloud-B8CF_NgP.js → vendor-echarts-wordcloud-DNiU8Psq.js} +1 -1
  133. package/dist-cli-web/assets/{webworkerAll-ZPE_yGnC.js → webworkerAll-FCJk6reG.js} +1 -1
  134. package/dist-cli-web/index.html +2 -2
  135. package/package.json +1 -1
  136. package/dist/chunk-2JPFBIAG.mjs.map +0 -1
  137. package/dist/chunk-6QP47LID.mjs +0 -41
  138. package/dist/chunk-6QP47LID.mjs.map +0 -1
  139. package/dist/chunk-FJOGBUXU.mjs.map +0 -1
  140. package/dist/chunk-JOVL7OTW.mjs.map +0 -1
  141. package/dist/chunk-L7TIIVAY.mjs.map +0 -1
  142. package/dist/chunk-NFTCEJBJ.mjs.map +0 -1
  143. package/dist/chunk-Q3NEL2KK.mjs.map +0 -1
  144. package/dist/chunk-R73XMAB2.mjs.map +0 -1
  145. package/dist/chunk-X2QBH24F.mjs.map +0 -1
  146. package/dist-cli-web/assets/AISettingsTab-vvjijrc5.js +0 -1
  147. package/dist-cli-web/assets/ActionToolsPanel-Dp-ojXjO.css +0 -1
  148. package/dist-cli-web/assets/ActionToolsPanel.vue_vue_type_script_setup_true_lang-w0hHEodr.js +0 -110
  149. package/dist-cli-web/assets/ApiSettingsTab-CK7U6dVA.js +0 -2
  150. package/dist-cli-web/assets/BatchManageTab-1WnEqqpB.js +0 -1
  151. package/dist-cli-web/assets/ChatRecordDrawer-Bp6OSCrz.js +0 -1
  152. package/dist-cli-web/assets/Checkbox-Ci7IeRw1.js +0 -1
  153. package/dist-cli-web/assets/DataDirCleanupNotice-Dh63pOLt.js +0 -1
  154. package/dist-cli-web/assets/EChart.vue_vue_type_script_setup_true_lang-YeqmodwE.js +0 -1
  155. package/dist-cli-web/assets/EChartBar.vue_vue_type_script_setup_true_lang-C3pZmq0v.js +0 -1
  156. package/dist-cli-web/assets/EChartLine.vue_vue_type_script_setup_true_lang-Co6olfwv.js +0 -1
  157. package/dist-cli-web/assets/EChartWordcloud-rDusZwSq.js +0 -1
  158. package/dist-cli-web/assets/GlobalTaskBar-BlZ-fFiq.js +0 -1
  159. package/dist-cli-web/assets/GlobalTaskBar-COW_uBX6.css +0 -1
  160. package/dist-cli-web/assets/GroupRelationshipGalaxyView-BXQBX0zJ.js +0 -1
  161. package/dist-cli-web/assets/Label-CFAZFBQX.js +0 -1
  162. package/dist-cli-web/assets/LoadingState.vue_vue_type_script_setup_true_lang-CwgpqtMZ.js +0 -1
  163. package/dist-cli-web/assets/MessageExportModal-DU71grc7.js +0 -1
  164. package/dist-cli-web/assets/PageHeader-BDPf4NuI.js +0 -1
  165. package/dist-cli-web/assets/PageHeader-XIXMTomn.css +0 -1
  166. package/dist-cli-web/assets/SectionTabs.vue_vue_type_script_setup_true_lang-C-Zj2biH.js +0 -1
  167. package/dist-cli-web/assets/Select-DLK2LYhO.js +0 -1
  168. package/dist-cli-web/assets/SettingsModal-DqaR4Dx5.js +0 -2
  169. package/dist-cli-web/assets/Switch-CokhQWxm.js +0 -1
  170. package/dist-cli-web/assets/Tabs-D1UiZNaZ.js +0 -1
  171. package/dist-cli-web/assets/ThemeCard.vue_vue_type_script_setup_true_lang-OT-I0mbU.js +0 -1
  172. package/dist-cli-web/assets/aiChat-CdADfRnU.js +0 -8
  173. package/dist-cli-web/assets/cli-web-BHQCZLLg.js +0 -1
  174. package/dist-cli-web/assets/fetch-ul8-uQIb.js +0 -1
  175. package/dist-cli-web/assets/index--IEkRjKe.js +0 -64
  176. package/dist-cli-web/assets/index-9iaY_EWG.js +0 -1
  177. package/dist-cli-web/assets/index-B4J99zv3.css +0 -1
  178. package/dist-cli-web/assets/index-BBeqtL8d.css +0 -1
  179. package/dist-cli-web/assets/index-BnaLj2dx.css +0 -1
  180. package/dist-cli-web/assets/index-C7omDgiJ.js +0 -2
  181. package/dist-cli-web/assets/index-CHsM84U1.js +0 -2
  182. package/dist-cli-web/assets/index-CL8u01Pf.js +0 -137
  183. package/dist-cli-web/assets/index-DrCc8p_I.css +0 -1
  184. package/dist-cli-web/assets/index-UpTe1KzQ.js +0 -1
  185. package/dist-cli-web/assets/index-a8Hw6eD8.js +0 -1
  186. package/dist-cli-web/assets/index-jwjzZNKm.js +0 -1
  187. package/dist-cli-web/assets/index-pkxlF8Ee.js +0 -1
  188. package/dist-cli-web/assets/index-sWxuTsa7.js +0 -36
  189. package/dist-cli-web/assets/service-CVoA9yNf.js +0 -1
  190. package/dist-cli-web/assets/service-DMysyLCa.js +0 -1
  191. package/dist-cli-web/assets/useFormControl-DVawP2DO.js +0 -1
  192. package/dist-cli-web/assets/useTable-Bv3R_Hux.js +0 -1
  193. /package/dist/{chunk-NQHZPSW2.mjs.map → chunk-N2WGG3MS.mjs.map} +0 -0
  194. /package/dist/{chunk-67HNPYZJ.mjs.map → chunk-RXMSZIYD.mjs.map} +0 -0
  195. /package/dist/{chunk-5MJO4AJB.mjs.map → chunk-SQWN4GTQ.mjs.map} +0 -0
  196. /package/dist/{http-5RVY5J5U.mjs.map → http-X6OEOOSH.mjs.map} +0 -0
  197. /package/dist/{import-ILTWVHKU.mjs.map → import-WBJ6YIQ7.mjs.map} +0 -0
  198. /package/dist/{mcp-Y2YXOFB4.mjs.map → mcp-FR6OKWKL.mjs.map} +0 -0
  199. /package/dist/{src-OV5ZNE3Z.mjs.map → src-WE5HNN2O.mjs.map} +0 -0
  200. /package/dist/{stream-import-XOUM3Z5W.mjs.map → stream-import-YYQVZDGQ.mjs.map} +0 -0
  201. /package/dist/{worker-runtime-JNGURHDM.mjs.map → worker-runtime-YGB5ZDE4.mjs.map} +0 -0
@@ -0,0 +1 @@
1
+ import{d as K,o as d,c as m,a as e,F as Y,j as U,p as s,g as r,e as u,n as W,ah as Q,f as H,z as C,w as B,a9 as E,a7 as Z,O as X,b as q,M as ee,ai as te,aj as ae,ak as se,K as ne,al as re,a5 as oe,l as I,a8 as ie,bu as le}from"./index-DnpnIyle.js";import{_ as ce}from"./LoadingState.vue_vue_type_script_setup_true_lang-CoeQsaiL.js";import{A as ue}from"./service-DvI8O_7K.js";import{g as de}from"./base-BWDX-164.js";import{_ as V}from"./ThemeCard.vue_vue_type_script_setup_true_lang-ndsa3-aT.js";import{C as ge}from"./CardDecoration-D28DI1G9.js";import{_ as me}from"./EChartBar.vue_vue_type_script_setup_true_lang-DuA5xbcC.js";import"./vendor-echarts-wordcloud-DNiU8Psq.js";import"./vendor-snapdom--nZvo8Sg.js";import"./EChart.vue_vue_type_script_setup_true_lang-BuLujQCF.js";import"./vendor-echarts-C9ugTmum.js";import"./vendor-zrender-D8psf1AA.js";const xe=1440*60*1e3;function ve(v){const t=new Map;for(const o of v){if(o.messageCount<=0)continue;const l=pe(o.date);l!==null&&t.set(l,(t.get(l)??0)+o.messageCount)}const n=[...t.keys()].sort((o,l)=>o-l);if(n.length===0)return{longestActiveStreak:0,topWeekday:null,weekdayMessageRate:null,weekendMessageRate:null};const x=Array.from({length:7},()=>0);let _=1,y=1;n.forEach((o,l)=>{const p=(new Date(o).getUTCDay()+6)%7;x[p]+=t.get(o)??0,l!==0&&(o-n[l-1]===xe?(y++,_=Math.max(_,y)):y=1)});const k=x.reduce((o,l)=>o+l,0),A=x[5]+x[6],w=Math.round(A/k*100),i=x.reduce((o,l,p)=>l>x[o]?p:o,0);return{longestActiveStreak:_,topWeekday:i+1,weekdayMessageRate:100-w,weekendMessageRate:w}}function pe(v){const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(v);if(!t)return null;const n=Number(t[1]),x=Number(t[2]),_=Number(t[3]),y=Date.UTC(n,x-1,_),k=new Date(y);return k.getUTCFullYear()!==n||k.getUTCMonth()!==x-1||k.getUTCDate()!==_?null:y}const he={class:"annual-calendar"},ye={class:"annual-calendar-months grid grid-cols-2 gap-x-4 gap-y-5"},ke={class:"mb-1.5 text-[11px] font-bold text-gray-500 dark:text-zinc-400"},fe={class:"grid grid-cols-7 gap-[3px]","aria-hidden":"true"},be=["title"],_e={class:"mt-4 flex items-center justify-end gap-1.5 text-[10px] text-gray-400 dark:text-zinc-500"},we=K({__name:"InsightCalendarGrid",props:{t:{type:Function},range:{},data:{},formatValue:{type:Function}},setup(v){const t=v,n=t.t,x=u(()=>Math.max(...t.data.map(o=>o.value),1)),_=u(()=>new Map(t.data.map(o=>[o.date,o.value]))),y=u(()=>new Date(t.range.startTs*1e3)),k=u(()=>new Date(t.range.endTs*1e3)),A=u(()=>{const o=y.value,l=k.value,p=[],h=t.range.year??o.getFullYear(),$=t.range.mode==="year"?new Date(h,0,1):new Date(o.getFullYear(),o.getMonth(),1),F=t.range.mode==="year"?new Date(h,11,1):new Date(l.getFullYear(),l.getMonth(),1);for(;$<=F;){const N=$.getFullYear(),M=$.getMonth(),R=`${N}-${String(M+1).padStart(2,"0")}`,f=new Date(N,M+1,0).getDate(),O=Array.from({length:f},(P,L)=>{const T=L+1,a=`${R}-${String(T).padStart(2,"0")}`,g=new Date(N,M,T),S=_.value.get(a)??0,c=g>=w(o)&&g<=w(l);return{key:a,day:T,count:S,inRange:c,level:c&&S>0?Math.max(1,Math.ceil(S/x.value*4)):0}});p.push({key:R,label:t.range.mode==="year"?t.t("monthLabel",{month:M+1}):R.replace("-","/"),leadingDays:(new Date(N,M,1).getDay()+6)%7,days:O}),$.setMonth($.getMonth()+1)}return p});function w(o){return new Date(o.getFullYear(),o.getMonth(),o.getDate())}function i(o){return t.formatValue?.(o)??`${o} ${t.t("messages")}`}return(o,l)=>(d(),m("div",he,[e("div",ye,[(d(!0),m(Y,null,U(A.value,p=>(d(),m("div",{key:p.key,class:"min-w-0"},[e("div",ke,s(p.label),1),e("div",fe,[(d(!0),m(Y,null,U(p.leadingDays,h=>(d(),m("span",{key:`blank-${h}`,class:"aspect-square min-h-[7px] rounded-[3px] bg-gray-50 dark:bg-zinc-800/30"}))),128)),(d(!0),m(Y,null,U(p.days,h=>(d(),m("span",{key:h.key,class:W(["aspect-square min-h-[7px] rounded-[3px]",{"opacity-30":!h.inRange,"bg-gray-50 dark:bg-zinc-800/30":h.level===0,"bg-pink-100 dark:bg-pink-500/10":h.level===1,"bg-pink-200 dark:bg-pink-500/25":h.level===2,"bg-pink-400 dark:bg-pink-500/50":h.level===3,"bg-pink-600 dark:bg-pink-500/80":h.level===4}]),title:`${h.key}: ${i(h.count)}`},null,10,be))),128))])]))),128))]),e("div",_e,[e("span",null,s(r(n)("calendar.less")),1),l[0]||(l[0]=e("span",{"aria-hidden":"true",class:"inline-block h-2.5 w-2.5 rounded-[2px] bg-pink-100 dark:bg-pink-500/10"},null,-1)),l[1]||(l[1]=e("span",{"aria-hidden":"true",class:"inline-block h-2.5 w-2.5 rounded-[2px] bg-pink-200 dark:bg-pink-500/25"},null,-1)),l[2]||(l[2]=e("span",{"aria-hidden":"true",class:"inline-block h-2.5 w-2.5 rounded-[2px] bg-pink-400 dark:bg-pink-500/50"},null,-1)),l[3]||(l[3]=e("span",{"aria-hidden":"true",class:"inline-block h-2.5 w-2.5 rounded-[2px] bg-pink-600 dark:bg-pink-500/80"},null,-1)),e("span",null,s(r(n)("calendar.more")),1)])]))}}),De=Q(we,[["__scopeId","data-v-593a96f3"]]),Ce=K({__name:"AnnualMonthlyTrend",props:{t:{type:Function},range:{},data:{},height:{}},setup(v){const t=v,n=u(()=>({labels:t.data.map(x=>t.range.mode==="year"?t.t("monthLabel",{month:Number(x.month.slice(5))}):x.month.replace("-","/")),values:t.data.map(x=>x.value)}));return(x,_)=>(d(),H(r(me),{data:n.value,height:v.height??260,"border-radius":3},null,8,["data","height"]))}}),Me={class:"grid gap-4 xl:grid-cols-7"},Se={class:"relative z-10 min-w-0 px-5 pt-6 pb-5 sm:px-8 sm:pt-8 sm:pb-6"},ze={class:"text-2xl font-bold tracking-tight text-gray-900 dark:text-white sm:text-3xl"},Te={class:"mt-6"},$e={class:"max-w-3xl space-y-3 text-gray-600 dark:text-zinc-300"},Ae={class:"flex flex-wrap items-baseline gap-x-2 gap-y-1 text-lg leading-relaxed sm:text-xl"},Ne={class:"font-black text-2xl tracking-tight tabular-nums text-pink-600 sm:text-3xl dark:text-pink-400"},Le={class:"font-black text-2xl tabular-nums text-blue-600 sm:text-3xl dark:text-blue-400"},Ye={class:"flex flex-wrap items-baseline gap-x-2 gap-y-1 text-base leading-relaxed sm:text-lg"},Fe={class:"font-black text-2xl tabular-nums text-indigo-600 dark:text-indigo-400"},Re={class:"font-black text-2xl tabular-nums text-amber-600 dark:text-amber-400"},Ue={class:"mt-7"},je={class:"mb-2 text-[10px] font-bold uppercase tracking-widest text-gray-400 dark:text-zinc-500"},Ie={class:"grid grid-cols-2 gap-2 lg:grid-cols-4"},Be={class:"min-w-0"},Ee={class:"mt-0.5 truncate text-[10px] font-medium text-gray-500 dark:text-zinc-400"},Oe={class:"mt-0.5 truncate text-[9px] text-gray-400 dark:text-zinc-500"},Pe={class:"mt-6 w-full min-w-0"},Ve={class:"mb-1 flex flex-wrap items-center justify-between gap-3"},We={class:"text-xs font-bold tracking-wide text-gray-700 dark:text-zinc-300"},qe={class:"mt-1 text-[10px] text-gray-400 dark:text-zinc-500"},Ke={class:"flex rounded-lg bg-gray-100 p-0.5 dark:bg-zinc-800"},Ge=["aria-pressed","onClick"],He={class:"mt-5 flex flex-wrap items-center justify-between gap-x-6 gap-y-1 border-t border-gray-200/60 pt-4 font-mono text-[10px] text-gray-400 dark:border-white/5 dark:text-zinc-500"},Je={class:"grid min-w-0 gap-4 xl:col-span-4"},Xe={class:"min-w-0 p-5 sm:p-6"},Ze={class:"flex items-center gap-2 text-xs font-bold uppercase tracking-wider text-gray-700 dark:text-zinc-300"},Qe={class:"mt-1 text-[10px] text-gray-400 dark:text-zinc-500"},et={key:0,class:"mt-5 grid grid-cols-2 gap-x-5 gap-y-4 sm:grid-cols-3"},tt={class:"flex items-end justify-between gap-2"},at={class:"truncate text-xs font-medium text-gray-600 dark:text-zinc-300"},st={class:"font-mono text-xs font-black tabular-nums text-gray-900 dark:text-white"},nt={class:"mt-2 h-1 overflow-hidden rounded-full bg-gray-100 dark:bg-zinc-800"},rt={class:"mt-1.5 font-mono text-[10px] text-gray-400 dark:text-zinc-500"},ot={key:1,class:"flex h-28 items-center justify-center text-xs text-gray-400 dark:text-zinc-600"},it={class:"min-w-0 p-5 sm:p-6"},lt={class:"flex items-start justify-between gap-3"},ct={class:"flex items-center gap-2 text-xs font-bold uppercase tracking-wider text-gray-700 dark:text-zinc-300"},ut={class:"mt-1 text-[10px] text-gray-400 dark:text-zinc-500"},dt={class:"flex shrink-0 gap-3 text-right"},gt={class:"font-mono text-sm font-black text-gray-900 dark:text-white"},mt={class:"text-[10px] text-gray-400 dark:text-zinc-500"},xt={class:"font-mono text-sm font-black text-gray-900 dark:text-white"},vt={key:0,class:"mt-5 flex h-24 items-end gap-2"},pt={class:"flex h-16 w-full items-end rounded-sm bg-gray-100 dark:bg-zinc-800"},ht=["title"],yt={class:"w-full truncate text-center font-mono text-[9px] text-gray-400 dark:text-zinc-500"},kt={key:1,class:"flex h-24 items-center justify-center text-xs text-gray-400 dark:text-zinc-600"},ft={class:"h-full min-w-0 p-5 sm:p-6"},bt={class:"flex items-start justify-between gap-4"},_t={class:"flex items-center gap-2 text-xs font-bold uppercase tracking-wider text-gray-700 dark:text-zinc-300"},wt={class:"mt-1 text-[10px] text-gray-400 dark:text-zinc-500"},Dt={class:"shrink-0 text-right"},Ct={class:"font-mono text-lg font-black tabular-nums text-gray-900 dark:text-white"},Mt={class:"text-[10px] text-gray-400 dark:text-zinc-500"},St={class:"mt-5"},zt=K({__name:"AnnualInsightBoard",props:{t:{type:Function},formatDate:{type:Function},formatNumber:{type:Function},range:{},metrics:{},coverage:{},monthlyActivity:{},monthlyDirectContacts:{},dailyActivity:{},messageTypes:{},textLength:{}},setup(v){const t=v,n=t.t,x=q("messages"),_=u(()=>t.range.mode==="year"?t.t("overview.yearTitle",{year:t.range.year}):t.t("overview.recentTitle")),y=u(()=>{const a={day:"2-digit",month:"2-digit",year:"numeric"};return`${t.formatDate(t.range.startTs*1e3,a)} – ${t.formatDate(t.range.endTs*1e3,a)}`}),k=u(()=>t.monthlyActivity.reduce((a,g)=>!a||g.messageCount>a.messageCount?g:a,null)),A=u(()=>t.dailyActivity.reduce((a,g)=>!a||g.messageCount>a.messageCount?g:a,null)),w=u(()=>[...t.messageTypes].sort((a,g)=>g.count-a.count).slice(0,6)),i=u(()=>t.messageTypes.reduce((a,g)=>a+g.count,0)),o=u(()=>t.messageTypes.find(a=>a.type===ee.TEXT)?.count??0),l=u(()=>L(o.value,i.value)),p=u(()=>Math.max(...t.textLength.buckets.map(a=>a.count),1)),h=u(()=>{const a=Math.max(1,Math.round((t.range.endTs-t.range.startTs)/86400)+1);return L(t.metrics.activeDayCount,a)}),$=u(()=>ve(t.dailyActivity)),F=u(()=>[{key:"dailyContacts",value:f(t.metrics.averageDirectContactsPerDay),label:t.t("overview.dailyContacts"),subtext:t.t("overview.perDay"),icon:"i-heroicons-user-plus",colorClass:"text-blue-600 dark:text-blue-400"},{key:"peakMonth",value:O(k.value?.month),label:t.t("overview.peakMonth"),subtext:t.t("overview.messagesCount",{count:f(k.value?.messageCount??0)}),icon:"i-heroicons-calendar-days",colorClass:"text-pink-600 dark:text-pink-400"},{key:"peakDay",value:P(A.value?.date),label:t.t("overview.peakDay"),subtext:t.t("overview.messagesCount",{count:f(A.value?.messageCount??0)}),icon:"i-heroicons-fire",colorClass:"text-red-600 dark:text-red-400"},{key:"longestActiveStreak",value:f($.value.longestActiveStreak),label:t.t("overview.longestActiveStreak"),subtext:t.t("overview.consecutiveActiveDays"),icon:"i-heroicons-bolt",colorClass:"text-amber-600 dark:text-amber-400"}]),N=u(()=>x.value==="messages"?t.monthlyActivity.map(a=>({month:a.month,value:a.messageCount})):t.monthlyDirectContacts.map(a=>({month:a.month,value:a.contactCount}))),M=u(()=>t.dailyActivity.map(a=>({date:a.date,value:a.messageCount}))),R=u(()=>t.t(x.value==="messages"?"sections.overviewDescription":"sections.directContactsDescription"));function f(a){return t.formatNumber(a,Number.isInteger(a)?void 0:{maximumFractionDigits:1})}function O(a){return a?t.range.mode==="year"?t.t("monthLabel",{month:Number(a.slice(5))}):a.replace("-","/"):"-"}function P(a){if(!a)return"-";const[g,S,c]=a.split("-");return t.formatDate(new Date(Number(g),Number(S)-1,Number(c)),{day:"2-digit",month:"2-digit"})}function L(a,g){return g>0?Math.round(a/g*100):0}function T(a){return n(a)}return(a,g)=>{const S=Z;return d(),m("div",Me,[C(r(V),{class:"relative isolate overflow-hidden xl:col-span-7"},{default:B(()=>[C(r(ge)),e("section",Se,[e("h2",ze,s(_.value),1),e("div",Te,[e("div",$e,[e("p",Ae,[e("span",null,s(r(n)("overview.narrative.messagesPrefix")),1),e("span",Ne,s(f(v.metrics.sentMessageCount)),1),e("span",null,s(r(n)("overview.narrative.messagesSuffix")),1),e("span",Le,s(f(v.metrics.averageMessagesPerDay)),1),e("span",null,s(r(n)("overview.narrative.dailySuffix")),1)]),e("p",Ye,[e("span",null,s(r(n)("overview.narrative.activePrefix")),1),e("span",Fe,s(f(v.metrics.activeDayCount)),1),e("span",null,s(r(n)("overview.narrative.activeMiddle")),1),e("span",Re,s(f(v.metrics.directContactCount)),1),e("span",null,s(r(n)("overview.narrative.contactsSuffix")),1)])]),e("div",Ue,[e("div",je,s(r(n)("overview.keyMetrics")),1),e("div",Ie,[(d(!0),m(Y,null,U(F.value,c=>(d(),m("div",{key:c.key,class:"flex min-w-0 items-start gap-2 px-2.5 py-2"},[C(S,{name:c.icon,class:W(["mt-0.5 h-3.5 w-3.5 shrink-0",c.colorClass])},null,8,["name","class"]),e("div",Be,[e("div",{class:W(["truncate font-mono text-sm leading-tight font-black tabular-nums",c.colorClass])},s(c.value),3),e("div",Ee,s(c.label),1),e("div",Oe,s(c.subtext),1)])]))),128))])]),e("div",Pe,[e("div",Ve,[e("div",null,[e("h3",We,s(r(n)("sections.overview")),1),e("p",qe,s(R.value),1)]),e("div",Ke,[(d(),m(Y,null,U(["messages","contacts"],c=>e("button",{key:c,type:"button",class:W(["rounded-md px-2.5 py-1 text-[10px] font-medium transition-colors",x.value===c?"bg-white text-gray-900 shadow-sm dark:bg-zinc-700 dark:text-white":"text-gray-500 hover:text-gray-700 dark:text-zinc-400 dark:hover:text-zinc-200"]),"aria-pressed":x.value===c,onClick:J=>x.value=c},s(r(n)(`overview.monthlyTrend.${c}`)),11,Ge)),64))])]),C(Ce,{t:r(n),range:v.range,data:N.value,height:240},null,8,["t","range","data"])])]),e("div",He,[e("span",null,s(y.value),1),e("span",null,s(r(n)("status.coverage",{analyzed:v.coverage.analyzedSessions,total:v.coverage.totalSessions})),1)])])]),_:1}),e("div",Je,[C(r(V),null,{default:B(()=>[e("section",Xe,[e("h3",Ze,[g[0]||(g[0]=e("span",{class:"inline-block h-2 w-2 rounded-full bg-pink-500 dark:bg-pink-400"},null,-1)),E(" "+s(r(n)("sections.messageTypes")),1)]),e("p",Qe,s(r(n)("sections.messageTypesDescription")),1),w.value.length?(d(),m("div",et,[(d(!0),m(Y,null,U(w.value,c=>(d(),m("div",{key:c.type,class:"min-w-0"},[e("div",tt,[e("span",at,s(r(de)(c.type,T)),1),e("span",st,s(L(c.count,i.value))+"% ",1)]),e("div",nt,[e("div",{class:"h-full rounded-full bg-pink-500 dark:bg-pink-400",style:X({width:`${L(c.count,i.value)}%`})},null,4)]),e("div",rt,s(f(c.count)),1)]))),128))])):(d(),m("div",ot,s(r(n)("noData")),1))])]),_:1}),C(r(V),null,{default:B(()=>[e("section",it,[e("div",lt,[e("div",null,[e("h3",ct,[g[1]||(g[1]=e("span",{class:"inline-block h-2 w-2 rounded-full bg-pink-500 dark:bg-pink-400"},null,-1)),E(" "+s(r(n)("sections.textLength")),1)]),e("p",ut,s(r(n)("overview.textRatio"))+" "+s(l.value)+"% ",1)]),e("div",dt,[e("div",null,[e("div",gt,s(v.textLength.median??"-"),1),e("div",mt,s(r(n)("length.median")),1)]),e("div",null,[e("div",xt,s(v.textLength.p90??"-"),1),g[2]||(g[2]=e("div",{class:"text-[10px] text-gray-400 dark:text-zinc-500"},"P90",-1))])])]),v.textLength.textMessageCount?(d(),m("div",vt,[(d(!0),m(Y,null,U(v.textLength.buckets,c=>(d(),m("div",{key:c.key,class:"flex min-w-0 flex-1 flex-col items-center gap-2"},[e("div",pt,[e("div",{class:"w-full rounded-sm bg-pink-500/80 dark:bg-pink-400/80",style:X({height:`${Math.max(4,c.count/p.value*100)}%`}),title:`${c.key}: ${c.count}`},null,12,ht)]),e("span",yt,s(c.key),1)]))),128))])):(d(),m("div",kt,s(r(n)("noTextData")),1))])]),_:1})]),C(r(V),{class:"xl:col-span-3"},{default:B(()=>[e("section",ft,[e("div",bt,[e("div",null,[e("h3",_t,[g[3]||(g[3]=e("span",{class:"inline-block h-2 w-2 rounded-full bg-pink-500 dark:bg-pink-400"},null,-1)),E(" "+s(r(n)("overview.activity")),1)]),e("p",wt,s(r(n)("sections.activityDescription")),1)]),e("div",Dt,[e("div",Ct,s(v.metrics.activeDayCount),1),e("div",Mt,s(r(n)("overview.activeRate",{rate:h.value})),1)])]),e("div",St,[C(De,{t:r(n),range:v.range,data:M.value},null,8,["t","range","data"])])])]),_:1})])}}}),Tt={class:"min-h-0 flex-1 overflow-y-auto"},$t={class:"mx-auto w-full max-w-[920px] space-y-6 px-4 py-5 sm:px-6 sm:py-6"},At={class:"min-w-0"},Nt={key:1,class:"flex items-center gap-2 rounded-xl border border-amber-100 bg-amber-50/50 px-4 py-2.5 text-xs text-amber-800 backdrop-blur-sm dark:border-amber-950/40 dark:bg-amber-950/20 dark:text-amber-300"},Lt={key:2,class:"flex flex-wrap items-center justify-between gap-3 rounded-xl border border-red-200 bg-red-50/50 px-4 py-2.5 text-xs text-red-800 backdrop-blur-sm dark:border-red-950/40 dark:bg-red-950/20 dark:text-red-300"},Yt={key:0,class:"flex flex-wrap items-center justify-between gap-3 rounded-xl border border-gray-200 bg-white p-4 text-xs text-gray-600 dark:border-zinc-800 dark:bg-zinc-900/50 dark:text-zinc-300"},Ft={key:0},Rt={key:1},Ht=K({__name:"index",setup(v){const t=te(),n=ae(le),{formatDate:x,formatNumber:_}=se(),y=t.insightScope,k=t.services.get(ue),A=new Date().getFullYear(),w=q(y.getSnapshot()),i=q(null),o=q("");let l=null,p=0;const h=y.subscribe(()=>{w.value=y.getSnapshot()}),$=k.subscribeOwnerSettingsClosed(()=>{a(!1)}),F=u(()=>{const b=w.value.time;return b?b.mode==="recent"?{mode:"recent",days:365,acceptStale:!0}:b.mode==="year"?{mode:"year",year:b.year??A,acceptStale:!0}:null:null}),N=u(()=>JSON.stringify(F.value)),M=u(()=>(i.value?.coverage.missingOwnerSessions??0)+(i.value?.coverage.unresolvedOwnerSessions??0)),R=u(()=>i.value?.task.status==="running"),f=u(()=>i.value?.metrics!==null&&i.value?.metrics!==void 0),O=u(()=>f.value&&i.value?.metrics?.sentMessageCount===0),P=u(()=>(i.value?.coverage.totalSessions??0)>0&&i.value?.coverage.analyzedSessions===0&&M.value>0),L=u(()=>w.value.time?.mode==="year"?w.value.time.year:void 0),T=u(()=>{const b=L.value,z=i.value?.latestDataYear;return b===void 0||z===null||z===void 0||b===z?null:{year:b,latestYear:z}});ne(N,()=>{S(),F.value&&(i.value=null,a(!1))},{immediate:!0}),re(()=>{p++,S(),h(),$()});async function a(b){const z=F.value;if(!z)return;const j=++p;o.value="";try{const D=b?await k.recompute(z):await k.get(z);if(j!==p)return;i.value=D,D.metrics&&y.setAvailableTimeYears(D.availableDataYears),D.task.status==="running"&&g()}catch(D){if(j!==p)return;const G=D instanceof Error?D.message:String(D);o.value=G,oe(`Global insight annual summary failed: ${G}`,D instanceof Error?D.stack:void 0)}}function g(){S(),l=setTimeout(()=>{a(!1)},900)}function S(){l&&(clearTimeout(l),l=null)}function c(){const b=i.value?.latestDataYear;b&&y.switchTimeToYear(b)}function J(){k.openOwnerSettings()}return(b,z)=>{const j=Z,D=ie;return d(),m("main",Tt,[e("div",$t,[M.value>0?(d(),m("button",{key:0,type:"button",class:"inline-flex w-fit max-w-full items-center gap-2 rounded-lg bg-amber-50 px-3 py-2 text-left text-xs text-amber-800 transition-colors hover:bg-amber-100 dark:bg-amber-950/20 dark:text-amber-300 dark:hover:bg-amber-950/30",onClick:J},[C(j,{name:"i-heroicons-user-circle",class:"h-4 w-4 shrink-0"}),e("span",At,s(r(n)("status.ownerIssues",{count:M.value})),1),C(j,{name:"i-heroicons-arrow-right",class:"h-3.5 w-3.5 shrink-0 opacity-70"})])):I("",!0),i.value?.cache.status==="stale"||R.value&&f.value?(d(),m("div",Nt,[C(j,{name:"i-heroicons-arrow-path",class:"h-4 w-4 shrink-0 animate-spin text-amber-600 dark:text-amber-400"}),E(" "+s(r(n)("status.updating")),1)])):I("",!0),o.value||i.value?.task.status==="failed"?(d(),m("div",Lt,[e("span",null,s(r(n)("status.failed")),1),C(D,{size:"xs",color:"error",variant:"soft",icon:"i-heroicons-arrow-path",onClick:z[0]||(z[0]=G=>a(!0))},{default:B(()=>[E(s(r(n)("actions.retry")),1)]),_:1})])):I("",!0),!f.value&&!o.value&&i.value?.task.status!=="failed"?(d(),H(ce,{key:3,height:"min(52vh, 420px)",text:i.value?.task.status==="running"?r(n)("status.computingProgress",{processed:i.value.task.processedSessions,total:i.value.task.totalSessions}):r(n)("status.loading")},null,8,["text"])):i.value?.metrics&&i.value.textLength?(d(),m(Y,{key:4},[O.value&&!P.value?(d(),m("div",Yt,[T.value?(d(),m("span",Ft,s(r(n)("status.noDataWithLatest",T.value)),1)):(d(),m("span",Rt,s(r(n)("noData")),1)),T.value?(d(),H(D,{key:2,size:"xs",variant:"soft",color:"neutral",icon:"i-heroicons-arrow-right",onClick:c},{default:B(()=>[E(s(r(n)("actions.switchYear",{year:T.value.latestYear})),1)]),_:1})):I("",!0)])):I("",!0),C(zt,{t:r(n),"format-date":r(x),"format-number":r(_),range:i.value.range,metrics:i.value.metrics,coverage:i.value.coverage,"monthly-activity":i.value.monthlyActivity,"monthly-direct-contacts":i.value.monthlyDirectContacts,"daily-activity":i.value.dailyActivity,"message-types":i.value.messageTypes,"text-length":i.value.textLength},null,8,["t","format-date","format-number","range","metrics","coverage","monthly-activity","monthly-direct-contacts","daily-activity","message-types","text-length"])],64)):I("",!0)])])}}});export{Ht as default};
@@ -1 +1 @@
1
- import{E as l,f as n,G as u,H as d}from"./index-sWxuTsa7.js";const o=Symbol("PeoplePageHeader");function P(e){const a=u(null),r=n(()=>a.value?.value??e.value);function s(t){a.value=t}return d(o,{setHeader:s}),{header:r}}function c(e){l(o)?.setHeader(e)}export{P as p,c as u};
1
+ import{E as l,e as n,G as u,H as d}from"./index-DnpnIyle.js";const o=Symbol("PeoplePageHeader");function P(e){const a=u(null),r=n(()=>a.value?.value??e.value);function s(t){a.value=t}return d(o,{setHeader:s}),{header:r}}function c(e){l(o)?.setHeader(e)}export{P as p,c as u};
@@ -1 +1 @@
1
- import{d as x,r as s}from"./index-sWxuTsa7.js";const k=x("prompt",()=>{const u=s(0),i=s({maxMessagesPerRequest:1e3,exportFormat:"markdown",sqlExportFormat:"csv",enableAutoSkill:!0,chartAutoMode:"suggest",searchContextBefore:2,searchContextAfter:2}),n=s([]),l=s([]),a=s({});function r(){u.value++}function d(e){i.value={...i.value,...e},r()}function c(e){n.value.push(e)}function f(e,t){const o=n.value.findIndex(h=>h.id===e);o!==-1&&(n.value[o]={...n.value[o],...t})}function m(e){const t=n.value.findIndex(o=>o.id===e);t!==-1&&n.value.splice(t,1)}function p(e){l.value.includes(e)||l.value.push(e)}function v(e,t){return a.value[`${e}:${t}`]}function g(e,t,o){a.value={...a.value,[`${e}:${t}`]:o}}return{aiConfigVersion:u,aiGlobalSettings:i,customKeywordTemplates:n,deletedPresetTemplateIds:l,thinkingLevels:a,notifyAIConfigChanged:r,updateAIGlobalSettings:d,addCustomKeywordTemplate:c,updateCustomKeywordTemplate:f,removeCustomKeywordTemplate:m,addDeletedPresetTemplateId:p,getThinkingLevel:v,setThinkingLevel:g}},{persist:!1,backendPersist:{pick:["aiGlobalSettings","customKeywordTemplates","deletedPresetTemplateIds","thinkingLevels"]}});export{k as u};
1
+ import{h as x,b as s}from"./index-DnpnIyle.js";const k=x("prompt",()=>{const u=s(0),i=s({maxMessagesPerRequest:1e3,exportFormat:"markdown",sqlExportFormat:"csv",enableAutoSkill:!0,chartAutoMode:"suggest",searchContextBefore:2,searchContextAfter:2}),n=s([]),l=s([]),a=s({});function r(){u.value++}function d(e){i.value={...i.value,...e},r()}function c(e){n.value.push(e)}function f(e,t){const o=n.value.findIndex(h=>h.id===e);o!==-1&&(n.value[o]={...n.value[o],...t})}function m(e){const t=n.value.findIndex(o=>o.id===e);t!==-1&&n.value.splice(t,1)}function p(e){l.value.includes(e)||l.value.push(e)}function v(e,t){return a.value[`${e}:${t}`]}function g(e,t,o){a.value={...a.value,[`${e}:${t}`]:o}}return{aiConfigVersion:u,aiGlobalSettings:i,customKeywordTemplates:n,deletedPresetTemplateIds:l,thinkingLevels:a,notifyAIConfigChanged:r,updateAIGlobalSettings:d,addCustomKeywordTemplate:c,updateCustomKeywordTemplate:f,removeCustomKeywordTemplate:m,addDeletedPresetTemplateId:p,getThinkingLevel:v,setThinkingLevel:g}},{persist:!1,backendPersist:{pick:["aiGlobalSettings","customKeywordTemplates","deletedPresetTemplateIds","thinkingLevels"]}});export{k as u};
@@ -1 +1 @@
1
- import{C as l,r as d,S as r,N as u,T as p}from"./index-sWxuTsa7.js";function h(e){const n=d(!1);function t(){n.value=!0}function a(o){l(()=>{n.value=!1,e?.(o)})}return{isComposing:n,handleCompositionStart:t,handleCompositionEnd:a}}const s="/ai/semantic-index";function i(e){return async n=>(await r(`${s}/${e}`,{sessionId:n})).status}const m={getConfig:()=>u(`${s}/config`),setConfig:(e,n)=>p(`${s}/config`,{config:e,apiKey:n}),listEnabled:async()=>(await u(`${s}/enabled`)).sessions,status:async e=>(await u(`${s}/status?sessionId=${encodeURIComponent(e)}`)).status,statusForSessions:async e=>(await r(`${s}/status`,{sessionIds:e})).sessions,enable:i("enable"),remove:i("remove"),build:i("build"),pause:i("pause"),cancel:i("cancel"),rebuild:i("rebuild"),buildPending:async()=>(await r(`${s}/build-pending`)).sessions,cleanup:()=>r(`${s}/cleanup`)};function S(){return m}function c(e){return(e??"").trim().replace(/\/+$/,"")}function $(e){if(!e)return!0;try{const n=new URL(e),t=n.hostname.toLowerCase(),a=t==="localhost"||t==="127.0.0.1"||t==="::1",o=n.port||(n.protocol==="https:"?"443":"80");return!(a&&o==="11434")}catch{return!0}}function f(e,n,t=!0){return!t||e?.mode!=="api"||!e.api?.authProfile?!1:c(e.api.baseUrl)===c(n)}function w(e,n){const t=n.apiBaseUrl.trim(),a=n.apiModel.trim(),o=f(e,t)?e?.api?.authProfile:void 0;return{version:e?.version??1,enabled:e?.enabled??!0,mode:n.mode,local:{modelId:n.localModelId,downloadSource:n.localDownloadSource},api:n.mode==="api"?{baseUrl:t,model:a,...o?{authProfile:o}:{}}:null,searchMaxResults:10}}export{S as a,w as b,f as c,$ as i,h as u};
1
+ import{C as l,b as d,V as r,S as u,W as p}from"./index-DnpnIyle.js";function h(e){const n=d(!1);function t(){n.value=!0}function a(o){l(()=>{n.value=!1,e?.(o)})}return{isComposing:n,handleCompositionStart:t,handleCompositionEnd:a}}const s="/ai/semantic-index";function i(e){return async n=>(await r(`${s}/${e}`,{sessionId:n})).status}const m={getConfig:()=>u(`${s}/config`),setConfig:(e,n)=>p(`${s}/config`,{config:e,apiKey:n}),listEnabled:async()=>(await u(`${s}/enabled`)).sessions,status:async e=>(await u(`${s}/status?sessionId=${encodeURIComponent(e)}`)).status,statusForSessions:async e=>(await r(`${s}/status`,{sessionIds:e})).sessions,enable:i("enable"),remove:i("remove"),build:i("build"),pause:i("pause"),cancel:i("cancel"),rebuild:i("rebuild"),buildPending:async()=>(await r(`${s}/build-pending`)).sessions,cleanup:()=>r(`${s}/cleanup`)};function S(){return m}function c(e){return(e??"").trim().replace(/\/+$/,"")}function $(e){if(!e)return!0;try{const n=new URL(e),t=n.hostname.toLowerCase(),a=t==="localhost"||t==="127.0.0.1"||t==="::1",o=n.port||(n.protocol==="https:"?"443":"80");return!(a&&o==="11434")}catch{return!0}}function f(e,n,t=!0){return!t||e?.mode!=="api"||!e.api?.authProfile?!1:c(e.api.baseUrl)===c(n)}function w(e,n){const t=n.apiBaseUrl.trim(),a=n.apiModel.trim(),o=f(e,t)?e?.api?.authProfile:void 0;return{version:e?.version??1,enabled:e?.enabled??!0,mode:n.mode,local:{modelId:n.localModelId,downloadSource:n.localDownloadSource},api:n.mode==="api"?{baseUrl:t,model:a,...o?{authProfile:o}:{}}:null,searchMaxResults:10}}export{S as a,w as b,f as c,$ as i,h as u};
@@ -1 +1 @@
1
- import{X as e}from"./index-sWxuTsa7.js";import"./vendor-snapdom--nZvo8Sg.js";function c(){return e("cache")}export{c as useCacheService};
1
+ import{$ as e}from"./index-DnpnIyle.js";import"./vendor-snapdom--nZvo8Sg.js";function c(){return e("cache")}export{c as useCacheService};
@@ -0,0 +1 @@
1
+ import{N as e}from"./index-DnpnIyle.js";const t=e("insight.time-investment.ui-service");export{t as T};
@@ -0,0 +1 @@
1
+ import{N as e}from"./index-DnpnIyle.js";const r=e("insight.annual-summary.ui-service");export{r as A};
@@ -0,0 +1 @@
1
+ import{e,t,i as r}from"./index-DnpnIyle.js";function n(o){return e(()=>t(o)?!!r(o)?.closest("form"):!0)}export{n as u};
@@ -0,0 +1 @@
1
+ import{d as G,a6 as Q,ap as H,K as z,x as J,o as u,f as N,aa as W,w as V,a as n,n as A,z as S,a7 as X,p as f,g as p,a8 as Y,aq as Z,c as h,F as ee,j as te,l as U,a9 as M,e as j,b as C,L as se,G as L}from"./index-DnpnIyle.js";import{u as ae}from"./useToast-CCPBE-Sy.js";const oe={class:"p-6"},ne={class:"mb-4 flex items-center justify-between"},re={class:"flex items-center gap-3"},le={class:"text-lg font-semibold text-gray-900 dark:text-white"},ie={class:"text-sm text-gray-500 dark:text-gray-400"},ce={class:"h-56 overflow-y-auto rounded-lg border border-gray-200 dark:border-gray-700"},ue={key:0,class:"flex h-full items-center justify-center"},de={key:1,class:"flex h-full items-center justify-center"},fe={class:"text-sm text-gray-500 dark:text-gray-400"},me={key:2,class:"divide-y divide-gray-100 dark:divide-gray-800"},ve=["onClick"],pe=["src","alt"],he={key:1,class:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-linear-to-br from-gray-300 to-gray-400 text-xs font-medium text-white dark:from-gray-600 dark:to-gray-700"},ye={class:"min-w-0 flex-1"},we={class:"truncate text-sm font-medium text-gray-900 dark:text-white"},ge={class:"truncate text-xs text-gray-500 dark:text-gray-400"},_e={class:"mt-3 text-xs text-gray-500 dark:text-gray-400"},xe={key:0,class:"mt-2"},ke={class:"mt-5 flex items-center justify-between gap-2"},Ie={key:1},be={class:"flex gap-2"},Oe=G({__name:"OwnerPromptModal",props:{sessionId:{},modelValue:{type:Boolean,default:!1},chatType:{default:"group"},autoCheck:{type:Boolean,default:!1}},emits:["update:modelValue","saved","cleared"],setup(y,{emit:c}){const e=y,w=c,{t:a}=Q(),g=ae(),m=H(),i=j({get:()=>e.modelValue,set:t=>w("update:modelValue",t)}),o=C([]),s=C(!1),r=C(!1),P=C(!1),x=C(""),v=C(null),_=j(()=>m.sessions.find(t=>t.id===e.sessionId)?.ownerId??null);function k(t){return t.groupNickname||t.accountName||t.platformId}const O=j(()=>{const t=x.value.trim().toLowerCase(),I=o.value.filter(d=>d.platformId&&d.platformId.trim()!=="");return t?I.filter(d=>[d.platformId,d.accountName??"",d.groupNickname??"",...d.aliases].some(b=>b.toLowerCase().includes(t))):I});async function R(){if(e.sessionId){s.value=!0;try{o.value=await se().getMembers(e.sessionId)}catch(t){console.error("加载成员列表失败:",t)}finally{s.value=!1}}}async function B(){if(!(!e.sessionId||!e.autoCheck)&&!_.value)try{const t=await m.tryApplyOwnerProfile(e.sessionId);if(t.applied||t.reason==="already_set"||t.reason==="missing_session"||t.excluded)return;i.value=!0}catch(t){console.error("检查会话 owner 失败:",t)}}async function $(){if(!(!v.value||!e.sessionId)){r.value=!0;try{const t=await m.setOwnerAndApplyProfile(e.sessionId,v.value);t.updatedSessionIds.length>0?g.success(a("members.ownerPrompt.saved"),{description:a("members.ownerPrompt.appliedToOthers",{count:t.updatedSessionIds.length})}):g.success(a("members.ownerPrompt.saved")),w("saved",t.ownerId),i.value=!1}catch(t){console.error("设置会话 owner 失败:",t),g.fail(a("members.ownerPrompt.saveFailed"))}finally{r.value=!1}}}async function F(){if(!(!e.sessionId||!_.value)){r.value=!0;try{await m.updateSessionOwnerId(e.sessionId,null)&&(v.value=null,w("cleared"),i.value=!1)}catch(t){console.error("清除会话 owner 失败:",t)}finally{r.value=!1}}}async function K(){if(e.sessionId){P.value=!0;try{await m.excludeOwnerSession(e.sessionId),i.value=!1}catch(t){console.error("忽略 owner 提醒失败:",t)}finally{P.value=!1}}}function D(){i.value=!1}function T(){x.value="",v.value=_.value,o.value=[],R()}return z(i,t=>{t&&T()},{immediate:!0}),z(()=>e.sessionId,()=>{i.value&&T(),B()}),J(()=>{B()}),(t,I)=>{const d=X,b=Y,q=Z,E=W;return u(),N(E,{open:i.value,"onUpdate:open":I[1]||(I[1]=l=>i.value=l),ui:{content:"max-w-md z-[111]",overlay:"z-[110]"}},{content:V(()=>[n("div",oe,[n("div",ne,[n("div",re,[n("div",{class:A(["flex h-10 w-10 items-center justify-center rounded-full bg-linear-to-br",y.chatType==="group"?"from-pink-400 to-pink-600":"from-purple-400 to-purple-600"])},[S(d,{name:"i-heroicons-user",class:"h-5 w-5 text-white"})],2),n("div",null,[n("h3",le,f(p(a)("members.ownerPrompt.title")),1),n("p",ie,f(p(a)("members.ownerPrompt.subtitle")),1)])]),S(b,{icon:"i-heroicons-x-mark",color:"neutral",variant:"ghost",size:"sm",onClick:D})]),S(q,{modelValue:x.value,"onUpdate:modelValue":I[0]||(I[0]=l=>x.value=l),placeholder:p(a)("members.ownerPrompt.searchPlaceholder"),icon:"i-heroicons-magnifying-glass",class:"mb-3 w-full"},null,8,["modelValue","placeholder"]),n("div",ce,[s.value?(u(),h("div",ue,[S(d,{name:"i-heroicons-arrow-path",class:"h-5 w-5 animate-spin text-gray-400"})])):O.value.length===0?(u(),h("div",de,[n("p",fe,f(x.value?p(a)("members.ownerPrompt.noMatch"):p(a)("members.ownerPrompt.empty")),1)])):(u(),h("ul",me,[(u(!0),h(ee,null,te(O.value,l=>(u(),h("li",{key:l.id},[n("button",{type:"button",class:A(["flex w-full items-center gap-3 px-3 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-800/50",v.value===l.platformId?"bg-primary-50 dark:bg-primary-900/20":""]),onClick:Se=>v.value=l.platformId},[l.avatar?(u(),h("img",{key:0,src:l.avatar,alt:k(l),class:"h-8 w-8 shrink-0 rounded-full object-cover"},null,8,pe)):(u(),h("div",he,f(k(l).slice(0,1)),1)),n("div",ye,[n("p",we,f(k(l)),1),n("p",ge,f(l.platformId),1)]),v.value===l.platformId?(u(),N(d,{key:2,name:"i-heroicons-check-circle-solid",class:"h-5 w-5 shrink-0 text-primary-500"})):U("",!0)],10,ve)]))),128))]))]),n("p",_e,f(p(a)("members.ownerPrompt.description")),1),_.value?(u(),h("div",xe,[S(b,{variant:"link",color:"neutral",size:"xs",disabled:r.value,onClick:F},{default:V(()=>[M(f(p(a)("members.ownerPrompt.clear")),1)]),_:1},8,["disabled"])])):U("",!0),n("div",ke,[_.value?(u(),h("span",Ie)):(u(),N(b,{key:0,variant:"soft",color:"primary",size:"sm",loading:P.value,onClick:K},{default:V(()=>[M(f(p(a)("members.ownerPrompt.notInConversation")),1)]),_:1},8,["loading"])),n("div",be,[S(b,{variant:"ghost",color:"neutral",onClick:D},{default:V(()=>[M(f(p(a)("members.ownerPrompt.later")),1)]),_:1}),S(b,{color:"primary",loading:r.value,disabled:!v.value,onClick:$},{default:V(()=>[M(f(p(a)("members.ownerPrompt.save")),1)]),_:1},8,["loading","disabled"])])])])]),_:1},8,["open"])}}});function Ve(y={}){const c=y.initialState??{field:null,direction:null},e=L({...c});function w(o){if(e.value.field!==o){e.value={field:o,direction:"asc"};return}if(e.value.direction==="asc"){e.value={field:o,direction:"desc"};return}if(e.value.direction==="desc"){e.value={field:null,direction:null};return}e.value={field:o,direction:"asc"}}function a(o,s){e.value={field:o,direction:s}}function g(){e.value={...c}}function m(o){return e.value.field===o?e.value.direction:null}function i(o,s){return m(o)===s}return{sortState:e,toggleSort:w,setSort:a,resetSort:g,getSortDirection:m,isSortActive:i}}function Me(y){const c=L(new Set),e=C(null);z(y.rows,()=>{e.value=null});function w(s){c.value=new Set(s)}function a(){w([]),e.value=null}function g(s){const r=new Set(c.value);r.has(s)?r.delete(s):r.add(s),c.value=r}function m(s){return c.value.has(s)}function i(s,r,P){if(P.shiftKey&&e.value!==null){const x=Math.min(e.value,s),v=Math.max(e.value,s),_=new Set(c.value);for(let k=x;k<=v;k+=1){const O=y.rows.value[k];O&&_.add(y.getRowId(O))}c.value=_}else g(r);e.value=s}function o(s){!s.shiftKey||s.target?.closest?.('input, textarea, [contenteditable="true"]')||s.preventDefault()}return{selectedIds:c,setSelection:w,clearSelection:a,toggleSelection:g,isSelected:m,handleRowClick:i,handleRowMouseDown:o}}export{Oe as _,Me as a,Ve as u};
@@ -1 +1 @@
1
- import{a2 as c}from"./index-sWxuTsa7.js";const t=2e3;function e(){const a=c(),s=o=>a.add({duration:t,...o});return{add:s,success:(o,r={})=>s({title:o,color:"success",...r}),fail:(o,r={})=>s({title:o,color:"error",...r}),info:(o,r={})=>s({title:o,color:"primary",...r}),warn:(o,r={})=>s({title:o,color:"warning",...r})}}export{e as u};
1
+ import{a4 as c}from"./index-DnpnIyle.js";const t=2e3;function e(){const a=c(),s=o=>a.add({duration:t,...o});return{add:s,success:(o,r={})=>s({title:o,color:"success",...r}),fail:(o,r={})=>s({title:o,color:"error",...r}),info:(o,r={})=>s({title:o,color:"primary",...r}),warn:(o,r={})=>s({title:o,color:"warning",...r})}}export{e as u};
@@ -8,4 +8,4 @@ import{i as $,r as tn,m as X,a as z,b as K,e as be,c as q,d as w,f as ve,g as bs
8
8
 
9
9
  `:"<br/>",g=c.join(y);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,g,u,Math.random()+"",o[0],o[1],v,null,h)})},t.prototype._showSeriesItemTooltip=function(e,a,n){var i=this._ecModel,o=te(a),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,c=o.dataType,h=u.getData(c),v=this._renderMode,d=e.positionDefault,p=Na([h.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),y=p.get("trigger");if(!(y!=null&&y!=="item")){var g=u.getDataParams(f,c),m=new Oo;g.marker=m.makeTooltipMarker("item",Ar(g.color),v);var _=Af(u.formatTooltip(f,!1,c)),S=p.get("order"),b=p.get("valueFormatter"),x=_.frag,C=x?Ef(b?U({valueFormatter:b},x):x,m,v,S,i.get("useUTC"),p.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(p,function(){this._showTooltipContent(p,C,g,T,e.offsetX,e.offsetY,e.position,e.target,m)}),n({type:"showTip",dataIndexInside:f,dataIndex:h.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,a,n){var i=this._renderMode==="html",o=te(a),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if($(l)){var f=l;l={content:f,formatter:f},u=!0}u&&i&&l.content&&(l=ee(l),l.content=Ze(l.content));var c=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&c.push(h),c.push({formatter:l.content});var v=e.positionDefault,d=Na(c,this._tooltipModel,v?{position:v}:null),p=d.get("content"),y=Math.random()+"",g=new Oo;this._showOrMove(d,function(){var m=ee(d.get("formatterParams")||{});this._showTooltipContent(d,p,m,y,e.offsetX,e.offsetY,e.position,a,g)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,a,n,i,o,s,l,u,f){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var c=this._tooltipContent;c.setEnterable(e.get("enterable"));var h=e.get("formatter");l=l||e.get("position");var v=a,d=this._getNearestPoint([o,s],n,e.get("trigger"),e.get("borderColor"),e.get("defaultBorderColor",!0)),p=d.color;if(h)if($(h)){var y=e.ecModel.get("useUTC"),g=z(n)?n[0]:n,m=g&&g.axisType&&g.axisType.indexOf("time")>=0;v=h,m&&(v=co(g.axisValue,v,y)),v=od(v,n,!0)}else if(j(h)){var _=Z(function(S,b){S===this._ticket&&(c.setContent(b,f,e,p,l),this._updatePosition(e,l,o,s,c,n,u))},this);this._ticket=i,v=h(n,i,_)}else v=h;c.setContent(v,f,e,p,l),c.show(e,p),this._updatePosition(e,l,o,s,c,n,u)}},t.prototype._getNearestPoint=function(e,a,n,i,o){if(n==="axis"||z(a))return{color:i||o};if(!z(a))return{color:i||a.color||a.borderColor}},t.prototype._updatePosition=function(e,a,n,i,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();a=a||e.get("position");var c=o.getSize(),h=e.get("align"),v=e.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),j(a)&&(a=a([n,i],s,o.el,d,{viewSize:[u,f],contentSize:c.slice()})),z(a))n=ne(a[0],u),i=ne(a[1],f);else if(K(a)){var p=a;p.width=c[0],p.height=c[1];var y=rt(p,{width:u,height:f});n=y.x,i=y.y,h=null,v=null}else if($(a)&&l){var g=NM(a,d,c,e.get("borderWidth"));n=g[0],i=g[1]}else{var g=OM(n,i,o,u,f,h?null:20,v?null:20);n=g[0],i=g[1]}if(h&&(n-=kv(h)?c[0]/2:h==="right"?c[0]:0),v&&(i-=kv(v)?c[1]/2:v==="bottom"?c[1]:0),qg(e)){var g=BM(n,i,o,u,f);n=g[0],i=g[1]}o.moveTo(n,i)},t.prototype._updateContentNotChangedOnAxis=function(e,a){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===e.length;return o&&w(n,function(s,l){var u=s.dataByAxis||[],f=e[l]||{},c=f.dataByAxis||[];o=o&&u.length===c.length,o&&w(u,function(h,v){var d=c[v]||{},p=h.seriesDataIndices||[],y=d.seriesDataIndices||[];o=o&&h.value===d.value&&h.axisType===d.axisType&&h.axisId===d.axisId&&p.length===y.length,o&&w(p,function(g,m){var _=y[m];o=o&&g.seriesIndex===_.seriesIndex&&g.dataIndex===_.dataIndex}),i&&w(h.seriesDataIndices,function(g){var m=g.seriesIndex,_=a[m],S=i[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=a,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,a){be.node||!a.getDom()||(Oi(this,"_updatePosition"),this._tooltipContent.dispose(),gl("itemTooltip",a))},t.type="tooltip",t})(He);function Na(r,t,e){var a=t.ecModel,n;e?(n=new ye(e,a,a),n=new ye(t.option,n,a)):n=t;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof ye&&(o=o.get("tooltip",!0)),$(o)&&(o={formatter:o}),o&&(n=new ye(o,n,a)))}return n}function Pv(r,t){return r.dispatchAction||Z(t.dispatchAction,t)}function OM(r,t,e,a,n,i,o){var s=e.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>a?r-=l+i:r+=i),o!=null&&(t+u+o>n?t-=u+o:t+=o),[r,t]}function BM(r,t,e,a,n){var i=e.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,a)-o,t=Math.min(t+s,n)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function NM(r,t,e,a){var n=e[0],i=e[1],o=Math.ceil(Math.SQRT2*a)+8,s=0,l=0,u=t.width,f=t.height;switch(r){case"inside":s=t.x+u/2-n/2,l=t.y+f/2-i/2;break;case"top":s=t.x+u/2-n/2,l=t.y-i-o;break;case"bottom":s=t.x+u/2-n/2,l=t.y+f+o;break;case"left":s=t.x-n-o,l=t.y+f/2-i/2;break;case"right":s=t.x+u+o,l=t.y+f/2-i/2}return[s,l]}function kv(r){return r==="center"||r==="middle"}function VM(r,t,e){var a=Tl(r).queryOptionMap,n=a.keys()[0];if(!(!n||n==="series")){var i=da(t,n,a.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=te(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}function aD(r){Xe(Zg),r.registerComponentModel(xM),r.registerComponentView(EM),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},xt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},xt)}var Rv=w;function Ev(r){if(r){for(var t in r)if(r.hasOwnProperty(t))return!0}}function Ov(r,t,e){var a={};return Rv(t,function(i){var o=a[i]=n();Rv(r[i],function(s,l){if(ze.isValidType(l)){var u={type:l,visual:s};e&&e(u,i),o[l]=new ze(u),l==="opacity"&&(u=ee(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new ze(u))}})}),a;function n(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function zM(r,t,e){var a;w(e,function(n){t.hasOwnProperty(n)&&Ev(t[n])&&(a=!0)}),a&&w(e,function(n){t.hasOwnProperty(n)&&Ev(t[n])?r[n]=ee(t[n]):delete r[n]})}function FM(r,t,e,a){var n={};return w(r,function(i){var o=ze.prepareVisualTypes(t[i]);n[i]=o}),{progress:function(o,s){var l;a!=null&&(l=s.getDimensionIndex(a));function u(b){return Yd(s,c,b)}function f(b,x){MS(s,c,b,x)}for(var c,h=s.getStore();(c=o.next())!=null;){var v=s.getRawDataItem(c);if(!(v&&v.visualMap===!1))for(var d=a!=null?h.get(l,c):c,p=e(d),y=t[p],g=n[p],m=0,_=g.length;m<_;m++){var S=g[m];y[S]&&y[S].applyVisual(d,u,f)}}}}}var GM=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:O.size.m,backgroundColor:O.color.transparent,borderColor:O.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:O.color.primary},subtextStyle:{fontSize:12,color:O.color.quaternary}},t})(re),HM=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){if(this.group.removeAll(),!!e.get("show")){var i=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=J(e.get("textBaseline"),e.get("textVerticalAlign")),f=new he({style:Te(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=f.getBoundingRect(),h=e.get("subtext"),v=new he({style:Te(s,{text:h,fill:s.getTextColor(),y:c.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),p=e.get("sublink"),y=e.get("triggerEvent",!0);f.silent=!d&&!y,v.silent=!p&&!y,d&&f.on("click",function(){uf(d,"_"+e.get("target"))}),p&&v.on("click",function(){uf(p,"_"+e.get("subtarget"))}),te(f).eventData=te(v).eventData=y?{componentType:"title",componentIndex:e.componentIndex}:null,i.add(f),h&&i.add(v);var g=i.getBoundingRect(),m=e.getBoxLayoutParams();m.width=g.width,m.height=g.height;var _=Rr(e,n),S=rt(m,_.refContainer,e.get("padding"));l||(l=e.get("left")||e.get("right"),l==="middle"&&(l="center"),l==="right"?S.x+=S.width:l==="center"&&(S.x+=S.width/2)),u||(u=e.get("top")||e.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?S.y+=S.height:u==="middle"&&(S.y+=S.height/2),u=u||"top"),i.x=S.x,i.y=S.y,i.markRedraw();var b={align:l,verticalAlign:u};f.setStyle(b),v.setStyle(b),g=i.getBoundingRect();var x=S.margin,C=e.getItemStyle(["color","opacity"]);C.fill=e.get("backgroundColor");var T=new se({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:e.get("borderRadius")},style:C,subPixelOptimize:!0,silent:!0});i.add(T)}},t.type="title",t})(He);function nD(r){r.registerComponentModel(GM),r.registerComponentView(HM)}var WM=function(r,t){if(t==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},yl=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.call(this,e,a),this._updateSelector(e)},t.prototype._updateSelector=function(e){var a=e.selector,n=this.ecModel;a===!0&&(a=e.selector=["all","inverse"]),z(a)&&w(a,function(i,o){$(i)&&(i={type:i}),a[o]=oe(i,WM(n,i.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var a=!1,n=0;n<e.length;n++){var i=e[n].get("name");if(this.isSelected(i)){this.select(i),a=!0;break}}!a&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var a=[],n=[];e.eachRawSeries(function(l){var u=l.name;n.push(u);var f;if(l.legendVisualProvider){var c=l.legendVisualProvider,h=c.getAllNames();e.isSeriesFiltered(l)||(n=n.concat(h)),h.length?a=a.concat(h):f=!0}else f=!0;f&&Ml(l)&&a.push(l.name)}),this._availableNames=n;var i=this.get("data")||a,o=q(),s=X(i,function(l){return($(l)||ve(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new ye(l,this,this.ecModel))},this);this._data=Me(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var a=this.option.selected,n=this.get("selectedMode");if(n==="single"){var i=this._data;w(i,function(o){a[o.get("name")]=!1})}a[e]=!0},t.prototype.unSelect=function(e){this.get("selectedMode")!=="single"&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var a=this.option.selected;a.hasOwnProperty(e)||(a[e]=!0),this[a[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,a=this.option.selected;w(e,function(n){a[n.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,a=this.option.selected;w(e,function(n){var i=n.get("name",!0);a.hasOwnProperty(i)||(a[i]=!0),a[i]=!a[i]})},t.prototype.isSelected=function(e){var a=this.option.selected;return!(a.hasOwnProperty(e)&&!a[e])&&ue(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:O.size.m,align:"auto",backgroundColor:O.color.transparent,borderColor:O.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:O.color.disabled,inactiveBorderColor:O.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:O.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:O.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:O.color.tertiary,borderWidth:1,borderColor:O.color.border},emphasis:{selectorLabel:{show:!0,color:O.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t})(re),qr=me,ml=w,si=pe,ey=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new si),this.group.add(this._selectorGroup=new si),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,a,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,a,n,l,s,u);var f=Rr(e,n).refContainer,c=e.getBoxLayoutParams(),h=e.get("padding"),v=rt(c,f,h),d=this.layoutInner(e,o,v,i,l,u),p=rt(ae({width:d.width,height:d.height},c),f,h);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=SM(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,a,n,i,o,s,l){var u=this.getContentGroup(),f=q(),c=a.get("selectedMode"),h=a.get("triggerEvent"),v=[];n.eachRawSeries(function(d){!d.get("legendHoverLink")&&v.push(d.id)}),ml(a.getData(),function(d,p){var y=this,g=d.get("name");if(!this.newlineDisabled&&(g===""||g===`
10
10
  `)){var m=new si;m.newline=!0,u.add(m);return}var _=n.getSeriesByName(g)[0];if(!f.get(g))if(_){var S=_.getData(),b=S.getVisual("legendLineStyle")||{},x=S.getVisual("legendIcon"),C=S.getVisual("style"),T=this._createItem(_,g,p,d,a,e,b,C,x,c,i);T.on("click",qr(Bv,g,null,i,v)).on("mouseover",qr(_l,_.name,null,i,v)).on("mouseout",qr(Sl,_.name,null,i,v)),n.ssr&&T.eachChild(function(D){var A=te(D);A.seriesIndex=_.seriesIndex,A.dataIndex=p,A.ssrType="legend"}),h&&T.eachChild(function(D){y.packEventData(D,a,_,p,g)}),f.set(g,!0)}else n.eachRawSeries(function(D){var A=this;if(!f.get(g)&&D.legendVisualProvider){var M=D.legendVisualProvider;if(!M.containName(g))return;var P=M.indexOfName(g),L=M.getItemVisual(P,"style"),E=M.getItemVisual(P,"legendIcon"),I=vh(L.fill);I&&I[3]===0&&(I[3]=.2,L=U(U({},L),{fill:li(I,"rgba")}));var k=this._createItem(D,g,p,d,a,e,{},L,E,c,i);k.on("click",qr(Bv,null,g,i,v)).on("mouseover",qr(_l,null,g,i,v)).on("mouseout",qr(Sl,null,g,i,v)),n.ssr&&k.eachChild(function(N){var R=te(N);R.seriesIndex=D.seriesIndex,R.dataIndex=p,R.ssrType="legend"}),h&&k.eachChild(function(N){A.packEventData(N,a,D,p,g)}),f.set(g,!0)}},this)},this),o&&this._createSelector(o,a,i,s,l)},t.prototype.packEventData=function(e,a,n,i,o){var s={componentType:"legend",componentIndex:a.componentIndex,dataIndex:i,value:o,seriesIndex:n.seriesIndex};te(e).eventData=s},t.prototype._createSelector=function(e,a,n,i,o){var s=this.getSelectorGroup();ml(e,function(u){var f=u.type,c=new he({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:a.id})}});s.add(c);var h=a.getModel("selectorLabel"),v=a.getModel(["emphasis","selectorLabel"]);kr(c,{normal:h,emphasis:v},{defaultText:u.title}),Ai(c)})},t.prototype._createItem=function(e,a,n,i,o,s,l,u,f,c,h){var v=e.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),y=o.isSelected(a),g=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),_=i.get("icon");f=_||f||"roundRect";var S=UM(f,i,l,u,v,y,h),b=new si,x=i.getModel("textStyle");if(j(e.getLegendIcon)&&(!_||_==="inherit"))b.add(e.getLegendIcon({itemWidth:d,itemHeight:p,icon:f,iconRotate:g,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var C=_==="inherit"&&e.getData().getVisual("symbol")?g==="inherit"?e.getData().getVisual("symbolRotate"):g:0;b.add(YM({itemWidth:d,itemHeight:p,icon:f,iconRotate:C,itemStyle:S.itemStyle,symbolKeepAspect:m}))}var T=s==="left"?d+5:-5,D=s,A=o.get("formatter"),M=a;$(A)&&A?M=A.replace("{name}",a??""):j(A)&&(M=A(a));var P=y?x.getTextColor():i.get("inactiveColor");b.add(new he({style:Te(x,{text:M,x:T,y:p/2,fill:P,align:D,verticalAlign:"middle"},{inheritColor:P})}));var L=new se({shape:b.getBoundingRect(),style:{fill:"transparent"}}),E=i.getModel("tooltip");return E.get("show")&&lo({el:L,componentModel:o,itemName:a,itemTooltipOption:E.option}),b.add(L),b.eachChild(function(I){I.silent=!0}),L.silent=!c,this.getContentGroup().add(b),Ai(b),b.__legendDataIndex=n,b},t.prototype.layoutInner=function(e,a,n,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();na(e.get("orient"),l,e.get("itemGap"),n.width,n.height);var f=l.getBoundingRect(),c=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){na("horizontal",u,e.get("selectorItemGap",!0));var h=u.getBoundingRect(),v=[-h.x,-h.y],d=e.get("selectorButtonGap",!0),p=e.getOrient().index,y=p===0?"width":"height",g=p===0?"height":"width",m=p===0?"y":"x";s==="end"?v[p]+=f[y]+d:c[p]+=h[y]+d,v[1-p]+=f[g]/2-h[g]/2,u.x=v[0],u.y=v[1],l.x=c[0],l.y=c[1];var _={x:0,y:0};return _[y]=f[y]+d+h[y],_[g]=Math.max(f[g],h[g]),_[m]=Math.min(0,h[m]+v[1-p]),_}else return l.x=c[0],l.y=c[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t})(He);function UM(r,t,e,a,n,i,o){function s(y,g){y.lineWidth==="auto"&&(y.lineWidth=g.lineWidth>0?2:0),ml(y,function(m,_){y[_]==="inherit"&&(y[_]=g[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",c=l.getShallow("decal");u.decal=!c||c==="inherit"?a.decal:Vi(c,o),u.fill==="inherit"&&(u.fill=a[n]),u.stroke==="inherit"&&(u.stroke=a[f]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?a:e).opacity),s(u,a);var h=t.getModel("lineStyle"),v=h.getLineStyle();if(s(v,e),u.fill==="auto"&&(u.fill=a.fill),u.stroke==="auto"&&(u.stroke=a.fill),v.stroke==="auto"&&(v.stroke=a.fill),!i){var d=t.get("inactiveBorderWidth"),p=u[f];u.lineWidth=d==="auto"?a.lineWidth>0&&p?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),v.stroke=h.get("inactiveColor"),v.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function YM(r){var t=r.icon||"roundRect",e=at(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill=O.color.neutral00,e.style.lineWidth=2),e}function Bv(r,t,e,a){Sl(r,t,e,a),e.dispatchAction({type:"legendToggleSelect",name:r??t}),_l(r,t,e,a)}function ty(r){for(var t=r.getZr().storage.getDisplayList(),e,a=0,n=t.length;a<n&&!(e=t[a].states.emphasis);)a++;return e&&e.hoverLayer}function _l(r,t,e,a){ty(e)||e.dispatchAction({type:"highlight",seriesName:r,name:t,excludeSeriesId:a})}function Sl(r,t,e,a){ty(e)||e.dispatchAction({type:"downplay",seriesName:r,name:t,excludeSeriesId:a})}function ZM(r){var t=r.findComponents({mainType:"legend"});t&&t.length&&r.filterSeries(function(e){for(var a=0;a<t.length;a++)if(!t[a].isSelected(e.name))return!1;return!0})}function Va(r,t,e){var a=r==="allSelect"||r==="inverseSelect",n={},i=[];e.eachComponent({mainType:"legend",query:t},function(s){a?s[r]():s[r](t.name),Nv(s,n),i.push(s.componentIndex)});var o={};return e.eachComponent("legend",function(s){w(n,function(l,u){s[l?"select":"unSelect"](u)}),Nv(s,o)}),a?{selected:o,legendIndex:i}:{name:t.name,selected:o}}function Nv(r,t){var e=t||{};return w(r.getData(),function(a){var n=a.get("name");if(!(n===`
11
- `||n==="")){var i=r.isSelected(n);F(e,n)?e[n]=e[n]&&i:e[n]=i}}),e}function XM(r){r.registerAction("legendToggleSelect","legendselectchanged",me(Va,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",me(Va,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",me(Va,"inverseSelect")),r.registerAction("legendSelect","legendselected",me(Va,"select")),r.registerAction("legendUnSelect","legendunselected",me(Va,"unSelect"))}function ry(r){r.registerComponentModel(yl),r.registerComponentView(ey),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,ZM),r.registerSubTypeDefaulter("legend",function(){return"plain"}),XM(r)}var $M=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(e,a,n){var i=Er(e);r.prototype.init.call(this,e,a,n),Vv(this,e,i)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.call(this,e,a),Vv(this,this.option,e)},t.type="legend.scroll",t.defaultOption=ya(yl.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:O.color.accent50,pageIconInactiveColor:O.color.accent10,pageIconSize:15,pageTextStyle:{color:O.color.tertiary},animationDurationUpdate:800}),t})(yl);function Vv(r,t,e){var a=r.getOrient(),n=[1,1];n[a.index]=0,Rt(t,e,{type:"box",ignoreSize:!!n})}var zv=pe,gs=["width","height"],ys=["x","y"],KM=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!0,e._currentIndex=0,e}return t.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new zv),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new zv)},t.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(e,a,n,i,o,s,l){var u=this;r.prototype.renderInner.call(this,e,a,n,i,o,s,l);var f=this._controllerGroup,c=a.get("pageIconSize",!0),h=z(c)?c:[c,c];d("pagePrev",0);var v=a.getModel("pageTextStyle");f.add(new he({name:"pageText",style:{text:"xx/xx",fill:v.getTextColor(),font:v.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),d("pageNext",1);function d(p,y){var g=p+"DataIndex",m=Nl(a.get("pageIcons",!0)[a.getOrient().name][y],{onclick:Z(u._pageGo,u,g,a,i)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});m.name=p,f.add(m)}},t.prototype.layoutInner=function(e,a,n,i,o,s){var l=this.getSelectorGroup(),u=e.getOrient().index,f=gs[u],c=ys[u],h=gs[1-u],v=ys[1-u];o&&na("horizontal",l,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),p=l.getBoundingRect(),y=[-p.x,-p.y],g=ee(n);o&&(g[f]=n[f]-p[f]-d);var m=this._layoutContentAndController(e,i,g,u,f,h,v,c);if(o){if(s==="end")y[u]+=m[f]+d;else{var _=p[f]+d;y[u]-=_,m[c]-=_}m[f]+=p[f]+d,y[1-u]+=m[v]+m[h]/2-p[h]/2,m[h]=Math.max(m[h],p[h]),m[v]=Math.min(m[v],p[v]+y[1-u]),l.x=y[0],l.y=y[1],l.markRedraw()}return m},t.prototype._layoutContentAndController=function(e,a,n,i,o,s,l,u){var f=this.getContentGroup(),c=this._containerGroup,h=this._controllerGroup;na(e.get("orient"),f,e.get("itemGap"),i?n.width:null,i?null:n.height),na("horizontal",h,e.get("pageButtonItemGap",!0));var v=f.getBoundingRect(),d=h.getBoundingRect(),p=this._showController=v[o]>n[o],y=[-v.x,-v.y];a||(y[i]=f[u]);var g=[0,0],m=[-d.x,-d.y],_=J(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(p){var S=e.get("pageButtonPosition",!0);S==="end"?m[i]+=n[o]-d[o]:g[i]+=d[o]+_}m[1-i]+=v[s]/2-d[s]/2,f.setPosition(y),c.setPosition(g),h.setPosition(m);var b={x:0,y:0};if(b[o]=p?n[o]:v[o],b[s]=Math.max(v[s],d[s]),b[l]=Math.min(0,d[l]+m[1-i]),c.__rectSize=n[o],p){var x={x:0,y:0};x[o]=Math.max(n[o]-d[o]-_,0),x[s]=b[s],c.setClipPath(new se({shape:x})),c.__rectSize=x[o]}else h.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var C=this._getPageInfo(e);return C.pageIndex!=null&&De(f,{x:C.contentPosition[0],y:C.contentPosition[1]},p?e:null),this._updatePageInfoView(e,C),b},t.prototype._pageGo=function(e,a,n){var i=this._getPageInfo(a)[e];i!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:a.id})},t.prototype._updatePageInfoView=function(e,a){var n=this._controllerGroup;w(["pagePrev","pageNext"],function(f){var c=f+"DataIndex",h=a[c]!=null,v=n.childOfName(f);v&&(v.setStyle("fill",h?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),v.cursor=h?"pointer":"default")});var i=n.childOfName("pageText"),o=e.get("pageFormatter"),s=a.pageIndex,l=s!=null?s+1:0,u=a.pageCount;i&&o&&i.setStyle("text",$(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var a=e.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=e.getOrient().index,s=gs[o],l=ys[o],u=this._findTargetItemIndex(a),f=n.children(),c=f[u],h=f.length,v=h?1:0,d={contentPosition:[n.x,n.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return d;var p=S(c);d.contentPosition[o]=-p.s;for(var y=u+1,g=p,m=p,_=null;y<=h;++y)_=S(f[y]),(!_&&m.e>g.s+i||_&&!b(_,g.s))&&(m.i>g.i?g=m:g=_,g&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=g.i),++d.pageCount)),m=_;for(var y=u-1,g=p,m=p,_=null;y>=-1;--y)_=S(f[y]),(!_||!b(m,_.s))&&g.i<m.i&&(m=g,d.pagePrevDataIndex==null&&(d.pagePrevDataIndex=g.i),++d.pageCount,++d.pageIndex),g=_;return d;function S(x){if(x){var C=x.getBoundingRect(),T=C[l]+x[l];return{s:T,e:T+C[s],i:x.__legendDataIndex}}}function b(x,C){return x.e>=C&&x.s<=C+i}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var a,n=this.getContentGroup(),i;return n.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===e&&(a=s)}),a??i},t.type="legend.scroll",t})(ey);function qM(r){r.registerAction("legendScroll","legendscroll",function(t,e){var a=t.scrollDataIndex;a!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(n){n.setScrollDataIndex(a)})})}function jM(r){Xe(ry),r.registerComponentModel($M),r.registerComponentView(KM),qM(r)}function iD(r){Xe(ry),Xe(jM)}var QM=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.inside",t.defaultOption=ya(Qi.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t})(Qi),Lu=ie();function JM(r,t,e){Lu(r).coordSysRecordMap.each(function(a){var n=a.dataZoomInfoMap.get(t.uid);n&&(n.getRange=e)})}function eT(r,t){for(var e=Lu(r).coordSysRecordMap,a=e.keys(),n=0;n<a.length;n++){var i=a[n],o=e.get(i),s=o.dataZoomInfoMap;if(s){var l=t.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||ay(e,o))}}}function ay(r,t){if(t){r.removeKey(t.model.uid);var e=t.controller;e&&e.dispose()}}function tT(r,t){var e={model:t,containsPoint:me(aT,t),dispatchAction:me(rT,r),dataZoomInfoMap:null,controller:null},a=e.controller=new V1(r.getZr());return w(["pan","zoom","scrollMove"],function(n){a.on(n,function(i){var o=[];e.dataZoomInfoMap.each(function(s){if(i.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[n],u=l&&l(s.dzReferCoordSysInfo,e.model.mainType,e.controller,i);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&e.dispatchAction(o)})}),e}function rT(r,t){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function aT(r,t,e,a){return r.coordinateSystem.containPoint([e,a])}function nT(r,t,e){var a,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return r.each(function(s){var l=s.model,u=l.get("disabled",!0)?!1:l.get("zoomLock",!0)?"move":!0;i[n+u]>i[n+a]&&(a=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:a,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:e,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint}}}}function iT(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(t,e){var a=Lu(e),n=a.coordSysRecordMap||(a.coordSysRecordMap=q());n.each(function(i){i.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=Xg(i);w(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,tT(e,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=q());f.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),n.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){ay(n,i);return}var f=nT(l,i,e);o.enable(f.controlType,f.opt),go(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var oT=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,a,n){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),JM(n,e,{pan:Z(ms.pan,this),zoom:Z(ms.zoom,this),scrollMove:Z(ms.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){eT(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t})($g),ms={zoom:function(r,t,e,a){var n=this.range,i=n.slice(),o=r.axisModels[0];if(o){var s=_s[t](null,[a.originX,a.originY],o,e,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/a.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(ca(0,i,[0,100],0,f.minSpan,f.maxSpan),this.range=i,n[0]!==i[0]||n[1]!==i[1])return i}},pan:Fv(function(r,t,e,a,n,i){var o=_s[a]([i.oldX,i.oldY],[i.newX,i.newY],t,n,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:Fv(function(r,t,e,a,n,i){var o=_s[a]([0,0],[i.scrollDelta,i.scrollDelta],t,n,e);return o.signal*(r[1]-r[0])*i.scrollDelta})};function Fv(r){return function(t,e,a,n){var i=this.range,o=i.slice(),s=t.axisModels[0];if(s){var l=r(o,s,t,e,a,n);if(ca(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var _s={grid:function(r,t,e,a,n){var i=e.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,t,e,a,n){var i=e.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],t=s.pointToCoord(t),e.mainType==="radiusAxis"?(o.pixel=t[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,t,e,a,n){var i=e.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};function sT(r){Kg(r),r.registerComponentModel(QM),r.registerComponentView(oT),iT(r)}var lT=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=ya(Qi.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:O.color.accent10,borderRadius:0,backgroundColor:O.color.transparent,dataBackground:{lineStyle:{color:O.color.accent30,width:.5},areaStyle:{color:O.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:O.color.accent40,width:.5},areaStyle:{color:O.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:O.color.neutral00,borderColor:O.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:O.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:O.color.tertiary},brushSelect:!0,brushStyle:{color:O.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:O.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t})(Qi),za=se,uT=1,Ss=30,fT=7,Fa="horizontal",Gv="vertical",cT=5,vT=["line","bar","candlestick","scatter"],hT={easing:"cubicOut",duration:100,delay:0},dT=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,a){this.api=a,this._onBrush=Z(this._onBrush,this),this._onBrushEnd=Z(this._onBrushEnd,this)},t.prototype.render=function(e,a,n,i){if(r.prototype.render.apply(this,arguments),go(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Oi(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var a=this._displayables.sliderGroup=new pe;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(a),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,a=this.api,n=e.get("brushSelect"),i=n?fT:0,o=Rr(e,a).refContainer,s=this._findCoordRect(),l=e.get("defaultLocationEdgeGap",!0)||0,u=this._orient===Fa?{right:o.width-s.x-s.width,top:o.height-Ss-l-i,width:s.width,height:Ss}:{right:l,top:s.y,width:Ss,height:s.height},f=Er(e.option);w(["right","top","width","height"],function(h){f[h]==="ph"&&(f[h]=u[h])});var c=rt(f,o);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===Gv&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,a=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===Fa&&!o?{scaleY:l?1:-1,scaleX:1}:n===Fa&&o?{scaleY:l?1:-1,scaleX:-1}:n===Gv&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]);e.x=a.x-u.x,e.y=a.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,a=this._size,n=this._displayables.sliderGroup,i=e.get("brushSelect");n.add(new za({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new za({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:Z(this._onClickPanel,this)}),s=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),n.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var a=this._size,n=this._shadowSize||[],i=e.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||a[0]!==n[0]||a[1]!==n[1]){var c=o.getDataExtent(e.thisDim),h=o.getDataExtent(l),v=(h[1]-h[0])*.3;h=[h[0]-v,h[1]+v];var d=[0,a[1]],p=[0,a[0]],y=[[a[0],0],[0,0]],g=[],m=p[1]/Math.max(1,o.count()-1),_=a[0]/(c[1]-c[0]),S=e.thisAxis.type==="time",b=-m,x=Math.round(o.count()/a[0]),C;o.each([e.thisDim,l],function(P,L,E){if(x>0&&E%x){S||(b+=m);return}b=S?(+P-c[0])*_:b+m;var I=L==null||isNaN(L)||L==="",k=I?0:ce(L,h,d,!0);I&&!C&&E?(y.push([y[y.length-1][0],0]),g.push([g[g.length-1][0],0])):!I&&C&&(y.push([b,0]),g.push([b,0])),I||(y.push([b,k]),g.push([b,k])),C=I}),u=this._shadowPolygonPts=y,f=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var T=this.dataZoomModel;function D(P){var L=T.getModel(P?"selectedDataBackground":"dataBackground"),E=new pe,I=new ha({shape:{points:u},segmentIgnoreThreshold:1,style:L.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),k=new or({shape:{points:f},segmentIgnoreThreshold:1,style:L.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return E.add(I),E.add(k),E}for(var A=0;A<3;A++){var M=D(A===1);this._displayables.sliderGroup.add(M),this._displayables.dataShadowSegs.push(M)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,a=e.get("showDataShadow");if(a!==!1){var n,i=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();w(l,function(u){if(!n&&!(a!==!0&&ue(vT,u.get("type"))<0)){var f=i.getComponent(jt(o),s).axis,c=pT(o),h,v=u.coordinateSystem;c!=null&&v.getOtherAxis&&(h=v.getOtherAxis(f).inverse),c=u.getData().mapDimension(c);var d=u.getData().mapDimension(o);n={thisAxis:f,series:u,thisDim:d,otherDim:c,otherAxisInverse:h}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,a=this._displayables,n=a.handles=[null,null],i=a.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,c=l.get("brushSelect"),h=a.filler=new za({silent:c,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new za({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:uT,fill:O.color.transparent}})),w([0,1],function(_){var S=l.get("handleIcon");!Ni[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var b=at(S,-1,0,2,2,null,!0);b.attr({cursor:gT(this._orient),draggable:!0,drift:Z(this._onDragMove,this,_),ondragend:Z(this._onDragEnd,this),onmouseover:Z(this._showDataInfo,this,!0),onmouseout:Z(this._showDataInfo,this,!1),z2:5});var x=b.getBoundingRect(),C=l.get("handleSize");this._handleHeight=ne(C,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Ai(b);var T=l.get("handleColor");T!=null&&(b.style.fill=T),o.add(n[_]=b);var D=l.getModel("textStyle"),A=l.get("handleLabel")||{},M=A.show||!1;e.add(i[_]=new he({silent:!0,invisible:!M,style:Te(D,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:D.getTextColor(),font:D.getFont()}),z2:10}))},this);var v=h;if(c){var d=ne(l.get("moveHandleSize"),s[1]),p=a.moveHandle=new se({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),y=d*.8,g=a.moveHandleIcon=at(l.get("moveHandleIcon"),-y/2,-y/2,y,y,O.color.neutral00,!0);g.silent=!0,g.y=s[1]+d/2-.5,p.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(d,10));v=a.moveZone=new se({invisible:!0,shape:{y:s[1]-m,height:d+m}}),v.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(g),o.add(v)}v.attr({draggable:!0,cursor:"default",drift:Z(this._onDragMove,this,"all"),ondragstart:Z(this._showDataInfo,this,!0),ondragend:Z(this._onDragEnd,this),onmouseover:Z(this._showDataInfo,this,!0),onmouseout:Z(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[ce(e[0],[0,100],a,!0),ce(e[1],[0,100],a,!0)]},t.prototype._updateInterval=function(e,a){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];ca(a,i,o,n.get("zoomLock")?"all":e,s.minSpan!=null?ce(s.minSpan,l,o,!0):null,s.maxSpan!=null?ce(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=_r([ce(i[0],o,l,!0),ce(i[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},t.prototype._updateView=function(e){var a=this._displayables,n=this._handleEnds,i=_r(n.slice()),o=this._size;w([0,1],function(v){var d=a.handles[v],p=this._handleHeight;d.attr({scaleX:p/2,scaleY:p/2,x:n[v]+(v?-1:1),y:o[1]/2-p/2})},this),a.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};a.moveHandle&&(a.moveHandle.setShape(s),a.moveZone.setShape(s),a.moveZone.getBoundingRect(),a.moveHandleIcon&&a.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=a.dataShadowSegs,u=[0,i[0],i[1],o[0]],f=0;f<l.length;f++){var c=l[f],h=c.getClipPath();h||(h=new se,c.setClipPath(h)),h.setShape({x:u[f],y:0,width:u[f+1]-u[f],height:o[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var a=this.dataZoomModel,n=this._displayables,i=n.handleLabels,o=this._orient,s=["",""];if(a.get("showDetail")){var l=a.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,f=this._range,c=e?l.calculateDataWindow({start:f[0],end:f[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(c[0],u),this._formatLabel(c[1],u)]}}var h=_r(this._handleEnds.slice());v.call(this,0),v.call(this,1);function v(d){var p=Ka(n.handles[d].parent,this.group),y=Bl(d===0?"right":"left",p),g=this._handleWidth/2+cT,m=Qt([h[d]+(d===0?-g:g),this._size[1]/2],p);i[d].setStyle({x:m[0],y:m[1],verticalAlign:o===Fa?"middle":y,align:o===Fa?y:"center",text:s[d]})}},t.prototype._formatLabel=function(e,a){var n=this.dataZoomModel,i=n.get("labelFormatter"),o=n.get("labelPrecision");(o==null||o==="auto")&&(o=a.getPixelPrecision());var s=e==null||isNaN(e)?"":a.type==="category"||a.type==="time"?a.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(o,20));return j(i)?i(e,s):$(i)?i.replace("{value}",s):s},t.prototype._showDataInfo=function(e){var a=this.dataZoomModel.get("handleLabel")||{},n=a.show||!1,i=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=i.get("show")||!1,s=e||this._dragging?o:n,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},t.prototype._onDragMove=function(e,a,n,i){this._dragging=!0,er(i.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=Qt([a,n],o,!0),l=this._updateInterval(e,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var e=this.dataZoomModel.get("realtime");!e&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var a=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>a[0]||n[1]<0||n[1]>a[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var a=e.offsetX,n=e.offsetY;this._brushStart=new de(a,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var n=a.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[n.x,n.x+n.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();ca(0,l,o,0,u.minSpan!=null?ce(u.minSpan,s,o,!0):null,u.maxSpan!=null?ce(u.maxSpan,s,o,!0):null),this._range=_r([ce(l[0],o,s,!0),ce(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(er(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,a){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new za({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,a),f=l.transformCoordToLocal(s.x,s.y),c=this._size;u[0]=Math.max(Math.min(c[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:c[1]})},t.prototype._dispatchZoomAction=function(e){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?hT:null,start:a[0],end:a[1]})},t.prototype._findCoordRect=function(){var e,a=Xg(this.dataZoomModel).infoList;if(!e&&a.length){var n=a[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var i=this.api.getWidth(),o=this.api.getHeight();e={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return e},t.type="dataZoom.slider",t})($g);function pT(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function gT(r){return r==="vertical"?"ns-resize":"ew-resize"}function yT(r){r.registerComponentModel(lT),r.registerComponentView(dT),Kg(r)}function oD(r){Xe(sT),Xe(yT)}var ny={get:function(r,t,e){var a=ee((mT[r]||{})[t]);return e&&z(a)?a[a.length-1]:a}},mT={color:{active:["#006edd","#e0ffff"],inactive:[O.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},Hv=ze.mapVisual,_T=ze.eachVisual,ST=z,Wv=w,xT=_r,bT=ce,Ji=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,a){var n=this.option;!a&&zM(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var a=this.stateList;e=Z(e,this),this.controllerVisuals=Ov(this.option.controller,a,e),this.targetVisuals=Ov(this.option.target,a,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesId,a=this.option.seriesIndex;a==null&&e==null&&(a="all");var n=da(this.ecModel,"series",{index:a,id:e},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return X(n,function(i){return i.componentIndex})},t.prototype.eachTargetSeries=function(e,a){w(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&e.call(a,i)},this)},t.prototype.isTargetSeries=function(e){var a=!1;return this.eachTargetSeries(function(n){n===e&&(a=!0)}),a},t.prototype.formatValueText=function(e,a,n){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;n=n||["<",">"],z(e)&&(e=e.slice(),u=!0);var f=a?e:u?[c(e[0]),c(e[1])]:c(e);if($(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(j(l))return u?l(e[0],e[1]):l(e);if(u)return e[0]===s[0]?n[0]+" "+f[1]:e[1]===s[1]?n[1]+" "+f[0]:f[0]+" - "+f[1];return f;function c(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,a=xT([e.min,e.max]);this._dataExtent=a},t.prototype.getDataDimensionIndex=function(e){var a=this.option.dimension;if(a!=null)return e.getDimensionIndex(a);for(var n=e.dimensions,i=n.length-1;i>=0;i--){var o=n[i],s=e.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,a=this.option,n={inRange:a.inRange,outOfRange:a.outOfRange},i=a.target||(a.target={}),o=a.controller||(a.controller={});oe(i,n),oe(o,n);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),f.call(this,o);function l(c){ST(a.color)&&!c.inRange&&(c.inRange={color:a.color.slice().reverse()}),c.inRange=c.inRange||{color:e.get("gradientColor")}}function u(c,h,v){var d=c[h],p=c[v];d&&!p&&(p=c[v]={},Wv(d,function(y,g){if(ze.isValidType(g)){var m=ny.get(g,"inactive",s);m!=null&&(p[g]=m,g==="color"&&!p.hasOwnProperty("opacity")&&!p.hasOwnProperty("colorAlpha")&&(p.opacity=[0,0]))}}))}function f(c){var h=(c.inRange||{}).symbol||(c.outOfRange||{}).symbol,v=(c.inRange||{}).symbolSize||(c.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),p=this.getItemSymbol(),y=p||"roundRect";Wv(this.stateList,function(g){var m=this.itemSize,_=c[g];_||(_=c[g]={color:s?d:[d]}),_.symbol==null&&(_.symbol=h&&ee(h)||(s?y:[y])),_.symbolSize==null&&(_.symbolSize=v&&ee(v)||(s?m[0]:[m[0],m[0]])),_.symbol=Hv(_.symbol,function(x){return x==="none"?y:x});var S=_.symbolSize;if(S!=null){var b=-1/0;_T(S,function(x){x>b&&(b=x)}),_.symbolSize=Hv(S,function(x){return bT(x,[0,b],[0,m[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:O.color.transparent,borderColor:O.color.borderTint,contentColor:O.color.theme[0],inactiveColor:O.color.disabled,borderWidth:0,padding:O.size.m,textGap:10,precision:0,textStyle:{color:O.color.secondary}},t})(re),Uv=[20,140],wT=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=Uv[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=Uv[1])},t.prototype._resetRange=function(){var e=this.getExtent(),a=this.option.range;!a||a.auto?(e.auto=1,this.option.range=e):z(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],e[0]),a[1]=Math.min(a[1],e[1]))},t.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),w(this.stateList,function(e){var a=this.option.controller[e].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),a=_r((this.get("range")||[]).slice());return a[0]>e[1]&&(a[0]=e[1]),a[1]>e[1]&&(a[1]=e[1]),a[0]<e[0]&&(a[0]=e[0]),a[1]<e[0]&&(a[1]=e[0]),a},t.prototype.getValueState=function(e){var a=this.option.range,n=this.getExtent(),i=J(this.option.unboundedRange,!0);return(i&&a[0]<=n[0]||a[0]<=e)&&(i&&a[1]>=n[1]||e<=a[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){e[0]<=s&&s<=e[1]&&i.push(l)},this),a.push({seriesId:n.id,dataIndex:i})},this),a},t.prototype.getVisualMeta=function(e){var a=Yv(this,"outOfRange",this.getExtent()),n=Yv(this,"inRange",this.option.range.slice()),i=[];function o(v,d){i.push({value:v,color:e(v,d)})}for(var s=0,l=0,u=n.length,f=a.length;l<f&&(!n.length||a[l]<=n[0]);l++)a[l]<n[s]&&o(a[l],"outOfRange");for(var c=1;s<u;s++,c=0)c&&i.length&&o(n[s],"outOfRange"),o(n[s],"inRange");for(var c=1;l<f;l++)(!n.length||n[n.length-1]<a[l])&&(c&&(i.length&&o(i[i.length-1].value,"outOfRange"),c=0),o(a[l],"outOfRange"));var h=i.length;return{stops:i,outerColors:[h?i[0].color:"transparent",h?i[h-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=ya(Ji.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:O.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:O.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:O.color.shadow}}),t})(Ji);function Yv(r,t,e){if(e[0]===e[1])return e.slice();for(var a=200,n=(e[1]-e[0])/a,i=e[0],o=[],s=0;s<=a&&i<e[1];s++)o.push(i),i+=n;return o.push(e[1]),o}var iy=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.autoPositionValues={left:1,right:1,top:1,bottom:1},e}return t.prototype.init=function(e,a){this.ecModel=e,this.api=a},t.prototype.render=function(e,a,n,i){if(this.visualMapModel=e,e.get("show")===!1){this.group.removeAll();return}this.doRender(e,a,n,i)},t.prototype.renderBackground=function(e){var a=this.visualMapModel,n=Ln(a.get("padding")||0),i=e.getBoundingRect();e.add(new se({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:a.get("backgroundColor"),stroke:a.get("borderColor"),lineWidth:a.get("borderWidth")}}))},t.prototype.getControllerVisual=function(e,a,n){n=n||{};var i=n.forceState,o=this.visualMapModel,s={};if(a==="color"){var l=o.get("contentColor");s.color=l}function u(v){return s[v]}function f(v,d){s[v]=d}var c=o.controllerVisuals[i||o.getValueState(e)],h=ze.prepareVisualTypes(c);return w(h,function(v){var d=c[v];n.convertOpacityToAlpha&&v==="opacity"&&(v="colorAlpha",d=c.__alphaForOpacity),ze.dependsOn(v,a)&&d&&d.applyVisual(e,u,f)}),s[a]},t.prototype.positionGroup=function(e){var a=this.visualMapModel,n=this.api,i=Rr(a,n).refContainer;N0(e,a.getBoxLayoutParams(),i)},t.prototype.doRender=function(e,a,n,i){},t.type="visualMap",t})(He),Zv=[["left","right","width"],["top","bottom","height"]];function oy(r,t,e){var a=r.option,n=a.align;if(n!=null&&n!=="auto")return n;for(var i={width:t.getWidth(),height:t.getHeight()},o=a.orient==="horizontal"?1:0,s=Zv[o],l=[0,null,10],u={},f=0;f<3;f++)u[Zv[1-o][f]]=l[f],u[s[f]]=f===2?e[0]:a[s[f]];var c=[["x","width",3],["y","height",0]][o],h=rt(u,i,a.padding);return s[(h.margin[c[2]]||0)+h[c[0]]+h[c[1]]*.5<i[c[1]]*.5?0:1]}function mi(r,t){return w(r||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")}),r}var pt=ce,CT=w,Xv=Math.min,xs=Math.max,MT=12,TT=6,DT=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._shapes={},e._dataInterval=[],e._handleEnds=[],e._hoverLinkDataIndices=[],e}return t.prototype.init=function(e,a){r.prototype.init.call(this,e,a),this._hoverLinkFromSeriesMouseOver=Z(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=Z(this._hideIndicator,this)},t.prototype.doRender=function(e,a,n,i){(!i||i.type!=="selectDataRange"||i.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,a=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(a);var n=e.get("text");this._renderEndsText(a,n,0),this._renderEndsText(a,n,1),this._updateView(!0),this.renderBackground(a),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(a)},t.prototype._renderEndsText=function(e,a,n){if(a){var i=a[1-n];i=i!=null?i+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,f=this._applyTransform([l[0]/2,n===0?-s:l[1]+s],u),c=this._applyTransform(n===0?"bottom":"top",u),h=this._orient,v=this.visualMapModel.textStyleModel;this.group.add(new he({style:Te(v,{x:f[0],y:f[1],verticalAlign:v.get("verticalAlign")||(h==="horizontal"?"middle":c),align:v.get("align")||(h==="horizontal"?c:"center"),text:i})}))}},t.prototype._renderBar=function(e){var a=this.visualMapModel,n=this._shapes,i=a.itemSize,o=this._orient,s=this._useHandle,l=oy(a,this.api,i),u=n.mainGroup=this._createBarGroup(l),f=new pe;u.add(f),f.add(n.outOfRange=$v()),f.add(n.inRange=$v(null,s?qv(this._orient):null,Z(this._dragHandle,this,"all",!1),Z(this._dragHandle,this,"all",!0))),f.setClipPath(new se({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var c=a.textStyleModel.getTextRect("国"),h=xs(c.width,c.height);s&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(a,u,0,i,h,o),this._createHandle(a,u,1,i,h,o)),this._createIndicator(a,u,i,h,o),e.add(u)},t.prototype._createHandle=function(e,a,n,i,o,s){var l=Z(this._dragHandle,this,n,!1),u=Z(this._dragHandle,this,n,!0),f=rn(e.get("handleSize"),i[0]),c=at(e.get("handleIcon"),-f/2,-f/2,f,f,null,!0),h=qv(this._orient);c.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(g){er(g.event)}}),c.x=i[0]/2,c.useStyle(e.getModel("handleStyle").getItemStyle()),c.setStyle({strokeNoScale:!0,strokeFirst:!0}),c.style.lineWidth*=2,c.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),Rl(c,!0),a.add(c);var v=this.visualMapModel.textStyleModel,d=new he({cursor:h,draggable:!0,drift:l,onmousemove:function(g){er(g.event)},ondragend:u,style:Te(v,{x:0,y:0,text:""})});d.ensureState("blur").style={opacity:.1},d.stateTransition={duration:200},this.group.add(d);var p=[f,0],y=this._shapes;y.handleThumbs[n]=c,y.handleLabelPoints[n]=p,y.handleLabels[n]=d},t.prototype._createIndicator=function(e,a,n,i,o){var s=rn(e.get("indicatorSize"),n[0]),l=at(e.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var u=e.getModel("indicatorStyle").getItemStyle();if(l instanceof Et){var f=l.style;l.useStyle(U({image:f.image,x:f.x,y:f.y,width:f.width,height:f.height},u))}else l.useStyle(u);a.add(l);var c=this.visualMapModel.textStyleModel,h=new he({silent:!0,invisible:!0,style:Te(c,{x:0,y:0,text:""})});this.group.add(h);var v=[(o==="horizontal"?i/2:TT)+n[0]/2,0],d=this._shapes;d.indicator=l,d.indicatorLabel=h,d.indicatorLabelPoint=v,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,a,n,i){if(this._useHandle){if(this._dragging=!a,!a){var o=this._applyTransform([n,i],this._shapes.mainGroup,!0);this._updateInterval(e,o[1]),this._hideIndicator(),this._updateView()}a===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),a?!this._hovering&&this._clearHoverLinkToSeries():Kv(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,a=this._dataInterval=e.getSelected(),n=e.getExtent(),i=[0,e.itemSize[1]];this._handleEnds=[pt(a[0],n,i,!0),pt(a[1],n,i,!0)]},t.prototype._updateInterval=function(e,a){a=a||0;var n=this.visualMapModel,i=this._handleEnds,o=[0,n.itemSize[1]];ca(a,i,o,e,0);var s=n.getExtent();this._dataInterval=[pt(i[0],o,s,!0),pt(i[1],o,s,!0)]},t.prototype._updateView=function(e){var a=this.visualMapModel,n=a.getExtent(),i=this._shapes,o=[0,a.itemSize[1]],s=e?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,n,s,"inRange"),u=this._createBarVisual(n,n,o,"outOfRange");i.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),i.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},t.prototype._createBarVisual=function(e,a,n,i){var o={forceState:i,convertOpacityToAlpha:!0},s=this._makeColorGradient(e,o),l=[this.getControllerVisual(e[0],"symbolSize",o),this.getControllerVisual(e[1],"symbolSize",o)],u=this._createBarPoints(n,l);return{barColor:new wl(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},t.prototype._makeColorGradient=function(e,a){var n=100,i=[],o=(e[1]-e[0])/n;i.push({color:this.getControllerVisual(e[0],"color",a),offset:0});for(var s=1;s<n;s++){var l=e[0]+o*s;if(l>e[1])break;i.push({color:this.getControllerVisual(l,"color",a),offset:s/n})}return i.push({color:this.getControllerVisual(e[1],"color",a),offset:1}),i},t.prototype._createBarPoints=function(e,a){var n=this.visualMapModel.itemSize;return[[n[0]-a[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-a[1],e[1]]]},t.prototype._createBarGroup=function(e){var a=this._orient,n=this.visualMapModel.get("inverse");return new pe(a==="horizontal"&&!n?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&n?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!n?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},t.prototype._updateHandle=function(e,a){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=i.itemSize,u=i.getExtent(),f=this._applyTransform("left",n.mainGroup);CT([0,1],function(c){var h=o[c];h.setStyle("fill",a.handlesColor[c]),h.y=e[c];var v=pt(e[c],[0,l[1]],u,!0),d=this.getControllerVisual(v,"symbolSize");h.scaleX=h.scaleY=d/l[0],h.x=l[0]-d/2;var p=Qt(n.handleLabelPoints[c],Ka(h,this.group));if(this._orient==="horizontal"){var y=f==="left"||f==="top"?(l[0]-d)/2:(l[0]-d)/-2;p[1]+=y}s[c].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,a,n,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],f=this._shapes,c=f.indicator;if(c){c.attr("invisible",!1);var h={convertOpacityToAlpha:!0},v=this.getControllerVisual(e,"color",h),d=this.getControllerVisual(e,"symbolSize"),p=pt(e,s,u,!0),y=l[0]-d/2,g={x:c.x,y:c.y};c.y=p,c.x=y;var m=Qt(f.indicatorLabelPoint,Ka(c,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",f.mainGroup),b=this._orient,x=b==="horizontal";_.setStyle({text:(n||"")+o.formatValueText(a),verticalAlign:x?S:"middle",align:x?"center":S});var C={x:y,y:p,style:{fill:v}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var D={duration:100,easing:"cubicInOut",additive:!0};c.x=g.x,c.y=g.y,c.animateTo(C,D),_.animateTo(T,D)}else c.attr(C),_.attr(T);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var M=0;M<A.length;M++)this.api.enterBlur(A[M])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",function(a){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,i=e._applyTransform([a.offsetX,a.offsetY],e._shapes.mainGroup,!0,!0);i[1]=Xv(xs(0,i[1]),n[1]),e._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=n[0])}}).on("mouseout",function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,a){var n=this.visualMapModel,i=n.itemSize;if(n.option.hoverLink){var o=[0,i[1]],s=n.getExtent();e=Xv(xs(o[0],e),o[1]);var l=AT(n,s,o),u=[e-l,e+l],f=pt(e,o,s,!0),c=[pt(u[0],o,s,!0),pt(u[1],o,s,!0)];u[0]<o[0]&&(c[0]=-1/0),u[1]>o[1]&&(c[1]=1/0),a&&(c[0]===-1/0?this._showIndicator(f,c[1],"< ",l):c[1]===1/0?this._showIndicator(f,c[0],"> ",l):this._showIndicator(f,f,"≈ ",l));var h=this._hoverLinkDataIndices,v=[];(a||Kv(n))&&(v=this._hoverLinkDataIndices=n.findTargetDataIndices(c));var d=im(h,v);this._dispatchHighDown("downplay",mi(d[0],n)),this._dispatchHighDown("highlight",mi(d[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var a;if(ea(e.target,function(l){var u=te(l);if(u.dataIndex!=null)return a=u,!0},!0),!!a){var n=this.ecModel.getSeriesByIndex(a.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(n)){var o=n.getData(a.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),a.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var a=this._shapes.handleLabels;if(a)for(var n=0;n<a.length;n++)this.api.leaveBlur(a[n])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",mi(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(e,a,n,i){var o=Ka(a,i?null:this.group);return z(e)?Qt(e,o,n):Bl(e,o,n)},t.prototype._dispatchHighDown=function(e,a){a&&a.length&&this.api.dispatchAction({type:e,batch:a})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t})(iy);function $v(r,t,e,a){return new ha({shape:{points:r},draggable:!!e,cursor:t,drift:e,onmousemove:function(n){er(n.event)},ondragend:a})}function AT(r,t,e){var a=MT/2,n=r.get("hoverLinkDataSize");return n&&(a=pt(n,t,e,!0)/2),a}function Kv(r){var t=r.get("hoverLinkOnHandle");return!!(t??r.get("realtime"))}function qv(r){return r==="vertical"?"ns-resize":"ew-resize"}var LT={type:"selectDataRange",event:"dataRangeSelected",update:"update"},IT=function(r,t){t.eachComponent({mainType:"visualMap",query:r},function(e){e.setSelected(r.selected)})},PT=[{createOnAllSeries:!0,reset:function(r,t){var e=[];return t.eachComponent("visualMap",function(a){var n=r.pipelineContext;!a.isTargetSeries(r)||n&&n.large||e.push(FM(a.stateList,a.targetVisuals,Z(a.getValueState,a),a.getDataDimensionIndex(r.getData())))}),e}},{createOnAllSeries:!0,reset:function(r,t){var e=r.getData(),a=[];t.eachComponent("visualMap",function(n){if(n.isTargetSeries(r)){var i=n.getVisualMeta(Z(kT,null,r,n))||{stops:[],outerColors:[]},o=n.getDataDimensionIndex(e);o>=0&&(i.dimension=o,a.push(i))}}),r.getData().setVisual("visualMeta",a)}}];function kT(r,t,e,a){for(var n=t.targetVisuals[a],i=ze.prepareVisualTypes(n),o={color:Zd(r.getData(),"color")},s=0,l=i.length;s<l;s++){var u=i[s],f=n[u==="opacity"?"__alphaForOpacity":u];f&&f.applyVisual(e,c,h)}return o.color;function c(v){return o[v]}function h(v,d){o[v]=d}}var jv=w;function RT(r){var t=r&&r.visualMap;z(t)||(t=t?[t]:[]),jv(t,function(e){if(e){jr(e,"splitList")&&!jr(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var a=e.pieces;a&&z(a)&&jv(a,function(n){K(n)&&(jr(n,"start")&&!jr(n,"min")&&(n.min=n.start),jr(n,"end")&&!jr(n,"max")&&(n.max=n.end))})}})}function jr(r,t){return r&&r.hasOwnProperty&&r.hasOwnProperty(t)}var Qv=!1;function sy(r){Qv||(Qv=!0,r.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),r.registerAction(LT,IT),w(PT,function(t){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,t)}),r.registerPreprocessor(RT))}function ET(r){r.registerComponentModel(wT),r.registerComponentView(DT),sy(r)}var OT=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._pieceList=[],e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],BT[this._mode].call(this,this._pieceList),this._resetSelected(e,a);var i=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=ee(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=X(this._pieceList,function(l){return l=ee(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var e=this.option,a={},n=ze.listVisualTypes(),i=this.isCategory();w(e.pieces,function(s){w(n,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),w(a,function(s,l){var u=!1;w(this.stateList,function(f){u=u||o(e,f,l)||o(e.target,f,l)},this),!u&&w(this.stateList,function(f){(e[f]||(e[f]={}))[l]=ny.get(l,f==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,a){var n=this.option,i=this._pieceList,o=(a?n:e).selected||{};if(n.selected=o,w(i,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),n.selectedMode==="single"){var s=!1;w(i,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return this._mode==="categories"?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=ee(e)},t.prototype.getValueState=function(e){var a=ze.findPieceIndex(e,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[],n=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=ze.findPieceIndex(l,n);f===e&&o.push(u)},this),a.push({seriesId:i.id,dataIndex:o})},this),a},t.prototype.getRepresentValue=function(e){var a;if(this.isCategory())a=e.value;else if(e.value!=null)a=e.value;else{var n=e.interval||[];a=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return a},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var a=[],n=["",""],i=this;function o(f,c){var h=i.getRepresentValue({interval:f});c||(c=i.getValueState(h));var v=e(h,c);f[0]===-1/0?n[0]=v:f[1]===1/0?n[1]=v:a.push({value:f[0],color:v},{value:f[1],color:v})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return w(s,function(f){var c=f.interval;c&&(c[0]>u&&o([u,c[0]],"outOfRange"),o(c.slice()),u=c[1])},this),{stops:a,outerColors:n}},t.type="visualMap.piecewise",t.defaultOption=ya(Ji.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t})(Ji),BT={splitNumber:function(r){var t=this.option,e=Math.min(t.precision,20),a=this.getExtent(),n=t.splitNumber;n=Math.max(parseInt(n,10),1),t.splitNumber=n;for(var i=(a[1]-a[0])/n;+i.toFixed(e)!==i&&e<5;)e++;t.precision=e,i=+i.toFixed(e),t.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o<n;s+=i,o++){var l=o===n-1?a[1]:s+i;r.push({interval:[s,l],close:[1,1]})}t.maxOpen&&r.push({interval:[a[1],1/0],close:[0,0]}),zu(r),w(r,function(u,f){u.index=f,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var t=this.option;w(t.categories,function(e){r.push({text:this.formatValueText(e,!0),value:e})},this),Jv(t,r)},pieces:function(r){var t=this.option;w(t.pieces,function(e,a){K(e)||(e={value:e});var n={text:"",index:a};if(e.label!=null&&(n.text=e.label),e.hasOwnProperty("value")){var i=n.value=e.value;n.interval=[i,i],n.close=[1,1]}else{for(var o=n.interval=[],s=n.close=[0,0],l=[1,0,1],u=[-1/0,1/0],f=[],c=0;c<2;c++){for(var h=[["gte","gt","min"],["lte","lt","max"]][c],v=0;v<3&&o[c]==null;v++)o[c]=e[h[v]],s[c]=l[v],f[c]=v===2;o[c]==null&&(o[c]=u[c])}f[0]&&o[1]===1/0&&(s[0]=0),f[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(n.value=o[0])}n.visual=ze.retrieveVisuals(e),r.push(n)},this),Jv(t,r),zu(r),w(r,function(e){var a=e.close,n=[["<","≤"][a[1]],[">","≥"][a[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,n)},this)}};function Jv(r,t){var e=r.inverse;(r.orient==="vertical"?!e:e)&&t.reverse()}var NT=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var a=this.visualMapModel,n=a.get("textGap"),i=a.textStyleModel,o=this._getItemAlign(),s=a.itemSize,l=this._getViewData(),u=l.endsText,f=an(a.get("showLabel",!0),!u),c=!a.get("selectedMode");u&&this._renderEndsText(e,u[0],s,f,o),w(l.viewPieceList,function(h){var v=h.piece,d=new pe;d.onclick=Z(this._onItemClick,this,v),this._enableHoverLink(d,h.indexInModelPieceList);var p=a.getRepresentValue(v);if(this._createItemSymbol(d,p,[0,0,s[0],s[1]],c),f){var y=this.visualMapModel.getValueState(p),g=i.get("align")||o;d.add(new he({style:Te(i,{x:g==="right"?-n:s[0]+n,y:s[1]/2,text:v.text,verticalAlign:i.get("verticalAlign")||"middle",align:g,opacity:J(i.get("opacity"),y==="outOfRange"?.5:1)}),silent:c}))}e.add(d)},this),u&&this._renderEndsText(e,u[1],s,f,o),na(a.get("orient"),e,a.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,a){var n=this;e.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:mi(s.findTargetDataIndices(a),s)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,a=e.option;if(a.orient==="vertical")return oy(e,this.api,e.itemSize);var n=a.align;return(!n||n==="auto")&&(n="left"),n},t.prototype._renderEndsText=function(e,a,n,i,o){if(a){var s=new pe,l=this.visualMapModel.textStyleModel;s.add(new he({style:Te(l,{x:i?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:a})})),e.add(s)}},t.prototype._getViewData=function(){var e=this.visualMapModel,a=X(e.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=e.get("text"),i=e.get("orient"),o=e.get("inverse");return(i==="horizontal"?o:!o)?a.reverse():n&&(n=n.slice().reverse()),{viewPieceList:a,endsText:n}},t.prototype._createItemSymbol=function(e,a,n,i){var o=at(this.getControllerVisual(a,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(a,"color"));o.silent=i,e.add(o)},t.prototype._onItemClick=function(e){var a=this.visualMapModel,n=a.option,i=n.selectedMode;if(i){var o=ee(n.selected),s=a.getSelectedMapKey(e);i==="single"||i===!0?(o[s]=!0,w(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t})(iy);function VT(r){r.registerComponentModel(OT),r.registerComponentView(NT),sy(r)}function sD(r){Xe(ET),Xe(VT)}var zT=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.prototype.init=function(e,a,n){r.prototype.init.call(this,e,a,n),this._sourceManager=new Ld(this),kf(this)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.call(this,e,a),kf(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:ft},t})(re),FT=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.type="dataset",t})(He);function GT(r){r.registerComponentModel(zT),r.registerComponentView(FT)}Xe([Gb,GT]);Xe(Fb);export{xp as S,$T as a,ZT as b,YT as c,Ai as d,XT as e,vp as f,rt as g,WT as h,Gb as i,aD as j,UT as k,ce as l,jT as m,qT as n,KT as o,JT as p,nD as q,ux as r,iD as s,tD as t,Xe as u,sD as v,oD as w,QT as x,rD as y,eD as z};
11
+ `||n==="")){var i=r.isSelected(n);F(e,n)?e[n]=e[n]&&i:e[n]=i}}),e}function XM(r){r.registerAction("legendToggleSelect","legendselectchanged",me(Va,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",me(Va,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",me(Va,"inverseSelect")),r.registerAction("legendSelect","legendselected",me(Va,"select")),r.registerAction("legendUnSelect","legendunselected",me(Va,"unSelect"))}function ry(r){r.registerComponentModel(yl),r.registerComponentView(ey),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,ZM),r.registerSubTypeDefaulter("legend",function(){return"plain"}),XM(r)}var $M=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(e,a,n){var i=Er(e);r.prototype.init.call(this,e,a,n),Vv(this,e,i)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.call(this,e,a),Vv(this,this.option,e)},t.type="legend.scroll",t.defaultOption=ya(yl.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:O.color.accent50,pageIconInactiveColor:O.color.accent10,pageIconSize:15,pageTextStyle:{color:O.color.tertiary},animationDurationUpdate:800}),t})(yl);function Vv(r,t,e){var a=r.getOrient(),n=[1,1];n[a.index]=0,Rt(t,e,{type:"box",ignoreSize:!!n})}var zv=pe,gs=["width","height"],ys=["x","y"],KM=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!0,e._currentIndex=0,e}return t.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new zv),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new zv)},t.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(e,a,n,i,o,s,l){var u=this;r.prototype.renderInner.call(this,e,a,n,i,o,s,l);var f=this._controllerGroup,c=a.get("pageIconSize",!0),h=z(c)?c:[c,c];d("pagePrev",0);var v=a.getModel("pageTextStyle");f.add(new he({name:"pageText",style:{text:"xx/xx",fill:v.getTextColor(),font:v.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),d("pageNext",1);function d(p,y){var g=p+"DataIndex",m=Nl(a.get("pageIcons",!0)[a.getOrient().name][y],{onclick:Z(u._pageGo,u,g,a,i)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});m.name=p,f.add(m)}},t.prototype.layoutInner=function(e,a,n,i,o,s){var l=this.getSelectorGroup(),u=e.getOrient().index,f=gs[u],c=ys[u],h=gs[1-u],v=ys[1-u];o&&na("horizontal",l,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),p=l.getBoundingRect(),y=[-p.x,-p.y],g=ee(n);o&&(g[f]=n[f]-p[f]-d);var m=this._layoutContentAndController(e,i,g,u,f,h,v,c);if(o){if(s==="end")y[u]+=m[f]+d;else{var _=p[f]+d;y[u]-=_,m[c]-=_}m[f]+=p[f]+d,y[1-u]+=m[v]+m[h]/2-p[h]/2,m[h]=Math.max(m[h],p[h]),m[v]=Math.min(m[v],p[v]+y[1-u]),l.x=y[0],l.y=y[1],l.markRedraw()}return m},t.prototype._layoutContentAndController=function(e,a,n,i,o,s,l,u){var f=this.getContentGroup(),c=this._containerGroup,h=this._controllerGroup;na(e.get("orient"),f,e.get("itemGap"),i?n.width:null,i?null:n.height),na("horizontal",h,e.get("pageButtonItemGap",!0));var v=f.getBoundingRect(),d=h.getBoundingRect(),p=this._showController=v[o]>n[o],y=[-v.x,-v.y];a||(y[i]=f[u]);var g=[0,0],m=[-d.x,-d.y],_=J(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(p){var S=e.get("pageButtonPosition",!0);S==="end"?m[i]+=n[o]-d[o]:g[i]+=d[o]+_}m[1-i]+=v[s]/2-d[s]/2,f.setPosition(y),c.setPosition(g),h.setPosition(m);var b={x:0,y:0};if(b[o]=p?n[o]:v[o],b[s]=Math.max(v[s],d[s]),b[l]=Math.min(0,d[l]+m[1-i]),c.__rectSize=n[o],p){var x={x:0,y:0};x[o]=Math.max(n[o]-d[o]-_,0),x[s]=b[s],c.setClipPath(new se({shape:x})),c.__rectSize=x[o]}else h.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var C=this._getPageInfo(e);return C.pageIndex!=null&&De(f,{x:C.contentPosition[0],y:C.contentPosition[1]},p?e:null),this._updatePageInfoView(e,C),b},t.prototype._pageGo=function(e,a,n){var i=this._getPageInfo(a)[e];i!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:a.id})},t.prototype._updatePageInfoView=function(e,a){var n=this._controllerGroup;w(["pagePrev","pageNext"],function(f){var c=f+"DataIndex",h=a[c]!=null,v=n.childOfName(f);v&&(v.setStyle("fill",h?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),v.cursor=h?"pointer":"default")});var i=n.childOfName("pageText"),o=e.get("pageFormatter"),s=a.pageIndex,l=s!=null?s+1:0,u=a.pageCount;i&&o&&i.setStyle("text",$(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var a=e.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=e.getOrient().index,s=gs[o],l=ys[o],u=this._findTargetItemIndex(a),f=n.children(),c=f[u],h=f.length,v=h?1:0,d={contentPosition:[n.x,n.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return d;var p=S(c);d.contentPosition[o]=-p.s;for(var y=u+1,g=p,m=p,_=null;y<=h;++y)_=S(f[y]),(!_&&m.e>g.s+i||_&&!b(_,g.s))&&(m.i>g.i?g=m:g=_,g&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=g.i),++d.pageCount)),m=_;for(var y=u-1,g=p,m=p,_=null;y>=-1;--y)_=S(f[y]),(!_||!b(m,_.s))&&g.i<m.i&&(m=g,d.pagePrevDataIndex==null&&(d.pagePrevDataIndex=g.i),++d.pageCount,++d.pageIndex),g=_;return d;function S(x){if(x){var C=x.getBoundingRect(),T=C[l]+x[l];return{s:T,e:T+C[s],i:x.__legendDataIndex}}}function b(x,C){return x.e>=C&&x.s<=C+i}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var a,n=this.getContentGroup(),i;return n.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===e&&(a=s)}),a??i},t.type="legend.scroll",t})(ey);function qM(r){r.registerAction("legendScroll","legendscroll",function(t,e){var a=t.scrollDataIndex;a!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(n){n.setScrollDataIndex(a)})})}function jM(r){Xe(ry),r.registerComponentModel($M),r.registerComponentView(KM),qM(r)}function iD(r){Xe(ry),Xe(jM)}var QM=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.inside",t.defaultOption=ya(Qi.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t})(Qi),Lu=ie();function JM(r,t,e){Lu(r).coordSysRecordMap.each(function(a){var n=a.dataZoomInfoMap.get(t.uid);n&&(n.getRange=e)})}function eT(r,t){for(var e=Lu(r).coordSysRecordMap,a=e.keys(),n=0;n<a.length;n++){var i=a[n],o=e.get(i),s=o.dataZoomInfoMap;if(s){var l=t.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||ay(e,o))}}}function ay(r,t){if(t){r.removeKey(t.model.uid);var e=t.controller;e&&e.dispose()}}function tT(r,t){var e={model:t,containsPoint:me(aT,t),dispatchAction:me(rT,r),dataZoomInfoMap:null,controller:null},a=e.controller=new V1(r.getZr());return w(["pan","zoom","scrollMove"],function(n){a.on(n,function(i){var o=[];e.dataZoomInfoMap.each(function(s){if(i.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[n],u=l&&l(s.dzReferCoordSysInfo,e.model.mainType,e.controller,i);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&e.dispatchAction(o)})}),e}function rT(r,t){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function aT(r,t,e,a){return r.coordinateSystem.containPoint([e,a])}function nT(r,t,e){var a,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return r.each(function(s){var l=s.model,u=l.get("disabled",!0)?!1:l.get("zoomLock",!0)?"move":!0;i[n+u]>i[n+a]&&(a=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:a,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:e,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint}}}}function iT(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(t,e){var a=Lu(e),n=a.coordSysRecordMap||(a.coordSysRecordMap=q());n.each(function(i){i.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=Xg(i);w(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,tT(e,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=q());f.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),n.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){ay(n,i);return}var f=nT(l,i,e);o.enable(f.controlType,f.opt),go(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var oT=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,a,n){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),JM(n,e,{pan:Z(ms.pan,this),zoom:Z(ms.zoom,this),scrollMove:Z(ms.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){eT(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t})($g),ms={zoom:function(r,t,e,a){var n=this.range,i=n.slice(),o=r.axisModels[0];if(o){var s=_s[t](null,[a.originX,a.originY],o,e,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/a.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(ca(0,i,[0,100],0,f.minSpan,f.maxSpan),this.range=i,n[0]!==i[0]||n[1]!==i[1])return i}},pan:Fv(function(r,t,e,a,n,i){var o=_s[a]([i.oldX,i.oldY],[i.newX,i.newY],t,n,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:Fv(function(r,t,e,a,n,i){var o=_s[a]([0,0],[i.scrollDelta,i.scrollDelta],t,n,e);return o.signal*(r[1]-r[0])*i.scrollDelta})};function Fv(r){return function(t,e,a,n){var i=this.range,o=i.slice(),s=t.axisModels[0];if(s){var l=r(o,s,t,e,a,n);if(ca(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var _s={grid:function(r,t,e,a,n){var i=e.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,t,e,a,n){var i=e.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],t=s.pointToCoord(t),e.mainType==="radiusAxis"?(o.pixel=t[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,t,e,a,n){var i=e.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};function sT(r){Kg(r),r.registerComponentModel(QM),r.registerComponentView(oT),iT(r)}var lT=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=ya(Qi.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:O.color.accent10,borderRadius:0,backgroundColor:O.color.transparent,dataBackground:{lineStyle:{color:O.color.accent30,width:.5},areaStyle:{color:O.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:O.color.accent40,width:.5},areaStyle:{color:O.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:O.color.neutral00,borderColor:O.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:O.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:O.color.tertiary},brushSelect:!0,brushStyle:{color:O.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:O.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t})(Qi),za=se,uT=1,Ss=30,fT=7,Fa="horizontal",Gv="vertical",cT=5,vT=["line","bar","candlestick","scatter"],hT={easing:"cubicOut",duration:100,delay:0},dT=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,a){this.api=a,this._onBrush=Z(this._onBrush,this),this._onBrushEnd=Z(this._onBrushEnd,this)},t.prototype.render=function(e,a,n,i){if(r.prototype.render.apply(this,arguments),go(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Oi(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var a=this._displayables.sliderGroup=new pe;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(a),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,a=this.api,n=e.get("brushSelect"),i=n?fT:0,o=Rr(e,a).refContainer,s=this._findCoordRect(),l=e.get("defaultLocationEdgeGap",!0)||0,u=this._orient===Fa?{right:o.width-s.x-s.width,top:o.height-Ss-l-i,width:s.width,height:Ss}:{right:l,top:s.y,width:Ss,height:s.height},f=Er(e.option);w(["right","top","width","height"],function(h){f[h]==="ph"&&(f[h]=u[h])});var c=rt(f,o);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===Gv&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,a=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===Fa&&!o?{scaleY:l?1:-1,scaleX:1}:n===Fa&&o?{scaleY:l?1:-1,scaleX:-1}:n===Gv&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]);e.x=a.x-u.x,e.y=a.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,a=this._size,n=this._displayables.sliderGroup,i=e.get("brushSelect");n.add(new za({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new za({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:Z(this._onClickPanel,this)}),s=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),n.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var a=this._size,n=this._shadowSize||[],i=e.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||a[0]!==n[0]||a[1]!==n[1]){var c=o.getDataExtent(e.thisDim),h=o.getDataExtent(l),v=(h[1]-h[0])*.3;h=[h[0]-v,h[1]+v];var d=[0,a[1]],p=[0,a[0]],y=[[a[0],0],[0,0]],g=[],m=p[1]/Math.max(1,o.count()-1),_=a[0]/(c[1]-c[0]),S=e.thisAxis.type==="time",b=-m,x=Math.round(o.count()/a[0]),C;o.each([e.thisDim,l],function(P,L,E){if(x>0&&E%x){S||(b+=m);return}b=S?(+P-c[0])*_:b+m;var I=L==null||isNaN(L)||L==="",k=I?0:ce(L,h,d,!0);I&&!C&&E?(y.push([y[y.length-1][0],0]),g.push([g[g.length-1][0],0])):!I&&C&&(y.push([b,0]),g.push([b,0])),I||(y.push([b,k]),g.push([b,k])),C=I}),u=this._shadowPolygonPts=y,f=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var T=this.dataZoomModel;function D(P){var L=T.getModel(P?"selectedDataBackground":"dataBackground"),E=new pe,I=new ha({shape:{points:u},segmentIgnoreThreshold:1,style:L.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),k=new or({shape:{points:f},segmentIgnoreThreshold:1,style:L.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return E.add(I),E.add(k),E}for(var A=0;A<3;A++){var M=D(A===1);this._displayables.sliderGroup.add(M),this._displayables.dataShadowSegs.push(M)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,a=e.get("showDataShadow");if(a!==!1){var n,i=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();w(l,function(u){if(!n&&!(a!==!0&&ue(vT,u.get("type"))<0)){var f=i.getComponent(jt(o),s).axis,c=pT(o),h,v=u.coordinateSystem;c!=null&&v.getOtherAxis&&(h=v.getOtherAxis(f).inverse),c=u.getData().mapDimension(c);var d=u.getData().mapDimension(o);n={thisAxis:f,series:u,thisDim:d,otherDim:c,otherAxisInverse:h}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,a=this._displayables,n=a.handles=[null,null],i=a.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,c=l.get("brushSelect"),h=a.filler=new za({silent:c,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new za({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:uT,fill:O.color.transparent}})),w([0,1],function(_){var S=l.get("handleIcon");!Ni[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var b=at(S,-1,0,2,2,null,!0);b.attr({cursor:gT(this._orient),draggable:!0,drift:Z(this._onDragMove,this,_),ondragend:Z(this._onDragEnd,this),onmouseover:Z(this._showDataInfo,this,!0),onmouseout:Z(this._showDataInfo,this,!1),z2:5});var x=b.getBoundingRect(),C=l.get("handleSize");this._handleHeight=ne(C,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Ai(b);var T=l.get("handleColor");T!=null&&(b.style.fill=T),o.add(n[_]=b);var D=l.getModel("textStyle"),A=l.get("handleLabel")||{},M=A.show||!1;e.add(i[_]=new he({silent:!0,invisible:!M,style:Te(D,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:D.getTextColor(),font:D.getFont()}),z2:10}))},this);var v=h;if(c){var d=ne(l.get("moveHandleSize"),s[1]),p=a.moveHandle=new se({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),y=d*.8,g=a.moveHandleIcon=at(l.get("moveHandleIcon"),-y/2,-y/2,y,y,O.color.neutral00,!0);g.silent=!0,g.y=s[1]+d/2-.5,p.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(d,10));v=a.moveZone=new se({invisible:!0,shape:{y:s[1]-m,height:d+m}}),v.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(g),o.add(v)}v.attr({draggable:!0,cursor:"default",drift:Z(this._onDragMove,this,"all"),ondragstart:Z(this._showDataInfo,this,!0),ondragend:Z(this._onDragEnd,this),onmouseover:Z(this._showDataInfo,this,!0),onmouseout:Z(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[ce(e[0],[0,100],a,!0),ce(e[1],[0,100],a,!0)]},t.prototype._updateInterval=function(e,a){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];ca(a,i,o,n.get("zoomLock")?"all":e,s.minSpan!=null?ce(s.minSpan,l,o,!0):null,s.maxSpan!=null?ce(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=_r([ce(i[0],o,l,!0),ce(i[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},t.prototype._updateView=function(e){var a=this._displayables,n=this._handleEnds,i=_r(n.slice()),o=this._size;w([0,1],function(v){var d=a.handles[v],p=this._handleHeight;d.attr({scaleX:p/2,scaleY:p/2,x:n[v]+(v?-1:1),y:o[1]/2-p/2})},this),a.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};a.moveHandle&&(a.moveHandle.setShape(s),a.moveZone.setShape(s),a.moveZone.getBoundingRect(),a.moveHandleIcon&&a.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=a.dataShadowSegs,u=[0,i[0],i[1],o[0]],f=0;f<l.length;f++){var c=l[f],h=c.getClipPath();h||(h=new se,c.setClipPath(h)),h.setShape({x:u[f],y:0,width:u[f+1]-u[f],height:o[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var a=this.dataZoomModel,n=this._displayables,i=n.handleLabels,o=this._orient,s=["",""];if(a.get("showDetail")){var l=a.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,f=this._range,c=e?l.calculateDataWindow({start:f[0],end:f[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(c[0],u),this._formatLabel(c[1],u)]}}var h=_r(this._handleEnds.slice());v.call(this,0),v.call(this,1);function v(d){var p=Ka(n.handles[d].parent,this.group),y=Bl(d===0?"right":"left",p),g=this._handleWidth/2+cT,m=Qt([h[d]+(d===0?-g:g),this._size[1]/2],p);i[d].setStyle({x:m[0],y:m[1],verticalAlign:o===Fa?"middle":y,align:o===Fa?y:"center",text:s[d]})}},t.prototype._formatLabel=function(e,a){var n=this.dataZoomModel,i=n.get("labelFormatter"),o=n.get("labelPrecision");(o==null||o==="auto")&&(o=a.getPixelPrecision());var s=e==null||isNaN(e)?"":a.type==="category"||a.type==="time"?a.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(o,20));return j(i)?i(e,s):$(i)?i.replace("{value}",s):s},t.prototype._showDataInfo=function(e){var a=this.dataZoomModel.get("handleLabel")||{},n=a.show||!1,i=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=i.get("show")||!1,s=e||this._dragging?o:n,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},t.prototype._onDragMove=function(e,a,n,i){this._dragging=!0,er(i.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=Qt([a,n],o,!0),l=this._updateInterval(e,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var e=this.dataZoomModel.get("realtime");!e&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var a=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>a[0]||n[1]<0||n[1]>a[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var a=e.offsetX,n=e.offsetY;this._brushStart=new de(a,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var n=a.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[n.x,n.x+n.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();ca(0,l,o,0,u.minSpan!=null?ce(u.minSpan,s,o,!0):null,u.maxSpan!=null?ce(u.maxSpan,s,o,!0):null),this._range=_r([ce(l[0],o,s,!0),ce(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(er(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,a){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new za({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,a),f=l.transformCoordToLocal(s.x,s.y),c=this._size;u[0]=Math.max(Math.min(c[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:c[1]})},t.prototype._dispatchZoomAction=function(e){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?hT:null,start:a[0],end:a[1]})},t.prototype._findCoordRect=function(){var e,a=Xg(this.dataZoomModel).infoList;if(!e&&a.length){var n=a[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var i=this.api.getWidth(),o=this.api.getHeight();e={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return e},t.type="dataZoom.slider",t})($g);function pT(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function gT(r){return r==="vertical"?"ns-resize":"ew-resize"}function yT(r){r.registerComponentModel(lT),r.registerComponentView(dT),Kg(r)}function oD(r){Xe(sT),Xe(yT)}var ny={get:function(r,t,e){var a=ee((mT[r]||{})[t]);return e&&z(a)?a[a.length-1]:a}},mT={color:{active:["#006edd","#e0ffff"],inactive:[O.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},Hv=ze.mapVisual,_T=ze.eachVisual,ST=z,Wv=w,xT=_r,bT=ce,Ji=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,a){var n=this.option;!a&&zM(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var a=this.stateList;e=Z(e,this),this.controllerVisuals=Ov(this.option.controller,a,e),this.targetVisuals=Ov(this.option.target,a,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesId,a=this.option.seriesIndex;a==null&&e==null&&(a="all");var n=da(this.ecModel,"series",{index:a,id:e},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return X(n,function(i){return i.componentIndex})},t.prototype.eachTargetSeries=function(e,a){w(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&e.call(a,i)},this)},t.prototype.isTargetSeries=function(e){var a=!1;return this.eachTargetSeries(function(n){n===e&&(a=!0)}),a},t.prototype.formatValueText=function(e,a,n){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;n=n||["<",">"],z(e)&&(e=e.slice(),u=!0);var f=a?e:u?[c(e[0]),c(e[1])]:c(e);if($(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(j(l))return u?l(e[0],e[1]):l(e);if(u)return e[0]===s[0]?n[0]+" "+f[1]:e[1]===s[1]?n[1]+" "+f[0]:f[0]+" - "+f[1];return f;function c(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,a=xT([e.min,e.max]);this._dataExtent=a},t.prototype.getDataDimensionIndex=function(e){var a=this.option.dimension;if(a!=null)return e.getDimensionIndex(a);for(var n=e.dimensions,i=n.length-1;i>=0;i--){var o=n[i],s=e.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,a=this.option,n={inRange:a.inRange,outOfRange:a.outOfRange},i=a.target||(a.target={}),o=a.controller||(a.controller={});oe(i,n),oe(o,n);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),f.call(this,o);function l(c){ST(a.color)&&!c.inRange&&(c.inRange={color:a.color.slice().reverse()}),c.inRange=c.inRange||{color:e.get("gradientColor")}}function u(c,h,v){var d=c[h],p=c[v];d&&!p&&(p=c[v]={},Wv(d,function(y,g){if(ze.isValidType(g)){var m=ny.get(g,"inactive",s);m!=null&&(p[g]=m,g==="color"&&!p.hasOwnProperty("opacity")&&!p.hasOwnProperty("colorAlpha")&&(p.opacity=[0,0]))}}))}function f(c){var h=(c.inRange||{}).symbol||(c.outOfRange||{}).symbol,v=(c.inRange||{}).symbolSize||(c.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),p=this.getItemSymbol(),y=p||"roundRect";Wv(this.stateList,function(g){var m=this.itemSize,_=c[g];_||(_=c[g]={color:s?d:[d]}),_.symbol==null&&(_.symbol=h&&ee(h)||(s?y:[y])),_.symbolSize==null&&(_.symbolSize=v&&ee(v)||(s?m[0]:[m[0],m[0]])),_.symbol=Hv(_.symbol,function(x){return x==="none"?y:x});var S=_.symbolSize;if(S!=null){var b=-1/0;_T(S,function(x){x>b&&(b=x)}),_.symbolSize=Hv(S,function(x){return bT(x,[0,b],[0,m[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:O.color.transparent,borderColor:O.color.borderTint,contentColor:O.color.theme[0],inactiveColor:O.color.disabled,borderWidth:0,padding:O.size.m,textGap:10,precision:0,textStyle:{color:O.color.secondary}},t})(re),Uv=[20,140],wT=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=Uv[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=Uv[1])},t.prototype._resetRange=function(){var e=this.getExtent(),a=this.option.range;!a||a.auto?(e.auto=1,this.option.range=e):z(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],e[0]),a[1]=Math.min(a[1],e[1]))},t.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),w(this.stateList,function(e){var a=this.option.controller[e].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),a=_r((this.get("range")||[]).slice());return a[0]>e[1]&&(a[0]=e[1]),a[1]>e[1]&&(a[1]=e[1]),a[0]<e[0]&&(a[0]=e[0]),a[1]<e[0]&&(a[1]=e[0]),a},t.prototype.getValueState=function(e){var a=this.option.range,n=this.getExtent(),i=J(this.option.unboundedRange,!0);return(i&&a[0]<=n[0]||a[0]<=e)&&(i&&a[1]>=n[1]||e<=a[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){e[0]<=s&&s<=e[1]&&i.push(l)},this),a.push({seriesId:n.id,dataIndex:i})},this),a},t.prototype.getVisualMeta=function(e){var a=Yv(this,"outOfRange",this.getExtent()),n=Yv(this,"inRange",this.option.range.slice()),i=[];function o(v,d){i.push({value:v,color:e(v,d)})}for(var s=0,l=0,u=n.length,f=a.length;l<f&&(!n.length||a[l]<=n[0]);l++)a[l]<n[s]&&o(a[l],"outOfRange");for(var c=1;s<u;s++,c=0)c&&i.length&&o(n[s],"outOfRange"),o(n[s],"inRange");for(var c=1;l<f;l++)(!n.length||n[n.length-1]<a[l])&&(c&&(i.length&&o(i[i.length-1].value,"outOfRange"),c=0),o(a[l],"outOfRange"));var h=i.length;return{stops:i,outerColors:[h?i[0].color:"transparent",h?i[h-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=ya(Ji.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:O.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:O.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:O.color.shadow}}),t})(Ji);function Yv(r,t,e){if(e[0]===e[1])return e.slice();for(var a=200,n=(e[1]-e[0])/a,i=e[0],o=[],s=0;s<=a&&i<e[1];s++)o.push(i),i+=n;return o.push(e[1]),o}var iy=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.autoPositionValues={left:1,right:1,top:1,bottom:1},e}return t.prototype.init=function(e,a){this.ecModel=e,this.api=a},t.prototype.render=function(e,a,n,i){if(this.visualMapModel=e,e.get("show")===!1){this.group.removeAll();return}this.doRender(e,a,n,i)},t.prototype.renderBackground=function(e){var a=this.visualMapModel,n=Ln(a.get("padding")||0),i=e.getBoundingRect();e.add(new se({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:a.get("backgroundColor"),stroke:a.get("borderColor"),lineWidth:a.get("borderWidth")}}))},t.prototype.getControllerVisual=function(e,a,n){n=n||{};var i=n.forceState,o=this.visualMapModel,s={};if(a==="color"){var l=o.get("contentColor");s.color=l}function u(v){return s[v]}function f(v,d){s[v]=d}var c=o.controllerVisuals[i||o.getValueState(e)],h=ze.prepareVisualTypes(c);return w(h,function(v){var d=c[v];n.convertOpacityToAlpha&&v==="opacity"&&(v="colorAlpha",d=c.__alphaForOpacity),ze.dependsOn(v,a)&&d&&d.applyVisual(e,u,f)}),s[a]},t.prototype.positionGroup=function(e){var a=this.visualMapModel,n=this.api,i=Rr(a,n).refContainer;N0(e,a.getBoxLayoutParams(),i)},t.prototype.doRender=function(e,a,n,i){},t.type="visualMap",t})(He),Zv=[["left","right","width"],["top","bottom","height"]];function oy(r,t,e){var a=r.option,n=a.align;if(n!=null&&n!=="auto")return n;for(var i={width:t.getWidth(),height:t.getHeight()},o=a.orient==="horizontal"?1:0,s=Zv[o],l=[0,null,10],u={},f=0;f<3;f++)u[Zv[1-o][f]]=l[f],u[s[f]]=f===2?e[0]:a[s[f]];var c=[["x","width",3],["y","height",0]][o],h=rt(u,i,a.padding);return s[(h.margin[c[2]]||0)+h[c[0]]+h[c[1]]*.5<i[c[1]]*.5?0:1]}function mi(r,t){return w(r||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")}),r}var pt=ce,CT=w,Xv=Math.min,xs=Math.max,MT=12,TT=6,DT=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._shapes={},e._dataInterval=[],e._handleEnds=[],e._hoverLinkDataIndices=[],e}return t.prototype.init=function(e,a){r.prototype.init.call(this,e,a),this._hoverLinkFromSeriesMouseOver=Z(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=Z(this._hideIndicator,this)},t.prototype.doRender=function(e,a,n,i){(!i||i.type!=="selectDataRange"||i.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,a=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(a);var n=e.get("text");this._renderEndsText(a,n,0),this._renderEndsText(a,n,1),this._updateView(!0),this.renderBackground(a),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(a)},t.prototype._renderEndsText=function(e,a,n){if(a){var i=a[1-n];i=i!=null?i+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,f=this._applyTransform([l[0]/2,n===0?-s:l[1]+s],u),c=this._applyTransform(n===0?"bottom":"top",u),h=this._orient,v=this.visualMapModel.textStyleModel;this.group.add(new he({style:Te(v,{x:f[0],y:f[1],verticalAlign:v.get("verticalAlign")||(h==="horizontal"?"middle":c),align:v.get("align")||(h==="horizontal"?c:"center"),text:i})}))}},t.prototype._renderBar=function(e){var a=this.visualMapModel,n=this._shapes,i=a.itemSize,o=this._orient,s=this._useHandle,l=oy(a,this.api,i),u=n.mainGroup=this._createBarGroup(l),f=new pe;u.add(f),f.add(n.outOfRange=$v()),f.add(n.inRange=$v(null,s?qv(this._orient):null,Z(this._dragHandle,this,"all",!1),Z(this._dragHandle,this,"all",!0))),f.setClipPath(new se({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var c=a.textStyleModel.getTextRect("国"),h=xs(c.width,c.height);s&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(a,u,0,i,h,o),this._createHandle(a,u,1,i,h,o)),this._createIndicator(a,u,i,h,o),e.add(u)},t.prototype._createHandle=function(e,a,n,i,o,s){var l=Z(this._dragHandle,this,n,!1),u=Z(this._dragHandle,this,n,!0),f=rn(e.get("handleSize"),i[0]),c=at(e.get("handleIcon"),-f/2,-f/2,f,f,null,!0),h=qv(this._orient);c.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(g){er(g.event)}}),c.x=i[0]/2,c.useStyle(e.getModel("handleStyle").getItemStyle()),c.setStyle({strokeNoScale:!0,strokeFirst:!0}),c.style.lineWidth*=2,c.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),Rl(c,!0),a.add(c);var v=this.visualMapModel.textStyleModel,d=new he({cursor:h,draggable:!0,drift:l,onmousemove:function(g){er(g.event)},ondragend:u,style:Te(v,{x:0,y:0,text:""})});d.ensureState("blur").style={opacity:.1},d.stateTransition={duration:200},this.group.add(d);var p=[f,0],y=this._shapes;y.handleThumbs[n]=c,y.handleLabelPoints[n]=p,y.handleLabels[n]=d},t.prototype._createIndicator=function(e,a,n,i,o){var s=rn(e.get("indicatorSize"),n[0]),l=at(e.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var u=e.getModel("indicatorStyle").getItemStyle();if(l instanceof Et){var f=l.style;l.useStyle(U({image:f.image,x:f.x,y:f.y,width:f.width,height:f.height},u))}else l.useStyle(u);a.add(l);var c=this.visualMapModel.textStyleModel,h=new he({silent:!0,invisible:!0,style:Te(c,{x:0,y:0,text:""})});this.group.add(h);var v=[(o==="horizontal"?i/2:TT)+n[0]/2,0],d=this._shapes;d.indicator=l,d.indicatorLabel=h,d.indicatorLabelPoint=v,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,a,n,i){if(this._useHandle){if(this._dragging=!a,!a){var o=this._applyTransform([n,i],this._shapes.mainGroup,!0);this._updateInterval(e,o[1]),this._hideIndicator(),this._updateView()}a===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),a?!this._hovering&&this._clearHoverLinkToSeries():Kv(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,a=this._dataInterval=e.getSelected(),n=e.getExtent(),i=[0,e.itemSize[1]];this._handleEnds=[pt(a[0],n,i,!0),pt(a[1],n,i,!0)]},t.prototype._updateInterval=function(e,a){a=a||0;var n=this.visualMapModel,i=this._handleEnds,o=[0,n.itemSize[1]];ca(a,i,o,e,0);var s=n.getExtent();this._dataInterval=[pt(i[0],o,s,!0),pt(i[1],o,s,!0)]},t.prototype._updateView=function(e){var a=this.visualMapModel,n=a.getExtent(),i=this._shapes,o=[0,a.itemSize[1]],s=e?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,n,s,"inRange"),u=this._createBarVisual(n,n,o,"outOfRange");i.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),i.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},t.prototype._createBarVisual=function(e,a,n,i){var o={forceState:i,convertOpacityToAlpha:!0},s=this._makeColorGradient(e,o),l=[this.getControllerVisual(e[0],"symbolSize",o),this.getControllerVisual(e[1],"symbolSize",o)],u=this._createBarPoints(n,l);return{barColor:new wl(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},t.prototype._makeColorGradient=function(e,a){var n=100,i=[],o=(e[1]-e[0])/n;i.push({color:this.getControllerVisual(e[0],"color",a),offset:0});for(var s=1;s<n;s++){var l=e[0]+o*s;if(l>e[1])break;i.push({color:this.getControllerVisual(l,"color",a),offset:s/n})}return i.push({color:this.getControllerVisual(e[1],"color",a),offset:1}),i},t.prototype._createBarPoints=function(e,a){var n=this.visualMapModel.itemSize;return[[n[0]-a[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-a[1],e[1]]]},t.prototype._createBarGroup=function(e){var a=this._orient,n=this.visualMapModel.get("inverse");return new pe(a==="horizontal"&&!n?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&n?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!n?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},t.prototype._updateHandle=function(e,a){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=i.itemSize,u=i.getExtent(),f=this._applyTransform("left",n.mainGroup);CT([0,1],function(c){var h=o[c];h.setStyle("fill",a.handlesColor[c]),h.y=e[c];var v=pt(e[c],[0,l[1]],u,!0),d=this.getControllerVisual(v,"symbolSize");h.scaleX=h.scaleY=d/l[0],h.x=l[0]-d/2;var p=Qt(n.handleLabelPoints[c],Ka(h,this.group));if(this._orient==="horizontal"){var y=f==="left"||f==="top"?(l[0]-d)/2:(l[0]-d)/-2;p[1]+=y}s[c].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,a,n,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],f=this._shapes,c=f.indicator;if(c){c.attr("invisible",!1);var h={convertOpacityToAlpha:!0},v=this.getControllerVisual(e,"color",h),d=this.getControllerVisual(e,"symbolSize"),p=pt(e,s,u,!0),y=l[0]-d/2,g={x:c.x,y:c.y};c.y=p,c.x=y;var m=Qt(f.indicatorLabelPoint,Ka(c,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",f.mainGroup),b=this._orient,x=b==="horizontal";_.setStyle({text:(n||"")+o.formatValueText(a),verticalAlign:x?S:"middle",align:x?"center":S});var C={x:y,y:p,style:{fill:v}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var D={duration:100,easing:"cubicInOut",additive:!0};c.x=g.x,c.y=g.y,c.animateTo(C,D),_.animateTo(T,D)}else c.attr(C),_.attr(T);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var M=0;M<A.length;M++)this.api.enterBlur(A[M])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",function(a){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,i=e._applyTransform([a.offsetX,a.offsetY],e._shapes.mainGroup,!0,!0);i[1]=Xv(xs(0,i[1]),n[1]),e._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=n[0])}}).on("mouseout",function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,a){var n=this.visualMapModel,i=n.itemSize;if(n.option.hoverLink){var o=[0,i[1]],s=n.getExtent();e=Xv(xs(o[0],e),o[1]);var l=AT(n,s,o),u=[e-l,e+l],f=pt(e,o,s,!0),c=[pt(u[0],o,s,!0),pt(u[1],o,s,!0)];u[0]<o[0]&&(c[0]=-1/0),u[1]>o[1]&&(c[1]=1/0),a&&(c[0]===-1/0?this._showIndicator(f,c[1],"< ",l):c[1]===1/0?this._showIndicator(f,c[0],"> ",l):this._showIndicator(f,f,"≈ ",l));var h=this._hoverLinkDataIndices,v=[];(a||Kv(n))&&(v=this._hoverLinkDataIndices=n.findTargetDataIndices(c));var d=im(h,v);this._dispatchHighDown("downplay",mi(d[0],n)),this._dispatchHighDown("highlight",mi(d[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var a;if(ea(e.target,function(l){var u=te(l);if(u.dataIndex!=null)return a=u,!0},!0),!!a){var n=this.ecModel.getSeriesByIndex(a.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(n)){var o=n.getData(a.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),a.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var a=this._shapes.handleLabels;if(a)for(var n=0;n<a.length;n++)this.api.leaveBlur(a[n])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",mi(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(e,a,n,i){var o=Ka(a,i?null:this.group);return z(e)?Qt(e,o,n):Bl(e,o,n)},t.prototype._dispatchHighDown=function(e,a){a&&a.length&&this.api.dispatchAction({type:e,batch:a})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t})(iy);function $v(r,t,e,a){return new ha({shape:{points:r},draggable:!!e,cursor:t,drift:e,onmousemove:function(n){er(n.event)},ondragend:a})}function AT(r,t,e){var a=MT/2,n=r.get("hoverLinkDataSize");return n&&(a=pt(n,t,e,!0)/2),a}function Kv(r){var t=r.get("hoverLinkOnHandle");return!!(t??r.get("realtime"))}function qv(r){return r==="vertical"?"ns-resize":"ew-resize"}var LT={type:"selectDataRange",event:"dataRangeSelected",update:"update"},IT=function(r,t){t.eachComponent({mainType:"visualMap",query:r},function(e){e.setSelected(r.selected)})},PT=[{createOnAllSeries:!0,reset:function(r,t){var e=[];return t.eachComponent("visualMap",function(a){var n=r.pipelineContext;!a.isTargetSeries(r)||n&&n.large||e.push(FM(a.stateList,a.targetVisuals,Z(a.getValueState,a),a.getDataDimensionIndex(r.getData())))}),e}},{createOnAllSeries:!0,reset:function(r,t){var e=r.getData(),a=[];t.eachComponent("visualMap",function(n){if(n.isTargetSeries(r)){var i=n.getVisualMeta(Z(kT,null,r,n))||{stops:[],outerColors:[]},o=n.getDataDimensionIndex(e);o>=0&&(i.dimension=o,a.push(i))}}),r.getData().setVisual("visualMeta",a)}}];function kT(r,t,e,a){for(var n=t.targetVisuals[a],i=ze.prepareVisualTypes(n),o={color:Zd(r.getData(),"color")},s=0,l=i.length;s<l;s++){var u=i[s],f=n[u==="opacity"?"__alphaForOpacity":u];f&&f.applyVisual(e,c,h)}return o.color;function c(v){return o[v]}function h(v,d){o[v]=d}}var jv=w;function RT(r){var t=r&&r.visualMap;z(t)||(t=t?[t]:[]),jv(t,function(e){if(e){jr(e,"splitList")&&!jr(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var a=e.pieces;a&&z(a)&&jv(a,function(n){K(n)&&(jr(n,"start")&&!jr(n,"min")&&(n.min=n.start),jr(n,"end")&&!jr(n,"max")&&(n.max=n.end))})}})}function jr(r,t){return r&&r.hasOwnProperty&&r.hasOwnProperty(t)}var Qv=!1;function sy(r){Qv||(Qv=!0,r.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),r.registerAction(LT,IT),w(PT,function(t){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,t)}),r.registerPreprocessor(RT))}function ET(r){r.registerComponentModel(wT),r.registerComponentView(DT),sy(r)}var OT=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._pieceList=[],e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],BT[this._mode].call(this,this._pieceList),this._resetSelected(e,a);var i=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=ee(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=X(this._pieceList,function(l){return l=ee(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var e=this.option,a={},n=ze.listVisualTypes(),i=this.isCategory();w(e.pieces,function(s){w(n,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),w(a,function(s,l){var u=!1;w(this.stateList,function(f){u=u||o(e,f,l)||o(e.target,f,l)},this),!u&&w(this.stateList,function(f){(e[f]||(e[f]={}))[l]=ny.get(l,f==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,a){var n=this.option,i=this._pieceList,o=(a?n:e).selected||{};if(n.selected=o,w(i,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),n.selectedMode==="single"){var s=!1;w(i,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return this._mode==="categories"?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=ee(e)},t.prototype.getValueState=function(e){var a=ze.findPieceIndex(e,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[],n=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=ze.findPieceIndex(l,n);f===e&&o.push(u)},this),a.push({seriesId:i.id,dataIndex:o})},this),a},t.prototype.getRepresentValue=function(e){var a;if(this.isCategory())a=e.value;else if(e.value!=null)a=e.value;else{var n=e.interval||[];a=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return a},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var a=[],n=["",""],i=this;function o(f,c){var h=i.getRepresentValue({interval:f});c||(c=i.getValueState(h));var v=e(h,c);f[0]===-1/0?n[0]=v:f[1]===1/0?n[1]=v:a.push({value:f[0],color:v},{value:f[1],color:v})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return w(s,function(f){var c=f.interval;c&&(c[0]>u&&o([u,c[0]],"outOfRange"),o(c.slice()),u=c[1])},this),{stops:a,outerColors:n}},t.type="visualMap.piecewise",t.defaultOption=ya(Ji.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t})(Ji),BT={splitNumber:function(r){var t=this.option,e=Math.min(t.precision,20),a=this.getExtent(),n=t.splitNumber;n=Math.max(parseInt(n,10),1),t.splitNumber=n;for(var i=(a[1]-a[0])/n;+i.toFixed(e)!==i&&e<5;)e++;t.precision=e,i=+i.toFixed(e),t.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o<n;s+=i,o++){var l=o===n-1?a[1]:s+i;r.push({interval:[s,l],close:[1,1]})}t.maxOpen&&r.push({interval:[a[1],1/0],close:[0,0]}),zu(r),w(r,function(u,f){u.index=f,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var t=this.option;w(t.categories,function(e){r.push({text:this.formatValueText(e,!0),value:e})},this),Jv(t,r)},pieces:function(r){var t=this.option;w(t.pieces,function(e,a){K(e)||(e={value:e});var n={text:"",index:a};if(e.label!=null&&(n.text=e.label),e.hasOwnProperty("value")){var i=n.value=e.value;n.interval=[i,i],n.close=[1,1]}else{for(var o=n.interval=[],s=n.close=[0,0],l=[1,0,1],u=[-1/0,1/0],f=[],c=0;c<2;c++){for(var h=[["gte","gt","min"],["lte","lt","max"]][c],v=0;v<3&&o[c]==null;v++)o[c]=e[h[v]],s[c]=l[v],f[c]=v===2;o[c]==null&&(o[c]=u[c])}f[0]&&o[1]===1/0&&(s[0]=0),f[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(n.value=o[0])}n.visual=ze.retrieveVisuals(e),r.push(n)},this),Jv(t,r),zu(r),w(r,function(e){var a=e.close,n=[["<","≤"][a[1]],[">","≥"][a[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,n)},this)}};function Jv(r,t){var e=r.inverse;(r.orient==="vertical"?!e:e)&&t.reverse()}var NT=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var a=this.visualMapModel,n=a.get("textGap"),i=a.textStyleModel,o=this._getItemAlign(),s=a.itemSize,l=this._getViewData(),u=l.endsText,f=an(a.get("showLabel",!0),!u),c=!a.get("selectedMode");u&&this._renderEndsText(e,u[0],s,f,o),w(l.viewPieceList,function(h){var v=h.piece,d=new pe;d.onclick=Z(this._onItemClick,this,v),this._enableHoverLink(d,h.indexInModelPieceList);var p=a.getRepresentValue(v);if(this._createItemSymbol(d,p,[0,0,s[0],s[1]],c),f){var y=this.visualMapModel.getValueState(p),g=i.get("align")||o;d.add(new he({style:Te(i,{x:g==="right"?-n:s[0]+n,y:s[1]/2,text:v.text,verticalAlign:i.get("verticalAlign")||"middle",align:g,opacity:J(i.get("opacity"),y==="outOfRange"?.5:1)}),silent:c}))}e.add(d)},this),u&&this._renderEndsText(e,u[1],s,f,o),na(a.get("orient"),e,a.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,a){var n=this;e.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:mi(s.findTargetDataIndices(a),s)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,a=e.option;if(a.orient==="vertical")return oy(e,this.api,e.itemSize);var n=a.align;return(!n||n==="auto")&&(n="left"),n},t.prototype._renderEndsText=function(e,a,n,i,o){if(a){var s=new pe,l=this.visualMapModel.textStyleModel;s.add(new he({style:Te(l,{x:i?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:a})})),e.add(s)}},t.prototype._getViewData=function(){var e=this.visualMapModel,a=X(e.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=e.get("text"),i=e.get("orient"),o=e.get("inverse");return(i==="horizontal"?o:!o)?a.reverse():n&&(n=n.slice().reverse()),{viewPieceList:a,endsText:n}},t.prototype._createItemSymbol=function(e,a,n,i){var o=at(this.getControllerVisual(a,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(a,"color"));o.silent=i,e.add(o)},t.prototype._onItemClick=function(e){var a=this.visualMapModel,n=a.option,i=n.selectedMode;if(i){var o=ee(n.selected),s=a.getSelectedMapKey(e);i==="single"||i===!0?(o[s]=!0,w(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t})(iy);function VT(r){r.registerComponentModel(OT),r.registerComponentView(NT),sy(r)}function sD(r){Xe(ET),Xe(VT)}var zT=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.prototype.init=function(e,a,n){r.prototype.init.call(this,e,a,n),this._sourceManager=new Ld(this),kf(this)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.call(this,e,a),kf(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:ft},t})(re),FT=(function(r){W(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.type="dataset",t})(He);function GT(r){r.registerComponentModel(zT),r.registerComponentView(FT)}Xe([Gb,GT]);Xe(Fb);export{xp as S,$T as a,ZT as b,YT as c,Ai as d,XT as e,vp as f,rt as g,WT as h,UT as i,Gb as j,jT as k,ce as l,qT as m,KT as n,JT as o,nD as p,aD as q,ux as r,iD as s,tD as t,Xe as u,sD as v,oD as w,QT as x,rD as y,eD as z};
@@ -1 +1 @@
1
- import{e as Tt,c as Mt,S as It,a as Ct,b as nt,d as kt,r as Et,g as bt,l as Ft,f as At,h as Pt}from"./vendor-echarts-hTLhTs52.js";import{a2 as Rt,a as Wt,d as ht}from"./vendor-zrender-D8psf1AA.js";Tt({type:"series.wordCloud",visualStyleAccessPath:"textStyle",visualStyleMapper:function(f){return{fill:f.get("color")}},visualDrawType:"fill",optionUpdated:function(){var f=this.option;f.gridSize=Math.max(Math.floor(f.gridSize),4)},getInitialData:function(f,o){var a=Mt(f.data,{coordDimensions:["value"]}),l=new It(a,this);return l.initData(f.data),l},defaultOption:{maskImage:null,shape:"circle",keepAspect:!1,left:"center",top:"center",width:"70%",height:"80%",sizeRange:[12,60],rotationRange:[-90,90],rotationStep:45,gridSize:8,drawOutOfBound:!1,shrinkToFit:!1,textStyle:{fontWeight:"normal"}}});Ct({type:"wordCloud",render:function(f,o,a){var l=this.group;l.removeAll();var t=f.getData(),x=f.get("gridSize");f.layoutInstance.ondraw=function(d,r,T,P){var D=t.getItemModel(T),Y=D.getModel("textStyle"),I=new Rt({style:nt(Y),scaleX:1/P.info.mu,scaleY:1/P.info.mu,x:(P.gx+P.info.gw/2)*x,y:(P.gy+P.info.gh/2)*x,rotation:P.rot});I.setStyle({x:P.info.fillTextOffsetX,y:P.info.fillTextOffsetY+r*.5,text:d,verticalAlign:"middle",fill:t.getItemVisual(T,"style").fill,fontSize:r}),l.add(I),t.setItemGraphicEl(T,I),I.ensureState("emphasis").style=nt(D.getModel(["emphasis","textStyle"]),{state:"emphasis"}),I.ensureState("blur").style=nt(D.getModel(["blur","textStyle"]),{state:"blur"}),kt(I,D.get(["emphasis","focus"]),D.get(["emphasis","blurScope"])),I.stateTransition={duration:f.get("animation")?f.get(["stateAnimation","duration"]):0,easing:f.get(["stateAnimation","easing"])},I.__highDownDispatcher=!0},this._model=f},remove:function(){this.group.removeAll(),this._model.layoutInstance.dispose()},dispose:function(){this._model.layoutInstance.dispose()}});window.setImmediate||(window.setImmediate=(function(){return window.msSetImmediate||window.webkitSetImmediate||window.mozSetImmediate||window.oSetImmediate||(function(){if(!window.postMessage||!window.addEventListener)return null;var a=[void 0],l="zero-timeout-message",t=function(d){var r=a.length;return a.push(d),window.postMessage(l+r.toString(36),"*"),r};return window.addEventListener("message",function(d){if(!(typeof d.data!="string"||d.data.substr(0,l.length)!==l)){d.stopImmediatePropagation();var r=parseInt(d.data.substr(l.length),36);a[r]&&(a[r](),a[r]=void 0)}},!0),window.clearImmediate=function(d){a[d]&&(a[d]=void 0)},t})()||function(a){window.setTimeout(a,0)}})());window.clearImmediate||(window.clearImmediate=(function(){return window.msClearImmediate||window.webkitClearImmediate||window.mozClearImmediate||window.oClearImmediate||function(a){window.clearTimeout(a)}})());var lt=(function(){var o=document.createElement("canvas");if(!o||!o.getContext)return!1;var a=o.getContext("2d");return!(!a||!a.getImageData||!a.fillText||!Array.prototype.some||!Array.prototype.push)})(),ot=(function(){if(lt){for(var o=document.createElement("canvas").getContext("2d"),a=20,l,t;a;){if(o.font=a.toString(10)+"px sans-serif",o.measureText("W").width===l&&o.measureText("m").width===t)return a+1;l=o.measureText("W").width,t=o.measureText("m").width,a--}return 0}})(),Ot=function(f){if(Array.isArray(f)){var o=f.slice();return o.splice(0,2),o}else return[]},zt=function(o){for(var a,l,t=o.length;t;)a=Math.floor(Math.random()*t),l=o[--t],o[t]=o[a],o[a]=l;return o},_={},J=function(o,a){if(!lt)return;var l=Math.floor(Math.random()*Date.now());Array.isArray(o)||(o=[o]),o.forEach(function(c,e){if(typeof c=="string"){if(o[e]=document.getElementById(c),!o[e])throw new Error("The element id specified is not found.")}else if(!c.tagName&&!c.appendChild)throw new Error("You must pass valid HTML elements, or ID of the element.")});var t={list:[],fontFamily:'"Trebuchet MS", "Heiti TC", "微軟正黑體", "Arial Unicode MS", "Droid Fallback Sans", sans-serif',fontWeight:"normal",color:"random-dark",minSize:0,weightFactor:1,clearCanvas:!0,backgroundColor:"#fff",gridSize:8,drawOutOfBound:!1,shrinkToFit:!1,origin:null,drawMask:!1,maskColor:"rgba(255,0,0,0.3)",maskGapWidth:.3,layoutAnimation:!0,wait:0,abortThreshold:0,abort:function(){},minRotation:-Math.PI/2,maxRotation:Math.PI/2,rotationStep:.1,shuffle:!0,rotateRatio:.1,shape:"circle",ellipticity:.65,classes:null,hover:null,click:null};if(a)for(var x in a)x in t&&(t[x]=a[x]);if(typeof t.weightFactor!="function"){var d=t.weightFactor;t.weightFactor=function(e){return e*d}}if(typeof t.shape!="function")switch(t.shape){case"circle":default:t.shape="circle";break;case"cardioid":t.shape=function(e){return 1-Math.sin(e)};break;case"diamond":t.shape=function(e){var i=e%(2*Math.PI/4);return 1/(Math.cos(i)+Math.sin(i))};break;case"square":t.shape=function(e){return Math.min(1/Math.abs(Math.cos(e)),1/Math.abs(Math.sin(e)))};break;case"triangle-forward":t.shape=function(e){var i=e%(2*Math.PI/3);return 1/(Math.cos(i)+Math.sqrt(3)*Math.sin(i))};break;case"triangle":case"triangle-upright":t.shape=function(e){var i=(e+Math.PI*3/2)%(2*Math.PI/3);return 1/(Math.cos(i)+Math.sqrt(3)*Math.sin(i))};break;case"pentagon":t.shape=function(e){var i=(e+.955)%(2*Math.PI/5);return 1/(Math.cos(i)+.726543*Math.sin(i))};break;case"star":t.shape=function(e){var i=(e+.955)%(2*Math.PI/10);return(e+.955)%(2*Math.PI/5)-2*Math.PI/10>=0?1/(Math.cos(2*Math.PI/10-i)+3.07768*Math.sin(2*Math.PI/10-i)):1/(Math.cos(i)+3.07768*Math.sin(i))};break}t.gridSize=Math.max(Math.floor(t.gridSize),4);var r=t.gridSize,T=r-t.maskGapWidth,P=Math.abs(t.maxRotation-t.minRotation),D=Math.min(t.maxRotation,t.minRotation),Y=t.rotationStep,I,C,b,B,F,O,G;function st(c,e){return"hsl("+(Math.random()*360).toFixed()+","+(Math.random()*30+70).toFixed()+"%,"+(Math.random()*(e-c)+c).toFixed()+"%)"}switch(t.color){case"random-dark":G=function(){return st(10,50)};break;case"random-light":G=function(){return st(50,90)};break;default:typeof t.color=="function"&&(G=t.color);break}var Z;typeof t.fontWeight=="function"&&(Z=t.fontWeight);var K=null;typeof t.classes=="function"&&(K=t.classes);var Q=!1,U=[],$,ft=function(e){var i=e.currentTarget,n=i.getBoundingClientRect(),u,s;e.touches?(u=e.touches[0].clientX,s=e.touches[0].clientY):(u=e.clientX,s=e.clientY);var h=u-n.left,S=s-n.top,g=Math.floor(h*(i.width/n.width||1)/r),m=Math.floor(S*(i.height/n.height||1)/r);return U[g]?U[g][m]:null},ut=function(e){var i=ft(e);if($!==i){if($=i,!i){t.hover(void 0,void 0,e);return}t.hover(i.item,i.dimension,e)}},j=function(e){var i=ft(e);i&&(t.click(i.item,i.dimension,e),e.preventDefault())},tt=[],ct=function(e){if(tt[e])return tt[e];var i=e*8,n=i,u=[];for(e===0&&u.push([B[0],B[1],0]);n--;){var s=1;t.shape!=="circle"&&(s=t.shape(n/i*2*Math.PI)),u.push([B[0]+e*s*Math.cos(-n/i*2*Math.PI),B[1]+e*s*Math.sin(-n/i*2*Math.PI)*t.ellipticity,n/i*2*Math.PI])}return tt[e]=u,u},et=function(){return t.abortThreshold>0&&new Date().getTime()-O>t.abortThreshold},vt=function(){return t.rotateRatio===0||Math.random()>t.rotateRatio?0:P===0?D:D+Math.round(Math.random()*P/Y)*Y},gt=function(e,i,n,u){var s=t.weightFactor(i);if(s<=t.minSize)return!1;var h=1;s<ot&&(h=(function(){for(var it=2;it*s<ot;)it+=2;return it})());var S;Z?S=Z(e,i,s,u):S=t.fontWeight;var g=document.createElement("canvas"),m=g.getContext("2d",{willReadFrequently:!0});m.font=S+" "+(s*h).toString(10)+"px "+t.fontFamily;var A=m.measureText(e).width/h,w=Math.max(s*h,m.measureText("m").width,m.measureText("W").width)/h,p=A+w*2,k=w*3,R=Math.ceil(p/r),W=Math.ceil(k/r);p=R*r,k=W*r;var M=-A/2,v=-w*.4,y=Math.ceil((p*Math.abs(Math.sin(n))+k*Math.abs(Math.cos(n)))/r),E=Math.ceil((p*Math.abs(Math.cos(n))+k*Math.abs(Math.sin(n)))/r),z=E*r,q=y*r;g.setAttribute("width",z),g.setAttribute("height",q),m.scale(1/h,1/h),m.translate(z*h/2,q*h/2),m.rotate(-n),m.font=S+" "+(s*h).toString(10)+"px "+t.fontFamily,m.fillStyle="#000",m.textBaseline="middle",m.fillText(e,M*h,(v+s*.5)*h);var V=m.getImageData(0,0,z,q).data;if(et())return!1;for(var dt=[],H=E,X,at,rt,L=[y/2,E/2,y/2,E/2];H--;)for(X=y;X--;){rt=r;t:for(;rt--;)for(at=r;at--;)if(V[((X*r+rt)*z+(H*r+at))*4+3]){dt.push([H,X]),H<L[3]&&(L[3]=H),H>L[1]&&(L[1]=H),X<L[0]&&(L[0]=X),X>L[2]&&(L[2]=X);break t}}return{mu:h,occupied:dt,bounds:L,gw:E,gh:y,fillTextOffsetX:M,fillTextOffsetY:v,fillTextWidth:A,fillTextHeight:w,fontSize:s}},mt=function(e,i,n,u,s){for(var h=s.length;h--;){var S=e+s[h][0],g=i+s[h][1];if(S>=C||g>=b||S<0||g<0){if(!t.drawOutOfBound)return!1;continue}if(!I[S][g])return!1}return!0},wt=function(e,i,n,u,s,h,S,g,m,A){var w=n.fontSize,p;G?p=G(u,s,w,h,S,A):p=t.color;var k;Z?k=Z(u,s,w,A):k=t.fontWeight;var R;K?R=K(u,s,w,A):R=t.classes,o.forEach(function(W){if(W.getContext){var M=W.getContext("2d"),v=n.mu;M.save(),M.scale(1/v,1/v),M.font=k+" "+(w*v).toString(10)+"px "+t.fontFamily,M.fillStyle=p,M.translate((e+n.gw/2)*r*v,(i+n.gh/2)*r*v),g!==0&&M.rotate(-g),M.textBaseline="middle",M.fillText(u,n.fillTextOffsetX*v,(n.fillTextOffsetY+w*.5)*v),M.restore()}else{var y=document.createElement("span"),E="";E="rotate("+-g/Math.PI*180+"deg) ",n.mu!==1&&(E+="translateX(-"+n.fillTextWidth/4+"px) scale("+1/n.mu+")");var z={position:"absolute",display:"block",font:k+" "+w*n.mu+"px "+t.fontFamily,left:(e+n.gw/2)*r+n.fillTextOffsetX+"px",top:(i+n.gh/2)*r+n.fillTextOffsetY+"px",width:n.fillTextWidth+"px",height:n.fillTextHeight+"px",lineHeight:w+"px",whiteSpace:"nowrap",transform:E,webkitTransform:E,msTransform:E,transformOrigin:"50% 40%",webkitTransformOrigin:"50% 40%",msTransformOrigin:"50% 40%"};p&&(z.color=p),y.textContent=u;for(var q in z)y.style[q]=z[q];if(m)for(var V in m)y.setAttribute(V,m[V]);R&&(y.className+=R),W.appendChild(y)}})},pt=function(e,i,n,u,s){if(!(e>=C||i>=b||e<0||i<0)){if(I[e][i]=!1,n){var h=o[0].getContext("2d");h.fillRect(e*r,i*r,T,T)}Q&&(U[e][i]={item:s,dimension:u})}},xt=function(e,i,n,u,s,h){var S=s.occupied,g=t.drawMask,m;g&&(m=o[0].getContext("2d"),m.save(),m.fillStyle=t.maskColor);var A;if(Q){var w=s.bounds;A={x:(e+w[3])*r,y:(i+w[0])*r,w:(w[1]-w[3]+1)*r,h:(w[2]-w[0]+1)*r}}for(var p=S.length;p--;){var k=e+S[p][0],R=i+S[p][1];k>=C||R>=b||k<0||R<0||pt(k,R,g,A,h)}g&&m.restore()},yt=function c(e,i){if(i>20)return null;var n,u,s;Array.isArray(e)?(n=e[0],u=e[1]):(n=e.word,u=e.weight,s=e.attributes);var h=vt(),S=Ot(e),g=gt(n,u,h,S);if(!g||et())return!1;if(!t.drawOutOfBound&&!t.shrinkToFit){var m=g.bounds;if(m[1]-m[3]+1>C||m[2]-m[0]+1>b)return!1}for(var A=F+1,w=function(W){var M=Math.floor(W[0]-g.gw/2),v=Math.floor(W[1]-g.gh/2),y=g.gw,E=g.gh;return mt(M,v,y,E,g.occupied)?(wt(M,v,g,n,u,F-A,W[2],h,s,S),xt(M,v,y,E,g,e),{gx:M,gy:v,rot:h,info:g}):!1};A--;){var p=ct(F-A);t.shuffle&&(p=[].concat(p),zt(p));for(var k=0;k<p.length;k++){var R=w(p[k]);if(R)return R}}return t.shrinkToFit?(Array.isArray(e)?e[1]=e[1]*3/4:e.weight=e.weight*3/4,c(e,i+1)):null},N=function(e,i,n){if(i)return!o.some(function(u){var s=new CustomEvent(e,{detail:n||{}});return!u.dispatchEvent(s)},this);o.forEach(function(u){var s=new CustomEvent(e,{detail:n||{}});u.dispatchEvent(s)},this)},St=function(){var e=o[0];if(e.getContext)C=Math.ceil(e.width/r),b=Math.ceil(e.height/r);else{var i=e.getBoundingClientRect();C=Math.ceil(i.width/r),b=Math.ceil(i.height/r)}if(N("wordcloudstart",!0)){B=t.origin?[t.origin[0]/r,t.origin[1]/r]:[C/2,b/2],F=Math.floor(Math.sqrt(C*C+b*b)),I=[];var n,u,s;if(!e.getContext||t.clearCanvas)for(o.forEach(function(v){if(v.getContext){var y=v.getContext("2d");y.fillStyle=t.backgroundColor,y.clearRect(0,0,C*(r+1),b*(r+1)),y.fillRect(0,0,C*(r+1),b*(r+1))}else v.textContent="",v.style.backgroundColor=t.backgroundColor,v.style.position="relative"}),n=C;n--;)for(I[n]=[],u=b;u--;)I[n][u]=!0;else{var h=document.createElement("canvas").getContext("2d");h.fillStyle=t.backgroundColor,h.fillRect(0,0,1,1);var S=h.getImageData(0,0,1,1).data,g=e.getContext("2d").getImageData(0,0,C*r,b*r).data;n=C;for(var m,A;n--;)for(I[n]=[],u=b;u--;){A=r;t:for(;A--;)for(m=r;m--;)for(s=4;s--;)if(g[((u*r+A)*C*r+(n*r+m))*4+s]!==S[s]){I[n][u]=!1;break t}I[n][u]!==!1&&(I[n][u]=!0)}g=h=S=void 0}if(t.hover||t.click){for(Q=!0,n=C+1;n--;)U[n]=[];t.hover&&e.addEventListener("mousemove",ut),t.click&&(e.addEventListener("click",j),e.addEventListener("touchstart",j),e.addEventListener("touchend",function(v){v.preventDefault()}),e.style.webkitTapHighlightColor="rgba(0, 0, 0, 0)"),e.addEventListener("wordcloudstart",function v(){e.removeEventListener("wordcloudstart",v),e.removeEventListener("mousemove",ut),e.removeEventListener("click",j),$=void 0})}s=0;var w,p,k=!0;t.layoutAnimation?t.wait!==0?(w=window.setTimeout,p=window.clearTimeout):(w=window.setImmediate,p=window.clearImmediate):(w=function(v){v()},p=function(){k=!1});var R=function(y,E){o.forEach(function(z){z.addEventListener(y,E)},this)},W=function(y,E){o.forEach(function(z){z.removeEventListener(y,E)},this)},M=function v(){W("wordcloudstart",v),p(_[l])};R("wordcloudstart",M),_[l]=(t.layoutAnimation?w:setTimeout)(function v(){if(k){if(s>=t.list.length){p(_[l]),N("wordcloudstop",!1),W("wordcloudstart",M),delete _[l];return}O=new Date().getTime();var y=yt(t.list[s],0),E=!N("wordclouddrawn",!0,{item:t.list[s],drawn:y});if(et()||E){p(_[l]),t.abort(),N("wordcloudabort",!1),N("wordcloudstop",!1),W("wordcloudstart",M);return}s++,_[l]=w(v,t.wait)}},t.wait)}};St()};J.isSupported=lt;J.minFontSize=ot;if(!J.isSupported)throw new Error("Sorry your browser not support wordCloud");function Dt(f){for(var o=f.getContext("2d"),a=o.getImageData(0,0,f.width,f.height),l=o.createImageData(a),t=0,x=0,d=0;d<a.data.length;d+=4){var r=a.data[d+3];if(r>128){var T=a.data[d]+a.data[d+1]+a.data[d+2];t+=T,++x}}for(var P=t/x,d=0;d<a.data.length;d+=4){var T=a.data[d]+a.data[d+1]+a.data[d+2],r=a.data[d+3];r<128||T>P?(l.data[d]=0,l.data[d+1]=0,l.data[d+2]=0,l.data[d+3]=0):(l.data[d]=255,l.data[d+1]=255,l.data[d+2]=255,l.data[d+3]=255)}o.putImageData(l,0,0)}Et(function(f,o){f.eachSeriesByType("wordCloud",function(a){var l=bt(a.getBoxLayoutParams(),{width:o.getWidth(),height:o.getHeight()}),t=a.get("keepAspect"),x=a.get("maskImage"),d=x?x.width/x.height:1;t&&Lt(l,d);var r=a.getData(),T=document.createElement("canvas");T.width=l.width,T.height=l.height;var P=T.getContext("2d");if(x)try{P.drawImage(x,0,0,T.width,T.height),Dt(T)}catch(F){console.error("Invalid mask image"),console.error(F.toString())}var D=a.get("sizeRange"),Y=a.get("rotationRange"),I=r.getDataExtent("value"),C=Math.PI/180,b=a.get("gridSize");J(T,{list:r.mapArray("value",function(F,O){var G=r.getItemModel(O);return[r.getName(O),G.get("textStyle.fontSize",!0)||Ft(F,I,D),O]}).sort(function(F,O){return O[1]-F[1]}),fontFamily:a.get("textStyle.fontFamily")||a.get("emphasis.textStyle.fontFamily")||f.get("textStyle.fontFamily"),fontWeight:a.get("textStyle.fontWeight")||a.get("emphasis.textStyle.fontWeight")||f.get("textStyle.fontWeight"),gridSize:b,ellipticity:l.height/l.width,minRotation:Y[0]*C,maxRotation:Y[1]*C,clearCanvas:!x,rotateRatio:1,rotationStep:a.get("rotationStep")*C,drawOutOfBound:a.get("drawOutOfBound"),shrinkToFit:a.get("shrinkToFit"),layoutAnimation:a.get("layoutAnimation"),shuffle:!1,shape:a.get("shape")});function B(F){var O=F.detail.item;F.detail.drawn&&a.layoutInstance.ondraw&&(F.detail.drawn.gx+=l.x/b,F.detail.drawn.gy+=l.y/b,a.layoutInstance.ondraw(O[0],O[1],O[2],F.detail.drawn))}T.addEventListener("wordclouddrawn",B),a.layoutInstance&&a.layoutInstance.dispose(),a.layoutInstance={ondraw:null,dispose:function(){T.removeEventListener("wordclouddrawn",B),T.addEventListener("wordclouddrawn",function(F){F.preventDefault()})}}})});At(function(f){var o=(f||{}).series;!Wt(o)&&(o=o?[o]:[]);var a=["shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];ht(o,function(t){if(t&&t.type==="wordCloud"){var x=t.textStyle||{};l(x.normal),l(x.emphasis)}});function l(t){t&&ht(a,function(x){t.hasOwnProperty(x)&&(t["text"+Pt(x)]=t[x])})}});function Lt(f,o){var a=f.width,l=f.height;a>l*o?(f.x+=(a-l*o)/2,f.width=l*o):(f.y+=(l-a/o)/2,f.height=a/o)}
1
+ import{e as Tt,c as Mt,S as It,a as Ct,b as nt,d as kt,r as Et,g as bt,l as Ft,f as At,h as Pt}from"./vendor-echarts-C9ugTmum.js";import{a2 as Rt,a as Wt,d as ht}from"./vendor-zrender-D8psf1AA.js";Tt({type:"series.wordCloud",visualStyleAccessPath:"textStyle",visualStyleMapper:function(f){return{fill:f.get("color")}},visualDrawType:"fill",optionUpdated:function(){var f=this.option;f.gridSize=Math.max(Math.floor(f.gridSize),4)},getInitialData:function(f,o){var a=Mt(f.data,{coordDimensions:["value"]}),l=new It(a,this);return l.initData(f.data),l},defaultOption:{maskImage:null,shape:"circle",keepAspect:!1,left:"center",top:"center",width:"70%",height:"80%",sizeRange:[12,60],rotationRange:[-90,90],rotationStep:45,gridSize:8,drawOutOfBound:!1,shrinkToFit:!1,textStyle:{fontWeight:"normal"}}});Ct({type:"wordCloud",render:function(f,o,a){var l=this.group;l.removeAll();var t=f.getData(),x=f.get("gridSize");f.layoutInstance.ondraw=function(d,r,T,P){var D=t.getItemModel(T),Y=D.getModel("textStyle"),I=new Rt({style:nt(Y),scaleX:1/P.info.mu,scaleY:1/P.info.mu,x:(P.gx+P.info.gw/2)*x,y:(P.gy+P.info.gh/2)*x,rotation:P.rot});I.setStyle({x:P.info.fillTextOffsetX,y:P.info.fillTextOffsetY+r*.5,text:d,verticalAlign:"middle",fill:t.getItemVisual(T,"style").fill,fontSize:r}),l.add(I),t.setItemGraphicEl(T,I),I.ensureState("emphasis").style=nt(D.getModel(["emphasis","textStyle"]),{state:"emphasis"}),I.ensureState("blur").style=nt(D.getModel(["blur","textStyle"]),{state:"blur"}),kt(I,D.get(["emphasis","focus"]),D.get(["emphasis","blurScope"])),I.stateTransition={duration:f.get("animation")?f.get(["stateAnimation","duration"]):0,easing:f.get(["stateAnimation","easing"])},I.__highDownDispatcher=!0},this._model=f},remove:function(){this.group.removeAll(),this._model.layoutInstance.dispose()},dispose:function(){this._model.layoutInstance.dispose()}});window.setImmediate||(window.setImmediate=(function(){return window.msSetImmediate||window.webkitSetImmediate||window.mozSetImmediate||window.oSetImmediate||(function(){if(!window.postMessage||!window.addEventListener)return null;var a=[void 0],l="zero-timeout-message",t=function(d){var r=a.length;return a.push(d),window.postMessage(l+r.toString(36),"*"),r};return window.addEventListener("message",function(d){if(!(typeof d.data!="string"||d.data.substr(0,l.length)!==l)){d.stopImmediatePropagation();var r=parseInt(d.data.substr(l.length),36);a[r]&&(a[r](),a[r]=void 0)}},!0),window.clearImmediate=function(d){a[d]&&(a[d]=void 0)},t})()||function(a){window.setTimeout(a,0)}})());window.clearImmediate||(window.clearImmediate=(function(){return window.msClearImmediate||window.webkitClearImmediate||window.mozClearImmediate||window.oClearImmediate||function(a){window.clearTimeout(a)}})());var lt=(function(){var o=document.createElement("canvas");if(!o||!o.getContext)return!1;var a=o.getContext("2d");return!(!a||!a.getImageData||!a.fillText||!Array.prototype.some||!Array.prototype.push)})(),ot=(function(){if(lt){for(var o=document.createElement("canvas").getContext("2d"),a=20,l,t;a;){if(o.font=a.toString(10)+"px sans-serif",o.measureText("W").width===l&&o.measureText("m").width===t)return a+1;l=o.measureText("W").width,t=o.measureText("m").width,a--}return 0}})(),Ot=function(f){if(Array.isArray(f)){var o=f.slice();return o.splice(0,2),o}else return[]},zt=function(o){for(var a,l,t=o.length;t;)a=Math.floor(Math.random()*t),l=o[--t],o[t]=o[a],o[a]=l;return o},_={},J=function(o,a){if(!lt)return;var l=Math.floor(Math.random()*Date.now());Array.isArray(o)||(o=[o]),o.forEach(function(c,e){if(typeof c=="string"){if(o[e]=document.getElementById(c),!o[e])throw new Error("The element id specified is not found.")}else if(!c.tagName&&!c.appendChild)throw new Error("You must pass valid HTML elements, or ID of the element.")});var t={list:[],fontFamily:'"Trebuchet MS", "Heiti TC", "微軟正黑體", "Arial Unicode MS", "Droid Fallback Sans", sans-serif',fontWeight:"normal",color:"random-dark",minSize:0,weightFactor:1,clearCanvas:!0,backgroundColor:"#fff",gridSize:8,drawOutOfBound:!1,shrinkToFit:!1,origin:null,drawMask:!1,maskColor:"rgba(255,0,0,0.3)",maskGapWidth:.3,layoutAnimation:!0,wait:0,abortThreshold:0,abort:function(){},minRotation:-Math.PI/2,maxRotation:Math.PI/2,rotationStep:.1,shuffle:!0,rotateRatio:.1,shape:"circle",ellipticity:.65,classes:null,hover:null,click:null};if(a)for(var x in a)x in t&&(t[x]=a[x]);if(typeof t.weightFactor!="function"){var d=t.weightFactor;t.weightFactor=function(e){return e*d}}if(typeof t.shape!="function")switch(t.shape){case"circle":default:t.shape="circle";break;case"cardioid":t.shape=function(e){return 1-Math.sin(e)};break;case"diamond":t.shape=function(e){var i=e%(2*Math.PI/4);return 1/(Math.cos(i)+Math.sin(i))};break;case"square":t.shape=function(e){return Math.min(1/Math.abs(Math.cos(e)),1/Math.abs(Math.sin(e)))};break;case"triangle-forward":t.shape=function(e){var i=e%(2*Math.PI/3);return 1/(Math.cos(i)+Math.sqrt(3)*Math.sin(i))};break;case"triangle":case"triangle-upright":t.shape=function(e){var i=(e+Math.PI*3/2)%(2*Math.PI/3);return 1/(Math.cos(i)+Math.sqrt(3)*Math.sin(i))};break;case"pentagon":t.shape=function(e){var i=(e+.955)%(2*Math.PI/5);return 1/(Math.cos(i)+.726543*Math.sin(i))};break;case"star":t.shape=function(e){var i=(e+.955)%(2*Math.PI/10);return(e+.955)%(2*Math.PI/5)-2*Math.PI/10>=0?1/(Math.cos(2*Math.PI/10-i)+3.07768*Math.sin(2*Math.PI/10-i)):1/(Math.cos(i)+3.07768*Math.sin(i))};break}t.gridSize=Math.max(Math.floor(t.gridSize),4);var r=t.gridSize,T=r-t.maskGapWidth,P=Math.abs(t.maxRotation-t.minRotation),D=Math.min(t.maxRotation,t.minRotation),Y=t.rotationStep,I,C,b,B,F,O,G;function st(c,e){return"hsl("+(Math.random()*360).toFixed()+","+(Math.random()*30+70).toFixed()+"%,"+(Math.random()*(e-c)+c).toFixed()+"%)"}switch(t.color){case"random-dark":G=function(){return st(10,50)};break;case"random-light":G=function(){return st(50,90)};break;default:typeof t.color=="function"&&(G=t.color);break}var Z;typeof t.fontWeight=="function"&&(Z=t.fontWeight);var K=null;typeof t.classes=="function"&&(K=t.classes);var Q=!1,U=[],$,ft=function(e){var i=e.currentTarget,n=i.getBoundingClientRect(),u,s;e.touches?(u=e.touches[0].clientX,s=e.touches[0].clientY):(u=e.clientX,s=e.clientY);var h=u-n.left,S=s-n.top,g=Math.floor(h*(i.width/n.width||1)/r),m=Math.floor(S*(i.height/n.height||1)/r);return U[g]?U[g][m]:null},ut=function(e){var i=ft(e);if($!==i){if($=i,!i){t.hover(void 0,void 0,e);return}t.hover(i.item,i.dimension,e)}},j=function(e){var i=ft(e);i&&(t.click(i.item,i.dimension,e),e.preventDefault())},tt=[],ct=function(e){if(tt[e])return tt[e];var i=e*8,n=i,u=[];for(e===0&&u.push([B[0],B[1],0]);n--;){var s=1;t.shape!=="circle"&&(s=t.shape(n/i*2*Math.PI)),u.push([B[0]+e*s*Math.cos(-n/i*2*Math.PI),B[1]+e*s*Math.sin(-n/i*2*Math.PI)*t.ellipticity,n/i*2*Math.PI])}return tt[e]=u,u},et=function(){return t.abortThreshold>0&&new Date().getTime()-O>t.abortThreshold},vt=function(){return t.rotateRatio===0||Math.random()>t.rotateRatio?0:P===0?D:D+Math.round(Math.random()*P/Y)*Y},gt=function(e,i,n,u){var s=t.weightFactor(i);if(s<=t.minSize)return!1;var h=1;s<ot&&(h=(function(){for(var it=2;it*s<ot;)it+=2;return it})());var S;Z?S=Z(e,i,s,u):S=t.fontWeight;var g=document.createElement("canvas"),m=g.getContext("2d",{willReadFrequently:!0});m.font=S+" "+(s*h).toString(10)+"px "+t.fontFamily;var A=m.measureText(e).width/h,w=Math.max(s*h,m.measureText("m").width,m.measureText("W").width)/h,p=A+w*2,k=w*3,R=Math.ceil(p/r),W=Math.ceil(k/r);p=R*r,k=W*r;var M=-A/2,v=-w*.4,y=Math.ceil((p*Math.abs(Math.sin(n))+k*Math.abs(Math.cos(n)))/r),E=Math.ceil((p*Math.abs(Math.cos(n))+k*Math.abs(Math.sin(n)))/r),z=E*r,q=y*r;g.setAttribute("width",z),g.setAttribute("height",q),m.scale(1/h,1/h),m.translate(z*h/2,q*h/2),m.rotate(-n),m.font=S+" "+(s*h).toString(10)+"px "+t.fontFamily,m.fillStyle="#000",m.textBaseline="middle",m.fillText(e,M*h,(v+s*.5)*h);var V=m.getImageData(0,0,z,q).data;if(et())return!1;for(var dt=[],H=E,X,at,rt,L=[y/2,E/2,y/2,E/2];H--;)for(X=y;X--;){rt=r;t:for(;rt--;)for(at=r;at--;)if(V[((X*r+rt)*z+(H*r+at))*4+3]){dt.push([H,X]),H<L[3]&&(L[3]=H),H>L[1]&&(L[1]=H),X<L[0]&&(L[0]=X),X>L[2]&&(L[2]=X);break t}}return{mu:h,occupied:dt,bounds:L,gw:E,gh:y,fillTextOffsetX:M,fillTextOffsetY:v,fillTextWidth:A,fillTextHeight:w,fontSize:s}},mt=function(e,i,n,u,s){for(var h=s.length;h--;){var S=e+s[h][0],g=i+s[h][1];if(S>=C||g>=b||S<0||g<0){if(!t.drawOutOfBound)return!1;continue}if(!I[S][g])return!1}return!0},wt=function(e,i,n,u,s,h,S,g,m,A){var w=n.fontSize,p;G?p=G(u,s,w,h,S,A):p=t.color;var k;Z?k=Z(u,s,w,A):k=t.fontWeight;var R;K?R=K(u,s,w,A):R=t.classes,o.forEach(function(W){if(W.getContext){var M=W.getContext("2d"),v=n.mu;M.save(),M.scale(1/v,1/v),M.font=k+" "+(w*v).toString(10)+"px "+t.fontFamily,M.fillStyle=p,M.translate((e+n.gw/2)*r*v,(i+n.gh/2)*r*v),g!==0&&M.rotate(-g),M.textBaseline="middle",M.fillText(u,n.fillTextOffsetX*v,(n.fillTextOffsetY+w*.5)*v),M.restore()}else{var y=document.createElement("span"),E="";E="rotate("+-g/Math.PI*180+"deg) ",n.mu!==1&&(E+="translateX(-"+n.fillTextWidth/4+"px) scale("+1/n.mu+")");var z={position:"absolute",display:"block",font:k+" "+w*n.mu+"px "+t.fontFamily,left:(e+n.gw/2)*r+n.fillTextOffsetX+"px",top:(i+n.gh/2)*r+n.fillTextOffsetY+"px",width:n.fillTextWidth+"px",height:n.fillTextHeight+"px",lineHeight:w+"px",whiteSpace:"nowrap",transform:E,webkitTransform:E,msTransform:E,transformOrigin:"50% 40%",webkitTransformOrigin:"50% 40%",msTransformOrigin:"50% 40%"};p&&(z.color=p),y.textContent=u;for(var q in z)y.style[q]=z[q];if(m)for(var V in m)y.setAttribute(V,m[V]);R&&(y.className+=R),W.appendChild(y)}})},pt=function(e,i,n,u,s){if(!(e>=C||i>=b||e<0||i<0)){if(I[e][i]=!1,n){var h=o[0].getContext("2d");h.fillRect(e*r,i*r,T,T)}Q&&(U[e][i]={item:s,dimension:u})}},xt=function(e,i,n,u,s,h){var S=s.occupied,g=t.drawMask,m;g&&(m=o[0].getContext("2d"),m.save(),m.fillStyle=t.maskColor);var A;if(Q){var w=s.bounds;A={x:(e+w[3])*r,y:(i+w[0])*r,w:(w[1]-w[3]+1)*r,h:(w[2]-w[0]+1)*r}}for(var p=S.length;p--;){var k=e+S[p][0],R=i+S[p][1];k>=C||R>=b||k<0||R<0||pt(k,R,g,A,h)}g&&m.restore()},yt=function c(e,i){if(i>20)return null;var n,u,s;Array.isArray(e)?(n=e[0],u=e[1]):(n=e.word,u=e.weight,s=e.attributes);var h=vt(),S=Ot(e),g=gt(n,u,h,S);if(!g||et())return!1;if(!t.drawOutOfBound&&!t.shrinkToFit){var m=g.bounds;if(m[1]-m[3]+1>C||m[2]-m[0]+1>b)return!1}for(var A=F+1,w=function(W){var M=Math.floor(W[0]-g.gw/2),v=Math.floor(W[1]-g.gh/2),y=g.gw,E=g.gh;return mt(M,v,y,E,g.occupied)?(wt(M,v,g,n,u,F-A,W[2],h,s,S),xt(M,v,y,E,g,e),{gx:M,gy:v,rot:h,info:g}):!1};A--;){var p=ct(F-A);t.shuffle&&(p=[].concat(p),zt(p));for(var k=0;k<p.length;k++){var R=w(p[k]);if(R)return R}}return t.shrinkToFit?(Array.isArray(e)?e[1]=e[1]*3/4:e.weight=e.weight*3/4,c(e,i+1)):null},N=function(e,i,n){if(i)return!o.some(function(u){var s=new CustomEvent(e,{detail:n||{}});return!u.dispatchEvent(s)},this);o.forEach(function(u){var s=new CustomEvent(e,{detail:n||{}});u.dispatchEvent(s)},this)},St=function(){var e=o[0];if(e.getContext)C=Math.ceil(e.width/r),b=Math.ceil(e.height/r);else{var i=e.getBoundingClientRect();C=Math.ceil(i.width/r),b=Math.ceil(i.height/r)}if(N("wordcloudstart",!0)){B=t.origin?[t.origin[0]/r,t.origin[1]/r]:[C/2,b/2],F=Math.floor(Math.sqrt(C*C+b*b)),I=[];var n,u,s;if(!e.getContext||t.clearCanvas)for(o.forEach(function(v){if(v.getContext){var y=v.getContext("2d");y.fillStyle=t.backgroundColor,y.clearRect(0,0,C*(r+1),b*(r+1)),y.fillRect(0,0,C*(r+1),b*(r+1))}else v.textContent="",v.style.backgroundColor=t.backgroundColor,v.style.position="relative"}),n=C;n--;)for(I[n]=[],u=b;u--;)I[n][u]=!0;else{var h=document.createElement("canvas").getContext("2d");h.fillStyle=t.backgroundColor,h.fillRect(0,0,1,1);var S=h.getImageData(0,0,1,1).data,g=e.getContext("2d").getImageData(0,0,C*r,b*r).data;n=C;for(var m,A;n--;)for(I[n]=[],u=b;u--;){A=r;t:for(;A--;)for(m=r;m--;)for(s=4;s--;)if(g[((u*r+A)*C*r+(n*r+m))*4+s]!==S[s]){I[n][u]=!1;break t}I[n][u]!==!1&&(I[n][u]=!0)}g=h=S=void 0}if(t.hover||t.click){for(Q=!0,n=C+1;n--;)U[n]=[];t.hover&&e.addEventListener("mousemove",ut),t.click&&(e.addEventListener("click",j),e.addEventListener("touchstart",j),e.addEventListener("touchend",function(v){v.preventDefault()}),e.style.webkitTapHighlightColor="rgba(0, 0, 0, 0)"),e.addEventListener("wordcloudstart",function v(){e.removeEventListener("wordcloudstart",v),e.removeEventListener("mousemove",ut),e.removeEventListener("click",j),$=void 0})}s=0;var w,p,k=!0;t.layoutAnimation?t.wait!==0?(w=window.setTimeout,p=window.clearTimeout):(w=window.setImmediate,p=window.clearImmediate):(w=function(v){v()},p=function(){k=!1});var R=function(y,E){o.forEach(function(z){z.addEventListener(y,E)},this)},W=function(y,E){o.forEach(function(z){z.removeEventListener(y,E)},this)},M=function v(){W("wordcloudstart",v),p(_[l])};R("wordcloudstart",M),_[l]=(t.layoutAnimation?w:setTimeout)(function v(){if(k){if(s>=t.list.length){p(_[l]),N("wordcloudstop",!1),W("wordcloudstart",M),delete _[l];return}O=new Date().getTime();var y=yt(t.list[s],0),E=!N("wordclouddrawn",!0,{item:t.list[s],drawn:y});if(et()||E){p(_[l]),t.abort(),N("wordcloudabort",!1),N("wordcloudstop",!1),W("wordcloudstart",M);return}s++,_[l]=w(v,t.wait)}},t.wait)}};St()};J.isSupported=lt;J.minFontSize=ot;if(!J.isSupported)throw new Error("Sorry your browser not support wordCloud");function Dt(f){for(var o=f.getContext("2d"),a=o.getImageData(0,0,f.width,f.height),l=o.createImageData(a),t=0,x=0,d=0;d<a.data.length;d+=4){var r=a.data[d+3];if(r>128){var T=a.data[d]+a.data[d+1]+a.data[d+2];t+=T,++x}}for(var P=t/x,d=0;d<a.data.length;d+=4){var T=a.data[d]+a.data[d+1]+a.data[d+2],r=a.data[d+3];r<128||T>P?(l.data[d]=0,l.data[d+1]=0,l.data[d+2]=0,l.data[d+3]=0):(l.data[d]=255,l.data[d+1]=255,l.data[d+2]=255,l.data[d+3]=255)}o.putImageData(l,0,0)}Et(function(f,o){f.eachSeriesByType("wordCloud",function(a){var l=bt(a.getBoxLayoutParams(),{width:o.getWidth(),height:o.getHeight()}),t=a.get("keepAspect"),x=a.get("maskImage"),d=x?x.width/x.height:1;t&&Lt(l,d);var r=a.getData(),T=document.createElement("canvas");T.width=l.width,T.height=l.height;var P=T.getContext("2d");if(x)try{P.drawImage(x,0,0,T.width,T.height),Dt(T)}catch(F){console.error("Invalid mask image"),console.error(F.toString())}var D=a.get("sizeRange"),Y=a.get("rotationRange"),I=r.getDataExtent("value"),C=Math.PI/180,b=a.get("gridSize");J(T,{list:r.mapArray("value",function(F,O){var G=r.getItemModel(O);return[r.getName(O),G.get("textStyle.fontSize",!0)||Ft(F,I,D),O]}).sort(function(F,O){return O[1]-F[1]}),fontFamily:a.get("textStyle.fontFamily")||a.get("emphasis.textStyle.fontFamily")||f.get("textStyle.fontFamily"),fontWeight:a.get("textStyle.fontWeight")||a.get("emphasis.textStyle.fontWeight")||f.get("textStyle.fontWeight"),gridSize:b,ellipticity:l.height/l.width,minRotation:Y[0]*C,maxRotation:Y[1]*C,clearCanvas:!x,rotateRatio:1,rotationStep:a.get("rotationStep")*C,drawOutOfBound:a.get("drawOutOfBound"),shrinkToFit:a.get("shrinkToFit"),layoutAnimation:a.get("layoutAnimation"),shuffle:!1,shape:a.get("shape")});function B(F){var O=F.detail.item;F.detail.drawn&&a.layoutInstance.ondraw&&(F.detail.drawn.gx+=l.x/b,F.detail.drawn.gy+=l.y/b,a.layoutInstance.ondraw(O[0],O[1],O[2],F.detail.drawn))}T.addEventListener("wordclouddrawn",B),a.layoutInstance&&a.layoutInstance.dispose(),a.layoutInstance={ondraw:null,dispose:function(){T.removeEventListener("wordclouddrawn",B),T.addEventListener("wordclouddrawn",function(F){F.preventDefault()})}}})});At(function(f){var o=(f||{}).series;!Wt(o)&&(o=o?[o]:[]);var a=["shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];ht(o,function(t){if(t&&t.type==="wordCloud"){var x=t.textStyle||{};l(x.normal),l(x.emphasis)}});function l(t){t&&ht(a,function(x){t.hasOwnProperty(x)&&(t["text"+Pt(x)]=t[x])})}});function Lt(f,o){var a=f.width,l=f.height;a>l*o?(f.x+=(a-l*o)/2,f.width=l*o):(f.y+=(l-a/o)/2,f.height=a/o)}