@sme.up/ketchup 6.0.0 → 6.2.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.
- package/dist/cjs/{cell-utils-a78d6fac.js → cell-utils-fe64a28c.js} +2 -2
- package/dist/cjs/{f-button-ac179257.js → f-button-5b69d882.js} +4 -4
- package/dist/cjs/f-cell-3a740c48.js +418 -0
- package/dist/cjs/f-checkbox-57443ca3.js +29 -0
- package/dist/cjs/{f-chip-b00897d7.js → f-chip-02e83f82.js} +3 -3
- package/dist/cjs/{f-image-89f25556.js → f-image-2a61ece2.js} +2 -2
- package/dist/cjs/{f-paginator-utils-8fa501b3.js → f-paginator-utils-09126bdd.js} +5 -5
- package/dist/cjs/{f-text-field-e1e45ade.js → f-text-field-9ee20a67.js} +3 -3
- package/dist/cjs/{index-eb556444.js → index-06b131ea.js} +6 -4
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
- package/dist/cjs/kup-autocomplete_25.cjs.entry.js +209 -193
- package/dist/cjs/kup-box.cjs.entry.js +1306 -0
- package/dist/cjs/kup-calendar.cjs.entry.js +7 -7
- package/dist/cjs/kup-cell.cjs.entry.js +10 -9
- package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
- package/dist/cjs/kup-dash_2.cjs.entry.js +4 -7
- package/dist/cjs/{kup-form-editor.cjs.entry.js → kup-dashboard.cjs.entry.js} +123 -148
- package/dist/cjs/kup-drawer.cjs.entry.js +4 -4
- package/dist/cjs/{kup-box_2.cjs.entry.js → kup-echart.cjs.entry.js} +53 -1338
- package/dist/cjs/kup-family-tree.cjs.entry.js +410 -0
- package/dist/cjs/kup-form.cjs.entry.js +480 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
- package/dist/cjs/kup-image-list.cjs.entry.js +73 -11
- package/dist/cjs/kup-lazy.cjs.entry.js +4 -4
- package/dist/cjs/kup-magic-box.cjs.entry.js +4 -4
- package/dist/cjs/{kup-manager-7a941909.js → kup-manager-02acbb37.js} +407 -7
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
- package/dist/cjs/kup-photo-frame.cjs.entry.js +5 -5
- package/dist/cjs/kup-probe.cjs.entry.js +2 -2
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +5 -5
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{utils-6287d878.js → utils-4b208b48.js} +1 -1
- package/dist/collection/assets/dashboard.js +113 -0
- package/dist/collection/assets/data-table.js +15 -0
- package/dist/collection/assets/family-tree.js +2437 -0
- package/dist/collection/assets/form.js +433 -0
- package/dist/collection/assets/grid.js +17 -0
- package/dist/collection/assets/index.js +14 -6
- package/dist/collection/collection-manifest.json +4 -3
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +135 -129
- package/dist/collection/components/kup-box/kup-box.js +13 -2
- package/dist/collection/components/kup-button/kup-button.js +1 -0
- package/dist/collection/components/kup-combobox/kup-combobox.js +16 -13
- package/dist/collection/components/kup-dashboard/kup-dashboard-declarations.js +10 -0
- package/dist/collection/components/{kup-form-editor/kup-form-editor.css → kup-dashboard/kup-dashboard.css} +7 -6
- package/dist/collection/components/{kup-form-editor/kup-form-editor.js → kup-dashboard/kup-dashboard.js} +148 -149
- package/dist/collection/components/kup-data-table/kup-data-table.js +7 -6
- package/dist/collection/components/kup-drawer/kup-drawer.css +5 -8
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +1 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +12 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree.css +101 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +666 -0
- package/dist/collection/components/kup-form/kup-form-declarations.js +25 -0
- package/dist/collection/components/kup-form/kup-form.css +99 -0
- package/dist/collection/components/kup-form/kup-form.js +647 -0
- package/dist/collection/components/kup-grid/kup-grid.js +1 -4
- package/dist/collection/components/kup-image-list/kup-image-list-state.js +9 -0
- package/dist/collection/components/kup-image-list/kup-image-list.css +0 -6
- package/dist/collection/components/kup-image-list/kup-image-list.js +113 -1
- package/dist/collection/components/kup-lazy/kup-lazy.css +13 -6
- package/dist/collection/components/kup-list/kup-list-helper.js +9 -3
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +13 -3
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +1 -1
- package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +3 -0
- package/dist/collection/components/kup-text-field/kup-text-field.js +27 -0
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +0 -6
- package/dist/collection/components/kup-tree/kup-tree.js +10 -4
- package/dist/collection/f-components/f-button/f-button.js +2 -2
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +5 -1
- package/dist/collection/f-components/f-cell/f-cell.js +34 -114
- package/dist/collection/f-components/f-text-field/f-text-field.js +1 -1
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +69 -0
- package/dist/collection/managers/kup-data/kup-data.js +109 -1
- package/dist/collection/managers/kup-language/kup-language-declarations.js +11 -0
- package/dist/collection/managers/kup-objects/kup-objects.js +10 -0
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +20 -3
- package/dist/collection/types/GenericTypes.js +3 -2
- package/dist/esm/{cell-utils-964da6b5.js → cell-utils-cb5d4149.js} +2 -2
- package/dist/esm/{f-button-871a544b.js → f-button-fd44ef70.js} +4 -4
- package/dist/esm/{f-cell-521ef17a.js → f-cell-7b159a22.js} +48 -283
- package/dist/esm/f-checkbox-c51c4a75.js +27 -0
- package/dist/esm/{f-chip-1dda722f.js → f-chip-c2e4c522.js} +3 -3
- package/dist/esm/{f-image-c468d8ae.js → f-image-2ab4b9aa.js} +2 -2
- package/dist/esm/{f-paginator-utils-7dff8ff0.js → f-paginator-utils-ef537d82.js} +5 -5
- package/dist/esm/{f-text-field-d6c61c73.js → f-text-field-41c575eb.js} +3 -3
- package/dist/esm/{index-baeab1ac.js → index-ad6ab214.js} +6 -4
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +4 -4
- package/dist/esm/kup-autocomplete_25.entry.js +199 -183
- package/dist/esm/kup-box.entry.js +1302 -0
- package/dist/esm/kup-calendar.entry.js +7 -7
- package/dist/esm/kup-cell.entry.js +9 -8
- package/dist/esm/kup-dash-list.entry.js +4 -4
- package/dist/esm/kup-dash_2.entry.js +4 -7
- package/dist/esm/{kup-form-editor.entry.js → kup-dashboard.entry.js} +123 -148
- package/dist/esm/kup-drawer.entry.js +4 -4
- package/dist/esm/{kup-box_2.entry.js → kup-echart.entry.js} +54 -1338
- package/dist/esm/kup-family-tree.entry.js +406 -0
- package/dist/esm/kup-form.entry.js +476 -0
- package/dist/esm/kup-iframe.entry.js +3 -3
- package/dist/esm/kup-image-list.entry.js +72 -10
- package/dist/esm/kup-lazy.entry.js +4 -4
- package/dist/esm/kup-magic-box.entry.js +4 -4
- package/dist/esm/{kup-manager-58b075b4.js → kup-manager-22a475e6.js} +404 -8
- package/dist/esm/kup-nav-bar.entry.js +3 -3
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-photo-frame.entry.js +5 -5
- package/dist/esm/kup-probe.entry.js +2 -2
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +5 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-d7e4b3c2.js → utils-2c1f4122.js} +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-06c6cc68.js +1 -0
- package/dist/ketchup/{p-3c11e615.entry.js → p-0dacd4bc.entry.js} +1 -1
- package/dist/ketchup/{p-fac1a08b.entry.js → p-1959f835.entry.js} +1 -1
- package/dist/ketchup/p-1c44dc62.entry.js +1 -0
- package/dist/ketchup/{p-f09f2f98.entry.js → p-264b1b19.entry.js} +1 -1
- package/dist/ketchup/p-38d7584e.js +1 -0
- package/dist/ketchup/{p-f71a1675.entry.js → p-42080355.entry.js} +1 -1
- package/dist/ketchup/p-4bc9f98b.entry.js +1 -0
- package/dist/ketchup/p-578583db.entry.js +1 -0
- package/dist/ketchup/p-5866d507.entry.js +1 -0
- package/dist/ketchup/p-61059e9d.entry.js +9 -0
- package/dist/ketchup/{p-a615a92b.entry.js → p-664be494.entry.js} +1 -1
- package/dist/ketchup/{p-d2ee56dd.entry.js → p-67cd575d.entry.js} +1 -1
- package/dist/ketchup/{p-e0035c58.js → p-682a367a.js} +1 -1
- package/dist/ketchup/p-6ccf7eb2.entry.js +1 -0
- package/dist/ketchup/p-7230ab97.entry.js +1 -0
- package/dist/ketchup/p-752b4cef.entry.js +1 -0
- package/dist/ketchup/{p-954cc340.entry.js → p-7de3e7ac.entry.js} +1 -1
- package/dist/ketchup/p-928c5c36.js +1 -0
- package/dist/ketchup/{p-6dff70f8.entry.js → p-9b36497d.entry.js} +1 -1
- package/dist/ketchup/{p-99e0d768.entry.js → p-b982d137.entry.js} +1 -1
- package/dist/ketchup/{p-8cdf61a4.js → p-c0219e5e.js} +1 -1
- package/dist/ketchup/p-c55fd0a7.entry.js +1 -0
- package/dist/ketchup/p-cd5cfa7c.js +1 -0
- package/dist/ketchup/p-d154b3a0.entry.js +1 -0
- package/dist/ketchup/p-d2affb6f.entry.js +27 -0
- package/dist/ketchup/p-d3b542b3.js +2 -0
- package/dist/ketchup/{p-7454cb92.js → p-d6c12c6c.js} +1 -1
- package/dist/ketchup/p-da0eab60.entry.js +1 -0
- package/dist/ketchup/{p-7eff4eee.js → p-dc62a30f.js} +1 -1
- package/dist/ketchup/p-e9366aaf.entry.js +39 -0
- package/dist/ketchup/{p-44ec4f03.js → p-edae3076.js} +1 -1
- package/dist/ketchup/p-fc2b1229.js +30 -0
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +1 -16
- package/dist/types/components/{kup-form-editor/kup-form-editor-declarations.d.ts → kup-dashboard/kup-dashboard-declarations.d.ts} +9 -27
- package/dist/types/components/{kup-form-editor/kup-form-editor.d.ts → kup-dashboard/kup-dashboard.d.ts} +12 -9
- package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +33 -0
- package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +61 -0
- package/dist/types/components/kup-form/kup-form-declarations.d.ts +60 -0
- package/dist/types/components/kup-form/kup-form.d.ts +63 -0
- package/dist/types/components/kup-image-list/kup-image-list-state.d.ts +6 -0
- package/dist/types/components/kup-image-list/kup-image-list.d.ts +17 -0
- package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +3 -0
- package/dist/types/components/kup-text-field/kup-text-field.d.ts +5 -0
- package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +0 -6
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +2 -0
- package/dist/types/components.d.ts +460 -241
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +4 -1
- package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +1 -0
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +8 -0
- package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +15 -1
- package/dist/types/managers/kup-data/kup-data.d.ts +7 -1
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +11 -1
- package/dist/types/managers/kup-objects/kup-objects.d.ts +6 -0
- package/dist/types/types/GenericTypes.d.ts +3 -2
- package/package.json +2 -2
- package/dist/cjs/f-cell-69294bca.js +0 -653
- package/dist/cjs/kup-field.cjs.entry.js +0 -241
- package/dist/collection/assets/form-editor.js +0 -338
- package/dist/collection/components/kup-field/kup-field-declarations.js +0 -15
- package/dist/collection/components/kup-field/kup-field.css +0 -48
- package/dist/collection/components/kup-field/kup-field.js +0 -514
- package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +0 -23
- package/dist/esm/kup-field.entry.js +0 -237
- package/dist/ketchup/p-1ae66cc5.js +0 -1
- package/dist/ketchup/p-34b74425.js +0 -1
- package/dist/ketchup/p-4ffbc3ff.js +0 -1
- package/dist/ketchup/p-5264a3e6.entry.js +0 -1
- package/dist/ketchup/p-65974e48.entry.js +0 -1
- package/dist/ketchup/p-65b46587.entry.js +0 -40
- package/dist/ketchup/p-80968627.entry.js +0 -1
- package/dist/ketchup/p-a0f6e25c.entry.js +0 -1
- package/dist/ketchup/p-aca0e54b.js +0 -30
- package/dist/ketchup/p-b8939a8b.entry.js +0 -1
- package/dist/ketchup/p-bfc3bac7.js +0 -1
- package/dist/ketchup/p-c5ce8951.entry.js +0 -1
- package/dist/ketchup/p-cad1e097.entry.js +0 -9
- package/dist/ketchup/p-db71436b.entry.js +0 -27
- package/dist/ketchup/p-e1039cf2.entry.js +0 -1
- package/dist/ketchup/p-ea10176c.entry.js +0 -1
- package/dist/types/components/kup-field/kup-field-declarations.d.ts +0 -25
- package/dist/types/components/kup-field/kup-field.d.ts +0 -90
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import{r as t,c as n,f as i,h as r,H as e,g as o,a}from"./p-34b74425.js";import{k as s,h as u,a as l,c as h,y as f,B as c,C as v,D as d,v as p,J as m,b as y,j as g}from"./p-aca0e54b.js";import{g as b}from"./p-7454cb92.js";import{f as w,p as x,s as M,h as S,r as k,k as A,e as N}from"./p-8cdf61a4.js";import{i as C,g as T,s as z}from"./p-e0035c58.js";import{F as I}from"./p-bfc3bac7.js";import{a as L}from"./p-7eff4eee.js";import{c as O}from"./p-97e8ea42.js";import{b as D}from"./p-4ffbc3ff.js";import"./p-1ae66cc5.js";import"./p-6c77a36c.js";import"./p-44ec4f03.js";var R;!function(t){t.cardData="Data of the card linked to the box when the latter's layout must be a premade template.",t.columns="Number of columns.",t.customStyle="Custom style of the component.",t.data="Actual data of the box.",t.dragEnabled="Enable dragging.",t.dropEnabled="Enable dropping.",t.dropOnSection="Drop can be done in section.",t.enableRowActions="If enabled, a button to load / display the row actions will be displayed on the right of every box.",t.globalFilter="When set to true it activates the global filter.",t.globalFilterValue="The value of the global filter.",t.kanban="Displays the boxlist as a Kanban.",t.layout="How the field will be displayed. If not present, a default one will be created.",t.multiSelection="Enable multi selection.",t.pageSelected="Current page number.",t.pageSize="Number of boxes per page.",t.pagination="Enables pagination.",t.rowsPerPage="Number of current rows per page.",t.scrollOnHover="Activates the scroll on hover function.",t.selectBox="Automatically selects the box at the specified index.",t.selectedRowsState="Multiple selection.",t.showSelection="If enabled, highlights the selected box/boxes.",t.sortBy="If sorting is enabled, specifies which column to sort.",t.sortEnabled="Enable sorting.",t.stateId="",t.store="",t.swipeDisabled="Disable swipe."}(R||(R={}));class _{constructor(){this.globalFilterValue="",this.sortBy="",this.selectedRowsState="",this.pageSelected=1,this.rowsPerPage=0,this.load=!1}toDebugString(){return"box state"}}const B=class{constructor(i){t(this,i),this.kupBoxClick=n(this,"kup-box-click",6),this.kupBoxSelected=n(this,"kup-box-selected",6),this.kupAutoBoxSelect=n(this,"kup-box-autoselect",6),this.kupRowActionMenuClick=n(this,"kup-box-rowactionmenuclick",6),this.kupRowActionClick=n(this,"kup-box-rowactionclick",6),this.kupDidLoad=n(this,"kup-box-didload",6),this.kupDidUnload=n(this,"kup-box-didunload",6),this.kupBoxContextMenu=n(this,"kup-box-contextmenu",6),this.collapsedSection={},this.selectedRows=[],this.currentPage=1,this.currentRowsPerPage=10,this.state=new _,this.cardData=null,this.columns=1,this.customStyle="",this.data=null,this.dragEnabled=!1,this.dropEnabled=!1,this.dropOnSection=!1,this.editableData=!1,this.enableRowActions=!1,this.globalFilter=!1,this.globalFilterValue="",this.kanban=null,this.multiSelection=!1,this.pageSelected=1,this.pageSize=10,this.pagination=!1,this.scrollOnHover=!1,this.showSelection=!0,this.sortEnabled=!1,this.stateId="",this.swipeDisabled=!1,this.kupManager=s(),this.visibleColumns=[],this.rows=[],this.filteredRows=[],this.sectionRef=null,this.rowsRefs=[],this.hold=!1,this.interactableDrag=[],this.interactableDrop=[],this.interactableTouch=[]}initWithPersistedState(){if(this.store&&this.stateId){const t=this.store.getState(this.stateId);null!=t&&(this.kupManager.debug.logMessage(this,"Initialize with state for stateId "+this.stateId+": "+t),this.sortBy=this.state.sortBy,this.globalFilterValue=this.state.globalFilterValue,this.selectedRowsState=this.state.selectedRowsState,this.pageSelected=this.state.pageSelected,this.rowsPerPage=this.state.rowsPerPage)}}persistState(){if(this.store&&this.stateId){let t=!1;this.kupManager.objects.deepEqual(this.state.sortBy,this.sortBy)||(this.state.sortBy=this.sortBy,t=!0),this.kupManager.objects.deepEqual(this.state.globalFilterValue,this.globalFilterValue)||(this.state.globalFilterValue=this.globalFilterValue,t=!0),this.kupManager.objects.deepEqual(this.state.pageSelected,this.currentPage)||(this.state.pageSelected=this.currentPage,t=!0),this.kupManager.objects.deepEqual(this.state.rowsPerPage,this.currentRowsPerPage)||(this.state.rowsPerPage=this.currentRowsPerPage,t=!0);const n=this.selectedRows.reduce(((t,n,i)=>t+(i>0?";":"")+n.id),"");if(this.kupManager.objects.deepEqual(this.state.selectedRowsState,n)||(this.state.selectedRowsState=n,t=!0),!this.state.load)return void(this.state.load=!0);t&&(this.kupManager.debug.logMessage(this,"Persisting state for stateId "+this.stateId+": "+this.state),this.store.persistState(this.stateId,this.state))}}rowsPerPageHandler(t){this.currentRowsPerPage=t}recalculateRows(){this.initRows()}onDataChanged(){C(this.getRows()),this.initVisibleColumns(),this.initRows(),this.checkLayout()}onLayoutChanged(){this.checkLayout()}onSelectBoxChanged(){this.handleAutomaticBoxSelection()}async getProps(t){return T(this,R,t)}async loadRowActions(t,n){t.actions=n,this.rowActionMenuOpened=t}async refresh(){i(this)}async setProps(t){z(this,R,t)}getColumns(){return this.data&&this.data.columns?this.data.columns:[{title:"",name:"",size:void 0}]}initVisibleColumns(){this.visibleColumns=this.getColumns().filter((t=>!t.hasOwnProperty("visible")||t.visible))}getRows(){return this.data&&this.data.rows?this.data.rows:[]}initRows(){this.filteredRows=this.getRows(),this.globalFilter&&this.globalFilterValue&&(this.filteredRows=w(this.filteredRows,null,this.globalFilterValue,this.visibleColumns)),this.rows=this.sortRows(this.filteredRows),this.pagination&&(this.rows=x(this.rows,this.currentPage,this.currentRowsPerPage,!1))}sortRows(t){let n=t;return this.sortBy&&(n=M(n,[{column:this.sortBy,sortMode:m.A}])),n}checkScrollOnHover(){this.kupManager.scrollOnHover.isRegistered(this.boxContainer)?this.scrollOnHover||this.kupManager.scrollOnHover.unregister(this.boxContainer):this.scrollOnHover&&this.kupManager.scrollOnHover.register(this.boxContainer)}checkLayout(){if(this.layout)return void(this.boxLayout=this.layout);const t={horizontal:!1,sections:[]},n=this.visibleColumns;let i=n.length,r=[],e=0;for(;i-- >0;)r.push({column:n[e++].name});t.content=r,this.boxLayout={sections:[t]}}onSortChange(t){let n=b(this.visibleColumns,t.detail.value);this.sortBy=n.name}onGlobalFilterChange({detail:t}){let n="";t&&t.value&&(n=t.value),this.globalFilterValue=n}isSectionExpanded(t,n){return!(!t.id||!n.id)&&this.collapsedSection[n.id]&&this.collapsedSection[n.id][t.id]}handleAutomaticBoxSelection(){if(this.selectBox&&this.selectBox>0&&this.selectBox<=this.data.rows.length){this.selectedRows=[];for(let t of this.data.rows)if(t.id===(this.selectBox-1).toString()){this.selectedRows.push(t);break}this.kupAutoBoxSelect.emit({comp:this,id:this.rootElement.id,row:this.selectedRows[0]})}}getEventDetails(t,n){let i=null,r=null,e=null,o=null;return t&&(i=t.closest(".box-object")||t.querySelector(".box-object")),i&&(r=i["data-cell"],e=i["data-row"],o=b(this.visibleColumns,i.dataset.column)),{boxObject:i||null,column:o||null,cell:r||null,originalEvent:n,row:e||null}}contextMenuHandler(t){return this.getEventDetails(t.target,t)}checkIfElementIsActionMenuIcon(t){return!(!t.tagName||!t.parentElement)&&"svg"===t.tagName&&t.parentElement.classList.contains("row-actions-toggler")}onBoxClick({target:t},n){if(!(t instanceof HTMLElement))return;let i=t,r=i.classList;for(;!r.contains("box-object")&&!r.contains("box-section")&&!r.contains("box")&&(i=i.parentElement,null!==i);)r=i.classList;let e=null;r.contains("box-object")&&(e=i.dataset.column),this.kupBoxClick.emit({comp:this,id:this.rootElement.id,row:n,column:e}),this.multiSelection?this.onSelectionCheckChange(n):this.selectedRows=[n]}onSelectionCheckChange(t){var n=-1;for(let i=0;i<this.selectedRows.length;i++)if(this.selectedRows[i].id===t.id){n=i;break}n>=0?(this.selectedRows.splice(n,1),this.selectedRows=[...this.selectedRows]):this.selectedRows=[...this.selectedRows,t],this.kupBoxSelected.emit({comp:this,id:this.rootElement.id,rows:this.selectedRows})}toggleSectionExpand(t,n){if(n.id)if(t.id){if(this.collapsedSection[n.id]){const i=this.collapsedSection[n.id];i[t.id]=!i[t.id]||!i[t.id]}else this.collapsedSection[n.id]={},this.collapsedSection[n.id][t.id]=!0;this.collapsedSection=Object.assign({},this.collapsedSection)}else console.error("cannot expand / collapse a section of a row without ad id");else console.error("cannot expand / collapse a section withoun an ID")}onRowAction(t){t&&(t!==this.rowActionMenuOpened?t.actions?this.rowActionMenuOpened=t:this.kupRowActionMenuClick.emit({comp:this,id:this.rootElement.id,row:t}):this.rowActionMenuOpened=null)}onRowActionClick(t,n,i){this.kupRowActionClick.emit({comp:this,id:this.rootElement.id,row:t,action:n,index:i})}clickFunction(t){try{const n=t.composedPath();for(let t of n)if(this.checkIfElementIsActionMenuIcon(t))return}catch(n){if(this.checkIfElementIsActionMenuIcon(t.target))return}this.rowActionMenuOpened=null}handlePageChange(t){const n=S(t,this.filteredRows.length,this.currentRowsPerPage);n&&(this.currentPage=n)}handleRowsPerPageChange(t){const n=k(t,this.filteredRows.length);n&&(this.currentRowsPerPage=n,this.adjustPaginator())}adjustPaginator(){const t=Math.ceil(this.rows.length/this.currentRowsPerPage);this.currentPage>t&&(this.currentPage=1)}renderSectionAsCard(t){let n=!1,i={button:[],image:[],progressbar:[],text:[]};for(var e in t.cells)if(t.cells.hasOwnProperty(e)&&void 0!==(o=t.cells[e]).cardID)switch(o.obj.p){case"BTN":do{i.button.push({})}while(i.button.length<o.cardID);i.button[o.cardID]={label:o.value};break;case"IMG":do{i.image.push({})}while(i.image.length<o.cardID);i.image[o.cardID]={resource:o.value};break;case"PGB":do{i.progressbar.push({})}while(i.progressbar.length<o.cardID);i.progressbar[o.cardID]={value:o.value};break;default:do{i.text.push("")}while(i.text.length<o.cardID);i.text[o.cardID]=o.value}for(var e in t.cells){var o;if(t.cells.hasOwnProperty(e)&&void 0===(o=t.cells[e]).cardID)switch(n=!1,o.obj.p){case"BTN":for(let t=0;t<i.button.length;t++)if(i.button[t]==={}){i.button[t]={label:o.value},n=!0;break}n||i.button.push({label:o.value});break;case"IMG":for(let t=0;t<i.image.length;t++)if(i.image[t]==={}){i.image[t]={resource:o.value},n=!0;break}n||i.image.push({resource:o.value});break;case"PGB":for(let t=0;t<i.progressbar.length;t++)if(i.progressbar[t]==={}){i.progressbar[t]={value:o.value},n=!0;break}n||i.progressbar.push({value:o.value});break;default:for(let t=0;t<i.text.length;t++)if(""===i.text[t]){i.text[t]=o.value,n=!0;break}n||i.text.push(o.value)}}return r("kup-card",Object.assign({data:i},this.cardData))}renderRow(t){const n=[...this.visibleColumns];let i=null,e=t.layout;e||(e=this.boxLayout);let o=!1;if(e){e.horizontal&&(o=!0);const r=e.sections;let a=r.length,s=0;a>0&&(i=[]);const u={horizontal:o};for(;a-- >0;)i.push(null!=this.cardData&&"object"==typeof this.cardData?this.renderSectionAsCard(t):this.renderSection(r[s++],u,t,n))}var a=!1;for(let n of this.selectedRows)n.id===t.id&&(a=!0);let s=null;this.multiSelection&&(s=r("div",{class:"box-selection"},r("kup-checkbox",{checked:a})));let u=null;if(this.enableRowActions&&!this.swipeDisabled){const n={"row-action-menu":!0,open:t===this.rowActionMenuOpened};let i=null;if(t.actions){const n=t.actions.map(((n,i)=>r("li",{tabindex:"0",onClick:()=>this.onRowActionClick(t,n,i)},r("div",{class:`icon ${n.icon}`}),r("div",{class:"text"},n.text))));i=r("ul",null,n)}u=r("div",{class:"row-actions-wrapper"},r("div",{class:"row-actions-toggler"},r("svg",{version:"1.1",width:"24",height:"24",viewBox:"0 0 24 24",onClick:()=>this.onRowAction(t)},r("path",{d:"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"})),r("div",{class:n},i)))}let l=null;return t.badgeData&&t.badgeData.length>0&&(l=t.badgeData.map((t=>r("kup-badge",{text:t.text,class:t.className?`centered ${t.className}`:"centered",imageData:t.imageData})))),r("div",{class:"box-wrapper"},r("div",{class:{box:!0,draggable:this.dragEnabled,selected:this.showSelection&&a,column:!o},onClick:n=>this.onBoxClick(n,t),ref:t=>this.rowsRefs.push(t)},s,i,l),u)}renderSection(t,n,i,e){let o=null;if(t.sections&&t.sections.length>0){const n=t.sections;let r=n.length,a=0;for(r>0&&(o=[]);r-- >0;)o.push(this.renderSection(n[a++],t,i,e))}else if(t.content){const n=t.content;let r=n.length,a=0;for(r>0&&(o=[]);r-- >0;)o.push(this.renderBoxObject({boxObject:n[a++],row:i,visibleColumns:e},!0))}else e.length>0&&(o=this.renderBoxObject({boxObject:{column:e[0].name},row:i,visibleColumns:e}));const a=this.isSectionExpanded(i,t),s=!!t.columns,h={"box-section":!0,open:a,column:!s&&!t.horizontal,grid:s,titled:!!t.title,"last-child":!t.sections||0===t.sections.length},f=t.style||{};t.dim&&n&&(f.flex=`0 0 ${t.dim}`,n.horizontal?f.maxWidth=t.dim:f.maxHeight=t.dim),s&&(f["grid-template-columns"]=`repeat(${t.columns}, 1fr)`);let c=null;if(t.collapsible){h["collapse-section"]=!0;const n={content:!0};let e="";e=t.title?t.title:this.kupManager.language.translate(a?u.COLLAPSE:u.EXPAND),c=r("div",{class:h,style:f},r("div",{class:n},o),r("div",{class:"header",role:"button",onClick:n=>{n.stopPropagation(),this.toggleSectionExpand(i,t)}},r("div",{class:"header-content"},r("span",null,e),r(I,{resource:`${l.DROPDOWN}`,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:a?"toggled":""}))))}else{const n=t.title?r("h3",null,t.title):null;c=r("div",{class:h,style:f},n,o)}return c}renderBoxObject({boxObject:t,row:n,visibleColumns:i},e){const o={"box-object":!0};let a=null,s=-1;for(let n=0;n<i.length;n++)if(i[n].name===t.column){s=n;break}s>=0?(a=i[s],i.splice(s,1)):e&&(a=this.data.columns.find((n=>n.name===t.column)));const u=n.cells[t.column];let l;return u&&!this.kupManager.objects.isEmptyKupObj(u.obj)&&(o["is-obj"]=!0,this.kupManager.debug.isDebug()&&(l=u.obj.t+"; "+u.obj.p+"; "+u.obj.k+";")),r("div",{"data-cell":u,"data-row":n,"data-column":t.column,class:o,style:{},title:l},u&&a?r(D,Object.assign({},{cell:u,column:a,component:this,editable:this.editableData,renderKup:!0,row:n,setSizes:!0,shape:t.shape})):r("span",null,t.value))}kanbanMode(){if(!this.kanban.columns||0===this.kanban.columns.length)return this.kupManager.debug.logMessage(this,"No columns to group by detected.",h.ERROR),{jsx:r("p",{id:"empty-data-message"},this.kupManager.language.translate(u.EMPTY_DATA)),style:{"grid-template-columns":"repeat(1, 1fr)"}};const t=[];if(this.kanban.labels)for(let n=0;n<this.kanban.labels.length;n++)t.push({labels:this.kanban.labels[n],nodes:[]});for(let n=0;n<this.rows.length;n++){let i=[];for(let t=0;t<this.kanban.columns.length;t++)try{i.push(this.rows[n].cells[this.kanban.columns[t]].value)}catch(t){this.kupManager.debug.logMessage(this,t,h.WARNING)}const r={found:!1,index:null};for(let n=0;n<t.length;n++){let e=t[n].labels,o=!0;for(let t=0;t<e.length;t++)if(i[t]!==e[t]){o=!1;break}if(o){r.found=!0,r.index=n;break}}r.found?t[r.index].nodes.push(this.renderRow(this.rows[n])):t.push({labels:i,nodes:[this.renderRow(this.rows[n])]})}const n=[];for(let i=0;i<t.length;i++){const e=t[i].labels,o={data:[]};for(let t=0;t<e.length;t++)o.data.push({value:e[t],id:e[t]});n.push(r("div",{class:"kanban-section"},r(L,Object.assign({},o)),t[i].nodes))}return{jsx:n,style:{"grid-template-columns":this.kanban.size?`repeat(${Object.keys(t).length}, ${this.kanban.size})`:`repeat(${Object.keys(t).length}, 1fr)`}}}didLoadInteractables(){this.interactableTouch.push(this.boxContainer),this.kupManager.interact.on(this.boxContainer,f.TAP,(t=>{if(this.hold)this.hold=!1;else switch(t.button){case 2:this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)})}})),this.kupManager.interact.on(this.boxContainer,f.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||(this.hold=!0,this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)}))}))}didRenderInteractables(){if(this.dragEnabled)for(let t=0;t<this.rowsRefs.length;t++){const n=this.rowsRefs[t],i=()=>{const t=this.rootElement.shadowRoot.querySelector(".box-object:hover");return{cell:t["data-cell"],column:b(this.visibleColumns,t.dataset.column),id:this.rootElement.id,multiple:this.multiSelection,row:t["data-row"],selectedRows:this.selectedRows}};n&&!this.interactableDrag.includes(n)&&(this.interactableDrag.push(n),this.kupManager.interact.draggable(n,{allowFrom:".box-object",cursorChecker:()=>null},{callback:i},c.BADGE))}if(this.dropEnabled){const t=()=>{const t=this.getEventDetails(this.rootElement.shadowRoot.querySelector(".box:hover"));return{cell:t.cell,column:t.column,id:this.rootElement.id,row:t.row}};this.interactableDrop.includes(this.sectionRef)||(this.interactableDrop.push(this.sectionRef),this.kupManager.interact.dropzone(this.sectionRef,{accept:`[${v}]`},{dispatcher:this.rootElement,type:d.BOX}));for(let n=0;n<this.rowsRefs.length;n++){const i=this.rowsRefs[n];i&&!this.interactableDrop.includes(i)&&(this.interactableDrop.push(i),this.kupManager.interact.dropzone(i,{accept:`[${v}]`},{callback:t,dispatcher:this.rootElement,type:d.BOX}))}}}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.rowsPerPage?this.currentRowsPerPage=this.rowsPerPage:this.pageSize&&(this.currentRowsPerPage=this.pageSize),this.data&&this.data.rows&&this.currentRowsPerPage>this.data.rows.length&&(this.currentRowsPerPage=this.data.rows.length),this.kupManager.language.register(this),this.kupManager.theme.register(this),this.onDataChanged(),this.adjustPaginator()}componentDidLoad(){if(this.handleAutomaticBoxSelection(),document.addEventListener("click",this.clickFunction.bind(this)),this.currentPage=this.pageSelected,this.multiSelection&&this.selectedRowsState){this.selectedRows=[];let t=this.selectedRowsState.split(";");this.selectedRows=this.data.rows.filter((n=>t.indexOf(n.id)>=0))}this.didLoadInteractables(),this.kupDidLoad.emit({comp:this,id:this.rootElement.id}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.checkScrollOnHover(),this.persistState(),this.didRenderInteractables(),this.kupManager.debug.logRender(this,!0)}render(){const t=!("object"!=typeof this.kanban||null===this.kanban);let n=null;if(this.sortEnabled){const t=[{value:"",id:""},...this.visibleColumns.map((t=>({value:t.title,id:t.name,selected:t.name===this.sortBy})))];let i={label:this.kupManager.language.translate(u.SORT_BY),trailingIcon:!0};n=r("div",{id:"sort-panel"},r("kup-combobox",{data:{"kup-text-field":i,"kup-list":{data:t,selectable:!0}},initialValue:this.sortBy,"onkup-combobox-itemclick":t=>this.onSortChange(t)}))}let i=null;this.globalFilter&&(i=r("div",{id:"global-filter"},r("kup-text-field",{fullWidth:!0,label:this.kupManager.language.translate(p.SEARCH),icon:l.SEARCH,initialValue:this.globalFilterValue,"onkup-textfield-input":t=>{window.clearTimeout(this.globalFilterTimeout),this.globalFilterTimeout=window.setTimeout((()=>this.onGlobalFilterChange(t)),600)}})));let o=null;this.pagination&&(o=r(N,{id:top?"top-paginator":"bottom-paginator",currentPage:this.currentPage,max:this.filteredRows.length,mode:A.SIMPLE,perPage:this.currentRowsPerPage?this.currentRowsPerPage:this.pageSize,onPageChange:t=>this.handlePageChange(t.detail.value),onRowsChange:t=>this.handleRowsPerPageChange(t.detail.value)}));let a=null,s={};if(0===this.rows.length)a=r("p",{id:"empty-data-message"},this.kupManager.language.translate(u.EMPTY_DATA)),s={"grid-template-columns":"repeat(1, 1fr)"};else if(t){const t=this.kanbanMode();a=t.jsx,s=t.style}else{s={"grid-template-columns":`repeat(${this.columns}, 1fr)`};const t=this.rows;let n=t.length,i=0;for(a=[];n-- >0;)a.push(this.renderRow(t[i++]))}return r(e,null,r("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),r("div",{id:O},r("div",{class:"box-component",ref:t=>this.sectionRef=t},n,i,o,r("div",{class:t?"is-kanban":"",id:"box-container",style:s,onContextMenu:t=>{t.preventDefault()},ref:t=>this.boxContainer=t},a))))}disconnectedCallback(){this.kupManager.interact.unregister(this.interactableDrag.concat(this.interactableDrop)),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this),this.scrollOnHover&&this.kupManager.scrollOnHover.unregister(this.boxContainer),document.removeEventListener("click",this.clickFunction.bind(this)),this.kupDidUnload.emit({comp:this,id:this.rootElement.id})}get rootElement(){return o(this)}static get watchers(){return{pageSize:["rowsPerPageHandler","recalculateRows"],globalFilterValue:["recalculateRows"],sortBy:["recalculateRows"],pagination:["recalculateRows"],currentPage:["recalculateRows"],currentRowsPerPage:["recalculateRows"],data:["onDataChanged"],layout:["onLayoutChanged"],selectBox:["onSelectBoxChanged"]}}};B.style=":host{--kup_box_background_color:var(\n --kup-box-background-color,\n var(--kup-background-color)\n );--kup_box_color:var(--kup-box-color, var(--kup-text-color));--kup_box_font_family:var(--kup-box-font-family, var(--kup-font-family));--kup_box_font_size:var(--kup-box-font-size, var(--kup-font-size));--kup_box_grid_gap:var(--kup-box-grid-gap, 1em);--kup_box_hover_box_shadow:var(\n --kup-box-hover-box-shadow,\n 0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)\n );--kup_box_primary_color_rgb:var(\n --kup-box-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_box_transition:var(--kup-box-transition, 0.25s);display:block;font-family:var(--kup_box_font_family);font-size:var(--kup_box_font_size)}.box-component{background:var(--kup_box_background_color);transition:border var(--kup_box_transition) ease}.box-component[kup-drag-over]{position:relative;border:3px dashed var(--kup-border-color)}#box-container{display:grid;grid-gap:var(--kup_box_grid_gap);color:var(--kup_box_color);overflow:auto}#box-container.is-kanban .kanban-section{overflow:auto}#box-container.is-kanban .box-wrapper{padding-top:1em}#box-container.is-kanban .box-wrapper .box{overflow:auto}#box-container *{box-sizing:border-box}#box-container .box-wrapper{display:flex;align-items:center}#box-container .box-wrapper .box{flex-grow:1;cursor:pointer;position:relative;display:flex;transition:background-color var(--kup_box_transition) ease, box-shadow var(--kup_box_transition) ease, border var(--kup_box_transition) ease}#box-container .box-wrapper .box.draggable{touch-action:none;user-select:none}#box-container .box-wrapper .box.column{flex-direction:column}#box-container .box-wrapper .box:hover{box-shadow:var(--kup_box_hover_box_shadow)}#box-container .box-wrapper .box.selected{background-color:rgba(var(--kup_box_primary_color_rgb), 0.175)}#box-container .box-wrapper .box.selected .box-section.titled>h3{background-color:transparent}#box-container .box-wrapper .box[kup-draggable]{opacity:0.5}#box-container .box-wrapper .box[kup-drag-over]{border:3px dashed var(--kup-border-color);position:relative;z-index:2}#box-container .box-wrapper .box .box-section{display:flex;flex-direction:row;flex:1 1 1%;flex-wrap:wrap}#box-container .box-wrapper .box .box-section.column{flex-direction:column;justify-content:center;flex-wrap:unset}#box-container .box-wrapper .box .box-section.column>.box-section{flex:0 0 auto}#box-container .box-wrapper .box .box-section.grid{display:grid}#box-container .box-wrapper .box .box-section .box-object{min-height:16px}#box-container .box-wrapper .box .box-section .box-object img{height:auto}#box-container .box-wrapper .box .box-section.collapse-section .header{border-top:1px solid var(--kup-border-color);color:rgba(var(--kup-text-color-rgb), 0.75);display:flex;justify-content:space-around;width:100%}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content{margin:0.5em;display:flex;align-items:center}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image{transition:transform 0.15s}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image.toggled{transform:rotate(-180deg)}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .kup-icon.kup-dropdown-icon{margin:0;-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}#box-container .box-wrapper .box .box-section.collapse-section .content{display:none;width:100%}#box-container .box-wrapper .box .box-section.collapse-section.open .content{display:block}#box-container .box-wrapper .box .box-section.titled{border:1px solid var(--kup-border-color);padding-top:5px;position:relative;margin:10px}#box-container .box-wrapper .box .box-section.titled>h3{background:var(--kup-background-color);font-size:calc(var(--kup-font-size) * 1.15);position:absolute;margin:0px;padding:0 8px;top:-11px;left:5px;transition:background-color 0.25s ease}#box-container .box-wrapper .box .box-selection{position:absolute;top:0.5em;right:0.5em;z-index:1}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler{position:relative;width:24px;height:24px;margin-left:3px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler svg{cursor:pointer;opacity:0;fill:var(--kup-text-color);transition:opacity 500ms ease-out}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu{background:var(--kup-background-color);border:1px solid var(--kup-border-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);position:absolute;top:0;right:24px;display:none;z-index:10}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul{list-style-type:none;margin:0;padding:0}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li{cursor:pointer;white-space:nowrap;padding:0 12px;display:flex;align-items:center;line-height:30px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li:not(:last-child){border-bottom:1px solid var(--kup-border-color)}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu.open{display:block}#box-container .box-wrapper:hover .row-actions-wrapper .row-actions-toggler svg{opacity:1}#sort-panel,#global-filter{margin-bottom:1em}:host(.kup-center-aligned) #kup-component .box-section{text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell img{margin:auto}:host(.kup-right-aligned) #kup-component .box-section{text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell img{margin-left:auto;margin-right:0}:host(.kup-top-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-start}:host(.kup-bottom-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-end}:host(:not(.kup-borderless)) .box{border:1px solid var(--kup-border-color)}:host(.kup-flat-on-hover) #box-container .box-wrapper .box:hover{box-shadow:none}:host(.kup-shaped) .box{border-radius:10px}:host(.kup-round) .box{border-radius:25px}:host(.kup-dashed-sections) .box-section{border:2px dashed var(--kup-text-color)}:host(:not(.kup-paddingless)) #box-container .box{padding:3px}:host(:not(.kup-paddingless)) #box-container .box .box-section .box-object{padding:1px 4px}:host(:not(.kup-paddingless)) #box-container .box .box-section.last-child{margin:3px 4px}:host(.kup-danger){--kup-box-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-box-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-box-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-box-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-box-primary-color-rgb:var(--kup-warning-color-rgb)}";
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */
|
|
16
|
-
var F=function(t,n){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(t,n)};function E(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}F(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var P=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},W=new function(){this.browser=new P,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(W.wxa=!0,W.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?W.worker=!0:"undefined"==typeof navigator?(W.node=!0,W.svgSupported=!0):function(t,n){var i=n.browser,r=t.match(/Firefox\/([\d.]+)/),e=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);r&&(i.firefox=!0,i.version=r[1]),e&&(i.ie=!0,i.version=e[1]),o&&(i.edge=!0,i.version=o[1],i.newEdge=+o[1].split(".")[0]>18),a&&(i.weChat=!0),n.svgSupported="undefined"!=typeof SVGRect,n.touchEventsSupported="ontouchstart"in window&&!i.ie&&!i.edge,n.pointerEventsSupported="onpointerdown"in window&&(i.edge||i.ie&&+i.version>=11),n.domSupported="undefined"!=typeof document;var s=document.documentElement.style;n.transform3dSupported=(i.ie&&"transition"in s||i.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),n.transformSupported=n.transform3dSupported||i.ie&&+i.version>=9}(navigator.userAgent,W);var V,j,H="12px sans-serif",Y=function(t){var n={};if("undefined"==typeof JSON)return n;for(var i=0;i<t.length;i++){var r=String.fromCharCode(i+32),e=(t.charCodeAt(i)-20)/100;n[r]=e}return n}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),X={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(t,n){if(!V){var i=X.createCanvas();V=i&&i.getContext("2d")}if(V)return j!==n&&(j=V.font=n||H),V.measureText(t);t=t||"";var r=/^([0-9]*?)px$/.exec(n=n||H),e=+(r&&r[1])||12,o=0;if(n.indexOf("mono")>=0)o=e*t.length;else for(var a=0;a<t.length;a++){var s=Y[t[a]];o+=null==s?e:s*e}return{width:o}},loadImage:function(t,n,i){var r=new Image;return r.onload=n,r.onerror=i,r.src=t,r}},G=pt(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(t,n){return t["[object "+n+"]"]=!0,t}),{}),U=pt(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,n){return t["[object "+n+"Array]"]=!0,t}),{}),Z=Object.prototype.toString,q=Array.prototype,$=q.forEach,K=q.filter,J=q.slice,Q=q.map,tt=function(){}.constructor,nt=tt?tt.prototype:null,it=2311;function rt(){return it++}function et(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];"undefined"!=typeof console&&console.error.apply(console,t)}function ot(t){if(null==t||"object"!=typeof t)return t;var n=t,i=Z.call(t);if("[object Array]"===i){if(!Pt(t)){n=[];for(var r=0,e=t.length;r<e;r++)n[r]=ot(t[r])}}else if(U[i]){if(!Pt(t)){var o=t.constructor;if(o.from)n=o.from(t);else for(n=new o(t.length),r=0,e=t.length;r<e;r++)n[r]=t[r]}}else if(!G[i]&&!Pt(t)&&!Tt(t))for(var a in n={},t)t.hasOwnProperty(a)&&"__proto__"!==a&&(n[a]=ot(t[a]));return n}function at(t,n,i){if(!At(n)||!At(t))return i?ot(n):t;for(var r in n)if(n.hasOwnProperty(r)&&"__proto__"!==r){var e=t[r],o=n[r];!At(o)||!At(e)||wt(o)||wt(e)||Tt(o)||Tt(e)||Nt(o)||Nt(e)||Pt(o)||Pt(e)?!i&&r in t||(t[r]=ot(n[r])):at(e,o,i)}return t}function st(t,n){for(var i=t[0],r=1,e=t.length;r<e;r++)i=at(i,t[r],n);return i}function ut(t,n){if(Object.assign)Object.assign(t,n);else for(var i in n)n.hasOwnProperty(i)&&"__proto__"!==i&&(t[i]=n[i]);return t}function lt(t,n,i){for(var r=yt(n),e=0;e<r.length;e++){var o=r[e];(i?null!=n[o]:null==t[o])&&(t[o]=n[o])}return t}function ht(t,n){if(t){if(t.indexOf)return t.indexOf(n);for(var i=0,r=t.length;i<r;i++)if(t[i]===n)return i}return-1}function ft(t,n,i){if(t="prototype"in t?t.prototype:t,n="prototype"in n?n.prototype:n,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(n),e=0;e<r.length;e++){var o=r[e];"constructor"!==o&&(i?null!=n[o]:null==t[o])&&(t[o]=n[o])}else lt(t,n,i)}function ct(t){return!!t&&"string"!=typeof t&&"number"==typeof t.length}function vt(t,n,i){if(t&&n)if(t.forEach&&t.forEach===$)t.forEach(n,i);else if(t.length===+t.length)for(var r=0,e=t.length;r<e;r++)n.call(i,t[r],r,t);else for(var o in t)t.hasOwnProperty(o)&&n.call(i,t[o],o,t)}function dt(t,n,i){if(!t)return[];if(!n)return Rt(t);if(t.map&&t.map===Q)return t.map(n,i);for(var r=[],e=0,o=t.length;e<o;e++)r.push(n.call(i,t[e],e,t));return r}function pt(t,n,i,r){if(t&&n){for(var e=0,o=t.length;e<o;e++)i=n.call(r,i,t[e],e,t);return i}}function mt(t,n,i){if(!t)return[];if(!n)return Rt(t);if(t.filter&&t.filter===K)return t.filter(n,i);for(var r=[],e=0,o=t.length;e<o;e++)n.call(i,t[e],e,t)&&r.push(t[e]);return r}function yt(t){if(!t)return[];if(Object.keys)return Object.keys(t);var n=[];for(var i in t)t.hasOwnProperty(i)&&n.push(i);return n}var gt=nt&&xt(nt.bind)?nt.call.bind(nt.bind):function(t,n){for(var i=[],r=2;r<arguments.length;r++)i[r-2]=arguments[r];return function(){return t.apply(n,i.concat(J.call(arguments)))}};function bt(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return function(){return t.apply(this,n.concat(J.call(arguments)))}}function wt(t){return Array.isArray?Array.isArray(t):"[object Array]"===Z.call(t)}function xt(t){return"function"==typeof t}function Mt(t){return"string"==typeof t}function St(t){return"[object String]"===Z.call(t)}function kt(t){return"number"==typeof t}function At(t){var n=typeof t;return"function"===n||!!t&&"object"===n}function Nt(t){return!!G[Z.call(t)]}function Ct(t){return!!U[Z.call(t)]}function Tt(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function zt(t){return null!=t.colorStops}function It(t){return t!=t}function Lt(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i=0,r=t.length;i<r;i++)if(null!=t[i])return t[i]}function Ot(t,n){return null!=t?t:n}function Dt(t,n,i){return null!=t?t:null!=n?n:i}function Rt(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return J.apply(t,n)}function _t(t){if("number"==typeof t)return[t,t,t,t];var n=t.length;return 2===n?[t[0],t[1],t[0],t[1]]:3===n?[t[0],t[1],t[2],t[1]]:t}function Bt(t,n){if(!t)throw new Error(n)}function Ft(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function Et(t){t.__ec_primitive__=!0}function Pt(t){return t.__ec_primitive__}var Wt=function(){function t(n){this.data={};var i=wt(n);this.data={};var r=this;function e(t,n){i?r.set(t,n):r.set(n,t)}n instanceof t?n.each(e):n&&vt(n,e)}return t.prototype.get=function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},t.prototype.set=function(t,n){return this.data[t]=n},t.prototype.each=function(t,n){for(var i in this.data)this.data.hasOwnProperty(i)&&t.call(n,this.data[i],i)},t.prototype.keys=function(){return yt(this.data)},t.prototype.removeKey=function(t){delete this.data[t]},t}();function Vt(t){return new Wt(t)}function jt(t,n){for(var i=new t.constructor(t.length+n.length),r=0;r<t.length;r++)i[r]=t[r];var e=t.length;for(r=0;r<n.length;r++)i[r+e]=n[r];return i}function Ht(t,n){var i;if(Object.create)i=Object.create(t);else{var r=function(){};r.prototype=t,i=new r}return n&&ut(i,n),i}function Yt(t){var n=t.style;n.webkitUserSelect="none",n.userSelect="none",n.webkitTapHighlightColor="rgba(0,0,0,0)",n["-webkit-touch-callout"]="none"}function Xt(t,n){return t.hasOwnProperty(n)}function Gt(){}var Ut=180/Math.PI,Zt=function(t,n){return(Zt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(t,n)};
|
|
17
|
-
/*! *****************************************************************************
|
|
18
|
-
Copyright (c) Microsoft Corporation.
|
|
19
|
-
|
|
20
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
21
|
-
purpose with or without fee is hereby granted.
|
|
22
|
-
|
|
23
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
24
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
25
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
26
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
27
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
28
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
29
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
30
|
-
***************************************************************************** */function qt(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}Zt(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}function $t(t,n){return null==t&&(t=0),null==n&&(n=0),[t,n]}function Kt(t,n){return t[0]=n[0],t[1]=n[1],t}function Jt(t){return[t[0],t[1]]}function Qt(t,n,i){return t[0]=n,t[1]=i,t}function tn(t,n,i){return t[0]=n[0]+i[0],t[1]=n[1]+i[1],t}function nn(t,n,i,r){return t[0]=n[0]+i[0]*r,t[1]=n[1]+i[1]*r,t}function rn(t,n,i){return t[0]=n[0]-i[0],t[1]=n[1]-i[1],t}function en(t){return Math.sqrt(function(t){return t[0]*t[0]+t[1]*t[1]}(t))}function on(t,n,i){return t[0]=n[0]*i,t[1]=n[1]*i,t}function an(t,n){var i=en(n);return 0===i?(t[0]=0,t[1]=0):(t[0]=n[0]/i,t[1]=n[1]/i),t}function sn(t,n){return Math.sqrt((t[0]-n[0])*(t[0]-n[0])+(t[1]-n[1])*(t[1]-n[1]))}var un=sn,ln=function(t,n){return(t[0]-n[0])*(t[0]-n[0])+(t[1]-n[1])*(t[1]-n[1])};function hn(t,n,i,r){return t[0]=n[0]+r*(i[0]-n[0]),t[1]=n[1]+r*(i[1]-n[1]),t}function fn(t,n,i){var r=n[0],e=n[1];return t[0]=i[0]*r+i[2]*e+i[4],t[1]=i[1]*r+i[3]*e+i[5],t}function cn(t,n,i){return t[0]=Math.min(n[0],i[0]),t[1]=Math.min(n[1],i[1]),t}function vn(t,n,i){return t[0]=Math.max(n[0],i[0]),t[1]=Math.max(n[1],i[1]),t}var dn=function(t,n){this.target=t,this.topTarget=n&&n.topTarget},pn=function(){function t(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return t.prototype._dragStart=function(t){for(var n=t.target;n&&!n.draggable;)n=n.parent||n.__hostTarget;n&&(this._draggingTarget=n,n.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new dn(n,t),"dragstart",t.event))},t.prototype._drag=function(t){var n=this._draggingTarget;if(n){var i=t.offsetX,r=t.offsetY,e=i-this._x,o=r-this._y;this._x=i,this._y=r,n.drift(e,o,t),this.handler.dispatchToElement(new dn(n,t),"drag",t.event);var a=this.handler.findHover(i,r,n).target,s=this._dropTarget;this._dropTarget=a,n!==a&&(s&&a!==s&&this.handler.dispatchToElement(new dn(s,t),"dragleave",t.event),a&&a!==s&&this.handler.dispatchToElement(new dn(a,t),"dragenter",t.event))}},t.prototype._dragEnd=function(t){var n=this._draggingTarget;n&&(n.dragging=!1),this.handler.dispatchToElement(new dn(n,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new dn(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},t}(),mn=function(){function t(t){t&&(this._$eventProcessor=t)}return t.prototype.on=function(t,n,i,r){this._$handlers||(this._$handlers={});var e=this._$handlers;if("function"==typeof n&&(r=i,i=n,n=null),!i||!t)return this;var o=this._$eventProcessor;null!=n&&o&&o.normalizeQuery&&(n=o.normalizeQuery(n)),e[t]||(e[t]=[]);for(var a=0;a<e[t].length;a++)if(e[t][a].h===i)return this;var s={h:i,query:n,ctx:r||this,callAtLast:i.zrEventfulCallAtLast},u=e[t].length-1,l=e[t][u];return l&&l.callAtLast?e[t].splice(u,0,s):e[t].push(s),this},t.prototype.isSilent=function(t){var n=this._$handlers;return!n||!n[t]||!n[t].length},t.prototype.off=function(t,n){var i=this._$handlers;if(!i)return this;if(!t)return this._$handlers={},this;if(n){if(i[t]){for(var r=[],e=0,o=i[t].length;e<o;e++)i[t][e].h!==n&&r.push(i[t][e]);i[t]=r}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},t.prototype.trigger=function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];if(!this._$handlers)return this;var r=this._$handlers[t],e=this._$eventProcessor;if(r)for(var o=n.length,a=r.length,s=0;s<a;s++){var u=r[s];if(!e||!e.filter||null==u.query||e.filter(t,u.query))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,n[0]);break;case 2:u.h.call(u.ctx,n[0],n[1]);break;default:u.h.apply(u.ctx,n)}}return e&&e.afterTrigger&&e.afterTrigger(t),this},t.prototype.triggerWithContext=function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];if(!this._$handlers)return this;var r=this._$handlers[t],e=this._$eventProcessor;if(r)for(var o=n.length,a=n[o-1],s=r.length,u=0;u<s;u++){var l=r[u];if(!e||!e.filter||null==l.query||e.filter(t,l.query))switch(o){case 0:l.h.call(a);break;case 1:l.h.call(a,n[0]);break;case 2:l.h.call(a,n[0],n[1]);break;default:l.h.apply(a,n.slice(1,o-1))}}return e&&e.afterTrigger&&e.afterTrigger(t),this},t}(),yn=Math.log(2);function gn(t,n,i,r,e,o){var a=r+"-"+e,s=t.length;if(o.hasOwnProperty(a))return o[a];if(1===n){var u=Math.round(Math.log((1<<s)-1&~e)/yn);return t[i][u]}for(var l=r|1<<i,h=i+1;r&1<<h;)h++;for(var f=0,c=0,v=0;c<s;c++){var d=1<<c;d&e||(f+=(v%2?-1:1)*t[i][c]*gn(t,n-1,h,l,e|d,o),v++)}return o[a]=f,f}function bn(t,n){var i=[[t[0],t[1],1,0,0,0,-n[0]*t[0],-n[0]*t[1]],[0,0,0,t[0],t[1],1,-n[1]*t[0],-n[1]*t[1]],[t[2],t[3],1,0,0,0,-n[2]*t[2],-n[2]*t[3]],[0,0,0,t[2],t[3],1,-n[3]*t[2],-n[3]*t[3]],[t[4],t[5],1,0,0,0,-n[4]*t[4],-n[4]*t[5]],[0,0,0,t[4],t[5],1,-n[5]*t[4],-n[5]*t[5]],[t[6],t[7],1,0,0,0,-n[6]*t[6],-n[6]*t[7]],[0,0,0,t[6],t[7],1,-n[7]*t[6],-n[7]*t[7]]],r={},e=gn(i,8,0,0,0,r);if(0!==e){for(var o=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==o[s]&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*gn(i,7,0===a?1:0,1<<a,1<<s,r)/e*n[a];return function(t,n,i){var r=n*o[6]+i*o[7]+1;t[0]=(n*o[0]+i*o[1]+o[2])/r,t[1]=(n*o[3]+i*o[4]+o[5])/r}}}var wn=[];function xn(t,n,i,r,e){if(n.getBoundingClientRect&&W.domSupported&&!Mn(n)){var o=n.___zrEVENTSAVED||(n.___zrEVENTSAVED={}),a=function(t,n,i){for(var r=i?"invTrans":"trans",e=n[r],o=n.srcCoords,a=[],s=[],u=!0,l=0;l<4;l++){var h=t[l].getBoundingClientRect(),f=2*l,c=h.left,v=h.top;a.push(c,v),u=u&&o&&c===o[f]&&v===o[f+1],s.push(t[l].offsetLeft,t[l].offsetTop)}return u&&e?e:(n.srcCoords=a,n[r]=i?bn(s,a):bn(a,s))}(function(t,n){var i=n.markers;if(i)return i;i=n.markers=[];for(var r=["left","right"],e=["top","bottom"],o=0;o<4;o++){var a=document.createElement("div"),s=o%2,u=(o>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[s]+":0",e[u]+":0",r[1-s]+":auto",e[1-u]+":auto",""].join("!important;"),t.appendChild(a),i.push(a)}return i}(n,o),o,e);if(a)return a(t,i,r),!0}return!1}function Mn(t){return"CANVAS"===t.nodeName.toUpperCase()}var Sn=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,kn=[],An=W.browser.firefox&&+W.browser.version.split(".")[0]<39;function Nn(t,n,i,r){return i=i||{},r?Cn(t,n,i):An&&null!=n.layerX&&n.layerX!==n.offsetX?(i.zrX=n.layerX,i.zrY=n.layerY):null!=n.offsetX?(i.zrX=n.offsetX,i.zrY=n.offsetY):Cn(t,n,i),i}function Cn(t,n,i){if(W.domSupported&&t.getBoundingClientRect){var r=n.clientX,e=n.clientY;if(Mn(t)){var o=t.getBoundingClientRect();return i.zrX=r-o.left,void(i.zrY=e-o.top)}if(xn(kn,t,r,e))return i.zrX=kn[0],void(i.zrY=kn[1])}i.zrX=i.zrY=0}function Tn(t){return t||window.event}function zn(t,n,i){if(null!=(n=Tn(n)).zrX)return n;var r=n.type;if(r&&r.indexOf("touch")>=0){var e="touchend"!==r?n.targetTouches[0]:n.changedTouches[0];e&&Nn(t,e,n,i)}else{Nn(t,n,n,i);var o=function(t){var n=t.wheelDelta;if(n)return n;var i=t.deltaX,r=t.deltaY;return null==i||null==r?n:3*(0!==r?Math.abs(r):Math.abs(i))*(r>0?-1:r<0?1:i>0?-1:1)}(n);n.zrDelta=o?o/120:-(n.detail||0)/3}var a=n.button;return null==n.which&&void 0!==a&&Sn.test(n.type)&&(n.which=1&a?1:2&a?3:4&a?2:0),n}function In(t,n,i,r){t.addEventListener(n,i,r)}var Ln=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function On(t){return 2===t.which||3===t.which}var Dn=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,n,i){return this._doTrack(t,n,i),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,n,i){var r=t.touches;if(r){for(var e={points:[],touches:[],target:n,event:t},o=0,a=r.length;o<a;o++){var s=r[o],u=Nn(i,s,{});e.points.push([u.zrX,u.zrY]),e.touches.push(s)}this._track.push(e)}},t.prototype._recognize=function(t){for(var n in _n)if(_n.hasOwnProperty(n)){var i=_n[n](this._track,t);if(i)return i}},t}();function Rn(t){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(n*n+i*i)}var _n={pinch:function(t,n){var i=t.length;if(i){var r,e=(t[i-1]||{}).points,o=(t[i-2]||{}).points||e;if(o&&o.length>1&&e&&e.length>1){var a=Rn(e)/Rn(o);!isFinite(a)&&(a=1),n.pinchScale=a;var s=[((r=e)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return n.pinchX=s[0],n.pinchY=s[1],{type:"pinch",target:t[0].target,event:n}}}}};function Bn(){Ln(this.event)}var Fn=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.handler=null,n}return qt(n,t),n.prototype.dispose=function(){},n.prototype.setCursor=function(){},n}(mn),En=function(t,n){this.x=t,this.y=n},Pn=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Wn=function(t){function n(n,i,r,e){var o=t.call(this)||this;return o._hovered=new En(0,0),o.storage=n,o.painter=i,o.painterRoot=e,r=r||new Fn,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new pn(o),o}return qt(n,t),n.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(vt(Pn,(function(n){t.on&&t.on(n,this[n],this)}),this),t.handler=this),this.proxy=t},n.prototype.mousemove=function(t){var n=t.zrX,i=t.zrY,r=jn(this,n,i),e=this._hovered,o=e.target;o&&!o.__zr&&(o=(e=this.findHover(e.x,e.y)).target);var a=this._hovered=r?new En(n,i):this.findHover(n,i),s=a.target,u=this.proxy;u.setCursor&&u.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(e,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},n.prototype.mouseout=function(t){var n=t.zrEventControl;"only_globalout"!==n&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==n&&this.trigger("globalout",{type:"globalout",event:t})},n.prototype.resize=function(){this._hovered=new En(0,0)},n.prototype.dispatch=function(t,n){var i=this[t];i&&i.call(this,n)},n.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},n.prototype.setCursorStyle=function(t){var n=this.proxy;n.setCursor&&n.setCursor(t)},n.prototype.dispatchToElement=function(t,n,i){var r=(t=t||{}).target;if(!r||!r.silent){for(var e="on"+n,o=function(t,n,i){return{type:t,event:i,target:n.target,topTarget:n.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:Bn}}(n,t,i);r&&(r[e]&&(o.cancelBubble=!!r[e].call(r,o)),r.trigger(n,o),r=r.__hostTarget?r.__hostTarget:r.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(n,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[e]&&t[e].call(t,o),t.trigger&&t.trigger(n,o)})))}},n.prototype.findHover=function(t,n,i){for(var r=this.storage.getDisplayList(),e=new En(t,n),o=r.length-1;o>=0;o--){var a=void 0;if(r[o]!==i&&!r[o].ignore&&(a=Vn(r[o],t,n))&&(!e.topTarget&&(e.topTarget=r[o]),"silent"!==a)){e.target=r[o];break}}return e},n.prototype.processGesture=function(t,n){this._gestureMgr||(this._gestureMgr=new Dn);var i=this._gestureMgr;"start"===n&&i.clear();var r=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===n&&i.clear(),r){var e=r.type;t.gestureEvent=e;var o=new En;o.target=r.target,this.dispatchToElement(o,e,r.event)}},n}(mn);function Vn(t,n,i){if(t[t.rectHover?"rectContain":"contain"](n,i)){for(var r=t,e=void 0,o=!1;r;){if(r.ignoreClip&&(o=!0),!o){var a=r.getClipPath();if(a&&!a.contain(n,i))return!1;r.silent&&(e=!0)}r=r.__hostTarget||r.parent}return!e||"silent"}return!1}function jn(t,n,i){var r=t.painter;return n<0||n>r.getWidth()||i<0||i>r.getHeight()}function Hn(t,n,i,r){var e=n+1;if(e===i)return 1;if(r(t[e++],t[n])<0){for(;e<i&&r(t[e],t[e-1])<0;)e++;!function(t,n,i){for(i--;n<i;){var r=t[n];t[n++]=t[i],t[i--]=r}}(t,n,e)}else for(;e<i&&r(t[e],t[e-1])>=0;)e++;return e-n}function Yn(t,n,i,r,e){for(r===n&&r++;r<i;r++){for(var o,a=t[r],s=n,u=r;s<u;)e(a,t[o=s+u>>>1])<0?u=o:s=o+1;var l=r-s;switch(l){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;l>0;)t[s+l]=t[s+l-1],l--}t[s]=a}}function Xn(t,n,i,r,e,o){var a=0,s=0,u=1;if(o(t,n[i+e])>0){for(s=r-e;u<s&&o(t,n[i+e+u])>0;)a=u,(u=1+(u<<1))<=0&&(u=s);u>s&&(u=s),a+=e,u+=e}else{for(s=e+1;u<s&&o(t,n[i+e-u])<=0;)a=u,(u=1+(u<<1))<=0&&(u=s);u>s&&(u=s);var l=a;a=e-u,u=e-l}for(a++;a<u;){var h=a+(u-a>>>1);o(t,n[i+h])>0?a=h+1:u=h}return u}function Gn(t,n,i,r,e,o){var a=0,s=0,u=1;if(o(t,n[i+e])<0){for(s=e+1;u<s&&o(t,n[i+e-u])<0;)a=u,(u=1+(u<<1))<=0&&(u=s);u>s&&(u=s);var l=a;a=e-u,u=e-l}else{for(s=r-e;u<s&&o(t,n[i+e+u])>=0;)a=u,(u=1+(u<<1))<=0&&(u=s);u>s&&(u=s),a+=e,u+=e}for(a++;a<u;){var h=a+(u-a>>>1);o(t,n[i+h])<0?u=h:a=h+1}return u}function Un(t,n,i,r){i||(i=0),r||(r=t.length);var e=r-i;if(!(e<2)){var o=0;if(e<32)Yn(t,i,r,i+(o=Hn(t,i,r,n)),n);else{var a=function(t,n){var i,r,e=7,o=0,a=[];function s(s){var u=i[s],l=r[s],h=i[s+1],f=r[s+1];r[s]=l+f,s===o-3&&(i[s+1]=i[s+2],r[s+1]=r[s+2]),o--;var c=Gn(t[h],t,u,l,0,n);u+=c,0!=(l-=c)&&0!==(f=Xn(t[u+l-1],t,h,f,f-1,n))&&(l<=f?function(i,r,o,s){var u=0;for(u=0;u<r;u++)a[u]=t[i+u];var l=0,h=o,f=i;if(t[f++]=t[h++],0!=--s)if(1!==r){for(var c,v,d,p=e;;){c=0,v=0,d=!1;do{if(n(t[h],a[l])<0){if(t[f++]=t[h++],v++,c=0,0==--s){d=!0;break}}else if(t[f++]=a[l++],c++,v=0,1==--r){d=!0;break}}while((c|v)<p);if(d)break;do{if(0!==(c=Gn(t[h],a,l,r,0,n))){for(u=0;u<c;u++)t[f+u]=a[l+u];if(f+=c,l+=c,(r-=c)<=1){d=!0;break}}if(t[f++]=t[h++],0==--s){d=!0;break}if(0!==(v=Xn(a[l],t,h,s,0,n))){for(u=0;u<v;u++)t[f+u]=t[h+u];if(f+=v,h+=v,0==(s-=v)){d=!0;break}}if(t[f++]=a[l++],1==--r){d=!0;break}p--}while(c>=7||v>=7);if(d)break;p<0&&(p=0),p+=2}if((e=p)<1&&(e=1),1===r){for(u=0;u<s;u++)t[f+u]=t[h+u];t[f+s]=a[l]}else{if(0===r)throw new Error;for(u=0;u<r;u++)t[f+u]=a[l+u]}}else{for(u=0;u<s;u++)t[f+u]=t[h+u];t[f+s]=a[l]}else for(u=0;u<r;u++)t[f+u]=a[l+u]}(u,l,h,f):function(i,r,o,s){var u=0;for(u=0;u<s;u++)a[u]=t[o+u];var l=i+r-1,h=s-1,f=o+s-1,c=0,v=0;if(t[f--]=t[l--],0!=--r)if(1!==s){for(var d=e;;){var p=0,m=0,y=!1;do{if(n(a[h],t[l])<0){if(t[f--]=t[l--],p++,m=0,0==--r){y=!0;break}}else if(t[f--]=a[h--],m++,p=0,1==--s){y=!0;break}}while((p|m)<d);if(y)break;do{if(0!=(p=r-Gn(a[h],t,i,r,r-1,n))){for(r-=p,v=1+(f-=p),c=1+(l-=p),u=p-1;u>=0;u--)t[v+u]=t[c+u];if(0===r){y=!0;break}}if(t[f--]=a[h--],1==--s){y=!0;break}if(0!=(m=s-Xn(t[l],a,0,s,s-1,n))){for(s-=m,v=1+(f-=m),c=1+(h-=m),u=0;u<m;u++)t[v+u]=a[c+u];if(s<=1){y=!0;break}}if(t[f--]=t[l--],0==--r){y=!0;break}d--}while(p>=7||m>=7);if(y)break;d<0&&(d=0),d+=2}if((e=d)<1&&(e=1),1===s){for(v=1+(f-=r),c=1+(l-=r),u=r-1;u>=0;u--)t[v+u]=t[c+u];t[f]=a[h]}else{if(0===s)throw new Error;for(c=f-(s-1),u=0;u<s;u++)t[c+u]=a[u]}}else{for(v=1+(f-=r),c=1+(l-=r),u=r-1;u>=0;u--)t[v+u]=t[c+u];t[f]=a[h]}else for(c=f-(s-1),u=0;u<s;u++)t[c+u]=a[u]}(u,l,h,f))}return i=[],r=[],{mergeRuns:function(){for(;o>1;){var t=o-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]<r[t+1]&&t--;else if(r[t]>r[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&r[t-1]<r[t+1]&&t--,s(t)}},pushRun:function(t,n){i[o]=t,r[o]=n,o+=1}}}(t,n),s=function(t){for(var n=0;t>=32;)n|=1&t,t>>=1;return t+n}(e);do{if((o=Hn(t,i,r,n))<s){var u=e;u>s&&(u=s),Yn(t,i,i+u,i+o,n),o=u}a.pushRun(i,o),a.mergeRuns(),e-=o,i+=o}while(0!==e);a.forceMergeRuns()}}}vt(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){Wn.prototype[t]=function(n){var i,r,e=n.zrX,o=n.zrY,a=jn(this,e,o);if("mouseup"===t&&a||(r=(i=this.findHover(e,o)).target),"mousedown"===t)this._downEl=r,this._downPoint=[n.zrX,n.zrY],this._upEl=r;else if("mouseup"===t)this._upEl=r;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||un(this._downPoint,[n.zrX,n.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,n)}}));var Zn=!1;function qn(){Zn||(Zn=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function $n(t,n){return t.zlevel===n.zlevel?t.z===n.z?t.z2-n.z2:t.z-n.z:t.zlevel-n.zlevel}var Kn=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=$n}return t.prototype.traverse=function(t,n){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,n)},t.prototype.getDisplayList=function(t,n){n=n||!1;var i=this._displayList;return!t&&i.length||this.updateDisplayList(n),i},t.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var n=this._roots,i=this._displayList,r=0,e=n.length;r<e;r++)this._updateAndAddDisplayable(n[r],null,t);i.length=this._displayListLen,Un(i,$n)},t.prototype._updateAndAddDisplayable=function(t,n,i){if(!t.ignore||i){t.beforeUpdate(),t.update(),t.afterUpdate();var r=t.getClipPath();if(t.ignoreClip)n=null;else if(r){n=n?n.slice():[];for(var e=r,o=t;e;)e.parent=o,e.updateTransform(),n.push(e),o=e,e=e.getClipPath()}if(t.childrenRef){for(var a=t.childrenRef(),s=0;s<a.length;s++){var u=a[s];t.__dirty&&(u.__dirty|=1),this._updateAndAddDisplayable(u,n,i)}t.__dirty=0}else{var l=t;n&&n.length?l.__clipPaths=n:l.__clipPaths&&l.__clipPaths.length>0&&(l.__clipPaths=[]),isNaN(l.z)&&(qn(),l.z=0),isNaN(l.z2)&&(qn(),l.z2=0),isNaN(l.zlevel)&&(qn(),l.zlevel=0),this._displayList[this._displayListLen++]=l}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,n,i);var f=t.getTextGuideLine();f&&this._updateAndAddDisplayable(f,n,i);var c=t.getTextContent();c&&this._updateAndAddDisplayable(c,n,i)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var n=0,i=t.length;n<i;n++)this.delRoot(t[n]);else{var r=ht(this._roots,t);r>=0&&this._roots.splice(r,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}();const Jn=W.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var Qn={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var n,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,n=.1):n=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/.4))},elasticOut:function(t){var n,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,n=.1):n=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var n,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,n=.1):n=.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){var n=1.70158;return t*t*((n+1)*t-n)},backOut:function(t){var n=1.70158;return--t*t*((n+1)*t+n)+1},backInOut:function(t){var n=2.5949095;return(t*=2)<1?t*t*((n+1)*t-n)*.5:.5*((t-=2)*t*((n+1)*t+n)+2)},bounceIn:function(t){return 1-Qn.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*Qn.bounceIn(2*t):.5*Qn.bounceOut(2*t-1)+.5}},ti=Math.pow,ni=Math.sqrt,ii=ni(3),ri=1/3,ei=$t(),oi=$t(),ai=$t();function si(t){return t>-1e-8&&t<1e-8}function ui(t){return t>1e-8||t<-1e-8}function li(t,n,i,r,e){var o=1-e;return o*o*(o*t+3*e*n)+e*e*(e*r+3*o*i)}function hi(t,n,i,r,e){var o=1-e;return 3*(((n-t)*o+2*(i-n)*e)*o+(r-i)*e*e)}function fi(t,n,i,r,e,o){var a=r+3*(n-i)-t,s=3*(i-2*n+t),u=3*(n-t),l=t-e,h=s*s-3*a*u,f=s*u-9*a*l,c=u*u-3*s*l,v=0;if(si(h)&&si(f))si(s)?o[0]=0:(k=-u/s)>=0&&k<=1&&(o[v++]=k);else{var d=f*f-4*h*c;if(si(d)){var p=f/h,m=-p/2;(k=-s/a+p)>=0&&k<=1&&(o[v++]=k),m>=0&&m<=1&&(o[v++]=m)}else if(d>0){var y=ni(d),g=h*s+1.5*a*(-f+y),b=h*s+1.5*a*(-f-y);(k=(-s-((g=g<0?-ti(-g,ri):ti(g,ri))+(b=b<0?-ti(-b,ri):ti(b,ri))))/(3*a))>=0&&k<=1&&(o[v++]=k)}else{var w=(2*h*s-3*a*f)/(2*ni(h*h*h)),x=Math.acos(w)/3,M=ni(h),S=Math.cos(x),k=(-s-2*M*S)/(3*a),A=(m=(-s+M*(S+ii*Math.sin(x)))/(3*a),(-s+M*(S-ii*Math.sin(x)))/(3*a));k>=0&&k<=1&&(o[v++]=k),m>=0&&m<=1&&(o[v++]=m),A>=0&&A<=1&&(o[v++]=A)}}return v}function ci(t,n,i,r,e){var o=6*i-12*n+6*t,a=9*n+3*r-3*t-9*i,s=3*n-3*t,u=0;if(si(a))ui(o)&&(h=-s/o)>=0&&h<=1&&(e[u++]=h);else{var l=o*o-4*a*s;if(si(l))e[0]=-o/(2*a);else if(l>0){var h,f=ni(l),c=(-o-f)/(2*a);(h=(-o+f)/(2*a))>=0&&h<=1&&(e[u++]=h),c>=0&&c<=1&&(e[u++]=c)}}return u}function vi(t,n,i,r,e,o){var a=(n-t)*e+t,s=(i-n)*e+n,u=(r-i)*e+i,l=(s-a)*e+a,h=(u-s)*e+s,f=(h-l)*e+l;o[0]=t,o[1]=a,o[2]=l,o[3]=f,o[4]=f,o[5]=h,o[6]=u,o[7]=r}function di(t,n,i,r,e,o,a,s,u,l,h){var f,c,v,d,p,m=.005,y=1/0;ei[0]=u,ei[1]=l;for(var g=0;g<1;g+=.05)oi[0]=li(t,i,e,a,g),oi[1]=li(n,r,o,s,g),(d=ln(ei,oi))<y&&(f=g,y=d);y=1/0;for(var b=0;b<32&&!(m<1e-4);b++)v=f+m,oi[0]=li(t,i,e,a,c=f-m),oi[1]=li(n,r,o,s,c),d=ln(oi,ei),c>=0&&d<y?(f=c,y=d):(ai[0]=li(t,i,e,a,v),ai[1]=li(n,r,o,s,v),p=ln(ai,ei),v<=1&&p<y?(f=v,y=p):m*=.5);return h&&(h[0]=li(t,i,e,a,f),h[1]=li(n,r,o,s,f)),ni(y)}function pi(t,n,i,r,e,o,a,s,u){for(var l=t,h=n,f=0,c=1/u,v=1;v<=u;v++){var d=v*c,p=li(t,i,e,a,d),m=li(n,r,o,s,d),y=p-l,g=m-h;f+=Math.sqrt(y*y+g*g),l=p,h=m}return f}function mi(t,n,i,r){var e=1-r;return e*(e*t+2*r*n)+r*r*i}function yi(t,n,i,r){return 2*((1-r)*(n-t)+r*(i-n))}function gi(t,n,i){var r=t+i-2*n;return 0===r?.5:(t-n)/r}function bi(t,n,i,r,e){var o=(n-t)*r+t,a=(i-n)*r+n,s=(a-o)*r+o;e[0]=t,e[1]=o,e[2]=s,e[3]=s,e[4]=a,e[5]=i}function wi(t,n,i,r,e,o,a,s,u){var l,h=.005,f=1/0;ei[0]=a,ei[1]=s;for(var c=0;c<1;c+=.05)oi[0]=mi(t,i,e,c),oi[1]=mi(n,r,o,c),(m=ln(ei,oi))<f&&(l=c,f=m);f=1/0;for(var v=0;v<32&&!(h<1e-4);v++){var d=l-h,p=l+h;oi[0]=mi(t,i,e,d),oi[1]=mi(n,r,o,d);var m=ln(oi,ei);if(d>=0&&m<f)l=d,f=m;else{ai[0]=mi(t,i,e,p),ai[1]=mi(n,r,o,p);var y=ln(ai,ei);p<=1&&y<f?(l=p,f=y):h*=.5}}return u&&(u[0]=mi(t,i,e,l),u[1]=mi(n,r,o,l)),ni(f)}function xi(t,n,i,r,e,o,a){for(var s=t,u=n,l=0,h=1/a,f=1;f<=a;f++){var c=f*h,v=mi(t,i,e,c),d=mi(n,r,o,c),p=v-s,m=d-u;l+=Math.sqrt(p*p+m*m),s=v,u=d}return l}var Mi=/cubic-bezier\(([0-9,\.e ]+)\)/;function Si(t){var n=t&&Mi.exec(t);if(n){var i=n[1].split(","),r=+Ft(i[0]),e=+Ft(i[1]),o=+Ft(i[2]),a=+Ft(i[3]);if(isNaN(r+e+o+a))return;var s=[];return function(t){return t<=0?0:t>=1?1:fi(0,r,o,1,t,s)&&li(0,e,a,1,s[0])}}}var ki=function(){function t(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||Gt,this.ondestroy=t.ondestroy||Gt,this.onrestart=t.onrestart||Gt,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,n){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var i=this._life,r=t-this._startTime-this._pausedTime,e=r/i;e<0&&(e=0),e=Math.min(e,1);var o=this.easingFunc,a=o?o(e):e;if(this.onframe(a),1===e){if(!this.loop)return!0;this._startTime=t-r%i,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=n},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=xt(t)?t:Qn[t]||Si(t)},t}(),Ai=function(t){this.value=t},Ni=function(){function t(){this._len=0}return t.prototype.insert=function(t){var n=new Ai(t);return this.insertEntry(n),n},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var n=t.prev,i=t.next;n?n.next=i:this.head=i,i?i.prev=n:this.tail=n,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),Ci=function(){function t(t){this._list=new Ni,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,n){var i=this._list,r=this._map,e=null;if(null==r[t]){var o=i.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=i.head;i.remove(s),delete r[s.key],e=s.value,this._lastRemovedEntry=s}a?a.value=n:a=new Ai(n),a.key=t,i.insertEntry(a),r[t]=a}return e},t.prototype.get=function(t){var n=this._map[t],i=this._list;if(null!=n)return n!==i.tail&&(i.remove(n),i.insertEntry(n)),n.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),Ti={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function zi(t){return(t=Math.round(t))<0?0:t>255?255:t}function Ii(t){return t<0?0:t>1?1:t}function Li(t){var n=t;return n.length&&"%"===n.charAt(n.length-1)?zi(parseFloat(n)/100*255):zi(parseInt(n,10))}function Oi(t){var n=t;return n.length&&"%"===n.charAt(n.length-1)?Ii(parseFloat(n)/100):Ii(parseFloat(n))}function Di(t,n,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(n-t)*i*6:2*i<1?n:3*i<2?t+(n-t)*(2/3-i)*6:t}function Ri(t,n,i){return t+(n-t)*i}function _i(t,n,i,r,e){return t[0]=n,t[1]=i,t[2]=r,t[3]=e,t}function Bi(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}var Fi=new Ci(20),Ei=null;function Pi(t,n){Ei&&Bi(Ei,n),Ei=Fi.put(t,Ei||n.slice())}function Wi(t,n){if(t){n=n||[];var i=Fi.get(t);if(i)return Bi(n,i);var r=(t+="").replace(/ /g,"").toLowerCase();if(r in Ti)return Bi(n,Ti[r]),Pi(t,n),n;var e,o=r.length;if("#"===r.charAt(0))return 4===o||5===o?(e=parseInt(r.slice(1,4),16))>=0&&e<=4095?(_i(n,(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,5===o?parseInt(r.slice(4),16)/15:1),Pi(t,n),n):void _i(n,0,0,0,1):7===o||9===o?(e=parseInt(r.slice(1,7),16))>=0&&e<=16777215?(_i(n,(16711680&e)>>16,(65280&e)>>8,255&e,9===o?parseInt(r.slice(7),16)/255:1),Pi(t,n),n):void _i(n,0,0,0,1):void 0;var a=r.indexOf("("),s=r.indexOf(")");if(-1!==a&&s+1===o){var u=r.substr(0,a),l=r.substr(a+1,s-(a+1)).split(","),h=1;switch(u){case"rgba":if(4!==l.length)return 3===l.length?_i(n,+l[0],+l[1],+l[2],1):_i(n,0,0,0,1);h=Oi(l.pop());case"rgb":return 3!==l.length?void _i(n,0,0,0,1):(_i(n,Li(l[0]),Li(l[1]),Li(l[2]),h),Pi(t,n),n);case"hsla":return 4!==l.length?void _i(n,0,0,0,1):(l[3]=Oi(l[3]),Vi(l,n),Pi(t,n),n);case"hsl":return 3!==l.length?void _i(n,0,0,0,1):(Vi(l,n),Pi(t,n),n);default:return}}_i(n,0,0,0,1)}}function Vi(t,n){var i=(parseFloat(t[0])%360+360)%360/360,r=Oi(t[1]),e=Oi(t[2]),o=e<=.5?e*(r+1):e+r-e*r,a=2*e-o;return _i(n=n||[],zi(255*Di(a,o,i+1/3)),zi(255*Di(a,o,i)),zi(255*Di(a,o,i-1/3)),1),4===t.length&&(n[3]=t[3]),n}function ji(t,n){var i=Wi(t);if(i){for(var r=0;r<3;r++)i[r]=n<0?i[r]*(1-n)|0:(255-i[r])*n+i[r]|0,i[r]>255?i[r]=255:i[r]<0&&(i[r]=0);return Gi(i,4===i.length?"rgba":"rgb")}}function Hi(t,n,i){if(n&&n.length&&t>=0&&t<=1){i=i||[];var r=t*(n.length-1),e=Math.floor(r),o=Math.ceil(r),a=n[e],s=n[o],u=r-e;return i[0]=zi(Ri(a[0],s[0],u)),i[1]=zi(Ri(a[1],s[1],u)),i[2]=zi(Ri(a[2],s[2],u)),i[3]=Ii(Ri(a[3],s[3],u)),i}}function Yi(t,n,i,r){var e=Wi(t);if(t)return e=function(t){if(t){var n,i,r=t[0]/255,e=t[1]/255,o=t[2]/255,a=Math.min(r,e,o),s=Math.max(r,e,o),u=s-a,l=(s+a)/2;if(0===u)n=0,i=0;else{i=l<.5?u/(s+a):u/(2-s-a);var h=((s-r)/6+u/2)/u,f=((s-e)/6+u/2)/u,c=((s-o)/6+u/2)/u;r===s?n=c-f:e===s?n=1/3+h-c:o===s&&(n=2/3+f-h),n<0&&(n+=1),n>1&&(n-=1)}var v=[360*n,i,l];return null!=t[3]&&v.push(t[3]),v}}(e),null!=n&&(e[0]=function(t){return(t=Math.round(t))<0?0:t>360?360:t}(n)),null!=i&&(e[1]=Oi(i)),null!=r&&(e[2]=Oi(r)),Gi(Vi(e),"rgba")}function Xi(t,n){var i=Wi(t);if(i&&null!=n)return i[3]=Ii(n),Gi(i,"rgba")}function Gi(t,n){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==n&&"hsva"!==n&&"hsla"!==n||(i+=","+t[3]),n+"("+i+")"}}function Ui(t,n){var i=Wi(t);return i?(.299*i[0]+.587*i[1]+.114*i[2])*i[3]/255+(1-i[3])*n:0}var Zi=Math.round;function qi(t){var n;if(t&&"transparent"!==t){if("string"==typeof t&&t.indexOf("rgba")>-1){var i=Wi(t);i&&(t="rgb("+i[0]+","+i[1]+","+i[2]+")",n=i[3])}}else t="none";return{color:t,opacity:null==n?1:n}}function $i(t){return t<1e-4&&t>-1e-4}function Ki(t){return Zi(1e3*t)/1e3}function Ji(t){return Zi(1e4*t)/1e4}var Qi={left:"start",right:"end",center:"middle",middle:"middle"};function tr(t){return t&&!!t.image}function nr(t){return"linear"===t.type}function ir(t){return"radial"===t.type}function rr(t){return"url(#"+t+")"}function er(t){var n=t.getGlobalScale(),i=Math.max(n[0],n[1]);return Math.max(Math.ceil(Math.log(i)/Math.log(10)),1)}function or(t){var n=t.x||0,i=t.y||0,r=(t.rotation||0)*Ut,e=Ot(t.scaleX,1),o=Ot(t.scaleY,1),a=t.skewX||0,s=t.skewY||0,u=[];return(n||i)&&u.push("translate("+n+"px,"+i+"px)"),r&&u.push("rotate("+r+")"),1===e&&1===o||u.push("scale("+e+","+o+")"),(a||s)&&u.push("skew("+Zi(a*Ut)+"deg, "+Zi(s*Ut)+"deg)"),u.join(" ")}var ar=W.hasGlobalWindow&&xt(window.btoa)?function(t){return window.btoa(unescape(t))}:"undefined"!=typeof Buffer?function(t){return Buffer.from(t).toString("base64")}:function(){return null},sr=Array.prototype.slice;function ur(t,n,i){return(n-t)*i+t}function lr(t,n,i,r){for(var e=n.length,o=0;o<e;o++)t[o]=ur(n[o],i[o],r);return t}function hr(t,n,i,r){for(var e=n.length,o=0;o<e;o++)t[o]=n[o]+i[o]*r;return t}function fr(t,n,i,r){for(var e=n.length,o=e&&n[0].length,a=0;a<e;a++){t[a]||(t[a]=[]);for(var s=0;s<o;s++)t[a][s]=n[a][s]+i[a][s]*r}return t}function cr(t,n){for(var i=t.length,r=n.length,e=i>r?n:t,o=Math.min(i,r),a=e[o-1]||{color:[0,0,0,0],offset:0},s=o;s<Math.max(i,r);s++)e.push({offset:a.offset,color:a.color.slice()})}function vr(t,n,i){var r=t,e=n;if(r.push&&e.push){var o=r.length,a=e.length;if(o!==a)if(o>a)r.length=a;else for(var s=o;s<a;s++)r.push(1===i?e[s]:sr.call(e[s]));var u=r[0]&&r[0].length;for(s=0;s<r.length;s++)if(1===i)isNaN(r[s])&&(r[s]=e[s]);else for(var l=0;l<u;l++)isNaN(r[s][l])&&(r[s][l]=e[s][l])}}function dr(t){if(ct(t)){var n=t.length;if(ct(t[0])){for(var i=[],r=0;r<n;r++)i.push(sr.call(t[r]));return i}return sr.call(t)}return t}function pr(t){return t[0]=Math.floor(t[0])||0,t[1]=Math.floor(t[1])||0,t[2]=Math.floor(t[2])||0,t[3]=null==t[3]?1:t[3],"rgba("+t.join(",")+")"}function mr(t){return 4===t||5===t}function yr(t){return 1===t||2===t}var gr=[0,0,0,0],br=function(){function t(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return t.prototype.isFinished=function(){return this._finished},t.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},t.prototype.needsAnimate=function(){return this.keyframes.length>=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,n,i){this._needsSort=!0;var r=this.keyframes,e=r.length,o=!1,a=6,s=n;if(ct(n)){var u=function(t){return ct(t&&t[0])?2:1}(n);a=u,(1===u&&!kt(n[0])||2===u&&!kt(n[0][0]))&&(o=!0)}else if(kt(n)&&!It(n))a=0;else if(Mt(n))if(isNaN(+n)){var l=Wi(n);l&&(s=l,a=3)}else a=0;else if(zt(n)){var h=ut({},s);h.colorStops=dt(n.colorStops,(function(t){return{offset:t.offset,color:Wi(t.color)}})),nr(n)?a=4:ir(n)&&(a=5),s=h}0===e?this.valType=a:a===this.valType&&6!==a||(o=!0),this.discrete=this.discrete||o;var f={time:t,value:s,rawValue:n,percent:0};return i&&(f.easing=i,f.easingFunc=xt(i)?i:Qn[i]||Si(i)),r.push(f),f},t.prototype.prepare=function(t,n){var i=this.keyframes;this._needsSort&&i.sort((function(t,n){return t.time-n.time}));for(var r=this.valType,e=i.length,o=i[e-1],a=this.discrete,s=yr(r),u=mr(r),l=0;l<e;l++){var h=i[l],f=h.value,c=o.value;h.percent=h.time/t,a||(s&&l!==e-1?vr(f,c,r):u&&cr(f.colorStops,c.colorStops))}if(!a&&5!==r&&n&&this.needsAnimate()&&n.needsAnimate()&&r===n.valType&&!n._finished){this._additiveTrack=n;var v=i[0].value;for(l=0;l<e;l++)0===r?i[l].additiveValue=i[l].value-v:3===r?i[l].additiveValue=hr([],i[l].value,v,-1):yr(r)&&(i[l].additiveValue=1===r?hr([],i[l].value,v,-1):fr([],i[l].value,v,-1))}},t.prototype.step=function(t,n){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var i,r,e,o=null!=this._additiveTrack,a=o?"additiveValue":"value",s=this.valType,u=this.keyframes,l=u.length,h=this.propName,f=3===s,c=this._lastFr,v=Math.min;if(1===l)r=e=u[0];else{if(n<0)i=0;else if(n<this._lastFrP){for(i=v(c+1,l-1);i>=0&&!(u[i].percent<=n);i--);i=v(i,l-2)}else{for(i=c;i<l&&!(u[i].percent>n);i++);i=v(i-1,l-2)}e=u[i+1],r=u[i]}if(r&&e){this._lastFr=i,this._lastFrP=n;var d=e.percent-r.percent,p=0===d?1:v((n-r.percent)/d,1);e.easingFunc&&(p=e.easingFunc(p));var m=o?this._additiveValue:f?gr:t[h];if(!yr(s)&&!f||m||(m=this._additiveValue=[]),this.discrete)t[h]=p<1?r.rawValue:e.rawValue;else if(yr(s))1===s?lr(m,r[a],e[a],p):function(t,n,i,r){for(var e=n.length,o=e&&n[0].length,a=0;a<e;a++){t[a]||(t[a]=[]);for(var s=0;s<o;s++)t[a][s]=ur(n[a][s],i[a][s],r)}}(m,r[a],e[a],p);else if(mr(s)){var y=r[a],g=e[a],b=4===s;t[h]={type:b?"linear":"radial",x:ur(y.x,g.x,p),y:ur(y.y,g.y,p),colorStops:dt(y.colorStops,(function(t,n){var i=g.colorStops[n];return{offset:ur(t.offset,i.offset,p),color:pr(lr([],t.color,i.color,p))}})),global:g.global},b?(t[h].x2=ur(y.x2,g.x2,p),t[h].y2=ur(y.y2,g.y2,p)):t[h].r=ur(y.r,g.r,p)}else if(f)lr(m,r[a],e[a],p),o||(t[h]=pr(m));else{var w=ur(r[a],e[a],p);o?this._additiveValue=w:t[h]=w}o&&this._addToTarget(t)}}},t.prototype._addToTarget=function(t){var n=this.valType,i=this.propName,r=this._additiveValue;0===n?t[i]=t[i]+r:3===n?(Wi(t[i],gr),hr(gr,gr,r,1),t[i]=pr(gr)):1===n?hr(t[i],t[i],r,1):2===n&&fr(t[i],t[i],r,1)},t}(),wr=function(){function t(t,n,i,r){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=n,n&&r?et("Can' use additive animation on looped animation."):(this._additiveAnimators=r,this._allowDiscrete=i)}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(t){this._target=t},t.prototype.when=function(t,n,i){return this.whenWithKeys(t,n,yt(n),i)},t.prototype.whenWithKeys=function(t,n,i,r){for(var e=this._tracks,o=0;o<i.length;o++){var a=i[o],s=e[a];if(!s){s=e[a]=new br(a);var u=void 0,l=this._getAdditiveTrack(a);if(l){var h=l.keyframes,f=h[h.length-1];u=f&&f.value,3===l.valType&&u&&(u=pr(u))}else u=this._target[a];if(null==u)continue;t>0&&s.addKeyframe(0,dr(u),r),this._trackKeys.push(a)}s.addKeyframe(t,dr(n[a]),r)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var n=t.length,i=0;i<n;i++)t[i].call(this)},t.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,n=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,n)for(var i=0;i<n.length;i++)n[i].call(this)},t.prototype._setTracksFinished=function(){for(var t=this._tracks,n=this._trackKeys,i=0;i<n.length;i++)t[n[i]].setFinished()},t.prototype._getAdditiveTrack=function(t){var n,i=this._additiveAnimators;if(i)for(var r=0;r<i.length;r++){var e=i[r].getTrack(t);e&&(n=e)}return n},t.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var n=this,i=[],r=this._maxTime||0,e=0;e<this._trackKeys.length;e++){var o=this._trackKeys[e],a=this._tracks[o],s=this._getAdditiveTrack(o),u=a.keyframes,l=u.length;if(a.prepare(r,s),a.needsAnimate())if(!this._allowDiscrete&&a.discrete){var h=u[l-1];h&&(n._target[a.propName]=h.rawValue),a.setFinished()}else i.push(a)}if(i.length||this._force){var f=new ki({life:r,loop:this._loop,delay:this._delay||0,onframe:function(t){n._started=2;var r=n._additiveAnimators;if(r){for(var e=!1,o=0;o<r.length;o++)if(r[o]._clip){e=!0;break}e||(n._additiveAnimators=null)}for(o=0;o<i.length;o++)i[o].step(n._target,t);var a=n._onframeCbs;if(a)for(o=0;o<a.length;o++)a[o](n._target,t)},ondestroy:function(){n._doneCallback()}});this._clip=f,this.animation&&this.animation.addClip(f),t&&f.setEasing(t)}else this._doneCallback();return this}},t.prototype.stop=function(t){this._clip&&(t&&this._clip.onframe(1),this._abortedCallback())},t.prototype.delay=function(t){return this._delay=t,this},t.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},t.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},t.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},t.prototype.getClip=function(){return this._clip},t.prototype.getTrack=function(t){return this._tracks[t]},t.prototype.getTracks=function(){var t=this;return dt(this._trackKeys,(function(n){return t._tracks[n]}))},t.prototype.stopTracks=function(t,n){if(!t.length||!this._clip)return!0;for(var i=this._tracks,r=this._trackKeys,e=0;e<t.length;e++){var o=i[t[e]];o&&!o.isFinished()&&(n?o.step(this._target,1):1===this._started&&o.step(this._target,0),o.setFinished())}var a=!0;for(e=0;e<r.length;e++)if(!i[r[e]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},t.prototype.saveTo=function(t,n,i){if(t){n=n||this._trackKeys;for(var r=0;r<n.length;r++){var e=n[r],o=this._tracks[e];if(o&&!o.isFinished()){var a=o.keyframes,s=a[i?0:a.length-1];s&&(t[e]=dr(s.rawValue))}}}},t.prototype.__changeFinalValue=function(t,n){n=n||yt(t);for(var i=0;i<n.length;i++){var r=n[i],e=this._tracks[r];if(e){var o=e.keyframes;if(o.length>1){var a=o.pop();e.addKeyframe(a.time,t[r]),e.prepare(this._maxTime,e.getAdditiveTrack())}}}},t}();function xr(){return(new Date).getTime()}var Mr,Sr,kr=function(t){function n(n){var i=t.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,i.stage=(n=n||{}).stage||{},i}return qt(n,t),n.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},n.prototype.addAnimator=function(t){t.animation=this;var n=t.getClip();n&&this.addClip(n)},n.prototype.removeClip=function(t){if(t.animation){var n=t.prev,i=t.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,t.next=t.prev=t.animation=null}},n.prototype.removeAnimator=function(t){var n=t.getClip();n&&this.removeClip(n),t.animation=null},n.prototype.update=function(t){for(var n=xr()-this._pausedTime,i=n-this._time,r=this._head;r;){var e=r.next;r.step(n,i)?(r.ondestroy(),this.removeClip(r),r=e):r=e}this._time=n,t||(this.trigger("frame",i),this.stage.update&&this.stage.update())},n.prototype._startLoop=function(){var t=this;this._running=!0,Jn((function n(){t._running&&(Jn(n),!t._paused&&t.update())}))},n.prototype.start=function(){this._running||(this._time=xr(),this._pausedTime=0,this._startLoop())},n.prototype.stop=function(){this._running=!1},n.prototype.pause=function(){this._paused||(this._pauseStart=xr(),this._paused=!0)},n.prototype.resume=function(){this._paused&&(this._pausedTime+=xr()-this._pauseStart,this._paused=!1)},n.prototype.clear=function(){for(var t=this._head;t;){var n=t.next;t.prev=t.next=t.animation=null,t=n}this._head=this._tail=null},n.prototype.isFinished=function(){return null==this._head},n.prototype.animate=function(t,n){n=n||{},this.start();var i=new wr(t,n.loop);return this.addAnimator(i),i},n}(mn),Ar=W.domSupported,Nr=(Sr={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Mr=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:dt(Mr,(function(t){var n=t.replace("mouse","pointer");return Sr.hasOwnProperty(n)?n:t}))}),Cr=["mousemove","mouseup"],Tr=["pointermove","pointerup"],zr=!1;function Ir(t){var n=t.pointerType;return"pen"===n||"touch"===n}function Lr(t){t&&(t.zrByTouch=!0)}function Or(t,n){for(var i=n,r=!1;i&&9!==i.nodeType&&!(r=i.domBelongToZr||i!==n&&i===t.painterRoot);)i=i.parentNode;return r}var Dr=function(t,n){this.stopPropagation=Gt,this.stopImmediatePropagation=Gt,this.preventDefault=Gt,this.type=n.type,this.target=this.currentTarget=t.dom,this.pointerType=n.pointerType,this.clientX=n.clientX,this.clientY=n.clientY},Rr={mousedown:function(t){t=zn(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=zn(this.dom,t);var n=this.__mayPointerCapture;!n||t.zrX===n[0]&&t.zrY===n[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=zn(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){Or(this,(t=zn(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){zr=!0,t=zn(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){zr||(t=zn(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){Lr(t=zn(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Rr.mousemove.call(this,t),Rr.mousedown.call(this,t)},touchmove:function(t){Lr(t=zn(this.dom,t)),this.handler.processGesture(t,"change"),Rr.mousemove.call(this,t)},touchend:function(t){Lr(t=zn(this.dom,t)),this.handler.processGesture(t,"end"),Rr.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&Rr.click.call(this,t)},pointerdown:function(t){Rr.mousedown.call(this,t)},pointermove:function(t){Ir(t)||Rr.mousemove.call(this,t)},pointerup:function(t){Rr.mouseup.call(this,t)},pointerout:function(t){Ir(t)||Rr.mouseout.call(this,t)}};vt(["click","dblclick","contextmenu"],(function(t){Rr[t]=function(n){n=zn(this.dom,n),this.trigger(t,n)}}));var _r={pointermove:function(t){Ir(t)||_r.mousemove.call(this,t)},pointerup:function(t){_r.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var n=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),n&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function Br(t,n,i,r){t.mounted[n]=i,t.listenerOpts[n]=r,In(t.domTarget,n,i,r)}function Fr(t){var n=t.mounted;for(var i in n)n.hasOwnProperty(i)&&t.domTarget.removeEventListener(i,n[i],t.listenerOpts[i]);t.mounted={}}var Er=function(t,n){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=n},Pr=function(t){function n(n,i){var r,e,o,a=t.call(this)||this;return a.__pointerCapturing=!1,a.dom=n,a.painterRoot=i,a._localHandlerScope=new Er(n,Rr),Ar&&(a._globalHandlerScope=new Er(document,_r)),r=a,o=(e=a._localHandlerScope).domHandlers,W.pointerEventsSupported?vt(Nr.pointer,(function(t){Br(e,t,(function(n){o[t].call(r,n)}))})):(W.touchEventsSupported&&vt(Nr.touch,(function(t){Br(e,t,(function(n){o[t].call(r,n),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),vt(Nr.mouse,(function(t){Br(e,t,(function(n){n=Tn(n),e.touching||o[t].call(r,n)}))}))),a}return qt(n,t),n.prototype.dispose=function(){Fr(this._localHandlerScope),Ar&&Fr(this._globalHandlerScope)},n.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},n.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,Ar&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var n=this._globalHandlerScope;t?function(t,n){function i(i){Br(n,i,(function(r){r=Tn(r),Or(t,r.target)||(r=function(t,n){return zn(t.dom,new Dr(t,n),!0)}(t,r),n.domHandlers[i].call(t,r))}),{capture:!0})}W.pointerEventsSupported?vt(Tr,i):W.touchEventsSupported||vt(Cr,i)}(this,n):Fr(n)}},n}(mn),Wr=1;W.hasGlobalWindow&&(Wr=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Vr=Wr;function jr(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Hr(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t}function Yr(t,n,i){var r=n[1]*i[0]+n[3]*i[1],e=n[0]*i[2]+n[2]*i[3],o=n[1]*i[2]+n[3]*i[3],a=n[0]*i[4]+n[2]*i[5]+n[4],s=n[1]*i[4]+n[3]*i[5]+n[5];return t[0]=n[0]*i[0]+n[2]*i[1],t[1]=r,t[2]=e,t[3]=o,t[4]=a,t[5]=s,t}function Xr(t,n,i){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4]+i[0],t[5]=n[5]+i[1],t}function Gr(t,n,i){var r=n[0],e=n[2],o=n[4],a=n[1],s=n[3],u=n[5],l=Math.sin(i),h=Math.cos(i);return t[0]=r*h+a*l,t[1]=-r*l+a*h,t[2]=e*h+s*l,t[3]=-e*l+h*s,t[4]=h*o+l*u,t[5]=h*u-l*o,t}function Ur(t,n,i){var r=i[0],e=i[1];return t[0]=n[0]*r,t[1]=n[1]*e,t[2]=n[2]*r,t[3]=n[3]*e,t[4]=n[4]*r,t[5]=n[5]*e,t}function Zr(t,n){var i=n[0],r=n[2],e=n[4],o=n[1],a=n[3],s=n[5],u=i*a-o*r;return u?(t[0]=a*(u=1/u),t[1]=-o*u,t[2]=-r*u,t[3]=i*u,t[4]=(r*s-a*e)*u,t[5]=(o*e-i*s)*u,t):null}var qr=jr;function $r(t){return t>5e-5||t<-5e-5}var Kr=[],Jr=[],Qr=[1,0,0,1,0,0],te=Math.abs,ne=function(){function t(){}return t.prototype.getLocalTransform=function(n){return t.getLocalTransform(this,n)},t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return $r(this.rotation)||$r(this.x)||$r(this.y)||$r(this.scaleX-1)||$r(this.scaleY-1)||$r(this.skewX)||$r(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,n=this.needLocalTransform(),i=this.transform;n||t?(i=i||[1,0,0,1,0,0],n?this.getLocalTransform(i):qr(i),t&&(n?Yr(i,t,i):Hr(i,t)),this.transform=i,this._resolveGlobalScaleRatio(i)):i&&qr(i)},t.prototype._resolveGlobalScaleRatio=function(t){var n=this.globalScaleRatio;if(null!=n&&1!==n){this.getGlobalScale(Kr);var i=Kr[0]<0?-1:1,r=Kr[1]<0?-1:1,e=((Kr[0]-i)*n+i)/Kr[0]||0,o=((Kr[1]-r)*n+r)/Kr[1]||0;t[0]*=e,t[1]*=e,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],Zr(this.invTransform,t)},t.prototype.getComputedTransform=function(){for(var t=this,n=[];t;)n.push(t),t=t.parent;for(;t=n.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var n=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],r=Math.atan2(t[1],t[0]),e=Math.PI/2+r-Math.atan2(t[3],t[2]);i=Math.sqrt(i)*Math.cos(e),n=Math.sqrt(n),this.skewX=e,this.skewY=0,this.rotation=-r,this.x=+t[4],this.y=+t[5],this.scaleX=n,this.scaleY=i,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,n=this.transform;t&&t.transform&&(Yr(Jr,t.invTransform,n),n=Jr);var i=this.originX,r=this.originY;(i||r)&&(Qr[4]=i,Qr[5]=r,Yr(Jr,n,Qr),Jr[4]-=i,Jr[5]-=r,n=Jr),this.setLocalTransform(n)}},t.prototype.getGlobalScale=function(t){var n=this.transform;return t=t||[],n?(t[0]=Math.sqrt(n[0]*n[0]+n[1]*n[1]),t[1]=Math.sqrt(n[2]*n[2]+n[3]*n[3]),n[0]<0&&(t[0]=-t[0]),n[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,n){var i=[t,n],r=this.invTransform;return r&&fn(i,i,r),i},t.prototype.transformCoordToGlobal=function(t,n){var i=[t,n],r=this.transform;return r&&fn(i,i,r),i},t.prototype.getLineScale=function(){var t=this.transform;return t&&te(t[0]-1)>1e-10&&te(t[3]-1)>1e-10?Math.sqrt(te(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){re(this,t)},t.getLocalTransform=function(t,n){n=n||[];var i=t.originX||0,r=t.originY||0,e=t.scaleX,o=t.scaleY,a=t.anchorX,s=t.anchorY,u=t.rotation||0,l=t.x,h=t.y,f=t.skewX?Math.tan(t.skewX):0,c=t.skewY?Math.tan(-t.skewY):0;if(i||r||a||s){var v=i+a,d=r+s;n[4]=-v*e-f*d*o,n[5]=-d*o-c*v*e}else n[4]=n[5]=0;return n[0]=e,n[3]=o,n[1]=c*e,n[2]=f*o,u&&Gr(n,n,u),n[4]+=i+l,n[5]+=r+h,n},t.initDefaultProps=function(){var n=t.prototype;n.scaleX=n.scaleY=n.globalScaleRatio=1,n.x=n.y=n.originX=n.originY=n.skewX=n.skewY=n.rotation=n.anchorX=n.anchorY=0}(),t}(),ie=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function re(t,n){for(var i=0;i<ie.length;i++){var r=ie[i];t[r]=n[r]}}var ee=function(){function t(t,n){this.x=t||0,this.y=n||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,n){return this.x=t,this.y=n,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,n){this.x+=t.x*n,this.y+=t.y*n},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var n=this.x-t.x,i=this.y-t.y;return Math.sqrt(n*n+i*i)},t.prototype.distanceSquare=function(t){var n=this.x-t.x,i=this.y-t.y;return n*n+i*i},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var n=this.x,i=this.y;return this.x=t[0]*n+t[2]*i+t[4],this.y=t[1]*n+t[3]*i+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,n,i){t.x=n,t.y=i},t.copy=function(t,n){t.x=n.x,t.y=n.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,n){return t.x*n.x+t.y*n.y},t.add=function(t,n,i){t.x=n.x+i.x,t.y=n.y+i.y},t.sub=function(t,n,i){t.x=n.x-i.x,t.y=n.y-i.y},t.scale=function(t,n,i){t.x=n.x*i,t.y=n.y*i},t.scaleAndAdd=function(t,n,i,r){t.x=n.x+i.x*r,t.y=n.y+i.y*r},t.lerp=function(t,n,i,r){var e=1-r;t.x=e*n.x+r*i.x,t.y=e*n.y+r*i.y},t}(),oe=Math.min,ae=Math.max,se=new ee,ue=new ee,le=new ee,he=new ee,fe=new ee,ce=new ee,ve=function(){function t(t,n,i,r){i<0&&(t+=i,i=-i),r<0&&(n+=r,r=-r),this.x=t,this.y=n,this.width=i,this.height=r}return t.prototype.union=function(t){var n=oe(t.x,this.x),i=oe(t.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?ae(t.x+t.width,this.x+this.width)-n:t.width,this.height=isFinite(this.y)&&isFinite(this.height)?ae(t.y+t.height,this.y+this.height)-i:t.height,this.x=n,this.y=i},t.prototype.applyTransform=function(n){t.applyTransform(this,this,n)},t.prototype.calculateTransform=function(t){var n=this,i=t.width/n.width,r=t.height/n.height,e=[1,0,0,1,0,0];return Xr(e,e,[-n.x,-n.y]),Ur(e,e,[i,r]),Xr(e,e,[t.x,t.y]),e},t.prototype.intersect=function(n,i){if(!n)return!1;n instanceof t||(n=t.create(n));var r=this,e=r.x,o=r.x+r.width,a=r.y,s=r.y+r.height,u=n.x,l=n.x+n.width,h=n.y,f=n.y+n.height,c=!(o<u||l<e||s<h||f<a);if(i){var v=1/0,d=0,p=Math.abs(o-u),m=Math.abs(l-e),y=Math.abs(s-h),g=Math.abs(f-a),b=Math.min(p,m),w=Math.min(y,g);o<u||l<e?b>d&&(d=b,ee.set(ce,p<m?-p:m,0)):b<v&&(v=b,ee.set(fe,p<m?p:-m,0)),s<h||f<a?w>d&&(d=w,ee.set(ce,0,y<g?-y:g)):b<v&&(v=b,ee.set(fe,0,y<g?y:-g))}return i&&ee.copy(i,c?fe:ce),c},t.prototype.contain=function(t,n){var i=this;return t>=i.x&&t<=i.x+i.width&&n>=i.y&&n<=i.y+i.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(n){t.copy(this,n)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(n){return new t(n.x,n.y,n.width,n.height)},t.copy=function(t,n){t.x=n.x,t.y=n.y,t.width=n.width,t.height=n.height},t.applyTransform=function(n,i,r){if(r){if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var e=r[0],o=r[3],a=r[5];return n.x=i.x*e+r[4],n.y=i.y*o+a,n.width=i.width*e,n.height=i.height*o,n.width<0&&(n.x+=n.width,n.width=-n.width),void(n.height<0&&(n.y+=n.height,n.height=-n.height))}se.x=le.x=i.x,se.y=he.y=i.y,ue.x=he.x=i.x+i.width,ue.y=le.y=i.y+i.height,se.transform(r),he.transform(r),ue.transform(r),le.transform(r),n.x=oe(se.x,ue.x,le.x,he.x),n.y=oe(se.y,ue.y,le.y,he.y);var s=ae(se.x,ue.x,le.x,he.x),u=ae(se.y,ue.y,le.y,he.y);n.width=s-n.x,n.height=u-n.y}else n!==i&&t.copy(n,i)},t}(),de={};function pe(t,n){var i=de[n=n||H];i||(i=de[n]=new Ci(500));var r=i.get(t);return null==r&&(r=X.measureText(t,n).width,i.put(t,r)),r}function me(t,n,i,r){var e=pe(t,n),o=we(n),a=ge(0,e,i),s=be(0,o,r);return new ve(a,s,e,o)}function ye(t,n,i,r){var e=((t||"")+"").split("\n");if(1===e.length)return me(e[0],n,i,r);for(var o=new ve(0,0,0,0),a=0;a<e.length;a++){var s=me(e[a],n,i,r);0===a?o.copy(s):o.union(s)}return o}function ge(t,n,i){return"right"===i?t-=n:"center"===i&&(t-=n/2),t}function be(t,n,i){return"middle"===i?t-=n/2:"bottom"===i&&(t-=n),t}function we(t){return pe("国",t)}function xe(t,n){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*n:parseFloat(t):t}function Me(t,n,i){var r=n.position||"inside",e=null!=n.distance?n.distance:5,o=i.height,a=i.width,s=o/2,u=i.x,l=i.y,h="left",f="top";if(r instanceof Array)u+=xe(r[0],i.width),l+=xe(r[1],i.height),h=null,f=null;else switch(r){case"left":u-=e,l+=s,h="right",f="middle";break;case"right":u+=e+a,l+=s,f="middle";break;case"top":u+=a/2,l-=e,h="center",f="bottom";break;case"bottom":u+=a/2,l+=o+e,h="center";break;case"inside":u+=a/2,l+=s,h="center",f="middle";break;case"insideLeft":u+=e,l+=s,f="middle";break;case"insideRight":u+=a-e,l+=s,h="right",f="middle";break;case"insideTop":u+=a/2,l+=e,h="center";break;case"insideBottom":u+=a/2,l+=o-e,h="center",f="bottom";break;case"insideTopLeft":u+=e,l+=e;break;case"insideTopRight":u+=a-e,l+=e,h="right";break;case"insideBottomLeft":u+=e,l+=o-e,f="bottom";break;case"insideBottomRight":u+=a-e,l+=o-e,h="right",f="bottom"}return(t=t||{}).x=u,t.y=l,t.align=h,t.verticalAlign=f,t}var Se=ie.concat(["ignore"]),ke=pt(ie,(function(t,n){return t[n]=!0,t}),{ignore:!1}),Ae={},Ne=new ve(0,0,0,0),Ce=function(){function t(t){this.id=rt(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,n){switch(this.draggable){case"horizontal":n=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=n,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var n=this._textContent;if(n&&(!n.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,r=i.local,e=n.innerTransformable,o=void 0,a=void 0,s=!1;e.parent=r?this:null;var u=!1;if(e.copyTransform(n),null!=i.position){var l=Ne;l.copy(i.layoutRect?i.layoutRect:this.getBoundingRect()),r||l.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Ae,i,l):Me(Ae,i,l),e.x=Ae.x,e.y=Ae.y,o=Ae.align,a=Ae.verticalAlign;var h=i.origin;if(h&&null!=i.rotation){var f=void 0,c=void 0;"center"===h?(f=.5*l.width,c=.5*l.height):(f=xe(h[0],l.width),c=xe(h[1],l.height)),u=!0,e.originX=-e.x+f+(r?0:l.x),e.originY=-e.y+c+(r?0:l.y)}}null!=i.rotation&&(e.rotation=i.rotation);var v=i.offset;v&&(e.x+=v[0],e.y+=v[1],u||(e.originX=-v[0],e.originY=-v[1]));var d=null==i.inside?"string"==typeof i.position&&i.position.indexOf("inside")>=0:i.inside,p=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,y=void 0,g=void 0;d&&this.canBeInsideText()?(y=i.insideStroke,null!=(m=i.insideFill)&&"auto"!==m||(m=this.getInsideTextFill()),null!=y&&"auto"!==y||(y=this.getInsideTextStroke(m),g=!0)):(y=i.outsideStroke,null!=(m=i.outsideFill)&&"auto"!==m||(m=this.getOutsideFill()),null!=y&&"auto"!==y||(y=this.getOutsideStroke(m),g=!0)),(m=m||"#000")===p.fill&&y===p.stroke&&g===p.autoStroke&&o===p.align&&a===p.verticalAlign||(s=!0,p.fill=m,p.stroke=y,p.autoStroke=g,p.align=o,p.verticalAlign=a,n.setDefaultTextStyle(p)),n.__dirty|=1,s&&n.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?"#ccc":"#333"},t.prototype.getOutsideStroke=function(){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&Wi(t);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),e=0;e<3;e++)n[e]=n[e]*i+(r?0:255)*(1-i);return n[3]=1,Gi(n,"rgba")},t.prototype.traverse=function(){},t.prototype.attrKV=function(t,n){"textConfig"===t?this.setTextConfig(n):"textContent"===t?this.setTextContent(n):"clipPath"===t?this.setClipPath(n):"extra"===t?(this.extra=this.extra||{},ut(this.extra,n)):this[t]=n},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,n){if("string"==typeof t)this.attrKV(t,n);else if(At(t))for(var i=yt(t),r=0;r<i.length;r++){var e=i[r];this.attrKV(e,t[e])}return this.markRedraw(),this},t.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var n=this._normalState,i=0;i<this.animators.length;i++){var r=this.animators[i],e=r.__fromStateTransition;if(!(r.getLoop()||e&&"__zr_normal__"!==e)){var o=r.targetName;r.saveTo(o?n[o]:n)}}},t.prototype._innerSaveToNormal=function(t){var n=this._normalState;n||(n=this._normalState={}),t.textConfig&&!n.textConfig&&(n.textConfig=this.textConfig),this._savePrimaryToNormal(t,n,Se)},t.prototype._savePrimaryToNormal=function(t,n,i){for(var r=0;r<i.length;r++){var e=i[r];null==t[e]||e in n||(n[e]=this[e])}},t.prototype.hasState=function(){return this.currentStates.length>0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var n=this.states;return n[t]||(n[t]={}),n[t]},t.prototype.clearStates=function(t){this.useState("__zr_normal__",!1,t)},t.prototype.useState=function(t,n,i,r){var e="__zr_normal__"===t;if(this.hasState()||!e){var o=this.currentStates,a=this.stateTransition;if(!(ht(o,t)>=0)||!n&&1!==o.length){var s;if(this.stateProxy&&!e&&(s=this.stateProxy(t)),s||(s=this.states&&this.states[t]),s||e){e||this.saveCurrentToNormalState(s);var u=!!(s&&s.hoverLayer||r);u&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,s,this._normalState,n,!i&&!this.__inHover&&a&&a.duration>0,a);var l=this._textContent,h=this._textGuide;return l&&l.useState(t,n,i,u),h&&h.useState(t,n,i,u),e?(this.currentStates=[],this._normalState={}):n?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!u&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}et("State "+t+" not exists.")}}},t.prototype.useStates=function(t,n,i){if(t.length){var r=[],e=this.currentStates,o=t.length,a=o===e.length;if(a)for(var s=0;s<o;s++)if(t[s]!==e[s]){a=!1;break}if(a)return;for(s=0;s<o;s++){var u=t[s],l=void 0;this.stateProxy&&(l=this.stateProxy(u,t)),l||(l=this.states[u]),l&&r.push(l)}var h=r[o-1],f=!!(h&&h.hoverLayer||i);f&&this._toggleHoverLayerFlag(!0);var c=this._mergeStates(r),v=this.stateTransition;this.saveCurrentToNormalState(c),this._applyStateObj(t.join(","),c,this._normalState,!1,!n&&!this.__inHover&&v&&v.duration>0,v);var d=this._textContent,p=this._textGuide;d&&d.useStates(t,n,f),p&&p.useStates(t,n,f),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},t.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var n=this.animators[t];n.targetName&&n.changeTarget(this[n.targetName])}},t.prototype.removeState=function(t){var n=ht(this.currentStates,t);if(n>=0){var i=this.currentStates.slice();i.splice(n,1),this.useStates(i)}},t.prototype.replaceState=function(t,n,i){var r=this.currentStates.slice(),e=ht(r,t),o=ht(r,n)>=0;e>=0?o?r.splice(e,1):r[e]=n:i&&!o&&r.push(n),this.useStates(r)},t.prototype.toggleState=function(t,n){n?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var n,i={},r=0;r<t.length;r++){var e=t[r];ut(i,e),e.textConfig&&ut(n=n||{},e.textConfig)}return n&&(i.textConfig=n),i},t.prototype._applyStateObj=function(t,n,i,r,e,o){var a=!(n&&r);n&&n.textConfig?(this.textConfig=ut({},r?this.textConfig:i.textConfig),ut(this.textConfig,n.textConfig)):a&&i.textConfig&&(this.textConfig=i.textConfig);for(var s={},u=!1,l=0;l<Se.length;l++){var h=Se[l],f=e&&ke[h];n&&null!=n[h]?f?(u=!0,s[h]=n[h]):this[h]=n[h]:a&&null!=i[h]&&(f?(u=!0,s[h]=i[h]):this[h]=i[h])}if(!e)for(l=0;l<this.animators.length;l++){var c=this.animators[l],v=c.targetName;c.getLoop()||c.__changeFinalValue(v?(n||i)[v]:n||i)}u&&this._transitionState(t,s,o)},t.prototype._attachComponent=function(t){if((!t.__zr||t.__hostTarget)&&t!==this){var n=this.__zr;n&&t.addSelfToZr(n),t.__zr=n,t.__hostTarget=this}},t.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},t.prototype.getClipPath=function(){return this._clipPath},t.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},t.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},t.prototype.getTextContent=function(){return this._textContent},t.prototype.setTextContent=function(t){var n=this._textContent;n!==t&&(n&&n!==t&&this.removeTextContent(),t.innerTransformable=new ne,this._attachComponent(t),this._textContent=t,this.markRedraw())},t.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),ut(this.textConfig,t),this.markRedraw()},t.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},t.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},t.prototype.getTextGuideLine=function(){return this._textGuide},t.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},t.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},t.prototype.markRedraw=function(){this.__dirty|=1;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},t.prototype.dirty=function(){this.markRedraw()},t.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var n=this._textContent,i=this._textGuide;n&&(n.__inHover=t),i&&(i.__inHover=t)},t.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var n=this.animators;if(n)for(var i=0;i<n.length;i++)t.animation.addAnimator(n[i]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},t.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var n=this.animators;if(n)for(var i=0;i<n.length;i++)t.animation.removeAnimator(n[i]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},t.prototype.animate=function(t,n,i){var r=new wr(t?this[t]:this,n,i);return t&&(r.targetName=t),this.addAnimator(r,t),r},t.prototype.addAnimator=function(t,n){var i=this.__zr,r=this;t.during((function(){r.updateDuringAnimation(n)})).done((function(){var n=r.animators,i=ht(n,t);i>=0&&n.splice(i,1)})),this.animators.push(t),i&&i.animation.addAnimator(t),i&&i.wakeUp()},t.prototype.updateDuringAnimation=function(){this.markRedraw()},t.prototype.stopAnimation=function(t,n){for(var i=this.animators,r=i.length,e=[],o=0;o<r;o++){var a=i[o];t&&t!==a.scope?e.push(a):a.stop(n)}return this.animators=e,this},t.prototype.animateTo=function(t,n,i){Te(this,t,n,i)},t.prototype.animateFrom=function(t,n,i){Te(this,t,n,i,!0)},t.prototype._transitionState=function(t,n,i,r){for(var e=Te(this,n,i,r),o=0;o<e.length;o++)e[o].__fromStateTransition=t},t.prototype.getBoundingRect=function(){return null},t.prototype.getPaintRect=function(){return null},t.initDefaultProps=function(){var n=t.prototype;function i(t,i,r,e){function o(t,n){Object.defineProperty(n,0,{get:function(){return t[r]},set:function(n){t[r]=n}}),Object.defineProperty(n,1,{get:function(){return t[e]},set:function(n){t[e]=n}})}Object.defineProperty(n,t,{get:function(){return this[i]||o(this,this[i]=[]),this[i]},set:function(t){this[r]=t[0],this[e]=t[1],this[i]=t,o(this,t)}})}n.type="element",n.name="",n.ignore=n.silent=n.isGroup=n.draggable=n.dragging=n.ignoreClip=n.__inHover=!1,n.__dirty=1,Object.defineProperty&&(i("position","_legacyPos","x","y"),i("scale","_legacyScale","scaleX","scaleY"),i("origin","_legacyOrigin","originX","originY"))}(),t}();function Te(t,n,i,r,e){var o=[];Le(t,"",t,n,i=i||{},r,o,e);var a=o.length,s=!1,u=i.done,l=i.aborted,h=function(){s=!0,--a<=0&&(s?u&&u():l&&l())},f=function(){--a<=0&&(s?u&&u():l&&l())};a||u&&u(),o.length>0&&i.during&&o[0].during((function(t,n){i.during(n)}));for(var c=0;c<o.length;c++){var v=o[c];h&&v.done(h),f&&v.aborted(f),i.force&&v.duration(i.duration),v.start(i.easing)}return o}function ze(t,n,i){for(var r=0;r<i;r++)t[r]=n[r]}function Ie(t,n,i){if(ct(n[i]))if(ct(t[i])||(t[i]=[]),Ct(n[i])){var r=n[i].length;t[i].length!==r&&(t[i]=new n[i].constructor(r),ze(t[i],n[i],r))}else{var e=n[i],o=t[i],a=e.length;if(ct(e[0]))for(var s=e[0].length,u=0;u<a;u++)o[u]?ze(o[u],e[u],s):o[u]=Array.prototype.slice.call(e[u]);else ze(o,e,a);o.length=e.length}else t[i]=n[i]}function Le(t,n,i,r,e,o,a,s){for(var u=yt(r),l=e.duration,h=e.delay,f=e.additive,c=e.setToFinal,v=!At(o),d=t.animators,p=[],m=0;m<u.length;m++){var y=r[A=u[m]];if(null!=y&&null!=i[A]&&(v||o[A]))if(!At(y)||ct(y)||zt(y))p.push(A);else{if(n){s||(i[A]=y,t.updateDuringAnimation(n));continue}Le(t,A,i[A],y,e,o&&o[A],a,s)}else s||(i[A]=y,t.updateDuringAnimation(n),p.push(A))}var g=p.length;if(!f&&g)for(var b=0;b<d.length;b++)if((x=d[b]).targetName===n&&x.stopTracks(p)){var w=ht(d,x);d.splice(w,1)}if(e.force||(g=(p=mt(p,(function(t){return!((n=r[t])===(e=i[t])||ct(n)&&ct(e)&&function(t,n){var i=t.length;if(i!==n.length)return!1;for(var r=0;r<i;r++)if(t[r]!==n[r])return!1;return!0}(n,e));var n,e}))).length),g>0||e.force&&!a.length){var x,M=void 0,S=void 0,k=void 0;if(s)for(S={},c&&(M={}),b=0;b<g;b++)S[A=p[b]]=i[A],c?M[A]=r[A]:i[A]=r[A];else if(c)for(k={},b=0;b<g;b++){var A;k[A=p[b]]=dr(i[A]),Ie(i,r,A)}(x=new wr(i,!1,!1,f?mt(d,(function(t){return t.targetName===n})):null)).targetName=n,e.scope&&(x.scope=e.scope),c&&M&&x.whenWithKeys(0,M,p),k&&x.whenWithKeys(0,k,p),x.whenWithKeys(null==l?500:l,s?S:r,p).delay(h||0),t.addAnimator(x,n),a.push(x)}}ft(Ce,mn),ft(Ce,ne);var Oe=function(t){function n(n){var i=t.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(n),i}return qt(n,t),n.prototype.childrenRef=function(){return this._children},n.prototype.children=function(){return this._children.slice()},n.prototype.childAt=function(t){return this._children[t]},n.prototype.childOfName=function(t){for(var n=this._children,i=0;i<n.length;i++)if(n[i].name===t)return n[i]},n.prototype.childCount=function(){return this._children.length},n.prototype.add=function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},n.prototype.addBefore=function(t,n){if(t&&t!==this&&t.parent!==this&&n&&n.parent===this){var i=this._children,r=i.indexOf(n);r>=0&&(i.splice(r,0,t),this._doAdd(t))}return this},n.prototype.replace=function(t,n){var i=ht(this._children,t);return i>=0&&this.replaceAt(n,i),this},n.prototype.replaceAt=function(t,n){var i=this._children,r=i[n];if(t&&t!==this&&t.parent!==this&&t!==r){i[n]=t,r.parent=null;var e=this.__zr;e&&r.removeSelfFromZr(e),this._doAdd(t)}return this},n.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var n=this.__zr;n&&n!==t.__zr&&t.addSelfToZr(n),n&&n.refresh()},n.prototype.remove=function(t){var n=this.__zr,i=this._children,r=ht(i,t);return r<0||(i.splice(r,1),t.parent=null,n&&t.removeSelfFromZr(n),n&&n.refresh()),this},n.prototype.removeAll=function(){for(var t=this._children,n=this.__zr,i=0;i<t.length;i++){var r=t[i];n&&r.removeSelfFromZr(n),r.parent=null}return t.length=0,this},n.prototype.eachChild=function(t,n){for(var i=this._children,r=0;r<i.length;r++)t.call(n,i[r],r);return this},n.prototype.traverse=function(t,n){for(var i=0;i<this._children.length;i++){var r=this._children[i],e=t.call(n,r);r.isGroup&&!e&&r.traverse(t,n)}return this},n.prototype.addSelfToZr=function(n){t.prototype.addSelfToZr.call(this,n);for(var i=0;i<this._children.length;i++)this._children[i].addSelfToZr(n)},n.prototype.removeSelfFromZr=function(n){t.prototype.removeSelfFromZr.call(this,n);for(var i=0;i<this._children.length;i++)this._children[i].removeSelfFromZr(n)},n.prototype.getBoundingRect=function(t){for(var n=new ve(0,0,0,0),i=t||this._children,r=[],e=null,o=0;o<i.length;o++){var a=i[o];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),u=a.getLocalTransform(r);u?(ve.applyTransform(n,s,u),(e=e||n.clone()).union(n)):(e=e||s.clone()).union(s)}}return e||n},n}(Ce);Oe.prototype.type="group";
|
|
31
|
-
/*!
|
|
32
|
-
* ZRender, a high performance 2d drawing library.
|
|
33
|
-
*
|
|
34
|
-
* Copyright (c) 2013, Baidu Inc.
|
|
35
|
-
* All rights reserved.
|
|
36
|
-
*
|
|
37
|
-
* LICENSE
|
|
38
|
-
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
|
39
|
-
*/
|
|
40
|
-
var De={},Re=function(){function t(t,n,i){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,i=i||{},this.dom=n,this.id=t;var e=new Kn,o=i.renderer||"canvas";De[o]||(o=yt(De)[0]),i.useDirtyRect=null!=i.useDirtyRect&&i.useDirtyRect;var a=new De[o](n,e,i,t),s=i.ssr||a.ssrOnly;this.storage=e,this.painter=a;var u=W.node||W.worker||s?null:new Pr(a.getViewportRoot(),a.root);this.handler=new Wn(e,a,u,a.root),this.animation=new kr({stage:{update:s?null:function(){return r._flush(!0)}}}),s||this.animation.start()}return t.prototype.add=function(t){t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},t.prototype.remove=function(t){t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(t,n){this.painter.configLayer&&this.painter.configLayer(t,n),this.refresh()},t.prototype.setBackgroundColor=function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=function(t){if(!t)return!1;if("string"==typeof t)return Ui(t,1)<.4;if(t.colorStops){for(var n=t.colorStops,i=0,r=n.length,e=0;e<r;e++)i+=Ui(n[e].color,1);return(i/=r)<.4}return!1}(t)},t.prototype.getBackgroundColor=function(){return this._backgroundColor},t.prototype.setDarkMode=function(t){this._darkMode=t},t.prototype.isDarkMode=function(){return this._darkMode},t.prototype.refreshImmediately=function(t){t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},t.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},t.prototype.flush=function(){this._flush(!1)},t.prototype._flush=function(t){var n,i=xr();this._needsRefresh&&(n=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(n=!0,this.refreshHoverImmediately());var r=xr();n?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:r-i})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},t.prototype.resize=function(t){this.painter.resize((t=t||{}).width,t.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,n){return this.handler.findHover(t,n)},t.prototype.on=function(t,n,i){return this.handler.on(t,n,i),this},t.prototype.off=function(t,n){this.handler.off(t,n)},t.prototype.trigger=function(t,n){this.handler.trigger(t,n)},t.prototype.clear=function(){for(var t=this.storage.getRoots(),n=0;n<t.length;n++)t[n]instanceof Oe&&t[n].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},t.prototype.dispose=function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null},t}();function _e(t,n){return new Re(rt(),t,n)}function Be(t,n,i,r){var e=n[0],o=n[1],a=i[0],s=i[1],u=o-e,l=s-a;if(0===u)return 0===l?a:(a+s)/2;if(r)if(u>0){if(t<=e)return a;if(t>=o)return s}else{if(t>=e)return a;if(t<=o)return s}else{if(t===e)return a;if(t===o)return s}return(t-e)/u*l+a}function Fe(t,n){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return Mt(t)?(i=t,i.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*n:parseFloat(t):null==t?NaN:+t;var i}function Ee(t,n,i){return null==n&&(n=10),n=Math.min(Math.max(0,n),20),t=(+t).toFixed(n),i?t:+t}function Pe(t){return t.sort((function(t,n){return t-n})),t}function We(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var n=1,i=0;i<15;i++,n*=10)if(Math.round(t*n)/n===t)return i;return function(t){var n=t.toString().toLowerCase(),i=n.indexOf("e"),r=i>0?+n.slice(i+1):0,e=i>0?i:n.length,o=n.indexOf(".");return Math.max(0,(o<0?0:e-1-o)-r)}(t)}function Ve(t,n){var i=Math.log,r=Math.LN10,e=Math.floor(i(t[1]-t[0])/r),o=Math.round(i(Math.abs(n[1]-n[0]))/r),a=Math.min(Math.max(-e+o,0),20);return isFinite(a)?a:20}function je(t,n){var i=Math.max(We(t),We(n)),r=t+n;return i>20?r:Ee(r,i)}function He(t){var n=2*Math.PI;return(t%n+n)%n}function Ye(t){return t>-1e-4&&t<1e-4}var Xe=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Ge(t){if(t instanceof Date)return t;if(Mt(t)){var n=Xe.exec(t);if(!n)return new Date(NaN);if(n[8]){var i=+n[4]||0;return"Z"!==n[8].toUpperCase()&&(i-=+n[8].slice(0,3)),new Date(Date.UTC(+n[1],+(n[2]||1)-1,+n[3]||1,i,+(n[5]||0),+n[6]||0,n[7]?+n[7].substring(0,3):0))}return new Date(+n[1],+(n[2]||1)-1,+n[3]||1,+n[4]||0,+(n[5]||0),+n[6]||0,n[7]?+n[7].substring(0,3):0)}return null==t?new Date(NaN):new Date(Math.round(t))}function Ue(t){if(0===t)return 0;var n=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,n)>=10&&n++,n}function Ze(t,n){var i=Ue(t),r=Math.pow(10,i),e=t/r;return t=(n?e<1.5?1:e<2.5?2:e<4?3:e<7?5:10:e<1?1:e<2?2:e<3?3:e<5?5:10)*r,i>=-20?+t.toFixed(i<0?-i:0):t}function qe(t,n){var i=(t.length-1)*n+1,r=Math.floor(i),e=+t[r-1],o=i-r;return o?e+o*(t[r]-e):e}function $e(t){t.sort((function(t,n){return s(t,n,0)?-1:1}));for(var n=-1/0,i=1,r=0;r<t.length;){for(var e=t[r].interval,o=t[r].close,a=0;a<2;a++)e[a]<=n&&(e[a]=n,o[a]=a?1:1-i),n=e[a],i=o[a];e[0]===e[1]&&o[0]*o[1]!=1?t.splice(r,1):r++}return t;function s(t,n,i){return t.interval[i]<n.interval[i]||t.interval[i]===n.interval[i]&&(t.close[i]-n.close[i]==(i?-1:1)||!i&&s(t,n,1))}}function Ke(t){var n=parseFloat(t);return n==t&&(0!==n||!Mt(t)||t.indexOf("x")<=0)?n:NaN}function Je(t){return!isNaN(Ke(t))}function Qe(){return Math.round(9*Math.random())}function to(t,n){return 0===n?t:to(n,t%n)}function no(t,n){return null==t?n:null==n?t:t*n/to(t,n)}function io(t){throw new Error(t)}function ro(t,n,i){return(n-t)*i+t}function eo(t){return t instanceof Array?t:null==t?[]:[t]}function oo(t,n,i){if(t){t[n]=t[n]||{},t.emphasis=t.emphasis||{},t.emphasis[n]=t.emphasis[n]||{};for(var r=0,e=i.length;r<e;r++){var o=i[r];!t.emphasis[n].hasOwnProperty(o)&&t[n].hasOwnProperty(o)&&(t.emphasis[n][o]=t[n][o])}}}"undefined"!=typeof console&&console.warn&&console;var ao=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function so(t){return!At(t)||wt(t)||t instanceof Date?t:t.value}function uo(t){return At(t)&&!(t instanceof Array)}function lo(t,n,i){var r="normalMerge"===i,e="replaceMerge"===i,o="replaceAll"===i;t=t||[],n=(n||[]).slice();var a=Vt();vt(n,(function(t,i){At(t)||(n[i]=null)}));var s,u,l=function(t,n,i){var r=[];if("replaceAll"===i)return r;for(var e=0;e<t.length;e++){var o=t[e];o&&null!=o.id&&n.set(o.id,e),r.push({existing:"replaceMerge"===i||po(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return r}(t,a,i);return(r||e)&&function(t,n,i,r){vt(r,(function(e,o){if(e&&null!=e.id){var a=fo(e.id),s=i.get(a);if(null!=s){var u=t[s];Bt(!u.newOption,'Duplicated option on id "'+a+'".'),u.newOption=e,u.existing=n[s],r[o]=null}}}))}(l,t,a,n),r&&function(t,n){vt(n,(function(i,r){if(i&&null!=i.name)for(var e=0;e<t.length;e++){var o=t[e].existing;if(!t[e].newOption&&o&&(null==o.id||null==i.id)&&!po(i)&&!po(o)&&ho("name",o,i))return t[e].newOption=i,void(n[r]=null)}}))}(l,n),r||e?function(t,n,i){vt(n,(function(n){if(n){for(var r,e=0;(r=t[e])&&(r.newOption||po(r.existing)||r.existing&&null!=n.id&&!ho("id",n,r.existing));)e++;r?(r.newOption=n,r.brandNew=i):t.push({newOption:n,brandNew:i,existing:null,keyInfo:null}),e++}}))}(l,n,e):o&&function(t,n){vt(n,(function(n){t.push({newOption:n,brandNew:!0,existing:null,keyInfo:null})}))}(l,n),s=l,u=Vt(),vt(s,(function(t){var n=t.existing;n&&u.set(n.id,t)})),vt(s,(function(t){var n=t.newOption;Bt(!n||null==n.id||!u.get(n.id)||u.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&u.set(n.id,t),!t.keyInfo&&(t.keyInfo={})})),vt(s,(function(t,n){var i=t.existing,r=t.newOption,e=t.keyInfo;if(At(r)){if(e.name=null!=r.name?fo(r.name):i?i.name:"series\0"+n,i)e.id=fo(i.id);else if(null!=r.id)e.id=fo(r.id);else{var o=0;do{e.id="\0"+e.name+"\0"+o++}while(u.get(e.id))}u.set(e.id,t)}})),l}function ho(t,n,i){var r=co(n[t],null),e=co(i[t],null);return null!=r&&null!=e&&r===e}function fo(t){return co(t,"")}function co(t,n){return null==t?n:Mt(t)?t:kt(t)||St(t)?t+"":n}function vo(t){var n=t.name;return!(!n||!n.indexOf("series\0"))}function po(t){return t&&null!=t.id&&0===fo(t.id).indexOf("\0_ec_\0")}function mo(t,n){return null!=n.dataIndexInside?n.dataIndexInside:null!=n.dataIndex?wt(n.dataIndex)?dt(n.dataIndex,(function(n){return t.indexOfRawIndex(n)})):t.indexOfRawIndex(n.dataIndex):null!=n.name?wt(n.name)?dt(n.name,(function(n){return t.indexOfName(n)})):t.indexOfName(n.name):void 0}function yo(){var t="__ec_inner_"+go++;return function(n){return n[t]||(n[t]={})}}var go=Qe();function bo(t,n,i){var r=wo(n,i),e=r.queryOptionMap,o=r.others,a=i?i.defaultMainType:null;return!r.mainTypeSpecified&&a&&e.set(a,{}),e.each((function(n,r){var e=So(t,r,n,{useDefault:a===r,enableAll:!i||null==i.enableAll||i.enableAll,enableNone:!i||null==i.enableNone||i.enableNone});o[r+"Models"]=e.models,o[r+"Model"]=e.models[0]})),o}function wo(t,n){var i;if(Mt(t)){var r={};r[t+"Index"]=0,i=r}else i=t;var e=Vt(),o={},a=!1;return vt(i,(function(t,i){if("dataIndex"!==i&&"dataIndexInside"!==i){var r=i.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],u=(r[2]||"").toLowerCase();!s||!u||n&&n.includeMainTypes&&ht(n.includeMainTypes,s)<0||(a=a||!!s,(e.get(s)||e.set(s,{}))[u]=t)}else o[i]=t})),{mainTypeSpecified:a,queryOptionMap:e,others:o}}var xo={useDefault:!0,enableAll:!1,enableNone:!1},Mo={useDefault:!1,enableAll:!0,enableNone:!0};function So(t,n,i,r){r=r||xo;var e=i.index,o=i.id,a=i.name,s={models:null,specified:null!=e||null!=o||null!=a};if(!s.specified){var u=void 0;return s.models=r.useDefault&&(u=t.getComponent(n))?[u]:[],s}return"none"===e||!1===e?(Bt(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):("all"===e&&(Bt(r.enableAll,'`"all"` is not a valid value on index option.'),e=o=a=null),s.models=t.queryComponents({mainType:n,index:e,id:o,name:a}),s)}function ko(t,n,i){t.setAttribute?t.setAttribute(n,i):t[n]=i}function Ao(t,n){var i=Vt(),r=[];return vt(t,(function(t){var e=n(t);(i.get(e)||(r.push(e),i.set(e,[]))).push(t)})),{keys:r,buckets:i}}function No(t,n,i,r,e){var o=null==n||"auto"===n;if(null==r)return r;if(kt(r))return Ee(d=ro(i||0,r,e),o?Math.max(We(i||0),We(r)):n);if(Mt(r))return e<1?i:r;for(var a=[],s=i,u=r,l=Math.max(s?s.length:0,u.length),h=0;h<l;++h){var f=t.getDimensionInfo(h);if(f&&"ordinal"===f.type)a[h]=(e<1&&s?s:u)[h];else{var c=s&&s[h]?s[h]:0,v=u[h],d=ro(c,v,e);a[h]=Ee(d,o?Math.max(We(c),We(v)):n)}}return a}var Co="___EC__COMPONENT__CONTAINER___";function To(t){var n={main:"",sub:""};if(t){var i=t.split(".");n.main=i[0]||"",n.sub=i[1]||""}return n}function zo(t){t.$constructor=t,t.extend=function(t){var n,i,r=this;return xt(i=r)&&/^class\s/.test(Function.prototype.toString.call(i))?n=function(t){function n(){return t.apply(this,arguments)||this}return E(n,t),n}(r):function(t,n){var i=t.prototype;function r(){}for(var e in r.prototype=n.prototype,t.prototype=new r,i)i.hasOwnProperty(e)&&(t.prototype[e]=i[e]);t.prototype.constructor=t,t.superClass=n}(n=function(){(t.$constructor||r).apply(this,arguments)},this),ut(n.prototype,t),n.___EC__EXTENDED_CLASS___=!0,n.extend=this.extend,n.superCall=Oo,n.superApply=Do,n.superClass=r,n}}function Io(t,n){t.extend=n.extend}var Lo=Math.round(10*Math.random());function Oo(t,n){for(var i=[],r=2;r<arguments.length;r++)i[r-2]=arguments[r];return this.superClass.prototype[n].apply(t,i)}function Do(t,n,i){return this.superClass.prototype[n].apply(t,i)}function Ro(t){var n={};t.registerClass=function(t){var i,r=t.type||t.prototype.type;if(r){Bt(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(i=r),'componentType "'+i+'" illegal'),t.prototype.type=r;var e=To(r);e.sub?e.sub!==Co&&((function(t){var i=n[t.main];return i&&i[Co]||((i=n[t.main]={})[Co]=!0),i}(e))[e.sub]=t):n[e.main]=t}return t},t.getClass=function(t,i,r){var e=n[t];if(e&&e[Co]&&(e=i?e[i]:null),r&&!e)throw new Error(i?"Component "+t+"."+(i||"")+" is used but not imported.":t+".type should be specified.");return e},t.getClassesByMainType=function(t){var i=To(t),r=[],e=n[i.main];return e&&e[Co]?vt(e,(function(t,n){n!==Co&&r.push(t)})):r.push(e),r},t.hasClass=function(t){var i=To(t);return!!n[i.main]},t.getAllClassMainTypes=function(){var t=[];return vt(n,(function(n,i){t.push(i)})),t},t.hasSubTypes=function(t){var i=To(t),r=n[i.main];return r&&r[Co]}}function _o(t,n){for(var i=0;i<t.length;i++)t[i][1]||(t[i][1]=t[i][0]);return n=n||!1,function(i,r,e){for(var o={},a=0;a<t.length;a++){var s=t[a][1];if(!(r&&ht(r,s)>=0||e&&ht(e,s)<0)){var u=i.getShallow(s,n);null!=u&&(o[t[a][0]]=u)}}return o}}var Bo=_o([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Fo=function(){function t(){}return t.prototype.getAreaStyle=function(t,n){return Bo(this,t,n)},t}(),Eo=new Ci(50);function Po(t){if("string"==typeof t){var n=Eo.get(t);return n&&n.image}return t}function Wo(t,n,i,r,e){if(t){if("string"==typeof t){if(n&&n.__zrImageSrc===t||!i)return n;var o=Eo.get(t),a={hostEl:i,cb:r,cbPayload:e};if(o)!jo(n=o.image)&&o.pending.push(a);else{var s=X.loadImage(t,Vo,Vo);s.__zrImageSrc=t,Eo.put(t,s.__cachedImgObj={image:s,pending:[a]})}return n}return t}return n}function Vo(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var n=0;n<t.pending.length;n++){var i=t.pending[n],r=i.cb;r&&r(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function jo(t){return t&&t.width&&t.height}var Ho=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Yo(t,n,i,r,e){if(!n)return"";var o=(t+"").split("\n");e=Xo(n,i,r,e);for(var a=0,s=o.length;a<s;a++)o[a]=Go(o[a],e);return o.join("\n")}function Xo(t,n,i,r){var e=ut({},r=r||{});e.font=n,i=Ot(i,"..."),e.maxIterations=Ot(r.maxIterations,2);var o=e.minChar=Ot(r.minChar,0);e.cnCharWidth=pe("国",n);var a=e.ascCharWidth=pe("a",n);e.placeholder=Ot(r.placeholder,"");for(var s=t=Math.max(0,t-1),u=0;u<o&&s>=a;u++)s-=a;var l=pe(i,n);return l>s&&(i="",l=0),s=t-l,e.ellipsis=i,e.ellipsisWidth=l,e.contentWidth=s,e.containerWidth=t,e}function Go(t,n){var i=n.containerWidth,r=n.font,e=n.contentWidth;if(!i)return"";var o=pe(t,r);if(o<=i)return t;for(var a=0;;a++){if(o<=e||a>=n.maxIterations){t+=n.ellipsis;break}var s=0===a?Uo(t,e,n.ascCharWidth,n.cnCharWidth):o>0?Math.floor(t.length*e/o):0;o=pe(t=t.substr(0,s),r)}return""===t&&(t=n.placeholder),t}function Uo(t,n,i,r){for(var e=0,o=0,a=t.length;o<a&&e<n;o++){var s=t.charCodeAt(o);e+=0<=s&&s<=127?i:r}return o}var Zo=function(){},qo=function(t){this.tokens=[],t&&(this.tokens=t)},$o=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function Ko(t,n,i,r,e){var o,a,s=""===n,u=e&&i.rich[e]||{},l=t.lines,h=u.font||i.font,f=!1;if(r){var c=u.padding,v=c?c[1]+c[3]:0;if(null!=u.width&&"auto"!==u.width){var d=xe(u.width,r.width)+v;l.length>0&&d+r.accumWidth>r.width&&(o=n.split("\n"),f=!0),r.accumWidth=d}else{var p=ta(n,h,r.width,r.breakAll,r.accumWidth);r.accumWidth=p.accumWidth+v,a=p.linesWidths,o=p.lines}}else o=n.split("\n");for(var m=0;m<o.length;m++){var y=o[m],g=new Zo;if(g.styleName=e,g.text=y,g.isLineHolder=!y&&!s,g.width="number"==typeof u.width?u.width:a?a[m]:pe(y,h),m||f)l.push(new qo([g]));else{var b=(l[l.length-1]||(l[0]=new qo)).tokens,w=b.length;1===w&&b[0].isLineHolder?b[0]=g:(y||!w||s)&&b.push(g)}}}var Jo=pt(",&?/;] ".split(""),(function(t,n){return t[n]=!0,t}),{});function Qo(t){return!function(t){var n=t.charCodeAt(0);return n>=33&&n<=383}(t)||!!Jo[t]}function ta(t,n,i,r,e){for(var o=[],a=[],s="",u="",l=0,h=0,f=0;f<t.length;f++){var c=t.charAt(f);if("\n"!==c){var v=pe(c,n),d=!r&&!Qo(c);(o.length?h+v>i:e+h+v>i)?h?(s||u)&&(d?(s||(s=u,u="",h=l=0),o.push(s),a.push(h-l),u+=c,s="",h=l+=v):(u&&(s+=u,u="",l=0),o.push(s),a.push(h),s=c,h=v)):d?(o.push(u),a.push(l),u=c,l=v):(o.push(c),a.push(v)):(h+=v,d?(u+=c,l+=v):(u&&(s+=u,u="",l=0),s+=c))}else u&&(s+=u,h+=l),o.push(s),a.push(h),s="",u="",l=0,h=0}return o.length||s||(s=t,u="",l=0),u&&(s+=u),s&&(o.push(s),a.push(h)),1===o.length&&(h+=e),{accumWidth:h,lines:o,linesWidths:a}}var na="__zr_style_"+Math.round(10*Math.random()),ia={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},ra={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};ia[na]=!0;var ea=["z","z2","invisible"],oa=["invisible"],aa=function(t){function n(n){return t.call(this,n)||this}var i;return qt(n,t),n.prototype._init=function(n){for(var i=yt(n),r=0;r<i.length;r++){var e=i[r];"style"===e?this.useStyle(n[e]):t.prototype.attrKV.call(this,e,n[e])}this.style||this.useStyle({})},n.prototype.beforeBrush=function(){},n.prototype.afterBrush=function(){},n.prototype.innerBeforeBrush=function(){},n.prototype.innerAfterBrush=function(){},n.prototype.shouldBePainted=function(t,n,i,r){var e,o,a,s=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&(o=t,a=n,sa.copy((e=this).getBoundingRect()),e.transform&&sa.applyTransform(e.transform),ua.width=o,ua.height=a,!sa.intersect(ua))||s&&!s[0]&&!s[3])return!1;if(i&&this.__clipPaths)for(var u=0;u<this.__clipPaths.length;++u)if(this.__clipPaths[u].isZeroArea())return!1;if(r&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},n.prototype.contain=function(t,n){return this.rectContain(t,n)},n.prototype.traverse=function(t,n){t.call(n,this)},n.prototype.rectContain=function(t,n){var i=this.transformCoordToLocal(t,n);return this.getBoundingRect().contain(i[0],i[1])},n.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,i=this.getBoundingRect(),r=this.style,e=r.shadowBlur||0,o=r.shadowOffsetX||0,a=r.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new ve(0,0,0,0)),n?ve.applyTransform(t,i,n):t.copy(i),(e||o||a)&&(t.width+=2*e+Math.abs(o),t.height+=2*e+Math.abs(a),t.x=Math.min(t.x,t.x+o-e),t.y=Math.min(t.y,t.y+a-e));var s=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-s),t.y=Math.floor(t.y-s),t.width=Math.ceil(t.width+1+2*s),t.height=Math.ceil(t.height+1+2*s))}return t},n.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new ve(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},n.prototype.getPrevPaintRect=function(){return this._prevPaintRect},n.prototype.animateStyle=function(t){return this.animate("style",t)},n.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():this.markRedraw()},n.prototype.attrKV=function(n,i){"style"!==n?t.prototype.attrKV.call(this,n,i):this.style?this.setStyle(i):this.useStyle(i)},n.prototype.setStyle=function(t,n){return"string"==typeof t?this.style[t]=n:ut(this.style,t),this.dirtyStyle(),this},n.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},n.prototype.dirty=function(){this.dirtyStyle()},n.prototype.styleChanged=function(){return!!(2&this.__dirty)},n.prototype.styleUpdated=function(){this.__dirty&=-3},n.prototype.createStyle=function(t){return Ht(ia,t)},n.prototype.useStyle=function(t){t[na]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},n.prototype.isStyleObject=function(t){return t[na]},n.prototype._innerSaveToNormal=function(n){t.prototype._innerSaveToNormal.call(this,n);var i=this._normalState;n.style&&!i.style&&(i.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(n,i,ea)},n.prototype._applyStateObj=function(n,i,r,e,o,a){t.prototype._applyStateObj.call(this,n,i,r,e,o,a);var s,u=!(i&&e);if(i&&i.style?o?e?s=i.style:(s=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(s,i.style)):(s=this._mergeStyle(this.createStyle(),e?this.style:r.style),this._mergeStyle(s,i.style)):u&&(s=r.style),s)if(o){var l=this.style;if(this.style=this.createStyle(u?{}:l),u)for(var h=yt(l),f=0;f<h.length;f++)(d=h[f])in s&&(s[d]=s[d],this.style[d]=l[d]);var c=yt(s);for(f=0;f<c.length;f++)this.style[d=c[f]]=this.style[d];this._transitionState(n,{style:s},a,this.getAnimationStyleProps())}else this.useStyle(s);var v=this.__inHover?oa:ea;for(f=0;f<v.length;f++){var d=v[f];i&&null!=i[d]?this[d]=i[d]:u&&null!=r[d]&&(this[d]=r[d])}},n.prototype._mergeStates=function(n){for(var i,r=t.prototype._mergeStates.call(this,n),e=0;e<n.length;e++){var o=n[e];o.style&&this._mergeStyle(i=i||{},o.style)}return i&&(r.style=i),r},n.prototype._mergeStyle=function(t,n){return ut(t,n),t},n.prototype.getAnimationStyleProps=function(){return ra},n.initDefaultProps=((i=n.prototype).type="displayable",i.invisible=!1,i.z=0,i.z2=0,i.zlevel=0,i.culling=!1,i.cursor="pointer",i.rectHover=!1,i.incremental=!1,i._rect=null,i.dirtyRectTolerance=0,void(i.__dirty=3)),n}(Ce),sa=new ve(0,0,0,0),ua=new ve(0,0,0,0),la=Math.min,ha=Math.max,fa=Math.sin,ca=Math.cos,va=2*Math.PI,da=$t(),pa=$t(),ma=$t();function ya(t,n,i){if(0!==t.length){for(var r=t[0],e=r[0],o=r[0],a=r[1],s=r[1],u=1;u<t.length;u++)e=la(e,(r=t[u])[0]),o=ha(o,r[0]),a=la(a,r[1]),s=ha(s,r[1]);n[0]=e,n[1]=a,i[0]=o,i[1]=s}}function ga(t,n,i,r,e,o){e[0]=la(t,i),e[1]=la(n,r),o[0]=ha(t,i),o[1]=ha(n,r)}var ba=[],wa=[];function xa(t,n,i,r,e,o,a,s,u,l){var h=ci,f=li,c=h(t,i,e,a,ba);u[0]=1/0,u[1]=1/0,l[0]=-1/0,l[1]=-1/0;for(var v=0;v<c;v++){var d=f(t,i,e,a,ba[v]);u[0]=la(d,u[0]),l[0]=ha(d,l[0])}for(c=h(n,r,o,s,wa),v=0;v<c;v++){var p=f(n,r,o,s,wa[v]);u[1]=la(p,u[1]),l[1]=ha(p,l[1])}u[0]=la(t,u[0]),l[0]=ha(t,l[0]),u[0]=la(a,u[0]),l[0]=ha(a,l[0]),u[1]=la(n,u[1]),l[1]=ha(n,l[1]),u[1]=la(s,u[1]),l[1]=ha(s,l[1])}function Ma(t,n,i,r,e,o,a,s){var u=gi,l=mi,h=ha(la(u(t,i,e),1),0),f=ha(la(u(n,r,o),1),0),c=l(t,i,e,h),v=l(n,r,o,f);a[0]=la(t,e,c),a[1]=la(n,o,v),s[0]=ha(t,e,c),s[1]=ha(n,o,v)}function Sa(t,n,i,r,e,o,a,s,u){var l=cn,h=vn,f=Math.abs(e-o);if(f%va<1e-4&&f>1e-4)return s[0]=t-i,s[1]=n-r,u[0]=t+i,void(u[1]=n+r);if(da[0]=ca(e)*i+t,da[1]=fa(e)*r+n,pa[0]=ca(o)*i+t,pa[1]=fa(o)*r+n,l(s,da,pa),h(u,da,pa),(e%=va)<0&&(e+=va),(o%=va)<0&&(o+=va),e>o&&!a?o+=va:e<o&&a&&(e+=va),a){var c=o;o=e,e=c}for(var v=0;v<o;v+=Math.PI/2)v>e&&(ma[0]=ca(v)*i+t,ma[1]=fa(v)*r+n,l(s,ma,s),h(u,ma,u))}var ka={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Aa=[],Na=[],Ca=[],Ta=[],za=[],Ia=[],La=Math.min,Oa=Math.max,Da=Math.cos,Ra=Math.sin,_a=Math.abs,Ba=Math.PI,Fa=2*Ba,Ea="undefined"!=typeof Float32Array,Pa=[];function Wa(t){return Math.round(t/Ba*1e8)/1e8%2*Ba}function Va(t,n){var i=Wa(t[0]);i<0&&(i+=Fa);var r=t[1];r+=i-t[0],!n&&r-i>=Fa?r=i+Fa:n&&i-r>=Fa?r=i-Fa:!n&&i>r?r=i+(Fa-Wa(i-r)):n&&i<r&&(r=i-(Fa-Wa(r-i))),t[0]=i,t[1]=r}var ja=function(){function t(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(t,n,i){(i=i||0)>0&&(this._ux=_a(i/Vr/t)||0,this._uy=_a(i/Vr/n)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,n){return this._drawPendingPt(),this.addData(ka.M,t,n),this._ctx&&this._ctx.moveTo(t,n),this._x0=t,this._y0=n,this._xi=t,this._yi=n,this},t.prototype.lineTo=function(t,n){var i=_a(t-this._xi),r=_a(n-this._yi),e=i>this._ux||r>this._uy;if(this.addData(ka.L,t,n),this._ctx&&e&&this._ctx.lineTo(t,n),e)this._xi=t,this._yi=n,this._pendingPtDist=0;else{var o=i*i+r*r;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=n,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(t,n,i,r,e,o){return this._drawPendingPt(),this.addData(ka.C,t,n,i,r,e,o),this._ctx&&this._ctx.bezierCurveTo(t,n,i,r,e,o),this._xi=e,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,n,i,r){return this._drawPendingPt(),this.addData(ka.Q,t,n,i,r),this._ctx&&this._ctx.quadraticCurveTo(t,n,i,r),this._xi=i,this._yi=r,this},t.prototype.arc=function(t,n,i,r,e,o){return this._drawPendingPt(),Pa[0]=r,Pa[1]=e,Va(Pa,o),this.addData(ka.A,t,n,i,i,r=Pa[0],(e=Pa[1])-r,0,o?0:1),this._ctx&&this._ctx.arc(t,n,i,r,e,o),this._xi=Da(e)*i+t,this._yi=Ra(e)*i+n,this},t.prototype.arcTo=function(t,n,i,r,e){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,n,i,r,e),this},t.prototype.rect=function(t,n,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,n,i,r),this.addData(ka.R,t,n,i,r),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(ka.Z);var t=this._ctx,n=this._x0,i=this._y0;return t&&t.closePath(),this._xi=n,this._yi=i,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(t){var n=t.length;this.data&&this.data.length===n||!Ea||(this.data=new Float32Array(n));for(var i=0;i<n;i++)this.data[i]=t[i];this._len=n},t.prototype.appendPath=function(t){t instanceof Array||(t=[t]);for(var n=t.length,i=0,r=this._len,e=0;e<n;e++)i+=t[e].len();for(Ea&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+i)),e=0;e<n;e++)for(var o=t[e].data,a=0;a<o.length;a++)this.data[r++]=o[a];this._len=r},t.prototype.addData=function(t,n,i,r,e,o,a,s,u){if(this._saveData){var l=this.data;this._len+arguments.length>l.length&&(this._expandData(),l=this.data);for(var h=0;h<arguments.length;h++)l[this._len++]=arguments[h]}},t.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],n=0;n<this._len;n++)t[n]=this.data[n];this.data=t}},t.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,Ea&&this._len>11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){Ca[0]=Ca[1]=za[0]=za[1]=Number.MAX_VALUE,Ta[0]=Ta[1]=Ia[0]=Ia[1]=-Number.MAX_VALUE;var t,n=this.data,i=0,r=0,e=0,o=0;for(t=0;t<this._len;){var a=n[t++],s=1===t;switch(s&&(e=i=n[t],o=r=n[t+1]),a){case ka.M:i=e=n[t++],r=o=n[t++],za[0]=e,za[1]=o,Ia[0]=e,Ia[1]=o;break;case ka.L:ga(i,r,n[t],n[t+1],za,Ia),i=n[t++],r=n[t++];break;case ka.C:xa(i,r,n[t++],n[t++],n[t++],n[t++],n[t],n[t+1],za,Ia),i=n[t++],r=n[t++];break;case ka.Q:Ma(i,r,n[t++],n[t++],n[t],n[t+1],za,Ia),i=n[t++],r=n[t++];break;case ka.A:var u=n[t++],l=n[t++],h=n[t++],f=n[t++],c=n[t++],v=n[t++]+c;t+=1;var d=!n[t++];s&&(e=Da(c)*h+u,o=Ra(c)*f+l),Sa(u,l,h,f,c,v,d,za,Ia),i=Da(v)*h+u,r=Ra(v)*f+l;break;case ka.R:ga(e=i=n[t++],o=r=n[t++],e+n[t++],o+n[t++],za,Ia);break;case ka.Z:i=e,r=o}cn(Ca,Ca,za),vn(Ta,Ta,Ia)}return 0===t&&(Ca[0]=Ca[1]=Ta[0]=Ta[1]=0),new ve(Ca[0],Ca[1],Ta[0]-Ca[0],Ta[1]-Ca[1])},t.prototype._calculateLength=function(){var t=this.data,n=this._len,i=this._ux,r=this._uy,e=0,o=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,l=0,h=0,f=0;f<n;){var c=t[f++],v=1===f;v&&(a=e=t[f],s=o=t[f+1]);var d=-1;switch(c){case ka.M:e=a=t[f++],o=s=t[f++];break;case ka.L:var p=t[f++],m=(b=t[f++])-o;(_a(z=p-e)>i||_a(m)>r||f===n-1)&&(d=Math.sqrt(z*z+m*m),e=p,o=b);break;case ka.C:var y=t[f++],g=t[f++],b=(p=t[f++],t[f++]),w=t[f++],x=t[f++];d=pi(e,o,y,g,p,b,w,x,10),e=w,o=x;break;case ka.Q:d=xi(e,o,y=t[f++],g=t[f++],p=t[f++],b=t[f++],10),e=p,o=b;break;case ka.A:var M=t[f++],S=t[f++],k=t[f++],A=t[f++],N=t[f++],C=t[f++],T=C+N;f+=1,f++,v&&(a=Da(N)*k+M,s=Ra(N)*A+S),d=Oa(k,A)*La(Fa,Math.abs(C)),e=Da(T)*k+M,o=Ra(T)*A+S;break;case ka.R:a=e=t[f++],s=o=t[f++],d=2*t[f++]+2*t[f++];break;case ka.Z:var z=a-e;m=s-o,d=Math.sqrt(z*z+m*m),e=a,o=s}d>=0&&(u[h++]=d,l+=d)}return this._pathLen=l,l},t.prototype.rebuildPath=function(t,n){var i,r,e,o,a,s,u,l,h,f,c=this.data,v=this._ux,d=this._uy,p=this._len,m=n<1,y=0,g=0,b=0;if(!m||(this._pathSegLen||this._calculateLength(),u=this._pathSegLen,l=n*this._pathLen))t:for(var w=0;w<p;){var x=c[w++],M=1===w;switch(M&&(i=e=c[w],r=o=c[w+1]),x!==ka.L&&b>0&&(t.lineTo(h,f),b=0),x){case ka.M:i=e=c[w++],r=o=c[w++],t.moveTo(e,o);break;case ka.L:a=c[w++],s=c[w++];var S=_a(a-e),k=_a(s-o);if(S>v||k>d){if(m){if(y+(U=u[g++])>l){t.lineTo(e*(1-(Z=(l-y)/U))+a*Z,o*(1-Z)+s*Z);break t}y+=U}t.lineTo(a,s),e=a,o=s,b=0}else{var A=S*S+k*k;A>b&&(h=a,f=s,b=A)}break;case ka.C:var N=c[w++],C=c[w++],T=c[w++],z=c[w++],I=c[w++],L=c[w++];if(m){if(y+(U=u[g++])>l){vi(e,N,T,I,Z=(l-y)/U,Aa),vi(o,C,z,L,Z,Na),t.bezierCurveTo(Aa[1],Na[1],Aa[2],Na[2],Aa[3],Na[3]);break t}y+=U}t.bezierCurveTo(N,C,T,z,I,L),e=I,o=L;break;case ka.Q:if(N=c[w++],C=c[w++],T=c[w++],z=c[w++],m){if(y+(U=u[g++])>l){bi(e,N,T,Z=(l-y)/U,Aa),bi(o,C,z,Z,Na),t.quadraticCurveTo(Aa[1],Na[1],Aa[2],Na[2]);break t}y+=U}t.quadraticCurveTo(N,C,T,z),e=T,o=z;break;case ka.A:var O=c[w++],D=c[w++],R=c[w++],_=c[w++],B=c[w++],F=c[w++],E=c[w++],P=!c[w++],W=R>_?R:_,V=_a(R-_)>.001,j=B+F,H=!1;if(m&&(y+(U=u[g++])>l&&(j=B+F*(l-y)/U,H=!0),y+=U),V&&t.ellipse?t.ellipse(O,D,R,_,E,B,j,P):t.arc(O,D,W,B,j,P),H)break t;M&&(i=Da(B)*R+O,r=Ra(B)*_+D),e=Da(j)*R+O,o=Ra(j)*_+D;break;case ka.R:i=e=c[w],r=o=c[w+1],a=c[w++],s=c[w++];var Y=c[w++],X=c[w++];if(m){if(y+(U=u[g++])>l){var G=l-y;t.moveTo(a,s),t.lineTo(a+La(G,Y),s),(G-=Y)>0&&t.lineTo(a+Y,s+La(G,X)),(G-=X)>0&&t.lineTo(a+Oa(Y-G,0),s+X),(G-=Y)>0&&t.lineTo(a,s+Oa(X-G,0));break t}y+=U}t.rect(a,s,Y,X);break;case ka.Z:if(m){var U;if(y+(U=u[g++])>l){var Z;t.lineTo(e*(1-(Z=(l-y)/U))+i*Z,o*(1-Z)+r*Z);break t}y+=U}t.closePath(),e=i,o=r}}},t.prototype.clone=function(){var n=new t,i=this.data;return n.data=i.slice?i.slice():Array.prototype.slice.call(i),n._len=this._len,n},t.CMD=ka,t.initDefaultProps=function(){var n=t.prototype;n._saveData=!0,n._ux=0,n._uy=0,n._pendingPtDist=0,n._version=0}(),t}();function Ha(t,n,i,r,e,o,a){if(0===e)return!1;var s,u=e;if(a>n+u&&a>r+u||a<n-u&&a<r-u||o>t+u&&o>i+u||o<t-u&&o<i-u)return!1;if(t===i)return Math.abs(o-t)<=u/2;var l=(s=(n-r)/(t-i))*o-a+(t*r-i*n)/(t-i);return l*l/(s*s+1)<=u/2*u/2}function Ya(t,n,i,r,e,o,a,s,u,l,h){if(0===u)return!1;var f=u;return!(h>n+f&&h>r+f&&h>o+f&&h>s+f||h<n-f&&h<r-f&&h<o-f&&h<s-f||l>t+f&&l>i+f&&l>e+f&&l>a+f||l<t-f&&l<i-f&&l<e-f&&l<a-f)&&di(t,n,i,r,e,o,a,s,l,h,null)<=f/2}function Xa(t,n,i,r,e,o,a,s,u){if(0===a)return!1;var l=a;return!(u>n+l&&u>r+l&&u>o+l||u<n-l&&u<r-l&&u<o-l||s>t+l&&s>i+l&&s>e+l||s<t-l&&s<i-l&&s<e-l)&&wi(t,n,i,r,e,o,s,u,null)<=l/2}var Ga=2*Math.PI;function Ua(t){return(t%=Ga)<0&&(t+=Ga),t}var Za=2*Math.PI;function qa(t,n,i,r,e,o,a,s,u){if(0===a)return!1;var l=a;s-=t,u-=n;var h=Math.sqrt(s*s+u*u);if(h-l>i||h+l<i)return!1;if(Math.abs(r-e)%Za<1e-4)return!0;if(o){var f=r;r=Ua(e),e=Ua(f)}else r=Ua(r),e=Ua(e);r>e&&(e+=Za);var c=Math.atan2(u,s);return c<0&&(c+=Za),c>=r&&c<=e||c+Za>=r&&c+Za<=e}function $a(t,n,i,r,e,o){if(o>n&&o>r||o<n&&o<r)return 0;if(r===n)return 0;var a=(o-n)/(r-n),s=r<n?1:-1;1!==a&&0!==a||(s=r<n?.5:-.5);var u=a*(i-t)+t;return u===e?1/0:u>e?s:0}var Ka=ja.CMD,Ja=2*Math.PI,Qa=[-1,-1,-1],ts=[-1,-1];function ns(t,n,i,r,e,o,a,s,u,l){if(l>n&&l>r&&l>o&&l>s||l<n&&l<r&&l<o&&l<s)return 0;var h,f=fi(n,r,o,s,l,Qa);if(0===f)return 0;for(var c=0,v=-1,d=void 0,p=void 0,m=0;m<f;m++){var y=Qa[m],g=0===y||1===y?.5:1;li(t,i,e,a,y)<u||(v<0&&(v=ci(n,r,o,s,ts),ts[1]<ts[0]&&v>1&&(void 0,h=ts[0],ts[0]=ts[1],ts[1]=h),d=li(n,r,o,s,ts[0]),v>1&&(p=li(n,r,o,s,ts[1]))),c+=2===v?y<ts[0]?d<n?g:-g:y<ts[1]?p<d?g:-g:s<p?g:-g:y<ts[0]?d<n?g:-g:s<d?g:-g)}return c}function is(t,n,i,r,e,o,a,s){if(s>n&&s>r&&s>o||s<n&&s<r&&s<o)return 0;var u=function(t,n,i,r,e){var o=t-2*n+i,a=2*(n-t),s=t-r,u=0;if(si(o))ui(a)&&(h=-s/a)>=0&&h<=1&&(e[u++]=h);else{var l=a*a-4*o*s;if(si(l))(h=-a/(2*o))>=0&&h<=1&&(e[u++]=h);else if(l>0){var h,f=ni(l),c=(-a-f)/(2*o);(h=(-a+f)/(2*o))>=0&&h<=1&&(e[u++]=h),c>=0&&c<=1&&(e[u++]=c)}}return u}(n,r,o,s,Qa);if(0===u)return 0;var l=gi(n,r,o);if(l>=0&&l<=1){for(var h=0,f=mi(n,r,o,l),c=0;c<u;c++){var v=0===Qa[c]||1===Qa[c]?.5:1;mi(t,i,e,Qa[c])<a||(h+=Qa[c]<l?f<n?v:-v:o<f?v:-v)}return h}return v=0===Qa[0]||1===Qa[0]?.5:1,mi(t,i,e,Qa[0])<a?0:o<n?v:-v}function rs(t,n,i,r,e,o,a,s){if((s-=n)>i||s<-i)return 0;var u=Math.sqrt(i*i-s*s);Qa[0]=-u,Qa[1]=u;var l=Math.abs(r-e);if(l<1e-4)return 0;if(l>=Ja-1e-4){r=0,e=Ja;var h=o?1:-1;return a>=Qa[0]+t&&a<=Qa[1]+t?h:0}if(r>e){var f=r;r=e,e=f}r<0&&(r+=Ja,e+=Ja);for(var c=0,v=0;v<2;v++){var d=Qa[v];if(d+t>a){var p=Math.atan2(s,d);h=o?1:-1,p<0&&(p=Ja+p),(p>=r&&p<=e||p+Ja>=r&&p+Ja<=e)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function es(t,n,i,r,e){for(var o,a,s=t.data,u=t.len(),l=0,h=0,f=0,c=0,v=0,d=0;d<u;){var p=s[d++],m=1===d;switch(p===Ka.M&&d>1&&(i||(l+=$a(h,f,c,v,r,e))),m&&(c=h=s[d],v=f=s[d+1]),p){case Ka.M:h=c=s[d++],f=v=s[d++];break;case Ka.L:if(i){if(Ha(h,f,s[d],s[d+1],n,r,e))return!0}else l+=$a(h,f,s[d],s[d+1],r,e)||0;h=s[d++],f=s[d++];break;case Ka.C:if(i){if(Ya(h,f,s[d++],s[d++],s[d++],s[d++],s[d],s[d+1],n,r,e))return!0}else l+=ns(h,f,s[d++],s[d++],s[d++],s[d++],s[d],s[d+1],r,e)||0;h=s[d++],f=s[d++];break;case Ka.Q:if(i){if(Xa(h,f,s[d++],s[d++],s[d],s[d+1],n,r,e))return!0}else l+=is(h,f,s[d++],s[d++],s[d],s[d+1],r,e)||0;h=s[d++],f=s[d++];break;case Ka.A:var y=s[d++],g=s[d++],b=s[d++],w=s[d++],x=s[d++],M=s[d++];d+=1;var S=!!(1-s[d++]);o=Math.cos(x)*b+y,a=Math.sin(x)*w+g,m?(c=o,v=a):l+=$a(h,f,o,a,r,e);var k=(r-y)*w/b+y;if(i){if(qa(y,g,w,x,x+M,S,n,k,e))return!0}else l+=rs(y,g,w,x,x+M,S,k,e);h=Math.cos(x+M)*b+y,f=Math.sin(x+M)*w+g;break;case Ka.R:if(c=h=s[d++],v=f=s[d++],o=c+s[d++],a=v+s[d++],i){if(Ha(c,v,o,v,n,r,e)||Ha(o,v,o,a,n,r,e)||Ha(o,a,c,a,n,r,e)||Ha(c,a,c,v,n,r,e))return!0}else l+=$a(o,v,o,a,r,e),l+=$a(c,a,c,v,r,e);break;case Ka.Z:if(i){if(Ha(h,f,c,v,n,r,e))return!0}else l+=$a(h,f,c,v,r,e);h=c,f=v}}return i||Math.abs(f-v)<1e-4||(l+=$a(h,f,c,v,r,e)||0),0!==l}var os=lt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},ia),as={style:lt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ra.style)},ss=ie.concat(["invisible","culling","z","z2","zlevel","parent"]),us=function(t){function n(n){return t.call(this,n)||this}var i;return qt(n,t),n.prototype.update=function(){var i=this;t.prototype.update.call(this);var r=this.style;if(r.decal){var e=this._decalEl=this._decalEl||new n;e.buildPath===n.prototype.buildPath&&(e.buildPath=function(t){i.buildPath(t,i.shape)}),e.silent=!0;var o=e.style;for(var a in r)o[a]!==r[a]&&(o[a]=r[a]);o.fill=r.fill?r.decal:null,o.decal=null,o.shadowColor=null,r.strokeFirst&&(o.stroke=null);for(var s=0;s<ss.length;++s)e[ss[s]]=this[ss[s]];e.__dirty|=1}else this._decalEl&&(this._decalEl=null)},n.prototype.getDecalElement=function(){return this._decalEl},n.prototype._init=function(n){var i=yt(n);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var e=0;e<i.length;e++){var o=i[e],a=n[o];"style"===o?this.style?ut(this.style,a):this.useStyle(a):"shape"===o?ut(this.shape,a):t.prototype.attrKV.call(this,o,a)}this.style||this.useStyle({})},n.prototype.getDefaultStyle=function(){return null},n.prototype.getDefaultShape=function(){return{}},n.prototype.canBeInsideText=function(){return this.hasFill()},n.prototype.getInsideTextFill=function(){var t=this.style.fill;if("none"!==t){if(Mt(t)){var n=Ui(t,0);return n>.5?"#333":n>.2?"#eee":"#ccc"}if(t)return"#ccc"}return"#333"},n.prototype.getInsideTextStroke=function(t){var n=this.style.fill;if(Mt(n)){var i=this.__zr;if(!(!i||!i.isDarkMode())==Ui(t,0)<.4)return n}},n.prototype.buildPath=function(){},n.prototype.pathUpdated=function(){this.__dirty&=-5},n.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},n.prototype.createPathProxy=function(){this.path=new ja(!1)},n.prototype.hasStroke=function(){var t=this.style,n=t.stroke;return!(null==n||"none"===n||!(t.lineWidth>0))},n.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},n.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,i=!t;if(i){var r=!1;this.path||(r=!0,this.createPathProxy());var e=this.path;(r||4&this.__dirty)&&(e.beginPath(),this.buildPath(e,this.shape,!1),this.pathUpdated()),t=e.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||i){o.copy(t);var a=n.strokeNoScale?this.getLineScale():1,s=n.lineWidth;if(!this.hasFill()){var u=this.strokeContainThreshold;s=Math.max(s,null==u?4:u)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return t},n.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n),r=this.getBoundingRect(),e=this.style;if(r.contain(t=i[0],n=i[1])){var o=this.path;if(this.hasStroke()){var a=e.lineWidth,s=e.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,n,i,r){return es(t,n,!0,i,r)}(o,a/s,t,n)))return!0}if(this.hasFill())return function(t,n,i){return es(t,0,!1,n,i)}(o,t,n)}return!1},n.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},n.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},n.prototype.animateShape=function(t){return this.animate("shape",t)},n.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},n.prototype.attrKV=function(n,i){"shape"===n?this.setShape(i):t.prototype.attrKV.call(this,n,i)},n.prototype.setShape=function(t,n){var i=this.shape;return i||(i=this.shape={}),"string"==typeof t?i[t]=n:ut(i,t),this.dirtyShape(),this},n.prototype.shapeChanged=function(){return!!(4&this.__dirty)},n.prototype.createStyle=function(t){return Ht(os,t)},n.prototype._innerSaveToNormal=function(n){t.prototype._innerSaveToNormal.call(this,n);var i=this._normalState;n.shape&&!i.shape&&(i.shape=ut({},this.shape))},n.prototype._applyStateObj=function(n,i,r,e,o,a){t.prototype._applyStateObj.call(this,n,i,r,e,o,a);var s,u=!(i&&e);if(i&&i.shape?o?e?s=i.shape:(s=ut({},r.shape),ut(s,i.shape)):(s=ut({},e?this.shape:r.shape),ut(s,i.shape)):u&&(s=r.shape),s)if(o){this.shape=ut({},this.shape);for(var l={},h=yt(s),f=0;f<h.length;f++){var c=h[f];"object"==typeof s[c]?this.shape[c]=s[c]:l[c]=s[c]}this._transitionState(n,{shape:l},a)}else this.shape=s,this.dirtyShape()},n.prototype._mergeStates=function(n){for(var i,r=t.prototype._mergeStates.call(this,n),e=0;e<n.length;e++){var o=n[e];o.shape&&this._mergeStyle(i=i||{},o.shape)}return i&&(r.shape=i),r},n.prototype.getAnimationStyleProps=function(){return as},n.prototype.isZeroArea=function(){return!1},n.extend=function(t){var i=function(n){function i(i){var r=n.call(this,i)||this;return t.init&&t.init.call(r,i),r}return qt(i,n),i.prototype.getDefaultStyle=function(){return ot(t.style)},i.prototype.getDefaultShape=function(){return ot(t.shape)},i}(n);for(var r in t)"function"==typeof t[r]&&(i.prototype[r]=t[r]);return i},n.initDefaultProps=((i=n.prototype).type="path",i.strokeContainThreshold=5,i.segmentIgnoreThreshold=0,i.subPixelOptimize=!1,i.autoBatch=!1,void(i.__dirty=7)),n}(aa),ls=lt({strokeFirst:!0,font:H,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},os),hs=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return qt(n,t),n.prototype.hasStroke=function(){var t=this.style,n=t.stroke;return null!=n&&"none"!==n&&t.lineWidth>0},n.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},n.prototype.createStyle=function(t){return Ht(ls,t)},n.prototype.setBoundingRect=function(t){this._rect=t},n.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var n=t.text;null!=n?n+="":n="";var i=ye(n,t.font,t.textAlign,t.textBaseline);if(i.x+=t.x||0,i.y+=t.y||0,this.hasStroke()){var r=t.lineWidth;i.x-=r/2,i.y-=r/2,i.width+=r,i.height+=r}this._rect=i}return this._rect},n.initDefaultProps=void(n.prototype.dirtyRectTolerance=10),n}(aa);hs.prototype.type="tspan";var fs=lt({x:0,y:0},ia),cs={style:lt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},ra.style)},vs=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return qt(n,t),n.prototype.createStyle=function(t){return Ht(fs,t)},n.prototype._getSize=function(t){var n=this.style,i=n[t];if(null!=i)return i;var r,e=(r=n.image)&&"string"!=typeof r&&r.width&&r.height?n.image:this.__image;if(!e)return 0;var o="width"===t?"height":"width",a=n[o];return null==a?e[t]:e[t]/e[o]*a},n.prototype.getWidth=function(){return this._getSize("width")},n.prototype.getHeight=function(){return this._getSize("height")},n.prototype.getAnimationStyleProps=function(){return cs},n.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new ve(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},n}(aa);vs.prototype.type="image";var ds=Math.round;function ps(t,n,i){if(n){var r=n.x1,e=n.x2,o=n.y1,a=n.y2;t.x1=r,t.x2=e,t.y1=o,t.y2=a;var s=i&&i.lineWidth;return s?(ds(2*r)===ds(2*e)&&(t.x1=t.x2=ys(r,s,!0)),ds(2*o)===ds(2*a)&&(t.y1=t.y2=ys(o,s,!0)),t):t}}function ms(t,n,i){if(n){var r=n.x,e=n.y,o=n.width,a=n.height;t.x=r,t.y=e,t.width=o,t.height=a;var s=i&&i.lineWidth;return s?(t.x=ys(r,s,!0),t.y=ys(e,s,!0),t.width=Math.max(ys(r+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(ys(e+a,s,!1)-t.y,0===a?0:1),t):t}}function ys(t,n,i){if(!n)return t;var r=ds(2*t);return(r+ds(n))%2==0?r/2:(r+(i?1:-1))/2}var gs=function(){this.x=0,this.y=0,this.width=0,this.height=0},bs={},ws=function(t){function n(n){return t.call(this,n)||this}return qt(n,t),n.prototype.getDefaultShape=function(){return new gs},n.prototype.buildPath=function(t,n){var i,r,e,o;if(this.subPixelOptimize){var a=ms(bs,n,this.style);i=a.x,r=a.y,e=a.width,o=a.height,a.r=n.r,n=a}else i=n.x,r=n.y,e=n.width,o=n.height;n.r?function(t,n){var i,r,e,o,a,s=n.x,u=n.y,l=n.width,h=n.height,f=n.r;l<0&&(s+=l,l=-l),h<0&&(u+=h,h=-h),"number"==typeof f?i=r=e=o=f:f instanceof Array?1===f.length?i=r=e=o=f[0]:2===f.length?(i=e=f[0],r=o=f[1]):3===f.length?(i=f[0],r=o=f[1],e=f[2]):(i=f[0],r=f[1],e=f[2],o=f[3]):i=r=e=o=0,i+r>l&&(i*=l/(a=i+r),r*=l/a),e+o>l&&(e*=l/(a=e+o),o*=l/a),r+e>h&&(r*=h/(a=r+e),e*=h/a),i+o>h&&(i*=h/(a=i+o),o*=h/a),t.moveTo(s+i,u),t.lineTo(s+l-r,u),0!==r&&t.arc(s+l-r,u+r,r,-Math.PI/2,0),t.lineTo(s+l,u+h-e),0!==e&&t.arc(s+l-e,u+h-e,e,0,Math.PI/2),t.lineTo(s+o,u+h),0!==o&&t.arc(s+o,u+h-o,o,Math.PI/2,Math.PI),t.lineTo(s,u+i),0!==i&&t.arc(s+i,u+i,i,Math.PI,1.5*Math.PI)}(t,n):t.rect(i,r,e,o)},n.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},n}(us);ws.prototype.type="rect";var xs={fill:"#000"},Ms={style:lt({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},ra.style)},Ss=function(t){function n(n){var i=t.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=xs,i.attr(n),i}return qt(n,t),n.prototype.childrenRef=function(){return this._children},n.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var n=0;n<this._children.length;n++){var i=this._children[n];i.zlevel=this.zlevel,i.z=this.z,i.z2=this.z2,i.culling=this.culling,i.cursor=this.cursor,i.invisible=this.invisible}},n.prototype.updateTransform=function(){var n=this.innerTransformable;n?(n.updateTransform(),n.transform&&(this.transform=n.transform)):t.prototype.updateTransform.call(this)},n.prototype.getLocalTransform=function(n){var i=this.innerTransformable;return i?i.getLocalTransform(n):t.prototype.getLocalTransform.call(this,n)},n.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),t.prototype.getComputedTransform.call(this)},n.prototype._updateSubTexts=function(){var t;this._childCursor=0,Is(t=this.style),vt(t.rich,Is),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},n.prototype.addSelfToZr=function(n){t.prototype.addSelfToZr.call(this,n);for(var i=0;i<this._children.length;i++)this._children[i].__zr=n},n.prototype.removeSelfFromZr=function(n){t.prototype.removeSelfFromZr.call(this,n);for(var i=0;i<this._children.length;i++)this._children[i].__zr=null},n.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new ve(0,0,0,0),n=this._children,i=[],r=null,e=0;e<n.length;e++){var o=n[e],a=o.getBoundingRect(),s=o.getLocalTransform(i);s?(t.copy(a),t.applyTransform(s),(r=r||t.clone()).union(t)):(r=r||a.clone()).union(a)}this._rect=r||t}return this._rect},n.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||xs},n.prototype.setTextContent=function(){},n.prototype._mergeStyle=function(t,n){if(!n)return t;var i=n.rich,r=t.rich||i&&{};return ut(t,n),i&&r?(this._mergeRich(r,i),t.rich=r):r&&(t.rich=r),t},n.prototype._mergeRich=function(t,n){for(var i=yt(n),r=0;r<i.length;r++){var e=i[r];t[e]=t[e]||{},ut(t[e],n[e])}},n.prototype.getAnimationStyleProps=function(){return Ms},n.prototype._getOrCreateChild=function(t){var n=this._children[this._childCursor];return n&&n instanceof t||(n=new t),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},n.prototype._updatePlainTexts=function(){var t=this.style,n=t.font||H,i=t.padding,r=function(t,n){null!=t&&(t+="");var i,r=n.overflow,e=n.padding,o=n.font,a="truncate"===r,s=we(o),u=Ot(n.lineHeight,s),l=!!n.backgroundColor,h="truncate"===n.lineOverflow,f=n.width,c=(i=null==f||"break"!==r&&"breakAll"!==r?t?t.split("\n"):[]:t?ta(t,n.font,f,"breakAll"===r,0).lines:[]).length*u,v=Ot(n.height,c);if(c>v&&h){var d=Math.floor(v/u);i=i.slice(0,d)}if(t&&a&&null!=f)for(var p=Xo(f,o,n.ellipsis,{minChar:n.truncateMinChar,placeholder:n.placeholder}),m=0;m<i.length;m++)i[m]=Go(i[m],p);var y=v,g=0;for(m=0;m<i.length;m++)g=Math.max(pe(i[m],o),g);null==f&&(f=g);var b=g;return e&&(y+=e[0]+e[2],b+=e[1]+e[3],f+=e[1]+e[3]),l&&(b=f),{lines:i,height:v,outerWidth:b,outerHeight:y,lineHeight:u,calculatedLineHeight:s,contentWidth:g,contentHeight:c,width:f}}(Rs(t),t),e=_s(t),o=!!t.backgroundColor,a=r.outerHeight,s=r.outerWidth,u=r.contentWidth,l=r.lines,h=r.lineHeight,f=this._defaultStyle,c=t.x||0,v=t.y||0,d=t.align||f.align||"left",p=t.verticalAlign||f.verticalAlign||"top",m=c,y=be(v,r.contentHeight,p);if(e||i){var g=ge(c,s,d),b=be(v,a,p);e&&this._renderBackground(t,t,g,b,s,a)}y+=h/2,i&&(m=Ds(c,d,i),"top"===p?y+=i[0]:"bottom"===p&&(y-=i[2]));for(var w=0,x=!1,M=(Os("fill"in t?t.fill:(x=!0,f.fill))),S=(Ls("stroke"in t?t.stroke:o||f.autoStroke&&!x?null:(w=2,f.stroke))),k=t.textShadowBlur>0,A=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),N=r.calculatedLineHeight,C=0;C<l.length;C++){var T=this._getOrCreateChild(hs),z=T.createStyle();T.useStyle(z),z.text=l[C],z.x=m,z.y=y,d&&(z.textAlign=d),z.textBaseline="middle",z.opacity=t.opacity,z.strokeFirst=!0,k&&(z.shadowBlur=t.textShadowBlur||0,z.shadowColor=t.textShadowColor||"transparent",z.shadowOffsetX=t.textShadowOffsetX||0,z.shadowOffsetY=t.textShadowOffsetY||0),z.stroke=S,z.fill=M,S&&(z.lineWidth=t.lineWidth||w,z.lineDash=t.lineDash,z.lineDashOffset=t.lineDashOffset||0),z.font=n,Ts(z,t),y+=h,A&&T.setBoundingRect(new ve(ge(z.x,t.width,z.textAlign),be(z.y,N,z.textBaseline),u,N))}},n.prototype._updateRichTexts=function(){var t=this.style,n=function(t,n){var i=new $o;if(null!=t&&(t+=""),!t)return i;for(var r,e=n.width,o=n.height,a=n.overflow,s="break"!==a&&"breakAll"!==a||null==e?null:{width:e,accumWidth:0,breakAll:"breakAll"===a},u=Ho.lastIndex=0;null!=(r=Ho.exec(t));){var l=r.index;l>u&&Ko(i,t.substring(u,l),n,s),Ko(i,r[2],n,s,r[1]),u=Ho.lastIndex}u<t.length&&Ko(i,t.substring(u,t.length),n,s);var h=[],f=0,c=0,v=n.padding,d="truncate"===a,p="truncate"===n.lineOverflow;function m(t,n,i){t.width=n,t.lineHeight=i,f+=i,c=Math.max(c,n)}t:for(var y=0;y<i.lines.length;y++){for(var g=i.lines[y],b=0,w=0,x=0;x<g.tokens.length;x++){var M=(O=g.tokens[x]).styleName&&n.rich[O.styleName]||{},S=O.textPadding=M.padding,k=S?S[1]+S[3]:0,A=O.font=M.font||n.font;O.contentHeight=we(A);var N=Ot(M.height,O.contentHeight);if(O.innerHeight=N,S&&(N+=S[0]+S[2]),O.height=N,O.lineHeight=Dt(M.lineHeight,n.lineHeight,N),O.align=M&&M.align||n.align,O.verticalAlign=M&&M.verticalAlign||"middle",p&&null!=o&&f+O.lineHeight>o){x>0?(g.tokens=g.tokens.slice(0,x),m(g,w,b),i.lines=i.lines.slice(0,y+1)):i.lines=i.lines.slice(0,y);break t}var C=M.width,T=null==C||"auto"===C;if("string"==typeof C&&"%"===C.charAt(C.length-1))O.percentWidth=C,h.push(O),O.contentWidth=pe(O.text,A);else{if(T){var z=M.backgroundColor,I=z&&z.image;I&&jo(I=Po(I))&&(O.width=Math.max(O.width,I.width*N/I.height))}var L=d&&null!=e?e-w:null;null!=L&&L<O.width?!T||L<k?(O.text="",O.width=O.contentWidth=0):(O.text=Yo(O.text,L-k,A,n.ellipsis,{minChar:n.truncateMinChar}),O.width=O.contentWidth=pe(O.text,A)):O.contentWidth=pe(O.text,A)}O.width+=k,w+=O.width,M&&(b=Math.max(b,O.lineHeight))}m(g,w,b)}for(i.outerWidth=i.width=Ot(e,c),i.outerHeight=i.height=Ot(o,f),i.contentHeight=f,i.contentWidth=c,v&&(i.outerWidth+=v[1]+v[3],i.outerHeight+=v[0]+v[2]),y=0;y<h.length;y++){var O;(O=h[y]).width=parseInt(O.percentWidth,10)/100*i.width}return i}(Rs(t),t),i=n.width,r=n.outerWidth,e=n.outerHeight,o=t.padding,a=t.y||0,s=this._defaultStyle,u=t.verticalAlign||s.verticalAlign,l=ge(t.x||0,r,t.align||s.align),h=be(a,e,u),f=l,c=h;o&&(f+=o[3],c+=o[0]);var v=f+i;_s(t)&&this._renderBackground(t,t,l,h,r,e);for(var d=!!t.backgroundColor,p=0;p<n.lines.length;p++){for(var m=n.lines[p],y=m.tokens,g=y.length,b=m.lineHeight,w=m.width,x=0,M=f,S=v,k=g-1,A=void 0;x<g&&(!(A=y[x]).align||"left"===A.align);)this._placeToken(A,t,b,c,M,"left",d),w-=A.width,M+=A.width,x++;for(;k>=0&&"right"===(A=y[k]).align;)this._placeToken(A,t,b,c,S,"right",d),w-=A.width,S-=A.width,k--;for(M+=(i-(M-f)-(v-S)-w)/2;x<=k;)this._placeToken(A=y[x],t,b,c,M+A.width/2,"center",d),M+=A.width,x++;c+=b}},n.prototype._placeToken=function(t,n,i,r,e,o,a){var s=n.rich[t.styleName]||{};s.text=t.text;var u=t.verticalAlign,l=r+i/2;"top"===u?l=r+t.height/2:"bottom"===u&&(l=r+i-t.height/2),!t.isLineHolder&&_s(s)&&this._renderBackground(s,n,"right"===o?e-t.width:"center"===o?e-t.width/2:e,l-t.height/2,t.width,t.height);var h=!!s.backgroundColor,f=t.textPadding;f&&(e=Ds(e,o,f),l-=t.height/2-f[0]-t.innerHeight/2);var c=this._getOrCreateChild(hs),v=c.createStyle();c.useStyle(v);var d=this._defaultStyle,p=!1,m=0,y=Os("fill"in s?s.fill:"fill"in n?n.fill:(p=!0,d.fill)),g=Ls("stroke"in s?s.stroke:"stroke"in n?n.stroke:h||a||d.autoStroke&&!p?null:(m=2,d.stroke)),b=s.textShadowBlur>0||n.textShadowBlur>0;v.text=t.text,v.x=e,v.y=l,b&&(v.shadowBlur=s.textShadowBlur||n.textShadowBlur||0,v.shadowColor=s.textShadowColor||n.textShadowColor||"transparent",v.shadowOffsetX=s.textShadowOffsetX||n.textShadowOffsetX||0,v.shadowOffsetY=s.textShadowOffsetY||n.textShadowOffsetY||0),v.textAlign=o,v.textBaseline="middle",v.font=t.font||H,v.opacity=Dt(s.opacity,n.opacity,1),Ts(v,s),g&&(v.lineWidth=Dt(s.lineWidth,n.lineWidth,m),v.lineDash=Ot(s.lineDash,n.lineDash),v.lineDashOffset=n.lineDashOffset||0,v.stroke=g),y&&(v.fill=y);var w=t.contentWidth,x=t.contentHeight;c.setBoundingRect(new ve(ge(v.x,w,v.textAlign),be(v.y,x,v.textBaseline),w,x))},n.prototype._renderBackground=function(t,n,i,r,e,o){var a,s,u,l=t.backgroundColor,h=t.borderWidth,f=t.borderColor,c=l&&l.image,v=l&&!c,d=t.borderRadius,p=this;if(v||t.lineHeight||h&&f){(a=this._getOrCreateChild(ws)).useStyle(a.createStyle()),a.style.fill=null;var m=a.shape;m.x=i,m.y=r,m.width=e,m.height=o,m.r=d,a.dirtyShape()}if(v)(u=a.style).fill=l||null,u.fillOpacity=Ot(t.fillOpacity,1);else if(c){(s=this._getOrCreateChild(vs)).onload=function(){p.dirtyStyle()};var y=s.style;y.image=l.image,y.x=i,y.y=r,y.width=e,y.height=o}h&&f&&((u=a.style).lineWidth=h,u.stroke=f,u.strokeOpacity=Ot(t.strokeOpacity,1),u.lineDash=t.borderDash,u.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(u.strokeFirst=!0,u.lineWidth*=2));var g=(a||s).style;g.shadowBlur=t.shadowBlur||0,g.shadowColor=t.shadowColor||"transparent",g.shadowOffsetX=t.shadowOffsetX||0,g.shadowOffsetY=t.shadowOffsetY||0,g.opacity=Dt(t.opacity,n.opacity,1)},n.makeFont=function(t){var n="";return zs(t)&&(n=[t.fontStyle,t.fontWeight,Cs(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),n&&Ft(n)||t.textFont||t.font},n}(aa),ks={left:!0,right:1,center:1},As={top:1,bottom:1,middle:1},Ns=["fontStyle","fontWeight","fontSize","fontFamily"];function Cs(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?"12px":t+"px":t}function Ts(t,n){for(var i=0;i<Ns.length;i++){var r=Ns[i],e=n[r];null!=e&&(t[r]=e)}}function zs(t){return null!=t.fontSize||t.fontFamily||t.fontWeight}function Is(t){if(t){t.font=Ss.makeFont(t);var n=t.align;"middle"===n&&(n="center"),t.align=null==n||ks[n]?n:"left";var i=t.verticalAlign;"center"===i&&(i="middle"),t.verticalAlign=null==i||As[i]?i:"top",t.padding&&(t.padding=_t(t.padding))}}function Ls(t,n){return null==t||n<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Os(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Ds(t,n,i){return"right"===n?t-i[1]:"center"===n?t+i[3]/2-i[1]/2:t+i[3]}function Rs(t){var n=t.text;return null!=n&&(n+=""),n}function _s(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}var Bs=yo(),Fs=function(t,n,i,r){if(r){var e=Bs(r);e.dataIndex=i,e.dataType=n,e.seriesIndex=t,"group"===r.type&&r.traverse((function(r){var e=Bs(r);e.seriesIndex=t,e.dataIndex=i,e.dataType=n}))}},Es=1,Ps={},Ws=yo(),Vs=yo(),js=["emphasis","blur","select"],Hs=["normal","emphasis","blur","select"];function Ys(t){return null!=t&&"none"!==t}var Xs=new Ci(100);function Gs(t){if(Mt(t)){var n=Xs.get(t);return n||(n=ji(t,-.1),Xs.put(t,n)),n}if(zt(t)){var i=ut({},t);return i.colorStops=dt(t.colorStops,(function(t){return{offset:t.offset,color:ji(t.color,-.1)}})),i}return t}function Us(t,n,i){t.onHoverStateChange&&(t.hoverState||0)!==i&&t.onHoverStateChange(n),t.hoverState=i}function Zs(t){Us(t,"emphasis",2)}function qs(t){2===t.hoverState&&Us(t,"normal",0)}function $s(t){Us(t,"blur",1)}function Ks(t){1===t.hoverState&&Us(t,"normal",0)}function Js(t){t.selected=!0}function Qs(t){t.selected=!1}function tu(t,n,i){n(t,i)}function nu(t,n,i){tu(t,n,i),t.isGroup&&t.traverse((function(t){tu(t,n,i)}))}function iu(t,n){switch(n){case"emphasis":t.hoverState=2;break;case"normal":t.hoverState=0;break;case"blur":t.hoverState=1;break;case"select":t.selected=!0}}function ru(t,n){var i=this.states[t];if(this.style){if("emphasis"===t)return function(t,n,i,r){var e=i&&ht(i,"select")>=0,o=!1;if(t instanceof us){var a=Ws(t),s=e&&a.selectFill||a.normalFill,u=e&&a.selectStroke||a.normalStroke;if(Ys(s)||Ys(u)){var l=(r=r||{}).style||{};"inherit"===l.fill?(o=!0,r=ut({},r),(l=ut({},l)).fill=s):!Ys(l.fill)&&Ys(s)?(o=!0,r=ut({},r),(l=ut({},l)).fill=Gs(s)):!Ys(l.stroke)&&Ys(u)&&(o||(r=ut({},r),l=ut({},l)),l.stroke=Gs(u)),r.style=l}}if(r&&null==r.z2){o||(r=ut({},r));var h=t.z2EmphasisLift;r.z2=t.z2+(null!=h?h:10)}return r}(this,0,n,i);if("blur"===t)return function(t,n,i){var r=ht(t.currentStates,n)>=0,e=t.style.opacity,o=r?null:function(t,n,i,r){for(var e=t.style,o={},a=0;a<n.length;a++){var s=n[a],u=e[s];o[s]=null==u?r&&r[s]:u}for(a=0;a<t.animators.length;a++){var l=t.animators[a];l.__fromStateTransition&&l.__fromStateTransition.indexOf(i)<0&&"style"===l.targetName&&l.saveTo(o,n)}return o}(t,["opacity"],n,{opacity:1}),a=(i=i||{}).style||{};return null==a.opacity&&(i=ut({},i),a=ut({opacity:r?e:.1*o.opacity},a),i.style=a),i}(this,t,i);if("select"===t)return function(t,n,i){if(i&&null==i.z2){i=ut({},i);var r=t.z2SelectLift;i.z2=t.z2+(null!=r?r:9)}return i}(this,0,i)}return i}function eu(t){t.stateProxy=ru;var n=t.getTextContent(),i=t.getTextGuideLine();n&&(n.stateProxy=ru),i&&(i.stateProxy=ru)}function ou(t,n){!vu(t,n)&&!t.__highByOuter&&nu(t,Zs)}function au(t,n){!vu(t,n)&&!t.__highByOuter&&nu(t,qs)}function su(t,n){t.__highByOuter|=1<<(n||0),nu(t,Zs)}function uu(t,n){!(t.__highByOuter&=~(1<<(n||0)))&&nu(t,qs)}function lu(t){nu(t,$s)}function hu(t){nu(t,Ks)}function fu(t){nu(t,Js)}function cu(t){nu(t,Qs)}function vu(t,n){return t.__highDownSilentOnTouch&&n.zrByTouch}function du(t){var n=t.getModel(),i=[],r=[];n.eachComponent((function(n,e){var o=Vs(e),a="series"===n,s=a?t.getViewOfSeriesModel(e):t.getViewOfComponentModel(e);!a&&r.push(s),o.isBlured&&(s.group.traverse((function(t){Ks(t)})),a&&i.push(e)),o.isBlured=!1})),vt(r,(function(t){t&&t.toggleBlurSeries&&t.toggleBlurSeries(i,!1,n)}))}function pu(t,n,i,r){var e=r.getModel();function o(t,n){for(var i=0;i<n.length;i++){var r=t.getItemGraphicEl(n[i]);r&&hu(r)}}if(i=i||"coordinateSystem",null!=t&&n&&"none"!==n){var a=e.getSeriesByIndex(t),s=a.coordinateSystem;s&&s.master&&(s=s.master);var u=[];e.eachSeries((function(t){var e=a===t,l=t.coordinateSystem;if(l&&l.master&&(l=l.master),!("series"===i&&!e||"coordinateSystem"===i&&!(l&&s?l===s:e)||"series"===n&&e)){if(r.getViewOfSeriesModel(t).group.traverse((function(t){$s(t)})),ct(n))o(t.getData(),n);else if(At(n))for(var h=yt(n),f=0;f<h.length;f++)o(t.getData(h[f]),n[h[f]]);u.push(t),Vs(t).isBlured=!0}})),e.eachComponent((function(t,n){if("series"!==t){var i=r.getViewOfComponentModel(n);i&&i.toggleBlurSeries&&i.toggleBlurSeries(u,!0,e)}}))}}function mu(t,n,i){if(null!=t&&null!=n){var r=i.getModel().getComponent(t,n);if(r){Vs(r).isBlured=!0;var e=i.getViewOfComponentModel(r);e&&e.focusBlurEnabled&&e.group.traverse((function(t){$s(t)}))}}}function yu(t,n,i,r){var e={focusSelf:!1,dispatchers:null};if(null==t||"series"===t||null==n||null==i)return e;var o=r.getModel().getComponent(t,n);if(!o)return e;var a=r.getViewOfComponentModel(o);if(!a||!a.findHighDownDispatchers)return e;for(var s,u=a.findHighDownDispatchers(i),l=0;l<u.length;l++)if("self"===Bs(u[l]).focus){s=!0;break}return{focusSelf:s,dispatchers:u}}function gu(t){vt(t.getAllData(),(function(n){var i=n.type;n.data.eachItemGraphicEl((function(n,r){t.isSelected(r,i)?fu(n):cu(n)}))}))}function bu(t){var n=[];return t.eachSeries((function(t){vt(t.getAllData(),(function(i){var r=i.type,e=t.getSelectedDataIndices();if(e.length>0){var o={dataIndex:e,seriesIndex:t.seriesIndex};null!=r&&(o.dataType=r),n.push(o)}}))})),n}function wu(t,n,i){Nu(t,!0),nu(t,eu),Mu(t,n,i)}function xu(t,n,i,r){r?function(t){Nu(t,!1)}(t):wu(t,n,i)}function Mu(t,n,i){var r=Bs(t);null!=n?(r.focus=n,r.blurScope=i):r.focus&&(r.focus=null)}var Su=["emphasis","blur","select"],ku={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Au(t,n,i,r){i=i||"itemStyle";for(var e=0;e<Su.length;e++){var o=Su[e],a=n.getModel([o,i]);t.ensureState(o).style=r?r(a):a[ku[i]]()}}function Nu(t,n){var i=!1===n,r=t;t.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=t.highDownSilentOnTouch),i&&!r.__highDownDispatcher||(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!i)}function Cu(t){return!(!t||!t.__highDownDispatcher)}function Tu(t){var n=t.type;return"select"===n||"unselect"===n||"toggleSelect"===n}function zu(t){var n=t.type;return"highlight"===n||"downplay"===n}var Iu=ja.CMD,Lu=[[],[],[]],Ou=Math.sqrt,Du=Math.atan2;function Ru(t,n){if(n){var i,r,e,o,a,s,u=t.data,l=t.len(),h=Iu.M,f=Iu.C,c=Iu.L,v=Iu.R,d=Iu.A,p=Iu.Q;for(e=0,o=0;e<l;){switch(i=u[e++],o=e,r=0,i){case h:case c:r=1;break;case f:r=3;break;case p:r=2;break;case d:var m=n[4],y=n[5],g=Ou(n[0]*n[0]+n[1]*n[1]),b=Ou(n[2]*n[2]+n[3]*n[3]),w=Du(-n[1]/b,n[0]/g);u[e]*=g,u[e++]+=m,u[e]*=b,u[e++]+=y,u[e++]*=g,u[e++]*=b,u[e++]+=w,u[e++]+=w,o=e+=2;break;case v:s[0]=u[e++],s[1]=u[e++],fn(s,s,n),u[o++]=s[0],u[o++]=s[1],s[0]+=u[e++],s[1]+=u[e++],fn(s,s,n),u[o++]=s[0],u[o++]=s[1]}for(a=0;a<r;a++){var x=Lu[a];x[0]=u[e++],x[1]=u[e++],fn(x,x,n),u[o++]=x[0],u[o++]=x[1]}}t.increaseVersion()}}var _u=Math.sqrt,Bu=Math.sin,Fu=Math.cos,Eu=Math.PI;function Pu(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Wu(t,n){return(t[0]*n[0]+t[1]*n[1])/(Pu(t)*Pu(n))}function Vu(t,n){return(t[0]*n[1]<t[1]*n[0]?-1:1)*Math.acos(Wu(t,n))}function ju(t,n,i,r,e,o,a,s,u,l,h){var f=u*(Eu/180),c=Fu(f)*(t-i)/2+Bu(f)*(n-r)/2,v=-1*Bu(f)*(t-i)/2+Fu(f)*(n-r)/2,d=c*c/(a*a)+v*v/(s*s);d>1&&(a*=_u(d),s*=_u(d));var p=(e===o?-1:1)*_u((a*a*(s*s)-a*a*(v*v)-s*s*(c*c))/(a*a*(v*v)+s*s*(c*c)))||0,m=p*a*v/s,y=p*-s*c/a,g=(t+i)/2+Fu(f)*m-Bu(f)*y,b=(n+r)/2+Bu(f)*m+Fu(f)*y,w=Vu([1,0],[(c-m)/a,(v-y)/s]),x=[(c-m)/a,(v-y)/s],M=[(-1*c-m)/a,(-1*v-y)/s],S=Vu(x,M);if(Wu(x,M)<=-1&&(S=Eu),Wu(x,M)>=1&&(S=0),S<0){var k=Math.round(S/Eu*1e6)/1e6;S=2*Eu+k%2*Eu}h.addData(l,g,b,a,s,w,S,f,o)}var Hu=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Yu=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,Xu=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return qt(n,t),n.prototype.applyTransform=function(){},n}(us);function Gu(t){return null!=t.setData}function Uu(t,n){var i=function(t){var n=new ja;if(!t)return n;var i,r=0,e=0,o=r,a=e,s=ja.CMD,u=t.match(Hu);if(!u)return n;for(var l=0;l<u.length;l++){for(var h=u[l],f=h.charAt(0),c=void 0,v=h.match(Yu)||[],d=v.length,p=0;p<d;p++)v[p]=parseFloat(v[p]);for(var m=0;m<d;){var y=void 0,g=void 0,b=void 0,w=void 0,x=void 0,M=void 0,S=void 0,k=r,A=e,N=void 0,C=void 0;switch(f){case"l":r+=v[m++],e+=v[m++],n.addData(c=s.L,r,e);break;case"L":r=v[m++],e=v[m++],n.addData(c=s.L,r,e);break;case"m":r+=v[m++],e+=v[m++],n.addData(c=s.M,r,e),o=r,a=e,f="l";break;case"M":r=v[m++],e=v[m++],n.addData(c=s.M,r,e),o=r,a=e,f="L";break;case"h":r+=v[m++],n.addData(c=s.L,r,e);break;case"H":r=v[m++],n.addData(c=s.L,r,e);break;case"v":e+=v[m++],n.addData(c=s.L,r,e);break;case"V":e=v[m++],n.addData(c=s.L,r,e);break;case"C":n.addData(c=s.C,v[m++],v[m++],v[m++],v[m++],v[m++],v[m++]),r=v[m-2],e=v[m-1];break;case"c":n.addData(c=s.C,v[m++]+r,v[m++]+e,v[m++]+r,v[m++]+e,v[m++]+r,v[m++]+e),r+=v[m-2],e+=v[m-1];break;case"S":y=r,g=e,N=n.len(),C=n.data,i===s.C&&(y+=r-C[N-4],g+=e-C[N-3]),k=v[m++],A=v[m++],r=v[m++],e=v[m++],n.addData(c=s.C,y,g,k,A,r,e);break;case"s":y=r,g=e,N=n.len(),C=n.data,i===s.C&&(y+=r-C[N-4],g+=e-C[N-3]),k=r+v[m++],A=e+v[m++],r+=v[m++],e+=v[m++],n.addData(c=s.C,y,g,k,A,r,e);break;case"Q":k=v[m++],A=v[m++],r=v[m++],e=v[m++],n.addData(c=s.Q,k,A,r,e);break;case"q":k=v[m++]+r,A=v[m++]+e,r+=v[m++],e+=v[m++],n.addData(c=s.Q,k,A,r,e);break;case"T":y=r,g=e,N=n.len(),C=n.data,i===s.Q&&(y+=r-C[N-4],g+=e-C[N-3]),r=v[m++],e=v[m++],n.addData(c=s.Q,y,g,r,e);break;case"t":y=r,g=e,N=n.len(),C=n.data,i===s.Q&&(y+=r-C[N-4],g+=e-C[N-3]),r+=v[m++],e+=v[m++],n.addData(c=s.Q,y,g,r,e);break;case"A":b=v[m++],w=v[m++],x=v[m++],M=v[m++],S=v[m++],ju(k=r,A=e,r=v[m++],e=v[m++],M,S,b,w,x,c=s.A,n);break;case"a":b=v[m++],w=v[m++],x=v[m++],M=v[m++],S=v[m++],ju(k=r,A=e,r+=v[m++],e+=v[m++],M,S,b,w,x,c=s.A,n)}}"z"!==f&&"Z"!==f||(n.addData(c=s.Z),r=o,e=a),i=c}return n.toStatic(),n}(t),r=ut({},n);return r.buildPath=function(t){var n;Gu(t)?(t.setData(i.data),(n=t.getContext())&&t.rebuildPath(n,1)):i.rebuildPath(n=t,1)},r.applyTransform=function(t){Ru(i,t),this.dirtyShape()},r}function Zu(t,n){return new Xu(Uu(t,n))}function qu(t,n){n=n||{};var i=new us;return t.shape&&i.setShape(t.shape),i.setStyle(t.style),n.bakeTransform?Ru(i.path,t.getComputedTransform()):n.toLocal?i.setLocalTransform(t.getComputedTransform()):i.copyTransform(t),i.buildPath=t.buildPath,i.applyTransform=i.applyTransform,i.z=t.z,i.z2=t.z2,i.zlevel=t.zlevel,i}var $u=function(){this.cx=0,this.cy=0,this.r=0},Ku=function(t){function n(n){return t.call(this,n)||this}return qt(n,t),n.prototype.getDefaultShape=function(){return new $u},n.prototype.buildPath=function(t,n){t.moveTo(n.cx+n.r,n.cy),t.arc(n.cx,n.cy,n.r,0,2*Math.PI)},n}(us);Ku.prototype.type="circle";var Ju=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},Qu=function(t){function n(n){return t.call(this,n)||this}return qt(n,t),n.prototype.getDefaultShape=function(){return new Ju},n.prototype.buildPath=function(t,n){var i=.5522848,r=n.cx,e=n.cy,o=n.rx,a=n.ry,s=o*i,u=a*i;t.moveTo(r-o,e),t.bezierCurveTo(r-o,e-u,r-s,e-a,r,e-a),t.bezierCurveTo(r+s,e-a,r+o,e-u,r+o,e),t.bezierCurveTo(r+o,e+u,r+s,e+a,r,e+a),t.bezierCurveTo(r-s,e+a,r-o,e+u,r-o,e),t.closePath()},n}(us);Qu.prototype.type="ellipse";var tl=Math.PI,nl=2*tl,il=Math.sin,rl=Math.cos,el=Math.acos,ol=Math.atan2,al=Math.abs,sl=Math.sqrt,ul=Math.max,ll=Math.min,hl=1e-4;function fl(t,n,i,r,e,o,a){var s=t-i,u=n-r,l=(a?o:-o)/sl(s*s+u*u),h=l*u,f=-l*s,c=t+h,v=n+f,d=i+h,p=r+f,m=(c+d)/2,y=(v+p)/2,g=d-c,b=p-v,w=g*g+b*b,x=e-o,M=c*p-d*v,S=(b<0?-1:1)*sl(ul(0,x*x*w-M*M)),k=(M*b-g*S)/w,A=(-M*g-b*S)/w,N=(M*b+g*S)/w,C=(-M*g+b*S)/w,T=k-m,z=A-y,I=N-m,L=C-y;return T*T+z*z>I*I+L*L&&(k=N,A=C),{cx:k,cy:A,x0:-h,y0:-f,x1:k*(e/x-1),y1:A*(e/x-1)}}var cl=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},vl=function(t){function n(n){return t.call(this,n)||this}return qt(n,t),n.prototype.getDefaultShape=function(){return new cl},n.prototype.buildPath=function(t,n){!function(t,n){var i,r=ul(n.r,0),e=ul(n.r0||0,0),o=r>0;if(o||e>0){if(o||(r=e,e=0),e>r){var a=r;r=e,e=a}var s=n.startAngle,u=n.endAngle;if(!isNaN(s)&&!isNaN(u)){var l=n.cx,h=n.cy,f=!!n.clockwise,c=al(u-s),v=c>nl&&c%nl;if(v>hl&&(c=v),r>hl)if(c>nl-hl)t.moveTo(l+r*rl(s),h+r*il(s)),t.arc(l,h,r,s,u,!f),e>hl&&(t.moveTo(l+e*rl(u),h+e*il(u)),t.arc(l,h,e,u,s,f));else{var d=void 0,p=void 0,m=void 0,y=void 0,g=void 0,b=void 0,w=void 0,x=void 0,M=void 0,S=void 0,k=void 0,A=void 0,N=void 0,C=void 0,T=void 0,z=void 0,I=r*rl(s),L=r*il(s),O=e*rl(u),D=e*il(u),R=c>hl;if(R){var _=n.cornerRadius;_&&(d=(i=function(t){var n;if(wt(t)){var i=t.length;if(!i)return t;n=1===i?[t[0],t[0],0,0]:2===i?[t[0],t[0],t[1],t[1]]:3===i?t.concat(t[2]):t}else n=[t,t,t,t];return n}(_))[0],p=i[1],m=i[2],y=i[3]);var B=al(r-e)/2;if(g=ll(B,m),b=ll(B,y),w=ll(B,d),x=ll(B,p),k=M=ul(g,b),A=S=ul(w,x),(M>hl||S>hl)&&(N=r*rl(u),C=r*il(u),T=e*rl(s),z=e*il(s),c<tl)){var F=function(t,n,i,r,e,o,a,s){var u=i-t,l=r-n,h=a-e,f=s-o,c=f*u-h*l;if(!(c*c<hl))return[t+(c=(h*(n-o)-f*(t-e))/c)*u,n+c*l]}(I,L,T,z,N,C,O,D);if(F){var E=I-F[0],P=L-F[1],W=N-F[0],V=C-F[1],j=1/il(el((E*W+P*V)/(sl(E*E+P*P)*sl(W*W+V*V)))/2),H=sl(F[0]*F[0]+F[1]*F[1]);k=ll(M,(r-H)/(j+1)),A=ll(S,(e-H)/(j-1))}}}if(R)if(k>hl){var Y=ll(m,k),X=ll(y,k),G=fl(T,z,I,L,r,Y,f),U=fl(N,C,O,D,r,X,f);t.moveTo(l+G.cx+G.x0,h+G.cy+G.y0),k<M&&Y===X?t.arc(l+G.cx,h+G.cy,k,ol(G.y0,G.x0),ol(U.y0,U.x0),!f):(Y>0&&t.arc(l+G.cx,h+G.cy,Y,ol(G.y0,G.x0),ol(G.y1,G.x1),!f),t.arc(l,h,r,ol(G.cy+G.y1,G.cx+G.x1),ol(U.cy+U.y1,U.cx+U.x1),!f),X>0&&t.arc(l+U.cx,h+U.cy,X,ol(U.y1,U.x1),ol(U.y0,U.x0),!f))}else t.moveTo(l+I,h+L),t.arc(l,h,r,s,u,!f);else t.moveTo(l+I,h+L);e>hl&&R?A>hl?(Y=ll(d,A),G=fl(O,D,N,C,e,-(X=ll(p,A)),f),U=fl(I,L,T,z,e,-Y,f),t.lineTo(l+G.cx+G.x0,h+G.cy+G.y0),A<S&&Y===X?t.arc(l+G.cx,h+G.cy,A,ol(G.y0,G.x0),ol(U.y0,U.x0),!f):(X>0&&t.arc(l+G.cx,h+G.cy,X,ol(G.y0,G.x0),ol(G.y1,G.x1),!f),t.arc(l,h,e,ol(G.cy+G.y1,G.cx+G.x1),ol(U.cy+U.y1,U.cx+U.x1),f),Y>0&&t.arc(l+U.cx,h+U.cy,Y,ol(U.y1,U.x1),ol(U.y0,U.x0),!f))):(t.lineTo(l+O,h+D),t.arc(l,h,e,u,s,f)):t.lineTo(l+O,h+D)}else t.moveTo(l,h);t.closePath()}}}(t,n)},n.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},n}(us);vl.prototype.type="sector";var dl=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},pl=function(t){function n(n){return t.call(this,n)||this}return qt(n,t),n.prototype.getDefaultShape=function(){return new dl},n.prototype.buildPath=function(t,n){var i=n.cx,r=n.cy,e=2*Math.PI;t.moveTo(i+n.r,r),t.arc(i,r,n.r,0,e,!1),t.moveTo(i+n.r0,r),t.arc(i,r,n.r0,0,e,!0)},n}(us);function ml(t,n,i){var r=n.smooth,e=n.points;if(e&&e.length>=2){if(r){var o=function(t,n,i,r){var e,o,a,s,u=[],l=[],h=[],f=[];if(r){a=[1/0,1/0],s=[-1/0,-1/0];for(var c=0,v=t.length;c<v;c++)cn(a,a,t[c]),vn(s,s,t[c]);cn(a,a,r[0]),vn(s,s,r[1])}for(c=0,v=t.length;c<v;c++){var d=t[c];if(i)e=t[c?c-1:v-1],o=t[(c+1)%v];else{if(0===c||c===v-1){u.push(Jt(t[c]));continue}e=t[c-1],o=t[c+1]}rn(l,o,e),on(l,l,n);var p=sn(d,e),m=sn(d,o),y=p+m;0!==y&&(p/=y,m/=y),on(h,l,-p),on(f,l,m);var g=tn([],d,h),b=tn([],d,f);r&&(vn(g,g,a),cn(g,g,s),vn(b,b,a),cn(b,b,s)),u.push(g),u.push(b)}return i&&u.push(u.shift()),u}(e,r,i,n.smoothConstraint);t.moveTo(e[0][0],e[0][1]);for(var a=e.length,s=0;s<(i?a:a-1);s++){var u=o[2*s],l=o[2*s+1],h=e[(s+1)%a];t.bezierCurveTo(u[0],u[1],l[0],l[1],h[0],h[1])}}else{t.moveTo(e[0][0],e[0][1]),s=1;for(var f=e.length;s<f;s++)t.lineTo(e[s][0],e[s][1])}i&&t.closePath()}}pl.prototype.type="ring";var yl=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},gl=function(t){function n(n){return t.call(this,n)||this}return qt(n,t),n.prototype.getDefaultShape=function(){return new yl},n.prototype.buildPath=function(t,n){ml(t,n,!0)},n}(us);gl.prototype.type="polygon";var bl=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},wl=function(t){function n(n){return t.call(this,n)||this}return qt(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new bl},n.prototype.buildPath=function(t,n){ml(t,n,!1)},n}(us);wl.prototype.type="polyline";var xl={},Ml=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},Sl=function(t){function n(n){return t.call(this,n)||this}return qt(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new Ml},n.prototype.buildPath=function(t,n){var i,r,e,o;if(this.subPixelOptimize){var a=ps(xl,n,this.style);i=a.x1,r=a.y1,e=a.x2,o=a.y2}else i=n.x1,r=n.y1,e=n.x2,o=n.y2;var s=n.percent;0!==s&&(t.moveTo(i,r),s<1&&(e=i*(1-s)+e*s,o=r*(1-s)+o*s),t.lineTo(e,o))},n.prototype.pointAt=function(t){var n=this.shape;return[n.x1*(1-t)+n.x2*t,n.y1*(1-t)+n.y2*t]},n}(us);Sl.prototype.type="line";var kl=[],Al=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function Nl(t,n,i){return null!=t.cpx2||null!=t.cpy2?[(i?hi:li)(t.x1,t.cpx1,t.cpx2,t.x2,n),(i?hi:li)(t.y1,t.cpy1,t.cpy2,t.y2,n)]:[(i?yi:mi)(t.x1,t.cpx1,t.x2,n),(i?yi:mi)(t.y1,t.cpy1,t.y2,n)]}var Cl=function(t){function n(n){return t.call(this,n)||this}return qt(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new Al},n.prototype.buildPath=function(t,n){var i=n.x1,r=n.y1,e=n.x2,o=n.y2,a=n.cpx1,s=n.cpy1,u=n.cpx2,l=n.cpy2,h=n.percent;0!==h&&(t.moveTo(i,r),null==u||null==l?(h<1&&(bi(i,a,e,h,kl),a=kl[1],e=kl[2],bi(r,s,o,h,kl),s=kl[1],o=kl[2]),t.quadraticCurveTo(a,s,e,o)):(h<1&&(vi(i,a,u,e,h,kl),a=kl[1],u=kl[2],e=kl[3],vi(r,s,l,o,h,kl),s=kl[1],l=kl[2],o=kl[3]),t.bezierCurveTo(a,s,u,l,e,o)))},n.prototype.pointAt=function(t){return Nl(this.shape,t,!1)},n.prototype.tangentAt=function(t){var n=Nl(this.shape,t,!0);return an(n,n)},n}(us);Cl.prototype.type="bezier-curve";var Tl=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},zl=function(t){function n(n){return t.call(this,n)||this}return qt(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new Tl},n.prototype.buildPath=function(t,n){var i=n.cx,r=n.cy,e=Math.max(n.r,0),o=n.startAngle,a=n.endAngle,s=n.clockwise,u=Math.cos(o),l=Math.sin(o);t.moveTo(u*e+i,l*e+r),t.arc(i,r,e,o,a,!s)},n}(us);zl.prototype.type="arc";var Il=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="compound",n}return qt(n,t),n.prototype._updatePathDirty=function(){for(var t=this.shape.paths,n=this.shapeChanged(),i=0;i<t.length;i++)n=n||t[i].shapeChanged();n&&this.dirtyShape()},n.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],n=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(n[0],n[1],t[i].segmentIgnoreThreshold)},n.prototype.buildPath=function(t,n){for(var i=n.paths||[],r=0;r<i.length;r++)i[r].buildPath(t,i[r].shape,!0)},n.prototype.afterBrush=function(){for(var t=this.shape.paths||[],n=0;n<t.length;n++)t[n].pathUpdated()},n.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),us.prototype.getBoundingRect.call(this)},n}(us),Ll=function(){function t(t){this.colorStops=t||[]}return t.prototype.addColorStop=function(t,n){this.colorStops.push({offset:t,color:n})},t}(),Ol=function(t){function n(n,i,r,e,o,a){var s=t.call(this,o)||this;return s.x=null==n?0:n,s.y=null==i?0:i,s.x2=null==r?1:r,s.y2=null==e?0:e,s.type="linear",s.global=a||!1,s}return qt(n,t),n}(Ll),Dl=function(t){function n(n,i,r,e,o){var a=t.call(this,e)||this;return a.x=null==n?.5:n,a.y=null==i?.5:i,a.r=null==r?.5:r,a.type="radial",a.global=o||!1,a}return qt(n,t),n}(Ll),Rl=[0,0],_l=[0,0],Bl=new ee,Fl=new ee,El=function(){function t(t,n){this._corners=[],this._axes=[],this._origin=[0,0];for(var i=0;i<4;i++)this._corners[i]=new ee;for(i=0;i<2;i++)this._axes[i]=new ee;t&&this.fromBoundingRect(t,n)}return t.prototype.fromBoundingRect=function(t,n){var i=this._corners,r=this._axes,e=t.x,o=t.y,a=e+t.width,s=o+t.height;if(i[0].set(e,o),i[1].set(a,o),i[2].set(a,s),i[3].set(e,s),n)for(var u=0;u<4;u++)i[u].transform(n);for(ee.sub(r[0],i[1],i[0]),ee.sub(r[1],i[3],i[0]),r[0].normalize(),r[1].normalize(),u=0;u<2;u++)this._origin[u]=r[u].dot(i[0])},t.prototype.intersect=function(t,n){var i=!0,r=!n;return Bl.set(1/0,1/0),Fl.set(0,0),!this._intersectCheckOneSide(this,t,Bl,Fl,r,1)&&(i=!1,r)||!this._intersectCheckOneSide(t,this,Bl,Fl,r,-1)&&(i=!1,r)||r||ee.copy(n,i?Bl:Fl),i},t.prototype._intersectCheckOneSide=function(t,n,i,r,e,o){for(var a=!0,s=0;s<2;s++){var u=this._axes[s];if(this._getProjMinMaxOnAxis(s,t._corners,Rl),this._getProjMinMaxOnAxis(s,n._corners,_l),Rl[1]<_l[0]||Rl[0]>_l[1]){if(a=!1,e)return a;var l=Math.abs(_l[0]-Rl[1]),h=Math.abs(Rl[0]-_l[1]);Math.min(l,h)>r.len()&&ee.scale(r,u,l<h?-l*o:h*o)}else i&&(l=Math.abs(_l[0]-Rl[1]),h=Math.abs(Rl[0]-_l[1]),Math.min(l,h)<i.len()&&ee.scale(i,u,l<h?l*o:-h*o))}return a},t.prototype._getProjMinMaxOnAxis=function(t,n,i){for(var r=this._axes[t],e=this._origin,o=n[0].dot(r)+e[t],a=o,s=o,u=1;u<n.length;u++){var l=n[u].dot(r)+e[t];a=Math.min(l,a),s=Math.max(l,s)}i[0]=a,i[1]=s},t}(),Pl=[],Wl=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.notClear=!0,n.incremental=!0,n._displayables=[],n._temporaryDisplayables=[],n._cursor=0,n}return qt(n,t),n.prototype.traverse=function(t,n){t.call(n,this)},n.prototype.useStyle=function(){this.style={}},n.prototype.getCursor=function(){return this._cursor},n.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},n.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},n.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},n.prototype.addDisplayable=function(t,n){n?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},n.prototype.addDisplayables=function(t,n){n=n||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],n)},n.prototype.getDisplayables=function(){return this._displayables},n.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},n.prototype.eachPendingDisplayable=function(t){for(var n=this._cursor;n<this._displayables.length;n++)t&&t(this._displayables[n]);for(n=0;n<this._temporaryDisplayables.length;n++)t&&t(this._temporaryDisplayables[n])},n.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++)(n=this._displayables[t]).parent=this,n.update(),n.parent=null;for(t=0;t<this._temporaryDisplayables.length;t++){var n;(n=this._temporaryDisplayables[t]).parent=this,n.update(),n.parent=null}},n.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new ve(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var i=this._displayables[n],r=i.getBoundingRect().clone();i.needLocalTransform()&&r.applyTransform(i.getLocalTransform(Pl)),t.union(r)}this._rect=t}return this._rect},n.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n);if(this.getBoundingRect().contain(i[0],i[1]))for(var r=0;r<this._displayables.length;r++)if(this._displayables[r].contain(t,n))return!0;return!1},n}(aa),Vl=yo();function jl(t,n,i,r,e){var o;if(n&&n.ecModel){var a=n.ecModel.getUpdatePayload();o=a&&a.animation}var s="update"===t;if(n&&n.isAnimationEnabled()){var u=void 0,l=void 0,h=void 0;return r?(u=Ot(r.duration,200),l=Ot(r.easing,"cubicOut"),h=0):(u=n.getShallow(s?"animationDurationUpdate":"animationDuration"),l=n.getShallow(s?"animationEasingUpdate":"animationEasing"),h=n.getShallow(s?"animationDelayUpdate":"animationDelay")),o&&(null!=o.duration&&(u=o.duration),null!=o.easing&&(l=o.easing),null!=o.delay&&(h=o.delay)),xt(h)&&(h=h(i,e)),xt(u)&&(u=u(i)),{duration:u||0,delay:h,easing:l}}return null}function Hl(t,n,i,r,e,o,a){var s,u=!1;xt(e)?(a=o,o=e,e=null):At(e)&&(o=e.cb,a=e.during,u=e.isFrom,s=e.removeOpt,e=e.dataIndex);var l="leave"===t;l||n.stopAnimation("leave");var h=jl(t,r,e,l?s||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(n,e):null);if(h&&h.duration>0){var f={duration:h.duration,delay:h.delay||0,easing:h.easing,done:o,force:!!o||!!a,setToFinal:!l,scope:t,during:a};u?n.animateFrom(i,f):n.animateTo(i,f)}else n.stopAnimation(),!u&&n.attr(i),a&&a(1),o&&o()}function Yl(t,n,i,r,e,o){Hl("update",t,n,i,r,e,o)}function Xl(t,n,i,r,e,o){Hl("enter",t,n,i,r,e,o)}function Gl(t){if(!t.__zr)return!0;for(var n=0;n<t.animators.length;n++)if("leave"===t.animators[n].scope)return!0;return!1}function Ul(t,n,i,r,e,o){Gl(t)||Hl("leave",t,n,i,r,e,o)}function Zl(t,n,i,r){t.removeTextContent(),t.removeTextGuideLine(),Ul(t,{style:{opacity:0}},n,i,r)}function ql(t,n,i){function r(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse((function(t){t.isGroup||Zl(t,n,i,r)})):Zl(t,n,i,r)}function $l(t){Vl(t).oldStyle=t.style}var Kl=Math.max,Jl=Math.min,Ql={};function th(t,n){Ql[t]=n}function nh(t){if(Ql.hasOwnProperty(t))return Ql[t]}function ih(t,n,i,r){var e=Zu(t,n);return i&&("center"===r&&(i=eh(i,e.getBoundingRect())),ah(e,i)),e}function rh(t,n,i){var r=new vs({style:{image:t,x:n.x,y:n.y,width:n.width,height:n.height},onload:function(t){"center"===i&&r.setStyle(eh(n,{width:t.width,height:t.height}))}});return r}function eh(t,n){var i,r=n.width/n.height,e=t.height*r;return i=e<=t.width?t.height:(e=t.width)/r,{x:t.x+t.width/2-e/2,y:t.y+t.height/2-i/2,width:e,height:i}}var oh=function(t,n){for(var i=[],r=t.length,e=0;e<r;e++)i.push(t[e].getUpdatedPathProxy(!0));var o=new us(n);return o.createPathProxy(),o.buildPath=function(t){if(Gu(t)){t.appendPath(i);var n=t.getContext();n&&t.rebuildPath(n,1)}},o};function ah(t,n){if(t.applyTransform){var i=t.getBoundingRect().calculateTransform(n);t.applyTransform(i)}}var sh=ys;function uh(t,n){for(var i=jr([]);t&&t!==n;)Yr(i,t.getLocalTransform(),i),t=t.parent;return i}function lh(t,n,i){return n&&!ct(n)&&(n=ne.getLocalTransform(n)),i&&(n=Zr([],n)),fn([],t,n)}function hh(t,n,i){var r=0===n[4]||0===n[5]||0===n[0]?1:Math.abs(2*n[4]/n[0]),e=0===n[4]||0===n[5]||0===n[2]?1:Math.abs(2*n[4]/n[2]),o=["left"===t?-r:"right"===t?r:0,"top"===t?-e:"bottom"===t?e:0];return o=lh(o,n,i),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function fh(t){return!t.isGroup}function ch(t,n,i){if(t&&n){var r,e=(r={},t.traverse((function(t){fh(t)&&t.anid&&(r[t.anid]=t)})),r);n.traverse((function(t){if(fh(t)&&t.anid){var n=e[t.anid];if(n){var r=o(t);t.attr(o(n)),Yl(t,r,i,Bs(t).dataIndex)}}}))}function o(t){var n={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(n.shape=ut({},t.shape)),n}}function vh(t,n){return dt(t,(function(t){var i=t[0];i=Kl(i,n.x),i=Jl(i,n.x+n.width);var r=t[1];return r=Kl(r,n.y),[i,r=Jl(r,n.y+n.height)]}))}function dh(t,n,i){var r=ut({rectHover:!0},n),e=r.style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(e.image=t.slice(8),lt(e,i),new vs(r)):ih(t.replace("path://",""),r,i,"center")}function ph(t,n,i,r,e){for(var o=0,a=e[e.length-1];o<e.length;o++){var s=e[o];if(mh(t,n,i,r,s[0],s[1],a[0],a[1]))return!0;a=s}}function mh(t,n,i,r,e,o,a,s){var u,l=i-t,h=r-n,f=a-e,c=s-o,v=yh(f,c,l,h);if((u=v)<=1e-6&&u>=-1e-6)return!1;var d=t-e,p=n-o,m=yh(d,p,l,h)/v;if(m<0||m>1)return!1;var y=yh(d,p,f,c)/v;return!(y<0||y>1)}function yh(t,n,i,r){return t*r-i*n}function gh(t){var n=t.itemTooltipOption,i=t.componentModel,r=t.itemName,e=Mt(n)?{formatter:n}:n,o=i.mainType,a=i.componentIndex,s={componentType:o,name:r,$vars:["name"]};s[o+"Index"]=a;var u=t.formatterParamsExtra;u&&vt(yt(u),(function(t){Xt(s,t)||(s[t]=u[t],s.$vars.push(t))}));var l=Bs(t.el);l.componentMainType=o,l.componentIndex=a,l.tooltipConfig={name:r,option:lt({content:r,formatterParams:s},e)}}function bh(t,n){var i;t.isGroup&&(i=n(t)),i||t.traverse(n)}function wh(t,n){if(t)if(wt(t))for(var i=0;i<t.length;i++)bh(t[i],n);else bh(t,n)}th("circle",Ku),th("ellipse",Qu),th("sector",vl),th("ring",pl),th("polygon",gl),th("polyline",wl),th("rect",ws),th("line",Sl),th("bezierCurve",Cl),th("arc",zl);const xh=Object.freeze({__proto__:null,updateProps:Yl,initProps:Xl,removeElement:Ul,removeElementWithFadeOut:ql,isElementRemoved:Gl,extendShape:function(t){return us.extend(t)},extendPath:function(t,n){return i=Uu(t,n),function(t){function n(n){var r=t.call(this,n)||this;return r.applyTransform=i.applyTransform,r.buildPath=i.buildPath,r}return qt(n,t),n}(Xu);var i},registerShape:th,getShapeClass:nh,makePath:ih,makeImage:rh,mergePath:oh,resizePath:ah,subPixelOptimizeLine:function(t){return ps(t.shape,t.shape,t.style),t},subPixelOptimizeRect:function(t){return ms(t.shape,t.shape,t.style),t},subPixelOptimize:sh,getTransform:uh,applyTransform:lh,transformDirection:hh,groupTransition:ch,clipPointsByRect:vh,clipRectByRect:function(t,n){var i=Kl(t.x,n.x),r=Jl(t.x+t.width,n.x+n.width),e=Kl(t.y,n.y),o=Jl(t.y+t.height,n.y+n.height);if(r>=i&&o>=e)return{x:i,y:e,width:r-i,height:o-e}},createIcon:dh,linePolygonIntersect:ph,lineLineIntersect:mh,setTooltipConfig:gh,traverseElements:wh,Group:Oe,Image:vs,Text:Ss,Circle:Ku,Ellipse:Qu,Sector:vl,Ring:pl,Polygon:gl,Polyline:wl,Rect:ws,Line:Sl,BezierCurve:Cl,Arc:zl,IncrementalDisplayable:Wl,CompoundPath:Il,LinearGradient:Ol,RadialGradient:Dl,BoundingRect:ve,OrientedBoundingRect:El,Point:ee,Path:us});var Mh={};function Sh(t,n){for(var i=0;i<js.length;i++){var r=js[i],e=n[r],o=t.ensureState(r);o.style=o.style||{},o.style.text=e}var a=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:n.normal}),t.useStates(a,!0)}function kh(t,n,i){var r,e=t.labelFetcher,o=t.labelDataIndex,a=t.labelDimIndex,s=n.normal;e&&(r=e.getFormattedLabel(o,"normal",null,a,s&&s.get("formatter"),null!=i?{interpolatedValue:i}:null)),null==r&&(r=xt(t.defaultText)?t.defaultText(o,t,i):t.defaultText);for(var u={normal:r},l=0;l<js.length;l++){var h=js[l],f=n[h];u[h]=Ot(e?e.getFormattedLabel(o,h,null,a,f&&f.get("formatter")):null,r)}return u}function Ah(t,n,i,r){i=i||Mh;for(var e=t instanceof Ss,o=!1,a=0;a<Hs.length;a++)if((c=n[Hs[a]])&&c.getShallow("show")){o=!0;break}var s=e?t:t.getTextContent();if(o){e||(s||(s=new Ss,t.setTextContent(s)),t.stateProxy&&(s.stateProxy=t.stateProxy));var u=kh(i,n),l=n.normal,h=!!l.getShallow("show"),f=Ch(l,r&&r.normal,i,!1,!e);for(f.text=u.normal,e||t.setTextConfig(Th(l,i,!1)),a=0;a<js.length;a++){var c,v=js[a];if(c=n[v]){var d=s.ensureState(v),p=!!Ot(c.getShallow("show"),h);p!==h&&(d.ignore=!p),d.style=Ch(c,r&&r[v],i,!0,!e),d.style.text=u[v],e||(t.ensureState(v).textConfig=Th(c,i,!0))}}s.silent=!!l.getShallow("silent"),null!=s.style.x&&(f.x=s.style.x),null!=s.style.y&&(f.y=s.style.y),s.ignore=!h,s.useStyle(f),s.dirty(),i.enableTextSetter&&(Rh(s).setLabelText=function(t){var r=kh(i,n,t);Sh(s,r)})}else s&&(s.ignore=!0);t.dirty()}function Nh(t,n){for(var i={normal:t.getModel(n=n||"label")},r=0;r<js.length;r++){var e=js[r];i[e]=t.getModel([e,n])}return i}function Ch(t,n,i,r,e){var o={};return function(t,n,i,r,e){i=i||Mh;var o,a=n.ecModel,s=a&&a.option.textStyle,u=function(t){for(var n;t&&t!==t.ecModel;){var i=(t.option||Mh).rich;if(i){n=n||{};for(var r=yt(i),e=0;e<r.length;e++)n[r[e]]=1}t=t.parentModel}return n}(n);if(u)for(var l in o={},u)if(u.hasOwnProperty(l)){var h=n.getModel(["rich",l]);Oh(o[l]={},h,s,i,r,e,!1,!0)}o&&(t.rich=o);var f=n.get("overflow");f&&(t.overflow=f);var c=n.get("minMargin");null!=c&&(t.margin=c),Oh(t,n,s,i,r,e,!0,!1)}(o,t,i,r,e),n&&ut(o,n),o}function Th(t,n,i){n=n||{};var r,e={},o=t.getShallow("rotate"),a=Ot(t.getShallow("distance"),i?null:5),s=t.getShallow("offset");return"outside"===(r=t.getShallow("position")||(i?null:"inside"))&&(r=n.defaultOutsidePosition||"top"),null!=r&&(e.position=r),null!=s&&(e.offset=s),null!=o&&(o*=Math.PI/180,e.rotation=o),null!=a&&(e.distance=a),e.outsideFill="inherit"===t.get("color")?n.inheritColor||null:"auto",e}var zh=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Ih=["align","lineHeight","width","height","tag","verticalAlign"],Lh=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Oh(t,n,i,r,e,o,a,s){i=!e&&i||Mh;var u=r&&r.inheritColor,l=n.getShallow("color"),h=n.getShallow("textBorderColor"),f=Ot(n.getShallow("opacity"),i.opacity);"inherit"!==l&&"auto"!==l||(l=u||null),"inherit"!==h&&"auto"!==h||(h=u||null),o||(l=l||i.color,h=h||i.textBorderColor),null!=l&&(t.fill=l),null!=h&&(t.stroke=h);var c=Ot(n.getShallow("textBorderWidth"),i.textBorderWidth);null!=c&&(t.lineWidth=c);var v=Ot(n.getShallow("textBorderType"),i.textBorderType);null!=v&&(t.lineDash=v);var d=Ot(n.getShallow("textBorderDashOffset"),i.textBorderDashOffset);null!=d&&(t.lineDashOffset=d),e||null!=f||s||(f=r&&r.defaultOpacity),null!=f&&(t.opacity=f),e||o||null==t.fill&&r.inheritColor&&(t.fill=r.inheritColor);for(var p=0;p<zh.length;p++)null!=(g=Ot(n.getShallow(y=zh[p]),i[y]))&&(t[y]=g);for(p=0;p<Ih.length;p++)null!=(g=n.getShallow(y=Ih[p]))&&(t[y]=g);if(null==t.verticalAlign){var m=n.getShallow("baseline");null!=m&&(t.verticalAlign=m)}if(!a||!r.disableBox){for(p=0;p<Lh.length;p++){var y,g;null!=(g=n.getShallow(y=Lh[p]))&&(t[y]=g)}var b=n.getShallow("borderType");null!=b&&(t.borderDash=b),"auto"!==t.backgroundColor&&"inherit"!==t.backgroundColor||!u||(t.backgroundColor=u),"auto"!==t.borderColor&&"inherit"!==t.borderColor||!u||(t.borderColor=u)}}function Dh(t,n){var i=n&&n.getModel("textStyle");return Ft([t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))}var Rh=yo();function _h(t,n,i,r){if(t){var e=Rh(t);e.prevValue=e.value,e.value=i;var o=n.normal;e.valueAnimation=o.get("valueAnimation"),e.valueAnimation&&(e.precision=o.get("precision"),e.defaultInterpolatedText=r,e.statesModels=n)}}function Bh(t,n,i,r,e){var o=Rh(t);if(o.valueAnimation&&o.prevValue!==o.value){var a=o.defaultInterpolatedText,s=Ot(o.interpolatedValue,o.prevValue),u=o.value;t.percent=0,(null==o.prevValue?Xl:Yl)(t,{percent:1},r,n,null,(function(r){var l=No(i,o.precision,s,u,r);o.interpolatedValue=1===r?null:l;var h=kh({labelDataIndex:n,labelFetcher:e,defaultText:a?a(l):l+""},o.statesModels,l);Sh(t,h)}))}}var Fh,Eh,Ph=["textStyle","color"],Wh=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Vh=new Ss,jh=function(){function t(){}return t.prototype.getTextColor=function(t){var n=this.ecModel;return this.getShallow("color")||(!t&&n?n.get(Ph):null)},t.prototype.getFont=function(){return Dh({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},t.prototype.getTextRect=function(t){for(var n={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},i=0;i<Wh.length;i++)n[Wh[i]]=this.getShallow(Wh[i]);return Vh.useStyle(n),Vh.update(),Vh.getBoundingRect()},t}(),Hh=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],Yh=_o(Hh),Xh=function(){function t(){}return t.prototype.getLineStyle=function(t){return Yh(this,t)},t}(),Gh=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],Uh=_o(Gh),Zh=function(){function t(){}return t.prototype.getItemStyle=function(t,n){return Uh(this,t,n)},t}(),qh=function(){function t(t,n,i){this.parentModel=n,this.ecModel=i,this.option=t}return t.prototype.init=function(t,n,i){for(var r=[],e=3;e<arguments.length;e++)r[e-3]=arguments[e]},t.prototype.mergeOption=function(t){at(this.option,t,!0)},t.prototype.get=function(t,n){return null==t?this.option:this._doGet(this.parsePath(t),!n&&this.parentModel)},t.prototype.getShallow=function(t,n){var i=this.option,r=null==i?i:i[t];if(null==r&&!n){var e=this.parentModel;e&&(r=e.getShallow(t))}return r},t.prototype.getModel=function(n,i){var r=null!=n,e=r?this.parsePath(n):null;return new t(r?this._doGet(e):this.option,i=i||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(e)),this.ecModel)},t.prototype.isEmpty=function(){return null==this.option},t.prototype.restoreData=function(){},t.prototype.clone=function(){return new(0,this.constructor)(ot(this.option))},t.prototype.parsePath=function(t){return"string"==typeof t?t.split("."):t},t.prototype.resolveParentPath=function(t){return t},t.prototype.isAnimationEnabled=function(){if(!W.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},t.prototype._doGet=function(t,n){var i=this.option;if(!t)return i;for(var r=0;r<t.length&&(!t[r]||null!=(i=i&&"object"==typeof i?i[t[r]]:null));r++);return null==i&&n&&(i=n._doGet(this.resolveParentPath(t),n.parentModel)),i},t}();zo(qh),Fh=qh,Eh=["__\0is_clz",Lo++].join("_"),Fh.prototype[Eh]=!0,Fh.isInstance=function(t){return!(!t||!t[Eh])},ft(qh,Xh),ft(qh,Zh),ft(qh,Fo),ft(qh,jh);var $h=Math.round(10*Math.random());function Kh(t){return[t||"",$h++].join("_")}function Jh(t,n){return at(at({},t,!0),n,!0)}var Qh={},tf={},nf=W.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf("ZH")>-1?"ZH":"EN";function rf(t,n){t=t.toUpperCase(),tf[t]=new qh(n),Qh[t]=n}function ef(t){return tf[t]}rf("EN",{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),rf("ZH",{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var of={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},af={year:"{yyyy}",month:"{yyyy}-{MM}",day:"{yyyy}-{MM}-{dd}",hour:"{yyyy}-{MM}-{dd} "+of.hour,minute:"{yyyy}-{MM}-{dd} "+of.minute,second:"{yyyy}-{MM}-{dd} "+of.second,millisecond:of.none},sf=["year","month","day","hour","minute","second","millisecond"],uf=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function lf(t,n){return"0000".substr(0,n-(t+="").length)+t}function hf(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function ff(t,n,i,r){var e=Ge(t),o=e[df(i)](),a=e[pf(i)]()+1,s=Math.floor((a-1)/4)+1,u=e[mf(i)](),l=e["get"+(i?"UTC":"")+"Day"](),h=e[yf(i)](),f=(h-1)%12+1,c=e[gf(i)](),v=e[bf(i)](),d=e[wf(i)](),p=(r instanceof qh?r:ef(r||nf)||tf.EN).getModel("time"),m=p.get("month"),y=p.get("monthAbbr"),g=p.get("dayOfWeek"),b=p.get("dayOfWeekAbbr");return(n||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,o%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,m[a-1]).replace(/{MMM}/g,y[a-1]).replace(/{MM}/g,lf(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,lf(u,2)).replace(/{d}/g,u+"").replace(/{eeee}/g,g[l]).replace(/{ee}/g,b[l]).replace(/{e}/g,l+"").replace(/{HH}/g,lf(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,lf(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,lf(c,2)).replace(/{m}/g,c+"").replace(/{ss}/g,lf(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,lf(d,3)).replace(/{S}/g,d+"")}function cf(t,n){var i=Ge(t),r=i[pf(n)]()+1,e=i[mf(n)](),o=i[yf(n)](),a=i[gf(n)](),s=i[bf(n)](),u=0===i[wf(n)](),l=u&&0===s,h=l&&0===a,f=h&&0===o,c=f&&1===e;return c&&1===r?"year":c?"month":f?"day":h?"hour":l?"minute":u?"second":"millisecond"}function vf(t,n,i){var r=kt(t)?Ge(t):t;switch(n=n||cf(t,i)){case"year":return r[df(i)]();case"half-year":return r[pf(i)]()>=6?1:0;case"quarter":return Math.floor((r[pf(i)]()+1)/4);case"month":return r[pf(i)]();case"day":return r[mf(i)]();case"half-day":return r[yf(i)]()/24;case"hour":return r[yf(i)]();case"minute":return r[gf(i)]();case"second":return r[bf(i)]();case"millisecond":return r[wf(i)]()}}function df(t){return t?"getUTCFullYear":"getFullYear"}function pf(t){return t?"getUTCMonth":"getMonth"}function mf(t){return t?"getUTCDate":"getDate"}function yf(t){return t?"getUTCHours":"getHours"}function gf(t){return t?"getUTCMinutes":"getMinutes"}function bf(t){return t?"getUTCSeconds":"getSeconds"}function wf(t){return t?"getUTCMilliseconds":"getMilliseconds"}function xf(t){return t?"setUTCFullYear":"setFullYear"}function Mf(t){return t?"setUTCMonth":"setMonth"}function Sf(t){return t?"setUTCDate":"setDate"}function kf(t){return t?"setUTCHours":"setHours"}function Af(t){return t?"setUTCMinutes":"setMinutes"}function Nf(t){return t?"setUTCSeconds":"setSeconds"}function Cf(t){return t?"setUTCMilliseconds":"setMilliseconds"}function Tf(t){if(!Je(t))return Mt(t)?t:"-";var n=(t+"").split(".");return n[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(n.length>1?"."+n[1]:"")}function zf(t,n){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,n){return n.toUpperCase()})),n&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var If=_t,Lf=/([&<>"'])/g,Of={"&":"&","<":"<",">":">",'"':""","'":"'"};function Df(t){return null==t?"":(t+"").replace(Lf,(function(t,n){return Of[n]}))}function Rf(t,n,i){function r(t){return t&&Ft(t)?t:"-"}function e(t){return!(null==t||isNaN(t)||!isFinite(t))}var o="time"===n,a=t instanceof Date;if(o||a){var s=o?Ge(t):t;if(!isNaN(+s))return ff(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",i);if(a)return"-"}if("ordinal"===n)return St(t)?r(t):kt(t)&&e(t)?t+"":"-";var u=Ke(t);return e(u)?Tf(u):St(t)?r(t):"boolean"==typeof t?t+"":"-"}var _f=["a","b","c","d","e","f","g"],Bf=function(t,n){return"{"+t+(null==n?"":n)+"}"};function Ff(t,n,i){wt(n)||(n=[n]);var r=n.length;if(!r)return"";for(var e=n[0].$vars||[],o=0;o<e.length;o++){var a=_f[o];t=t.replace(Bf(a),Bf(a,0))}for(var s=0;s<r;s++)for(var u=0;u<e.length;u++){var l=n[s][e[u]];t=t.replace(Bf(_f[u],s),i?Df(l):l)}return t}function Ef(t,n){return n=n||"transparent",Mt(t)?t:At(t)&&t.colorStops&&(t.colorStops[0]||{}).color||n}function Pf(t,n){if("_blank"===n||"blank"===n){var i=window.open();i.opener=null,i.location.href=t}else window.open(t,n)}var Wf=vt,Vf=["left","right","top","bottom","width","height"],jf=[["width","left","right"],["height","top","bottom"]];function Hf(t,n,i,r,e){var o=0,a=0;null==r&&(r=1/0),null==e&&(e=1/0);var s=0;n.eachChild((function(u,l){var h,f,c=u.getBoundingRect(),v=n.childAt(l+1),d=v&&v.getBoundingRect();if("horizontal"===t){var p=c.width+(d?-d.x+c.x:0);(h=o+p)>r||u.newline?(o=0,h=p,a+=s+i,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(d?-d.y+c.y:0);(f=a+m)>e||u.newline?(o+=s+i,a=0,f=m,s=c.width):s=Math.max(s,c.width)}u.newline||(u.x=o,u.y=a,u.markRedraw(),"horizontal"===t?o=h+i:a=f+i)}))}var Yf=Hf;function Xf(t,n,i){i=If(i||0);var r=n.width,e=n.height,o=Fe(t.left,r),a=Fe(t.top,e),s=Fe(t.right,r),u=Fe(t.bottom,e),l=Fe(t.width,r),h=Fe(t.height,e),f=i[2]+i[0],c=i[1]+i[3],v=t.aspect;switch(isNaN(l)&&(l=r-s-c-o),isNaN(h)&&(h=e-u-f-a),null!=v&&(isNaN(l)&&isNaN(h)&&(v>r/e?l=.8*r:h=.8*e),isNaN(l)&&(l=v*h),isNaN(h)&&(h=l/v)),isNaN(o)&&(o=r-s-l-c),isNaN(a)&&(a=e-u-h-f),t.left||t.right){case"center":o=r/2-l/2-i[3];break;case"right":o=r-l-c}switch(t.top||t.bottom){case"middle":case"center":a=e/2-h/2-i[0];break;case"bottom":a=e-h-f}o=o||0,a=a||0,isNaN(l)&&(l=r-c-o-(s||0)),isNaN(h)&&(h=e-f-a-(u||0));var d=new ve(o+i[3],a+i[0],l,h);return d.margin=i,d}function Gf(t,n,i,r,e,o){var a,s=!e||!e.hv||e.hv[0],u=!e||!e.hv||e.hv[1],l=e&&e.boundingMode||"all";if((o=o||t).x=t.x,o.y=t.y,!s&&!u)return!1;if("raw"===l)a="group"===t.type?new ve(0,0,+n.width||0,+n.height||0):t.getBoundingRect();else if(a=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();(a=a.clone()).applyTransform(h)}var f=Xf(lt({width:a.width,height:a.height},n),i,r),c=s?f.x-a.x:0,v=u?f.y-a.y:0;return"raw"===l?(o.x=c,o.y=v):(o.x+=c,o.y+=v),o===t&&t.markRedraw(),!0}function Uf(t){var n=t.layoutMode||t.constructor.layoutMode;return At(n)?n:n?{type:n}:null}function Zf(t,n,i){var r=i&&i.ignoreSize;!wt(r)&&(r=[r,r]);var e=a(jf[0],0),o=a(jf[1],1);function a(i,e){var o={},a=0,l={},h=0;if(Wf(i,(function(n){l[n]=t[n]})),Wf(i,(function(t){s(n,t)&&(o[t]=l[t]=n[t]),u(o,t)&&a++,u(l,t)&&h++})),r[e])return u(n,i[1])?l[i[2]]=null:u(n,i[2])&&(l[i[1]]=null),l;if(2!==h&&a){if(a>=2)return o;for(var f=0;f<i.length;f++){var c=i[f];if(!s(o,c)&&s(t,c)){o[c]=t[c];break}}return o}return l}function s(t,n){return t.hasOwnProperty(n)}function u(t,n){return null!=t[n]&&"auto"!==t[n]}function l(t,n,i){Wf(t,(function(t){n[t]=i[t]}))}l(jf[0],t,e),l(jf[1],t,o)}function qf(t){return $f({},t)}function $f(t,n){return n&&t&&Wf(Vf,(function(i){n.hasOwnProperty(i)&&(t[i]=n[i])})),t}bt(Hf,"vertical"),bt(Hf,"horizontal");var Kf=yo(),Jf=function(t){function n(n,i,r){var e=t.call(this,n,i,r)||this;return e.uid=Kh("ec_cpt_model"),e}return E(n,t),n.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i)},n.prototype.mergeDefaultAndTheme=function(t,n){var i=Uf(this),r=i?qf(t):{};at(t,n.getTheme().get(this.mainType)),at(t,this.getDefaultOption()),i&&Zf(t,r,i)},n.prototype.mergeOption=function(t){at(this.option,t,!0);var n=Uf(this);n&&Zf(this.option,t,n)},n.prototype.optionUpdated=function(){},n.prototype.getDefaultOption=function(){var t=this.constructor;if(!function(t){return!(!t||!t.___EC__EXTENDED_CLASS___)}(t))return t.defaultOption;var n=Kf(this);if(!n.defaultOption){for(var i=[],r=t;r;){var e=r.prototype.defaultOption;e&&i.push(e),r=r.superClass}for(var o={},a=i.length-1;a>=0;a--)o=at(o,i[a],!0);n.defaultOption=o}return n.defaultOption},n.prototype.getReferringComponents=function(t,n){var i=t+"Id";return So(this.ecModel,t,{index:this.get(t+"Index",!0),id:this.get(i,!0)},n)},n.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},n.prototype.getZLevelKey=function(){return""},n.prototype.setZLevel=function(t){this.option.zlevel=t},n.protoInitialize=function(){var t=n.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),n}(qh);Io(Jf,qh),Ro(Jf),function(t){var n={};t.registerSubTypeDefaulter=function(t,i){var r=To(t);n[r.main]=i},t.determineSubType=function(i,r){var e=r.type;if(!e){var o=To(i).main;t.hasSubTypes(i)&&n[o]&&(e=n[o](r))}return e}}(Jf),function(){function t(t,n){return t[n]||(t[n]={predecessor:[],successor:[]}),t[n]}Jf.topologicalTravel=function(n,i,r,e){if(n.length){var o=function(n){var i={},r=[];return vt(n,(function(e){var o,a,s=t(i,e),u=function(t,n){var i=[];return vt(t,(function(t){ht(n,t)>=0&&i.push(t)})),i}(s.originalDeps=(a=[],vt(Jf.getClassesByMainType(o=e),(function(t){a=a.concat(t.dependencies||t.prototype.dependencies||[])})),a=dt(a,(function(t){return To(t).main})),"dataset"!==o&&ht(a,"dataset")<=0&&a.unshift("dataset"),a),n);s.entryCount=u.length,0===s.entryCount&&r.push(e),vt(u,(function(n){ht(s.predecessor,n)<0&&s.predecessor.push(n);var r=t(i,n);ht(r.successor,n)<0&&r.successor.push(e)}))})),{graph:i,noEntryList:r}}(i),a=o.graph,s=o.noEntryList,u={};for(vt(n,(function(t){u[t]=!0}));s.length;){var l=s.pop(),h=a[l],f=!!u[l];f&&(r.call(e,l,h.originalDeps.slice()),delete u[l]),vt(h.successor,f?v:c)}vt(u,(function(){throw new Error("")}))}function c(t){a[t].entryCount--,0===a[t].entryCount&&s.push(t)}function v(t){u[t]=!0,c(t)}}}();var Qf="";"undefined"!=typeof navigator&&(Qf=navigator.platform||"");var tc="rgba(0, 0, 0, 0.2)";const nc={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:tc,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:tc,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:tc,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:tc,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:tc,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:tc,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Qf.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var ic=Vt(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),rc=yo();function ec(t,n,i){var r={},e=ac(n);if(!e||!t)return r;var o,a,s=[],u=[],l=rc(n.ecModel).datasetMap,h=e.uid+"_"+i.seriesLayoutBy;vt(t=t.slice(),(function(n,i){var e=At(n)?n:t[i]={name:n};"ordinal"===e.type&&null==o&&(o=i,a=v(e)),r[e.name]=[]}));var f=l.get(h)||l.set(h,{categoryWayDim:a,valueWayDim:0});function c(t,n,i){for(var r=0;r<i;r++)t.push(n+r)}function v(t){var n=t.dimsDef;return n?n.length:1}return vt(t,(function(t,n){var i=t.name,e=v(t);if(null==o)c(r[i],a=f.valueWayDim,e),c(u,a,e),f.valueWayDim+=e;else if(o===n)c(r[i],0,e),c(s,0,e);else{var a;c(r[i],a=f.categoryWayDim,e),c(u,a,e),f.categoryWayDim+=e}})),s.length&&(r.itemName=s),u.length&&(r.seriesName=u),r}function oc(t,n,i){var r={};if(!ac(t))return r;var e,o=n.sourceFormat,a=n.dimensionsDefine;"objectRows"!==o&&"keyedColumns"!==o||vt(a,(function(t,n){"name"===(At(t)?t.name:t)&&(e=n)}));var s=function(){for(var t={},r={},s=[],u=0,l=Math.min(5,i);u<l;u++){var h=uc(n.data,o,n.seriesLayoutBy,a,n.startIndex,u);s.push(h);var f=3===h;if(f&&null==t.v&&u!==e&&(t.v=u),(null==t.n||t.n===t.v||!f&&3===s[t.n])&&(t.n=u),c(t)&&3!==s[t.n])return t;f||(2===h&&null==r.v&&u!==e&&(r.v=u),null!=r.n&&r.n!==r.v||(r.n=u))}function c(t){return null!=t.v&&null!=t.n}return c(t)?t:c(r)?r:null}();if(s){r.value=[s.v];var u=null!=e?e:s.n;r.itemName=[u],r.seriesName=[u]}return r}function ac(t){if(!t.get("data",!0))return So(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},xo).models[0]}function sc(t,n){return uc(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,n)}function uc(t,n,i,r,e,o){var a,s,u;if(Ct(t))return 3;if(r){var l=r[o];At(l)?(s=l.name,u=l.type):Mt(l)&&(s=l)}if(null!=u)return"ordinal"===u?1:3;if("arrayRows"===n){var h=t;if("row"===i){for(var f=h[o],c=0;c<(f||[]).length&&c<5;c++)if(null!=(a=g(f[e+c])))return a}else for(c=0;c<h.length&&c<5;c++){var v=h[e+c];if(v&&null!=(a=g(v[o])))return a}}else if("objectRows"===n){var d=t;if(!s)return 3;for(c=0;c<d.length&&c<5;c++)if((m=d[c])&&null!=(a=g(m[s])))return a}else if("keyedColumns"===n){if(!s)return 3;if(!(f=t[s])||Ct(f))return 3;for(c=0;c<f.length&&c<5;c++)if(null!=(a=g(f[c])))return a}else if("original"===n){var p=t;for(c=0;c<p.length&&c<5;c++){var m,y=so(m=p[c]);if(!wt(y))return 3;if(null!=(a=g(y[o])))return a}}function g(t){var n=Mt(t);return null!=t&&isFinite(t)&&""!==t?n?2:3:n&&"-"!==t?1:void 0}return 3}var lc,hc,fc,cc=Vt(),vc=yo(),dc=yo(),pc=function(){function t(){}return t.prototype.getColorFromPalette=function(t,n,i){var r=eo(this.get("color",!0)),e=this.get("colorLayer",!0);return yc(this,vc,r,e,t,n,i)},t.prototype.clearColorPalette=function(){!function(t,n){n(t).paletteIdx=0,n(t).paletteNameMap={}}(this,vc)},t}();function mc(t,n,i,r){var e=eo(t.get(["aria","decal","decals"]));return yc(t,dc,e,null,n,i,r)}function yc(t,n,i,r,e,o,a){var s=n(o=o||t),u=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(e))return l[e];var h=null!=a&&r?function(t,n){for(var i=t.length,r=0;r<i;r++)if(t[r].length>n)return t[r];return t[i-1]}(r,a):i;if((h=h||i)&&h.length){var f=h[u];return e&&(l[e]=f),s.paletteIdx=(u+1)%h.length,f}}var gc=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return E(n,t),n.prototype.init=function(t,n,i,r,e,o){r=r||{},this.option=null,this._theme=new qh(r),this._locale=new qh(e),this._optionManager=o},n.prototype.setOption=function(t,n,i){var r=xc(n);this._optionManager.setOption(t,i,r),this._resetOption(null,r)},n.prototype.resetOption=function(t,n){return this._resetOption(t,xc(n))},n.prototype._resetOption=function(t,n){var i=!1,r=this._optionManager;if(!t||"recreate"===t){var e=r.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(e,n)):fc(this,e),i=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=r.getTimelineOption(this);o&&(i=!0,this._mergeOption(o,n))}if(!t||"recreate"===t||"media"===t){var a=r.getMediaOption(this);a.length&&vt(a,(function(t){i=!0,this._mergeOption(t,n)}),this)}return i},n.prototype.mergeOption=function(t){this._mergeOption(t,null)},n.prototype._mergeOption=function(t,n){var i=this.option,r=this._componentsMap,e=this._componentsCount,o=[],a=Vt(),s=n&&n.replaceMergeMainTypeMap;rc(this).datasetMap=Vt(),vt(t,(function(t,n){null!=t&&(Jf.hasClass(n)?n&&(o.push(n),a.set(n,!0)):i[n]=null==i[n]?ot(t):at(i[n],t,!0))})),s&&s.each((function(t,n){Jf.hasClass(n)&&!a.get(n)&&(o.push(n),a.set(n,!0))})),Jf.topologicalTravel(o,Jf.getAllClassMainTypes(),(function(n){var o=function(t,n,i){var r=cc.get(n);if(!r)return i;var e=r(t);return e?i.concat(e):i}(this,n,eo(t[n])),a=r.get(n),u=lo(a,o,a?s&&s.get(n)?"replaceMerge":"normalMerge":"replaceAll");(function(t,n,i){vt(t,(function(t){var r=t.newOption;At(r)&&(t.keyInfo.mainType=n,t.keyInfo.subType=function(t,n,i,r){return n.type?n.type:i?i.subType:r.determineSubType(t,n)}(n,r,t.existing,i))}))})(u,n,Jf),i[n]=null,r.set(n,null),e.set(n,0);var l,h=[],f=[],c=0;vt(u,(function(t,i){var r=t.existing,e=t.newOption;if(e){var o=Jf.getClass(n,t.keyInfo.subType,!("series"===n));if(!o)return;if("tooltip"===n){if(l)return;l=!0}if(r&&r.constructor===o)r.name=t.keyInfo.name,r.mergeOption(e,this),r.optionUpdated(e,!1);else{var a=ut({componentIndex:i},t.keyInfo);ut(r=new o(e,this,this,a),a),t.brandNew&&(r.__requireNewView=!0),r.init(e,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(h.push(r.option),f.push(r),c++):(h.push(void 0),f.push(void 0))}),this),i[n]=h,r.set(n,f),e.set(n,c),"series"===n&&lc(this)}),this),this._seriesIndices||lc(this)},n.prototype.getOption=function(){var t=ot(this.option);return vt(t,(function(n,i){if(Jf.hasClass(i)){for(var r=eo(n),e=r.length,o=!1,a=e-1;a>=0;a--)r[a]&&!po(r[a])?o=!0:(r[a]=null,!o&&e--);r.length=e,t[i]=r}})),delete t["\0_ec_inner"],t},n.prototype.getTheme=function(){return this._theme},n.prototype.getLocaleModel=function(){return this._locale},n.prototype.setUpdatePayload=function(t){this._payload=t},n.prototype.getUpdatePayload=function(){return this._payload},n.prototype.getComponent=function(t,n){var i=this._componentsMap.get(t);if(i){var r=i[n||0];if(r)return r;if(null==n)for(var e=0;e<i.length;e++)if(i[e])return i[e]}},n.prototype.queryComponents=function(t){var n=t.mainType;if(!n)return[];var i,r=t.index,e=t.id,o=t.name,a=this._componentsMap.get(n);return a&&a.length?(null!=r?(i=[],vt(eo(r),(function(t){a[t]&&i.push(a[t])}))):i=null!=e?bc("id",e,a):null!=o?bc("name",o,a):mt(a,(function(t){return!!t})),wc(i,t)):[]},n.prototype.findComponents=function(t){var n,i,r,e,o,a=t.mainType,s=(i=a+"Index",r=a+"Id",e=a+"Name",!(n=t.query)||null==n[i]&&null==n[r]&&null==n[e]?null:{mainType:a,index:n[i],id:n[r],name:n[e]});return o=wc(s?this.queryComponents(s):mt(this._componentsMap.get(a),(function(t){return!!t})),t),t.filter?mt(o,t.filter):o},n.prototype.eachComponent=function(t,n,i){var r=this._componentsMap;if(xt(t)){var e=n,o=t;r.each((function(t,n){for(var i=0;t&&i<t.length;i++){var r=t[i];r&&o.call(e,n,r,r.componentIndex)}}))}else for(var a=Mt(t)?r.get(t):At(t)?this.findComponents(t):null,s=0;a&&s<a.length;s++){var u=a[s];u&&n.call(i,u,u.componentIndex)}},n.prototype.getSeriesByName=function(t){var n=co(t,null);return mt(this._componentsMap.get("series"),(function(t){return!!t&&null!=n&&t.name===n}))},n.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},n.prototype.getSeriesByType=function(t){return mt(this._componentsMap.get("series"),(function(n){return!!n&&n.subType===t}))},n.prototype.getSeries=function(){return mt(this._componentsMap.get("series"),(function(t){return!!t}))},n.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},n.prototype.eachSeries=function(t,n){hc(this),vt(this._seriesIndices,(function(i){var r=this._componentsMap.get("series")[i];t.call(n,r,i)}),this)},n.prototype.eachRawSeries=function(t,n){vt(this._componentsMap.get("series"),(function(i){i&&t.call(n,i,i.componentIndex)}))},n.prototype.eachSeriesByType=function(t,n,i){hc(this),vt(this._seriesIndices,(function(r){var e=this._componentsMap.get("series")[r];e.subType===t&&n.call(i,e,r)}),this)},n.prototype.eachRawSeriesByType=function(t,n,i){return vt(this.getSeriesByType(t),n,i)},n.prototype.isSeriesFiltered=function(t){return hc(this),null==this._seriesIndicesMap.get(t.componentIndex)},n.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},n.prototype.filterSeries=function(t,n){hc(this);var i=[];vt(this._seriesIndices,(function(r){var e=this._componentsMap.get("series")[r];t.call(n,e,r)&&i.push(r)}),this),this._seriesIndices=i,this._seriesIndicesMap=Vt(i)},n.prototype.restoreData=function(t){lc(this);var n=this._componentsMap,i=[];n.each((function(t,n){Jf.hasClass(n)&&i.push(n)})),Jf.topologicalTravel(i,Jf.getAllClassMainTypes(),(function(i){vt(n.get(i),(function(n){!n||"series"===i&&function(t,n){if(n){var i=n.seriesIndex,r=n.seriesId,e=n.seriesName;return null!=i&&t.componentIndex!==i||null!=r&&t.id!==r||null!=e&&t.name!==e}}(n,t)||n.restoreData()}))}))},n.internalField=(lc=function(t){var n=t._seriesIndices=[];vt(t._componentsMap.get("series"),(function(t){t&&n.push(t.componentIndex)})),t._seriesIndicesMap=Vt(n)},hc=function(){},void(fc=function(t,n){t.option={},t.option["\0_ec_inner"]=1,t._componentsMap=Vt({series:[]}),t._componentsCount=Vt();var i=n.aria;At(i)&&null==i.enabled&&(i.enabled=!0),function(t,n){var i=t.color&&!t.colorLayer;vt(n,(function(n,r){"colorLayer"===r&&i||Jf.hasClass(r)||("object"==typeof n?t[r]=t[r]?at(t[r],n,!1):ot(n):null==t[r]&&(t[r]=n))}))}(n,t._theme.option),at(n,nc,!1),t._mergeOption(n,null)})),n}(qh);function bc(t,n,i){if(wt(n)){var r=Vt();return vt(n,(function(t){null!=t&&null!=co(t,null)&&r.set(t,!0)})),mt(i,(function(n){return n&&r.get(n[t])}))}var e=co(n,null);return mt(i,(function(n){return n&&null!=e&&n[t]===e}))}function wc(t,n){return n.hasOwnProperty("subType")?mt(t,(function(t){return t&&t.subType===n.subType})):t}function xc(t){var n=Vt();return t&&vt(eo(t.replaceMerge),(function(t){n.set(t,!0)})),{replaceMergeMainTypeMap:n}}ft(gc,pc);var Mc=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],Sc=function(t){vt(Mc,(function(n){this[n]=gt(t[n],t)}),this)},kc={},Ac=function(){function t(){this._coordinateSystems=[]}return t.prototype.create=function(t,n){var i=[];vt(kc,(function(r){var e=r.create(t,n);i=i.concat(e||[])})),this._coordinateSystems=i},t.prototype.update=function(t,n){vt(this._coordinateSystems,(function(i){i.update&&i.update(t,n)}))},t.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},t.register=function(t,n){kc[t]=n},t.get=function(t){return kc[t]},t}(),Nc=/^(min|max)?(.+)$/,Cc=function(){function t(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return t.prototype.setOption=function(t,n){t&&(vt(eo(t.series),(function(t){t&&t.data&&Ct(t.data)&&Et(t.data)})),vt(eo(t.dataset),(function(t){t&&t.source&&Ct(t.source)&&Et(t.source)}))),t=ot(t);var i=this._optionBackup,r=function(t,n,i){var r,e,o=[],a=t.baseOption,s=t.timeline,u=t.options,l=t.media,h=!!t.media,f=!!(u||s||a&&a.timeline);function c(t){vt(n,(function(n){n(t,i)}))}return a?(e=a).timeline||(e.timeline=s):((f||h)&&(t.options=t.media=null),e=t),h&&wt(l)&&vt(l,(function(t){t&&t.option&&(t.query?o.push(t):r||(r=t))})),c(e),vt(u,(function(t){return c(t)})),vt(o,(function(t){return c(t.option)})),{baseOption:e,timelineOptions:u||[],mediaDefault:r,mediaList:o}}(t,n,!i);this._newBaseOption=r.baseOption,i?(r.timelineOptions.length&&(i.timelineOptions=r.timelineOptions),r.mediaList.length&&(i.mediaList=r.mediaList),r.mediaDefault&&(i.mediaDefault=r.mediaDefault)):this._optionBackup=r},t.prototype.mountOption=function(t){var n=this._optionBackup;return this._timelineOptions=n.timelineOptions,this._mediaList=n.mediaList,this._mediaDefault=n.mediaDefault,this._currentMediaIndices=[],ot(t?n.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(t){var n,i=this._timelineOptions;if(i.length){var r=t.getComponent("timeline");r&&(n=ot(i[r.getCurrentIndex()]))}return n},t.prototype.getMediaOption=function(){var t,n=this._api.getWidth(),i=this._api.getHeight(),r=this._mediaList,e=this._mediaDefault,o=[],a=[];if(!r.length&&!e)return a;for(var s=0,u=r.length;s<u;s++)Tc(r[s].query,n,i)&&o.push(s);return!o.length&&e&&(o=[-1]),o.length&&(t=this._currentMediaIndices,o.join(",")!==t.join(","))&&(a=dt(o,(function(t){return ot(-1===t?e.option:r[t].option)}))),this._currentMediaIndices=o,a},t}();function Tc(t,n,i){var r={width:n,height:i,aspectratio:n/i},e=!0;return vt(t,(function(t,n){var i=n.match(Nc);if(i&&i[1]&&i[2]){var o=i[1],a=i[2].toLowerCase();(function(t,n,i){return"min"===i?t>=n:"max"===i?t<=n:t===n})(r[a],t,o)||(e=!1)}})),e}var zc=vt,Ic=At,Lc=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Oc(t){var n=t&&t.itemStyle;if(n)for(var i=0,r=Lc.length;i<r;i++){var e=Lc[i],o=n.normal,a=n.emphasis;o&&o[e]&&(t[e]=t[e]||{},t[e].normal?at(t[e].normal,o[e]):t[e].normal=o[e],o[e]=null),a&&a[e]&&(t[e]=t[e]||{},t[e].emphasis?at(t[e].emphasis,a[e]):t[e].emphasis=a[e],a[e]=null)}}function Dc(t,n,i){if(t&&t[n]&&(t[n].normal||t[n].emphasis)){var r=t[n].normal,e=t[n].emphasis;r&&(i?(t[n].normal=t[n].emphasis=null,lt(t[n],r)):t[n]=r),e&&(t.emphasis=t.emphasis||{},t.emphasis[n]=e,e.focus&&(t.emphasis.focus=e.focus),e.blurScope&&(t.emphasis.blurScope=e.blurScope))}}function Rc(t){Dc(t,"itemStyle"),Dc(t,"lineStyle"),Dc(t,"areaStyle"),Dc(t,"label"),Dc(t,"labelLine"),Dc(t,"upperLabel"),Dc(t,"edgeLabel")}function _c(t,n){var i=Ic(t)&&t[n],r=Ic(i)&&i.textStyle;if(r)for(var e=0,o=ao.length;e<o;e++){var a=ao[e];r.hasOwnProperty(a)&&(i[a]=r[a])}}function Bc(t){t&&(Rc(t),_c(t,"label"),t.emphasis&&_c(t.emphasis,"label"))}function Fc(t){return wt(t)?t:t?[t]:[]}function Ec(t){return(wt(t)?t[0]:t)||{}}function Pc(t){t&&vt(Wc,(function(n){n[0]in t&&!(n[1]in t)&&(t[n[1]]=t[n[0]])}))}var Wc=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Vc=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],jc=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Hc(t){var n=t&&t.itemStyle;if(n)for(var i=0;i<jc.length;i++){var r=jc[i][1];null!=n[r]&&(n[jc[i][0]]=n[r])}}function Yc(t){t&&"edge"===t.alignTo&&null!=t.margin&&null==t.edgeDistance&&(t.edgeDistance=t.margin)}function Xc(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay)}function Gc(t,n){if(t)for(var i=0;i<t.length;i++)n(t[i]),t[i]&&Gc(t[i].children,n)}function Uc(t,n){(function(t,n){zc(Fc(t.series),(function(t){Ic(t)&&function(t){if(Ic(t)){Oc(t),Rc(t),_c(t,"label"),_c(t,"upperLabel"),_c(t,"edgeLabel"),t.emphasis&&(_c(t.emphasis,"label"),_c(t.emphasis,"upperLabel"),_c(t.emphasis,"edgeLabel"));var n=t.markPoint;n&&(Oc(n),Bc(n));var i=t.markLine;i&&(Oc(i),Bc(i));var r=t.markArea;r&&Bc(r);var e=t.data;if("graph"===t.type){e=e||t.nodes;var o=t.links||t.edges;if(o&&!Ct(o))for(var a=0;a<o.length;a++)Bc(o[a]);vt(t.categories,(function(t){Rc(t)}))}if(e&&!Ct(e))for(a=0;a<e.length;a++)Bc(e[a]);if((n=t.markPoint)&&n.data){var s=n.data;for(a=0;a<s.length;a++)Bc(s[a])}if((i=t.markLine)&&i.data){var u=i.data;for(a=0;a<u.length;a++)wt(u[a])?(Bc(u[a][0]),Bc(u[a][1])):Bc(u[a])}"gauge"===t.type?(_c(t,"axisLabel"),_c(t,"title"),_c(t,"detail")):"treemap"===t.type?(Dc(t.breadcrumb,"itemStyle"),vt(t.levels,(function(t){Rc(t)}))):"tree"===t.type&&Rc(t.leaves)}}(t)}));var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];n&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),zc(i,(function(n){zc(Fc(t[n]),(function(t){t&&(_c(t,"axisLabel"),_c(t.axisPointer,"label"))}))})),zc(Fc(t.parallel),(function(t){var n=t&&t.parallelAxisDefault;_c(n,"axisLabel"),_c(n&&n.axisPointer,"label")})),zc(Fc(t.calendar),(function(t){Dc(t,"itemStyle"),_c(t,"dayLabel"),_c(t,"monthLabel"),_c(t,"yearLabel")})),zc(Fc(t.radar),(function(t){_c(t,"name"),t.name&&null==t.axisName&&(t.axisName=t.name,delete t.name),null!=t.nameGap&&null==t.axisNameGap&&(t.axisNameGap=t.nameGap,delete t.nameGap)})),zc(Fc(t.geo),(function(t){Ic(t)&&(Bc(t),zc(Fc(t.regions),(function(t){Bc(t)})))})),zc(Fc(t.timeline),(function(t){Bc(t),Dc(t,"label"),Dc(t,"itemStyle"),Dc(t,"controlStyle",!0);var n=t.data;wt(n)&&vt(n,(function(t){At(t)&&(Dc(t,"label"),Dc(t,"itemStyle"))}))})),zc(Fc(t.toolbox),(function(t){Dc(t,"iconStyle"),zc(t.feature,(function(t){Dc(t,"iconStyle")}))})),_c(Ec(t.axisPointer),"label"),_c(Ec(t.tooltip).axisPointer,"label")})(t,n),t.series=eo(t.series),vt(t.series,(function(t){if(At(t)){var n=t.type;if("line"===n)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===n||"gauge"===n){if(null!=t.clockWise&&(t.clockwise=t.clockWise),Yc(t.label),(e=t.data)&&!Ct(e))for(var i=0;i<e.length;i++)Yc(e[i]);null!=t.hoverOffset&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if("gauge"===n){var r=function(t){for(var n="pointer.color".split(","),i=t,r=0;r<n.length&&null!=(i=i&&i[n[r]]);r++);return i}(t);null!=r&&function(t,n,i){for(var r,e="itemStyle.color".split(","),o=t,a=0;a<e.length-1;a++)null==o[r=e[a]]&&(o[r]={}),o=o[r];null==o[e[a]]&&(o[e[a]]=i)}(t,0,r)}else if("bar"===n){var e;if(Hc(t),Hc(t.backgroundStyle),Hc(t.emphasis),(e=t.data)&&!Ct(e))for(i=0;i<e.length;i++)"object"==typeof e[i]&&(Hc(e[i]),Hc(e[i]&&e[i].emphasis))}else if("sunburst"===n){var o=t.highlightPolicy;o&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=o)),Xc(t),Gc(t.data,Xc)}else"graph"===n||"sankey"===n?function(t){t&&null!=t.focusNodeAdjacency&&(t.emphasis=t.emphasis||{},null==t.emphasis.focus&&(t.emphasis.focus="adjacency"))}(t):"map"===n&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&<(t,t.mapLocation));null!=t.hoverAnimation&&(t.emphasis=t.emphasis||{},t.emphasis&&null==t.emphasis.scale&&(t.emphasis.scale=t.hoverAnimation)),Pc(t)}})),t.dataRange&&(t.visualMap=t.dataRange),vt(Vc,(function(n){var i=t[n];i&&(wt(i)||(i=[i]),vt(i,(function(t){Pc(t)})))}))}function Zc(t){vt(t,(function(n,i){var r=[],e=[NaN,NaN],o=n.data,a=n.isStackedByIndex;o.modify([n.stackResultDimension,n.stackedOverDimension],(function(s,u,l){var h,f,c=o.get(n.stackedDimension,l);if(isNaN(c))return e;a?f=o.getRawIndex(l):h=o.get(n.stackedByDimension,l);for(var v=NaN,d=i-1;d>=0;d--){var p=t[d];if(a||(f=p.data.rawIndexOf(p.stackedByDimension,h)),f>=0){var m=p.data.getByRawIndex(p.stackResultDimension,f);if(c>=0&&m>0||c<=0&&m<0){c=je(c,m),v=m;break}}}return r[0]=c,r[1]=v,r}))}))}var qc,$c,Kc,Jc,Qc,tv=function(t){this.data=t.data||("keyedColumns"===t.sourceFormat?{}:[]),this.sourceFormat=t.sourceFormat||"unknown",this.seriesLayoutBy=t.seriesLayoutBy||"column",this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var n=this.dimensionsDefine=t.dimensionsDefine;if(n)for(var i=0;i<n.length;i++){var r=n[i];null==r.type&&1===sc(this,i)&&(r.type="ordinal")}};function nv(t){return t instanceof tv}function iv(t,n,i){i=i||ev(t);var r=n.seriesLayoutBy,e=function(t,n,i,r,e){var o,a;if(!t)return{dimensionsDefine:ov(e),startIndex:a,dimensionsDetectedCount:o};if("arrayRows"===n){var s=t;"auto"===r||null==r?av((function(t){null!=t&&"-"!==t&&(Mt(t)?null==a&&(a=1):a=0)}),i,s,10):a=kt(r)?r:r?1:0,e||1!==a||(e=[],av((function(t,n){e[n]=null!=t?t+"":""}),i,s,1/0)),o=e?e.length:"row"===i?s.length:s[0]?s[0].length:null}else if("objectRows"===n)e||(e=function(t){for(var n,i=0;i<t.length&&!(n=t[i++]););if(n){var r=[];return vt(n,(function(t,n){r.push(n)})),r}}(t));else if("keyedColumns"===n)e||(e=[],vt(t,(function(t,n){e.push(n)})));else if("original"===n){var u=so(t[0]);o=wt(u)&&u.length||1}return{startIndex:a,dimensionsDefine:ov(e),dimensionsDetectedCount:o}}(t,i,r,n.sourceHeader,n.dimensions);return new tv({data:t,sourceFormat:i,seriesLayoutBy:r,dimensionsDefine:e.dimensionsDefine,startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount,metaRawOption:ot(n)})}function rv(t){return new tv({data:t,sourceFormat:Ct(t)?"typedArray":"original"})}function ev(t){var n="unknown";if(Ct(t))n="typedArray";else if(wt(t)){0===t.length&&(n="arrayRows");for(var i=0,r=t.length;i<r;i++){var e=t[i];if(null!=e){if(wt(e)){n="arrayRows";break}if(At(e)){n="objectRows";break}}}}else if(At(t))for(var o in t)if(Xt(t,o)&&ct(t[o])){n="keyedColumns";break}return n}function ov(t){if(t){var n=Vt();return dt(t,(function(t){var i={name:(t=At(t)?t:{name:t}).name,displayName:t.displayName,type:t.type};if(null==i.name)return i;i.name+="",null==i.displayName&&(i.displayName=i.name);var r=n.get(i.name);return r?i.name+="-"+r.count++:n.set(i.name,{count:1}),i}))}}function av(t,n,i,r){if("row"===n)for(var e=0;e<i.length&&e<r;e++)t(i[e]?i[e][0]:null,e);else{var o=i[0]||[];for(e=0;e<o.length&&e<r;e++)t(o[e],e)}}var sv=function(){function t(t,n){var i=nv(t)?t:rv(t);this._source=i;var r=this._data=i.data;"typedArray"===i.sourceFormat&&(this._offset=0,this._dimSize=n,this._data=r),Qc(this,r,i)}return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(){},t.prototype.appendData=function(){},t.prototype.clean=function(){},t.protoInitialize=function(){var n=t.prototype;n.pure=!1,n.persistent=!0}(),t.internalField=function(){var t;Qc=function(t,e,o){var a=o.sourceFormat,s=o.seriesLayoutBy,u=o.startIndex,l=o.dimensionsDefine;if(ut(t,Jc[yv(a,s)]),"typedArray"===a)t.getItem=n,t.count=r,t.fillStorage=i;else{var h=hv(a,s);t.getItem=gt(h,null,e,u,l);var f=vv(a,s);t.count=gt(f,null,e,u,l)}};var n=function(t,n){n=n||[];for(var i=this._data,r=this._dimSize,e=r*(t-=this._offset),o=0;o<r;o++)n[o]=i[e+o];return n},i=function(t,n,i,r){for(var e=this._data,o=this._dimSize,a=0;a<o;a++){for(var s=r[a],u=null==s[0]?1/0:s[0],l=null==s[1]?-1/0:s[1],h=n-t,f=i[a],c=0;c<h;c++){var v=e[c*o+a];f[t+c]=v,v<u&&(u=v),v>l&&(l=v)}s[0]=u,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};function e(t){for(var n=0;n<t.length;n++)this._data.push(t[n])}(t={}).arrayRows_column={pure:!0,appendData:e},t.arrayRows_row={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t.objectRows={pure:!0,appendData:e},t.keyedColumns={pure:!0,appendData:function(t){var n=this._data;vt(t,(function(t,i){for(var r=n[i]||(n[i]=[]),e=0;e<(t||[]).length;e++)r.push(t[e])}))}},t.original={appendData:e},t.typedArray={persistent:!1,pure:!0,appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}},Jc=t}(),t}(),uv=function(t,n,i,r){return t[r]},lv=((qc={}).arrayRows_column=function(t,n,i,r){return t[r+n]},qc.arrayRows_row=function(t,n,i,r,e){r+=n;for(var o=e||[],a=t,s=0;s<a.length;s++){var u=a[s];o[s]=u?u[r]:null}return o},qc.objectRows=uv,qc.keyedColumns=function(t,n,i,r,e){for(var o=e||[],a=0;a<i.length;a++){var s=t[i[a].name];o[a]=s?s[r]:null}return o},qc.original=uv,qc);function hv(t,n){return lv[yv(t,n)]}var fv=function(t){return t.length},cv=(($c={}).arrayRows_column=function(t,n){return Math.max(0,t.length-n)},$c.arrayRows_row=function(t,n){var i=t[0];return i?Math.max(0,i.length-n):0},$c.objectRows=fv,$c.keyedColumns=function(t,n,i){var r=t[i[0].name];return r?r.length:0},$c.original=fv,$c);function vv(t,n){return cv[yv(t,n)]}var dv=function(t,n){return t[n]},pv=((Kc={}).arrayRows=dv,Kc.objectRows=function(t,n,i){return t[i]},Kc.keyedColumns=dv,Kc.original=function(t,n){var i=so(t);return i instanceof Array?i[n]:i},Kc.typedArray=dv,Kc);function mv(t){return pv[t]}function yv(t,n){return"arrayRows"===t?t+"_"+n:t}function gv(t,n,i){if(t){var r=t.getRawDataItem(n);if(null!=r){var e=t.getStore(),o=e.getSource().sourceFormat;if(null!=i){var a=t.getDimensionIndex(i),s=e.getDimensionProperty(a);return mv(o)(r,a,s)}var u=r;return"original"===o&&(u=so(r)),u}}}var bv=/\{@(.+?)\}/g,wv=function(){function t(){}return t.prototype.getDataParams=function(t,n){var i=this.getData(n),r=this.getRawValue(t,n),e=i.getRawIndex(t),o=i.getName(t),a=i.getRawDataItem(t),s=i.getItemVisual(t,"style"),u=s&&s[i.getItemVisual(t,"drawType")||"fill"],l=s&&s.stroke,h=this.mainType,f="series"===h,c=i.userOutput&&i.userOutput.get();return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:f?this.subType:null,seriesIndex:this.seriesIndex,seriesId:f?this.id:null,seriesName:f?this.name:null,name:o,dataIndex:e,data:a,dataType:n,value:r,color:u,borderColor:l,dimensionNames:c?c.fullDimensions:null,encode:c?c.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(t,n,i,r,e,o){n=n||"normal";var a=this.getData(i),s=this.getDataParams(t,i);return o&&(s.value=o.interpolatedValue),null!=r&&wt(s.value)&&(s.value=s.value[r]),e||(e=a.getItemModel(t).get("normal"===n?["label","formatter"]:[n,"label","formatter"])),xt(e)?(s.status=n,s.dimensionIndex=r,e(s)):Mt(e)?Ff(e,s).replace(bv,(function(n,i){var r=i.length,e=i;"["===e.charAt(0)&&"]"===e.charAt(r-1)&&(e=+e.slice(1,r-1));var s=gv(a,t,e);if(o&&wt(o.interpolatedValue)){var u=a.getDimensionIndex(e);u>=0&&(s=o.interpolatedValue[u])}return null!=s?s+"":""})):void 0},t.prototype.getRawValue=function(t,n){return gv(this.getData(n),t)},t.prototype.formatTooltip=function(){},t}();function xv(t){var n,i;return At(t)?t.type&&(i=t):n=t,{text:n,frag:i}}function Mv(t){return new Sv(t)}var Sv=function(){function t(t){this._reset=(t=t||{}).reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var n,i=this._upstream,r=t&&t.skip;if(this._dirty&&i){var e=this.context;e.data=e.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(n=this._plan(this.context));var o,a=h(this._modBy),s=this._modDataCount||0,u=h(t&&t.modBy),l=t&&t.modDataCount||0;function h(t){return!(t>=1)&&(t=1),t}a===u&&s===l||(n="reset"),(this._dirty||"reset"===n)&&(this._dirty=!1,o=this._doReset(r)),this._modBy=u,this._modDataCount=l;var f=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var c=this._dueIndex,v=Math.min(null!=f?this._dueIndex+f:1/0,this._dueEnd);if(!r&&(o||c<v)){var d=this._progress;if(wt(d))for(var p=0;p<d.length;p++)this._doProgress(d[p],c,v,u,l);else this._doProgress(d,c,v,u,l)}this._dueIndex=v,this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:v}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},t.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},t.prototype._doProgress=function(t,n,i,r,e){kv.reset(n,i,r,e),this._callingProgress=t,this._callingProgress({start:n,end:i,count:i-n,next:kv.next},this.context)},t.prototype._doReset=function(t){var n,i;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!t&&this._reset&&((n=this._reset(this.context))&&n.progress&&(i=n.forceFirstProgress,n=n.progress),wt(n)&&!n.length&&(n=null)),this._progress=n,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),i},t.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},t.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},t.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},t.prototype.getUpstream=function(){return this._upstream},t.prototype.getDownstream=function(){return this._downstream},t.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},t}(),kv=function(){var t,n,i,r,e,o={reset:function(u,l,h,f){n=u,t=l,i=h,r=f,e=Math.ceil(r/i),o.next=i>1&&r>0?s:a}};return o;function a(){return n<t?n++:null}function s(){var o=n%e*i+Math.ceil(n/e),a=n>=t?null:o<r?o:n;return n++,a}}();function Av(t,n){var i=n&&n.type;return"ordinal"===i?t:("time"!==i||kt(t)||null==t||"-"===t||(t=+Ge(t)),null==t||""===t?NaN:+t)}var Nv=Vt({number:function(t){return parseFloat(t)},time:function(t){return+Ge(t)},trim:function(t){return Mt(t)?Ft(t):t}});function Cv(t){return Nv.get(t)}var Tv={lt:function(t,n){return t<n},lte:function(t,n){return t<=n},gt:function(t,n){return t>n},gte:function(t,n){return t>=n}},zv=function(){function t(t,n){kt(n)||io(""),this._opFn=Tv[t],this._rvalFloat=Ke(n)}return t.prototype.evaluate=function(t){return kt(t)?this._opFn(t,this._rvalFloat):this._opFn(Ke(t),this._rvalFloat)},t}(),Iv=function(){function t(t,n){var i="desc"===t;this._resultLT=i?1:-1,null==n&&(n=i?"min":"max"),this._incomparable="min"===n?-1/0:1/0}return t.prototype.evaluate=function(t,n){var i=kt(t)?t:Ke(t),r=kt(n)?n:Ke(n),e=isNaN(i),o=isNaN(r);if(e&&(i=this._incomparable),o&&(r=this._incomparable),e&&o){var a=Mt(t),s=Mt(n);a&&(i=s?t:0),s&&(r=a?n:0)}return i<r?this._resultLT:i>r?-this._resultLT:0},t}(),Lv=function(){function t(t,n){this._rval=n,this._isEQ=t,this._rvalTypeof=typeof n,this._rvalFloat=Ke(n)}return t.prototype.evaluate=function(t){var n=t===this._rval;if(!n){var i=typeof t;i===this._rvalTypeof||"number"!==i&&"number"!==this._rvalTypeof||(n=Ke(t)===this._rvalFloat)}return this._isEQ?n:!n},t}();function Ov(t,n){return"eq"===t||"ne"===t?new Lv("eq"===t,n):Xt(Tv,t)?new zv(t,n):null}var Dv=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(){},t.prototype.retrieveValueFromItem=function(){},t.prototype.convertValue=function(t,n){return Av(t,n)},t}();function Rv(t){return Wv(t.sourceFormat)||io(""),t.data}function _v(t){var n=t.sourceFormat,i=t.data;if(Wv(n)||io(""),"arrayRows"===n){for(var r=[],e=0,o=i.length;e<o;e++)r.push(i[e].slice());return r}if("objectRows"===n){for(r=[],e=0,o=i.length;e<o;e++)r.push(ut({},i[e]));return r}}function Bv(t,n,i){if(null!=i)return kt(i)||!isNaN(i)&&!Xt(n,i)?t[i]:Xt(n,i)?n[i]:void 0}function Fv(t){return ot(t)}var Ev=Vt();function Pv(t,n){n.length||io(""),At(t)||io("");var i=Ev.get(t.type);i||io("");var r=dt(n,(function(t){return function(t,n){var i=new Dv,r=t.data,e=i.sourceFormat=t.sourceFormat,o=t.startIndex;"column"!==t.seriesLayoutBy&&io("");var a=[],s={},u=t.dimensionsDefine;if(u)vt(u,(function(t,n){var i=t.name,r={index:n,name:i,displayName:t.displayName};a.push(r),null!=i&&(Xt(s,i)&&io(""),s[i]=r)}));else for(var l=0;l<t.dimensionsDetectedCount;l++)a.push({index:l});var h=hv(e,"column");n.__isBuiltIn&&(i.getRawDataItem=function(t){return h(r,o,a,t)},i.getRawData=gt(Rv,null,t)),i.cloneRawData=gt(_v,null,t);var f=vv(e,"column");i.count=gt(f,null,r,o,a);var c=mv(e);i.retrieveValue=function(t,n){var i=h(r,o,a,t);return v(i,n)};var v=i.retrieveValueFromItem=function(t,n){if(null!=t){var i=a[n];return i?c(t,n,i.name):void 0}};return i.getDimensionInfo=gt(Bv,null,a,s),i.cloneAllDimensionInfo=gt(Fv,null,a),i}(t,i)}));return dt(eo(i.transform({upstream:r[0],upstreamList:r,config:ot(t.config)})),(function(t,i){var r;At(t)||io(""),t.data||io(""),Wv(ev(t.data))||io("");var e=n[0];if(e&&0===i&&!t.dimensions){var o=e.startIndex;o&&(t.data=e.data.slice(0,o).concat(t.data)),r={seriesLayoutBy:"column",sourceHeader:o,dimensions:e.metaRawOption.dimensions}}else r={seriesLayoutBy:"column",sourceHeader:0,dimensions:t.dimensions};return iv(t.data,r,null)}))}function Wv(t){return"arrayRows"===t||"objectRows"===t}var Vv,jv="undefined"==typeof Uint32Array?Array:Uint32Array,Hv="undefined"==typeof Uint16Array?Array:Uint16Array,Yv="undefined"==typeof Int32Array?Array:Int32Array,Xv="undefined"==typeof Float64Array?Array:Float64Array,Gv={float:Xv,int:Yv,ordinal:Array,number:Array,time:Xv};function Uv(t){return t>65535?jv:Hv}function Zv(t,n,i,r,e){var o=Gv[i||"float"];if(e){var a=t[n],s=a&&a.length;if(s!==r){for(var u=new o(r),l=0;l<s;l++)u[l]=a[l];t[n]=u}}else t[n]=new o(r)}var qv=function(){function t(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Vt()}return t.prototype.initData=function(t,n,i){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=t.getSource(),e=this.defaultDimValueGetter=Vv[r.sourceFormat];this._dimValueGetter=i||e,this._rawExtent=[],this._dimensions=dt(n,(function(t){return{type:t.type,property:t.property}})),this._initDataFromProvider(0,t.count())},t.prototype.getProvider=function(){return this._provider},t.prototype.getSource=function(){return this._provider.getSource()},t.prototype.ensureCalculationDimension=function(t,n){var i=this._calcDimNameToIdx,r=this._dimensions,e=i.get(t);if(null!=e){if(r[e].type===n)return e}else e=r.length;return r[e]={type:n},i.set(t,e),this._chunks[e]=new Gv[n||"float"](this._rawCount),this._rawExtent[e]=[1/0,-1/0],e},t.prototype.collectOrdinalMeta=function(t,n){var i=this._chunks[t],r=this._dimensions[t],e=this._rawExtent,o=r.ordinalOffset||0,a=i.length;0===o&&(e[t]=[1/0,-1/0]);for(var s=e[t],u=o;u<a;u++){var l=i[u]=n.parseAndCollect(i[u]);isNaN(l)||(s[0]=Math.min(l,s[0]),s[1]=Math.max(l,s[1]))}r.ordinalMeta=n,r.ordinalOffset=a,r.type="ordinal"},t.prototype.getOrdinalMeta=function(t){return this._dimensions[t].ordinalMeta},t.prototype.getDimensionProperty=function(t){var n=this._dimensions[t];return n&&n.property},t.prototype.appendData=function(t){var n=this._provider,i=this.count();n.appendData(t);var r=n.count();return n.persistent||(r+=i),i<r&&this._initDataFromProvider(i,r,!0),[i,r]},t.prototype.appendValues=function(t,n){for(var i=this._chunks,r=this._dimensions,e=r.length,o=this._rawExtent,a=this.count(),s=a+Math.max(t.length,n||0),u=0;u<e;u++)Zv(i,u,r[u].type,s,!0);for(var l=[],h=a;h<s;h++)for(var f=h-a,c=0;c<e;c++){var v=Vv.arrayRows.call(this,t[f]||l,r[c].property,f,c);i[c][h]=v;var d=o[c];v<d[0]&&(d[0]=v),v>d[1]&&(d[1]=v)}return this._rawCount=this._count=s,{start:a,end:s}},t.prototype._initDataFromProvider=function(t,n,i){for(var r=this._provider,e=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,u=dt(o,(function(t){return t.property})),l=0;l<a;l++){var h=o[l];s[l]||(s[l]=[1/0,-1/0]),Zv(e,l,h.type,n,i)}if(r.fillStorage)r.fillStorage(t,n,e,s);else for(var f=[],c=t;c<n;c++){f=r.getItem(c,f);for(var v=0;v<a;v++){var d=e[v],p=this._dimValueGetter(f,u[v],c,v);d[c]=p;var m=s[v];p<m[0]&&(m[0]=p),p>m[1]&&(m[1]=p)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=n,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,n){if(!(n>=0&&n<this._count))return NaN;var i=this._chunks[t];return i?i[this.getRawIndex(n)]:NaN},t.prototype.getValues=function(t,n){var i=[],r=[];if(null==n){n=t,t=[];for(var e=0;e<this._dimensions.length;e++)r.push(e)}else r=t;e=0;for(var o=r.length;e<o;e++)i.push(this.get(r[e],n));return i},t.prototype.getByRawIndex=function(t,n){if(!(n>=0&&n<this._rawCount))return NaN;var i=this._chunks[t];return i?i[n]:NaN},t.prototype.getSum=function(t){var n=0;if(this._chunks[t])for(var i=0,r=this.count();i<r;i++){var e=this.get(t,i);isNaN(e)||(n+=e)}return n},t.prototype.getMedian=function(t){var n=[];this.each([t],(function(t){isNaN(t)||n.push(t)}));var i=n.sort((function(t,n){return t-n})),r=this.count();return 0===r?0:r%2==1?i[(r-1)/2]:(i[r/2]+i[r/2-1])/2},t.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var n=this._indices,i=n[t];if(null!=i&&i<this._count&&i===t)return t;for(var r=0,e=this._count-1;r<=e;){var o=(r+e)/2|0;if(n[o]<t)r=o+1;else{if(!(n[o]>t))return o;e=o-1}}return-1},t.prototype.indicesOfNearest=function(t,n,i){var r=this._chunks[t],e=[];if(!r)return e;null==i&&(i=1/0);for(var o=1/0,a=-1,s=0,u=0,l=this.count();u<l;u++){var h=n-r[this.getRawIndex(u)],f=Math.abs(h);f<=i&&((f<o||f===o&&h>=0&&a<0)&&(o=f,a=h,s=0),h===a&&(e[s++]=u))}return e.length=s,e},t.prototype.getIndices=function(){var t,n=this._indices;if(n){var i=this._count;if((e=n.constructor)===Array){t=new e(i);for(var r=0;r<i;r++)t[r]=n[r]}else t=new e(n.buffer,0,i)}else{var e;for(t=new(e=Uv(this._rawCount))(this.count()),r=0;r<t.length;r++)t[r]=r}return t},t.prototype.filter=function(t,n){if(!this._count)return this;for(var i=this.clone(),r=i.count(),e=new(Uv(i._rawCount))(r),o=[],a=t.length,s=0,u=t[0],l=i._chunks,h=0;h<r;h++){var f=void 0,c=i.getRawIndex(h);if(0===a)f=n(h);else if(1===a)f=n(l[u][c],h);else{for(var v=0;v<a;v++)o[v]=l[t[v]][c];o[v]=h,f=n.apply(null,o)}f&&(e[s++]=c)}return s<r&&(i._indices=e),i._count=s,i._extent=[],i._updateGetRawIdx(),i},t.prototype.selectRange=function(t){var n=this.clone(),i=n._count;if(!i)return this;var r=yt(t),e=r.length;if(!e)return this;var o=n.count(),a=new(Uv(n._rawCount))(o),s=0,u=r[0],l=t[u][0],h=t[u][1],f=n._chunks,c=!1;if(!n._indices){var v=0;if(1===e){for(var d=f[r[0]],p=0;p<i;p++)((S=d[p])>=l&&S<=h||isNaN(S))&&(a[s++]=v),v++;c=!0}else if(2===e){d=f[r[0]];var m=f[r[1]],y=t[r[1]][0],g=t[r[1]][1];for(p=0;p<i;p++){var b=m[p];((S=d[p])>=l&&S<=h||isNaN(S))&&(b>=y&&b<=g||isNaN(b))&&(a[s++]=v),v++}c=!0}}if(!c)if(1===e)for(p=0;p<o;p++){var w=n.getRawIndex(p);((S=f[r[0]][w])>=l&&S<=h||isNaN(S))&&(a[s++]=w)}else for(p=0;p<o;p++){for(var x=!0,M=(w=n.getRawIndex(p),0);M<e;M++){var S,k=r[M];((S=f[k][w])<t[k][0]||S>t[k][1])&&(x=!1)}x&&(a[s++]=n.getRawIndex(p))}return s<o&&(n._indices=a),n._count=s,n._extent=[],n._updateGetRawIdx(),n},t.prototype.map=function(t,n){var i=this.clone(t);return this._updateDims(i,t,n),i},t.prototype.modify=function(t,n){this._updateDims(this,t,n)},t.prototype._updateDims=function(t,n,i){for(var r=t._chunks,e=[],o=n.length,a=t.count(),s=[],u=t._rawExtent,l=0;l<n.length;l++)u[n[l]]=[1/0,-1/0];for(var h=0;h<a;h++){for(var f=t.getRawIndex(h),c=0;c<o;c++)s[c]=r[n[c]][f];s[o]=h;var v=i&&i.apply(null,s);if(null!=v)for("object"!=typeof v&&(e[0]=v,v=e),l=0;l<v.length;l++){var d=n[l],p=v[l],m=u[d],y=r[d];y&&(y[f]=p),p<m[0]&&(m[0]=p),p>m[1]&&(m[1]=p)}}},t.prototype.lttbDownSample=function(t,n){var i,r,e,o=this.clone([t],!0),a=o._chunks[t],s=this.count(),u=0,l=Math.floor(1/n),h=this.getRawIndex(0),f=new(Uv(this._rawCount))(Math.min(2*(Math.ceil(s/l)+2),s));f[u++]=h;for(var c=1;c<s-1;c+=l){for(var v=Math.min(c+l,s-1),d=Math.min(c+2*l,s),p=(d+v)/2,m=0,y=v;y<d;y++){var g=a[A=this.getRawIndex(y)];isNaN(g)||(m+=g)}m/=d-v;var b=c,w=Math.min(c+l,s),x=c-1,M=a[h];i=-1,e=b;var S=-1,k=0;for(y=b;y<w;y++){var A;g=a[A=this.getRawIndex(y)],isNaN(g)?(k++,S<0&&(S=A)):(r=Math.abs((x-p)*(g-M)-(x-y)*(m-M)))>i&&(i=r,e=A)}k>0&&k<w-b&&(f[u++]=Math.min(S,e),e=Math.max(S,e)),f[u++]=e,h=e}return f[u++]=this.getRawIndex(s-1),o._count=u,o._indices=f,o.getRawIndex=this._getRawIdx,o},t.prototype.downSample=function(t,n,i,r){for(var e=this.clone([t],!0),o=e._chunks,a=[],s=Math.floor(1/n),u=o[t],l=this.count(),h=e._rawExtent[t]=[1/0,-1/0],f=new(Uv(this._rawCount))(Math.ceil(l/s)),c=0,v=0;v<l;v+=s){s>l-v&&(a.length=s=l-v);for(var d=0;d<s;d++){var p=this.getRawIndex(v+d);a[d]=u[p]}var m=i(a),y=this.getRawIndex(Math.min(v+r(a,m)||0,l-1));u[y]=m,m<h[0]&&(h[0]=m),m>h[1]&&(h[1]=m),f[c++]=y}return e._count=c,e._indices=f,e._updateGetRawIdx(),e},t.prototype.each=function(t,n){if(this._count)for(var i=t.length,r=this._chunks,e=0,o=this.count();e<o;e++){var a=this.getRawIndex(e);switch(i){case 0:n(e);break;case 1:n(r[t[0]][a],e);break;case 2:n(r[t[0]][a],r[t[1]][a],e);break;default:for(var s=0,u=[];s<i;s++)u[s]=r[t[s]][a];u[s]=e,n.apply(null,u)}}},t.prototype.getDataExtent=function(t){var n=this._chunks[t],i=[1/0,-1/0];if(!n)return i;var r,e=this.count();if(!this._indices)return this._rawExtent[t].slice();if(r=this._extent[t])return r.slice();for(var o=(r=i)[0],a=r[1],s=0;s<e;s++){var u=n[this.getRawIndex(s)];u<o&&(o=u),u>a&&(a=u)}return this._extent[t]=r=[o,a],r},t.prototype.getRawDataItem=function(t){var n=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(n);for(var i=[],r=this._chunks,e=0;e<r.length;e++)i.push(r[e][n]);return i},t.prototype.clone=function(n,i){var r,e,o=new t,a=this._chunks,s=n&&pt(n,(function(t,n){return t[n]=!0,t}),{});if(s)for(var u=0;u<a.length;u++)o._chunks[u]=s[u]?(e=void 0,(e=(r=a[u]).constructor)===Array?r.slice():new e(r)):a[u];else o._chunks=a;return this._copyCommonProps(o),i||(o._indices=this._cloneIndices()),o._updateGetRawIdx(),o},t.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=ot(this._extent),t._rawExtent=ot(this._rawExtent)},t.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,n=void 0;if(t===Array){var i=this._indices.length;n=new t(i);for(var r=0;r<i;r++)n[r]=this._indices[r]}else n=new t(this._indices);return n}return null},t.prototype._getRawIdxIdentity=function(t){return t},t.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,n,i,r){return Av(t[r],this._dimensions[r])}Vv={arrayRows:t,objectRows:function(t,n,i,r){return Av(t[n],this._dimensions[r])},keyedColumns:t,original:function(t,n,i,r){var e=t&&(null==t.value?t:t.value);return Av(e instanceof Array?e[r]:e,this._dimensions[r])},typedArray:function(t,n,i,r){return t[r]}}}(),t}(),$v=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,n){this._sourceList=t,this._upstreamSignList=n,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,n,i=this._sourceHost,r=this._getUpstreamSourceManagers(),e=!!r.length;if(Jv(i)){var o=i,a=void 0,s=void 0,u=void 0;if(e){var l=r[0];l.prepareSource(),a=(u=l.getSource()).data,s=u.sourceFormat,n=[l._getVersionSign()]}else s=Ct(a=o.get("data",!0))?"typedArray":"original",n=[];var h=this._getSourceMetaRawOption()||{},f=u&&u.metaRawOption||{},c=Ot(h.seriesLayoutBy,f.seriesLayoutBy)||null,v=Ot(h.sourceHeader,f.sourceHeader),d=Ot(h.dimensions,f.dimensions);t=c!==f.seriesLayoutBy||!!v!=!!f.sourceHeader||d?[iv(a,{seriesLayoutBy:c,sourceHeader:v,dimensions:d},s)]:[]}else{var p=i;if(e){var m=this._applyTransform(r);t=m.sourceList,n=m.upstreamSignList}else t=[iv(p.get("source",!0),this._getSourceMetaRawOption(),null)],n=[]}this._setLocalSource(t,n)},t.prototype._applyTransform=function(t){var n,i=this._sourceHost,r=i.get("transform",!0),e=i.get("fromTransformResult",!0);null!=e&&1!==t.length&&Qv("");var o,a=[],s=[];return vt(t,(function(t){t.prepareSource();var n=t.getSource(e||0);null==e||n||Qv(""),a.push(n),s.push(t._getVersionSign())})),r?n=function(t,n){var i=eo(t),r=i.length;r||io("");for(var e=0,o=r;e<o;e++)n=Pv(i[e],n),e!==o-1&&(n.length=Math.max(n.length,1));return n}(r,a):null!=e&&(n=[(o=a[0],new tv({data:o.data,sourceFormat:o.sourceFormat,seriesLayoutBy:o.seriesLayoutBy,dimensionsDefine:ot(o.dimensionsDefine),startIndex:o.startIndex,dimensionsDetectedCount:o.dimensionsDetectedCount}))]),{sourceList:n,upstreamSignList:s}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),n=0;n<t.length;n++){var i=t[n];if(i._isDirty()||this._upstreamSignList[n]!==i._getVersionSign())return!0}},t.prototype.getSource=function(t){var n=this._sourceList[t=t||0];if(!n){var i=this._getUpstreamSourceManagers();return i[0]&&i[0].getSource(t)}return n},t.prototype.getSharedDataStore=function(t){var n=t.makeStoreSchema();return this._innerGetDataStore(n.dimensions,t.source,n.hash)},t.prototype._innerGetDataStore=function(t,n,i){var r=this._storeList,e=r[0];e||(e=r[0]={});var o=e[i];if(!o){var a=this._getUpstreamSourceManagers()[0];Jv(this._sourceHost)&&a?o=a._innerGetDataStore(t,n,i):(o=new qv).initData(new sv(n,t.length),t),e[i]=o}return o},t.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(Jv(t)){var n=ac(t);return n?[n.getSourceManager()]:[]}return dt(function(t){return t.get("transform",!0)||t.get("fromTransformResult",!0)?So(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},xo).models:[]}(t),(function(t){return t.getSourceManager()}))},t.prototype._getSourceMetaRawOption=function(){var t,n,i,r=this._sourceHost;if(Jv(r))t=r.get("seriesLayoutBy",!0),n=r.get("sourceHeader",!0),i=r.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var e=r;t=e.get("seriesLayoutBy",!0),n=e.get("sourceHeader",!0),i=e.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:n,dimensions:i}},t}();function Kv(t){t.option.transform&&Et(t.option.transform)}function Jv(t){return"series"===t.mainType}function Qv(t){throw new Error(t)}function td(t,n){var i=t.color||"#6e7079",r=t.fontSize||12,e=t.fontWeight||"400",o=t.color||"#464646",a=t.fontSize||14,s=t.fontWeight||"900";return"html"===n?{nameStyle:"font-size:"+Df(r+"")+"px;color:"+Df(i)+";font-weight:"+Df(e+""),valueStyle:"font-size:"+Df(a+"")+"px;color:"+Df(o)+";font-weight:"+Df(s+"")}:{nameStyle:{fontSize:r,fill:i,fontWeight:e},valueStyle:{fontSize:a,fill:o,fontWeight:s}}}var nd=[0,10,20,30],id=["","\n","\n\n","\n\n\n"];function rd(t,n){return n.type=t,n}function ed(t){return"section"===t.type}function od(t){return ed(t)?sd:ud}function ad(t){if(ed(t)){var n=0,i=t.blocks.length,r=i>1||i>0&&!t.noHeader;return vt(t.blocks,(function(t){var i=ad(t);i>=n&&(n=i+ +(r&&(!i||ed(t)&&!t.noHeader)))})),n}return 0}function sd(t,n,i,r){var e,o=n.noHeader,a=(e=ad(n),{html:nd[e],richText:id[e]}),s=[],u=n.blocks||[];Bt(!u||wt(u)),u=u||[];var l=t.orderMode;if(n.sortBlocks&&l){u=u.slice();var h={valueAsc:"asc",valueDesc:"desc"};if(Xt(h,l)){var f=new Iv(h[l],null);u.sort((function(t,n){return f.evaluate(t.sortParam,n.sortParam)}))}else"seriesDesc"===l&&u.reverse()}vt(u,(function(i,e){var o=n.valueFormatter,u=od(i)(o?ut(ut({},t),{valueFormatter:o}):t,i,e>0?a.html:0,r);null!=u&&s.push(u)}));var c="richText"===t.renderMode?s.join(a.richText):hd(s.join(""),o?i:a.html);if(o)return c;var v=Rf(n.header,"ordinal",t.useUTC),d=td(r,t.renderMode).nameStyle;return"richText"===t.renderMode?fd(t,v,d)+a.richText+c:hd('<div style="'+d+';line-height:1;">'+Df(v)+"</div>"+c,i)}function ud(t,n,i,r){var e=t.renderMode,o=n.noName,a=n.noValue,s=!n.markerType,u=n.name,l=t.useUTC,h=n.valueFormatter||t.valueFormatter||function(t){return dt(t=wt(t)?t:[t],(function(t,n){return Rf(t,wt(v)?v[n]:v,l)}))};if(!o||!a){var f=s?"":t.markupStyleCreator.makeTooltipMarker(n.markerType,n.markerColor||"#333",e),c=o?"":Rf(u,"ordinal",l),v=n.valueType,d=a?[]:h(n.value),p=!s||!o,m=!s&&o,y=td(r,e),g=y.nameStyle,b=y.valueStyle;return"richText"===e?(s?"":f)+(o?"":fd(t,c,g))+(a?"":function(t,n,i,r,e){var o=[e];return i&&o.push({padding:[0,0,0,r?10:20],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(wt(n)?n.join(" "):n,o)}(t,d,p,m,b)):hd((s?"":f)+(o?"":function(t,n,i){return'<span style="'+i+";"+(n?"margin-left:2px":"")+'">'+Df(t)+"</span>"}(c,!s,g))+(a?"":function(t,n,i,r){return'<span style="'+(n?"float:right;margin-left:"+(i?"10px":"20px"):"")+";"+r+'">'+dt(t=wt(t)?t:[t],(function(t){return Df(t)})).join(" ")+"</span>"}(d,p,m,b)),i)}}function ld(t,n,i,r,e,o){if(t)return od(t)({useUTC:e,renderMode:i,orderMode:r,markupStyleCreator:n,valueFormatter:t.valueFormatter},t,0,o)}function hd(t,n){return'<div style="margin: '+n+'px 0 0;line-height:1;">'+t+'<div style="clear:both"></div></div>'}function fd(t,n,i){return t.markupStyleCreator.wrapRichTextStyle(n,i)}function cd(t,n){return Ef(t.getData().getItemVisual(n,"style")[t.visualDrawType])}function vd(t,n){var i=t.get("padding");return null!=i?i:"richText"===n?[8,10]:10}var dd=function(){function t(){this.richTextStyles={},this._nextStyleNameId=Qe()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,n,i){var r="richText"===i?this._generateStyleName():null,e=function(t,n){var i=Mt(t)?{color:t,extraCssText:n}:t||{},r=i.color,e=i.type;n=i.extraCssText;var o=i.renderMode||"html";return r?"html"===o?"subItem"===e?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Df(r)+";"+(n||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Df(r)+";"+(n||"")+'"></span>':{renderMode:o,content:"{"+(i.markerId||"markerX")+"|} ",style:"subItem"===e?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}({color:n,type:t,renderMode:i,markerId:r});return Mt(e)?e:(this.richTextStyles[r]=e.style,e.content)},t.prototype.wrapRichTextStyle=function(t,n){var i={};wt(n)?vt(n,(function(t){return ut(i,t)})):ut(i,n);var r=this._generateStyleName();return this.richTextStyles[r]=i,"{"+r+"|"+t+"}"},t}();function pd(t){var n,i,r,e,o=t.series,a=t.dataIndex,s=t.multipleSeries,u=o.getData(),l=u.mapDimensionsAll("defaultedTooltip"),h=l.length,f=o.getRawValue(a),c=wt(f),v=cd(o,a);if(h>1||c&&!h){var d=function(t,n,i,r,e){var o=n.getData(),a=pt(t,(function(t,n,i){var r=o.getDimensionInfo(i);return t||r&&!1!==r.tooltip&&null!=r.displayName}),!1),s=[],u=[],l=[];function h(t,n){var i=o.getDimensionInfo(n);i&&!1!==i.otherDims.tooltip&&(a?l.push(rd("nameValue",{markerType:"subItem",markerColor:e,name:i.displayName,value:t,valueType:i.type})):(s.push(t),u.push(i.type)))}return r.length?vt(r,(function(t){h(gv(o,i,t),t)})):vt(t,h),{inlineValues:s,inlineValueTypes:u,blocks:l}}(f,o,a,l,v);n=d.inlineValues,i=d.inlineValueTypes,r=d.blocks,e=d.inlineValues[0]}else if(h){var p=u.getDimensionInfo(l[0]);e=n=gv(u,a,l[0]),i=p.type}else e=n=c?f[0]:f;var m=vo(o),y=m&&o.name||"",g=u.getName(a),b=s?y:g;return rd("section",{header:y,noHeader:s||!m,sortParam:e,blocks:[rd("nameValue",{markerType:"item",markerColor:v,name:b,noName:!Ft(b),value:n,valueType:i})].concat(r||[])})}var md=yo();function yd(t,n){return t.getName(n)||t.getId(n)}var gd=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n._selectedDataIndicesMap={},n}return E(n,t),n.prototype.init=function(t,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Mv({count:wd,reset:xd}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i),(md(this).sourceManager=new $v(this)).prepareSource();var r=this.getInitialData(t,i);Sd(r,this),this.dataTask.context.data=r,md(this).dataBeforeProcessed=r,bd(this),this._initSelectedMapFromData(r)},n.prototype.mergeDefaultAndTheme=function(t,n){var i=Uf(this),r=i?qf(t):{},e=this.subType;Jf.hasClass(e)&&(e+="Series"),at(t,n.getTheme().get(this.subType)),at(t,this.getDefaultOption()),oo(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&Zf(t,r,i)},n.prototype.mergeOption=function(t,n){t=at(this.option,t,!0),this.fillDataTextStyle(t.data);var i=Uf(this);i&&Zf(this.option,t,i);var r=md(this).sourceManager;r.dirty(),r.prepareSource();var e=this.getInitialData(t,n);Sd(e,this),this.dataTask.dirty(),this.dataTask.context.data=e,md(this).dataBeforeProcessed=e,bd(this),this._initSelectedMapFromData(e)},n.prototype.fillDataTextStyle=function(t){if(t&&!Ct(t))for(var n=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&oo(t[i],"label",n)},n.prototype.getInitialData=function(){},n.prototype.appendData=function(t){this.getRawData().appendData(t.data)},n.prototype.getData=function(t){var n=Ad(this);if(n){var i=n.context.data;return null==t?i:i.getLinkedData(t)}return md(this).data},n.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},n.prototype.setData=function(t){var n=Ad(this);if(n){var i=n.context;i.outputData=t,n!==this.dataTask&&(i.data=t)}md(this).data=t},n.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return Vt(t)},n.prototype.getSourceManager=function(){return md(this).sourceManager},n.prototype.getSource=function(){return this.getSourceManager().getSource()},n.prototype.getRawData=function(){return md(this).dataBeforeProcessed},n.prototype.getColorBy=function(){return this.get("colorBy")||"series"},n.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},n.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},n.prototype.formatTooltip=function(t,n){return pd({series:this,dataIndex:t,multipleSeries:n})},n.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(W.node&&(!t||!t.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},n.prototype.restoreData=function(){this.dataTask.dirty()},n.prototype.getColorFromPalette=function(t,n,i){var r=this.ecModel,e=pc.prototype.getColorFromPalette.call(this,t,n,i);return e||(e=r.getColorFromPalette(t,n,i)),e},n.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},n.prototype.getProgressive=function(){return this.get("progressive")},n.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},n.prototype.select=function(t,n){this._innerSelect(this.getData(n),t)},n.prototype.unselect=function(t,n){var i=this.option.selectedMap;if(i){var r=this.option.selectedMode,e=this.getData(n);if("series"===r||"all"===i)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o<t.length;o++){var a=yd(e,t[o]);i[a]=!1,this._selectedDataIndicesMap[a]=-1}}},n.prototype.toggleSelect=function(t,n){for(var i=[],r=0;r<t.length;r++)i[0]=t[r],this.isSelected(t[r],n)?this.unselect(i,n):this.select(i,n)},n.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,n=yt(t),i=[],r=0;r<n.length;r++){var e=t[n[r]];e>=0&&i.push(e)}return i},n.prototype.isSelected=function(t,n){var i=this.option.selectedMap;if(!i)return!1;var r=this.getData(n);return("all"===i||i[yd(r,t)])&&!r.getItemModel(t).get(["select","disabled"])},n.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},n.prototype._innerSelect=function(t,n){var i,r,e=this.option,o=e.selectedMode,a=n.length;if(o&&a)if("series"===o)e.selectedMap="all";else if("multiple"===o){At(e.selectedMap)||(e.selectedMap={});for(var s=e.selectedMap,u=0;u<a;u++){var l=n[u];s[f=yd(t,l)]=!0,this._selectedDataIndicesMap[f]=t.getRawIndex(l)}}else if("single"===o||!0===o){var h=n[a-1],f=yd(t,h);e.selectedMap=((i={})[f]=!0,i),this._selectedDataIndicesMap=((r={})[f]=t.getRawIndex(h),r)}},n.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var n=[];t.hasItemOption&&t.each((function(i){var r=t.getRawDataItem(i);r&&r.selected&&n.push(i)})),n.length>0&&this._innerSelect(t,n)}},n.registerClass=function(t){return Jf.registerClass(t)},n.protoInitialize=function(){var t=n.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),n}(Jf);function bd(t){var n=t.name;vo(t)||(t.name=function(t){var n=t.getRawData(),i=n.mapDimensionsAll("seriesName"),r=[];return vt(i,(function(t){var i=n.getDimensionInfo(t);i.displayName&&r.push(i.displayName)})),r.join(" ")}(t)||n)}function wd(t){return t.model.getRawData().count()}function xd(t){var n=t.model;return n.setData(n.getRawData().cloneShallow()),Md}function Md(t,n){n.outputData&&t.end>n.outputData.count()&&n.model.getRawData().cloneShallow(n.outputData)}function Sd(t,n){vt(jt(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(i){t.wrapMethod(i,bt(kd,n))}))}function kd(t,n){var i=Ad(t);return i&&i.setOutputEnd((n||this).count()),n}function Ad(t){var n=(t.ecModel||{}).scheduler,i=n&&n.getPipeline(t.uid);if(i){var r=i.currentTask;if(r){var e=r.agentStubMap;e&&(r=e.get(t.uid))}return r}}ft(gd,wv),ft(gd,pc),Io(gd,Jf);var Nd=function(){function t(){this.group=new Oe,this.uid=Kh("viewComponent")}return t.prototype.init=function(){},t.prototype.render=function(){},t.prototype.dispose=function(){},t.prototype.updateView=function(){},t.prototype.updateLayout=function(){},t.prototype.updateVisual=function(){},t.prototype.toggleBlurSeries=function(){},t.prototype.eachRendered=function(t){var n=this.group;n&&n.traverse(t)},t}();function Cd(){var t=yo();return function(n){var i=t(n),r=n.pipelineContext,e=!!i.large,o=!!i.progressiveRender,a=i.large=!(!r||!r.large),s=i.progressiveRender=!(!r||!r.progressiveRender);return!(e===a&&o===s)&&"reset"}}zo(Nd),Ro(Nd);var Td=yo(),zd=Cd(),Id=function(){function t(){this.group=new Oe,this.uid=Kh("viewChart"),this.renderTask=Mv({plan:Dd,reset:Rd}),this.renderTask.context={view:this}}return t.prototype.init=function(){},t.prototype.render=function(){},t.prototype.highlight=function(t,n,i,r){var e=t.getData(r&&r.dataType);e&&Od(e,r,"emphasis")},t.prototype.downplay=function(t,n,i,r){var e=t.getData(r&&r.dataType);e&&Od(e,r,"normal")},t.prototype.remove=function(){this.group.removeAll()},t.prototype.dispose=function(){},t.prototype.updateView=function(t,n,i,r){this.render(t,n,i,r)},t.prototype.updateLayout=function(t,n,i,r){this.render(t,n,i,r)},t.prototype.updateVisual=function(t,n,i,r){this.render(t,n,i,r)},t.prototype.eachRendered=function(t){wh(this.group,t)},t.markUpdateMethod=function(t,n){Td(t).updateMethod=n},t.protoInitialize=void(t.prototype.type="chart"),t}();function Ld(t,n,i){t&&Cu(t)&&("emphasis"===n?su:uu)(t,i)}function Od(t,n,i){var r=mo(t,n),e=n&&null!=n.highlightKey?function(t){var n=Ps[t];return null==n&&Es<=32&&(n=Ps[t]=Es++),n}(n.highlightKey):null;null!=r?vt(eo(r),(function(n){Ld(t.getItemGraphicEl(n),i,e)})):t.eachItemGraphicEl((function(t){Ld(t,i,e)}))}function Dd(t){return zd(t.model)}function Rd(t){var n=t.model,i=t.ecModel,r=t.api,e=t.payload,o=n.pipelineContext.progressiveRender,a=t.view,s=e&&Td(e).updateMethod,u=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==u&&a[u](n,i,r,e),_d[u]}zo(Id),Ro(Id);var _d={incrementalPrepareRender:{progress:function(t,n){n.view.incrementalRender(t,n.model,n.ecModel,n.api,n.payload)}},render:{forceFirstProgress:!0,progress:function(t,n){n.view.render(n.model,n.ecModel,n.api,n.payload)}}},Bd="\0__throttleOriginMethod",Fd="\0__throttleRate";function Ed(t,n,i){var r,e,o,a,s,u=0,l=0,h=null;function f(){l=(new Date).getTime(),h=null,t.apply(o,a||[])}n=n||0;var c=function(){for(var t=[],c=0;c<arguments.length;c++)t[c]=arguments[c];r=(new Date).getTime(),o=this,a=t;var v=s||n,d=s||i;s=null,e=r-(d?u:l)-v,clearTimeout(h),d?h=setTimeout(f,v):e>=0?f():h=setTimeout(f,-e),u=r};return c.clear=function(){h&&(clearTimeout(h),h=null)},c.debounceNextCall=function(t){s=t},c}function Pd(t,n,i,r){var e=t[n];if(e){var o=e[Bd]||e;if(e[Fd]!==i||e["\0__throttleType"]!==r){if(null==i||!r)return t[n]=o;(e=t[n]=Ed(o,i,"debounce"===r))[Bd]=o,e["\0__throttleType"]=r,e[Fd]=i}return e}}function Wd(t,n){var i=t[n];i&&i[Bd]&&(i.clear&&i.clear(),t[n]=i[Bd])}var Vd=yo(),jd={itemStyle:_o(Gh,!0),lineStyle:_o(Hh,!0)},Hd={lineStyle:"stroke",itemStyle:"fill"};function Yd(t,n){return t.visualStyleMapper||jd[n]||(console.warn("Unkown style type '"+n+"'."),jd.itemStyle)}function Xd(t,n){return t.visualDrawType||Hd[n]||(console.warn("Unkown style type '"+n+"'."),"fill")}var Gd={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,n){var i=t.getData(),r=t.visualStyleAccessPath||"itemStyle",e=t.getModel(r),o=Yd(t,r)(e),a=e.getShallow("decal");a&&(i.setVisual("decal",a),a.dirty=!0);var s=Xd(t,r),u=o[s],l=xt(u)?u:null;if(!o[s]||l||"auto"===o.fill||"auto"===o.stroke){var h=t.getColorFromPalette(t.name,null,n.getSeriesCount());o[s]||(o[s]=h,i.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||xt(o.fill)?h:o.fill,o.stroke="auto"===o.stroke||xt(o.stroke)?h:o.stroke}if(i.setVisual("style",o),i.setVisual("drawType",s),!n.isSeriesFiltered(t)&&l)return i.setVisual("colorFromPalette",!1),{dataEach:function(n,i){var r=t.getDataParams(i),e=ut({},o);e[s]=l(r),n.setItemVisual(i,"style",e)}}}},Ud=new qh,Zd={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,n){if(!t.ignoreStyleOnData&&!n.isSeriesFiltered(t)){var i=t.getData(),r=t.visualStyleAccessPath||"itemStyle",e=Yd(t,r),o=i.getVisual("drawType");return{dataEach:i.hasItemOption?function(t,n){var i=t.getRawDataItem(n);if(i&&i[r]){Ud.option=i[r];var a=e(Ud);ut(t.ensureUniqueItemVisual(n,"style"),a),Ud.option.decal&&(t.setItemVisual(n,"decal",Ud.option.decal),Ud.option.decal.dirty=!0),o in a&&t.setItemVisual(n,"colorFromPalette",!1)}}:null}}}},qd={performRawSeries:!0,overallReset:function(t){var n=Vt();t.eachSeries((function(t){var i=t.getColorBy();if(!t.isColorBySeries()){var r=t.type+"-"+i,e=n.get(r);e||n.set(r,e={}),Vd(t).scope=e}})),t.eachSeries((function(n){if(!n.isColorBySeries()&&!t.isSeriesFiltered(n)){var i=n.getRawData(),r={},e=n.getData(),o=Vd(n).scope,a=Xd(n,n.visualStyleAccessPath||"itemStyle");e.each((function(t){var n=e.getRawIndex(t);r[n]=t})),i.each((function(t){var s=r[t];if(e.getItemVisual(s,"colorFromPalette")){var u=e.ensureUniqueItemVisual(s,"style"),l=i.getName(t)||t+"",h=i.count();u[a]=n.getColorFromPalette(l,o,h)}}))}}))}},$d=Math.PI,Kd=function(){function t(t,n,i,r){this._stageTaskMap=Vt(),this.ecInstance=t,this.api=n,i=this._dataProcessorHandlers=i.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=i.concat(r)}return t.prototype.restoreData=function(t,n){t.restoreData(n),this._stageTaskMap.each((function(t){var n=t.overallTask;n&&n.dirty()}))},t.prototype.getPerformArgs=function(t,n){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),r=i.context,e=!n&&i.progressiveEnabled&&(!r||r.progressiveRender)&&t.__idxInPipeline>i.blockIndex?i.step:null,o=r&&r.modDataCount;return{step:e,modBy:null!=o?Math.ceil(o/e):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,n){var i=this._pipelineMap.get(t.uid),r=t.getData().count(),e=i.progressiveEnabled&&n.incrementalPrepareRender&&r>=i.threshold,o=t.get("large")&&r>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?r:null;t.pipelineContext=i.context={progressiveRender:e,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var n=this,i=n._pipelineMap=Vt();t.eachSeries((function(t){var r=t.getProgressive(),e=t.uid;i.set(e,{id:e,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:r&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),n._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,n=this.api.getModel(),i=this.api;vt(this._allHandlers,(function(r){var e=t.get(r.uid)||t.set(r.uid,{});Bt(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,e,n,i),r.overallReset&&this._createOverallStageTask(r,e,n,i)}),this)},t.prototype.prepareView=function(t,n,i,r){var e=t.renderTask,o=e.context;o.model=n,o.ecModel=i,o.api=r,e.__block=!t.incrementalPrepareRender,this._pipe(n,e)},t.prototype.performDataProcessorTasks=function(t,n){this._performStageTasks(this._dataProcessorHandlers,t,n,{block:!0})},t.prototype.performVisualTasks=function(t,n,i){this._performStageTasks(this._visualHandlers,t,n,i)},t.prototype._performStageTasks=function(t,n,i,r){r=r||{};var e=!1,o=this;function a(t,n){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(n.__pipeline.id))}vt(t,(function(t){if(!r.visualType||r.visualType===t.visualType){var s=o._stageTaskMap.get(t.uid),u=s.seriesTaskMap,l=s.overallTask;if(l){var h,f=l.agentStubMap;f.each((function(t){a(r,t)&&(t.dirty(),h=!0)})),h&&l.dirty(),o.updatePayload(l,i);var c=o.getPerformArgs(l,r.block);f.each((function(t){t.perform(c)})),l.perform(c)&&(e=!0)}else u&&u.each((function(s){a(r,s)&&s.dirty();var u=o.getPerformArgs(s,r.block);u.skip=!t.performRawSeries&&n.isSeriesFiltered(s.context.model),o.updatePayload(s,i),s.perform(u)&&(e=!0)}))}})),this.unfinished=e||this.unfinished},t.prototype.performSeriesTasks=function(t){var n;t.eachSeries((function(t){n=t.dataTask.perform()||n})),this.unfinished=n||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each((function(t){var n=t.tail;do{if(n.__block){t.blockIndex=n.__idxInPipeline;break}n=n.getUpstream()}while(n)}))},t.prototype.updatePayload=function(t,n){"remain"!==n&&(t.context.payload=n)},t.prototype._createSeriesStageTask=function(t,n,i,r){var e=this,o=n.seriesTaskMap,a=n.seriesTaskMap=Vt(),s=t.seriesType,u=t.getTargetSeries;function l(n){var s=n.uid,u=a.set(s,o&&o.get(s)||Mv({plan:ip,reset:rp,count:ap}));u.context={model:n,ecModel:i,api:r,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:e},e._pipe(n,u)}t.createOnAllSeries?i.eachRawSeries(l):s?i.eachRawSeriesByType(s,l):u&&u(i,r).each(l)},t.prototype._createOverallStageTask=function(t,n,i,r){var e=this,o=n.overallTask=n.overallTask||Mv({reset:Jd});o.context={ecModel:i,api:r,overallReset:t.overallReset,scheduler:e};var a=o.agentStubMap,s=o.agentStubMap=Vt(),u=t.seriesType,l=t.getTargetSeries,h=!0,f=!1;function c(t){var n=t.uid,i=s.set(n,a&&a.get(n)||(f=!0,Mv({reset:Qd,onDirty:np})));i.context={model:t,overallProgress:h},i.agent=o,i.__block=h,e._pipe(t,i)}Bt(!t.createOnAllSeries,""),u?i.eachRawSeriesByType(u,c):l?l(i,r).each(c):(h=!1,vt(i.getSeries(),c)),f&&o.dirty()},t.prototype._pipe=function(t,n){var i=this._pipelineMap.get(t.uid);!i.head&&(i.head=n),i.tail&&i.tail.pipe(n),i.tail=n,n.__idxInPipeline=i.count++,n.__pipeline=i},t.wrapStageHandler=function(t,n){return xt(t)&&(t={overallReset:t,seriesType:sp(t)}),t.uid=Kh("stageHandler"),n&&(t.visualType=n),t},t}();function Jd(t){t.overallReset(t.ecModel,t.api,t.payload)}function Qd(t){return t.overallProgress&&tp}function tp(){this.agent.dirty(),this.getDownstream().dirty()}function np(){this.agent&&this.agent.dirty()}function ip(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function rp(t){t.useClearVisual&&t.data.clearAllVisual();var n=t.resetDefines=eo(t.reset(t.model,t.ecModel,t.api,t.payload));return n.length>1?dt(n,(function(t,n){return op(n)})):ep}var ep=op(0);function op(t){return function(n,i){var r=i.data,e=i.resetDefines[t];if(e&&e.dataEach)for(var o=n.start;o<n.end;o++)e.dataEach(r,o);else e&&e.progress&&e.progress(n,r)}}function ap(t){return t.data.count()}function sp(t){up=null;try{t(lp,hp)}catch(t){}return up}var up,lp={},hp={};function fp(t,n){for(var i in n.prototype)t[i]=Gt}fp(lp,gc),fp(hp,Sc),lp.eachSeriesByType=lp.eachRawSeriesByType=function(t){up=t},lp.eachComponent=function(t){"series"===t.mainType&&t.subType&&(up=t.subType)};var cp=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const vp={color:cp,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],cp]};var dp=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],pp={darkMode:!0,color:dp,backgroundColor:"#100C2A",axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:"#B9B8CE"}},textStyle:{color:"#B9B8CE"},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:"#B9B8CE"}},dataZoom:{borderColor:"#71708A",textStyle:{color:"#B9B8CE"},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:"#B9B8CE"}},timeline:{lineStyle:{color:"#B9B8CE"},label:{color:"#B9B8CE"},controlStyle:{color:"#B9B8CE",borderColor:"#B9B8CE"}},calendar:{itemStyle:{color:"#100C2A"},dayLabel:{color:"#B9B8CE"},monthLabel:{color:"#B9B8CE"},yearLabel:{color:"#B9B8CE"}},timeAxis:{axisLine:{lineStyle:{color:"#B9B8CE"}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}},logAxis:{axisLine:{lineStyle:{color:"#B9B8CE"}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}},valueAxis:{axisLine:{lineStyle:{color:"#B9B8CE"}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}},categoryAxis:{axisLine:{lineStyle:{color:"#B9B8CE"}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}},line:{symbol:"circle"},graph:{color:dp},gauge:{title:{color:"#B9B8CE"},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:"#B9B8CE"},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};pp.categoryAxis.splitLine.show=!1;var mp=function(){function t(){}return t.prototype.normalizeQuery=function(t){var n={},i={},r={};if(Mt(t)){var e=To(t);n.mainType=e.main||null,n.subType=e.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};vt(t,(function(t,e){for(var s=!1,u=0;u<o.length;u++){var l=o[u],h=e.lastIndexOf(l);if(h>0&&h===e.length-l.length){var f=e.slice(0,h);"data"!==f&&(n.mainType=f,n[l.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(e)&&(i[e]=t,s=!0),s||(r[e]=t)}))}return{cptQuery:n,dataQuery:i,otherQuery:r}},t.prototype.filter=function(t,n){var i=this.eventInfo;if(!i)return!0;var r=i.targetEl,e=i.packedEvent,o=i.model,a=i.view;if(!o||!a)return!0;var s=n.cptQuery,u=n.dataQuery;return l(s,o,"mainType")&&l(s,o,"subType")&&l(s,o,"index","componentIndex")&&l(s,o,"name")&&l(s,o,"id")&&l(u,e,"name")&&l(u,e,"dataIndex")&&l(u,e,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,n.otherQuery,r,e));function l(t,n,i,r){return null==t[i]||n[r||i]===t[i]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),yp=["symbol","symbolSize","symbolRotate","symbolOffset"],gp=yp.concat(["symbolKeepAspect"]),bp={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,n){var i=t.getData();if(t.legendIcon&&i.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var r={},e={},o=!1,a=0;a<yp.length;a++){var s=yp[a],u=t.get(s);xt(u)?(o=!0,e[s]=u):r[s]=u}if(r.symbol=r.symbol||t.defaultSymbol,i.setVisual(ut({legendIcon:t.legendIcon||r.symbol,symbolKeepAspect:t.get("symbolKeepAspect")},r)),!n.isSeriesFiltered(t)){var l=yt(e);return{dataEach:o?function(n,i){for(var r=t.getRawValue(i),o=t.getDataParams(i),a=0;a<l.length;a++){var s=l[a];n.setItemVisual(i,s,e[s](r,o))}}:null}}}}},wp={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,n){if(t.hasSymbolVisual&&!n.isSeriesFiltered(t))return{dataEach:t.getData().hasItemOption?function(t,n){for(var i=t.getItemModel(n),r=0;r<gp.length;r++){var e=gp[r],o=i.getShallow(e,!0);null!=o&&t.setItemVisual(n,e,o)}}:null}}};function xp(t,n,i){switch(i){case"color":return t.getItemVisual(n,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(n,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(n,i)}}function Mp(t,n){switch(n){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(n)}}function Sp(t,n,i,r){switch(i){case"color":t.ensureUniqueItemVisual(n,"style")[t.getVisual("drawType")]=r,t.setItemVisual(n,"colorFromPalette",!1);break;case"opacity":t.ensureUniqueItemVisual(n,"style").opacity=r;break;case"symbol":case"symbolSize":case"liftZ":t.setItemVisual(n,i,r)}}function kp(t,n){function i(n,i){var r=[];return n.eachComponent({mainType:"series",subType:t,query:i},(function(t){r.push(t.seriesIndex)})),r}vt([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],(function(t){n(t[0],(function(n,r,e){n=ut({},n),e.dispatchAction(ut(n,{type:t[1],seriesIndex:i(r,n)}))}))}))}function Ap(t,n,i,r,e){var o=t+n;i.isSilent(o)||r.eachComponent({mainType:"series",subType:"pie"},(function(t){for(var n=t.seriesIndex,r=t.option.selectedMap,a=e.selected,s=0;s<a.length;s++)if(a[s].seriesIndex===n){var u=t.getData(),l=mo(u,e.fromActionPayload);i.trigger(o,{type:o,seriesId:t.id,name:wt(l)?u.getName(l[0]):u.getName(l),selected:Mt(r)?r:ut({},r)})}}))}function Np(t,n,i){for(var r;t&&(!n(t)||(r=t,!i));)t=t.__hostTarget||t.parent;return r}var Cp=Math.round(9*Math.random()),Tp="function"==typeof Object.defineProperty,zp=function(){function t(){this._id="__ec_inner_"+Cp++}return t.prototype.get=function(t){return this._guard(t)[this._id]},t.prototype.set=function(t,n){var i=this._guard(t);return Tp?Object.defineProperty(i,this._id,{value:n,enumerable:!1,configurable:!0}):i[this._id]=n,this},t.prototype.delete=function(t){return!!this.has(t)&&(delete this._guard(t)[this._id],!0)},t.prototype.has=function(t){return!!this._guard(t)[this._id]},t.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},t}(),Ip=us.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,n){var i=n.cx,r=n.cy,e=n.width/2,o=n.height/2;t.moveTo(i,r-o),t.lineTo(i+e,r+o),t.lineTo(i-e,r+o),t.closePath()}}),Lp=us.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,n){var i=n.cx,r=n.cy,e=n.width/2,o=n.height/2;t.moveTo(i,r-o),t.lineTo(i+e,r),t.lineTo(i,r+o),t.lineTo(i-e,r),t.closePath()}}),Op=us.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,n){var i=n.x,r=n.y,e=n.width/5*3,o=Math.max(e,n.height),a=e/2,s=a*a/(o-a),u=r-o+a+s,l=Math.asin(s/a),h=Math.cos(l)*a,f=Math.sin(l),c=Math.cos(l),v=.6*a,d=.7*a;t.moveTo(i-h,u+s),t.arc(i,u,a,Math.PI-l,2*Math.PI+l),t.bezierCurveTo(i+h-f*v,u+s+c*v,i,r-d,i,r),t.bezierCurveTo(i,r-d,i-h+f*v,u+s+c*v,i-h,u+s),t.closePath()}}),Dp=us.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,n){var i=n.height,r=n.x,e=n.y,o=n.width/3*2;t.moveTo(r,e),t.lineTo(r+o,e+i),t.lineTo(r,e+i/4*3),t.lineTo(r-o,e+i),t.lineTo(r,e),t.closePath()}}),Rp={line:function(t,n,i,r,e){e.x1=t,e.y1=n+r/2,e.x2=t+i,e.y2=n+r/2},rect:function(t,n,i,r,e){e.x=t,e.y=n,e.width=i,e.height=r},roundRect:function(t,n,i,r,e){e.x=t,e.y=n,e.width=i,e.height=r,e.r=Math.min(i,r)/4},square:function(t,n,i,r,e){var o=Math.min(i,r);e.x=t,e.y=n,e.width=o,e.height=o},circle:function(t,n,i,r,e){e.cx=t+i/2,e.cy=n+r/2,e.r=Math.min(i,r)/2},diamond:function(t,n,i,r,e){e.cx=t+i/2,e.cy=n+r/2,e.width=i,e.height=r},pin:function(t,n,i,r,e){e.x=t+i/2,e.y=n+r/2,e.width=i,e.height=r},arrow:function(t,n,i,r,e){e.x=t+i/2,e.y=n+r/2,e.width=i,e.height=r},triangle:function(t,n,i,r,e){e.cx=t+i/2,e.cy=n+r/2,e.width=i,e.height=r}},_p={};vt({line:Sl,rect:ws,roundRect:ws,square:ws,circle:Ku,diamond:Lp,pin:Op,arrow:Dp,triangle:Ip},(function(t,n){_p[n]=new t}));var Bp=us.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,n,i){var r=Me(t,n,i),e=this.shape;return e&&"pin"===e.symbolType&&"inside"===n.position&&(r.y=i.y+.4*i.height),r},buildPath:function(t,n,i){var r=n.symbolType;if("none"!==r){var e=_p[r];e||(e=_p[r="rect"]),Rp[r](n.x,n.y,n.width,n.height,e.shape),e.buildPath(t,e.shape,i)}}});function Fp(t,n){if("image"!==this.type){var i=this.style;this.__isEmptyBrush?(i.stroke=t,i.fill=n||"#fff",i.lineWidth=2):"line"===this.shape.symbolType?i.stroke=t:i.fill=t,this.markRedraw()}}function Ep(t,n,i,r,e,o,a){var s,u=0===t.indexOf("empty");return u&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?rh(t.slice(8),new ve(n,i,r,e),a?"center":"cover"):0===t.indexOf("path://")?ih(t.slice(7),{},new ve(n,i,r,e),a?"center":"cover"):new Bp({shape:{symbolType:t,x:n,y:i,width:r,height:e}})).__isEmptyBrush=u,s.setColor=Fp,o&&s.setColor(o),s}function Pp(t){return wt(t)||(t=[+t,+t]),[t[0]||0,t[1]||0]}function Wp(t,n){if(null!=t)return wt(t)||(t=[t,t]),[Fe(t[0],n[0])||0,Fe(Ot(t[1],t[0]),n[1])||0]}function Vp(t,n,i){for(var r="radial"===n.type?function(t,n,i){var r=i.width,e=i.height,o=Math.min(r,e),a=null==n.x?.5:n.x,s=null==n.y?.5:n.y,u=null==n.r?.5:n.r;return n.global||(a=a*r+i.x,s=s*e+i.y,u*=o),t.createRadialGradient(a,s,0,a,s,u)}(t,n,i):function(t,n,i){var r=null==n.x?0:n.x,e=null==n.x2?1:n.x2,o=null==n.y?0:n.y,a=null==n.y2?0:n.y2;return n.global||(r=r*i.width+i.x,e=e*i.width+i.x,o=o*i.height+i.y,a=a*i.height+i.y),r=isNaN(r)?0:r,e=isNaN(e)?1:e,o=isNaN(o)?0:o,a=isNaN(a)?0:a,t.createLinearGradient(r,o,e,a)}(t,n,i),e=n.colorStops,o=0;o<e.length;o++)r.addColorStop(e[o].offset,e[o].color);return r}function jp(t){return parseInt(t,10)}function Hp(t,n,i){var r=["width","height"][n],e=["clientWidth","clientHeight"][n],o=["paddingLeft","paddingTop"][n],a=["paddingRight","paddingBottom"][n];if(null!=i[r]&&"auto"!==i[r])return parseFloat(i[r]);var s=document.defaultView.getComputedStyle(t);return(t[e]||jp(s[r])||jp(t.style[r]))-(jp(s[o])||0)-(jp(s[a])||0)|0}function Yp(t){var n,i,r=t.style,e=r.lineDash&&r.lineWidth>0&&(i=r.lineWidth,(n=r.lineDash)&&"solid"!==n&&i>0?"dashed"===n?[4*i,2*i]:"dotted"===n?[i]:kt(n)?[n]:wt(n)?n:null:null),o=r.lineDashOffset;if(e){var a=r.strokeNoScale&&t.getLineScale?t.getLineScale():1;a&&1!==a&&(e=dt(e,(function(t){return t/a})),o/=a)}return[e,o]}var Xp=new ja(!0);function Gp(t){var n=t.stroke;return!(null==n||"none"===n||!(t.lineWidth>0))}function Up(t){return"string"==typeof t&&"none"!==t}function Zp(t){var n=t.fill;return null!=n&&"none"!==n}function qp(t,n){if(null!=n.fillOpacity&&1!==n.fillOpacity){var i=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,t.fill(),t.globalAlpha=i}else t.fill()}function $p(t,n){if(null!=n.strokeOpacity&&1!==n.strokeOpacity){var i=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,t.stroke(),t.globalAlpha=i}else t.stroke()}function Kp(t,n,i){var r=Wo(n.image,n.__image,i);if(jo(r)){var e=t.createPattern(r,n.repeat||"repeat");if("function"==typeof DOMMatrix&&e&&e.setTransform){var o=new DOMMatrix;o.translateSelf(n.x||0,n.y||0),o.rotateSelf(0,0,(n.rotation||0)*Ut),o.scaleSelf(n.scaleX||1,n.scaleY||1),e.setTransform(o)}return e}}var Jp=["shadowBlur","shadowOffsetX","shadowOffsetY"],Qp=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function tm(t,n,i,r,e){var o=!1;if(!r&&n===(i=i||{}))return!1;if(r||n.opacity!==i.opacity){rm(t,e),o=!0;var a=Math.max(Math.min(n.opacity,1),0);t.globalAlpha=isNaN(a)?ia.opacity:a}(r||n.blend!==i.blend)&&(o||(rm(t,e),o=!0),t.globalCompositeOperation=n.blend||ia.blend);for(var s=0;s<Jp.length;s++){var u=Jp[s];(r||n[u]!==i[u])&&(o||(rm(t,e),o=!0),t[u]=t.dpr*(n[u]||0))}return(r||n.shadowColor!==i.shadowColor)&&(o||(rm(t,e),o=!0),t.shadowColor=n.shadowColor||ia.shadowColor),o}function nm(t,n,i,r,e){var o=em(n,e.inHover),a=r?null:i&&em(i,e.inHover)||{};if(o===a)return!1;var s=tm(t,o,a,r,e);if((r||o.fill!==a.fill)&&(s||(rm(t,e),s=!0),Up(o.fill)&&(t.fillStyle=o.fill)),(r||o.stroke!==a.stroke)&&(s||(rm(t,e),s=!0),Up(o.stroke)&&(t.strokeStyle=o.stroke)),(r||o.opacity!==a.opacity)&&(s||(rm(t,e),s=!0),t.globalAlpha=null==o.opacity?1:o.opacity),n.hasStroke()){var u=o.lineWidth/(o.strokeNoScale&&n.getLineScale?n.getLineScale():1);t.lineWidth!==u&&(s||(rm(t,e),s=!0),t.lineWidth=u)}for(var l=0;l<Qp.length;l++){var h=Qp[l],f=h[0];(r||o[f]!==a[f])&&(s||(rm(t,e),s=!0),t[f]=o[f]||h[1])}return s}function im(t,n){var i=n.transform,r=t.dpr||1;i?t.setTransform(r*i[0],r*i[1],r*i[2],r*i[3],r*i[4],r*i[5]):t.setTransform(r,0,0,r,0,0)}function rm(t,n){n.batchFill&&t.fill(),n.batchStroke&&t.stroke(),n.batchFill="",n.batchStroke=""}function em(t,n){return n&&t.__hoverStyle||t.style}function om(t,n){am(t,n,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function am(t,n,i,r){var e=n.transform;if(!n.shouldBePainted(i.viewWidth,i.viewHeight,!1,!1))return n.__dirty&=-2,void(n.__isRendered=!1);var o=n.__clipPaths,a=i.prevElClipPaths,s=!1,u=!1;if(a&&!function(t,n){if(t===n||!t&&!n)return!1;if(!t||!n||t.length!==n.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==n[i])return!0;return!1}(o,a)||(a&&a.length&&(rm(t,i),t.restore(),u=s=!0,i.prevElClipPaths=null,i.allClipped=!1,i.prevEl=null),o&&o.length&&(rm(t,i),t.save(),function(t,n,i){for(var r=!1,e=0;e<t.length;e++){var o=t[e];r=r||o.isZeroArea(),im(n,o),n.beginPath(),o.buildPath(n,o.shape),n.clip()}i.allClipped=r}(o,t,i),s=!0),i.prevElClipPaths=o),i.allClipped)n.__isRendered=!1;else{n.beforeBrush&&n.beforeBrush(),n.innerBeforeBrush();var l=i.prevEl;l||(u=s=!0);var h,f,c=n instanceof us&&n.autoBatch&&function(t){var n=Zp(t),i=Gp(t);return!(t.lineDash||!(+n^+i)||n&&"string"!=typeof t.fill||i&&"string"!=typeof t.stroke||t.strokePercent<1||t.strokeOpacity<1||t.fillOpacity<1)}(n.style);s||(f=l.transform,(h=e)&&f?h[0]!==f[0]||h[1]!==f[1]||h[2]!==f[2]||h[3]!==f[3]||h[4]!==f[4]||h[5]!==f[5]:h||f)?(rm(t,i),im(t,n)):c||rm(t,i);var v=em(n,i.inHover);n instanceof us?(1!==i.lastDrawType&&(u=!0,i.lastDrawType=1),nm(t,n,l,u,i),c&&(i.batchFill||i.batchStroke)||t.beginPath(),function(t,n,i,r){var e,o=Gp(i),a=Zp(i),s=i.strokePercent,u=s<1,l=!n.path;n.silent&&!u||!l||n.createPathProxy();var h=n.path||Xp,f=n.__dirty;if(!r){var c=i.fill,v=i.stroke,d=a&&!!c.colorStops,p=o&&!!v.colorStops,m=a&&!!c.image,y=o&&!!v.image,g=void 0,b=void 0,w=void 0,x=void 0,M=void 0;(d||p)&&(M=n.getBoundingRect()),d&&(g=f?Vp(t,c,M):n.__canvasFillGradient,n.__canvasFillGradient=g),p&&(b=f?Vp(t,v,M):n.__canvasStrokeGradient,n.__canvasStrokeGradient=b),m&&(w=f||!n.__canvasFillPattern?Kp(t,c,n):n.__canvasFillPattern,n.__canvasFillPattern=w),y&&(x=f||!n.__canvasStrokePattern?Kp(t,v,n):n.__canvasStrokePattern,n.__canvasStrokePattern=w),d?t.fillStyle=g:m&&(w?t.fillStyle=w:a=!1),p?t.strokeStyle=b:y&&(x?t.strokeStyle=x:o=!1)}var S,k,A=n.getGlobalScale();h.setScale(A[0],A[1],n.segmentIgnoreThreshold),t.setLineDash&&i.lineDash&&(S=(e=Yp(n))[0],k=e[1]);var N=!0;(l||4&f)&&(h.setDPR(t.dpr),u?h.setContext(null):(h.setContext(t),N=!1),h.reset(),n.buildPath(h,n.shape,r),h.toStatic(),n.pathUpdated()),N&&h.rebuildPath(t,u?s:1),S&&(t.setLineDash(S),t.lineDashOffset=k),r||(i.strokeFirst?(o&&$p(t,i),a&&qp(t,i)):(a&&qp(t,i),o&&$p(t,i))),S&&t.setLineDash([])}(t,n,v,c),c&&(i.batchFill=v.fill||"",i.batchStroke=v.stroke||"")):n instanceof hs?(3!==i.lastDrawType&&(u=!0,i.lastDrawType=3),nm(t,n,l,u,i),function(t,n,i){var r,e=i.text;if(null!=e&&(e+=""),e){t.font=i.font||H,t.textAlign=i.textAlign,t.textBaseline=i.textBaseline;var o=void 0,a=void 0;t.setLineDash&&i.lineDash&&(o=(r=Yp(n))[0],a=r[1]),o&&(t.setLineDash(o),t.lineDashOffset=a),i.strokeFirst?(Gp(i)&&t.strokeText(e,i.x,i.y),Zp(i)&&t.fillText(e,i.x,i.y)):(Zp(i)&&t.fillText(e,i.x,i.y),Gp(i)&&t.strokeText(e,i.x,i.y)),o&&t.setLineDash([])}}(t,n,v)):n instanceof vs?(2!==i.lastDrawType&&(u=!0,i.lastDrawType=2),function(t,n,i,r,e){tm(t,em(n,e.inHover),i&&em(i,e.inHover),r,e)}(t,n,l,u,i),function(t,n,i){var r=n.__image=Wo(i.image,n.__image,n,n.onload);if(r&&jo(r)){var e=i.x||0,o=i.y||0,a=n.getWidth(),s=n.getHeight(),u=r.width/r.height;if(null==a&&null!=s?a=s*u:null==s&&null!=a?s=a/u:null==a&&null==s&&(a=r.width,s=r.height),i.sWidth&&i.sHeight)t.drawImage(r,l=i.sx||0,h=i.sy||0,i.sWidth,i.sHeight,e,o,a,s);else if(i.sx&&i.sy){var l,h;t.drawImage(r,l=i.sx,h=i.sy,a-l,s-h,e,o,a,s)}else t.drawImage(r,e,o,a,s)}}(t,n,v)):n.getTemporalDisplayables&&(4!==i.lastDrawType&&(u=!0,i.lastDrawType=4),function(t,n,i){var r=n.getDisplayables(),e=n.getTemporalDisplayables();t.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:i.viewWidth,viewHeight:i.viewHeight,inHover:i.inHover};for(o=n.getCursor(),a=r.length;o<a;o++)(h=r[o]).beforeBrush&&h.beforeBrush(),h.innerBeforeBrush(),am(t,h,s,o===a-1),h.innerAfterBrush(),h.afterBrush&&h.afterBrush(),s.prevEl=h;for(var u=0,l=e.length;u<l;u++){var h;(h=e[u]).beforeBrush&&h.beforeBrush(),h.innerBeforeBrush(),am(t,h,s,u===l-1),h.innerAfterBrush(),h.afterBrush&&h.afterBrush(),s.prevEl=h}n.clearTemporalDisplayables(),n.notClear=!0,t.restore()}(t,n,i)),c&&r&&rm(t,i),n.innerAfterBrush(),n.afterBrush&&n.afterBrush(),i.prevEl=n,n.__dirty=0,n.__isRendered=!0}}var sm=new zp,um=new Ci(100),lm=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function hm(t,n){if("none"===t)return null;var i=n.getDevicePixelRatio(),r=n.getZr(),e="svg"===r.painter.type;t.dirty&&sm.delete(t);var o=sm.get(t);if(o)return o;var a=lt(t,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===a.backgroundColor&&(a.backgroundColor=null);var s={repeat:"repeat"};return function(t){for(var n,o=[i],s=!0,u=0;u<lm.length;++u){var l=a[lm[u]];if(null!=l&&!wt(l)&&!Mt(l)&&!kt(l)&&"boolean"!=typeof l){s=!1;break}o.push(l)}if(s){n=o.join(",")+(e?"-svg":"");var h=um.get(n);h&&(e?t.svgElement=h:t.image=h)}var f,c=cm(a.dashArrayX),v=function(t){if(!t||"object"==typeof t&&0===t.length)return[0,0];if(kt(t)){var n=Math.ceil(t);return[n,n]}var i=dt(t,(function(t){return Math.ceil(t)}));return t.length%2?i.concat(i):i}(a.dashArrayY),d=fm(a.symbol),p=dt(c,(function(t){return vm(t)})),m=vm(v),y=!e&&X.createCanvas(),g=e&&{tag:"g",attrs:{},key:"dcl",children:[]},b=function(){for(var t=1,n=0,i=p.length;n<i;++n)t=no(t,p[n]);var r=1;for(n=0,i=d.length;n<i;++n)r=no(r,d[n].length);t*=r;var e=m*p.length*d.length;return{width:Math.max(1,Math.min(t,a.maxTileWidth)),height:Math.max(1,Math.min(e,a.maxTileHeight))}}();y&&(y.width=b.width*i,y.height=b.height*i,f=y.getContext("2d")),function(){f&&(f.clearRect(0,0,y.width,y.height),a.backgroundColor&&(f.fillStyle=a.backgroundColor,f.fillRect(0,0,y.width,y.height)));for(var t=0,n=0;n<v.length;++n)t+=v[n];if(!(t<=0))for(var o=-m,s=0,u=0,l=0;o<b.height;){if(s%2==0){for(var h=u/2%d.length,p=0,w=0,x=0;p<2*b.width;){var M=0;for(n=0;n<c[l].length;++n)M+=c[l][n];if(M<=0)break;if(w%2==0){var S=.5*(1-a.symbolSize);k(p+c[l][w]*S,o+v[s]*S,c[l][w]*a.symbolSize,v[s]*a.symbolSize,d[h][x/2%d[h].length])}p+=c[l][w],++x,++w===c[l].length&&(w=0)}++l===c.length&&(l=0)}o+=v[s],++u,++s===v.length&&(s=0)}function k(t,n,o,s,u){var l=e?1:i,h=Ep(u,t*l,n*l,o*l,s*l,a.color,a.symbolKeepAspect);if(e){var c=r.painter.renderOneToVNode(h);c&&g.children.push(c)}else om(f,h)}}(),s&&um.put(n,y||g),t.image=y,t.svgElement=g,t.svgWidth=b.width,t.svgHeight=b.height}(s),s.rotation=a.rotation,s.scaleX=s.scaleY=e?1:1/i,sm.set(t,s),t.dirty=!1,s}function fm(t){if(!t||0===t.length)return[["rect"]];if(Mt(t))return[[t]];for(var n=!0,i=0;i<t.length;++i)if(!Mt(t[i])){n=!1;break}if(n)return fm([t]);var r=[];for(i=0;i<t.length;++i)Mt(t[i])?r.push([t[i]]):r.push(t[i]);return r}function cm(t){if(!t||0===t.length)return[[0,0]];if(kt(t))return[[e=Math.ceil(t),e]];for(var n=!0,i=0;i<t.length;++i)if(!kt(t[i])){n=!1;break}if(n)return cm([t]);var r=[];for(i=0;i<t.length;++i)if(kt(t[i])){var e=Math.ceil(t[i]);r.push([e,e])}else e=dt(t[i],(function(t){return Math.ceil(t)})),r.push(e.length%2==1?e.concat(e):e);return r}function vm(t){for(var n=0,i=0;i<t.length;++i)n+=t[i];return t.length%2==1?2*n:n}var dm=new mn,pm={},mm="undefined"!=typeof window,ym=/^[a-zA-Z0-9_]+$/;function gm(t){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!this.isDisposed())return wm(this,t,n)}}function bm(t){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return wm(this,t,n)}}function wm(t,n,i){return i[0]=i[0]&&i[0].toLowerCase(),mn.prototype[n].apply(t,i)}var xm,Mm,Sm,km,Am,Nm,Cm,Tm,zm,Im,Lm,Om,Dm,Rm,_m,Bm,Fm,Em,Pm=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return E(n,t),n}(mn),Wm=Pm.prototype;Wm.on=bm("on"),Wm.off=bm("off");var Vm=function(t){function n(n,i,r){var e=t.call(this,new mp)||this;e._chartsViews=[],e._chartsMap={},e._componentsViews=[],e._componentsMap={},e._pendingActions=[],r=r||{},Mt(i)&&(i=qm[i]),e._dom=n;var o=e._zr=_e(n,{renderer:r.renderer||"canvas",devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:null!=r.useDirtyRect&&r.useDirtyRect});e._ssr=r.ssr,e._throttledZrFlush=Ed(gt(o.flush,o),17),(i=ot(i))&&Uc(i,!0),e._theme=i,e._locale=function(t){if(Mt(t)){var n=Qh[t.toUpperCase()]||{};return"ZH"===t||"EN"===t?ot(n):at(ot(n),ot(Qh.EN),!1)}return at(ot(t),ot(Qh.EN),!1)}(r.locale||nf),e._coordSysMgr=new Ac;var a=e._api=_m(e);function s(t,n){return t.__prio-n.__prio}return Un(Zm,s),Un(Gm,s),e._scheduler=new Kd(e,a,Gm,Zm),e._messageCenter=new Pm,e._initEvents(),e.resize=gt(e.resize,e),o.animation.on("frame",e._onframe,e),Im(o,e),Lm(o,e),Et(e),e}return E(n,t),n.prototype._onframe=function(){if(!this._disposed){Em(this);var t=this._scheduler;if(this.__pendingUpdate){var n=this.__pendingUpdate.silent;this.__flagInMainProcess=!0;try{xm(this),km.update.call(this,null,this.__pendingUpdate.updateParams)}catch(t){throw this.__flagInMainProcess=!1,this.__pendingUpdate=null,t}this._zr.flush(),this.__flagInMainProcess=!1,this.__pendingUpdate=null,Tm.call(this,n),zm.call(this,n)}else if(t.unfinished){var i=1,r=this._model,e=this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(r),t.performDataProcessorTasks(r),Nm(this,r),t.performVisualTasks(r),Rm(this,this._model,e,"remain",{}),i-=+new Date-o}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},n.prototype.getDom=function(){return this._dom},n.prototype.getId=function(){return this.id},n.prototype.getZr=function(){return this._zr},n.prototype.isSSR=function(){return this._ssr},n.prototype.setOption=function(t,n,i){if(!this.__flagInMainProcess&&!this._disposed){var r,e,o;if(At(n)&&(i=n.lazyUpdate,r=n.silent,e=n.replaceMerge,o=n.transition,n=n.notMerge),this.__flagInMainProcess=!0,!this._model||n){var a=new Cc(this._api),s=this._theme,u=this._model=new gc;u.scheduler=this._scheduler,u.ssr=this._ssr,u.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:e},Um);var l={seriesTransition:o,optionChanged:!0};if(i)this.__pendingUpdate={silent:r,updateParams:l},this.__flagInMainProcess=!1,this.getZr().wakeUp();else{try{xm(this),km.update.call(this,null,l)}catch(t){throw this.__pendingUpdate=null,this.__flagInMainProcess=!1,t}this._ssr||this._zr.flush(),this.__pendingUpdate=null,this.__flagInMainProcess=!1,Tm.call(this,r),zm.call(this,r)}}},n.prototype.setTheme=function(){},n.prototype.getModel=function(){return this._model},n.prototype.getOption=function(){return this._model&&this._model.getOption()},n.prototype.getWidth=function(){return this._zr.getWidth()},n.prototype.getHeight=function(){return this._zr.getHeight()},n.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||mm&&window.devicePixelRatio||1},n.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},n.prototype.renderToCanvas=function(t){return this._zr.painter.getRenderedCanvas({backgroundColor:(t=t||{}).backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},n.prototype.renderToSVGString=function(t){return this._zr.painter.renderToString({useViewBox:(t=t||{}).useViewBox})},n.prototype.getSvgDataURL=function(){if(W.svgSupported){var t=this._zr;return vt(t.storage.getDisplayList(),(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},n.prototype.getDataURL=function(t){if(!this._disposed){var n=this._model,i=[],r=this;vt((t=t||{}).excludeComponents,(function(t){n.eachComponent({mainType:t},(function(t){var n=r._componentsMap[t.__viewId];n.group.ignore||(i.push(n),n.group.ignore=!0)}))}));var e="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return vt(i,(function(t){t.group.ignore=!1})),e}},n.prototype.getConnectedDataURL=function(t){if(!this._disposed){var n="svg"===t.type,i=this.group,r=Math.min,e=Math.max,o=1/0;if(Jm[i]){var a=o,s=o,u=-1/0,l=-1/0,h=[],f=t&&t.pixelRatio||this.getDevicePixelRatio();vt(Km,(function(o){if(o.group===i){var f=n?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(ot(t)),c=o.getDom().getBoundingClientRect();a=r(c.left,a),s=r(c.top,s),u=e(c.right,u),l=e(c.bottom,l),h.push({dom:f,left:c.left,top:c.top})}}));var c=(u*=f)-(a*=f),v=(l*=f)-(s*=f),d=X.createCanvas(),p=_e(d,{renderer:n?"svg":"canvas"});if(p.resize({width:c,height:v}),n){var m="";return vt(h,(function(t){m+='<g transform="translate('+(t.left-a)+","+(t.top-s)+')">'+t.dom+"</g>"})),p.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&p.painter.setBackgroundColor(t.connectedBackgroundColor),p.refreshImmediately(),p.painter.toDataURL()}return t.connectedBackgroundColor&&p.add(new ws({shape:{x:0,y:0,width:c,height:v},style:{fill:t.connectedBackgroundColor}})),vt(h,(function(t){var n=new vs({style:{x:t.left*f-a,y:t.top*f-s,image:t.dom}});p.add(n)})),p.refreshImmediately(),d.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},n.prototype.convertToPixel=function(t,n){return Am(this,"convertToPixel",t,n)},n.prototype.convertFromPixel=function(t,n){return Am(this,"convertFromPixel",t,n)},n.prototype.containPixel=function(t,n){var i;if(!this._disposed)return vt(bo(this._model,t),(function(t,r){r.indexOf("Models")>=0&&vt(t,(function(t){var e=t.coordinateSystem;if(e&&e.containPoint)i=i||!!e.containPoint(n);else if("seriesModels"===r){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(i=i||o.containPoint(n,t))}}),this)}),this),!!i},n.prototype.getVisual=function(t,n){var i=bo(this._model,t,{defaultMainType:"series"}),r=i.seriesModel.getData(),e=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?r.indexOfRawIndex(i.dataIndex):null;return null!=e?xp(r,e,n):Mp(r,n)},n.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},n.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},n.prototype._initEvents=function(){var t,n,i=this;vt(Hm,(function(t){var n=function(n){var r,e=i.getModel(),o=n.target;if("globalout"===t?r={}:o&&Np(o,(function(t){var n=Bs(t);if(n&&null!=n.dataIndex){var i=n.dataModel||e.getSeriesByIndex(n.seriesIndex);return r=i&&i.getDataParams(n.dataIndex,n.dataType)||{},!0}if(n.eventData)return r=ut({},n.eventData),!0}),!0),r){var a=r.componentType,s=r.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=r.seriesIndex);var u=a&&null!=s&&e.getComponent(a,s),l=u&&i["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];r.event=n,r.type=t,i._$eventProcessor.eventInfo={targetEl:o,packedEvent:r,model:u,view:l},i.trigger(t,r)}};n.zrEventfulCallAtLast=!0,i._zr.on(t,n,i)})),vt(Xm,(function(t,n){i._messageCenter.on(n,(function(t){this.trigger(n,t)}),i)})),vt(["selectchanged"],(function(t){i._messageCenter.on(t,(function(n){this.trigger(t,n)}),i)})),t=this,n=this._api,this._messageCenter.on("selectchanged",(function(i){var r=n.getModel();i.isFromClick?(Ap("map","selectchanged",t,r,i),Ap("pie","selectchanged",t,r,i)):"select"===i.fromAction?(Ap("map","selected",t,r,i),Ap("pie","selected",t,r,i)):"unselect"===i.fromAction&&(Ap("map","unselected",t,r,i),Ap("pie","unselected",t,r,i))}))},n.prototype.isDisposed=function(){return this._disposed},n.prototype.clear=function(){this._disposed||this.setOption({series:[]},!0)},n.prototype.dispose=function(){if(!this._disposed){this._disposed=!0,this.getDom()&&ko(this.getDom(),ty,"");var t=this,n=t._api,i=t._model;vt(t._componentsViews,(function(t){t.dispose(i,n)})),vt(t._chartsViews,(function(t){t.dispose(i,n)})),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete Km[t.id]}},n.prototype.resize=function(t){if(!this.__flagInMainProcess&&!this._disposed){this._zr.resize(t);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),n){var i=n.resetOption("media"),r=t&&t.silent;this.__pendingUpdate&&(null==r&&(r=this.__pendingUpdate.silent),i=!0,this.__pendingUpdate=null),this.__flagInMainProcess=!0;try{i&&xm(this),km.update.call(this,{type:"resize",animation:ut({duration:0},t&&t.animation)})}catch(t){throw this.__flagInMainProcess=!1,t}this.__flagInMainProcess=!1,Tm.call(this,r),zm.call(this,r)}}},n.prototype.showLoading=function(t,n){if(!this._disposed&&(At(t)&&(n=t,t=""),t=t||"default",this.hideLoading(),$m[t])){var i=$m[t](this._api,n),r=this._zr;this._loadingFX=i,r.add(i)}},n.prototype.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},n.prototype.makeActionFromEvent=function(t){var n=ut({},t);return n.type=Xm[t.type],n},n.prototype.dispatchAction=function(t,n){if(!this._disposed&&(At(n)||(n={silent:!!n}),Ym[t.type]&&this._model))if(this.__flagInMainProcess)this._pendingActions.push(t);else{var i=n.silent;Cm.call(this,t,i);var r=n.flush;r?this._zr.flush():!1!==r&&W.browser.weChat&&this._throttledZrFlush(),Tm.call(this,i),zm.call(this,i)}},n.prototype.updateLabelLayout=function(){dm.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},n.prototype.appendData=function(t){if(!this._disposed){var n=t.seriesIndex;this.getModel().getSeriesByIndex(n).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},n.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function n(t){for(var n=[],i=t.currentStates,r=0;r<i.length;r++){var e=i[r];"emphasis"!==e&&"blur"!==e&&"select"!==e&&n.push(e)}t.selected&&t.states.select&&n.push("select"),2===t.hoverState&&t.states.emphasis?n.push("emphasis"):1===t.hoverState&&t.states.blur&&n.push("blur"),t.useStates(n)}function i(t,n){if(!t.preventAutoZ){var i=t.get("z")||0,e=t.get("zlevel")||0;n.eachRendered((function(t){return r(t,i,e,-1/0),!0}))}}function r(t,n,i,e){var o=t.getTextContent(),a=t.getTextGuideLine();if(t.isGroup)for(var s=t.childrenRef(),u=0;u<s.length;u++)e=Math.max(r(s[u],n,i,e),e);else t.z=n,t.zlevel=i,e=Math.max(t.z2,e);if(o&&(o.z=n,o.zlevel=i,isFinite(e)&&(o.z2=e+2)),a){var l=t.textGuideLineConfig;a.z=n,a.zlevel=i,isFinite(e)&&(a.z2=e+(l&&l.showAbove?1:-1))}return e}function e(t,n){n.eachRendered((function(t){if(!Gl(t)){var n=t.getTextContent(),i=t.getTextGuideLine();t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),i&&i.stateTransition&&(i.stateTransition=null),t.hasState()?(t.prevStates=t.currentStates,t.clearStates()):t.prevStates&&(t.prevStates=null)}}))}function o(t,i){var r=t.getModel("stateAnimation"),e=t.isAnimationEnabled(),o=r.get("duration"),a=o>0?{duration:o,delay:r.get("delay"),easing:r.get("easing")}:null;i.eachRendered((function(t){if(t.states&&t.states.emphasis){if(Gl(t))return;if(t instanceof us&&function(t){var n=Ws(t);n.normalFill=t.style.fill,n.normalStroke=t.style.stroke;var i=t.states.select||{};n.selectFill=i.style&&i.style.fill||null,n.selectStroke=i.style&&i.style.stroke||null}(t),t.__dirty){var i=t.prevStates;i&&t.useStates(i)}if(e){t.stateTransition=a;var r=t.getTextContent(),o=t.getTextGuideLine();r&&(r.stateTransition=a),o&&(o.stateTransition=a)}t.__dirty&&n(t)}}))}xm=function(t){var n=t._scheduler;n.restorePipelines(t._model),n.prepareStageTasks(),Mm(t,!0),Mm(t,!1),n.plan()},Mm=function(t,n){for(var i=t._model,r=t._scheduler,e=n?t._componentsViews:t._chartsViews,o=n?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,u=0;u<e.length;u++)e[u].__alive=!1;function l(t){var u=t.__requireNewView;t.__requireNewView=!1;var l="_ec_"+t.id+"_"+t.type,h=!u&&o[l];if(!h){var f=To(t.type);(h=new(n?Nd.getClass(f.main,f.sub):Id.getClass(f.sub))).init(i,s),o[l]=h,e.push(h),a.add(h.group)}t.__viewId=h.__id=l,h.__alive=!0,h.__model=t,h.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!n&&r.prepareView(h,t,i,s)}for(n?i.eachComponent((function(t,n){"series"!==t&&l(n)})):i.eachSeries(l),u=0;u<e.length;){var h=e[u];h.__alive?u++:(!n&&h.renderTask.dispose(),a.remove(h.group),h.dispose(i,s),e.splice(u,1),o[h.__id]===h&&delete o[h.__id],h.__id=h.group.__ecComponentInfo=null)}},Sm=function(t,n,i,r,e){var o=t._model;if(o.setUpdatePayload(i),r){var a={};a[r+"Id"]=i[r+"Id"],a[r+"Index"]=i[r+"Index"],a[r+"Name"]=i[r+"Name"];var s={mainType:r,query:a};e&&(s.subType=e);var u,l=i.excludeSeriesId;null!=l&&(u=Vt(),vt(eo(l),(function(t){var n=co(t,null);null!=n&&u.set(n,!0)}))),o&&o.eachComponent(s,(function(n){if(!u||null===u.get(n.id))if(zu(i))if(n instanceof gd)"highlight"!==i.type||i.notBlur||n.get(["emphasis","disabled"])||function(t,n,i){var r=t.seriesIndex,e=t.getData(n.dataType);if(e){var o=mo(e,n);o=(wt(o)?o[0]:o)||0;var a=e.getItemGraphicEl(o);if(!a)for(var s=e.count(),u=0;!a&&u<s;)a=e.getItemGraphicEl(u++);if(a){var l=Bs(a);pu(r,l.focus,l.blurScope,i)}else{var h=t.get(["emphasis","focus"]),f=t.get(["emphasis","blurScope"]);null!=h&&pu(r,h,f,i)}}}(n,i,t._api);else{var r=yu(n.mainType,n.componentIndex,i.name,t._api),e=r.dispatchers;"highlight"===i.type&&r.focusSelf&&!i.notBlur&&mu(n.mainType,n.componentIndex,t._api),e&&vt(e,(function(t){"highlight"===i.type?su(t):uu(t)}))}else Tu(i)&&n instanceof gd&&(function(t,n){if(Tu(n)){var i=n.dataType,r=mo(t.getData(i),n);wt(r)||(r=[r]),t["toggleSelect"===n.type?"toggleSelect":"select"===n.type?"select":"unselect"](r,i)}}(n,i),gu(n),Fm(t))}),t),o&&o.eachComponent(s,(function(n){u&&null!==u.get(n.id)||h(t["series"===r?"_chartsMap":"_componentsMap"][n.__viewId])}),t)}else vt([].concat(t._componentsViews).concat(t._chartsViews),h);function h(r){r&&r.__alive&&r[n]&&r[n](r.__model,o,t._api,i)}},km={prepareAndUpdate:function(t){xm(this),km.update.call(this,t,{optionChanged:null!=t.newOption})},update:function(n,i){var r=this._model,e=this._api,o=this._zr,a=this._coordSysMgr,s=this._scheduler;if(r){r.setUpdatePayload(n),s.restoreData(r,n),s.performSeriesTasks(r),a.create(r,e),s.performDataProcessorTasks(r,n),Nm(this,r),a.update(r,e),t(r),s.performVisualTasks(r,n),Om(this,r,e,n,i);var u=r.get("backgroundColor")||"transparent",l=r.get("darkMode");o.setBackgroundColor(u),null!=l&&"auto"!==l&&o.setDarkMode(l),dm.trigger("afterupdate",r,e)}},updateTransform:function(n){var i=this,r=this._model,e=this._api;if(r){r.setUpdatePayload(n),r.eachComponent((function(t,o){if("series"!==t){var a=i.getViewOfComponentModel(o);a&&a.__alive&&a.updateTransform&&a.updateTransform(o,r,e,n)}}));var o=Vt();r.eachSeries((function(t){var a=i._chartsMap[t.__viewId];if(a.updateTransform){var s=a.updateTransform(t,r,e,n);s&&s.update&&o.set(t.uid,1)}else o.set(t.uid,1)})),t(r),this._scheduler.performVisualTasks(r,n,{setDirty:!0,dirtyMap:o}),Rm(this,r,e,n,{},o),dm.trigger("afterupdate",r,e)}},updateView:function(n){var i=this._model;i&&(i.setUpdatePayload(n),Id.markUpdateMethod(n,"updateView"),t(i),this._scheduler.performVisualTasks(i,n,{setDirty:!0}),Om(this,i,this._api,n,{}),dm.trigger("afterupdate",i,this._api))},updateVisual:function(n){var i=this,r=this._model;r&&(r.setUpdatePayload(n),r.eachSeries((function(t){t.getData().clearAllVisual()})),Id.markUpdateMethod(n,"updateVisual"),t(r),this._scheduler.performVisualTasks(r,n,{visualType:"visual",setDirty:!0}),r.eachComponent((function(t,e){if("series"!==t){var o=i.getViewOfComponentModel(e);o&&o.__alive&&o.updateVisual(e,r,i._api,n)}})),r.eachSeries((function(t){i._chartsMap[t.__viewId].updateVisual(t,r,i._api,n)})),dm.trigger("afterupdate",r,this._api))},updateLayout:function(t){km.update.call(this,t)}},Am=function(t,n,i,r){if(!t._disposed)for(var e,o=t._model,a=t._coordSysMgr.getCoordinateSystems(),s=bo(o,i),u=0;u<a.length;u++){var l=a[u];if(l[n]&&null!=(e=l[n](o,s,r)))return e}},Nm=function(t,n){var i=t._chartsMap,r=t._scheduler;n.eachSeries((function(t){r.updateStreamModes(t,i[t.__viewId])}))},Cm=function(t,n){var i=this,r=this.getModel(),e=t.type,o=t.escapeConnect,a=Ym[e],s=a.actionInfo,u=(s.update||"update").split(":"),l=u.pop(),h=null!=u[0]&&To(u[0]);this.__flagInMainProcess=!0;var f=[t],c=!1;t.batch&&(c=!0,f=dt(t.batch,(function(n){return(n=lt(ut({},n),t)).batch=null,n})));var v,d=[],p=Tu(t),m=zu(t);if(m&&du(this._api),vt(f,(function(n){if((v=(v=a.action(n,i._model,i._api))||ut({},n)).type=s.event||v.type,d.push(v),m){var r=wo(t),e=r.mainTypeSpecified?r.queryOptionMap.keys()[0]:"series";Sm(i,l,n,e),Fm(i)}else p?(Sm(i,l,n,"series"),Fm(i)):h&&Sm(i,l,n,h.main,h.sub)})),"none"!==l&&!m&&!p&&!h)try{this.__pendingUpdate?(xm(this),km.update.call(this,t),this.__pendingUpdate=null):km[l].call(this,t)}catch(t){throw this.__flagInMainProcess=!1,t}if(v=c?{type:s.event||e,escapeConnect:o,batch:d}:d[0],this.__flagInMainProcess=!1,!n){var y=this._messageCenter;if(y.trigger(v.type,v),p){var g={type:"selectchanged",escapeConnect:o,selected:bu(r),isFromClick:t.isFromClick||!1,fromAction:t.type,fromActionPayload:t};y.trigger(g.type,g)}}},Tm=function(t){for(var n=this._pendingActions;n.length;){var i=n.shift();Cm.call(this,i,t)}},zm=function(t){!t&&this.trigger("updated")},Im=function(t,n){t.on("rendered",(function(i){n.trigger("rendered",i),!t.animation.isFinished()||n.__pendingUpdate||n._scheduler.unfinished||n._pendingActions.length||n.trigger("finished")}))},Lm=function(t,n){t.on("mouseover",(function(t){var i=Np(t.target,Cu);i&&(function(t,n,i){var r=Bs(t),e=yu(r.componentMainType,r.componentIndex,r.componentHighDownName,i),o=e.dispatchers;o?(e.focusSelf&&mu(r.componentMainType,r.componentIndex,i),vt(o,(function(t){return ou(t,n)}))):(pu(r.seriesIndex,r.focus,r.blurScope,i),"self"===r.focus&&mu(r.componentMainType,r.componentIndex,i),ou(t,n))}(i,t,n._api),Fm(n))})).on("mouseout",(function(t){var i=Np(t.target,Cu);i&&(function(t,n,i){du(i);var r=Bs(t),e=yu(r.componentMainType,r.componentIndex,r.componentHighDownName,i).dispatchers;e?vt(e,(function(t){return au(t,n)})):au(t,n)}(i,t,n._api),Fm(n))})).on("click",(function(t){var i=Np(t.target,(function(t){return null!=Bs(t).dataIndex}),!0);if(i){var r=i.selected?"unselect":"select",e=Bs(i);n._api.dispatchAction({type:r,dataType:e.dataType,dataIndexInside:e.dataIndex,seriesIndex:e.seriesIndex,isFromClick:!0})}}))},Om=function(t,n,i,r,e){!function(t){var n=[],i=[],r=!1;if(t.eachComponent((function(t,e){var o=e.get("zlevel")||0,a=e.get("z")||0,s=e.getZLevelKey();r=r||!!s,("series"===t?i:n).push({zlevel:o,z:a,idx:e.componentIndex,type:t,key:s})})),r){var e,o,a=n.concat(i);Un(a,(function(t,n){return t.zlevel===n.zlevel?t.z-n.z:t.zlevel-n.zlevel})),vt(a,(function(n){var i=t.getComponent(n.type,n.idx),r=n.zlevel,a=n.key;null!=e&&(r=Math.max(e,r)),a?(r===e&&a!==o&&r++,o=a):o&&(r===e&&r++,o=""),e=r,i.setZLevel(r)}))}}(n),Dm(t,n,i,r,e),vt(t._chartsViews,(function(t){t.__alive=!1})),Rm(t,n,i,r,e),vt(t._chartsViews,(function(t){t.__alive||t.remove(n,i)}))},Dm=function(t,n,r,a,s,u){vt(u||t._componentsViews,(function(t){var s=t.__model;e(0,t),t.render(s,n,r,a),i(s,t),o(s,t)}))},Rm=function(t,n,r,a,s,u){var l=t._scheduler;s=ut(s||{},{updatedSeries:n.getSeries()}),dm.trigger("series:beforeupdate",n,r,s);var h=!1;n.eachSeries((function(n){var i=t._chartsMap[n.__viewId];i.__alive=!0;var r=i.renderTask;l.updatePayload(r,a),e(0,i),u&&u.get(n.uid)&&r.dirty(),r.perform(l.getPerformArgs(r))&&(h=!0),i.group.silent=!!n.get("silent"),function(t,n){var i=t.get("blendMode")||null;n.eachRendered((function(t){t.isGroup||(t.style.blend=i)}))}(n,i),gu(n)})),l.unfinished=h||l.unfinished,dm.trigger("series:layoutlabels",n,r,s),dm.trigger("series:transition",n,r,s),n.eachSeries((function(n){var r=t._chartsMap[n.__viewId];i(n,r),o(n,r)})),function(t,n){var i=0;t._zr.storage.traverse((function(t){t.isGroup||i++})),i>n.get("hoverLayerThreshold")&&!W.node&&!W.worker&&n.eachSeries((function(n){if(!n.preventUsingHoverLayer){var i=t._chartsMap[n.__viewId];i.__alive&&i.eachRendered((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,n),dm.trigger("series:afterupdate",n,r,s)},Fm=function(t){t.__needsUpdateStatus=!0,t.getZr().wakeUp()},Em=function(t){t.__needsUpdateStatus&&(t.getZr().storage.traverse((function(t){Gl(t)||n(t)})),t.__needsUpdateStatus=!1)},_m=function(t){return new(function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return E(i,n),i.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},i.prototype.getComponentByElement=function(n){for(;n;){var i=n.__ecComponentInfo;if(null!=i)return t._model.getComponent(i.mainType,i.index);n=n.parent}},i.prototype.enterEmphasis=function(n,i){su(n,i),Fm(t)},i.prototype.leaveEmphasis=function(n,i){uu(n,i),Fm(t)},i.prototype.enterBlur=function(n){lu(n),Fm(t)},i.prototype.leaveBlur=function(n){hu(n),Fm(t)},i.prototype.enterSelect=function(n){fu(n),Fm(t)},i.prototype.leaveSelect=function(n){cu(n),Fm(t)},i.prototype.getModel=function(){return t.getModel()},i.prototype.getViewOfComponentModel=function(n){return t.getViewOfComponentModel(n)},i.prototype.getViewOfSeriesModel=function(n){return t.getViewOfSeriesModel(n)},i}(Sc))(t)},Bm=function(t){function n(t,n){for(var i=0;i<t.length;i++)t[i].__connectUpdateStatus=n}vt(Xm,(function(i,r){t._messageCenter.on(r,(function(i){if(Jm[t.group]&&0!==t.__connectUpdateStatus){if(i&&i.escapeConnect)return;var r=t.makeActionFromEvent(i),e=[];vt(Km,(function(n){n!==t&&n.group===t.group&&e.push(n)})),n(e,0),vt(e,(function(t){1!==t.__connectUpdateStatus&&t.dispatchAction(r)})),n(e,2)}}))}))}}(),n}(mn),jm=Vm.prototype;jm.on=gm("on"),jm.off=gm("off"),jm.one=function(t,n,i){var r=this;this.on.call(this,t,(function i(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];n&&n.apply&&n.apply(this,e),r.off(t,i)}),i)};var Hm=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"],Ym={},Xm={},Gm=[],Um=[],Zm=[],qm={},$m={},Km={},Jm={},Qm=+new Date-0,ty="_echarts_instance_";function ny(t){return Km[function(t,n){return t.getAttribute?t.getAttribute(n):t[n]}(t,ty)]}function iy(t,n){qm[t]=n}function ry(t){ht(Um,t)<0&&Um.push(t)}function ey(t,n){ly(Gm,t,n,2e3)}function oy(t,n){dm.on(t,n)}function ay(t,n,i){xt(n)&&(i=n,n="");var r=At(t)?t.type:[t,t={event:n}][0];t.event=(t.event||r).toLowerCase(),Xm[n=t.event]||(Bt(ym.test(r)&&ym.test(n)),Ym[r]||(Ym[r]={action:i,actionInfo:t}),Xm[n]=r)}function sy(t,n){ly(Zm,t,n,3e3,"visual")}var uy=[];function ly(t,n,i,r,e){if((xt(n)||At(n))&&(i=n,n=r),!(ht(uy,i)>=0)){uy.push(i);var o=Kd.wrapStageHandler(i,e);o.__prio=n,o.__raw=i,t.push(o)}}function hy(t,n){$m[t]=n}function fy(t,n,i){var r=pm.registerMap;r&&r(t,n,i)}sy(2e3,Gd),sy(4500,Zd),sy(4500,qd),sy(2e3,bp),sy(4500,wp),sy(7e3,(function(t,n){t.eachRawSeries((function(i){if(!t.isSeriesFiltered(i)){var r=i.getData();r.hasItemVisual()&&r.each((function(t){var i=r.getItemVisual(t,"decal");i&&(r.ensureUniqueItemVisual(t,"style").decal=hm(i,n))}));var e=r.getVisual("decal");e&&(r.getVisual("style").decal=hm(e,n))}}))})),ry(Uc),ey(900,(function(t){var n=Vt();t.eachSeries((function(t){var i=t.get("stack");if(i){var r=n.get(i)||n.set(i,[]),e=t.getData(),o={stackResultDimension:e.getCalculationInfo("stackResultDimension"),stackedOverDimension:e.getCalculationInfo("stackedOverDimension"),stackedDimension:e.getCalculationInfo("stackedDimension"),stackedByDimension:e.getCalculationInfo("stackedByDimension"),isStackedByIndex:e.getCalculationInfo("isStackedByIndex"),data:e,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;r.length&&e.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(o)}})),n.each(Zc)})),hy("default",(function(t,n){lt(n=n||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var i=new Oe,r=new ws({style:{fill:n.maskColor},zlevel:n.zlevel,z:1e4});i.add(r);var e,o=new Ss({style:{text:n.text,fill:n.textColor,fontSize:n.fontSize,fontWeight:n.fontWeight,fontStyle:n.fontStyle,fontFamily:n.fontFamily},zlevel:n.zlevel,z:10001}),a=new ws({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:n.zlevel,z:10001});return i.add(a),n.showSpinner&&((e=new zl({shape:{startAngle:-$d/2,endAngle:-$d/2+.1,r:n.spinnerRadius},style:{stroke:n.color,lineCap:"round",lineWidth:n.lineWidth},zlevel:n.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*$d/2}).start("circularInOut"),e.animateShape(!0).when(1e3,{startAngle:3*$d/2}).delay(300).start("circularInOut"),i.add(e)),i.resize=function(){var i=o.getBoundingRect().width,s=n.showSpinner?n.spinnerRadius:0,u=(t.getWidth()-2*s-(n.showSpinner&&i?10:0)-i)/2-(n.showSpinner&&i?0:5+i/2)+(n.showSpinner?0:i/2)+(i?0:s),l=t.getHeight()/2;n.showSpinner&&e.setShape({cx:u,cy:l}),a.setShape({x:u-s,y:l-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},i.resize(),i})),ay({type:"highlight",event:"highlight",update:"highlight"},Gt),ay({type:"downplay",event:"downplay",update:"downplay"},Gt),ay({type:"select",event:"select",update:"select"},Gt),ay({type:"unselect",event:"unselect",update:"unselect"},Gt),ay({type:"toggleSelect",event:"toggleSelect",update:"toggleSelect"},Gt),iy("light",vp),iy("dark",pp);var cy=[],vy={registerPreprocessor:ry,registerProcessor:ey,registerPostInit:function(t){oy("afterinit",t)},registerPostUpdate:function(t){oy("afterupdate",t)},registerUpdateLifecycle:oy,registerAction:ay,registerCoordinateSystem:function(t,n){Ac.register(t,n)},registerLayout:function(t,n){ly(Zm,t,n,1e3,"layout")},registerVisual:sy,registerTransform:function(t){var n=(t=ot(t)).type;n||io("");var i=n.split(":");2!==i.length&&io("");var r=!1;"echarts"===i[0]&&(n=i[1],r=!0),t.__isBuiltIn=r,Ev.set(n,t)},registerLoading:hy,registerMap:fy,registerImpl:function(t,n){pm[t]=n},PRIORITY:{PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:4500,ARIA:6e3,DECAL:7e3}},ComponentModel:Jf,ComponentView:Nd,SeriesModel:gd,ChartView:Id,registerComponentModel:function(t){Jf.registerClass(t)},registerComponentView:function(t){Nd.registerClass(t)},registerSeriesModel:function(t){gd.registerClass(t)},registerChartView:function(t){Id.registerClass(t)},registerSubTypeDefaulter:function(t,n){Jf.registerSubTypeDefaulter(t,n)},registerPainter:function(t,n){De[t]=n}};function dy(t){wt(t)?vt(t,(function(t){dy(t)})):ht(cy,t)>=0||(cy.push(t),xt(t)&&(t={install:t}),t.install(vy))}function py(t){return null==t?0:t.length||1}function my(t){return t}var yy=function(){function t(t,n,i,r,e,o){this._old=t,this._new=n,this._oldKeyGetter=i||my,this._newKeyGetter=r||my,this.context=e,this._diffModeMultiple="multiple"===o}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,n=this._new,i={},r=new Array(t.length),e=new Array(n.length);this._initIndexMap(t,null,r,"_oldKeyGetter"),this._initIndexMap(n,i,e,"_newKeyGetter");for(var o=0;o<t.length;o++){var a=r[o],s=i[a],u=py(s);if(u>1){var l=s.shift();1===s.length&&(i[a]=s[0]),this._update&&this._update(l,o)}else 1===u?(i[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(e,i)},t.prototype._executeMultiple=function(){var t=this._new,n={},i={},r=[],e=[];this._initIndexMap(this._old,n,r,"_oldKeyGetter"),this._initIndexMap(t,i,e,"_newKeyGetter");for(var o=0;o<r.length;o++){var a=r[o],s=n[a],u=i[a],l=py(s),h=py(u);if(l>1&&1===h)this._updateManyToOne&&this._updateManyToOne(u,s),i[a]=null;else if(1===l&&h>1)this._updateOneToMany&&this._updateOneToMany(u,s),i[a]=null;else if(1===l&&1===h)this._update&&this._update(u,s),i[a]=null;else if(l>1&&h>1)this._updateManyToMany&&this._updateManyToMany(u,s),i[a]=null;else if(l>1)for(var f=0;f<l;f++)this._remove&&this._remove(s[f]);else this._remove&&this._remove(s)}this._performRestAdd(e,i)},t.prototype._performRestAdd=function(t,n){for(var i=0;i<t.length;i++){var r=t[i],e=n[r],o=py(e);if(o>1)for(var a=0;a<o;a++)this._add&&this._add(e[a]);else 1===o&&this._add&&this._add(e);n[r]=null}},t.prototype._initIndexMap=function(t,n,i,r){for(var e=this._diffModeMultiple,o=0;o<t.length;o++){var a="_ec_"+this[r](t[o],o);if(e||(i[o]=a),n){var s=n[a],u=py(s);0===u?(n[a]=o,e&&i.push(a)):1===u?n[a]=[s,o]:s.push(o)}}},t}(),gy=function(){function t(t,n){this._encode=t,this._schema=n}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t}();function by(t,n){return t.hasOwnProperty(n)||(t[n]=[]),t[n]}function wy(t){return"category"===t?"ordinal":"time"===t?"time":"float"}var xy=function(t){this.otherDims={},null!=t&&ut(this,t)},My=yo(),Sy={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},ky=function(){function t(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=Cy(this.source)))},t.prototype.getSourceDimensionIndex=function(t){return Ot(this._dimNameMap.get(t),-1)},t.prototype.getSourceDimension=function(t){var n=this.source.dimensionsDefine;if(n)return n[t]},t.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,n=function(t){var n=t.sourceFormat;return"objectRows"===n||"keyedColumns"===n}(this.source),i=!Ty(t),r="",e=[],o=0,a=0;o<t;o++){var s=void 0,u=void 0,l=void 0,h=this.dimensions[a];if(h&&h.storeDimIndex===o)s=n?h.name:null,u=h.type,l=h.ordinalMeta,a++;else{var f=this.getSourceDimension(o);f&&(s=n?f.name:null,u=f.type)}e.push({property:s,type:u,ordinalMeta:l}),!n||null==s||h&&h.isCalculationCoord||(r+=i?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+="$",r+=Sy[u]||"f",l&&(r+=l.uid),r+="$"}var c=this.source;return{dimensions:e,hash:[c.seriesLayoutBy,c.startIndex,r].join("$$")}},t.prototype.makeOutputDimensionNames=function(){for(var t=[],n=0,i=0;n<this._fullDimCount;n++){var r=void 0,e=this.dimensions[i];if(e&&e.storeDimIndex===n)e.isCalculationCoord||(r=e.name),i++;else{var o=this.getSourceDimension(n);o&&(r=o.name)}t.push(r)}return t},t.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},t}();function Ay(t){return t instanceof ky}function Ny(t){for(var n=Vt(),i=0;i<(t||[]).length;i++){var r=t[i],e=At(r)?r.name:r;null!=e&&null==n.get(e)&&n.set(e,i)}return n}function Cy(t){var n=My(t);return n.dimNameMap||(n.dimNameMap=Ny(t.dimensionsDefine))}function Ty(t){return t>30}var zy,Iy,Ly,Oy,Dy,Ry,_y,By=At,Fy=dt,Ey="undefined"==typeof Int32Array?Array:Int32Array,Py=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Wy=["_approximateExtent"],Vy=function(){function t(t,n){var i;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var r=!1;Ay(t)?(i=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(r=!0,i=t),i=i||["x","y"];for(var e={},o=[],a={},s=!1,u={},l=0;l<i.length;l++){var h=i[l],f=Mt(h)?new xy({name:h}):h instanceof xy?h:new xy(h),c=f.name;f.type=f.type||"float",f.coordDim||(f.coordDim=c,f.coordDimIndex=0);var v=f.otherDims=f.otherDims||{};o.push(c),e[c]=f,null!=u[c]&&(s=!0),f.createInvertedIndices&&(a[c]=[]),0===v.itemName&&(this._nameDimIdx=l),0===v.itemId&&(this._idDimIdx=l),r&&(f.storeDimIndex=l)}if(this.dimensions=o,this._dimInfos=e,this._initGetDimensionInfo(s),this.hostModel=n,this._invertedIndicesMap=a,this._dimOmitted){var d=this._dimIdxToName=Vt();vt(o,(function(t){d.set(e[t].storeDimIndex,t)}))}}return t.prototype.getDimension=function(t){var n=this._recognizeDimIndex(t);if(null==n)return t;if(n=t,!this._dimOmitted)return this.dimensions[n];var i=this._dimIdxToName.get(n);if(null!=i)return i;var r=this._schema.getSourceDimension(n);return r?r.name:void 0},t.prototype.getDimensionIndex=function(t){var n=this._recognizeDimIndex(t);if(null!=n)return n;if(null==t)return-1;var i=this._getDimInfo(t);return i?i.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},t.prototype._recognizeDimIndex=function(t){if(kt(t)||null!=t&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},t.prototype._getStoreDimIndex=function(t){return this.getDimensionIndex(t)},t.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},t.prototype._initGetDimensionInfo=function(t){var n=this._dimInfos;this._getDimInfo=t?function(t){return n.hasOwnProperty(t)?n[t]:void 0}:function(t){return n[t]}},t.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(t,n){var i=this._dimSummary;if(null==n)return i.encodeFirstDimNotExtra[t];var r=i.encode[t];return r?r[n]:null},t.prototype.mapDimensionsAll=function(t){return(this._dimSummary.encode[t]||[]).slice()},t.prototype.getStore=function(){return this._store},t.prototype.initData=function(t,n,i){var r,e=this;if(t instanceof qv&&(r=t),!r){var o=this.dimensions,a=nv(t)||ct(t)?new sv(t,o.length):t;r=new qv;var s=Fy(o,(function(t){return{type:e._dimInfos[t].type,property:t}}));r.initData(a,s,i)}this._store=r,this._nameList=(n||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,r.count()),this._dimSummary=function(t,n){var i={},r=i.encode={},e=Vt(),o=[],a=[],s={};vt(t.dimensions,(function(n){var i,u=t.getDimensionInfo(n),l=u.coordDim;if(l){var h=u.coordDimIndex;by(r,l)[h]=n,u.isExtraCoord||(e.set(l,1),"ordinal"!==(i=u.type)&&"time"!==i&&(o[0]=n),by(s,l)[h]=t.getDimensionIndex(u.name)),u.defaultTooltip&&a.push(n)}ic.each((function(t,n){var i=by(r,n),e=u.otherDims[n];null!=e&&!1!==e&&(i[e]=u.name)}))}));var u=[],l={};e.each((function(t,n){var i=r[n];l[n]=i[0],u=u.concat(i)})),i.dataDimsOnCoord=u,i.dataDimIndicesOnCoord=dt(u,(function(n){return t.getDimensionInfo(n).storeDimIndex})),i.encodeFirstDimNotExtra=l;var h=r.label;h&&h.length&&(o=h.slice());var f=r.tooltip;return f&&f.length?a=f.slice():a.length||(a=o.slice()),r.defaultedLabel=o,r.defaultedTooltip=a,i.userOutput=new gy(s,n),i}(this,this._schema),this.userOutput=this._dimSummary.userOutput},t.prototype.appendData=function(t){var n=this._store.appendData(t);this._doInit(n[0],n[1])},t.prototype.appendValues=function(t,n){var i=this._store.appendValues(t,n.length),r=i.start,e=i.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),n)for(var a=r;a<e;a++)this._nameList[a]=n[a-r],o&&_y(this,a)},t.prototype._updateOrdinalMeta=function(){for(var t=this._store,n=this.dimensions,i=0;i<n.length;i++){var r=this._dimInfos[n[i]];r.ordinalMeta&&t.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},t.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return null==this._idDimIdx&&"typedArray"!==t.getSource().sourceFormat&&!t.fillStorage},t.prototype._doInit=function(t,n){if(!(t>=n)){var i=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,e=this._idList;if("original"===i.getSource().sourceFormat&&!i.pure)for(var o=[],a=t;a<n;a++){var s=i.getItem(a,o);if(!this.hasItemOption&&uo(s)&&(this.hasItemOption=!0),s){var u=s.name;null==r[a]&&null!=u&&(r[a]=co(u,null));var l=s.id;null==e[a]&&null!=l&&(e[a]=co(l,null))}}if(this._shouldMakeIdFromName())for(a=t;a<n;a++)_y(this,a);zy(this)}},t.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},t.prototype.setApproximateExtent=function(t,n){n=this.getDimension(n),this._approximateExtent[n]=t.slice()},t.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},t.prototype.setCalculationInfo=function(t,n){By(t)?ut(this._calculationInfo,t):this._calculationInfo[t]=n},t.prototype.getName=function(t){var n=this.getRawIndex(t),i=this._nameList[n];return null==i&&null!=this._nameDimIdx&&(i=Ly(this,this._nameDimIdx,n)),null==i&&(i=""),i},t.prototype._getCategory=function(t,n){var i=this._store.get(t,n),r=this._store.getOrdinalMeta(t);return r?r.categories[i]:i},t.prototype.getId=function(t){return Iy(this,this.getRawIndex(t))},t.prototype.count=function(){return this._store.count()},t.prototype.get=function(t,n){var i=this._dimInfos[t];if(i)return this._store.get(i.storeDimIndex,n)},t.prototype.getByRawIndex=function(t,n){var i=this._dimInfos[t];if(i)return this._store.getByRawIndex(i.storeDimIndex,n)},t.prototype.getIndices=function(){return this._store.getIndices()},t.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},t.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},t.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},t.prototype.getValues=function(t,n){var i=this,r=this._store;return wt(t)?r.getValues(Fy(t,(function(t){return i._getStoreDimIndex(t)})),n):r.getValues(t)},t.prototype.hasValue=function(t){for(var n=this._dimSummary.dataDimIndicesOnCoord,i=0,r=n.length;i<r;i++)if(isNaN(this._store.get(n[i],t)))return!1;return!0},t.prototype.indexOfName=function(t){for(var n=0,i=this._store.count();n<i;n++)if(this.getName(n)===t)return n;return-1},t.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},t.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},t.prototype.rawIndexOf=function(t,n){var i=(t&&this._invertedIndicesMap[t])[n];return null==i||isNaN(i)?-1:i},t.prototype.indicesOfNearest=function(t,n,i){return this._store.indicesOfNearest(this._getStoreDimIndex(t),n,i)},t.prototype.each=function(t,n,i){xt(t)&&(i=n,n=t,t=[]);var r=i||this,e=Fy(Oy(t),this._getStoreDimIndex,this);this._store.each(e,r?gt(n,r):n)},t.prototype.filterSelf=function(t,n,i){xt(t)&&(i=n,n=t,t=[]);var r=i||this,e=Fy(Oy(t),this._getStoreDimIndex,this);return this._store=this._store.filter(e,r?gt(n,r):n),this},t.prototype.selectRange=function(t){var n=this,i={};return vt(yt(t),(function(r){var e=n._getStoreDimIndex(r);i[e]=t[r]})),this._store=this._store.selectRange(i),this},t.prototype.mapArray=function(t,n,i){xt(t)&&(i=n,n=t,t=[]);var r=[];return this.each(t,(function(){r.push(n&&n.apply(this,arguments))}),i=i||this),r},t.prototype.map=function(t,n,i,r){var e=i||r||this,o=Fy(Oy(t),this._getStoreDimIndex,this),a=Ry(this);return a._store=this._store.map(o,e?gt(n,e):n),a},t.prototype.modify=function(t,n,i,r){var e=i||r||this,o=Fy(Oy(t),this._getStoreDimIndex,this);this._store.modify(o,e?gt(n,e):n)},t.prototype.downSample=function(t,n,i,r){var e=Ry(this);return e._store=this._store.downSample(this._getStoreDimIndex(t),n,i,r),e},t.prototype.lttbDownSample=function(t,n){var i=Ry(this);return i._store=this._store.lttbDownSample(this._getStoreDimIndex(t),n),i},t.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},t.prototype.getItemModel=function(t){var n=this.hostModel,i=this.getRawDataItem(t);return new qh(i,n,n&&n.ecModel)},t.prototype.diff=function(t){var n=this;return new yy(t?t.getStore().getIndices():[],this.getStore().getIndices(),(function(n){return Iy(t,n)}),(function(t){return Iy(n,t)}))},t.prototype.getVisual=function(t){var n=this._visual;return n&&n[t]},t.prototype.setVisual=function(t,n){this._visual=this._visual||{},By(t)?ut(this._visual,t):this._visual[t]=n},t.prototype.getItemVisual=function(t,n){var i=this._itemVisuals[t],r=i&&i[n];return null==r?this.getVisual(n):r},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(t,n){var i=this._itemVisuals,r=i[t];r||(r=i[t]={});var e=r[n];return null==e&&(wt(e=this.getVisual(n))?e=e.slice():By(e)&&(e=ut({},e)),r[n]=e),e},t.prototype.setItemVisual=function(t,n,i){var r=this._itemVisuals[t]||{};this._itemVisuals[t]=r,By(n)?ut(r,n):r[n]=i},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,n){By(t)?ut(this._layout,t):this._layout[t]=n},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,n,i){this._itemLayouts[t]=i?ut(this._itemLayouts[t]||{},n):n},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,n){Fs(this.hostModel&&this.hostModel.seriesIndex,this.dataType,t,n),this._graphicEls[t]=n},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,n){vt(this._graphicEls,(function(i,r){i&&t&&t.call(n,i,r)}))},t.prototype.cloneShallow=function(n){return n||(n=new t(this._schema?this._schema:Fy(this.dimensions,this._getDimInfo,this),this.hostModel)),Dy(n,this),n._store=this._store,n},t.prototype.wrapMethod=function(t,n){var i=this[t];xt(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return n.apply(this,[t].concat(Rt(arguments)))})},t.internalField=(zy=function(t){var n=t._invertedIndicesMap;vt(n,(function(i,r){var e=t._dimInfos[r],o=e.ordinalMeta,a=t._store;if(o){i=n[r]=new Ey(o.categories.length);for(var s=0;s<i.length;s++)i[s]=-1;for(s=0;s<a.count();s++)i[a.get(e.storeDimIndex,s)]=s}}))},Ly=function(t,n,i){return co(t._getCategory(n,i),null)},Iy=function(t,n){var i=t._idList[n];return null==i&&null!=t._idDimIdx&&(i=Ly(t,t._idDimIdx,n)),null==i&&(i="e\0\0"+n),i},Oy=function(t){return wt(t)||(t=null!=t?[t]:[]),t},Ry=function(n){var i=new t(n._schema?n._schema:Fy(n.dimensions,n._getDimInfo,n),n.hostModel);return Dy(i,n),i},Dy=function(t,n){vt(Py.concat(n.__wrappedMethods||[]),(function(i){n.hasOwnProperty(i)&&(t[i]=n[i])})),t.__wrappedMethods=n.__wrappedMethods,vt(Wy,(function(i){t[i]=ot(n[i])})),t._calculationInfo=ut({},n._calculationInfo)},void(_y=function(t,n){var i=t._nameList,r=t._idList,e=t._nameDimIdx,o=t._idDimIdx,a=i[n],s=r[n];if(null==a&&null!=e&&(i[n]=a=Ly(t,e,n)),null==s&&null!=o&&(r[n]=s=Ly(t,o,n)),null==s&&null!=a){var u=t._nameRepeatCount,l=u[a]=(u[a]||0)+1;s=a,l>1&&(s+="__ec__"+l),r[n]=s}})),t}();function jy(t,n){nv(t)||(t=rv(t));var i=(n=n||{}).coordDimensions||[],r=n.dimensionsDefine||t.dimensionsDefine||[],e=Vt(),o=[],a=function(t,n,i,r){var e=Math.max(t.dimensionsDetectedCount||1,n.length,i.length,r||0);return vt(n,(function(t){var n;At(t)&&(n=t.dimsDef)&&(e=Math.max(e,n.length))})),e}(t,i,r,n.dimensionsCount),s=n.canOmitUnusedDimensions&&Ty(a),u=r===t.dimensionsDefine,l=u?Cy(t):Ny(r),h=n.encodeDefine;!h&&n.encodeDefaulter&&(h=n.encodeDefaulter(t,a));for(var f=Vt(h),c=new Yv(a),v=0;v<c.length;v++)c[v]=-1;function d(t){var n=c[t];if(n<0){var i=r[t],e=At(i)?i:{name:i},a=new xy,s=e.name;return null!=s&&null!=l.get(s)&&(a.name=a.displayName=s),null!=e.type&&(a.type=e.type),null!=e.displayName&&(a.displayName=e.displayName),c[t]=o.length,a.storeDimIndex=t,o.push(a),a}return o[n]}if(!s)for(v=0;v<a;v++)d(v);f.each((function(t,n){var i=eo(t).slice();if(1===i.length&&!Mt(i[0])&&i[0]<0)f.set(n,!1);else{var r=f.set(n,[]);vt(i,(function(t,i){var e=Mt(t)?l.get(t):t;null!=e&&e<a&&(r[i]=e,m(d(e),n,i))}))}}));var p=0;function m(t,n,i){null!=ic.get(n)?t.otherDims[n]=i:(t.coordDim=n,t.coordDimIndex=i,e.set(n,!0))}vt(i,(function(t){var n,i,r,e;if(Mt(t))n=t,e={};else{n=(e=t).name;var o=e.ordinalMeta;e.ordinalMeta=null,(e=ut({},e)).ordinalMeta=o,i=e.dimsDef,r=e.otherDims,e.name=e.coordDim=e.coordDimIndex=e.dimsDef=e.otherDims=null}var s=f.get(n);if(!1!==s){if(!(s=eo(s)).length)for(var l=0;l<(i&&i.length||1);l++){for(;p<a&&null!=d(p).coordDim;)p++;p<a&&s.push(p++)}vt(s,(function(t,o){var a=d(t);if(u&&null!=e.type&&(a.type=e.type),m(lt(a,e),n,o),null==a.name&&i){var s=i[o];!At(s)&&(s={name:s}),a.name=a.displayName=s.name,a.defaultTooltip=s.defaultTooltip}r&<(a.otherDims,r)}))}}));var y=n.generateCoord,g=n.generateCoordCount,b=null!=g;g=y?g||1:0;var w=y||"value";function x(t){null==t.name&&(t.name=t.coordDim)}if(s)vt(o,(function(t){x(t)})),o.sort((function(t,n){return t.storeDimIndex-n.storeDimIndex}));else for(var M=0;M<a;M++){var S=d(M);null==S.coordDim&&(S.coordDim=Hy(w,e,b),S.coordDimIndex=0,(!y||g<=0)&&(S.isExtraCoord=!0),g--),x(S),null!=S.type||1!==sc(t,M)&&(!S.isExtraCoord||null==S.otherDims.itemName&&null==S.otherDims.seriesName)||(S.type="ordinal")}return function(t){for(var n=Vt(),i=0;i<t.length;i++){var r=t[i],e=r.name,o=n.get(e)||0;o>0&&(r.name=e+(o-1)),o++,n.set(e,o)}}(o),new ky({source:t,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function Hy(t,n,i){var r=n.data;if(i||r.hasOwnProperty(t)){for(var e=0;r.hasOwnProperty(t+e);)e++;t+=e}return n.set(t,!0),t}var Yy=function(t){this.coordSysDims=[],this.axisMap=Vt(),this.categoryAxisMap=Vt(),this.coordSysName=t},Xy={cartesian2d:function(t,n,i,r){var e=t.getReferringComponents("xAxis",xo).models[0],o=t.getReferringComponents("yAxis",xo).models[0];n.coordSysDims=["x","y"],i.set("x",e),i.set("y",o),Gy(e)&&(r.set("x",e),n.firstCategoryDimIndex=0),Gy(o)&&(r.set("y",o),null==n.firstCategoryDimIndex&&(n.firstCategoryDimIndex=1))},singleAxis:function(t,n,i,r){var e=t.getReferringComponents("singleAxis",xo).models[0];n.coordSysDims=["single"],i.set("single",e),Gy(e)&&(r.set("single",e),n.firstCategoryDimIndex=0)},polar:function(t,n,i,r){var e=t.getReferringComponents("polar",xo).models[0],o=e.findAxisModel("radiusAxis"),a=e.findAxisModel("angleAxis");n.coordSysDims=["radius","angle"],i.set("radius",o),i.set("angle",a),Gy(o)&&(r.set("radius",o),n.firstCategoryDimIndex=0),Gy(a)&&(r.set("angle",a),null==n.firstCategoryDimIndex&&(n.firstCategoryDimIndex=1))},geo:function(t,n){n.coordSysDims=["lng","lat"]},parallel:function(t,n,i,r){var e=t.ecModel,o=e.getComponent("parallel",t.get("parallelIndex")),a=n.coordSysDims=o.dimensions.slice();vt(o.parallelAxisIndex,(function(t,o){var s=e.getComponent("parallelAxis",t),u=a[o];i.set(u,s),Gy(s)&&(r.set(u,s),null==n.firstCategoryDimIndex&&(n.firstCategoryDimIndex=o))}))}};function Gy(t){return"category"===t.get("type")}function Uy(t,n){return!!n&&n===t.getCalculationInfo("stackedDimension")}function Zy(t,n){return Uy(t,n)?t.getCalculationInfo("stackResultDimension"):n}function qy(t,n,i){i=i||{};var r,e=n.getSourceManager(),o=!1;t?(o=!0,r=rv(t)):o="original"===(r=e.getSource()).sourceFormat;var a=function(t){var n=t.get("coordinateSystem"),i=new Yy(n),r=Xy[n];if(r)return r(t,i,i.axisMap,i.categoryAxisMap),i}(n),s=function(t,n){var i,r=t.get("coordinateSystem"),e=Ac.get(r);return n&&n.coordSysDims&&(i=dt(n.coordSysDims,(function(t){var i={name:t},r=n.axisMap.get(t);if(r){var e=r.get("type");i.type=wy(e)}return i}))),i||(i=e&&(e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice())||["x","y"]),i}(n,a),u=i.useEncodeDefaulter,l=xt(u)?u:u?bt(ec,s,n):null,h=jy(r,{coordDimensions:s,generateCoord:i.generateCoord,encodeDefine:n.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!o}),f=function(t,n,i){var r,e;return i&&vt(t,(function(t,o){var a=i.categoryAxisMap.get(t.coordDim);a&&(null==r&&(r=o),t.ordinalMeta=a.getOrdinalMeta(),n&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(e=!0)})),e||null==r||(t[r].otherDims.itemName=0),r}(h.dimensions,i.createInvertedIndices,a),c=o?null:e.getSharedDataStore(h),v=function(t,n,i){var r,e,o,a=(i=i||{}).byIndex,s=i.stackedCoordDimension;!function(t){return!Ay(t.schema)}(n)?(r=(e=n.schema).dimensions,o=n.store):r=n;var u,l,h,f,c=!(!t||!t.get("stack"));if(vt(r,(function(t,n){Mt(t)&&(r[n]=t={name:t}),c&&!t.isExtraCoord&&(a||u||!t.ordinalMeta||(u=t),l||"ordinal"===t.type||"time"===t.type||s&&s!==t.coordDim||(l=t))})),!l||a||u||(a=!0),l){h="__\0ecstackresult_"+t.id,f="__\0ecstackedover_"+t.id,u&&(u.createInvertedIndices=!0);var v=l.coordDim,d=l.type,p=0;vt(r,(function(t){t.coordDim===v&&p++}));var m={name:h,coordDim:v,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},y={name:f,coordDim:f,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};e?(o&&(m.storeDimIndex=o.ensureCalculationDimension(f,d),y.storeDimIndex=o.ensureCalculationDimension(h,d)),e.appendCalculationDimension(m),e.appendCalculationDimension(y)):(r.push(m),r.push(y))}return{stackedDimension:l&&l.name,stackedByDimension:u&&u.name,isStackedByIndex:a,stackedOverDimension:f,stackResultDimension:h}}(n,{schema:h,store:c}),d=new Vy(h,n);d.setCalculationInfo(v);var p=null!=f&&function(t){if("original"===t.sourceFormat)return!wt(so(function(t){for(var n=0;n<t.length&&null==t[n];)n++;return t[n]}(t.data||[])))}(r)?function(t,n,i,r){return r===f?i:this.defaultDimValueGetter(t,n,i,r)}:null;return d.hasItemOption=!1,d.initData(o?r:c,null,p),d}var $y=function(){function t(t){this._setting=t||{},this._extent=[1/0,-1/0]}return t.prototype.getSetting=function(t){return this._setting[t]},t.prototype.unionExtent=function(t){var n=this._extent;t[0]<n[0]&&(n[0]=t[0]),t[1]>n[1]&&(n[1]=t[1])},t.prototype.unionExtentFromData=function(t,n){this.unionExtent(t.getApproximateExtent(n))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,n){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(n)||(i[1]=n)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();Ro($y);var Ky=0,Jy=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++Ky}return t.createByAxisModel=function(n){var i=n.option,r=i.data,e=r&&dt(r,Qy);return new t({categories:e,needCollect:!e,deduplication:!1!==i.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var n,i=this._needCollect;if(!Mt(t)&&!i)return t;if(i&&!this._deduplication)return this.categories[n=this.categories.length]=t,n;var r=this._getOrCreateMap();return null==(n=r.get(t))&&(i?(this.categories[n=this.categories.length]=t,r.set(t,n)):n=NaN),n},t.prototype._getOrCreateMap=function(){return this._map||(this._map=Vt(this.categories))},t}();function Qy(t){return At(t)&&null!=t.value?t.value:t+""}function tg(t){return"interval"===t.type||"log"===t.type}function ng(t){var n=Math.pow(10,Ue(t)),i=t/n;return i?2===i?i=3:3===i?i=5:i*=2:i=1,Ee(i*n)}function ig(t){return We(t)+2}function rg(t,n,i){t[n]=Math.max(Math.min(t[n],i[1]),i[0])}function eg(t,n){return t>=n[0]&&t<=n[1]}function og(t,n){return n[1]===n[0]?.5:(t-n[0])/(n[1]-n[0])}function ag(t,n){return t*(n[1]-n[0])+n[0]}var sg=function(t){function n(n){var i=t.call(this,n)||this;i.type="ordinal";var r=i.getSetting("ordinalMeta");return r||(r=new Jy({})),wt(r)&&(r=new Jy({categories:dt(r,(function(t){return At(t)?t.value:t}))})),i._ordinalMeta=r,i._extent=i.getSetting("extent")||[0,r.categories.length-1],i}return E(n,t),n.prototype.parse=function(t){return null==t?NaN:Mt(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},n.prototype.contain=function(t){return eg(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},n.prototype.normalize=function(t){return og(t=this._getTickNumber(this.parse(t)),this._extent)},n.prototype.scale=function(t){return t=Math.round(ag(t,this._extent)),this.getRawOrdinalNumber(t)},n.prototype.getTicks=function(){for(var t=[],n=this._extent,i=n[0];i<=n[1];)t.push({value:i}),i++;return t},n.prototype.getMinorTicks=function(){},n.prototype.setSortInfo=function(t){if(null!=t){for(var n=t.ordinalNumbers,i=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],e=0,o=this._ordinalMeta.categories.length,a=Math.min(o,n.length);e<a;++e){var s=n[e];i[e]=s,r[s]=e}for(var u=0;e<o;++e){for(;null!=r[u];)u++;i.push(u),r[u]=e}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},n.prototype._getTickNumber=function(t){var n=this._ticksByOrdinalNumber;return n&&t>=0&&t<n.length?n[t]:t},n.prototype.getRawOrdinalNumber=function(t){var n=this._ordinalNumbersByTick;return n&&t>=0&&t<n.length?n[t]:t},n.prototype.getLabel=function(t){if(!this.isBlank()){var n=this.getRawOrdinalNumber(t.value),i=this._ordinalMeta.categories[n];return null==i?"":i+""}},n.prototype.count=function(){return this._extent[1]-this._extent[0]+1},n.prototype.unionExtentFromData=function(t,n){this.unionExtent(t.getApproximateExtent(n))},n.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},n.prototype.getOrdinalMeta=function(){return this._ordinalMeta},n.prototype.calcNiceTicks=function(){},n.prototype.calcNiceExtent=function(){},n.type="ordinal",n}($y);$y.registerClass(sg);var ug=Ee,lg=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="interval",n._interval=0,n._intervalPrecision=2,n}return E(n,t),n.prototype.parse=function(t){return t},n.prototype.contain=function(t){return eg(t,this._extent)},n.prototype.normalize=function(t){return og(t,this._extent)},n.prototype.scale=function(t){return ag(t,this._extent)},n.prototype.setExtent=function(t,n){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(n)||(i[1]=parseFloat(n))},n.prototype.unionExtent=function(t){var n=this._extent;t[0]<n[0]&&(n[0]=t[0]),t[1]>n[1]&&(n[1]=t[1]),this.setExtent(n[0],n[1])},n.prototype.getInterval=function(){return this._interval},n.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=ig(t)},n.prototype.getTicks=function(t){var n=this._interval,i=this._extent,r=this._niceExtent,e=this._intervalPrecision,o=[];if(!n)return o;i[0]<r[0]&&o.push(t?{value:ug(r[0]-n,e)}:{value:i[0]});for(var a=r[0];a<=r[1]&&(o.push({value:a}),(a=ug(a+n,e))!==o[o.length-1].value);)if(o.length>1e4)return[];var s=o.length?o[o.length-1].value:r[1];return i[1]>s&&o.push(t?{value:ug(s+n,e)}:{value:i[1]}),o},n.prototype.getMinorTicks=function(t){for(var n=this.getTicks(!0),i=[],r=this.getExtent(),e=1;e<n.length;e++){for(var o=n[e-1],a=0,s=[],u=(n[e].value-o.value)/t;a<t-1;){var l=ug(o.value+(a+1)*u);l>r[0]&&l<r[1]&&s.push(l),a++}i.push(s)}return i},n.prototype.getLabel=function(t,n){if(null==t)return"";var i=n&&n.precision;return null==i?i=We(t.value)||0:"auto"===i&&(i=this._intervalPrecision),Tf(ug(t.value,i,!0))},n.prototype.calcNiceTicks=function(t,n,i){t=t||5;var r=this._extent,e=r[1]-r[0];if(isFinite(e)){e<0&&(e=-e,r.reverse());var o=function(t,n,i,r){var e={},o=e.interval=Ze((t[1]-t[0])/n,!0);null!=i&&o<i&&(o=e.interval=i),null!=r&&o>r&&(o=e.interval=r);var a=e.intervalPrecision=ig(o);return function(t,n){!isFinite(t[0])&&(t[0]=n[0]),!isFinite(t[1])&&(t[1]=n[1]),rg(t,0,n),rg(t,1,n),t[0]>t[1]&&(t[0]=t[1])}(e.niceTickExtent=[Ee(Math.ceil(t[0]/o)*o,a),Ee(Math.floor(t[1]/o)*o,a)],t),e}(r,t,n,i);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},n.prototype.calcNiceExtent=function(t){var n=this._extent;if(n[0]===n[1])if(0!==n[0]){var i=n[0];t.fixMax||(n[1]+=i/2),n[0]-=i/2}else n[1]=1;isFinite(n[1]-n[0])||(n[0]=0,n[1]=1),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(n[0]=ug(Math.floor(n[0]/r)*r)),t.fixMax||(n[1]=ug(Math.ceil(n[1]/r)*r))},n.prototype.setNiceExtent=function(t,n){this._niceExtent=[t,n]},n.type="interval",n}($y);$y.registerClass(lg);var hg="undefined"!=typeof Float32Array,fg=hg?Float32Array:Array;function cg(t){return wt(t)?hg?new Float32Array(t):t:new fg(t)}function vg(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function dg(t){return t.dim+t.index}function pg(t,n){var i=[];return n.eachSeriesByType(t,(function(t){wg(t)&&i.push(t)})),i}function mg(t){var n=function(t){var n={};vt(t,(function(t){var i=t.coordinateSystem.getBaseAxis();if("time"===i.type||"value"===i.type)for(var r=t.getData(),e=i.dim+"_"+i.index,o=r.getDimensionIndex(r.mapDimension(i.dim)),a=r.getStore(),s=0,u=a.count();s<u;++s){var l=a.get(o,s);n[e]?n[e].push(l):n[e]=[l]}}));var i={};for(var r in n)if(n.hasOwnProperty(r)){var e=n[r];if(e){e.sort((function(t,n){return t-n}));for(var o=null,a=1;a<e.length;++a){var s=e[a]-e[a-1];s>0&&(o=null===o?s:Math.min(o,s))}i[r]=o}}return i}(t),i=[];return vt(t,(function(t){var r,e=t.coordinateSystem.getBaseAxis(),o=e.getExtent();if("category"===e.type)r=e.getBandWidth();else if("value"===e.type||"time"===e.type){var a=n[e.dim+"_"+e.index],s=Math.abs(o[1]-o[0]),u=e.scale.getExtent(),l=Math.abs(u[1]-u[0]);r=a?s/l*a:s}else{var h=t.getData();r=Math.abs(o[1]-o[0])/h.count()}var f=Fe(t.get("barWidth"),r),c=Fe(t.get("barMaxWidth"),r),v=Fe(t.get("barMinWidth")||(xg(t)?.5:1),r),d=t.get("barGap"),p=t.get("barCategoryGap");i.push({bandWidth:r,barWidth:f,barMaxWidth:c,barMinWidth:v,barGap:d,barCategoryGap:p,axisKey:dg(e),stackId:vg(t)})})),yg(i)}function yg(t){var n={};vt(t,(function(t){var i=t.axisKey,r=t.bandWidth,e=n[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},o=e.stacks;n[i]=e;var a=t.stackId;o[a]||e.autoWidthCount++,o[a]=o[a]||{width:0,maxWidth:0};var s=t.barWidth;s&&!o[a].width&&(o[a].width=s,s=Math.min(e.remainedWidth,s),e.remainedWidth-=s);var u=t.barMaxWidth;u&&(o[a].maxWidth=u);var l=t.barMinWidth;l&&(o[a].minWidth=l);var h=t.barGap;null!=h&&(e.gap=h);var f=t.barCategoryGap;null!=f&&(e.categoryGap=f)}));var i={};return vt(n,(function(t,n){i[n]={};var r=t.stacks,e=t.bandWidth,o=t.categoryGap;if(null==o){var a=yt(r).length;o=Math.max(35-4*a,15)+"%"}var s=Fe(o,e),u=Fe(t.gap,1),l=t.remainedWidth,h=t.autoWidthCount,f=(l-s)/(h+(h-1)*u);f=Math.max(f,0),vt(r,(function(t){var n=t.maxWidth,i=t.minWidth;if(t.width)r=t.width,n&&(r=Math.min(r,n)),i&&(r=Math.max(r,i)),t.width=r,l-=r+u*r,h--;else{var r=f;n&&n<r&&(r=Math.min(n,l)),i&&i>r&&(r=i),r!==f&&(t.width=r,l-=r+u*r,h--)}})),f=(l-s)/(h+(h-1)*u),f=Math.max(f,0);var c,v=0;vt(r,(function(t){t.width||(t.width=f),c=t,v+=t.width*(1+u)})),c&&(v-=c.width*u);var d=-v/2;vt(r,(function(t,r){i[n][r]=i[n][r]||{bandWidth:e,offset:d,width:t.width},d+=t.width*(1+u)}))})),i}function gg(t,n){var i=pg(t,n),r=mg(i);vt(i,(function(t){var n=t.getData(),i=t.coordinateSystem.getBaseAxis(),e=vg(t),o=r[dg(i)][e];n.setLayout({bandWidth:o.bandWidth,offset:o.offset,size:o.width})}))}function bg(t){return{seriesType:t,plan:Cd(),reset:function(t){if(wg(t)){var n=t.getData(),i=t.coordinateSystem,r=i.getBaseAxis(),e=i.getOtherAxis(r),o=n.getDimensionIndex(n.mapDimension(e.dim)),a=n.getDimensionIndex(n.mapDimension(r.dim)),s=t.get("showBackground",!0),u=n.mapDimension(e.dim),l=n.getCalculationInfo("stackResultDimension"),h=Uy(n,u)&&!!n.getCalculationInfo("stackedOnSeries"),f=e.isHorizontal(),c=function(t,n){return n.toGlobalCoord(n.dataToCoord("log"===n.type?1:0))}(0,e),v=xg(t),d=t.get("barMinHeight")||0,p=l&&n.getDimensionIndex(l),m=n.getLayout("size"),y=n.getLayout("offset");return{progress:function(t,n){for(var r,e=t.count,u=v&&cg(3*e),l=v&&s&&cg(3*e),g=v&&cg(e),b=i.master.getRect(),w=f?b.width:b.height,x=n.getStore(),M=0;null!=(r=t.next());){var S=x.get(h?p:o,r),k=x.get(a,r),A=c,N=void 0;h&&(N=+S-x.get(o,r));var C=void 0,T=void 0,z=void 0,I=void 0;if(f){var L=i.dataToPoint([S,k]);h&&(A=i.dataToPoint([N,k])[0]),C=A,T=L[1]+y,z=L[0]-A,I=m,Math.abs(z)<d&&(z=(z<0?-1:1)*d)}else L=i.dataToPoint([k,S]),h&&(A=i.dataToPoint([k,N])[1]),C=L[0]+y,T=A,z=m,I=L[1]-A,Math.abs(I)<d&&(I=(I<=0?-1:1)*d);v?(u[M]=C,u[M+1]=T,u[M+2]=f?z:I,l&&(l[M]=f?b.x:C,l[M+1]=f?T:b.y,l[M+2]=w),g[r]=r):n.setItemLayout(r,{x:C,y:T,width:z,height:I}),M+=3}v&&n.setLayout({largePoints:u,largeDataIndices:g,largeBackgroundPoints:l,valueAxisHorizontal:f})}}}}}}function wg(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function xg(t){return t.pipelineContext&&t.pipelineContext.large}var Mg=function(t){function n(n){var i=t.call(this,n)||this;return i.type="time",i}return E(n,t),n.prototype.getLabel=function(t){var n=this.getSetting("useUTC");return ff(t.value,af[function(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(hf(this._minLevelUnit))]||af.second,n,this.getSetting("locale"))},n.prototype.getFormattedLabel=function(t,n,i){var r=this.getSetting("useUTC");return function(t,n,i,r,e){var o=null;if(Mt(i))o=i;else if(xt(i))o=i(t.value,n,{level:t.level});else{var a=ut({},of);if(t.level>0)for(var s=0;s<sf.length;++s)a[sf[s]]="{primary|"+a[sf[s]]+"}";var u=i?!1===i.inherit?i:lt(i,a):a,l=cf(t.value,e);if(u[l])o=u[l];else if(u.inherit){for(s=uf.indexOf(l)-1;s>=0;--s)if(u[l]){o=u[l];break}o=o||a.none}if(wt(o)){var h=null==t.level?0:t.level>=0?t.level:o.length+t.level;o=o[h=Math.min(h,o.length-1)]}}return ff(new Date(t.value),o,e,r)}(t,n,i,this.getSetting("locale"),r)},n.prototype.getTicks=function(){var t=this._extent,n=[];if(!this._interval)return n;n.push({value:t[0],level:0});var i=this.getSetting("useUTC"),r=function(t,n,i,r){var e,o=uf,a=0;function s(t,n,i,e,o,a,s){for(var u=new Date(n),l=n,h=u[e]();l<i&&l<=r[1];)s.push({value:l}),u[o](h+=t),l=u.getTime();s.push({value:l,notAdd:!0})}function u(t,e,o){var a=[],u=!e.length;if(!function(t,n,i,r){var e=Ge(n),o=Ge(i),a=function(t){return vf(e,t,r)===vf(o,t,r)},s=function(){return a("year")},u=function(){return s()&&a("month")},l=function(){return u()&&a("day")},h=function(){return l()&&a("hour")},f=function(){return h()&&a("minute")},c=function(){return f()&&a("second")};switch(t){case"year":return s();case"month":return u();case"day":return l();case"hour":return h();case"minute":return f();case"second":return c();case"millisecond":return c()&&a("millisecond")}}(hf(t),r[0],r[1],i)){u&&(e=[{value:zg(new Date(r[0]),t,i)},{value:r[1]}]);for(var l=0;l<e.length-1;l++){var h=e[l].value,f=e[l+1].value;if(h!==f){var c=void 0,v=void 0,d=void 0;switch(t){case"year":c=Math.max(1,Math.round(n/864e5/365)),v=df(i),d=xf(i);break;case"half-year":case"quarter":case"month":c=Ag(n),v=pf(i),d=Mf(i);break;case"week":case"half-week":case"day":c=kg(n),v=mf(i),d=Sf(i),!0;break;case"half-day":case"quarter-day":case"hour":c=Ng(n),v=yf(i),d=kf(i);break;case"minute":c=Cg(n,!0),v=gf(i),d=Af(i);break;case"second":c=Cg(n,!1),v=bf(i),d=Nf(i);break;case"millisecond":c=Tg(n),v=wf(i),d=Cf(i)}s(c,h,f,v,d,0,a),"year"===t&&o.length>1&&0===l&&o.unshift({value:o[0].value-c})}}for(l=0;l<a.length;l++)o.push(a[l]);return a}}for(var l=[],h=[],f=0,c=0,v=0;v<o.length&&a++<1e4;++v){var d=hf(o[v]);if((e=o[v])===hf(e)&&(u(o[v],l[l.length-1]||[],h),d!==(o[v+1]?hf(o[v+1]):null))){if(h.length){c=f,h.sort((function(t,n){return t.value-n.value}));for(var p=[],m=0;m<h.length;++m){var y=h[m].value;0!==m&&h[m-1].value===y||(p.push(h[m]),y>=r[0]&&y<=r[1]&&f++)}var g=(r[1]-r[0])/n;if(f>1.5*g&&c>g/1.5)break;if(l.push(p),f>g||t===o[v])break}h=[]}}var b=mt(dt(l,(function(t){return mt(t,(function(t){return t.value>=r[0]&&t.value<=r[1]&&!t.notAdd}))})),(function(t){return t.length>0})),w=[],x=b.length-1;for(v=0;v<b.length;++v)for(var M=b[v],S=0;S<M.length;++S)w.push({value:M[S].value,level:x-v});w.sort((function(t,n){return t.value-n.value}));var k=[];for(v=0;v<w.length;++v)0!==v&&w[v].value===w[v-1].value||k.push(w[v]);return k}(this._minLevelUnit,this._approxInterval,i,t);return(n=n.concat(r)).push({value:t[1],level:0}),n},n.prototype.calcNiceExtent=function(t){var n=this._extent;if(n[0]===n[1]&&(n[0]-=864e5,n[1]+=864e5),n[1]===-1/0&&n[0]===1/0){var i=new Date;n[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),n[0]=n[1]-864e5}this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},n.prototype.calcNiceTicks=function(t,n,i){var r=this._extent;this._approxInterval=(r[1]-r[0])/(t=t||10),null!=n&&this._approxInterval<n&&(this._approxInterval=n),null!=i&&this._approxInterval>i&&(this._approxInterval=i);var e=Sg.length,o=Math.min(function(t,n,i,r){for(;i<r;){var e=i+r>>>1;t[e][1]<n?i=e+1:r=e}return i}(Sg,this._approxInterval,0,e),e-1);this._interval=Sg[o][1],this._minLevelUnit=Sg[Math.max(o-1,0)][0]},n.prototype.parse=function(t){return kt(t)?t:+Ge(t)},n.prototype.contain=function(t){return eg(this.parse(t),this._extent)},n.prototype.normalize=function(t){return og(this.parse(t),this._extent)},n.prototype.scale=function(t){return ag(t,this._extent)},n.type="time",n}(lg),Sg=[["second",1e3],["minute",6e4],["hour",36e5],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",15768e6],["year",31536e6]];function kg(t){return(t/=864e5)>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function Ag(t){return(t/=2592e6)>6?6:t>3?3:t>2?2:1}function Ng(t){return(t/=36e5)>12?12:t>6?6:t>3.5?4:t>2?2:1}function Cg(t,n){return(t/=n?6e4:1e3)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function Tg(t){return Ze(t,!0)}function zg(t,n,i){var r=new Date(t);switch(hf(n)){case"year":case"month":r[Mf(i)](0);case"day":r[Sf(i)](1);case"hour":r[kf(i)](0);case"minute":r[Af(i)](0);case"second":r[Nf(i)](0),r[Cf(i)](0)}return r.getTime()}$y.registerClass(Mg);var Ig=$y.prototype,Lg=lg.prototype,Og=Ee,Dg=Math.floor,Rg=Math.ceil,_g=Math.pow,Bg=Math.log,Fg=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="log",n.base=10,n._originalScale=new lg,n._interval=0,n}return E(n,t),n.prototype.getTicks=function(t){var n=this._extent,i=this._originalScale.getExtent();return dt(Lg.getTicks.call(this,t),(function(t){var r=t.value,e=Ee(_g(this.base,r));return e=r===n[0]&&this._fixMin?Pg(e,i[0]):e,{value:e=r===n[1]&&this._fixMax?Pg(e,i[1]):e}}),this)},n.prototype.setExtent=function(t,n){var i=this.base;t=Bg(t)/Bg(i),n=Bg(n)/Bg(i),Lg.setExtent.call(this,t,n)},n.prototype.getExtent=function(){var t=this.base,n=Ig.getExtent.call(this);n[0]=_g(t,n[0]),n[1]=_g(t,n[1]);var i=this._originalScale.getExtent();return this._fixMin&&(n[0]=Pg(n[0],i[0])),this._fixMax&&(n[1]=Pg(n[1],i[1])),n},n.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var n=this.base;t[0]=Bg(t[0])/Bg(n),t[1]=Bg(t[1])/Bg(n),Ig.unionExtent.call(this,t)},n.prototype.unionExtentFromData=function(t,n){this.unionExtent(t.getApproximateExtent(n))},n.prototype.calcNiceTicks=function(t){t=t||10;var n=this._extent,i=n[1]-n[0];if(!(i===1/0||i<=0)){var r=Math.pow(10,Ue(i));for(t/i*r<=.5&&(r*=10);!isNaN(r)&&Math.abs(r)<1&&Math.abs(r)>0;)r*=10;var e=[Ee(Rg(n[0]/r)*r),Ee(Dg(n[1]/r)*r)];this._interval=r,this._niceExtent=e}},n.prototype.calcNiceExtent=function(t){Lg.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},n.prototype.parse=function(t){return t},n.prototype.contain=function(t){return eg(t=Bg(t)/Bg(this.base),this._extent)},n.prototype.normalize=function(t){return og(t=Bg(t)/Bg(this.base),this._extent)},n.prototype.scale=function(t){return t=ag(t,this._extent),_g(this.base,t)},n.type="log",n}($y),Eg=Fg.prototype;function Pg(t,n){return Og(t,We(n))}Eg.getMinorTicks=Lg.getMinorTicks,Eg.getLabel=Lg.getLabel,$y.registerClass(Fg);var Wg=function(){function t(t,n,i){this._prepareParams(t,n,i)}return t.prototype._prepareParams=function(t,n,i){i[1]<i[0]&&(i=[NaN,NaN]),this._dataMin=i[0],this._dataMax=i[1];var r=this._isOrdinal="ordinal"===t.type;this._needCrossZero="interval"===t.type&&n.getNeedCrossZero&&n.getNeedCrossZero();var e=this._modelMinRaw=n.get("min",!0);xt(e)?this._modelMinNum=Yg(t,e({min:i[0],max:i[1]})):"dataMin"!==e&&(this._modelMinNum=Yg(t,e));var o=this._modelMaxRaw=n.get("max",!0);if(xt(o)?this._modelMaxNum=Yg(t,o({min:i[0],max:i[1]})):"dataMax"!==o&&(this._modelMaxNum=Yg(t,o)),r)this._axisDataLen=n.getCategories().length;else{var a=n.get("boundaryGap"),s=wt(a)?a:[a||0,a||0];this._boundaryGapInner="boolean"==typeof s[0]||"boolean"==typeof s[1]?[0,0]:[xe(s[0],1),xe(s[1],1)]}},t.prototype.calculate=function(){var t=this._isOrdinal,n=this._dataMin,i=this._dataMax,r=this._axisDataLen,e=this._boundaryGapInner,o=t?null:i-n||Math.abs(n),a="dataMin"===this._modelMinRaw?n:this._modelMinNum,s="dataMax"===this._modelMaxRaw?i:this._modelMaxNum,u=null!=a,l=null!=s;null==a&&(a=t?r?0:NaN:n-e[0]*o),null==s&&(s=t?r?r-1:NaN:i+e[1]*o),(null==a||!isFinite(a))&&(a=NaN),(null==s||!isFinite(s))&&(s=NaN);var h=It(a)||It(s)||t&&!r;this._needCrossZero&&(a>0&&s>0&&!u&&(a=0),a<0&&s<0&&!l&&(s=0));var f=this._determinedMin,c=this._determinedMax;return null!=f&&(a=f,u=!0),null!=c&&(s=c,l=!0),{min:a,max:s,minFixed:u,maxFixed:l,isBlank:h}},t.prototype.modifyDataMinMax=function(t,n){this[jg[t]]=n},t.prototype.setDeterminedMinMax=function(t,n){this[Vg[t]]=n},t.prototype.freeze=function(){this.frozen=!0},t}(),Vg={min:"_determinedMin",max:"_determinedMax"},jg={min:"_dataMin",max:"_dataMax"};function Hg(t,n,i){var r=t.rawExtentInfo;return r||(r=new Wg(t,n,i),t.rawExtentInfo=r,r)}function Yg(t,n){return null==n?null:It(n)?NaN:t.parse(n)}function Xg(t,n){var i=t.type,r=Hg(t,n,t.getExtent()).calculate();t.setBlank(r.isBlank);var e=r.min,o=r.max,a=n.ecModel;if(a&&"time"===i){var s=pg("bar",a),u=!1;if(vt(s,(function(t){u=u||t.getBaseAxis()===n.axis})),u){var l=mg(s),h=function(t,n,i,r){var e=i.axis.getExtent(),o=e[1]-e[0],a=function(t,n){if(t&&n){var i=t[dg(n)];return i}}(r,i.axis);if(void 0===a)return{min:t,max:n};var s=1/0;vt(a,(function(t){s=Math.min(t.offset,s)}));var u=-1/0;vt(a,(function(t){u=Math.max(t.offset+t.width,u)})),s=Math.abs(s),u=Math.abs(u);var l=s+u,h=n-t,f=h/(1-(s+u)/o)-h;return{min:t-=f*(s/l),max:n+=f*(u/l)}}(e,o,n,l);e=h.min,o=h.max}}return{extent:[e,o],fixMin:r.minFixed,fixMax:r.maxFixed}}function Gg(t,n){var i=n,r=Xg(t,i),e=r.extent,o=i.get("splitNumber");t instanceof Fg&&(t.base=i.get("logBase"));var a=t.type,s=i.get("interval"),u="interval"===a||"time"===a;t.setExtent(e[0],e[1]),t.calcNiceExtent({splitNumber:o,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:u?i.get("minInterval"):null,maxInterval:u?i.get("maxInterval"):null}),null!=s&&t.setInterval&&t.setInterval(s)}function Ug(t,n){if(n=n||t.get("type"))switch(n){case"category":return new sg({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new Mg({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new($y.getClass(n)||lg)}}function Zg(t){var n,i,r=t.getLabelModel().get("formatter"),e="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(i=r,function(n,r){return t.scale.getFormattedLabel(n,r,i)}):Mt(r)?function(n){return function(i){var r=t.scale.getLabel(i);return n.replace("{value}",null!=r?r:"")}}(r):xt(r)?(n=r,function(i,r){return null!=e&&(r=i.value-e),n(qg(t,i),r,null!=i.level?{level:i.level}:null)}):function(n){return t.scale.getLabel(n)}}function qg(t,n){return"category"===t.type?t.scale.getLabel(n):n.value}function $g(t,n){var i=n*Math.PI/180,r=t.width,e=t.height,o=r*Math.abs(Math.cos(i))+Math.abs(e*Math.sin(i)),a=r*Math.abs(Math.sin(i))+Math.abs(e*Math.cos(i));return new ve(t.x,t.y,o,a)}function Kg(t){var n=t.get("interval");return null==n?"auto":n}function Jg(t){return"category"===t.type&&0===Kg(t.getLabelModel())}function Qg(t,n){var i={};return vt(t.mapDimensionsAll(n),(function(n){i[Zy(t,n)]=!0})),yt(i)}var tb=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}();function nb(t,n){return Math.abs(t-n)<1e-8}function ib(t,n,i){var r=0,e=t[0];if(!e)return!1;for(var o=1;o<t.length;o++){var a=t[o];r+=$a(e[0],e[1],a[0],a[1],n,i),e=a}var s=t[0];return nb(e[0],s[0])&&nb(e[1],s[1])||(r+=$a(e[0],e[1],s[0],s[1],n,i)),0!==r}var rb=[];function eb(t,n){for(var i=0;i<t.length;i++)fn(t[i],t[i],n)}function ob(t,n,i,r){for(var e=0;e<t.length;e++){var o=t[e];r&&(o=r.project(o)),o&&isFinite(o[0])&&isFinite(o[1])&&(cn(n,n,o),vn(i,i,o))}}var ab=function(){function t(t){this.name=t}return t.prototype.setCenter=function(t){this._center=t},t.prototype.getCenter=function(){var t=this._center;return t||(t=this._center=this.calcCenter()),t},t}(),sb=function(t,n){this.type="polygon",this.exterior=t,this.interiors=n},ub=function(t){this.type="linestring",this.points=t},lb=function(t){function n(n,i,r){var e=t.call(this,n)||this;return e.type="geoJSON",e.geometries=i,e._center=r&&[r[0],r[1]],e}return E(n,t),n.prototype.calcCenter=function(){for(var t,n=this.geometries,i=0,r=0;r<n.length;r++){var e=n[r],o=e.exterior,a=o&&o.length;a>i&&(t=e,i=a)}if(t)return function(t){for(var n=0,i=0,r=0,e=t.length,o=t[e-1][0],a=t[e-1][1],s=0;s<e;s++){var u=t[s][0],l=t[s][1],h=o*l-u*a;n+=h,i+=(o+u)*h,r+=(a+l)*h,o=u,a=l}return n?[i/n/3,r/n/3,n]:[t[0][0]||0,t[0][1]||0]}(t.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},n.prototype.getBoundingRect=function(t){var n=this._rect;if(n&&!t)return n;var i=[1/0,1/0],r=[-1/0,-1/0];return vt(this.geometries,(function(n){"polygon"===n.type?ob(n.exterior,i,r,t):vt(n.points,(function(n){ob(n,i,r,t)}))})),isFinite(i[0])&&isFinite(i[1])&&isFinite(r[0])&&isFinite(r[1])||(i[0]=i[1]=r[0]=r[1]=0),n=new ve(i[0],i[1],r[0]-i[0],r[1]-i[1]),t||(this._rect=n),n},n.prototype.contain=function(t){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(t[0],t[1]))return!1;t:for(var r=0,e=i.length;r<e;r++){var o=i[r];if("polygon"===o.type){var a=o.interiors;if(ib(o.exterior,t[0],t[1])){for(var s=0;s<(a?a.length:0);s++)if(ib(a[s],t[0],t[1]))continue t;return!0}}}return!1},n.prototype.transformTo=function(t,n,i,r){var e=this.getBoundingRect(),o=e.width/e.height;i?r||(r=i/o):i=o*r;for(var a=new ve(t,n,i,r),s=e.calculateTransform(a),u=this.geometries,l=0;l<u.length;l++){var h=u[l];"polygon"===h.type?(eb(h.exterior,s),vt(h.interiors,(function(t){eb(t,s)}))):vt(h.points,(function(t){eb(t,s)}))}(e=this._rect).copy(a),this._center=[e.x+e.width/2,e.y+e.height/2]},n.prototype.cloneShallow=function(t){null==t&&(t=this.name);var i=new n(t,this.geometries,this._center);return i._rect=this._rect,i.transformTo=null,i},n}(ab),hb=function(t){function n(n,i){var r=t.call(this,n)||this;return r.type="geoSVG",r._elOnlyForCalculate=i,r}return E(n,t),n.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,n=t.getBoundingRect(),i=[n.x+n.width/2,n.y+n.height/2],r=jr(rb),e=t;e&&!e.isGeoSVGGraphicRoot;)Yr(r,e.getLocalTransform(),r),e=e.parent;return Zr(r,r),fn(i,i,r),i},n}(ab);function fb(t,n,i){for(var r=0;r<t.length;r++)t[r]=cb(t[r],n[r],i)}function cb(t,n,i){for(var r=[],e=n[0],o=n[1],a=0;a<t.length;a+=2){var s=t.charCodeAt(a)-64,u=t.charCodeAt(a+1)-64;s=s>>1^-(1&s),u=u>>1^-(1&u),e=s+=e,o=u+=o,r.push([s/i,u/i])}return r}var vb=yo();function db(t,n){var i,r,e=pb(t,"labels"),o=Kg(n);return mb(e,o)||(xt(o)?i=bb(t,o):(r="auto"===o?function(t){var n=vb(t).autoInterval;return null!=n?n:vb(t).autoInterval=t.calculateCategoryInterval()}(t):o,i=gb(t,r)),yb(e,o,{labels:i,labelCategoryInterval:r}))}function pb(t,n){return vb(t)[n]||(vb(t)[n]=[])}function mb(t,n){for(var i=0;i<t.length;i++)if(t[i].key===n)return t[i].value}function yb(t,n,i){return t.push({key:n,value:i}),i}function gb(t,n,i){var r=Zg(t),e=t.scale,o=e.getExtent(),a=t.getLabelModel(),s=[],u=Math.max((n||0)+1,1),l=o[0],h=e.count();0!==l&&u>1&&h/u>2&&(l=Math.round(Math.ceil(l/u)*u));var f=Jg(t),c=a.get("showMinLabel")||f,v=a.get("showMaxLabel")||f;c&&l!==o[0]&&p(o[0]);for(var d=l;d<=o[1];d+=u)p(d);function p(t){var n={value:t};s.push(i?t:{formattedLabel:r(n),rawLabel:e.getLabel(n),tickValue:t})}return v&&d-u!==o[1]&&p(o[1]),s}function bb(t,n,i){var r=t.scale,e=Zg(t),o=[];return vt(r.getTicks(),(function(t){var a=r.getLabel(t),s=t.value;n(t.value,a)&&o.push(i?s:{formattedLabel:e(t),rawLabel:a,tickValue:s})})),o}var wb=[0,1],xb=function(){function t(t,n,i){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=n,this._extent=i||[0,0]}return t.prototype.contain=function(t){var n=this._extent,i=Math.min(n[0],n[1]),r=Math.max(n[0],n[1]);return t>=i&&t<=r},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return Ve(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,n){var i=this._extent;i[0]=t,i[1]=n},t.prototype.dataToCoord=function(t,n){var i=this._extent,r=this.scale;return t=r.normalize(t),this.onBand&&"ordinal"===r.type&&Mb(i=i.slice(),r.count()),Be(t,wb,i,n)},t.prototype.coordToData=function(t,n){var i=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&Mb(i=i.slice(),r.count());var e=Be(t,i,wb,n);return this.scale.scale(e)},t.prototype.pointToData=function(){},t.prototype.getTicksCoords=function(t){var n=(t=t||{}).tickModel||this.getTickModel(),i=dt(function(t,n){return"category"===t.type?function(t,n){var i,r,e=pb(t,"ticks"),o=Kg(n),a=mb(e,o);if(a)return a;if(n.get("show")&&!t.scale.isBlank()||(i=[]),xt(o))i=bb(t,o,!0);else if("auto"===o){var s=db(t,t.getLabelModel());r=s.labelCategoryInterval,i=dt(s.labels,(function(t){return t.tickValue}))}else i=gb(t,r=o,!0);return yb(e,o,{ticks:i,tickCategoryInterval:r})}(t,n):{ticks:dt(t.scale.getTicks(),(function(t){return t.value}))}}(this,n).ticks,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}}),this);return function(t,n,i,r){var e=n.length;if(t.onBand&&!i&&e){var o,a=t.getExtent();if(1===e)n[0].coord=a[0],o=n[1]={coord:a[0]};else{var s=(n[e-1].coord-n[0].coord)/(n[e-1].tickValue-n[0].tickValue);vt(n,(function(t){t.coord-=s/2}));var u=t.scale.getExtent();n.push(o={coord:n[e-1].coord+s*(1+u[1]-n[e-1].tickValue)})}var l=a[0]>a[1];h(n[0].coord,a[0])&&(r?n[0].coord=a[0]:n.shift()),r&&h(a[0],n[0].coord)&&n.unshift({coord:a[0]}),h(a[1],o.coord)&&(r?o.coord=a[1]:n.pop()),r&&h(o.coord,a[1])&&n.push({coord:a[1]})}function h(t,n){return t=Ee(t),n=Ee(n),l?t>n:t<n}}(this,i,n.get("alignWithLabel"),t.clamp),i},t.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick").get("splitNumber");return t>0&&t<100||(t=5),dt(this.scale.getMinorTicks(t),(function(t){return dt(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(){return(t=this,"category"===t.type?function(t){var n=t.getLabelModel(),i=db(t,n);return!n.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}(t):function(t){var n=t.scale.getTicks(),i=Zg(t);return{labels:dt(n,(function(n,r){return{level:n.level,formattedLabel:i(n,r),rawLabel:t.scale.getLabel(n),tickValue:n.value}}))}}(t)).labels;var t},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,n=this.scale.getExtent(),i=n[1]-n[0]+(this.onBand?1:0);0===i&&(i=1);var r=Math.abs(t[1]-t[0]);return Math.abs(r)/i},t.prototype.calculateCategoryInterval=function(){return function(t){var n=function(t){var n=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:n.get("rotate")||0,font:n.getFont()}}(t),i=Zg(t),r=(n.axisRotate-n.labelRotate)/180*Math.PI,e=t.scale,o=e.getExtent(),a=e.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var u=o[0],l=t.dataToCoord(u+1)-t.dataToCoord(u),h=Math.abs(l*Math.cos(r)),f=Math.abs(l*Math.sin(r)),c=0,v=0;u<=o[1];u+=s){var d,p=ye(i({value:u}),n.font,"center","top");d=1.3*p.height,c=Math.max(c,1.3*p.width,7),v=Math.max(v,d,7)}var m=c/h,y=v/f;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var g=Math.max(0,Math.floor(Math.min(m,y))),b=vb(t.model),w=t.getExtent(),x=b.lastAutoInterval,M=b.lastTickCount;return null!=x&&null!=M&&Math.abs(x-g)<=1&&Math.abs(M-a)<=1&&x>g&&b.axisExtent0===w[0]&&b.axisExtent1===w[1]?g=x:(b.lastTickCount=a,b.lastAutoInterval=g,b.axisExtent0=w[0],b.axisExtent1=w[1]),g}(this)},t}();function Mb(t,n){var i=(t[1]-t[0])/n/2;t[0]+=i,t[1]-=i}var Sb=2*Math.PI,kb=ja.CMD,Ab=["top","right","bottom","left"];function Nb(t,n,i,r,e){var o=i.width,a=i.height;switch(t){case"top":r.set(i.x+o/2,i.y-n),e.set(0,-1);break;case"bottom":r.set(i.x+o/2,i.y+a+n),e.set(0,1);break;case"left":r.set(i.x-n,i.y+a/2),e.set(-1,0);break;case"right":r.set(i.x+o+n,i.y+a/2),e.set(1,0)}}function Cb(t,n,i,r,e,o,a,s,u){a-=t,s-=n;var l=Math.sqrt(a*a+s*s),h=(a/=l)*i+t,f=(s/=l)*i+n;if(Math.abs(r-e)%Sb<1e-4)return u[0]=h,u[1]=f,l-i;if(o){var c=r;r=Ua(e),e=Ua(c)}else r=Ua(r),e=Ua(e);r>e&&(e+=Sb);var v=Math.atan2(s,a);if(v<0&&(v+=Sb),v>=r&&v<=e||v+Sb>=r&&v+Sb<=e)return u[0]=h,u[1]=f,l-i;var d=i*Math.cos(r)+t,p=i*Math.sin(r)+n,m=i*Math.cos(e)+t,y=i*Math.sin(e)+n,g=(d-a)*(d-a)+(p-s)*(p-s),b=(m-a)*(m-a)+(y-s)*(y-s);return g<b?(u[0]=d,u[1]=p,Math.sqrt(g)):(u[0]=m,u[1]=y,Math.sqrt(b))}function Tb(t,n,i,r,e,o,a,s){var u=e-t,l=o-n,h=i-t,f=r-n,c=Math.sqrt(h*h+f*f),v=(u*(h/=c)+l*(f/=c))/c;s&&(v=Math.min(Math.max(v,0),1));var d=a[0]=t+(v*=c)*h,p=a[1]=n+v*f;return Math.sqrt((d-e)*(d-e)+(p-o)*(p-o))}function zb(t,n,i,r,e,o,a){i<0&&(t+=i,i=-i),r<0&&(n+=r,r=-r);var s=t+i,u=n+r,l=a[0]=Math.min(Math.max(e,t),s),h=a[1]=Math.min(Math.max(o,n),u);return Math.sqrt((l-e)*(l-e)+(h-o)*(h-o))}var Ib=[];function Lb(t,n,i){var r=zb(n.x,n.y,n.width,n.height,t.x,t.y,Ib);return i.set(Ib[0],Ib[1]),r}function Ob(t,n,i){for(var r,e,o=0,a=0,s=0,u=0,l=1/0,h=n.data,f=t.x,c=t.y,v=0;v<h.length;){var d=h[v++];1===v&&(s=o=h[v],u=a=h[v+1]);var p=l;switch(d){case kb.M:o=s=h[v++],a=u=h[v++];break;case kb.L:p=Tb(o,a,h[v],h[v+1],f,c,Ib,!0),o=h[v++],a=h[v++];break;case kb.C:p=di(o,a,h[v++],h[v++],h[v++],h[v++],h[v],h[v+1],f,c,Ib),o=h[v++],a=h[v++];break;case kb.Q:p=wi(o,a,h[v++],h[v++],h[v],h[v+1],f,c,Ib),o=h[v++],a=h[v++];break;case kb.A:var m=h[v++],y=h[v++],g=h[v++],b=h[v++],w=h[v++],x=h[v++];v+=1;var M=!!(1-h[v++]);r=Math.cos(w)*g+m,e=Math.sin(w)*b+y,v<=1&&(s=r,u=e),p=Cb(m,y,b,w,w+x,M,(f-m)*b/g+m,c,Ib),o=Math.cos(w+x)*g+m,a=Math.sin(w+x)*b+y;break;case kb.R:p=zb(s=o=h[v++],u=a=h[v++],h[v++],h[v++],f,c,Ib);break;case kb.Z:p=Tb(o,a,s,u,f,c,Ib,!0),o=s,a=u}p<l&&(l=p,i.set(Ib[0],Ib[1]))}return l}var Db=new ee,Rb=new ee,_b=new ee,Bb=new ee,Fb=new ee;function Eb(t,n){if(t){var i=t.getTextGuideLine(),r=t.getTextContent();if(r&&i){var e=t.textGuideLineConfig||{},o=[[0,0],[0,0],[0,0]],a=e.candidates||Ab,s=r.getBoundingRect().clone();s.applyTransform(r.getComputedTransform());var u=1/0,l=e.anchor,h=t.getComputedTransform(),f=h&&Zr([],h),c=n.get("length2")||0;l&&_b.copy(l);for(var v=0;v<a.length;v++){Nb(a[v],0,s,Db,Bb),ee.scaleAndAdd(Rb,Db,Bb,c),Rb.transform(f);var d=t.getBoundingRect(),p=l?l.distance(Rb):t instanceof us?Ob(Rb,t.path,_b):Lb(Rb,d,_b);p<u&&(u=p,Rb.transform(h),_b.transform(h),_b.toArray(o[0]),Rb.toArray(o[1]),Db.toArray(o[2]))}Vb(o,n.get("minTurnAngle")),i.setShape({points:o})}}}var Pb=[],Wb=new ee;function Vb(t,n){if(n<=180&&n>0){n=n/180*Math.PI,Db.fromArray(t[0]),Rb.fromArray(t[1]),_b.fromArray(t[2]),ee.sub(Bb,Db,Rb),ee.sub(Fb,_b,Rb);var i=Bb.len(),r=Fb.len();if(!(i<.001||r<.001)){Bb.scale(1/i),Fb.scale(1/r);var e=Bb.dot(Fb);if(Math.cos(n)<e){var o=Tb(Rb.x,Rb.y,_b.x,_b.y,Db.x,Db.y,Pb,!1);Wb.fromArray(Pb),Wb.scaleAndAdd(Fb,o/Math.tan(Math.PI-n));var a=_b.x!==Rb.x?(Wb.x-Rb.x)/(_b.x-Rb.x):(Wb.y-Rb.y)/(_b.y-Rb.y);if(isNaN(a))return;a<0?ee.copy(Wb,Rb):a>1&&ee.copy(Wb,_b),Wb.toArray(t[1])}}}}function jb(t,n,i){if(i<=180&&i>0){i=i/180*Math.PI,Db.fromArray(t[0]),Rb.fromArray(t[1]),_b.fromArray(t[2]),ee.sub(Bb,Rb,Db),ee.sub(Fb,_b,Rb);var r=Bb.len(),e=Fb.len();if(!(r<.001||e<.001)&&(Bb.scale(1/r),Fb.scale(1/e),Bb.dot(n)<Math.cos(i))){var o=Tb(Rb.x,Rb.y,_b.x,_b.y,Db.x,Db.y,Pb,!1);Wb.fromArray(Pb);var a=Math.PI/2,s=a+Math.acos(Fb.dot(n))-i;if(s>=a)ee.copy(Wb,_b);else{Wb.scaleAndAdd(Fb,o/Math.tan(Math.PI/2-s));var u=_b.x!==Rb.x?(Wb.x-Rb.x)/(_b.x-Rb.x):(Wb.y-Rb.y)/(_b.y-Rb.y);if(isNaN(u))return;u<0?ee.copy(Wb,Rb):u>1&&ee.copy(Wb,_b)}Wb.toArray(t[1])}}}function Hb(t,n,i,r){var e="normal"===i,o=e?t:t.ensureState(i);o.ignore=n;var a=r.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=r.getModel("lineStyle").getLineStyle();e?t.useStyle(s):o.style=s}function Yb(t,n){var i=n.smooth,r=n.points;if(r)if(t.moveTo(r[0][0],r[0][1]),i>0&&r.length>=3){var e=un(r[0],r[1]),o=un(r[1],r[2]);if(!e||!o)return t.lineTo(r[1][0],r[1][1]),void t.lineTo(r[2][0],r[2][1]);var a=Math.min(e,o)*i,s=hn([],r[1],r[0],a/e),u=hn([],r[1],r[2],a/o),l=hn([],s,u,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),t.bezierCurveTo(u[0],u[1],u[0],u[1],r[2][0],r[2][1])}else for(var h=1;h<r.length;h++)t.lineTo(r[h][0],r[h][1])}function Xb(t,n,i){var r=t.getTextGuideLine(),e=t.getTextContent();if(e){for(var o=n.normal,a=o.get("show"),s=e.ignore,u=0;u<Hs.length;u++){var l=Hs[u],h=n[l],f="normal"===l;if(h){var c=h.get("show");if((f?s:Ot(e.states[l]&&e.states[l].ignore,s))||!Ot(c,a)){var v=f?r:r&&r.states[l];v&&(v.ignore=!0);continue}r||(r=new wl,t.setTextGuideLine(r),f||!s&&a||Hb(r,!0,"normal",n.normal),t.stateProxy&&(r.stateProxy=t.stateProxy)),Hb(r,!1,l,h)}}if(r){lt(r.style,i),r.style.fill=null;var d=o.get("showAbove");(t.textGuideLineConfig=t.textGuideLineConfig||{}).showAbove=d||!1,r.buildPath=Yb}}else r&&t.removeTextGuideLine()}function Gb(t,n){for(var i={normal:t.getModel(n=n||"labelLine")},r=0;r<js.length;r++){var e=js[r];i[e]=t.getModel([e,n])}return i}function Ub(t){for(var n=[],i=0;i<t.length;i++){var r=t[i];if(!r.defaultAttr.ignore){var e=r.label,o=e.getComputedTransform(),a=e.getBoundingRect(),s=!o||o[1]<1e-5&&o[2]<1e-5,u=e.style.margin||0,l=a.clone();l.applyTransform(o),l.x-=u/2,l.y-=u/2,l.width+=u,l.height+=u;var h=s?new El(a,o):null;n.push({label:e,labelLine:r.labelLine,rect:l,localRect:a,obb:h,priority:r.priority,defaultAttr:r.defaultAttr,layoutOption:r.computedLayoutOption,axisAligned:s,transform:o})}}return n}function Zb(t,n,i,r,e,o){var a=t.length;if(!(a<2)){t.sort((function(t,i){return t.rect[n]-i.rect[n]}));for(var s,u=0,l=!1,h=0,f=0;f<a;f++){var c=t[f],v=c.rect;(s=v[n]-u)<0&&(v[n]-=s,c.label[n]-=s,l=!0),h+=Math.max(-s,0),u=v[n]+v[i]}h>0&&o&&w(-h/a,0,a);var d,p,m=t[0],y=t[a-1];return g(),d<0&&x(-d,.8),p<0&&x(p,.8),g(),b(d,p,1),b(p,d,-1),g(),d<0&&M(-d),p<0&&M(p),l}function g(){d=m.rect[n]-r,p=e-y.rect[n]-y.rect[i]}function b(t,n,i){if(t<0){var r=Math.min(n,-t);if(r>0){w(r*i,0,a);var e=r+t;e<0&&x(-e*i,1)}else x(-t*i,1)}}function w(i,r,e){0!==i&&(l=!0);for(var o=r;o<e;o++){var a=t[o];a.rect[n]+=i,a.label[n]+=i}}function x(r,e){for(var o=[],s=0,u=1;u<a;u++){var l=t[u-1].rect,h=Math.max(t[u].rect[n]-l[n]-l[i],0);o.push(h),s+=h}if(s){var f=Math.min(Math.abs(r)/s,e);if(r>0)for(u=0;u<a-1;u++)w(o[u]*f,0,u+1);else for(u=a-1;u>0;u--)w(-o[u-1]*f,u,a)}}function M(t){var n=t<0?-1:1;t=Math.abs(t);for(var i=Math.ceil(t/(a-1)),r=0;r<a-1;r++)if(n>0?w(i,0,r+1):w(-i,a-r-1,a),(t-=i)<=0)return}}function qb(t,n,i,r){return Zb(t,"y","height",n,i,r)}function $b(t){var n=[];t.sort((function(t,n){return n.priority-t.priority}));var i=new ve(0,0,0,0);function r(t){if(!t.ignore){var n=t.ensureState("emphasis");null==n.ignore&&(n.ignore=!1)}t.ignore=!0}for(var e=0;e<t.length;e++){var o=t[e],a=o.axisAligned,s=o.localRect,u=o.transform,l=o.label,h=o.labelLine;i.copy(o.rect),i.width-=.1,i.height-=.1,i.x+=.05,i.y+=.05;for(var f=o.obb,c=!1,v=0;v<n.length;v++){var d=n[v];if(i.intersect(d.rect)){if(a&&d.axisAligned){c=!0;break}if(d.obb||(d.obb=new El(d.localRect,d.transform)),f||(f=new El(s,u)),f.intersect(d.obb)){c=!0;break}}}c?(r(l),h&&r(h)):(l.attr("ignore",o.defaultAttr.ignore),h&&h.attr("ignore",o.defaultAttr.labelGuideIgnore),n.push(o))}}function Kb(t){if(t){for(var n=[],i=0;i<t.length;i++)n.push(t[i].slice());return n}}function Jb(t,n){var i=t.label,r=n&&n.getTextGuideLine();return{dataIndex:t.dataIndex,dataType:t.dataType,seriesIndex:t.seriesModel.seriesIndex,text:t.label.style.text,rect:t.hostRect,labelRect:t.rect,align:i.style.align,verticalAlign:i.style.verticalAlign,labelLinePoints:Kb(r&&r.shape.points)}}var Qb=["align","verticalAlign","width","height","fontSize"],tw=new ne,nw=yo(),iw=yo();function rw(t,n,i){for(var r=0;r<i.length;r++){var e=i[r];null!=n[e]&&(t[e]=n[e])}}var ew=["x","y","rotation"],ow=function(){function t(){this._labelList=[],this._chartViewList=[]}return t.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},t.prototype._addLabel=function(t,n,i,r,e){var o=r.style,a=r.__hostTarget.textConfig||{},s=r.getComputedTransform(),u=r.getBoundingRect().plain();ve.applyTransform(u,u,s),s?tw.setLocalTransform(s):(tw.x=tw.y=tw.rotation=tw.originX=tw.originY=0,tw.scaleX=tw.scaleY=1);var l,h=r.__hostTarget;if(h){l=h.getBoundingRect().plain();var f=h.getComputedTransform();ve.applyTransform(l,l,f)}var c=l&&h.getTextGuideLine();this._labelList.push({label:r,labelLine:c,seriesModel:i,dataIndex:t,dataType:n,layoutOption:e,computedLayoutOption:null,rect:u,hostRect:l,priority:l?l.width*l.height:0,defaultAttr:{ignore:r.ignore,labelGuideIgnore:c&&c.ignore,x:tw.x,y:tw.y,scaleX:tw.scaleX,scaleY:tw.scaleY,rotation:tw.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:r.cursor,attachedPos:a.position,attachedRot:a.rotation}})},t.prototype.addLabelsOfSeries=function(t){var n=this;this._chartViewList.push(t);var i=t.__model,r=i.get("labelLayout");(xt(r)||yt(r).length)&&t.group.traverse((function(t){if(t.ignore)return!0;var e=t.getTextContent(),o=Bs(t);e&&!e.disableLabelLayout&&n._addLabel(o.dataIndex,o.dataType,i,e,r)}))},t.prototype.updateLayoutConfig=function(t){var n=t.getWidth(),i=t.getHeight();function r(t,n){return function(){Eb(t,n)}}for(var e=0;e<this._labelList.length;e++){var o=this._labelList[e],a=o.label,s=a.__hostTarget,u=o.defaultAttr,l=void 0;l=xt(o.layoutOption)?o.layoutOption(Jb(o,s)):o.layoutOption,o.computedLayoutOption=l=l||{};var h=Math.PI/180;s&&s.setTextConfig({local:!1,position:null!=l.x||null!=l.y?null:u.attachedPos,rotation:null!=l.rotate?l.rotate*h:u.attachedRot,offset:[l.dx||0,l.dy||0]});var f=!1;if(null!=l.x?(a.x=Fe(l.x,n),a.setStyle("x",0),f=!0):(a.x=u.x,a.setStyle("x",u.style.x)),null!=l.y?(a.y=Fe(l.y,i),a.setStyle("y",0),f=!0):(a.y=u.y,a.setStyle("y",u.style.y)),l.labelLinePoints){var c=s.getTextGuideLine();c&&(c.setShape({points:l.labelLinePoints}),f=!1)}nw(a).needsUpdateLabelLine=f,a.rotation=null!=l.rotate?l.rotate*h:u.rotation,a.scaleX=u.scaleX,a.scaleY=u.scaleY;for(var v=0;v<Qb.length;v++){var d=Qb[v];a.setStyle(d,null!=l[d]?l[d]:u.style[d])}if(l.draggable){if(a.draggable=!0,a.cursor="move",s){var p=o.seriesModel;null!=o.dataIndex&&(p=o.seriesModel.getData(o.dataType).getItemModel(o.dataIndex)),a.on("drag",r(s,p.getModel("labelLine")))}}else a.off("drag"),a.cursor=u.cursor}},t.prototype.layout=function(t){var n=t.getWidth(),i=t.getHeight(),r=Ub(this._labelList),e=mt(r,(function(t){return"shiftX"===t.layoutOption.moveOverlap})),o=mt(r,(function(t){return"shiftY"===t.layoutOption.moveOverlap}));Zb(e,"x","width",0,n,undefined),qb(o,0,i),$b(mt(r,(function(t){return t.layoutOption.hideOverlap})))},t.prototype.processLabelsOverall=function(){var t=this;vt(this._chartViewList,(function(n){var i=n.__model,r=n.ignoreLabelLineUpdate,e=i.isAnimationEnabled();n.group.traverse((function(n){if(n.ignore&&!n.forceLabelAnimation)return!0;var o=!r,a=n.getTextContent();!o&&a&&(o=nw(a).needsUpdateLabelLine),o&&t._updateLabelLine(n,i),e&&t._animateLabels(n,i)}))}))},t.prototype._updateLabelLine=function(t,n){var i=t.getTextContent(),r=Bs(t),e=r.dataIndex;if(i&&null!=e){var o=n.getData(r.dataType),a=o.getItemModel(e),s={},u=o.getItemVisual(e,"style"),l=o.getVisual("drawType");s.stroke=u[l];var h=a.getModel("labelLine");Xb(t,Gb(a),s),Eb(t,h)}},t.prototype._animateLabels=function(t,n){var i=t.getTextContent(),r=t.getTextGuideLine();if(i&&(t.forceLabelAnimation||!i.ignore&&!i.invisible&&!t.disableLabelAnimation&&!Gl(t))){var e=(v=nw(i)).oldLayout,o=Bs(t),a=o.dataIndex,s={x:i.x,y:i.y,rotation:i.rotation},u=n.getData(o.dataType);if(e){i.attr(e);var l=t.prevStates;l&&(ht(l,"select")>=0&&i.attr(v.oldLayoutSelect),ht(l,"emphasis")>=0&&i.attr(v.oldLayoutEmphasis)),Yl(i,s,n,a)}else if(i.attr(s),!Rh(i).valueAnimation){var h=Ot(i.style.opacity,1);i.style.opacity=0,Xl(i,{style:{opacity:h}},n,a)}if(v.oldLayout=s,i.states.select){var f=v.oldLayoutSelect={};rw(f,s,ew),rw(f,i.states.select,ew)}if(i.states.emphasis){var c=v.oldLayoutEmphasis={};rw(c,s,ew),rw(c,i.states.emphasis,ew)}Bh(i,a,u,n,n)}if(r&&!r.ignore&&!r.invisible){var v=iw(r),d={points:r.shape.points};(e=v.oldLayout)?(r.attr({shape:e}),Yl(r,{shape:d},n)):(r.setShape(d),r.style.strokePercent=0,Xl(r,{style:{strokePercent:1}},n)),v.oldLayout=d}},t}(),aw=yo(),sw=Math.sin,uw=Math.cos,lw=Math.PI,hw=2*Math.PI,fw=180/lw,cw=function(){function t(){}return t.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},t.prototype.moveTo=function(t,n){this._add("M",t,n)},t.prototype.lineTo=function(t,n){this._add("L",t,n)},t.prototype.bezierCurveTo=function(t,n,i,r,e,o){this._add("C",t,n,i,r,e,o)},t.prototype.quadraticCurveTo=function(t,n,i,r){this._add("Q",t,n,i,r)},t.prototype.arc=function(t,n,i,r,e,o){this.ellipse(t,n,i,i,0,r,e,o)},t.prototype.ellipse=function(t,n,i,r,e,o,a,s){var u,l=a-o,h=!s,f=Math.abs(l),c=$i(f-hw)||(h?l>=hw:-l>=hw),v=l>0?l%hw:l%hw+hw;u=!!c||!$i(f)&&v>=lw==!!h;var d=t+i*uw(o),p=n+r*sw(o);this._start&&this._add("M",d,p);var m=Math.round(e*fw);if(c){var y=1/this._p,g=(h?1:-1)*(hw-y);this._add("A",i,r,m,1,+h,t+i*uw(o+g),n+r*sw(o+g)),y>.01&&this._add("A",i,r,m,0,+h,d,p)}else{var b=t+i*uw(a),w=n+r*sw(a);this._add("A",i,r,m,+u,+h,b,w)}},t.prototype.rect=function(t,n,i,r){this._add("M",t,n),this._add("l",i,0),this._add("l",0,r),this._add("l",-i,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,n,i,r,e,o,a,s,u){for(var l=[],h=this._p,f=1;f<arguments.length;f++){var c=arguments[f];if(isNaN(c))return void(this._invalid=!0);l.push(Math.round(c*h)/h)}this._d.push(t+l.join(" ")),this._start="Z"===t},t.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},t.prototype.getStr=function(){return this._str},t}(),vw=Math.round,dw=["lineCap","miterLimit","lineJoin"],pw=dt(dw,(function(t){return"stroke-"+t.toLowerCase()})),mw="http://www.w3.org/2000/svg",yw="http://www.w3.org/1999/xlink";function gw(t){return document.createElementNS(mw,t)}function bw(t,n,i,r,e){return{tag:t,attrs:i||{},children:r,text:e,key:n}}function ww(t,n){var i=(n=n||{}).newline?"\n":"";return function t(n){var r=n.children,e=n.tag;return function(t,n){var i=[];if(n)for(var r in n){var e=n[r],o=r;!1!==e&&(!0!==e&&null!=e&&(o+='="'+e+'"'),i.push(o))}return"<"+t+" "+i.join(" ")+">"}(e,n.attrs)+(n.text||"")+(r?""+i+dt(r,(function(n){return t(n)})).join(i)+i:"")+"</"+e+">"}(t)}function xw(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Mw(t,n,i,r){return bw("svg","root",{width:t,height:n,xmlns:mw,"xmlns:xlink":yw,version:"1.1",baseProfile:"full",viewBox:!!r&&"0 0 "+t+" "+n},i)}var Sw={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"};function kw(t,n,i){var r=ut({},t.shape);ut(r,n),t.buildPath(i,r);var e=new cw;return e.reset(er(t)),i.rebuildPath(e,1),e.generateStr(),e.getStr()}function Aw(t,n){var i=n.originX,r=n.originY;(i||r)&&(t["transform-origin"]=i+"px "+r+"px")}var Nw={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Cw(t,n){var i=n.zrId+"-ani-"+n.cssAnimIdx++;return n.cssAnims[i]=t,i}function Tw(t){return Mt(t)?Sw[t]?"cubic-bezier("+Sw[t]+")":Si(t)?t:"":""}function zw(t,n,i,r){var e=t.animators,o=e.length,a=[];if(t instanceof Il){if(m=function(t,n,i){var r,e,o={};if(vt(t.shape.paths,(function(t){var n=xw(i.zrId);n.animation=!0,zw(t,{},n,!0);var a=n.cssAnims,s=n.cssNodes,u=yt(a),l=u.length;if(l){var h=a[e=u[l-1]];for(var f in h){var c=h[f];o[f]=o[f]||{d:""},o[f].d+=c.d||""}for(var v in s){var d=s[v].animation;d.indexOf(e)>=0&&(r=d)}}})),r){n.d=!1;var a=Cw(o,i);return r.replace(e,a)}}(t,n,i))a.push(m);else if(!o)return}else if(!o)return;for(var s={},u=0;u<o;u++){var l=e[u],h=[l.getMaxTime()/1e3+"s"],f=Tw(l.getClip().easing),c=l.getDelay();h.push(f||"linear"),c&&h.push(c/1e3+"s"),l.getLoop()&&h.push("infinite");var v=h.join(" ");s[v]=s[v]||[v,[]],s[v][1].push(l)}function d(e){var o,a=e[1],s=a.length,u={},l={},h={};function f(t,n,i){for(var r=t.getTracks(),e=t.getMaxTime(),o=0;o<r.length;o++){var a=r[o];if(a.needsAnimate()){var s=a.keyframes,u=a.propName;if(i&&(u=i(u)),u)for(var l=0;l<s.length;l++){var h=s[l],f=Math.round(h.time/e*100)+"%",c=Tw(h.easing),v=h.rawValue;(Mt(v)||kt(v))&&(n[f]=n[f]||{},n[f][u]=h.rawValue,c&&(n[f]["animation-timing-function"]=c))}}}}for(var c=0;c<s;c++)(M=(x=a[c]).targetName)?"shape"===M&&f(x,l):!r&&f(x,u);for(var v in u){var d={};re(d,t),ut(d,u[v]);var p=or(d),m=u[v]["animation-timing-function"];h[v]=p?{transform:p}:{},Aw(h[v],d),m&&(h[v]["animation-timing-function"]=m)}var y=!0;for(var v in l){h[v]=h[v]||{};var g=!o;m=l[v]["animation-timing-function"],g&&(o=new ja);var b=o.len();o.reset(),h[v].d=kw(t,l[v],o);var w=o.len();if(!g&&b!==w){y=!1;break}m&&(h[v]["animation-timing-function"]=m)}if(!y)for(var v in h)delete h[v].d;if(!r)for(c=0;c<s;c++){var x,M;"style"===(M=(x=a[c]).targetName)&&f(x,h,(function(t){return Nw[t]}))}var S,k=yt(h),A=!0;for(c=1;c<k.length;c++){var N=k[c-1];if(h[N]["transform-origin"]!==h[k[c]]["transform-origin"]){A=!1;break}S=h[N]["transform-origin"]}if(A&&S){for(var v in h)h[v]["transform-origin"]&&delete h[v]["transform-origin"];n["transform-origin"]=S}if(mt(k,(function(t){return yt(h[t]).length>0})).length)return Cw(h,i)+" "+e[0]+" both"}for(var p in s){var m;(m=d(s[p]))&&a.push(m)}if(a.length){var y=i.zrId+"-cls-"+i.cssClassIdx++;i.cssNodes["."+y]={animation:a.join(",")},n.class=y}}var Iw=Math.round;function Lw(t){return t&&Mt(t.src)}function Ow(t){return t&&xt(t.toDataURL)}function Dw(t,n,i,r){!function(t,n,i){var r=null==n.opacity?1:n.opacity;if(i instanceof vs)t("opacity",r);else{if(function(t){var n=t.fill;return null!=n&&"none"!==n}(n)){var e=qi(n.fill);t("fill",e.color);var o=null!=n.fillOpacity?n.fillOpacity*e.opacity*r:e.opacity*r;o<1&&t("fill-opacity",o)}else t("fill","none");if(function(t){var n=t.stroke;return null!=n&&"none"!==n}(n)){var a=qi(n.stroke);t("stroke",a.color);var s=n.strokeNoScale?i.getLineScale():1,u=s?(n.lineWidth||0)/s:0,l=null!=n.strokeOpacity?n.strokeOpacity*a.opacity*r:a.opacity*r,h=n.strokeFirst;if(1!==u&&t("stroke-width",u),h&&t("paint-order",h?"stroke":"fill"),l<1&&t("stroke-opacity",l),n.lineDash){var f=Yp(i),c=f[0],v=f[1];c&&(v=vw(v||0),t("stroke-dasharray",c.join(",")),v&&t("stroke-dashoffset",v))}for(var d=0;d<dw.length;d++){var p=dw[d];if(n[p]!==os[p]){var m=n[p]||os[p];m&&t(pw[d],m)}}}}}((function(e,o){var a="fill"===e||"stroke"===e;a&&function(t){return t&&("linear"===t.type||"radial"===t.type)}(o)?function(t,n,i,r){var e,o=t[i],a={gradientUnits:o.global?"userSpaceOnUse":"objectBoundingBox"};if(nr(o))e="linearGradient",a.x1=o.x,a.y1=o.y,a.x2=o.x2,a.y2=o.y2;else{if(!ir(o))return;e="radialGradient",a.cx=Ot(o.x,.5),a.cy=Ot(o.y,.5),a.r=Ot(o.r,.5)}for(var s=o.colorStops,u=[],l=0,h=s.length;l<h;++l){var f=100*Ji(s[l].offset)+"%",c=qi(s[l].color),v=c.opacity,d={offset:f};d["stop-color"]=c.color,v<1&&(d["stop-opacity"]=v),u.push(bw("stop",l+"",d))}var p=ww(bw(e,"",a,u)),m=r.gradientCache,y=m[p];y||(y=r.zrId+"-g"+r.gradientIdx++,m[p]=y,a.id=y,r.defs[y]=bw(e,y,a,u)),n[i]=rr(y)}(n,t,e,r):a&&function(t){return tr(t)||function(t){return t&&!!t.svgElement}(t)}(o)?function(t,n,i,r){var e,o=t.style[i],a={patternUnits:"userSpaceOnUse"};if(tr(o)){var s=o.imageWidth,u=o.imageHeight,l=void 0,h=o.image;if(Mt(h)?l=h:Lw(h)?l=h.src:Ow(h)&&(l=h.toDataURL()),"undefined"==typeof Image){var f="Image width/height must been given explictly in svg-ssr renderer.";Bt(s,f),Bt(u,f)}else if(null==s||null==u){var c=function(t,n){if(t){var i=t.elm,r=t.attrs.width=s||n.width,e=t.attrs.height=u||n.height;i&&(i.setAttribute("width",r),i.setAttribute("height",e))}},v=Wo(l,null,t,(function(t){c(d,t),c(e,t)}));v&&v.width&&v.height&&(s=s||v.width,u=u||v.height)}e=bw("image","img",{href:l,width:s,height:u}),a.width=s,a.height=u}else o.svgElement&&(e=ot(o.svgElement),a.width=o.svgWidth,a.height=o.svgHeight);if(e){a.patternTransform=or(o);var d=bw("pattern","",a,[e]),p=ww(d),m=r.patternCache,y=m[p];y||(y=r.zrId+"-p"+r.patternIdx++,m[p]=y,a.id=y,d=r.defs[y]=bw("pattern",y,a,[e])),n[i]=rr(y)}}(i,t,e,r):t[e]=o}),n,i),function(t,n,i){var r=t.style;if(function(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}(r)){var e=function(t){var n=t.style,i=t.getGlobalScale();return[n.shadowColor,(n.shadowBlur||0).toFixed(2),(n.shadowOffsetX||0).toFixed(2),(n.shadowOffsetY||0).toFixed(2),i[0],i[1]].join(",")}(t),o=i.shadowCache,a=o[e];if(!a){var s=t.getGlobalScale(),u=s[0],l=s[1];if(!u||!l)return;var h=r.shadowOffsetX||0,f=r.shadowOffsetY||0,c=r.shadowBlur,v=qi(r.shadowColor),d=v.opacity,p=v.color,m=c/2/u+" "+c/2/l;a=i.zrId+"-s"+i.shadowIdx++,i.defs[a]=bw("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[bw("feDropShadow","",{dx:h/u,dy:f/l,stdDeviation:m,"flood-color":p,"flood-opacity":d})]),o[e]=a}n.filter=rr(a)}}(i,t,r)}function Rw(t){return $i(t[0]-1)&&$i(t[1])&&$i(t[2])&&$i(t[3]-1)}function _w(t,n,i){if(n&&(!function(t){return $i(t[4])&&$i(t[5])}(n)||!Rw(n))){var r=i?10:1e4;t.transform=Rw(n)?"translate("+Iw(n[4]*r)/r+" "+Iw(n[5]*r)/r+")":function(t){return"matrix("+Ki(t[0])+","+Ki(t[1])+","+Ki(t[2])+","+Ki(t[3])+","+Ji(t[4])+","+Ji(t[5])+")"}(n)}}function Bw(t,n,i){for(var r=t.points,e=[],o=0;o<r.length;o++)e.push(Iw(r[o][0]*i)/i),e.push(Iw(r[o][1]*i)/i);n.points=e.join(" ")}function Fw(t){return!t.smooth}var Ew,Pw,Ww={circle:[(Ew=["cx","cy","r"],Pw=dt(Ew,(function(t){return"string"==typeof t?[t,t]:t})),function(t,n,i){for(var r=0;r<Pw.length;r++){var e=Pw[r],o=t[e[0]];null!=o&&(n[e[1]]=Iw(o*i)/i)}})],polyline:[Bw,Fw],polygon:[Bw,Fw]};function Vw(t,n){var i=t.style,r=t.shape,e=Ww[t.type],o={},a=n.animation,s="path",u=t.style.strokePercent,l=n.compress&&er(t)||4;if(!e||n.willUpdate||e[1]&&!e[1](r)||a&&function(t){for(var n=t.animators,i=0;i<n.length;i++)if("shape"===n[i].targetName)return!0;return!1}(t)||u<1){t.path||t.createPathProxy();var h=t.path;t.shapeChanged()&&(h.beginPath(),t.buildPath(h,t.shape),t.pathUpdated());var f=h.getVersion(),c=t,v=c.__svgPathBuilder;c.__svgPathVersion===f&&v&&u===c.__svgPathStrokePercent||(v||(v=c.__svgPathBuilder=new cw),v.reset(l),h.rebuildPath(v,u),v.generateStr(),c.__svgPathVersion=f,c.__svgPathStrokePercent=u),o.d=v.getStr()}else{s=t.type;var d=Math.pow(10,l);e[0](r,o,d)}return _w(o,t.transform),Dw(o,i,t,n),n.animation&&zw(t,o,n),bw(s,t.id+"",o)}function jw(t,n){return t instanceof us?Vw(t,n):t instanceof vs?function(t,n){var i=t.style,r=i.image;if(r&&!Mt(r)&&(Lw(r)?r=r.src:Ow(r)&&(r=r.toDataURL())),r){var e=i.x||0,o=i.y||0,a={href:r,width:i.width,height:i.height};return e&&(a.x=e),o&&(a.y=o),_w(a,t.transform),Dw(a,i,t,n),n.animation&&zw(t,a,n),bw("image",t.id+"",a)}}(t,n):t instanceof hs?function(t,n){var i=t.style,r=i.text;if(null!=r&&(r+=""),r&&!isNaN(i.x)&&!isNaN(i.y)){var e=i.font||H,o=i.x||0,a=function(t,n,i){return"top"===i?t+=n/2:"bottom"===i&&(t-=n/2),t}(i.y||0,we(e),i.textBaseline),s={"dominant-baseline":"central","text-anchor":Qi[i.textAlign]||i.textAlign};if(zs(i)){var u="",l=i.fontStyle,h=Cs(i.fontSize);if(!parseFloat(h))return;var f=i.fontWeight;u+="font-size:"+h+";font-family:"+(i.fontFamily||"sans-serif")+";",l&&"normal"!==l&&(u+="font-style:"+l+";"),f&&"normal"!==f&&(u+="font-weight:"+f+";"),s.style=u}else s.style="font: "+e;return r.match(/\s/)&&(s["xml:space"]="preserve"),o&&(s.x=o),a&&(s.y=a),_w(s,t.transform),Dw(s,i,t,n),n.animation&&zw(t,s,n),bw("text",t.id+"",s,void 0,r)}}(t,n):void 0}function Hw(t,n,i){var r=i.clipPathCache,e=i.defs,o=r[t.id];if(!o){var a={id:o=i.zrId+"-c"+i.clipPathIdx++};r[t.id]=o,e[o]=bw("clipPath",o,a,[Vw(t,i)])}n["clip-path"]=rr(o)}function Yw(t){return document.createTextNode(t)}function Xw(t,n,i){t.insertBefore(n,i)}function Gw(t,n){t.removeChild(n)}function Uw(t,n){t.appendChild(n)}function Zw(t){return t.parentNode}function qw(t){return t.nextSibling}function $w(t,n){t.textContent=n}var Kw=bw("","");function Jw(t){return void 0===t}function Qw(t){return void 0!==t}function tx(t,n,i){for(var r={},e=n;e<=i;++e){var o=t[e].key;void 0!==o&&(r[o]=e)}return r}function nx(t,n){return t.tag===n.tag&&t.key===n.key}function ix(t){var n,i=t.children,r=t.tag;if(Qw(r)){var e=t.elm=gw(r);if(ox(Kw,t),wt(i))for(n=0;n<i.length;++n){var o=i[n];null!=o&&Uw(e,ix(o))}else Qw(t.text)&&!At(t.text)&&Uw(e,Yw(t.text))}else t.elm=Yw(t.text);return t.elm}function rx(t,n,i,r,e){for(;r<=e;++r){var o=i[r];null!=o&&Xw(t,ix(o),n)}}function ex(t,n,i,r){for(;i<=r;++i){var e=n[i];null!=e&&(Qw(e.tag)?Gw(Zw(e.elm),e.elm):Gw(t,e.elm))}}function ox(t,n){var i,r=n.elm,e=t&&t.attrs||{},o=n.attrs||{};if(e!==o){for(i in o){var a=o[i];e[i]!==a&&(!0===a?r.setAttribute(i,""):!1===a?r.removeAttribute(i):120!==i.charCodeAt(0)?r.setAttribute(i,a):"xmlns:xlink"===i||"xmlns"===i?r.setAttributeNS("http://www.w3.org/2000/xmlns/",i,a):58===i.charCodeAt(3)?r.setAttributeNS("http://www.w3.org/XML/1998/namespace",i,a):58===i.charCodeAt(5)?r.setAttributeNS(yw,i,a):r.setAttribute(i,a))}for(i in e)i in o||r.removeAttribute(i)}}function ax(t,n){var i=n.elm=t.elm,r=t.children,e=n.children;t!==n&&(ox(t,n),Jw(n.text)?Qw(r)&&Qw(e)?r!==e&&function(t,n,i){for(var r,e,o,a=0,s=0,u=n.length-1,l=n[0],h=n[u],f=i.length-1,c=i[0],v=i[f];a<=u&&s<=f;)null==l?l=n[++a]:null==h?h=n[--u]:null==c?c=i[++s]:null==v?v=i[--f]:nx(l,c)?(ax(l,c),l=n[++a],c=i[++s]):nx(h,v)?(ax(h,v),h=n[--u],v=i[--f]):nx(l,v)?(ax(l,v),Xw(t,l.elm,qw(h.elm)),l=n[++a],v=i[--f]):nx(h,c)?(ax(h,c),Xw(t,h.elm,l.elm),h=n[--u],c=i[++s]):(Jw(r)&&(r=tx(n,a,u)),Jw(e=r[c.key])||(o=n[e]).tag!==c.tag?Xw(t,ix(c),l.elm):(ax(o,c),n[e]=void 0,Xw(t,o.elm,l.elm)),c=i[++s]);(a<=u||s<=f)&&(a>u?rx(t,null==i[f+1]?null:i[f+1].elm,i,s,f):ex(t,n,a,u))}(i,r,e):Qw(e)?(Qw(t.text)&&$w(i,""),rx(i,null,e,0,e.length-1)):Qw(r)?ex(i,r,0,r.length-1):Qw(t.text)&&$w(i,""):t.text!==n.text&&(Qw(r)&&ex(i,r,0,r.length-1),$w(i,n.text)))}var sx=0,ux=function(){function t(t,n,i){if(this.type="svg",this.refreshHover=function(){},this.configLayer=function(){},this.storage=n,this._opts=i=ut({},i),this.root=t,this._id="zr"+sx++,this._oldVNode=Mw(i.width,i.height),t&&!i.ssr){var r=this._viewport=document.createElement("div");r.style.cssText="position:relative;overflow:hidden";var e=this._svgDom=this._oldVNode.elm=gw("svg");ox(null,this._oldVNode),r.appendChild(e),t.appendChild(r)}this.resize(i.width,i.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,n){if(nx(t,n))ax(t,n);else{var i=t.elm,r=Zw(i);ix(n),null!==r&&(Xw(r,n.elm,qw(i)),ex(r,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return jw(t,xw(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var n=this.storage.getDisplayList(!0),i=this._backgroundColor,r=this._width,e=this._height,o=xw(this._id);o.animation=t.animation,o.willUpdate=t.willUpdate,o.compress=t.compress;var a=[];if(i&&"none"!==i){var s=qi(i);this._bgVNode=bw("rect","bg",{width:r,height:e,x:"0",y:"0",id:"0",fill:s.color,"fill-opacity":s.opacity}),a.push(this._bgVNode)}else this._bgVNode=null;var u=t.compress?null:this._mainVNode=bw("g","main",{},[]);this._paintList(n,o,u?u.children:a),u&&a.push(u);var l=dt(yt(o.defs),(function(t){return o.defs[t]}));if(l.length&&a.push(bw("defs","defs",{},l)),t.animation){var h=function(t,n,i){var r=(i=i||{}).newline?"\n":"",e=" {"+r,o=r+"}",a=dt(yt(t),(function(n){return n+e+dt(yt(t[n]),(function(i){return i+":"+t[n][i]+";"})).join(r)+o})).join(r),s=dt(yt(n),(function(t){return"@keyframes "+t+e+dt(yt(n[t]),(function(i){return i+e+dt(yt(n[t][i]),(function(r){var e=n[t][i][r];return"d"===r&&(e='path("'+e+'")'),r+":"+e+";"})).join(r)+o})).join(r)+o})).join(r);return a||s?["<![CDATA[",a,s,"]]>"].join(r):""}(o.cssNodes,o.cssAnims,{newline:!0});if(h){var f=bw("style","stl",{},[],h);a.push(f)}}return Mw(r,e,a,t.useViewBox)},t.prototype.renderToString=function(t){return ww(this.renderToVNode({animation:Ot((t=t||{}).cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:Ot(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t;var n=this._bgVNode;if(n&&n.elm){var i=qi(t),r=i.opacity;n.elm.setAttribute("fill",i.color),r<1&&n.elm.setAttribute("fill-opacity",r)}},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,n,i){for(var r,e,o=t.length,a=[],s=0,u=0,l=0;l<o;l++){var h=t[l];if(!h.invisible){var f=h.__clipPaths,c=f&&f.length||0,v=e&&e.length||0,d=void 0;for(d=Math.max(c-1,v-1);d>=0&&(!f||!e||f[d]!==e[d]);d--);for(var p=v-1;p>d;p--)r=a[--s-1];for(var m=d+1;m<c;m++){var y={};Hw(f[m],y,n);var g=bw("g","clip-g-"+u++,y,[]);(r?r.children:i).push(g),a[s++]=g,r=g}e=f;var b=jw(h,n);b&&(r?r.children:i).push(b)}}},t.prototype.resize=function(t,n){var i=this._opts,r=this.root,e=this._viewport;if(null!=t&&(i.width=t),null!=n&&(i.height=n),r&&e&&(e.style.display="none",t=Hp(r,0,i),n=Hp(r,1,i),e.style.display=""),this._width!==t||this._height!==n){if(this._width=t,this._height=n,e){var o=e.style;o.width=t+"px",o.height=n+"px"}var a=this._svgDom;a&&(a.setAttribute("width",t),a.setAttribute("height",n))}},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},t.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},t.prototype.toDataURL=function(t){var n=encodeURIComponent(this.renderToString()),i="data:image/svg+xml;";return t?(n=ar(n))&&i+"base64,"+n:i+"charset=UTF-8,"+n},t}();function lx(t,n,i){var r=X.createCanvas(),e=n.getWidth(),o=n.getHeight(),a=r.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=e+"px",a.height=o+"px",r.setAttribute("data-zr-dom-id",t)),r.width=e*i,r.height=o*i,r}var hx=function(t){function n(n,i,r){var e,o=t.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,r=r||Vr,"string"==typeof n?e=lx(n,i,r):At(n)&&(n=(e=n).id),o.id=n,o.dom=e;var a=e.style;return a&&(Yt(e),e.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),o.painter=i,o.dpr=r,o}return qt(n,t),n.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},n.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},n.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},n.prototype.setUnpainted=function(){this.__firstTimePaint=!0},n.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=lx("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},n.prototype.createRepaintRects=function(t,n,i,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var e,o=[],a=this.maxRepaintRectCount,s=!1,u=new ve(0,0,0,0);function l(t){if(t.isFinite()&&!t.isZero())if(0===o.length)(n=new ve(0,0,0,0)).copy(t),o.push(n);else{for(var n,i=!1,r=1/0,e=0,l=0;l<o.length;++l){var h=o[l];if(h.intersect(t)){var f=new ve(0,0,0,0);f.copy(h),f.union(t),o[l]=f,i=!0;break}if(s){u.copy(t),u.union(h);var c=u.width*u.height-t.width*t.height-h.width*h.height;c<r&&(r=c,e=l)}}s&&(o[e].union(t),i=!0),i||((n=new ve(0,0,0,0)).copy(t),o.push(n)),s||(s=o.length>=a)}}for(var h=this.__startIndex;h<this.__endIndex;++h)if(v=t[h]){var f=v.shouldBePainted(i,r,!0,!0);(d=v.__isRendered&&(1&v.__dirty||!f)?v.getPrevPaintRect():null)&&l(d);var c=f&&(1&v.__dirty||!v.__isRendered)?v.getPaintRect():null;c&&l(c)}for(h=this.__prevStartIndex;h<this.__prevEndIndex;++h){var v,d;f=(v=n[h]).shouldBePainted(i,r,!0,!0),!v||f&&v.__zr||!v.__isRendered||(d=v.getPrevPaintRect())&&l(d)}do{for(e=!1,h=0;h<o.length;)if(o[h].isZero())o.splice(h,1);else{for(var p=h+1;p<o.length;)o[h].intersect(o[p])?(e=!0,o[h].union(o[p]),o.splice(p,1)):p++;h++}}while(e);return this._paintRects=o,o},n.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},n.prototype.resize=function(t,n){var i=this.dpr,r=this.dom,e=r.style,o=this.domBack;e&&(e.width=t+"px",e.height=n+"px"),r.width=t*i,r.height=n*i,o&&(o.width=t*i,o.height=n*i,1!==i&&this.ctxBack.scale(i,i))},n.prototype.clear=function(t,n,i){var r=this.dom,e=this.ctx,o=r.width,a=r.height;n=n||this.clearColor;var s=this.motionBlur&&!t,u=this.lastFrameAlpha,l=this.dpr,h=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,o/l,a/l));var f=this.domBack;function c(t,i,r,o){if(e.clearRect(t,i,r,o),n&&"transparent"!==n){var a=void 0;zt(n)?(a=n.__canvasGradient||Vp(e,n,{x:0,y:0,width:r,height:o}),n.__canvasGradient=a):null!=n.image&&(a=Kp(e,n,{dirty:function(){h.setUnpainted(),h.__painter.refresh()}})),e.save(),e.fillStyle=a||n,e.fillRect(t,i,r,o),e.restore()}s&&(e.save(),e.globalAlpha=u,e.drawImage(f,t,i,r,o),e.restore())}!i||s?c(0,0,o,a):i.length&&vt(i,(function(t){c(t.x*l,t.y*l,t.width*l,t.height*l)}))},n}(mn),fx=function(){function t(t,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var r=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=ut({},i||{}),this.dpr=i.devicePixelRatio||Vr,this._singleCanvas=r,this.root=t,t.style&&(Yt(t),t.innerHTML=""),this.storage=n;var e=this._zlevelList;this._prevDisplayList=[];var o=this._layers;if(r){var a=t,s=a.width,u=a.height;null!=i.width&&(s=i.width),null!=i.height&&(u=i.height),this.dpr=i.devicePixelRatio||1,a.width=s*this.dpr,a.height=u*this.dpr,this._width=s,this._height=u;var l=new hx(a,this,this.dpr);l.__builtin__=!0,l.initContext(),o[314159]=l,l.zlevel=314159,e.push(314159),this._domRoot=t}else{this._width=Hp(t,0,i),this._height=Hp(t,1,i);var h=this._domRoot=function(t,n){var i=document.createElement("div");return i.style.cssText=["position:relative","width:"+t+"px","height:"+n+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}(this._width,this._height);t.appendChild(h)}}return t.prototype.getType=function(){return"canvas"},t.prototype.isSingleCanvas=function(){return this._singleCanvas},t.prototype.getViewportRoot=function(){return this._domRoot},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.refresh=function(t){var n=this.storage.getDisplayList(!0),i=this._prevDisplayList,r=this._zlevelList;this._redrawId=Math.random(),this._paintList(n,i,t,this._redrawId);for(var e=0;e<r.length;e++){var o=this._layers[r[e]];!o.__builtin__&&o.refresh&&o.refresh(0===e?this._backgroundColor:null)}return this._opts.useDirtyRect&&(this._prevDisplayList=n.slice()),this},t.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},t.prototype._paintHoverList=function(t){var n=t.length,i=this._hoverlayer;if(i&&i.clear(),n){for(var r,e={inHover:!0,viewWidth:this._width,viewHeight:this._height},o=0;o<n;o++){var a=t[o];a.__inHover&&(i||(i=this._hoverlayer=this.getLayer(1e5)),r||(r=i.ctx).save(),am(r,a,e,o===n-1))}r&&r.restore()}},t.prototype.getHoverLayer=function(){return this.getLayer(1e5)},t.prototype.paintOne=function(t,n){om(t,n)},t.prototype._paintList=function(t,n,i,r){if(this._redrawId===r){i=i||!1,this._updateLayerStatus(t);var e=this._doPaintList(t,n,i),o=e.finished,a=e.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(t),o)this.eachLayer((function(t){t.afterBrush&&t.afterBrush()}));else{var s=this;Jn((function(){s._paintList(t,n,i,r)}))}}},t.prototype._compositeManually=function(){var t=this.getLayer(314159).ctx,n=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,n,i),this.eachBuiltinLayer((function(r){r.virtual&&t.drawImage(r.dom,0,0,n,i)}))},t.prototype._doPaintList=function(t,n,i){for(var r=this,e=[],o=this._opts.useDirtyRect,a=0;a<this._zlevelList.length;a++){var s=this._layers[this._zlevelList[a]];s.__builtin__&&s!==this._hoverlayer&&(s.__dirty||i)&&e.push(s)}for(var u=!0,l=!1,h=function(a){var s,h=e[a],c=h.ctx,v=o&&h.createRepaintRects(t,n,f._width,f._height),d=i?h.__startIndex:h.__drawIndex,p=!i&&h.incremental&&Date.now,m=p&&Date.now(),y=h.zlevel===f._zlevelList[0]?f._backgroundColor:null;if(h.__startIndex===h.__endIndex)h.clear(!1,y,v);else if(d===h.__startIndex){var g=t[d];g.incremental&&g.notClear&&!i||h.clear(!1,y,v)}-1===d&&(console.error("For some unknown reason. drawIndex is -1"),d=h.__startIndex);var b=function(n){var i={inHover:!1,allClipped:!1,prevEl:null,viewWidth:r._width,viewHeight:r._height};for(s=d;s<h.__endIndex;s++){var e=t[s];if(e.__inHover&&(l=!0),r._doPaintEl(e,h,o,n,i,s===h.__endIndex-1),p&&Date.now()-m>15)break}i.prevElClipPaths&&c.restore()};if(v)if(0===v.length)s=h.__endIndex;else for(var w=f.dpr,x=0;x<v.length;++x){var M=v[x];c.save(),c.beginPath(),c.rect(M.x*w,M.y*w,M.width*w,M.height*w),c.clip(),b(M),c.restore()}else c.save(),b(),c.restore();h.__drawIndex=s,h.__drawIndex<h.__endIndex&&(u=!1)},f=this,c=0;c<e.length;c++)h(c);return W.wxa&&vt(this._layers,(function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()})),{finished:u,needsRefreshHover:l}},t.prototype._doPaintEl=function(t,n,i,r,e,o){var a=n.ctx;if(i){var s=t.getPaintRect();(!r||s&&s.intersect(r))&&(am(a,t,e,o),t.setPrevPaintRect(s))}else am(a,t,e,o)},t.prototype.getLayer=function(t,n){this._singleCanvas&&!this._needsManuallyCompositing&&(t=314159);var i=this._layers[t];return i||((i=new hx("zr_"+t,this,this.dpr)).zlevel=t,i.__builtin__=!0,this._layerConfig[t]?at(i,this._layerConfig[t],!0):this._layerConfig[t-.01]&&at(i,this._layerConfig[t-.01],!0),n&&(i.virtual=n),this.insertLayer(t,i),i.initContext()),i},t.prototype.insertLayer=function(t,n){var i=this._layers,r=this._zlevelList,e=r.length,o=this._domRoot,a=null,s=-1;if(!i[t]&&function(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}(n)){if(e>0&&t>r[0]){for(s=0;s<e-1&&!(r[s]<t&&r[s+1]>t);s++);a=i[r[s]]}if(r.splice(s+1,0,t),i[t]=n,!n.virtual)if(a){var u=a.dom;u.nextSibling?o.insertBefore(n.dom,u.nextSibling):o.appendChild(n.dom)}else o.firstChild?o.insertBefore(n.dom,o.firstChild):o.appendChild(n.dom);n.__painter=this}},t.prototype.eachLayer=function(t,n){for(var i=this._zlevelList,r=0;r<i.length;r++){var e=i[r];t.call(n,this._layers[e],e)}},t.prototype.eachBuiltinLayer=function(t,n){for(var i=this._zlevelList,r=0;r<i.length;r++){var e=i[r],o=this._layers[e];o.__builtin__&&t.call(n,o,e)}},t.prototype.eachOtherLayer=function(t,n){for(var i=this._zlevelList,r=0;r<i.length;r++){var e=i[r],o=this._layers[e];o.__builtin__||t.call(n,o,e)}},t.prototype.getLayers=function(){return this._layers},t.prototype._updateLayerStatus=function(t){function n(t){o&&(o.__endIndex!==t&&(o.__dirty=!0),o.__endIndex=t)}if(this.eachBuiltinLayer((function(t){t.__dirty=t.__used=!1})),this._singleCanvas)for(var i=1;i<t.length;i++)if((s=t[i]).zlevel!==t[i-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}var r,e,o=null,a=0;for(e=0;e<t.length;e++){var s,u=(s=t[e]).zlevel,l=void 0;r!==u&&(r=u,a=0),s.incremental?((l=this.getLayer(u+.001,this._needsManuallyCompositing)).incremental=!0,a=1):l=this.getLayer(u+(a>0?.01:0),this._needsManuallyCompositing),l.__builtin__||et("ZLevel "+u+" has been used by unkown layer "+l.id),l!==o&&(l.__used=!0,l.__startIndex!==e&&(l.__dirty=!0),l.__startIndex=e,l.__drawIndex=l.incremental?-1:e,n(e),o=l),1&s.__dirty&&!s.__inHover&&(l.__dirty=!0,l.incremental&&l.__drawIndex<0&&(l.__drawIndex=e))}n(e),this.eachBuiltinLayer((function(t){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,vt(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,n){if(n){var i=this._layerConfig;i[t]?at(i[t],n,!0):i[t]=n;for(var r=0;r<this._zlevelList.length;r++){var e=this._zlevelList[r];e!==t&&e!==t+.01||at(this._layers[e],i[t],!0)}}},t.prototype.delLayer=function(t){var n=this._layers,i=this._zlevelList,r=n[t];r&&(r.dom.parentNode.removeChild(r.dom),delete n[t],i.splice(ht(i,t),1))},t.prototype.resize=function(t,n){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var r=this._opts,e=this.root;if(null!=t&&(r.width=t),null!=n&&(r.height=n),t=Hp(e,0,r),n=Hp(e,1,r),i.style.display="",this._width!==t||n!==this._height){for(var o in i.style.width=t+"px",i.style.height=n+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,n);this.refresh(!0)}this._width=t,this._height=n}else{if(null==t||null==n)return;this._width=t,this._height=n,this.getLayer(314159).resize(t,n)}return this},t.prototype.clearLayer=function(t){var n=this._layers[t];n&&n.clear()},t.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},t.prototype.getRenderedCanvas=function(t){if(this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var n=new hx("image",this,(t=t||{}).pixelRatio||this.dpr);n.initContext(),n.clear(!1,t.backgroundColor||this._backgroundColor);var i=n.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var r=n.dom.width,e=n.dom.height;this.eachLayer((function(t){t.__builtin__?i.drawImage(t.dom,0,0,r,e):t.renderToCanvas&&(i.save(),t.renderToCanvas(i),i.restore())}))}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,u=a.length;s<u;s++)am(i,a[s],o,s===u-1);return n.dom},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t}(),cx=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.hasSymbolVisual=!0,i}return E(n,t),n.prototype.getInitialData=function(){return qy(null,this,{useEncodeDefaulter:!0})},n.prototype.getLegendIcon=function(t){var n=new Oe,i=Ep("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);n.add(i),i.setStyle(t.lineStyle);var r=this.getData().getVisual("symbol"),e=this.getData().getVisual("symbolRotate"),o="none"===r?"circle":r,a=.8*t.itemHeight,s=Ep(o,(t.itemWidth-a)/2,(t.itemHeight-a)/2,a,a,t.itemStyle.fill);return n.add(s),s.setStyle(t.itemStyle),s.rotation=("inherit"===t.iconRotate?e:t.iconRotate||0)*Math.PI/180,s.setOrigin([t.itemWidth/2,t.itemHeight/2]),o.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),n},n.type="series.line",n.dependencies=["grid","polar"],n.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},n}(gd);function vx(t,n){var i=t.mapDimensionsAll("defaultedLabel"),r=i.length;if(1===r){var e=gv(t,n,i[0]);return null!=e?e+"":null}if(r){for(var o=[],a=0;a<i.length;a++)o.push(gv(t,n,i[a]));return o.join(" ")}}function dx(t,n){var i=t.mapDimensionsAll("defaultedLabel");if(!wt(n))return n+"";for(var r=[],e=0;e<i.length;e++){var o=t.getDimensionIndex(i[e]);o>=0&&r.push(n[o])}return r.join(" ")}var px=function(t){function n(n,i,r,e){var o=t.call(this)||this;return o.updateData(n,i,r,e),o}return E(n,t),n.prototype._createSymbol=function(t,n,i,r,e){this.removeAll();var o=Ep(t,-1,-1,2,2,null,e);o.attr({z2:100,culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=mx,this._symbolType=t,this.add(o)},n.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},n.prototype.getSymbolType=function(){return this._symbolType},n.prototype.getSymbolPath=function(){return this.childAt(0)},n.prototype.highlight=function(){su(this.childAt(0))},n.prototype.downplay=function(){uu(this.childAt(0))},n.prototype.setZ=function(t,n){var i=this.childAt(0);i.zlevel=t,i.z=n},n.prototype.setDraggable=function(t){var n=this.childAt(0);n.draggable=t,n.cursor=t?"move":n.cursor},n.prototype.updateData=function(t,i,r,e){this.silent=!1;var o=t.getItemVisual(i,"symbol")||"circle",a=t.hostModel,s=n.getSymbolSize(t,i),u=o!==this._symbolType,l=e&&e.disableAnimation;if(u){var h=t.getItemVisual(i,"symbolKeepAspect");this._createSymbol(o,t,i,s,h)}else{(c=this.childAt(0)).silent=!1;var f={scaleX:s[0]/2,scaleY:s[1]/2};l?c.attr(f):Yl(c,f,a,i),$l(c)}if(this._updateCommon(t,i,s,r,e),u){var c=this.childAt(0);l||(f={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:c.style.opacity}},c.scaleX=c.scaleY=0,c.style.opacity=0,Xl(c,f,a,i))}l&&this.childAt(0).stopAnimation("leave")},n.prototype._updateCommon=function(t,n,i,r,e){var o,a,s,u,l,h,f,c,v,d=this.childAt(0),p=t.hostModel;if(r&&(o=r.emphasisItemStyle,a=r.blurItemStyle,s=r.selectItemStyle,u=r.focus,l=r.blurScope,f=r.labelStatesModels,c=r.hoverScale,v=r.cursorStyle,h=r.emphasisDisabled),!r||t.hasItemOption){var m=r&&r.itemModel?r.itemModel:t.getItemModel(n),y=m.getModel("emphasis");o=y.getModel("itemStyle").getItemStyle(),s=m.getModel(["select","itemStyle"]).getItemStyle(),a=m.getModel(["blur","itemStyle"]).getItemStyle(),u=y.get("focus"),l=y.get("blurScope"),h=y.get("disabled"),f=Nh(m),c=y.getShallow("scale"),v=m.getShallow("cursor")}var g=t.getItemVisual(n,"symbolRotate");d.attr("rotation",(g||0)*Math.PI/180||0);var b=Wp(t.getItemVisual(n,"symbolOffset"),i);b&&(d.x=b[0],d.y=b[1]),v&&d.attr("cursor",v);var w=t.getItemVisual(n,"style"),x=w.fill;if(d instanceof vs){var M=d.style;d.useStyle(ut({image:M.image,x:M.x,y:M.y,width:M.width,height:M.height},w))}else d.useStyle(d.__isEmptyBrush?ut({},w):w),d.style.decal=null,d.setColor(x,e&&e.symbolInnerColor),d.style.strokeNoScale=!0;var S=t.getItemVisual(n,"liftZ"),k=this._z2;null!=S?null==k&&(this._z2=d.z2,d.z2+=S):null!=k&&(d.z2=k,this._z2=null);var A=e&&e.useNameLabel;Ah(d,f,{labelFetcher:p,labelDataIndex:n,defaultText:function(n){return A?t.getName(n):vx(t,n)},inheritColor:x,defaultOpacity:w.opacity}),this._sizeX=i[0]/2,this._sizeY=i[1]/2;var N=d.ensureState("emphasis");if(N.style=o,d.ensureState("select").style=s,d.ensureState("blur").style=a,c){var C=Math.max(kt(c)?c:1.1,3/this._sizeY);N.scaleX=this._sizeX*C,N.scaleY=this._sizeY*C}this.setSymbolScale(1),xu(this,u,l,h)},n.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},n.prototype.fadeOut=function(t,n,i){var r=this.childAt(0),e=Bs(this).dataIndex,o=i&&i.animation;if(this.silent=r.silent=!0,i&&i.fadeLabel){var a=r.getTextContent();a&&Ul(a,{style:{opacity:0}},n,{dataIndex:e,removeOpt:o,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Ul(r,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:e,cb:t,removeOpt:o})},n.getSymbolSize=function(t,n){return Pp(t.getItemVisual(n,"symbolSize"))},n}(Oe);function mx(t,n){this.parent.drift(t,n)}function yx(t,n,i,r){return n&&!isNaN(n[0])&&!isNaN(n[1])&&!(r.isIgnore&&r.isIgnore(i))&&!(r.clipShape&&!r.clipShape.contain(n[0],n[1]))&&"none"!==t.getItemVisual(i,"symbol")}function gx(t){return null==t||At(t)||(t={isIgnore:t}),t||{}}function bx(t){var n=t.hostModel,i=n.getModel("emphasis");return{emphasisItemStyle:i.getModel("itemStyle").getItemStyle(),blurItemStyle:n.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:n.getModel(["select","itemStyle"]).getItemStyle(),focus:i.get("focus"),blurScope:i.get("blurScope"),emphasisDisabled:i.get("disabled"),hoverScale:i.get("scale"),labelStatesModels:Nh(n),cursorStyle:n.get("cursor")}}var xx=function(){function t(t){this.group=new Oe,this._SymbolCtor=t||px}return t.prototype.updateData=function(t,n){this._progressiveEls=null,n=gx(n);var i=this.group,r=t.hostModel,e=this._data,o=this._SymbolCtor,a=n.disableAnimation,s=bx(t),u={disableAnimation:a},l=n.getSymbolPoint||function(n){return t.getItemLayout(n)};e||i.removeAll(),t.diff(e).add((function(r){var e=l(r);if(yx(t,e,r,n)){var a=new o(t,r,s,u);a.setPosition(e),t.setItemGraphicEl(r,a),i.add(a)}})).update((function(h,f){var c=e.getItemGraphicEl(f),v=l(h);if(yx(t,v,h,n)){var d=t.getItemVisual(h,"symbol")||"circle",p=c&&c.getSymbolType&&c.getSymbolType();if(!c||p&&p!==d)i.remove(c),(c=new o(t,h,s,u)).setPosition(v);else{c.updateData(t,h,s,u);var m={x:v[0],y:v[1]};a?c.attr(m):Yl(c,m,r)}i.add(c),t.setItemGraphicEl(h,c)}else i.remove(c)})).remove((function(t){var n=e.getItemGraphicEl(t);n&&n.fadeOut((function(){i.remove(n)}),r)})).execute(),this._getSymbolPoint=l,this._data=t},t.prototype.updateLayout=function(){var t=this,n=this._data;n&&n.eachItemGraphicEl((function(n,i){var r=t._getSymbolPoint(i);n.setPosition(r),n.markRedraw()}))},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=bx(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,n,i){function r(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],i=gx(i);for(var e=t.start;e<t.end;e++){var o=n.getItemLayout(e);if(yx(n,o,e,i)){var a=new this._SymbolCtor(n,e,this._seriesScope);a.traverse(r),a.setPosition(o),this.group.add(a),n.setItemGraphicEl(e,a),this._progressiveEls.push(a)}}},t.prototype.eachRendered=function(t){wh(this._progressiveEls||this.group,t)},t.prototype.remove=function(t){var n=this.group,i=this._data;i&&t?i.eachItemGraphicEl((function(t){t.fadeOut((function(){n.remove(t)}),i.hostModel)})):n.removeAll()},t}();function Mx(t,n,i){var r=t.getBaseAxis(),e=t.getOtherAxis(r),o=function(t,n){var i=0,r=t.scale.getExtent();return"start"===n?i=r[0]:"end"===n?i=r[1]:kt(n)&&!isNaN(n)?i=n:r[0]>0?i=r[0]:r[1]<0&&(i=r[1]),i}(e,i),a=r.dim,s=e.dim,u=n.mapDimension(s),l=n.mapDimension(a),h="x"===s||"radius"===s?1:0,f=dt(t.dimensions,(function(t){return n.mapDimension(t)})),c=!1,v=n.getCalculationInfo("stackResultDimension");return Uy(n,f[0])&&(c=!0,f[0]=v),Uy(n,f[1])&&(c=!0,f[1]=v),{dataDimsForPoint:f,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!c,valueDim:u,baseDim:l,baseDataOffset:h,stackedOverDimension:n.getCalculationInfo("stackedOverDimension")}}function Sx(t,n,i,r){var e=NaN;t.stacked&&(e=i.get(i.getCalculationInfo("stackedOverDimension"),r)),isNaN(e)&&(e=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=i.get(t.baseDim,r),a[1-o]=e,n.dataToPoint(a)}var kx=Math.min,Ax=Math.max;function Nx(t,n){return isNaN(t)||isNaN(n)}function Cx(t,n,i,r,e,o,a,s,u){for(var l,h,f,c,v,d,p=i,m=0;m<r;m++){var y=n[2*p],g=n[2*p+1];if(p>=e||p<0)break;if(Nx(y,g)){if(u){p+=o;continue}break}if(p===i)t[o>0?"moveTo":"lineTo"](y,g),f=y,c=g;else{var b=y-l,w=g-h;if(b*b+w*w<.5){p+=o;continue}if(a>0){for(var x=p+o,M=n[2*x],S=n[2*x+1];M===y&&S===g&&m<r;)m++,M=n[2*(x+=o)],S=n[2*x+1],b=(y=n[2*(p+=o)])-l,w=(g=n[2*p+1])-h;var k=m+1;if(u)for(;Nx(M,S)&&k<r;)k++,M=n[2*(x+=o)],S=n[2*x+1];var A=.5,N=0,C=0,T=void 0,z=void 0;if(k>=r||Nx(M,S))v=y,d=g;else{N=M-l,C=S-h;var I=y-l,L=M-y,O=g-h,D=S-g,R=void 0,_=void 0;if("x"===s){var B=N>0?1:-1;v=y-B*(R=Math.abs(I))*a,d=g,T=y+B*(_=Math.abs(L))*a,z=g}else if("y"===s){var F=C>0?1:-1;v=y,d=g-F*(R=Math.abs(O))*a,T=y,z=g+F*(_=Math.abs(D))*a}else R=Math.sqrt(I*I+O*O),v=y-N*a*(1-(A=(_=Math.sqrt(L*L+D*D))/(_+R))),d=g-C*a*(1-A),z=g+C*a*A,T=kx(T=y+N*a*A,Ax(M,y)),z=kx(z,Ax(S,g)),T=Ax(T,kx(M,y)),d=g-(C=(z=Ax(z,kx(S,g)))-g)*R/_,v=kx(v=y-(N=T-y)*R/_,Ax(l,y)),d=kx(d,Ax(h,g)),T=y+(N=y-(v=Ax(v,kx(l,y))))*_/R,z=g+(C=g-(d=Ax(d,kx(h,g))))*_/R}t.bezierCurveTo(f,c,v,d,y,g),f=T,c=z}else t.lineTo(y,g)}l=y,h=g,p+=o}return m}var Tx=function(){this.smooth=0,this.smoothConstraint=!0},zx=function(t){function n(n){var i=t.call(this,n)||this;return i.type="ec-polyline",i}return E(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new Tx},n.prototype.buildPath=function(t,n){var i=n.points,r=0,e=i.length/2;if(n.connectNulls){for(;e>0&&Nx(i[2*e-2],i[2*e-1]);e--);for(;r<e&&Nx(i[2*r],i[2*r+1]);r++);}for(;r<e;)r+=Cx(t,i,r,e,e,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},n.prototype.getPointOn=function(t,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i,r,e=this.path.data,o=ja.CMD,a="x"===n,s=[],u=0;u<e.length;){var l=void 0,h=void 0,f=void 0,c=void 0,v=void 0,d=void 0,p=void 0;switch(e[u++]){case o.M:i=e[u++],r=e[u++];break;case o.L:if(l=e[u++],h=e[u++],(p=a?(t-i)/(l-i):(t-r)/(h-r))<=1&&p>=0){var m=a?(h-r)*p+r:(l-i)*p+i;return a?[t,m]:[m,t]}i=l,r=h;break;case o.C:l=e[u++],h=e[u++],f=e[u++],c=e[u++],v=e[u++],d=e[u++];var y=a?fi(i,l,f,v,t,s):fi(r,h,c,d,t,s);if(y>0)for(var g=0;g<y;g++){var b=s[g];if(b<=1&&b>=0)return m=a?li(r,h,c,d,b):li(i,l,f,v,b),a?[t,m]:[m,t]}i=v,r=d}}},n}(us),Ix=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return E(n,t),n}(Tx),Lx=function(t){function n(n){var i=t.call(this,n)||this;return i.type="ec-polygon",i}return E(n,t),n.prototype.getDefaultShape=function(){return new Ix},n.prototype.buildPath=function(t,n){var i=n.points,r=n.stackedOnPoints,e=0,o=i.length/2,a=n.smoothMonotone;if(n.connectNulls){for(;o>0&&Nx(i[2*o-2],i[2*o-1]);o--);for(;e<o&&Nx(i[2*e],i[2*e+1]);e++);}for(;e<o;){var s=Cx(t,i,e,o,o,1,n.smooth,a,n.connectNulls);Cx(t,r,e+s-1,s,o,-1,n.stackedOnSmooth,a,n.connectNulls),e+=s+1,t.closePath()}},n}(us);function Ox(t,n,i,r,e){var o=t.getArea(),a=o.x,s=o.y,u=o.width,l=o.height,h=i.get(["lineStyle","width"])||2;a-=h/2,s-=h/2,u+=h,l+=h,a=Math.floor(a),u=Math.round(u);var f=new ws({shape:{x:a,y:s,width:u,height:l}});if(n){var c=t.getBaseAxis(),v=c.isHorizontal(),d=c.inverse;v?(d&&(f.shape.x+=u),f.shape.width=0):(d||(f.shape.y+=l),f.shape.height=0);var p=xt(e)?function(t){e(t,f)}:null;Xl(f,{shape:{width:u,height:l,x:a,y:s}},i,null,r,p)}return f}function Dx(t,n,i){var r=t.getArea(),e=Ee(r.r0,1),o=Ee(r.r,1),a=new vl({shape:{cx:Ee(t.cx,1),cy:Ee(t.cy,1),r0:e,r:o,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});return n&&("angle"===t.getBaseAxis().dim?a.shape.endAngle=r.startAngle:a.shape.r=e,Xl(a,{shape:{endAngle:r.endAngle,r:o}},i)),a}function Rx(t,n,i,r,e){return t?"polar"===t.type?Dx(t,n,i):"cartesian2d"===t.type?Ox(t,n,i,r,e):null:null}function _x(t,n){return t.type===n}function Bx(t,n){if(t.length===n.length){for(var i=0;i<t.length;i++)if(t[i]!==n[i])return;return!0}}function Fx(t){for(var n=1/0,i=1/0,r=-1/0,e=-1/0,o=0;o<t.length;){var a=t[o++],s=t[o++];isNaN(a)||(n=Math.min(a,n),r=Math.max(a,r)),isNaN(s)||(i=Math.min(s,i),e=Math.max(s,e))}return[[n,i],[r,e]]}function Ex(t,n){var i=Fx(t),r=i[0],e=i[1],o=Fx(n),a=o[0],s=o[1];return Math.max(Math.abs(r[0]-a[0]),Math.abs(r[1]-a[1]),Math.abs(e[0]-s[0]),Math.abs(e[1]-s[1]))}function Px(t){return kt(t)?t:t?.5:0}function Wx(t,n,i,r){var e=n.getBaseAxis(),o="x"===e.dim||"radius"===e.dim?0:1,a=[],s=0,u=[],l=[],h=[],f=[];if(r){for(s=0;s<t.length;s+=2)isNaN(t[s])||isNaN(t[s+1])||f.push(t[s],t[s+1]);t=f}for(s=0;s<t.length-2;s+=2)switch(h[0]=t[s+2],h[1]=t[s+3],l[0]=t[s],l[1]=t[s+1],a.push(l[0],l[1]),i){case"end":u[o]=h[o],u[1-o]=l[1-o],a.push(u[0],u[1]);break;case"middle":var c=[];u[o]=c[o]=(l[o]+h[o])/2,u[1-o]=l[1-o],c[1-o]=h[1-o],a.push(u[0],u[1]),a.push(c[0],c[1]);break;default:u[o]=l[o],u[1-o]=h[1-o],a.push(u[0],u[1])}return a.push(t[s++],t[s++]),a}function Vx(t,n){return[t[2*n],t[2*n+1]]}function jx(t){if(t.get(["endLabel","show"]))return!0;for(var n=0;n<js.length;n++)if(t.get([js[n],"endLabel","show"]))return!0;return!1}function Hx(t,n,i,r){if(_x(n,"cartesian2d")){var e=r.getModel("endLabel"),o=e.get("valueAnimation"),a=r.getData(),s={lastFrameIndex:0},u=jx(r)?function(i,r){t._endLabelOnDuring(i,r,a,s,o,e,n)}:null,l=n.getBaseAxis().isHorizontal(),h=Ox(n,i,r,(function(){var n=t._endLabel;n&&i&&null!=s.originalX&&n.attr({x:s.originalX,y:s.originalY})}),u);if(!r.get("clip",!0)){var f=h.shape,c=Math.max(f.width,f.height);l?(f.y-=c,f.height+=2*c):(f.x-=c,f.width+=2*c)}return u&&u(1,h),h}return Dx(n,i,r)}var Yx=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return E(n,t),n.prototype.init=function(){var t=new Oe,n=new xx;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=t},n.prototype.render=function(t,n,i){var r=this,e=t.coordinateSystem,o=this.group,a=t.getData(),s=t.getModel("lineStyle"),u=t.getModel("areaStyle"),l=a.getLayout("points")||[],h="polar"===e.type,f=this._coordSys,c=this._symbolDraw,v=this._polyline,d=this._polygon,p=this._lineGroup,m=t.get("animation"),y=!u.isEmpty(),g=u.get("origin"),b=Mx(e,a,g),w=y&&function(t,n,i){if(!i.valueDim)return[];for(var r=n.count(),e=cg(2*r),o=0;o<r;o++){var a=Sx(i,t,n,o);e[2*o]=a[0],e[2*o+1]=a[1]}return e}(e,a,b),x=t.get("showSymbol"),M=t.get("connectNulls"),S=x&&!h&&function(t,n,i){var r=t.get("showAllSymbol"),e="auto"===r;if(!r||e){var o=i.getAxesByScale("ordinal")[0];if(o&&(!e||!function(t,n){var i=t.getExtent(),r=Math.abs(i[1]-i[0])/t.scale.count();isNaN(r)&&(r=0);for(var e=n.count(),o=Math.max(1,Math.round(e/5)),a=0;a<e;a+=o)if(1.5*px.getSymbolSize(n,a)[t.isHorizontal()?1:0]>r)return!1;return!0}(o,n))){var a=n.mapDimension(o.dim),s={};return vt(o.getViewLabels(),(function(t){var n=o.scale.getRawOrdinalNumber(t.tickValue);s[n]=1})),function(t){return!s.hasOwnProperty(n.get(a,t))}}}}(t,a,e),k=this._data;k&&k.eachItemGraphicEl((function(t,n){t.__temp&&(o.remove(t),k.setItemGraphicEl(n,null))})),x||c.remove(),o.add(p);var A,N=!h&&t.get("step");e&&e.getArea&&t.get("clip",!0)&&(null!=(A=e.getArea()).width?(A.x-=.1,A.y-=.1,A.width+=.2,A.height+=.2):A.r0&&(A.r0-=.5,A.r+=.5)),this._clipShapeForSymbol=A;var C=function(t,n,i){var r=t.getVisual("visualMeta");if(r&&r.length&&t.count()&&"cartesian2d"===n.type){for(var e,o,a=r.length-1;a>=0;a--){var s=t.getDimensionInfo(r[a].dimension);if("x"===(e=s&&s.coordDim)||"y"===e){o=r[a];break}}if(o){var u=n.getAxis(e),l=dt(o.stops,(function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}})),h=l.length,f=o.outerColors.slice();h&&l[0].coord>l[h-1].coord&&(l.reverse(),f.reverse());var c=function(t,n){var i,r,e=[],o=t.length;function a(t,n,i){var r=t.coord;return{coord:i,color:function(t,n){if(n&&n.length&&t>=0&&t<=1){var i=t*(n.length-1),r=Math.floor(i),e=Math.ceil(i),o=Wi(n[r]),a=Wi(n[e]),s=i-r;return Gi([zi(Ri(o[0],a[0],s)),zi(Ri(o[1],a[1],s)),zi(Ri(o[2],a[2],s)),Ii(Ri(o[3],a[3],s))],"rgba")}}((i-r)/(n.coord-r),[t.color,n.color])}}for(var s=0;s<o;s++){var u=t[s],l=u.coord;if(l<0)i=u;else{if(l>n){r?e.push(a(r,u,n)):i&&e.push(a(i,u,0),a(i,u,n));break}i&&(e.push(a(i,u,0)),i=null),e.push(u),r=u}}return e}(l,"x"===e?i.getWidth():i.getHeight()),v=c.length;if(!v&&h)return l[0].coord<0?f[1]?f[1]:l[h-1].color:f[0]?f[0]:l[0].color;var d=c[0].coord-10,p=c[v-1].coord+10,m=p-d;if(m<.001)return"transparent";vt(c,(function(t){t.offset=(t.coord-d)/m})),c.push({offset:v?c[v-1].offset:.5,color:f[1]||"transparent"}),c.unshift({offset:v?c[0].offset:.5,color:f[0]||"transparent"});var y=new Ol(0,0,0,0,c,!0);return y[e]=d,y[e+"2"]=p,y}}}(a,e,i)||a.getVisual("style")[a.getVisual("drawType")];if(v&&f.type===e.type&&N===this._step){y&&!d?d=this._newPolygon(l,w):d&&!y&&(p.remove(d),d=this._polygon=null),h||this._initOrUpdateEndLabel(t,e,Ef(C));var T=p.getClipPath();T?Xl(T,{shape:Hx(this,e,!1,t).shape},t):p.setClipPath(Hx(this,e,!0,t)),x&&c.updateData(a,{isIgnore:S,clipShape:A,disableAnimation:!0,getSymbolPoint:function(t){return[l[2*t],l[2*t+1]]}}),Bx(this._stackedOnPoints,w)&&Bx(this._points,l)||(m?this._doUpdateAnimation(a,w,e,i,N,g,M):(N&&(l=Wx(l,e,N,M),w&&(w=Wx(w,e,N,M))),v.setShape({points:l}),d&&d.setShape({points:l,stackedOnPoints:w})))}else x&&c.updateData(a,{isIgnore:S,clipShape:A,disableAnimation:!0,getSymbolPoint:function(t){return[l[2*t],l[2*t+1]]}}),m&&this._initSymbolLabelAnimation(a,e,A),N&&(l=Wx(l,e,N,M),w&&(w=Wx(w,e,N,M))),v=this._newPolyline(l),y&&(d=this._newPolygon(l,w)),h||this._initOrUpdateEndLabel(t,e,Ef(C)),p.setClipPath(Hx(this,e,!0,t));var z=t.getModel("emphasis"),I=z.get("focus"),L=z.get("blurScope"),O=z.get("disabled");v.useStyle(lt(s.getLineStyle(),{fill:"none",stroke:C,lineJoin:"bevel"})),Au(v,t,"lineStyle"),v.style.lineWidth>0&&"bolder"===t.get(["emphasis","lineStyle","width"])&&(v.getState("emphasis").style.lineWidth=+v.style.lineWidth+1),Bs(v).seriesIndex=t.seriesIndex,xu(v,I,L,O);var D=Px(t.get("smooth")),R=t.get("smoothMonotone");if(v.setShape({smooth:D,smoothMonotone:R,connectNulls:M}),d){var _=a.getCalculationInfo("stackedOnSeries"),B=0;d.useStyle(lt(u.getAreaStyle(),{fill:C,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),_&&(B=Px(_.get("smooth"))),d.setShape({smooth:D,stackedOnSmooth:B,smoothMonotone:R,connectNulls:M}),Au(d,t,"areaStyle"),Bs(d).seriesIndex=t.seriesIndex,xu(d,I,L,O)}var F=function(t){r._changePolyState(t)};a.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=F)})),this._polyline.onHoverStateChange=F,this._data=a,this._coordSys=e,this._stackedOnPoints=w,this._points=l,this._step=N,this._valueOrigin=g,t.get("triggerLineEvent")&&(this.packEventData(t,v),d&&this.packEventData(t,d))},n.prototype.packEventData=function(t,n){Bs(n).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},n.prototype.highlight=function(t,n,i,r){var e=t.getData(),o=mo(e,r);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=e.getLayout("points"),s=e.getItemGraphicEl(o);if(!s){var u=a[2*o],l=a[2*o+1];if(isNaN(u)||isNaN(l))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(u,l))return;var h=t.get("zlevel"),f=t.get("z");(s=new px(e,o)).x=u,s.y=l,s.setZ(h,f);var c=s.getSymbolPath().getTextContent();c&&(c.zlevel=h,c.z=f,c.z2=this._polyline.z2+1),s.__temp=!0,e.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else Id.prototype.highlight.call(this,t,n,i,r)},n.prototype.downplay=function(t,n,i,r){var e=t.getData(),o=mo(e,r);if(this._changePolyState("normal"),null!=o&&o>=0){var a=e.getItemGraphicEl(o);a&&(a.__temp?(e.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else Id.prototype.downplay.call(this,t,n,i,r)},n.prototype._changePolyState=function(t){var n=this._polygon;iu(this._polyline,t),n&&iu(n,t)},n.prototype._newPolyline=function(t){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new zx({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},n.prototype._newPolygon=function(t,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new Lx({shape:{points:t,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},n.prototype._initSymbolLabelAnimation=function(t,n,i){var r,e,o=n.getBaseAxis(),a=o.inverse;"cartesian2d"===n.type?(r=o.isHorizontal(),e=!1):"polar"===n.type&&(r="angle"===o.dim,e=!0);var s=t.hostModel,u=s.get("animationDuration");xt(u)&&(u=u(null));var l=s.get("animationDelay")||0,h=xt(l)?l(null):l;t.eachItemGraphicEl((function(t,o){var s=t;if(s){var f=void 0,c=void 0,v=void 0;if(i)if(e){var d=i,p=n.pointToCoord([t.x,t.y]);r?(f=d.startAngle,c=d.endAngle,v=-p[1]/180*Math.PI):(f=d.r0,c=d.r,v=p[0])}else r?(f=i.x,c=i.x+i.width,v=t.x):(f=i.y+i.height,c=i.y,v=t.y);var m=c===f?0:(v-f)/(c-f);a&&(m=1-m);var y=xt(l)?l(o):u*m+h,g=s.getSymbolPath(),b=g.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:y}),g.disableLabelAnimation=!0}}))},n.prototype._initOrUpdateEndLabel=function(t,n,i){var r=t.getModel("endLabel");if(jx(t)){var e=t.getData(),o=this._polyline,a=e.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new Ss({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var u=function(t){for(var n,i=t.length/2;i>0&&(n=t[2*i-1],isNaN(t[2*i-2])||isNaN(n));i--);return i-1}(a);u>=0&&(Ah(o,Nh(t,"endLabel"),{inheritColor:i,labelFetcher:t,labelDataIndex:u,defaultText:function(t,n,i){return null!=i?dx(e,i):vx(e,t)},enableTextSetter:!0},function(t,n){var i=n.getBaseAxis(),r=i.isHorizontal(),e=i.inverse,o=r?e?"right":"left":"center",a=r?"middle":e?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a}}}(r,n)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},n.prototype._endLabelOnDuring=function(t,n,i,r,e,o,a){var s=this._endLabel,u=this._polyline;if(s){t<1&&null==r.originalX&&(r.originalX=s.x,r.originalY=s.y);var l=i.getLayout("points"),h=i.hostModel,f=h.get("connectNulls"),c=o.get("precision"),v=o.get("distance")||0,d=a.getBaseAxis(),p=d.isHorizontal(),m=d.inverse,y=n.shape,g=m?p?y.x:y.y+y.height:p?y.x+y.width:y.y,b=(p?v:0)*(m?-1:1),w=(p?0:-v)*(m?-1:1),x=p?"x":"y",M=function(t,n,i){for(var r,e,o=t.length/2,a="x"===i?0:1,s=0,u=-1,l=0;l<o;l++)if(e=t[2*l+a],!isNaN(e)&&!isNaN(t[2*l+1-a]))if(0!==l){if(r<=n&&e>=n||r>=n&&e<=n){u=l;break}s=l,r=e}else r=e;return{range:[s,u],t:(n-r)/(e-r)}}(l,g,x),S=M.range,k=S[1]-S[0],A=void 0;if(k>=1){if(k>1&&!f){var N=Vx(l,S[0]);s.attr({x:N[0]+b,y:N[1]+w}),e&&(A=h.getRawValue(S[0]))}else{(N=u.getPointOn(g,x))&&s.attr({x:N[0]+b,y:N[1]+w});var C=h.getRawValue(S[0]),T=h.getRawValue(S[1]);e&&(A=No(i,c,C,T,M.t))}r.lastFrameIndex=S[0]}else{var z=1===t||r.lastFrameIndex>0?S[0]:0;N=Vx(l,z),e&&(A=h.getRawValue(z)),s.attr({x:N[0]+b,y:N[1]+w})}e&&Rh(s).setLabelText(A)}},n.prototype._doUpdateAnimation=function(t,n,i,r,e,o,a){var s=this._polyline,u=this._polygon,l=t.hostModel,h=function(t,n,i,r,e,o,a){for(var s=function(t,n){var i=[];return n.diff(t).add((function(t){i.push({cmd:"+",idx:t})})).update((function(t,n){i.push({cmd:"=",idx:n,idx1:t})})).remove((function(t){i.push({cmd:"-",idx:t})})).execute(),i}(t,n),u=[],l=[],h=[],f=[],c=[],v=[],d=[],p=Mx(e,n,a),m=t.getLayout("points")||[],y=n.getLayout("points")||[],g=0;g<s.length;g++){var b=s[g],w=!0,x=void 0,M=void 0;switch(b.cmd){case"=":var S=m[x=2*b.idx],k=m[x+1],A=y[M=2*b.idx1],N=y[M+1];(isNaN(S)||isNaN(k))&&(S=A,k=N),u.push(S,k),l.push(A,N),h.push(i[x],i[x+1]),f.push(r[M],r[M+1]),d.push(n.getRawIndex(b.idx1));break;case"+":var C=b.idx,T=p.dataDimsForPoint,z=e.dataToPoint([n.get(T[0],C),n.get(T[1],C)]);M=2*C,u.push(z[0],z[1]),l.push(y[M],y[M+1]);var I=Sx(p,e,n,C);h.push(I[0],I[1]),f.push(r[M],r[M+1]),d.push(n.getRawIndex(C));break;case"-":w=!1}w&&(c.push(b),v.push(v.length))}v.sort((function(t,n){return d[t]-d[n]}));var L=u.length,O=cg(L),D=cg(L),R=cg(L),_=cg(L),B=[];for(g=0;g<v.length;g++){var F=v[g],E=2*g,P=2*F;O[E]=u[P],O[E+1]=u[P+1],D[E]=l[P],D[E+1]=l[P+1],R[E]=h[P],R[E+1]=h[P+1],_[E]=f[P],_[E+1]=f[P+1],B[g]=c[F]}return{current:O,next:D,stackedOnCurrent:R,stackedOnNext:_,status:B}}(this._data,t,this._stackedOnPoints,n,this._coordSys,0,this._valueOrigin),f=h.current,c=h.stackedOnCurrent,v=h.next,d=h.stackedOnNext;if(e&&(f=Wx(h.current,i,e,a),c=Wx(h.stackedOnCurrent,i,e,a),v=Wx(h.next,i,e,a),d=Wx(h.stackedOnNext,i,e,a)),Ex(f,v)>3e3||u&&Ex(c,d)>3e3)return s.stopAnimation(),s.setShape({points:v}),void(u&&(u.stopAnimation(),u.setShape({points:v,stackedOnPoints:d})));s.shape.__points=h.current,s.shape.points=f;var p={shape:{points:v}};h.current!==f&&(p.shape.__points=h.next),s.stopAnimation(),Yl(s,p,l),u&&(u.setShape({points:f,stackedOnPoints:c}),u.stopAnimation(),Yl(u,{shape:{stackedOnPoints:d}},l),s.shape.points!==u.shape.points&&(u.shape.points=s.shape.points));for(var m=[],y=h.status,g=0;g<y.length;g++)if("="===y[g].cmd){var b=t.getItemGraphicEl(y[g].idx1);b&&m.push({el:b,ptIdx:g})}s.animators&&s.animators.length&&s.animators[0].during((function(){u&&u.dirtyShape();for(var t=s.shape.__points,n=0;n<m.length;n++){var i=m[n].el,r=2*m[n].ptIdx;i.x=t[r],i.y=t[r+1],i.markRedraw()}}))},n.prototype.remove=function(){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl((function(i,r){i.__temp&&(t.remove(i),n.setItemGraphicEl(r,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},n.type="line",n}(Id);function Xx(t,n){return{seriesType:t,plan:Cd(),reset:function(t){var i=t.getData(),r=t.coordinateSystem,e=n||t.pipelineContext.large;if(r){var o=dt(r.dimensions,(function(t){return i.mapDimension(t)})).slice(0,2),a=o.length,s=i.getCalculationInfo("stackResultDimension");Uy(i,o[0])&&(o[0]=s),Uy(i,o[1])&&(o[1]=s);var u=i.getStore(),l=i.getDimensionIndex(o[0]),h=i.getDimensionIndex(o[1]);return a&&{progress:function(t,n){for(var i=e&&cg((t.end-t.start)*a),o=[],s=[],f=t.start,c=0;f<t.end;f++){var v=void 0;if(1===a){var d=u.get(l,f);v=r.dataToPoint(d,null,s)}else o[0]=u.get(l,f),o[1]=u.get(h,f),v=r.dataToPoint(o,null,s);e?(i[c++]=v[0],i[c++]=v[1]):n.setItemLayout(f,v.slice())}e&&n.setLayout("points",i)}}}}}}var Gx={average:function(t){for(var n=0,i=0,r=0;r<t.length;r++)isNaN(t[r])||(n+=t[r],i++);return 0===i?NaN:n/i},sum:function(t){for(var n=0,i=0;i<t.length;i++)n+=t[i]||0;return n},max:function(t){for(var n=-1/0,i=0;i<t.length;i++)t[i]>n&&(n=t[i]);return isFinite(n)?n:NaN},min:function(t){for(var n=1/0,i=0;i<t.length;i++)t[i]<n&&(n=t[i]);return isFinite(n)?n:NaN},nearest:function(t){return t[0]}},Ux=function(t){return Math.round(t.length/2)};function Zx(t){return{seriesType:t,reset:function(t,n,i){var r=t.getData(),e=t.get("sampling"),o=t.coordinateSystem,a=r.count();if(a>10&&"cartesian2d"===o.type&&e){var s=o.getBaseAxis(),u=o.getOtherAxis(s),l=s.getExtent(),h=i.getDevicePixelRatio(),f=Math.abs(l[1]-l[0])*(h||1),c=Math.round(a/f);if(isFinite(c)&&c>1){"lttb"===e&&t.setData(r.lttbDownSample(r.mapDimension(u.dim),1/c));var v=void 0;Mt(e)?v=Gx[e]:xt(e)&&(v=e),v&&t.setData(r.downSample(r.mapDimension(u.dim),1/c,v,Ux))}}}}}var qx=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.getInitialData=function(){return qy(null,this,{useEncodeDefaulter:!0})},n.prototype.getMarkerPosition=function(t){var n=this.coordinateSystem;if(n&&n.clampData){var i=n.dataToPoint(n.clampData(t)),r=this.getData(),e=r.getLayout("offset"),o=r.getLayout("size");return i[n.getBaseAxis().isHorizontal()?0:1]+=e+o/2,i}return[NaN,NaN]},n.type="series.__base_bar__",n.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},n}(gd);gd.registerClass(qx);var $x=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.getInitialData=function(){return qy(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},n.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},n.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>t&&(t=n),t},n.prototype.brushSelector=function(t,n,i){return i.rect(n.getItemLayout(t))},n.type="series.bar",n.dependencies=["grid","polar"],n.defaultOption=Jh(qx.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),n}(qx),Kx=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Jx=function(t){function n(n){var i=t.call(this,n)||this;return i.type="sausage",i}return E(n,t),n.prototype.getDefaultShape=function(){return new Kx},n.prototype.buildPath=function(t,n){var i=n.cx,r=n.cy,e=Math.max(n.r0||0,0),o=Math.max(n.r,0),a=.5*(o-e),s=e+a,u=n.startAngle,l=n.endAngle,h=n.clockwise,f=2*Math.PI,c=h?l-u<f:u-l<f;c||(u=l-(h?f:-f));var v=Math.cos(u),d=Math.sin(u),p=Math.cos(l),m=Math.sin(l);c?(t.moveTo(v*e+i,d*e+r),t.arc(v*s+i,d*s+r,a,-Math.PI+u,u,!h)):t.moveTo(v*o+i,d*o+r),t.arc(i,r,o,u,l,!h),t.arc(p*s+i,m*s+r,a,l-2*Math.PI,l-Math.PI,!h),0!==e&&t.arc(i,r,e,l,u,h)},n}(us);function Qx(t,n,i){return n*Math.sin(t)*(i?-1:1)}function tM(t,n,i){return n*Math.cos(t)*(i?1:-1)}var nM=Math.max,iM=Math.min,rM=function(t){function n(){var i=t.call(this)||this;return i.type=n.type,i._isFirstFrame=!0,i}return E(n,t),n.prototype.render=function(t,n,i,r){this._model=t,this._removeOnRenderedListener(i),this._updateDrawMode(t);var e=t.get("coordinateSystem");"cartesian2d"!==e&&"polar"!==e||(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,n,i):this._renderNormal(t,n,i,r))},n.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},n.prototype.incrementalRender=function(t,n){this._progressiveEls=[],this._incrementalRenderLarge(t,n)},n.prototype.eachRendered=function(t){wh(this._progressiveEls||this.group,t)},n.prototype._updateDrawMode=function(t){var n=t.pipelineContext.large;null!=this._isLargeDraw&&n===this._isLargeDraw||(this._isLargeDraw=n,this._clear())},n.prototype._renderNormal=function(t,n,i,r){var e,o=this.group,a=t.getData(),s=this._data,u=t.coordinateSystem,l=u.getBaseAxis();"cartesian2d"===u.type?e=l.isHorizontal():"polar"===u.type&&(e="angle"===l.dim);var h=t.isAnimationEnabled()?t:null,f=function(t,n){var i=t.get("realtimeSort",!0),r=n.getBaseAxis();if(i&&"category"===r.type&&"cartesian2d"===n.type)return{baseAxis:r,otherAxis:n.getOtherAxis(r)}}(t,u);f&&this._enableRealtimeSort(f,a,i);var c=t.get("clip",!0)||f,v=function(t,n){var i=t.getArea&&t.getArea();if(_x(t,"cartesian2d")){var r=t.getBaseAxis();if("category"!==r.type||!r.onBand){var e=n.getLayout("bandWidth");r.isHorizontal()?(i.x-=e,i.width+=2*e):(i.y-=e,i.height+=2*e)}}return i}(u,a);o.removeClipPath();var d=t.get("roundCap",!0),p=t.get("showBackground",!0),m=t.getModel("backgroundStyle"),y=m.get("borderRadius")||0,g=[],b=this._backgroundEls,w=r&&r.isInitSort,x=r&&"changeAxisOrder"===r.type;function M(t){var n=fM[u.type](a,t),i=function(t,n,i){return new("polar"===t.type?vl:ws)({shape:gM(n,i,t),silent:!0,z2:0})}(u,e,n);return i.useStyle(m.getItemStyle()),"cartesian2d"===u.type&&i.setShape("r",y),g[t]=i,i}a.diff(s).add((function(n){var i=a.getItemModel(n),r=fM[u.type](a,n,i);if(p&&M(n),a.hasValue(n)&&hM[u.type](r)){var s=!1;c&&(s=eM[u.type](v,r));var m=oM[u.type](t,a,n,r,e,h,l.model,!1,d);f&&(m.forceLabelAnimation=!0),vM(m,a,n,i,r,t,e,"polar"===u.type),w?m.attr({shape:r}):f?aM(f,h,m,r,n,e,!1,!1):Xl(m,{shape:r},t,n),a.setItemGraphicEl(n,m),o.add(m),m.ignore=s}})).update((function(n,i){var r=a.getItemModel(n),S=fM[u.type](a,n,r);if(p){var k=void 0;0===b.length?k=M(i):((k=b[i]).useStyle(m.getItemStyle()),"cartesian2d"===u.type&&k.setShape("r",y),g[n]=k);var A=fM[u.type](a,n);Yl(k,{shape:gM(e,A,u)},h,n)}var N=s.getItemGraphicEl(i);if(a.hasValue(n)&&hM[u.type](S)){var C=!1;if(c&&(C=eM[u.type](v,S))&&o.remove(N),N?$l(N):N=oM[u.type](t,a,n,S,e,h,l.model,!!N,d),f&&(N.forceLabelAnimation=!0),x){var T=N.getTextContent();if(T){var z=Rh(T);null!=z.prevValue&&(z.prevValue=z.value)}}else vM(N,a,n,r,S,t,e,"polar"===u.type);w?N.attr({shape:S}):f?aM(f,h,N,S,n,e,!0,x):Yl(N,{shape:S},t,n,null),a.setItemGraphicEl(n,N),N.ignore=C,o.add(N)}else o.remove(N)})).remove((function(n){var i=s.getItemGraphicEl(n);i&&ql(i,t,n)})).execute();var S=this._backgroundGroup||(this._backgroundGroup=new Oe);S.removeAll();for(var k=0;k<g.length;++k)S.add(g[k]);o.add(S),this._backgroundEls=g,this._data=a},n.prototype._renderLarge=function(t){this._clear(),mM(t,this.group),this._updateLargeClip(t)},n.prototype._incrementalRenderLarge=function(t,n){this._removeBackground(),mM(n,this.group,this._progressiveEls,!0)},n.prototype._updateLargeClip=function(t){var n=t.get("clip",!0)&&Rx(t.coordinateSystem,!1,t),i=this.group;n?i.setClipPath(n):i.removeClipPath()},n.prototype._enableRealtimeSort=function(t,n,i){var r=this;if(n.count()){var e=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,t,i),this._isFirstFrame=!1;else{var o=function(t){var i=n.getItemGraphicEl(t),r=i&&i.shape;return r&&Math.abs(e.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(n,o,e,i)},i.getZr().on("rendered",this._onRendered)}}},n.prototype._dataSort=function(t,n,i){var r=[];return t.each(t.mapDimension(n.dim),(function(t,n){var e=i(n);r.push({dataIndex:n,mappedValue:e=null==e?NaN:e,ordinalNumber:t})})),r.sort((function(t,n){return n.mappedValue-t.mappedValue})),{ordinalNumbers:dt(r,(function(t){return t.ordinalNumber}))}},n.prototype._isOrderChangedWithinSameData=function(t,n,i){for(var r=i.scale,e=t.mapDimension(i.dim),o=Number.MAX_VALUE,a=0,s=r.getOrdinalMeta().categories.length;a<s;++a){var u=t.rawIndexOf(e,r.getRawOrdinalNumber(a)),l=u<0?Number.MIN_VALUE:n(t.indexOfRawIndex(u));if(l>o)return!0;o=l}return!1},n.prototype._isOrderDifferentInView=function(t,n){for(var i=n.scale,r=i.getExtent(),e=Math.max(0,r[0]),o=Math.min(r[1],i.getOrdinalMeta().categories.length-1);e<=o;++e)if(t.ordinalNumbers[e]!==i.getRawOrdinalNumber(e))return!0},n.prototype._updateSortWithinSameData=function(t,n,i,r){if(this._isOrderChangedWithinSameData(t,n,i)){var e=this._dataSort(t,i,n);this._isOrderDifferentInView(e,i)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:e}))}},n.prototype._dispatchInitSort=function(t,n,i){var r=n.baseAxis,e=this._dataSort(t,r,(function(i){return t.get(t.mapDimension(n.otherAxis.dim),i)}));i.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",isInitSort:!0,axisId:r.index,sortInfo:e})},n.prototype.remove=function(t,n){this._clear(this._model),this._removeOnRenderedListener(n)},n.prototype.dispose=function(t,n){this._removeOnRenderedListener(n)},n.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},n.prototype._clear=function(t){var n=this.group,i=this._data;t&&t.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl((function(n){ql(n,t,Bs(n).dataIndex)}))):n.removeAll(),this._data=null,this._isFirstFrame=!0},n.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},n.type="bar",n}(Id),eM={cartesian2d:function(t,n){var i=n.width<0?-1:1,r=n.height<0?-1:1;i<0&&(n.x+=n.width,n.width=-n.width),r<0&&(n.y+=n.height,n.height=-n.height);var e=t.x+t.width,o=t.y+t.height,a=nM(n.x,t.x),s=iM(n.x+n.width,e),u=nM(n.y,t.y),l=iM(n.y+n.height,o),h=s<a,f=l<u;return n.x=h&&a>e?s:a,n.y=f&&u>o?l:u,n.width=h?0:s-a,n.height=f?0:l-u,i<0&&(n.x+=n.width,n.width=-n.width),r<0&&(n.y+=n.height,n.height=-n.height),h||f},polar:function(t,n){var i=n.r0<=n.r?1:-1;if(i<0){var r=n.r;n.r=n.r0,n.r0=r}var e=iM(n.r,t.r),o=nM(n.r0,t.r0);n.r=e,n.r0=o;var a=e-o<0;return i<0&&(r=n.r,n.r=n.r0,n.r0=r),a}},oM={cartesian2d:function(t,n,i,r,e,o){var a=new ws({shape:ut({},r),z2:1});return a.__dataIndex=i,a.name="item",o&&(a.shape[e?"height":"width"]=0),a},polar:function(t,n,i,r,e,o,a,s,u){var l=!e&&u?Jx:vl,h=new l({shape:r,z2:1});h.name="item";var f,c,v=cM(e);if(h.calculateTextPosition=(f=v,c=({isRoundCap:l===Jx}||{}).isRoundCap,function(t,n,i){var r=n.position;if(!r||r instanceof Array)return Me(t,n,i);var e=f(r),o=null!=n.distance?n.distance:5,a=this.shape,s=a.cx,u=a.cy,l=a.r,h=a.r0,v=(l+h)/2,d=a.startAngle,p=a.endAngle,m=(d+p)/2,y=c?Math.abs(l-h)/2:0,g=Math.cos,b=Math.sin,w=s+l*g(d),x=u+l*b(d),M="left",S="top";switch(e){case"startArc":w=s+(h-o)*g(m),x=u+(h-o)*b(m),M="center",S="top";break;case"insideStartArc":w=s+(h+o)*g(m),x=u+(h+o)*b(m),M="center",S="bottom";break;case"startAngle":w=s+v*g(d)+Qx(d,o+y,!1),x=u+v*b(d)+tM(d,o+y,!1),M="right",S="middle";break;case"insideStartAngle":w=s+v*g(d)+Qx(d,-o+y,!1),x=u+v*b(d)+tM(d,-o+y,!1),M="left",S="middle";break;case"middle":w=s+v*g(m),x=u+v*b(m),M="center",S="middle";break;case"endArc":w=s+(l+o)*g(m),x=u+(l+o)*b(m),M="center",S="bottom";break;case"insideEndArc":w=s+(l-o)*g(m),x=u+(l-o)*b(m),M="center",S="top";break;case"endAngle":w=s+v*g(p)+Qx(p,o+y,!0),x=u+v*b(p)+tM(p,o+y,!0),M="left",S="middle";break;case"insideEndAngle":w=s+v*g(p)+Qx(p,-o+y,!0),x=u+v*b(p)+tM(p,-o+y,!0),M="right",S="middle";break;default:return Me(t,n,i)}return(t=t||{}).x=w,t.y=x,t.align=M,t.verticalAlign=S,t}),o){var d=e?"r":"endAngle",p={};h.shape[d]=e?0:r.startAngle,p[d]=r[d],(s?Yl:Xl)(h,{shape:p},o)}return h}};function aM(t,n,i,r,e,o,a,s){var u,l;o?(l={x:r.x,width:r.width},u={y:r.y,height:r.height}):(l={y:r.y,height:r.height},u={x:r.x,width:r.width}),s||(a?Yl:Xl)(i,{shape:u},n,e,null),(a?Yl:Xl)(i,{shape:l},n?t.baseAxis.model:null,e)}function sM(t,n){for(var i=0;i<n.length;i++)if(!isFinite(t[n[i]]))return!0;return!1}var uM=["x","y","width","height"],lM=["cx","cy","r","startAngle","endAngle"],hM={cartesian2d:function(t){return!sM(t,uM)},polar:function(t){return!sM(t,lM)}},fM={cartesian2d:function(t,n,i){var r=t.getItemLayout(n),e=i?function(t,n){var i=t.get(["itemStyle","borderColor"]);if(!i||"none"===i)return 0;var r=t.get(["itemStyle","borderWidth"])||0,e=isNaN(n.width)?Number.MAX_VALUE:Math.abs(n.width),o=isNaN(n.height)?Number.MAX_VALUE:Math.abs(n.height);return Math.min(r,e,o)}(i,r):0,o=r.width>0?1:-1,a=r.height>0?1:-1;return{x:r.x+o*e/2,y:r.y+a*e/2,width:r.width-o*e,height:r.height-a*e}},polar:function(t,n){var i=t.getItemLayout(n);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function cM(t){return function(t){var n=t?"Arc":"Angle";return function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+n;default:return t}}}(t)}function vM(t,n,i,r,e,o,a,s){var u=n.getItemVisual(i,"style");s||t.setShape("r",r.get(["itemStyle","borderRadius"])||0),t.useStyle(u);var l=r.getShallow("cursor");l&&t.attr("cursor",l);var h=s?a?e.r>=e.r0?"endArc":"startArc":e.endAngle>=e.startAngle?"endAngle":"startAngle":a?e.height>=0?"bottom":"top":e.width>=0?"right":"left",f=Nh(r);Ah(t,f,{labelFetcher:o,labelDataIndex:i,defaultText:vx(o.getData(),i),inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:h});var c=t.getTextContent();if(s&&c){var v=r.get(["label","position"]);t.textConfig.inside="middle"===v||null,function(t,n,i,r){if(kt(r))t.setTextConfig({rotation:r});else if(wt(n))t.setTextConfig({rotation:0});else{var e,o=t.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,u=(a+s)/2,l=i(n);switch(l){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":e=u;break;case"startAngle":case"insideStartAngle":e=a;break;case"endAngle":case"insideEndAngle":e=s;break;default:return void t.setTextConfig({rotation:0})}var h=1.5*Math.PI-e;"middle"===l&&h>Math.PI/2&&h<1.5*Math.PI&&(h-=Math.PI),t.setTextConfig({rotation:h})}}(t,"outside"===v?h:v,cM(a),r.get(["label","rotate"]))}_h(c,f,o.getRawValue(i),(function(t){return dx(n,t)}));var d=r.getModel(["emphasis"]);xu(t,d.get("focus"),d.get("blurScope"),d.get("disabled")),Au(t,r),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(e)&&(t.style.fill="none",t.style.stroke="none",vt(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var dM=function(){},pM=function(t){function n(n){var i=t.call(this,n)||this;return i.type="largeBar",i}return E(n,t),n.prototype.getDefaultShape=function(){return new dM},n.prototype.buildPath=function(t,n){for(var i=n.points,r=this.baseDimIdx,e=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,u=0;u<i.length;u+=3)a[r]=s,a[e]=i[u+2],o[r]=i[u+r],o[e]=i[u+e],t.rect(o[0],o[1],a[0],a[1])},n}(us);function mM(t,n,i,r){var e=t.getData(),o=e.getLayout("valueAxisHorizontal")?1:0,a=e.getLayout("largeDataIndices"),s=e.getLayout("size"),u=t.getModel("backgroundStyle"),l=e.getLayout("largeBackgroundPoints");if(l){var h=new pM({shape:{points:l},incremental:!!r,silent:!0,z2:0});h.baseDimIdx=o,h.largeDataIndices=a,h.barWidth=s,h.useStyle(u.getItemStyle()),n.add(h),i&&i.push(h)}var f=new pM({shape:{points:e.getLayout("largePoints")},incremental:!!r,z2:1});f.baseDimIdx=o,f.largeDataIndices=a,f.barWidth=s,n.add(f),f.useStyle(e.getVisual("style")),Bs(f).seriesIndex=t.seriesIndex,t.get("silent")||(f.on("mousedown",yM),f.on("mousemove",yM)),i&&i.push(f)}var yM=Ed((function(t){var n=function(t,n,i){for(var r=t.baseDimIdx,e=1-r,o=t.shape.points,a=t.largeDataIndices,s=[],u=[],l=t.barWidth,h=0,f=o.length/3;h<f;h++){var c=3*h;if(u[r]=l,u[e]=o[c+2],s[r]=o[c+r],s[e]=o[c+e],u[e]<0&&(s[e]+=u[e],u[e]=-u[e]),n>=s[0]&&n<=s[0]+u[0]&&i>=s[1]&&i<=s[1]+u[1])return a[h]}return-1}(this,t.offsetX,t.offsetY);Bs(this).dataIndex=n>=0?n:null}),30,!1);function gM(t,n,i){if(_x(i,"cartesian2d")){var r=n,e=i.getArea();return{x:t?r.x:e.x,y:t?e.y:r.y,width:t?r.width:e.width,height:t?e.height:r.height}}return{cx:(e=i.getArea()).cx,cy:e.cy,r0:t?e.r0:n.r0,r:t?e.r:n.r,startAngle:t?n.startAngle:0,endAngle:t?n.endAngle:2*Math.PI}}var bM=2*Math.PI,wM=Math.PI/180;function xM(t,n){return Xf(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})}function MM(t,n){var i=xM(t,n),r=t.get("center"),e=t.get("radius");wt(e)||(e=[0,e]),wt(r)||(r=[r,r]);var o=Fe(i.width,n.getWidth()),a=Fe(i.height,n.getHeight()),s=Math.min(o,a);return{cx:Fe(r[0],o)+i.x,cy:Fe(r[1],a)+i.y,r0:Fe(e[0],s/2),r:Fe(e[1],s/2)}}function SM(t,n,i){n.eachSeriesByType(t,(function(t){var n=t.getData(),r=n.mapDimension("value"),e=xM(t,i),o=MM(t,i),a=o.cx,s=o.cy,u=o.r,l=o.r0,h=-t.get("startAngle")*wM,f=t.get("minAngle")*wM,c=0;n.each(r,(function(t){!isNaN(t)&&c++}));var v=n.getSum(r),d=Math.PI/(v||c)*2,p=t.get("clockwise"),m=t.get("roseType"),y=t.get("stillShowZeroSum"),g=n.getDataExtent(r);g[0]=0;var b=bM,w=0,x=h,M=p?1:-1;if(n.setLayout({viewRect:e,r:u}),n.each(r,(function(t,i){var r;if(isNaN(t))n.setItemLayout(i,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:p,cx:a,cy:s,r0:l,r:m?NaN:u});else{(r="area"!==m?0===v&&y?d:t*d:bM/c)<f?(r=f,b-=f):w+=t;var e=x+M*r;n.setItemLayout(i,{angle:r,startAngle:x,endAngle:e,clockwise:p,cx:a,cy:s,r0:l,r:m?Be(t,g,[l,u]):u}),x=e}})),b<bM&&c)if(b<=.001){var S=bM/c;n.each(r,(function(t,i){if(!isNaN(t)){var r=n.getItemLayout(i);r.angle=S,r.startAngle=h+M*i*S,r.endAngle=h+M*(i+1)*S}}))}else d=b/w,x=h,n.each(r,(function(t,i){if(!isNaN(t)){var r=n.getItemLayout(i),e=r.angle===f?f:t*d;r.startAngle=x,r.endAngle=x+M*e,x+=M*e}}))}))}function kM(t){return{seriesType:t,reset:function(t,n){var i=n.findComponents({mainType:"legend"});if(i&&i.length){var r=t.getData();r.filterSelf((function(t){for(var n=r.getName(t),e=0;e<i.length;e++)if(!i[e].isSelected(n))return!1;return!0}))}}}}var AM=Math.PI/180;function NM(t,n,i,r,e,o,a,s,u,l){if(!(t.length<2)){for(var h=t.length,f=0;f<h;f++)"outer"===t[f].position&&"labelLine"===t[f].labelAlignTo&&(t[f].linePoints[1][0]+=t[f].label.x-l,t[f].label.x=l);qb(t,u,u+a)&&function(t){for(var o={list:[],maxY:0},a={list:[],maxY:0},s=0;s<t.length;s++)if("none"===t[s].labelAlignTo){var u=t[s],l=u.label.y>i?a:o,h=Math.abs(u.label.y-i);if(h>=l.maxY){var f=u.label.x-n-u.len2*e,v=r+u.len,d=Math.abs(f)<v?Math.sqrt(h*h/(1-f*f/v/v)):v;l.rB=d,l.maxY=h}l.list.push(u)}c(o),c(a)}(t)}function c(t){for(var o=t.rB,a=o*o,s=0;s<t.list.length;s++){var u=t.list[s],l=Math.abs(u.label.y-i),h=r+u.len,f=h*h,c=Math.sqrt((1-Math.abs(l*l/a))*f),v=n+(c+u.len2)*e;CM(u,u.targetTextWidth-(v-u.label.x)*e,!0),u.label.x=v}}}function CM(t,n,i){if(void 0===i&&(i=!1),null==t.labelStyleWidth){var r=t.label,e=r.style,o=t.rect,a=e.backgroundColor,s=e.padding,u=s?s[1]+s[3]:0,l=e.overflow,h=o.width+(a?0:u);if(n<h||i){var f=o.height;if(l&&l.match("break")){r.setStyle("backgroundColor",null),r.setStyle("width",n-u);var c=r.getBoundingRect();r.setStyle("width",Math.ceil(c.width)),r.setStyle("backgroundColor",a)}else{var v=n-u;r.setStyle("width",n<h?v:i?v>t.unconstrainedWidth?null:v:null)}var d=r.getBoundingRect();o.width=d.width,o.height=d.height+((r.style.margin||0)+2.1),o.y-=(o.height-f)/2}}}function TM(t){return"center"===t.position}function zM(t,n,i){var r=t.get("borderRadius");if(null==r)return i?{cornerRadius:0}:null;wt(r)||(r=[r,r,r,r]);var e=Math.abs(n.r||0-n.r0||0);return{cornerRadius:dt(r,(function(t){return xe(t,e)}))}}var IM=function(t){function n(n,i,r){var e=t.call(this)||this;e.z2=2;var o=new Ss;return e.setTextContent(o),e.updateData(n,i,r,!0),e}return E(n,t),n.prototype.updateData=function(t,n,i,r){var e=this,o=t.hostModel,a=t.getItemModel(n),s=a.getModel("emphasis"),u=t.getItemLayout(n),l=ut(zM(a.getModel("itemStyle"),u,!0),u);if(isNaN(l.startAngle))e.setShape(l);else{if(r){e.setShape(l);var h=o.getShallow("animationType");o.ecModel.ssr?(Xl(e,{scaleX:0,scaleY:0},o,{dataIndex:n,isFrom:!0}),e.originX=l.cx,e.originY=l.cy):"scale"===h?(e.shape.r=u.r0,Xl(e,{shape:{r:u.r}},o,n)):null!=i?(e.setShape({startAngle:i,endAngle:i}),Xl(e,{shape:{startAngle:u.startAngle,endAngle:u.endAngle}},o,n)):(e.shape.endAngle=u.startAngle,Yl(e,{shape:{endAngle:u.endAngle}},o,n))}else $l(e),Yl(e,{shape:l},o,n);e.useStyle(t.getItemVisual(n,"style")),Au(e,a);var f=(u.startAngle+u.endAngle)/2,c=o.get("selectedOffset"),v=Math.cos(f)*c,d=Math.sin(f)*c,p=a.getShallow("cursor");p&&e.attr("cursor",p),this._updateLabel(o,t,n),e.ensureState("emphasis").shape=ut({r:u.r+(s.get("scale")&&s.get("scaleSize")||0)},zM(s.getModel("itemStyle"),u)),ut(e.ensureState("select"),{x:v,y:d,shape:zM(a.getModel(["select","itemStyle"]),u)}),ut(e.ensureState("blur"),{shape:zM(a.getModel(["blur","itemStyle"]),u)});var m=e.getTextGuideLine(),y=e.getTextContent();m&&ut(m.ensureState("select"),{x:v,y:d}),ut(y.ensureState("select"),{x:v,y:d}),xu(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))}},n.prototype._updateLabel=function(t,n,i){var r=this,e=n.getItemModel(i),o=e.getModel("labelLine"),a=n.getItemVisual(i,"style"),s=a&&a.fill,u=a&&a.opacity;Ah(r,Nh(e),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:s,defaultOpacity:u,defaultText:t.getFormattedLabel(i,"normal")||n.getName(i)});var l=r.getTextContent();r.setTextConfig({position:null,rotation:null}),l.attr({z2:10});var h=t.get(["label","position"]);if("outside"!==h&&"outer"!==h)r.removeTextGuideLine();else{var f=this.getTextGuideLine();f||(f=new wl,this.setTextGuideLine(f)),Xb(this,Gb(e),{stroke:s,opacity:Dt(o.get(["lineStyle","opacity"]),u,1)})}},n}(vl),LM=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.ignoreLabelLineUpdate=!0,n}return E(n,t),n.prototype.render=function(t,n,i){var r,e=t.getData(),o=this._data,a=this.group;if(!o&&e.count()>0){for(var s=e.getItemLayout(0),u=1;isNaN(s&&s.startAngle)&&u<e.count();++u)s=e.getItemLayout(u);s&&(r=s.startAngle)}if(this._emptyCircleSector&&a.remove(this._emptyCircleSector),0===e.count()&&t.get("showEmptyCircle")){var l=new vl({shape:MM(t,i)});l.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=l,a.add(l)}e.diff(o).add((function(t){var n=new IM(e,t,r);e.setItemGraphicEl(t,n),a.add(n)})).update((function(t,n){var i=o.getItemGraphicEl(n);i.updateData(e,t,r),i.off("click"),a.add(i),e.setItemGraphicEl(t,i)})).remove((function(n){ql(o.getItemGraphicEl(n),t,n)})).execute(),function(t){var n,i,r=t.getData(),e=[],o=!1,a=(t.get("minShowLabelAngle")||0)*AM,s=r.getLayout("viewRect"),u=r.getLayout("r"),l=s.width,h=s.x,f=s.y,c=s.height;function v(t){t.ignore=!0}r.each((function(t){var s=r.getItemGraphicEl(t),f=s.shape,c=s.getTextContent(),d=s.getTextGuideLine(),p=r.getItemModel(t),m=p.getModel("label"),y=m.get("position")||p.get(["emphasis","label","position"]),g=m.get("distanceToLabelLine"),b=m.get("alignTo"),w=Fe(m.get("edgeDistance"),l),x=m.get("bleedMargin"),M=p.getModel("labelLine"),S=M.get("length");S=Fe(S,l);var k=M.get("length2");if(k=Fe(k,l),Math.abs(f.endAngle-f.startAngle)<a)return vt(c.states,v),void(c.ignore=!0);if(function(t){if(!t.ignore)return!0;for(var n in t.states)if(!1===t.states[n].ignore)return!0;return!1}(c)){var A,N,C,T,z=(f.startAngle+f.endAngle)/2,I=Math.cos(z),L=Math.sin(z);n=f.cx,i=f.cy;var O="inside"===y||"inner"===y;if("center"===y)A=f.cx,N=f.cy,T="center";else{var D=(O?(f.r+f.r0)/2*I:f.r*I)+n,R=(O?(f.r+f.r0)/2*L:f.r*L)+i;if(A=D+3*I,N=R+3*L,!O){var _=D+I*(S+u-f.r),B=R+L*(S+u-f.r),F=_+(I<0?-1:1)*k;A="edge"===b?I<0?h+w:h+l-w:F+(I<0?-g:g),N=B,C=[[D,R],[_,B],[F,B]]}T=O?"center":"edge"===b?I>0?"right":"left":I>0?"left":"right"}var E=Math.PI,P=0,W=m.get("rotate");if(kt(W))P=W*(E/180);else if("center"===y)P=0;else if("radial"===W||!0===W)P=I<0?-z+E:-z;else if("tangential"===W&&"outside"!==y&&"outer"!==y){var V=Math.atan2(I,L);V<0&&(V=2*E+V),L>0&&(V=E+V),P=V-E}if(o=!!P,c.x=A,c.y=N,c.rotation=P,c.setStyle({verticalAlign:"middle"}),O){c.setStyle({align:T});var j=c.states.select;j&&(j.x+=c.x,j.y+=c.y)}else{var H=c.getBoundingRect().clone();H.applyTransform(c.getComputedTransform());var Y=(c.style.margin||0)+2.1;H.y-=Y/2,H.height+=Y,e.push({label:c,labelLine:d,position:y,len:S,len2:k,minTurnAngle:M.get("minTurnAngle"),maxSurfaceAngle:M.get("maxSurfaceAngle"),surfaceNormal:new ee(I,L),linePoints:C,textAlign:T,labelDistance:g,labelAlignTo:b,edgeDistance:w,bleedMargin:x,rect:H,unconstrainedWidth:H.width,labelStyleWidth:c.style.width})}s.setTextConfig({inside:O})}})),!o&&t.get("avoidLabelOverlap")&&function(t,n,i,r,e,o,a,s){for(var u=[],l=[],h=Number.MAX_VALUE,f=-Number.MAX_VALUE,c=0;c<t.length;c++){var v=t[c].label;TM(t[c])||(v.x<n?(h=Math.min(h,v.x),u.push(t[c])):(f=Math.max(f,v.x),l.push(t[c])))}for(c=0;c<t.length;c++)if(!TM(m=t[c])&&m.linePoints){if(null!=m.labelStyleWidth)continue;v=m.label;var d,p=m.linePoints;m.targetTextWidth=d="edge"===m.labelAlignTo?v.x<n?p[2][0]-m.labelDistance-a-m.edgeDistance:a+e-m.edgeDistance-p[2][0]-m.labelDistance:"labelLine"===m.labelAlignTo?v.x<n?h-a-m.bleedMargin:a+e-f-m.bleedMargin:v.x<n?v.x-a-m.bleedMargin:a+e-v.x-m.bleedMargin,CM(m,d)}for(NM(l,n,i,r,1,0,o,0,s,f),NM(u,n,i,r,-1,0,o,0,s,h),c=0;c<t.length;c++){var m;if(!TM(m=t[c])&&m.linePoints){var y=(v=m.label).style.padding,g=m.rect.width+(v.style.backgroundColor?0:y?y[1]+y[3]:0),b=(p=m.linePoints)[1][0]-p[2][0];"edge"===m.labelAlignTo?p[2][0]=v.x<n?a+m.edgeDistance+g+m.labelDistance:a+e-m.edgeDistance-g-m.labelDistance:(p[2][0]=v.x<n?v.x+m.labelDistance:v.x-m.labelDistance,p[1][0]=p[2][0]+b),p[1][1]=p[2][1]=v.y}}}(e,n,i,u,l,c,h,f);for(var d=0;d<e.length;d++){var p=e[d],m=p.label,y=p.labelLine,g=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:p.textAlign}),g&&(vt(m.states,v),m.ignore=!0);var b=m.states.select;b&&(b.x+=m.x,b.y+=m.y)}if(y){var w=p.linePoints;g||!w?(vt(y.states,v),y.ignore=!0):(Vb(w,p.minTurnAngle),jb(w,p.surfaceNormal,p.maxSurfaceAngle),y.setShape({points:w}),m.__hostTarget.textGuideLineConfig={anchor:new ee(w[0][0],w[0][1])})}}}(t),"expansion"!==t.get("animationTypeUpdate")&&(this._data=e)},n.prototype.dispose=function(){},n.prototype.containPoint=function(t,n){var i=n.getData().getItemLayout(0);if(i){var r=t[0]-i.cx,e=t[1]-i.cy,o=Math.sqrt(r*r+e*e);return o<=i.r&&o>=i.r0}},n.type="pie",n}(Id);function OM(t,n,i){n=wt(n)&&{coordDimensions:n}||ut({encodeDefine:t.getEncode()},n);var r=t.getSource(),e=jy(r,n).dimensions,o=new Vy(e,t);return o.initData(r,i),o}var DM=function(){function t(t,n){this._getDataWithEncodedVisual=t,this._getRawData=n}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,n){return this._getDataWithEncodedVisual().getItemVisual(t,n)},t}(),RM=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return E(n,t),n.prototype.init=function(n){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new DM(gt(this.getData,this),gt(this.getRawData,this)),this._defaultLabelLine(n)},n.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},n.prototype.getInitialData=function(){return OM(this,{coordDimensions:["value"],encodeDefaulter:bt(oc,this)})},n.prototype.getDataParams=function(n){var i=this.getData(),r=t.prototype.getDataParams.call(this,n),e=[];return i.each(i.mapDimension("value"),(function(t){e.push(t)})),r.percent=function(t,n,i){if(!t[n])return 0;var r=pt(t,(function(t,n){return t+(isNaN(n)?0:n)}),0);if(0===r)return 0;for(var e=Math.pow(10,i),o=dt(t,(function(t){return(isNaN(t)?0:t)/r*e*100})),a=100*e,s=dt(o,(function(t){return Math.floor(t)})),u=pt(s,(function(t,n){return t+n}),0),l=dt(o,(function(t,n){return t-s[n]}));u<a;){for(var h=Number.NEGATIVE_INFINITY,f=null,c=0,v=l.length;c<v;++c)l[c]>h&&(h=l[c],f=c);++s[f],l[f]=0,++u}return s[n]/e}(e,n,i.hostModel.get("percentPrecision")),r.$vars.push("percent"),r},n.prototype._defaultLabelLine=function(t){oo(t,"labelLine",["show"]);var n=t.labelLine,i=t.emphasis.labelLine;n.show=n.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},n.type="series.pie",n.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},n}(gd),_M=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.hasSymbolVisual=!0,i}return E(n,t),n.prototype.getInitialData=function(){return qy(null,this,{useEncodeDefaulter:!0})},n.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},n.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},n.prototype.brushSelector=function(t,n,i){return i.point(n.getItemLayout(t))},n.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},n.type="series.scatter",n.dependencies=["grid","polar","geo","singleAxis","calendar"],n.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},n}(gd),BM=function(){},FM=function(t){function n(n){var i=t.call(this,n)||this;return i._off=0,i.hoverDataIdx=-1,i}return E(n,t),n.prototype.getDefaultShape=function(){return new BM},n.prototype.reset=function(){this.notClear=!1,this._off=0},n.prototype.buildPath=function(t,n){var i,r=n.points,e=n.size,o=this.symbolProxy,a=o.shape,s=t.getContext?t.getContext():t,u=this.softClipShape;if(s&&e[0]<4)this._ctx=s;else{for(this._ctx=null,i=this._off;i<r.length;){var l=r[i++],h=r[i++];isNaN(l)||isNaN(h)||u&&!u.contain(l,h)||(a.x=l-e[0]/2,a.y=h-e[1]/2,a.width=e[0],a.height=e[1],o.buildPath(t,a,!0))}this.incremental&&(this._off=i,this.notClear=!0)}},n.prototype.afterBrush=function(){var t,n=this.shape,i=n.points,r=n.size,e=this._ctx,o=this.softClipShape;if(e){for(t=this._off;t<i.length;){var a=i[t++],s=i[t++];isNaN(a)||isNaN(s)||o&&!o.contain(a,s)||e.fillRect(a-r[0]/2,s-r[1]/2,r[0],r[1])}this.incremental&&(this._off=t,this.notClear=!0)}},n.prototype.findDataIndex=function(t,n){for(var i=this.shape,r=i.points,e=i.size,o=Math.max(e[0],4),a=Math.max(e[1],4),s=r.length/2-1;s>=0;s--){var u=2*s,l=r[u]-o/2,h=r[u+1]-a/2;if(t>=l&&n>=h&&t<=l+o&&n<=h+a)return s}return-1},n.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n);return this.getBoundingRect().contain(t=i[0],n=i[1])?(this.hoverDataIdx=this.findDataIndex(t,n))>=0:(this.hoverDataIdx=-1,!1)},n.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,i=n.points,r=n.size,e=r[0],o=r[1],a=1/0,s=1/0,u=-1/0,l=-1/0,h=0;h<i.length;){var f=i[h++],c=i[h++];a=Math.min(f,a),u=Math.max(f,u),s=Math.min(c,s),l=Math.max(c,l)}t=this._rect=new ve(a-e/2,s-o/2,u-a+e,l-s+o)}return t},n}(us),EM=function(){function t(){this.group=new Oe}return t.prototype.updateData=function(t,n){this._clear();var i=this._create();i.setShape({points:t.getLayout("points")}),this._setCommon(i,t,n)},t.prototype.updateLayout=function(t){var n=t.getLayout("points");this.group.eachChild((function(t){null!=t.startIndex&&(n=new Float32Array(n.buffer,4*t.startIndex*2,2*(t.endIndex-t.startIndex))),t.setShape("points",n),t.reset()}))},t.prototype.incrementalPrepareUpdate=function(){this._clear()},t.prototype.incrementalUpdate=function(t,n,i){var r=this._newAdded[0],e=n.getLayout("points"),o=r&&r.shape.points;if(o&&o.length<2e4){var a=o.length,s=new Float32Array(a+e.length);s.set(o),s.set(e,a),r.endIndex=t.end,r.setShape({points:s})}else{this._newAdded=[];var u=this._create();u.startIndex=t.start,u.endIndex=t.end,u.incremental=!0,u.setShape({points:e}),this._setCommon(u,n,i)}},t.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},t.prototype._create=function(){var t=new FM({cursor:"default"});return this.group.add(t),this._newAdded.push(t),t},t.prototype._setCommon=function(t,n,i){var r=n.hostModel;i=i||{};var e=n.getVisual("symbolSize");t.setShape("size",e instanceof Array?e:[e,e]),t.softClipShape=i.clipShape||null,t.symbolProxy=Ep(n.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<4;t.useStyle(r.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var a=n.getVisual("style"),s=a&&a.fill;s&&t.setColor(s);var u=Bs(t);u.seriesIndex=r.seriesIndex,t.on("mousemove",(function(){u.dataIndex=null;var n=t.hoverDataIdx;n>=0&&(u.dataIndex=n+(t.startIndex||0))}))},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),PM=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.render=function(t){var n=t.getData();this._updateSymbolDraw(n,t).updateData(n,{clipShape:this._getClipShape(t)}),this._finished=!0},n.prototype.incrementalPrepareRender=function(t){var n=t.getData();this._updateSymbolDraw(n,t).incrementalPrepareUpdate(n),this._finished=!1},n.prototype.incrementalRender=function(t,n){this._symbolDraw.incrementalUpdate(t,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=t.end===n.getData().count()},n.prototype.updateTransform=function(t,n,i){var r=t.getData();if(this.group.dirty(),!this._finished||r.count()>1e4)return{update:!0};var e=Xx("").reset(t,n,i);e.progress&&e.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(r)},n.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},n.prototype._getClipShape=function(t){var n=t.coordinateSystem,i=n&&n.getArea&&n.getArea();return t.get("clip",!0)?i:null},n.prototype._updateSymbolDraw=function(t,n){var i=this._symbolDraw,r=n.pipelineContext.large;return i&&r===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=r?new EM:new xx,this._isLargeDraw=r,this.group.removeAll()),this.group.add(i.group),i},n.prototype.remove=function(){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},n.prototype.dispose=function(){},n.type="scatter",n}(Id),WM=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return E(n,t),n.type="grid",n.dependencies=["xAxis","yAxis"],n.layoutMode="box",n.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},n}(Jf),VM=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return E(n,t),n.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",xo).models[0]},n.type="cartesian2dAxis",n}(Jf);ft(VM,tb);var jM={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},HM=at({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},jM),YM=at({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},jM);const XM={category:HM,value:YM,time:at({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},YM),log:lt({logBase:10},YM)};var GM={value:1,category:1,time:1,log:1};function UM(t,n,i,r){vt(GM,(function(e,o){var a=at(at({},XM[o],!0),r,!0),s=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n+"Axis."+o,i}return E(i,t),i.prototype.mergeDefaultAndTheme=function(t,n){var i=Uf(this),r=i?qf(t):{};at(t,n.getTheme().get(o+"Axis")),at(t,this.getDefaultOption()),t.type=ZM(t),i&&Zf(t,r,i)},i.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=Jy.createByAxisModel(this))},i.prototype.getCategories=function(t){var n=this.option;if("category"===n.type)return t?n.data:this.__ordinalMeta.categories},i.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},i.type=n+"Axis."+o,i.defaultOption=a,i}(i);t.registerComponentModel(s)})),t.registerSubTypeDefaulter(n+"Axis",ZM)}function ZM(t){return t.type||(t.data?"category":"value")}var qM=function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return dt(this._dimList,(function(t){return this._axes[t]}),this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),mt(this.getAxes(),(function(n){return n.scale.type===t}))},t.prototype.addAxis=function(t){var n=t.dim;this._axes[n]=t,this._dimList.push(n)},t}(),$M=["x","y"];function KM(t){return"interval"===t.type||"time"===t.type}var JM=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="cartesian2d",n.dimensions=$M,n}return E(n,t),n.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,n=this.getAxis("y").scale;if(KM(t)&&KM(n)){var i=t.getExtent(),r=n.getExtent(),e=this.dataToPoint([i[0],r[0]]),o=this.dataToPoint([i[1],r[1]]),a=i[1]-i[0],s=r[1]-r[0];if(a&&s){var u=(o[0]-e[0])/a,l=(o[1]-e[1])/s,h=this._transform=[u,0,0,l,e[0]-i[0]*u,e[1]-r[0]*l];this._invTransform=Zr([],h)}}},n.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},n.prototype.containPoint=function(t){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},n.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},n.prototype.dataToPoint=function(t,n,i){i=i||[];var r=t[0],e=t[1];if(this._transform&&null!=r&&isFinite(r)&&null!=e&&isFinite(e))return fn(i,t,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return i[0]=o.toGlobalCoord(o.dataToCoord(r,n)),i[1]=a.toGlobalCoord(a.dataToCoord(e,n)),i},n.prototype.clampData=function(t,n){var i=this.getAxis("x").scale,r=this.getAxis("y").scale,e=i.getExtent(),o=r.getExtent(),a=i.parse(t[0]),s=r.parse(t[1]);return(n=n||[])[0]=Math.min(Math.max(Math.min(e[0],e[1]),a),Math.max(e[0],e[1])),n[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),n},n.prototype.pointToData=function(t,n){var i=[];if(this._invTransform)return fn(i,t,this._invTransform);var r=this.getAxis("x"),e=this.getAxis("y");return i[0]=r.coordToData(r.toLocalCoord(t[0]),n),i[1]=e.coordToData(e.toLocalCoord(t[1]),n),i},n.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},n.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(t[0],t[1]),r=Math.min(n[0],n[1]),e=Math.max(t[0],t[1])-i,o=Math.max(n[0],n[1])-r;return new ve(i,r,e,o)},n}(qM),QM=function(t){function n(n,i,r,e,o){var a=t.call(this,n,i,r)||this;return a.index=0,a.type=e||"value",a.position=o||"bottom",a}return E(n,t),n.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},n.prototype.getGlobalExtent=function(t){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),t&&n[0]>n[1]&&n.reverse(),n},n.prototype.pointToData=function(t,n){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),n)},n.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},n}(xb);function tS(t,n,i){i=i||{};var r=t.coordinateSystem,e=n.axis,o={},a=e.getAxesOnZeroOf()[0],s=e.position,u=a?"onZero":s,l=e.dim,h=r.getRect(),f=[h.x,h.x+h.width,h.y,h.y+h.height],c={left:0,right:1,top:0,bottom:1,onZero:2},v=n.get("offset")||0,d="x"===l?[f[2]-v,f[3]+v]:[f[0]-v,f[1]+v];if(a){var p=a.toGlobalCoord(a.dataToCoord(0));d[c.onZero]=Math.max(Math.min(p,d[1]),d[0])}o.position=["y"===l?d[c[u]]:f[0],"x"===l?d[c[u]]:f[3]],o.rotation=Math.PI/2*("x"===l?0:1),o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?d[c[s]]-d[c.onZero]:0,n.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),Lt(i.labelInside,n.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var m=n.get(["axisLabel","rotate"]);return o.labelRotate="top"===u?-m:m,o.z2=1,o}function nS(t){return"cartesian2d"===t.get("coordinateSystem")}function iS(t){var n={xAxisModel:null,yAxisModel:null};return vt(n,(function(i,r){var e=r.replace(/Model$/,""),o=t.getReferringComponents(e,xo).models[0];n[r]=o})),n}var rS=Math.log;function eS(t,n,i){var r=lg.prototype,e=r.getTicks.call(i),o=r.getTicks.call(i,!0),a=e.length-1,s=r.getInterval.call(i),u=Xg(t,n),l=u.extent,h=u.fixMin,f=u.fixMax;if("log"===t.type){var c=rS(t.base);l=[rS(l[0])/c,rS(l[1])/c]}t.setExtent(l[0],l[1]),t.calcNiceExtent({splitNumber:a,fixMin:h,fixMax:f});var v=r.getExtent.call(t);h&&(l[0]=v[0]),f&&(l[1]=v[1]);var d=r.getInterval.call(t),p=l[0],m=l[1];if(h&&f)d=(m-p)/a;else if(h)for(m=l[0]+d*a;m<l[1]&&isFinite(m)&&isFinite(l[1]);)d=ng(d),m=l[0]+d*a;else if(f)for(p=l[1]-d*a;p>l[0]&&isFinite(p)&&isFinite(l[0]);)d=ng(d),p=l[1]-d*a;else{t.getTicks().length-1>a&&(d=ng(d));var y=d*a;(p=Ee((m=Math.ceil(l[1]/d)*d)-y))<0&&l[0]>=0?(p=0,m=Ee(y)):m>0&&l[1]<=0&&(m=0,p=-Ee(y))}var g=(e[0].value-o[0].value)/s,b=(e[a].value-o[a].value)/s;r.setExtent.call(t,p+d*g,m+d*b),r.setInterval.call(t,d),(g||b)&&r.setNiceExtent.call(t,p+d,m-d)}var oS=function(){function t(t,n,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=$M,this._initCartesian(t,n,i),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,n){var i=this._axesMap;function r(t){var n,i=yt(t),r=i.length;if(r){for(var e=[],o=r-1;o>=0;o--){var a=t[+i[o]],s=a.model,u=a.scale;tg(u)&&s.get("alignTicks")&&null==s.get("interval")?e.push(a):(Gg(u,s),tg(u)&&(n=a))}e.length&&(n||Gg((n=e.pop()).scale,n.model),vt(e,(function(t){eS(t.scale,t.model,n.scale)})))}}this._updateScale(t,this.model),r(i.x),r(i.y);var e={};vt(i.x,(function(t){sS(i,"y",t,e)})),vt(i.y,(function(t){sS(i,"x",t,e)})),this.resize(this.model,n)},t.prototype.resize=function(t,n,i){var r=t.getBoxLayoutParams(),e=!i&&t.get("containLabel"),o=Xf(r,{width:n.getWidth(),height:n.getHeight()});this._rect=o;var a=this._axesList;function s(){vt(a,(function(t){var n=t.isHorizontal(),i=n?[0,o.width]:[0,o.height],r=t.inverse?1:0;t.setExtent(i[r],i[1-r]),function(t,n){var i=t.getExtent(),r=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+n}:function(t){return r-t+n},t.toLocalCoord="x"===t.dim?function(t){return t-n}:function(t){return r-t+n}}(t,n?o.x:o.y)}))}s(),e&&(vt(a,(function(t){if(!t.model.get(["axisLabel","inside"])){var n=function(t){var n=t.scale;if(t.model.get(["axisLabel","show"])&&!n.isBlank()){var i,r,e=n.getExtent();r=n instanceof sg?n.count():(i=n.getTicks()).length;var o,a=t.getLabelModel(),s=Zg(t),u=1;r>40&&(u=Math.ceil(r/40));for(var l=0;l<r;l+=u){var h=s(i?i[l]:{value:e[0]+l},l),f=$g(a.getTextRect(h),a.get("rotate")||0);o?o.union(f):o=f}return o}}(t);if(n){var i=t.isHorizontal()?"height":"width",r=t.model.get(["axisLabel","margin"]);o[i]-=n[i]+r,"top"===t.position?o.y+=n.height+r:"left"===t.position&&(o.x+=n.width+r)}}})),s()),vt(this._coordsList,(function(t){t.calcAffineTransform()}))},t.prototype.getAxis=function(t,n){var i=this._axesMap[t];if(null!=i)return i[n||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(t,n){if(null!=t&&null!=n)return this._coordsMap["x"+t+"y"+n];At(t)&&(n=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,r=this._coordsList;i<r.length;i++)if(r[i].getAxis("x").index===t||r[i].getAxis("y").index===n)return r[i]},t.prototype.getCartesians=function(){return this._coordsList.slice()},t.prototype.convertToPixel=function(t,n,i){var r=this._findConvertTarget(n);return r.cartesian?r.cartesian.dataToPoint(i):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(i)):null},t.prototype.convertFromPixel=function(t,n,i){var r=this._findConvertTarget(n);return r.cartesian?r.cartesian.pointToData(i):r.axis?r.axis.coordToData(r.axis.toLocalCoord(i)):null},t.prototype._findConvertTarget=function(t){var n,i,r=t.seriesModel,e=t.xAxisModel||r&&r.getReferringComponents("xAxis",xo).models[0],o=t.yAxisModel||r&&r.getReferringComponents("yAxis",xo).models[0],a=t.gridModel;return r?ht(this._coordsList,n=r.coordinateSystem)<0&&(n=null):e&&o?n=this.getCartesian(e.componentIndex,o.componentIndex):e?i=this.getAxis("x",e.componentIndex):o?i=this.getAxis("y",o.componentIndex):a&&a.coordinateSystem===this&&(n=this._coordsList[0]),{cartesian:n,axis:i}},t.prototype.containPoint=function(t){var n=this._coordsList[0];if(n)return n.containPoint(t)},t.prototype._initCartesian=function(t,n){var i=this,r=this,e={left:!1,right:!1,top:!1,bottom:!1},o={x:{},y:{}},a={x:0,y:0};if(n.eachComponent("xAxis",s("x"),this),n.eachComponent("yAxis",s("y"),this),!a.x||!a.y)return this._axesMap={},void(this._axesList=[]);function s(n){return function(i,s){if(aS(i,t)){var u=i.get("position");"x"===n?"top"!==u&&"bottom"!==u&&(u=e.bottom?"top":"bottom"):"left"!==u&&"right"!==u&&(u=e.left?"right":"left"),e[u]=!0;var l=new QM(n,Ug(i),[0,0],i.get("type"),u);l.onBand="category"===l.type&&i.get("boundaryGap"),l.inverse=i.get("inverse"),i.axis=l,l.model=i,l.grid=r,l.index=s,r._axesList.push(l),o[n][s]=l,a[n]++}}}this._axesMap=o,vt(o.x,(function(n,r){vt(o.y,(function(e,o){var a="x"+r+"y"+o,s=new JM(a);s.master=i,s.model=t,i._coordsMap[a]=s,i._coordsList.push(s),s.addAxis(n),s.addAxis(e)}))}))},t.prototype._updateScale=function(t,n){function i(t,n){vt(Qg(t,n.dim),(function(i){n.scale.unionExtentFromData(t,i)}))}vt(this._axesList,(function(t){if(t.scale.setExtent(1/0,-1/0),"category"===t.type){var n=t.model.get("categorySortInfo");t.scale.setSortInfo(n)}})),t.eachSeries((function(t){if(nS(t)){var r=iS(t),e=r.xAxisModel,o=r.yAxisModel;if(!aS(e,n)||!aS(o,n))return;var a=this.getCartesian(e.componentIndex,o.componentIndex),s=t.getData(),u=a.getAxis("x"),l=a.getAxis("y");i(s,u),i(s,l)}}),this)},t.prototype.getTooltipAxes=function(t){var n=[],i=[];return vt(this.getCartesians(),(function(r){var e=null!=t&&"auto"!==t?r.getAxis(t):r.getBaseAxis(),o=r.getOtherAxis(e);ht(n,e)<0&&n.push(e),ht(i,o)<0&&i.push(o)})),{baseAxes:n,otherAxes:i}},t.create=function(n,i){var r=[];return n.eachComponent("grid",(function(e,o){var a=new t(e,n,i);a.name="grid_"+o,a.resize(e,i,!0),e.coordinateSystem=a,r.push(a)})),n.eachSeries((function(t){if(nS(t)){var n=iS(t),i=n.xAxisModel,r=n.yAxisModel,e=i.getCoordSysModel();t.coordinateSystem=e.coordinateSystem.getCartesian(i.componentIndex,r.componentIndex)}})),r},t.dimensions=$M,t}();function aS(t,n){return t.getCoordSysModel()===n}function sS(t,n,i,r){i.getAxesOnZeroOf=function(){return e?[e]:[]};var e,o=t[n],a=i.model,s=a.get(["axisLine","onZero"]),u=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=u)uS(o[u])&&(e=o[u]);else for(var l in o)if(o.hasOwnProperty(l)&&uS(o[l])&&!r[h(o[l])]){e=o[l];break}e&&(r[h(e)]=!0)}function h(t){return t.dim+"_"+t.index}}function uS(t){return t&&"category"!==t.type&&"time"!==t.type&&function(t){var n=t.scale.getExtent(),i=n[0],r=n[1];return!(i>0&&r>0||i<0&&r<0)}(t)}var lS=Math.PI,hS=function(){function t(t,n){this.group=new Oe,this.opt=n,this.axisModel=t,lt(n,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var i=new Oe({x:n.position[0],y:n.position[1],rotation:n.rotation});i.updateTransform(),this._transformGroup=i}return t.prototype.hasBuilder=function(t){return!!fS[t]},t.prototype.add=function(t){fS[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,n,i){var r,e,o=He(n-t);return Ye(o)?(e=i>0?"top":"bottom",r="center"):Ye(o-lS)?(e=i>0?"bottom":"top",r="center"):(e="middle",r=o>0&&o<lS?i>0?"right":"left":i>0?"left":"right"),{rotation:o,textAlign:r,textVerticalAlign:e}},t.makeAxisEventDataBase=function(t){var n={componentType:t.mainType,componentIndex:t.componentIndex};return n[t.mainType+"Index"]=t.componentIndex,n},t.isLabelSilent=function(t){var n=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||n&&n.show)},t}(),fS={axisLine:function(t,n,i,r){var e=n.get(["axisLine","show"]);if("auto"===e&&t.handleAutoShown&&(e=t.handleAutoShown("axisLine")),e){var o=n.axis.getExtent(),a=r.transform,s=[o[0],0],u=[o[1],0];a&&(fn(s,s,a),fn(u,u,a));var l=ut({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new Sl({subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:u[0],y2:u[1]},style:l,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});h.anid="line",i.add(h);var f=n.get(["axisLine","symbol"]);if(null!=f){var c=n.get(["axisLine","symbolSize"]);Mt(f)&&(f=[f,f]),(Mt(c)||kt(c))&&(c=[c,c]);var v=Wp(n.get(["axisLine","symbolOffset"])||0,c),d=c[0],p=c[1];vt([{rotate:t.rotation+Math.PI/2,offset:v[0],r:0},{rotate:t.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((s[0]-u[0])*(s[0]-u[0])+(s[1]-u[1])*(s[1]-u[1]))}],(function(n,r){if("none"!==f[r]&&null!=f[r]){var e=Ep(f[r],-d/2,-p/2,d,p,l.stroke,!0),o=n.r+n.offset;e.attr({rotation:n.rotate,x:s[0]+o*Math.cos(t.rotation),y:s[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),i.add(e)}}))}}},axisTickLabel:function(t,n,i,r){var e=function(t,n,i,r){var e=i.axis,o=i.getModel("axisTick"),a=o.get("show");if("auto"===a&&r.handleAutoShown&&(a=r.handleAutoShown("axisTick")),a&&!e.scale.isBlank()){for(var s=o.getModel("lineStyle"),u=r.tickDirection*o.get("length"),l=pS(e.getTicksCoords(),n.transform,u,lt(s.getLineStyle(),{stroke:i.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;h<l.length;h++)t.add(l[h]);return l}}(i,r,n,t),o=function(t,n,i,r){var e=i.axis;if(Lt(r.axisLabelShow,i.get(["axisLabel","show"]))&&!e.scale.isBlank()){var o=i.getModel("axisLabel"),a=o.get("margin"),s=e.getViewLabels(),u=(Lt(r.labelRotate,o.get("rotate"))||0)*lS/180,l=hS.innerTextLayout(r.rotation,u,r.labelDirection),h=i.getCategories&&i.getCategories(!0),f=[],c=hS.isLabelSilent(i),v=i.get("triggerEvent");return vt(s,(function(s,u){var d="ordinal"===e.scale.type?e.scale.getRawOrdinalNumber(s.tickValue):s.tickValue,p=s.formattedLabel,m=s.rawLabel,y=o;if(h&&h[d]){var g=h[d];At(g)&&g.textStyle&&(y=new qh(g.textStyle,o,i.ecModel))}var b=y.getTextColor()||i.get(["axisLine","lineStyle","color"]),w=e.dataToCoord(d),x=new Ss({x:w,y:r.labelOffset+r.labelDirection*a,rotation:l.rotation,silent:c,z2:10+(s.level||0),style:Ch(y,{text:p,align:y.getShallow("align",!0)||l.textAlign,verticalAlign:y.getShallow("verticalAlign",!0)||y.getShallow("baseline",!0)||l.textVerticalAlign,fill:xt(b)?b("category"===e.type?m:"value"===e.type?d+"":d,u):b})});if(x.anid="label_"+d,v){var M=hS.makeAxisEventDataBase(i);M.targetType="axisLabel",M.value=m,M.tickIndex=u,"category"===e.type&&(M.dataIndex=d),Bs(x).eventData=M}n.add(x),x.updateTransform(),f.push(x),t.add(x),x.decomposeTransform()})),f}}(i,r,n,t);(function(t,n,i){if(!Jg(t.axis)){var r=t.get(["axisLabel","showMinLabel"]),e=t.get(["axisLabel","showMaxLabel"]),o=(n=n||[])[0],a=n[1],s=n[n.length-1],u=n[n.length-2],l=(i=i||[])[0],h=i[1],f=i[i.length-1],c=i[i.length-2];!1===r?(cS(o),cS(l)):vS(o,a)&&(r?(cS(a),cS(h)):(cS(o),cS(l))),!1===e?(cS(s),cS(f)):vS(u,s)&&(e?(cS(u),cS(c)):(cS(s),cS(f)))}})(n,o,e),function(t,n,i,r){var e=i.axis,o=i.getModel("minorTick");if(o.get("show")&&!e.scale.isBlank()){var a=e.getMinorTicksCoords();if(a.length)for(var s=o.getModel("lineStyle"),u=r*o.get("length"),l=lt(s.getLineStyle(),lt(i.getModel("axisTick").getLineStyle(),{stroke:i.get(["axisLine","lineStyle","color"])})),h=0;h<a.length;h++)for(var f=pS(a[h],n.transform,u,l,"minorticks_"+h),c=0;c<f.length;c++)t.add(f[c])}}(i,r,n,t.tickDirection),n.get(["axisLabel","hideOverlap"])&&$b(Ub(dt(o,(function(t){return{label:t,priority:t.z2,defaultAttr:{ignore:t.ignore}}}))))},axisName:function(t,n,i,r){var e=Lt(t.axisName,n.get("name"));if(e){var o,a,s=n.get("nameLocation"),u=t.nameDirection,l=n.getModel("nameTextStyle"),h=n.get("nameGap")||0,f=n.axis.getExtent(),c=f[0]>f[1]?-1:1,v=["start"===s?f[0]-c*h:"end"===s?f[1]+c*h:(f[0]+f[1])/2,dS(s)?t.labelOffset+u*h:0],d=n.get("nameRotate");null!=d&&(d=d*lS/180),dS(s)?o=hS.innerTextLayout(t.rotation,null!=d?d:t.rotation,u):(o=function(t,n,i,r){var e,o,a=He(i-t),s=r[0]>r[1],u="start"===n&&!s||"start"!==n&&s;return Ye(a-lS/2)?(o=u?"bottom":"top",e="center"):Ye(a-1.5*lS)?(o=u?"top":"bottom",e="center"):(o="middle",e=a<1.5*lS&&a>lS/2?u?"left":"right":u?"right":"left"),{rotation:a,textAlign:e,textVerticalAlign:o}}(t.rotation,s,d||0,f),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var p=l.getFont(),m=n.get("nameTruncate",!0)||{},y=m.ellipsis,g=Lt(t.nameTruncateMaxWidth,m.maxWidth,a),b=new Ss({x:v[0],y:v[1],rotation:o.rotation,silent:hS.isLabelSilent(n),style:Ch(l,{text:e,font:p,overflow:"truncate",width:g,ellipsis:y,fill:l.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:l.get("align")||o.textAlign,verticalAlign:l.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(gh({el:b,componentModel:n,itemName:e}),b.__fullText=e,b.anid="name",n.get("triggerEvent")){var w=hS.makeAxisEventDataBase(n);w.targetType="axisName",w.name=e,Bs(b).eventData=w}r.add(b),b.updateTransform(),i.add(b),b.decomposeTransform()}}};function cS(t){t&&(t.ignore=!0)}function vS(t,n){var i=t&&t.getBoundingRect().clone(),r=n&&n.getBoundingRect().clone();if(i&&r){var e=jr([]);return Gr(e,e,-t.rotation),i.applyTransform(Yr([],e,t.getLocalTransform())),r.applyTransform(Yr([],e,n.getLocalTransform())),i.intersect(r)}}function dS(t){return"middle"===t||"center"===t}function pS(t,n,i,r,e){for(var o=[],a=[],s=[],u=0;u<t.length;u++){var l=t[u].coord;a[0]=l,a[1]=0,s[0]=l,s[1]=i,n&&(fn(a,a,n),fn(s,s,n));var h=new Sl({subPixelOptimize:!0,shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});h.anid=e+"_"+t[u].tickValue,o.push(h)}return o}function mS(t,n){return"all"===t||wt(t)&&ht(t,n)>=0||t===n}function yS(t){var n=gS(t);if(n){var i=n.axisPointerModel,r=n.axis.scale,e=i.option,o=i.get("status"),a=i.get("value");null!=a&&(a=r.parse(a));var s=bS(i);null==o&&(e.status=s?"show":"hide");var u=r.getExtent().slice();u[0]>u[1]&&u.reverse(),(null==a||a>u[1])&&(a=u[1]),a<u[0]&&(a=u[0]),e.value=a,s&&(e.status=n.axis.scale.isBlank()?"hide":"show")}}function gS(t){var n=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return n&&n.axesInfo[wS(t)]}function bS(t){return!!t.get(["handle","show"])}function wS(t){return t.type+"||"+t.id}var xS={},MS=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.render=function(n,i,r,e){this.axisPointerClass&&yS(n),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(n,r,!0)},n.prototype.updateAxisPointer=function(t,n,i){this._doUpdateAxisPointerClass(t,i,!1)},n.prototype.remove=function(t,n){var i=this._axisPointer;i&&i.remove(n)},n.prototype.dispose=function(n,i){this._disposeAxisPointer(i),t.prototype.dispose.apply(this,arguments)},n.prototype._doUpdateAxisPointerClass=function(t,i,r){var e=n.getAxisPointerClass(this.axisPointerClass);if(e){var o=function(t){var n=gS(t);return n&&n.axisPointerModel}(t);o?(this._axisPointer||(this._axisPointer=new e)).render(t,o,i,r):this._disposeAxisPointer(i)}},n.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},n.registerAxisPointerClass=function(t,n){xS[t]=n},n.getAxisPointerClass=function(t){return t&&xS[t]},n.type="axis",n}(Nd),SS=yo();function kS(t,n,i,r){var e=i.axis;if(!e.scale.isBlank()){var o=i.getModel("splitArea"),a=o.getModel("areaStyle"),s=a.get("color"),u=r.coordinateSystem.getRect(),l=e.getTicksCoords({tickModel:o,clamp:!0});if(l.length){var h=s.length,f=SS(t).splitAreaColors,c=Vt(),v=0;if(f)for(var d=0;d<l.length;d++){var p=f.get(l[d].tickValue);if(null!=p){v=(p+(h-1)*d)%h;break}}var m=e.toGlobalCoord(l[0].coord),y=a.getAreaStyle();for(s=wt(s)?s:[s],d=1;d<l.length;d++){var g=e.toGlobalCoord(l[d].coord),b=void 0,w=void 0,x=void 0,M=void 0;e.isHorizontal()?(w=u.y,M=u.height,m=(b=m)+(x=g-b)):(b=u.x,x=u.width,m=(w=m)+(M=g-w));var S=l[d-1].tickValue;null!=S&&c.set(S,v),n.add(new ws({anid:null!=S?"area_"+S:null,shape:{x:b,y:w,width:x,height:M},style:lt({fill:s[v]},y),autoBatch:!0,silent:!0})),v=(v+1)%h}SS(t).splitAreaColors=c}}}function AS(t){SS(t).splitAreaColors=null}var NS=["axisLine","axisTickLabel","axisName"],CS=["splitArea","splitLine","minorSplitLine"],TS=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.axisPointerClass="CartesianAxisPointer",i}return E(n,t),n.prototype.render=function(n,i,r,e){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Oe,this.group.add(this._axisGroup),n.get("show")){var a=n.getCoordSysModel(),s=tS(a,n),u=new hS(n,ut({handleAutoShown:function(){for(var t=a.coordinateSystem.getCartesians(),i=0;i<t.length;i++)if(tg(t[i].getOtherAxis(n.axis).scale))return!0;return!1}},s));vt(NS,u.add,u),this._axisGroup.add(u.getGroup()),vt(CS,(function(t){n.get([t,"show"])&&zS[t](this,this._axisGroup,n,a)}),this),e&&"changeAxisOrder"===e.type&&e.isInitSort||ch(o,this._axisGroup,n),t.prototype.render.call(this,n,i,r,e)}},n.prototype.remove=function(){AS(this)},n.type="cartesianAxis",n}(MS),zS={splitLine:function(t,n,i,r){var e=i.axis;if(!e.scale.isBlank()){var o=i.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=wt(s)?s:[s];for(var u=r.coordinateSystem.getRect(),l=e.isHorizontal(),h=0,f=e.getTicksCoords({tickModel:o}),c=[],v=[],d=a.getLineStyle(),p=0;p<f.length;p++){var m=e.toGlobalCoord(f[p].coord);l?(c[0]=m,c[1]=u.y,v[0]=m,v[1]=u.y+u.height):(c[0]=u.x,c[1]=m,v[0]=u.x+u.width,v[1]=m);var y=h++%s.length;n.add(new Sl({anid:null!=f[p].tickValue?"line_"+f[p].tickValue:null,subPixelOptimize:!0,autoBatch:!0,shape:{x1:c[0],y1:c[1],x2:v[0],y2:v[1]},style:lt({stroke:s[y]},d),silent:!0}))}}},minorSplitLine:function(t,n,i,r){var e=i.axis,o=i.getModel("minorSplitLine").getModel("lineStyle"),a=r.coordinateSystem.getRect(),s=e.isHorizontal(),u=e.getMinorTicksCoords();if(u.length)for(var l=[],h=[],f=o.getLineStyle(),c=0;c<u.length;c++)for(var v=0;v<u[c].length;v++){var d=e.toGlobalCoord(u[c][v].coord);s?(l[0]=d,l[1]=a.y,h[0]=d,h[1]=a.y+a.height):(l[0]=a.x,l[1]=d,h[0]=a.x+a.width,h[1]=d),n.add(new Sl({anid:"minor_line_"+u[c][v].tickValue,subPixelOptimize:!0,autoBatch:!0,shape:{x1:l[0],y1:l[1],x2:h[0],y2:h[1]},style:f,silent:!0}))}},splitArea:function(t,n,i,r){kS(t,n,i,r)}},IS=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.type="xAxis",n}(TS),LS=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=IS.type,n}return E(n,t),n.type="yAxis",n}(TS),OS=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="grid",n}return E(n,t),n.prototype.render=function(t){this.group.removeAll(),t.get("show")&&this.group.add(new ws({shape:t.coordinateSystem.getRect(),style:lt({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},n.type="grid",n}(Nd),DS={offset:0};function RS(t){t.registerComponentView(OS),t.registerComponentModel(WM),t.registerCoordinateSystem("cartesian2d",oS),UM(t,"x",VM,DS),UM(t,"y",VM,DS),t.registerComponentView(IS),t.registerComponentView(LS),t.registerPreprocessor((function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}))}function _S(t){t.eachSeriesByType("radar",(function(t){var n=t.getData(),i=[],r=t.coordinateSystem;if(r){var e=r.getIndicatorAxes();vt(e,(function(t,o){n.each(n.mapDimension(e[o].dim),(function(t,n){i[n]=i[n]||[];var e=r.dataToPoint(t,o);i[n][o]=BS(e)?e:FS(r)}))})),n.each((function(t){var e=function(t,n){if(t&&n)for(var i=0,r=t.length;i<r;i++)if(n.call(undefined,t[i],i,t))return t[i]}(i[t],(function(t){return BS(t)}))||FS(r);i[t].push(e.slice()),n.setItemLayout(t,i[t])}))}}))}function BS(t){return!isNaN(t[0])&&!isNaN(t[1])}function FS(t){return[t.cx,t.cy]}function ES(t){var n=t.polar;if(n){wt(n)||(n=[n]);var i=[];vt(n,(function(n){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),t.radar=t.radar||[],wt(t.radar)||(t.radar=[t.radar]),t.radar.push(n)):i.push(n)})),t.polar=i}vt(t.series,(function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)}))}var PS=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.render=function(t){var n=t.coordinateSystem,i=this.group,r=t.getData(),e=this._data;function o(t,n){var i=t.getItemVisual(n,"symbol")||"circle";if("none"!==i){var r=Pp(t.getItemVisual(n,"symbolSize")),e=Ep(i,-1,-1,2,2),o=t.getItemVisual(n,"symbolRotate")||0;return e.attr({style:{strokeNoScale:!0},z2:100,scaleX:r[0]/2,scaleY:r[1]/2,rotation:o*Math.PI/180||0}),e}}function a(n,i,r,e,a,s){r.removeAll();for(var u=0;u<i.length-1;u++){var l=o(e,a);l&&(l.__dimIdx=u,n[u]?(l.setPosition(n[u]),xh[s?"initProps":"updateProps"](l,{x:i[u][0],y:i[u][1]},t,a)):l.setPosition(i[u]),r.add(l))}}function s(t){return dt(t,(function(){return[n.cx,n.cy]}))}r.diff(e).add((function(n){var i=r.getItemLayout(n);if(i){var e=new gl,o=new wl,u={shape:{points:i}};e.shape.points=s(i),o.shape.points=s(i),Xl(e,u,t,n),Xl(o,u,t,n);var l=new Oe,h=new Oe;l.add(o),l.add(e),l.add(h),a(o.shape.points,i,h,r,n,!0),r.setItemGraphicEl(n,l)}})).update((function(n,i){var o=e.getItemGraphicEl(i),s=o.childAt(0),u=o.childAt(1),l=o.childAt(2),h={shape:{points:r.getItemLayout(n)}};h.shape.points&&(a(s.shape.points,h.shape.points,l,r,n,!1),$l(u),$l(s),Yl(s,h,t),Yl(u,h,t),r.setItemGraphicEl(n,o))})).remove((function(t){i.remove(e.getItemGraphicEl(t))})).execute(),r.eachItemGraphicEl((function(t,n){var e=r.getItemModel(n),o=t.childAt(0),a=t.childAt(1),s=t.childAt(2),u=r.getItemVisual(n,"style"),l=u.fill;i.add(t),o.useStyle(lt(e.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:l})),Au(o,e,"lineStyle"),Au(a,e,"areaStyle");var h=e.getModel("areaStyle"),f=h.isEmpty()&&h.parentModel.isEmpty();a.ignore=f,vt(["emphasis","select","blur"],(function(t){var n=e.getModel([t,"areaStyle"]),i=n.isEmpty()&&n.parentModel.isEmpty();a.ensureState(t).ignore=i&&f})),a.useStyle(lt(h.getAreaStyle(),{fill:l,opacity:.7,decal:u.decal}));var c=e.getModel("emphasis"),v=c.getModel("itemStyle").getItemStyle();s.eachChild((function(t){if(t instanceof vs){var i=t.style;t.useStyle(ut({image:i.image,x:i.x,y:i.y,width:i.width,height:i.height},u))}else t.useStyle(u),t.setColor(l),t.style.strokeNoScale=!0;t.ensureState("emphasis").style=ot(v);var o=r.getStore().get(r.getDimensionIndex(t.__dimIdx),n);(null==o||isNaN(o))&&(o=""),Ah(t,Nh(e),{labelFetcher:r.hostModel,labelDataIndex:n,labelDimIndex:t.__dimIdx,defaultText:o,inheritColor:l,defaultOpacity:u.opacity})})),xu(t,c.get("focus"),c.get("blurScope"),c.get("disabled"))})),this._data=r},n.prototype.remove=function(){this.group.removeAll(),this._data=null},n.type="radar",n}(Id),WS=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.hasSymbolVisual=!0,i}return E(n,t),n.prototype.init=function(n){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new DM(gt(this.getData,this),gt(this.getRawData,this))},n.prototype.getInitialData=function(){return OM(this,{generateCoord:"indicator_",generateCoordCount:1/0})},n.prototype.formatTooltip=function(t){var n=this.getData(),i=this.coordinateSystem.getIndicatorAxes(),r=this.getData().getName(t),e=""===r?this.name:r,o=cd(this,t);return rd("section",{header:e,sortBlocks:!0,blocks:dt(i,(function(i){var r=n.get(n.mapDimension(i.dim),t);return rd("nameValue",{markerType:"subItem",markerColor:o,name:i.name,value:r,sortParam:r})}))})},n.prototype.getTooltipPosition=function(t){if(null!=t)for(var n=this.getData(),i=this.coordinateSystem,r=n.getValues(dt(i.dimensions,(function(t){return n.mapDimension(t)})),t),e=0,o=r.length;e<o;e++)if(!isNaN(r[e])){var a=i.getIndicatorAxes();return i.coordToPoint(a[e].dataToCoord(r[e]),e)}},n.type="series.radar",n.dependencies=["radar"],n.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},n}(gd),VS=XM.value;function jS(t,n){return lt({show:n},t)}var HS=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),n=this.get("splitNumber"),i=this.get("scale"),r=this.get("axisLine"),e=this.get("axisTick"),o=this.get("axisLabel"),a=this.get("axisName"),s=this.get(["axisName","show"]),u=this.get(["axisName","formatter"]),l=this.get("axisNameGap"),h=this.get("triggerEvent"),f=dt(this.get("indicator")||[],(function(f){null!=f.max&&f.max>0&&!f.min?f.min=0:null!=f.min&&f.min<0&&!f.max&&(f.max=0);var c=a;null!=f.color&&(c=lt({color:f.color},a));var v=at(ot(f),{boundaryGap:t,splitNumber:n,scale:i,axisLine:r,axisTick:e,axisLabel:o,name:f.text,showName:s,nameLocation:"end",nameGap:l,nameTextStyle:c,triggerEvent:h},!1);if(s||(v.name=""),Mt(u)){var d=v.name;v.name=u.replace("{value}",null!=d?d:"")}else xt(u)&&(v.name=u(v.name,v));var p=new qh(v,null,this.ecModel);return ft(p,tb.prototype),p.mainType="radar",p.componentIndex=this.componentIndex,p}),this);this._indicatorModels=f},n.prototype.getIndicatorModels=function(){return this._indicatorModels},n.type="radar",n.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:at({lineStyle:{color:"#bbb"}},VS.axisLine),axisLabel:jS(VS.axisLabel,!1),axisTick:jS(VS.axisTick,!1),splitLine:jS(VS.splitLine,!0),splitArea:jS(VS.splitArea,!0),indicator:[]},n}(Jf),YS=["axisLine","axisTickLabel","axisName"],XS=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.render=function(t){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},n.prototype._buildAxes=function(t){var n=t.coordinateSystem;vt(dt(n.getIndicatorAxes(),(function(t){var i=t.model.get("showName")?t.name:"";return new hS(t.model,{axisName:i,position:[n.cx,n.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})})),(function(t){vt(YS,t.add,t),this.group.add(t.getGroup())}),this)},n.prototype._buildSplitLineAndArea=function(t){var n=t.coordinateSystem,i=n.getIndicatorAxes();if(i.length){var r=t.get("shape"),e=t.getModel("splitLine"),o=t.getModel("splitArea"),a=e.getModel("lineStyle"),s=o.getModel("areaStyle"),u=e.get("show"),l=o.get("show"),h=a.get("color"),f=s.get("color"),c=wt(h)?h:[h],v=wt(f)?f:[f],d=[],p=[];if("circle"===r)for(var m=i[0].getTicksCoords(),y=n.cx,g=n.cy,b=0;b<m.length;b++)u&&d[C(d,c,b)].push(new Ku({shape:{cx:y,cy:g,r:m[b].coord}})),l&&b<m.length-1&&p[C(p,v,b)].push(new pl({shape:{cx:y,cy:g,r0:m[b].coord,r:m[b+1].coord}}));else{var w,x=dt(i,(function(t,i){var r=t.getTicksCoords();return w=null==w?r.length-1:Math.min(r.length-1,w),dt(r,(function(t){return n.coordToPoint(t.coord,i)}))})),M=[];for(b=0;b<=w;b++){for(var S=[],k=0;k<i.length;k++)S.push(x[k][b]);S[0]&&S.push(S[0].slice()),u&&d[C(d,c,b)].push(new wl({shape:{points:S}})),l&&M&&p[C(p,v,b-1)].push(new gl({shape:{points:S.concat(M)}})),M=S.slice().reverse()}}var A=a.getLineStyle(),N=s.getAreaStyle();vt(p,(function(t,n){this.group.add(oh(t,{style:lt({stroke:"none",fill:v[n%v.length]},N),silent:!0}))}),this),vt(d,(function(t,n){this.group.add(oh(t,{style:lt({fill:"none",stroke:c[n%c.length]},A),silent:!0}))}),this)}function C(t,n,i){var r=i%n.length;return t[r]=t[r]||[],r}},n.type="radar",n}(Nd),GS=function(t){function n(n,i,r){var e=t.call(this,n,i,r)||this;return e.type="value",e.angle=0,e.name="",e}return E(n,t),n}(xb),US=function(){function t(t,n,i){this.dimensions=[],this._model=t,this._indicatorAxes=dt(t.getIndicatorModels(),(function(t,n){var i="indicator_"+n,r=new GS(i,new lg);return r.name=t.get("name"),r.model=t,t.axis=r,this.dimensions.push(i),r}),this),this.resize(t,i)}return t.prototype.getIndicatorAxes=function(){return this._indicatorAxes},t.prototype.dataToPoint=function(t,n){return this.coordToPoint(this._indicatorAxes[n].dataToCoord(t),n)},t.prototype.coordToPoint=function(t,n){var i=this._indicatorAxes[n].angle;return[this.cx+t*Math.cos(i),this.cy-t*Math.sin(i)]},t.prototype.pointToData=function(t){var n=t[0]-this.cx,i=t[1]-this.cy,r=Math.sqrt(n*n+i*i);n/=r,i/=r;for(var e,o=Math.atan2(-i,n),a=1/0,s=-1,u=0;u<this._indicatorAxes.length;u++){var l=this._indicatorAxes[u],h=Math.abs(o-l.angle);h<a&&(e=l,s=u,a=h)}return[s,+(e&&e.coordToData(r))]},t.prototype.resize=function(t,n){var i=t.get("center"),r=n.getWidth(),e=n.getHeight(),o=Math.min(r,e)/2;this.cx=Fe(i[0],r),this.cy=Fe(i[1],e),this.startAngle=t.get("startAngle")*Math.PI/180;var a=t.get("radius");(Mt(a)||kt(a))&&(a=[0,a]),this.r0=Fe(a[0],o),this.r=Fe(a[1],o),vt(this._indicatorAxes,(function(t,n){t.setExtent(this.r0,this.r);var i=this.startAngle+n*Math.PI*2/this._indicatorAxes.length;i=Math.atan2(Math.sin(i),Math.cos(i)),t.angle=i}),this)},t.prototype.update=function(t){var n=this._indicatorAxes,i=this._model;vt(n,(function(t){t.scale.setExtent(1/0,-1/0)})),t.eachSeriesByType("radar",(function(r){if("radar"===r.get("coordinateSystem")&&t.getComponent("radar",r.get("radarIndex"))===i){var e=r.getData();vt(n,(function(t){t.scale.unionExtentFromData(e,e.mapDimension(t.dim))}))}}),this);var r=i.get("splitNumber"),e=new lg;e.setExtent(0,r),e.setInterval(1),vt(n,(function(t){eS(t.scale,t.model,e)}))},t.prototype.convertToPixel=function(){return console.warn("Not implemented."),null},t.prototype.convertFromPixel=function(){return console.warn("Not implemented."),null},t.prototype.containPoint=function(){return console.warn("Not implemented."),!1},t.create=function(n,i){var r=[];return n.eachComponent("radar",(function(e){var o=new t(e,n,i);r.push(o),e.coordinateSystem=o})),n.eachSeriesByType("radar",(function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=r[t.get("radarIndex")||0])})),r},t.dimensions=[],t}();function ZS(t){t.registerCoordinateSystem("radar",US),t.registerComponentModel(HS),t.registerComponentView(XS),t.registerVisual({seriesType:"radar",reset:function(t){var n=t.getData();n.each((function(t){n.setItemVisual(t,"legendIcon","roundRect")})),n.setVisual("legendIcon","roundRect")}})}var qS="\0_ec_interaction_mutex";function $S(t,n){return!!KS(t)[n]}function KS(t){return t[qS]||(t[qS]={})}ay({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Gt);var JS=function(t){function n(n){var i=t.call(this)||this;i._zr=n;var r=gt(i._mousedownHandler,i),e=gt(i._mousemoveHandler,i),o=gt(i._mouseupHandler,i),a=gt(i._mousewheelHandler,i),s=gt(i._pinchHandler,i);return i.enable=function(t,i){this.disable(),this._opt=lt(ot(i)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(n.on("mousedown",r),n.on("mousemove",e),n.on("mouseup",o)),!0!==t&&"scale"!==t&&"zoom"!==t||(n.on("mousewheel",a),n.on("pinch",s))},i.disable=function(){n.off("mousedown",r),n.off("mousemove",e),n.off("mouseup",o),n.off("mousewheel",a),n.off("pinch",s)},i}return E(n,t),n.prototype.isDragging=function(){return this._dragging},n.prototype.isPinching=function(){return this._pinching},n.prototype.setPointerChecker=function(t){this.pointerChecker=t},n.prototype.dispose=function(){this.disable()},n.prototype._mousedownHandler=function(t){if(!(On(t)||t.target&&t.target.draggable)){var n=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,n,i)&&(this._x=n,this._y=i,this._dragging=!0)}},n.prototype._mousemoveHandler=function(t){if(this._dragging&&nk("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!$S(this._zr,"globalPan")){var n=t.offsetX,i=t.offsetY,r=this._x,e=this._y,o=n-r,a=i-e;this._x=n,this._y=i,this._opt.preventDefaultMouseMove&&Ln(t.event),tk(this,"pan","moveOnMouseMove",t,{dx:o,dy:a,oldX:r,oldY:e,newX:n,newY:i,isAvailableBehavior:null})}},n.prototype._mouseupHandler=function(t){On(t)||(this._dragging=!1)},n.prototype._mousewheelHandler=function(t){var n=nk("zoomOnMouseWheel",t,this._opt),i=nk("moveOnMouseWheel",t,this._opt),r=t.wheelDelta,e=Math.abs(r),o=t.offsetX,a=t.offsetY;if(0!==r&&(n||i)){if(n){var s=e>3?1.4:e>1?1.2:1.1;QS(this,"zoom","zoomOnMouseWheel",t,{scale:r>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(i){var u=Math.abs(r);QS(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(r>0?1:-1)*(u>3?.4:u>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},n.prototype._pinchHandler=function(t){$S(this._zr,"globalPan")||QS(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},n}(mn);function QS(t,n,i,r,e){t.pointerChecker&&t.pointerChecker(r,e.originX,e.originY)&&(Ln(r.event),tk(t,n,i,r,e))}function tk(t,n,i,r,e){e.isAvailableBehavior=gt(nk,null,i,r),t.trigger(n,e)}function nk(t,n,i){var r=i[t];return!t||r&&(!Mt(r)||n.event[r+"Key"])}function ik(t,n,i){var r=t.target;r.x+=n,r.y+=i,r.dirty()}function rk(t,n,i,r){var e=t.target,o=t.zoomLimit,a=t.zoom=t.zoom||1;if(a*=n,o){var s=o.min||0;a=Math.max(Math.min(o.max||1/0,a),s)}var u=a/t.zoom;t.zoom=a,e.x-=(i-e.x)*(u-1),e.y-=(r-e.y)*(u-1),e.scaleX*=u,e.scaleY*=u,e.dirty()}var ek,ok={axisPointer:1,tooltip:1,brush:1};function ak(t,n,i){var r=n.getComponentByElement(t.topTarget),e=r&&r.coordinateSystem;return r&&r!==i&&!ok.hasOwnProperty(r.mainType)&&e&&e.model!==i}function sk(t){Mt(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));var n=t;for(9===n.nodeType&&(n=n.firstChild);"svg"!==n.nodeName.toLowerCase()||1!==n.nodeType;)n=n.nextSibling;return n}var uk={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},lk=yt(uk),hk={"alignment-baseline":"textBaseline","stop-color":"stopColor"},fk=yt(hk),ck=function(){function t(){this._defs={},this._root=null}return t.prototype.parse=function(t,n){n=n||{};var i=sk(t);this._defsUsePending=[];var r=new Oe;this._root=r;var e=[],o=i.getAttribute("viewBox")||"",a=parseFloat(i.getAttribute("width")||n.width),s=parseFloat(i.getAttribute("height")||n.height);isNaN(a)&&(a=null),isNaN(s)&&(s=null),gk(i,r,null,!0,!1);for(var u,l,h=i.firstChild;h;)this._parseNode(h,r,e,null,!1,!1),h=h.nextSibling;if(function(t,n){for(var i=0;i<n.length;i++){var r=n[i];r[0].style[r[1]]=t[r[2]]}}(this._defs,this._defsUsePending),this._defsUsePending=[],o){var f=Mk(o);f.length>=4&&(u={x:parseFloat(f[0]||0),y:parseFloat(f[1]||0),width:parseFloat(f[2]),height:parseFloat(f[3])})}if(u&&null!=a&&null!=s&&(l=Ck(u,{x:0,y:0,width:a,height:s}),!n.ignoreViewBox)){var c=r;(r=new Oe).add(c),c.scaleX=c.scaleY=l.scale,c.x=l.x,c.y=l.y}return n.ignoreRootClip||null==a||null==s||r.setClipPath(new ws({shape:{x:0,y:0,width:a,height:s}})),{root:r,width:a,height:s,viewBoxRect:u,viewBoxTransform:l,named:e}},t.prototype._parseNode=function(t,n,i,r,e,o){var a,s=t.nodeName.toLowerCase(),u=r;if("defs"===s&&(e=!0),"text"===s&&(o=!0),"defs"===s||"switch"===s)a=n;else{if(!e){var l=ek[s];if(l&&Xt(ek,s)){a=l.call(this,t,n);var h=t.getAttribute("name");if(h){var f={name:h,namedFrom:null,svgNodeTagLower:s,el:a};i.push(f),"g"===s&&(u=f)}else r&&i.push({name:r.name,namedFrom:r,svgNodeTagLower:s,el:a});n.add(a)}}var c=vk[s];if(c&&Xt(vk,s)){var v=c.call(this,t),d=t.getAttribute("id");d&&(this._defs[d]=v)}}if(a&&a.isGroup)for(var p=t.firstChild;p;)1===p.nodeType?this._parseNode(p,a,i,u,e,o):3===p.nodeType&&o&&this._parseText(p,a),p=p.nextSibling},t.prototype._parseText=function(t,n){var i=new hs({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});mk(n,i),gk(t,i,this._defsUsePending,!1,!1),function(t,n){var i=n.__selfStyle;if(i){var r=i.textBaseline,e=r;r&&"auto"!==r?"baseline"===r?e="alphabetic":"before-edge"===r||"text-before-edge"===r?e="top":"after-edge"===r||"text-after-edge"===r?e="bottom":"central"!==r&&"mathematical"!==r||(e="middle"):e="alphabetic",t.style.textBaseline=e}var o=n.__inheritedStyle;if(o){var a=o.textAlign,s=a;a&&("middle"===a&&(s="center"),t.style.textAlign=s)}}(i,n);var r=i.style,e=r.fontSize;e&&e<9&&(r.fontSize=9,i.scaleX*=e/9,i.scaleY*=e/9);var o=(r.fontSize||r.fontFamily)&&[r.fontStyle,r.fontWeight,(r.fontSize||12)+"px",r.fontFamily||"sans-serif"].join(" ");r.font=o;var a=i.getBoundingRect();return this._textX+=a.width,n.add(i),i},t.internalField=void(ek={g:function(t,n){var i=new Oe;return mk(n,i),gk(t,i,this._defsUsePending,!1,!1),i},rect:function(t,n){var i=new ws;return mk(n,i),gk(t,i,this._defsUsePending,!1,!1),i.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),i.silent=!0,i},circle:function(t,n){var i=new Ku;return mk(n,i),gk(t,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),i.silent=!0,i},line:function(t,n){var i=new Sl;return mk(n,i),gk(t,i,this._defsUsePending,!1,!1),i.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),i.silent=!0,i},ellipse:function(t,n){var i=new Qu;return mk(n,i),gk(t,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),i.silent=!0,i},polygon:function(t,n){var i,r=t.getAttribute("points");r&&(i=yk(r));var e=new gl({shape:{points:i||[]},silent:!0});return mk(n,e),gk(t,e,this._defsUsePending,!1,!1),e},polyline:function(t,n){var i,r=t.getAttribute("points");r&&(i=yk(r));var e=new wl({shape:{points:i||[]},silent:!0});return mk(n,e),gk(t,e,this._defsUsePending,!1,!1),e},image:function(t,n){var i=new vs;return mk(n,i),gk(t,i,this._defsUsePending,!1,!1),i.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),i.silent=!0,i},text:function(t,n){var i=t.getAttribute("x")||"0",r=t.getAttribute("y")||"0",e=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(i)+parseFloat(e),this._textY=parseFloat(r)+parseFloat(o);var a=new Oe;return mk(n,a),gk(t,a,this._defsUsePending,!1,!0),a},tspan:function(t,n){var i=t.getAttribute("x"),r=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=r&&(this._textY=parseFloat(r));var e=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",a=new Oe;return mk(n,a),gk(t,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(e),this._textY+=parseFloat(o),a},path:function(t,n){var i=Zu(t.getAttribute("d")||"");return mk(n,i),gk(t,i,this._defsUsePending,!1,!1),i.silent=!0,i}}),t}(),vk={lineargradient:function(t){var n=parseInt(t.getAttribute("x1")||"0",10),i=parseInt(t.getAttribute("y1")||"0",10),r=parseInt(t.getAttribute("x2")||"10",10),e=parseInt(t.getAttribute("y2")||"0",10),o=new Ol(n,i,r,e);return dk(t,o),pk(t,o),o},radialgradient:function(t){var n=parseInt(t.getAttribute("cx")||"0",10),i=parseInt(t.getAttribute("cy")||"0",10),r=parseInt(t.getAttribute("r")||"0",10),e=new Dl(n,i,r);return dk(t,e),pk(t,e),e}};function dk(t,n){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(n.global=!0)}function pk(t,n){for(var i=t.firstChild;i;){if(1===i.nodeType&&"stop"===i.nodeName.toLocaleLowerCase()){var r,e=i.getAttribute("offset");r=e&&e.indexOf("%")>0?parseInt(e,10)/100:e?parseFloat(e):0;var o={};Nk(i,o,o);var a=o.stopColor||i.getAttribute("stop-color")||"#000000";n.colorStops.push({offset:r,color:a})}i=i.nextSibling}}function mk(t,n){t&&t.__inheritedStyle&&(n.__inheritedStyle||(n.__inheritedStyle={}),lt(n.__inheritedStyle,t.__inheritedStyle))}function yk(t){for(var n=Mk(t),i=[],r=0;r<n.length;r+=2){var e=parseFloat(n[r]),o=parseFloat(n[r+1]);i.push([e,o])}return i}function gk(t,n,i,r,e){var o=n,a=o.__inheritedStyle=o.__inheritedStyle||{},s={};1===t.nodeType&&(function(t,n){var i=t.getAttribute("transform");if(i){i=i.replace(/,/g," ");var r=[],e=null;i.replace(Sk,(function(t,n,i){return r.push(n,i),""}));for(var o=r.length-1;o>0;o-=2){var a=r[o-1],s=Mk(r[o]);switch(e=e||[1,0,0,1,0,0],a){case"translate":Xr(e,e,[parseFloat(s[0]),parseFloat(s[1]||"0")]);break;case"scale":Ur(e,e,[parseFloat(s[0]),parseFloat(s[1]||s[0])]);break;case"rotate":Gr(e,e,-parseFloat(s[0])*kk);break;case"skewX":Yr(e,[1,0,Math.tan(parseFloat(s[0])*kk),1,0,0],e);break;case"skewY":Yr(e,[1,Math.tan(parseFloat(s[0])*kk),0,1,0,0],e);break;case"matrix":e[0]=parseFloat(s[0]),e[1]=parseFloat(s[1]),e[2]=parseFloat(s[2]),e[3]=parseFloat(s[3]),e[4]=parseFloat(s[4]),e[5]=parseFloat(s[5])}}n.setLocalTransform(e)}}(t,n),Nk(t,a,s),r||function(t,n,i){for(var r=0;r<lk.length;r++)null!=(o=t.getAttribute(e=lk[r]))&&(n[uk[e]]=o);for(r=0;r<fk.length;r++){var e,o;null!=(o=t.getAttribute(e=fk[r]))&&(i[hk[e]]=o)}}(t,a,s)),o.style=o.style||{},null!=a.fill&&(o.style.fill=wk(o,"fill",a.fill,i)),null!=a.stroke&&(o.style.stroke=wk(o,"stroke",a.stroke,i)),vt(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(t){null!=a[t]&&(o.style[t]=parseFloat(a[t]))})),vt(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],(function(t){null!=a[t]&&(o.style[t]=a[t])})),e&&(o.__selfStyle=s),a.lineDash&&(o.style.lineDash=dt(Mk(a.lineDash),(function(t){return parseFloat(t)}))),"hidden"!==a.visibility&&"collapse"!==a.visibility||(o.invisible=!0),"none"===a.display&&(o.ignore=!0)}var bk=/^url\(\s*#(.*?)\)/;function wk(t,n,i,r){var e=i&&i.match(bk);if(!e)return"none"===i&&(i=null),i;var o=Ft(e[1]);r.push([t,n,o])}var xk=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Mk(t){return t.match(xk)||[]}var Sk=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,kk=Math.PI/180,Ak=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Nk(t,n,i){var r,e=t.getAttribute("style");if(e)for(Ak.lastIndex=0;null!=(r=Ak.exec(e));){var o=r[1],a=Xt(uk,o)?uk[o]:null;a&&(n[a]=r[2]);var s=Xt(hk,o)?hk[o]:null;s&&(i[s]=r[2])}}function Ck(t,n){var i=Math.min(n.width/t.width,n.height/t.height);return{scale:i,x:-(t.x+t.width/2)*i+(n.x+n.width/2),y:-(t.y+t.height/2)*i+(n.y+n.height/2)}}for(var Tk=Vt(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),zk=function(){function t(t,n){this.type="geoSVG",this._usedGraphicMap=Vt(),this._freedGraphics=[],this._mapName=t,this._parsedXML=sk(n)}return t.prototype.load=function(){var t=this._firstGraphic;if(!t){t=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(t),this._boundingRect=this._firstGraphic.boundingRect.clone();var n=function(t){var n=[],i=Vt();return vt(t,(function(t){if(null==t.namedFrom){var r=new hb(t.name,t.el);n.push(r),i.set(t.name,r)}})),{regions:n,regionsMap:i}}(t.named),i=n.regionsMap;this._regions=n.regions,this._regionsMap=i}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},t.prototype._buildGraphic=function(t){var n,i,r,e;try{Bt(null!=(i=(n=t&&(r=t,e={ignoreViewBox:!0,ignoreRootClip:!0},(new ck).parse(r,e))||{}).root))}catch(t){throw new Error("Invalid svg format\n"+t.message)}var o=new Oe;o.add(i),o.isGeoSVGGraphicRoot=!0;var a=n.width,s=n.height,u=n.viewBoxRect,l=this._boundingRect;if(!l){var h=void 0,f=void 0,c=void 0,v=void 0;if(null!=a?(h=0,c=a):u&&(h=u.x,c=u.width),null!=s?(f=0,v=s):u&&(f=u.y,v=u.height),null==h||null==f){var d=i.getBoundingRect();null==h&&(h=d.x,c=d.width),null==f&&(f=d.y,v=d.height)}l=this._boundingRect=new ve(h,f,c,v)}if(u){var p=Ck(u,l);i.scaleX=i.scaleY=p.scale,i.x=p.x,i.y=p.y}o.setClipPath(new ws({shape:l.plain()}));var m=[];return vt(n.named,(function(t){var n;null!=Tk.get(t.svgNodeTagLower)&&(m.push(t),(n=t.el).silent=!1,n.isGroup&&n.traverse((function(t){t.silent=!1})))})),{root:o,boundingRect:l,named:m}},t.prototype.useGraphic=function(t){var n=this._usedGraphicMap,i=n.get(t);return i||(i=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),n.set(t,i),i)},t.prototype.freeGraphic=function(t){var n=this._usedGraphicMap,i=n.get(t);i&&(n.removeKey(t),this._freedGraphics.push(i))},t}(),Ik=[126,25],Lk=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],Ok=0;Ok<Lk.length;Ok++)for(var Dk=0;Dk<Lk[Ok].length;Dk++)Lk[Ok][Dk][0]/=10.5,Lk[Ok][Dk][1]/=-14,Lk[Ok][Dk][0]+=Ik[0],Lk[Ok][Dk][1]+=Ik[1];var Rk={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]},_k=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],Bk=function(){function t(t,n,i){var r;this.type="geoJSON",this._parsedMap=Vt(),this._mapName=t,this._specialAreas=i,this._geoJSON=Mt(r=n)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}return t.prototype.load=function(t,n){var i=this._parsedMap.get(n=n||"name");if(!i){var r=this._parseToRegions(n);i=this._parsedMap.set(n,{regions:r,boundingRect:Fk(r)})}var e=Vt(),o=[];return vt(i.regions,(function(n){var i=n.name;t&&Xt(t,i)&&(n=n.cloneShallow(i=t[i])),o.push(n),e.set(i,n)})),{regions:o,boundingRect:i.boundingRect||new ve(0,0,0,0),regionsMap:e}},t.prototype._parseToRegions=function(t){var n,i=this._mapName,r=this._geoJSON;try{n=r?function(t,n){return dt(mt((t=function(t){if(!t.UTF8Encoding)return t;var n=t,i=n.UTF8Scale;return null==i&&(i=1024),vt(n.features,(function(t){var n=t.geometry,r=n.encodeOffsets,e=n.coordinates;if(r)switch(n.type){case"LineString":n.coordinates=cb(e,r,i);break;case"Polygon":case"MultiLineString":fb(e,r,i);break;case"MultiPolygon":vt(e,(function(t,n){return fb(t,r[n],i)}))}})),n.UTF8Encoding=!1,n}(t)).features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var i=t.properties,r=t.geometry,e=[];switch(r.type){case"Polygon":var o=r.coordinates;e.push(new sb(o[0],o.slice(1)));break;case"MultiPolygon":vt(r.coordinates,(function(t){t[0]&&e.push(new sb(t[0],t.slice(1)))}));break;case"LineString":e.push(new ub([r.coordinates]));break;case"MultiLineString":e.push(new ub(r.coordinates))}var a=new lb(i[n||"name"],e,i.cp);return a.properties=i,a}))}(r,t):[]}catch(t){throw new Error("Invalid geoJson format\n"+t.message)}return function(t,n){if("china"===t){for(var i=0;i<n.length;i++)if("南海诸岛"===n[i].name)return;n.push(new lb("南海诸岛",dt(Lk,(function(t){return{type:"polygon",exterior:t}})),Ik))}}(i,n),vt(n,(function(t){var n=t.name;!function(t,n){if("china"===t){var i=Rk[n.name];if(i){var r=n.getCenter();r[0]+=i[0]/10.5,r[1]+=-i[1]/14,n.setCenter(r)}}}(i,t),function(t,n){"china"===t&&"台湾"===n.name&&n.geometries.push({type:"polygon",exterior:_k[0]})}(i,t);var r=this._specialAreas&&this._specialAreas[n];r&&t.transformTo(r.left,r.top,r.width,r.height)}),this),n},t.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},t}();function Fk(t){for(var n,i=0;i<t.length;i++){var r=t[i].getBoundingRect();(n=n||r.clone()).union(r)}return n}var Ek=Vt();const Pk=function(t){return Ek.get(t)},Wk=function(t,n,i){var r=Ek.get(t);if(r)return r.load(n,i)};var Vk=["rect","circle","line","ellipse","polygon","polyline","path"],jk=Vt(Vk),Hk=Vt(Vk.concat(["g"])),Yk=Vt(Vk.concat(["g"])),Xk=yo();function Gk(t){var n=t.getItemStyle(),i=t.get("areaColor");return null!=i&&(n.fill=i),n}function Uk(t){var n=t.style;n&&(n.stroke=n.stroke||n.fill,n.fill=null)}var Zk=function(){function t(t){var n=new Oe;this.uid=Kh("ec_map_draw"),this._controller=new JS(t.getZr()),this._controllerHost={target:n},this.group=n,n.add(this._regionsGroup=new Oe),n.add(this._svgGroup=new Oe)}return t.prototype.draw=function(t,n,i,r,e){var o="geo"===t.mainType,a=t.getData&&t.getData();o&&n.eachComponent({mainType:"series",subType:"map"},(function(n){a||n.getHostGeoModel()!==t||(a=n.getData())}));var s=t.coordinateSystem,u=this._regionsGroup,l=this.group,h=s.getTransformInfo(),f=h.raw,c=h.roam;!u.childAt(0)||e?(l.x=c.x,l.y=c.y,l.scaleX=c.scaleX,l.scaleY=c.scaleY,l.dirty()):Yl(l,c,t);var v=a&&a.getVisual("visualMeta")&&a.getVisual("visualMeta").length>0,d={api:i,geo:s,mapOrGeoModel:t,data:a,isVisualEncodedByVisualMap:v,isGeo:o,transformInfoRaw:f};"geoJSON"===s.resourceType?this._buildGeoJSON(d):"geoSVG"===s.resourceType&&this._buildSVG(d),this._updateController(t,n,i),this._updateMapSelectHandler(t,u,i,r)},t.prototype._buildGeoJSON=function(t){var n=this._regionsGroupByName=Vt(),i=Vt(),r=this._regionsGroup,e=t.transformInfoRaw,o=t.mapOrGeoModel,a=t.data,s=t.geo.projection,u=s&&s.stream;function l(t,n){return n&&(t=n(t)),t&&[t[0]*e.scaleX+e.x,t[1]*e.scaleY+e.y]}function h(t){for(var n=[],i=!u&&s&&s.project,r=0;r<t.length;++r){var e=l(t[r],i);e&&n.push(e)}return n}function f(t){return{shape:{points:h(t)}}}r.removeAll(),vt(t.geo.regions,(function(e){var h=e.name,c=n.get(h),v=i.get(h)||{},d=v.dataIdx,p=v.regionModel;c||(c=n.set(h,new Oe),r.add(c),d=a?a.indexOfName(h):null,p=t.isGeo?o.getRegionModel(h):a?a.getItemModel(d):null,i.set(h,{dataIdx:d,regionModel:p}));var m=[],y=[];vt(e.geometries,(function(t){if("polygon"===t.type){var n=[t.exterior].concat(t.interiors||[]);u&&(n=tA(n,u)),vt(n,(function(t){m.push(new gl(f(t)))}))}else{var i=t.points;u&&(i=tA(i,u,!0)),vt(i,(function(t){y.push(new wl(f(t)))}))}}));var g=l(e.getCenter(),s&&s.project);function b(n,i){if(n.length){var r=new Il({culling:!0,segmentIgnoreThreshold:1,shape:{paths:n}});c.add(r),qk(t,r,d,p),$k(t,r,h,p,o,d,g),i&&(Uk(r),vt(r.states,Uk))}}b(m),b(y,!0)})),n.each((function(n,r){var e=i.get(r),a=e.regionModel;Kk(t,n,r,a,o,e.dataIdx),Jk(t,n,r,a,o),Qk(t,n,r,a,o)}),this)},t.prototype._buildSVG=function(t){var n=t.geo.map,i=t.transformInfoRaw;this._svgGroup.x=i.x,this._svgGroup.y=i.y,this._svgGroup.scaleX=i.scaleX,this._svgGroup.scaleY=i.scaleY,this._svgResourceChanged(n)&&(this._freeSVG(),this._useSVG(n));var r=this._svgDispatcherMap=Vt(),e=!1;vt(this._svgGraphicRecord.named,(function(n){var i=n.name,o=t.mapOrGeoModel,a=t.data,s=n.svgNodeTagLower,u=n.el,l=a?a.indexOfName(i):null,h=o.getRegionModel(i);null!=jk.get(s)&&u instanceof aa&&qk(t,u,l,h),u instanceof aa&&(u.culling=!0),u.z2EmphasisLift=0,n.namedFrom||(null!=Yk.get(s)&&$k(t,u,i,h,o,l,null),Kk(t,u,i,h,o,l),Jk(t,u,i,h,o),null!=Hk.get(s)&&("self"===Qk(t,u,i,h,o)&&(e=!0),(r.get(i)||r.set(i,[])).push(u)))}),this),this._enableBlurEntireSVG(e,t)},t.prototype._enableBlurEntireSVG=function(t,n){if(t&&n.isGeo){var i=n.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle().opacity;this._svgGraphicRecord.root.traverse((function(t){if(!t.isGroup){eu(t);var n=t.ensureState("blur").style||{};null==n.opacity&&null!=i&&(n.opacity=i),t.ensureState("emphasis")}}))}},t.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},t.prototype.findHighDownDispatchers=function(t,n){if(null==t)return[];var i=n.coordinateSystem;if("geoJSON"===i.resourceType){var r=this._regionsGroupByName;if(r){var e=r.get(t);return e?[e]:[]}}else if("geoSVG"===i.resourceType)return this._svgDispatcherMap&&this._svgDispatcherMap.get(t)||[]},t.prototype._svgResourceChanged=function(t){return this._svgMapName!==t},t.prototype._useSVG=function(t){var n=Pk(t);if(n&&"geoSVG"===n.type){var i=n.useGraphic(this.uid);this._svgGroup.add(i.root),this._svgGraphicRecord=i,this._svgMapName=t}},t.prototype._freeSVG=function(){var t=this._svgMapName;if(null!=t){var n=Pk(t);n&&"geoSVG"===n.type&&n.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},t.prototype._updateController=function(t,n,i){var r=t.coordinateSystem,e=this._controller,o=this._controllerHost;o.zoomLimit=t.get("scaleLimit"),o.zoom=r.getZoom(),e.enable(t.get("roam")||!1);var a=t.mainType;function s(){var n={type:"geoRoam",componentType:a};return n[a+"Id"]=t.id,n}e.off("pan").on("pan",(function(t){this._mouseDownFlag=!1,ik(o,t.dx,t.dy),i.dispatchAction(ut(s(),{dx:t.dx,dy:t.dy,animation:{duration:0}}))}),this),e.off("zoom").on("zoom",(function(t){this._mouseDownFlag=!1,rk(o,t.scale,t.originX,t.originY),i.dispatchAction(ut(s(),{zoom:t.scale,originX:t.originX,originY:t.originY,animation:{duration:0}}))}),this),e.setPointerChecker((function(n,e,o){return r.containPoint([e,o])&&!ak(n,i,t)}))},t.prototype.resetForLabelLayout=function(){this.group.traverse((function(t){var n=t.getTextContent();n&&(n.ignore=Xk(n).ignore)}))},t.prototype._updateMapSelectHandler=function(t,n){var i=this;n.off("mousedown"),n.off("click"),t.get("selectedMode")&&(n.on("mousedown",(function(){i._mouseDownFlag=!0})),n.on("click",(function(){i._mouseDownFlag&&(i._mouseDownFlag=!1)})))},t}();function qk(t,n,i,r){var e=r.getModel("itemStyle"),o=r.getModel(["emphasis","itemStyle"]),a=r.getModel(["blur","itemStyle"]),s=r.getModel(["select","itemStyle"]),u=Gk(e),l=Gk(o),h=Gk(s),f=Gk(a),c=t.data;if(c){var v=c.getItemVisual(i,"style"),d=c.getItemVisual(i,"decal");t.isVisualEncodedByVisualMap&&v.fill&&(u.fill=v.fill),d&&(u.decal=hm(d,t.api))}n.setStyle(u),n.style.strokeNoScale=!0,n.ensureState("emphasis").style=l,n.ensureState("select").style=h,n.ensureState("blur").style=f,eu(n)}function $k(t,n,i,r,e,o,a){var s=t.data,u=t.isGeo,l=s&&isNaN(s.get(s.mapDimension("value"),o)),h=s&&s.getItemLayout(o);if(u||l||h&&h.showLabel){var f=u?i:o,c=void 0;(!s||o>=0)&&(c=e);var v=a?{normal:{align:"center",verticalAlign:"middle"}}:null;Ah(n,Nh(r),{labelFetcher:c,labelDataIndex:f,defaultText:i},v);var d=n.getTextContent();if(d&&(Xk(d).ignore=d.ignore,n.textConfig&&a)){var p=n.getBoundingRect().clone();n.textConfig.layoutRect=p,n.textConfig.position=[(a[0]-p.x)/p.width*100+"%",(a[1]-p.y)/p.height*100+"%"]}n.disableLabelAnimation=!0}else n.removeTextContent(),n.removeTextConfig(),n.disableLabelAnimation=null}function Kk(t,n,i,r,e,o){t.data?t.data.setItemGraphicEl(o,n):Bs(n).eventData={componentType:"geo",componentIndex:e.componentIndex,geoIndex:e.componentIndex,name:i,region:r&&r.option||{}}}function Jk(t,n,i,r,e){t.data||gh({el:n,componentModel:e,itemName:i,itemTooltipOption:r.get("tooltip")})}function Qk(t,n,i,r,e){n.highDownSilentOnTouch=!!e.get("selectedMode");var o=r.getModel("emphasis"),a=o.get("focus");return xu(n,a,o.get("blurScope"),o.get("disabled")),t.isGeo&&function(t,n,i){var r=Bs(t);r.componentMainType=n.mainType,r.componentIndex=n.componentIndex,r.componentHighDownName=i}(n,e,i),a}function tA(t,n,i){var r,e=[];function o(){r=[]}function a(){r.length&&(e.push(r),r=[])}var s=n({polygonStart:o,polygonEnd:a,lineStart:o,lineEnd:a,point:function(t,n){isFinite(t)&&isFinite(n)&&r.push([t,n])},sphere:function(){}});return!i&&s.polygonStart(),vt(t,(function(t){s.lineStart();for(var n=0;n<t.length;n++)s.point(t[n][0],t[n][1]);s.lineEnd()})),!i&&s.polygonEnd(),e}var nA=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.render=function(t,n,i,r){if(!r||"mapToggleSelect"!==r.type||r.from!==this.uid){var e=this.group;if(e.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&r&&"geoRoam"===r.type&&this._mapDraw.resetForLabelLayout(),r&&"geoRoam"===r.type&&"series"===r.componentType&&r.seriesId===t.id)(o=this._mapDraw)&&e.add(o.group);else if(t.needsDrawMap){var o=this._mapDraw||new Zk(i);e.add(o.group),o.draw(t,n,i,this,r),this._mapDraw=o}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&n.getComponent("legend")&&this._renderSymbols(t,n,i)}}},n.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},n.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},n.prototype._renderSymbols=function(t){var n=t.originalData,i=this.group;n.each(n.mapDimension("value"),(function(r,e){if(!isNaN(r)){var o=n.getItemLayout(e);if(o&&o.point){var a=o.point,s=o.offset,u=new Ku({style:{fill:t.getData().getVisual("style").fill},shape:{cx:a[0]+9*s,cy:a[1],r:3},silent:!0,z2:8+(s?0:11)});if(!s){var l=t.mainSeries.getData(),h=n.getName(e),f=l.indexOfName(h),c=n.getItemModel(e),v=c.getModel("label"),d=l.getItemGraphicEl(f);Ah(u,Nh(c),{labelFetcher:{getFormattedLabel:function(n,i){return t.getFormattedLabel(f,i)}},defaultText:h}),u.disableLabelAnimation=!0,v.get("position")||u.setTextConfig({position:"bottom"}),d.onHoverStateChange=function(t){iu(u,t)}}i.add(u)}}}))},n.type="map",n}(Id),iA=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.needsDrawMap=!1,i.seriesGroup=[],i.getTooltipPosition=function(t){if(null!=t){var n=this.getData().getName(t),i=this.coordinateSystem,r=i.getRegion(n);return r&&i.dataToPoint(r.getCenter())}},i}return E(n,t),n.prototype.getInitialData=function(){for(var t=OM(this,{coordDimensions:["value"],encodeDefaulter:bt(oc,this)}),n=Vt(),i=[],r=0,e=t.count();r<e;r++){var o=t.getName(r);n.set(o,!0)}return vt(Wk(this.getMapType(),this.option.nameMap,this.option.nameProperty).regions,(function(t){var r=t.name;n.get(r)||i.push(r)})),t.appendValues([],i),t},n.prototype.getHostGeoModel=function(){var t=this.option.geoIndex;return null!=t?this.ecModel.getComponent("geo",t):null},n.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},n.prototype.getRawValue=function(t){var n=this.getData();return n.get(n.mapDimension("value"),t)},n.prototype.getRegionModel=function(t){var n=this.getData();return n.getItemModel(n.indexOfName(t))},n.prototype.formatTooltip=function(t){for(var n=this.getData(),i=this.getRawValue(t),r=n.getName(t),e=this.seriesGroup,o=[],a=0;a<e.length;a++){var s=e[a].originalData.indexOfName(r),u=n.mapDimension("value");isNaN(e[a].originalData.get(u,s))||o.push(e[a].name)}return rd("section",{header:o.join(", "),noHeader:!o.length,blocks:[rd("nameValue",{name:r,value:i})]})},n.prototype.setZoom=function(t){this.option.zoom=t},n.prototype.setCenter=function(t){this.option.center=t},n.prototype.getLegendIcon=function(t){var n=t.icon||"roundRect",i=Ep(n,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return i.setStyle(t.itemStyle),i.style.stroke="none",n.indexOf("empty")>-1&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),i},n.type="series.map",n.dependencies=["geo"],n.layoutMode="box",n.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},n}(gd);function rA(t){var n={};t.eachSeriesByType("map",(function(t){var i=t.getHostGeoModel(),r=i?"o"+i.id:"i"+t.getMapType();(n[r]=n[r]||[]).push(t)})),vt(n,(function(t){for(var n,i,r,e=(n=dt(t,(function(t){return t.getData()})),i=t[0].get("mapValueCalculation"),r={},vt(n,(function(t){t.each(t.mapDimension("value"),(function(n,i){var e="ec-"+t.getName(i);r[e]=r[e]||[],isNaN(n)||r[e].push(n)}))})),n[0].map(n[0].mapDimension("value"),(function(t,e){for(var o="ec-"+n[0].getName(e),a=0,s=1/0,u=-1/0,l=r[o].length,h=0;h<l;h++)s=Math.min(s,r[o][h]),u=Math.max(u,r[o][h]),a+=r[o][h];return 0===l?NaN:"min"===i?s:"max"===i?u:"average"===i?a/l:a}))),o=0;o<t.length;o++)t[o].originalData=t[o].getData();for(o=0;o<t.length;o++)t[o].seriesGroup=t,t[o].needsDrawMap=0===o&&!t[o].getHostGeoModel(),t[o].setData(e.cloneShallow()),t[o].mainSeries=t[0]}))}function eA(t){var n={};t.eachSeriesByType("map",(function(i){var r=i.getMapType();if(!i.getHostGeoModel()&&!n[r]){var e={};vt(i.seriesGroup,(function(n){var i=n.coordinateSystem,r=n.originalData;n.get("showLegendSymbol")&&t.getComponent("legend")&&r.each(r.mapDimension("value"),(function(t,n){var o=r.getName(n),a=i.getRegion(o);if(a&&!isNaN(t)){var s=e[o]||0,u=i.dataToPoint(a.getCenter());e[o]=s+1,r.setItemLayout(n,{point:u,offset:s})}}))}));var o=i.getData();o.each((function(t){var n=o.getName(t),i=o.getItemLayout(t)||{};i.showLabel=!e[n],o.setItemLayout(t,i)})),n[r]=!0}}))}var oA=fn,aA=function(t){function n(n){var i=t.call(this)||this;return i.type="view",i.dimensions=["x","y"],i._roamTransformable=new ne,i._rawTransformable=new ne,i.name=n,i}return E(n,t),n.prototype.setBoundingRect=function(t,n,i,r){return this._rect=new ve(t,n,i,r),this._rect},n.prototype.getBoundingRect=function(){return this._rect},n.prototype.setViewRect=function(t,n,i,r){this._transformTo(t,n,i,r),this._viewRect=new ve(t,n,i,r)},n.prototype._transformTo=function(t,n,i,r){var e=this.getBoundingRect(),o=this._rawTransformable;o.transform=e.calculateTransform(new ve(t,n,i,r));var a=o.parent;o.parent=null,o.decomposeTransform(),o.parent=a,this._updateTransform()},n.prototype.setCenter=function(t){t&&(this._center=t,this._updateCenterAndZoom())},n.prototype.setZoom=function(t){t=t||1;var n=this.zoomLimit;n&&(null!=n.max&&(t=Math.min(n.max,t)),null!=n.min&&(t=Math.max(n.min,t))),this._zoom=t,this._updateCenterAndZoom()},n.prototype.getDefaultCenter=function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},n.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},n.prototype.getZoom=function(){return this._zoom||1},n.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},n.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),n=this._roamTransformable,i=this.getDefaultCenter(),r=this.getCenter(),e=this.getZoom();r=fn([],r,t),i=fn([],i,t),n.originX=r[0],n.originY=r[1],n.x=i[0]-r[0],n.y=i[1]-r[1],n.scaleX=n.scaleY=e,this._updateTransform()},n.prototype._updateTransform=function(){var t=this._roamTransformable,n=this._rawTransformable;n.parent=t,t.updateTransform(),n.updateTransform(),Hr(this.transform||(this.transform=[]),n.transform||[1,0,0,1,0,0]),this._rawTransform=n.getLocalTransform(),this.invTransform=this.invTransform||[],Zr(this.invTransform,this.transform),this.decomposeTransform()},n.prototype.getTransformInfo=function(){var t=this._rawTransformable,n=this._roamTransformable,i=new ne;return i.transform=n.transform,i.decomposeTransform(),{roam:{x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},n.prototype.getViewRect=function(){return this._viewRect},n.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},n.prototype.dataToPoint=function(t,n,i){var r=n?this._rawTransform:this.transform;return i=i||[],r?oA(i,t,r):Kt(i,t)},n.prototype.pointToData=function(t){var n=this.invTransform;return n?oA([],t,n):[t[0],t[1]]},n.prototype.convertToPixel=function(t,n,i){var r=sA(n);return r===this?r.dataToPoint(i):null},n.prototype.convertFromPixel=function(t,n,i){var r=sA(n);return r===this?r.pointToData(i):null},n.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},n.dimensions=["x","y"],n}(ne);function sA(t){var n=t.seriesModel;return n?n.coordinateSystem:null}var uA={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},lA=["lng","lat"],hA=function(t){function n(n,i,r){var e=t.call(this,n)||this;e.dimensions=lA,e.type="geo",e._nameCoordMap=Vt(),e.map=i;var o=r.projection,a=Wk(i,r.nameMap,r.nameProperty),s=Pk(i);e.resourceType=s?s.type:null;var u,l=e.regions=a.regions,h=uA[s.type];if(e._regionsMap=a.regionsMap,e.regions=a.regions,e.projection=o,o)for(var f=0;f<l.length;f++){var c=l[f].getBoundingRect(o);(u=u||c.clone()).union(c)}else u=a.boundingRect;return e.setBoundingRect(u.x,u.y,u.width,u.height),e.aspectScale=o?1:Ot(r.aspectScale,h.aspectScale),e._invertLongitute=!o&&h.invertLongitute,e}return E(n,t),n.prototype._transformTo=function(t,n,i,r){var e=this.getBoundingRect(),o=this._invertLongitute;e=e.clone(),o&&(e.y=-e.y-e.height);var a=this._rawTransformable;a.transform=e.calculateTransform(new ve(t,n,i,r));var s=a.parent;a.parent=null,a.decomposeTransform(),a.parent=s,o&&(a.scaleY=-a.scaleY),this._updateTransform()},n.prototype.getRegion=function(t){return this._regionsMap.get(t)},n.prototype.getRegionByCoord=function(t){for(var n=this.regions,i=0;i<n.length;i++){var r=n[i];if("geoJSON"===r.type&&r.contain(t))return n[i]}},n.prototype.addGeoCoord=function(t,n){this._nameCoordMap.set(t,n)},n.prototype.getGeoCoord=function(t){var n=this._regionsMap.get(t);return this._nameCoordMap.get(t)||n&&n.getCenter()},n.prototype.dataToPoint=function(t){if(Mt(t)&&(t=this.getGeoCoord(t)),t){var n=this.projection;return n&&(t=n.project(t)),t&&this.projectedToPoint(t)}},n.prototype.pointToData=function(t){var n=this.projection;return n&&(t=n.unproject(t)),t&&this.pointToProjected(t)},n.prototype.pointToProjected=function(n){return t.prototype.pointToData.call(this,n)},n.prototype.projectedToPoint=function(n,i,r){return t.prototype.dataToPoint.call(this,n,i,r)},n.prototype.convertToPixel=function(t,n,i){var r=fA(n);return r===this?r.dataToPoint(i):null},n.prototype.convertFromPixel=function(t,n,i){var r=fA(n);return r===this?r.pointToData(i):null},n}(aA);function fA(t){var n=t.geoModel,i=t.seriesModel;return n?n.coordinateSystem:i?i.coordinateSystem||(i.getReferringComponents("geo",xo).models[0]||{}).coordinateSystem:null}function cA(t,n){var i=t.get("boundingCoords");if(null!=i){var r=i[0],e=i[1];if(isFinite(r[0])&&isFinite(r[1])&&isFinite(e[0])&&isFinite(e[1])){var o=this.projection;if(o){var a=r[0],s=r[1],u=e[0],l=e[1];r=[1/0,1/0],e=[-1/0,-1/0];var h=function(t,n,i,a){for(var s=i-t,u=a-n,l=0;l<=100;l++){var h=l/100,f=o.project([t+s*h,n+u*h]);cn(r,r,f),vn(e,e,f)}};h(a,s,u,s),h(u,s,u,l),h(u,l,a,l),h(a,l,u,s)}this.setBoundingRect(r[0],r[1],e[0]-r[0],e[1]-r[1])}}var f,c,v,d=this.getBoundingRect(),p=t.get("layoutCenter"),m=t.get("layoutSize"),y=n.getWidth(),g=n.getHeight(),b=d.width/d.height*this.aspectScale,w=!1;if(p&&m&&(f=[Fe(p[0],y),Fe(p[1],g)],c=Fe(m,Math.min(y,g)),isNaN(f[0])||isNaN(f[1])||isNaN(c)||(w=!0)),w)v={},b>1?(v.width=c,v.height=c/b):(v.height=c,v.width=c*b),v.y=f[1]-v.height/2,v.x=f[0]-v.width/2;else{var x=t.getBoxLayoutParams();x.aspect=b,v=Xf(x,{width:y,height:g})}this.setViewRect(v.x,v.y,v.width,v.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}ft(hA,aA);var vA=new(function(){function t(){this.dimensions=lA}return t.prototype.create=function(t,n){var i=[];function r(t){return{nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale"),projection:t.get("projection")}}t.eachComponent("geo",(function(t,e){var o=t.get("map"),a=new hA(o+e,o,ut({nameMap:t.get("nameMap")},r(t)));a.zoomLimit=t.get("scaleLimit"),i.push(a),t.coordinateSystem=a,a.model=t,a.resize=cA,a.resize(t,n)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var n=t.get("geoIndex")||0;t.coordinateSystem=i[n]}}));var e={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var n=t.getMapType();e[n]=e[n]||[],e[n].push(t)}})),vt(e,(function(t,e){var o=dt(t,(function(t){return t.get("nameMap")})),a=new hA(e,e,ut({nameMap:st(o)},r(t[0])));a.zoomLimit=Lt.apply(null,dt(t,(function(t){return t.get("scaleLimit")}))),i.push(a),a.resize=cA,a.resize(t[0],n),vt(t,(function(t){t.coordinateSystem=a,function(t,n){vt(n.get("geoCoord"),(function(n,i){t.addGeoCoord(i,n)}))}(a,t)}))})),i},t.prototype.getFilledRegions=function(t,n,i,r){for(var e=(t||[]).slice(),o=Vt(),a=0;a<e.length;a++)o.set(e[a].name,e[a]);return vt(Wk(n,i,r).regions,(function(t){var n=t.name;!o.get(n)&&e.push({name:n})})),e},t}()),dA=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.init=function(t,n,i){var r=Pk(t.map);if(r&&"geoJSON"===r.type){var e=t.itemStyle=t.itemStyle||{};"color"in e||(e.color="#eee")}this.mergeDefaultAndTheme(t,i),oo(t,"label",["show"])},n.prototype.optionUpdated=function(){var t=this,n=this.option;n.regions=vA.getFilledRegions(n.regions,n.map,n.nameMap,n.nameProperty);var i={};this._optionModelMap=pt(n.regions||[],(function(n,r){var e=r.name;return e&&(n.set(e,new qh(r,t,t.ecModel)),r.selected&&(i[e]=!0)),n}),Vt()),n.selectedMap||(n.selectedMap=i)},n.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new qh(null,this,this.ecModel)},n.prototype.getFormattedLabel=function(t,n){var i=this.getRegionModel(t).get("normal"===n?["label","formatter"]:["emphasis","label","formatter"]),r={name:t};return xt(i)?(r.status=n,i(r)):Mt(i)?i.replace("{a}",null!=t?t:""):void 0},n.prototype.setZoom=function(t){this.option.zoom=t},n.prototype.setCenter=function(t){this.option.center=t},n.prototype.select=function(t){var n=this.option,i=n.selectedMode;i&&("multiple"!==i&&(n.selectedMap=null),(n.selectedMap||(n.selectedMap={}))[t]=!0)},n.prototype.unSelect=function(t){var n=this.option.selectedMap;n&&(n[t]=!1)},n.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},n.prototype.isSelected=function(t){var n=this.option.selectedMap;return!(!n||!n[t])},n.type="geo",n.layoutMode="box",n.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},n}(Jf);function pA(t,n){return t.pointToProjected?t.pointToProjected(n):t.pointToData(n)}function mA(t,n,i){var r=t.getZoom(),e=t.getCenter(),o=n.zoom,a=t.projectedToPoint?t.projectedToPoint(e):t.dataToPoint(e);if(null!=n.dx&&null!=n.dy&&(a[0]-=n.dx,a[1]-=n.dy,t.setCenter(pA(t,a))),null!=o){if(i){var s=i.min||0;o=Math.max(Math.min(r*o,i.max||1/0),s)/r}t.scaleX*=o,t.scaleY*=o;var u=(n.originY-t.y)*(o-1);t.x-=(n.originX-t.x)*(o-1),t.y-=u,t.updateTransform(),t.setCenter(pA(t,a)),t.setZoom(o*r)}return{center:t.getCenter(),zoom:t.getZoom()}}var yA=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.focusBlurEnabled=!0,i}return E(n,t),n.prototype.init=function(t,n){this._api=n},n.prototype.render=function(t,n,i,r){if(this._model=t,!t.get("show"))return this._mapDraw&&this._mapDraw.remove(),void(this._mapDraw=null);this._mapDraw||(this._mapDraw=new Zk(i));var e=this._mapDraw;e.draw(t,n,i,this,r),e.group.on("click",this._handleRegionClick,this),e.group.silent=t.get("silent"),this.group.add(e.group),this.updateSelectStatus(t,n,i)},n.prototype._handleRegionClick=function(t){var n;Np(t.target,(function(t){return null!=(n=Bs(t).eventData)}),!0),n&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:n.name})},n.prototype.updateSelectStatus=function(t,n,i){var r=this;this._mapDraw.group.traverse((function(t){var n=Bs(t).eventData;if(n)return r._model.isSelected(n.name)?i.enterSelect(t):i.leaveSelect(t),!0}))},n.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},n.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},n.type="geo",n}(Nd);function gA(t,n,i){!function(t,n,i){if(n.svg){var r=new zk(t,n.svg);Ek.set(t,r)}else{var e=n.geoJson||n.geoJSON;e&&!n.features?i=n.specialAreas:e=n,r=new Bk(t,e,i),Ek.set(t,r)}}(t,n,i)}function bA(t){function n(n,i){i.update="geo:updateSelectStatus",t.registerAction(i,(function(t,i){var r={},e=[];return i.eachComponent({mainType:"geo",query:t},(function(i){i[n](t.name),vt(i.coordinateSystem.regions,(function(t){r[t.name]=i.isSelected(t.name)||!1}));var o=[];vt(r,(function(t,n){r[n]&&o.push(n)})),e.push({geoIndex:i.componentIndex,name:o})})),{selected:r,allSelected:e,name:t.name}}))}t.registerCoordinateSystem("geo",vA),t.registerComponentModel(dA),t.registerComponentView(yA),t.registerImpl("registerMap",gA),t.registerImpl("getMap",(function(t){return function(t){var n=Ek.get(t);return n&&"geoJSON"===n.type&&n.getMapForUser()}(t)})),n("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),n("select",{type:"geoSelect",event:"geoselected"}),n("unSelect",{type:"geoUnSelect",event:"geounselected"}),t.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},(function(t,n){var i=t.componentType||"series";n.eachComponent({mainType:i,query:t},(function(n){var r=n.coordinateSystem;if("geo"===r.type){var e=mA(r,t,n.get("scaleLimit"));n.setCenter&&n.setCenter(e.center),n.setZoom&&n.setZoom(e.zoom),"series"===i&&vt(n.seriesGroup,(function(t){t.setCenter(e.center),t.setZoom(e.zoom)}))}}))}))}function wA(t,n){var i=t.isExpand?t.children:[],r=t.parentNode.children,e=t.hierNode.i?r[t.hierNode.i-1]:null;if(i.length){!function(t){for(var n=t.children,i=n.length,r=0,e=0;--i>=0;){var o=n[i];o.hierNode.prelim+=r,o.hierNode.modifier+=r,r+=o.hierNode.shift+(e+=o.hierNode.change)}}(t);var o=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;e?(t.hierNode.prelim=e.hierNode.prelim+n(t,e),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else e&&(t.hierNode.prelim=e.hierNode.prelim+n(t,e));t.parentNode.hierNode.defaultAncestor=function(t,n,i,r){if(n){for(var e=t,o=t,a=o.parentNode.children[0],s=n,u=e.hierNode.modifier,l=o.hierNode.modifier,h=a.hierNode.modifier,f=s.hierNode.modifier;s=kA(s),o=AA(o),s&&o;){e=kA(e),a=AA(a),e.hierNode.ancestor=t;var c=s.hierNode.prelim+f-o.hierNode.prelim-l+r(s,o);c>0&&(CA(NA(s,t,i),t,c),l+=c,u+=c),f+=s.hierNode.modifier,l+=o.hierNode.modifier,u+=e.hierNode.modifier,h+=a.hierNode.modifier}s&&!kA(e)&&(e.hierNode.thread=s,e.hierNode.modifier+=f-u),o&&!AA(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=l-h,i=t)}return i}(t,e,t.parentNode.hierNode.defaultAncestor||r[0],n)}function xA(t){t.setLayout({x:t.hierNode.prelim+t.parentNode.hierNode.modifier},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function MA(t){return arguments.length?t:TA}function SA(t,n){return t-=Math.PI/2,{x:n*Math.cos(t),y:n*Math.sin(t)}}function kA(t){var n=t.children;return n.length&&t.isExpand?n[n.length-1]:t.hierNode.thread}function AA(t){var n=t.children;return n.length&&t.isExpand?n[0]:t.hierNode.thread}function NA(t,n,i){return t.hierNode.ancestor.parentNode===n.parentNode?t.hierNode.ancestor:i}function CA(t,n,i){var r=i/(n.hierNode.i-t.hierNode.i);n.hierNode.change-=r,n.hierNode.shift+=i,n.hierNode.modifier+=i,n.hierNode.prelim+=i,t.hierNode.change+=r}function TA(t,n){return t.parentNode===n.parentNode?1:2}var zA=function(){this.parentPoint=[],this.childPoints=[]},IA=function(t){function n(n){return t.call(this,n)||this}return E(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new zA},n.prototype.buildPath=function(t,n){var i=n.childPoints,r=i.length,e=n.parentPoint,o=i[0],a=i[r-1];if(1===r)return t.moveTo(e[0],e[1]),void t.lineTo(o[0],o[1]);var s=n.orient,u="TB"===s||"BT"===s?0:1,l=1-u,h=Fe(n.forkPosition,1),f=[];f[u]=e[u],f[l]=e[l]+(a[l]-e[l])*h,t.moveTo(e[0],e[1]),t.lineTo(f[0],f[1]),t.moveTo(o[0],o[1]),f[u]=o[u],t.lineTo(f[0],f[1]),f[u]=a[u],t.lineTo(f[0],f[1]),t.lineTo(a[0],a[1]);for(var c=1;c<r-1;c++){var v=i[c];t.moveTo(v[0],v[1]),f[u]=v[u],t.lineTo(f[0],f[1])}},n}(us),LA=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i._mainGroup=new Oe,i}return E(n,t),n.prototype.init=function(t,n){this._controller=new JS(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},n.prototype.render=function(t,n,i){var r=t.getData(),e=t.layoutInfo,o=this._mainGroup;"radial"===t.get("layout")?(o.x=e.x+e.width/2,o.y=e.y+e.height/2):(o.x=e.x,o.y=e.y),this._updateViewCoordSys(t),this._updateController(t,n,i);var a=this._data;r.diff(a).add((function(n){OA(r,n)&&DA(r,n,null,o,t)})).update((function(n,i){var e=a.getItemGraphicEl(i);OA(r,n)?DA(r,n,e,o,t):e&&BA(a,i,e,o,t)})).remove((function(n){var i=a.getItemGraphicEl(n);i&&BA(a,n,i,o,t)})).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),!0===t.get("expandAndCollapse")&&r.eachItemGraphicEl((function(n,r){n.off("click").on("click",(function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:r})}))})),this._data=r},n.prototype._updateViewCoordSys=function(t){var n=t.getData(),i=[];n.each((function(t){var r=n.getItemLayout(t);!r||isNaN(r.x)||isNaN(r.y)||i.push([+r.x,+r.y])}));var r=[],e=[];ya(i,r,e);var o=this._min,a=this._max;e[0]-r[0]==0&&(r[0]=o?o[0]:r[0]-1,e[0]=a?a[0]:e[0]+1),e[1]-r[1]==0&&(r[1]=o?o[1]:r[1]-1,e[1]=a?a[1]:e[1]+1);var s=t.coordinateSystem=new aA;s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(r[0],r[1],e[0]-r[0],e[1]-r[1]),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this.group.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY}),this._min=r,this._max=e},n.prototype._updateController=function(t,n,i){var r=this,e=this._controller,o=this._controllerHost,a=this.group;e.setPointerChecker((function(n,r,e){var o=a.getBoundingRect();return o.applyTransform(a.transform),o.contain(r,e)&&!ak(n,i,t)})),e.enable(t.get("roam")),o.zoomLimit=t.get("scaleLimit"),o.zoom=t.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",(function(n){ik(o,n.dx,n.dy),i.dispatchAction({seriesId:t.id,type:"treeRoam",dx:n.dx,dy:n.dy})})).on("zoom",(function(n){rk(o,n.scale,n.originX,n.originY),i.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:n.scale,originX:n.originX,originY:n.originY}),r._updateNodeAndLinkScale(t),i.updateLabelLayout()}))},n.prototype._updateNodeAndLinkScale=function(t){var n=t.getData(),i=this._getNodeGlobalScale(t);n.eachItemGraphicEl((function(t){t.setSymbolScale(i)}))},n.prototype._getNodeGlobalScale=function(t){var n=t.coordinateSystem;if("view"!==n.type)return 1;var i=this._nodeScaleRatio,r=n.scaleX||1;return((n.getZoom()-1)*i+1)/r},n.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},n.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},n.type="tree",n}(Id);function OA(t,n){var i=t.getItemLayout(n);return i&&!isNaN(i.x)&&!isNaN(i.y)}function DA(t,n,i,r,e){var o=!i,a=t.tree.getNodeByDataIndex(n),s=a.getModel(),u=a.getVisual("style").fill,l=!1===a.isExpand&&0!==a.children.length?u:"#fff",h=t.tree.root,f=a.parentNode===h?a:a.parentNode||a,c=t.getItemGraphicEl(f.dataIndex),v=f.getLayout(),d=c?{x:c.__oldX,y:c.__oldY,rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:v,p=a.getLayout();o?((i=new px(t,n,null,{symbolInnerColor:l,useNameLabel:!0})).x=d.x,i.y=d.y):i.updateData(t,n,null,{symbolInnerColor:l,useNameLabel:!0}),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=p.rawX,i.__radialRawY=p.rawY,r.add(i),t.setItemGraphicEl(n,i),i.__oldX=i.x,i.__oldY=i.y,Yl(i,{x:p.x,y:p.y},e);var m=i.getSymbolPath();if("radial"===e.get("layout")){var y=h.children[0],g=y.getLayout(),b=y.children.length,w=void 0,x=void 0;if(p.x===g.x&&!0===a.isExpand){var M={x:(y.children[0].getLayout().x+y.children[b-1].getLayout().x)/2,y:(y.children[0].getLayout().y+y.children[b-1].getLayout().y)/2};(w=Math.atan2(M.y-g.y,M.x-g.x))<0&&(w=2*Math.PI+w),(x=M.x<g.x)&&(w-=Math.PI)}else(w=Math.atan2(p.y-g.y,p.x-g.x))<0&&(w=2*Math.PI+w),0===a.children.length||0!==a.children.length&&!1===a.isExpand?(x=p.x<g.x)&&(w-=Math.PI):(x=p.x>g.x)||(w-=Math.PI);var S=x?"left":"right",k=s.getModel("label"),A=k.get("rotate"),N=A*(Math.PI/180),C=m.getTextContent();C&&(m.setTextConfig({position:k.get("position")||S,rotation:null==A?-w:N,origin:"center"}),C.setStyle("verticalAlign","middle"))}var T=s.get(["emphasis","focus"]),z="ancestor"===T?a.getAncestorsIndices():"descendant"===T?a.getDescendantIndices():null;z&&(Bs(i).focus=z),function(t,n,i,r,e,o,a,s){var u=n.getModel(),l=t.get("edgeShape"),h=t.get("layout"),f=t.getOrient(),c=t.get(["lineStyle","curveness"]),v=t.get("edgeForkPosition"),d=u.getModel("lineStyle").getLineStyle(),p=r.__edge;if("curve"===l)n.parentNode&&n.parentNode!==i&&(p||(p=r.__edge=new Cl({shape:FA(h,f,c,e,e)})),Yl(p,{shape:FA(h,f,c,o,a)},t));else if("polyline"===l&&"orthogonal"===h&&n!==i&&n.children&&0!==n.children.length&&!0===n.isExpand){for(var m=n.children,y=[],g=0;g<m.length;g++){var b=m[g].getLayout();y.push([b.x,b.y])}p||(p=r.__edge=new IA({shape:{parentPoint:[a.x,a.y],childPoints:[[a.x,a.y]],orient:f,forkPosition:v}})),Yl(p,{shape:{parentPoint:[a.x,a.y],childPoints:y}},t)}p&&(p.useStyle(lt({strokeNoScale:!0,fill:null},d)),Au(p,u,"lineStyle"),eu(p),s.add(p))}(e,a,h,i,d,v,p,r),i.__edge&&(i.onHoverStateChange=function(n){if("blur"!==n){var r=a.parentNode&&t.getItemGraphicEl(a.parentNode.dataIndex);r&&1===r.hoverState||iu(i.__edge,n)}})}function RA(t,n,i,r,e){var o=_A(n.tree.root,t),a=o.source,s=o.sourceLayout,u=n.getItemGraphicEl(t.dataIndex);if(u){var l=n.getItemGraphicEl(a.dataIndex),h=u.__edge||(!1===a.isExpand||1===a.children.length?l.__edge:void 0),f=r.get("edgeShape"),c=r.get("layout"),v=r.get("orient"),d=r.get(["lineStyle","curveness"]);h&&("curve"===f?Ul(h,{shape:FA(c,v,d,s,s),style:{opacity:0}},r,{cb:function(){i.remove(h)},removeOpt:e}):"polyline"===f&&"orthogonal"===r.get("layout")&&Ul(h,{shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]]},style:{opacity:0}},r,{cb:function(){i.remove(h)},removeOpt:e}))}}function _A(t,n){for(var i,r=n.parentNode===t?n:n.parentNode||n;null==(i=r.getLayout());)r=r.parentNode===t?r:r.parentNode||r;return{source:r,sourceLayout:i}}function BA(t,n,i,r,e){var o=t.tree.getNodeByDataIndex(n),a=_A(t.tree.root,o).sourceLayout,s={duration:e.get("animationDurationUpdate"),easing:e.get("animationEasingUpdate")};Ul(i,{x:a.x+1,y:a.y+1},e,{cb:function(){r.remove(i),t.setItemGraphicEl(n,null)},removeOpt:s}),i.fadeOut(null,t.hostModel,{fadeLabel:!0,animation:s}),o.children.forEach((function(n){RA(n,t,r,e,s)})),RA(o,t,r,e,s)}function FA(t,n,i,r,e){var o,a,s,u,l,h,f,c;if("radial"===t){h=e.rawX,c=e.rawY;var v=SA(l=r.rawX,f=r.rawY),d=SA(l,f+(c-f)*i),p=SA(h,c+(f-c)*i),m=SA(h,c);return{x1:v.x||0,y1:v.y||0,x2:m.x||0,y2:m.y||0,cpx1:d.x||0,cpy1:d.y||0,cpx2:p.x||0,cpy2:p.y||0}}return l=r.x,f=r.y,h=e.x,c=e.y,"LR"!==n&&"RL"!==n||(o=l+(h-l)*i,a=f,s=h+(l-h)*i,u=c),"TB"!==n&&"BT"!==n||(o=l,a=f+(c-f)*i,s=h,u=c+(f-c)*i),{x1:l,y1:f,x2:h,y2:c,cpx1:o,cpy1:a,cpx2:s,cpy2:u}}var EA=yo();function PA(t){var n=t.mainData,i=t.datas;i||(i={main:n},t.datasAttr={main:"data"}),t.datas=t.mainData=null,XA(n,i,t),vt(i,(function(i){vt(n.TRANSFERABLE_METHODS,(function(n){i.wrapMethod(n,bt(WA,t))}))})),n.wrapMethod("cloneShallow",bt(jA,t)),vt(n.CHANGABLE_METHODS,(function(i){n.wrapMethod(i,bt(VA,t))})),Bt(i[n.dataType]===n)}function WA(t,n){if(EA(this).mainData===this){var i=ut({},EA(this).datas);i[this.dataType]=n,XA(n,i,t)}else GA(n,this.dataType,EA(this).mainData,t);return n}function VA(t,n){return t.struct&&t.struct.update(),n}function jA(t,n){return vt(EA(n).datas,(function(i,r){i!==n&&GA(i.cloneShallow(),r,n,t)})),n}function HA(t){var n=EA(this).mainData;return null==t||null==n?n:EA(n).datas[t]}function YA(){var t=EA(this).mainData;return null==t?[{data:t}]:dt(yt(EA(t).datas),(function(n){return{type:n,data:EA(t).datas[n]}}))}function XA(t,n,i){EA(t).datas={},vt(n,(function(n,r){GA(n,r,t,i)}))}function GA(t,n,i,r){EA(i).datas[n]=t,EA(t).mainData=i,t.dataType=n,r.struct&&(t[r.structAttr]=r.struct,r.struct[r.datasAttr[n]]=t),t.getLinkedData=HA,t.getLinkedDataAll=YA}var UA=function(){function t(t,n){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=n}return t.prototype.isRemoved=function(){return this.dataIndex<0},t.prototype.eachNode=function(t,n,i){xt(t)&&(i=n,n=t,t=null),Mt(t=t||{})&&(t={order:t});var r,e=t.order||"preorder",o=this[t.attr||"children"];"preorder"===e&&(r=n.call(i,this));for(var a=0;!r&&a<o.length;a++)o[a].eachNode(t,n,i);"postorder"===e&&n.call(i,this)},t.prototype.updateDepthAndHeight=function(t){var n=0;this.depth=t;for(var i=0;i<this.children.length;i++){var r=this.children[i];r.updateDepthAndHeight(t+1),r.height>n&&(n=r.height)}this.height=n+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var n=0,i=this.children,r=i.length;n<r;n++){var e=i[n].getNodeById(t);if(e)return e}},t.prototype.contains=function(t){if(t===this)return!0;for(var n=0,i=this.children,r=i.length;n<r;n++){var e=i[n].contains(t);if(e)return e}},t.prototype.getAncestors=function(t){for(var n=[],i=t?this:this.parentNode;i;)n.push(i),i=i.parentNode;return n.reverse(),n},t.prototype.getAncestorsIndices=function(){for(var t=[],n=this;n;)t.push(n.dataIndex),n=n.parentNode;return t.reverse(),t},t.prototype.getDescendantIndices=function(){var t=[];return this.eachNode((function(n){t.push(n.dataIndex)})),t},t.prototype.getValue=function(t){var n=this.hostTree.data;return n.getStore().get(n.getDimensionIndex(t||"value"),this.dataIndex)},t.prototype.setLayout=function(t,n){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,n)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,n){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,n)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,n=0;n<t.length;++n)if(t[n]===this)return n;return-1}return-1},t.prototype.isAncestorOf=function(t){for(var n=t.parentNode;n;){if(n===this)return!0;n=n.parentNode}return!1},t.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},t}(),ZA=function(){function t(t){this.type="tree",this._nodes=[],this.hostModel=t}return t.prototype.eachNode=function(t,n,i){this.root.eachNode(t,n,i)},t.prototype.getNodeByDataIndex=function(t){var n=this.data.getRawIndex(t);return this._nodes[n]},t.prototype.getNodeById=function(t){return this.root.getNodeById(t)},t.prototype.update=function(){for(var t=this.data,n=this._nodes,i=0,r=n.length;i<r;i++)n[i].dataIndex=-1;for(i=0,r=t.count();i<r;i++)n[t.getRawIndex(i)].dataIndex=i},t.prototype.clearLayouts=function(){this.data.clearItemLayouts()},t.createTree=function(n,i,r){var e=new t(i),o=[],a=1;!function t(n,i){var r=n.value;a=Math.max(a,wt(r)?r.length:1),o.push(n);var s=new UA(co(n.name,""),e);i?function(t,n){t.parentNode!==n&&(n.children.push(t),t.parentNode=n)}(s,i):e.root=s,e._nodes.push(s);var u=n.children;if(u)for(var l=0;l<u.length;l++)t(u[l],s)}(n),e.root.updateDepthAndHeight(0);var s=jy(o,{coordDimensions:["value"],dimensionsCount:a}).dimensions,u=new Vy(s,i);return u.initData(o),r&&r(u),PA({mainData:u,struct:e,structAttr:"tree"}),e.update(),e},t}();function qA(t,n,i){if(t&&ht(n,t.type)>=0){var r=i.getData().tree.root,e=t.targetNode;if(Mt(e)&&(e=r.getNodeById(e)),e&&r.contains(e))return{node:e};var o=t.targetNodeId;if(null!=o&&(e=r.getNodeById(o)))return{node:e}}}function $A(t){for(var n=[];t;)(t=t.parentNode)&&n.push(t);return n.reverse()}function KA(t,n){return ht($A(t),n)>=0}function JA(t,n){for(var i=[];t;){var r=t.dataIndex;i.push({name:t.name,dataIndex:r,value:n.getRawValue(r)}),t=t.parentNode}return i.reverse(),i}var QA=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.hasSymbolVisual=!0,n.ignoreStyleOnData=!0,n}return E(n,t),n.prototype.getInitialData=function(t){var n={name:t.name,children:t.data},i=new qh(t.leaves||{},this,this.ecModel),r=ZA.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,n){var e=r.getNodeByDataIndex(n);return e&&e.children.length&&e.isExpand||(t.parentModel=i),t}))})),e=0;r.eachNode("preorder",(function(t){t.depth>e&&(e=t.depth)}));var o=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:e;return r.root.eachNode("preorder",(function(t){var n=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=n&&null!=n.collapsed?!n.collapsed:t.depth<=o})),r.data},n.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},n.prototype.setZoom=function(t){this.option.zoom=t},n.prototype.setCenter=function(t){this.option.center=t},n.prototype.formatTooltip=function(t){for(var n=this.getData().tree,i=n.root.children[0],r=n.getNodeByDataIndex(t),e=r.getValue(),o=r.name;r&&r!==i;)o=r.parentNode.name+"."+o,r=r.parentNode;return rd("nameValue",{name:o,value:e,noValue:isNaN(e)||null==e})},n.prototype.getDataParams=function(n){var i=t.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(n);return i.treeAncestors=JA(r,this),i.collapsed=!r.isExpand,i},n.type="series.tree",n.layoutMode="box",n.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},n}(gd);function tN(t,n){for(var i,r=[t];i=r.pop();)if(n(i),i.isExpand){var e=i.children;if(e.length)for(var o=e.length-1;o>=0;o--)r.push(e[o])}}function nN(t,n){t.eachSeriesByType("tree",(function(t){!function(t,n){var i=function(t,n){return Xf(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})}(t,n);t.layoutInfo=i;var r=t.get("layout"),e=0,o=0,a=null;"radial"===r?(e=2*Math.PI,o=Math.min(i.height,i.width)/2,a=MA((function(t,n){return(t.parentNode===n.parentNode?1:2)/t.depth}))):(e=i.width,o=i.height,a=MA());var s=t.getData().tree.root,u=s.children[0];if(u){!function(t){var n=t;n.hierNode={defaultAncestor:null,ancestor:n,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var i,r,e=[n];i=e.pop();)if(r=i.children,i.isExpand&&r.length)for(var o=r.length-1;o>=0;o--){var a=r[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},e.push(a)}}(s),function(t,n,i){for(var r,e=[t],o=[];r=e.pop();)if(o.push(r),r.isExpand){var a=r.children;if(a.length)for(var s=0;s<a.length;s++)e.push(a[s])}for(;r=o.pop();)n(r,i)}(u,wA,a),s.hierNode.modifier=-u.hierNode.prelim,tN(u,xA);var l=u,h=u,f=u;tN(u,(function(t){var n=t.getLayout().x;n<l.getLayout().x&&(l=t),n>h.getLayout().x&&(h=t),t.depth>f.depth&&(f=t)}));var c=l===h?1:a(l,h)/2,v=c-l.getLayout().x,d=0,p=0,m=0,y=0;if("radial"===r)d=e/(h.getLayout().x+c+v),p=o/(f.depth-1||1),tN(u,(function(t){var n=SA(m=(t.getLayout().x+v)*d,y=(t.depth-1)*p);t.setLayout({x:n.x,y:n.y,rawX:m,rawY:y},!0)}));else{var g=t.getOrient();"RL"===g||"LR"===g?(p=o/(h.getLayout().x+c+v),d=e/(f.depth-1||1),tN(u,(function(t){y=(t.getLayout().x+v)*p,t.setLayout({x:m="LR"===g?(t.depth-1)*d:e-(t.depth-1)*d,y},!0)}))):"TB"!==g&&"BT"!==g||(d=e/(h.getLayout().x+c+v),p=o/(f.depth-1||1),tN(u,(function(t){m=(t.getLayout().x+v)*d,t.setLayout({x:m,y:y="TB"===g?(t.depth-1)*p:o-(t.depth-1)*p},!0)})))}}}(t,n)}))}function iN(t){t.eachSeriesByType("tree",(function(t){var n=t.getData();n.tree.eachNode((function(t){var i=t.getModel().getModel("itemStyle").getItemStyle();ut(n.ensureUniqueItemVisual(t.dataIndex,"style"),i)}))}))}var rN=["treemapZoomToNode","treemapRender","treemapMove"];function eN(t){var n=t.getData(),i={};n.tree.eachNode((function(n){for(var r=n;r&&r.depth>1;)r=r.parentNode;var e=mc(t.ecModel,r.name||r.dataIndex+"",i);n.setVisual("decal",e)}))}var oN=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.preventUsingHoverLayer=!0,i}return E(n,t),n.prototype.getInitialData=function(t,n){var i={name:t.name,children:t.data};aN(i);var r=t.levels||[],e=this.designatedVisualItemStyle={},o=new qh({itemStyle:e},this,n),a=dt((r=t.levels=function(t,n){var i,r,e=eo(n.get("color")),o=eo(n.get(["aria","decal","decals"]));if(e){vt(t=t||[],(function(t){var n=new qh(t),e=n.get("color"),o=n.get("decal");(n.get(["itemStyle","color"])||e&&"none"!==e)&&(i=!0),(n.get(["itemStyle","decal"])||o&&"none"!==o)&&(r=!0)}));var a=t[0]||(t[0]={});return i||(a.color=e.slice()),!r&&o&&(a.decal=o.slice()),t}}(r,n))||[],(function(t){return new qh(t,o,n)}),this),s=ZA.createTree(i,this,(function(t){t.wrapMethod("getItemModel",(function(t,n){var i=s.getNodeByDataIndex(n);return t.parentModel=(i?a[i.depth]:null)||o,t}))}));return s.data},n.prototype.optionUpdated=function(){this.resetViewRoot()},n.prototype.formatTooltip=function(t){var n=this.getData(),i=this.getRawValue(t);return rd("nameValue",{name:n.getName(t),value:i})},n.prototype.getDataParams=function(n){var i=t.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(n);return i.treeAncestors=JA(r,this),i.treePathInfo=i.treeAncestors,i},n.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},ut(this.layoutInfo,t)},n.prototype.mapIdToIndex=function(t){var n=this._idIndexMap;n||(n=this._idIndexMap=Vt(),this._idIndexMapCount=0);var i=n.get(t);return null==i&&n.set(t,i=this._idIndexMapCount++),i},n.prototype.getViewRoot=function(){return this._viewRoot},n.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;t&&(t===n||n.contains(t))||(this._viewRoot=n)},n.prototype.enableAriaDecal=function(){eN(this)},n.type="series.treemap",n.layoutMode="box",n.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},n}(gd);function aN(t){var n=0;vt(t.children,(function(t){aN(t);var i=t.value;wt(i)&&(i=i[0]),n+=i}));var i=t.value;wt(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=n),i<0&&(i=0),wt(t.value)?t.value[0]=i:t.value=i}var sN=function(){function t(t){this.group=new Oe,t.add(this.group)}return t.prototype.render=function(t,n,i,r){var e=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),e.get("show")&&i){var a=e.getModel("itemStyle"),s=a.getModel("textStyle"),u={pos:{left:e.get("left"),right:e.get("right"),top:e.get("top"),bottom:e.get("bottom")},box:{width:n.getWidth(),height:n.getHeight()},emptyItemWidth:e.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,u,s),this._renderContent(t,u,a,s,r),Gf(o,u.pos,u.box)}},t.prototype._prepare=function(t,n,i){for(var r=t;r;r=r.parentNode){var e=co(r.getModel().get("name"),""),o=i.getTextRect(e),a=Math.max(o.width+16,n.emptyItemWidth);n.totalWidth+=a+8,n.renderList.push({node:r,text:e,width:a})}},t.prototype._renderContent=function(t,n,i,r,e){for(var o,a,s,u,l,h,f,c,v,d=0,p=n.emptyItemWidth,m=t.get(["breadcrumb","height"]),y=(l=(a=n.box).height,h=Fe((o=n.pos).left,u=a.width),f=Fe(o.top,l),c=Fe(o.right,u),v=Fe(o.bottom,l),(isNaN(h)||isNaN(parseFloat(o.left)))&&(h=0),(isNaN(c)||isNaN(parseFloat(o.right)))&&(c=u),(isNaN(f)||isNaN(parseFloat(o.top)))&&(f=0),(isNaN(v)||isNaN(parseFloat(o.bottom)))&&(v=l),s=If(s||0),{width:Math.max(c-h-s[1]-s[3],0),height:Math.max(v-f-s[0]-s[2],0)}),g=n.totalWidth,b=n.renderList,w=b.length-1;w>=0;w--){var x=b[w],M=x.node,S=x.width,k=x.text;g>y.width&&(g-=S-p,S=p,k=null);var A=new gl({shape:{points:uN(d,0,S,m,w===b.length-1,0===w)},style:lt(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new Ss({style:{text:k,fill:r.getTextColor(),font:r.getFont()}}),textConfig:{position:"inside"},z2:1e5,onclick:bt(e,M)});A.disableLabelAnimation=!0,this.group.add(A),lN(A,t,M),d+=S+8}},t.prototype.remove=function(){this.group.removeAll()},t}();function uN(t,n,i,r,e,o){var a=[[e?t:t-5,n],[t+i,n],[t+i,n+r],[e?t:t-5,n+r]];return!o&&a.splice(2,0,[t+i+5,n+r/2]),!e&&a.push([t,n+r/2]),a}function lN(t,n,i){Bs(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:n.componentIndex,seriesIndex:n.seriesIndex,seriesName:n.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&JA(i,n)}}var hN=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,n,i,r,e){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:n,duration:i,delay:r,easing:e}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,n=this._storage.length,i=function(){--n<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},r=0,e=this._storage.length;r<e;r++){var o=this._storage[r];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:i,aborted:i})}return this},t}(),fN=Oe,cN=ws,vN=_o([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),dN=function(t){var n=vN(t);return n.stroke=n.fill=n.lineWidth=null,n},pN=yo(),mN=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i._state="ready",i._storage={nodeGroup:[],background:[],content:[]},i}return E(n,t),n.prototype.render=function(t,n,i,r){if(!(ht(n.findComponents({mainType:"series",subType:"treemap",query:r}),t)<0)){this.seriesModel=t,this.api=i,this.ecModel=n;var e=qA(r,["treemapZoomToNode","treemapRootToNode"],t),o=r&&r.type,a=t.layoutInfo,s=!this._oldTree,u=this._storage,l="treemapRootToNode"===o&&e&&u?{rootNodeGroup:u.nodeGroup[e.node.getRawIndex()],direction:r.direction}:null,h=this._giveContainerGroup(a),f=t.get("animation"),c=this._doRender(h,t,l);!f||s||o&&"treemapZoomToNode"!==o&&"treemapRootToNode"!==o?c.renderFinally():this._doAnimation(h,c,t,l),this._resetController(i),this._renderBreadcrumb(t,i,e)}},n.prototype._giveContainerGroup=function(t){var n=this._containerGroup;return n||(n=this._containerGroup=new fN,this._initEvents(n),this.group.add(n)),n.x=t.x,n.y=t.y,n},n.prototype._doRender=function(t,n,i){var r=n.getData().tree,e=this._oldTree,o={nodeGroup:[],background:[],content:[]},a={nodeGroup:[],background:[],content:[]},s=this._storage,u=[];function l(t,r,e,l){return function(t,n,i,r,e,o,a,s,u,l){if(a){var h=a.getLayout(),f=t.getData(),c=a.getModel();if(f.setItemGraphicEl(a.dataIndex,null),h&&h.isInView){var v=h.width,d=h.height,p=h.borderWidth,m=h.invisible,y=a.getRawIndex(),g=s&&s.getRawIndex(),b=a.viewChildren,w=h.upperHeight,x=b&&b.length,M=c.getModel("itemStyle"),S=c.getModel(["emphasis","itemStyle"]),k=c.getModel(["blur","itemStyle"]),A=c.getModel(["select","itemStyle"]),N=M.get("borderRadius")||0,C=E("nodeGroup",fN);if(C){if(u.add(C),C.x=h.x||0,C.y=h.y||0,C.markRedraw(),pN(C).nodeWidth=v,pN(C).nodeHeight=d,h.isAboveViewRoot)return C;var T=E("background",cN,l,20);T&&function(n,i,r){var e=Bs(i);if(e.dataIndex=a.dataIndex,e.seriesIndex=t.seriesIndex,i.setShape({x:0,y:0,width:v,height:d,r:N}),m)_(i);else{i.invisible=!1;var o=a.getVisual("style"),s=o.stroke,u=dN(M);u.fill=s;var l=vN(S);l.fill=S.get("borderColor");var h=vN(k);h.fill=k.get("borderColor");var f=vN(A);f.fill=A.get("borderColor"),r?B(i,s,o.opacity,{x:p,y:0,width:v-2*p,height:w}):i.removeTextContent(),i.setStyle(u),i.ensureState("emphasis").style=l,i.ensureState("blur").style=h,i.ensureState("select").style=f,eu(i)}n.add(i)}(C,T,x&&h.upperLabelHeight);var z=c.getModel("emphasis"),I=z.get("focus"),L=z.get("blurScope"),O=z.get("disabled"),D="ancestor"===I?a.getAncestorsIndices():"descendant"===I?a.getDescendantIndices():I;if(x)Cu(C)&&Nu(C,!1),T&&(Nu(T,!O),f.setItemGraphicEl(a.dataIndex,T),Mu(T,D,L));else{var R=E("content",cN,l,30);R&&function(n,i){var r=Bs(i);r.dataIndex=a.dataIndex,r.seriesIndex=t.seriesIndex;var e=Math.max(v-2*p,0),o=Math.max(d-2*p,0);if(i.culling=!0,i.setShape({x:p,y:p,width:e,height:o,r:N}),m)_(i);else{i.invisible=!1;var s=a.getVisual("style"),u=s.fill,l=dN(M);l.fill=u,l.decal=s.decal;var h=vN(S),f=vN(k),c=vN(A);B(i,u,s.opacity,null),i.setStyle(l),i.ensureState("emphasis").style=h,i.ensureState("blur").style=f,i.ensureState("select").style=c,eu(i)}n.add(i)}(C,R),T.disableMorphing=!0,T&&Cu(T)&&Nu(T,!1),Nu(C,!O),f.setItemGraphicEl(a.dataIndex,C),Mu(C,D,L)}return C}}}function _(t){!t.invisible&&o.push(t)}function B(n,i,r,e){var o=c.getModel(e?"upperLabel":"label"),s=co(c.get("name"),null),u=o.getShallow("show");Ah(n,Nh(c,e?"upperLabel":"label"),{defaultText:u?s:null,inheritColor:i,defaultOpacity:r,labelFetcher:t,labelDataIndex:a.dataIndex});var l=n.getTextContent();if(l){var f=l.style,v=_t(f.padding||0);e&&(n.setTextConfig({layoutRect:e}),l.disableLabelLayout=!0),l.beforeUpdate=function(){var t=Math.max((e?e.width:n.shape.width)-v[1]-v[3],0),i=Math.max((e?e.height:n.shape.height)-v[0]-v[2],0);f.width===t&&f.height===i||l.setStyle({width:t,height:i})},f.truncateMinChar=2,f.lineOverflow="truncate",F(f,e,h);var d=l.getState("emphasis");F(d?d.style:null,e,h)}}function F(n,i,r){var e=n?n.text:null;if(!i&&r.isLeafRoot&&null!=e){var o=t.get("drillDownIcon",!0);n.text=o?o+" "+e:e}}function E(t,o,s,u){var l=null!=g&&i[t][g],h=e[t];return l?(i[t][g]=null,function(t,n){var i=t[y]={};n instanceof fN?(i.oldX=n.x,i.oldY=n.y):i.oldShape=ut({},n.shape)}(h,l)):m||((l=new o)instanceof aa&&(l.z2=function(t,n){return 100*t+n}(s,u)),function(t,n){var i=t[y]={},o=a.parentNode,s=n instanceof Oe;if(o&&(!r||"drillDown"===r.direction)){var u=0,l=0,h=e.background[o.getRawIndex()];!r&&h&&h.oldShape&&(u=h.oldShape.width,l=h.oldShape.height),s?(i.oldX=0,i.oldY=l):i.oldShape={x:u,y:l,width:0,height:0}}i.fadein=!s}(h,l)),n[t][y]=l}}(n,a,s,i,o,u,t,r,e,l)}!function t(n,i,r,e,o){function a(t){return t.getId()}function s(a,s){var u=null!=a?n[a]:null,h=null!=s?i[s]:null,f=l(u,h,r,o);f&&t(u&&u.viewChildren||[],h&&h.viewChildren||[],f,e,o+1)}e?(i=n,vt(n,(function(t,n){!t.isRemoved()&&s(n,n)}))):new yy(i,n,a,a).add(s).update(s).remove(bt(s,null)).execute()}(r.root?[r.root]:[],e&&e.root?[e.root]:[],t,r===e||!e,0);var h=function(t){var n={nodeGroup:[],background:[],content:[]};return t&&vt(t,(function(t,i){var r=n[i];vt(t,(function(t){t&&(r.push(t),pN(t).willDelete=!0)}))})),n}(s);return this._oldTree=r,this._storage=a,{lastsForAnimation:o,willDeleteEls:h,renderFinally:function(){vt(h,(function(t){vt(t,(function(t){t.parent&&t.parent.remove(t)}))})),vt(u,(function(t){t.invisible=!0,t.dirty()}))}}},n.prototype._doAnimation=function(t,n,i,r){var e=i.get("animationDurationUpdate"),o=i.get("animationEasing"),a=(xt(e)?0:e)||0,s=(xt(o)?null:o)||"cubicOut",u=new hN;vt(n.willDeleteEls,(function(t,n){vt(t,(function(t){if(!t.invisible){var i,e=t.parent,o=pN(e);if(r&&"drillDown"===r.direction)i=e===r.rootNodeGroup?{shape:{x:0,y:0,width:o.nodeWidth,height:o.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var l=0,h=0;o.willDelete||(l=o.nodeWidth/2,h=o.nodeHeight/2),i="nodeGroup"===n?{x:l,y:h,style:{opacity:0}}:{shape:{x:l,y:h,width:0,height:0},style:{opacity:0}}}i&&u.add(t,i,a,0,s)}}))})),vt(this._storage,(function(t,i){vt(t,(function(t,r){var e=n.lastsForAnimation[i][r],o={};e&&(t instanceof Oe?null!=e.oldX&&(o.x=t.x,o.y=t.y,t.x=e.oldX,t.y=e.oldY):(e.oldShape&&(o.shape=ut({},t.shape),t.setShape(e.oldShape)),e.fadein?(t.setStyle("opacity",0),o.style={opacity:1}):1!==t.style.opacity&&(o.style={opacity:1})),u.add(t,o,a,0,s))}))}),this),this._state="animating",u.finished(gt((function(){this._state="ready",n.renderFinally()}),this)).start()},n.prototype._resetController=function(t){var n=this._controller;n||((n=this._controller=new JS(t.getZr())).enable(this.seriesModel.get("roam")),n.on("pan",gt(this._onPan,this)),n.on("zoom",gt(this._onZoom,this)));var i=new ve(0,0,t.getWidth(),t.getHeight());n.setPointerChecker((function(t,n,r){return i.contain(n,r)}))},n.prototype._clearController=function(){var t=this._controller;t&&(t.dispose(),t=null)},n.prototype._onPan=function(t){if("animating"!==this._state&&(Math.abs(t.dx)>3||Math.abs(t.dy)>3)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},n.prototype._onZoom=function(t){var n=t.originX,i=t.originY;if("animating"!==this._state){var r=this.seriesModel.getData().tree.root;if(!r)return;var e=r.getLayout();if(!e)return;var o=new ve(e.x,e.y,e.width,e.height),a=this.seriesModel.layoutInfo,s=[1,0,0,1,0,0];Xr(s,s,[-(n-=a.x),-(i-=a.y)]),Ur(s,s,[t.scale,t.scale]),Xr(s,s,[n,i]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},n.prototype._initEvents=function(t){var n=this;t.on("click",(function(t){if("ready"===n._state){var i=n.seriesModel.get("nodeClick",!0);if(i){var r=n.findTarget(t.offsetX,t.offsetY);if(r){var e=r.node;if(e.getLayout().isLeafRoot)n._rootToNode(r);else if("zoomToNode"===i)n._zoomToNode(r);else if("link"===i){var o=e.hostTree.data.getItemModel(e.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&Pf(a,s)}}}}}),this)},n.prototype._renderBreadcrumb=function(t,n,i){var r=this;i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2))||(i={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new sN(this.group))).render(t,n,i.node,(function(n){"animating"!==r._state&&(KA(t.getViewRoot(),n)?r._rootToNode({node:n}):r._zoomToNode({node:n}))}))},n.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},n.prototype.dispose=function(){this._clearController()},n.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},n.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},n.prototype.findTarget=function(t,n){var i;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(r){var e=this._storage.background[r.getRawIndex()];if(e){var o=e.transformCoordToLocal(t,n),a=e.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;i={node:r,offsetX:o[0],offsetY:o[1]}}}),this),i},n.type="treemap",n}(Id),yN=vt,gN=At,bN=function(){function t(n){var i=n.mappingMethod,r=n.type,e=this.option=ot(n);this.type=r,this.mappingMethod=i,this._normalizeData=zN[i];var o=t.visualHandlers[r];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[i],"piecewise"===i?(wN(e),function(t){var n=t.pieceList;t.hasSpecialVisual=!1,vt(n,(function(n,i){n.originIndex=i,null!=n.visual&&(t.hasSpecialVisual=!0)}))}(e)):"category"===i?e.categories?function(t){var n=t.categories,i=t.categoryMap={},r=t.visual;if(yN(n,(function(t,n){i[t]=n})),!wt(r)){var e=[];At(r)?yN(r,(function(t,n){var r=i[n];e[null!=r?r:-1]=t})):e[-1]=r,r=TN(t,e)}for(var o=n.length-1;o>=0;o--)null==r[o]&&(delete i[n[o]],n.pop())}(e):wN(e,!0):(Bt("linear"!==i||e.dataExtent),wN(e))}return t.prototype.mapValueToVisual=function(t){var n=this._normalizeData(t);return this._normalizedToVisual(n,t)},t.prototype.getNormalizer=function(){return gt(this._normalizeData,this)},t.listVisualTypes=function(){return yt(t.visualHandlers)},t.isValidType=function(n){return t.visualHandlers.hasOwnProperty(n)},t.eachVisual=function(t,n,i){At(t)?vt(t,n,i):n.call(i,t)},t.mapVisual=function(n,i,r){var e,o=wt(n)?[]:At(n)?{}:(e=!0,null);return t.eachVisual(n,(function(t,n){var a=i.call(r,t,n);e?o=a:o[n]=a})),o},t.retrieveVisuals=function(n){var i,r={};return n&&yN(t.visualHandlers,(function(t,e){n.hasOwnProperty(e)&&(r[e]=n[e],i=!0)})),i?r:null},t.prepareVisualTypes=function(t){if(wt(t))t=t.slice();else{if(!gN(t))return[];var n=[];yN(t,(function(t,i){n.push(i)})),t=n}return t.sort((function(t,n){return"color"===n&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},t.dependsOn=function(t,n){return"color"===n?!(!t||0!==t.indexOf(n)):t===n},t.findPieceIndex=function(t,n,i){for(var r,e=1/0,o=0,a=n.length;o<a;o++){var s=n[o].value;if(null!=s){if(s===t||Mt(s)&&s===t+"")return o;i&&f(s,o)}}for(o=0,a=n.length;o<a;o++){var u=n[o],l=u.interval,h=u.close;if(l){if(l[0]===-1/0){if(IN(h[1],t,l[1]))return o}else if(l[1]===1/0){if(IN(h[0],l[0],t))return o}else if(IN(h[0],l[0],t)&&IN(h[1],t,l[1]))return o;i&&f(l[0],o),i&&f(l[1],o)}}if(i)return t===1/0?n.length-1:t===-1/0?0:r;function f(n,i){var o=Math.abs(n-t);o<e&&(e=o,r=i)}},t.visualHandlers={color:{applyVisual:SN("color"),getColorMapper:function(){var t=this.option;return gt("category"===t.mappingMethod?function(t,n){return!n&&(t=this._normalizeData(t)),kN.call(this,t)}:function(n,i,r){var e=!!r;return!i&&(n=this._normalizeData(n)),r=Hi(n,t.parsedVisual,r),e?r:Gi(r,"rgba")},this)},_normalizedToVisual:{linear:function(t){return Gi(Hi(t,this.option.parsedVisual),"rgba")},category:kN,piecewise:function(t,n){var i=CN.call(this,n);return null==i&&(i=Gi(Hi(t,this.option.parsedVisual),"rgba")),i},fixed:AN}},colorHue:xN((function(t,n){return Yi(t,n)})),colorSaturation:xN((function(t,n){return Yi(t,null,n)})),colorLightness:xN((function(t,n){return Yi(t,null,null,n)})),colorAlpha:xN((function(t,n){return Xi(t,n)})),decal:{applyVisual:SN("decal"),_normalizedToVisual:{linear:null,category:kN,piecewise:null,fixed:null}},opacity:{applyVisual:SN("opacity"),_normalizedToVisual:NN([0,1])},liftZ:{applyVisual:SN("liftZ"),_normalizedToVisual:{linear:AN,category:AN,piecewise:AN,fixed:AN}},symbol:{applyVisual:function(t,n,i){i("symbol",this.mapValueToVisual(t))},_normalizedToVisual:{linear:MN,category:kN,piecewise:function(t,n){var i=CN.call(this,n);return null==i&&(i=MN.call(this,t)),i},fixed:AN}},symbolSize:{applyVisual:SN("symbolSize"),_normalizedToVisual:NN([0,1])}},t}();function wN(t,n){var i=t.visual,r=[];At(i)?yN(i,(function(t){r.push(t)})):null!=i&&r.push(i),n||1!==r.length||{color:1,symbol:1}.hasOwnProperty(t.type)||(r[1]=r[0]),TN(t,r)}function xN(t){return{applyVisual:function(n,i,r){var e=this.mapValueToVisual(n);r("color",t(i("color"),e))},_normalizedToVisual:NN([0,1])}}function MN(t){var n=this.option.visual;return n[Math.round(Be(t,[0,1],[0,n.length-1],!0))]||{}}function SN(t){return function(n,i,r){r(t,this.mapValueToVisual(n))}}function kN(t){var n=this.option.visual;return n[this.option.loop&&-1!==t?t%n.length:t]}function AN(){return this.option.visual[0]}function NN(t){return{linear:function(n){return Be(n,t,this.option.visual,!0)},category:kN,piecewise:function(n,i){var r=CN.call(this,i);return null==r&&(r=Be(n,t,this.option.visual,!0)),r},fixed:AN}}function CN(t){var n=this.option,i=n.pieceList;if(n.hasSpecialVisual){var r=i[bN.findPieceIndex(t,i)];if(r&&r.visual)return r.visual[this.type]}}function TN(t,n){return t.visual=n,"color"===t.type&&(t.parsedVisual=dt(n,(function(t){return Wi(t)||[0,0,0,1]}))),n}var zN={linear:function(t){return Be(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var n=this.option.pieceList,i=bN.findPieceIndex(t,n,!0);if(null!=i)return Be(i,[0,n.length-1],[0,1],!0)},category:function(t){var n=this.option.categories?this.option.categoryMap[t]:t;return null==n?-1:n},fixed:Gt};function IN(t,n,i){return t?n<=i:n<i}var LN=yo();const ON={seriesType:"treemap",reset:function(t){var n=t.getData().tree.root;n.isRemoved()||DN(n,{},t.getViewRoot().getAncestors(),t)}};function DN(t,n,i,r){var e=t.getModel(),o=t.getLayout(),a=t.hostTree.data;if(o&&!o.invisible&&o.isInView){var s,u=e.getModel("itemStyle"),l=function(t,n,i){var r=ut({},n),e=i.designatedVisualItemStyle;return vt(["color","colorAlpha","colorSaturation"],(function(i){e[i]=n[i];var o=t.get(i);e[i]=null,null!=o&&(r[i]=o)})),r}(u,n,r),h=a.ensureUniqueItemVisual(t.dataIndex,"style"),f=u.get("borderColor"),c=u.get("borderColorSaturation");null!=c&&(f=function(t,n){return null!=n?Yi(n,null,null,t):null}(c,s=RN(l))),h.stroke=f;var v=t.viewChildren;if(v&&v.length){var d=function(t,n,i,r,e,o){if(o&&o.length){var a=BN(n,"color")||null!=e.color&&"none"!==e.color&&(BN(n,"colorAlpha")||BN(n,"colorSaturation"));if(a){var s=n.get("visualMin"),u=n.get("visualMax"),l=i.dataExtent.slice();null!=s&&s<l[0]&&(l[0]=s),null!=u&&u>l[1]&&(l[1]=u);var h=n.get("colorMappingBy"),f={type:a.name,dataExtent:l,visual:a.range};"color"!==f.type||"index"!==h&&"id"!==h?f.mappingMethod="linear":(f.mappingMethod="category",f.loop=!0);var c=new bN(f);return LN(c).drColorMappingBy=h,c}}}(0,e,o,0,l,v);vt(v,(function(t,n){if(t.depth>=i.length||t===i[t.depth]){var o=function(t,n,i,r,e,o){var a=ut({},n);if(e){var s=e.type,u="color"===s&&LN(e).drColorMappingBy,l="index"===u?r:"id"===u?o.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));a[s]=e.mapValueToVisual(l)}return a}(e,l,t,n,d,r);DN(t,o,i,r)}}))}else s=RN(l),h.fill=s}}function RN(t){var n=_N(t,"color");if(n){var i=_N(t,"colorAlpha"),r=_N(t,"colorSaturation");return r&&(n=Yi(n,null,null,r)),i&&(n=Xi(n,i)),n}}function _N(t,n){var i=t[n];if(null!=i&&"none"!==i)return i}function BN(t,n){var i=t.get(n);return wt(i)&&i.length?{name:n,range:i}:null}var FN=Math.max,EN=Math.min,PN=Lt,WN=vt,VN=["itemStyle","borderWidth"],jN=["itemStyle","gapWidth"],HN=["upperLabel","show"],YN=["upperLabel","height"];const XN={seriesType:"treemap",reset:function(t,n,i,r){var e=i.getWidth(),o=i.getHeight(),a=t.option,s=Xf(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),u=a.size||[],l=Fe(PN(s.width,u[0]),e),h=Fe(PN(s.height,u[1]),o),f=r&&r.type,c=qA(r,["treemapZoomToNode","treemapRootToNode"],t),v="treemapRender"===f||"treemapMove"===f?r.rootRect:null,d=t.getViewRoot(),p=$A(d);if("treemapMove"!==f){var m="treemapZoomToNode"===f?function(t,n,i,r,e){var o,a=(n||{}).node,s=[r,e];if(!a||a===i)return s;for(var u=r*e,l=u*t.option.zoomToNodeRatio;o=a.parentNode;){for(var h=0,f=o.children,c=0,v=f.length;c<v;c++)h+=f[c].getValue();var d=a.getValue();if(0===d)return s;l*=h/d;var p=o.getModel(),m=p.get(VN);(l+=4*m*m+(3*m+Math.max(m,$N(p)))*Math.pow(l,.5))>9007199254740991&&(l=9007199254740991),a=o}l<u&&(l=u);var y=Math.pow(l/u,.5);return[r*y,e*y]}(t,c,d,l,h):v?[v.width,v.height]:[l,h],y=a.sort;y&&"asc"!==y&&"desc"!==y&&(y="desc");var g={squareRatio:a.squareRatio,sort:y,leafDepth:a.leafDepth};d.hostTree.clearLayouts();var b={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};d.setLayout(b),GN(d,g,!1,0),b=d.getLayout(),WN(p,(function(t,n){var i=(p[n+1]||d).getValue();t.setLayout(ut({dataExtent:[i,i],borderWidth:0,upperHeight:0},b))}))}var w=t.getData().tree.root;w.setLayout(function(t,n,i){if(n)return{x:n.x,y:n.y};var r={x:0,y:0};if(!i)return r;var e=i.node,o=e.getLayout();if(!o)return r;for(var a=[o.width/2,o.height/2],s=e;s;){var u=s.getLayout();a[0]+=u.x,a[1]+=u.y,s=s.parentNode}return{x:t.width/2-a[0],y:t.height/2-a[1]}}(s,v,c),!0),t.setLayoutInfo(s),qN(w,new ve(-s.x,-s.y,e,o),p,d,0)}};function GN(t,n,i,r){var e,o;if(!t.isRemoved()){var a=t.getLayout();e=a.width,o=a.height;var s=t.getModel(),u=s.get(VN),l=s.get(jN)/2,h=$N(s),f=Math.max(u,h),c=u-l,v=f-l;t.setLayout({borderWidth:u,upperHeight:f,upperLabelHeight:h},!0);var d=(e=FN(e-2*c,0))*(o=FN(o-c-v,0)),p=function(t,n,i,r,e,o){var a=t.children||[],s=r.sort;"asc"!==s&&"desc"!==s&&(s=null);var u=null!=r.leafDepth&&r.leafDepth<=o;if(e&&!u)return t.viewChildren=[];!function(t,n){n&&t.sort((function(t,i){var r="asc"===n?t.getValue()-i.getValue():i.getValue()-t.getValue();return 0===r?"asc"===n?t.dataIndex-i.dataIndex:i.dataIndex-t.dataIndex:r}))}(a=mt(a,(function(t){return!t.isRemoved()})),s);var l=function(t,n,i){for(var r=0,e=0,o=n.length;e<o;e++)r+=n[e].getValue();var a,s=t.get("visualDimension");return n&&n.length?"value"===s&&i?(a=[n[n.length-1].getValue(),n[0].getValue()],"asc"===i&&a.reverse()):(a=[1/0,-1/0],WN(n,(function(t){var n=t.getValue(s);n<a[0]&&(a[0]=n),n>a[1]&&(a[1]=n)}))):a=[NaN,NaN],{sum:r,dataExtent:a}}(n,a,s);if(0===l.sum)return t.viewChildren=[];if(l.sum=function(t,n,i,r,e){if(!r)return i;for(var o=t.get("visibleMin"),a=e.length,s=a,u=a-1;u>=0;u--){var l=e["asc"===r?a-u-1:u].getValue();l/i*n<o&&(s=u,i-=l)}return e.splice("asc"===r?0:s,a-s),i}(n,i,l.sum,s,a),0===l.sum)return t.viewChildren=[];for(var h=0,f=a.length;h<f;h++){var c=a[h].getValue()/l.sum*i;a[h].setLayout({area:c})}return u&&(a.length&&t.setLayout({isLeafRoot:!0},!0),a.length=0),t.viewChildren=a,t.setLayout({dataExtent:l.dataExtent},!0),a}(t,s,d,n,i,r);if(p.length){var m={x:c,y:v,width:e,height:o},y=EN(e,o),g=1/0,b=[];b.area=0;for(var w=0,x=p.length;w<x;){var M=p[w];b.push(M),b.area+=M.getLayout().area;var S=UN(b,y,n.squareRatio);S<=g?(w++,g=S):(b.area-=b.pop().getLayout().area,ZN(b,y,m,l,!1),y=EN(m.width,m.height),b.length=b.area=0,g=1/0)}if(b.length&&ZN(b,y,m,l,!0),!i){var k=s.get("childrenVisibleMin");null!=k&&d<k&&(i=!0)}for(w=0,x=p.length;w<x;w++)GN(p[w],n,i,r+1)}}}function UN(t,n,i){for(var r=0,e=1/0,o=0,a=void 0,s=t.length;o<s;o++)(a=t[o].getLayout().area)&&(a<e&&(e=a),a>r&&(r=a));var u=t.area*t.area,l=n*n*i;return u?FN(l*r/u,u/(l*e)):1/0}function ZN(t,n,i,r,e){var o=n===i.width?0:1,a=1-o,s=["x","y"],u=["width","height"],l=i[s[o]],h=n?t.area/n:0;(e||h>i[u[a]])&&(h=i[u[a]]);for(var f=0,c=t.length;f<c;f++){var v=t[f],d={},p=h?v.getLayout().area/h:0,m=d[u[a]]=FN(h-2*r,0),y=i[s[o]]+i[u[o]]-l,g=f===c-1||y<p?y:p,b=d[u[o]]=FN(g-2*r,0);d[s[a]]=i[s[a]]+EN(r,m/2),d[s[o]]=l+EN(r,b/2),l+=g,v.setLayout(d,!0)}i[s[a]]+=h,i[u[a]]-=h}function qN(t,n,i,r,e){var o=t.getLayout(),a=i[e],s=a&&a===t;if(!(a&&!s||e===i.length&&t!==r)){t.setLayout({isInView:!0,invisible:!s&&!n.intersect(o),isAboveViewRoot:s},!0);var u=new ve(n.x-o.x,n.y-o.y,n.width,n.height);WN(t.viewChildren||[],(function(t){qN(t,u,i,r,e+1)}))}}function $N(t){return t.get(HN)?t.get(YN):0}function KN(t){var n=t.findComponents({mainType:"legend"});n&&n.length&&t.eachSeriesByType("graph",(function(t){var i=t.getCategoriesData(),r=t.getGraph().data,e=i.mapArray(i.getName);r.filterSelf((function(t){var i=r.getItemModel(t).getShallow("category");if(null!=i){kt(i)&&(i=e[i]);for(var o=0;o<n.length;o++)if(!n[o].isSelected(i))return!1}return!0}))}))}function JN(t){var n={};t.eachSeriesByType("graph",(function(t){var i=t.getCategoriesData(),r=t.getData(),e={};i.each((function(r){var o=i.getName(r);e["ec-"+o]=r;var a=i.getItemModel(r),s=a.getModel("itemStyle").getItemStyle();s.fill||(s.fill=t.getColorFromPalette(o,n)),i.setItemVisual(r,"style",s);for(var u=["symbol","symbolSize","symbolKeepAspect"],l=0;l<u.length;l++){var h=a.getShallow(u[l],!0);null!=h&&i.setItemVisual(r,u[l],h)}})),i.count()&&r.each((function(t){var n=r.getItemModel(t).getShallow("category");if(null!=n){Mt(n)&&(n=e["ec-"+n]);var o=i.getItemVisual(n,"style");ut(r.ensureUniqueItemVisual(t,"style"),o);for(var a=["symbol","symbolSize","symbolKeepAspect"],s=0;s<a.length;s++)r.setItemVisual(t,a[s],i.getItemVisual(n,a[s]))}}))}))}function QN(t){return t instanceof Array||(t=[t,t]),t}function tC(t){t.eachSeriesByType("graph",(function(t){var n=t.getGraph(),i=t.getEdgeData(),r=QN(t.get("edgeSymbol")),e=QN(t.get("edgeSymbolSize"));i.setVisual("fromSymbol",r&&r[0]),i.setVisual("toSymbol",r&&r[1]),i.setVisual("fromSymbolSize",e&&e[0]),i.setVisual("toSymbolSize",e&&e[1]),i.setVisual("style",t.getModel("lineStyle").getLineStyle()),i.each((function(t){var r=i.getItemModel(t),e=n.getEdgeByIndex(t),o=QN(r.getShallow("symbol",!0)),a=QN(r.getShallow("symbolSize",!0)),s=r.getModel("lineStyle").getLineStyle(),u=i.ensureUniqueItemVisual(t,"style");switch(ut(u,s),u.stroke){case"source":var l=e.node1.getVisual("style");u.stroke=l&&l.fill;break;case"target":l=e.node2.getVisual("style"),u.stroke=l&&l.fill}o[0]&&e.setVisual("fromSymbol",o[0]),o[1]&&e.setVisual("toSymbol",o[1]),a[0]&&e.setVisual("fromSymbolSize",a[0]),a[1]&&e.setVisual("toSymbolSize",a[1])}))}))}var nC=function(t){return t.get("autoCurveness")||null},iC=function(t,n){var i=nC(t),r=20,e=[];if(kt(i))r=i;else if(wt(i))return void(t.__curvenessList=i);n>r&&(r=n);var o=r%2?r+2:r+3;e=[];for(var a=0;a<o;a++)e.push((a%2?a+1:a)/10*(a%2?-1:1));t.__curvenessList=e},rC=function(t,n,i){var r=[t.id,t.dataIndex].join("."),e=[n.id,n.dataIndex].join(".");return[i.uid,r,e].join("--\x3e")},eC=function(t){var n=t.split("--\x3e");return[n[0],n[2],n[1]].join("--\x3e")},oC=function(t,n){var i=n.__edgeMap;return i[t]?i[t].length:0};function aC(t,n,i,r){var e=nC(n),o=wt(e);if(!e)return null;var a=function(t,n){var i=rC(t.node1,t.node2,n);return n.__edgeMap[i]}(t,n);if(!a)return null;for(var s=-1,u=0;u<a.length;u++)if(a[u]===i){s=u;break}var l=function(t,n){return oC(rC(t.node1,t.node2,n),n)+oC(rC(t.node2,t.node1,n),n)}(t,n);iC(n,l),t.lineStyle=t.lineStyle||{};var h=rC(t.node1,t.node2,n),f=n.__curvenessList,c=o||l%2?0:1;if(a.isForward)return f[c+s];var v=eC(h),d=oC(v,n),p=f[s+d+c];return r?o?e&&0===e[0]?(d+c)%2?p:-p:((d%2?0:1)+c)%2?p:-p:(d+c)%2?p:-p:f[s+d+c]}function sC(t){var n=t.coordinateSystem;if(!n||"view"===n.type){var i=t.getGraph();i.eachNode((function(t){var n=t.getModel();t.setLayout([+n.get("x"),+n.get("y")])})),uC(i,t)}}function uC(t,n){t.eachEdge((function(t,i){var r=Dt(t.getModel().get(["lineStyle","curveness"]),-aC(t,n,i,!0),0),e=Jt(t.node1.getLayout()),o=Jt(t.node2.getLayout()),a=[e,o];+r&&a.push([(e[0]+o[0])/2-(e[1]-o[1])*r,(e[1]+o[1])/2-(o[0]-e[0])*r]),t.setLayout(a)}))}function lC(t){t.eachSeriesByType("graph",(function(t){var n=t.get("layout"),i=t.coordinateSystem;if(i&&"view"!==i.type){var r=t.getData(),e=[];vt(i.dimensions,(function(t){e=e.concat(r.mapDimensionsAll(t))}));for(var o=0;o<r.count();o++){for(var a=[],s=!1,u=0;u<e.length;u++){var l=r.get(e[u],o);isNaN(l)||(s=!0),a.push(l)}r.setItemLayout(o,s?i.dataToPoint(a):[NaN,NaN])}uC(r.graph,t)}else n&&"none"!==n||sC(t)}))}function hC(t){var n=t.coordinateSystem;if("view"!==n.type)return 1;var i=t.option.nodeScaleRatio,r=n.scaleX;return((n.getZoom()-1)*i+1)/r}function fC(t){var n=t.getVisual("symbolSize");return n instanceof Array&&(n=(n[0]+n[1])/2),+n}var cC=Math.PI,vC=[];function dC(t,n){var i=t.coordinateSystem;if(!i||"view"===i.type){var r=i.getBoundingRect(),e=t.getData(),o=e.graph,a=r.width/2+r.x,s=r.height/2+r.y,u=Math.min(r.width,r.height)/2,l=e.count();e.setLayout({cx:a,cy:s}),l&&(pC[n](t,o,e,u,a,s,l),o.eachEdge((function(n,i){var r,e=Dt(n.getModel().get(["lineStyle","curveness"]),aC(n,t,i),0),o=Jt(n.node1.getLayout()),u=Jt(n.node2.getLayout());+e&&(r=[a*(e*=3)+(o[0]+u[0])/2*(1-e),s*e+(o[1]+u[1])/2*(1-e)]),n.setLayout([o,u,r])})))}}var pC={value:function(t,n,i,r,e,o,a){var s=0,u=i.getSum("value"),l=2*Math.PI/(u||a);n.eachNode((function(t){var n=t.getValue("value"),i=l*(u?n:1)/2;s+=i,t.setLayout([r*Math.cos(s)+e,r*Math.sin(s)+o]),s+=i}))},symbolSize:function(t,n,i,r,e,o,a){var s=0;vC.length=a;var u=hC(t);n.eachNode((function(t){var n=fC(t);isNaN(n)&&(n=2),n<0&&(n=0),n*=u;var i=Math.asin(n/2/r);isNaN(i)&&(i=cC/2),vC[t.dataIndex]=i,s+=2*i}));var l=(2*cC-s)/a/2,h=0;n.eachNode((function(t){var n=l+vC[t.dataIndex];h+=n,t.setLayout([r*Math.cos(h)+e,r*Math.sin(h)+o]),h+=n}))}};function mC(t){t.eachSeriesByType("graph",(function(t){"circular"===t.get("layout")&&dC(t,"symbolSize")}))}var yC=nn;function gC(t){t.eachSeriesByType("graph",(function(t){var n=t.coordinateSystem;if(!n||"view"===n.type)if("force"===t.get("layout")){var i=t.preservedPoints||{},r=t.getGraph(),e=r.data,o=r.edgeData,a=t.getModel("force"),s=a.get("initLayout");t.preservedPoints?e.each((function(t){var n=e.getId(t);e.setItemLayout(t,i[n]||[NaN,NaN])})):s&&"none"!==s?"circular"===s&&dC(t,"value"):sC(t);var u=e.getDataExtent("value"),l=o.getDataExtent("value"),h=a.get("repulsion"),f=a.get("edgeLength"),c=wt(h)?h:[h,h],v=wt(f)?f:[f,f];v=[v[1],v[0]];var d=e.mapArray("value",(function(t,n){var i=e.getItemLayout(n),r=Be(t,u,c);return isNaN(r)&&(r=(c[0]+c[1])/2),{w:r,rep:r,fixed:e.getItemModel(n).get("fixed"),p:!i||isNaN(i[0])||isNaN(i[1])?null:i}})),p=o.mapArray("value",(function(n,i){var e=r.getEdgeByIndex(i),o=Be(n,l,v);isNaN(o)&&(o=(v[0]+v[1])/2);var a=e.getModel(),s=Dt(e.getModel().get(["lineStyle","curveness"]),-aC(e,t,i,!0),0);return{n1:d[e.node1.dataIndex],n2:d[e.node2.dataIndex],d:o,curveness:s,ignoreForceLayout:a.get("ignoreForceLayout")}})),m=n.getBoundingRect(),y=function(t,n,i){for(var r=t,e=n,o=i.rect,a=o.width,s=o.height,u=[o.x+a/2,o.y+s/2],l=null==i.gravity?.1:i.gravity,h=0;h<r.length;h++){var f=r[h];f.p||(f.p=$t(a*(Math.random()-.5)+u[0],s*(Math.random()-.5)+u[1])),f.pp=Jt(f.p),f.edges=null}var c,v,d=null==i.friction?.6:i.friction,p=d;return{warmUp:function(){p=.8*d},setFixed:function(t){r[t].fixed=!0},setUnfixed:function(t){r[t].fixed=!1},beforeStep:function(t){c=t},afterStep:function(t){v=t},step:function(t){c&&c(r,e);for(var n=[],i=r.length,o=0;o<e.length;o++){var a=e[o];if(!a.ignoreForceLayout){rn(n,(m=a.n2).p,(f=a.n1).p);var s=en(n)-a.d,h=m.w/(f.w+m.w);isNaN(h)&&(h=0),an(n,n),!f.fixed&&yC(f.p,f.p,n,h*s*p),!m.fixed&&yC(m.p,m.p,n,-(1-h)*s*p)}}for(o=0;o<i;o++)(b=r[o]).fixed||(rn(n,u,b.p),yC(b.p,b.p,n,l*p));for(o=0;o<i;o++)for(var f=r[o],d=o+1;d<i;d++){var m;rn(n,(m=r[d]).p,f.p),0===(s=en(n))&&(Qt(n,Math.random()-.5,Math.random()-.5),s=1);var y=(f.rep+m.rep)/s/s;!f.fixed&&yC(f.pp,f.pp,n,y),!m.fixed&&yC(m.pp,m.pp,n,-y)}var g=[];for(o=0;o<i;o++){var b;(b=r[o]).fixed||(rn(g,b.p,b.pp),yC(b.p,b.p,g,p),Kt(b.pp,b.p))}var w=(p*=.992)<.01;v&&v(r,e,w),t&&t(w)}}}(d,p,{rect:m,gravity:a.get("gravity"),friction:a.get("friction")});y.beforeStep((function(t){for(var n=0,i=t.length;n<i;n++)t[n].fixed&&Kt(t[n].p,r.getNodeByIndex(n).getLayout())})),y.afterStep((function(t,n){for(var o=0,a=t.length;o<a;o++)t[o].fixed||r.getNodeByIndex(o).setLayout(t[o].p),i[e.getId(o)]=t[o].p;for(o=0,a=n.length;o<a;o++){var s=n[o],u=r.getEdgeByIndex(o),l=s.n1.p,h=s.n2.p,f=u.getLayout();(f=f?f.slice():[])[0]=f[0]||[],f[1]=f[1]||[],Kt(f[0],l),Kt(f[1],h),+s.curveness&&(f[2]=[(l[0]+h[0])/2-(l[1]-h[1])*s.curveness,(l[1]+h[1])/2-(h[0]-l[0])*s.curveness]),u.setLayout(f)}})),t.forceLayout=y,t.preservedPoints=i,y.step()}else t.forceLayout=null}))}function bC(t,n){var i=[];return t.eachSeriesByType("graph",(function(t){var r=t.get("coordinateSystem");if(!r||"view"===r){var e=t.getData(),o=[],a=[];ya(e.mapArray((function(t){var n=e.getItemModel(t);return[+n.get("x"),+n.get("y")]})),o,a),a[0]-o[0]==0&&(a[0]+=1,o[0]-=1),a[1]-o[1]==0&&(a[1]+=1,o[1]-=1);var s=(a[0]-o[0])/(a[1]-o[1]),u=function(t,n,i){return Xf(ut(t.getBoxLayoutParams(),{aspect:i}),{width:n.getWidth(),height:n.getHeight()})}(t,n,s);isNaN(s)&&(o=[u.x,u.y],a=[u.x+u.width,u.y+u.height]);var l=a[0]-o[0],h=a[1]-o[1],f=u.width,c=u.height,v=t.coordinateSystem=new aA;v.zoomLimit=t.get("scaleLimit"),v.setBoundingRect(o[0],o[1],l,h),v.setViewRect(u.x,u.y,f,c),v.setCenter(t.get("center")),v.setZoom(t.get("zoom")),i.push(v)}})),i}var wC,xC=Sl.prototype,MC=Cl.prototype,SC=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1};function kC(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}E((function(){return null!==wC&&wC.apply(this,arguments)||this}),wC=SC);var AC=function(t){function n(n){var i=t.call(this,n)||this;return i.type="ec-line",i}return E(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new SC},n.prototype.buildPath=function(t,n){kC(n)?xC.buildPath.call(this,t,n):MC.buildPath.call(this,t,n)},n.prototype.pointAt=function(t){return kC(this.shape)?xC.pointAt.call(this,t):MC.pointAt.call(this,t)},n.prototype.tangentAt=function(t){var n=this.shape,i=kC(n)?[n.x2-n.x1,n.y2-n.y1]:MC.tangentAt.call(this,t);return an(i,i)},n}(us),NC=["fromSymbol","toSymbol"];function CC(t){return"_"+t+"Type"}function TC(t,n,i){var r=n.getItemVisual(i,t);if(r&&"none"!==r){var e=n.getItemVisual(i,t+"Size"),o=n.getItemVisual(i,t+"Rotate"),a=n.getItemVisual(i,t+"Offset"),s=n.getItemVisual(i,t+"KeepAspect"),u=Pp(e),l=Wp(a||0,u),h=Ep(r,-u[0]/2+l[0],-u[1]/2+l[1],u[0],u[1],null,s);return h.__specifiedRotation=null==o||isNaN(o)?void 0:+o*Math.PI/180||0,h.name=t,h}}function zC(t,n){t.x1=n[0][0],t.y1=n[0][1],t.x2=n[1][0],t.y2=n[1][1],t.percent=1;var i=n[2];i?(t.cpx1=i[0],t.cpy1=i[1]):(t.cpx1=NaN,t.cpy1=NaN)}var IC=function(t){function n(n,i,r){var e=t.call(this)||this;return e._createLine(n,i,r),e}return E(n,t),n.prototype._createLine=function(t,n,i){var r=t.hostModel,e=function(t){var n=new AC({name:"line",subPixelOptimize:!0});return zC(n.shape,t),n}(t.getItemLayout(n));e.shape.percent=0,Xl(e,{shape:{percent:1}},r,n),this.add(e),vt(NC,(function(i){var r=TC(i,t,n);this.add(r),this[CC(i)]=t.getItemVisual(n,i)}),this),this._updateCommonStl(t,n,i)},n.prototype.updateData=function(t,n,i){var r=t.hostModel,e=this.childOfName("line"),o=t.getItemLayout(n),a={shape:{}};zC(a.shape,o),Yl(e,a,r,n),vt(NC,(function(i){var r=t.getItemVisual(n,i),e=CC(i);if(this[e]!==r){this.remove(this.childOfName(i));var o=TC(i,t,n);this.add(o)}this[e]=r}),this),this._updateCommonStl(t,n,i)},n.prototype.getLinePath=function(){return this.childAt(0)},n.prototype._updateCommonStl=function(t,n,i){var r=t.hostModel,e=this.childOfName("line"),o=i&&i.emphasisLineStyle,a=i&&i.blurLineStyle,s=i&&i.selectLineStyle,u=i&&i.labelStatesModels,l=i&&i.emphasisDisabled,h=i&&i.focus,f=i&&i.blurScope;if(!i||t.hasItemOption){var c=t.getItemModel(n),v=c.getModel("emphasis");o=v.getModel("lineStyle").getLineStyle(),a=c.getModel(["blur","lineStyle"]).getLineStyle(),s=c.getModel(["select","lineStyle"]).getLineStyle(),l=v.get("disabled"),h=v.get("focus"),f=v.get("blurScope"),u=Nh(c)}var d=t.getItemVisual(n,"style"),p=d.stroke;e.useStyle(d),e.style.fill=null,e.style.strokeNoScale=!0,e.ensureState("emphasis").style=o,e.ensureState("blur").style=a,e.ensureState("select").style=s,vt(NC,(function(t){var n=this.childOfName(t);if(n){n.setColor(p),n.style.opacity=d.opacity;for(var i=0;i<js.length;i++){var r=js[i],o=e.getState(r);if(o){var a=o.style||{},s=n.ensureState(r),u=s.style||(s.style={});null!=a.stroke&&(u[n.__isEmptyBrush?"stroke":"fill"]=a.stroke),null!=a.opacity&&(u.opacity=a.opacity)}}n.markRedraw()}}),this);var m=r.getRawValue(n);Ah(this,u,{labelDataIndex:n,labelFetcher:{getFormattedLabel:function(n,i){return r.getFormattedLabel(n,i,t.dataType)}},inheritColor:p||"#000",defaultOpacity:d.opacity,defaultText:(null==m?t.getName(n):isFinite(m)?Ee(m):m)+""});var y=this.getTextContent();if(y){var g=u.normal;y.__align=y.style.align,y.__verticalAlign=y.style.verticalAlign,y.__position=g.get("position")||"middle";var b=g.get("distance");wt(b)||(b=[b,b]),y.__labelDistance=b}this.setTextConfig({position:null,local:!0,inside:!1}),xu(this,h,f,l)},n.prototype.highlight=function(){su(this)},n.prototype.downplay=function(){uu(this)},n.prototype.updateLayout=function(t,n){this.setLinePoints(t.getItemLayout(n))},n.prototype.setLinePoints=function(t){var n=this.childOfName("line");zC(n.shape,t),n.dirty()},n.prototype.beforeUpdate=function(){var t=this,n=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),r=t.getTextContent();if(n||i||r&&!r.ignore){for(var e=1,o=this.parent;o;)o.scaleX&&(e/=o.scaleX),o=o.parent;var a=t.childOfName("line");if(this.__dirty||a.__dirty){var s=a.shape.percent,u=a.pointAt(0),l=a.pointAt(s),h=rn([],l,u);if(an(h,h),n&&(n.setPosition(u),S(n,0),n.scaleX=n.scaleY=e*s,n.markRedraw()),i&&(i.setPosition(l),S(i,1),i.scaleX=i.scaleY=e*s,i.markRedraw()),r&&!r.ignore){r.x=r.y=0,r.originX=r.originY=0;var f=void 0,c=void 0,v=r.__labelDistance,d=v[0]*e,p=v[1]*e,m=s/2,y=a.tangentAt(m),g=[y[1],-y[0]],b=a.pointAt(m);g[1]>0&&(g[0]=-g[0],g[1]=-g[1]);var w=y[0]<0?-1:1;if("start"!==r.__position&&"end"!==r.__position){var x=-Math.atan2(y[1],y[0]);l[0]<u[0]&&(x=Math.PI+x),r.rotation=x}var M=void 0;switch(r.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":M=-p,c="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":M=p,c="top";break;default:M=0,c="middle"}switch(r.__position){case"end":r.x=h[0]*d+l[0],r.y=h[1]*p+l[1],f=h[0]>.8?"left":h[0]<-.8?"right":"center",c=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":r.x=-h[0]*d+u[0],r.y=-h[1]*p+u[1],f=h[0]>.8?"right":h[0]<-.8?"left":"center",c=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":r.x=d*w+u[0],r.y=u[1]+M,f=y[0]<0?"right":"left",r.originX=-d*w,r.originY=-M;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":r.x=b[0],r.y=b[1]+M,f="center",r.originY=-M;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":r.x=-d*w+l[0],r.y=l[1]+M,f=y[0]>=0?"right":"left",r.originX=d*w,r.originY=-M}r.scaleX=r.scaleY=e,r.setStyle({verticalAlign:r.__verticalAlign||c,align:r.__align||f})}}}function S(t,n){var i=t.__specifiedRotation;if(null==i){var r=a.tangentAt(n);t.attr("rotation",(1===n?-1:1)*Math.PI/2-Math.atan2(r[1],r[0]))}else t.attr("rotation",i)}},n}(Oe),LC=function(){function t(t){this.group=new Oe,this._LineCtor=t||IC}return t.prototype.updateData=function(t){var n=this;this._progressiveEls=null;var i=this,r=i.group,e=i._lineData;i._lineData=t,e||r.removeAll();var o=OC(t);t.diff(e).add((function(i){n._doAdd(t,i,o)})).update((function(i,r){n._doUpdate(e,t,r,i,o)})).remove((function(t){r.remove(e.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(n,i){n.updateLayout(t,i)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=OC(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,n){function i(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var r=t.start;r<t.end;r++)if(RC(n.getItemLayout(r))){var e=new this._LineCtor(n,r,this._seriesScope);e.traverse(i),this.group.add(e),n.setItemGraphicEl(r,e),this._progressiveEls.push(e)}},t.prototype.remove=function(){this.group.removeAll()},t.prototype.eachRendered=function(t){wh(this._progressiveEls||this.group,t)},t.prototype._doAdd=function(t,n,i){if(RC(t.getItemLayout(n))){var r=new this._LineCtor(t,n,i);t.setItemGraphicEl(n,r),this.group.add(r)}},t.prototype._doUpdate=function(t,n,i,r,e){var o=t.getItemGraphicEl(i);RC(n.getItemLayout(r))?(o?o.updateData(n,r,e):o=new this._LineCtor(n,r,e),n.setItemGraphicEl(r,o),this.group.add(o)):this.group.remove(o)},t}();function OC(t){var n=t.hostModel,i=n.getModel("emphasis");return{lineStyle:n.getModel("lineStyle").getLineStyle(),emphasisLineStyle:i.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:n.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:n.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:i.get("disabled"),blurScope:i.get("blurScope"),focus:i.get("focus"),labelStatesModels:Nh(n)}}function DC(t){return isNaN(t[0])||isNaN(t[1])}function RC(t){return t&&!DC(t[0])&&!DC(t[1])}var _C=[],BC=[],FC=[],EC=mi,PC=ln,WC=Math.abs;function VC(t,n,i){for(var r,e=t[0],o=t[1],a=t[2],s=1/0,u=i*i,l=.1,h=.1;h<=.9;h+=.1)_C[0]=EC(e[0],o[0],a[0],h),_C[1]=EC(e[1],o[1],a[1],h),(v=WC(PC(_C,n)-u))<s&&(s=v,r=h);for(var f=0;f<32;f++){var c=r+l;BC[0]=EC(e[0],o[0],a[0],r),BC[1]=EC(e[1],o[1],a[1],r),FC[0]=EC(e[0],o[0],a[0],c),FC[1]=EC(e[1],o[1],a[1],c);var v=PC(BC,n)-u;if(WC(v)<.01)break;var d=PC(FC,n)-u;l/=2,v<0?d>=0?r+=l:r-=l:d>=0?r-=l:r+=l}return r}function jC(t,n){var i=[],r=bi,e=[[],[],[]],o=[[],[]],a=[];n/=2,t.eachEdge((function(t){var s=t.getLayout(),u=t.getVisual("fromSymbol"),l=t.getVisual("toSymbol");s.__original||(s.__original=[Jt(s[0]),Jt(s[1])],s[2]&&s.__original.push(Jt(s[2])));var h=s.__original;if(null!=s[2]){if(Kt(e[0],h[0]),Kt(e[1],h[2]),Kt(e[2],h[1]),u&&"none"!==u){var f=fC(t.node1),c=VC(e,h[0],f*n);r(e[0][0],e[1][0],e[2][0],c,i),e[0][0]=i[3],e[1][0]=i[4],r(e[0][1],e[1][1],e[2][1],c,i),e[0][1]=i[3],e[1][1]=i[4]}l&&"none"!==l&&(f=fC(t.node2),c=VC(e,h[1],f*n),r(e[0][0],e[1][0],e[2][0],c,i),e[1][0]=i[1],e[2][0]=i[2],r(e[0][1],e[1][1],e[2][1],c,i),e[1][1]=i[1],e[2][1]=i[2]),Kt(s[0],e[0]),Kt(s[1],e[2]),Kt(s[2],e[1])}else Kt(o[0],h[0]),Kt(o[1],h[1]),rn(a,o[1],o[0]),an(a,a),u&&"none"!==u&&(f=fC(t.node1),nn(o[0],o[0],a,f*n)),l&&"none"!==l&&(f=fC(t.node2),nn(o[1],o[1],a,-f*n)),Kt(s[0],o[0]),Kt(s[1],o[1])}))}function HC(t){return"view"===t.type}var YC=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.init=function(t,n){var i=new xx,r=new LC,e=this.group;this._controller=new JS(n.getZr()),this._controllerHost={target:e},e.add(i.group),e.add(r.group),this._symbolDraw=i,this._lineDraw=r,this._firstRender=!0},n.prototype.render=function(t,n,i){var r=this,e=t.coordinateSystem;this._model=t;var o=this._symbolDraw,a=this._lineDraw,s=this.group;if(HC(e)){var u={x:e.x,y:e.y,scaleX:e.scaleX,scaleY:e.scaleY};this._firstRender?s.attr(u):Yl(s,u,t)}jC(t.getGraph(),hC(t));var l=t.getData();o.updateData(l);var h=t.getEdgeData();a.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,n,i),clearTimeout(this._layoutTimeout);var f=t.forceLayout,c=t.get(["force","layoutAnimation"]);f&&this._startForceLayoutIteration(f,c),l.graph.eachNode((function(t){var n=t.dataIndex,i=t.getGraphicEl(),e=t.getModel();if(i){i.off("drag").off("dragend");var o=e.get("draggable");o&&i.on("drag",(function(){f&&(f.warmUp(),!r._layouting&&r._startForceLayoutIteration(f,c),f.setFixed(n),l.setItemLayout(n,[i.x,i.y]))})).on("dragend",(function(){f&&f.setUnfixed(n)})),i.setDraggable(o&&!!f),"adjacency"===e.get(["emphasis","focus"])&&(Bs(i).focus=t.getAdjacentDataIndices())}})),l.graph.eachEdge((function(t){var n=t.getGraphicEl(),i=t.getModel().get(["emphasis","focus"]);n&&"adjacency"===i&&(Bs(n).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})}));var v="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),d=l.getLayout("cx"),p=l.getLayout("cy");l.eachItemGraphicEl((function(t,n){var i=l.getItemModel(n).get(["label","rotate"])||0,r=t.getSymbolPath();if(v){var e=l.getItemLayout(n),o=Math.atan2(e[1]-p,e[0]-d);o<0&&(o=2*Math.PI+o);var a=e[0]<d;a&&(o-=Math.PI);var s=a?"left":"right";r.setTextConfig({rotation:-o,position:s,origin:"center"});var u=r.ensureState("emphasis");ut(u.textConfig||(u.textConfig={}),{position:s})}else r.setTextConfig({rotation:i*=Math.PI/180})})),this._firstRender=!1},n.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},n.prototype._startForceLayoutIteration=function(t,n){var i=this;!function r(){t.step((function(t){i.updateLayout(i._model),(i._layouting=!t)&&(n?i._layoutTimeout=setTimeout(r,16):r())}))}()},n.prototype._updateController=function(t,n,i){var r=this,e=this._controller,o=this._controllerHost,a=this.group;e.setPointerChecker((function(n,r,e){var o=a.getBoundingRect();return o.applyTransform(a.transform),o.contain(r,e)&&!ak(n,i,t)})),HC(t.coordinateSystem)?(e.enable(t.get("roam")),o.zoomLimit=t.get("scaleLimit"),o.zoom=t.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",(function(n){ik(o,n.dx,n.dy),i.dispatchAction({seriesId:t.id,type:"graphRoam",dx:n.dx,dy:n.dy})})).on("zoom",(function(n){rk(o,n.scale,n.originX,n.originY),i.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:n.scale,originX:n.originX,originY:n.originY}),r._updateNodeAndLinkScale(),jC(t.getGraph(),hC(t)),r._lineDraw.updateLayout(),i.updateLabelLayout()}))):e.disable()},n.prototype._updateNodeAndLinkScale=function(){var t=this._model,n=t.getData(),i=hC(t);n.eachItemGraphicEl((function(t){t&&t.setSymbolScale(i)}))},n.prototype.updateLayout=function(t){jC(t.getGraph(),hC(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},n.prototype.remove=function(){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},n.type="graph",n}(Id);function XC(t){return"_EC_"+t}var GC=function(){function t(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(t,n){var i=this._nodesMap;if(!i[XC(t=null==t?""+n:""+t)]){var r=new UC(t,n);return r.hostGraph=this,this.nodes.push(r),i[XC(t)]=r,r}},t.prototype.getNodeByIndex=function(t){var n=this.data.getRawIndex(t);return this.nodes[n]},t.prototype.getNodeById=function(t){return this._nodesMap[XC(t)]},t.prototype.addEdge=function(t,n,i){var r=this._nodesMap,e=this._edgesMap;if(kt(t)&&(t=this.nodes[t]),kt(n)&&(n=this.nodes[n]),t instanceof UC||(t=r[XC(t)]),n instanceof UC||(n=r[XC(n)]),t&&n){var o=t.id+"-"+n.id,a=new ZC(t,n,i);return a.hostGraph=this,this._directed&&(t.outEdges.push(a),n.inEdges.push(a)),t.edges.push(a),t!==n&&n.edges.push(a),this.edges.push(a),e[o]=a,a}},t.prototype.getEdgeByIndex=function(t){var n=this.edgeData.getRawIndex(t);return this.edges[n]},t.prototype.getEdge=function(t,n){t instanceof UC&&(t=t.id),n instanceof UC&&(n=n.id);var i=this._edgesMap;return this._directed?i[t+"-"+n]:i[t+"-"+n]||i[n+"-"+t]},t.prototype.eachNode=function(t,n){for(var i=this.nodes,r=i.length,e=0;e<r;e++)i[e].dataIndex>=0&&t.call(n,i[e],e)},t.prototype.eachEdge=function(t,n){for(var i=this.edges,r=i.length,e=0;e<r;e++)i[e].dataIndex>=0&&i[e].node1.dataIndex>=0&&i[e].node2.dataIndex>=0&&t.call(n,i[e],e)},t.prototype.breadthFirstTraverse=function(t,n,i,r){if(n instanceof UC||(n=this._nodesMap[XC(n)]),n){for(var e="out"===i?"outEdges":"in"===i?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!t.call(r,n,null))for(var a=[n];a.length;){var s=a.shift(),u=s[e];for(o=0;o<u.length;o++){var l=u[o],h=l.node1===s?l.node2:l.node1;if(!h.__visited){if(t.call(r,h,s))return;a.push(h),h.__visited=!0}}}}},t.prototype.update=function(){for(var t=this.data,n=this.edgeData,i=this.nodes,r=this.edges,e=0,o=i.length;e<o;e++)i[e].dataIndex=-1;for(e=0,o=t.count();e<o;e++)i[t.getRawIndex(e)].dataIndex=e;for(n.filterSelf((function(t){var i=r[n.getRawIndex(t)];return i.node1.dataIndex>=0&&i.node2.dataIndex>=0})),e=0,o=r.length;e<o;e++)r[e].dataIndex=-1;for(e=0,o=n.count();e<o;e++)r[n.getRawIndex(e)].dataIndex=e},t.prototype.clone=function(){for(var n=new t(this._directed),i=this.nodes,r=this.edges,e=0;e<i.length;e++)n.addNode(i[e].id,i[e].dataIndex);for(e=0;e<r.length;e++){var o=r[e];n.addEdge(o.node1.id,o.node2.id,o.dataIndex)}return n},t}(),UC=function(){function t(t,n){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=null==t?"":t,this.dataIndex=null==n?-1:n}return t.prototype.degree=function(){return this.edges.length},t.prototype.inDegree=function(){return this.inEdges.length},t.prototype.outDegree=function(){return this.outEdges.length},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getAdjacentDataIndices=function(){for(var t={edge:[],node:[]},n=0;n<this.edges.length;n++){var i=this.edges[n];i.dataIndex<0||(t.edge.push(i.dataIndex),t.node.push(i.node1.dataIndex,i.node2.dataIndex))}return t},t}(),ZC=function(){function t(t,n,i){this.dataIndex=-1,this.node1=t,this.node2=n,this.dataIndex=null==i?-1:i}return t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)},t.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},t}();function qC(t,n){return{getValue:function(i){var r=this[t][n];return r.getStore().get(r.getDimensionIndex(i||"value"),this.dataIndex)},setVisual:function(i,r){this.dataIndex>=0&&this[t][n].setItemVisual(this.dataIndex,i,r)},getVisual:function(i){return this[t][n].getItemVisual(this.dataIndex,i)},setLayout:function(i,r){this.dataIndex>=0&&this[t][n].setItemLayout(this.dataIndex,i,r)},getLayout:function(){return this[t][n].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][n].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][n].getRawIndex(this.dataIndex)}}}function $C(t,n,i,r,e){for(var o=new GC(r),a=0;a<t.length;a++)o.addNode(Lt(t[a].id,t[a].name,a),a);var s=[],u=[],l=0;for(a=0;a<n.length;a++){var h=n[a],f=h.source,c=h.target;o.addEdge(f,c,l)&&(u.push(h),s.push(Lt(co(h.id,null),f+" > "+c)),l++)}var v,d=i.get("coordinateSystem");if("cartesian2d"===d||"polar"===d)v=qy(t,i);else{var p=Ac.get(d),m=p&&p.dimensions||[];ht(m,"value")<0&&m.concat(["value"]);var y=jy(t,{coordDimensions:m,encodeDefine:i.getEncode()}).dimensions;(v=new Vy(y,i)).initData(t)}var g=new Vy(["value"],i);return g.initData(u,s),e&&e(v,g),PA({mainData:v,struct:o,structAttr:"graph",datas:{node:v,edge:g},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}ft(UC,qC("hostGraph","data")),ft(ZC,qC("hostGraph","edgeData"));var KC=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.hasSymbolVisual=!0,i}return E(n,t),n.prototype.init=function(n){t.prototype.init.apply(this,arguments);var i=this;function r(){return i._categoriesData}this.legendVisualProvider=new DM(r,r),this.fillDataTextStyle(n.edges||n.links),this._updateCategoriesData()},n.prototype.mergeOption=function(n){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(n.edges||n.links),this._updateCategoriesData()},n.prototype.mergeDefaultAndTheme=function(n){t.prototype.mergeDefaultAndTheme.apply(this,arguments),oo(n,"edgeLabel",["show"])},n.prototype.getInitialData=function(t){var n,i=t.edges||t.links||[],r=t.data||t.nodes||[],e=this;if(r&&i){nC(n=this)&&(n.__curvenessList=[],n.__edgeMap={},iC(n));var o=$C(r,i,this,!0,(function(t,n){t.wrapMethod("getItemModel",(function(t){var n=e._categoriesModels[t.getShallow("category")];return n&&(n.parentModel=t.parentModel,t.parentModel=n),t}));var i=qh.prototype.getModel;function r(t,n){var r=i.call(this,t,n);return r.resolveParentPath=o,r}function o(t){if(t&&("label"===t[0]||"label"===t[1])){var n=t.slice();return"label"===t[0]?n[0]="edgeLabel":"label"===t[1]&&(n[1]="edgeLabel"),n}return t}n.wrapMethod("getItemModel",(function(t){return t.resolveParentPath=o,t.getModel=r,t}))}));return vt(o.edges,(function(t){!function(t,n,i,r){if(nC(i)){var e=rC(t,n,i),o=i.__edgeMap,a=o[eC(e)];o[e]&&!a?o[e].isForward=!0:a&&o[e]&&(a.isForward=!0,o[e].isForward=!1),o[e]=o[e]||[],o[e].push(r)}}(t.node1,t.node2,this,t.dataIndex)}),this),o.data}},n.prototype.getGraph=function(){return this.getData().graph},n.prototype.getEdgeData=function(){return this.getGraph().edgeData},n.prototype.getCategoriesData=function(){return this._categoriesData},n.prototype.formatTooltip=function(t,n,i){if("edge"===i){var r=this.getData(),e=this.getDataParams(t,i),o=r.graph.getEdgeByIndex(t),a=r.getName(o.node1.dataIndex),s=r.getName(o.node2.dataIndex),u=[];return null!=a&&u.push(a),null!=s&&u.push(s),rd("nameValue",{name:u.join(" > "),value:e.value,noValue:null==e.value})}return pd({series:this,dataIndex:t,multipleSeries:n})},n.prototype._updateCategoriesData=function(){var t=dt(this.option.categories||[],(function(t){return null!=t.value?t:ut({value:0},t)})),n=new Vy(["value"],this);n.initData(t),this._categoriesData=n,this._categoriesModels=n.mapArray((function(t){return n.getItemModel(t)}))},n.prototype.setZoom=function(t){this.option.zoom=t},n.prototype.setCenter=function(t){this.option.center=t},n.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},n.type="series.graph",n.dependencies=["grid","polar","geo","singleAxis","calendar"],n.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},n}(gd),JC={type:"graphRoam",event:"graphRoam",update:"none"},QC=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},tT=function(t){function n(n){var i=t.call(this,n)||this;return i.type="pointer",i}return E(n,t),n.prototype.getDefaultShape=function(){return new QC},n.prototype.buildPath=function(t,n){var i=Math.cos,r=Math.sin,e=n.r,o=n.width,a=n.angle,s=n.x-i(a)*o*(o>=e/3?1:2),u=n.y-r(a)*o*(o>=e/3?1:2);a=n.angle-Math.PI/2,t.moveTo(s,u),t.lineTo(n.x+i(a)*o,n.y+r(a)*o),t.lineTo(n.x+i(n.angle)*e,n.y+r(n.angle)*e),t.lineTo(n.x-i(a)*o,n.y-r(a)*o),t.lineTo(s,u)},n}(us);function nT(t,n){var i=null==t?"":t+"";return n&&(Mt(n)?i=n.replace("{value}",i):xt(n)&&(i=n(t))),i}var iT=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.render=function(t,n,i){this.group.removeAll();var r=t.get(["axisLine","lineStyle","color"]),e=function(t,n){var i=t.get("center"),r=n.getWidth(),e=n.getHeight(),o=Math.min(r,e);return{cx:Fe(i[0],n.getWidth()),cy:Fe(i[1],n.getHeight()),r:Fe(t.get("radius"),o/2)}}(t,i);this._renderMain(t,n,i,r,e),this._data=t.getData()},n.prototype.dispose=function(){},n.prototype._renderMain=function(t,n,i,r,e){var o=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,u=-t.get("endAngle")/180*Math.PI,l=t.getModel("axisLine"),h=l.get("roundCap")?Jx:vl,f=l.get("show"),c=l.getModel("lineStyle"),v=c.get("width"),d=[s,u];Va(d,!a);for(var p=(u=d[1])-(s=d[0]),m=s,y=0;f&&y<r.length;y++){var g=new h({shape:{startAngle:m,endAngle:u=s+p*Math.min(Math.max(r[y][0],0),1),cx:e.cx,cy:e.cy,clockwise:a,r0:e.r-v,r:e.r},silent:!0});g.setStyle({fill:r[y][1]}),g.setStyle(c.getLineStyle(["color","width"])),o.add(g),m=u}var b=function(t){if(t<=0)return r[0][1];var n;for(n=0;n<r.length;n++)if(r[n][0]>=t&&(0===n?0:r[n-1][0])<t)return r[n][1];return r[n-1][1]};this._renderTicks(t,n,i,b,e,s,u,a,v),this._renderTitleAndDetail(t,n,i,b,e),this._renderAnchor(t,e),this._renderPointer(t,n,i,b,e,s,u,a,v)},n.prototype._renderTicks=function(t,n,i,r,e,o,a,s,u){for(var l,h,f=this.group,c=e.cx,v=e.cy,d=e.r,p=+t.get("min"),m=+t.get("max"),y=t.getModel("splitLine"),g=t.getModel("axisTick"),b=t.getModel("axisLabel"),w=t.get("splitNumber"),x=g.get("splitNumber"),M=Fe(y.get("length"),d),S=Fe(g.get("length"),d),k=o,A=(a-o)/w,N=A/x,C=y.getModel("lineStyle").getLineStyle(),T=g.getModel("lineStyle").getLineStyle(),z=y.get("distance"),I=0;I<=w;I++){if(l=Math.cos(k),h=Math.sin(k),y.get("show")){var L=new Sl({shape:{x1:l*(d-(O=z?z+u:u))+c,y1:h*(d-O)+v,x2:l*(d-M-O)+c,y2:h*(d-M-O)+v},style:C,silent:!0});"auto"===C.stroke&&L.setStyle({stroke:r(I/w)}),f.add(L)}if(b.get("show")){var O=b.get("distance")+z,D=nT(Ee(I/w*(m-p)+p),b.get("formatter")),R=r(I/w);f.add(new Ss({style:Ch(b,{text:D,x:l*(d-M-O)+c,y:h*(d-M-O)+v,verticalAlign:h<-.8?"top":h>.8?"bottom":"middle",align:l<-.4?"left":l>.4?"right":"center"},{inheritColor:R}),silent:!0}))}if(g.get("show")&&I!==w){O=(O=g.get("distance"))?O+u:u;for(var _=0;_<=x;_++){l=Math.cos(k),h=Math.sin(k);var B=new Sl({shape:{x1:l*(d-O)+c,y1:h*(d-O)+v,x2:l*(d-S-O)+c,y2:h*(d-S-O)+v},silent:!0,style:T});"auto"===T.stroke&&B.setStyle({stroke:r((I+_/x)/w)}),f.add(B),k+=N}k-=N}else k+=A}},n.prototype._renderPointer=function(t,n,i,r,e,o,a,s,u){var l=this.group,h=this._data,f=this._progressEls,c=[],v=t.get(["pointer","show"]),d=t.getModel("progress"),p=d.get("show"),m=t.getData(),y=m.mapDimension("value"),g=+t.get("min"),b=+t.get("max"),w=[g,b],x=[o,a];function M(n,i){var r,o=m.getItemModel(n).getModel("pointer"),a=Fe(o.get("width"),e.r),s=Fe(o.get("length"),e.r),u=t.get(["pointer","icon"]),l=o.get("offsetCenter"),h=Fe(l[0],e.r),f=Fe(l[1],e.r),c=o.get("keepAspect");return(r=u?Ep(u,h-a/2,f-s,a,s,null,c):new tT({shape:{angle:-Math.PI/2,width:a,r:s,x:h,y:f}})).rotation=-(i+Math.PI/2),r.x=e.cx,r.y=e.cy,r}function S(t,n){var i=d.get("roundCap")?Jx:vl,r=d.get("overlap"),a=r?d.get("width"):u/m.count(),l=new i({shape:{startAngle:o,endAngle:n,cx:e.cx,cy:e.cy,clockwise:s,r0:r?e.r-a:e.r-(t+1)*a,r:r?e.r:e.r-t*a}});return r&&(l.z2=b-m.get(y,t)%b),l}(p||v)&&(m.diff(h).add((function(n){var i=m.get(y,n);if(v){var r=M(n,o);Xl(r,{rotation:-((isNaN(+i)?x[0]:Be(i,w,x,!0))+Math.PI/2)},t),l.add(r),m.setItemGraphicEl(n,r)}if(p){var e=S(n,o),a=d.get("clip");Xl(e,{shape:{endAngle:Be(i,w,x,a)}},t),l.add(e),Fs(t.seriesIndex,m.dataType,n,e),c[n]=e}})).update((function(n,i){var r=m.get(y,n);if(v){var e=h.getItemGraphicEl(i),a=e?e.rotation:o,s=M(n,a);s.rotation=a,Yl(s,{rotation:-((isNaN(+r)?x[0]:Be(r,w,x,!0))+Math.PI/2)},t),l.add(s),m.setItemGraphicEl(n,s)}if(p){var u=f[i],g=S(n,u?u.shape.endAngle:o),b=d.get("clip");Yl(g,{shape:{endAngle:Be(r,w,x,b)}},t),l.add(g),Fs(t.seriesIndex,m.dataType,n,g),c[n]=g}})).execute(),m.each((function(t){var n=m.getItemModel(t),i=n.getModel("emphasis"),e=i.get("focus"),o=i.get("blurScope"),a=i.get("disabled");if(v){var s=m.getItemGraphicEl(t),u=m.getItemVisual(t,"style"),l=u.fill;if(s instanceof vs){var h=s.style;s.useStyle(ut({image:h.image,x:h.x,y:h.y,width:h.width,height:h.height},u))}else s.useStyle(u),"pointer"!==s.type&&s.setColor(l);s.setStyle(n.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",r(Be(m.get(y,t),w,[0,1],!0))),s.z2EmphasisLift=0,Au(s,n),xu(s,e,o,a)}if(p){var f=c[t];f.useStyle(m.getItemVisual(t,"style")),f.setStyle(n.getModel(["progress","itemStyle"]).getItemStyle()),f.z2EmphasisLift=0,Au(f,n),xu(f,e,o,a)}})),this._progressEls=c)},n.prototype._renderAnchor=function(t,n){var i=t.getModel("anchor");if(i.get("show")){var r=i.get("size"),e=i.get("icon"),o=i.get("offsetCenter"),a=i.get("keepAspect"),s=Ep(e,n.cx-r/2+Fe(o[0],n.r),n.cy-r/2+Fe(o[1],n.r),r,r,null,a);s.z2=i.get("showAbove")?1:0,s.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(s)}},n.prototype._renderTitleAndDetail=function(t,n,i,r,e){var o=this,a=t.getData(),s=a.mapDimension("value"),u=+t.get("min"),l=+t.get("max"),h=new Oe,f=[],c=[],v=t.isAnimationEnabled(),d=t.get(["pointer","showAbove"]);a.diff(this._data).add((function(t){f[t]=new Ss({silent:!0}),c[t]=new Ss({silent:!0})})).update((function(t,n){f[t]=o._titleEls[n],c[t]=o._detailEls[n]})).execute(),a.each((function(n){var i=a.getItemModel(n),o=a.get(s,n),p=new Oe,m=r(Be(o,[u,l],[0,1],!0)),y=i.getModel("title");if(y.get("show")){var g=y.get("offsetCenter"),b=e.cx+Fe(g[0],e.r),w=e.cy+Fe(g[1],e.r);(T=f[n]).attr({z2:d?0:2,style:Ch(y,{x:b,y:w,text:a.getName(n),align:"center",verticalAlign:"middle"},{inheritColor:m})}),p.add(T)}var x=i.getModel("detail");if(x.get("show")){var M=x.get("offsetCenter"),S=e.cx+Fe(M[0],e.r),k=e.cy+Fe(M[1],e.r),A=Fe(x.get("width"),e.r),N=Fe(x.get("height"),e.r),C=t.get(["progress","show"])?a.getItemVisual(n,"style").fill:m,T=c[n],z=x.get("formatter");T.attr({z2:d?0:2,style:Ch(x,{x:S,y:k,text:nT(o,z),width:isNaN(A)?null:A,height:isNaN(N)?null:N,align:"center",verticalAlign:"middle"},{inheritColor:C})}),_h(T,{normal:x},o,(function(t){return nT(t,z)})),v&&Bh(T,n,a,t,{getFormattedLabel:function(t,n,i,r,e,a){return nT(a?a.interpolatedValue:o,z)}}),p.add(T)}h.add(p)})),this.group.add(h),this._titleEls=f,this._detailEls=c},n.type="gauge",n}(Id),rT=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.visualStyleAccessPath="itemStyle",i}return E(n,t),n.prototype.getInitialData=function(){return OM(this,["value"])},n.type="series.gauge",n.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},n}(gd),eT=["itemStyle","opacity"],oT=function(t){function n(n,i){var r=t.call(this)||this,e=r,o=new wl,a=new Ss;return e.setTextContent(a),r.setTextGuideLine(o),r.updateData(n,i,!0),r}return E(n,t),n.prototype.updateData=function(t,n,i){var r=this,e=t.hostModel,o=t.getItemModel(n),a=t.getItemLayout(n),s=o.getModel("emphasis"),u=o.get(eT);u=null==u?1:u,i||$l(r),r.useStyle(t.getItemVisual(n,"style")),r.style.lineJoin="round",i?(r.setShape({points:a.points}),r.style.opacity=0,Xl(r,{style:{opacity:u}},e,n)):Yl(r,{style:{opacity:u},shape:{points:a.points}},e,n),Au(r,o),this._updateLabel(t,n),xu(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},n.prototype._updateLabel=function(t,n){var i=this,r=this.getTextGuideLine(),e=i.getTextContent(),o=t.hostModel,a=t.getItemModel(n),s=t.getItemLayout(n).label,u=t.getItemVisual(n,"style"),l=u.fill;Ah(e,Nh(a),{labelFetcher:t.hostModel,labelDataIndex:n,defaultOpacity:u.opacity,defaultText:t.getName(n)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),i.setTextConfig({local:!0,inside:!!s.inside,insideStroke:l,outsideFill:l});var h=s.linePoints;r.setShape({points:h}),i.textGuideLineConfig={anchor:h?new ee(h[0][0],h[0][1]):null},Yl(e,{style:{x:s.x,y:s.y}},o,n),e.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),Xb(i,Gb(a),{stroke:l})},n}(gl),aT=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.ignoreLabelLineUpdate=!0,i}return E(n,t),n.prototype.render=function(t){var n=t.getData(),i=this._data,r=this.group;n.diff(i).add((function(t){var i=new oT(n,t);n.setItemGraphicEl(t,i),r.add(i)})).update((function(t,e){var o=i.getItemGraphicEl(e);o.updateData(n,t),r.add(o),n.setItemGraphicEl(t,o)})).remove((function(n){ql(i.getItemGraphicEl(n),t,n)})).execute(),this._data=n},n.prototype.remove=function(){this.group.removeAll(),this._data=null},n.prototype.dispose=function(){},n.type="funnel",n}(Id),sT=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.init=function(n){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new DM(gt(this.getData,this),gt(this.getRawData,this)),this._defaultLabelLine(n)},n.prototype.getInitialData=function(){return OM(this,{coordDimensions:["value"],encodeDefaulter:bt(oc,this)})},n.prototype._defaultLabelLine=function(t){oo(t,"labelLine",["show"]);var n=t.labelLine,i=t.emphasis.labelLine;n.show=n.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},n.prototype.getDataParams=function(n){var i=this.getData(),r=t.prototype.getDataParams.call(this,n),e=i.mapDimension("value"),o=i.getSum(e);return r.percent=o?+(i.get(e,n)/o*100).toFixed(2):0,r.$vars.push("percent"),r},n.type="series.funnel",n.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},n}(gd);function uT(t,n){t.eachSeriesByType("funnel",(function(t){var i=t.getData(),r=i.mapDimension("value"),e=t.get("sort"),o=function(t,n){return Xf(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})}(t,n),a=t.get("orient"),s=o.width,u=o.height,l=function(t,n){for(var i=t.mapDimension("value"),r=t.mapArray(i,(function(t){return t})),e=[],o="ascending"===n,a=0,s=t.count();a<s;a++)e[a]=a;return xt(n)?e.sort(n):"none"!==n&&e.sort((function(t,n){return o?r[t]-r[n]:r[n]-r[t]})),e}(i,e),h=o.x,f=o.y,c="horizontal"===a?[Fe(t.get("minSize"),u),Fe(t.get("maxSize"),u)]:[Fe(t.get("minSize"),s),Fe(t.get("maxSize"),s)],v=i.getDataExtent(r),d=t.get("min"),p=t.get("max");null==d&&(d=Math.min(v[0],0)),null==p&&(p=v[1]);var m=t.get("funnelAlign"),y=t.get("gap"),g=(("horizontal"===a?s:u)-y*(i.count()-1))/i.count(),b=function(t,n){if("horizontal"===a){var e=Be(i.get(r,t)||0,[d,p],c,!0),o=void 0;switch(m){case"top":o=f;break;case"center":o=f+(u-e)/2;break;case"bottom":o=f+(u-e)}return[[n,o],[n,o+e]]}var l,v=Be(i.get(r,t)||0,[d,p],c,!0);switch(m){case"left":l=h;break;case"center":l=h+(s-v)/2;break;case"right":l=h+s-v}return[[l,n],[l+v,n]]};"ascending"===e&&(g=-g,y=-y,"horizontal"===a?h+=s:f+=u,l=l.reverse());for(var w=0;w<l.length;w++){var x=l[w],M=l[w+1],S=i.getItemModel(x);if("horizontal"===a){var k=S.get(["itemStyle","width"]);null==k?k=g:(k=Fe(k,s),"ascending"===e&&(k=-k));var A=b(x,h),N=b(M,h+k);h+=k+y,i.setItemLayout(x,{points:A.concat(N.slice().reverse())})}else{var C=S.get(["itemStyle","height"]);null==C?C=g:(C=Fe(C,u),"ascending"===e&&(C=-C)),A=b(x,f),N=b(M,f+C),f+=C+y,i.setItemLayout(x,{points:A.concat(N.slice().reverse())})}}!function(t){var n=t.hostModel.get("orient");t.each((function(i){var r,e,o,a,s=t.getItemModel(i),u=s.getModel("label").get("position"),l=s.getModel("labelLine"),h=t.getItemLayout(i),f=h.points,c="inner"===u||"inside"===u||"center"===u||"insideLeft"===u||"insideRight"===u;if(c)"insideLeft"===u?(e=(f[0][0]+f[3][0])/2+5,o=(f[0][1]+f[3][1])/2,r="left"):"insideRight"===u?(e=(f[1][0]+f[2][0])/2-5,o=(f[1][1]+f[2][1])/2,r="right"):(e=(f[0][0]+f[1][0]+f[2][0]+f[3][0])/4,o=(f[0][1]+f[1][1]+f[2][1]+f[3][1])/4,r="center"),a=[[e,o],[e,o]];else{var v=void 0,d=void 0,p=void 0,m=void 0,y=l.get("length");"left"===u?(d=(f[3][1]+f[0][1])/2,e=(p=(v=(f[3][0]+f[0][0])/2)-y)-5,r="right"):"right"===u?(d=(f[1][1]+f[2][1])/2,e=(p=(v=(f[1][0]+f[2][0])/2)+y)+5,r="left"):"top"===u?(v=(f[3][0]+f[0][0])/2,o=(m=(d=(f[3][1]+f[0][1])/2)-y)-5,r="center"):"bottom"===u?(v=(f[1][0]+f[2][0])/2,o=(m=(d=(f[1][1]+f[2][1])/2)+y)+5,r="center"):"rightTop"===u?(v="horizontal"===n?f[3][0]:f[1][0],d="horizontal"===n?f[3][1]:f[1][1],"horizontal"===n?(o=(m=d-y)-5,r="center"):(e=(p=v+y)+5,r="top")):"rightBottom"===u?(v=f[2][0],d=f[2][1],"horizontal"===n?(o=(m=d+y)+5,r="center"):(e=(p=v+y)+5,r="bottom")):"leftTop"===u?(v=f[0][0],d="horizontal"===n?f[0][1]:f[1][1],"horizontal"===n?(o=(m=d-y)-5,r="center"):(e=(p=v-y)-5,r="right")):"leftBottom"===u?(v="horizontal"===n?f[1][0]:f[3][0],d="horizontal"===n?f[1][1]:f[2][1],"horizontal"===n?(o=(m=d+y)+5,r="center"):(e=(p=v-y)-5,r="right")):(v=(f[1][0]+f[2][0])/2,d=(f[1][1]+f[2][1])/2,"horizontal"===n?(o=(m=d+y)+5,r="center"):(e=(p=v+y)+5,r="left")),"horizontal"===n?e=p=v:o=m=d,a=[[v,d],[p,m]]}h.label={linePoints:a,x:e,y:o,verticalAlign:"middle",textAlign:r,inside:c}}))}(i)}))}var lT=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i._dataGroup=new Oe,i._initialized=!1,i}return E(n,t),n.prototype.init=function(){this.group.add(this._dataGroup)},n.prototype.render=function(t){this._progressiveEls=null;var n=this._dataGroup,i=t.getData(),r=this._data,e=t.coordinateSystem,o=e.dimensions,a=cT(t);if(i.diff(r).add((function(t){vT(fT(i,n,t,o,e),i,t,a)})).update((function(n,s){var u=r.getItemGraphicEl(s),l=hT(i,n,o,e);i.setItemGraphicEl(n,u),Yl(u,{shape:{points:l}},t,n),$l(u),vT(u,i,n,a)})).remove((function(t){var i=r.getItemGraphicEl(t);n.remove(i)})).execute(),!this._initialized){this._initialized=!0;var s=function(t,i){var r=t.model,e=t.getRect(),o=new ws({shape:{x:e.x,y:e.y,width:e.width,height:e.height}}),a="horizontal"===r.get("layout")?"width":"height";return o.setShape(a,0),Xl(o,{shape:{width:e.width,height:e.height}},i,(function(){setTimeout((function(){n.removeClipPath()}))})),o}(e,t);n.setClipPath(s)}this._data=i},n.prototype.incrementalPrepareRender=function(){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},n.prototype.incrementalRender=function(t,n){for(var i=n.getData(),r=n.coordinateSystem,e=r.dimensions,o=cT(n),a=this._progressiveEls=[],s=t.start;s<t.end;s++){var u=fT(i,this._dataGroup,s,e,r);u.incremental=!0,vT(u,i,s,o),a.push(u)}},n.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},n.type="parallel",n}(Id);function hT(t,n,i,r){for(var e,o=[],a=0;a<i.length;a++){var s=i[a],u=t.get(t.mapDimension(s),n);e=u,("category"===r.getAxis(s).type?null==e:null==e||isNaN(e))||o.push(r.dataToPoint(u,s))}return o}function fT(t,n,i,r,e){var o=hT(t,i,r,e),a=new wl({shape:{points:o},z2:10});return n.add(a),t.setItemGraphicEl(i,a),a}function cT(t){var n=t.get("smooth",!0);return!0===n&&(n=.3),It(n=Ke(n))&&(n=0),{smooth:n}}function vT(t,n,i,r){t.useStyle(n.getItemVisual(i,"style")),t.style.fill=null,t.setShape("smooth",r.smooth);var e=n.getItemModel(i),o=e.getModel("emphasis");Au(t,e,"lineStyle"),xu(t,o.get("focus"),o.get("blurScope"),o.get("disabled"))}var dT=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.visualStyleAccessPath="lineStyle",i.visualDrawType="stroke",i}return E(n,t),n.prototype.getInitialData=function(){return qy(null,this,{useEncodeDefaulter:gt(pT,null,this)})},n.prototype.getRawIndicesByActiveState=function(t){var n=this.coordinateSystem,i=this.getData(),r=[];return n.eachActiveState(i,(function(n,e){t===n&&r.push(i.getRawIndex(e))})),r},n.type="series.parallel",n.dependencies=["parallel"],n.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},n}(gd);function pT(t){var n=t.ecModel.getComponent("parallel",t.get("parallelIndex"));if(n){var i={};return vt(n.dimensions,(function(t){var n=+t.replace("dim","");i[t]=n})),i}}var mT=["lineStyle","opacity"],yT={seriesType:"parallel",reset:function(t){var n=t.coordinateSystem,i={normal:t.get(["lineStyle","opacity"]),active:t.get("activeOpacity"),inactive:t.get("inactiveOpacity")};return{progress:function(t,r){n.eachActiveState(r,(function(t,n){var e=i[t];if("normal"===t&&r.hasItemOption){var o=r.getItemModel(n).get(mT,!0);null!=o&&(e=o)}r.ensureUniqueItemVisual(n,"style").opacity=e}),t.start,t.end)}}}};function gT(t){!function(t){if(!t.parallel){var n=!1;vt(t.series,(function(t){t&&"parallel"===t.type&&(n=!0)})),n&&(t.parallel=[{}])}}(t),function(t){vt(eo(t.parallelAxis),(function(n){if(At(n)){var i=n.parallelIndex||0,r=eo(t.parallel)[i];r&&r.parallelAxisDefault&&at(n,r.parallelAxisDefault,!1)}}))}(t)}var bT=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.render=function(t,n,i){this._model=t,this._api=i,this._handlers||(this._handlers={},vt(wT,(function(t,n){i.getZr().on(n,this._handlers[n]=gt(t,this))}),this)),Pd(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},n.prototype.dispose=function(t,n){Wd(this,"_throttledDispatchExpand"),vt(this._handlers,(function(t,i){n.getZr().off(i,t)})),this._handlers=null},n.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},n.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(ut({type:"parallelAxisExpand"},t))},n.type="parallel",n}(Nd),wT={mousedown:function(t){xT(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var n=this._mouseDownPoint;if(xT(this,"click")&&n){var i=[t.offsetX,t.offsetY];if(Math.pow(n[0]-i[0],2)+Math.pow(n[1]-i[1],2)>5)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==r.behavior&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&xT(this,"mousemove")){var n=this._model,i=n.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),r=i.behavior;"jump"===r&&this._throttledDispatchExpand.debounceNextCall(n.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===r?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===r?null:{duration:0}})}}};function xT(t,n){var i=t._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===n}var MT=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},n.prototype.mergeOption=function(t){t&&at(this.option,t,!0),this._initDimensions()},n.prototype.contains=function(t,n){var i=t.get("parallelIndex");return null!=i&&n.getComponent("parallel",i)===this},n.prototype.setAxisExpand=function(t){vt(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(n){t.hasOwnProperty(n)&&(this.option[n]=t[n])}),this)},n.prototype._initDimensions=function(){var t=this.dimensions=[],n=this.parallelAxisIndex=[];vt(mt(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this),(function(i){t.push("dim"+i.get("dim")),n.push(i.componentIndex)}))},n.type="parallel",n.dependencies=["parallelAxis"],n.layoutMode="box",n.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},n}(Jf),ST=function(t){function n(n,i,r,e,o){var a=t.call(this,n,i,r)||this;return a.type=e||"value",a.axisIndex=o,a}return E(n,t),n.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},n}(xb);function kT(t,n,i,r,e,o){t=t||0;var a=i[1]-i[0];if(null!=e&&(e=NT(e,[0,a])),null!=o&&(o=Math.max(o,null!=e?e:0)),"all"===r){var s=Math.abs(n[1]-n[0]);s=NT(s,[0,a]),e=o=NT(s,[e,o]),r=0}n[0]=NT(n[0],i),n[1]=NT(n[1],i);var u=AT(n,r);n[r]+=t;var l,h=e||0,f=i.slice();return u.sign<0?f[0]+=h:f[1]-=h,n[r]=NT(n[r],f),l=AT(n,r),null!=e&&(l.sign!==u.sign||l.span<e)&&(n[1-r]=n[r]+u.sign*e),l=AT(n,r),null!=o&&l.span>o&&(n[1-r]=n[r]+l.sign*o),n}function AT(t,n){var i=t[n]-t[1-n];return{span:Math.abs(i),sign:i>0?-1:i<0?1:n?-1:1}}function NT(t,n){return Math.min(null!=n[1]?n[1]:1/0,Math.max(null!=n[0]?n[0]:-1/0,t))}var CT=vt,TT=Math.min,zT=Math.max,IT=Math.floor,LT=Math.ceil,OT=Ee,DT=Math.PI,RT=function(){function t(t,n,i){this.type="parallel",this._axesMap=Vt(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,n,i)}return t.prototype._init=function(t,n){var i=t.parallelAxisIndex;CT(t.dimensions,(function(t,r){var e=i[r],o=n.getComponent("parallelAxis",e),a=this._axesMap.set(t,new ST(t,Ug(o),[0,0],o.get("type"),e));a.onBand="category"===a.type&&o.get("boundaryGap"),a.inverse=o.get("inverse"),o.axis=a,a.model=o,a.coordinateSystem=o.coordinateSystem=this}),this)},t.prototype.update=function(t){this._updateAxesFromSeries(this._model,t)},t.prototype.containPoint=function(t){var n=this._makeLayoutInfo(),i=n.axisBase,r=n.layoutBase,e=n.pixelDimIndex,o=t[1-e],a=t[e];return o>=i&&o<=i+n.axisLength&&a>=r&&a<=r+n.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,n){n.eachSeries((function(i){if(t.contains(i,n)){var r=i.getData();CT(this.dimensions,(function(t){var n=this._axesMap.get(t);n.scale.unionExtentFromData(r,r.mapDimension(t)),Gg(n.scale,n.model)}),this)}}),this)},t.prototype.resize=function(t,n){this._rect=Xf(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,n=this._model,i=this._rect,r=["x","y"],e=["width","height"],o=n.get("layout"),a="horizontal"===o?0:1,s=i[e[a]],u=[0,s],l=this.dimensions.length,h=_T(n.get("axisExpandWidth"),u),f=_T(n.get("axisExpandCount")||0,[0,l]),c=n.get("axisExpandable")&&l>3&&l>f&&f>1&&h>0&&s>0,v=n.get("axisExpandWindow");v?(t=_T(v[1]-v[0],u),v[1]=v[0]+t):(t=_T(h*(f-1),u),(v=[h*(n.get("axisExpandCenter")||IT(l/2))-t/2])[1]=v[0]+t);var d=(s-t)/(l-f);d<3&&(d=0);var p=[IT(OT(v[0]/h,1))+1,LT(OT(v[1]/h,1))-1];return{layout:o,pixelDimIndex:a,layoutBase:i[r[a]],layoutLength:s,axisBase:i[r[1-a]],axisLength:i[e[1-a]],axisExpandable:c,axisExpandWidth:h,axisCollapseWidth:d,axisExpandWindow:v,axisCount:l,winInnerIndices:p,axisExpandWindow0Pos:d/h*v[0]}},t.prototype._layoutAxes=function(){var t=this._rect,n=this._axesMap,i=this.dimensions,r=this._makeLayoutInfo(),e=r.layout;n.each((function(t){var n=[0,r.axisLength],i=t.inverse?1:0;t.setExtent(n[i],n[1-i])})),CT(i,(function(n,i){var o=(r.axisExpandable?FT:BT)(i,r),a={horizontal:{x:o.position,y:r.axisLength},vertical:{x:0,y:o.position}},s=[a[e].x+t.x,a[e].y+t.y],u={horizontal:DT/2,vertical:0}[e],l=[1,0,0,1,0,0];Gr(l,l,u),Xr(l,l,s),this._axesLayout[n]={position:s,rotation:u,transform:l,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,n){return this.axisCoordToPoint(this._axesMap.get(n).dataToCoord(t),n)},t.prototype.eachActiveState=function(t,n,i,r){null==i&&(i=0),null==r&&(r=t.count());var e=this._axesMap,o=this.dimensions,a=[],s=[];vt(o,(function(n){a.push(t.mapDimension(n)),s.push(e.get(n).model)}));for(var u=this.hasAxisBrushed(),l=i;l<r;l++){var h=void 0;if(u){h="active";for(var f=t.getValues(a,l),c=0,v=o.length;c<v;c++)if("inactive"===s[c].getActiveState(f[c])){h="inactive";break}}else h="normal";n(h,l)}},t.prototype.hasAxisBrushed=function(){for(var t=this.dimensions,n=this._axesMap,i=!1,r=0,e=t.length;r<e;r++)"normal"!==n.get(t[r]).model.getActiveState()&&(i=!0);return i},t.prototype.axisCoordToPoint=function(t,n){return lh([t,0],this._axesLayout[n].transform)},t.prototype.getAxisLayout=function(t){return ot(this._axesLayout[t])},t.prototype.getSlidedAxisExpandWindow=function(t){var n=this._makeLayoutInfo(),i=n.pixelDimIndex,r=n.axisExpandWindow.slice(),e=r[1]-r[0],o=[0,n.axisExpandWidth*(n.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:r};var a,s=t[i]-n.layoutBase-n.axisExpandWindow0Pos,u="slide",l=n.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),f=null!=h[0];if(l)f&&l&&s<e*h[0]?(u="jump",a=s-e*h[2]):f&&l&&s>e*(1-h[0])?(u="jump",a=s-e*(1-h[2])):(a=s-e*h[1])>=0&&(a=s-e*(1-h[1]))<=0&&(a=0),(a*=n.axisExpandWidth/l)?kT(a,r,o,"all"):u="none";else{var c=r[1]-r[0];(r=[zT(0,o[1]*s/c-c/2)])[1]=TT(o[1],r[0]+c),r[0]=r[1]-c}return{axisExpandWindow:r,behavior:u}},t}();function _T(t,n){return TT(zT(t,n[0]),n[1])}function BT(t,n){var i=n.layoutLength/(n.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}}function FT(t,n){var i,r,e=n.axisExpandWidth,o=n.axisCollapseWidth,a=n.winInnerIndices,s=o,u=!1;return t<a[0]?(i=t*o,r=o):t<=a[1]?(i=n.axisExpandWindow0Pos+t*e-n.axisExpandWindow[0],s=e,u=!0):(i=n.layoutLength-(n.axisCount-1-t)*o,r=o),{position:i,axisNameAvailableWidth:s,axisLabelShow:u,nameTruncateMaxWidth:r}}var ET={create:function(t,n){var i=[];return t.eachComponent("parallel",(function(r,e){var o=new RT(r,t,n);o.name="parallel_"+e,o.resize(r,n),r.coordinateSystem=o,o.model=r,i.push(o)})),t.eachSeries((function(t){if("parallel"===t.get("coordinateSystem")){var n=t.getReferringComponents("parallel",xo).models[0];t.coordinateSystem=n.coordinateSystem}})),i}},PT=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.activeIntervals=[],i}return E(n,t),n.prototype.getAreaSelectStyle=function(){return _o([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},n.prototype.setActiveIntervals=function(t){var n=this.activeIntervals=ot(t);if(n)for(var i=n.length-1;i>=0;i--)Pe(n[i])},n.prototype.getActiveState=function(t){var n=this.activeIntervals;if(!n.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===n.length){var i=n[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var r=0,e=n.length;r<e;r++)if(n[r][0]<=t&&t<=n[r][1])return"active";return"inactive"},n}(Jf);ft(PT,tb);var WT=Math.min,VT=Math.max,jT=Math.pow,HT={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},YT={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},XT={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},GT=0,UT=function(t){function n(n){var i=t.call(this)||this;return i._track=[],i._covers=[],i._handlers={},i._zr=n,i.group=new Oe,i._uid="brushController_"+GT++,vt(wz,(function(t,n){this._handlers[n]=gt(t,this)}),i),i}return E(n,t),n.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},n.prototype._doEnableBrush=function(t){var n=this._zr;this._enableGlobalPan||function(t,n,i){KS(t).globalPan=i}(n,0,this._uid),vt(this._handlers,(function(t,i){n.on(i,t)})),this._brushType=t.brushType,this._brushOption=at(ot(XT),t,!0)},n.prototype._doDisableBrush=function(){var t=this._zr;!function(t,n,i){var r=KS(t);r.globalPan===i&&(r.globalPan=null)}(t,0,this._uid),vt(this._handlers,(function(n,i){t.off(i,n)})),this._brushType=this._brushOption=null},n.prototype.setPanels=function(t){if(t&&t.length){var n=this._panels={};vt(t,(function(t){n[t.panelId]=ot(t)}))}else this._panels=null;return this},n.prototype.mount=function(t){this._enableGlobalPan=(t=t||{}).enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=n.getLocalTransform(),this},n.prototype.updateCovers=function(t){t=dt(t,(function(t){return at(ot(XT),t,!0)}));var n=this._covers,i=this._covers=[],r=this,e=this._creatingCover;return new yy(n,t,(function(t,n){return o(t.__brushOption,n)}),o).add(a).update(a).remove((function(t){n[t]!==e&&r.group.remove(n[t])})).execute(),this;function o(t,n){return(null!=t.id?t.id:"\0-brush-index-"+n)+"-"+t.brushType}function a(o,a){var s=t[o];if(null!=a&&n[a]===e)i[o]=n[a];else{var u=i[o]=null!=a?(n[a].__brushOption=s,n[a]):qT(r,ZT(r,s));JT(r,u)}}},n.prototype.unmount=function(){return this.enableBrush(!1),iz(this),this._zr.remove(this.group),this},n.prototype.dispose=function(){this.unmount(),this.off()},n}(mn);function ZT(t,n){var i=Mz[n.brushType].createCover(t,n);return i.__brushOption=n,KT(i,n),t.group.add(i),i}function qT(t,n){var i=QT(n);return i.endCreating&&(i.endCreating(t,n),KT(n,n.__brushOption)),n}function $T(t,n){var i=n.__brushOption;QT(n).updateCoverShape(t,n,i.range,i)}function KT(t,n){var i=n.z;null==i&&(i=1e4),t.traverse((function(t){t.z=i,t.z2=i}))}function JT(t,n){QT(n).updateCommon(t,n),$T(t,n)}function QT(t){return Mz[t.__brushOption.brushType]}function tz(t,n,i){var r,e=t._panels;if(!e)return!0;var o=t._transform;return vt(e,(function(t){t.isTargetByCursor(n,i,o)&&(r=t)})),r}function nz(t,n){var i=t._panels;if(!i)return!0;var r=n.__brushOption.panelId;return null==r||i[r]}function iz(t){var n=t._covers,i=n.length;return vt(n,(function(n){t.group.remove(n)}),t),n.length=0,!!i}function rz(t,n){var i=dt(t._covers,(function(t){var n=t.__brushOption,i=ot(n.range);return{brushType:n.brushType,panelId:n.panelId,range:i}}));t.trigger("brush",{areas:i,isEnd:!!n.isEnd,removeOnClick:!!n.removeOnClick})}function ez(t){var n=t.length-1;return n<0&&(n=0),[t[0],t[n]]}function oz(t,n,i,r){var e=new Oe;return e.add(new ws({name:"main",style:lz(i),silent:!0,draggable:!0,cursor:"move",drift:bt(cz,t,n,e,["n","s","w","e"]),ondragend:bt(rz,n,{isEnd:!0})})),vt(r,(function(i){e.add(new ws({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:bt(cz,t,n,e,i),ondragend:bt(rz,n,{isEnd:!0})}))})),e}function az(t,n,i,r){var e=r.brushStyle.lineWidth||0,o=VT(e,6),a=i[0][0],s=i[1][0],u=a-e/2,l=s-e/2,h=i[0][1],f=i[1][1],c=h-o+e/2,v=f-o+e/2,d=h-a,p=f-s,m=d+e,y=p+e;uz(t,n,"main",a,s,d,p),r.transformable&&(uz(t,n,"w",u,l,o,y),uz(t,n,"e",c,l,o,y),uz(t,n,"n",u,l,m,o),uz(t,n,"s",u,v,m,o),uz(t,n,"nw",u,l,o,o),uz(t,n,"ne",c,l,o,o),uz(t,n,"sw",u,v,o,o),uz(t,n,"se",c,v,o,o))}function sz(t,n){var i=n.__brushOption,r=i.transformable,e=n.childAt(0);e.useStyle(lz(i)),e.attr({silent:!r,cursor:r?"move":"default"}),vt([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],(function(i){var e=n.childOfName(i.join("")),o=1===i.length?fz(t,i[0]):function(t,n){var i=[fz(t,n[0]),fz(t,n[1])];return("e"===i[0]||"w"===i[0])&&i.reverse(),i.join("")}(t,i);e&&e.attr({silent:!r,invisible:!r,cursor:r?YT[o]+"-resize":null})}))}function uz(t,n,i,r,e,o,a){var s=n.childOfName(i);s&&s.setShape(function(t){var n=WT(t[0][0],t[1][0]),i=WT(t[0][1],t[1][1]);return{x:n,y:i,width:VT(t[0][0],t[1][0])-n,height:VT(t[0][1],t[1][1])-i}}(pz(t,n,[[r,e],[r+o,e+a]])))}function lz(t){return lt({strokeNoScale:!0},t.brushStyle)}function hz(t,n,i,r){var e=[WT(t,i),WT(n,r)],o=[VT(t,i),VT(n,r)];return[[e[0],o[0]],[e[1],o[1]]]}function fz(t,n){return{left:"w",right:"e",top:"n",bottom:"s"}[hh({w:"left",e:"right",n:"top",s:"bottom"}[n],function(t){return uh(t.group)}(t))]}function cz(t,n,i,r,e,o){var a=i.__brushOption,s=t.toRectRange(a.range),u=dz(n,e,o);vt(r,(function(t){var n=HT[t];s[n[0]][n[1]]+=u[n[0]]})),a.range=t.fromRectRange(hz(s[0][0],s[1][0],s[0][1],s[1][1])),JT(n,i),rz(n,{isEnd:!1})}function vz(t,n,i,r){var e=n.__brushOption.range,o=dz(t,i,r);vt(e,(function(t){t[0]+=o[0],t[1]+=o[1]})),JT(t,n),rz(t,{isEnd:!1})}function dz(t,n,i){var r=t.group,e=r.transformCoordToLocal(n,i),o=r.transformCoordToLocal(0,0);return[e[0]-o[0],e[1]-o[1]]}function pz(t,n,i){var r=nz(t,n);return r&&!0!==r?r.clipPath(i,t._transform):ot(i)}function mz(t){var n=t.event;n.preventDefault&&n.preventDefault()}function yz(t,n,i){return t.childOfName("main").contain(n,i)}function gz(t,n,i,r){var e,o=t._creatingCover,a=t._creatingPanel,s=t._brushOption;if(t._track.push(i.slice()),function(t){var n=t._track;if(!n.length)return!1;var i=n[n.length-1],r=n[0],e=i[0]-r[0],o=i[1]-r[1];return jT(e*e+o*o,.5)>6}(t)||o){if(a&&!o){"single"===s.brushMode&&iz(t);var u=ot(s);u.brushType=bz(u.brushType,a),u.panelId=!0===a?null:a.panelId,o=t._creatingCover=ZT(t,u),t._covers.push(o)}if(o){var l=Mz[bz(t._brushType,a)];o.__brushOption.range=l.getCreatingRange(pz(t,o,t._track)),r&&(qT(t,o),l.updateCommon(t,o)),$T(t,o),e={isEnd:r}}}else r&&"single"===s.brushMode&&s.removeOnClick&&tz(t,n,i)&&iz(t)&&(e={isEnd:r,removeOnClick:!0});return e}function bz(t,n){return"auto"===t?n.defaultBrushType:t}var wz={mousedown:function(t){if(this._dragging)xz(this,t);else if(!t.target||!t.target.draggable){mz(t);var n=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=tz(this,t,n))&&(this._dragging=!0,this._track=[n.slice()])}},mousemove:function(t){var n=this.group.transformCoordToLocal(t.offsetX,t.offsetY);if(function(t,n,i){if(t._brushType&&!function(t,n,i){var r=t._zr;return n<0||n>r.getWidth()||i<0||i>r.getHeight()}(t,n.offsetX,n.offsetY)){var r=t._zr,e=t._covers,o=tz(t,n,i);if(!t._dragging)for(var a=0;a<e.length;a++){var s=e[a].__brushOption;if(o&&(!0===o||s.panelId===o.panelId)&&Mz[s.brushType].contain(e[a],i[0],i[1]))return}o&&r.setCursorStyle("crosshair")}}(this,t,n),this._dragging){mz(t);var i=gz(this,t,n,!1);i&&rz(this,i)}},mouseup:function(t){xz(this,t)}};function xz(t,n){if(t._dragging){mz(n);var i=t.group.transformCoordToLocal(n.offsetX,n.offsetY),r=gz(t,n,i,!0);t._dragging=!1,t._track=[],t._creatingCover=null,r&&rz(t,r)}}var Mz={lineX:Sz(0),lineY:Sz(1),rect:{createCover:function(t,n){function i(t){return t}return oz({toRectRange:i,fromRectRange:i},t,n,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){var n=ez(t);return hz(n[1][0],n[1][1],n[0][0],n[0][1])},updateCoverShape:function(t,n,i,r){az(t,n,i,r)},updateCommon:sz,contain:yz},polygon:{createCover:function(t,n){var i=new Oe;return i.add(new wl({name:"main",style:lz(n),silent:!0})),i},getCreatingRange:function(t){return t},endCreating:function(t,n){n.remove(n.childAt(0)),n.add(new gl({name:"main",draggable:!0,drift:bt(vz,t,n),ondragend:bt(rz,t,{isEnd:!0})}))},updateCoverShape:function(t,n,i){n.childAt(0).setShape({points:pz(t,n,i)})},updateCommon:sz,contain:yz}};function Sz(t){return{createCover:function(n,i){return oz({toRectRange:function(n){var i=[n,[0,100]];return t&&i.reverse(),i},fromRectRange:function(n){return n[t]}},n,i,[[["w"],["e"]],[["n"],["s"]]][t])},getCreatingRange:function(n){var i=ez(n);return[WT(i[0][t],i[1][t]),VT(i[0][t],i[1][t])]},updateCoverShape:function(n,i,r,e){var o,a=nz(n,i);if(!0!==a&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(t);else{var s=n._zr;o=[0,[s.getWidth(),s.getHeight()][1-t]]}var u=[r,o];t&&u.reverse(),az(n,i,u,e)},updateCommon:sz,contain:yz}}function kz(t){return t=Cz(t),function(n){return vh(n,t)}}function Az(t,n){return t=Cz(t),function(i){var r=null!=n?n:i,e=r?t.x:t.y;return[e,e+((r?t.width:t.height)||0)]}}function Nz(t,n,i){var r=Cz(t);return function(t,e){return r.contain(e[0],e[1])&&!ak(t,n,i)}}function Cz(t){return ve.create(t)}var Tz=["axisLine","axisTickLabel","axisName"],zz=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.init=function(n,i){t.prototype.init.apply(this,arguments),(this._brushController=new UT(i.getZr())).on("brush",gt(this._onBrush,this))},n.prototype.render=function(t,n,i,r){if(!function(t,n,i){return i&&"axisAreaSelect"===i.type&&n.findComponents({mainType:"parallelAxis",query:i})[0]===t}(t,n,r)){this.axisModel=t,this.api=i,this.group.removeAll();var e=this._axisGroup;if(this._axisGroup=new Oe,this.group.add(this._axisGroup),t.get("show")){var o=function(t,n){return n.getComponent("parallel",t.get("parallelIndex"))}(t,n),a=o.coordinateSystem,s=t.getAreaSelectStyle(),u=s.width,l=ut({strokeContainThreshold:u},a.getAxisLayout(t.axis.dim)),h=new hS(t,l);vt(Tz,h.add,h),this._axisGroup.add(h.getGroup()),this._refreshBrushController(l,s,t,o,u,i),ch(e,this._axisGroup,t)}}},n.prototype._refreshBrushController=function(t,n,i,r,e,o){var a=i.axis.getExtent(),s=a[1]-a[0],u=Math.min(30,.1*Math.abs(s)),l=ve.create({x:a[0],y:-e/2,width:s,height:e});l.x-=u,l.width+=2*u,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:kz(l),isTargetByCursor:Nz(l,o,r),getLinearBrushOtherExtent:Az(l,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(function(t){var n=t.axis;return dt(t.activeIntervals,(function(t){return{brushType:"lineX",panelId:"pl",range:[n.dataToCoord(t[0],!0),n.dataToCoord(t[1],!0)]}}))}(i))},n.prototype._onBrush=function(t){var n=this.axisModel,i=n.axis,r=dt(t.areas,(function(t){return[i.coordToData(t.range[0],!0),i.coordToData(t.range[1],!0)]}));(!n.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:r})},n.prototype.dispose=function(){this._brushController.dispose()},n.type="parallelAxis",n}(Nd),Iz={type:"axisAreaSelect",event:"axisAreaSelected"},Lz={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function Oz(t){t.registerComponentView(bT),t.registerComponentModel(MT),t.registerCoordinateSystem("parallel",ET),t.registerPreprocessor(gT),t.registerComponentModel(PT),t.registerComponentView(zz),UM(t,"parallel",PT,Lz),function(t){t.registerAction(Iz,(function(t,n){n.eachComponent({mainType:"parallelAxis",query:t},(function(n){n.axis.model.setActiveIntervals(t.intervals)}))})),t.registerAction("parallelAxisExpand",(function(t,n){n.eachComponent({mainType:"parallel",query:t},(function(n){n.setAxisExpand(t)}))}))}(t)}var Dz=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0},Rz=function(t){function n(n){return t.call(this,n)||this}return E(n,t),n.prototype.getDefaultShape=function(){return new Dz},n.prototype.buildPath=function(t,n){var i=n.extent;t.moveTo(n.x1,n.y1),t.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),"vertical"===n.orient?(t.lineTo(n.x2+i,n.y2),t.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(t.lineTo(n.x2,n.y2+i),t.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),t.closePath()},n.prototype.highlight=function(){su(this)},n.prototype.downplay=function(){uu(this)},n}(us),_z=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i._focusAdjacencyDisabled=!1,i}return E(n,t),n.prototype.render=function(t,n,i){var r=this,e=t.getGraph(),o=this.group,a=t.layoutInfo,s=a.width,u=a.height,l=t.getData(),h=t.getData("edge"),f=t.get("orient");this._model=t,o.removeAll(),o.x=a.x,o.y=a.y,e.eachEdge((function(n){var i=new Rz,r=Bs(i);r.dataIndex=n.dataIndex,r.seriesIndex=t.seriesIndex,r.dataType="edge";var e,a,l,c,v,d,p,m,y=n.getModel(),g=y.getModel("lineStyle"),b=g.get("curveness"),w=n.node1.getLayout(),x=n.node1.getModel(),M=x.get("localX"),S=x.get("localY"),k=n.node2.getLayout(),A=n.node2.getModel(),N=A.get("localX"),C=A.get("localY"),T=n.getLayout();switch(i.shape.extent=Math.max(1,T.dy),i.shape.orient=f,"vertical"===f?(v=e=(null!=M?M*s:w.x)+T.sy,d=(a=(null!=S?S*u:w.y)+w.dy)*(1-b)+(c=null!=C?C*u:k.y)*b,p=l=(null!=N?N*s:k.x)+T.ty,m=a*b+c*(1-b)):(v=(e=(null!=M?M*s:w.x)+w.dx)*(1-b)+(l=null!=N?N*s:k.x)*b,d=a=(null!=S?S*u:w.y)+T.sy,p=e*b+l*(1-b),m=c=(null!=C?C*u:k.y)+T.ty),i.setShape({x1:e,y1:a,x2:l,y2:c,cpx1:v,cpy1:d,cpx2:p,cpy2:m}),i.useStyle(g.getItemStyle()),i.style.fill){case"source":i.style.fill=n.node1.getVisual("color"),i.style.decal=n.node1.getVisual("style").decal;break;case"target":i.style.fill=n.node2.getVisual("color"),i.style.decal=n.node2.getVisual("style").decal;break;case"gradient":var z=n.node1.getVisual("color"),I=n.node2.getVisual("color");Mt(z)&&Mt(I)&&(i.style.fill=new Ol(0,0,+("horizontal"===f),+("vertical"===f),[{color:z,offset:0},{color:I,offset:1}]))}var L=y.getModel("emphasis");Au(i,y,"lineStyle",(function(t){return t.getItemStyle()})),o.add(i),h.setItemGraphicEl(n.dataIndex,i);var O=L.get("focus");xu(i,"adjacency"===O?n.getAdjacentDataIndices():O,L.get("blurScope"),L.get("disabled")),Bs(i).dataType="edge"})),e.eachNode((function(n){var i=n.getLayout(),r=n.getModel(),e=r.get("localX"),a=r.get("localY"),h=r.getModel("emphasis"),f=new ws({shape:{x:null!=e?e*s:i.x,y:null!=a?a*u:i.y,width:i.dx,height:i.dy},style:r.getModel("itemStyle").getItemStyle(),z2:10});Ah(f,Nh(r),{labelFetcher:t,labelDataIndex:n.dataIndex,defaultText:n.id}),f.disableLabelAnimation=!0,f.setStyle("fill",n.getVisual("color")),f.setStyle("decal",n.getVisual("style").decal),Au(f,r),o.add(f),l.setItemGraphicEl(n.dataIndex,f),Bs(f).dataType="node";var c=h.get("focus");xu(f,"adjacency"===c?n.getAdjacentDataIndices():c,h.get("blurScope"),h.get("disabled"))})),l.eachItemGraphicEl((function(n,e){l.getItemModel(e).get("draggable")&&(n.drift=function(n,o){r._focusAdjacencyDisabled=!0,this.shape.x+=n,this.shape.y+=o,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:l.getRawIndex(e),localX:this.shape.x/s,localY:this.shape.y/u})},n.ondragend=function(){r._focusAdjacencyDisabled=!1},n.draggable=!0,n.cursor="move")})),!this._data&&t.isAnimationEnabled()&&o.setClipPath(function(t,n){var i=new ws({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return Xl(i,{shape:{width:t.width+20}},n,(function(){o.removeClipPath()})),i}(o.getBoundingRect(),t)),this._data=t.getData()},n.prototype.dispose=function(){},n.type="sankey",n}(Id),Bz=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.getInitialData=function(t,n){var i=t.edges||t.links,r=t.data||t.nodes,e=t.levels;this.levelModels=[];for(var o=this.levelModels,a=0;a<e.length;a++)null!=e[a].depth&&e[a].depth>=0&&(o[e[a].depth]=new qh(e[a],this,n));if(r&&i)return $C(r,i,this,!0,(function(t,n){t.wrapMethod("getItemModel",(function(t,n){var i=t.parentModel,r=i.getData().getItemLayout(n);if(r){var e=i.levelModels[r.depth];e&&(t.parentModel=e)}return t})),n.wrapMethod("getItemModel",(function(t,n){var i=t.parentModel,r=i.getGraph().getEdgeByIndex(n).node1.getLayout();if(r){var e=i.levelModels[r.depth];e&&(t.parentModel=e)}return t}))})).data},n.prototype.setNodePosition=function(t,n){var i=(this.option.data||this.option.nodes)[t];i.localX=n[0],i.localY=n[1]},n.prototype.getGraph=function(){return this.getData().graph},n.prototype.getEdgeData=function(){return this.getGraph().edgeData},n.prototype.formatTooltip=function(t,n,i){function r(t){return isNaN(t)||null==t}if("edge"===i){var e=this.getDataParams(t,i),o=e.data,a=e.value;return rd("nameValue",{name:o.source+" -- "+o.target,value:a,noValue:r(a)})}var s=this.getGraph().getNodeByIndex(t).getLayout().value,u=this.getDataParams(t,i).data.name;return rd("nameValue",{name:null!=u?u+"":null,value:s,noValue:r(s)})},n.prototype.optionUpdated=function(){},n.prototype.getDataParams=function(n,i){var r=t.prototype.getDataParams.call(this,n,i);if(null==r.value&&"node"===i){var e=this.getGraph().getNodeByIndex(n).getLayout().value;r.value=e}return r},n.type="series.sankey",n.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},n}(gd);function Fz(t,n){t.eachSeriesByType("sankey",(function(t){var i=t.get("nodeWidth"),r=t.get("nodeGap"),e=function(t,n){return Xf(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})}(t,n);t.layoutInfo=e;var o=e.width,a=e.height,s=t.getGraph(),u=s.nodes,l=s.edges;!function(t){vt(t,(function(t){var n=Uz(t.outEdges,Gz),i=Uz(t.inEdges,Gz),r=t.getValue()||0,e=Math.max(n,i,r);t.setLayout({value:e},!0)}))}(u),function(t,n,i,r,e,o,a,s,u){(function(t,n,i,r,e,o,a){for(var s=[],u=[],l=[],h=[],f=0,c=0;c<n.length;c++)s[c]=1;for(c=0;c<t.length;c++)u[c]=t[c].inEdges.length,0===u[c]&&l.push(t[c]);for(var v=-1;l.length;){for(var d=0;d<l.length;d++){var p=l[d],m=p.hostGraph.data.getRawDataItem(p.dataIndex),y=null!=m.depth&&m.depth>=0;y&&m.depth>v&&(v=m.depth),p.setLayout({depth:y?m.depth:f},!0),p.setLayout("vertical"===o?{dy:i}:{dx:i},!0);for(var g=0;g<p.outEdges.length;g++){var b=p.outEdges[g];s[n.indexOf(b)]=0;var w=b.node2;0==--u[t.indexOf(w)]&&h.indexOf(w)<0&&h.push(w)}}++f,l=h,h=[]}for(c=0;c<s.length;c++)if(1===s[c])throw new Error("Sankey is a DAG, the original data has cycle!");var x=v>f-1?v:f-1;a&&"left"!==a&&function(t,n,i,r){if("right"===n){for(var e=[],o=t,a=0;o.length;){for(var s=0;s<o.length;s++){var u=o[s];u.setLayout({skNodeHeight:a},!0);for(var l=0;l<u.inEdges.length;l++){var h=u.inEdges[l];e.indexOf(h.node1)<0&&e.push(h.node1)}}o=e,e=[],++a}vt(t,(function(t){Ez(t)||t.setLayout({depth:Math.max(0,r-t.getLayout().skNodeHeight)},!0)}))}else"justify"===n&&function(t,n){vt(t,(function(t){Ez(t)||t.outEdges.length||t.setLayout({depth:n},!0)}))}(t,r)}(t,a,0,x),function(t,n,i){vt(t,(function(t){var r=t.getLayout().depth*n;t.setLayout("vertical"===i?{y:r}:{x:r},!0)}))}(t,"vertical"===o?(e-i)/x:(r-i)/x,o)})(t,n,i,e,o,s,u),function(t,n,i,r,e,o,a){var s=function(t,n){var i=[],r="vertical"===n?"y":"x",e=Ao(t,(function(t){return t.getLayout()[r]}));return e.keys.sort((function(t,n){return t-n})),vt(e.keys,(function(t){i.push(e.buckets.get(t))})),i}(t,a);(function(t,n,i,r,e,o){var a=1/0;vt(t,(function(t){var n=t.length,s=0;vt(t,(function(t){s+=t.getLayout().value}));var u="vertical"===o?(r-(n-1)*e)/s:(i-(n-1)*e)/s;u<a&&(a=u)})),vt(t,(function(t){vt(t,(function(t,n){var i=t.getLayout().value*a;"vertical"===o?(t.setLayout({x:n},!0),t.setLayout({dx:i},!0)):(t.setLayout({y:n},!0),t.setLayout({dy:i},!0))}))})),vt(n,(function(t){var n=+t.getValue()*a;t.setLayout({dy:n},!0)}))})(s,n,i,r,e,a),Pz(s,e,i,r,a);for(var u=1;o>0;o--)Wz(s,u*=.99,a),Pz(s,e,i,r,a),Zz(s,u,a),Pz(s,e,i,r,a)}(t,n,o,e,r,a,s),function(t,n){var i="vertical"===n?"x":"y";vt(t,(function(t){t.outEdges.sort((function(t,n){return t.node2.getLayout()[i]-n.node2.getLayout()[i]})),t.inEdges.sort((function(t,n){return t.node1.getLayout()[i]-n.node1.getLayout()[i]}))})),vt(t,(function(t){var n=0,i=0;vt(t.outEdges,(function(t){t.setLayout({sy:n},!0),n+=t.getLayout().dy})),vt(t.inEdges,(function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy}))}))}(t,s)}(u,l,i,r,o,a,0!==mt(u,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}function Ez(t){var n=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=n.depth&&n.depth>=0}function Pz(t,n,i,r,e){var o="vertical"===e?"x":"y";vt(t,(function(t){var a,s,u;t.sort((function(t,n){return t.getLayout()[o]-n.getLayout()[o]}));for(var l=0,h=t.length,f="vertical"===e?"dx":"dy",c=0;c<h;c++)(u=l-(s=t[c]).getLayout()[o])>0&&(a=s.getLayout()[o]+u,s.setLayout("vertical"===e?{x:a}:{y:a},!0)),l=s.getLayout()[o]+s.getLayout()[f]+n;if((u=l-n-("vertical"===e?r:i))>0)for(a=s.getLayout()[o]-u,s.setLayout("vertical"===e?{x:a}:{y:a},!0),l=a,c=h-2;c>=0;--c)(u=(s=t[c]).getLayout()[o]+s.getLayout()[f]+n-l)>0&&(a=s.getLayout()[o]-u,s.setLayout("vertical"===e?{x:a}:{y:a},!0)),l=s.getLayout()[o]}))}function Wz(t,n,i){vt(t.slice().reverse(),(function(t){vt(t,(function(t){if(t.outEdges.length){var r=Uz(t.outEdges,Vz,i)/Uz(t.outEdges,Gz);if(isNaN(r)){var e=t.outEdges.length;r=e?Uz(t.outEdges,jz,i)/e:0}if("vertical"===i){var o=t.getLayout().x+(r-Xz(t,i))*n;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(r-Xz(t,i))*n;t.setLayout({y:a},!0)}}}))}))}function Vz(t,n){return Xz(t.node2,n)*t.getValue()}function jz(t,n){return Xz(t.node2,n)}function Hz(t,n){return Xz(t.node1,n)*t.getValue()}function Yz(t,n){return Xz(t.node1,n)}function Xz(t,n){return"vertical"===n?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function Gz(t){return t.getValue()}function Uz(t,n,i){for(var r=0,e=t.length,o=-1;++o<e;){var a=+n(t[o],i);isNaN(a)||(r+=a)}return r}function Zz(t,n,i){vt(t,(function(t){vt(t,(function(t){if(t.inEdges.length){var r=Uz(t.inEdges,Hz,i)/Uz(t.inEdges,Gz);if(isNaN(r)){var e=t.inEdges.length;r=e?Uz(t.inEdges,Yz,i)/e:0}if("vertical"===i){var o=t.getLayout().x+(r-Xz(t,i))*n;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(r-Xz(t,i))*n;t.setLayout({y:a},!0)}}}))}))}function qz(t){t.eachSeriesByType("sankey",(function(t){var n=t.getGraph().nodes;if(n.length){var i=1/0,r=-1/0;vt(n,(function(t){var n=t.getLayout().value;n<i&&(i=n),n>r&&(r=n)})),vt(n,(function(n){var e=new bN({type:"color",mappingMethod:"linear",dataExtent:[i,r],visual:t.get("color")}).mapValueToVisual(n.getLayout().value),o=n.getModel().get(["itemStyle","color"]);null!=o?(n.setVisual("color",o),n.setVisual("style",{fill:o})):(n.setVisual("color",e),n.setVisual("style",{fill:e}))}))}}))}var $z=function(){function t(){}return t.prototype.getInitialData=function(t,n){var i,r,e=n.getComponent("xAxis",this.get("xAxisIndex")),o=n.getComponent("yAxis",this.get("yAxisIndex")),a=e.get("type"),s=o.get("type");"category"===a?(t.layout="horizontal",i=e.getOrdinalMeta(),r=!0):"category"===s?(t.layout="vertical",i=o.getOrdinalMeta(),r=!0):t.layout=t.layout||"horizontal";var u=["x","y"],l="horizontal"===t.layout?0:1,h=this._baseAxisDim=u[l],f=u[1-l],c=[e,o],v=c[l].get("type"),d=c[1-l].get("type"),p=t.data;if(p&&r){var m=[];vt(p,(function(t,n){var i;wt(t)?(i=t.slice(),t.unshift(n)):wt(t.value)?((i=ut({},t)).value=i.value.slice(),t.value.unshift(n)):i=t,m.push(i)})),t.data=m}var y=this.defaultValueDimensions,g=[{name:h,type:wy(v),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:wy(d),dimsDef:y.slice()}];return OM(this,{coordDimensions:g,dimensionsCount:y.length+1,encodeDefaulter:bt(ec,g,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),Kz=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],i.visualDrawType="stroke",i}return E(n,t),n.type="series.boxplot",n.dependencies=["xAxis","yAxis","grid"],n.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},n}(gd);ft(Kz,$z,!0);var Jz=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.render=function(t){var n=t.getData(),i=this.group,r=this._data;this._data||i.removeAll();var e="horizontal"===t.get("layout")?1:0;n.diff(r).add((function(t){if(n.hasValue(t)){var r=nI(n.getItemLayout(t),n,t,e,!0);n.setItemGraphicEl(t,r),i.add(r)}})).update((function(t,o){var a=r.getItemGraphicEl(o);if(n.hasValue(t)){var s=n.getItemLayout(t);a?($l(a),iI(s,a,n,t)):a=nI(s,n,t,e),i.add(a),n.setItemGraphicEl(t,a)}else i.remove(a)})).remove((function(t){var n=r.getItemGraphicEl(t);n&&i.remove(n)})).execute(),this._data=n},n.prototype.remove=function(){var t=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(n){n&&t.remove(n)}))},n.type="boxplot",n}(Id),Qz=function(){},tI=function(t){function n(n){var i=t.call(this,n)||this;return i.type="boxplotBoxPath",i}return E(n,t),n.prototype.getDefaultShape=function(){return new Qz},n.prototype.buildPath=function(t,n){var i=n.points,r=0;for(t.moveTo(i[r][0],i[r][1]),r++;r<4;r++)t.lineTo(i[r][0],i[r][1]);for(t.closePath();r<i.length;r++)t.moveTo(i[r][0],i[r][1]),r++,t.lineTo(i[r][0],i[r][1])},n}(us);function nI(t,n,i,r,e){var o=t.ends,a=new tI({shape:{points:e?rI(o,r,t):o}});return iI(t,a,n,i,e),a}function iI(t,n,i,r,e){(0,xh[e?"initProps":"updateProps"])(n,{shape:{points:t.ends}},i.hostModel,r),n.useStyle(i.getItemVisual(r,"style")),n.style.strokeNoScale=!0,n.z2=100;var o=i.getItemModel(r),a=o.getModel("emphasis");Au(n,o),xu(n,a.get("focus"),a.get("blurScope"),a.get("disabled"))}function rI(t,n,i){return dt(t,(function(t){return(t=t.slice())[n]=i.initBaseline,t}))}function eI(){}var oI=vt;function aI(t){var n=function(t){var n=[],i=[];return t.eachSeriesByType("boxplot",(function(t){var r=t.getBaseAxis(),e=ht(i,r);e<0&&(i[e=i.length]=r,n[e]={axis:r,seriesModels:[]}),n[e].seriesModels.push(t)})),n}(t);oI(n,(function(t){var n=t.seriesModels;n.length&&(function(t){var n,i=t.axis,r=t.seriesModels,e=r.length,o=t.boxWidthList=[],a=t.boxOffsetList=[],s=[];if("category"===i.type)n=i.getBandWidth();else{var u=0;oI(r,(function(t){u=Math.max(u,t.getData().count())}));var l=i.getExtent();n=Math.abs(l[1]-l[0])/u}oI(r,(function(t){var i=t.get("boxWidth");wt(i)||(i=[i,i]),s.push([Fe(i[0],n)||0,Fe(i[1],n)||0])}));var h=.8*n-2,f=h/e*.3,c=(h-f*(e-1))/e,v=c/2-h/2;oI(r,(function(t,n){a.push(v),v+=f+c,o.push(Math.min(Math.max(c,s[n][0]),s[n][1]))}))}(t),oI(n,(function(n,i){!function(t,n,i){var r=t.coordinateSystem,e=t.getData(),o=i/2,a="horizontal"===t.get("layout")?0:1,s=1-a,u=["x","y"],l=e.mapDimension(u[a]),h=e.mapDimensionsAll(u[s]);if(!(null==l||h.length<5))for(var f=0;f<e.count();f++){var c=e.get(l,f),v=b(c,h[2],f),d=b(c,h[0],f),p=b(c,h[1],f),m=b(c,h[3],f),y=b(c,h[4],f),g=[];w(g,p,!1),w(g,m,!0),g.push(d,p,y,m),x(g,d),x(g,y),x(g,v),e.setItemLayout(f,{initBaseline:v[s],ends:g})}function b(t,i,o){var u,l=e.get(i,o),h=[];return h[a]=t,h[s]=l,isNaN(t)||isNaN(l)?u=[NaN,NaN]:(u=r.dataToPoint(h))[a]+=n,u}function w(t,n,i){var r=n.slice(),e=n.slice();r[a]+=o,e[a]-=o,i?t.push(r,e):t.push(e,r)}function x(t,n){var i=n.slice(),r=n.slice();i[a]-=o,r[a]+=o,t.push(i,r)}}(n,t.boxOffsetList[i],t.boxWidthList[i])})))}))}var sI={type:"echarts:boxplot",transform:function(t){var n=t.upstream;"arrayRows"!==n.sourceFormat&&io("");var i=function(t,n){for(var i=[],r=[],e=(n=n||{}).boundIQR,o="none"===e||0===e,a=0;a<t.length;a++){var s=Pe(t[a].slice()),u=qe(s,.25),l=qe(s,.5),h=qe(s,.75),f=s[0],c=s[s.length-1],v=(null==e?1.5:e)*(h-u),d=o?f:Math.max(f,u-v),p=o?c:Math.min(c,h+v),m=n.itemNameFormatter,y=xt(m)?m({value:a}):Mt(m)?m.replace("{value}",a+""):a+"";i.push([y,d,u,l,h,p]);for(var g=0;g<s.length;g++){var b=s[g];(b<d||b>p)&&r.push([y,b])}}return{boxData:i,outliers:r}}(n.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}},uI=["color","borderColor"],lI=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.render=function(t){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},n.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t)},n.prototype.incrementalRender=function(t,n){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,n):this._incrementalRenderNormal(t,n)},n.prototype.eachRendered=function(t){wh(this._progressiveEls||this.group,t)},n.prototype._updateDrawMode=function(t){var n=t.pipelineContext.large;null!=this._isLargeDraw&&n===this._isLargeDraw||(this._isLargeDraw=n,this._clear())},n.prototype._renderNormal=function(t){var n=t.getData(),i=this._data,r=this.group,e=n.getLayout("isSimpleBox"),o=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||r.removeAll(),n.diff(i).add((function(i){if(n.hasValue(i)){var a=n.getItemLayout(i);if(o&&vI(s,a))return;var u=cI(a,0,!0);Xl(u,{shape:{points:a.ends}},t,i),dI(u,n,i,e),r.add(u),n.setItemGraphicEl(i,u)}})).update((function(a,u){var l=i.getItemGraphicEl(u);if(n.hasValue(a)){var h=n.getItemLayout(a);o&&vI(s,h)?r.remove(l):(l?(Yl(l,{shape:{points:h.ends}},t,a),$l(l)):l=cI(h),dI(l,n,a,e),r.add(l),n.setItemGraphicEl(a,l))}else r.remove(l)})).remove((function(t){var n=i.getItemGraphicEl(t);n&&r.remove(n)})).execute(),this._data=n},n.prototype._renderLarge=function(t){this._clear(),gI(t,this.group);var n=t.get("clip",!0)?Rx(t.coordinateSystem,!1,t):null;n?this.group.setClipPath(n):this.group.removeClipPath()},n.prototype._incrementalRenderNormal=function(t,n){for(var i,r=n.getData(),e=r.getLayout("isSimpleBox");null!=(i=t.next());){var o=cI(r.getItemLayout(i));dI(o,r,i,e),o.incremental=!0,this.group.add(o),this._progressiveEls.push(o)}},n.prototype._incrementalRenderLarge=function(t,n){gI(n,this.group,this._progressiveEls,!0)},n.prototype.remove=function(){this._clear()},n.prototype._clear=function(){this.group.removeAll(),this._data=null},n.type="candlestick",n}(Id),hI=function(){},fI=function(t){function n(n){var i=t.call(this,n)||this;return i.type="normalCandlestickBox",i}return E(n,t),n.prototype.getDefaultShape=function(){return new hI},n.prototype.buildPath=function(t,n){var i=n.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))},n}(us);function cI(t,n,i){var r=t.ends;return new fI({shape:{points:i?pI(r,t):r},z2:100})}function vI(t,n){for(var i=!0,r=0;r<n.ends.length;r++)if(t.contain(n.ends[r][0],n.ends[r][1])){i=!1;break}return i}function dI(t,n,i,r){var e=n.getItemModel(i);t.useStyle(n.getItemVisual(i,"style")),t.style.strokeNoScale=!0,t.__simpleBox=r,Au(t,e)}function pI(t,n){return dt(t,(function(t){return(t=t.slice())[1]=n.initBaseline,t}))}var mI=function(){},yI=function(t){function n(n){var i=t.call(this,n)||this;return i.type="largeCandlestickBox",i}return E(n,t),n.prototype.getDefaultShape=function(){return new mI},n.prototype.buildPath=function(t,n){for(var i=n.points,r=0;r<i.length;)if(this.__sign===i[r++]){var e=i[r++];t.moveTo(e,i[r++]),t.lineTo(e,i[r++])}else r+=3},n}(us);function gI(t,n,i,r){var e=t.getData().getLayout("largePoints"),o=new yI({shape:{points:e},__sign:1});n.add(o);var a=new yI({shape:{points:e},__sign:-1});n.add(a),bI(1,o,t),bI(-1,a,t),r&&(o.incremental=!0,a.incremental=!0),i&&i.push(o,a)}function bI(t,n,i){var r=i.get(["itemStyle",t>0?"borderColor":"borderColor0"])||i.get(["itemStyle",t>0?"color":"color0"]),e=i.getModel("itemStyle").getItemStyle(uI);n.useStyle(e),n.style.fill=null,n.style.stroke=r}var wI=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],i}return E(n,t),n.prototype.getShadowDim=function(){return"open"},n.prototype.brushSelector=function(t,n,i){var r=n.getItemLayout(t);return r&&i.rect(r.brushRect)},n.type="series.candlestick",n.dependencies=["xAxis","yAxis","grid"],n.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},n}(gd);function xI(t){t&&wt(t.series)&&vt(t.series,(function(t){At(t)&&"k"===t.type&&(t.type="candlestick")}))}ft(wI,$z,!0);var MI=["itemStyle","borderColor"],SI=["itemStyle","borderColor0"],kI=["itemStyle","color"],AI=["itemStyle","color0"],NI={seriesType:"candlestick",plan:Cd(),performRawSeries:!0,reset:function(t,n){function i(t,n){return n.get(t>0?kI:AI)}function r(t,n){return n.get(t>0?MI:SI)}if(!n.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,n){for(var e;null!=(e=t.next());){var o=n.getItemModel(e),a=n.getItemLayout(e).sign,s=o.getItemStyle();s.fill=i(a,o),s.stroke=r(a,o)||s.fill,ut(n.ensureUniqueItemVisual(e,"style"),s)}}}}},CI={seriesType:"candlestick",plan:Cd(),reset:function(t){var n=t.coordinateSystem,i=t.getData(),r=function(t,n){var i,r=t.getBaseAxis(),e="category"===r.type?r.getBandWidth():(i=r.getExtent(),Math.abs(i[1]-i[0])/n.count()),o=Fe(Ot(t.get("barMaxWidth"),e),e),a=Fe(Ot(t.get("barMinWidth"),1),e),s=t.get("barWidth");return null!=s?Fe(s,e):Math.max(Math.min(e/2,o),a)}(t,i),e=["x","y"],o=i.getDimensionIndex(i.mapDimension(e[0])),a=dt(i.mapDimensionsAll(e[1]),i.getDimensionIndex,i),s=a[0],u=a[1],l=a[2],h=a[3];if(i.setLayout({candleWidth:r,isSimpleBox:r<=1.3}),!(o<0||a.length<4))return{progress:t.pipelineContext.large?function(t,i){for(var r,e,a=cg(4*t.count),f=0,c=[],v=[],d=i.getStore();null!=(e=t.next());){var p=d.get(o,e),m=d.get(s,e),y=d.get(u,e),g=d.get(l,e),b=d.get(h,e);isNaN(p)||isNaN(g)||isNaN(b)?(a[f++]=NaN,f+=3):(a[f++]=TI(d,e,m,y,u),c[0]=p,c[1]=g,r=n.dataToPoint(c,null,v),a[f++]=r?r[0]:NaN,a[f++]=r?r[1]:NaN,c[1]=b,r=n.dataToPoint(c,null,v),a[f++]=r?r[1]:NaN)}i.setLayout("largePoints",a)}:function(t,i){for(var e,a=i.getStore();null!=(e=t.next());){var f=a.get(o,e),c=a.get(s,e),v=a.get(u,e),d=a.get(l,e),p=a.get(h,e),m=Math.min(c,v),y=Math.max(c,v),g=S(m,f),b=S(y,f),w=S(d,f),x=S(p,f),M=[];k(M,b,0),k(M,g,1),M.push(N(x),N(b),N(w),N(g)),i.setItemLayout(e,{sign:TI(a,e,c,v,u),initBaseline:c>v?b[1]:g[1],ends:M,brushRect:A(d,p,f)})}function S(t,i){var r=[];return r[0]=i,r[1]=t,isNaN(i)||isNaN(t)?[NaN,NaN]:n.dataToPoint(r)}function k(t,n,i){var e=n.slice(),o=n.slice();e[0]=sh(e[0]+r/2,1,!1),o[0]=sh(o[0]-r/2,1,!0),i?t.push(e,o):t.push(o,e)}function A(t,n,i){var e=S(t,i),o=S(n,i);return e[0]-=r/2,o[0]-=r/2,{x:e[0],y:e[1],width:r,height:o[1]-e[1]}}function N(t){return t[0]=sh(t[0],1),t}}}}};function TI(t,n,i,r,e){return i>r?-1:i<r?1:n>0?t.get(e,n-1)<=r?1:-1:1}function zI(t,n){var i=n.rippleEffectColor||n.color;t.eachChild((function(t){t.attr({z:n.z,zlevel:n.zlevel,style:{stroke:"stroke"===n.brushType?i:null,fill:"fill"===n.brushType?i:null}})}))}var II=function(t){function n(n,i){var r=t.call(this)||this,e=new px(n,i),o=new Oe;return r.add(e),r.add(o),r.updateData(n,i),r}return E(n,t),n.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},n.prototype.startEffectAnimation=function(t){for(var n=t.symbolType,i=t.color,r=t.rippleNumber,e=this.childAt(1),o=0;o<r;o++){var a=Ep(n,-1,-1,2,2,i);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var s=-o/r*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(s).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(s).start(),e.add(a)}zI(e,t)},n.prototype.updateEffectAnimation=function(t){for(var n=this._effectCfg,i=this.childAt(1),r=["symbolType","period","rippleScale","rippleNumber"],e=0;e<r.length;e++){var o=r[e];if(n[o]!==t[o])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}zI(i,t)},n.prototype.highlight=function(){su(this)},n.prototype.downplay=function(){uu(this)},n.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},n.prototype.updateData=function(t,n){var i=this,r=t.hostModel;this.childAt(0).updateData(t,n);var e=this.childAt(1),o=t.getItemModel(n),a=t.getItemVisual(n,"symbol"),s=Pp(t.getItemVisual(n,"symbolSize")),u=t.getItemVisual(n,"style"),l=u&&u.fill,h=o.getModel("emphasis");e.setScale(s),e.traverse((function(t){t.setStyle("fill",l)}));var f=Wp(t.getItemVisual(n,"symbolOffset"),s);f&&(e.x=f[0],e.y=f[1]);var c=t.getItemVisual(n,"symbolRotate");e.rotation=(c||0)*Math.PI/180||0;var v={};v.showEffectOn=r.get("showEffectOn"),v.rippleScale=o.get(["rippleEffect","scale"]),v.brushType=o.get(["rippleEffect","brushType"]),v.period=1e3*o.get(["rippleEffect","period"]),v.effectOffset=n/t.count(),v.z=r.getShallow("z")||0,v.zlevel=r.getShallow("zlevel")||0,v.symbolType=a,v.color=l,v.rippleEffectColor=o.get(["rippleEffect","color"]),v.rippleNumber=o.get(["rippleEffect","number"]),"render"===v.showEffectOn?(this._effectCfg?this.updateEffectAnimation(v):this.startEffectAnimation(v),this._effectCfg=v):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(t){"emphasis"===t?"render"!==v.showEffectOn&&i.startEffectAnimation(v):"normal"===t&&"render"!==v.showEffectOn&&i.stopEffectAnimation()}),this._effectCfg=v,xu(this,h.get("focus"),h.get("blurScope"),h.get("disabled"))},n.prototype.fadeOut=function(t){t&&t()},n}(Oe),LI=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.init=function(){this._symbolDraw=new xx(II)},n.prototype.render=function(t){var n=t.getData(),i=this._symbolDraw;i.updateData(n,{clipShape:this._getClipShape(t)}),this.group.add(i.group)},n.prototype._getClipShape=function(t){var n=t.coordinateSystem,i=n&&n.getArea&&n.getArea();return t.get("clip",!0)?i:null},n.prototype.updateTransform=function(t,n,i){var r=t.getData();this.group.dirty();var e=Xx("").reset(t,n,i);e.progress&&e.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout()},n.prototype._updateGroupTransform=function(t){var n,i=t.coordinateSystem;i&&i.getRoamTransform&&(this.group.transform=(Hr(n=[1,0,0,1,0,0],i.getRoamTransform()),n),this.group.decomposeTransform())},n.prototype.remove=function(){this._symbolDraw&&this._symbolDraw.remove(!0)},n.type="effectScatter",n}(Id),OI=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.hasSymbolVisual=!0,i}return E(n,t),n.prototype.getInitialData=function(){return qy(null,this,{useEncodeDefaulter:!0})},n.prototype.brushSelector=function(t,n,i){return i.point(n.getItemLayout(t))},n.type="series.effectScatter",n.dependencies=["grid","polar"],n.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},n}(gd),DI=function(t){function n(n,i,r){var e=t.call(this)||this;return e.add(e.createLine(n,i,r)),e._updateEffectSymbol(n,i),e}return E(n,t),n.prototype.createLine=function(t,n,i){return new IC(t,n,i)},n.prototype._updateEffectSymbol=function(t,n){var i=t.getItemModel(n).getModel("effect"),r=i.get("symbolSize"),e=i.get("symbol");wt(r)||(r=[r,r]);var o=t.getItemVisual(n,"style"),a=i.get("color")||o&&o.stroke,s=this.childAt(1);this._symbolType!==e&&(this.remove(s),(s=Ep(e,-.5,-.5,1,1,a)).z2=100,s.culling=!0,this.add(s)),s&&(s.setStyle("shadowColor",a),s.setStyle(i.getItemStyle(["color"])),s.scaleX=r[0],s.scaleY=r[1],s.setColor(a),this._symbolType=e,this._symbolScale=r,this._updateEffectAnimation(t,i,n))},n.prototype._updateEffectAnimation=function(t,n,i){var r=this.childAt(1);if(r){var e=t.getItemLayout(i),o=1e3*n.get("period"),a=n.get("loop"),s=n.get("constantSpeed"),u=Lt(n.get("delay"),(function(n){return n/t.count()*o/3}));if(r.ignore=!0,this._updateAnimationPoints(r,e),s>0&&(o=this._getLineLength(r)/s*1e3),o!==this._period||a!==this._loop){r.stopAnimation();var l=void 0;l=xt(u)?u(i):u,r.__t>0&&(l=-o*r.__t),this._animateSymbol(r,o,l,a)}this._period=o,this._loop=a}},n.prototype._animateSymbol=function(t,n,i,r){if(n>0){t.__t=0;var e=this,o=t.animate("",r).when(n,{__t:1}).delay(i).during((function(){e._updateSymbolPosition(t)}));r||o.done((function(){e.remove(t)})),o.start()}},n.prototype._getLineLength=function(t){return un(t.__p1,t.__cp1)+un(t.__cp1,t.__p2)},n.prototype._updateAnimationPoints=function(t,n){t.__p1=n[0],t.__p2=n[1],t.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},n.prototype.updateData=function(t,n,i){this.childAt(0).updateData(t,n,i),this._updateEffectSymbol(t,n)},n.prototype._updateSymbolPosition=function(t){var n=t.__p1,i=t.__p2,r=t.__cp1,e=t.__t,o=[t.x,t.y],a=o.slice(),s=mi,u=yi;o[0]=s(n[0],r[0],i[0],e),o[1]=s(n[1],r[1],i[1],e);var l=u(n[0],r[0],i[0],e),h=u(n[1],r[1],i[1],e);t.rotation=-Math.atan2(h,l)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT<t.__t?(t.scaleY=1.05*un(a,o),1===e&&(o[0]=a[0]+(o[0]-a[0])/2,o[1]=a[1]+(o[1]-a[1])/2)):t.scaleY=1===t.__lastT?2*un(n,o):this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=o[0],t.y=o[1]},n.prototype.updateLayout=function(t,n){this.childAt(0).updateLayout(t,n);var i=t.getItemModel(n).getModel("effect");this._updateEffectAnimation(t,i,n)},n}(Oe),RI=function(t){function n(n,i,r){var e=t.call(this)||this;return e._createPolyline(n,i,r),e}return E(n,t),n.prototype._createPolyline=function(t,n,i){var r=t.getItemLayout(n),e=new wl({shape:{points:r}});this.add(e),this._updateCommonStl(t,n,i)},n.prototype.updateData=function(t,n,i){var r=t.hostModel;Yl(this.childAt(0),{shape:{points:t.getItemLayout(n)}},r,n),this._updateCommonStl(t,n,i)},n.prototype._updateCommonStl=function(t,n,i){var r=this.childAt(0),e=t.getItemModel(n),o=i&&i.emphasisLineStyle,a=i&&i.focus,s=i&&i.blurScope,u=i&&i.emphasisDisabled;if(!i||t.hasItemOption){var l=e.getModel("emphasis");o=l.getModel("lineStyle").getLineStyle(),u=l.get("disabled"),a=l.get("focus"),s=l.get("blurScope")}r.useStyle(t.getItemVisual(n,"style")),r.style.fill=null,r.style.strokeNoScale=!0,r.ensureState("emphasis").style=o,xu(this,a,s,u)},n.prototype.updateLayout=function(t,n){this.childAt(0).setShape("points",t.getItemLayout(n))},n}(Oe),_I=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n._lastFrame=0,n._lastFramePercent=0,n}return E(n,t),n.prototype.createLine=function(t,n,i){return new RI(t,n,i)},n.prototype._updateAnimationPoints=function(t,n){this._points=n;for(var i=[0],r=0,e=1;e<n.length;e++)r+=un(n[e-1],n[e]),i.push(r);if(0!==r){for(e=0;e<i.length;e++)i[e]/=r;this._offsets=i,this._length=r}else this._length=0},n.prototype._getLineLength=function(){return this._length},n.prototype._updateSymbolPosition=function(t){var n=t.__t,i=this._points,r=this._offsets,e=i.length;if(r){var o,a=this._lastFrame;if(n<this._lastFramePercent){for(o=Math.min(a+1,e-1);o>=0&&!(r[o]<=n);o--);o=Math.min(o,e-2)}else{for(o=a;o<e&&!(r[o]>n);o++);o=Math.min(o-1,e-2)}var s=(n-r[o])/(r[o+1]-r[o]),u=i[o],l=i[o+1];t.x=u[0]*(1-s)+s*l[0],t.y=u[1]*(1-s)+s*l[1],t.rotation=-Math.atan2(l[1]-u[1],l[0]-u[0])-Math.PI/2,this._lastFrame=o,this._lastFramePercent=n,t.ignore=!1}},n}(DI),BI=function(){this.polyline=!1,this.curveness=0,this.segs=[]},FI=function(t){function n(n){var i=t.call(this,n)||this;return i._off=0,i.hoverDataIdx=-1,i}return E(n,t),n.prototype.reset=function(){this.notClear=!1,this._off=0},n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new BI},n.prototype.buildPath=function(t,n){var i,r=n.segs,e=n.curveness;if(n.polyline)for(i=this._off;i<r.length;){var o=r[i++];if(o>0){t.moveTo(r[i++],r[i++]);for(var a=1;a<o;a++)t.lineTo(r[i++],r[i++])}}else for(i=this._off;i<r.length;){var s=r[i++],u=r[i++],l=r[i++],h=r[i++];t.moveTo(s,u),e>0?t.quadraticCurveTo((s+l)/2-(u-h)*e,(u+h)/2-(l-s)*e,l,h):t.lineTo(l,h)}this.incremental&&(this._off=i,this.notClear=!0)},n.prototype.findDataIndex=function(t,n){var i=this.shape,r=i.segs,e=i.curveness,o=this.style.lineWidth;if(i.polyline)for(var a=0,s=0;s<r.length;){var u=r[s++];if(u>0)for(var l=r[s++],h=r[s++],f=1;f<u;f++)if(Ha(l,h,c=r[s++],v=r[s++],o,t,n))return a;a++}else for(a=0,s=0;s<r.length;){l=r[s++],h=r[s++];var c=r[s++],v=r[s++];if(e>0){if(Xa(l,h,(l+c)/2-(h-v)*e,(h+v)/2-(c-l)*e,c,v,o,t,n))return a}else if(Ha(l,h,c,v,o,t,n))return a;a++}return-1},n.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n);return this.getBoundingRect().contain(t=i[0],n=i[1])?(this.hoverDataIdx=this.findDataIndex(t,n))>=0:(this.hoverDataIdx=-1,!1)},n.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape.segs,i=1/0,r=1/0,e=-1/0,o=-1/0,a=0;a<n.length;){var s=n[a++],u=n[a++];i=Math.min(s,i),e=Math.max(s,e),r=Math.min(u,r),o=Math.max(u,o)}t=this._rect=new ve(i,r,e,o)}return t},n}(us),EI=function(){function t(){this.group=new Oe}return t.prototype.updateData=function(t){this._clear();var n=this._create();n.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(n,t)},t.prototype.incrementalPrepareUpdate=function(){this.group.removeAll(),this._clear()},t.prototype.incrementalUpdate=function(t,n){var i=this._newAdded[0],r=n.getLayout("linesPoints"),e=i&&i.shape.segs;if(e&&e.length<2e4){var o=e.length,a=new Float32Array(o+r.length);a.set(e),a.set(r,o),i.setShape({segs:a})}else{this._newAdded=[];var s=this._create();s.incremental=!0,s.setShape({segs:r}),this._setCommon(s,n),s.__startIndex=t.start}},t.prototype.remove=function(){this._clear()},t.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},t.prototype._create=function(){var t=new FI({cursor:"default"});return this._newAdded.push(t),this.group.add(t),t},t.prototype._setCommon=function(t,n){var i=n.hostModel;t.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),t.useStyle(i.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var r=n.getVisual("style");r&&r.stroke&&t.setStyle("stroke",r.stroke),t.setStyle("fill",null);var e=Bs(t);e.seriesIndex=i.seriesIndex,t.on("mousemove",(function(){e.dataIndex=null;var n=t.hoverDataIdx;n>0&&(e.dataIndex=n+t.__startIndex)}))},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),PI={seriesType:"lines",plan:Cd(),reset:function(t){var n=t.coordinateSystem;if(n){var i=t.get("polyline"),r=t.pipelineContext.large;return{progress:function(e,o){var a=[];if(r){var s=void 0,u=e.end-e.start;if(i){for(var l=0,h=e.start;h<e.end;h++)l+=t.getLineCoordsCount(h);s=new Float32Array(u+2*l)}else s=new Float32Array(4*u);var f=0,c=[];for(h=e.start;h<e.end;h++){var v=t.getLineCoords(h,a);i&&(s[f++]=v);for(var d=0;d<v;d++)c=n.dataToPoint(a[d],!1,c),s[f++]=c[0],s[f++]=c[1]}o.setLayout("linesPoints",s)}else for(h=e.start;h<e.end;h++){var p=o.getItemModel(h),m=(v=t.getLineCoords(h,a),[]);if(i)for(var y=0;y<v;y++)m.push(n.dataToPoint(a[y]));else{m[0]=n.dataToPoint(a[0]),m[1]=n.dataToPoint(a[1]);var g=p.get(["lineStyle","curveness"]);+g&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*g,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*g])}o.setItemLayout(h,m)}}}}}},WI=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.render=function(t,n,i){var r=t.getData(),e=this._updateLineDraw(r,t),o=t.get("zlevel"),a=t.get(["effect","trailLength"]),s=i.getZr(),u="svg"===s.painter.getType();u||s.painter.getLayer(o).clear(!0),null==this._lastZlevel||u||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&a>0&&(u||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),e.updateData(r);var l=t.get("clip",!0)&&Rx(t.coordinateSystem,!1,t);l?this.group.setClipPath(l):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},n.prototype.incrementalPrepareRender=function(t,n,i){var r=t.getData();this._updateLineDraw(r,t).incrementalPrepareUpdate(r),this._clearLayer(i),this._finished=!1},n.prototype.incrementalRender=function(t,n){this._lineDraw.incrementalUpdate(t,n.getData()),this._finished=t.end===n.getData().count()},n.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},n.prototype.updateTransform=function(t,n,i){var r=t.getData(),e=t.pipelineContext;if(!this._finished||e.large||e.progressiveRender)return{update:!0};var o=PI.reset(t,n,i);o.progress&&o.progress({start:0,end:r.count(),count:r.count()},r),this._lineDraw.updateLayout(),this._clearLayer(i)},n.prototype._updateLineDraw=function(t,n){var i=this._lineDraw,r=this._showEffect(n),e=!!n.get("polyline"),o=n.pipelineContext.large;return i&&r===this._hasEffet&&e===this._isPolyline&&o===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=o?new EI:new LC(e?r?_I:RI:r?DI:IC),this._hasEffet=r,this._isPolyline=e,this._isLargeDraw=o),this.group.add(i.group),i},n.prototype._showEffect=function(t){return!!t.get(["effect","show"])},n.prototype._clearLayer=function(t){var n=t.getZr();"svg"===n.painter.getType()||null==this._lastZlevel||n.painter.getLayer(this._lastZlevel).clear(!0)},n.prototype.remove=function(t,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},n.prototype.dispose=function(t,n){this.remove(t,n)},n.type="lines",n}(Id),VI="undefined"==typeof Uint32Array?Array:Uint32Array,jI="undefined"==typeof Float64Array?Array:Float64Array;function HI(t){var n=t.data;n&&n[0]&&n[0][0]&&n[0][0].coord&&(t.data=dt(n,(function(t){var n={coords:[t[0].coord,t[1].coord]};return t[0].name&&(n.fromName=t[0].name),t[1].name&&(n.toName=t[1].name),st([n,t[0],t[1]])})))}var YI=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.visualStyleAccessPath="lineStyle",i.visualDrawType="stroke",i}return E(n,t),n.prototype.init=function(n){n.data=n.data||[],HI(n);var i=this._processFlatCoordsArray(n.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(n.data=new Float32Array(i.count)),t.prototype.init.apply(this,arguments)},n.prototype.mergeOption=function(n){if(HI(n),n.data){var i=this._processFlatCoordsArray(n.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(n.data=new Float32Array(i.count))}t.prototype.mergeOption.apply(this,arguments)},n.prototype.appendData=function(t){var n=this._processFlatCoordsArray(t.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=jt(this._flatCoords,n.flatCoords),this._flatCoordsOffset=jt(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),t.data=new Float32Array(n.count)),this.getRawData().appendData(t.data)},n.prototype._getCoordsFromItemModel=function(t){var n=this.getData().getItemModel(t);return n.option instanceof Array?n.option:n.getShallow("coords")},n.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},n.prototype.getLineCoords=function(t,n){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[2*t],r=this._flatCoordsOffset[2*t+1],e=0;e<r;e++)n[e]=n[e]||[],n[e][0]=this._flatCoords[i+2*e],n[e][1]=this._flatCoords[i+2*e+1];return r}var o=this._getCoordsFromItemModel(t);for(e=0;e<o.length;e++)n[e]=n[e]||[],n[e][0]=o[e][0],n[e][1]=o[e][1];return o.length},n.prototype._processFlatCoordsArray=function(t){var n=0;if(this._flatCoords&&(n=this._flatCoords.length),kt(t[0])){for(var i=t.length,r=new VI(i),e=new jI(i),o=0,a=0,s=0,u=0;u<i;){s++;var l=t[u++];r[a++]=o+n,r[a++]=l;for(var h=0;h<l;h++){var f=t[u++],c=t[u++];e[o++]=f,e[o++]=c}}return{flatCoordsOffset:new Uint32Array(r.buffer,0,a),flatCoords:e,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},n.prototype.getInitialData=function(t){var n=new Vy(["value"],this);return n.hasItemOption=!1,n.initData(t.data,[],(function(t,i,r,e){if(t instanceof Array)return NaN;n.hasItemOption=!0;var o=t.value;return null!=o?o instanceof Array?o[e]:o:void 0})),n},n.prototype.formatTooltip=function(t){var n=this.getData().getItemModel(t),i=n.get("name");if(i)return i;var r=n.get("fromName"),e=n.get("toName"),o=[];return null!=r&&o.push(r),null!=e&&o.push(e),rd("nameValue",{name:o.join(" > ")})},n.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},n.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},n.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},n.prototype.getZLevelKey=function(){var t=this.getModel("effect"),n=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&n>0?n+"":""},n.type="series.lines",n.dependencies=["grid","polar","geo","calendar"],n.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},n}(gd);function XI(t){return t instanceof Array||(t=[t,t]),t}var GI={seriesType:"lines",reset:function(t){var n=XI(t.get("symbol")),i=XI(t.get("symbolSize")),r=t.getData();return r.setVisual("fromSymbol",n&&n[0]),r.setVisual("toSymbol",n&&n[1]),r.setVisual("fromSymbolSize",i&&i[0]),r.setVisual("toSymbolSize",i&&i[1]),{dataEach:r.hasItemOption?function(t,n){var i=t.getItemModel(n),r=XI(i.getShallow("symbol",!0)),e=XI(i.getShallow("symbolSize",!0));r[0]&&t.setItemVisual(n,"fromSymbol",r[0]),r[1]&&t.setItemVisual(n,"toSymbol",r[1]),e[0]&&t.setItemVisual(n,"fromSymbolSize",e[0]),e[1]&&t.setItemVisual(n,"toSymbolSize",e[1])}:null}}},UI=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=X.createCanvas();this.canvas=t}return t.prototype.update=function(t,n,i,r,e,o){var a=this._getBrush(),s=this._getGradient(e,"inRange"),u=this._getGradient(e,"outOfRange"),l=this.pointSize+this.blurSize,h=this.canvas,f=h.getContext("2d"),c=t.length;h.width=n,h.height=i;for(var v=0;v<c;++v){var d=t[v],p=d[0],m=d[1],y=r(d[2]);f.globalAlpha=y,f.drawImage(a,p-l,m-l)}if(!h.width||!h.height)return h;for(var g=f.getImageData(0,0,h.width,h.height),b=g.data,w=0,x=b.length,M=this.minOpacity,S=this.maxOpacity-M;w<x;){y=b[w+3]/256;var k=4*Math.floor(255*y);if(y>0){var A=o(y)?s:u;y>0&&(y=y*S+M),b[w++]=A[k],b[w++]=A[k+1],b[w++]=A[k+2],b[w++]=A[k+3]*y*256}else w+=4}return f.putImageData(g,0,0),h},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=X.createCanvas()),n=this.pointSize+this.blurSize,i=2*n;t.width=i,t.height=i;var r=t.getContext("2d");return r.clearRect(0,0,i,i),r.shadowOffsetX=i,r.shadowBlur=this.blurSize,r.shadowColor="#000",r.beginPath(),r.arc(-n,n,this.pointSize,0,2*Math.PI,!0),r.closePath(),r.fill(),t},t.prototype._getGradient=function(t,n){for(var i=this._gradientPixels,r=i[n]||(i[n]=new Uint8ClampedArray(1024)),e=[0,0,0,0],o=0,a=0;a<256;a++)t[n](a/255,!0,e),r[o++]=e[0],r[o++]=e[1],r[o++]=e[2],r[o++]=e[3];return r},t}();function ZI(t){var n=t.dimensions;return"lng"===n[0]&&"lat"===n[1]}var qI=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.render=function(t,n,i){var r;n.eachComponent("visualMap",(function(n){n.eachTargetSeries((function(i){i===t&&(r=n)}))})),this._progressiveEls=null,this.group.removeAll();var e=t.coordinateSystem;"cartesian2d"===e.type||"calendar"===e.type?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):ZI(e)&&this._renderOnGeo(e,t,r,i)},n.prototype.incrementalPrepareRender=function(){this.group.removeAll()},n.prototype.incrementalRender=function(t,n,i,r){var e=n.coordinateSystem;e&&(ZI(e)?this.render(n,i,r):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(n,r,t.start,t.end,!0)))},n.prototype.eachRendered=function(t){wh(this._progressiveEls||this.group,t)},n.prototype._renderOnCartesianAndCalendar=function(t,n,i,r,e){var o,a,s,u,l=t.coordinateSystem,h=_x(l,"cartesian2d");if(h){var f=l.getAxis("x"),c=l.getAxis("y");o=f.getBandWidth()+.5,a=c.getBandWidth()+.5,s=f.scale.getExtent(),u=c.scale.getExtent()}for(var v=this.group,d=t.getData(),p=t.getModel(["emphasis","itemStyle"]).getItemStyle(),m=t.getModel(["blur","itemStyle"]).getItemStyle(),y=t.getModel(["select","itemStyle"]).getItemStyle(),g=t.get(["itemStyle","borderRadius"]),b=Nh(t),w=t.getModel("emphasis"),x=w.get("focus"),M=w.get("blurScope"),S=w.get("disabled"),k=h?[d.mapDimension("x"),d.mapDimension("y"),d.mapDimension("value")]:[d.mapDimension("time"),d.mapDimension("value")],A=i;A<r;A++){var N=void 0,C=d.getItemVisual(A,"style");if(h){var T=d.get(k[0],A),z=d.get(k[1],A);if(isNaN(d.get(k[2],A))||T<s[0]||T>s[1]||z<u[0]||z>u[1])continue;var I=l.dataToPoint([T,z]);N=new ws({shape:{x:I[0]-o/2,y:I[1]-a/2,width:o,height:a},style:C})}else{if(isNaN(d.get(k[1],A)))continue;N=new ws({z2:1,shape:l.dataToRect([d.get(k[0],A)]).contentShape,style:C})}if(d.hasItemOption){var L=d.getItemModel(A),O=L.getModel("emphasis");p=O.getModel("itemStyle").getItemStyle(),m=L.getModel(["blur","itemStyle"]).getItemStyle(),y=L.getModel(["select","itemStyle"]).getItemStyle(),g=L.get(["itemStyle","borderRadius"]),x=O.get("focus"),M=O.get("blurScope"),S=O.get("disabled"),b=Nh(L)}N.shape.r=g;var D=t.getRawValue(A),R="-";D&&null!=D[2]&&(R=D[2]+""),Ah(N,b,{labelFetcher:t,labelDataIndex:A,defaultOpacity:C.opacity,defaultText:R}),N.ensureState("emphasis").style=p,N.ensureState("blur").style=m,N.ensureState("select").style=y,xu(N,x,M,S),N.incremental=e,e&&(N.states.emphasis.hoverLayer=!0),v.add(N),d.setItemGraphicEl(A,N),this._progressiveEls&&this._progressiveEls.push(N)}},n.prototype._renderOnGeo=function(t,n,i,r){var e=i.targetVisuals.inRange,o=i.targetVisuals.outOfRange,a=n.getData(),s=this._hmLayer||this._hmLayer||new UI;s.blurSize=n.get("blurSize"),s.pointSize=n.get("pointSize"),s.minOpacity=n.get("minOpacity"),s.maxOpacity=n.get("maxOpacity");var u=t.getViewRect().clone(),l=t.getRoamTransform();u.applyTransform(l);var h=Math.max(u.x,0),f=Math.max(u.y,0),c=Math.min(u.width+u.x,r.getWidth()),v=Math.min(u.height+u.y,r.getHeight()),d=c-h,p=v-f,m=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],y=a.mapArray(m,(function(n,i,r){var e=t.dataToPoint([n,i]);return e[0]-=h,e[1]-=f,e.push(r),e})),g=i.getExtent(),b="visualMap.continuous"===i.type?function(t,n){var i=t[1]-t[0];return n=[(n[0]-t[0])/i,(n[1]-t[0])/i],function(t){return t>=n[0]&&t<=n[1]}}(g,i.option.range):function(t,n,i){var r=t[1]-t[0],e=(n=dt(n,(function(n){return{interval:[(n.interval[0]-t[0])/r,(n.interval[1]-t[0])/r]}}))).length,o=0;return function(t){var r;for(r=o;r<e;r++)if((a=n[r].interval)[0]<=t&&t<=a[1]){o=r;break}if(r===e)for(r=o-1;r>=0;r--){var a;if((a=n[r].interval)[0]<=t&&t<=a[1]){o=r;break}}return r>=0&&r<e&&i[r]}}(g,i.getPieceList(),i.option.selected);s.update(y,d,p,e.color.getNormalizer(),{inRange:e.color.getColorMapper(),outOfRange:o.color.getColorMapper()},b);var w=new vs({style:{width:d,height:p,x:h,y:f,image:s.canvas},silent:!0});this.group.add(w)},n.type="heatmap",n}(Id),$I=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.getInitialData=function(){return qy(null,this,{generateCoord:"value"})},n.prototype.preventIncremental=function(){var t=Ac.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},n.type="series.heatmap",n.dependencies=["grid","geo","calendar"],n.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},n}(gd),KI=["itemStyle","borderWidth"],JI=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],QI=new Ku,tL=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.render=function(t,n,i){var r=this.group,e=t.getData(),o=this._data,a=t.coordinateSystem,s=a.getBaseAxis().isHorizontal(),u=a.master.getRect(),l={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:a,coordSysExtent:[[u.x,u.x+u.width],[u.y,u.y+u.height]],isHorizontal:s,valueDim:JI[+s],categoryDim:JI[1-+s]};return e.diff(o).add((function(t){if(e.hasValue(t)){var n=uL(e,t),i=nL(e,t,n,l),o=fL(e,l,i);e.setItemGraphicEl(t,o),r.add(o),mL(o,l,i)}})).update((function(t,n){var i=o.getItemGraphicEl(n);if(e.hasValue(t)){var a=uL(e,t),s=nL(e,t,a,l),u=vL(e,s);i&&u!==i.__pictorialShapeStr&&(r.remove(i),e.setItemGraphicEl(t,null),i=null),i?function(t,n,i){Yl(t.__pictorialBundle,{x:i.bundlePosition[0],y:i.bundlePosition[1]},i.animationModel,i.dataIndex),i.symbolRepeat?eL(t,n,i,!0):oL(t,0,i,!0),aL(t,i,!0),sL(t,n,i,!0)}(i,l,s):i=fL(e,l,s,!0),e.setItemGraphicEl(t,i),i.__pictorialSymbolMeta=s,r.add(i),mL(i,l,s)}else r.remove(i)})).remove((function(t){var n=o.getItemGraphicEl(t);n&&cL(o,t,n.__pictorialSymbolMeta.animationModel,n)})).execute(),this._data=e,this.group},n.prototype.remove=function(t){var n=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl((function(n){cL(i,Bs(n).dataIndex,t,n)})):n.removeAll()},n.type="pictorialBar",n}(Id);function nL(t,n,i,r){var e=t.getItemLayout(n),o=i.get("symbolRepeat"),a=i.get("symbolClip"),s=i.get("symbolPosition")||"start",u=(i.get("symbolRotate")||0)*Math.PI/180||0,l=i.get("symbolPatternSize")||2,h=i.isAnimationEnabled(),f={dataIndex:n,layout:e,itemModel:i,symbolType:t.getItemVisual(n,"symbol")||"circle",style:t.getItemVisual(n,"style"),symbolClip:a,symbolRepeat:o,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:l,rotation:u,animationModel:h?i:null,hoverScale:h&&i.get(["emphasis","scale"]),z2:i.getShallow("z",!0)||0};!function(t,n,i,r,e){var o,a=r.valueDim,s=t.get("symbolBoundingData"),u=r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()),l=u.toGlobalCoord(u.dataToCoord(0)),h=1-+(i[a.wh]<=0);if(wt(s)){var f=[iL(u,s[0])-l,iL(u,s[1])-l];f[1]<f[0]&&f.reverse(),o=f[h]}else o=null!=s?iL(u,s)-l:n?r.coordSysExtent[a.index][h]-l:i[a.wh];e.boundingLength=o,n&&(e.repeatCutLength=i[a.wh]),e.pxSign=o>0?1:-1}(i,o,e,r,f),function(t,n,i,r,e,o,a,s,u,l){var h,f=u.valueDim,c=u.categoryDim,v=Math.abs(i[c.wh]),d=t.getItemVisual(n,"symbolSize");(h=wt(d)?d.slice():null==d?["100%","100%"]:[d,d])[c.index]=Fe(h[c.index],v),h[f.index]=Fe(h[f.index],r?v:Math.abs(o)),l.symbolSize=h,(l.symbolScale=[h[0]/s,h[1]/s])[f.index]*=(u.isHorizontal?-1:1)*a}(t,n,e,o,0,f.boundingLength,f.pxSign,l,r,f),function(t,n,i,r,e){var o=t.get(KI)||0;o&&(QI.attr({scaleX:n[0],scaleY:n[1],rotation:i}),QI.updateTransform(),o/=QI.getLineScale(),o*=n[r.valueDim.index]),e.valueLineWidth=o||0}(i,f.symbolScale,u,r,f);var c=f.symbolSize,v=Wp(i.get("symbolOffset"),c);return function(t,n,i,r,e,o,a,s,u,l,h,f){var c=h.categoryDim,v=h.valueDim,d=f.pxSign,p=Math.max(n[v.index]+s,0),m=p;if(r){var y=Math.abs(u),g=Lt(t.get("symbolMargin"),"15%")+"",b=!1;g.lastIndexOf("!")===g.length-1&&(b=!0,g=g.slice(0,g.length-1));var w=Fe(g,n[v.index]),x=Math.max(p+2*w,0),M=b?0:2*w,S=Je(r),k=S?r:yL((y+M)/x);x=p+2*(w=(y-k*p)/2/(b?k:Math.max(k-1,1))),M=b?0:2*w,S||"fixed"===r||(k=l?yL((Math.abs(l)+M)/x):0),m=k*x-M,f.repeatTimes=k,f.symbolMargin=w}var A=d*(m/2),N=f.pathPosition=[];N[c.index]=i[c.wh]/2,N[v.index]="start"===a?A:"end"===a?u-A:u/2,o&&(N[0]+=o[0],N[1]+=o[1]);var C=f.bundlePosition=[];C[c.index]=i[c.xy],C[v.index]=i[v.xy];var T=f.barRectShape=ut({},i);T[v.wh]=d*Math.max(Math.abs(i[v.wh]),Math.abs(N[v.index]+A)),T[c.wh]=i[c.wh];var z=f.clipShape={};z[c.xy]=-i[c.xy],z[c.wh]=h.ecSize[c.wh],z[v.xy]=0,z[v.wh]=i[v.wh]}(i,c,e,o,0,v,s,f.valueLineWidth,f.boundingLength,f.repeatCutLength,r,f),f}function iL(t,n){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(n)))}function rL(t){var n=t.symbolPatternSize,i=Ep(t.symbolType,-n/2,-n/2,n,n);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function eL(t,n,i,r){var e=t.__pictorialBundle,o=i.pathPosition,a=n.valueDim,s=i.repeatTimes||0,u=0,l=i.symbolSize[n.valueDim.index]+i.valueLineWidth+2*i.symbolMargin;for(dL(t,(function(t){t.__pictorialAnimationIndex=u,t.__pictorialRepeatTimes=s,u<s?pL(t,null,c(u),i,r):pL(t,null,{scaleX:0,scaleY:0},i,r,(function(){e.remove(t)})),u++}));u<s;u++){var h=rL(i);h.__pictorialAnimationIndex=u,h.__pictorialRepeatTimes=s,e.add(h);var f=c(u);pL(h,{x:f.x,y:f.y,scaleX:0,scaleY:0},{scaleX:f.scaleX,scaleY:f.scaleY,rotation:f.rotation},i,r)}function c(t){var n=o.slice(),r=i.pxSign,e=t;return("start"===i.symbolRepeatDirection?r>0:r<0)&&(e=s-1-t),n[a.index]=l*(e-s/2+.5)+o[a.index],{x:n[0],y:n[1],scaleX:i.symbolScale[0],scaleY:i.symbolScale[1],rotation:i.rotation}}}function oL(t,n,i,r){var e=t.__pictorialBundle,o=t.__pictorialMainPath;o?pL(o,null,{x:i.pathPosition[0],y:i.pathPosition[1],scaleX:i.symbolScale[0],scaleY:i.symbolScale[1],rotation:i.rotation},i,r):(o=t.__pictorialMainPath=rL(i),e.add(o),pL(o,{x:i.pathPosition[0],y:i.pathPosition[1],scaleX:0,scaleY:0,rotation:i.rotation},{scaleX:i.symbolScale[0],scaleY:i.symbolScale[1]},i,r))}function aL(t,n,i){var r=ut({},n.barRectShape),e=t.__pictorialBarRect;e?pL(e,null,{shape:r},n,i):((e=t.__pictorialBarRect=new ws({z2:2,shape:r,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,t.add(e))}function sL(t,n,i,r){if(i.symbolClip){var e=t.__pictorialClipPath,o=ut({},i.clipShape),a=n.valueDim,s=i.animationModel,u=i.dataIndex;if(e)Yl(e,{shape:o},s,u);else{o[a.wh]=0,e=new ws({shape:o}),t.__pictorialBundle.setClipPath(e),t.__pictorialClipPath=e;var l={};l[a.wh]=i.clipShape[a.wh],xh[r?"updateProps":"initProps"](e,{shape:l},s,u)}}}function uL(t,n){var i=t.getItemModel(n);return i.getAnimationDelayParams=lL,i.isAnimationEnabled=hL,i}function lL(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function hL(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function fL(t,n,i,r){var e=new Oe,o=new Oe;return e.add(o),e.__pictorialBundle=o,o.x=i.bundlePosition[0],o.y=i.bundlePosition[1],i.symbolRepeat?eL(e,n,i):oL(e,0,i),aL(e,i,r),sL(e,n,i,r),e.__pictorialShapeStr=vL(t,i),e.__pictorialSymbolMeta=i,e}function cL(t,n,i,r){var e=r.__pictorialBarRect;e&&e.removeTextContent();var o=[];dL(r,(function(t){o.push(t)})),r.__pictorialMainPath&&o.push(r.__pictorialMainPath),r.__pictorialClipPath&&(i=null),vt(o,(function(t){Ul(t,{scaleX:0,scaleY:0},i,n,(function(){r.parent&&r.parent.remove(r)}))})),t.setItemGraphicEl(n,null)}function vL(t,n){return[t.getItemVisual(n.dataIndex,"symbol")||"none",!!n.symbolRepeat,!!n.symbolClip].join(":")}function dL(t,n,i){vt(t.__pictorialBundle.children(),(function(r){r!==t.__pictorialBarRect&&n.call(i,r)}))}function pL(t,n,i,r,e,o){n&&t.attr(n),r.symbolClip&&!e?i&&t.attr(i):i&&xh[e?"updateProps":"initProps"](t,i,r.animationModel,r.dataIndex,o)}function mL(t,n,i){var r=i.dataIndex,e=i.itemModel,o=e.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=e.getModel(["blur","itemStyle"]).getItemStyle(),u=e.getModel(["select","itemStyle"]).getItemStyle(),l=e.getShallow("cursor"),h=o.get("focus"),f=o.get("blurScope"),c=o.get("scale");dL(t,(function(t){if(t instanceof vs){var n=t.style;t.useStyle(ut({image:n.image,x:n.x,y:n.y,width:n.width,height:n.height},i.style))}else t.useStyle(i.style);var r=t.ensureState("emphasis");r.style=a,c&&(r.scaleX=1.1*t.scaleX,r.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=u,l&&(t.cursor=l),t.z2=i.z2}));var v=n.valueDim.posDesc[+(i.boundingLength>0)];Ah(t.__pictorialBarRect,Nh(e),{labelFetcher:n.seriesModel,labelDataIndex:r,defaultText:vx(n.seriesModel.getData(),r),inheritColor:i.style.fill,defaultOpacity:i.style.opacity,defaultOutsidePosition:v}),xu(t,h,f,o.get("disabled"))}function yL(t){var n=Math.round(t);return Math.abs(t-n)<1e-4?n:Math.ceil(t)}var gL=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.hasSymbolVisual=!0,i.defaultSymbol="roundRect",i}return E(n,t),n.prototype.getInitialData=function(n){return n.stack=null,t.prototype.getInitialData.apply(this,arguments)},n.type="series.pictorialBar",n.dependencies=["grid"],n.defaultOption=Jh(qx.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),n}(qx),bL=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i._layers=[],i}return E(n,t),n.prototype.render=function(t){var n=t.getData(),i=this,r=this.group,e=t.getLayerSeries(),o=n.getLayout("layoutInfo"),a=o.rect,s=o.boundaryGap;function u(t){return t.name}r.x=0,r.y=a.y+s[0];var l=new yy(this._layersSeries||[],e,u,u),h=[];function f(o,a,s){var u=i._layers;if("remove"!==o){for(var l,f,c=[],v=[],d=e[a].indices,p=0;p<d.length;p++){var m=n.getItemLayout(d[p]),y=m.x,g=m.y0,b=m.y;c.push(y,g),v.push(y,g+b),l=n.getItemVisual(d[p],"style")}var w=n.getItemLayout(d[0]),x=t.getModel("label").get("margin"),M=t.getModel("emphasis");if("add"===o){var S=h[a]=new Oe;f=new Lx({shape:{points:c,stackedOnPoints:v,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),S.add(f),r.add(S),t.isAnimationEnabled()&&f.setClipPath(function(t,n){var i=new ws({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return Xl(i,{shape:{x:t.x-50,width:t.width+100,height:t.height+20}},n,(function(){f.removeClipPath()})),i}(f.getBoundingRect(),t))}else f=(S=u[s]).childAt(0),r.add(S),h[a]=S,Yl(f,{shape:{points:c,stackedOnPoints:v}},t),$l(f);Ah(f,Nh(t),{labelDataIndex:d[p-1],defaultText:n.getName(d[p-1]),inheritColor:l.fill},{normal:{verticalAlign:"middle"}}),f.setTextConfig({position:null,local:!0});var k=f.getTextContent();k&&(k.x=w.x-x,k.y=w.y0+w.y/2),f.useStyle(l),n.setItemGraphicEl(a,f),Au(f,t),xu(f,M.get("focus"),M.get("blurScope"),M.get("disabled"))}else r.remove(u[a])}l.add(gt(f,this,"add")).update(gt(f,this,"update")).remove(gt(f,this,"remove")).execute(),this._layersSeries=e,this._layers=h},n.type="themeRiver",n}(Id),wL=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.init=function(n){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new DM(gt(this.getData,this),gt(this.getRawData,this))},n.prototype.fixData=function(t){var n=t.length,i={},r=Ao(t,(function(t){return i.hasOwnProperty(t[0]+"")||(i[t[0]+""]=-1),t[2]})),e=[];r.buckets.each((function(t,n){e.push({name:n,dataList:t})}));for(var o=e.length,a=0;a<o;++a){for(var s=e[a].name,u=0;u<e[a].dataList.length;++u)i[l=e[a].dataList[u][0]+""]=a;for(var l in i)i.hasOwnProperty(l)&&i[l]!==a&&(i[l]=a,t[n]=[l,0,s],n++)}return t},n.prototype.getInitialData=function(t){for(var n=this.getReferringComponents("singleAxis",xo).models[0].get("type"),i=mt(t.data,(function(t){return void 0!==t[2]})),r=this.fixData(i||[]),e=this.nameMap=Vt(),o=0,a=0;a<r.length;++a)e.get(r[a][2])||(e.set(r[a][2],o),o++);var s=jy(r,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:wy(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,u=new Vy(s,this);return u.initData(r),u},n.prototype.getLayerSeries=function(){for(var t=this.getData(),n=t.count(),i=[],r=0;r<n;++r)i[r]=r;var e=t.mapDimension("single"),o=Ao(i,(function(n){return t.get("name",n)})),a=[];return o.buckets.each((function(n,i){n.sort((function(n,i){return t.get(e,n)-t.get(e,i)})),a.push({name:i,indices:n})})),a},n.prototype.getAxisTooltipData=function(t,n){wt(t)||(t=t?[t]:[]);for(var i,r=this.getData(),e=this.getLayerSeries(),o=[],a=e.length,s=0;s<a;++s){for(var u=Number.MAX_VALUE,l=-1,h=e[s].indices.length,f=0;f<h;++f){var c=r.get(t[0],e[s].indices[f]),v=Math.abs(c-n);v<=u&&(i=c,u=v,l=e[s].indices[f])}o.push(l)}return{dataIndices:o,nestestValue:i}},n.prototype.formatTooltip=function(t){var n=this.getData();return rd("nameValue",{name:n.getName(t),value:n.get(n.mapDimension("value"),t)})},n.type="series.themeRiver",n.dependencies=["singleAxis"],n.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},n}(gd);function xL(t){t.eachSeriesByType("themeRiver",(function(t){var n=t.getData(),i=t.coordinateSystem,r={},e=i.getRect();r.rect=e;var o=t.get("boundaryGap"),a=i.getAxis();r.boundaryGap=o,"horizontal"===a.orient?(o[0]=Fe(o[0],e.height),o[1]=Fe(o[1],e.height),ML(n,t,e.height-o[0]-o[1])):(o[0]=Fe(o[0],e.width),o[1]=Fe(o[1],e.width),ML(n,t,e.width-o[0]-o[1])),n.setLayout("layoutInfo",r)}))}function ML(t,n,i){if(t.count())for(var r,e=n.coordinateSystem,o=n.getLayerSeries(),a=t.mapDimension("single"),s=t.mapDimension("value"),u=dt(o,(function(n){return dt(n.indices,(function(n){var i=e.dataToPoint(t.get(a,n));return i[1]=t.get(s,n),i}))})),l=function(t){for(var n=t.length,i=t[0].length,r=[],e=[],o=0,a=0;a<i;++a){for(var s=0,u=0;u<n;++u)s+=t[u][a][1];s>o&&(o=s),r.push(s)}for(var l=0;l<i;++l)e[l]=(o-r[l])/2;o=0;for(var h=0;h<i;++h){var f=r[h]+e[h];f>o&&(o=f)}return{y0:e,max:o}}(u),h=l.y0,f=i/l.max,c=o.length,v=o[0].indices.length,d=0;d<v;++d){t.setItemLayout(o[0].indices[d],{layerIndex:0,x:u[0][d][0],y0:r=h[d]*f,y:u[0][d][1]*f});for(var p=1;p<c;++p)t.setItemLayout(o[p].indices[d],{layerIndex:p,x:u[p][d][0],y0:r+=u[p-1][d][1]*f,y:u[p][d][1]*f})}}var SL=function(t){function n(n,i,r,e){var o=t.call(this)||this;o.z2=2,o.textConfig={inside:!0},Bs(o).seriesIndex=i.seriesIndex;var a=new Ss({z2:4,silent:n.getModel().get(["label","silent"])});return o.setTextContent(a),o.updateData(!0,n,i,r,e),o}return E(n,t),n.prototype.updateData=function(t,n,i,r,e){this.node=n,n.piece=this,i=i||this._seriesModel,r=r||this._ecModel;var o=this;Bs(o).dataIndex=n.dataIndex;var a=n.getModel(),s=a.getModel("emphasis"),u=n.getLayout(),l=ut({},u);l.label=null;var h=n.getVisual("style");h.lineJoin="bevel";var f=n.getVisual("decal");f&&(h.decal=hm(f,e));var c=zM(a.getModel("itemStyle"),l,!0);ut(l,c),vt(js,(function(t){var n=o.ensureState(t),i=a.getModel([t,"itemStyle"]);n.style=i.getItemStyle();var r=zM(i,l);r&&(n.shape=r)})),t?(o.setShape(l),o.shape.r=u.r0,Yl(o,{shape:{r:u.r}},i,n.dataIndex)):(Yl(o,{shape:l},i),$l(o)),o.useStyle(h),this._updateLabel(i);var v=a.getShallow("cursor");v&&o.attr("cursor",v),this._seriesModel=i||this._seriesModel,this._ecModel=r||this._ecModel;var d=s.get("focus");xu(this,"ancestor"===d?n.getAncestorsIndices():"descendant"===d?n.getDescendantIndices():d,s.get("blurScope"),s.get("disabled"))},n.prototype._updateLabel=function(t){var n=this,i=this.node.getModel(),r=i.getModel("label"),e=this.node.getLayout(),o=e.endAngle-e.startAngle,a=(e.startAngle+e.endAngle)/2,s=Math.cos(a),u=Math.sin(a),l=this,h=l.getTextContent(),f=this.node.dataIndex,c=r.get("minAngle")/180*Math.PI,v=r.get("show")&&!(null!=c&&Math.abs(o)<c);function d(t,n){var i=t.get(n);return null==i?r.get(n):i}h.ignore=!v,vt(Hs,(function(r){var c=i.getModel("normal"===r?"label":[r,"label"]),v="normal"===r,p=v?h:h.ensureState(r),m=t.getFormattedLabel(f,r);v&&(m=m||n.node.name),p.style=Ch(c,{},null,"normal"!==r,!0),m&&(p.style.text=m);var y=c.get("show");null==y||v||(p.ignore=!y);var g,b=d(c,"position"),w=v?l:l.states[r],x=w.style.fill;w.textConfig={outsideFill:"inherit"===c.get("color")?x:null,inside:"outside"!==b};var M=d(c,"distance")||0,S=d(c,"align");"outside"===b?(g=e.r+M,S=a>Math.PI/2?"right":"left"):S&&"center"!==S?"left"===S?(g=e.r0+M,a>Math.PI/2&&(S="right")):"right"===S&&(g=e.r-M,a>Math.PI/2&&(S="left")):(g=o===2*Math.PI&&0===e.r0?0:(e.r+e.r0)/2,S="center"),p.style.align=S,p.style.verticalAlign=d(c,"verticalAlign")||"middle",p.x=g*s+e.cx,p.y=g*u+e.cy;var k=d(c,"rotate"),A=0;"radial"===k?(A=-a)<-Math.PI/2&&(A+=Math.PI):"tangential"===k?(A=Math.PI/2-a)>Math.PI/2?A-=Math.PI:A<-Math.PI/2&&(A+=Math.PI):kt(k)&&(A=k*Math.PI/180),p.rotation=A})),h.dirtyStyle()},n}(vl),kL=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.render=function(t,n,i){var r=this;this.seriesModel=t,this.api=i,this.ecModel=n;var e=t.getData(),o=e.tree.root,a=t.getViewRoot(),s=this.group,u=t.get("renderLabelForZeroData"),l=[];a.eachNode((function(t){l.push(t)})),function(r,a){function l(t){return t.getId()}function h(l,h){!function(r,a){if(u||!r||r.getValue()||(r=null),r!==o&&a!==o)if(a&&a.piece)r?(a.piece.updateData(!1,r,t,n,i),e.setItemGraphicEl(r.dataIndex,a.piece)):(h=a)&&h.piece&&(s.remove(h.piece),h.piece=null);else if(r){var l=new SL(r,t,n,i);s.add(l),e.setItemGraphicEl(r.dataIndex,l)}var h}(null==l?null:r[l],null==h?null:a[h])}0===r.length&&0===a.length||new yy(a,r,l,l).add(h).update(h).remove(bt(h,null)).execute()}(l,this._oldChildren||[]),function(e,o){o.depth>0?(r.virtualPiece?r.virtualPiece.updateData(!1,e,t,n,i):(r.virtualPiece=new SL(e,t,n,i),s.add(r.virtualPiece)),o.piece.off("click"),r.virtualPiece.on("click",(function(){r._rootToNode(o.parentNode)}))):r.virtualPiece&&(s.remove(r.virtualPiece),r.virtualPiece=null)}(o,a),this._initEvents(),this._oldChildren=l},n.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",(function(n){var i=!1;t.seriesModel.getViewRoot().eachNode((function(r){if(!i&&r.piece&&r.piece===n.target){var e=r.getModel().get("nodeClick");if("rootToNode"===e)t._rootToNode(r);else if("link"===e){var o=r.getModel(),a=o.get("link");a&&Pf(a,o.get("target",!0)||"_blank")}i=!0}}))}))},n.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},n.prototype.containPoint=function(t,n){var i=n.getData().getItemLayout(0);if(i){var r=t[0]-i.cx,e=t[1]-i.cy,o=Math.sqrt(r*r+e*e);return o<=i.r&&o>=i.r0}},n.type="sunburst",n}(Id),AL=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.ignoreStyleOnData=!0,i}return E(n,t),n.prototype.getInitialData=function(t,n){var i={name:t.name,children:t.data};NL(i);var r=this._levelModels=dt(t.levels||[],(function(t){return new qh(t,this,n)}),this),e=ZA.createTree(i,this,(function(t){t.wrapMethod("getItemModel",(function(t,n){var i=e.getNodeByDataIndex(n),o=r[i.depth];return o&&(t.parentModel=o),t}))}));return e.data},n.prototype.optionUpdated=function(){this.resetViewRoot()},n.prototype.getDataParams=function(n){var i=t.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(n);return i.treePathInfo=JA(r,this),i},n.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},n.prototype.getViewRoot=function(){return this._viewRoot},n.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;t&&(t===n||n.contains(t))||(this._viewRoot=n)},n.prototype.enableAriaDecal=function(){eN(this)},n.type="series.sunburst",n.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},n}(gd);function NL(t){var n=0;vt(t.children,(function(t){NL(t);var i=t.value;wt(i)&&(i=i[0]),n+=i}));var i=t.value;wt(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=n),i<0&&(i=0),wt(t.value)?t.value[0]=i:t.value=i}var CL=Math.PI/180;function TL(t,n,i){n.eachSeriesByType(t,(function(t){var n=t.get("center"),r=t.get("radius");wt(r)||(r=[0,r]),wt(n)||(n=[n,n]);var e=i.getWidth(),o=i.getHeight(),a=Math.min(e,o),s=Fe(n[0],e),u=Fe(n[1],o),l=Fe(r[0],a/2),h=Fe(r[1],a/2),f=-t.get("startAngle")*CL,c=t.get("minAngle")*CL,v=t.getData().tree.root,d=t.getViewRoot(),p=d.depth,m=t.get("sort");null!=m&&zL(d,m);var y=0;vt(d.children,(function(t){!isNaN(t.getValue())&&y++}));var g=d.getValue(),b=Math.PI/(g||y)*2,w=d.depth>0,x=(h-l)/(d.height-(w?-1:1)||1),M=t.get("clockwise"),S=t.get("stillShowZeroSum"),k=M?1:-1,A=function(n,i){if(n){var r=i;if(n!==v){var e=n.getValue(),o=0===g&&S?b:e*b;o<c&&(o=c),r=i+k*o;var h=n.depth-p-(w?-1:1),f=l+x*h,d=l+x*(h+1),m=t.getLevelModel(n);if(m){var y=m.get("r0",!0),N=m.get("r",!0),C=m.get("radius",!0);null!=C&&(y=C[0],N=C[1]),null!=y&&(f=Fe(y,a/2)),null!=N&&(d=Fe(N,a/2))}n.setLayout({angle:o,startAngle:i,endAngle:r,clockwise:M,cx:s,cy:u,r0:f,r:d})}if(n.children&&n.children.length){var T=0;vt(n.children,(function(t){T+=A(t,i+T)}))}return r-i}};if(w){var N=2*Math.PI;v.setLayout({angle:N,startAngle:f,endAngle:f+N,clockwise:M,cx:s,cy:u,r0:l,r:l+x})}A(d,f)}))}function zL(t,n){var i=t.children||[];t.children=function(t,n){if(xt(n)){var i=dt(t,(function(t,n){var i=t.getValue();return{params:{depth:t.depth,height:t.height,dataIndex:t.dataIndex,getValue:function(){return i}},index:n}}));return i.sort((function(t,i){return n(t.params,i.params)})),dt(i,(function(n){return t[n.index]}))}var r="asc"===n;return t.sort((function(t,n){var i=(t.getValue()-n.getValue())*(r?1:-1);return 0===i?(t.dataIndex-n.dataIndex)*(r?-1:1):i}))}(i,n),i.length&&vt(t.children,(function(t){zL(t,n)}))}function IL(t){var n={};t.eachSeriesByType("sunburst",(function(t){var i=t.getData(),r=i.tree;r.eachNode((function(e){var o=e.getModel().getModel("itemStyle").getItemStyle();o.fill||(o.fill=function(t,i,r){for(var e=t;e&&e.depth>1;)e=e.parentNode;var o=i.getColorFromPalette(e.name||e.dataIndex+"",n);return t.depth>1&&Mt(o)&&(o=ji(o,(t.depth-1)/(r-1)*.5)),o}(e,t,r.root.height)),ut(i.ensureUniqueItemVisual(e.dataIndex,"style"),o)}))}))}var LL={color:"fill",borderColor:"stroke"},OL={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},DL=yo(),RL=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},n.prototype.getInitialData=function(){return qy(null,this)},n.prototype.getDataParams=function(n,i,r){var e=t.prototype.getDataParams.call(this,n,i);return r&&(e.info=DL(r).info),e},n.type="series.custom",n.dependencies=["grid","polar","geo","singleAxis","calendar"],n.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},n}(gd);function _L(t,n){return n=n||[0,0],dt(["x","y"],(function(i,r){var e=this.getAxis(i),o=n[r],a=t[r]/2;return"category"===e.type?e.getBandWidth():Math.abs(e.dataToCoord(o-a)-e.dataToCoord(o+a))}),this)}function BL(t,n){return n=n||[0,0],dt([0,1],(function(i){var r=n[i],e=t[i]/2,o=[],a=[];return o[i]=r-e,a[i]=r+e,o[1-i]=a[1-i]=n[1-i],Math.abs(this.dataToPoint(o)[i]-this.dataToPoint(a)[i])}),this)}function FL(t,n){var i=this.getAxis(),r=n instanceof Array?n[0]:n,e=(t instanceof Array?t[0]:t)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(r-e)-i.dataToCoord(r+e))}function EL(t,n){return n=n||[0,0],dt(["Radius","Angle"],(function(i,r){var e=this["get"+i+"Axis"](),o=n[r],a=t[r]/2,s="category"===e.type?e.getBandWidth():Math.abs(e.dataToCoord(o-a)-e.dataToCoord(o+a));return"Angle"===i&&(s=s*Math.PI/180),s}),this)}function PL(t,n,i,r){return t&&(t.legacy||!1!==t.legacy&&!i&&!r&&"tspan"!==n&&("text"===n||Xt(t,"text")))}function WL(t,n,i){var r,e,o,a=t;if("text"===n)o=a;else{o={},Xt(a,"text")&&(o.text=a.text),Xt(a,"rich")&&(o.rich=a.rich),Xt(a,"textFill")&&(o.fill=a.textFill),Xt(a,"textStroke")&&(o.stroke=a.textStroke),Xt(a,"fontFamily")&&(o.fontFamily=a.fontFamily),Xt(a,"fontSize")&&(o.fontSize=a.fontSize),Xt(a,"fontStyle")&&(o.fontStyle=a.fontStyle),Xt(a,"fontWeight")&&(o.fontWeight=a.fontWeight),e={type:"text",style:o,silent:!0},r={};var s=Xt(a,"textPosition");i?r.position=s?a.textPosition:"inside":s&&(r.position=a.textPosition),Xt(a,"textPosition")&&(r.position=a.textPosition),Xt(a,"textOffset")&&(r.offset=a.textOffset),Xt(a,"textRotation")&&(r.rotation=a.textRotation),Xt(a,"textDistance")&&(r.distance=a.textDistance)}return VL(o,t),vt(o.rich,(function(t){VL(t,t)})),{textConfig:r,textContent:e}}function VL(t,n){n&&(n.font=n.textFont||n.font,Xt(n,"textStrokeWidth")&&(t.lineWidth=n.textStrokeWidth),Xt(n,"textAlign")&&(t.align=n.textAlign),Xt(n,"textVerticalAlign")&&(t.verticalAlign=n.textVerticalAlign),Xt(n,"textLineHeight")&&(t.lineHeight=n.textLineHeight),Xt(n,"textWidth")&&(t.width=n.textWidth),Xt(n,"textHeight")&&(t.height=n.textHeight),Xt(n,"textBackgroundColor")&&(t.backgroundColor=n.textBackgroundColor),Xt(n,"textPadding")&&(t.padding=n.textPadding),Xt(n,"textBorderColor")&&(t.borderColor=n.textBorderColor),Xt(n,"textBorderWidth")&&(t.borderWidth=n.textBorderWidth),Xt(n,"textBorderRadius")&&(t.borderRadius=n.textBorderRadius),Xt(n,"textBoxShadowColor")&&(t.shadowColor=n.textBoxShadowColor),Xt(n,"textBoxShadowBlur")&&(t.shadowBlur=n.textBoxShadowBlur),Xt(n,"textBoxShadowOffsetX")&&(t.shadowOffsetX=n.textBoxShadowOffsetX),Xt(n,"textBoxShadowOffsetY")&&(t.shadowOffsetY=n.textBoxShadowOffsetY))}function jL(t,n,i){var r=t;r.textPosition=r.textPosition||i.position||"inside",null!=i.offset&&(r.textOffset=i.offset),null!=i.rotation&&(r.textRotation=i.rotation),null!=i.distance&&(r.textDistance=i.distance);var e=r.textPosition.indexOf("inside")>=0,o=t.fill||"#000";HL(r,n);var a=null==r.textFill;return e?a&&(r.textFill=i.insideFill||"#fff",!r.textStroke&&i.insideStroke&&(r.textStroke=i.insideStroke),!r.textStroke&&(r.textStroke=o),null==r.textStrokeWidth&&(r.textStrokeWidth=2)):(a&&(r.textFill=t.fill||i.outsideFill||"#000"),!r.textStroke&&i.outsideStroke&&(r.textStroke=i.outsideStroke)),r.text=n.text,r.rich=n.rich,vt(n.rich,(function(t){HL(t,t)})),r}function HL(t,n){n&&(Xt(n,"fill")&&(t.textFill=n.fill),Xt(n,"stroke")&&(t.textStroke=n.fill),Xt(n,"lineWidth")&&(t.textStrokeWidth=n.lineWidth),Xt(n,"font")&&(t.font=n.font),Xt(n,"fontStyle")&&(t.fontStyle=n.fontStyle),Xt(n,"fontWeight")&&(t.fontWeight=n.fontWeight),Xt(n,"fontSize")&&(t.fontSize=n.fontSize),Xt(n,"fontFamily")&&(t.fontFamily=n.fontFamily),Xt(n,"align")&&(t.textAlign=n.align),Xt(n,"verticalAlign")&&(t.textVerticalAlign=n.verticalAlign),Xt(n,"lineHeight")&&(t.textLineHeight=n.lineHeight),Xt(n,"width")&&(t.textWidth=n.width),Xt(n,"height")&&(t.textHeight=n.height),Xt(n,"backgroundColor")&&(t.textBackgroundColor=n.backgroundColor),Xt(n,"padding")&&(t.textPadding=n.padding),Xt(n,"borderColor")&&(t.textBorderColor=n.borderColor),Xt(n,"borderWidth")&&(t.textBorderWidth=n.borderWidth),Xt(n,"borderRadius")&&(t.textBorderRadius=n.borderRadius),Xt(n,"shadowColor")&&(t.textBoxShadowColor=n.shadowColor),Xt(n,"shadowBlur")&&(t.textBoxShadowBlur=n.shadowBlur),Xt(n,"shadowOffsetX")&&(t.textBoxShadowOffsetX=n.shadowOffsetX),Xt(n,"shadowOffsetY")&&(t.textBoxShadowOffsetY=n.shadowOffsetY),Xt(n,"textShadowColor")&&(t.textShadowColor=n.textShadowColor),Xt(n,"textShadowBlur")&&(t.textShadowBlur=n.textShadowBlur),Xt(n,"textShadowOffsetX")&&(t.textShadowOffsetX=n.textShadowOffsetX),Xt(n,"textShadowOffsetY")&&(t.textShadowOffsetY=n.textShadowOffsetY))}var YL={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},XL=yt(YL);pt(ie,(function(t,n){return t[n]=1,t}),{});var GL=["","style","shape","extra"],UL=yo();function ZL(t,n,i,r,e){var o=t+"Animation",a=jl(t,r,e)||{},s=UL(n).userDuring;return a.duration>0&&(a.during=s?gt(nO,{el:n,userDuring:s}):null,a.setToFinal=!0,a.scope=t),ut(a,i[o]),a}function qL(t,n,i,r){var e=(r=r||{}).dataIndex,o=r.isInit,a=r.clearStyle,s=i.isAnimationEnabled(),u=UL(t),l=n.style;u.userDuring=n.during;var h={},f={};if(function(t,n,i){for(var r=0;r<XL.length;r++){var e=XL[r],o=YL[e],a=n[e];a&&(i[o[0]]=a[0],i[o[1]]=a[1])}for(r=0;r<ie.length;r++){var s=ie[r];null!=n[s]&&(i[s]=n[s])}}(0,n,f),rO("shape",n,f),rO("extra",n,f),!o&&s&&(function(t,n,i){for(var r=n.transition,e=JL(r)?ie:eo(r||[]),o=0;o<e.length;o++){var a=e[o];"style"!==a&&"shape"!==a&&"extra"!==a&&(i[a]=t[a])}}(t,n,h),iO("shape",t,n,h),iO("extra",t,n,h),function(t,n,i,r){if(i){var e,o=t.style;if(o){var a=i.transition,s=n.transition;if(a&&!JL(a)){var u=eo(a);!e&&(e=r.style={});for(var l=0;l<u.length;l++)e[v=u[l]]=o[v]}else if(t.getAnimationStyleProps&&(JL(s)||JL(a)||ht(s,"style")>=0)){var h=t.getAnimationStyleProps(),f=h?h.style:null;if(f){!e&&(e=r.style={});var c=yt(i);for(l=0;l<c.length;l++){var v;f[v=c[l]]&&(e[v]=o[v])}}}}}}(t,n,l,h)),f.style=l,function(t,n,i){var r=n.style;if(!t.isGroup&&r){if(i){t.useStyle({});for(var e=t.animators,o=0;o<e.length;o++){var a=e[o];"style"===a.targetName&&a.changeTarget(t.style)}}t.setStyle(r)}n&&(n.style=null,n&&t.attr(n),n.style=r)}(t,f,a),function(t,n){Xt(n,"silent")&&(t.silent=n.silent),Xt(n,"ignore")&&(t.ignore=n.ignore),t instanceof aa&&Xt(n,"invisible")&&(t.invisible=n.invisible),t instanceof us&&Xt(n,"autoBatch")&&(t.autoBatch=n.autoBatch)}(t,n),s)if(o){var c={};vt(GL,(function(t){var i=t?n[t]:n;i&&i.enterFrom&&(t&&(c[t]=c[t]||{}),ut(t?c[t]:c,i.enterFrom))}));var v=ZL("enter",t,n,i,e);v.duration>0&&t.animateFrom(c,v)}else!function(t,n,i,r,e){if(e){var o=ZL("update",t,n,r,i);o.duration>0&&t.animateFrom(e,o)}}(t,n,e||0,i,h);$L(t,n),l?t.dirty():t.markRedraw()}function $L(t,n){for(var i=UL(t).leaveToProps,r=0;r<GL.length;r++){var e=GL[r],o=e?n[e]:n;o&&o.leaveTo&&(i||(i=UL(t).leaveToProps={}),e&&(i[e]=i[e]||{}),ut(e?i[e]:i,o.leaveTo))}}function KL(t,n,i,r){if(t){var e=t.parent,o=UL(t).leaveToProps;if(o){var a=ZL("update",t,n,i,0);a.done=function(){e.remove(t),r&&r()},t.animateTo(o,a)}else e.remove(t),r&&r()}}function JL(t){return"all"===t}var QL={},tO={setTransform:function(t,n){return QL.el[t]=n,this},getTransform:function(t){return QL.el[t]},setShape:function(t,n){var i=QL.el;return(i.shape||(i.shape={}))[t]=n,i.dirtyShape&&i.dirtyShape(),this},getShape:function(t){var n=QL.el.shape;if(n)return n[t]},setStyle:function(t,n){var i=QL.el,r=i.style;return r&&(r[t]=n,i.dirtyStyle&&i.dirtyStyle()),this},getStyle:function(t){var n=QL.el.style;if(n)return n[t]},setExtra:function(t,n){return(QL.el.extra||(QL.el.extra={}))[t]=n,this},getExtra:function(t){var n=QL.el.extra;if(n)return n[t]}};function nO(){var t=this,n=t.el;if(n){var i=UL(n).userDuring,r=t.userDuring;i===r?(QL.el=n,r(tO)):t.el=t.userDuring=null}}function iO(t,n,i,r){var e=i[t];if(e){var o,a=n[t];if(a){var s=i.transition,u=e.transition;if(u)if(!o&&(o=r[t]={}),JL(u))ut(o,a);else for(var l=eo(u),h=0;h<l.length;h++)o[c=l[h]]=v=a[c];else if(JL(s)||ht(s,t)>=0){!o&&(o=r[t]={});var f=yt(a);for(h=0;h<f.length;h++){var c,v;eO(e[c=f[h]],v=a[c])&&(o[c]=v)}}}}}function rO(t,n,i){var r=n[t];if(r)for(var e=i[t]={},o=yt(r),a=0;a<o.length;a++){var s=o[a];e[s]=dr(r[s])}}function eO(t,n){return ct(t)?t!==n:null!=t&&isFinite(t)}var oO=yo(),aO=["percent","easing","shape","style","extra"];function sO(t){t.stopAnimation("keyframe"),t.attr(oO(t))}function uO(t,n,i){if(i.isAnimationEnabled()&&n)if(wt(n))vt(n,(function(n){uO(t,n,i)}));else{var r=n.keyframes,e=n.duration;if(i&&null==e){var o=jl("enter",i,0);e=o&&o.duration}if(r&&e){var a=oO(t);vt(GL,(function(i){var o;i&&!t[i]||(r.sort((function(t,n){return t.percent-n.percent})),vt(r,(function(r){var s=t.animators,u=i?r[i]:r;if(u){var l=yt(u);if(i||(l=mt(l,(function(t){return ht(aO,t)<0}))),l.length){o||((o=t.animate(i,n.loop,!0)).scope="keyframe");for(var h=0;h<s.length;h++)s[h]!==o&&s[h].targetName===o.targetName&&s[h].stopTracks(l);i&&(a[i]=a[i]||{});var f=i?a[i]:a;vt(l,(function(n){f[n]=((i?t[i]:t)||{})[n]})),o.whenWithKeys(e*r.percent,u,l,r.easing)}}})),o&&o.delay(n.delay||0).duration(e).start(n.easing))}))}}}var lO=["normal","emphasis","blur","select"],hO={normal:["itemStyle"],emphasis:["emphasis","itemStyle"],blur:["blur","itemStyle"],select:["select","itemStyle"]},fO={normal:["label"],emphasis:["emphasis","label"],blur:["blur","label"],select:["select","label"]},cO=["x","y"],vO={normal:{},emphasis:{},blur:{},select:{}},dO={cartesian2d:function(t){var n=t.master.getRect();return{coordSys:{type:"cartesian2d",x:n.x,y:n.y,width:n.width,height:n.height},api:{coord:function(n){return t.dataToPoint(n)},size:gt(_L,t)}}},geo:function(t){var n=t.getBoundingRect();return{coordSys:{type:"geo",x:n.x,y:n.y,width:n.width,height:n.height,zoom:t.getZoom()},api:{coord:function(n){return t.dataToPoint(n)},size:gt(BL,t)}}},singleAxis:function(t){var n=t.getRect();return{coordSys:{type:"singleAxis",x:n.x,y:n.y,width:n.width,height:n.height},api:{coord:function(n){return t.dataToPoint(n)},size:gt(FL,t)}}},polar:function(t){var n=t.getRadiusAxis(),i=t.getAngleAxis(),r=n.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:r[1],r0:r[0]},api:{coord:function(r){var e=n.dataToRadius(r[0]),o=i.dataToAngle(r[1]),a=t.coordToPoint([e,o]);return a.push(e,o*Math.PI/180),a},size:gt(EL,t)}}},calendar:function(t){var n=t.getRect(),i=t.getRangeInfo();return{coordSys:{type:"calendar",x:n.x,y:n.y,width:n.width,height:n.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:function(n,i){return t.dataToPoint(n,i)}}}}};function pO(t){return t instanceof us}function mO(t){return t instanceof aa}var yO=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.render=function(t,n,i,r){this._progressiveEls=null;var e=this._data,o=t.getData(),a=this.group,s=MO(t,o,n,i);e||a.removeAll(),o.diff(e).add((function(n){kO(i,null,n,s(n,r),t,a,o)})).remove((function(n){var i=e.getItemGraphicEl(n);KL(i,DL(i).option,t)})).update((function(n,u){var l=e.getItemGraphicEl(u);kO(i,l,n,s(n,r),t,a,o)})).execute();var u=t.get("clip",!0)?Rx(t.coordinateSystem,!1,t):null;u?a.setClipPath(u):a.removeClipPath(),this._data=o},n.prototype.incrementalPrepareRender=function(){this.group.removeAll(),this._data=null},n.prototype.incrementalRender=function(t,n,i,r,e){var o=n.getData(),a=MO(n,o,i,r),s=this._progressiveEls=[];function u(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var l=t.start;l<t.end;l++){var h=kO(null,null,l,a(l,e),n,this.group,o);h&&(h.traverse(u),s.push(h))}},n.prototype.eachRendered=function(t){wh(this._progressiveEls||this.group,t)},n.prototype.filterForExposedEvent=function(t,n,i){var r=n.element;if(null==r||i.name===r)return!0;for(;(i=i.__hostTarget||i.parent)&&i!==this.group;)if(i.name===r)return!0;return!1},n.type="custom",n}(Id);function gO(t){var n,i=t.type;if("path"===i){var r=t.shape,e=null!=r.width&&null!=r.height?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,o=DO(r);n=ih(o,null,e,r.layout||"center"),DL(n).customPathData=o}else if("image"===i)n=new vs({}),DL(n).customImagePath=t.style.image;else if("text"===i)n=new Ss({});else if("group"===i)n=new Oe;else{if("compoundPath"===i)throw new Error('"compoundPath" is not supported yet.');var a=nh(i);a||io(""),n=new a}return DL(n).customGraphicType=i,n.name=t.name,n.z2EmphasisLift=1,n.z2SelectLift=1,n}function bO(t,n,i,r,e,o,a){sO(n);var s=e&&e.normal.cfg;s&&n.setTextConfig(s),r&&null==r.transition&&(r.transition=cO);var u=r&&r.style;if(u){if("text"===n.type){var l=u;Xt(l,"textFill")&&(l.fill=l.textFill),Xt(l,"textStroke")&&(l.stroke=l.textStroke)}var h=void 0,f=pO(n)?u.decal:null;t&&f&&(f.dirty=!0,h=hm(f,t)),u.__decalPattern=h}mO(n)&&u&&(h=u.__decalPattern)&&(u.decal=h),qL(n,r,o,{dataIndex:i,isInit:a,clearStyle:!0}),uO(n,r.keyframeAnimation,o)}function wO(t,n,i,r,e){var o=n.isGroup?null:n,a=e&&e[t].cfg;if(o){var s=o.ensureState(t);if(!1===r){var u=o.getState(t);u&&(u.style=null)}else s.style=r||null;a&&(s.textConfig=a),eu(o)}}function xO(t,n,i){var r="normal"===i,e=r?n:TO(n,i),o=e?e.z2:null;null!=o&&((r?t:t.ensureState(i)).z2=o||0)}function MO(t,n,i,r){var e=t.get("renderItem"),o=t.coordinateSystem,a={};o&&(a=o.prepareCustoms?o.prepareCustoms(o):dO[o.type](o));for(var s,u,l=lt({getWidth:r.getWidth,getHeight:r.getHeight,getZr:r.getZr,getDevicePixelRatio:r.getDevicePixelRatio,value:function(t,i){return null==i&&(i=s),n.getStore().get(n.getDimensionIndex(t||0),i)},style:function(i,r){null==r&&(r=s);var e=n.getItemVisual(r,"style"),o=e&&e.fill,a=e&&e.opacity,u=g(r,"normal").getItemStyle();null!=o&&(u.fill=o),null!=a&&(u.opacity=a);var l={inheritColor:Mt(o)?o:"#000"},h=b(r,"normal"),f=Ch(h,null,l,!1,!0);f.text=h.getShallow("show")?Ot(t.getFormattedLabel(r,"normal"),vx(n,r)):null;var c=Th(h,l,!1);return x(i,u),u=jL(u,f,c),i&&w(u,i),u.legacy=!0,u},ordinalRawValue:function(t,i){null==i&&(i=s);var r=n.getDimensionInfo(t=t||0);if(!r){var e=n.getDimensionIndex(t);return e>=0?n.getStore().get(e,i):void 0}var o=n.get(r.name,i),a=r&&r.ordinalMeta;return a?a.categories[o]:o},styleEmphasis:function(i,r){null==r&&(r=s);var e=g(r,"emphasis").getItemStyle(),o=b(r,"emphasis"),a=Ch(o,null,null,!0,!0);a.text=o.getShallow("show")?Dt(t.getFormattedLabel(r,"emphasis"),t.getFormattedLabel(r,"normal"),vx(n,r)):null;var u=Th(o,null,!0);return x(i,e),e=jL(e,a,u),i&&w(e,i),e.legacy=!0,e},visual:function(t,i){if(null==i&&(i=s),Xt(LL,t)){var r=n.getItemVisual(i,"style");return r?r[LL[t]]:null}if(Xt(OL,t))return n.getItemVisual(i,t)},barLayout:function(t){if("cartesian2d"===o.type)return function(t){var n=[],i=t.axis;if("category"===i.type){for(var r=i.getBandWidth(),e=0;e<t.count;e++)n.push(lt({bandWidth:r,axisKey:"axis0",stackId:"__ec_stack_"+e},t));var o=yg(n),a=[];for(e=0;e<t.count;e++){var s=o.axis0["__ec_stack_"+e];s.offsetCenter=s.offset+s.width/2,a.push(s)}return a}}(lt({axis:o.getBaseAxis()},t))},currentSeriesIndices:function(){return i.getCurrentSeriesIndices()},font:function(t){return Dh(t,i)}},a.api||{}),h={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:a.coordSys,dataInsideLength:n.count(),encode:SO(t.getData())},f={},c={},v={},d={},p=0;p<lO.length;p++){var m=lO[p];v[m]=t.getModel(hO[m]),d[m]=t.getModel(fO[m])}function y(t){return t===s?u||(u=n.getItemModel(t)):n.getItemModel(t)}function g(t,i){return n.hasItemOption?t===s?f[i]||(f[i]=y(t).getModel(hO[i])):y(t).getModel(hO[i]):v[i]}function b(t,i){return n.hasItemOption?t===s?c[i]||(c[i]=y(t).getModel(fO[i])):y(t).getModel(fO[i]):d[i]}return function(t,i){return s=t,u=null,f={},c={},e&&e(lt({dataIndexInside:t,dataIndex:n.getRawIndex(t),actionType:i?i.type:null},h),l)};function w(t,n){for(var i in n)Xt(n,i)&&(t[i]=n[i])}function x(t,n){t&&(t.textFill&&(n.textFill=t.textFill),t.textPosition&&(n.textPosition=t.textPosition))}}function SO(t){var n={};return vt(t.dimensions,(function(i){var r=t.getDimensionInfo(i);if(!r.isExtraCoord){var e=r.coordDim;(n[e]=n[e]||[])[r.coordDimIndex]=t.getDimensionIndex(i)}})),n}function kO(t,n,i,r,e,o,a){if(r){var s=AO(t,n,i,r,e,o);return s&&a.setItemGraphicEl(i,s),s&&xu(s,r.focus,r.blurScope,r.emphasisDisabled),s}o.remove(n)}function AO(t,n,i,r,e,o){var a=-1,s=n;n&&NO(n,r,e)&&(a=ht(o.childrenRef(),n),n=null);var u,l,h=!n,f=n;f?f.clearStates():(f=gO(r),s&&((l=f).copyTransform(u=s),mO(l)&&mO(u)&&(l.setStyle(u.style),l.z=u.z,l.z2=u.z2,l.zlevel=u.zlevel,l.invisible=u.invisible,l.ignore=u.ignore,pO(l)&&pO(u)&&l.setShape(u.shape)))),!1===r.morph?f.disableMorphing=!0:f.disableMorphing&&(f.disableMorphing=!1),vO.normal.cfg=vO.normal.conOpt=vO.emphasis.cfg=vO.emphasis.conOpt=vO.blur.cfg=vO.blur.conOpt=vO.select.cfg=vO.select.conOpt=null,vO.isLegacy=!1,function(t,n,i,r,e,o){if(!t.isGroup){CO(i,null,o),CO(i,"emphasis",o);var a=o.normal.conOpt;if(null!=a||null!=o.emphasis.conOpt||null!=o.select.conOpt||null!=o.blur.conOpt){var s=t.getTextContent();if(!1===a)s&&t.removeTextContent();else{a=o.normal.conOpt=a||{type:"text"},s?s.clearStates():(s=gO(a),t.setTextContent(s)),bO(null,s,n,a,null,r,e);for(var u=a&&a.style,l=0;l<lO.length;l++){var h=lO[l];if("normal"!==h)wO(h,s,0,zO(a,o[h].conOpt,h),null)}u?s.dirty():s.markRedraw()}}}}(f,i,r,e,h,vO),function(t,n,i,r,e){var o=i.clipPath;if(!1===o)t&&t.getClipPath()&&t.removeClipPath();else if(o){var a=t.getClipPath();a&&NO(a,o,r)&&(a=null),a||(a=gO(o),t.setClipPath(a)),bO(null,a,n,o,null,r,e)}}(f,i,r,e,h),bO(t,f,i,r,vO,e,h),Xt(r,"info")&&(DL(f).info=r.info);for(var c=0;c<lO.length;c++){var v=lO[c];if("normal"!==v)wO(v,f,0,zO(r,TO(r,v),v),vO)}return function(t,n,i){if(!t.isGroup){var r=t,e=i.currentZLevel;r.z=i.currentZ,r.zlevel=e;var o=n.z2;null!=o&&(r.z2=o||0);for(var a=0;a<lO.length;a++)xO(r,n,lO[a])}}(f,r,e),"group"===r.type&&function(t,n,i,r,e){var o=r.children,a=o?o.length:0,s=r.$mergeChildren,u="byName"===s||r.diffChildrenByName,l=!1===s;if(a||u||l){if(u)return h={api:t,oldChildren:n.children()||[],newChildren:o||[],dataIndex:i,seriesModel:e,group:n},void new yy(h.oldChildren,h.newChildren,IO,IO,h).add(LO).update(LO).remove(OO).execute();var h;l&&n.removeAll();for(var f=0;f<a;f++)o[f]&&AO(t,n.childAt(f),i,o[f],e,n);for(var c=n.childCount()-1;c>=f;c--)KL(n.childAt(c),DL(n).option,e)}}(t,f,i,r,e),a>=0?o.replaceAt(f,a):o.add(f),f}function NO(t,n,i){var r,e=DL(t),o=n.type,a=n.shape,s=n.style;return i.isUniversalTransitionEnabled()||null!=o&&o!==e.customGraphicType||"path"===o&&(r=a)&&(Xt(r,"pathData")||Xt(r,"d"))&&DO(a)!==e.customPathData||"image"===o&&Xt(s,"image")&&s.image!==e.customImagePath}function CO(t,n,i){var r=n?TO(t,n):t,e=n?zO(t,r,"emphasis"):t.style,o=t.type,a=r?r.textConfig:null,s=t.textContent,u=s?n?TO(s,n):s:null;if(e&&(i.isLegacy||PL(e,o,!!a,!!u))){i.isLegacy=!0;var l=WL(e,o,!n);!a&&l.textConfig&&(a=l.textConfig),!u&&l.textContent&&(u=l.textContent)}!n&&u&&!u.type&&(u.type="text");var h=n?i[n]:i.normal;h.cfg=a,h.conOpt=u}function TO(t,n){return n?t?t[n]:null:t}function zO(t,n,i){var r=n&&n.style;return null==r&&"emphasis"===i&&t&&(r=t.styleEmphasis),r}function IO(t,n){var i=t&&t.name;return null!=i?i:"e\0\0"+n}function LO(t,n){var i=this.context;AO(i.api,null!=n?i.oldChildren[n]:null,i.dataIndex,null!=t?i.newChildren[t]:null,i.seriesModel,i.group)}function OO(t){var n=this.context,i=n.oldChildren[t];KL(i,DL(i).option,n.seriesModel)}function DO(t){return t&&(t.pathData||t.d)}var RO=yo(),_O=ot,BO=gt,FO=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(t,n,i,r){var e=n.get("value"),o=n.get("status");if(this._axisModel=t,this._axisPointerModel=n,this._api=i,r||this._lastValue!==e||this._lastStatus!==o){this._lastValue=e,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var u={};this.makeElOption(u,e,t,n,i);var l=u.graphicKey;l!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=l;var h=this._moveAnimation=this.determineAnimation(t,n);if(a){var f=bt(EO,n,h);this.updatePointerEl(a,u,f),this.updateLabelEl(a,u,f,n)}else a=this._group=new Oe,this.createPointerEl(a,u,t,n),this.createLabelEl(a,u,t,n),i.getZr().add(a);jO(a,n,!0),this._renderHandle(e)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineAnimation=function(t,n){var i=n.get("animation"),r=t.axis,e="category"===r.type,o=n.get("snap");if(!o&&!e)return!1;if("auto"===i||null==i){var a=this.animationThreshold;if(e&&r.getBandWidth()>a)return!0;if(o){var s=gS(t).seriesDataCount,u=r.getExtent();return Math.abs(u[0]-u[1])/s>a}return!1}return!0===i},t.prototype.makeElOption=function(){},t.prototype.createPointerEl=function(t,n){var i=n.pointer;if(i){var r=RO(t).pointerEl=new xh[i.type](_O(n.pointer));t.add(r)}},t.prototype.createLabelEl=function(t,n,i,r){if(n.label){var e=RO(t).labelEl=new Ss(_O(n.label));t.add(e),WO(e,r)}},t.prototype.updatePointerEl=function(t,n,i){var r=RO(t).pointerEl;r&&n.pointer&&(r.setStyle(n.pointer.style),i(r,{shape:n.pointer.shape}))},t.prototype.updateLabelEl=function(t,n,i,r){var e=RO(t).labelEl;e&&(e.setStyle(n.label.style),i(e,{x:n.label.x,y:n.label.y}),WO(e,r))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var n,i=this._axisPointerModel,r=this._api.getZr(),e=this._handle,o=i.getModel("handle"),a=i.get("status");if(!o.get("show")||!a||"hide"===a)return e&&r.remove(e),void(this._handle=null);this._handle||(n=!0,e=this._handle=dh(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Ln(t.event)},onmousedown:BO(this._onHandleDragMove,this,0,0),drift:BO(this._onHandleDragMove,this),ondragend:BO(this._onHandleDragEnd,this)}),r.add(e)),jO(e,i,!1),e.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");wt(s)||(s=[s,s]),e.scaleX=s[0]/2,e.scaleY=s[1]/2,Pd(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,n)}},t.prototype._moveHandleToValue=function(t,n){EO(this._axisPointerModel,!n&&this._moveAnimation,this._handle,VO(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,n){var i=this._handle;if(i){this._dragging=!0;var r=this.updateHandleTransform(VO(i),[t,n],this._axisModel,this._axisPointerModel);this._payloadInfo=r,i.stopAnimation(),i.attr(VO(r)),RO(i).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var n=t.getZr(),i=this._group,r=this._handle;n&&i&&(this._lastGraphicKey=null,i&&n.remove(i),r&&n.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),Wd(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,n,i){return{x:t[i=i||0],y:t[1-i],width:n[i],height:n[1-i]}},t}();function EO(t,n,i,r){PO(RO(i).lastProp,r)||(RO(i).lastProp=r,n?Yl(i,r,t):(i.stopAnimation(),i.attr(r)))}function PO(t,n){if(At(t)&&At(n)){var i=!0;return vt(n,(function(n,r){i=i&&PO(t[r],n)})),!!i}return t===n}function WO(t,n){t[n.get(["label","show"])?"show":"hide"]()}function VO(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function jO(t,n,i){var r=n.get("z"),e=n.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=r&&(t.z=r),null!=e&&(t.zlevel=e),t.silent=i)}))}function HO(t){var n,i=t.get("type"),r=t.getModel(i+"Style");return"line"===i?(n=r.getLineStyle()).fill=null:"shadow"===i&&((n=r.getAreaStyle()).stroke=null),n}function YO(t,n,i,r,e){var o=XO(i.get("value"),n.axis,n.ecModel,i.get("seriesDataIndices"),{precision:i.get(["label","precision"]),formatter:i.get(["label","formatter"])}),a=i.getModel("label"),s=If(a.get("padding")||0),u=a.getFont(),l=ye(o,u),h=e.position,f=l.width+s[1]+s[3],c=l.height+s[0]+s[2],v=e.align;"right"===v&&(h[0]-=f),"center"===v&&(h[0]-=f/2);var d=e.verticalAlign;"bottom"===d&&(h[1]-=c),"middle"===d&&(h[1]-=c/2),function(t,n,i,r){var e=r.getWidth(),o=r.getHeight();t[0]=Math.min(t[0]+n,e)-n,t[1]=Math.min(t[1]+i,o)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(h,f,c,r);var p=a.get("backgroundColor");p&&"auto"!==p||(p=n.get(["axisLine","lineStyle","color"])),t.label={x:h[0],y:h[1],style:Ch(a,{text:o,font:u,fill:a.getTextColor(),padding:s,backgroundColor:p}),z2:10}}function XO(t,n,i,r,e){t=n.scale.parse(t);var o=n.scale.getLabel({value:t},{precision:e.precision}),a=e.formatter;if(a){var s={value:qg(n,{value:t}),axisDimension:n.dim,axisIndex:n.index,seriesData:[]};vt(r,(function(t){var n=i.getSeriesByIndex(t.seriesIndex),r=n&&n.getDataParams(t.dataIndexInside);r&&s.seriesData.push(r)})),Mt(a)?o=a.replace("{value}",o):xt(a)&&(o=a(s))}return o}function GO(t,n,i){var r=[1,0,0,1,0,0];return Gr(r,r,i.rotation),Xr(r,r,i.position),lh([t.dataToCoord(n),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],r)}function UO(t,n,i,r,e,o){var a=hS.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=e.get(["label","margin"]),YO(n,r,e,o,{position:GO(r.axis,t,i),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function ZO(t,n,i){return{x1:t[i=i||0],y1:t[1-i],x2:n[i],y2:n[1-i]}}function qO(t,n,i){return{x:t[i=i||0],y:t[1-i],width:n[i],height:n[1-i]}}function $O(t,n,i,r,e,o){return{cx:t,cy:n,r0:i,r,startAngle:e,endAngle:o,clockwise:!0}}var KO=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return E(n,t),n.prototype.makeElOption=function(t,n,i,r,e){var o=i.axis,a=o.grid,s=r.get("type"),u=JO(a,o).getOtherAxis(o).getGlobalExtent(),l=o.toGlobalCoord(o.dataToCoord(n,!0));if(s&&"none"!==s){var h=HO(r),f=QO[s](o,l,u);f.style=h,t.graphicKey=f.type,t.pointer=f}UO(n,t,tS(a.model,i),i,r,e)},n.prototype.getHandleTransform=function(t,n,i){var r=tS(n.axis.grid.model,n,{labelInside:!1});r.labelMargin=i.get(["handle","margin"]);var e=GO(n.axis,t,r);return{x:e[0],y:e[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},n.prototype.updateHandleTransform=function(t,n,i){var r=i.axis,e=r.grid,o=r.getGlobalExtent(!0),a=JO(e,r).getOtherAxis(r).getGlobalExtent(),s="x"===r.dim?0:1,u=[t.x,t.y];u[s]+=n[s],u[s]=Math.min(o[1],u[s]),u[s]=Math.max(o[0],u[s]);var l=(a[1]+a[0])/2,h=[l,l];return h[s]=u[s],{x:u[0],y:u[1],rotation:t.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][s]}},n}(FO);function JO(t,n){var i={};return i[n.dim+"AxisIndex"]=n.index,t.getCartesian(i)}var QO={line:function(t,n,i){return{type:"Line",subPixelOptimize:!0,shape:ZO([n,i[0]],[n,i[1]],tD(t))}},shadow:function(t,n,i){var r=Math.max(1,t.getBandWidth());return{type:"Rect",shape:qO([n-r/2,i[0]],[r,i[1]-i[0]],tD(t))}}};function tD(t){return"x"===t.dim?0:1}var nD=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.type="axisPointer",n.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},n}(Jf),iD=yo(),rD=vt;function eD(t,n,i){if(!W.node){var r=n.getZr();iD(r).records||(iD(r).records={}),function(t,n){function i(i,r){t.on(i,(function(i){var e=function(t){var n={showTip:[],hideTip:[]},i=function(r){var e=n[r.type];e?e.push(r):(r.dispatchAction=i,t.dispatchAction(r))};return{dispatchAction:i,pendings:n}}(n);rD(iD(t).records,(function(t){t&&r(t,i,e.dispatchAction)})),function(t,n){var i,r=t.showTip.length,e=t.hideTip.length;r?i=t.showTip[r-1]:e&&(i=t.hideTip[e-1]),i&&(i.dispatchAction=null,n.dispatchAction(i))}(e.pendings,n)}))}iD(t).initialized||(iD(t).initialized=!0,i("click",bt(aD,"click")),i("mousemove",bt(aD,"mousemove")),i("globalout",oD))}(r,n),(iD(r).records[t]||(iD(r).records[t]={})).handler=i}}function oD(t,n,i){t.handler("leave",null,i)}function aD(t,n,i,r){n.handler(t,i,r)}function sD(t,n){if(!W.node){var i=n.getZr();(iD(i).records||{})[t]&&(iD(i).records[t]=null)}}var uD=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.render=function(t,n,i){var r=n.getComponent("tooltip"),e=t.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";eD("axisPointer",i,(function(t,n,i){"none"!==e&&("leave"===t||e.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:n&&n.offsetX,y:n&&n.offsetY})}))},n.prototype.remove=function(t,n){sD("axisPointer",n)},n.prototype.dispose=function(t,n){sD("axisPointer",n)},n.type="axisPointer",n}(Nd);function lD(t,n){var i,r=[],e=t.seriesIndex;if(null==e||!(i=n.getSeriesByIndex(e)))return{point:[]};var o=i.getData(),a=mo(o,t);if(null==a||a<0||wt(a))return{point:[]};var s=o.getItemGraphicEl(a),u=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(a)||[];else if(u&&u.dataToPoint)if(t.isStacked){var l=u.getBaseAxis(),h=u.getOtherAxis(l).dim,f="x"===h||"radius"===h?1:0,c=o.mapDimension(l.dim),v=[];v[f]=o.get(c,a),v[1-f]=o.get(o.getCalculationInfo("stackResultDimension"),a),r=u.dataToPoint(v)||[]}else r=u.dataToPoint(o.getValues(dt(u.dimensions,(function(t){return o.mapDimension(t)})),a))||[];else if(s){var d=s.getBoundingRect().clone();d.applyTransform(s.transform),r=[d.x+d.width/2,d.y+d.height/2]}return{point:r,el:s}}var hD=yo();function fD(t,n,i){var r=t.currTrigger,e=[t.x,t.y],o=t,a=t.dispatchAction||gt(i.dispatchAction,i),s=n.getComponent("axisPointer").coordSysAxesInfo;if(s){mD(e)&&(e=lD({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},n).point);var u=mD(e),l=o.axesInfo,h=s.axesInfo,f="leave"===r||mD(e),c={},v={},d={list:[],map:{}},p={showPointer:bt(vD,v),showTooltip:bt(dD,d)};vt(s.coordSysMap,(function(t,n){var i=u||t.containPoint(e);vt(s.coordSysAxesInfo[n],(function(t){var n=t.axis,r=function(t,n){for(var i=0;i<(t||[]).length;i++){var r=t[i];if(n.axis.dim===r.axisDim&&n.axis.model.componentIndex===r.axisIndex)return r}}(l,t);if(!f&&i&&(!l||r)){var o=r&&r.value;null!=o||u||(o=n.pointToData(e)),null!=o&&cD(t,o,p,!1,c)}}))}));var m={};return vt(h,(function(t,n){var i=t.linkGroup;i&&!v[n]&&vt(i.axesInfo,(function(n,r){var e=v[r];if(n!==t&&e){var o=e.value;i.mapper&&(o=t.axis.scale.parse(i.mapper(o,pD(n),pD(t)))),m[t.key]=o}}))})),vt(m,(function(t,n){cD(h[n],t,p,!0,c)})),function(t,n,i){var r=i.axesInfo=[];vt(n,(function(n,i){var e=n.axisPointerModel.option,o=t[i];o?(!n.useHandle&&(e.status="show"),e.value=o.value,e.seriesDataIndices=(o.payloadBatch||[]).slice()):!n.useHandle&&(e.status="hide"),"show"===e.status&&r.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:e.value})}))}(v,h,c),function(t,n,i,r){if(!mD(n)&&t.list.length){var e=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:n[0],y:n[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:e.dataIndexInside,dataIndex:e.dataIndex,seriesIndex:e.seriesIndex,dataByCoordSys:t.list})}else r({type:"hideTip"})}(d,e,t,a),function(t,n,i){var r=i.getZr(),e="axisPointerLastHighlights",o=hD(r)[e]||{},a=hD(r)[e]={};vt(t,(function(t){var n=t.axisPointerModel.option;"show"===n.status&&vt(n.seriesDataIndices,(function(t){a[t.seriesIndex+" | "+t.dataIndex]=t}))}));var s=[],u=[];vt(o,(function(t,n){!a[n]&&u.push(t)})),vt(a,(function(t,n){!o[n]&&s.push(t)})),u.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:u}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(h,0,i),c}}function cD(t,n,i,r,e){var o=t.axis;if(!o.scale.isBlank()&&o.containData(n))if(t.involveSeries){var a=function(t,n){var i=n.axis,r=i.dim,e=t,o=[],a=Number.MAX_VALUE,s=-1;return vt(n.seriesModels,(function(n){var u,l,h=n.getData().mapDimensionsAll(r);if(n.getAxisTooltipData){var f=n.getAxisTooltipData(h,t,i);l=f.dataIndices,u=f.nestestValue}else{if(!(l=n.getData().indicesOfNearest(h[0],t,"category"===i.type?.5:null)).length)return;u=n.getData().get(h[0],l[0])}if(null!=u&&isFinite(u)){var c=t-u,v=Math.abs(c);v<=a&&((v<a||c>=0&&s<0)&&(a=v,s=c,e=u,o.length=0),vt(l,(function(t){o.push({seriesIndex:n.seriesIndex,dataIndexInside:t,dataIndex:n.getData().getRawIndex(t)})})))}})),{payloadBatch:o,snapToValue:e}}(n,t),s=a.payloadBatch,u=a.snapToValue;s[0]&&null==e.seriesIndex&&ut(e,s[0]),!r&&t.snap&&o.containData(u)&&null!=u&&(n=u),i.showPointer(t,n,s),i.showTooltip(t,a,u)}else i.showPointer(t,n)}function vD(t,n,i,r){t[n.key]={value:i,payloadBatch:r}}function dD(t,n,i,r){var e=i.payloadBatch,o=n.axis,a=o.model,s=n.axisPointerModel;if(n.triggerTooltip&&e.length){var u=n.coordSys.model,l=wS(u),h=t.map[l];h||(h=t.map[l]={coordSysId:u.id,coordSysIndex:u.componentIndex,coordSysType:u.type,coordSysMainType:u.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:e.slice()})}}function pD(t){var n=t.axis.model,i={},r=i.axisDim=t.axis.dim;return i.axisIndex=i[r+"AxisIndex"]=n.componentIndex,i.axisName=i[r+"AxisName"]=n.name,i.axisId=i[r+"AxisId"]=n.id,i}function mD(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function yD(t){MS.registerAxisPointerClass("CartesianAxisPointer",KO),t.registerComponentModel(nD),t.registerComponentView(uD),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var n=t.axisPointer.link;n&&!wt(n)&&(t.axisPointer.link=[n])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,n){t.getComponent("axisPointer").coordSysAxesInfo=function(t,n){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,n,i){var r=n.getComponent("tooltip"),e=n.getComponent("axisPointer"),o=e.get("link",!0)||[],a=[];vt(i.getCoordinateSystems(),(function(i){if(i.axisPointerEnabled){var s=wS(i.model),u=t.coordSysAxesInfo[s]={};t.coordSysMap[s]=i;var l=i.model.getModel("tooltip",r);if(vt(i.getAxes(),bt(v,!1,null)),i.getTooltipAxes&&r&&l.get("show")){var h="axis"===l.get("trigger"),f="cross"===l.get(["axisPointer","type"]),c=i.getTooltipAxes(l.get(["axisPointer","axis"]));(h||f)&&vt(c.baseAxes,bt(v,!f||"cross",h)),f&&vt(c.otherAxes,bt(v,"cross",!1))}}function v(r,s,h){var f=h.model.getModel("axisPointer",e),c=f.get("show");if(c&&("auto"!==c||r||bS(f))){null==s&&(s=f.get("triggerTooltip"));var v=(f=r?function(t,n,i,r,e,o){var a=n.getModel("axisPointer"),s={};vt(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(t){s[t]=ot(a.get(t))})),s.snap="category"!==t.type&&!!o,"cross"===a.get("type")&&(s.type="line");var u=s.label||(s.label={});if(null==u.show&&(u.show=!1),"cross"===e){var l=a.get(["label","show"]);if(u.show=null==l||l,!o){var h=s.lineStyle=a.get("crossStyle");h&<(u,h.textStyle)}}return t.model.getModel("axisPointer",new qh(s,i,r))}(h,l,e,n,r,s):f).get("snap"),d=wS(h.model),p=s||v||"category"===h.type,m=t.axesInfo[d]={key:d,axis:h,coordSys:i,axisPointerModel:f,triggerTooltip:s,involveSeries:p,snap:v,useHandle:bS(f),seriesModels:[],linkGroup:null};u[d]=m,t.seriesInvolved=t.seriesInvolved||p;var y=function(t,n){for(var i=n.model,r=n.dim,e=0;e<t.length;e++){var o=t[e]||{};if(mS(o[r+"AxisId"],i.id)||mS(o[r+"AxisIndex"],i.componentIndex)||mS(o[r+"AxisName"],i.name))return e}}(o,h);if(null!=y){var g=a[y]||(a[y]={axesInfo:{}});g.axesInfo[d]=m,g.mapper=o[y].mapper,m.linkGroup=g}}}}))}(i,t,n),i.seriesInvolved&&function(t,n){n.eachSeries((function(n){var i=n.coordinateSystem,r=n.get(["tooltip","trigger"],!0),e=n.get(["tooltip","show"],!0);i&&"none"!==r&&!1!==r&&"item"!==r&&!1!==e&&!1!==n.get(["axisPointer","show"],!0)&&vt(t.coordSysAxesInfo[wS(i.model)],(function(t){var r=t.axis;i.getAxis(r.dim)===r&&(t.seriesModels.push(n),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=n.getData().count())}))}))}(i,t),i}(t,n)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},fD)}var gD=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return E(n,t),n.prototype.makeElOption=function(t,n,i,r,e){var o=i.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a=o.polar,s=a.getOtherAxis(o).getExtent(),u=o.dataToCoord(n),l=r.get("type");if(l&&"none"!==l){var h=HO(r),f=bD[l](o,a,u,s);f.style=h,t.graphicKey=f.type,t.pointer=f}var c=function(t,n,i,r,e){var o=n.axis,a=o.dataToCoord(t),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var u,l,h,f=r.getRadiusAxis().getExtent();if("radius"===o.dim){var c=[1,0,0,1,0,0];Gr(c,c,s),Xr(c,c,[r.cx,r.cy]),u=lh([a,-e],c);var v=n.getModel("axisLabel").get("rotate")||0,d=hS.innerTextLayout(s,v*Math.PI/180,-1);l=d.textAlign,h=d.textVerticalAlign}else{var p=f[1];u=r.coordToPoint([p+e,a]);var m=r.cx,y=r.cy;l=Math.abs(u[0]-m)/p<.3?"center":u[0]>m?"left":"right",h=Math.abs(u[1]-y)/p<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:l,verticalAlign:h}}(n,i,0,a,r.get(["label","margin"]));YO(t,i,r,e,c)},n}(FO),bD={line:function(t,n,i,r){return"angle"===t.dim?{type:"Line",shape:ZO(n.coordToPoint([r[0],i]),n.coordToPoint([r[1],i]))}:{type:"Circle",shape:{cx:n.cx,cy:n.cy,r:i}}},shadow:function(t,n,i,r){var e=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:$O(n.cx,n.cy,r[0],r[1],(-i-e/2)*o,(e/2-i)*o)}:{type:"Sector",shape:$O(n.cx,n.cy,i-e/2,i+e/2,0,2*Math.PI)}}},wD=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.findAxisModel=function(t){var n;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(n=t)}),this),n},n.type="polar",n.dependencies=["radiusAxis","angleAxis"],n.defaultOption={z:0,center:["50%","50%"],radius:"80%"},n}(Jf),xD=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return E(n,t),n.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",xo).models[0]},n.type="polarAxis",n}(Jf);ft(xD,tb);var MD=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.type="angleAxis",n}(xD),SD=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.type="radiusAxis",n}(xD),kD=function(t){function n(n,i){return t.call(this,"radius",n,i)||this}return E(n,t),n.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)["radius"===this.dim?0:1]},n}(xb);kD.prototype.dataToRadius=xb.prototype.dataToCoord,kD.prototype.radiusToData=xb.prototype.coordToData;var AD=yo(),ND=function(t){function n(n,i){return t.call(this,"angle",n,i||[0,360])||this}return E(n,t),n.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)["radius"===this.dim?0:1]},n.prototype.calculateCategoryInterval=function(){var t=this,n=t.getLabelModel(),i=t.scale,r=i.getExtent(),e=i.count();if(r[1]-r[0]<1)return 0;var o=r[0],a=t.dataToCoord(o+1)-t.dataToCoord(o),s=Math.abs(a),u=ye(null==o?"":o+"",n.getFont(),"center","top"),l=Math.max(u.height,7)/s;isNaN(l)&&(l=1/0);var h=Math.max(0,Math.floor(l)),f=AD(t.model),c=f.lastAutoInterval,v=f.lastTickCount;return null!=c&&null!=v&&Math.abs(c-h)<=1&&Math.abs(v-e)<=1&&c>h?h=c:(f.lastTickCount=e,f.lastAutoInterval=h),h},n}(xb);ND.prototype.dataToAngle=xb.prototype.dataToCoord,ND.prototype.angleToData=xb.prototype.coordToData;var CD=["radius","angle"],TD=function(){function t(t){this.dimensions=CD,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new kD,this._angleAxis=new ND,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var n=this.pointToCoord(t);return this._radiusAxis.contain(n[0])&&this._angleAxis.contain(n[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var n=[],i=this._angleAxis,r=this._radiusAxis;return i.scale.type===t&&n.push(i),r.scale.type===t&&n.push(r),n},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var n=this._angleAxis;return t===n?this._radiusAxis:n},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var n=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[n],otherAxes:[this.getOtherAxis(n)]}},t.prototype.dataToPoint=function(t,n){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],n),this._angleAxis.dataToAngle(t[1],n)])},t.prototype.pointToData=function(t,n){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],n),this._angleAxis.angleToData(i[1],n)]},t.prototype.pointToCoord=function(t){var n=t[0]-this.cx,i=t[1]-this.cy,r=this.getAngleAxis(),e=r.getExtent(),o=Math.min(e[0],e[1]),a=Math.max(e[0],e[1]);r.inverse?o=a-360:a=o+360;var s=Math.sqrt(n*n+i*i);n/=s,i/=s;for(var u=Math.atan2(-i,n)/Math.PI*180,l=u<o?1:-1;u<o||u>a;)u+=360*l;return[s,u]},t.prototype.coordToPoint=function(t){var n=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*n+this.cx,-Math.sin(i)*n+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),n=this.getRadiusAxis().getExtent().slice();n[0]>n[1]&&n.reverse();var i=t.getExtent(),r=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*r,endAngle:-i[1]*r,clockwise:t.inverse,contain:function(t,n){var i=t-this.cx,r=n-this.cy,e=i*i+r*r-1e-4,o=this.r,a=this.r0;return e<=o*o&&e>=a*a}}},t.prototype.convertToPixel=function(t,n,i){return zD(n)===this?this.dataToPoint(i):null},t.prototype.convertFromPixel=function(t,n,i){return zD(n)===this?this.pointToData(i):null},t}();function zD(t){var n=t.seriesModel,i=t.polarModel;return i&&i.coordinateSystem||n&&n.coordinateSystem}function ID(t){var n=this,i=n.getAngleAxis(),r=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===n){var e=t.getData();vt(Qg(e,"radius"),(function(t){r.scale.unionExtentFromData(e,t)})),vt(Qg(e,"angle"),(function(t){i.scale.unionExtentFromData(e,t)}))}})),Gg(i.scale,i.model),Gg(r.scale,r.model),"category"===i.type&&!i.onBand){var e=i.getExtent(),o=360/i.scale.count();i.inverse?e[1]+=o:e[1]-=o,i.setExtent(e[0],e[1])}}function LD(t,n){if(t.type=n.get("type"),t.scale=Ug(n),t.onBand=n.get("boundaryGap")&&"category"===t.type,t.inverse=n.get("inverse"),function(t){return"angleAxis"===t.mainType}(n)){t.inverse=t.inverse!==n.get("clockwise");var i=n.get("startAngle");t.setExtent(i,i+(t.inverse?-360:360))}n.axis=t,t.model=n}var OD={dimensions:CD,create:function(t,n){var i=[];return t.eachComponent("polar",(function(t,r){var e=new TD(r+"");e.update=ID;var o=e.getRadiusAxis(),a=e.getAngleAxis(),s=t.findAxisModel("radiusAxis"),u=t.findAxisModel("angleAxis");LD(o,s),LD(a,u),function(t,n,i){var r=n.get("center"),e=i.getWidth(),o=i.getHeight();t.cx=Fe(r[0],e),t.cy=Fe(r[1],o);var a=t.getRadiusAxis(),s=Math.min(e,o)/2,u=n.get("radius");null==u?u=[0,"100%"]:wt(u)||(u=[0,u]);var l=[Fe(u[0],s),Fe(u[1],s)];a.inverse?a.setExtent(l[1],l[0]):a.setExtent(l[0],l[1])}(e,t,n),i.push(e),t.coordinateSystem=e,e.model=t})),t.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var n=t.getReferringComponents("polar",xo).models[0];t.coordinateSystem=n.coordinateSystem}})),i}},DD=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function RD(t,n,i){n[1]>n[0]&&(n=n.slice().reverse());var r=t.coordToPoint([n[0],i]),e=t.coordToPoint([n[1],i]);return{x1:r[0],y1:r[1],x2:e[0],y2:e[1]}}function _D(t){return t.getRadiusAxis().inverse?0:1}function BD(t){var n=t[0],i=t[t.length-1];n&&i&&Math.abs(Math.abs(n.coord-i.coord)-360)<1e-4&&t.pop()}var FD=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.axisPointerClass="PolarAxisPointer",i}return E(n,t),n.prototype.render=function(t){if(this.group.removeAll(),t.get("show")){var n=t.axis,i=n.polar,r=i.getRadiusAxis().getExtent(),e=n.getTicksCoords(),o=n.getMinorTicksCoords(),a=dt(n.getViewLabels(),(function(t){t=ot(t);var i=n.scale,r="ordinal"===i.type?i.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(r),t}));BD(a),BD(e),vt(DD,(function(s){!t.get([s,"show"])||n.scale.isBlank()&&"axisLine"!==s||ED[s](this.group,t,i,e,o,r,a)}),this)}},n.type="angleAxis",n}(MS),ED={axisLine:function(t,n,i,r,e,o){var a,s=n.getModel(["axisLine","lineStyle"]),u=_D(i),l=u?0:1;(a=0===o[l]?new Ku({shape:{cx:i.cx,cy:i.cy,r:o[u]},style:s.getLineStyle(),z2:1,silent:!0}):new pl({shape:{cx:i.cx,cy:i.cy,r:o[u],r0:o[l]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,n,i,r,e,o){var a=n.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),u=o[_D(i)],l=dt(r,(function(t){return new Sl({shape:RD(i,[u,u+s],t.coord)})}));t.add(oh(l,{style:lt(a.getModel("lineStyle").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,n,i,r,e,o){if(e.length){for(var a=n.getModel("axisTick"),s=n.getModel("minorTick"),u=(a.get("inside")?-1:1)*s.get("length"),l=o[_D(i)],h=[],f=0;f<e.length;f++)for(var c=0;c<e[f].length;c++)h.push(new Sl({shape:RD(i,[l,l+u],e[f][c].coord)}));t.add(oh(h,{style:lt(s.getModel("lineStyle").getLineStyle(),lt(a.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(t,n,i,r,e,o,a){var s=n.getCategories(!0),u=n.getModel("axisLabel"),l=u.get("margin"),h=n.get("triggerEvent");vt(a,(function(r){var e=u,a=r.tickValue,f=o[_D(i)],c=i.coordToPoint([f+l,r.coord]),v=i.cx,d=i.cy,p=Math.abs(c[0]-v)/f<.3?"center":c[0]>v?"left":"right",m=Math.abs(c[1]-d)/f<.3?"middle":c[1]>d?"top":"bottom";if(s&&s[a]){var y=s[a];At(y)&&y.textStyle&&(e=new qh(y.textStyle,u,u.ecModel))}var g=new Ss({silent:hS.isLabelSilent(n),style:Ch(e,{x:c[0],y:c[1],fill:e.getTextColor()||n.get(["axisLine","lineStyle","color"]),text:r.formattedLabel,align:p,verticalAlign:m})});if(t.add(g),h){var b=hS.makeAxisEventDataBase(n);b.targetType="axisLabel",b.value=r.rawLabel,Bs(g).eventData=b}}),this)},splitLine:function(t,n,i,r,e,o){var a=n.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),u=0;s=s instanceof Array?s:[s];for(var l=[],h=0;h<r.length;h++){var f=u++%s.length;l[f]=l[f]||[],l[f].push(new Sl({shape:RD(i,o,r[h].coord)}))}for(h=0;h<l.length;h++)t.add(oh(l[h],{style:lt({stroke:s[h%s.length]},a.getLineStyle()),silent:!0,z:n.get("z")}))},minorSplitLine:function(t,n,i,r,e,o){if(e.length){for(var a=n.getModel("minorSplitLine").getModel("lineStyle"),s=[],u=0;u<e.length;u++)for(var l=0;l<e[u].length;l++)s.push(new Sl({shape:RD(i,o,e[u][l].coord)}));t.add(oh(s,{style:a.getLineStyle(),silent:!0,z:n.get("z")}))}},splitArea:function(t,n,i,r,e,o){if(r.length){var a=n.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),u=0;s=s instanceof Array?s:[s];for(var l=[],h=Math.PI/180,f=-r[0].coord*h,c=Math.min(o[0],o[1]),v=Math.max(o[0],o[1]),d=n.get("clockwise"),p=1,m=r.length;p<=m;p++){var y=p===m?r[0].coord:r[p].coord,g=u++%s.length;l[g]=l[g]||[],l[g].push(new vl({shape:{cx:i.cx,cy:i.cy,r0:c,r:v,startAngle:f,endAngle:-y*h,clockwise:d},silent:!0})),f=-y*h}for(p=0;p<l.length;p++)t.add(oh(l[p],{style:lt({fill:s[p%s.length]},a.getAreaStyle()),silent:!0}))}}},PD=["axisLine","axisTickLabel","axisName"],WD=["splitLine","splitArea","minorSplitLine"],VD=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.axisPointerClass="PolarAxisPointer",i}return E(n,t),n.prototype.render=function(t){if(this.group.removeAll(),t.get("show")){var n=this._axisGroup,i=this._axisGroup=new Oe;this.group.add(i);var r=t.axis,e=r.polar,o=e.getAngleAxis(),a=r.getTicksCoords(),s=r.getMinorTicksCoords(),u=o.getExtent()[0],l=r.getExtent(),h=function(t,n,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:n.getModel("axisLabel").get("rotate"),z2:1}}(e,t,u),f=new hS(t,h);vt(PD,f.add,f),i.add(f.getGroup()),ch(n,i,t),vt(WD,(function(n){t.get([n,"show"])&&!r.scale.isBlank()&&jD[n](this.group,t,e,u,l,a,s)}),this)}},n.type="radiusAxis",n}(MS),jD={splitLine:function(t,n,i,r,e,o){var a=n.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),u=0;s=s instanceof Array?s:[s];for(var l=[],h=0;h<o.length;h++){var f=u++%s.length;l[f]=l[f]||[],l[f].push(new Ku({shape:{cx:i.cx,cy:i.cy,r:Math.max(o[h].coord,0)}}))}for(h=0;h<l.length;h++)t.add(oh(l[h],{style:lt({stroke:s[h%s.length],fill:null},a.getLineStyle()),silent:!0}))},minorSplitLine:function(t,n,i,r,e,o,a){if(a.length){for(var s=n.getModel("minorSplitLine").getModel("lineStyle"),u=[],l=0;l<a.length;l++)for(var h=0;h<a[l].length;h++)u.push(new Ku({shape:{cx:i.cx,cy:i.cy,r:a[l][h].coord}}));t.add(oh(u,{style:lt({fill:null},s.getLineStyle()),silent:!0}))}},splitArea:function(t,n,i,r,e,o){if(o.length){var a=n.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),u=0;s=s instanceof Array?s:[s];for(var l=[],h=o[0].coord,f=1;f<o.length;f++){var c=u++%s.length;l[c]=l[c]||[],l[c].push(new vl({shape:{cx:i.cx,cy:i.cy,r0:h,r:o[f].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),h=o[f].coord}for(f=0;f<l.length;f++)t.add(oh(l[f],{style:lt({fill:s[f%s.length]},a.getAreaStyle()),silent:!0}))}}};function HD(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function YD(t,n){return n.dim+t.model.componentIndex}function XD(t,n){var i={},r=function(t){var n={};vt(t,(function(t){var i=t.getData(),r=t.coordinateSystem,e=r.getBaseAxis(),o=YD(r,e),a=e.getExtent(),s="category"===e.type?e.getBandWidth():Math.abs(a[1]-a[0])/i.count(),u=n[o]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},l=u.stacks;n[o]=u;var h=HD(t);l[h]||u.autoWidthCount++,l[h]=l[h]||{width:0,maxWidth:0};var f=Fe(t.get("barWidth"),s),c=Fe(t.get("barMaxWidth"),s),v=t.get("barGap"),d=t.get("barCategoryGap");f&&!l[h].width&&(f=Math.min(u.remainedWidth,f),l[h].width=f,u.remainedWidth-=f),c&&(l[h].maxWidth=c),null!=v&&(u.gap=v),null!=d&&(u.categoryGap=d)}));var i={};return vt(n,(function(t,n){i[n]={};var r=t.stacks,e=Fe(t.categoryGap,t.bandWidth),o=Fe(t.gap,1),a=t.remainedWidth,s=t.autoWidthCount,u=(a-e)/(s+(s-1)*o);u=Math.max(u,0),vt(r,(function(t){var n=t.maxWidth;n&&n<u&&(n=Math.min(n,a),t.width&&(n=Math.min(n,t.width)),a-=n,t.width=n,s--)})),u=(a-e)/(s+(s-1)*o),u=Math.max(u,0);var l,h=0;vt(r,(function(t){t.width||(t.width=u),l=t,h+=t.width*(1+o)})),l&&(h-=l.width*o);var f=-h/2;vt(r,(function(t,r){i[n][r]=i[n][r]||{offset:f,width:t.width},f+=t.width*(1+o)}))})),i}(mt(n.getSeriesByType(t),(function(t){return!n.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type})));n.eachSeriesByType(t,(function(t){if("polar"===t.coordinateSystem.type){var n=t.getData(),e=t.coordinateSystem,o=e.getBaseAxis(),a=YD(e,o),s=HD(t),u=r[a][s],l=u.offset,h=u.width,f=e.getOtherAxis(o),c=t.coordinateSystem.cx,v=t.coordinateSystem.cy,d=t.get("barMinHeight")||0,p=t.get("barMinAngle")||0;i[s]=i[s]||[];for(var m=n.mapDimension(f.dim),y=n.mapDimension(o.dim),g=Uy(n,m),b="radius"!==o.dim||!t.get("roundCap",!0),w=f.dataToCoord(0),x=0,M=n.count();x<M;x++){var S=n.get(m,x),k=n.get(y,x),A=S>=0?"p":"n",N=w;g&&(i[s][k]||(i[s][k]={p:w,n:w}),N=i[s][k][A]);var C=void 0,T=void 0,z=void 0,I=void 0;if("radius"===f.dim){var L=f.dataToCoord(S)-w,O=o.dataToCoord(k);Math.abs(L)<d&&(L=(L<0?-1:1)*d),C=N,T=N+L,I=(z=O-l)-h,g&&(i[s][k][A]=T)}else{var D=f.dataToCoord(S,b)-w,R=o.dataToCoord(k);Math.abs(D)<p&&(D=(D<0?-1:1)*p),T=(C=R+l)+h,z=N,I=N+D,g&&(i[s][k][A]=I)}n.setItemLayout(x,{cx:c,cy:v,r0:C,r:T,startAngle:-z*Math.PI/180,endAngle:-I*Math.PI/180,clockwise:z>=I})}}}))}var GD={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},UD={splitNumber:5},ZD=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.type="polar",n}(Nd);function qD(t,n){n=n||{};var i=t.axis,r={},e=i.position,o=i.orient,a=t.coordinateSystem.getRect(),s=[a.x,a.x+a.width,a.y,a.y+a.height],u={horizontal:{top:s[2],bottom:s[3]},vertical:{left:s[0],right:s[1]}};r.position=["vertical"===o?u.vertical[e]:s[0],"horizontal"===o?u.horizontal[e]:s[3]],r.rotation=Math.PI/2*{horizontal:0,vertical:1}[o],r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,right:1,left:-1}[e],t.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),Lt(n.labelInside,t.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);var l=n.rotate;return null==l&&(l=t.get(["axisLabel","rotate"])),r.labelRotation="top"===e?-l:l,r.z2=1,r}var $D=["axisLine","axisTickLabel","axisName"],KD=["splitArea","splitLine"],JD=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.axisPointerClass="SingleAxisPointer",i}return E(n,t),n.prototype.render=function(n,i,r,e){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new Oe;var s=qD(n),u=new hS(n,s);vt($D,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),vt(KD,(function(t){n.get([t,"show"])&&QD[t](this,this.group,this._axisGroup,n)}),this),ch(a,this._axisGroup,n),t.prototype.render.call(this,n,i,r,e)},n.prototype.remove=function(){AS(this)},n.type="singleAxis",n}(MS),QD={splitLine:function(t,n,i,r){var e=r.axis;if(!e.scale.isBlank()){var o=r.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var u=r.coordinateSystem.getRect(),l=e.isHorizontal(),h=[],f=0,c=e.getTicksCoords({tickModel:o}),v=[],d=[],p=0;p<c.length;++p){var m=e.toGlobalCoord(c[p].coord);l?(v[0]=m,v[1]=u.y,d[0]=m,d[1]=u.y+u.height):(v[0]=u.x,v[1]=m,d[0]=u.x+u.width,d[1]=m);var y=f++%s.length;h[y]=h[y]||[],h[y].push(new Sl({subPixelOptimize:!0,shape:{x1:v[0],y1:v[1],x2:d[0],y2:d[1]},silent:!0}))}var g=a.getLineStyle(["color"]);for(p=0;p<h.length;++p)n.add(oh(h[p],{style:lt({stroke:s[p%s.length]},g),silent:!0}))}},splitArea:function(t,n,i,r){kS(t,i,r,r)}},tR=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.getCoordSysModel=function(){return this},n.type="singleAxis",n.layoutMode="box",n.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},n}(Jf);ft(tR,tb.prototype);var nR=function(t){function n(n,i,r,e,o){var a=t.call(this,n,i,r)||this;return a.type=e||"value",a.position=o||"bottom",a}return E(n,t),n.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},n.prototype.pointToData=function(t){return this.coordinateSystem.pointToData(t)[0]},n}(xb),iR=["single"],rR=function(){function t(t,n,i){this.type="single",this.dimension="single",this.dimensions=iR,this.axisPointerEnabled=!0,this.model=t,this._init(t,n,i)}return t.prototype._init=function(t){var n=new nR(this.dimension,Ug(t),[0,0],t.get("type"),t.get("position"));n.onBand="category"===n.type&&t.get("boundaryGap"),n.inverse=t.get("inverse"),n.orient=t.get("orient"),t.axis=n,n.model=t,n.coordinateSystem=this,this._axis=n},t.prototype.update=function(t){t.eachSeries((function(t){if(t.coordinateSystem===this){var n=t.getData();vt(n.mapDimensionsAll(this.dimension),(function(t){this._axis.scale.unionExtentFromData(n,t)}),this),Gg(this._axis.scale,this._axis.model)}}),this)},t.prototype.resize=function(t,n){this._rect=Xf({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:n.getWidth(),height:n.getHeight()}),this._adjustAxis()},t.prototype.getRect=function(){return this._rect},t.prototype._adjustAxis=function(){var t=this._rect,n=this._axis,i=n.isHorizontal(),r=i?[0,t.width]:[0,t.height],e=n.reverse?1:0;n.setExtent(r[e],r[1-e]),this._updateAxisTransform(n,i?t.x:t.y)},t.prototype._updateAxisTransform=function(t,n){var i=t.getExtent(),r=i[0]+i[1],e=t.isHorizontal();t.toGlobalCoord=e?function(t){return t+n}:function(t){return r-t+n},t.toLocalCoord=e?function(t){return t-n}:function(t){return r-t+n}},t.prototype.getAxis=function(){return this._axis},t.prototype.getBaseAxis=function(){return this._axis},t.prototype.getAxes=function(){return[this._axis]},t.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},t.prototype.containPoint=function(t){var n=this.getRect(),i=this.getAxis();return"horizontal"===i.orient?i.contain(i.toLocalCoord(t[0]))&&t[1]>=n.y&&t[1]<=n.y+n.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=n.y&&t[0]<=n.y+n.height},t.prototype.pointToData=function(t){var n=this.getAxis();return[n.coordToData(n.toLocalCoord(t["horizontal"===n.orient?0:1]))]},t.prototype.dataToPoint=function(t){var n=this.getAxis(),i=this.getRect(),r=[],e="horizontal"===n.orient?0:1;return t instanceof Array&&(t=t[0]),r[e]=n.toGlobalCoord(n.dataToCoord(+t)),r[1-e]=0===e?i.y+i.height/2:i.x+i.width/2,r},t.prototype.convertToPixel=function(t,n,i){return eR(n)===this?this.dataToPoint(i):null},t.prototype.convertFromPixel=function(t,n,i){return eR(n)===this?this.pointToData(i):null},t}();function eR(t){var n=t.seriesModel,i=t.singleAxisModel;return i&&i.coordinateSystem||n&&n.coordinateSystem}var oR={create:function(t,n){var i=[];return t.eachComponent("singleAxis",(function(r,e){var o=new rR(r,t,n);o.name="single_"+e,o.resize(r,n),r.coordinateSystem=o,i.push(o)})),t.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var n=t.getReferringComponents("singleAxis",xo).models[0];t.coordinateSystem=n&&n.coordinateSystem}})),i},dimensions:iR},aR=["x","y"],sR=["width","height"],uR=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return E(n,t),n.prototype.makeElOption=function(t,n,i,r,e){var o=i.axis,a=o.coordinateSystem,s=fR(a,1-hR(o)),u=a.dataToPoint(n)[0],l=r.get("type");if(l&&"none"!==l){var h=HO(r),f=lR[l](o,u,s);f.style=h,t.graphicKey=f.type,t.pointer=f}UO(n,t,qD(i),i,r,e)},n.prototype.getHandleTransform=function(t,n,i){var r=qD(n,{labelInside:!1});r.labelMargin=i.get(["handle","margin"]);var e=GO(n.axis,t,r);return{x:e[0],y:e[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},n.prototype.updateHandleTransform=function(t,n,i){var r=i.axis,e=r.coordinateSystem,o=hR(r),a=fR(e,o),s=[t.x,t.y];s[o]+=n[o],s[o]=Math.min(a[1],s[o]),s[o]=Math.max(a[0],s[o]);var u=fR(e,1-o),l=(u[1]+u[0])/2,h=[l,l];return h[o]=s[o],{x:s[0],y:s[1],rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},n}(FO),lR={line:function(t,n,i){return{type:"Line",subPixelOptimize:!0,shape:ZO([n,i[0]],[n,i[1]],hR(t))}},shadow:function(t,n,i){var r=t.getBandWidth();return{type:"Rect",shape:qO([n-r/2,i[0]],[r,i[1]-i[0]],hR(t))}}};function hR(t){return t.isHorizontal()?0:1}function fR(t,n){var i=t.getRect();return[i[aR[n]],i[aR[n]]+i[sR[n]]]}var cR=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.type="single",n}(Nd),vR=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.init=function(n,i,r){var e=qf(n);t.prototype.init.apply(this,arguments),dR(n,e)},n.prototype.mergeOption=function(n){t.prototype.mergeOption.apply(this,arguments),dR(this.option,n)},n.prototype.getCellSize=function(){return this.option.cellSize},n.type="calendar",n.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},n}(Jf);function dR(t,n){var i,r=t.cellSize;1===(i=wt(r)?r:t.cellSize=[r,r]).length&&(i[1]=i[0]);var e=dt([0,1],(function(t){return function(t,n){return null!=t[jf[n][0]]||null!=t[jf[n][1]]&&null!=t[jf[n][2]]}(n,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]}));Zf(t,n,{type:"box",ignoreSize:e})}var pR=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.render=function(t,n){var i=this.group;i.removeAll();var r=t.coordinateSystem,e=r.getRangeInfo(),o=r.getOrient(),a=n.getLocaleModel();this._renderDayRect(t,e,i),this._renderLines(t,e,o,i),this._renderYearText(t,e,o,i),this._renderMonthText(t,a,o,i),this._renderWeekText(t,a,e,o,i)},n.prototype._renderDayRect=function(t,n,i){for(var r=t.coordinateSystem,e=t.getModel("itemStyle").getItemStyle(),o=r.getCellWidth(),a=r.getCellHeight(),s=n.start.time;s<=n.end.time;s=r.getNextNDay(s,1).time){var u=r.dataToRect([s],!1).tl,l=new ws({shape:{x:u[0],y:u[1],width:o,height:a},cursor:"default",style:e});i.add(l)}},n.prototype._renderLines=function(t,n,i,r){var e=this,o=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),u=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var l=n.start,h=0;l.time<=n.end.time;h++){c(l.formatedDate),0===h&&(l=o.getDateInfo(n.start.y+"-"+n.start.m));var f=l.date;f.setMonth(f.getMonth()+1),l=o.getDateInfo(f)}function c(n){e._firstDayOfMonth.push(o.getDateInfo(n)),e._firstDayPoints.push(o.dataToRect([n],!1).tl);var u=e._getLinePointsOfOneWeek(t,n,i);e._tlpoints.push(u[0]),e._blpoints.push(u[u.length-1]),s&&e._drawSplitline(u,a,r)}c(o.getNextNDay(n.end.time,1).formatedDate),s&&this._drawSplitline(e._getEdgesPoints(e._tlpoints,u,i),a,r),s&&this._drawSplitline(e._getEdgesPoints(e._blpoints,u,i),a,r)},n.prototype._getEdgesPoints=function(t,n,i){var r=[t[0].slice(),t[t.length-1].slice()],e="horizontal"===i?0:1;return r[0][e]=r[0][e]-n/2,r[1][e]=r[1][e]+n/2,r},n.prototype._drawSplitline=function(t,n,i){var r=new wl({z2:20,shape:{points:t},style:n});i.add(r)},n.prototype._getLinePointsOfOneWeek=function(t,n,i){for(var r=t.coordinateSystem,e=r.getDateInfo(n),o=[],a=0;a<7;a++){var s=r.getNextNDay(e.time,a),u=r.dataToRect([s.time],!1);o[2*s.day]=u.tl,o[2*s.day+1]=u["horizontal"===i?"bl":"tr"]}return o},n.prototype._formatterLabel=function(t,n){return Mt(t)&&t?(i=t,vt(n,(function(t,n){i=i.replace("{"+n+"}",t)})),i):xt(t)?t(n):n.nameMap;var i},n.prototype._yearTextPositionControl=function(t,n,i,r,e){var o=n[0],a=n[1],s=["center","bottom"];"bottom"===r?(a+=e,s=["center","top"]):"left"===r?o-=e:"right"===r?(o+=e,s=["center","top"]):a-=e;var u=0;return"left"!==r&&"right"!==r||(u=Math.PI/2),{rotation:u,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},n.prototype._renderYearText=function(t,n,i,r){var e=t.getModel("yearLabel");if(e.get("show")){var o=e.get("margin"),a=e.get("position");a||(a="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],u=(s[0][0]+s[1][0])/2,l=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,f={top:[u,s[h][1]],bottom:[u,s[1-h][1]],left:[s[1-h][0],l],right:[s[h][0],l]},c=n.start.y;+n.end.y>+n.start.y&&(c=c+"-"+n.end.y);var v=e.get("formatter"),d=this._formatterLabel(v,{start:n.start.y,end:n.end.y,nameMap:c}),p=new Ss({z2:30,style:Ch(e,{text:d})});p.attr(this._yearTextPositionControl(p,f[a],i,a,o)),r.add(p)}},n.prototype._monthTextPositionControl=function(t,n,i,r,e){var o="left",a="top",s=t[0],u=t[1];return"horizontal"===i?(u+=e,n&&(o="center"),"start"===r&&(a="bottom")):(s+=e,n&&(a="middle"),"start"===r&&(o="right")),{x:s,y:u,align:o,verticalAlign:a}},n.prototype._renderMonthText=function(t,n,i,r){var e=t.getModel("monthLabel");if(e.get("show")){var o=e.get("nameMap"),a=e.get("margin"),s=e.get("position"),u=e.get("align"),l=[this._tlpoints,this._blpoints];o&&!Mt(o)||(o&&(n=ef(o)||n),o=n.get(["time","monthAbbr"])||[]);var h="start"===s?0:1,f="horizontal"===i?0:1;a="start"===s?-a:a;for(var c="center"===u,v=0;v<l[h].length-1;v++){var d=l[h][v].slice(),p=this._firstDayOfMonth[v];c&&(d[f]=(this._firstDayPoints[v][f]+l[0][v+1][f])/2);var m=e.get("formatter"),y=o[+p.m-1],g={yyyy:p.y,yy:(p.y+"").slice(2),MM:p.m,M:+p.m,nameMap:y},b=this._formatterLabel(m,g),w=new Ss({z2:30,style:ut(Ch(e,{text:b}),this._monthTextPositionControl(d,c,i,s,a))});r.add(w)}}},n.prototype._weekTextPositionControl=function(t,n,i,r,e){var o="center",a="middle",s=t[0],u=t[1],l="start"===i;return"horizontal"===n?(s=s+r+(l?1:-1)*e[0]/2,o=l?"right":"left"):(u=u+r+(l?1:-1)*e[1]/2,a=l?"bottom":"top"),{x:s,y:u,align:o,verticalAlign:a}},n.prototype._renderWeekText=function(t,n,i,r,e){var o=t.getModel("dayLabel");if(o.get("show")){var a=t.coordinateSystem,s=o.get("position"),u=o.get("nameMap"),l=o.get("margin"),h=a.getFirstDayOfWeek();u&&!Mt(u)||(u&&(n=ef(u)||n),u=n.get(["time","dayOfWeekShort"])||dt(n.get(["time","dayOfWeekAbbr"]),(function(t){return t[0]})));var f=a.getNextNDay(i.end.time,7-i.lweek).time,c=[a.getCellWidth(),a.getCellHeight()];l=Fe(l,Math.min(c[1],c[0])),"start"===s&&(f=a.getNextNDay(i.start.time,-(7+i.fweek)).time,l=-l);for(var v=0;v<7;v++){var d,p=a.getNextNDay(f,v),m=a.dataToRect([p.time],!1).center;d=Math.abs((v+h)%7);var y=new Ss({z2:30,style:ut(Ch(o,{text:u[d]}),this._weekTextPositionControl(m,r,s,l,c))});e.add(y)}}},n.type="calendar",n}(Nd),mR=function(){function t(n){this.type="calendar",this.dimensions=t.dimensions,this.getDimensionsInfo=t.getDimensionsInfo,this._model=n}return t.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},t.prototype.getRangeInfo=function(){return this._rangeInfo},t.prototype.getModel=function(){return this._model},t.prototype.getRect=function(){return this._rect},t.prototype.getCellWidth=function(){return this._sw},t.prototype.getCellHeight=function(){return this._sh},t.prototype.getOrient=function(){return this._orient},t.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},t.prototype.getDateInfo=function(t){var n=(t=Ge(t)).getFullYear(),i=t.getMonth()+1,r=i<10?"0"+i:""+i,e=t.getDate(),o=e<10?"0"+e:""+e,a=t.getDay();return{y:n+"",m:r,d:o,day:a=Math.abs((a+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:n+"-"+r+"-"+o,date:t}},t.prototype.getNextNDay=function(t,n){return 0===(n=n||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+n),this.getDateInfo(t)},t.prototype.update=function(t,n){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var i=this._rangeInfo.weeks||1,r=["width","height"],e=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),a="horizontal"===this._orient?[i,7]:[7,i];vt([0,1],(function(t){l(e,t)&&(o[r[t]]=e[t]*a[t])}));var s={width:n.getWidth(),height:n.getHeight()},u=this._rect=Xf(o,s);function l(t,n){return null!=t[n]&&"auto"!==t[n]}vt([0,1],(function(t){l(e,t)||(e[t]=u[r[t]]/a[t])})),this._sw=e[0],this._sh=e[1]},t.prototype.dataToPoint=function(t,n){wt(t)&&(t=t[0]),null==n&&(n=!0);var i=this.getDateInfo(t),r=this._rangeInfo;if(n&&!(i.time>=r.start.time&&i.time<r.end.time+864e5))return[NaN,NaN];var e=i.day,o=this._getRangeInfo([r.start.time,i.formatedDate]).nthWeek;return"vertical"===this._orient?[this._rect.x+e*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]:[this._rect.x+o*this._sw+this._sw/2,this._rect.y+e*this._sh+this._sh/2]},t.prototype.pointToData=function(t){var n=this.pointToDate(t);return n&&n.time},t.prototype.dataToRect=function(t,n){var i=this.dataToPoint(t,n);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},t.prototype.pointToDate=function(t){var n=Math.floor((t[0]-this._rect.x)/this._sw)+1,i=Math.floor((t[1]-this._rect.y)/this._sh)+1,r=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(i,n-1,r):this._getDateByWeeksAndDay(n,i-1,r)},t.prototype.convertToPixel=function(t,n,i){var r=yR(n);return r===this?r.dataToPoint(i):null},t.prototype.convertFromPixel=function(t,n,i){var r=yR(n);return r===this?r.pointToData(i):null},t.prototype.containPoint=function(){return console.warn("Not implemented."),!1},t.prototype._initRangeOption=function(){var t,n=this._model.get("range");if(wt(n)&&1===n.length&&(n=n[0]),wt(n))t=n;else{var i=n.toString();if(/^\d{4}$/.test(i)&&(t=[i+"-01-01",i+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(i)){var r=this.getDateInfo(i),e=r.date;e.setMonth(e.getMonth()+1);var o=this.getNextNDay(e,-1);t=[r.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(i)&&(t=[i,i])}if(!t)return n;var a=this._getRangeInfo(t);return a.start.time>a.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var n,i=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];i[0].time>i[1].time&&(n=!0,i.reverse());var r=Math.floor(i[1].time/864e5)-Math.floor(i[0].time/864e5)+1,e=new Date(i[0].time),o=e.getDate(),a=i[1].date.getDate();e.setDate(o+r-1);var s=e.getDate();if(s!==a)for(var u=e.getTime()-i[1].time>0?1:-1;(s=e.getDate())!==a&&(e.getTime()-i[1].time)*u>0;)r-=u,e.setDate(s-u);var l=Math.floor((r+i[0].day+6)/7),h=n?1-l:l-1;return n&&i.reverse(),{range:[i[0].formatedDate,i[1].formatedDate],start:i[0],end:i[1],allDay:r,weeks:l,nthWeek:h,fweek:i[0].day,lweek:i[1].day}},t.prototype._getDateByWeeksAndDay=function(t,n,i){var r=this._getRangeInfo(i);if(t>r.weeks||0===t&&n<r.fweek||t===r.weeks&&n>r.lweek)return null;var e=7*(t-1)-r.fweek+n,o=new Date(r.start.time);return o.setDate(+r.start.d+e),this.getDateInfo(o)},t.create=function(n,i){var r=[];return n.eachComponent("calendar",(function(e){var o=new t(e,n,i);r.push(o),e.coordinateSystem=o})),n.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=r[t.get("calendarIndex")||0])})),r},t.dimensions=["time","value"],t}();function yR(t){var n=t.calendarModel,i=t.seriesModel;return n?n.coordinateSystem:i?i.coordinateSystem:null}function gR(t,n){var i;return vt(n,(function(n){null!=t[n]&&"auto"!==t[n]&&(i=!0)})),i}var bR=["transition","enterFrom","leaveTo"],wR=bR.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function xR(t,n,i){if(i&&(!t[i]&&n[i]&&(t[i]={}),t=t[i],n=n[i]),t&&n)for(var r=i?bR:wR,e=0;e<r.length;e++){var o=r[e];null==t[o]&&null!=n[o]&&(t[o]=n[o])}}var MR=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.preventAutoZ=!0,i}return E(n,t),n.prototype.mergeOption=function(n,i){var r=this.option.elements;this.option.elements=null,t.prototype.mergeOption.call(this,n,i),this.option.elements=r},n.prototype.optionUpdated=function(t,n){var i=this.option,r=(n?i:t).elements,e=i.elements=n?[]:i.elements,o=[];this._flatten(r,o,null);var a=lo(e,o,"normalMerge"),s=this._elOptionsToUpdate=[];vt(a,(function(t,n){var i=t.newOption;i&&(s.push(i),function(t,n){var i=t.existing;if(n.id=t.keyInfo.id,!n.type&&i&&(n.type=i.type),null==n.parentId){var r=n.parentOption;r?n.parentId=r.id:i&&(n.parentId=i.parentId)}n.parentOption=null}(t,i),function(t,n,i){var r=ut({},i),e=t[n],o=i.$action||"merge";"merge"===o?e?(at(e,r,!0),Zf(e,r,{ignoreSize:!0}),$f(i,e),xR(i,e),xR(i,e,"shape"),xR(i,e,"style"),xR(i,e,"extra"),i.clipPath=e.clipPath):t[n]=r:"replace"===o?t[n]=r:"remove"===o&&e&&(t[n]=null)}(e,n,i),function(t,n){if(t&&(t.hv=n.hv=[gR(n,["left","right"]),gR(n,["top","bottom"])],"group"===t.type)){var i=t,r=n;null==i.width&&(i.width=r.width=0),null==i.height&&(i.height=r.height=0)}}(e[n],i))}),this),i.elements=mt(e,(function(t){return t&&delete t.$action,null!=t}))},n.prototype._flatten=function(t,n,i){vt(t,(function(t){if(t){i&&(t.parentOption=i),n.push(t);var r=t.children;"group"===t.type&&r&&this._flatten(r,n,t),delete t.children}}),this)},n.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},n.type="graphic",n.defaultOption={elements:[]},n}(Jf),SR={path:null,compoundPath:null,group:Oe,image:vs,text:Ss},kR=yo(),AR=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.init=function(){this._elMap=Vt()},n.prototype.render=function(t,n,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},n.prototype._updateElements=function(t){var n=t.useElOptionsToUpdate();if(n){var i=this._elMap,r=this.group,e=t.get("z"),o=t.get("zlevel");vt(n,(function(n){var a=co(n.id,null),s=null!=a?i.get(a):null,u=co(n.parentId,null),l=null!=u?i.get(u):r,h=n.type,f=n.style;"text"===h&&f&&n.hv&&n.hv[1]&&(f.textVerticalAlign=f.textBaseline=f.verticalAlign=f.align=null);var c=n.textContent,v=n.textConfig;if(f&&PL(f,h,!!v,!!c)){var d=WL(f,h,!0);!v&&d.textConfig&&(v=n.textConfig=d.textConfig),!c&&d.textContent&&(c=d.textContent)}var p=function(t){return t=ut({},t),vt(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(Vf),(function(n){delete t[n]})),t}(n),m=n.$action||"merge",y="merge"===m,g="replace"===m;if(y){var b=s;(N=!s)?b=CR(a,l,n.type,i):(b&&(kR(b).isNew=!1),sO(b)),b&&(qL(b,p,t,{isInit:N}),zR(b,n,e,o))}else if(g){TR(s,n,i,t);var w=CR(a,l,n.type,i);w&&(qL(w,p,t,{isInit:!0}),zR(w,n,e,o))}else"remove"===m&&($L(s,n),TR(s,n,i,t));var x=i.get(a);if(x&&c)if(y){var M=x.getTextContent();M?M.attr(c):x.setTextContent(new Ss(c))}else g&&x.setTextContent(new Ss(c));if(x){var S=n.clipPath;if(S){var k=S.type,A=void 0,N=!1;if(y){var C=x.getClipPath();A=(N=!C||kR(C).type!==k)?NR(k):C}else g&&(N=!0,A=NR(k));x.setClipPath(A),qL(A,S,t,{isInit:N}),uO(A,S.keyframeAnimation,t)}var T=kR(x);x.setTextConfig(v),T.option=n,function(t,n,i){var r=Bs(t).eventData;t.silent||t.ignore||r||(r=Bs(t).eventData={componentType:"graphic",componentIndex:n.componentIndex,name:t.name}),r&&(r.info=i.info)}(x,t,n),gh({el:x,componentModel:t,itemName:x.name,itemTooltipOption:n.tooltip}),uO(x,n.keyframeAnimation,t)}}))}},n.prototype._relocate=function(t,n){for(var i=t.option.elements,r=this.group,e=this._elMap,o=n.getWidth(),a=n.getHeight(),s=["x","y"],u=0;u<i.length;u++)if((d=null!=(v=co((c=i[u]).id,null))?e.get(v):null)&&d.isGroup){var l=(p=d.parent)===r,h=kR(d),f=kR(p);h.width=Fe(h.option.width,l?o:f.width)||0,h.height=Fe(h.option.height,l?a:f.height)||0}for(u=i.length-1;u>=0;u--){var c,v,d;if(d=null!=(v=co((c=i[u]).id,null))?e.get(v):null){f=kR(p=d.parent);var p,m={},y=Gf(d,c,p===r?{width:o,height:a}:{width:f.width,height:f.height},null,{hv:c.hv,boundingMode:c.bounding},m);if(!kR(d).isNew&&y){for(var g=c.transition,b={},w=0;w<s.length;w++){var x=s[w],M=m[x];g&&(JL(g)||ht(g,x)>=0)?b[x]=M:d[x]=M}Yl(d,b,t,0)}else d.attr(m)}}},n.prototype._clear=function(){var t=this,n=this._elMap;n.each((function(i){TR(i,kR(i).option,n,t._lastGraphicModel)})),this._elMap=Vt()},n.prototype.dispose=function(){this._clear()},n.type="graphic",n}(Nd);function NR(t){var n=new(Xt(SR,t)?SR[t]:nh(t))({});return kR(n).type=t,n}function CR(t,n,i,r){var e=NR(i);return n.add(e),r.set(t,e),kR(e).id=t,kR(e).isNew=!0,e}function TR(t,n,i,r){t&&t.parent&&("group"===t.type&&t.traverse((function(t){TR(t,n,i,r)})),KL(t,n,r),i.removeKey(kR(t).id))}function zR(t,n,i,r){if(!t.isGroup){var e=t;e.cursor=Ot(n.cursor,aa.prototype.cursor),e.z=Ot(n.z,i||0),e.zlevel=Ot(n.zlevel,r||0);var o=n.z2;null!=o&&(e.z2=o||0)}vt(yt(n),(function(i){var r=n[i];0===i.indexOf("on")&&xt(r)&&(t[i]=r)})),t.draggable=n.draggable,null!=n.name&&(t.name=n.name),null!=n.id&&(t.id=n.id)}var IR=["x","y","radius","angle","single"],LR=["cartesian2d","polar","singleAxis"];function OR(t){return t+"Axis"}function DR(t){var n=t.ecModel,i={infoList:[],infoMap:Vt()};return t.eachTargetAxis((function(t,r){var e=n.getComponent(OR(t),r);if(e){var o=e.getCoordSysModel();if(o){var a=o.uid,s=i.infoMap.get(a);s||(i.infoList.push(s={model:o,axisModels:[]}),i.infoMap.set(a,s)),s.axisModels.push(e)}}})),i}var RR=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}(),_R=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i._autoThrottle=!0,i._noTarget=!0,i._rangePropMode=["percent","percent"],i}return E(n,t),n.prototype.init=function(t,n,i){var r=BR(t);this.settledOption=r,this.mergeDefaultAndTheme(t,i),this._doInit(r)},n.prototype.mergeOption=function(t){var n=BR(t);at(this.option,t,!0),at(this.settledOption,n,!0),this._doInit(n)},n.prototype._doInit=function(t){var n=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var i=this.settledOption;vt([["start","startValue"],["end","endValue"]],(function(t,r){"value"===this._rangePropMode[r]&&(n[t[0]]=i[t[0]]=null)}),this),this._resetTarget()},n.prototype._resetTarget=function(){var t=this.get("orient",!0),n=this._targetAxisInfoMap=Vt();this._fillSpecifiedTargetAxis(n)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},n.prototype._fillSpecifiedTargetAxis=function(t){var n=!1;return vt(IR,(function(i){var r=this.getReferringComponents(OR(i),Mo);if(r.specified){n=!0;var e=new RR;vt(r.models,(function(t){e.add(t.componentIndex)})),t.set(i,e)}}),this),n},n.prototype._fillAutoTargetAxisByOrient=function(t,n){var i=this.ecModel,r=!0;if(r){var e="vertical"===n?"y":"x";o(i.findComponents({mainType:e+"Axis"}),e)}function o(n,i){var e=n[0];if(e){var o=new RR;if(o.add(e.componentIndex),t.set(i,o),r=!1,"x"===i||"y"===i){var a=e.getReferringComponents("grid",xo).models[0];a&&vt(n,(function(t){e.componentIndex!==t.componentIndex&&a===t.getReferringComponents("grid",xo).models[0]&&o.add(t.componentIndex)}))}}}r&&o(i.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===n}}),"single"),r&&vt(IR,(function(n){if(r){var e=i.findComponents({mainType:OR(n),filter:function(t){return"category"===t.get("type",!0)}});if(e[0]){var o=new RR;o.add(e[0].componentIndex),t.set(n,o),r=!1}}}),this)},n.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(n){!t&&(t=n)}),this),"y"===t?"vertical":"horizontal"},n.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},n.prototype._updateRangeUse=function(t){var n=this._rangePropMode,i=this.get("rangeMode");vt([["start","startValue"],["end","endValue"]],(function(r,e){var o=null!=t[r[0]],a=null!=t[r[1]];o&&!a?n[e]="percent":!o&&a?n[e]="value":i?n[e]=i[e]:o&&(n[e]="percent")}))},n.prototype.noTarget=function(){return this._noTarget},n.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(n,i){null==t&&(t=this.ecModel.getComponent(OR(n),i))}),this),t},n.prototype.eachTargetAxis=function(t,n){this._targetAxisInfoMap.each((function(i,r){vt(i.indexList,(function(i){t.call(n,r,i)}))}))},n.prototype.getAxisProxy=function(t,n){var i=this.getAxisModel(t,n);if(i)return i.__dzAxisProxy},n.prototype.getAxisModel=function(t,n){var i=this._targetAxisInfoMap.get(t);if(i&&i.indexMap[n])return this.ecModel.getComponent(OR(t),n)},n.prototype.setRawRange=function(t){var n=this.option,i=this.settledOption;vt([["start","startValue"],["end","endValue"]],(function(r){null==t[r[0]]&&null==t[r[1]]||(n[r[0]]=i[r[0]]=t[r[0]],n[r[1]]=i[r[1]]=t[r[1]])}),this),this._updateRangeUse(t)},n.prototype.setCalculatedRange=function(t){var n=this.option;vt(["start","startValue","end","endValue"],(function(i){n[i]=t[i]}))},n.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},n.prototype.getValueRange=function(t,n){if(null!=t||null!=n)return this.getAxisProxy(t,n).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},n.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),r=0;r<i.length;r++)for(var e=i[r],o=this._targetAxisInfoMap.get(e),a=0;a<o.indexList.length;a++){var s=this.getAxisProxy(e,o.indexList[a]);if(s.hostedBy(this))return s;n||(n=s)}return n},n.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},n.prototype.getOrient=function(){return this._orient},n.type="dataZoom",n.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],n.defaultOption={z:4,filterMode:"filter",start:0,end:100},n}(Jf);function BR(t){var n={};return vt(["start","end","startValue","endValue","throttle"],(function(i){t.hasOwnProperty(i)&&(n[i]=t[i])})),n}var FR=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.type="dataZoom.select",n}(_R),ER=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.render=function(t,n,i){this.dataZoomModel=t,this.ecModel=n,this.api=i},n.type="dataZoom",n}(Nd),PR=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.type="dataZoom.select",n}(ER),WR=vt,VR=Pe,jR=function(){function t(t,n,i,r){this._dimName=t,this._axisIndex=n,this.ecModel=r,this._dataZoomModel=i}return t.prototype.hostedBy=function(t){return this._dataZoomModel===t},t.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},t.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},t.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries((function(n){if(function(t){var n=t.get("coordinateSystem");return ht(LR,n)>=0}(n)){var i=OR(this._dimName),r=n.getReferringComponents(i,xo).models[0];r&&this._axisIndex===r.componentIndex&&t.push(n)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return ot(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var n,i=this._dataExtent,r=this.getAxisModel().axis.scale,e=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];WR(["start","end"],(function(u,l){var h=t[u],f=t[u+"Value"];"percent"===e[l]?(null==h&&(h=o[l]),f=r.parse(Be(h,o,i))):(n=!0,h=Be(f=null==f?i[l]:r.parse(f),i,o)),s[l]=f,a[l]=h})),VR(s),VR(a);var u=this._minMaxSpan;function l(t,n,i,e,o){var a=o?"Span":"ValueSpan";kT(0,t,i,"all",u["min"+a],u["max"+a]);for(var s=0;s<2;s++)n[s]=Be(t[s],i,e,!0),o&&(n[s]=r.parse(n[s]))}return n?l(s,a,i,o,!1):l(a,s,o,i,!0),{valueWindow:s,percentWindow:a}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var n=this.getTargetSeriesModels();this._dataExtent=function(t,n,i){var r=[1/0,-1/0];WR(i,(function(t){!function(t,n,i){n&&vt(Qg(n,i),(function(i){var r=n.getApproximateExtent(i);r[0]<t[0]&&(t[0]=r[0]),r[1]>t[1]&&(t[1]=r[1])}))}(r,t.getData(),n)}));var e=t.getAxisModel(),o=Hg(e.axis.scale,e,r).calculate();return[o.min,o.max]}(this,this._dimName,n),this._updateMinMaxSpan();var i=this.calculateDataWindow(t.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),r=t.get("filterMode"),e=this._valueWindow;"none"!==r&&WR(i,(function(t){var i=t.getData(),o=i.mapDimensionsAll(n);if(o.length){if("weakFilter"===r){var a=i.getStore(),s=dt(o,(function(t){return i.getDimensionIndex(t)}),i);i.filterSelf((function(t){for(var n,i,r,u=0;u<o.length;u++){var l=a.get(s[u],t),h=!isNaN(l),f=l<e[0],c=l>e[1];if(h&&!f&&!c)return!0;h&&(r=!0),f&&(n=!0),c&&(i=!0)}return r&&n&&i}))}else WR(o,(function(n){if("empty"===r)t.setData(i=i.map(n,(function(t){return function(t){return t>=e[0]&&t<=e[1]}(t)?t:NaN})));else{var o={};o[n]=e,i.selectRange(o)}}));WR(o,(function(t){i.setApproximateExtent(e,t)}))}}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},n=this._dataZoomModel,i=this._dataExtent;WR(["min","max"],(function(r){var e=n.get(r+"Span"),o=n.get(r+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?e=Be(i[0]+o,i,[0,100],!0):null!=e&&(o=Be(e,[0,100],i,!0)-i[0]),t[r+"Span"]=e,t[r+"ValueSpan"]=o}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),n=this._percentWindow,i=this._valueWindow;if(n){var r=Ve(i,[0,500]);r=Math.min(r,20);var e=t.axis.scale.rawExtentInfo;0!==n[0]&&e.setDeterminedMinMax("min",+i[0].toFixed(r)),100!==n[1]&&e.setDeterminedMinMax("max",+i[1].toFixed(r)),e.freeze()}},t}(),HR={getTargetSeries:function(t){function n(n){t.eachComponent("dataZoom",(function(i){i.eachTargetAxis((function(r,e){var o=t.getComponent(OR(r),e);n(r,e,o,i)}))}))}n((function(t,n,i){i.__dzAxisProxy=null}));var i=[];n((function(n,r,e,o){e.__dzAxisProxy||(e.__dzAxisProxy=new jR(n,r,o,t),i.push(e.__dzAxisProxy))}));var r=Vt();return vt(i,(function(t){vt(t.getTargetSeriesModels(),(function(t){r.set(t.uid,t)}))})),r},overallReset:function(t,n){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(n,i){t.getAxisProxy(n,i).reset(t)})),t.eachTargetAxis((function(i,r){t.getAxisProxy(i,r).filterData(t,n)}))})),t.eachComponent("dataZoom",(function(t){var n=t.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),r=n.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:r[0],endValue:r[1]})}}))}},YR=!1;function XR(t){YR||(YR=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,HR),function(t){t.registerAction("dataZoom",(function(t,n){vt(function(t,n){var i,r=Vt(),e=[],o=Vt();t.eachComponent({mainType:"dataZoom",query:n},(function(t){o.get(t.uid)||s(t)}));do{i=!1,t.eachComponent("dataZoom",a)}while(i);function a(t){!o.get(t.uid)&&function(t){var n=!1;return t.eachTargetAxis((function(t,i){var e=r.get(t);e&&e[i]&&(n=!0)})),n}(t)&&(s(t),i=!0)}function s(t){o.set(t.uid,!0),e.push(t),t.eachTargetAxis((function(t,n){(r.get(t)||r.set(t,[]))[n]=!0}))}return e}(n,t),(function(n){n.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))}(t),t.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function GR(t){t.registerComponentModel(FR),t.registerComponentView(PR),XR(t)}var UR=function(){},ZR={};function qR(t,n){ZR[t]=n}function $R(t){return ZR[t]}var KR=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var n=this.ecModel;vt(this.option.feature,(function(t,i){var r=$R(i);r&&(r.getDefaultOption&&(r.defaultOption=r.getDefaultOption(n)),at(t,r.defaultOption))}))},n.type="toolbox",n.layoutMode={type:"box",ignoreSize:!0},n.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},n}(Jf);function JR(t,n){var i=If(n.get("padding")),r=n.getItemStyle(["color","opacity"]);return r.fill=n.get("backgroundColor"),new ws({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:n.get("borderRadius")},style:r,silent:!0,z2:-1})}var QR=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return E(n,t),n.prototype.render=function(t,n,i,r){var e=this.group;if(e.removeAll(),t.get("show")){var o=+t.get("itemSize"),a="vertical"===t.get("orient"),s=t.get("feature")||{},u=this._features||(this._features={}),l=[];vt(s,(function(t,n){l.push(n)})),new yy(this._featureNames||[],l).add(h).update(h).remove(bt(h,null)).execute(),this._featureNames=l,function(t,n,i){var r=n.getBoxLayoutParams(),e=n.get("padding"),o={width:i.getWidth(),height:i.getHeight()},a=Xf(r,o,e);Yf(n.get("orient"),t,n.get("itemGap"),a.width,a.height),Gf(t,r,o,e)}(e,t,i),e.add(JR(e.getBoundingRect(),t)),a||e.eachChild((function(t){var n=t.__title,r=t.ensureState("emphasis"),a=r.textConfig||(r.textConfig={}),s=t.getTextContent(),u=s&&s.ensureState("emphasis");if(u&&!xt(u)&&n){var l=u.style||(u.style={}),h=ye(n,Ss.makeFont(l)),f=t.x+e.x,c=!1;t.y+e.y+o+h.height>i.getHeight()&&(a.position="top",c=!0);var v=c?-5-h.height:o+10;f+h.width/2>i.getWidth()?(a.position=["100%",v],l.align="right"):f-h.width/2<0&&(a.position=[0,v],l.align="left")}}))}function h(h,f){var c,v=l[h],d=l[f],p=s[v],m=new qh(p,t,t.ecModel);if(r&&null!=r.newTitle&&r.featureName===v&&(p.title=r.newTitle),v&&!d){if(function(t){return 0===t.indexOf("my")}(v))c={onclick:m.option.onclick,featureName:v};else{var y=$R(v);if(!y)return;c=new y}u[v]=c}else if(!(c=u[d]))return;c.uid=Kh("toolbox-feature"),c.model=m,c.ecModel=n,c.api=i;var g=c instanceof UR;v||!d?!m.get("show")||g&&c.unusable?g&&c.remove&&c.remove(n,i):(function(r,s,u){var l,h,f=r.getModel("iconStyle"),c=r.getModel(["emphasis","iconStyle"]),v=s instanceof UR&&s.getIcons?s.getIcons():r.get("icon"),d=r.get("title")||{};Mt(v)?(l={})[u]=v:l=v,Mt(d)?(h={})[u]=d:h=d;var p=r.iconPaths={};vt(l,(function(u,l){var v=dh(u,{},{x:-o/2,y:-o/2,width:o,height:o});v.setStyle(f.getItemStyle()),v.ensureState("emphasis").style=c.getItemStyle();var d=new Ss({style:{text:h[l],align:c.get("textAlign"),borderRadius:c.get("textBorderRadius"),padding:c.get("textPadding"),fill:null},ignore:!0});v.setTextContent(d),gh({el:v,componentModel:t,itemName:l,formatterParamsExtra:{title:h[l]}}),v.__title=h[l],v.on("mouseover",(function(){var n=c.getItemStyle(),r=a?null==t.get("right")&&"right"!==t.get("left")?"right":"left":null==t.get("bottom")&&"bottom"!==t.get("top")?"bottom":"top";d.setStyle({fill:c.get("textFill")||n.fill||n.stroke||"#000",backgroundColor:c.get("textBackgroundColor")}),v.setTextConfig({position:c.get("textPosition")||r}),d.ignore=!t.get("showTitle"),i.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==r.get(["iconStatus",l])&&i.leaveEmphasis(this),d.hide()})),("emphasis"===r.get(["iconStatus",l])?su:uu)(v),e.add(v),v.on("click",gt(s.onclick,s,n,i,l)),p[l]=v}))}(m,c,v),m.setIconStatus=function(t,n){var i=this.option,r=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=n,r[t]&&("emphasis"===n?su:uu)(r[t])},c instanceof UR&&c.render&&c.render(m,n,i,r)):g&&c.dispose&&c.dispose(n,i)}},n.prototype.updateView=function(t,n,i,r){vt(this._features,(function(t){t instanceof UR&&t.updateView&&t.updateView(t.model,n,i,r)}))},n.prototype.remove=function(t,n){vt(this._features,(function(i){i instanceof UR&&i.remove&&i.remove(t,n)})),this.group.removeAll()},n.prototype.dispose=function(t,n){vt(this._features,(function(i){i instanceof UR&&i.dispose&&i.dispose(t,n)}))},n.type="toolbox",n}(Nd),t_=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return E(n,t),n.prototype.onclick=function(t,n){var i=this.model,r=i.get("name")||t.get("title.0.text")||"echarts",e="svg"===n.getZr().painter.getType(),o=e?"svg":i.get("type",!0)||"png",a=n.getConnectedDataURL({type:o,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),s=W.browser;if(xt(MouseEvent)&&(s.newEdge||!s.ie&&!s.edge)){var u=document.createElement("a");u.download=r+"."+o,u.target="_blank",u.href=a;var l=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});u.dispatchEvent(l)}else if(window.navigator.msSaveOrOpenBlob||e){var h=a.split(","),f=h[0].indexOf("base64")>-1,c=e?decodeURIComponent(h[1]):h[1];f&&(c=window.atob(c));var v=r+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var d=c.length,p=new Uint8Array(d);d--;)p[d]=c.charCodeAt(d);var m=new Blob([p]);window.navigator.msSaveOrOpenBlob(m,v)}else{var y=document.createElement("iframe");document.body.appendChild(y);var g=y.contentWindow,b=g.document;b.open("image/svg+xml","replace"),b.write(c),b.close(),g.focus(),b.execCommand("SaveAs",!0,v),document.body.removeChild(y)}}else{var w=i.get("lang"),x='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(w&&w[0]||"")+'" /></body>',M=window.open();M.document.write(x),M.document.title=r}},n.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},n}(UR),n_=[["line","bar"],["stack"]],i_=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return E(n,t),n.prototype.getIcons=function(){var t=this.model,n=t.get("icon"),i={};return vt(t.get("type"),(function(t){n[t]&&(i[t]=n[t])})),i},n.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},n.prototype.onclick=function(t,n,i){var r=this.model,e=r.get(["seriesIndex",i]);if(r_[i]){var o,a={series:[]};vt(n_,(function(t){ht(t,i)>=0&&vt(t,(function(t){r.setIconStatus(t,"normal")}))})),r.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==e?null:{seriesIndex:e}},(function(t){var n=r_[i](t.subType,t.id,t,r);n&&(lt(n,t.option),a.series.push(n));var e=t.coordinateSystem;if(e&&"cartesian2d"===e.type&&("line"===i||"bar"===i)){var o=e.getAxesByScale("ordinal")[0];if(o){var s=o.dim+"Axis",u=t.getReferringComponents(s,xo).models[0].componentIndex;a[s]=a[s]||[];for(var l=0;l<=u;l++)a[s][u]=a[s][u]||{};a[s][u].boundaryGap="bar"===i}}}));var s=i;"stack"===i&&(o=at({stack:r.option.title.tiled,tiled:r.option.title.stack},r.option.title),"emphasis"!==r.get(["iconStatus",i])&&(s="tiled")),n.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:o,featureName:"magicType"})}},n}(UR),r_={line:function(t,n,i,r){if("bar"===t)return at({id:n,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},r.get(["option","line"])||{},!0)},bar:function(t,n,i,r){if("line"===t)return at({id:n,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},r.get(["option","bar"])||{},!0)},stack:function(t,n,i,r){var e="__ec_magicType_stack__"===i.get("stack");if("line"===t||"bar"===t)return r.setIconStatus("stack",e?"normal":"emphasis"),at({id:n,stack:e?"":"__ec_magicType_stack__"},r.get(["option","stack"])||{},!0)}};ay({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,n){n.mergeOption(t.newOption)}));var e_=new Array(60).join("-");function o_(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var a_=new RegExp("[\t]+","g");var s_=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return E(n,t),n.prototype.onclick=function(t,n){setTimeout((function(){n.dispatchAction({type:"hideTip"})}));var i=n.getDom(),r=this.model;this._dom&&i.removeChild(this._dom);var e=document.createElement("div");e.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",e.style.backgroundColor=r.get("backgroundColor")||"#fff";var o=document.createElement("h4"),a=r.get("lang")||[];o.innerHTML=a[0]||r.get("title"),o.style.cssText="margin:10px 20px",o.style.color=r.get("textColor");var s=document.createElement("div"),u=document.createElement("textarea");s.style.cssText="overflow:auto";var l=r.get("optionToContent"),h=r.get("contentToOption"),f=function(t){var n,i,r,e=function(t){var n={},i=[],r=[];return t.eachRawSeries((function(t){var e=t.coordinateSystem;if(!e||"cartesian2d"!==e.type&&"polar"!==e.type)i.push(t);else{var o=e.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;n[a]||(n[a]={categoryAxis:o,valueAxis:e.getOtherAxis(o),series:[]},r.push({axisDim:o.dim,axisIndex:o.index})),n[a].series.push(t)}else i.push(t)}})),{seriesGroupByCategoryAxis:n,other:i,meta:r}}(t);return{value:mt([(i=e.seriesGroupByCategoryAxis,r=[],vt(i,(function(t){var n=t.categoryAxis,i=t.valueAxis.dim,e=[" "].concat(dt(t.series,(function(t){return t.name}))),o=[n.model.getCategories()];vt(t.series,(function(t){var n=t.getRawData();o.push(t.getRawData().mapArray(n.mapDimension(i),(function(t){return t})))}));for(var a=[e.join("\t")],s=0;s<o[0].length;s++){for(var u=[],l=0;l<o.length;l++)u.push(o[l][s]);a.push(u.join("\t"))}r.push(a.join("\n"))})),r.join("\n\n"+e_+"\n\n")),(n=e.other,dt(n,(function(t){var n=t.getRawData(),i=[t.name],r=[];return n.each(n.dimensions,(function(){for(var t=arguments.length,e=n.getName(arguments[t-1]),o=0;o<t-1;o++)r[o]=arguments[o];i.push((e?e+"\t":"")+r.join("\t"))})),i.join("\n")})).join("\n\n"+e_+"\n\n"))],(function(t){return!!t.replace(/[\n\t\s]/g,"")})).join("\n\n"+e_+"\n\n"),meta:e.meta}}(t);if(xt(l)){var c=l(n.getOption());Mt(c)?s.innerHTML=c:Tt(c)&&s.appendChild(c)}else{u.readOnly=r.get("readOnly");var v=u.style;v.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",v.color=r.get("textColor"),v.borderColor=r.get("textareaBorderColor"),v.backgroundColor=r.get("textareaColor"),u.value=f.value,s.appendChild(u)}var d=f.meta,p=document.createElement("div");p.style.cssText="position:absolute;bottom:5px;left:0;right:0";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",y=document.createElement("div"),g=document.createElement("div");m+=";background-color:"+r.get("buttonColor"),m+=";color:"+r.get("buttonTextColor");var b=this;function w(){i.removeChild(e),b._dom=null}In(y,"click",w),In(g,"click",(function(){if(null==h&&null!=l||null!=h&&null==l)w();else{var t;try{t=xt(h)?h(s,n.getOption()):function(t,n){var i=t.split(new RegExp("\n*"+e_+"\n*","g")),r={series:[]};return vt(i,(function(t,i){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf("\t")>=0)return!0}(t)){var e=function(t){for(var n=t.split(/\n+/g),i=[],r=dt(o_(n.shift()).split(a_),(function(t){return{name:t,data:[]}})),e=0;e<n.length;e++){var o=o_(n[e]).split(a_);i.push(o.shift());for(var a=0;a<o.length;a++)r[a]&&(r[a].data[e]=o[a])}return{series:r,categories:i}}(t),o=n[i],a=o.axisDim+"Axis";o&&(r[a]=r[a]||[],r[a][o.axisIndex]={data:e.categories},r.series=r.series.concat(e.series))}else e=function(t){for(var n=t.split(/\n+/g),i=o_(n.shift()),r=[],e=0;e<n.length;e++){var o=o_(n[e]);if(o){var a=o.split(a_),s="",u=void 0,l=!1;isNaN(a[0])?(l=!0,s=a[0],a=a.slice(1),r[e]={name:s,value:[]},u=r[e].value):u=r[e]=[];for(var h=0;h<a.length;h++)u.push(+a[h]);1===u.length&&(l?r[e].value=u[0]:r[e]=u[0])}}return{name:i,data:r}}(t),r.series.push(e)})),r}(u.value,d)}catch(t){throw w(),new Error("Data view format error "+t)}t&&n.dispatchAction({type:"changeDataView",newOption:t}),w()}})),y.innerHTML=a[1],g.innerHTML=a[2],g.style.cssText=y.style.cssText=m,!r.get("readOnly")&&p.appendChild(g),p.appendChild(y),e.appendChild(o),e.appendChild(s),e.appendChild(p),s.style.height=i.clientHeight-80+"px",i.appendChild(e),this._dom=e},n.prototype.remove=function(t,n){this._dom&&n.getDom().removeChild(this._dom)},n.prototype.dispose=function(t,n){this.remove(t,n)},n.getDefaultOption=function(t){return{show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"}},n}(UR);function u_(t,n){return dt(t,(function(t,i){var r=n&&n[i];if(At(r)&&!wt(r)){At(t)&&!wt(t)||(t={value:t});var e=null!=r.name&&null==t.name;return t=lt(t,r),e&&delete t.name,t}return t}))}ay({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},(function(t,n){var i=[];vt(t.newOption.series,(function(t){var r=n.getSeriesByName(t.name)[0];if(r){var e=r.get("data");i.push({name:t.name,data:u_(t.data,e)})}else i.push(ut({type:"scatter"},t))})),n.mergeOption(lt({series:i},t.newOption))}));var l_=vt,h_=yo();function f_(t){var n=h_(t);return n.snapshots||(n.snapshots=[{}]),n.snapshots}var c_=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return E(n,t),n.prototype.onclick=function(t,n){!function(t){h_(t).snapshots=null}(t),n.dispatchAction({type:"restore",from:this.uid})},n.getDefaultOption=function(t){return{show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])}},n}(UR);ay({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(t,n){n.resetOption("recreate")}));var v_=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],d_=function(){function t(t,n,i){var r=this;this._targetInfoList=[];var e=m_(n,t);vt(y_,(function(t,n){(!i||!i.include||ht(i.include,n)>=0)&&t(e,r._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,n){return this.matchOutputRanges(t,n,(function(t,n,i){if((t.coordRanges||(t.coordRanges=[])).push(n),!t.coordRange){t.coordRange=n;var r=w_[t.brushType](0,i,n);t.__rangeOffset={offset:M_[t.brushType](r.values,t.range,[1,1]),xyMinMax:r.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,n,i){vt(t,(function(t){var r=this.findTargetInfo(t,n);r&&!0!==r&&vt(r.coordSyses,(function(r){var e=w_[t.brushType](1,r,t.range,!0);i(t,e.values,r,n)}))}),this)},t.prototype.setInputRanges=function(t,n){vt(t,(function(t){var i,r,e,o,a=this.findTargetInfo(t,n);if(t.range=t.range||[],a&&!0!==a){t.panelId=a.panelId;var s=w_[t.brushType](0,a.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?M_[t.brushType](s.values,u.offset,(i=u.xyMinMax,r=k_(s.xyMinMax),e=k_(i),o=[r[0]/e[0],r[1]/e[1]],isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o)):s.values}}),this)},t.prototype.makePanelOpts=function(t,n){return dt(this._targetInfoList,(function(i){var r=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:n?n(i):null,clipPath:kz(r),isTargetByCursor:Nz(r,t,i.coordSysModel),getLinearBrushOtherExtent:Az(r)}}))},t.prototype.controlSeries=function(t,n,i){var r=this.findTargetInfo(t,i);return!0===r||r&&ht(r.coordSyses,n.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,n){for(var i=this._targetInfoList,r=m_(n,t),e=0;e<i.length;e++){var o=i[e],a=t.panelId;if(a){if(o.panelId===a)return o}else for(var s=0;s<g_.length;s++)if(g_[s](r,o))return o}return!0},t}();function p_(t){return t[0]>t[1]&&t.reverse(),t}function m_(t,n){return bo(t,n,{includeMainTypes:v_})}var y_={grid:function(t,n){var i=t.xAxisModels,r=t.yAxisModels,e=t.gridModels,o=Vt(),a={},s={};(i||r||e)&&(vt(i,(function(t){var n=t.axis.grid.model;o.set(n.id,n),a[n.id]=!0})),vt(r,(function(t){var n=t.axis.grid.model;o.set(n.id,n),s[n.id]=!0})),vt(e,(function(t){o.set(t.id,t),a[t.id]=!0,s[t.id]=!0})),o.each((function(t){var e=[];vt(t.coordinateSystem.getCartesians(),(function(t){(ht(i,t.getAxis("x").model)>=0||ht(r,t.getAxis("y").model)>=0)&&e.push(t)})),n.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:e[0],coordSyses:e,getPanelRect:b_.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})})))},geo:function(t,n){vt(t.geoModels,(function(t){var i=t.coordinateSystem;n.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:b_.geo})}))}},g_=[function(t,n){var i=t.xAxisModel,r=t.yAxisModel,e=t.gridModel;return!e&&i&&(e=i.axis.grid.model),!e&&r&&(e=r.axis.grid.model),e&&e===n.gridModel},function(t,n){var i=t.geoModel;return i&&i===n.geoModel}],b_={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,n=t.getBoundingRect().clone();return n.applyTransform(uh(t)),n}},w_={lineX:bt(x_,0),lineY:bt(x_,1),rect:function(t,n,i,r){var e=t?n.pointToData([i[0][0],i[1][0]],r):n.dataToPoint([i[0][0],i[1][0]],r),o=t?n.pointToData([i[0][1],i[1][1]],r):n.dataToPoint([i[0][1],i[1][1]],r),a=[p_([e[0],o[0]]),p_([e[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,n,i,r){var e=[[1/0,-1/0],[1/0,-1/0]];return{values:dt(i,(function(i){var o=t?n.pointToData(i,r):n.dataToPoint(i,r);return e[0][0]=Math.min(e[0][0],o[0]),e[1][0]=Math.min(e[1][0],o[1]),e[0][1]=Math.max(e[0][1],o[0]),e[1][1]=Math.max(e[1][1],o[1]),o})),xyMinMax:e}}};function x_(t,n,i,r){var e=i.getAxis(["x","y"][t]),o=p_(dt([0,1],(function(t){return n?e.coordToData(e.toLocalCoord(r[t]),!0):e.toGlobalCoord(e.dataToCoord(r[t]))}))),a=[];return a[t]=o,a[1-t]=[NaN,NaN],{values:o,xyMinMax:a}}var M_={lineX:bt(S_,0),lineY:bt(S_,1),rect:function(t,n,i){return[[t[0][0]-i[0]*n[0][0],t[0][1]-i[0]*n[0][1]],[t[1][0]-i[1]*n[1][0],t[1][1]-i[1]*n[1][1]]]},polygon:function(t,n,i){return dt(t,(function(t,r){return[t[0]-i[0]*n[r][0],t[1]-i[1]*n[r][1]]}))}};function S_(t,n,i,r){return[n[0]-r[t]*i[0],n[1]-r[t]*i[1]]}function k_(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var A_,N_=vt,C_=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return E(n,t),n.prototype.render=function(t,n,i,r){this._brushController||(this._brushController=new UT(i.getZr()),this._brushController.on("brush",gt(this._onBrush,this)).mount()),function(t,n,i,r,e){var o=i._isZoomActive;r&&"takeGlobalCursor"===r.type&&(o="dataZoomSelect"===r.key&&r.dataZoomSelectActive),i._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new d_(z_(t),n,{include:["grid"]}).makePanelOpts(e,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}));i._brushController.setPanels(a).enableBrush(!(!o||!a.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,n,this,r,i),function(t,n){t.setIconStatus("back",function(t){return f_(t).length}(n)>1?"emphasis":"normal")}(t,n)},n.prototype.onclick=function(t,n,i){T_[i].call(this)},n.prototype.remove=function(){this._brushController&&this._brushController.unmount()},n.prototype.dispose=function(){this._brushController&&this._brushController.dispose()},n.prototype._onBrush=function(t){var n=t.areas;if(t.isEnd&&n.length){var i={},r=this.ecModel;this._brushController.updateCovers([]),new d_(z_(this.model),r,{include:["grid"]}).matchOutputRanges(n,r,(function(t,n,i){if("cartesian2d"===i.type){var r=t.brushType;"rect"===r?(e("x",i,n[0]),e("y",i,n[1])):e({lineX:"x",lineY:"y"}[r],i,n)}})),function(t,n){var i=f_(t);l_(n,(function(n,r){for(var e=i.length-1;e>=0&&!i[e][r];e--);if(e<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:r})[0];if(o){var a=o.getPercentRange();i[0][r]={dataZoomId:r,start:a[0],end:a[1]}}}})),i.push(n)}(r,i),this._dispatchZoomAction(i)}function e(t,n,e){var o=n.getAxis(t),a=o.model,s=function(t,n,i){var r;return i.eachComponent({mainType:"dataZoom",subType:"select"},(function(i){i.getAxisModel(t,n.componentIndex)&&(r=i)})),r}(t,a,r),u=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==u.minValueSpan&&null==u.maxValueSpan||(e=kT(0,e.slice(),o.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),s&&(i[s.id]={dataZoomId:s.id,startValue:e[0],endValue:e[1]})}},n.prototype._dispatchZoomAction=function(t){var n=[];N_(t,(function(t){n.push(ot(t))})),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},n.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},n}(UR),T_={zoom:function(){this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:!this._isZoomActive})},back:function(){this._dispatchZoomAction(function(t){var n=f_(t),i=n[n.length-1];n.length>1&&n.pop();var r={};return l_(i,(function(t,i){for(var e=n.length-1;e>=0;e--)if(t=n[e][i]){r[i]=t;break}})),r}(this.ecModel))}};function z_(t){var n={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==n.xAxisIndex&&null==n.xAxisId&&(n.xAxisIndex="all"),null==n.yAxisIndex&&null==n.yAxisId&&(n.yAxisIndex="all"),n}A_=function(t){var n=t.getComponent("toolbox",0),i=["feature","dataZoom"];if(n&&null!=n.get(i)){var r=n.getModel(i),e=[],o=bo(t,z_(r));return N_(o.xAxisModels,(function(t){return a(t,"xAxis","xAxisIndex")})),N_(o.yAxisModels,(function(t){return a(t,"yAxis","yAxisIndex")})),e}function a(t,n,i){var o=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:r.get("filterMode",!0)||"filter",id:"\0_ec_\0toolbox-dataZoom_"+n+o};a[i]=o,e.push(a)}},Bt(null==cc.get("dataZoom")&&A_),cc.set("dataZoom",A_);var I_=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.type="tooltip",n.dependencies=["axisPointer"],n.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},n}(Jf);function L_(t){var n=t.get("confine");return null!=n?!!n:"richText"===t.get("renderMode")}function O_(t){if(W.domSupported)for(var n=document.documentElement.style,i=0,r=t.length;i<r;i++)if(t[i]in n)return t[i]}var D_=O_(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function R_(t,n){if(!t)return n;n=zf(n,!0);var i=t.indexOf(n);return(t=-1===i?n:"-"+t.slice(0,i)+"-"+n).toLowerCase()}var __=R_(O_(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),B_=R_(D_,"transform"),F_="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(W.transform3dSupported?"will-change:transform;":"");function E_(t,n,i){var r=t.toFixed(0)+"px",e=n.toFixed(0)+"px";if(!W.transformSupported)return i?"top:"+e+";left:"+r+";":[["top",e],["left",r]];var o=W.transform3dSupported,a="translate"+(o?"3d":"")+"("+r+","+e+(o?",0":"")+")";return i?"top:0;left:0;"+B_+":"+a+";":[["top",0],["left",0],[D_,a]]}function P_(t,n,i,r,e){var o=n&&n.painter;if(i){var a=o&&o.getViewportRoot();a&&function(t,n,i,r,e){xn(wn,n,r,e,!0)&&xn(t,i,wn[0],wn[1])}(t,a,document.body,r,e)}else{t[0]=r,t[1]=e;var s=o&&o.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/n.getWidth(),t[3]=t[1]/n.getHeight()}var W_=function(){function t(t,n,i){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,W.wxa)return null;var r=document.createElement("div");r.domBelongToZr=!0,this.el=r;var e=this._zr=n.getZr(),o=this._appendToBody=i&&i.appendToBody;P_(this._styleCoord,e,o,n.getWidth()/2,n.getHeight()/2),o?document.body.appendChild(r):t.appendChild(r),this._container=t;var a=this;r.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},r.onmousemove=function(t){if(t=t||window.event,!a._enterable){var n=e.handler;zn(e.painter.getViewportRoot(),t,!0),n.dispatch("mousemove",t)}},r.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return t.prototype.update=function(t){var n,i,r,e=this._container,o=(i="position",(r=(n=e).currentStyle||document.defaultView&&document.defaultView.getComputedStyle(n))?r[i]:null),a=e.style;"absolute"!==a.position&&"absolute"!==o&&(a.position="relative"),t.get("alwaysShowContent")&&this._moveIfResized(),this.el.className=t.get("className")||""},t.prototype.show=function(t,n){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,r=i.style,e=this._styleCoord;i.innerHTML?r.cssText=F_+function(t,n,i){var r=[],e=t.get("transitionDuration"),o=t.get("backgroundColor"),a=t.get("shadowBlur"),s=t.get("shadowColor"),u=t.get("shadowOffsetX"),l=t.get("shadowOffsetY"),h=t.getModel("textStyle"),f=vd(t,"html");return r.push("box-shadow:"+u+"px "+l+"px "+a+"px "+s),n&&e&&r.push(function(t,n){var i="cubic-bezier(0.23,1,0.32,1)",r=" "+t/2+"s "+i,e="opacity"+r+",visibility"+r;return n||(r=" "+t+"s "+i,e+=W.transformSupported?","+B_+r:",left"+r+",top"+r),__+":"+e}(e,i)),o&&r.push("background-color:"+o),vt(["width","color","radius"],(function(n){var i="border-"+n,e=zf(i),o=t.get(e);null!=o&&r.push(i+":"+o+("color"===n?"":"px"))})),r.push(function(t){var n=[],i=t.get("fontSize"),r=t.getTextColor();r&&n.push("color:"+r),n.push("font:"+t.getFont()),i&&n.push("line-height:"+Math.round(3*i/2)+"px");var e=t.get("textShadowColor"),o=t.get("textShadowBlur")||0,a=t.get("textShadowOffsetX")||0,s=t.get("textShadowOffsetY")||0;return e&&o&&n.push("text-shadow:"+a+"px "+s+"px "+o+"px "+e),vt(["decoration","align"],(function(i){var r=t.get(i);r&&n.push("text-"+i+":"+r)})),n.join(";")}(h)),null!=f&&r.push("padding:"+If(f).join("px ")+"px"),r.join(";")+";"}(t,!this._firstShow,this._longHide)+E_(e[0],e[1],!0)+"border-color:"+Ef(n)+";"+(t.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):r.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(t,n,i,r,e){var o=this.el;if(null!=t){var a="";if(Mt(e)&&"item"===i.get("trigger")&&!L_(i)&&(a=function(t,n,i){if(!Mt(i)||"inside"===i)return"";var r=t.get("backgroundColor"),e=t.get("borderWidth");n=Ef(n);var o,a,s="left"===(o=i)?"right":"right"===o?"left":"top"===o?"bottom":"top",u=Math.max(1.5*Math.round(e),6),l="",h=B_+":";ht(["left","right"],s)>-1?(l+="top:50%",h+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(l+="left:50%",h+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var f=a*Math.PI/180,c=u+e,v=c*Math.abs(Math.cos(f))+c*Math.abs(Math.sin(f)),d=n+" solid "+e+"px;";return'<div style="'+["position:absolute;width:"+u+"px;height:"+u+"px;",(l+=";"+s+":-"+Math.round(100*((v-Math.SQRT2*e)/2+Math.SQRT2*e-(v-c)/2))/100+"px")+";"+h+";","border-bottom:"+d,"border-right:"+d,"background-color:"+r+";"].join("")+'"></div>'}(i,r,e)),Mt(t))o.innerHTML=t+a;else if(t){o.innerHTML="",wt(t)||(t=[t]);for(var s=0;s<t.length;s++)Tt(t[s])&&t[s].parentNode!==o&&o.appendChild(t[s]);if(a&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=a,o.appendChild(u)}}}else o.innerHTML=""},t.prototype.setEnterable=function(t){this._enterable=t},t.prototype.getSize=function(){var t=this.el;return[t.offsetWidth,t.offsetHeight]},t.prototype.moveTo=function(t,n){var i=this._styleCoord;if(P_(i,this._zr,this._appendToBody,t,n),null!=i[0]&&null!=i[1]){var r=this.el.style;vt(E_(i[0],i[1]),(function(t){r[t[0]]=t[1]}))}},t.prototype._moveIfResized=function(){var t=this._styleCoord[3];this.moveTo(this._styleCoord[2]*this._zr.getWidth(),t*this._zr.getHeight())},t.prototype.hide=function(){var t=this,n=this.el.style;n.visibility="hidden",n.opacity="0",W.transform3dSupported&&(n.willChange=""),this._show=!1,this._longHideTimeout=setTimeout((function(){return t._longHide=!0}),500)},t.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(gt(this.hide,this),t)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this.el.parentNode.removeChild(this.el)},t}(),V_=function(){function t(t){this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._zr=t.getZr(),Y_(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return t.prototype.update=function(t){t.get("alwaysShowContent")&&this._moveIfResized()},t.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},t.prototype.setContent=function(t,n,i,r){var e=this;At(t)&&io(""),this.el&&this._zr.remove(this.el);var o=i.getModel("textStyle");this.el=new Ss({style:{rich:n.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:o.get("textShadowColor"),fill:i.get(["textStyle","color"]),padding:vd(i,"richText"),verticalAlign:"top",align:"left"},z:i.get("z")}),vt(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],(function(t){e.el.style[t]=i.get(t)})),vt(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],(function(t){e.el.style[t]=o.get(t)||0})),this._zr.add(this.el);var a=this;this.el.on("mouseover",(function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0})),this.el.on("mouseout",(function(){a._enterable&&a._show&&a.hideLater(a._hideDelay),a._inContent=!1}))},t.prototype.setEnterable=function(t){this._enterable=t},t.prototype.getSize=function(){var t=this.el,n=this.el.getBoundingRect(),i=H_(t.style);return[n.width+i.left+i.right,n.height+i.top+i.bottom]},t.prototype.moveTo=function(t,n){var i=this.el;if(i){var r=this._styleCoord;Y_(r,this._zr,t,n),t=r[0],n=r[1];var e=i.style,o=j_(e.borderWidth||0),a=H_(e);i.x=t+o+a.left,i.y=n+o+a.top,i.markRedraw()}},t.prototype._moveIfResized=function(){var t=this._styleCoord[3];this.moveTo(this._styleCoord[2]*this._zr.getWidth(),t*this._zr.getHeight())},t.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},t.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(gt(this.hide,this),t)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this._zr.remove(this.el)},t}();function j_(t){return Math.max(0,t)}function H_(t){var n=j_(t.shadowBlur||0),i=j_(t.shadowOffsetX||0),r=j_(t.shadowOffsetY||0);return{left:j_(n-i),right:j_(n+i),top:j_(n-r),bottom:j_(n+r)}}function Y_(t,n,i,r){t[0]=i,t[1]=r,t[2]=t[0]/n.getWidth(),t[3]=t[1]/n.getHeight()}var X_=new ws({shape:{x:-1,y:-1,width:2,height:2}}),G_=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.init=function(t,n){if(!W.node&&n.getDom()){var i,r=t.getComponent("tooltip"),e=this._renderMode="auto"===(i=r.get("renderMode"))?W.domSupported?"html":"richText":i||"html";this._tooltipContent="richText"===e?new V_(n):new W_(n.getDom(),n,{appendToBody:r.get("appendToBody",!0)})}},n.prototype.render=function(t,n,i){if(!W.node&&i.getDom()){this.group.removeAll(),this._tooltipModel=t,this._ecModel=n,this._api=i,this._alwaysShowContent=t.get("alwaysShowContent");var r=this._tooltipContent;r.update(t),r.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&t.get("transitionDuration")?Pd(this,"_updatePosition",50,"fixRate"):Wd(this,"_updatePosition")}},n.prototype._initGlobalListener=function(){var t=this._tooltipModel.get("triggerOn");eD("itemTooltip",this._api,gt((function(n,i,r){"none"!==t&&(t.indexOf(n)>=0?this._tryShow(i,r):"leave"===n&&this._hide(r))}),this))},n.prototype._keepShow=function(){var t=this._tooltipModel,n=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var r=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!i.isDisposed()&&r.manuallyShowTip(t,n,i,{x:r._lastX,y:r._lastY,dataByCoordSys:r._lastDataByCoordSys})}))}},n.prototype.manuallyShowTip=function(t,n,i,r){if(r.from!==this.uid&&!W.node&&i.getDom()){var e=Z_(r,i);this._ticket="";var o=r.dataByCoordSys,a=function(t,n,i){var r=wo(t).queryOptionMap,e=r.keys()[0];if(e&&"series"!==e){var o,a=So(n,e,r.get(e),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a)return i.getViewOfComponentModel(a).group.traverse((function(n){var i=Bs(n).tooltipConfig;if(i&&i.name===t.name)return o=n,!0})),o?{componentMainType:e,componentIndex:a.componentIndex,el:o}:void 0}}(r,n,i);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:r.position,positionDefault:"bottom"},e)}else if(r.tooltip&&null!=r.x&&null!=r.y){var u=X_;u.x=r.x,u.y=r.y,u.update(),Bs(u).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:u},e)}else if(o)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:o,tooltipOption:r.tooltipOption},e);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(t,n,i,r))return;var l=lD(r,n),h=l.point[0],f=l.point[1];null!=h&&null!=f&&this._tryShow({offsetX:h,offsetY:f,target:l.el,position:r.position,positionDefault:"bottom"},e)}else null!=r.x&&null!=r.y&&(i.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:i.getZr().findHover(r.x,r.y).target},e))}},n.prototype.manuallyHideTip=function(t,n,i,r){!this._alwaysShowContent&&this._tooltipModel&&this._tooltipContent.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,r.from!==this.uid&&this._hide(Z_(r,i))},n.prototype._manuallyAxisShowTip=function(t,n,i,r){var e=r.seriesIndex,o=r.dataIndex,a=n.getComponent("axisPointer").coordSysAxesInfo;if(null!=e&&null!=o&&null!=a){var s=n.getSeriesByIndex(e);if(s&&"axis"===U_([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:e,dataIndex:o,position:r.position}),!0}},n.prototype._tryShow=function(t,n){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var r=t.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,t);else if(i){var e,o;this._lastDataByCoordSys=null,Np(i,(function(t){return null!=Bs(t).dataIndex?(e=t,!0):null!=Bs(t).tooltipConfig?(o=t,!0):void 0}),!0),e?this._showSeriesItemTooltip(t,e,n):o?this._showComponentItemTooltip(t,o,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},n.prototype._showOrMove=function(t,n){var i=t.get("showDelay");n=gt(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},n.prototype._showAxisTooltip=function(t,n){var i=this._ecModel,r=this._tooltipModel,e=[n.offsetX,n.offsetY],o=U_([n.tooltipOption],r),a=this._renderMode,s=[],u=rd("section",{blocks:[],noHeader:!0}),l=[],h=new dd;vt(t,(function(t){vt(t.dataByAxis,(function(t){var n=i.getComponent(t.axisDim+"Axis",t.axisIndex),e=t.value;if(n&&null!=e){var o=XO(e,n.axis,i,t.seriesDataIndices,t.valueLabelOpt),f=rd("section",{header:o,noHeader:!Ft(o),sortBlocks:!0,blocks:[]});u.blocks.push(f),vt(t.seriesDataIndices,(function(u){var c=i.getSeriesByIndex(u.seriesIndex),v=u.dataIndexInside,d=c.getDataParams(v);if(!(d.dataIndex<0)){d.axisDim=t.axisDim,d.axisIndex=t.axisIndex,d.axisType=t.axisType,d.axisId=t.axisId,d.axisValue=qg(n.axis,{value:e}),d.axisValueLabel=o,d.marker=h.makeTooltipMarker("item",Ef(d.color),a);var p=xv(c.formatTooltip(v,!0,null)),m=p.frag;if(m){var y=U_([c],r).get("valueFormatter");f.blocks.push(y?ut({valueFormatter:y},m):m)}p.text&&l.push(p.text),s.push(d)}}))}}))})),u.blocks.reverse(),l.reverse();var f=n.position,c=o.get("order"),v=ld(u,h,a,c,i.get("useUTC"),o.get("textStyle"));v&&l.unshift(v);var d=l.join("richText"===a?"\n\n":"<br/>");this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(t,s)?this._updatePosition(o,f,e[0],e[1],this._tooltipContent,s):this._showTooltipContent(o,d,s,Math.random()+"",e[0],e[1],f,null,h)}))},n.prototype._showSeriesItemTooltip=function(t,n,i){var r=this._ecModel,e=Bs(n),o=e.seriesIndex,a=r.getSeriesByIndex(o),s=e.dataModel||a,u=e.dataIndex,l=e.dataType,h=s.getData(l),f=this._renderMode,c=t.positionDefault,v=U_([h.getItemModel(u),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,c?{position:c}:null),d=v.get("trigger");if(null==d||"item"===d){var p=s.getDataParams(u,l),m=new dd;p.marker=m.makeTooltipMarker("item",Ef(p.color),f);var y=xv(s.formatTooltip(u,!1,l)),g=v.get("order"),b=v.get("valueFormatter"),w=y.frag,x=w?ld(b?ut({valueFormatter:b},w):w,m,f,g,r.get("useUTC"),v.get("textStyle")):y.text,M="item_"+s.name+"_"+u;this._showOrMove(v,(function(){this._showTooltipContent(v,x,p,M,t.offsetX,t.offsetY,t.position,t.target,m)})),i({type:"showTip",dataIndexInside:u,dataIndex:h.getRawIndex(u),seriesIndex:o,from:this.uid})}},n.prototype._showComponentItemTooltip=function(t,n,i){var r=Bs(n),e=r.tooltipConfig.option||{};Mt(e)&&(e={content:e,formatter:e});var o=[e],a=this._ecModel.getComponent(r.componentMainType,r.componentIndex);a&&o.push(a),o.push({formatter:e.content});var s=t.positionDefault,u=U_(o,this._tooltipModel,s?{position:s}:null),l=u.get("content"),h=Math.random()+"",f=new dd;this._showOrMove(u,(function(){var i=ot(u.get("formatterParams")||{});this._showTooltipContent(u,l,i,h,t.offsetX,t.offsetY,t.position,n,f)})),i({type:"showTip",from:this.uid})},n.prototype._showTooltipContent=function(t,n,i,r,e,o,a,s,u){if(this._ticket="",t.get("showContent")&&t.get("show")){var l=this._tooltipContent;l.setEnterable(t.get("enterable"));var h=t.get("formatter");a=a||t.get("position");var f=n,c=this._getNearestPoint([e,o],i,t.get("trigger"),t.get("borderColor")).color;if(h)if(Mt(h)){var v=t.ecModel.get("useUTC"),d=wt(i)?i[0]:i;f=h,d&&d.axisType&&d.axisType.indexOf("time")>=0&&(f=ff(d.axisValue,f,v)),f=Ff(f,i,!0)}else if(xt(h)){var p=gt((function(n,r){n===this._ticket&&(l.setContent(r,u,t,c,a),this._updatePosition(t,a,e,o,l,i,s))}),this);this._ticket=r,f=h(i,r,p)}else f=h;l.setContent(f,u,t,c,a),l.show(t,c),this._updatePosition(t,a,e,o,l,i,s)}},n.prototype._getNearestPoint=function(t,n,i,r){return"axis"===i||wt(n)?{color:r||("html"===this._renderMode?"#fff":"none")}:wt(n)?void 0:{color:r||n.color||n.borderColor}},n.prototype._updatePosition=function(t,n,i,r,e,o,a){var s=this._api.getWidth(),u=this._api.getHeight();n=n||t.get("position");var l=e.getSize(),h=t.get("align"),f=t.get("verticalAlign"),c=a&&a.getBoundingRect().clone();if(a&&c.applyTransform(a.transform),xt(n)&&(n=n([i,r],o,e.el,c,{viewSize:[s,u],contentSize:l.slice()})),wt(n))i=Fe(n[0],s),r=Fe(n[1],u);else if(At(n)){var v=n;v.width=l[0],v.height=l[1];var d=Xf(v,{width:s,height:u});i=d.x,r=d.y,h=null,f=null}else if(Mt(n)&&a){var p=function(t,n,i,r){var e=i[0],o=i[1],a=Math.ceil(Math.SQRT2*r)+8,s=0,u=0,l=n.width,h=n.height;switch(t){case"inside":s=n.x+l/2-e/2,u=n.y+h/2-o/2;break;case"top":s=n.x+l/2-e/2,u=n.y-o-a;break;case"bottom":s=n.x+l/2-e/2,u=n.y+h+a;break;case"left":s=n.x-e-a,u=n.y+h/2-o/2;break;case"right":s=n.x+l+a,u=n.y+h/2-o/2}return[s,u]}(n,c,l,t.get("borderWidth"));i=p[0],r=p[1]}else p=function(t,n,i,r,e,o,a){var s=i.getSize(),u=s[0],l=s[1];return null!=o&&(t+u+o+2>r?t-=u+o:t+=o),null!=a&&(n+l+a>e?n-=l+a:n+=a),[t,n]}(i,r,e,s,u,h?null:20,f?null:20),i=p[0],r=p[1];h&&(i-=q_(h)?l[0]/2:"right"===h?l[0]:0),f&&(r-=q_(f)?l[1]/2:"bottom"===f?l[1]:0),L_(t)&&(p=function(t,n,i,r,e){var o=i.getSize(),a=o[0],s=o[1];return t=Math.min(t+a,r)-a,n=Math.min(n+s,e)-s,[t=Math.max(t,0),n=Math.max(n,0)]}(i,r,e,s,u),i=p[0],r=p[1]),e.moveTo(i,r)},n.prototype._updateContentNotChangedOnAxis=function(t,n){var i=this._lastDataByCoordSys,r=this._cbParamsList,e=!!i&&i.length===t.length;return e&&vt(i,(function(i,o){var a=i.dataByAxis||[],s=(t[o]||{}).dataByAxis||[];(e=e&&a.length===s.length)&&vt(a,(function(t,i){var o=s[i]||{},a=t.seriesDataIndices||[],u=o.seriesDataIndices||[];(e=e&&t.value===o.value&&t.axisType===o.axisType&&t.axisId===o.axisId&&a.length===u.length)&&vt(a,(function(t,n){var i=u[n];e=e&&t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex})),r&&vt(t.seriesDataIndices,(function(t){var i=t.seriesIndex,o=n[i],a=r[i];o&&a&&a.data!==o.data&&(e=!1)}))}))})),this._lastDataByCoordSys=t,this._cbParamsList=n,!!e},n.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},n.prototype.dispose=function(t,n){!W.node&&n.getDom()&&(Wd(this,"_updatePosition"),this._tooltipContent.dispose(),sD("itemTooltip",n))},n.type="tooltip",n}(Nd);function U_(t,n,i){var r,e=n.ecModel;i?(r=new qh(i,e,e),r=new qh(n.option,r,e)):r=n;for(var o=t.length-1;o>=0;o--){var a=t[o];a&&(a instanceof qh&&(a=a.get("tooltip",!0)),Mt(a)&&(a={formatter:a}),a&&(r=new qh(a,r,e)))}return r}function Z_(t,n){return t.dispatchAction||gt(n.dispatchAction,n)}function q_(t){return"center"===t||"middle"===t}var $_=["rect","polygon","keep","clear"];function K_(t,n){var i=eo(t?t.brush:[]);if(i.length){var r=[];vt(i,(function(t){var n=t.hasOwnProperty("toolbox")?t.toolbox:[];n instanceof Array&&(r=r.concat(n))}));var e=t&&t.toolbox;wt(e)&&(e=e[0]),e||(t.toolbox=[e={feature:{}}]);var o=e.feature||(e.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,r),function(t){var n={};vt(t,(function(t){n[t]=1})),t.length=0,vt(n,(function(n,i){t.push(i)}))}(s),n&&!s.length&&s.push.apply(s,$_)}}var J_=vt;function Q_(t){if(t)for(var n in t)if(t.hasOwnProperty(n))return!0}function tB(t,n,i){var r={};return J_(n,(function(n){var e,o=r[n]=((e=function(){}).prototype.__hidden=e.prototype,new e);J_(t[n],(function(t,r){if(bN.isValidType(r)){var e={type:r,visual:t};i&&i(e,n),o[r]=new bN(e),"opacity"===r&&((e=ot(e)).type="colorAlpha",o.__hidden.__alphaForOpacity=new bN(e))}}))})),r}function nB(t,n,i){var r;vt(i,(function(t){n.hasOwnProperty(t)&&Q_(n[t])&&(r=!0)})),r&&vt(i,(function(i){n.hasOwnProperty(i)&&Q_(n[i])?t[i]=ot(n[i]):delete t[i]}))}var iB={lineX:rB(0),lineY:rB(1),rect:{point:function(t,n,i){return t&&i.boundingRect.contain(t[0],t[1])},rect:function(t,n,i){return t&&i.boundingRect.intersect(t)}},polygon:{point:function(t,n,i){return t&&i.boundingRect.contain(t[0],t[1])&&ib(i.range,t[0],t[1])},rect:function(t,n,i){var r=i.range;if(!t||r.length<=1)return!1;var e=t.x,o=t.y,a=t.width,s=t.height,u=r[0];return!!(ib(r,e,o)||ib(r,e+a,o)||ib(r,e,o+s)||ib(r,e+a,o+s)||ve.create(t).contain(u[0],u[1])||ph(e,o,e+a,o,r)||ph(e,o,e,o+s,r)||ph(e+a,o,e+a,o+s,r)||ph(e,o+s,e+a,o+s,r))||void 0}}};function rB(t){var n=["x","y"],i=["width","height"];return{point:function(n,i,r){if(n)return eB(n[t],r.range)},rect:function(r,e,o){if(r){var a=o.range,s=[r[n[t]],r[n[t]]+r[i[t]]];return s[1]<s[0]&&s.reverse(),eB(s[0],a)||eB(s[1],a)||eB(a[0],s)||eB(a[1],s)}}}}function eB(t,n){return n[0]<=t&&t<=n[1]}var oB=["inBrush","outOfBrush"];function aB(t){t.eachComponent({mainType:"brush"},(function(n){(n.brushTargetManager=new d_(n.option,t)).setInputRanges(n.areas,t)}))}function sB(t,n,i){var r,e,o=[];t.eachComponent({mainType:"brush"},(function(t){i&&"takeGlobalCursor"===i.type&&t.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1})})),aB(t),t.eachComponent({mainType:"brush"},(function(n,i){var a={brushId:n.id,brushIndex:i,brushName:n.name,areas:ot(n.areas),selected:[]};o.push(a);var s=n.option,u=s.brushLink,l=[],h=[],f=[],c=!1;i||(r=s.throttleType,e=s.throttleDelay);var v=dt(n.areas,(function(t){var n=hB[t.brushType],i=lt({boundingRect:n?n(t):void 0},t);return i.selectors=function(t){var n=t.brushType,i={point:function(r){return iB[n].point(r,i,t)},rect:function(r){return iB[n].rect(r,i,t)}};return i}(i),i})),d=tB(n.option,oB,(function(t){t.mappingMethod="fixed"}));function p(t){return"all"===u||!!l[t]}function m(t){return!!t.length}wt(u)&&vt(u,(function(t){l[t]=1})),t.eachSeries((function(i,r){var e=f[r]=[];"parallel"===i.subType?function(t,n){var i=t.coordinateSystem;c=c||i.hasAxisBrushed(),p(n)&&i.eachActiveState(t.getData(),(function(t,n){"active"===t&&(h[n]=1)}))}(i,r):function(i,r,e){if(i.brushSelector&&!function(t,n){var i=t.option.seriesIndex;return null!=i&&"all"!==i&&(wt(i)?ht(i,n)<0:n!==i)}(n,r)&&(vt(v,(function(r){n.brushTargetManager.controlSeries(r,i,t)&&e.push(r),c=c||m(e)})),p(r)&&m(e))){var o=i.getData();o.each((function(t){lB(i,e,o,t)&&(h[t]=1)}))}}(i,r,e)})),t.eachSeries((function(t,n){var i={seriesId:t.id,seriesIndex:n,seriesName:t.name,dataIndex:[]};a.selected.push(i);var r=f[n],e=t.getData(),o=p(n)?function(t){return h[t]?(i.dataIndex.push(e.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(n){return lB(t,r,e,n)?(i.dataIndex.push(e.getRawIndex(n)),"inBrush"):"outOfBrush"};(p(n)?c:m(r))&&function(t,n,i,r){var e,o={};function a(t){return xp(i,e,t)}function s(t,n){Sp(i,e,t,n)}function u(t){var u=i.getRawDataItem(e=t);if(!u||!1!==u.visualMap)for(var l=r.call(undefined,t),h=n[l],f=o[l],c=0,v=f.length;c<v;c++){var d=f[c];h[d]&&h[d].applyVisual(t,a,s)}}vt(oB,(function(t){var i=bN.prepareVisualTypes(n[t]);o[t]=i})),i.each(u)}(0,d,e,o)}))})),function(t,n,i,r,e){if(e){var o=t.getZr();o.__ecInBrushSelectEvent||(o.__ecBrushSelect||(o.__ecBrushSelect=uB),Pd(o,"__ecBrushSelect",i,n)(t,r))}}(n,r,e,o,i)}function uB(t,n){if(!t.isDisposed()){var i=t.getZr();i.__ecInBrushSelectEvent=!0,t.dispatchAction({type:"brushSelect",batch:n}),i.__ecInBrushSelectEvent=!1}}function lB(t,n,i,r){for(var e=0,o=n.length;e<o;e++){var a=n[e];if(t.brushSelector(r,i,a.selectors,a))return!0}}var hB={rect:function(t){return fB(t.range)},polygon:function(t){for(var n,i=t.range,r=0,e=i.length;r<e;r++){var o=i[r];o[0]<(n=n||[[1/0,-1/0],[1/0,-1/0]])[0][0]&&(n[0][0]=o[0]),o[0]>n[0][1]&&(n[0][1]=o[0]),o[1]<n[1][0]&&(n[1][0]=o[1]),o[1]>n[1][1]&&(n[1][1]=o[1])}return n&&fB(n)}};function fB(t){return new ve(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var cB=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.init=function(t,n){this.ecModel=t,this.api=n,(this._brushController=new UT(n.getZr())).on("brush",gt(this._onBrush,this)).mount()},n.prototype.render=function(t,n,i,r){this.model=t,this._updateController(t,n,i,r)},n.prototype.updateTransform=function(t,n,i,r){aB(n),this._updateController(t,n,i,r)},n.prototype.updateVisual=function(t,n,i,r){this.updateTransform(t,n,i,r)},n.prototype.updateView=function(t,n,i,r){this._updateController(t,n,i,r)},n.prototype._updateController=function(t,n,i,r){(!r||r.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},n.prototype.dispose=function(){this._brushController.dispose()},n.prototype._onBrush=function(t){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:ot(i),$from:n}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:ot(i),$from:n})},n.type="brush",n}(Nd),vB=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.areas=[],i.brushOption={},i}return E(n,t),n.prototype.optionUpdated=function(t,n){var i=this.option;!n&&nB(i,t,["inBrush","outOfBrush"]);var r=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:"#ddd"},r.hasOwnProperty("liftZ")||(r.liftZ=5)},n.prototype.setAreas=function(t){t&&(this.areas=dt(t,(function(t){return dB(this.option,t)}),this))},n.prototype.setBrushOption=function(t){this.brushOption=dB(this.option,t),this.brushType=this.brushOption.brushType},n.type="brush",n.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],n.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},n}(Jf);function dB(t,n){return at({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new qh(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},n,!0)}var pB=["rect","polygon","lineX","lineY","keep","clear"],mB=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return E(n,t),n.prototype.render=function(t,n){var i,r,e;n.eachComponent({mainType:"brush"},(function(t){i=t.brushType,r=t.brushOption.brushMode||"single",e=e||!!t.areas.length})),this._brushType=i,this._brushMode=r,vt(t.get("type",!0),(function(n){t.setIconStatus(n,("keep"===n?"multiple"===r:"clear"===n?e:n===i)?"emphasis":"normal")}))},n.prototype.updateView=function(t,n,i){this.render(t,n,i)},n.prototype.getIcons=function(){var t=this.model,n=t.get("icon",!0),i={};return vt(t.get("type",!0),(function(t){n[t]&&(i[t]=n[t])})),i},n.prototype.onclick=function(t,n,i){var r=this._brushType,e=this._brushMode;"clear"===i?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?r:r!==i&&i,brushMode:"keep"===i?"multiple"===e?"single":"multiple":e}})},n.getDefaultOption=function(t){return{show:!0,type:pB.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])}},n}(UR),yB=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.layoutMode={type:"box",ignoreSize:!0},i}return E(n,t),n.type="title",n.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},n}(Jf),gB=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.render=function(t,n,i){if(this.group.removeAll(),t.get("show")){var r=this.group,e=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=Ot(t.get("textBaseline"),t.get("textVerticalAlign")),u=new Ss({style:Ch(e,{text:t.get("text"),fill:e.getTextColor()},{disableBox:!0}),z2:10}),l=u.getBoundingRect(),h=t.get("subtext"),f=new Ss({style:Ch(o,{text:h,fill:o.getTextColor(),y:l.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),c=t.get("link"),v=t.get("sublink"),d=t.get("triggerEvent",!0);u.silent=!c&&!d,f.silent=!v&&!d,c&&u.on("click",(function(){Pf(c,"_"+t.get("target"))})),v&&f.on("click",(function(){Pf(v,"_"+t.get("subtarget"))})),Bs(u).eventData=Bs(f).eventData=d?{componentType:"title",componentIndex:t.componentIndex}:null,r.add(u),h&&r.add(f);var p=r.getBoundingRect(),m=t.getBoxLayoutParams();m.width=p.width,m.height=p.height;var y=Xf(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?y.x+=y.width:"center"===a&&(y.x+=y.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?y.y+=y.height:"middle"===s&&(y.y+=y.height/2),s=s||"top"),r.x=y.x,r.y=y.y,r.markRedraw();var g={align:a,verticalAlign:s};u.setStyle(g),f.setStyle(g),p=r.getBoundingRect();var b=y.margin,w=t.getItemStyle(["color","opacity"]);w.fill=t.get("backgroundColor");var x=new ws({shape:{x:p.x-b[3],y:p.y-b[0],width:p.width+b[1]+b[3],height:p.height+b[0]+b[2],r:t.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});r.add(x)}},n.type="title",n}(Nd),bB=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.layoutMode="box",i}return E(n,t),n.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i),this._initData()},n.prototype.mergeOption=function(n){t.prototype.mergeOption.apply(this,arguments),this._initData()},n.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var n=this._data.count();this.option.loop?t=(t%n+n)%n:(t>=n&&(t=n-1),t<0&&(t=0)),this.option.currentIndex=t},n.prototype.getCurrentIndex=function(){return this.option.currentIndex},n.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},n.prototype.setPlayState=function(t){this.option.autoPlay=!!t},n.prototype.getPlayState=function(){return!!this.option.autoPlay},n.prototype._initData=function(){var t,n=this.option,i=n.data||[],r=n.axisType,e=this._names=[];"category"===r?(t=[],vt(i,(function(n,i){var r,o=co(so(n),"");At(n)?(r=ot(n)).value=i:r=i,t.push(r),e.push(o)}))):t=i,(this._data=new Vy([{name:"value",type:{category:"ordinal",time:"time",value:"number"}[r]||"number"}],this)).initData(t,e)},n.prototype.getData=function(){return this._data},n.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},n.type="timeline",n.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},n}(Jf),wB=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.type="timeline.slider",n.defaultOption=Jh(bB.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),n}(bB);ft(wB,wv.prototype);var xB=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.type="timeline",n}(Nd),MB=function(t){function n(n,i,r,e){var o=t.call(this,n,i,r)||this;return o.type=e||"value",o}return E(n,t),n.prototype.getLabelModel=function(){return this.model.getModel("label")},n.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},n}(xb),SB=Math.PI,kB=yo(),AB=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.init=function(t,n){this.api=n},n.prototype.render=function(t,n,i){if(this.model=t,this.api=i,this.ecModel=n,this.group.removeAll(),t.get("show",!0)){var r=this._layout(t,i),e=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(r,t);t.formatTooltip=function(t){return rd("nameValue",{noName:!0,value:a.scale.getLabel({value:t})})},vt(["AxisLine","AxisTick","Control","CurrentPointer"],(function(n){this["_render"+n](r,e,a,t)}),this),this._renderAxisLabel(r,o,a,t),this._position(r,t)}this._doPlayStop(),this._updateTicksStatus()},n.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},n.prototype.dispose=function(){this._clearTimer()},n.prototype._layout=function(t,n){var i,r,e,o,a=t.get(["label","position"]),s=t.get("orient"),u=function(t,n){return Xf(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()},t.get("padding"))}(t,n),l={horizontal:"center",vertical:(i=null==a||"auto"===a?"horizontal"===s?u.y+u.height/2<n.getHeight()/2?"-":"+":u.x+u.width/2<n.getWidth()/2?"+":"-":Mt(a)?{horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[s][a]:a)>=0||"+"===i?"left":"right"},h={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},f={horizontal:0,vertical:SB/2},c="vertical"===s?u.height:u.width,v=t.getModel("controlStyle"),d=v.get("show",!0),p=d?v.get("itemSize"):0,m=d?v.get("itemGap"):0,y=p+m,g=t.get(["label","rotate"])||0;g=g*SB/180;var b=v.get("position",!0),w=d&&v.get("showPlayBtn",!0),x=d&&v.get("showPrevBtn",!0),M=d&&v.get("showNextBtn",!0),S=0,k=c;"left"===b||"bottom"===b?(w&&(r=[0,0],S+=y),x&&(e=[S,0],S+=y),M&&(o=[k-p,0],k-=y)):(w&&(r=[k-p,0],k-=y),x&&(e=[0,0],S+=y),M&&(o=[k-p,0],k-=y));var A=[S,k];return t.get("inverse")&&A.reverse(),{viewRect:u,mainLength:c,orient:s,rotation:f[s],labelRotation:g,labelPosOpt:i,labelAlign:t.get(["label","align"])||l[s],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||h[s],playPosition:r,prevBtnPosition:e,nextBtnPosition:o,axisExtent:A,controlSize:p,controlGap:m}},n.prototype._position=function(t){var n=this._mainGroup,i=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var e=[1,0,0,1,0,0],o=r.x,a=r.y+r.height;Xr(e,e,[-o,-a]),Gr(e,e,-SB/2),Xr(e,e,[o,a]),(r=r.clone()).applyTransform(e)}var s=p(r),u=p(n.getBoundingRect()),l=p(i.getBoundingRect()),h=[n.x,n.y],f=[i.x,i.y];f[0]=h[0]=s[0][0];var c,v=t.labelPosOpt;function d(t){t.originX=s[0][0]-t.x,t.originY=s[1][0]-t.y}function p(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function m(t,n,i,r,e){t[r]+=i[r][e]-n[r][e]}null==v||Mt(v)?(m(h,u,s,1,c="+"===v?0:1),m(f,l,s,1,1-c)):(m(h,u,s,1,c=v>=0?0:1),f[1]=h[1]+v),n.setPosition(h),i.setPosition(f),n.rotation=i.rotation=t.rotation,d(n),d(i)},n.prototype._createAxis=function(t,n){var i=n.getData(),r=n.get("axisType"),e=function(t,n){if(n=n||t.get("type"))switch(n){case"category":return new sg({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new Mg({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new lg}}(n,r);e.getTicks=function(){return i.mapArray(["value"],(function(t){return{value:t}}))};var o=i.getDataExtent("value");e.setExtent(o[0],o[1]),e.calcNiceTicks();var a=new MB("value",e,t.axisExtent,r);return a.model=n,a},n.prototype._createGroup=function(t){var n=this[t]=new Oe;return this.group.add(n),n},n.prototype._renderAxisLine=function(t,n,i,r){var e=i.getExtent();if(r.get(["lineStyle","show"])){var o=new Sl({shape:{x1:e[0],y1:0,x2:e[1],y2:0},style:ut({lineCap:"round"},r.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(o);var a=this._progressLine=new Sl({shape:{x1:e[0],x2:this._currentPointer?this._currentPointer.x:e[0],y1:0,y2:0},style:lt({lineCap:"round",lineWidth:o.style.lineWidth},r.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(a)}},n.prototype._renderAxisTick=function(t,n,i,r){var e=this,o=r.getData(),a=i.scale.getTicks();this._tickSymbols=[],vt(a,(function(t){var a=i.dataToCoord(t.value),s=o.getItemModel(t.value),u=s.getModel("itemStyle"),l=s.getModel(["emphasis","itemStyle"]),h=s.getModel(["progress","itemStyle"]),f={x:a,y:0,onclick:gt(e._changeTimeline,e,t.value)},c=NB(s,u,n,f);c.ensureState("emphasis").style=l.getItemStyle(),c.ensureState("progress").style=h.getItemStyle(),wu(c);var v=Bs(c);s.get("tooltip")?(v.dataIndex=t.value,v.dataModel=r):v.dataIndex=v.dataModel=null,e._tickSymbols.push(c)}))},n.prototype._renderAxisLabel=function(t,n,i,r){var e=this;if(i.getLabelModel().get("show")){var o=r.getData(),a=i.getViewLabels();this._tickLabels=[],vt(a,(function(r){var a=r.tickValue,s=o.getItemModel(a),u=s.getModel("label"),l=s.getModel(["emphasis","label"]),h=s.getModel(["progress","label"]),f=i.dataToCoord(r.tickValue),c=new Ss({x:f,y:0,rotation:t.labelRotation-t.rotation,onclick:gt(e._changeTimeline,e,a),silent:!1,style:Ch(u,{text:r.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});c.ensureState("emphasis").style=Ch(l),c.ensureState("progress").style=Ch(h),n.add(c),wu(c),kB(c).dataIndex=a,e._tickLabels.push(c)}))}},n.prototype._renderControl=function(t,n,i,r){var e=t.controlSize,o=t.rotation,a=r.getModel("controlStyle").getItemStyle(),s=r.getModel(["emphasis","controlStyle"]).getItemStyle(),u=r.getPlayState(),l=r.get("inverse",!0);function h(t,i,u,l){if(t){var h=xe(Ot(r.get(["controlStyle",i+"BtnSize"]),e),e),f=function(t,n,i,r){var e=r.style,o=dh(t.get(["controlStyle",n]),r||{},new ve(i[0],i[1],i[2],i[3]));return e&&o.setStyle(e),o}(r,i+"Icon",[0,-h/2,h,h],{x:t[0],y:t[1],originX:e/2,originY:0,rotation:l?-o:0,rectHover:!0,style:a,onclick:u});f.ensureState("emphasis").style=s,n.add(f),wu(f)}}h(t.nextBtnPosition,"next",gt(this._changeTimeline,this,l?"-":"+")),h(t.prevBtnPosition,"prev",gt(this._changeTimeline,this,l?"+":"-")),h(t.playPosition,u?"stop":"play",gt(this._handlePlayClick,this,!u),!0)},n.prototype._renderCurrentPointer=function(t,n,i,r){var e=r.getData(),o=r.getCurrentIndex(),a=e.getItemModel(o).getModel("checkpointStyle"),s=this;this._currentPointer=NB(a,a,this._mainGroup,{},this._currentPointer,{onCreate:function(t){t.draggable=!0,t.drift=gt(s._handlePointerDrag,s),t.ondragend=gt(s._handlePointerDragend,s),CB(t,s._progressLine,o,i,r,!0)},onUpdate:function(t){CB(t,s._progressLine,o,i,r)}})},n.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},n.prototype._handlePointerDrag=function(t,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},n.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},n.prototype._pointerChangeTimeline=function(t,n){var i=this._toAxisCoord(t)[0],r=Pe(this._axis.getExtent().slice());i>r[1]&&(i=r[1]),i<r[0]&&(i=r[0]),this._currentPointer.x=i,this._currentPointer.markRedraw(),this._progressLine.shape.x2=i,this._progressLine.dirty();var e=this._findNearestTick(i),o=this.model;(n||e!==o.getCurrentIndex()&&o.get("realtime"))&&this._changeTimeline(e)},n.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout((function(){var n=t.model;t._changeTimeline(n.getCurrentIndex()+(n.get("rewind",!0)?-1:1))}),this.model.get("playInterval")))},n.prototype._toAxisCoord=function(t){return lh(t,this._mainGroup.getLocalTransform(),!0)},n.prototype._findNearestTick=function(t){var n,i=this.model.getData(),r=1/0,e=this._axis;return i.each(["value"],(function(i,o){var a=e.dataToCoord(i),s=Math.abs(a-t);s<r&&(r=s,n=o)})),n},n.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},n.prototype._changeTimeline=function(t){var n=this.model.getCurrentIndex();"+"===t?t=n+1:"-"===t&&(t=n-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},n.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),n=this._tickSymbols,i=this._tickLabels;if(n)for(var r=0;r<n.length;r++)n&&n[r]&&n[r].toggleState("progress",r<t);if(i)for(r=0;r<i.length;r++)i&&i[r]&&i[r].toggleState("progress",kB(i[r]).dataIndex<=t)},n.type="timeline.slider",n}(xB);function NB(t,n,i,r,e,o){var a=n.get("color");e?(e.setColor(a),i.add(e),o&&o.onUpdate(e)):((e=Ep(t.get("symbol"),-1,-1,2,2,a)).setStyle("strokeNoScale",!0),i.add(e),o&&o.onCreate(e));var s=n.getItemStyle(["color"]);e.setStyle(s),r=at({rectHover:!0,z2:100},r,!0);var u=Pp(t.get("symbolSize"));r.scaleX=u[0]/2,r.scaleY=u[1]/2;var l=Wp(t.get("symbolOffset"),u);l&&(r.x=(r.x||0)+l[0],r.y=(r.y||0)+l[1]);var h=t.get("symbolRotate");return r.rotation=(h||0)*Math.PI/180||0,e.attr(r),e.updateTransform(),e}function CB(t,n,i,r,e,o){if(!t.dragging){var a=e.getModel("checkpointStyle"),s=r.dataToCoord(e.getData().get("value",i));if(o||!a.get("animation",!0))t.attr({x:s,y:0}),n&&n.attr({shape:{x2:s}});else{var u={duration:a.get("animationDuration",!0),easing:a.get("animationEasing",!0)};t.stopAnimation(null,!0),t.animateTo({x:s,y:0},u),n&&n.animateTo({shape:{x2:s}},u)}}}function TB(t){var n=t&&t.timeline;wt(n)||(n=n?[n]:[]),vt(n,(function(t){t&&function(t){var n=t.type,i={number:"value",time:"time"};if(i[n]&&(t.axisType=i[n],delete t.type),zB(t),IB(t,"controlPosition")){var r=t.controlStyle||(t.controlStyle={});IB(r,"position")||(r.position=t.controlPosition),"none"!==r.position||IB(r,"show")||(r.show=!1,delete r.position),delete t.controlPosition}vt(t.data||[],(function(t){At(t)&&!wt(t)&&(!IB(t,"value")&&IB(t,"name")&&(t.value=t.name),zB(t))}))}(t)}))}function zB(t){var n=t.itemStyle||(t.itemStyle={}),i=n.emphasis||(n.emphasis={}),r=t.label||t.label||{},e=r.normal||(r.normal={}),o={normal:1,emphasis:1};vt(r,(function(t,n){o[n]||IB(e,n)||(e[n]=t)})),i.label&&!IB(r,"emphasis")&&(r.emphasis=i.label,delete i.label)}function IB(t,n){return t.hasOwnProperty(n)}function LB(t,n){if(!t)return!1;for(var i=wt(t)?t:[t],r=0;r<i.length;r++)if(i[r]&&i[r][n])return!0;return!1}function OB(t){oo(t,"label",["show"])}var DB=yo(),RB=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.createdBySelf=!1,i}return E(n,t),n.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},n.prototype.isAnimationEnabled=function(){if(W.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},n.prototype.mergeOption=function(t,n){this._mergeOption(t,n,!1,!1)},n.prototype._mergeOption=function(t,n,i,r){var e=this.mainType;i||n.eachSeries((function(t){var i=t.get(this.mainType,!0),o=DB(t)[e];i&&i.data?(o?o._mergeOption(i,n,!0):(r&&OB(i),vt(i.data,(function(t){t instanceof Array?(OB(t[0]),OB(t[1])):OB(t)})),ut(o=this.createMarkerModelFromSeries(i,this,n),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),o.__hostSeries=t),DB(t)[e]=o):DB(t)[e]=null}),this)},n.prototype.formatTooltip=function(t){var n=this.getData(),i=this.getRawValue(t),r=n.getName(t);return rd("section",{header:this.name,blocks:[rd("nameValue",{name:r,value:i,noName:!r,noValue:null==i})]})},n.prototype.getData=function(){return this._data},n.prototype.setData=function(t){this._data=t},n.getMarkerModelFromSeries=function(t,n){return DB(t)[n]},n.type="marker",n.dependencies=["series","grid","polar","geo"],n}(Jf);ft(RB,wv.prototype);var _B=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.createMarkerModelFromSeries=function(t,i,r){return new n(t,i,r)},n.type="markPoint",n.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},n}(RB);function BB(t,n,i,r,e,o){var a=[],s=Uy(n,r)?n.getCalculationInfo("stackResultDimension"):r,u=jB(n,s,t),l=n.indicesOfNearest(s,u)[0];a[e]=n.get(i,l),a[o]=n.get(s,l);var h=n.get(r,l),f=We(n.get(r,l));return(f=Math.min(f,20))>=0&&(a[o]=+a[o].toFixed(f)),[a,h]}var FB={min:bt(BB,"min"),max:bt(BB,"max"),average:bt(BB,"average"),median:bt(BB,"median")};function EB(t,n){var i=t.getData(),r=t.coordinateSystem;if(n&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(n)&&!wt(n.coord)&&r){var e=r.dimensions,o=PB(n,i,r,t);if((n=ot(n)).type&&FB[n.type]&&o.baseAxis&&o.valueAxis){var a=ht(e,o.baseAxis.dim),s=ht(e,o.valueAxis.dim),u=FB[n.type](i,o.baseDataDim,o.valueDataDim,a,s);n.coord=u[0],n.value=u[1]}else{for(var l=[null!=n.xAxis?n.xAxis:n.radiusAxis,null!=n.yAxis?n.yAxis:n.angleAxis],h=0;h<2;h++)FB[l[h]]&&(l[h]=jB(i,i.mapDimension(e[h]),l[h]));n.coord=l}}return n}function PB(t,n,i,r){var e={};return null!=t.valueIndex||null!=t.valueDim?(e.valueDataDim=null!=t.valueIndex?n.getDimension(t.valueIndex):t.valueDim,e.valueAxis=i.getAxis(function(t,n){var i=t.getData().getDimensionInfo(n);return i&&i.coordDim}(r,e.valueDataDim)),e.baseAxis=i.getOtherAxis(e.valueAxis),e.baseDataDim=n.mapDimension(e.baseAxis.dim)):(e.baseAxis=r.getBaseAxis(),e.valueAxis=i.getOtherAxis(e.baseAxis),e.baseDataDim=n.mapDimension(e.baseAxis.dim),e.valueDataDim=n.mapDimension(e.valueAxis.dim)),e}function WB(t,n){return!(t&&t.containData&&n.coord&&!function(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}(n))||t.containData(n.coord)}function VB(t,n){return t?function(t,i,r,e){return Av(e<2?t.coord&&t.coord[e]:t.value,n[e])}:function(t,i,r,e){return Av(t.value,n[e])}}function jB(t,n,i){if("average"===i){var r=0,e=0;return t.each(n,(function(t){isNaN(t)||(r+=t,e++)})),r/e}return"median"===i?t.getMedian(n):t.getDataExtent(n)["max"===i?1:0]}var HB=yo(),YB=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.init=function(){this.markerGroupMap=Vt()},n.prototype.render=function(t,n,i){var r=this,e=this.markerGroupMap;e.each((function(t){HB(t).keep=!1})),n.eachSeries((function(t){var e=RB.getMarkerModelFromSeries(t,r.type);e&&r.renderSeries(t,e,n,i)})),e.each((function(t){!HB(t).keep&&r.group.remove(t.group)}))},n.prototype.markKeep=function(t){HB(t).keep=!0},n.prototype.toggleBlurSeries=function(t,n){var i=this;vt(t,(function(t){var r=RB.getMarkerModelFromSeries(t,i.type);r&&r.getData().eachItemGraphicEl((function(t){t&&(n?lu(t):hu(t))}))}))},n.type="marker",n}(Nd);function XB(t,n,i){var r=n.coordinateSystem;t.each((function(e){var o,a=t.getItemModel(e),s=Fe(a.get("x"),i.getWidth()),u=Fe(a.get("y"),i.getHeight());if(isNaN(s)||isNaN(u)){if(n.getMarkerPosition)o=n.getMarkerPosition(t.getValues(t.dimensions,e));else if(r){var l=t.get(r.dimensions[0],e),h=t.get(r.dimensions[1],e);o=r.dataToPoint([l,h])}}else o=[s,u];isNaN(s)||(o[0]=s),isNaN(u)||(o[1]=u),t.setItemLayout(e,o)}))}var GB=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.updateTransform=function(t,n,i){n.eachSeries((function(t){var n=RB.getMarkerModelFromSeries(t,"markPoint");n&&(XB(n.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout())}),this)},n.prototype.renderSeries=function(t,n,i,r){var e=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,u=s.get(o)||s.set(o,new xx),l=function(t,n,i){var r;r=t?dt(t&&t.dimensions,(function(t){return ut(ut({},n.getData().getDimensionInfo(n.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var e=new Vy(r,i),o=dt(i.get("data"),bt(EB,n));t&&(o=mt(o,bt(WB,t)));var a=VB(!!t,r);return e.initData(o,null,a),e}(e,t,n);n.setData(l),XB(n.getData(),t,r),l.each((function(t){var i=l.getItemModel(t),r=i.getShallow("symbol"),e=i.getShallow("symbolSize"),o=i.getShallow("symbolRotate"),s=i.getShallow("symbolOffset"),u=i.getShallow("symbolKeepAspect");if(xt(r)||xt(e)||xt(o)||xt(s)){var h=n.getRawValue(t),f=n.getDataParams(t);xt(r)&&(r=r(h,f)),xt(e)&&(e=e(h,f)),xt(o)&&(o=o(h,f)),xt(s)&&(s=s(h,f))}var c=i.getModel("itemStyle").getItemStyle(),v=Mp(a,"color");c.fill||(c.fill=v),l.setItemVisual(t,{symbol:r,symbolSize:e,symbolRotate:o,symbolOffset:s,symbolKeepAspect:u,style:c})})),u.updateData(l),this.group.add(u.group),l.eachItemGraphicEl((function(t){t.traverse((function(t){Bs(t).dataModel=n}))})),this.markKeep(u),u.group.silent=n.get("silent")||t.get("silent")},n.type="markPoint",n}(YB),UB=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.createMarkerModelFromSeries=function(t,i,r){return new n(t,i,r)},n.type="markLine",n.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},n}(RB),ZB=yo(),qB=function(t,n,i,r){var e,o=t.getData();if(wt(r))e=r;else{var a=r.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=r.xAxis||null!=r.yAxis){var s=void 0,u=void 0;if(null!=r.yAxis||null!=r.xAxis)s=n.getAxis(null!=r.yAxis?"y":"x"),u=Lt(r.yAxis,r.xAxis);else{var l=PB(r,o,n,t);s=l.valueAxis,u=jB(o,Zy(o,l.valueDataDim),a)}var h="x"===s.dim?0:1,f=1-h,c=ot(r),v={coord:[]};c.type=null,c.coord=[],c.coord[f]=-1/0,v.coord[f]=1/0;var d=i.get("precision");d>=0&&kt(u)&&(u=+u.toFixed(Math.min(d,20))),c.coord[h]=v.coord[h]=u,e=[c,v,{type:a,valueIndex:r.valueIndex,value:u}]}else e=[]}var p=[EB(t,e[0]),EB(t,e[1]),ut({},e[2])];return p[2].type=p[2].type||null,at(p[2],p[0]),at(p[2],p[1]),p};function $B(t){return!isNaN(t)&&!isFinite(t)}function KB(t,n,i,r){var e=1-t,o=r.dimensions[t];return $B(n[e])&&$B(i[e])&&n[t]===i[t]&&r.getAxis(o).containData(n[t])}function JB(t,n){if("cartesian2d"===t.type){var i=n[0].coord,r=n[1].coord;if(i&&r&&(KB(1,i,r,t)||KB(0,i,r,t)))return!0}return WB(t,n[0])&&WB(t,n[1])}function QB(t,n,i,r,e){var o,a=r.coordinateSystem,s=t.getItemModel(n),u=Fe(s.get("x"),e.getWidth()),l=Fe(s.get("y"),e.getHeight());if(isNaN(u)||isNaN(l)){if(r.getMarkerPosition)o=r.getMarkerPosition(t.getValues(t.dimensions,n));else{var h=t.get((c=a.dimensions)[0],n),f=t.get(c[1],n);o=a.dataToPoint([h,f])}if(_x(a,"cartesian2d")){var c,v=a.getAxis("x"),d=a.getAxis("y");$B(t.get((c=a.dimensions)[0],n))?o[0]=v.toGlobalCoord(v.getExtent()[i?0:1]):$B(t.get(c[1],n))&&(o[1]=d.toGlobalCoord(d.getExtent()[i?0:1]))}isNaN(u)||(o[0]=u),isNaN(l)||(o[1]=l)}else o=[u,l];t.setItemLayout(n,o)}var tF=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.updateTransform=function(t,n,i){n.eachSeries((function(t){var n=RB.getMarkerModelFromSeries(t,"markLine");if(n){var r=n.getData(),e=ZB(n).from,o=ZB(n).to;e.each((function(n){QB(e,n,!0,t,i),QB(o,n,!1,t,i)})),r.each((function(t){r.setItemLayout(t,[e.getItemLayout(t),o.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},n.prototype.renderSeries=function(t,n,i,r){var e=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,u=s.get(o)||s.set(o,new LC);this.group.add(u.group);var l=function(t,n,i){var r;r=t?dt(t&&t.dimensions,(function(t){return ut(ut({},n.getData().getDimensionInfo(n.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var e=new Vy(r,i),o=new Vy(r,i),a=new Vy([],i),s=dt(i.get("data"),bt(qB,n,t,i));t&&(s=mt(s,bt(JB,t)));var u=VB(!!t,r);return e.initData(dt(s,(function(t){return t[0]})),null,u),o.initData(dt(s,(function(t){return t[1]})),null,u),a.initData(dt(s,(function(t){return t[2]}))),a.hasItemOption=!0,{from:e,to:o,line:a}}(e,t,n),h=l.from,f=l.to,c=l.line;ZB(n).from=h,ZB(n).to=f,n.setData(c);var v=n.get("symbol"),d=n.get("symbolSize"),p=n.get("symbolRotate"),m=n.get("symbolOffset");function y(n,i,e){var o=n.getItemModel(i);QB(n,i,e,t,r);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=Mp(a,"color")),n.setItemVisual(i,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:Ot(o.get("symbolOffset",!0),m[e?0:1]),symbolRotate:Ot(o.get("symbolRotate",!0),p[e?0:1]),symbolSize:Ot(o.get("symbolSize"),d[e?0:1]),symbol:Ot(o.get("symbol",!0),v[e?0:1]),style:s})}wt(v)||(v=[v,v]),wt(d)||(d=[d,d]),wt(p)||(p=[p,p]),wt(m)||(m=[m,m]),l.from.each((function(t){y(h,t,!0),y(f,t,!1)})),c.each((function(t){var n=c.getItemModel(t).getModel("lineStyle").getLineStyle();c.setItemLayout(t,[h.getItemLayout(t),f.getItemLayout(t)]),null==n.stroke&&(n.stroke=h.getItemVisual(t,"style").fill),c.setItemVisual(t,{fromSymbolKeepAspect:h.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(t,"symbolOffset"),fromSymbolRotate:h.getItemVisual(t,"symbolRotate"),fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolKeepAspect:f.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:f.getItemVisual(t,"symbolOffset"),toSymbolRotate:f.getItemVisual(t,"symbolRotate"),toSymbolSize:f.getItemVisual(t,"symbolSize"),toSymbol:f.getItemVisual(t,"symbol"),style:n})})),u.updateData(c),l.line.eachItemGraphicEl((function(t){t.traverse((function(t){Bs(t).dataModel=n}))})),this.markKeep(u),u.group.silent=n.get("silent")||t.get("silent")},n.type="markLine",n}(YB),nF=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.createMarkerModelFromSeries=function(t,i,r){return new n(t,i,r)},n.type="markArea",n.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},n}(RB),iF=yo(),rF=function(t,n,i,r){var e=EB(t,r[0]),o=EB(t,r[1]),a=e.coord,s=o.coord;a[0]=Lt(a[0],-1/0),a[1]=Lt(a[1],-1/0),s[0]=Lt(s[0],1/0),s[1]=Lt(s[1],1/0);var u=st([{},e,o]);return u.coord=[e.coord,o.coord],u.x0=e.x,u.y0=e.y,u.x1=o.x,u.y1=o.y,u};function eF(t){return!isNaN(t)&&!isFinite(t)}function oF(t,n,i){var r=1-t;return eF(n[r])&&eF(i[r])}function aF(t,n){var i=n.coord[0],r=n.coord[1];return!!(_x(t,"cartesian2d")&&i&&r&&(oF(1,i,r)||oF(0,i,r)))||WB(t,{coord:i,x:n.x0,y:n.y0})||WB(t,{coord:r,x:n.x1,y:n.y1})}function sF(t,n,i,r,e){var o,a=r.coordinateSystem,s=t.getItemModel(n),u=Fe(s.get(i[0]),e.getWidth()),l=Fe(s.get(i[1]),e.getHeight());if(isNaN(u)||isNaN(l)){if(r.getMarkerPosition)o=r.getMarkerPosition(t.getValues(i,n));else{var h=[v=t.get(i[0],n),d=t.get(i[1],n)];a.clampData&&a.clampData(h,h),o=a.dataToPoint(h,!0)}if(_x(a,"cartesian2d")){var f=a.getAxis("x"),c=a.getAxis("y"),v=t.get(i[0],n),d=t.get(i[1],n);eF(v)?o[0]=f.toGlobalCoord(f.getExtent()["x0"===i[0]?0:1]):eF(d)&&(o[1]=c.toGlobalCoord(c.getExtent()["y0"===i[1]?0:1]))}isNaN(u)||(o[0]=u),isNaN(l)||(o[1]=l)}else o=[u,l];return o}var uF=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],lF=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.updateTransform=function(t,n,i){n.eachSeries((function(t){var n=RB.getMarkerModelFromSeries(t,"markArea");if(n){var r=n.getData();r.each((function(n){var e=dt(uF,(function(e){return sF(r,n,e,t,i)}));r.setItemLayout(n,e),r.getItemGraphicEl(n).setShape("points",e)}))}}),this)},n.prototype.renderSeries=function(t,n,i,r){var e=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,u=s.get(o)||s.set(o,{group:new Oe});this.group.add(u.group),this.markKeep(u);var l=function(t,n,i){var r,e;if(t){var o=dt(t&&t.dimensions,(function(t){var i=n.getData();return ut(ut({},i.getDimensionInfo(i.mapDimension(t))||{}),{name:t,ordinalMeta:null})}));e=dt(["x0","y0","x1","y1"],(function(t,n){return{name:t,type:o[n%2].type}})),r=new Vy(e,i)}else r=new Vy(e=[{name:"value",type:"float"}],i);var a=dt(i.get("data"),bt(rF,n,t,i));return t&&(a=mt(a,bt(aF,t))),r.initData(a,null,t?function(t,n,i,r){return Av(t.coord[Math.floor(r/2)][r%2],e[r])}:function(t,n,i,r){return Av(t.value,e[r])}),r.hasItemOption=!0,r}(e,t,n);n.setData(l),l.each((function(n){var i=dt(uF,(function(i){return sF(l,n,i,t,r)})),o=e.getAxis("x").scale,s=e.getAxis("y").scale,u=o.getExtent(),h=s.getExtent(),f=[o.parse(l.get("x0",n)),o.parse(l.get("x1",n))],c=[s.parse(l.get("y0",n)),s.parse(l.get("y1",n))];Pe(f),Pe(c),l.setItemLayout(n,{points:i,allClipped:!!(u[0]>f[1]||u[1]<f[0]||h[0]>c[1]||h[1]<c[0])});var v=l.getItemModel(n).getModel("itemStyle").getItemStyle(),d=Mp(a,"color");v.fill||(v.fill=d,Mt(v.fill)&&(v.fill=Xi(v.fill,.4))),v.stroke||(v.stroke=d),l.setItemVisual(n,"style",v)})),l.diff(iF(u).data).add((function(t){var n=l.getItemLayout(t);if(!n.allClipped){var i=new gl({shape:{points:n.points}});l.setItemGraphicEl(t,i),u.group.add(i)}})).update((function(t,i){var r=iF(u).data.getItemGraphicEl(i),e=l.getItemLayout(t);e.allClipped?r&&u.group.remove(r):(r?Yl(r,{shape:{points:e.points}},n,t):r=new gl({shape:{points:e.points}}),l.setItemGraphicEl(t,r),u.group.add(r))})).remove((function(t){var n=iF(u).data.getItemGraphicEl(t);u.group.remove(n)})).execute(),l.eachItemGraphicEl((function(t,i){var r=l.getItemModel(i),e=l.getItemVisual(i,"style");t.useStyle(l.getItemVisual(i,"style")),Ah(t,Nh(r),{labelFetcher:n,labelDataIndex:i,defaultText:l.getName(i)||"",inheritColor:Mt(e.fill)?Xi(e.fill,1):"#000"}),Au(t,r),xu(t,null,null,r.get(["emphasis","disabled"])),Bs(t).dataModel=n})),iF(u).data=l,u.group.silent=n.get("silent")||t.get("silent")},n.type="markArea",n}(YB),hF=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.layoutMode={type:"box",ignoreSize:!0},i}return E(n,t),n.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},n.prototype.mergeOption=function(n,i){t.prototype.mergeOption.call(this,n,i),this._updateSelector(n)},n.prototype._updateSelector=function(t){var n=t.selector,i=this.ecModel;!0===n&&(n=t.selector=["all","inverse"]),wt(n)&&vt(n,(function(t,r){Mt(t)&&(t={type:t}),n[r]=at(t,function(t,n){return"all"===n?{type:"all",title:t.getLocaleModel().get(["legend","selector","all"])}:"inverse"===n?{type:"inverse",title:t.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(i,t.type))}))},n.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var n=!1,i=0;i<t.length;i++){var r=t[i].get("name");if(this.isSelected(r)){this.select(r),n=!0;break}}!n&&this.select(t[0].get("name"))}},n.prototype._updateData=function(t){var n=[],i=[];t.eachRawSeries((function(r){var e;if(i.push(r.name),r.legendVisualProvider){var o=r.legendVisualProvider.getAllNames();t.isSeriesFiltered(r)||(i=i.concat(o)),o.length?n=n.concat(o):e=!0}else e=!0;e&&vo(r)&&n.push(r.name)})),this._availableNames=i;var r=dt(this.get("data")||n,(function(t){return(Mt(t)||kt(t))&&(t={name:t}),new qh(t,this,this.ecModel)}),this);this._data=r},n.prototype.getData=function(){return this._data},n.prototype.select=function(t){var n=this.option.selected;"single"===this.get("selectedMode")&&vt(this._data,(function(t){n[t.get("name")]=!1})),n[t]=!0},n.prototype.unSelect=function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},n.prototype.toggleSelected=function(t){var n=this.option.selected;n.hasOwnProperty(t)||(n[t]=!0),this[n[t]?"unSelect":"select"](t)},n.prototype.allSelect=function(){var t=this.option.selected;vt(this._data,(function(n){t[n.get("name",!0)]=!0}))},n.prototype.inverseSelect=function(){var t=this.option.selected;vt(this._data,(function(n){var i=n.get("name",!0);t.hasOwnProperty(i)||(t[i]=!0),t[i]=!t[i]}))},n.prototype.isSelected=function(t){var n=this.option.selected;return!(n.hasOwnProperty(t)&&!n[t])&&ht(this._availableNames,t)>=0},n.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},n.type="legend.plain",n.dependencies=["series"],n.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",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:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},n}(Jf),fF=bt,cF=vt,vF=Oe,dF=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.newlineDisabled=!1,i}return E(n,t),n.prototype.init=function(){this.group.add(this._contentGroup=new vF),this.group.add(this._selectorGroup=new vF),this._isFirstRender=!0},n.prototype.getContentGroup=function(){return this._contentGroup},n.prototype.getSelectorGroup=function(){return this._selectorGroup},n.prototype.render=function(t,n,i){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var e=t.get("align"),o=t.get("orient");e&&"auto"!==e||(e="right"===t.get("left")&&"vertical"===o?"right":"left");var a=t.get("selector",!0),s=t.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(e,t,n,i,a,o,s);var u=t.getBoxLayoutParams(),l={width:i.getWidth(),height:i.getHeight()},h=t.get("padding"),f=Xf(u,l,h),c=this.layoutInner(t,e,f,r,a,s),v=Xf(lt({width:c.width,height:c.height},u),l,h);this.group.x=v.x-c.x,this.group.y=v.y-c.y,this.group.markRedraw(),this.group.add(this._backgroundEl=JR(c,t))}},n.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},n.prototype.renderInner=function(t,n,i,r,e,o,a){var s=this.getContentGroup(),u=Vt(),l=n.get("selectedMode"),h=[];i.eachRawSeries((function(t){!t.get("legendHoverLink")&&h.push(t.id)})),cF(n.getData(),(function(e,o){var a=e.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var f=new vF;return f.newline=!0,void s.add(f)}var c=i.getSeriesByName(a)[0];if(!u.get(a))if(c){var v=c.getData(),d=v.getVisual("legendLineStyle")||{},p=v.getVisual("legendIcon"),m=v.getVisual("style");this._createItem(c,a,o,e,n,t,d,m,p,l).on("click",fF(pF,a,null,r,h)).on("mouseover",fF(yF,c.name,null,r,h)).on("mouseout",fF(gF,c.name,null,r,h)),u.set(a,!0)}else i.eachRawSeries((function(i){if(!u.get(a)&&i.legendVisualProvider){var s=i.legendVisualProvider;if(!s.containName(a))return;var f=s.indexOfName(a),c=s.getItemVisual(f,"style"),v=s.getItemVisual(f,"legendIcon"),d=Wi(c.fill);d&&0===d[3]&&(d[3]=.2,c=ut(ut({},c),{fill:Gi(d,"rgba")})),this._createItem(i,a,o,e,n,t,{},c,v,l).on("click",fF(pF,null,a,r,h)).on("mouseover",fF(yF,null,a,r,h)).on("mouseout",fF(gF,null,a,r,h)),u.set(a,!0)}}),this)}),this),e&&this._createSelector(e,n,r,o,a)},n.prototype._createSelector=function(t,n,i){var r=this.getSelectorGroup();cF(t,(function(t){var e=t.type,o=new Ss({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:"all"===e?"legendAllSelect":"legendInverseSelect"})}});r.add(o),Ah(o,{normal:n.getModel("selectorLabel"),emphasis:n.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),wu(o)}))},n.prototype._createItem=function(t,n,i,r,e,o,a,s,u,l){var h,f,c,v=t.visualDrawType,d=e.get("itemWidth"),p=e.get("itemHeight"),m=e.isSelected(n),y=r.get("symbolRotate"),g=r.get("symbolKeepAspect"),b=r.get("icon"),w=function(t,n,i,r,e,o){function a(t,n){"auto"===t.lineWidth&&(t.lineWidth=n.lineWidth>0?2:0),cF(t,(function(i,r){"inherit"===t[r]&&(t[r]=n[r])}))}var s=n.getModel("itemStyle").getItemStyle(),u=0===t.lastIndexOf("empty",0)?"fill":"stroke";s.decal=r.decal,"inherit"===s.fill&&(s.fill=r[e]),"inherit"===s.stroke&&(s.stroke=r[u]),"inherit"===s.opacity&&(s.opacity=("fill"===e?r:i).opacity),a(s,r);var l=n.getModel("lineStyle"),h=l.getLineStyle();if(a(h,i),"auto"===s.fill&&(s.fill=r.fill),"auto"===s.stroke&&(s.stroke=r.fill),"auto"===h.stroke&&(h.stroke=r.fill),!o){var f=n.get("inactiveBorderWidth");s.lineWidth="auto"===f?r.lineWidth>0&&s[u]?2:0:s.lineWidth,s.fill=n.get("inactiveColor"),s.stroke=n.get("inactiveBorderColor"),h.stroke=l.get("inactiveColor"),h.lineWidth=l.get("inactiveWidth")}return{itemStyle:s,lineStyle:h}}(u=b||u||"roundRect",r,a,s,v,m),x=new vF,M=r.getModel("textStyle");if(!xt(t.getLegendIcon)||b&&"inherit"!==b){var S="inherit"===b&&t.getData().getVisual("symbol")?"inherit"===y?t.getData().getVisual("symbolRotate"):y:0;x.add(((c=Ep(f=(h={itemWidth:d,itemHeight:p,icon:u,iconRotate:S,itemStyle:w.itemStyle,lineStyle:w.lineStyle,symbolKeepAspect:g}).icon||"roundRect",0,0,h.itemWidth,h.itemHeight,h.itemStyle.fill,h.symbolKeepAspect)).setStyle(h.itemStyle),c.rotation=(h.iconRotate||0)*Math.PI/180,c.setOrigin([h.itemWidth/2,h.itemHeight/2]),f.indexOf("empty")>-1&&(c.style.stroke=c.style.fill,c.style.fill="#fff",c.style.lineWidth=2),c))}else x.add(t.getLegendIcon({itemWidth:d,itemHeight:p,icon:u,iconRotate:y,itemStyle:w.itemStyle,lineStyle:w.lineStyle,symbolKeepAspect:g}));var k="left"===o?d+5:-5,A=o,N=e.get("formatter"),C=n;Mt(N)&&N?C=N.replace("{name}",null!=n?n:""):xt(N)&&(C=N(n));var T=r.get("inactiveColor");x.add(new Ss({style:Ch(M,{text:C,x:k,y:p/2,fill:m?M.getTextColor():T,align:A,verticalAlign:"middle"})}));var z=new ws({shape:x.getBoundingRect(),invisible:!0}),I=r.getModel("tooltip");return I.get("show")&&gh({el:z,componentModel:e,itemName:n,itemTooltipOption:I.option}),x.add(z),x.eachChild((function(t){t.silent=!0})),z.silent=!l,this.getContentGroup().add(x),wu(x),x.__legendDataIndex=i,x},n.prototype.layoutInner=function(t,n,i,r,e,o){var a=this.getContentGroup(),s=this.getSelectorGroup();Yf(t.get("orient"),a,t.get("itemGap"),i.width,i.height);var u=a.getBoundingRect(),l=[-u.x,-u.y];if(s.markRedraw(),a.markRedraw(),e){Yf("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),f=[-h.x,-h.y],c=t.get("selectorButtonGap",!0),v=t.getOrient().index,d=0===v?"width":"height",p=0===v?"height":"width",m=0===v?"y":"x";"end"===o?f[v]+=u[d]+c:l[v]+=h[d]+c,f[1-v]+=u[p]/2-h[p]/2,s.x=f[0],s.y=f[1],a.x=l[0],a.y=l[1];var y={x:0,y:0};return y[d]=u[d]+c+h[d],y[p]=Math.max(u[p],h[p]),y[m]=Math.min(0,h[m]+f[1-v]),y}return a.x=l[0],a.y=l[1],this.group.getBoundingRect()},n.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},n.type="legend.plain",n}(Nd);function pF(t,n,i,r){gF(t,n,i,r),i.dispatchAction({type:"legendToggleSelect",name:null!=t?t:n}),yF(t,n,i,r)}function mF(t){for(var n,i=t.getZr().storage.getDisplayList(),r=0,e=i.length;r<e&&!(n=i[r].states.emphasis);)r++;return n&&n.hoverLayer}function yF(t,n,i,r){mF(i)||i.dispatchAction({type:"highlight",seriesName:t,name:n,excludeSeriesId:r})}function gF(t,n,i,r){mF(i)||i.dispatchAction({type:"downplay",seriesName:t,name:n,excludeSeriesId:r})}function bF(t){var n=t.findComponents({mainType:"legend"});n&&n.length&&t.filterSeries((function(t){for(var i=0;i<n.length;i++)if(!n[i].isSelected(t.name))return!1;return!0}))}function wF(t,n,i){var r,e={},o="toggleSelected"===t;return i.eachComponent("legend",(function(i){o&&null!=r?i[r?"select":"unSelect"](n.name):"allSelect"===t||"inverseSelect"===t?i[t]():(i[t](n.name),r=i.isSelected(n.name)),vt(i.getData(),(function(t){var n=t.get("name");if("\n"!==n&&""!==n){var r=i.isSelected(n);e[n]=e.hasOwnProperty(n)?e[n]&&r:r}}))})),"allSelect"===t||"inverseSelect"===t?{selected:e}:{name:n.name,selected:e}}function xF(t){t.registerComponentModel(hF),t.registerComponentView(dF),t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER,bF),t.registerSubTypeDefaulter("legend",(function(){return"plain"})),function(t){t.registerAction("legendToggleSelect","legendselectchanged",bt(wF,"toggleSelected")),t.registerAction("legendAllSelect","legendselectall",bt(wF,"allSelect")),t.registerAction("legendInverseSelect","legendinverseselect",bt(wF,"inverseSelect")),t.registerAction("legendSelect","legendselected",bt(wF,"select")),t.registerAction("legendUnSelect","legendunselected",bt(wF,"unSelect"))}(t)}var MF=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},n.prototype.init=function(n,i,r){var e=qf(n);t.prototype.init.call(this,n,i,r),SF(this,n,e)},n.prototype.mergeOption=function(n,i){t.prototype.mergeOption.call(this,n,i),SF(this,this.option,n)},n.type="legend.scroll",n.defaultOption=Jh(hF.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:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),n}(hF);function SF(t,n,i){var r=[1,1];r[t.getOrient().index]=0,Zf(n,i,{type:"box",ignoreSize:!!r})}var kF=Oe,AF=["width","height"],NF=["x","y"],CF=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.newlineDisabled=!0,i._currentIndex=0,i}return E(n,t),n.prototype.init=function(){t.prototype.init.call(this),this.group.add(this._containerGroup=new kF),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new kF)},n.prototype.resetInner=function(){t.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},n.prototype.renderInner=function(n,i,r,e,o,a,s){var u=this;t.prototype.renderInner.call(this,n,i,r,e,o,a,s);var l=this._controllerGroup,h=i.get("pageIconSize",!0),f=wt(h)?h:[h,h];v("pagePrev",0);var c=i.getModel("pageTextStyle");function v(t,n){var r=t+"DataIndex",o=dh(i.get("pageIcons",!0)[i.getOrient().name][n],{onclick:gt(u._pageGo,u,r,i,e)},{x:-f[0]/2,y:-f[1]/2,width:f[0],height:f[1]});o.name=t,l.add(o)}l.add(new Ss({name:"pageText",style:{text:"xx/xx",fill:c.getTextColor(),font:c.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),v("pageNext",1)},n.prototype.layoutInner=function(t,n,i,r,e,o){var a=this.getSelectorGroup(),s=t.getOrient().index,u=AF[s],l=NF[s],h=AF[1-s],f=NF[1-s];e&&Yf("horizontal",a,t.get("selectorItemGap",!0));var c=t.get("selectorButtonGap",!0),v=a.getBoundingRect(),d=[-v.x,-v.y],p=ot(i);e&&(p[u]=i[u]-v[u]-c);var m=this._layoutContentAndController(t,r,p,s,u,h,f,l);if(e){if("end"===o)d[s]+=m[u]+c;else{var y=v[u]+c;d[s]-=y,m[l]-=y}m[u]+=v[u]+c,d[1-s]+=m[f]+m[h]/2-v[h]/2,m[h]=Math.max(m[h],v[h]),m[f]=Math.min(m[f],v[f]+d[1-s]),a.x=d[0],a.y=d[1],a.markRedraw()}return m},n.prototype._layoutContentAndController=function(t,n,i,r,e,o,a,s){var u=this.getContentGroup(),l=this._containerGroup,h=this._controllerGroup;Yf(t.get("orient"),u,t.get("itemGap"),r?i.width:null,r?null:i.height),Yf("horizontal",h,t.get("pageButtonItemGap",!0));var f=u.getBoundingRect(),c=h.getBoundingRect(),v=this._showController=f[e]>i[e],d=[-f.x,-f.y];n||(d[r]=u[s]);var p=[0,0],m=[-c.x,-c.y],y=Ot(t.get("pageButtonGap",!0),t.get("itemGap",!0));v&&("end"===t.get("pageButtonPosition",!0)?m[r]+=i[e]-c[e]:p[r]+=c[e]+y),m[1-r]+=f[o]/2-c[o]/2,u.setPosition(d),l.setPosition(p),h.setPosition(m);var g={x:0,y:0};if(g[e]=v?i[e]:f[e],g[o]=Math.max(f[o],c[o]),g[a]=Math.min(0,c[a]+m[1-r]),l.__rectSize=i[e],v){var b={x:0,y:0};b[e]=Math.max(i[e]-c[e]-y,0),b[o]=g[o],l.setClipPath(new ws({shape:b})),l.__rectSize=b[e]}else h.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var w=this._getPageInfo(t);return null!=w.pageIndex&&Yl(u,{x:w.contentPosition[0],y:w.contentPosition[1]},v?t:null),this._updatePageInfoView(t,w),g},n.prototype._pageGo=function(t,n,i){var r=this._getPageInfo(n)[t];null!=r&&i.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:n.id})},n.prototype._updatePageInfoView=function(t,n){var i=this._controllerGroup;vt(["pagePrev","pageNext"],(function(r){var e=null!=n[r+"DataIndex"],o=i.childOfName(r);o&&(o.setStyle("fill",t.get(e?"pageIconColor":"pageIconInactiveColor",!0)),o.cursor=e?"pointer":"default")}));var r=i.childOfName("pageText"),e=t.get("pageFormatter"),o=n.pageIndex,a=null!=o?o+1:0,s=n.pageCount;r&&e&&r.setStyle("text",Mt(e)?e.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):e({current:a,total:s}))},n.prototype._getPageInfo=function(t){var n=t.get("scrollDataIndex",!0),i=this.getContentGroup(),r=this._containerGroup.__rectSize,e=t.getOrient().index,o=AF[e],a=NF[e],s=this._findTargetItemIndex(n),u=i.children(),l=u[s],h=u.length,f=h?1:0,c={contentPosition:[i.x,i.y],pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return c;var v=g(l);c.contentPosition[e]=-v.s;for(var d=s+1,p=v,m=v,y=null;d<=h;++d)(!(y=g(u[d]))&&m.e>p.s+r||y&&!b(y,p.s))&&(p=m.i>p.i?m:y)&&(null==c.pageNextDataIndex&&(c.pageNextDataIndex=p.i),++c.pageCount),m=y;for(d=s-1,p=v,m=v,y=null;d>=-1;--d)(y=g(u[d]))&&b(m,y.s)||!(p.i<m.i)||(m=p,null==c.pagePrevDataIndex&&(c.pagePrevDataIndex=p.i),++c.pageCount,++c.pageIndex),p=y;return c;function g(t){if(t){var n=t.getBoundingRect(),i=n[a]+t[a];return{s:i,e:i+n[o],i:t.__legendDataIndex}}}function b(t,n){return t.e>=n&&t.s<=n+r}},n.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(r,e){var o=r.__legendDataIndex;null==i&&null!=o&&(i=e),o===t&&(n=e)})),null!=n?n:i):0;var n,i},n.type="legend.scroll",n}(dF);function TF(t){dy(xF),t.registerComponentModel(MF),t.registerComponentView(CF),function(t){t.registerAction("legendScroll","legendscroll",(function(t,n){var i=t.scrollDataIndex;null!=i&&n.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(i)}))}))}(t)}var zF=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.type="dataZoom.inside",n.defaultOption=Jh(_R.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),n}(_R),IF=yo();function LF(t,n,i){IF(t).coordSysRecordMap.each((function(t){var r=t.dataZoomInfoMap.get(n.uid);r&&(r.getRange=i)}))}function OF(t,n){if(n){t.removeKey(n.model.uid);var i=n.controller;i&&i.dispose()}}function DF(t,n){t.isDisposed()||t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:n})}function RF(t,n,i,r){return t.coordinateSystem.containPoint([i,r])}var _F=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="dataZoom.inside",n}return E(n,t),n.prototype.render=function(n,i,r){t.prototype.render.apply(this,arguments),n.noTarget()?this._clear():(this.range=n.getPercentRange(),LF(r,n,{pan:gt(BF.pan,this),zoom:gt(BF.zoom,this),scrollMove:gt(BF.scrollMove,this)}))},n.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},n.prototype._clear=function(){!function(t,n){for(var i=IF(t).coordSysRecordMap,r=i.keys(),e=0;e<r.length;e++){var o=i.get(r[e]),a=o.dataZoomInfoMap;if(a){var s=n.uid;a.get(s)&&(a.removeKey(s),a.keys().length||OF(i,o))}}}(this.api,this.dataZoomModel),this.range=null},n.type="dataZoom.inside",n}(ER),BF={zoom:function(t,n,i,r){var e=this.range,o=e.slice(),a=t.axisModels[0];if(a){var s=EF[n](null,[r.originX,r.originY],a,i,t),u=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],l=Math.max(1/r.scale,0);o[0]=(o[0]-u)*l+u,o[1]=(o[1]-u)*l+u;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return kT(0,o,[0,100],0,h.minSpan,h.maxSpan),this.range=o,e[0]!==o[0]||e[1]!==o[1]?o:void 0}},pan:FF((function(t,n,i,r,e,o){var a=EF[r]([o.oldX,o.oldY],[o.newX,o.newY],n,e,i);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength})),scrollMove:FF((function(t,n,i,r,e,o){return EF[r]([0,0],[o.scrollDelta,o.scrollDelta],n,e,i).signal*(t[1]-t[0])*o.scrollDelta}))};function FF(t){return function(n,i,r,e){var o=this.range,a=o.slice(),s=n.axisModels[0];if(s)return kT(t(a,s,n,i,r,e),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var EF={grid:function(t,n,i,r,e){var o=i.axis,a={},s=e.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=n[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=n[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,n,i,r,e){var o=i.axis,a={},s=e.model.coordinateSystem,u=s.getRadiusAxis().getExtent(),l=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],n=s.pointToCoord(n),"radiusAxis"===i.mainType?(a.pixel=n[0]-t[0],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?1:-1):(a.pixel=n[1]-t[1],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,n,i,r,e){var o=i.axis,a=e.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=n[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=n[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};function PF(t){XR(t),t.registerComponentModel(zF),t.registerComponentView(_F),function(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,(function(t,n){var i=IF(n),r=i.coordSysRecordMap||(i.coordSysRecordMap=Vt());r.each((function(t){t.dataZoomInfoMap=null})),t.eachComponent({mainType:"dataZoom",subType:"inside"},(function(t){vt(DR(t).infoList,(function(i){var e=i.model.uid,o=r.get(e)||r.set(e,function(t,n){var i={model:n,containsPoint:bt(RF,n),dispatchAction:bt(DF,t),dataZoomInfoMap:null,controller:null},r=i.controller=new JS(t.getZr());return vt(["pan","zoom","scrollMove"],(function(t){r.on(t,(function(n){var r=[];i.dataZoomInfoMap.each((function(e){if(n.isAvailableBehavior(e.model.option)){var o=(e.getRange||{})[t],a=o&&o(e.dzReferCoordSysInfo,i.model.mainType,i.controller,n);!e.model.get("disabled",!0)&&a&&r.push({dataZoomId:e.model.id,start:a[0],end:a[1]})}})),r.length&&i.dispatchAction(r)}))})),i}(n,i.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=Vt())).set(t.uid,{dzReferCoordSysInfo:i,model:t,getRange:null})}))})),r.each((function(t){var n,i=t.controller,e=t.dataZoomInfoMap;if(e){var o=e.keys()[0];null!=o&&(n=e.get(o))}if(n){var a=function(t){var n,i="type_",r={type_true:2,type_move:1,type_false:0,type_undefined:-1},e=!0;return t.each((function(t){var o=t.model,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");r[i+a]>r[i+n]&&(n=a),e=e&&o.get("preventDefaultMouseMove",!0)})),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!e}}}(e);i.enable(a.controlType,a.opt),i.setPointerChecker(t.containsPoint),Pd(t,"dispatchAction",n.model.get("throttle",!0),"fixRate")}else OF(r,t)}))}))}(t)}var WF=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.type="dataZoom.slider",n.layoutMode="box",n.defaultOption=Jh(_R.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},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:"#fff",borderColor:"#ACB8D1"},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:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),n}(_R),VF=ws,jF=["line","bar","candlestick","scatter"],HF={easing:"cubicOut",duration:100,delay:0},YF=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i._displayables={},i}return E(n,t),n.prototype.init=function(t,n){this.api=n,this._onBrush=gt(this._onBrush,this),this._onBrushEnd=gt(this._onBrushEnd,this)},n.prototype.render=function(n,i,r,e){if(t.prototype.render.apply(this,arguments),Pd(this,"_dispatchZoomAction",n.get("throttle"),"fixRate"),this._orient=n.getOrient(),!1!==n.get("show")){if(n.noTarget())return this._clear(),void this.group.removeAll();e&&"dataZoom"===e.type&&e.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},n.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},n.prototype._clear=function(){Wd(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},n.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new Oe;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(n),this._positionGroup()},n.prototype._resetLocation=function(){var t=this.dataZoomModel,n=this.api,i=t.get("brushSelect")?7:0,r=this._findCoordRect(),e={width:n.getWidth(),height:n.getHeight()},o="horizontal"===this._orient?{right:e.width-r.x-r.width,top:e.height-30-7-i,width:r.width,height:30}:{right:7,top:r.y,width:30,height:r.height},a=qf(t.option);vt(["right","top","width","height"],(function(t){"ph"===a[t]&&(a[t]=o[t])}));var s=Xf(a,e);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],"vertical"===this._orient&&this._size.reverse()},n.prototype._positionGroup=function(){var t=this.group,n=this._location,i=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),e=r&&r.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr("horizontal"!==i||e?"horizontal"===i&&e?{scaleY:a?1:-1,scaleX:-1}:"vertical"!==i||e?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([o]);t.x=n.x-s.x,t.y=n.y-s.y,t.markRedraw()},n.prototype._getViewExtent=function(){return[0,this._size[0]]},n.prototype._renderBackground=function(){var t=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,r=t.get("brushSelect");i.add(new VF({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var e=new VF({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:gt(this._onClickPanel,this)}),o=this.api.getZr();r?(e.on("mousedown",this._onBrushStart,this),e.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),i.add(e)},n.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var n=this._size,i=this._shadowSize||[],r=t.series,e=r.getRawData(),o=r.getShadowDim?r.getShadowDim():t.otherDim;if(null!=o){var a=this._shadowPolygonPts,s=this._shadowPolylinePts;if(e!==this._shadowData||o!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var u=e.getDataExtent(o),l=.3*(u[1]-u[0]);u=[u[0]-l,u[1]+l];var h,f=[0,n[1]],c=[[n[0],0],[0,0]],v=[],d=n[0]/(e.count()-1),p=0,m=Math.round(e.count()/n[0]);e.each([o],(function(t,n){if(m>0&&n%m)p+=d;else{var i=null==t||isNaN(t)||""===t,r=i?0:Be(t,u,f,!0);i&&!h&&n?(c.push([c[c.length-1][0],0]),v.push([v[v.length-1][0],0])):!i&&h&&(c.push([p,0]),v.push([p,0])),c.push([p,r]),v.push([p,r]),p+=d,h=i}})),a=this._shadowPolygonPts=c,s=this._shadowPolylinePts=v}this._shadowData=e,this._shadowDim=o,this._shadowSize=[n[0],n[1]];for(var y=this.dataZoomModel,g=0;g<3;g++){var b=w(1===g);this._displayables.sliderGroup.add(b),this._displayables.dataShadowSegs.push(b)}}}function w(t){var n=y.getModel(t?"selectedDataBackground":"dataBackground"),i=new Oe,r=new gl({shape:{points:a},segmentIgnoreThreshold:1,style:n.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),e=new wl({shape:{points:s},segmentIgnoreThreshold:1,style:n.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return i.add(r),i.add(e),i}},n.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,n=t.get("showDataShadow");if(!1!==n){var i,r=this.ecModel;return t.eachTargetAxis((function(e,o){vt(t.getAxisProxy(e,o).getTargetSeriesModels(),(function(t){if(!(i||!0!==n&&ht(jF,t.get("type"))<0)){var a,s=r.getComponent(OR(e),o).axis,u={x:"y",y:"x",radius:"angle",angle:"radius"}[e],l=t.coordinateSystem;null!=u&&l.getOtherAxis&&(a=l.getOtherAxis(s).inverse),u=t.getData().mapDimension(u),i={thisAxis:s,series:t,thisDim:e,otherDim:u,otherAxisInverse:a}}}),this)}),this),i}},n.prototype._renderHandle=function(){var t=this.group,n=this._displayables,i=n.handles=[null,null],r=n.handleLabels=[null,null],e=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,u=a.get("borderRadius")||0,l=a.get("brushSelect"),h=n.filler=new VF({silent:l,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});e.add(h),e.add(new VF({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:u},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),vt([0,1],(function(n){var o=a.get("handleIcon");!_p[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=Ep(o,-1,0,2,2,null,!0);s.attr({cursor:XF(this._orient),draggable:!0,drift:gt(this._onDragMove,this,n),ondragend:gt(this._onDragEnd,this),onmouseover:gt(this._showDataInfo,this,!0),onmouseout:gt(this._showDataInfo,this,!1),z2:5});var u=s.getBoundingRect(),l=a.get("handleSize");this._handleHeight=Fe(l,this._size[1]),this._handleWidth=u.width/u.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),wu(s);var h=a.get("handleColor");null!=h&&(s.style.fill=h),e.add(i[n]=s);var f=a.getModel("textStyle");t.add(r[n]=new Ss({silent:!0,invisible:!0,style:Ch(f,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:f.getTextColor(),font:f.getFont()}),z2:10}))}),this);var f=h;if(l){var c=Fe(a.get("moveHandleSize"),o[1]),v=n.moveHandle=new ws({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:c}}),d=.8*c,p=n.moveHandleIcon=Ep(a.get("moveHandleIcon"),-d/2,-d/2,d,d,"#fff",!0);p.silent=!0,p.y=o[1]+c/2-.5,v.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(o[1]/2,Math.max(c,10));(f=n.moveZone=new ws({invisible:!0,shape:{y:o[1]-m,height:c+m}})).on("mouseover",(function(){s.enterEmphasis(v)})).on("mouseout",(function(){s.leaveEmphasis(v)})),e.add(v),e.add(p),e.add(f)}f.attr({draggable:!0,cursor:XF(this._orient),drift:gt(this._onDragMove,this,"all"),ondragstart:gt(this._showDataInfo,this,!0),ondragend:gt(this._onDragEnd,this),onmouseover:gt(this._showDataInfo,this,!0),onmouseout:gt(this._showDataInfo,this,!1)})},n.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[Be(t[0],[0,100],n,!0),Be(t[1],[0,100],n,!0)]},n.prototype._updateInterval=function(t,n){var i=this.dataZoomModel,r=this._handleEnds,e=this._getViewExtent(),o=i.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];kT(n,r,e,i.get("zoomLock")?"all":t,null!=o.minSpan?Be(o.minSpan,a,e,!0):null,null!=o.maxSpan?Be(o.maxSpan,a,e,!0):null);var s=this._range,u=this._range=Pe([Be(r[0],e,a,!0),Be(r[1],e,a,!0)]);return!s||s[0]!==u[0]||s[1]!==u[1]},n.prototype._updateView=function(t){var n=this._displayables,i=this._handleEnds,r=Pe(i.slice()),e=this._size;vt([0,1],(function(t){var r=this._handleHeight;n.handles[t].attr({scaleX:r/2,scaleY:r/2,x:i[t]+(t?-1:1),y:e[1]/2-r/2})}),this),n.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:e[1]});var o={x:r[0],width:r[1]-r[0]};n.moveHandle&&(n.moveHandle.setShape(o),n.moveZone.setShape(o),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=n.dataShadowSegs,s=[0,r[0],r[1],e[0]],u=0;u<a.length;u++){var l=a[u],h=l.getClipPath();h||(h=new ws,l.setClipPath(h)),h.setShape({x:s[u],y:0,width:s[u+1]-s[u],height:e[1]})}this._updateDataInfo(t)},n.prototype._updateDataInfo=function(t){var n=this.dataZoomModel,i=this._displayables,r=i.handleLabels,e=this._orient,o=["",""];if(n.get("showDetail")){var a=n.findRepresentativeAxisProxy();if(a){var s=a.getAxisModel().axis,u=this._range,l=t?a.calculateDataWindow({start:u[0],end:u[1]}).valueWindow:a.getDataValueWindow();o=[this._formatLabel(l[0],s),this._formatLabel(l[1],s)]}}var h=Pe(this._handleEnds.slice());function f(t){var n=uh(i.handles[t].parent,this.group),a=hh(0===t?"right":"left",n),s=this._handleWidth/2+5,u=lh([h[t]+(0===t?-s:s),this._size[1]/2],n);r[t].setStyle({x:u[0],y:u[1],verticalAlign:"horizontal"===e?"middle":a,align:"horizontal"===e?a:"center",text:o[t]})}f.call(this,0),f.call(this,1)},n.prototype._formatLabel=function(t,n){var i=this.dataZoomModel,r=i.get("labelFormatter"),e=i.get("labelPrecision");null!=e&&"auto"!==e||(e=n.getPixelPrecision());var o=null==t||isNaN(t)?"":"category"===n.type||"time"===n.type?n.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(e,20));return xt(r)?r(t,o):Mt(r)?r.replace("{value}",o):o},n.prototype._showDataInfo=function(t){var n=this._displayables,i=n.handleLabels;i[0].attr("invisible",!(t=this._dragging||t)),i[1].attr("invisible",!t),n.moveHandle&&this.api[t?"enterEmphasis":"leaveEmphasis"](n.moveHandle,1)},n.prototype._onDragMove=function(t,n,i,r){this._dragging=!0,Ln(r.event);var e=lh([n,i],this._displayables.sliderGroup.getLocalTransform(),!0),o=this._updateInterval(t,e[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),o&&a&&this._dispatchZoomAction(!0)},n.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction(!1)},n.prototype._onClickPanel=function(t){var n=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>n[0]||i[1]<0||i[1]>n[1])){var r=this._handleEnds,e=this._updateInterval("all",i[0]-(r[0]+r[1])/2);this._updateView(),e&&this._dispatchZoomAction(!1)}},n.prototype._onBrushStart=function(t){this._brushStart=new ee(t.offsetX,t.offsetY),this._brushing=!0,this._brushStartTime=+new Date},n.prototype._onBrushEnd=function(){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),r=[0,100];this._range=Pe([Be(n.x,i,r,!0),Be(n.x+n.width,i,r,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},n.prototype._onBrush=function(t){this._brushing&&(Ln(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},n.prototype._updateBrushRect=function(t,n){var i=this._displayables,r=i.brushRect;r||(r=i.brushRect=new VF({silent:!0,style:this.dataZoomModel.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(r)),r.attr("ignore",!1);var e=this._brushStart,o=this._displayables.sliderGroup,a=o.transformCoordToLocal(t,n),s=o.transformCoordToLocal(e.x,e.y),u=this._size;a[0]=Math.max(Math.min(u[0],a[0]),0),r.setShape({x:s[0],y:0,width:a[0]-s[0],height:u[1]})},n.prototype._dispatchZoomAction=function(t){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?HF:null,start:n[0],end:n[1]})},n.prototype._findCoordRect=function(){var t,n=DR(this.dataZoomModel).infoList;if(!t&&n.length){var i=n[0].model.coordinateSystem;t=i.getRect&&i.getRect()}if(!t){var r=this.api.getWidth(),e=this.api.getHeight();t={x:.2*r,y:.2*e,width:.6*r,height:.6*e}}return t},n.type="dataZoom.slider",n}(ER);function XF(t){return"vertical"===t?"ns-resize":"ew-resize"}function GF(t){t.registerComponentModel(WF),t.registerComponentView(YF),XR(t)}var UF=function(t,n,i){var r=ot((ZF[t]||{})[n]);return i&&wt(r)?r[r.length-1]:r},ZF={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},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]}},qF=bN.mapVisual,$F=bN.eachVisual,KF=wt,JF=vt,QF=Pe,tE=Be,nE=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.stateList=["inRange","outOfRange"],i.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],i.layoutMode={type:"box",ignoreSize:!0},i.dataBound=[-1/0,1/0],i.targetVisuals={},i.controllerVisuals={},i}return E(n,t),n.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i)},n.prototype.optionUpdated=function(t,n){!n&&nB(this.option,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},n.prototype.resetVisual=function(t){var n=this.stateList;t=gt(t,this),this.controllerVisuals=tB(this.option.controller,n,t),this.targetVisuals=tB(this.option.target,n,t)},n.prototype.getItemSymbol=function(){return null},n.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,n=[];return null==t||"all"===t?this.ecModel.eachSeries((function(t,i){n.push(i)})):n=eo(t),n},n.prototype.eachTargetSeries=function(t,n){vt(this.getTargetSeriesIndices(),(function(i){var r=this.ecModel.getSeriesByIndex(i);r&&t.call(n,r)}),this)},n.prototype.isTargetSeries=function(t){var n=!1;return this.eachTargetSeries((function(i){i===t&&(n=!0)})),n},n.prototype.formatValueText=function(t,n,i){var r,e=this.option,o=e.precision,a=this.dataBound,s=e.formatter;i=i||["<",">"],wt(t)&&(t=t.slice(),r=!0);var u=n?t:r?[l(t[0]),l(t[1])]:l(t);return Mt(s)?s.replace("{value}",r?u[0]:u).replace("{value2}",r?u[1]:u):xt(s)?r?s(t[0],t[1]):s(t):r?t[0]===a[0]?i[0]+" "+u[1]:t[1]===a[1]?i[1]+" "+u[0]:u[0]+" - "+u[1]:u;function l(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(o,20))}},n.prototype.resetExtent=function(){var t=this.option,n=QF([t.min,t.max]);this._dataExtent=n},n.prototype.getDataDimensionIndex=function(t){var n=this.option.dimension;if(null!=n)return t.getDimensionIndex(n);for(var i=t.dimensions,r=i.length-1;r>=0;r--){var e=t.getDimensionInfo(i[r]);if(!e.isCalculationCoord)return e.storeDimIndex}},n.prototype.getExtent=function(){return this._dataExtent.slice()},n.prototype.completeVisualOption=function(){var t=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},r=n.target||(n.target={}),e=n.controller||(n.controller={});at(r,i),at(e,i);var o=this.isCategory();function a(i){KF(n.color)&&!i.inRange&&(i.inRange={color:n.color.slice().reverse()}),i.inRange=i.inRange||{color:t.get("gradientColor")}}a.call(this,r),a.call(this,e),function(t,n,i){var r=t[n],e=t[i];r&&!e&&(e=t[i]={},JF(r,(function(t,n){if(bN.isValidType(n)){var i=UF(n,"inactive",o);null!=i&&(e[n]=i,"color"!==n||e.hasOwnProperty("opacity")||e.hasOwnProperty("colorAlpha")||(e.opacity=[0,0]))}})))}.call(this,r,"inRange","outOfRange"),function(t){var n=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,r=this.get("inactiveColor"),e=this.getItemSymbol()||"roundRect";JF(this.stateList,(function(a){var s=this.itemSize,u=t[a];u||(u=t[a]={color:o?r:[r]}),null==u.symbol&&(u.symbol=n&&ot(n)||(o?e:[e])),null==u.symbolSize&&(u.symbolSize=i&&ot(i)||(o?s[0]:[s[0],s[0]])),u.symbol=qF(u.symbol,(function(t){return"none"===t?e:t}));var l=u.symbolSize;if(null!=l){var h=-1/0;$F(l,(function(t){t>h&&(h=t)})),u.symbolSize=qF(l,(function(t){return tE(t,[0,h],[0,s[0]],!0)}))}}),this)}.call(this,e)},n.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},n.prototype.isCategory=function(){return!!this.option.categories},n.prototype.setSelected=function(){},n.prototype.getSelected=function(){return null},n.prototype.getValueState=function(){return null},n.prototype.getVisualMeta=function(){return null},n.type="visualMap",n.dependencies=["series"],n.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},n}(Jf),iE=[20,140],rE=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.optionUpdated=function(n,i){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},n.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var n=this.itemSize;(null==n[0]||isNaN(n[0]))&&(n[0]=iE[0]),(null==n[1]||isNaN(n[1]))&&(n[1]=iE[1])},n.prototype._resetRange=function(){var t=this.getExtent(),n=this.option.range;!n||n.auto?(t.auto=1,this.option.range=t):wt(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],t[0]),n[1]=Math.min(n[1],t[1]))},n.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),vt(this.stateList,(function(t){var n=this.option.controller[t].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)}),this)},n.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},n.prototype.getSelected=function(){var t=this.getExtent(),n=Pe((this.get("range")||[]).slice());return n[0]>t[1]&&(n[0]=t[1]),n[1]>t[1]&&(n[1]=t[1]),n[0]<t[0]&&(n[0]=t[0]),n[1]<t[0]&&(n[1]=t[0]),n},n.prototype.getValueState=function(t){var n=this.option.range,i=this.getExtent();return(n[0]<=i[0]||n[0]<=t)&&(n[1]>=i[1]||t<=n[1])?"inRange":"outOfRange"},n.prototype.findTargetDataIndices=function(t){var n=[];return this.eachTargetSeries((function(i){var r=[],e=i.getData();e.each(this.getDataDimensionIndex(e),(function(n,i){t[0]<=n&&n<=t[1]&&r.push(i)}),this),n.push({seriesId:i.id,dataIndex:r})}),this),n},n.prototype.getVisualMeta=function(t){var n=eE(0,0,this.getExtent()),i=eE(0,0,this.option.range.slice()),r=[];function e(n,i){r.push({value:n,color:t(n,i)})}for(var o=0,a=0,s=i.length,u=n.length;a<u&&(!i.length||n[a]<=i[0]);a++)n[a]<i[o]&&e(n[a],"outOfRange");for(var l=1;o<s;o++,l=0)l&&r.length&&e(i[o],"outOfRange"),e(i[o],"inRange");for(l=1;a<u;a++)(!i.length||i[i.length-1]<n[a])&&(l&&(r.length&&e(r[r.length-1].value,"outOfRange"),l=0),e(n[a],"outOfRange"));var h=r.length;return{stops:r,outerColors:[h?r[0].color:"transparent",h?r[h-1].color:"transparent"]}},n.type="visualMap.continuous",n.defaultOption=Jh(nE.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:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),n}(nE);function eE(t,n,i){if(i[0]===i[1])return i.slice();for(var r=(i[1]-i[0])/200,e=i[0],o=[],a=0;a<=200&&e<i[1];a++)o.push(e),e+=r;return o.push(i[1]),o}var oE=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.autoPositionValues={left:1,right:1,top:1,bottom:1},i}return E(n,t),n.prototype.init=function(t,n){this.ecModel=t,this.api=n},n.prototype.render=function(t,n,i,r){this.visualMapModel=t,!1!==t.get("show")?this.doRender(t,n,i,r):this.group.removeAll()},n.prototype.renderBackground=function(t){var n=this.visualMapModel,i=If(n.get("padding")||0),r=t.getBoundingRect();t.add(new ws({z2:-1,silent:!0,shape:{x:r.x-i[3],y:r.y-i[0],width:r.width+i[3]+i[1],height:r.height+i[0]+i[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},n.prototype.getControllerVisual=function(t,n,i){var r=(i=i||{}).forceState,e=this.visualMapModel,o={};if("color"===n){var a=e.get("contentColor");o.color=a}function s(t){return o[t]}function u(t,n){o[t]=n}var l=e.controllerVisuals[r||e.getValueState(t)];return vt(bN.prepareVisualTypes(l),(function(r){var e=l[r];i.convertOpacityToAlpha&&"opacity"===r&&(r="colorAlpha",e=l.__alphaForOpacity),bN.dependsOn(r,n)&&e&&e.applyVisual(t,s,u)})),o[n]},n.prototype.positionGroup=function(t){var n=this.api;Gf(t,this.visualMapModel.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},n.prototype.doRender=function(){},n.type="visualMap",n}(Nd),aE=[["left","right","width"],["top","bottom","height"]];function sE(t,n,i){var r=t.option,e=r.align;if(null!=e&&"auto"!==e)return e;for(var o={width:n.getWidth(),height:n.getHeight()},a="horizontal"===r.orient?1:0,s=aE[a],u=[0,null,10],l={},h=0;h<3;h++)l[aE[1-a][h]]=u[h],l[s[h]]=2===h?i[0]:r[s[h]];var f=[["x","width",3],["y","height",0]][a],c=Xf(l,o,r.padding);return s[(c.margin[f[2]]||0)+c[f[0]]+.5*c[f[1]]<.5*o[f[1]]?0:1]}function uE(t,n){return vt(t||[],(function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(n?n.componentIndex:"")})),t}var lE=Be,hE=vt,fE=Math.min,cE=Math.max,vE=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i._shapes={},i._dataInterval=[],i._handleEnds=[],i._hoverLinkDataIndices=[],i}return E(n,t),n.prototype.doRender=function(t,n,i,r){this._api=i,r&&"selectDataRange"===r.type&&r.from===this.uid||this._buildView()},n.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,n=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(n);var i=t.get("text");this._renderEndsText(n,i,0),this._renderEndsText(n,i,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},n.prototype._renderEndsText=function(t,n,i){if(n){var r=n[1-i];r=null!=r?r+"":"";var e=this.visualMapModel,o=e.get("textGap"),a=e.itemSize,s=this._shapes.mainGroup,u=this._applyTransform([a[0]/2,0===i?-o:a[1]+o],s),l=this._applyTransform(0===i?"bottom":"top",s),h=this._orient;this.group.add(new Ss({style:Ch(this.visualMapModel.textStyleModel,{x:u[0],y:u[1],verticalAlign:"horizontal"===h?"middle":l,align:"horizontal"===h?l:"center",text:r})}))}},n.prototype._renderBar=function(t){var n=this.visualMapModel,i=this._shapes,r=n.itemSize,e=this._orient,o=this._useHandle,a=sE(n,this.api,r),s=i.mainGroup=this._createBarGroup(a),u=new Oe;s.add(u),u.add(i.outOfRange=dE()),u.add(i.inRange=dE(null,o?mE(this._orient):null,gt(this._dragHandle,this,"all",!1),gt(this._dragHandle,this,"all",!0))),u.setClipPath(new ws({shape:{x:0,y:0,width:r[0],height:r[1],r:3}}));var l=n.textStyleModel.getTextRect("国"),h=cE(l.width,l.height);o&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(n,s,0,r,h,e),this._createHandle(n,s,1,r,h,e)),this._createIndicator(n,s,r,h,e),t.add(s)},n.prototype._createHandle=function(t,n,i,r){var e=gt(this._dragHandle,this,i,!1),o=gt(this._dragHandle,this,i,!0),a=xe(t.get("handleSize"),r[0]),s=Ep(t.get("handleIcon"),-a/2,-a/2,a,a,null,!0),u=mE(this._orient);s.attr({cursor:u,draggable:!0,drift:e,ondragend:o,onmousemove:function(t){Ln(t.event)}}),s.x=r[0]/2,s.useStyle(t.getModel("handleStyle").getItemStyle()),s.setStyle({strokeNoScale:!0,strokeFirst:!0}),s.style.lineWidth*=2,s.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),Nu(s,!0),n.add(s);var l=new Ss({cursor:u,draggable:!0,drift:e,onmousemove:function(t){Ln(t.event)},ondragend:o,style:Ch(this.visualMapModel.textStyleModel,{x:0,y:0,text:""})});l.ensureState("blur").style={opacity:.1},l.stateTransition={duration:200},this.group.add(l);var h=[a,0],f=this._shapes;f.handleThumbs[i]=s,f.handleLabelPoints[i]=h,f.handleLabels[i]=l},n.prototype._createIndicator=function(t,n,i,r,e){var o=xe(t.get("indicatorSize"),i[0]),a=Ep(t.get("indicatorIcon"),-o/2,-o/2,o,o,null,!0);a.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var s=t.getModel("indicatorStyle").getItemStyle();if(a instanceof vs){var u=a.style;a.useStyle(ut({image:u.image,x:u.x,y:u.y,width:u.width,height:u.height},s))}else a.useStyle(s);n.add(a);var l=new Ss({silent:!0,invisible:!0,style:Ch(this.visualMapModel.textStyleModel,{x:0,y:0,text:""})});this.group.add(l);var h=[("horizontal"===e?r/2:6)+i[0]/2,0],f=this._shapes;f.indicator=a,f.indicatorLabel=l,f.indicatorLabelPoint=h,this._firstShowIndicator=!0},n.prototype._dragHandle=function(t,n,i,r){if(this._useHandle){if(this._dragging=!n,!n){var e=this._applyTransform([i,r],this._shapes.mainGroup,!0);this._updateInterval(t,e[1]),this._hideIndicator(),this._updateView()}n===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),n?!this._hovering&&this._clearHoverLinkToSeries():pE(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},n.prototype._resetInterval=function(){var t=this.visualMapModel,n=this._dataInterval=t.getSelected(),i=t.getExtent(),r=[0,t.itemSize[1]];this._handleEnds=[lE(n[0],i,r,!0),lE(n[1],i,r,!0)]},n.prototype._updateInterval=function(t,n){var i=this.visualMapModel,r=this._handleEnds,e=[0,i.itemSize[1]];kT(n=n||0,r,e,t,0);var o=i.getExtent();this._dataInterval=[lE(r[0],e,o,!0),lE(r[1],e,o,!0)]},n.prototype._updateView=function(t){var n=this.visualMapModel,i=n.getExtent(),r=this._shapes,e=[0,n.itemSize[1]],o=t?e:this._handleEnds,a=this._createBarVisual(this._dataInterval,i,o,"inRange"),s=this._createBarVisual(i,i,e,"outOfRange");r.inRange.setStyle({fill:a.barColor}).setShape("points",a.barPoints),r.outOfRange.setStyle({fill:s.barColor}).setShape("points",s.barPoints),this._updateHandle(o,a)},n.prototype._createBarVisual=function(t,n,i,r){var e={forceState:r,convertOpacityToAlpha:!0},o=this._makeColorGradient(t,e),a=[this.getControllerVisual(t[0],"symbolSize",e),this.getControllerVisual(t[1],"symbolSize",e)],s=this._createBarPoints(i,a);return{barColor:new Ol(0,0,0,1,o),barPoints:s,handlesColor:[o[0].color,o[o.length-1].color]}},n.prototype._makeColorGradient=function(t,n){var i=[],r=(t[1]-t[0])/100;i.push({color:this.getControllerVisual(t[0],"color",n),offset:0});for(var e=1;e<100;e++){var o=t[0]+r*e;if(o>t[1])break;i.push({color:this.getControllerVisual(o,"color",n),offset:e/100})}return i.push({color:this.getControllerVisual(t[1],"color",n),offset:1}),i},n.prototype._createBarPoints=function(t,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-n[1],t[1]]]},n.prototype._createBarGroup=function(t){var n=this._orient,i=this.visualMapModel.get("inverse");return new Oe("horizontal"!==n||i?"horizontal"===n&&i?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==n||i?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},n.prototype._updateHandle=function(t,n){if(this._useHandle){var i=this._shapes,r=this.visualMapModel,e=i.handleThumbs,o=i.handleLabels,a=r.itemSize,s=r.getExtent();hE([0,1],(function(u){var l=e[u];l.setStyle("fill",n.handlesColor[u]),l.y=t[u];var h=lE(t[u],[0,a[1]],s,!0),f=this.getControllerVisual(h,"symbolSize");l.scaleX=l.scaleY=f/a[0],l.x=a[0]-f/2;var c=lh(i.handleLabelPoints[u],uh(l,this.group));o[u].setStyle({x:c[0],y:c[1],text:r.formatValueText(this._dataInterval[u]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",i.mainGroup):"center"})}),this)}},n.prototype._showIndicator=function(t,n,i){var r=this.visualMapModel,e=r.getExtent(),o=r.itemSize,a=[0,o[1]],s=this._shapes,u=s.indicator;if(u){u.attr("invisible",!1);var l=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),h=this.getControllerVisual(t,"symbolSize"),f=lE(t,e,a,!0),c=o[0]-h/2,v={x:u.x,y:u.y};u.y=f,u.x=c;var d=lh(s.indicatorLabelPoint,uh(u,this.group)),p=s.indicatorLabel;p.attr("invisible",!1);var m=this._applyTransform("left",s.mainGroup),y="horizontal"===this._orient;p.setStyle({text:(i||"")+r.formatValueText(n),verticalAlign:y?m:"middle",align:y?"center":m});var g={x:c,y:f,style:{fill:l}},b={style:{x:d[0],y:d[1]}};if(r.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var w={duration:100,easing:"cubicInOut",additive:!0};u.x=v.x,u.y=v.y,u.animateTo(g,w),p.animateTo(b,w)}else u.attr(g),p.attr(b);this._firstShowIndicator=!1;var x=this._shapes.handleLabels;if(x)for(var M=0;M<x.length;M++)this._api.enterBlur(x[M])}},n.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",(function(n){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,r=t._applyTransform([n.offsetX,n.offsetY],t._shapes.mainGroup,!0,!0);r[1]=fE(cE(0,r[1]),i[1]),t._doHoverLinkToSeries(r[1],0<=r[0]&&r[0]<=i[0])}})).on("mouseout",(function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()}))},n.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},n.prototype._doHoverLinkToSeries=function(t,n){var i=this.visualMapModel;if(i.option.hoverLink){var r=[0,i.itemSize[1]],e=i.getExtent();t=fE(cE(r[0],t),r[1]);var o=function(t,n,i){var r=6,e=t.get("hoverLinkDataSize");return e&&(r=lE(e,n,i,!0)/2),r}(i,e,r),a=[t-o,t+o],s=lE(t,r,e,!0),u=[lE(a[0],r,e,!0),lE(a[1],r,e,!0)];a[0]<r[0]&&(u[0]=-1/0),a[1]>r[1]&&(u[1]=1/0),n&&(u[0]===-1/0?this._showIndicator(s,u[1],"< ",o):u[1]===1/0?this._showIndicator(s,u[0],"> ",o):this._showIndicator(s,s,"≈ ",o));var l=this._hoverLinkDataIndices,h=[];(n||pE(i))&&(h=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var f=function(t,n){var i={},r={};return e(t||[],i),e(n||[],r,i),[o(i),o(r)];function e(t,n,i){for(var r=0,e=t.length;r<e;r++){var o=co(t[r].seriesId,null);if(null==o)return;for(var a=eo(t[r].dataIndex),s=i&&i[o],u=0,l=a.length;u<l;u++){var h=a[u];s&&s[h]?s[h]=null:(n[o]||(n[o]={}))[h]=1}}}function o(t,n){var i=[];for(var r in t)if(t.hasOwnProperty(r)&&null!=t[r])if(n)i.push(+r);else{var e=o(t[r],!0);e.length&&i.push({seriesId:r,dataIndex:e})}return i}}(l,h);this._dispatchHighDown("downplay",uE(f[0],i)),this._dispatchHighDown("highlight",uE(f[1],i))}},n.prototype._hoverLinkFromSeriesMouseOver=function(t){var n=t.target,i=this.visualMapModel;if(n&&null!=Bs(n).dataIndex){var r=Bs(n),e=this.ecModel.getSeriesByIndex(r.seriesIndex);if(i.isTargetSeries(e)){var o=e.getData(r.dataType),a=o.getStore().get(i.getDataDimensionIndex(o),r.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},n.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i<n.length;i++)this._api.leaveBlur(n[i])},n.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",uE(t,this.visualMapModel)),t.length=0},n.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},n.prototype._applyTransform=function(t,n,i,r){var e=uh(n,r?null:this.group);return wt(t)?lh(t,e,i):hh(t,e,i)},n.prototype._dispatchHighDown=function(t,n){n&&n.length&&this.api.dispatchAction({type:t,batch:n})},n.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},n.prototype.remove=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},n.type="visualMap.continuous",n}(oE);function dE(t,n,i,r){return new gl({shape:{points:t},draggable:!!i,cursor:n,drift:i,onmousemove:function(t){Ln(t.event)},ondragend:r})}function pE(t){var n=t.get("hoverLinkOnHandle");return!!(null==n?t.get("realtime"):n)}function mE(t){return"vertical"===t?"ns-resize":"ew-resize"}var yE={type:"selectDataRange",event:"dataRangeSelected",update:"update"},gE=function(t,n){n.eachComponent({mainType:"visualMap",query:t},(function(n){n.setSelected(t.selected)}))},bE=[{createOnAllSeries:!0,reset:function(t,n){var i=[];return n.eachComponent("visualMap",(function(n){var r,e,o,a,s,u=t.pipelineContext;!n.isTargetSeries(t)||u&&u.large||i.push((r=n.stateList,e=n.targetVisuals,o=gt(n.getValueState,n),a=n.getDataDimensionIndex(t.getData()),s={},vt(r,(function(t){var n=bN.prepareVisualTypes(e[t]);s[t]=n})),{progress:function(t,n){var i,r;function u(t){return xp(n,r,t)}function l(t,i){Sp(n,r,t,i)}null!=a&&(i=n.getDimensionIndex(a));for(var h=n.getStore();null!=(r=t.next());){var f=n.getRawDataItem(r);if(!f||!1!==f.visualMap)for(var c=null!=a?h.get(i,r):r,v=o(c),d=e[v],p=s[v],m=0,y=p.length;m<y;m++){var g=p[m];d[g]&&d[g].applyVisual(c,u,l)}}}}))})),i}},{createOnAllSeries:!0,reset:function(t,n){var i=t.getData(),r=[];n.eachComponent("visualMap",(function(n){if(n.isTargetSeries(t)){var e=n.getVisualMeta(gt(wE,null,t,n))||{stops:[],outerColors:[]},o=n.getDataDimensionIndex(i);o>=0&&(e.dimension=o,r.push(e))}})),t.getData().setVisual("visualMeta",r)}}];function wE(t,n,i,r){for(var e=n.targetVisuals[r],o=bN.prepareVisualTypes(e),a={color:Mp(t.getData(),"color")},s=0,u=o.length;s<u;s++){var l=o[s],h=e["opacity"===l?"__alphaForOpacity":l];h&&h.applyVisual(i,f,c)}return a.color;function f(t){return a[t]}function c(t,n){a[t]=n}}var xE=vt;function ME(t){var n=t&&t.visualMap;wt(n)||(n=n?[n]:[]),xE(n,(function(t){if(t){SE(t,"splitList")&&!SE(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var n=t.pieces;n&&wt(n)&&xE(n,(function(t){At(t)&&(SE(t,"start")&&!SE(t,"min")&&(t.min=t.start),SE(t,"end")&&!SE(t,"max")&&(t.max=t.end))}))}}))}function SE(t,n){return t&&t.hasOwnProperty&&t.hasOwnProperty(n)}var kE=!1;function AE(t){kE||(kE=!0,t.registerSubTypeDefaulter("visualMap",(function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})),t.registerAction(yE,gE),vt(bE,(function(n){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,n)})),t.registerPreprocessor(ME))}function NE(t){t.registerComponentModel(rE),t.registerComponentView(vE),AE(t)}var CE=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i._pieceList=[],i}return E(n,t),n.prototype.optionUpdated=function(n,i){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],TE[this._mode].call(this,this._pieceList),this._resetSelected(n,i);var e=this.option.categories;this.resetVisual((function(t,n){"categories"===r?(t.mappingMethod="category",t.categories=ot(e)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=dt(this._pieceList,(function(t){return t=ot(t),"inRange"!==n&&(t.visual=null),t})))}))},n.prototype.completeVisualOption=function(){var n=this.option,i={},r=bN.listVisualTypes(),e=this.isCategory();function o(t,n,i){return t&&t[n]&&t[n].hasOwnProperty(i)}vt(n.pieces,(function(t){vt(r,(function(n){t.hasOwnProperty(n)&&(i[n]=1)}))})),vt(i,(function(t,i){var r=!1;vt(this.stateList,(function(t){r=r||o(n,t,i)||o(n.target,t,i)}),this),!r&&vt(this.stateList,(function(t){(n[t]||(n[t]={}))[i]=UF(i,"inRange"===t?"active":"inactive",e)}))}),this),t.prototype.completeVisualOption.apply(this,arguments)},n.prototype._resetSelected=function(t,n){var i=this.option,r=this._pieceList,e=(n?i:t).selected||{};if(i.selected=e,vt(r,(function(t){var n=this.getSelectedMapKey(t);e.hasOwnProperty(n)||(e[n]=!0)}),this),"single"===i.selectedMode){var o=!1;vt(r,(function(t){var n=this.getSelectedMapKey(t);e[n]&&(o?e[n]=!1:o=!0)}),this)}},n.prototype.getItemSymbol=function(){return this.get("itemSymbol")},n.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},n.prototype.getPieceList=function(){return this._pieceList},n.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},n.prototype.setSelected=function(t){this.option.selected=ot(t)},n.prototype.getValueState=function(t){var n=bN.findPieceIndex(t,this._pieceList);return null!=n&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},n.prototype.findTargetDataIndices=function(t){var n=[],i=this._pieceList;return this.eachTargetSeries((function(r){var e=[],o=r.getData();o.each(this.getDataDimensionIndex(o),(function(n,r){bN.findPieceIndex(n,i)===t&&e.push(r)}),this),n.push({seriesId:r.id,dataIndex:e})}),this),n},n.prototype.getRepresentValue=function(t){var n;if(this.isCategory())n=t.value;else if(null!=t.value)n=t.value;else{var i=t.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},n.prototype.getVisualMeta=function(t){if(!this.isCategory()){var n=[],i=["",""],r=this,e=this._pieceList.slice();if(e.length){var o=e[0].interval[0];o!==-1/0&&e.unshift({interval:[-1/0,o]}),(o=e[e.length-1].interval[1])!==1/0&&e.push({interval:[o,1/0]})}else e.push({interval:[-1/0,1/0]});var a=-1/0;return vt(e,(function(t){var n=t.interval;n&&(n[0]>a&&s([a,n[0]],"outOfRange"),s(n.slice()),a=n[1])}),this),{stops:n,outerColors:i}}function s(e,o){var a=r.getRepresentValue({interval:e});o||(o=r.getValueState(a));var s=t(a,o);e[0]===-1/0?i[0]=s:e[1]===1/0?i[1]=s:n.push({value:e[0],color:s},{value:e[1],color:s})}},n.type="visualMap.piecewise",n.defaultOption=Jh(nE.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}),n}(nE),TE={splitNumber:function(t){var n=this.option,i=Math.min(n.precision,20),r=this.getExtent(),e=n.splitNumber;e=Math.max(parseInt(e,10),1),n.splitNumber=e;for(var o=(r[1]-r[0])/e;+o.toFixed(i)!==o&&i<5;)i++;n.precision=i,o=+o.toFixed(i),n.minOpen&&t.push({interval:[-1/0,r[0]],close:[0,0]});for(var a=0,s=r[0];a<e;s+=o,a++)t.push({interval:[s,a===e-1?r[1]:s+o],close:[1,1]});n.maxOpen&&t.push({interval:[r[1],1/0],close:[0,0]}),$e(t),vt(t,(function(t,n){t.index=n,t.text=this.formatValueText(t.interval)}),this)},categories:function(t){var n=this.option;vt(n.categories,(function(n){t.push({text:this.formatValueText(n,!0),value:n})}),this),zE(n,t)},pieces:function(t){var n=this.option;vt(n.pieces,(function(n,i){At(n)||(n={value:n});var r={text:"",index:i};if(null!=n.label&&(r.text=n.label),n.hasOwnProperty("value")){var e=r.value=n.value;r.interval=[e,e],r.close=[1,1]}else{for(var o=r.interval=[],a=r.close=[0,0],s=[1,0,1],u=[-1/0,1/0],l=[],h=0;h<2;h++){for(var f=[["gte","gt","min"],["lte","lt","max"]][h],c=0;c<3&&null==o[h];c++)o[h]=n[f[c]],a[h]=s[c],l[h]=2===c;null==o[h]&&(o[h]=u[h])}l[0]&&o[1]===1/0&&(a[0]=0),l[1]&&o[0]===-1/0&&(a[1]=0),o[0]===o[1]&&a[0]&&a[1]&&(r.value=o[0])}r.visual=bN.retrieveVisuals(n),t.push(r)}),this),zE(n,t),$e(t),vt(t,(function(t){var n=t.close;t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,[["<","≤"][n[1]],[">","≥"][n[0]]])}),this)}};function zE(t,n){var i=t.inverse;("vertical"===t.orient?!i:i)&&n.reverse()}var IE=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return E(n,t),n.prototype.doRender=function(){var t=this.group;t.removeAll();var n=this.visualMapModel,i=n.get("textGap"),r=n.textStyleModel,e=r.getFont(),o=r.getTextColor(),a=this._getItemAlign(),s=n.itemSize,u=this._getViewData(),l=u.endsText,h=Lt(n.get("showLabel",!0),!l);l&&this._renderEndsText(t,l[0],s,h,a),vt(u.viewPieceList,(function(r){var u=r.piece,l=new Oe;l.onclick=gt(this._onItemClick,this,u),this._enableHoverLink(l,r.indexInModelPieceList);var f=n.getRepresentValue(u);if(this._createItemSymbol(l,f,[0,0,s[0],s[1]]),h){var c=this.visualMapModel.getValueState(f);l.add(new Ss({style:{x:"right"===a?-i:s[0]+i,y:s[1]/2,text:u.text,verticalAlign:"middle",align:a,font:e,fill:o,opacity:"outOfRange"===c?.5:1}}))}t.add(l)}),this),l&&this._renderEndsText(t,l[1],s,h,a),Yf(n.get("orient"),t,n.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},n.prototype._enableHoverLink=function(t,n){var i=this;t.on("mouseover",(function(){return r("highlight")})).on("mouseout",(function(){return r("downplay")}));var r=function(t){var r=i.visualMapModel;r.option.hoverLink&&i.api.dispatchAction({type:t,batch:uE(r.findTargetDataIndices(n),r)})}},n.prototype._getItemAlign=function(){var t=this.visualMapModel,n=t.option;if("vertical"===n.orient)return sE(t,this.api,t.itemSize);var i=n.align;return i&&"auto"!==i||(i="left"),i},n.prototype._renderEndsText=function(t,n,i,r,e){if(n){var o=new Oe;o.add(new Ss({style:Ch(this.visualMapModel.textStyleModel,{x:r?"right"===e?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:r?e:"center",text:n})})),t.add(o)}},n.prototype._getViewData=function(){var t=this.visualMapModel,n=dt(t.getPieceList(),(function(t,n){return{piece:t,indexInModelPieceList:n}})),i=t.get("text"),r=t.get("orient"),e=t.get("inverse");return("horizontal"===r?e:!e)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},n.prototype._createItemSymbol=function(t,n,i){t.add(Ep(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color")))},n.prototype._onItemClick=function(t){var n=this.visualMapModel,i=n.option,r=ot(i.selected),e=n.getSelectedMapKey(t);"single"===i.selectedMode?(r[e]=!0,vt(r,(function(t,n){r[n]=n===e}))):r[e]=!r[e],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})},n.type="visualMap.piecewise",n}(oE);function LE(t){t.registerComponentModel(CE),t.registerComponentView(IE),AE(t)}var OE={label:{enabled:!0},decal:{show:!1}},DE=yo(),RE={};function _E(t,n){var i=t.getModel("aria");if(i.get("enabled")){var r=ot(OE);at(r.label,t.getLocaleModel().get("aria"),!1),at(i.option,r,!1),function(){if(i.getModel("decal").get("show")){var n=Vt();t.eachSeries((function(t){if(!t.isColorBySeries()){var i=n.get(t.type);i||n.set(t.type,i={}),DE(t).scope=i}})),t.eachRawSeries((function(n){if(!t.isSeriesFiltered(n))if(xt(n.enableAriaDecal))n.enableAriaDecal();else{var i=n.getData();if(n.isColorBySeries()){var r=mc(n.ecModel,n.name,RE,t.getSeriesCount()),e=i.getVisual("decal");i.setVisual("decal",l(e,r))}else{var o=n.getRawData(),a={},s=DE(n).scope;i.each((function(t){var n=i.getRawIndex(t);a[n]=t}));var u=o.count();o.each((function(t){var r=a[t],e=o.getName(t)||t+"",h=mc(n.ecModel,e,s,u),f=i.getItemVisual(r,"decal");i.setItemVisual(r,"decal",l(f,h))}))}}function l(t,n){var i=t?ut(ut({},n),t):n;return i.dirty=!0,i}}))}}(),function(){var r=t.getLocaleModel().get("aria"),o=i.getModel("label");if(o.option=lt(o.option,r),o.get("enabled")){var a=n.getZr().dom;if(o.get("description"))a.setAttribute("aria-label",o.get("description"));else{var s,u=t.getSeriesCount(),l=o.get(["data","maxCount"])||10,h=o.get(["series","maxCount"])||10,f=Math.min(u,h);if(!(u<1)){var c=function(){var n=t.get("title");return n&&n.length&&(n=n[0]),n&&n.text}();if(c)s=e(o.get(["general","withTitle"]),{title:c});else s=o.get(["general","withoutTitle"]);var v=[];s+=e(o.get(u>1?["series","multiple","prefix"]:["series","single","prefix"]),{seriesCount:u}),t.eachSeries((function(n,i){if(i<f){var r=void 0,a=n.get("name")?"withName":"withoutName";r=e(r=o.get(u>1?["series","multiple",a]:["series","single",a]),{seriesId:n.seriesIndex,seriesName:n.get("name"),seriesType:(b=n.subType,t.getLocaleModel().get(["series","typeNames"])[b]||"自定义图")});var s=n.getData();s.count()>l?r+=e(o.get(["data","partialData"]),{displayCnt:l}):r+=o.get(["data","allData"]);for(var h=o.get(["data","separator","middle"]),c=o.get(["data","separator","end"]),d=[],p=0;p<s.count();p++)if(p<l){var m=s.getName(p),y=s.getValues(p),g=o.get(["data",m?"withName":"withoutName"]);d.push(e(g,{name:m,value:y.join(h)}))}r+=d.join(h)+c,v.push(r)}var b}));var d=o.getModel(["series","multiple","separator"]),p=d.get("middle"),m=d.get("end");s+=v.join(p)+m,a.setAttribute("aria-label",s)}}}}()}function e(t,n){if(!Mt(t))return t;var i=t;return vt(n,(function(t,n){i=i.replace(new RegExp("\\{\\s*"+n+"\\s*\\}","g"),t)})),i}}function BE(t){if(t&&t.aria){var n=t.aria;null!=n.show&&(n.enabled=n.show),n.label=n.label||{},vt(["description","general","series","data"],(function(t){null!=n[t]&&(n.label[t]=n[t])}))}}var FE={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},EE=function(){function t(t){null==(this._condVal=Mt(t)?new RegExp(t):"[object RegExp]"===Z.call(t)?t:null)&&io("")}return t.prototype.evaluate=function(t){var n=typeof t;return Mt(n)?this._condVal.test(t):!!kt(n)&&this._condVal.test(t+"")},t}(),PE=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),WE=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,n=0;n<t.length;n++)if(!t[n].evaluate())return!1;return!0},t}(),VE=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,n=0;n<t.length;n++)if(t[n].evaluate())return!0;return!1},t}(),jE=function(){function t(){}return t.prototype.evaluate=function(){return!this.child.evaluate()},t}(),HE=function(){function t(){}return t.prototype.evaluate=function(){for(var t=!!this.valueParser,n=(0,this.getValue)(this.valueGetterParam),i=t?this.valueParser(n):null,r=0;r<this.subCondList.length;r++)if(!this.subCondList[r].evaluate(t?i:n))return!1;return!0},t}();function YE(t,n){if(!0===t||!1===t){var i=new PE;return i.value=t,i}return GE(t)||io(""),t.and?XE("and",t,n):t.or?XE("or",t,n):t.not?function(t,n){var i=t.not;GE(i)||io("");var r=new jE;return r.child=YE(i,n),r.child||io(""),r}(t,n):function(t,n){for(var i=n.prepareGetValue(t),r=[],e=yt(t),o=t.parser,a=o?Cv(o):null,s=0;s<e.length;s++){var u=e[s];if("parser"!==u&&!n.valueGetterAttrMap.get(u)){var l=Xt(FE,u)?FE[u]:u,h=t[u],f=a?a(h):h,c=Ov(l,f)||"reg"===l&&new EE(f);c||io(""),r.push(c)}}r.length||io("");var v=new HE;return v.valueGetterParam=i,v.valueParser=a,v.getValue=n.getValue,v.subCondList=r,v}(t,n)}function XE(t,n,i){var r=n[t];wt(r)||io(""),r.length||io("");var e="and"===t?new WE:new VE;return e.children=dt(r,(function(t){return YE(t,i)})),e.children.length||io(""),e}function GE(t){return At(t)&&!ct(t)}var UE=function(){function t(t,n){this._cond=YE(t,n)}return t.prototype.evaluate=function(){return this._cond.evaluate()},t}(),ZE={type:"echarts:filter",transform:function(t){for(var n,i,r,e=t.upstream,o=(i=t.config,r={valueGetterAttrMap:Vt({dimension:!0}),prepareGetValue:function(t){var n=t.dimension;Xt(t,"dimension")||io("");var i=e.getDimensionInfo(n);return i||io(""),{dimIdx:i.index}},getValue:function(t){return e.retrieveValueFromItem(n,t.dimIdx)}},new UE(i,r)),a=[],s=0,u=e.count();s<u;s++)n=e.getRawDataItem(s),o.evaluate()&&a.push(n);return{data:a}}},qE={type:"echarts:sort",transform:function(t){var n=t.upstream,i="",r=eo(t.config);r.length||io(i);var e=[];vt(r,(function(t){var r=t.dimension,o=t.order,a=t.parser,s=t.incomparable;null==r&&io(i),"asc"!==o&&"desc"!==o&&io(i),s&&"min"!==s&&"max"!==s&&io(""),"asc"!==o&&"desc"!==o&&io("");var u=n.getDimensionInfo(r);u||io(i);var l=a?Cv(a):null;a&&!l&&io(i),e.push({dimIdx:u.index,parser:l,comparator:new Iv(o,s)})}));var o=n.sourceFormat;"arrayRows"!==o&&"objectRows"!==o&&io(i);for(var a=[],s=0,u=n.count();s<u;s++)a.push(n.getRawDataItem(s));return a.sort((function(t,i){for(var r=0;r<e.length;r++){var o=e[r],a=n.retrieveValueFromItem(t,o.dimIdx),s=n.retrieveValueFromItem(i,o.dimIdx);o.parser&&(a=o.parser(a),s=o.parser(s));var u=o.comparator.evaluate(a,s);if(0!==u)return u}return 0})),{data:a}}},$E=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="dataset",n}return E(n,t),n.prototype.init=function(n,i,r){t.prototype.init.call(this,n,i,r),this._sourceManager=new $v(this),Kv(this)},n.prototype.mergeOption=function(n,i){t.prototype.mergeOption.call(this,n,i),Kv(this)},n.prototype.optionUpdated=function(){this._sourceManager.dirty()},n.prototype.getSourceManager=function(){return this._sourceManager},n.type="dataset",n.defaultOption={seriesLayoutBy:"column"},n}(Jf),KE=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="dataset",n}return E(n,t),n.type="dataset",n}(Nd),JE=ja.CMD;function QE(t,n){return Math.abs(t-n)<1e-5}function tP(t){var n,i,r,e,o,a=t.data,s=t.len(),u=[],l=0,h=0,f=0,c=0;function v(t,i){n&&n.length>2&&u.push(n),n=[t,i]}function d(t,i,r,e){QE(t,r)&&QE(i,e)||n.push(t,i,r,e,r,e)}function p(t,i,r,e,o,a){var s=Math.abs(i-t),u=4*Math.tan(s/4)/3,l=i<t?-1:1,h=Math.cos(t),f=Math.sin(t),c=Math.cos(i),v=Math.sin(i),d=c*o+r,p=v*a+e,m=o*u*l,y=a*u*l;n.push(h*o+r-m*f,f*a+e+y*h,d+m*v,p-y*c,d,p)}for(var m=0;m<s;){var y=a[m++],g=1===m;switch(g&&(f=l=a[m],c=h=a[m+1],y!==JE.L&&y!==JE.C&&y!==JE.Q||(n=[f,c])),y){case JE.M:l=f=a[m++],h=c=a[m++],v(f,c);break;case JE.L:d(l,h,i=a[m++],r=a[m++]),l=i,h=r;break;case JE.C:n.push(a[m++],a[m++],a[m++],a[m++],l=a[m++],h=a[m++]);break;case JE.Q:i=a[m++],r=a[m++],e=a[m++],o=a[m++],n.push(l+2/3*(i-l),h+2/3*(r-h),e+2/3*(i-e),o+2/3*(r-o),e,o),l=e,h=o;break;case JE.A:var b=a[m++],w=a[m++],x=a[m++],M=a[m++],S=a[m++],k=a[m++]+S;m+=1;var A=!a[m++];i=Math.cos(S)*x+b,r=Math.sin(S)*M+w,g?v(f=i,c=r):d(l,h,i,r),l=Math.cos(k)*x+b,h=Math.sin(k)*M+w;for(var N=(A?-1:1)*Math.PI/2,C=S;A?C>k:C<k;C+=N)p(C,A?Math.max(C+N,k):Math.min(C+N,k),b,w,x,M);break;case JE.R:f=l=a[m++],c=h=a[m++],i=f+a[m++],r=c+a[m++],v(i,c),d(i,c,i,r),d(i,r,f,r),d(f,r,f,c),d(f,c,i,c);break;case JE.Z:n&&d(l,h,f,c),l=f,h=c}}return n&&n.length>2&&u.push(n),u}function nP(t,n,i,r,e,o,a,s,u,l){if(QE(t,i)&&QE(n,r)&&QE(e,a)&&QE(o,s))u.push(a,s);else{var h=2/l,f=h*h,c=a-t,v=s-n,d=Math.sqrt(c*c+v*v);c/=d,v/=d;var p=i-t,m=r-n,y=e-a,g=o-s,b=p*p+m*m,w=y*y+g*g;if(b<f&&w<f)u.push(a,s);else{var x=c*p+v*m,M=-c*y-v*g;if(b-x*x<f&&x>=0&&w-M*M<f&&M>=0)u.push(a,s);else{var S=[],k=[];vi(t,i,e,a,.5,S),vi(n,r,o,s,.5,k),nP(S[0],k[0],S[1],k[1],S[2],k[2],S[3],k[3],u,l),nP(S[4],k[4],S[5],k[5],S[6],k[6],S[7],k[7],u,l)}}}}function iP(t,n,i){var r=Math.abs(t[n]/t[1-n]),e=Math.ceil(Math.sqrt(r*i)),o=Math.floor(i/e);0===o&&(o=1,e=i);for(var a=[],s=0;s<e;s++)a.push(o);var u=i-e*o;if(u>0)for(s=0;s<u;s++)a[s%e]+=1;return a}function rP(t,n,i){for(var r=t.r0,e=t.r,o=t.startAngle,a=Math.abs(t.endAngle-o),s=a*e,u=e-r,l=s>Math.abs(u),h=iP([s,u],l?0:1,n),f=(l?a:u)/h.length,c=0;c<h.length;c++)for(var v=(l?u:a)/h[c],d=0;d<h[c];d++){var p={};l?(p.startAngle=o+f*c,p.endAngle=o+f*(c+1),p.r0=r+v*d,p.r=r+v*(d+1)):(p.startAngle=o+v*d,p.endAngle=o+v*(d+1),p.r0=r+f*c,p.r=r+f*(c+1)),p.clockwise=t.clockwise,p.cx=t.cx,p.cy=t.cy,i.push(p)}}function eP(t,n,i,r){return t*r-i*n}function oP(t,n,i,r,e,o,a,s){var u=i-t,l=r-n,h=a-e,f=s-o,c=eP(h,f,u,l);if(Math.abs(c)<1e-6)return null;var v=eP(t-e,n-o,h,f)/c;return v<0||v>1?null:new ee(v*u+t,v*l+n)}function aP(t,n,i){var r=new ee;ee.sub(r,i,n),r.normalize();var e=new ee;return ee.sub(e,t,n),e.dot(r)}function sP(t,n){var i=t[t.length-1];i&&i[0]===n[0]&&i[1]===n[1]||t.push(n)}function uP(t){var n=t.points,i=[],r=[];ya(n,i,r);var e=new ve(i[0],i[1],r[0]-i[0],r[1]-i[1]),o=e.width,a=e.height,s=e.x,u=e.y,l=new ee,h=new ee;return o>a?(l.x=h.x=s+o/2,l.y=u,h.y=u+a):(l.y=h.y=u+a/2,l.x=s,h.x=s+o),function(t,n,i){for(var r=t.length,e=[],o=0;o<r;o++){var a=t[o],s=t[(o+1)%r],u=oP(a[0],a[1],s[0],s[1],n.x,n.y,i.x,i.y);u&&e.push({projPt:aP(u,n,i),pt:u,idx:o})}if(e.length<2)return[{points:t},{points:t}];e.sort((function(t,n){return t.projPt-n.projPt}));var l=e[0],h=e[e.length-1];if(h.idx<l.idx){var f=l;l=h,h=f}var c=[l.pt.x,l.pt.y],v=[h.pt.x,h.pt.y],d=[c],p=[v];for(o=l.idx+1;o<=h.idx;o++)sP(d,t[o].slice());for(sP(d,v),sP(d,c),o=h.idx+1;o<=l.idx+r;o++)sP(p,t[o%r].slice());return sP(p,c),sP(p,v),[{points:d},{points:p}]}(n,l,h)}function lP(t,n,i,r){if(1===i)r.push(n);else{var e=Math.floor(i/2),o=t(n);lP(t,o[0],e,r),lP(t,o[1],i-e,r)}return r}function hP(t,n){n.setStyle(t.style),n.z=t.z,n.z2=t.z2,n.zlevel=t.zlevel}function fP(t,n){var i=t.length,r=n.length;if(i===r)return[t,n];for(var e=[],o=[],a=i<r?t:n,s=Math.min(i,r),u=Math.abs(r-i)/6,l=Math.ceil(u/((s-2)/6))+1,h=[a[0],a[1]],f=u,c=2;c<s;){var v=a[c-2],d=a[c-1],p=a[c++],m=a[c++],y=a[c++],g=a[c++],b=a[c++],w=a[c++];if(f<=0)h.push(p,m,y,g,b,w);else{for(var x=Math.min(f,l-1)+1,M=1;M<=x;M++){var S=M/x;vi(v,p,y,b,S,e),vi(d,m,g,w,S,o),h.push(e[1],o[1],e[2],o[2],v=e[3],d=o[3]),p=e[5],m=o[5],y=e[6],g=o[6]}f-=x-1}}return a===t?[h,n]:[t,h]}function cP(t,n){for(var i=t.length,r=t[i-2],e=t[i-1],o=[],a=0;a<n.length;)o[a++]=r,o[a++]=e;return o}function vP(t){for(var n=0,i=0,r=0,e=t.length,o=0,a=e-2;o<e;a=o,o+=2){var s=t[a],u=t[a+1],l=t[o],h=t[o+1],f=s*h-l*u;n+=f,i+=(s+l)*f,r+=(u+h)*f}return 0===n?[t[0]||0,t[1]||0]:[i/n/3,r/n/3,n]}function dP(t,n,i,r){for(var e=(t.length-2)/6,o=1/0,a=0,s=t.length,u=s-2,l=0;l<e;l++){for(var h=6*l,f=0,c=0;c<s;c+=2){var v=0===c?h:(h+c-2)%u+2,d=n[c]-r[0]-(t[v]-i[0]),p=n[c+1]-r[1]-(t[v+1]-i[1]);f+=d*d+p*p}f<o&&(o=f,a=l)}return a}function pP(t){for(var n=[],i=t.length,r=0;r<i;r+=2)n[r]=t[i-r-2],n[r+1]=t[i-r-1];return n}function mP(t){return t.__isCombineMorphing}function yP(t,n,i){var r="__mOriginal_"+n,e=t[r]||t[n];t[r]||(t[r]=t[n]);var o=i.replace,a=i.after,s=i.before;t[n]=function(){var t,n=arguments;return s&&s.apply(this,n),t=o?o.apply(this,n):e.apply(this,n),a&&a.apply(this,n),t}}function gP(t,n){var i="__mOriginal_"+n;t[i]&&(t[n]=t[i],t[i]=null)}function bP(t,n){for(var i=0;i<t.length;i++)for(var r=t[i],e=0;e<r.length;){var o=r[e],a=r[e+1];r[e++]=n[0]*o+n[2]*a+n[4],r[e++]=n[1]*o+n[3]*a+n[5]}}function wP(t,n){var i=t.getUpdatedPathProxy(),r=n.getUpdatedPathProxy(),e=function(t,n){for(var i,r,e,o=[],a=[],s=0;s<Math.max(t.length,n.length);s++){var u=t[s],l=n[s],h=void 0,f=void 0;u?l?(r=h=(i=fP(u,l))[0],e=f=i[1]):(f=cP(e||u,u),h=u):(h=cP(r||l,l),f=l),o.push(h),a.push(f)}return[o,a]}(tP(i),tP(r)),o=e[0],a=e[1],s=t.getComputedTransform(),u=n.getComputedTransform();s&&bP(o,s),u&&bP(a,u),yP(n,"updateTransform",{replace:function(){this.transform=null}}),n.transform=null;var l=function(t,n,i,r){for(var e,o=[],a=0;a<t.length;a++){var s=t[a],u=n[a],l=vP(s),h=vP(u);null==e&&(e=l[2]<0!=h[2]<0);var f=[],c=[],v=0,d=1/0,p=[],m=s.length;e&&(s=pP(s));for(var y=6*dP(s,u,l,h),g=m-2,b=0;b<g;b+=2){var w=(y+b)%g+2;f[b+2]=s[w]-l[0],f[b+3]=s[w+1]-l[1]}f[0]=s[y]-l[0],f[1]=s[y+1]-l[1];for(var x=r/10,M=-r/2;M<=r/2;M+=x){var S=Math.sin(M),k=Math.cos(M),A=0;for(b=0;b<s.length;b+=2){var N=f[b],C=f[b+1],T=u[b]-h[0],z=u[b+1]-h[1],I=T*k-z*S,L=T*S+z*k;p[b]=I,p[b+1]=L;var O=I-N,D=L-C;A+=O*O+D*D}if(A<d){d=A,v=M;for(var R=0;R<p.length;R++)c[R]=p[R]}}o.push({from:f,to:c,fromCp:l,toCp:h,rotation:-v})}return o}(o,a,0,Math.PI),h=[];yP(n,"buildPath",{replace:function(t){for(var i=n.__morphT,r=1-i,e=[],o=0;o<l.length;o++){var a=l[o],s=a.from,u=a.to,f=a.rotation*i,c=a.fromCp,v=a.toCp,d=Math.sin(f),p=Math.cos(f);hn(e,c,v,i);for(var m=0;m<s.length;m+=2){var y=s[m]*r+(x=u[m])*i,g=s[m+1]*r+(M=u[m+1])*i;h[m]=y*p-g*d+e[0],h[m+1]=y*d+g*p+e[1]}var b=h[0],w=h[1];for(t.moveTo(b,w),m=2;m<s.length;){var x=h[m++],M=h[m++],S=h[m++],k=h[m++],A=h[m++],N=h[m++];b===x&&w===M&&S===A&&k===N?t.lineTo(A,N):t.bezierCurveTo(x,M,S,k,A,N),b=A,w=N}}}})}function xP(t,n,i){if(!t||!n)return n;var r=i.done,e=i.during;return wP(t,n),n.__morphT=0,n.animateTo({__morphT:1},lt({during:function(t){n.dirtyShape(),e&&e(t)},done:function(){gP(n,"buildPath"),gP(n,"updateTransform"),n.__morphT=-1,n.createPathProxy(),n.dirtyShape(),r&&r()}},i)),n}function MP(t,n,i,r,e,o){t=e===i?0:Math.round(32767*(t-i)/(e-i)),n=o===r?0:Math.round(32767*(n-r)/(o-r));for(var a,s=0,u=32768;u>0;u/=2){var l=0,h=0;(t&u)>0&&(l=1),(n&u)>0&&(h=1),s+=u*u*(3*l^h),0===h&&(1===l&&(t=u-1-t,n=u-1-n),a=t,t=n,n=a)}return s}function SP(t){var n=1/0,i=1/0,r=-1/0,e=-1/0,o=dt(t,(function(t){var o=t.getBoundingRect(),a=t.getComputedTransform(),s=o.x+o.width/2+(a?a[4]:0),u=o.y+o.height/2+(a?a[5]:0);return n=Math.min(s,n),i=Math.min(u,i),r=Math.max(s,r),e=Math.max(u,e),[s,u]}));return dt(o,(function(o,a){return{cp:o,z:MP(o[0],o[1],n,i,r,e),path:t[a]}})).sort((function(t,n){return t.z-n.z})).map((function(t){return t.path}))}function kP(t){return function(t,n){var i,r=[],e=t.shape;switch(t.type){case"rect":!function(t,n,i){for(var r=t.width,e=t.height,o=r>e,a=iP([r,e],o?0:1,n),s=o?"width":"height",u=o?"height":"width",l=o?"x":"y",h=o?"y":"x",f=t[s]/a.length,c=0;c<a.length;c++)for(var v=t[u]/a[c],d=0;d<a[c];d++){var p={};p[l]=c*f,p[h]=d*v,p[s]=f,p[u]=v,p.x+=t.x,p.y+=t.y,i.push(p)}}(e,n,r),i=ws;break;case"sector":rP(e,n,r),i=vl;break;case"circle":rP({r0:0,r:e.r,startAngle:0,endAngle:2*Math.PI,cx:e.cx,cy:e.cy},n,r),i=vl;break;default:var o=t.getComputedTransform(),a=o?Math.sqrt(Math.max(o[0]*o[0]+o[1]*o[1],o[2]*o[2]+o[3]*o[3])):1,s=dt(function(t,n){var i=tP(t),r=[];n=n||1;for(var e=0;e<i.length;e++){var o=i[e],a=[],s=o[0],u=o[1];a.push(s,u);for(var l=2;l<o.length;){var h=o[l++],f=o[l++],c=o[l++],v=o[l++],d=o[l++],p=o[l++];nP(s,u,h,f,c,v,d,p,a,n),s=d,u=p}r.push(a)}return r}(t.getUpdatedPathProxy(),a),(function(t){return function(t){for(var n=[],i=0;i<t.length;)n.push([t[i++],t[i++]]);return n}(t)})),u=s.length;if(0===u)lP(uP,{points:s[0]},n,r);else if(u===n)for(var l=0;l<u;l++)r.push({points:s[l]});else{var h=0,f=dt(s,(function(t){var n=[],i=[];ya(t,n,i);var r=(i[1]-n[1])*(i[0]-n[0]);return h+=r,{poly:t,area:r}}));f.sort((function(t,n){return n.area-t.area}));var c=n;for(l=0;l<u;l++){var v=f[l];if(c<=0)break;var d=l===u-1?c:Math.ceil(v.area/h*n);d<0||(lP(uP,{points:v.poly},d,r),c-=d)}}i=gl}if(!i)return function(t,n){for(var i=[],r=0;r<n;r++)i.push(qu(t));return i}(t,n);var p=[];for(l=0;l<r.length;l++){var m=new i;m.setShape(r[l]),hP(t,m),p.push(m)}return p}(t.path,t.count)}function AP(t){return wt(t[0])}function NP(t,n){for(var i=[],r=t.length,e=0;e<r;e++)i.push({one:t[e],many:[]});for(e=0;e<n.length;e++){var o=n[e].length,a=void 0;for(a=0;a<o;a++)i[a%r].many.push(n[e][a])}var s=0;for(e=r-1;e>=0;e--)if(!i[e].many.length){var u=i[s].many;if(u.length<=1){if(!s)return i;s=0}o=u.length;var l=Math.ceil(o/2);i[e].many=u.slice(l,o),i[s].many=u.slice(0,l),s++}return i}var CP={clone:function(t){for(var n=[],i=1-Math.pow(1-t.path.style.opacity,1/t.count),r=0;r<t.count;r++){var e=qu(t.path);e.setStyle("opacity",i),n.push(e)}return n},split:null};function TP(t,n,i,r,e,o){if(t.length&&n.length){var a=jl("update",r,e);if(a&&a.duration>0){var s,u,l=r.getModel("universalTransition").get("delay"),h=Object.assign({setToFinal:!0},a);AP(t)&&(s=t,u=n),AP(n)&&(s=n,u=t);for(var f=s?s===t:t.length>n.length,c=s?NP(u,s):NP(f?n:t,[f?t:n]),v=0,d=0;d<c.length;d++)v+=c[d].many.length;var p=0;for(d=0;d<c.length;d++)m(c[d],f,p,v),p+=c[d].many.length}}function m(t,n,r,e,a){var s=t.many,u=t.one;if(1!==s.length||a)for(var f=lt({dividePath:CP[i],individualDelay:l&&function(t){return l(t+r,e)}},h),c=n?function(t,n,i){var r=[];!function t(n){for(var i=0;i<n.length;i++){var e=n[i];mP(e)?t(e.childrenRef()):e instanceof us&&r.push(e)}}(t);var e=r.length;if(!e)return{fromIndividuals:[],toIndividuals:[],count:0};var o=(i.dividePath||kP)({path:n,count:e});if(o.length!==e)return console.error("Invalid morphing: unmatched splitted path"),{fromIndividuals:[],toIndividuals:[],count:0};r=SP(r),o=SP(o);for(var a=i.done,s=i.during,u=i.individualDelay,l=new ne,h=0;h<e;h++){var f=r[h],c=o[h];c.parent=n,c.copyTransform(l),u||wP(f,c)}function v(t){for(var n=0;n<o.length;n++)o[n].addSelfToZr(t)}function d(){n.__isCombineMorphing=!1,n.__morphT=-1,n.childrenRef=null,gP(n,"addSelfToZr"),gP(n,"removeSelfFromZr")}n.__isCombineMorphing=!0,n.childrenRef=function(){return o},yP(n,"addSelfToZr",{after:function(t){v(t)}}),yP(n,"removeSelfFromZr",{after:function(t){for(var n=0;n<o.length;n++)o[n].removeSelfFromZr(t)}});var p=o.length;if(u){var m=p,y=function(){0==--m&&(d(),a&&a())};for(h=0;h<p;h++){var g=u?lt({delay:(i.delay||0)+u(h,p,r[h],o[h]),done:y},i):i;xP(r[h],o[h],g)}}else n.__morphT=0,n.animateTo({__morphT:1},lt({during:function(t){for(var i=0;i<p;i++){var r=o[i];r.__morphT=n.__morphT,r.dirtyShape()}s&&s(t)},done:function(){d();for(var n=0;n<t.length;n++)gP(t[n],"updateTransform");a&&a()}},i));return n.__zr&&v(n.__zr),{fromIndividuals:r,toIndividuals:o,count:p}}(s,u,f):function(t,n,i){var r=n.length,e=[],o=i.dividePath||kP;if(mP(t)){!function t(n){for(var i=0;i<n.length;i++){var r=n[i];mP(r)?t(r.childrenRef()):r instanceof us&&e.push(r)}}(t.childrenRef());var a=e.length;if(a<r)for(var s=0,u=a;u<r;u++)e.push(qu(e[s++%a]));e.length=r}else{e=o({path:t,count:r});var l=t.getComputedTransform();for(u=0;u<e.length;u++)e[u].setLocalTransform(l);if(e.length!==r)return console.error("Invalid morphing: unmatched splitted path"),{fromIndividuals:[],toIndividuals:[],count:0}}e=SP(e),n=SP(n);var h=i.individualDelay;for(u=0;u<r;u++){var f=h?lt({delay:(i.delay||0)+h(u,r,e[u],n[u])},i):i;xP(e[u],n[u],f)}return{fromIndividuals:e,toIndividuals:n,count:n.length}}(u,s,f),v=c.fromIndividuals,d=c.toIndividuals,p=v.length,y=0;y<p;y++)g=l?lt({delay:l(y,p)},h):h,o(v[y],d[y],n?s[y]:t.one,n?t.one:s[y],g);else{var g,b=n?s[0]:u,w=n?u:s[0];mP(b)?m({many:[b],one:w},!0,r,e,!0):(xP(b,w,g=l?lt({delay:l(r,e)},h):h),o(b,w,b,w,g))}}}function zP(t){if(!t)return[];if(wt(t)){for(var n=[],i=0;i<t.length;i++)n.push(zP(t[i]));return n}var r=[];return t.traverse((function(t){t instanceof us&&!t.disableMorphing&&!t.invisible&&!t.ignore&&r.push(t)})),r}var IP,LP,OP,DP,RP=yo();function _P(t){var n=[];return vt(t,(function(t){var i=t.data;if(!(i.count()>1e4))for(var r=i.getIndices(),e=function(t){for(var n=t.dimensions,i=0;i<n.length;i++){var r=t.getDimensionInfo(n[i]);if(r&&0===r.otherDims.itemGroupId)return n[i]}}(i),o=0;o<r.length;o++)n.push({data:i,dim:t.dim||e,divide:t.divide,dataIndex:o})})),n}function BP(t,n,i){t.traverse((function(t){t instanceof us&&Xl(t,{style:{opacity:0}},n,{dataIndex:i,isFrom:!0})}))}function FP(t){if(t.parent){var n=t.getComputedTransform();t.setLocalTransform(n),t.parent.remove(t)}}function EP(t){t.stopAnimation(),t.isGroup&&t.traverse((function(t){t.stopAnimation()}))}function PP(t,n,i){var r=_P(t),e=_P(n);function o(t,n,i,r,e){(i||t)&&n.animateFrom({style:i&&i!==t?ut(ut({},i.style),t.style):t.style},e)}function a(t){for(var n=0;n<t.length;n++)if(t[n].dim)return t[n].dim}var s=a(r),u=a(e),l=!1;function h(t,n){return function(i){var r=i.data,e=i.dataIndex;if(n)return r.getId(e);var o=r.hostModel&&r.hostModel.get("dataGroupId"),a=t?s||u:u||s,l=a&&r.getDimensionInfo(a),h=l&&l.ordinalMeta;if(l){var f=r.get(l.name,e);return h&&h.categories[f]||f+""}var c=r.getRawDataItem(e);return c&&c.groupId?c.groupId+"":o||r.getId(e)}}var f=function(t,n){var i=t.length;if(i!==n.length)return!1;for(var r=0;r<i;r++){var e=t[r],o=n[r];if(e.data.getId(e.dataIndex)!==o.data.getId(o.dataIndex))return!1}return!0}(r,e),c={};if(!f)for(var v=0;v<e.length;v++){var d=e[v],p=d.data.getItemGraphicEl(d.dataIndex);p&&(c[p.id]=!0)}function m(t,n){var i=r[n],a=e[t],s=a.data.hostModel,u=i.data.getItemGraphicEl(i.dataIndex),h=a.data.getItemGraphicEl(a.dataIndex);u!==h?u&&c[u.id]||h&&(EP(h),u?(EP(u),FP(u),l=!0,TP(zP(u),zP(h),a.divide,s,t,o)):BP(h,s,t)):h&&function(t,n,i){var r=jl("update",i,n);r&&t.traverse((function(t){if(t instanceof aa){var n=function(t){return Vl(t).oldStyle}(t);n&&t.animateFrom({style:n},r)}}))}(h,a.dataIndex,s)}new yy(r,e,h(!0,f),h(!1,f),null,"multiple").update(m).updateManyToOne((function(t,n){var i=e[t],a=i.data,s=a.hostModel,u=a.getItemGraphicEl(i.dataIndex),h=mt(dt(n,(function(t){return r[t].data.getItemGraphicEl(r[t].dataIndex)})),(function(t){return t&&t!==u&&!c[t.id]}));u&&(EP(u),h.length?(vt(h,(function(t){EP(t),FP(t)})),l=!0,TP(zP(h),zP(u),i.divide,s,t,o)):BP(u,s,i.dataIndex))})).updateOneToMany((function(t,n){var i=r[n],a=i.data.getItemGraphicEl(i.dataIndex);if(!a||!c[a.id]){var s=mt(dt(t,(function(t){return e[t].data.getItemGraphicEl(e[t].dataIndex)})),(function(t){return t&&t!==a})),u=e[t[0]].data.hostModel;s.length&&(vt(s,(function(t){return EP(t)})),a?(EP(a),FP(a),l=!0,TP(zP(a),zP(s),i.divide,u,t[0],o)):vt(s,(function(n){return BP(n,u,t[0])})))}})).updateManyToMany((function(t,n){new yy(n,t,(function(t){return r[t].data.getId(r[t].dataIndex)}),(function(t){return e[t].data.getId(e[t].dataIndex)})).update((function(i,r){m(t[i],n[r])})).execute()})).execute(),l&&vt(n,(function(t){var n=t.data.hostModel,r=n&&i.getViewOfSeriesModel(n),e=jl("update",n,0);r&&n.isAnimationEnabled()&&e&&e.duration>0&&r.group.traverse((function(t){t instanceof us&&!t.animators.length&&t.animateFrom({style:{opacity:0}},e)}))}))}function WP(t){return t.getModel("universalTransition").get("seriesKey")||t.id}function VP(t){return wt(t)?t.sort().join(","):t}function jP(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function HP(t,n){for(var i=0;i<t.length;i++)if(null!=n.seriesIndex&&n.seriesIndex===t[i].seriesIndex||null!=n.seriesId&&n.seriesId===t[i].id)return i}dy([function(t){t.registerPainter("canvas",fx)}]),dy([function(t){t.registerPainter("svg",ux)}]),dy([function(t){t.registerChartView(Yx),t.registerSeriesModel(cx),t.registerLayout(Xx("line",!0)),t.registerVisual({seriesType:"line",reset:function(t){var n=t.getData(),i=t.getModel("lineStyle").getLineStyle();i&&!i.stroke&&(i.stroke=n.getVisual("style").fill),n.setVisual("legendLineStyle",i)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,Zx("line"))},function(t){t.registerChartView(rM),t.registerSeriesModel($x),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,bt(gg,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,bg("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,Zx("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},(function(t,n){n.eachComponent({mainType:t.componentType||"series",query:t},(function(n){t.sortInfo&&n.axis.setCategorySortInfo(t.sortInfo)}))}))},function(t){t.registerChartView(LM),t.registerSeriesModel(RM),kp("pie",t.registerAction),t.registerLayout(bt(SM,"pie")),t.registerProcessor(kM("pie")),t.registerProcessor({seriesType:"pie",reset:function(t){var n=t.getData();n.filterSelf((function(t){var i=n.mapDimension("value"),r=n.get(i,t);return!(kt(r)&&!isNaN(r)&&r<0)}))}})},function(t){dy(RS),t.registerSeriesModel(_M),t.registerChartView(PM),t.registerLayout(Xx("scatter"))},function(t){dy(ZS),t.registerChartView(PS),t.registerSeriesModel(WS),t.registerLayout(_S),t.registerProcessor(kM("radar")),t.registerPreprocessor(ES)},function(t){dy(bA),t.registerChartView(nA),t.registerSeriesModel(iA),t.registerLayout(eA),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,rA),kp("map",t.registerAction)},function(t){t.registerChartView(LA),t.registerSeriesModel(QA),t.registerLayout(nN),t.registerVisual(iN),function(t){t.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(t,n){n.eachComponent({mainType:"series",subType:"tree",query:t},(function(n){var i=t.dataIndex,r=n.getData().tree.getNodeByDataIndex(i);r.isExpand=!r.isExpand}))})),t.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},(function(t,n){n.eachComponent({mainType:"series",subType:"tree",query:t},(function(n){var i=mA(n.coordinateSystem,t);n.setCenter&&n.setCenter(i.center),n.setZoom&&n.setZoom(i.zoom)}))}))}(t)},function(t){t.registerSeriesModel(oN),t.registerChartView(mN),t.registerVisual(ON),t.registerLayout(XN),function(t){for(var n=0;n<rN.length;n++)t.registerAction({type:rN[n],update:"updateView"},Gt);t.registerAction({type:"treemapRootToNode",update:"updateView"},(function(t,n){n.eachComponent({mainType:"series",subType:"treemap",query:t},(function(n){var i=qA(t,["treemapZoomToNode","treemapRootToNode"],n);if(i){var r=n.getViewRoot();r&&(t.direction=KA(r,i.node)?"rollUp":"drillDown"),n.resetViewRoot(i.node)}}))}))}(t)},function(t){t.registerChartView(YC),t.registerSeriesModel(KC),t.registerProcessor(KN),t.registerVisual(JN),t.registerVisual(tC),t.registerLayout(lC),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,mC),t.registerLayout(gC),t.registerCoordinateSystem("graphView",{dimensions:aA.dimensions,create:bC}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Gt),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Gt),t.registerAction(JC,(function(t,n){n.eachComponent({mainType:"series",query:t},(function(n){var i=mA(n.coordinateSystem,t);n.setCenter&&n.setCenter(i.center),n.setZoom&&n.setZoom(i.zoom)}))}))},function(t){t.registerChartView(iT),t.registerSeriesModel(rT)},function(t){t.registerChartView(aT),t.registerSeriesModel(sT),t.registerLayout(uT),t.registerProcessor(kM("funnel"))},function(t){dy(Oz),t.registerChartView(lT),t.registerSeriesModel(dT),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,yT)},function(t){t.registerChartView(_z),t.registerSeriesModel(Bz),t.registerLayout(Fz),t.registerVisual(qz),t.registerAction({type:"dragNode",event:"dragnode",update:"update"},(function(t,n){n.eachComponent({mainType:"series",subType:"sankey",query:t},(function(n){n.setNodePosition(t.dataIndex,[t.localX,t.localY])}))}))},function(t){t.registerSeriesModel(Kz),t.registerChartView(Jz),t.registerVisual(eI),t.registerLayout(aI),t.registerTransform(sI)},function(t){t.registerChartView(lI),t.registerSeriesModel(wI),t.registerPreprocessor(xI),t.registerVisual(NI),t.registerLayout(CI)},function(t){t.registerChartView(LI),t.registerSeriesModel(OI),t.registerLayout(Xx("effectScatter"))},function(t){t.registerChartView(WI),t.registerSeriesModel(YI),t.registerLayout(PI),t.registerVisual(GI)},function(t){t.registerChartView(qI),t.registerSeriesModel($I)},function(t){t.registerChartView(tL),t.registerSeriesModel(gL),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,bt(gg,"pictorialBar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,bg("pictorialBar"))},function(t){t.registerChartView(bL),t.registerSeriesModel(wL),t.registerLayout(xL),t.registerProcessor(kM("themeRiver"))},function(t){t.registerChartView(kL),t.registerSeriesModel(AL),t.registerLayout(bt(TL,"sunburst")),t.registerProcessor(bt(kM,"sunburst")),t.registerVisual(IL),function(t){t.registerAction({type:"sunburstRootToNode",update:"updateView"},(function(t,n){n.eachComponent({mainType:"series",subType:"sunburst",query:t},(function(n){var i=qA(t,["sunburstRootToNode"],n);if(i){var r=n.getViewRoot();r&&(t.direction=KA(r,i.node)?"rollUp":"drillDown"),n.resetViewRoot(i.node)}}))})),t.registerAction({type:"sunburstHighlight",update:"none"},(function(t,n,i){t=ut({},t),n.eachComponent({mainType:"series",subType:"sunburst",query:t},(function(n){var i=qA(t,["sunburstHighlight"],n);i&&(t.dataIndex=i.node.dataIndex)})),i.dispatchAction(ut(t,{type:"highlight"}))})),t.registerAction({type:"sunburstUnhighlight",update:"updateView"},(function(t,n,i){t=ut({},t),i.dispatchAction(ut(t,{type:"downplay"}))}))}(t)},function(t){t.registerChartView(yO),t.registerSeriesModel(RL)}]),dy((function(){dy(RS),dy(yD)})),dy((function(t){dy(yD),MS.registerAxisPointerClass("PolarAxisPointer",gD),t.registerCoordinateSystem("polar",OD),t.registerComponentModel(wD),t.registerComponentView(ZD),UM(t,"angle",MD,GD),UM(t,"radius",SD,UD),t.registerComponentView(FD),t.registerComponentView(VD),t.registerLayout(bt(XD,"bar"))})),dy(bA),dy((function(t){dy(yD),MS.registerAxisPointerClass("SingleAxisPointer",uR),t.registerComponentView(cR),t.registerComponentView(JD),t.registerComponentModel(tR),UM(t,"single",tR,tR.defaultOption),t.registerCoordinateSystem("single",oR)})),dy(Oz),dy((function(t){t.registerComponentModel(vR),t.registerComponentView(pR),t.registerCoordinateSystem("calendar",mR)})),dy((function(t){t.registerComponentModel(MR),t.registerComponentView(AR),t.registerPreprocessor((function(t){var n=t.graphic;wt(n)?t.graphic=n[0]&&n[0].elements?[t.graphic[0]]:[{elements:n}]:n&&!n.elements&&(t.graphic=[{elements:[n]}])}))})),dy((function(t){t.registerComponentModel(KR),t.registerComponentView(QR),qR("saveAsImage",t_),qR("magicType",i_),qR("dataView",s_),qR("dataZoom",C_),qR("restore",c_),dy(GR)})),dy((function(t){dy(yD),t.registerComponentModel(I_),t.registerComponentView(G_),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Gt),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Gt)})),dy(yD),dy((function(t){t.registerComponentView(cB),t.registerComponentModel(vB),t.registerPreprocessor(K_),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,sB),t.registerAction({type:"brush",event:"brush",update:"updateVisual"},(function(t,n){n.eachComponent({mainType:"brush",query:t},(function(n){n.setAreas(t.areas)}))})),t.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Gt),t.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Gt),qR("brush",mB)})),dy((function(t){t.registerComponentModel(yB),t.registerComponentView(gB)})),dy((function(t){t.registerComponentModel(wB),t.registerComponentView(AB),t.registerSubTypeDefaulter("timeline",(function(){return"slider"})),function(t){t.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},(function(t,n,i){var r=n.getComponent("timeline");return r&&null!=t.currentIndex&&(r.setCurrentIndex(t.currentIndex),!r.get("loop",!0)&&r.isIndexMax()&&r.getPlayState()&&(r.setPlayState(!1),i.dispatchAction({type:"timelinePlayChange",playState:!1,from:t.from}))),n.resetOption("timeline",{replaceMerge:r.get("replaceMerge",!0)}),lt({currentIndex:r.option.currentIndex},t)})),t.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},(function(t,n){var i=n.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)}))}(t),t.registerPreprocessor(TB)})),dy((function(t){t.registerComponentModel(_B),t.registerComponentView(GB),t.registerPreprocessor((function(t){LB(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})}))})),dy((function(t){t.registerComponentModel(UB),t.registerComponentView(tF),t.registerPreprocessor((function(t){LB(t.series,"markLine")&&(t.markLine=t.markLine||{})}))})),dy((function(t){t.registerComponentModel(nF),t.registerComponentView(lF),t.registerPreprocessor((function(t){LB(t.series,"markArea")&&(t.markArea=t.markArea||{})}))})),dy((function(){dy(xF),dy(TF)})),dy((function(){dy(PF),dy(GF)})),dy(PF),dy(GF),dy((function(){dy(NE),dy(LE)})),dy(NE),dy(LE),dy((function(t){t.registerPreprocessor(BE),t.registerVisual(t.PRIORITY.VISUAL.ARIA,_E)})),dy((function(t){t.registerTransform(ZE),t.registerTransform(qE)})),dy((function(t){t.registerComponentModel($E),t.registerComponentView(KE)})),dy((function(t){t.registerUpdateLifecycle("series:beforeupdate",(function(t,n,i){vt(eo(i.seriesTransition),(function(t){vt(eo(t.to),(function(t){for(var n=i.updatedSeries,r=0;r<n.length;r++)(null!=t.seriesIndex&&t.seriesIndex===n[r].seriesIndex||null!=t.seriesId&&t.seriesId===n[r].id)&&(n[r].__universalTransitionEnabled=!0)}))}))})),t.registerUpdateLifecycle("series:transition",(function(t,n,i){var r=RP(n);if(r.oldSeries&&i.updatedSeries&&i.optionChanged){var e=i.seriesTransition;if(e)vt(eo(e),(function(t){!function(t,n,i,r){var e=[],o=[];vt(eo(t.from),(function(t){var i=HP(n.oldSeries,t);i>=0&&e.push({data:n.oldData[i],divide:jP(n.oldData[i]),dim:t.dimension})})),vt(eo(t.to),(function(t){var n=HP(i.updatedSeries,t);if(n>=0){var r=i.updatedSeries[n].getData();o.push({data:r,divide:jP(r),dim:t.dimension})}})),e.length>0&&o.length>0&&PP(e,o,r)}(t,r,i,n)}));else{var o=function(t,n){var i=Vt(),r=Vt(),e=Vt();return vt(t.oldSeries,(function(n,i){var o=t.oldData[i],a=WP(n),s=VP(a);r.set(s,o),wt(a)&&vt(a,(function(t){e.set(t,{data:o,key:s})}))})),vt(n.updatedSeries,(function(t){if(t.isUniversalTransitionEnabled()&&t.isAnimationEnabled()){var n=t.getData(),o=WP(t),a=VP(o),s=r.get(a);if(s)i.set(a,{oldSeries:[{divide:jP(s),data:s}],newSeries:[{divide:jP(n),data:n}]});else if(wt(o)){var u=[];vt(o,(function(t){var n=r.get(t);n&&u.push({divide:jP(n),data:n})})),u.length&&i.set(a,{oldSeries:u,newSeries:[{data:n,divide:jP(n)}]})}else{var l=e.get(o);if(l){var h=i.get(l.key);h||(h={oldSeries:[{data:l.data,divide:jP(l.data)}],newSeries:[]},i.set(l.key,h)),h.newSeries.push({data:n,divide:jP(n)})}}}})),i}(r,i);vt(o.keys(),(function(t){var i=o.get(t);PP(i.oldSeries,i.newSeries,n)}))}vt(i.updatedSeries,(function(t){t.__universalTransitionEnabled&&(t.__universalTransitionEnabled=!1)}))}for(var a=t.getSeries(),s=r.oldSeries=[],u=r.oldData=[],l=0;l<a.length;l++){var h=a[l].getData();h.count()<1e4&&(s.push(a[l]),u.push(h))}}))})),dy((function(t){t.registerUpdateLifecycle("series:beforeupdate",(function(t,n){var i=aw(n).labelManager;i||(i=aw(n).labelManager=new ow),i.clearLabels()})),t.registerUpdateLifecycle("series:layoutlabels",(function(t,n,i){var r=aw(n).labelManager;i.updatedSeries.forEach((function(t){r.addLabelsOfSeries(n.getViewOfSeriesModel(t))})),r.updateLayoutConfig(n),r.layout(n),r.processLabelsOverall()}))})),function(t){t.axis="Sets the axis of the chart.",t.chartTitle="Title of the graph.",t.colors="Overrides theme's colors.",t.consistencyCheck="When true, performs checks in order to properly initialize props which could be missing (i.e.: axis). For performances purposes, this prop will run only once when the component is initially created.",t.customStyle="Custom style of the component.",t.data="The actual data of the chart.",t.legend="Sets the position of the legend. Supported values: bottom, left, right, top. Keep in mind that legend types are tied to chart types, some combinations might not work.",t.map='Choose which map you want to view, supported values: "europe", "africa", "asia", "oceania", "america" and "world". It\'s possible to supply a custom JSON too.',t.series="The data series to be displayed. They must be of the same type.",t.sizeX="The width of the chart, defaults to 100%. Accepts any valid CSS format (px, %, vw, etc.).",t.sizeY="The height of the chart, defaults to 100%. Accepts any valid CSS format (px, %, vh, etc.).",t.types="The type of the chart. Supported formats: Line, Pie, Map, Scatter.",t.xAxis="Customization options for the x Axis.",t.yAxis="Customization options for the y Axis."}(IP||(IP={})),function(t){t.BOTTOM="bottom",t.LEFT="left",t.HIDDEN="hidden",t.RIGHT="right",t.TOP="top"}(LP||(LP={})),function(t){t.AFRICA="africa",t.AMERICA="america",t.ASIA="asia",t.EUROPE="europe",t.ITALY="italy",t.OCEANIA="oceania",t.WORLD="world"}(OP||(OP={})),function(t){t.BAR="Bar",t.GAUSSIAN="Gaussian",t.LINE="Line",t.MAP="Map",t.PIE="Pie",t.SCATTER="Scatter"}(DP||(DP={}));var YP,XP,GP,UP,ZP,qP,$P,KP,JP,QP,tW,nW,iW,rW,eW,oW,aW,sW,uW,lW,hW,fW,cW,vW,dW,pW,mW,yW,gW,bW,wW,xW=function(t,n,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?t!==n||!r:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(t):r?r.value:n.get(t)},MW=function(t,n,i,r,e){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!e)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?t!==n||!e:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?e.call(t,i):e?e.value=i:n.set(t,i),i};const SW=class{constructor(i){t(this,i),this.kupEchartClick=n(this,"kup-echart-click",6),YP.add(this),this.axis="",this.colors=[],this.consistencyCheck=!1,this.chartTitle=null,this.customStyle="",this.data=null,this.legend=LP.RIGHT,this.map=null,this.series=[],this.sizeX="100%",this.sizeY="100%",this.types=[DP.LINE],this.xAxis=null,this.yAxis=null,XP.set(this,void 0),GP.set(this,void 0),UP.set(this,void 0),ZP.set(this,s()),qP.set(this,{}),$P.set(this,void 0),KP.set(this,null),JP.set(this,null),QP.set(this,null),tW.set(this,null),nW.set(this,null),iW.set(this,null),rW.set(this,null),eW.set(this,null)}async getProps(t){return T(this,IP,t)}async refresh(){i(this)}async resizeCallback(){window.clearTimeout(xW(this,$P,"f")),MW(this,$P,window.setTimeout((()=>{if(xW(this,GP,"f")){const t=this.rootElement.clientWidth-5,n=this.rootElement.clientWidth+5,i=this.rootElement.clientHeight-5,r=this.rootElement.clientHeight+5,e=xW(this,GP,"f").getWidth(),o=xW(this,GP,"f").getHeight();(e<t||e>n||o<i||o>r)&&xW(this,GP,"f").resize()}}),300),"f")}async setProps(t){z(this,IP,t)}componentWillLoad(){xW(this,ZP,"f").debug.logLoad(this,!1),xW(this,ZP,"f").theme.register(this),this.consistencyCheck&&xW(this,YP,"m",wW).call(this)}componentDidLoad(){xW(this,ZP,"f").resize.observe(this.rootElement),xW(this,ZP,"f").debug.logLoad(this,!0)}componentWillRender(){xW(this,ZP,"f").debug.logRender(this,!1),xW(this,YP,"m",bW).call(this)}componentDidRender(){this.data&&this.data.columns&&this.data.rows?xW(this,YP,"m",oW).call(this):xW(this,ZP,"f").debug.logMessage(this,"Insufficient data.("+this.data+")",h.WARNING),xW(this,ZP,"f").debug.logRender(this,!0)}render(){return r(e,{style:{"--kup_echart_height":this.sizeY?this.sizeY:"100%","--kup_echart_width":this.sizeX?this.sizeX:"100%"}},r("style",null,xW(this,ZP,"f").theme.setKupStyle(this.rootElement)),r("div",{id:O,ref:t=>MW(this,XP,t,"f")}))}disconnectedCallback(){xW(this,ZP,"f").theme.unregister(this),xW(this,ZP,"f").resize.unobserve(this.rootElement)}static get assetsDirs(){return["assets/maps"]}get rootElement(){return o(this)}};XP=new WeakMap,GP=new WeakMap,UP=new WeakMap,ZP=new WeakMap,qP=new WeakMap,$P=new WeakMap,KP=new WeakMap,JP=new WeakMap,QP=new WeakMap,tW=new WeakMap,nW=new WeakMap,iW=new WeakMap,rW=new WeakMap,eW=new WeakMap,YP=new WeakSet,oW=function(){var t;xW(this,GP,"f")&&(Mt(t=xW(this,XP,"f"))?t=Km[t]:t instanceof Vm||(t=ny(t)),t instanceof Vm&&!t.isDisposed()&&t.dispose()),this.types&&this.types.length>0?(MW(this,GP,function(t,n,i){var r=ny(t);if(r)return r;var e=new Vm(t,void 0,i);return e.id="ec_"+Qm++,Km[e.id]=e,ko(t,ty,e.id),Bm(e),dm.trigger("afterinit",e),e}(xW(this,XP,"f")),"f"),xW(this,YP,"m",aW).call(this)):xW(this,ZP,"f").debug.logMessage(this,"Can't intialize chart without specifiying at least 1 type.",h.WARNING)},aW=async function(){MW(this,KP,null,"f");let t=null;switch(this.types[0]){case DP.GAUSSIAN:t=xW(this,YP,"m",mW).call(this);break;case DP.MAP:let n="";if(this.map&&(n=this.map.features?JSON.stringify(this.map):Object.values(OP).includes(this.map)?await(await fetch(a(`./assets/maps/${this.map}.json`))).text():this.map),!n)return void xW(this,ZP,"f").debug.logMessage(this,"Couldn't fetch map JSON.",h.WARNING);fy(this.rootElement.id?this.rootElement.id:"",n),t=xW(this,YP,"m",dW).call(this,n);break;case DP.PIE:t=xW(this,YP,"m",pW).call(this);break;default:t=xW(this,YP,"m",gW).call(this)}xW(this,GP,"f").setOption(t,!0),xW(this,GP,"f").on("click",(t=>{const n=xW(this,ZP,"f").data.column.find(this.data,{title:t.seriesName})[0];let i=null;"map"===t.seriesType?i=xW(this,ZP,"f").data.row.find(this.data,{value:xW(this,qP,"f")[t.name]})[0]:xW(this,KP,"f")&&"bar"===t.seriesType?i=xW(this,KP,"f").rows[t.dataIndex]:Array.isArray(t.data)||(i=this.data.rows[t.dataIndex]),this.kupEchartClick.emit({comp:this,id:this.rootElement.id,column:n,row:i,x:Array.isArray(t.data)?t.data[0]:t.name,y:Array.isArray(t.data)?t.data[1]:t.value})}))},sW=function(t=null){const n=[];if(t||(t=this.data),this.axis)for(let i=0;i<t.rows.length;i++){const r=t.rows[i].cells,e={},o=b(t.columns,this.axis).title;e[o]=r[this.axis],n.push(e[o].value)}else for(let i=0;i<t.rows.length;i++){const r=t.rows[i].cells,e={};for(const n in r){const i=r[n];e[b(t.columns,n).title]=i}e[0]&&n.push(e[0].value)}return n},uW=function(){const t={};if(this.series&&this.series.length>0){for(const n of this.data.rows)for(const i of Object.keys(n.cells))if(i!=this.axis&&this.series.includes(i)){const r=n.cells[i].value,e=b(this.data.columns,i);if(e){const n=e.title;t[n]||(t[n]=[]),t[n].push(r)}}}else for(const n of this.data.rows)for(const i of Object.keys(n.cells))if(i!==this.axis){const r=n.cells[i].value,e=b(this.data.columns,i);if(e){const n=e.title;t[n]||(t[n]=[]),t[n].push(r)}}return t},lW=function(){return{axisLabel:{color:xW(this,eW,"f"),fontFamily:xW(this,rW,"f")},axisLine:{lineStyle:{color:xW(this,eW,"f")}},axisTick:{lineStyle:{color:xW(this,JP,"f")}},splitLine:{lineStyle:{color:xW(this,JP,"f")}}}},hW=function(t){if(this.legend===LP.HIDDEN)return null;const n=[];for(let i in t)n.push(i);return{data:n,[this.legend]:0,textStyle:{color:xW(this,eW,"f"),fontFamily:xW(this,rW,"f")}}},fW=function(){return{text:this.chartTitle?this.chartTitle.value:void 0,[this.chartTitle&&this.chartTitle.position?this.chartTitle.position:"left"]:0,textStyle:{color:this.chartTitle&&this.chartTitle.color?this.chartTitle.color:"black",fontFamily:xW(this,rW,"f"),fontSize:this.chartTitle&&this.chartTitle.size?this.chartTitle.size:16}}},cW=function(){return{backgroundColor:xW(this,QP,"f"),textStyle:{color:xW(this,eW,"f"),fontFamily:xW(this,rW,"f")}}},vW=function(t,n,i,r){const e={visualMap:{show:!1}},o=r?i.length>0?{inRange:{color:i},min:n,max:t,textStyle:{color:xW(this,eW,"f")}}:{inRange:{color:[xW(this,nW,"f"),xW(this,iW,"f")]},min:n,max:t,textStyle:{color:xW(this,eW,"f")}}:void 0;return o&&(e.visualMap=Object.assign(Object.assign(Object.assign({},e.visualMap),o),{calculable:!0,formatter:t=>xW(this,ZP,"f").math.format(t),min:n,max:t,show:!0})),e},dW=function(t){const n=JSON.parse(t),i=[],r=[];for(let t=0;t<n.features.length;t++){const e=n.features[t];i.push(e.properties.iso_a2),r.push(e.properties.name)}const e={};let o;for(const t of this.data.rows){o=t.cells[this.axis].value,e[o]=[];for(const n of Object.keys(t.cells)){const i=t.cells[n].value;if(!this.axis.includes(n)){if(this.series&&this.series.length>0&&!this.series.includes(n))continue;e[o].push(i)}}}const a=[],s=[];let u=!1,l=0,h=0;for(let t in e){let n=null,o=null;for(let i=0;i<e[t].length;i++){const r=e[t][i],a=xW(this,ZP,"f").theme.colorCheck(r).hexColor;a?n=a:(o=xW(this,ZP,"f").math.numberify(r),o>h&&(h=o),o<l&&(l=o))}const f=r.includes(t);null!==o?(s.push({name:f?t:r[i.indexOf(t)],value:o||void 0}),n&&a.push(n),u=!0):n&&s.push({itemStyle:{color:n},name:f?t:r[i.indexOf(t)]}),xW(this,qP,"f")[f?r[r.indexOf(t)]:r[i.indexOf(t)]]=t}return Object.assign({emphasis:{label:{show:!0}},title:xW(this,YP,"m",fW).call(this),tooltip:Object.assign(Object.assign({},xW(this,YP,"m",cW).call(this)),{formatter:t=>{const n=t.value;return isNaN(n)||null==n?null:"<div style='min-width: 60px; text-align: center'>"+xW(this,ZP,"f").math.format(n)+"</div>"},showDelay:0,trigger:"item",transitionDuration:.2}),series:[{data:s,emphasis:{itemStyle:{areaColor:null,borderWidth:1.5},label:{color:xW(this,eW,"f"),fontFamily:xW(this,rW,"f"),show:!0}},itemStyle:{areaColor:xW(this,QP,"f"),borderColor:xW(this,eW,"f")},label:{backgroundColor:xW(this,QP,"f"),borderColor:xW(this,JP,"f"),borderRadius:4,borderWidth:1,color:xW(this,eW,"f"),fontFamily:xW(this,rW,"f"),padding:4},map:this.rootElement.id?this.rootElement.id:"",name:xW(this,ZP,"f").data.column.find(this.data,{name:this.axis})[0].title,roam:!0,select:{itemStyle:{areaColor:xW(this,tW,"f")[0]},label:{color:xW(this,eW,"f"),fontFamily:xW(this,rW,"f"),show:!0}},type:"map"}]},xW(this,YP,"m",vW).call(this,h,l,a,u))},pW=function(){const t=xW(this,YP,"m",uW).call(this),n=[];for(let i in t){let r=0;for(let n=0;n<t[i].length;n++)r+=parseFloat(t[i][n]);n.push({name:i,value:r})}return{color:xW(this,tW,"f"),legend:xW(this,YP,"m",hW).call(this,t),title:xW(this,YP,"m",fW).call(this),tooltip:Object.assign(Object.assign({},xW(this,YP,"m",cW).call(this)),{trigger:"item",formatter:"{a} <br/>{b}: {c} ({d}%)"}),series:[{name:xW(this,ZP,"f").data.column.find(this.data,{name:this.axis})[0].title,type:"pie",data:n,emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]}},mW=function(){let t=xW(this,YP,"m",sW).call(this);const n=xW(this,YP,"m",uW).call(this),i=[],r=this.types.filter((t=>t!=DP.GAUSSIAN)).length>0,e=1==this.types.filter((t=>t!=DP.GAUSSIAN)).length;MW(this,UP,{},"f");let o=0;for(const a in n){let s;s=this.types[o]?this.types[o]:DP.GAUSSIAN;let u=null;const l=this.data.columns.find((t=>t.title===a));if(s==DP.GAUSSIAN)if(xW(this,ZP,"f").objects.isNumber(l.obj))u=n[a];else{const t=xW(this,ZP,"f").data.distinct(this.data,[l.name]);u=xW(this,ZP,"f").data.cell.getValue(t,[l.name]),xW(this,UP,"f")[l.name]=t}else e?(MW(this,KP,xW(this,ZP,"f").data.sort(this.data,"normalDistribution",l.name),"f"),u=xW(this,ZP,"f").data.cell.getValue(xW(this,KP,"f"),[l.name]),t=xW(this,YP,"m",sW).call(this,xW(this,KP,"f"))):u=xW(this,ZP,"f").data.cell.getValue(this.data,[l.name]);xW(this,YP,"m",yW).call(this,s,i,u,a,r,e),o++}const a=[Object.assign(Object.assign(Object.assign({},xW(this,YP,"m",lW).call(this)),{data:t.length>0?t:null,type:"category"}),this.xAxis),Object.assign(Object.assign(Object.assign({},xW(this,YP,"m",lW).call(this)),{type:"value",max:"dataMax",min:"dataMin"}),this.xAxis)],s=[Object.assign(Object.assign(Object.assign({},xW(this,YP,"m",lW).call(this)),{type:"value"}),this.yAxis),Object.assign(Object.assign(Object.assign({},xW(this,YP,"m",lW).call(this)),{type:"value"}),this.yAxis)];return r||(a.splice(0,1),s.splice(0,1)),{color:xW(this,tW,"f"),legend:xW(this,YP,"m",hW).call(this,n),series:i,title:xW(this,YP,"m",fW).call(this),tooltip:Object.assign(Object.assign({},xW(this,YP,"m",cW).call(this)),{trigger:"axis",formatter:t=>{t.sort(((t,n)=>t.seriesIndex-n.seriesIndex));const n='<div style="display: flex; flex-direction: column">';let i=n,r=0;for(let e=0;e<t.length;e++){const o=t[e];if(null==this.types[o.seriesIndex]||this.types[o.seriesIndex]==DP.GAUSSIAN){const t=o.value[0],a=`<div style="color: ${o.color};"><span style="margin-right: 5px;"><strong>x:</strong></span><span>${o.value[0]}</span></div>`;e||(i+=a);const s=this.data.columns.find((t=>t.title===o.seriesName)).name,u={columns:[s],range:{max:t+t/100*50,min:t-t/100*50}},l=xW(this,ZP,"f").data.row.find(xW(this,UP,"f")[s]?xW(this,UP,"f")[s]:this.data,u);for(let t=0;t<l.length;t++){const n=l[t].cells;if(n[this.axis]||n[s].title){let t="";t=n[this.axis]?n[this.axis].value:n[s].title,r%4||(r&&(i+="</div>"),i+='<div style="display: flex; flex-direction: row;">'),i+=`<span style="color: ${o.color}; margin-right: 5px"><strong>${t}</strong>: ${n[s].value}</span>`,r++}}i!==n&&(i+="</div>")}else i+=`<div style="color: ${o.color}; margin-right: 5px"><strong>${o.name}</strong>: ${o.value}</div>`}return i===n?null:i}}),xAxis:a,yAxis:s}},yW=function(t,n,i,r,e=!1,o=!1){switch(t){case DP.GAUSSIAN:n.push({data:xW(this,ZP,"f").math.normalDistribution(i),name:r,showSymbol:!1,smooth:!0,type:"line",xAxisIndex:e?1:0,yAxisIndex:e?1:0});break;case DP.BAR:n.push({data:i,name:r,type:"bar",barWidth:o?"100%":void 0});break;case DP.SCATTER:n.push({data:i,name:r,type:"scatter"});break;case DP.LINE:default:n.push({data:i,name:r,type:"line"})}},gW=function(){const t=xW(this,YP,"m",sW).call(this),n=xW(this,YP,"m",uW).call(this);let i=0;const r=[];for(const t in n){const e=n[t];let o;o=this.types[i]?this.types[i]:DP.LINE,xW(this,YP,"m",yW).call(this,o,r,e,t),i++}return{color:xW(this,tW,"f"),legend:xW(this,YP,"m",hW).call(this,n),series:r,title:xW(this,YP,"m",fW).call(this),tooltip:Object.assign(Object.assign({},xW(this,YP,"m",cW).call(this)),{trigger:"axis"}),xAxis:Object.assign(Object.assign(Object.assign({},xW(this,YP,"m",lW).call(this)),{data:t,type:"category"}),this.xAxis),yAxis:Object.assign(Object.assign(Object.assign({},xW(this,YP,"m",lW).call(this)),{type:"value"}),this.yAxis)}},bW=function(){let t=this.colors&&this.colors.length>0?[...this.colors]:[],n="--kup-chart-color-";for(let i=1;xW(this,ZP,"f").theme.cssVars[n+i];i++)t.push(xW(this,ZP,"f").theme.cssVars[n+i]);if(MW(this,QP,xW(this,ZP,"f").theme.cssVars[y.BACKGROUND],"f"),MW(this,JP,xW(this,ZP,"f").theme.cssVars[y.BORDER],"f"),MW(this,rW,xW(this,ZP,"f").theme.cssVars["--kup-font-family"],"f"),MW(this,eW,xW(this,ZP,"f").theme.cssVars[y.TEXT],"f"),MW(this,tW,t,"f"),this.colors&&this.colors[0])MW(this,iW,this.colors[0],"f");else{const n=xW(this,ZP,"f").theme.colorCheck(t[0]);MW(this,iW,`hsl(${n.hue}, ${n.saturation}, ${(parseFloat(n.lightness)-30).toString()}%)`,"f")}if(this.colors&&this.colors[1])MW(this,nW,this.colors[1],"f");else{const n=xW(this,ZP,"f").theme.colorCheck(t[0]);MW(this,nW,`hsl(${n.hue}, ${n.saturation}, ${(parseFloat(n.lightness)+30).toString()}%)`,"f")}},wW=function(){const t=this.types.filter((t=>t===DP.GAUSSIAN)).length,n=this.types.filter((t=>t===DP.GAUSSIAN)).length;if(!(t||this.axis&&xW(this,ZP,"f").data.column.find(this.data,{name:this.axis}).length))for(let t=0;t<this.data.columns.length;t++){const n=this.data.columns[t];if(n.visible&&!xW(this,ZP,"f").objects.isNumber(n.obj)){this.axis=n.name,xW(this,ZP,"f").debug.logMessage(this,"Axis overridden. ("+this.axis+")",h.WARNING);break}}if((!this.series||!this.series.length)&&1===t&&n>0&&this.data.columns&&(1===this.data.columns.length&&!this.axis||2===this.data.columns.length&&this.axis)){const t=this.axis?this.data.columns.filter((t=>t.name!==this.axis))[0]:this.data.columns[0];for(let n=0;n<this.types.length;n++){const i=this.types[n];i!==DP.GAUSSIAN&&xW(this,ZP,"f").data.column.new(this.data,g.DUPLICATE,{columns:[t.name],newColumn:Object.assign(Object.assign({},t),{name:t.name+"_"+n,title:t.title+` (${i})`})})}}if(this.series&&this.types&&this.series.length&&this.types.length&&this.data.columns){if(this.types.length>this.series.length){const t=this.series[this.series.length-1];for(let n=this.series.length;n<this.types.length;n++)this.series.push(t)}const t={};for(let n=0;n<this.series.length;n++){const i=this.series[n];Object.keys(t).includes(i)?t[i].push(n):t[i]=[n]}for(const n in t){const i=t[n];for(let t=1;i.length>1&&t<i.length;t++){const n=i[t],r=xW(this,ZP,"f").data.column.find(this.data,{name:this.series[n]})[0],e=r.name+"_"+t;xW(this,ZP,"f").data.column.new(this.data,g.DUPLICATE,{columns:[r.name],newColumn:Object.assign(Object.assign({},r),{name:e,title:r.title+` (${this.types[n]})`})}),this.series[n]=e}}}},SW.style=":host{display:block;height:var(--kup_echart_height, 100%);min-height:var(--kup_echart_height, 100%);min-width:var(--kup_echart_width, 100%);width:var(--kup_echart_width, 100%)}#kup-component{width:100%;height:100%;position:relative}";export{B as kup_box,SW as kup_echart}
|