import{_ as e}from"../tslib/tslib.e35f93b8.js";import{r as t,m as n,i,a as o,b as r,c as a,d as s,e as l,f as u,g as c,h as d,j as h,k as p,l as f,n as g,L as y,o as m,p as v,P as x,q as _,s as b,t as S,u as w,Z as M,v as I,w as T,x as D,y as C,z as A,C as L,E as k,S as P,R as N,A as O,B as R,D as E,F as V,G as z,H as B,I as G,J as F,K as W,M as H,T as U,N as Y,O as Z,Q as X,U as j,V as q,W as K,X as J,Y as $,_ as Q,$ as ee,a0 as te,a1 as ne,a2 as ie,a3 as oe,a4 as re,a5 as ae,a6 as se,a7 as le,a8 as ue,a9 as ce,aa as de,ab as he,ac as pe,ad as fe,ae as ge,af as ye,ag as me,ah as ve,ai as xe,aj as _e,ak as be,al as Se,am as we,an as Me,ao as Ie,ap as Te,aq as De,ar as Ce,as as Ae,at as Le,au as ke,av as Pe,aw as Ne,ax as Oe,ay as Re,az as Ee,aA as Ve,aB as ze,aC as Be,aD as Ge,aE as Fe,aF as We,aG as He,aH as Ue,aI as Ye,aJ as Ze,aK as Xe,aL as je,aM as qe,aN as Ke,aO as Je,aP as $e,aQ as Qe,aR as et,aS as tt,aT as nt,aU as it,aV as ot,aW as rt,aX as at,aY as st,aZ as lt,a_ as ut,a$ as ct,b0 as dt,b1 as ht,b2 as pt,b3 as ft,b4 as gt,b5 as yt,b6 as mt,b7 as vt,b8 as xt,b9 as _t,ba as bt,bb as St,bc as wt,bd as Mt,be as It,bf as Tt,bg as Dt,bh as Ct,bi as At,bj as Lt,bk as kt,bl as Pt,bm as Nt,bn as Ot,bo as Rt,bp as Et,bq as Vt,br as zt,bs as Bt,bt as Gt,bu as Ft}from"../zrender/zrender.fe59a237.js";function Wt(e,t,n,i){var o=t[0],r=t[1],a=n[0],s=n[1],l=r-o,u=s-a;if(0===l)return 0===u?a:(a+s)/2;if(i)if(l>0){if(e<=o)return a;if(e>=r)return s}else{if(e>=o)return a;if(e<=r)return s}else{if(e===o)return a;if(e===r)return s}return(e-o)/l*u+a}function Ht(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return i(e)?(n=e,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var n}function Ut(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function Yt(e){return e.sort((function(e,t){return e-t})),e}function Zt(e){if(e=+e,isNaN(e))return 0;if(e>1e-14)for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n;return Xt(e)}function Xt(e){var t=e.toString().toLowerCase(),n=t.indexOf("e"),i=n>0?+t.slice(n+1):0,o=n>0?n:t.length,r=t.indexOf("."),a=r<0?0:o-1-r;return Math.max(0,a-i)}function jt(e,t){var n=Math.log,i=Math.LN10,o=Math.floor(n(e[1]-e[0])/i),r=Math.round(n(Math.abs(t[1]-t[0]))/i),a=Math.min(Math.max(-o+r,0),20);return isFinite(a)?a:20}function qt(e,i,o){if(!e[i])return 0;var r=t(e,(function(e,t){return e+(isNaN(t)?0:t)}),0);if(0===r)return 0;for(var a=Math.pow(10,o),s=n(e,(function(e){return(isNaN(e)?0:e)/r*a*100})),l=100*a,u=n(s,(function(e){return Math.floor(e)})),c=t(u,(function(e,t){return e+t}),0),d=n(s,(function(e,t){return e-u[t]}));ch&&(h=d[f],p=f);++u[p],d[p]=0,++c}return u[i]/a}function Kt(e,t){var n=Math.max(Zt(e),Zt(t)),i=e+t;return n>20?i:Ut(i,n)}function Jt(e){var t=2*Math.PI;return(e%t+t)%t}function $t(e){return e>-1e-4&&e<1e-4}var Qt=/^(?:(\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 en(e){if(e instanceof Date)return e;if(i(e)){var t=Qt.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return null==e?new Date(NaN):new Date(Math.round(e))}function tn(e){return Math.pow(10,nn(e))}function nn(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function on(e,t){var n=nn(e),i=Math.pow(10,n),o=e/i;return e=(t?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10)*i,n>=-20?+e.toFixed(n<0?-n:0):e}function rn(e,t){var n=(e.length-1)*t+1,i=Math.floor(n),o=+e[i-1],r=n-i;return r?o+r*(e[i]-o):o}function an(e){e.sort((function(e,t){return s(e,t,0)?-1:1}));for(var t=-1/0,n=1,i=0;i=0||o&&c(o,s)<0)){var l=n.getShallow(s,t);null!=l&&(r[e[a][0]]=l)}}return r}}var Yn=Un([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Zn=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Yn(this,e,t)},e}(),Xn=Tn(),jn=function(e,t,n,i){if(i){var o=Xn(i);o.dataIndex=n,o.dataType=t,o.seriesIndex=e,"group"===i.type&&i.traverse((function(i){var o=Xn(i);o.seriesIndex=e,o.dataIndex=n,o.dataType=t}))}},qn=1,Kn={},Jn=Tn(),$n=Tn(),Qn=["emphasis","blur","select"],ei=["normal","emphasis","blur","select"];function ti(e){return null!=e&&"none"!==e}var ni=new y(100);function ii(e){if(i(e)){var t=ni.get(e);return t||(t=_(e,-.1),ni.put(e,t)),t}if(b(e)){var o=g({},e);return o.colorStops=n(e.colorStops,(function(e){return{offset:e.offset,color:_(e.color,-.1)}})),o}return e}function oi(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function ri(e){oi(e,"emphasis",2)}function ai(e){2===e.hoverState&&oi(e,"normal",0)}function si(e){oi(e,"blur",1)}function li(e){1===e.hoverState&&oi(e,"normal",0)}function ui(e){e.selected=!0}function ci(e){e.selected=!1}function di(e,t,n){t(e,n)}function hi(e,t,n){di(e,t,n),e.isGroup&&e.traverse((function(e){di(e,t,n)}))}function pi(e,t){switch(t){case"emphasis":e.hoverState=2;break;case"normal":e.hoverState=0;break;case"blur":e.hoverState=1;break;case"select":e.selected=!0}}function fi(e,t){var n=this.states[e];if(this.style){if("emphasis"===e)return function(e,t,n,i){var o=n&&c(n,"select")>=0,r=!1;if(e instanceof x){var a=Jn(e),s=o&&a.selectFill||a.normalFill,l=o&&a.selectStroke||a.normalStroke;if(ti(s)||ti(l)){var u=(i=i||{}).style||{};"inherit"===u.fill?(r=!0,i=g({},i),(u=g({},u)).fill=s):!ti(u.fill)&&ti(s)?(r=!0,i=g({},i),(u=g({},u)).fill=ii(s)):!ti(u.stroke)&&ti(l)&&(r||(i=g({},i),u=g({},u)),u.stroke=ii(l)),i.style=u}}if(i&&null==i.z2){r||(i=g({},i));var d=e.z2EmphasisLift;i.z2=e.z2+(null!=d?d:10)}return i}(this,0,t,n);if("blur"===e)return function(e,t,n){var i=c(e.currentStates,t)>=0,o=e.style.opacity,r=i?null:function(e,t,n,i){for(var o=e.style,r={},a=0;a0){var r={dataIndex:o,seriesIndex:e.seriesIndex};null!=i&&(r.dataType=i),t.push(r)}}))})),t}function ki(e,t,n){Vi(e,!0),hi(e,gi),Ni(e,t,n)}function Pi(e,t,n,i){i?function(e){Vi(e,!1)}(e):ki(e,t,n)}function Ni(e,t,n){var i=Xn(e);null!=t?(i.focus=t,i.blurScope=n):i.focus&&(i.focus=null)}var Oi=["emphasis","blur","select"],Ri={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Ei(e,t,n,i){n=n||"itemStyle";for(var o=0;o0){var h={duration:d.duration,delay:d.delay||0,easing:d.easing,done:a,force:!!a||!!s,setToFinal:!c,scope:e,during:s};u?t.animateFrom(n,h):t.animateTo(n,h)}else t.stopAnimation(),!u&&t.attr(n),s&&s(1),a&&a()}function Ui(e,t,n,i,o,r){Hi("update",e,t,n,i,o,r)}function Yi(e,t,n,i,o,r){Hi("enter",e,t,n,i,o,r)}function Zi(e){if(!e.__zr)return!0;for(var t=0;tMath.abs(r[1])?r[0]>0?"right":"left":r[1]>0?"bottom":"top"}function go(e){return!e.isGroup}function yo(e,t,n){if(e&&t){var i,o=(i={},e.traverse((function(e){go(e)&&e.anid&&(i[e.anid]=e)})),i);t.traverse((function(e){if(go(e)&&e.anid){var t=o[e.anid];if(t){var i=r(e);e.attr(r(t)),Ui(e,i,n,Xn(e).dataIndex)}}}))}function r(e){var t={x:e.x,y:e.y,rotation:e.rotation};return function(e){return null!=e.shape}(e)&&(t.shape=g({},e.shape)),t}}function mo(e,t){return n(e,(function(e){var n=e[0];n=Ji(n,t.x),n=$i(n,t.x+t.width);var i=e[1];return i=Ji(i,t.y),[n,i=$i(i,t.y+t.height)]}))}function vo(e,t){var n=Ji(e.x,t.x),i=$i(e.x+e.width,t.x+t.width),o=Ji(e.y,t.y),r=$i(e.y+e.height,t.y+t.height);if(i>=n&&r>=o)return{x:n,y:o,width:i-n,height:r-o}}function xo(e,t,n){var i=g({rectHover:!0},t),o=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(o.image=e.slice(8),C(o,n),new M(i)):ro(e.replace("path://",""),i,n,"center")}function _o(e,t,n,i,o){for(var r=0,a=o[o.length-1];r=-1e-6)return!1;var f=e-o,g=t-r,y=So(f,g,u,c)/p;if(y<0||y>1)return!1;var m=So(f,g,d,h)/p;return!(m<0||m>1)}function So(e,t,n,i){return e*i-n*t}function wo(e){var t=e.itemTooltipOption,n=e.componentModel,o=e.itemName,r=i(t)?{formatter:t}:t,a=n.mainType,s=n.componentIndex,l={componentType:a,name:o,$vars:["name"]};l[a+"Index"]=s;var c=e.formatterParamsExtra;c&&u(v(c),(function(e){Z(l,e)||(l[e]=c[e],l.$vars.push(e))}));var d=Xn(e.el);d.componentMainType=a,d.componentIndex=s,d.tooltipConfig={name:o,option:C({content:o,formatterParams:l},r)}}function Mo(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Io(e,t){if(e)if(s(e))for(var n=0;n-1?"ZH":"EN";function ur(e,t){e=e.toUpperCase(),sr[e]=new nr(t),ar[e]=t}function cr(e){return sr[e]}ur("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:". "}}}}),ur("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 dr={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}"},hr={year:"{yyyy}",month:"{yyyy}-{MM}",day:"{yyyy}-{MM}-{dd}",hour:"{yyyy}-{MM}-{dd} "+dr.hour,minute:"{yyyy}-{MM}-{dd} "+dr.minute,second:"{yyyy}-{MM}-{dd} "+dr.second,millisecond:dr.none},pr=["year","month","day","hour","minute","second","millisecond"],fr=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function gr(e,t){return"0000".substr(0,t-(e+="").length)+e}function yr(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function mr(e){return e===yr(e)}function vr(e,t,n,i){var o=en(e),r=o[br(n)](),a=o[Sr(n)]()+1,s=Math.floor((a-1)/3)+1,l=o[wr(n)](),u=o["get"+(n?"UTC":"")+"Day"](),c=o[Mr(n)](),d=(c-1)%12+1,h=o[Ir(n)](),p=o[Tr(n)](),f=o[Dr(n)](),g=(i instanceof nr?i:cr(i||lr)||sr.EN).getModel("time"),y=g.get("month"),m=g.get("monthAbbr"),v=g.get("dayOfWeek"),x=g.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,r+"").replace(/{yy}/g,r%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[a-1]).replace(/{MMM}/g,m[a-1]).replace(/{MM}/g,gr(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,gr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,v[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,gr(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,gr(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,gr(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,gr(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,gr(f,3)).replace(/{S}/g,f+"")}function xr(e,t){var n=en(e),i=n[Sr(t)]()+1,o=n[wr(t)](),r=n[Mr(t)](),a=n[Ir(t)](),s=n[Tr(t)](),l=0===n[Dr(t)](),u=l&&0===s,c=u&&0===a,d=c&&0===r,h=d&&1===o;return h&&1===i?"year":h?"month":d?"day":c?"hour":u?"minute":l?"second":"millisecond"}function _r(e,t,n){var i=r(e)?en(e):e;switch(t=t||xr(e,n)){case"year":return i[br(n)]();case"half-year":return i[Sr(n)]()>=6?1:0;case"quarter":return Math.floor((i[Sr(n)]()+1)/4);case"month":return i[Sr(n)]();case"day":return i[wr(n)]();case"half-day":return i[Mr(n)]()/24;case"hour":return i[Mr(n)]();case"minute":return i[Ir(n)]();case"second":return i[Tr(n)]();case"millisecond":return i[Dr(n)]()}}function br(e){return e?"getUTCFullYear":"getFullYear"}function Sr(e){return e?"getUTCMonth":"getMonth"}function wr(e){return e?"getUTCDate":"getDate"}function Mr(e){return e?"getUTCHours":"getHours"}function Ir(e){return e?"getUTCMinutes":"getMinutes"}function Tr(e){return e?"getUTCSeconds":"getSeconds"}function Dr(e){return e?"getUTCMilliseconds":"getMilliseconds"}function Cr(e){return e?"setUTCFullYear":"setFullYear"}function Ar(e){return e?"setUTCMonth":"setMonth"}function Lr(e){return e?"setUTCDate":"setDate"}function kr(e){return e?"setUTCHours":"setHours"}function Pr(e){return e?"setUTCMinutes":"setMinutes"}function Nr(e){return e?"setUTCSeconds":"setSeconds"}function Or(e){return e?"setUTCMilliseconds":"setMilliseconds"}function Rr(e){if(!ln(e))return i(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Er(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var Vr=ae,zr=/([&<>"'])/g,Br={"&":"&","<":"<",">":">",'"':""","'":"'"};function Gr(e){return null==e?"":(e+"").replace(zr,(function(e,t){return Br[t]}))}function Fr(e,t,n){function i(e){return e&&ne(e)?e:"-"}function o(e){return!(null==e||isNaN(e)||!isFinite(e))}var s="time"===t,l=e instanceof Date;if(s||l){var u=s?en(e):e;if(!isNaN(+u))return vr(u,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(l)return"-"}if("ordinal"===t)return a(e)?i(e):r(e)&&o(e)?e+"":"-";var c=sn(e);return o(c)?Rr(c):a(e)?i(e):"boolean"==typeof e?e+"":"-"}var Wr=["a","b","c","d","e","f","g"],Hr=function(e,t){return"{"+e+(null==t?"":t)+"}"};function Ur(e,t,n){s(t)||(t=[t]);var i=t.length;if(!i)return"";for(var o=t[0].$vars||[],r=0;r':'':{renderMode:a,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===r?{width:4,height:4,borderRadius:2,backgroundColor:o}:{width:10,height:10,borderRadius:5,backgroundColor:o}}:""}function Zr(e,t){return t=t||"transparent",i(e)?e:o(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function Xr(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var jr=u,qr=["left","right","top","bottom","width","height"],Kr=[["width","left","right"],["height","top","bottom"]];function Jr(e,t,n,i,o){var r=0,a=0;null==i&&(i=1/0),null==o&&(o=1/0);var s=0;t.eachChild((function(l,u){var c,d,h=l.getBoundingRect(),p=t.childAt(u+1),f=p&&p.getBoundingRect();if("horizontal"===e){var g=h.width+(f?-f.x+h.x:0);(c=r+g)>i||l.newline?(r=0,c=g,a+=s+n,s=h.height):s=Math.max(s,h.height)}else{var y=h.height+(f?-f.y+h.y:0);(d=a+y)>o||l.newline?(r+=s+n,a=0,d=y,s=h.width):s=Math.max(s,h.width)}l.newline||(l.x=r,l.y=a,l.markRedraw(),"horizontal"===e?r=c+n:a=d+n)}))}var $r=Jr;function Qr(e,t,n){n=Vr(n||0);var i=t.width,o=t.height,r=Ht(e.left,i),a=Ht(e.top,o),s=Ht(e.right,i),l=Ht(e.bottom,o),u=Ht(e.width,i),c=Ht(e.height,o),d=n[2]+n[0],h=n[1]+n[3],p=e.aspect;switch(isNaN(u)&&(u=i-s-h-r),isNaN(c)&&(c=o-l-d-a),null!=p&&(isNaN(u)&&isNaN(c)&&(p>i/o?u=.8*i:c=.8*o),isNaN(u)&&(u=p*c),isNaN(c)&&(c=u/p)),isNaN(r)&&(r=i-s-u-h),isNaN(a)&&(a=o-l-c-d),e.left||e.right){case"center":r=i/2-u/2-n[3];break;case"right":r=i-u-h}switch(e.top||e.bottom){case"middle":case"center":a=o/2-c/2-n[0];break;case"bottom":a=o-c-d}r=r||0,a=a||0,isNaN(u)&&(u=i-h-r-(s||0)),isNaN(c)&&(c=o-d-a-(l||0));var f=new Q(r+n[3],a+n[0],u,c);return f.margin=n,f}function ea(e,t,n,i,o,r){var a,s=!o||!o.hv||o.hv[0],l=!o||!o.hv||o.hv[1],u=o&&o.boundingMode||"all";if((r=r||e).x=e.x,r.y=e.y,!s&&!l)return!1;if("raw"===u)a="group"===e.type?new Q(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(a=e.getBoundingRect(),e.needLocalTransform()){var c=e.getLocalTransform();(a=a.clone()).applyTransform(c)}var d=Qr(C({width:a.width,height:a.height},t),n,i),h=s?d.x-a.x:0,p=l?d.y-a.y:0;return"raw"===u?(r.x=h,r.y=p):(r.x+=h,r.y+=p),r===e&&e.markRedraw(),!0}function ta(e){var t=e.layoutMode||e.constructor.layoutMode;return o(t)?t:t?{type:t}:null}function na(e,t,n){var i=n&&n.ignoreSize;!s(i)&&(i=[i,i]);var o=a(Kr[0],0),r=a(Kr[1],1);function a(n,o){var r={},a=0,s={},c=0;if(jr(n,(function(t){s[t]=e[t]})),jr(n,(function(e){l(t,e)&&(r[e]=s[e]=t[e]),u(r,e)&&a++,u(s,e)&&c++})),i[o])return u(t,n[1])?s[n[2]]=null:u(t,n[2])&&(s[n[1]]=null),s;if(2!==c&&a){if(a>=2)return r;for(var d=0;d=0;a--)r=ie(r,n[a],!0);t.defaultOption=r}return t.defaultOption},n.prototype.getReferringComponents=function(e,t){var n=e+"Index",i=e+"Id";return Pn(this.ecModel,e,{index:this.get(n,!0),id:this.get(i,!0)},t)},n.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},n.prototype.getZLevelKey=function(){return""},n.prototype.setZLevel=function(e){this.option.zlevel=e},n.protoInitialize=function(){var e=n.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),n}(nr);Bn(aa,nr),Hn(aa),function(e){var t={};e.registerSubTypeDefaulter=function(e,n){var i=Vn(e);t[i.main]=n},e.determineSubType=function(n,i){var o=i.type;if(!o){var r=Vn(n).main;e.hasSubTypes(n)&&t[r]&&(o=t[r](i))}return o}}(aa),function(e,t){function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,i,o,r){if(e.length){var a=function(e){var i={},o=[];return u(e,(function(r){var a=n(i,r),s=function(e,t){var n=[];return u(e,(function(e){c(t,e)>=0&&n.push(e)})),n}(a.originalDeps=t(r),e);a.entryCount=s.length,0===a.entryCount&&o.push(r),u(s,(function(e){c(a.predecessor,e)<0&&a.predecessor.push(e);var t=n(i,e);c(t.successor,e)<0&&t.successor.push(r)}))})),{graph:i,noEntryList:o}}(i),s=a.graph,l=a.noEntryList,d={};for(u(e,(function(e){d[e]=!0}));l.length;){var h=l.pop(),p=s[h],f=!!d[h];f&&(o.call(r,h,p.originalDeps.slice()),delete d[h]),u(p.successor,f?y:g)}u(d,(function(){throw new Error("")}))}function g(e){s[e].entryCount--,0===s[e].entryCount&&l.push(e)}function y(e){d[e]=!0,g(e)}}}(aa,(function(e){var t=[];u(aa.getClassesByMainType(e),(function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])})),t=n(t,(function(e){return Vn(e).main})),"dataset"!==e&&c(t,"dataset")<=0&&t.unshift("dataset");return t}));var sa=aa,la="";"undefined"!=typeof navigator&&(la=navigator.platform||"");var ua="rgba(0, 0, 0, 0.2)",ca={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:ua,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:ua,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:ua,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:ua,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:ua,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:ua,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:la.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},da=l(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),ha=1,pa=2,fa=3,ga=Tn();function ya(e,t,n){var i={},r=va(t);if(!r||!e)return i;var a,s,l=[],c=[],d=t.ecModel,h=ga(d).datasetMap,p=r.uid+"_"+n.seriesLayoutBy;e=e.slice(),u(e,(function(t,n){var r=o(t)?t:e[n]={name:t};"ordinal"===r.type&&null==a&&(a=n,s=y(r)),i[r.name]=[]}));var f=h.get(p)||h.set(p,{categoryWayDim:s,valueWayDim:0});function g(e,t,n){for(var i=0;it)return e[i];return e[n-1]}(i,a):n;if((c=c||n)&&c.length){var d=c[l];return o&&(u[o]=d),s.paletteIdx=(l+1)%c.length,d}}var La=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.init=function(e,t,n,i,o,r){i=i||{},this.option=null,this._theme=new nr(i),this._locale=new nr(o),this._optionManager=r},n.prototype.setOption=function(e,t,n){var i=Na(t);this._optionManager.setOption(e,n,i),this._resetOption(null,i)},n.prototype.resetOption=function(e,t){return this._resetOption(e,Na(t))},n.prototype._resetOption=function(e,t){var n=!1,i=this._optionManager;if(!e||"recreate"===e){var o=i.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(o,t)):Ma(this,o),n=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var r=i.getTimelineOption(this);r&&(n=!0,this._mergeOption(r,t))}if(!e||"recreate"===e||"media"===e){var a=i.getMediaOption(this);a.length&&u(a,(function(e){n=!0,this._mergeOption(e,t)}),this)}return n},n.prototype.mergeOption=function(e){this._mergeOption(e,null)},n.prototype._mergeOption=function(e,t){var n=this.option,i=this._componentsMap,r=this._componentsCount,a=[],s=l(),c=t&&t.replaceMergeMainTypeMap;ga(this).datasetMap=l(),u(e,(function(e,t){null!=e&&(sa.hasClass(t)?t&&(a.push(t),s.set(t,!0)):n[t]=null==n[t]?oe(e):ie(n[t],e,!0))})),c&&c.each((function(e,t){sa.hasClass(t)&&!s.get(t)&&(a.push(t),s.set(t,!0))})),sa.topologicalTravel(a,sa.getAllClassMainTypes(),(function(t){var a=function(e,t,n){var i=ba.get(t);if(!i)return n;var o=i(e);return o?n.concat(o):n}(this,t,fn(e[t])),s=i.get(t),l=s?c&&c.get(t)?"replaceMerge":"normalMerge":"replaceAll",d=xn(s,a,l);(function(e,t,n){u(e,(function(e){var i=e.newOption;o(i)&&(e.keyInfo.mainType=t,e.keyInfo.subType=function(e,t,n,i){return t.type?t.type:n?n.subType:i.determineSubType(e,t)}(t,i,e.existing,n))}))})(d,t,sa),n[t]=null,i.set(t,null),r.set(t,0);var h,p=[],f=[],y=0;u(d,(function(e,n){var i=e.existing,o=e.newOption;if(o){var r="series"===t,a=sa.getClass(t,e.keyInfo.subType,!r);if(!a)return;if("tooltip"===t){if(h)return;h=!0}if(i&&i.constructor===a)i.name=e.keyInfo.name,i.mergeOption(o,this),i.optionUpdated(o,!1);else{var s=g({componentIndex:n},e.keyInfo);i=new a(o,this,this,s),g(i,s),e.brandNew&&(i.__requireNewView=!0),i.init(o,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(p.push(i.option),f.push(i),y++):(p.push(void 0),f.push(void 0))}),this),n[t]=p,i.set(t,f),r.set(t,y),"series"===t&&Sa(this)}),this),this._seriesIndices||Sa(this)},n.prototype.getOption=function(){var e=oe(this.option);return u(e,(function(t,n){if(sa.hasClass(n)){for(var i=fn(t),o=i.length,r=!1,a=o-1;a>=0;a--)i[a]&&!Mn(i[a])?r=!0:(i[a]=null,!r&&o--);i.length=o,e[n]=i}})),delete e["\0_ec_inner"],e},n.prototype.getTheme=function(){return this._theme},n.prototype.getLocaleModel=function(){return this._locale},n.prototype.setUpdatePayload=function(e){this._payload=e},n.prototype.getUpdatePayload=function(){return this._payload},n.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var i=n[t||0];if(i)return i;if(null==t)for(var o=0;o=t:"max"===n?e<=t:e===t})(i[a],e,r)||(o=!1)}})),o}var Ha=Fa,Ua=u,Ya=o,Za=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Xa(e){var t=e&&e.itemStyle;if(t)for(var n=0,i=Za.length;n=0;g--){var y=e[g];if(s||(h=y.data.rawIndexOf(y.stackedByDimension,d)),h>=0){var m=y.data.getByRawIndex(y.stackResultDimension,h);if("all"===l||"positive"===l&&m>0||"negative"===l&&m<0||"samesign"===l&&p>=0&&m>0||"samesign"===l&&p<=0&&m<0){p=Kt(p,m),f=m;break}}}return i[0]=p,i[1]=f,i}))}))}var ds,hs,ps,fs,gs,ys=function(e){this.data=e.data||("keyedColumns"===e.sourceFormat?{}:[]),this.sourceFormat=e.sourceFormat||"unknown",this.seriesLayoutBy=e.seriesLayoutBy||"column",this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;nu&&(u=p)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function o(e){for(var t=0;t=0&&(r=a.interpolatedValue[u])}return null!=r?r+"":""})):void 0},e.prototype.getRawValue=function(e,t){return Rs(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function zs(e){var t,n;return o(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function Bs(e){return new Gs(e)}var Gs=function(){function e(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t,n=this._upstream,i=e&&e.skip;if(this._dirty&&n){var o=this.context;o.data=o.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(t=this._plan(this.context));var r,a=d(this._modBy),l=this._modDataCount||0,u=d(e&&e.modBy),c=e&&e.modDataCount||0;function d(e){return!(e>=1)&&(e=1),e}a===u&&l===c||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,r=this._doReset(i)),this._modBy=u,this._modDataCount=c;var h=e&&e.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,f=Math.min(null!=h?this._dueIndex+h:1/0,this._dueEnd);if(!i&&(r||p1&&i>0?s:a}};return r;function a(){return t=e?null:rt},gte:function(e,t){return e>=t}},Zs=function(){function e(e,t){if(!r(t)){hn("")}this._opFn=Ys[e],this._rvalFloat=sn(t)}return e.prototype.evaluate=function(e){return r(e)?this._opFn(e,this._rvalFloat):this._opFn(sn(e),this._rvalFloat)},e}(),Xs=function(){function e(e,t){var n="desc"===e;this._resultLT=n?1:-1,null==t&&(t=n?"min":"max"),this._incomparable="min"===t?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=r(e)?e:sn(e),o=r(t)?t:sn(t),a=isNaN(n),s=isNaN(o);if(a&&(n=this._incomparable),s&&(o=this._incomparable),a&&s){var l=i(e),u=i(t);l&&(n=u?e:0),u&&(o=l?t:0)}return no?-this._resultLT:0},e}(),js=function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=sn(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(t=sn(e)===this._rvalFloat)}return this._isEQ?t:!t},e}();function qs(e,t){return"eq"===e||"ne"===e?new js("eq"===e,t):Z(Ys,e)?new Zs(e,t):null}var Ks=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(e){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return Ws(e,t)},e}();function Js(e){if(!il(e.sourceFormat)){hn("")}return e.data}function $s(e){var t=e.sourceFormat,n=e.data;if(!il(t)){hn("")}if("arrayRows"===t){for(var i=[],o=0,r=n.length;o65535?rl:al}function dl(e,t,n,i,o){var r=ul[n||"float"];if(o){var a=e[t],s=a&&a.length;if(s!==i){for(var l=new r(i),u=0;ug[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},e.prototype._initDataFromProvider=function(e,t,i){for(var o=this._provider,r=this._chunks,a=this._dimensions,s=a.length,l=this._rawExtent,u=n(a,(function(e){return e.property})),c=0;cm[1]&&(m[1]=y)}}!o.persistent&&o.clean&&o.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&ne))return r;o=r-1}}return-1},e.prototype.indicesOfNearest=function(e,t,n){var i=this._chunks[e],o=[];if(!i)return o;null==n&&(n=1/0);for(var r=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(r=d,a=c,s=0),c===a&&(o[s++]=l))}return o.length=s,o},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,i=this._count;if(n===Array){e=new n(i);for(var o=0;o=u&&_<=c||isNaN(_))&&(a[s++]=p),p++}h=!0}else if(2===o){f=d[i[0]];var y=d[i[1]],m=e[i[1]][0],x=e[i[1]][1];for(g=0;g=u&&_<=c||isNaN(_))&&(b>=m&&b<=x||isNaN(b))&&(a[s++]=p),p++}h=!0}}if(!h)if(1===o)for(g=0;g=u&&_<=c||isNaN(_))&&(a[s++]=S)}else for(g=0;ge[I][1])&&(w=!1)}w&&(a[s++]=t.getRawIndex(g))}return sy[1]&&(y[1]=g)}}}},e.prototype.lttbDownSample=function(e,t){var n,i,o,r=this.clone([e],!0),a=r._chunks[e],s=this.count(),l=0,u=Math.floor(1/t),c=this.getRawIndex(0),d=new(cl(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));d[l++]=c;for(var h=1;hn&&(n=i,o=I)}M>0&&M<_-x&&(d[l++]=Math.min(w,o),o=Math.max(w,o)),d[l++]=o,c=o}return d[l++]=this.getRawIndex(s-1),r._count=l,r._indices=d,r.getRawIndex=this._getRawIdx,r},e.prototype.downSample=function(e,t,n,i){for(var o=this.clone([e],!0),r=o._chunks,a=[],s=Math.floor(1/t),l=r[e],u=this.count(),c=o._rawExtent[e]=[1/0,-1/0],d=new(cl(this._rawCount))(Math.ceil(u/s)),h=0,p=0;pu-p&&(s=u-p,a.length=s);for(var f=0;fc[1]&&(c[1]=y),d[h++]=m}return o._count=h,o._indices=d,o._updateGetRawIdx(),o},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,i=this._chunks,o=0,r=this.count();oa&&(a=l)}return i=[r,a],this._extent[e]=i,i},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],i=this._chunks,o=0;o=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,i){return Ws(e[i],this._dimensions[i])}ol={arrayRows:e,objectRows:function(e,t,n,i){return Ws(e[t],this._dimensions[i])},keyedColumns:e,original:function(e,t,n,i){var o=e&&(null==e.value?e:e.value);return Ws(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(e,t,n,i){return e[i]}}}(),e}(),pl=hl,fl=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,n=this._sourceHost,i=this._getUpstreamSourceManagers(),o=!!i.length;if(yl(n)){var r=n,a=void 0,s=void 0,l=void 0;if(o){var u=i[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,t=[u._getVersionSign()]}else a=r.get("data",!0),s=le(a)?"typedArray":"original",t=[];var c=this._getSourceMetaRawOption()||{},d=l&&l.metaRawOption||{},h=S(c.seriesLayoutBy,d.seriesLayoutBy)||null,p=S(c.sourceHeader,d.sourceHeader),f=S(c.dimensions,d.dimensions);e=h!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||f?[vs(a,{seriesLayoutBy:h,sourceHeader:p,dimensions:f},s)]:[]}else{var g=n;if(o){var y=this._applyTransform(i);e=y.sourceList,t=y.upstreamSignList}else{e=[vs(g.get("source",!0),this._getSourceMetaRawOption(),null)],t=[]}}this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n=this._sourceHost,i=n.get("transform",!0),o=n.get("fromTransformResult",!0);if(null!=o){1!==e.length&&ml("")}var r,a=[],s=[];return u(e,(function(e){e.prepareSource();var t=e.getSource(o||0);null==o||t||ml(""),a.push(t),s.push(e._getVersionSign())})),i?t=function(e,t,n){var i=fn(e),o=i.length;o||hn("");for(var r=0,a=o;r1||n>0&&!e.noHeader;return u(e.blocks,(function(e){var n=Ml(e);n>=t&&(t=n+ +(i&&(!n||Sl(e)&&!e.noHeader)))})),t}return 0}function Il(e,t,n,i){var o,r=t.noHeader,a=(o=Ml(t),{html:xl[o],richText:_l[o]}),l=[],c=t.blocks||[];d(!c||s(c)),c=c||[];var h=e.orderMode;if(t.sortBlocks&&h){c=c.slice();var p={valueAsc:"asc",valueDesc:"desc"};if(Z(p,h)){var f=new Xs(p[h],null);c.sort((function(e,t){return f.evaluate(e.sortParam,t.sortParam)}))}else"seriesDesc"===h&&c.reverse()}u(c,(function(n,o){var r=t.valueFormatter,s=wl(n)(r?g(g({},e),{valueFormatter:r}):e,n,o>0?a.html:0,i);null!=s&&l.push(s)}));var y="richText"===e.renderMode?l.join(a.richText):Cl(l.join(""),r?n:a.html);if(r)return y;var m=Fr(t.header,"ordinal",e.useUTC),v=vl(i,e.renderMode).nameStyle;return"richText"===e.renderMode?Al(e,m,v)+a.richText+y:Cl('
'+Gr(m)+"
"+y,n)}function Tl(e,t,i,o){var r=e.renderMode,a=t.noName,l=t.noValue,u=!t.markerType,c=t.name,d=e.useUTC,h=t.valueFormatter||e.valueFormatter||function(e){return e=s(e)?e:[e],n(e,(function(e,t){return Fr(e,s(g)?g[t]:g,d)}))};if(!a||!l){var p=u?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",r),f=a?"":Fr(c,"ordinal",d),g=t.valueType,y=l?[]:h(t.value),m=!u||!a,v=!u&&a,x=vl(o,r),_=x.nameStyle,b=x.valueStyle;return"richText"===r?(u?"":p)+(a?"":Al(e,f,_))+(l?"":function(e,t,n,i,o){var r=[o],a=i?10:20;return n&&r.push({padding:[0,0,0,a],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(s(t)?t.join(" "):t,r)}(e,y,m,v,b)):Cl((u?"":p)+(a?"":function(e,t,n){return''+Gr(e)+""}(f,!u,_))+(l?"":function(e,t,i,o){var r=i?"10px":"20px",a=t?"float:right;margin-left:"+r:"";return e=s(e)?e:[e],''+n(e,(function(e){return Gr(e)})).join("  ")+""}(y,m,v,b)),i)}}function Dl(e,t,n,i,o,r){if(e)return wl(e)({useUTC:o,renderMode:n,orderMode:i,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,r)}function Cl(e,t){return'
'+e+'
'}function Al(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function Ll(e,t){return Zr(e.getData().getItemVisual(t,"style")[e.visualDrawType])}function kl(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var Pl=function(){function e(){this.richTextStyles={},this._nextStyleNameId=un()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var o="richText"===n?this._generateStyleName():null,r=Yr({color:t,type:e,renderMode:n,markerId:o});return i(r)?r:(this.richTextStyles[o]=r.style,r.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};s(t)?u(t,(function(e){return g(n,e)})):g(n,t);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},e}();function Nl(e){var n,i,o,r,a=e.series,l=e.dataIndex,c=e.multipleSeries,d=a.getData(),h=d.mapDimensionsAll("defaultedTooltip"),p=h.length,f=a.getRawValue(l),g=s(f),y=Ll(a,l);if(p>1||g&&!p){var m=function(e,n,i,o,r){var a=n.getData(),s=t(e,(function(e,t,n){var i=a.getDimensionInfo(n);return e||i&&!1!==i.tooltip&&null!=i.displayName}),!1),l=[],c=[],d=[];function h(e,t){var n=a.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(s?d.push(bl("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:e,valueType:n.type})):(l.push(e),c.push(n.type)))}return o.length?u(o,(function(e){h(Rs(a,i,e),e)})):u(e,h),{inlineValues:l,inlineValueTypes:c,blocks:d}}(f,a,l,h,y);n=m.inlineValues,i=m.inlineValueTypes,o=m.blocks,r=m.inlineValues[0]}else if(p){var v=d.getDimensionInfo(h[0]);r=n=Rs(d,l,h[0]),i=v.type}else r=n=g?f[0]:f;var x=wn(a),_=x&&a.name||"",b=d.getName(l),S=c?_:b;return bl("section",{header:_,noHeader:c||!x,sortParam:r,blocks:[bl("nameValue",{markerType:"item",markerColor:y,name:S,noName:!ne(S),value:n,valueType:i})].concat(o||[])})}var Ol=Tn();function Rl(e,t){return e.getName(t)||e.getId(t)}var El=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return e(n,t),n.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=Bs({count:zl,reset:Bl}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(Ol(this).sourceManager=new fl(this)).prepareSource();var i=this.getInitialData(e,n);Fl(i,this),this.dataTask.context.data=i,Ol(this).dataBeforeProcessed=i,Vl(this),this._initSelectedMapFromData(i)},n.prototype.mergeDefaultAndTheme=function(e,t){var n=ta(this),i=n?ia(e):{},o=this.subType;sa.hasClass(o)&&(o+="Series"),ie(e,t.getTheme().get(this.subType)),ie(e,this.getDefaultOption()),gn(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&na(e,i,n)},n.prototype.mergeOption=function(e,t){e=ie(this.option,e,!0),this.fillDataTextStyle(e.data);var n=ta(this);n&&na(this.option,e,n);var i=Ol(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(e,t);Fl(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Ol(this).dataBeforeProcessed=o,Vl(this),this._initSelectedMapFromData(o)},n.prototype.fillDataTextStyle=function(e){if(e&&!le(e))for(var t=["show"],n=0;nthis.getShallow("animationThreshold")&&(t=!1),!!t},n.prototype.restoreData=function(){this.dataTask.dirty()},n.prototype.getColorFromPalette=function(e,t,n){var i=this.ecModel,o=Da.prototype.getColorFromPalette.call(this,e,t,n);return o||(o=i.getColorFromPalette(e,t,n)),o},n.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},n.prototype.getProgressive=function(){return this.get("progressive")},n.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},n.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},n.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,o=this.getData(t);if("series"===i||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var r=0;r=0&&n.push(o)}return n},n.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(t);return("all"===n||n[Rl(i,e)])&&!i.getItemModel(e).get(["select","disabled"])},n.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},n.prototype._innerSelect=function(e,t){var n,i,r=this.option,a=r.selectedMode,s=t.length;if(a&&s)if("series"===a)r.selectedMap="all";else if("multiple"===a){o(r.selectedMap)||(r.selectedMap={});for(var l=r.selectedMap,u=0;u0&&this._innerSelect(e,t)}},n.registerClass=function(e){return sa.registerClass(e)},n.protoInitialize=function(){var e=n.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),n}(sa);function Vl(e){var t=e.name;wn(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),i=[];return u(n,(function(e){var n=t.getDimensionInfo(e);n.displayName&&i.push(n.displayName)})),i.join(" ")}(e)||t)}function zl(e){return e.model.getRawData().count()}function Bl(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Gl}function Gl(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Fl(e,t){u(he(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),(function(n){e.wrapMethod(n,se(Wl,t))}))}function Wl(e,t){var n=Hl(e);return n&&n.setOutputEnd((t||this).count()),t}function Hl(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var i=n.currentTask;if(i){var o=i.agentStubMap;o&&(i=o.get(e.uid))}return i}}re(El,Vs),re(El,Da),Bn(El,sa);var Ul=El,Yl=function(){function e(){this.group=new X,this.uid=or("viewComponent")}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,i){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,i){},e.prototype.updateLayout=function(e,t,n,i){},e.prototype.updateVisual=function(e,t,n,i){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();zn(Yl),Hn(Yl);var Zl=Yl;function Xl(){var e=Tn();return function(t){var n=e(t),i=t.pipelineContext,o=!!n.large,r=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(o===a&&r===s)&&"reset"}}var jl=Tn(),ql=Xl(),Kl=function(){function e(){this.group=new X,this.uid=or("viewChart"),this.renderTask=Bs({plan:Ql,reset:eu}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,i){},e.prototype.highlight=function(e,t,n,i){var o=e.getData(i&&i.dataType);o&&$l(o,i,"emphasis")},e.prototype.downplay=function(e,t,n,i){var o=e.getData(i&&i.dataType);o&&$l(o,i,"normal")},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,i){this.render(e,t,n,i)},e.prototype.updateLayout=function(e,t,n,i){this.render(e,t,n,i)},e.prototype.updateVisual=function(e,t,n,i){this.render(e,t,n,i)},e.prototype.eachRendered=function(e){Io(this.group,e)},e.markUpdateMethod=function(e,t){jl(e).updateMethod=t},e.protoInitialize=void(e.prototype.type="chart"),e}();function Jl(e,t,n){e&&zi(e)&&("emphasis"===t?vi:xi)(e,n)}function $l(e,t,n){var i=In(e,t),o=t&&null!=t.highlightKey?function(e){var t=Kn[e];return null==t&&qn<=32&&(t=Kn[e]=qn++),t}(t.highlightKey):null;null!=i?u(fn(i),(function(t){Jl(e.getItemGraphicEl(t),n,o)})):e.eachItemGraphicEl((function(e){Jl(e,n,o)}))}function Ql(e){return ql(e.model)}function eu(e){var t=e.model,n=e.ecModel,i=e.api,o=e.payload,r=t.pipelineContext.progressiveRender,a=e.view,s=o&&jl(o).updateMethod,l=r?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](t,n,i,o),tu[l]}zn(Kl),Hn(Kl);var tu={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},nu=Kl,iu="\0__throttleOriginMethod",ou="\0__throttleRate";function ru(e,t,n){var i,o,r,a,s,l=0,u=0,c=null;function d(){u=(new Date).getTime(),c=null,e.apply(r,a||[])}t=t||0;var h=function(){for(var e=[],h=0;h=0?d():c=setTimeout(d,-o),l=i};return h.clear=function(){c&&(clearTimeout(c),c=null)},h.debounceNextCall=function(e){s=e},h}function au(e,t,n,i){var o=e[t];if(o){var r=o[iu]||o,a=o["\0__throttleType"];if(o[ou]!==n||a!==i){if(null==n||!i)return e[t]=r;(o=e[t]=ru(r,n,"debounce"===i))[iu]=r,o["\0__throttleType"]=i,o[ou]=n}return o}}function su(e,t){var n=e[t];n&&n[iu]&&(n.clear&&n.clear(),e[t]=n[iu])}var lu=Tn(),uu={itemStyle:Un($o,!0),lineStyle:Un(qo,!0)},cu={lineStyle:"stroke",itemStyle:"fill"};function du(e,t){var n=e.visualStyleMapper||uu[t];return n||uu.itemStyle}function hu(e,t){var n=e.visualDrawType||cu[t];return n||"fill"}var pu={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),i=e.visualStyleAccessPath||"itemStyle",o=e.getModel(i),r=du(e,i)(o),a=o.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=hu(e,i),l=r[s],u=p(l)?l:null,c="auto"===r.fill||"auto"===r.stroke;if(!r[s]||u||c){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());r[s]||(r[s]=d,n.setVisual("colorFromPalette",!0)),r.fill="auto"===r.fill||p(r.fill)?d:r.fill,r.stroke="auto"===r.stroke||p(r.stroke)?d:r.stroke}if(n.setVisual("style",r),n.setVisual("drawType",s),!t.isSeriesFiltered(e)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var i=e.getDataParams(n),o=g({},r);o[s]=u(i),t.setItemVisual(n,"style",o)}}}},fu=new nr,gu={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var n=e.getData(),i=e.visualStyleAccessPath||"itemStyle",o=du(e,i),r=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[i]){fu.option=n[i];var a=o(fu),s=e.ensureUniqueItemVisual(t,"style");g(s,a),fu.option.decal&&(e.setItemVisual(t,"decal",fu.option.decal),fu.option.decal.dirty=!0),r in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},yu={performRawSeries:!0,overallReset:function(e){var t=l();e.eachSeries((function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var i=e.type+"-"+n,o=t.get(i);o||(o={},t.set(i,o)),lu(e).scope=o}})),e.eachSeries((function(t){if(!t.isColorBySeries()&&!e.isSeriesFiltered(t)){var n=t.getRawData(),i={},o=t.getData(),r=lu(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=hu(t,a);o.each((function(e){var t=o.getRawIndex(e);i[t]=e})),n.each((function(e){var a=i[e];if(o.getItemVisual(a,"colorFromPalette")){var l=o.ensureUniqueItemVisual(a,"style"),u=n.getName(e)||e+"",c=n.count();l[s]=t.getColorFromPalette(u,r,c)}}))}}))}},mu=Math.PI;var vu=function(){function e(e,t,n,i){this._stageTaskMap=l(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,o=!t&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,r=i&&i.modDataCount;return{step:o,modBy:null!=r?Math.ceil(r/o):null,modDataCount:r}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),i=e.getData().count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&i>=n.threshold,r=e.get("large")&&i>=e.get("largeThreshold"),a="mod"===e.get("progressiveChunkMode")?i:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:a,large:r}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=l();e.eachSeries((function(e){var i=e.getProgressive(),o=e.uid;n.set(o,{id:o,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:i&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),t._pipe(e,e.dataTask)}))},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;u(this._allHandlers,(function(i){var o=e.get(i.uid)||e.set(i.uid,{});d(!(i.reset&&i.overallReset),""),i.reset&&this._createSeriesStageTask(i,o,t,n),i.overallReset&&this._createOverallStageTask(i,o,t,n)}),this)},e.prototype.prepareView=function(e,t,n,i){var o=e.renderTask,r=o.context;r.model=t,r.ecModel=n,r.api=i,o.__block=!e.incrementalPrepareRender,this._pipe(t,o)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,i){i=i||{};var o=!1,r=this;function a(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}u(e,(function(e,s){if(!i.visualType||i.visualType===e.visualType){var l=r._stageTaskMap.get(e.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var d,h=c.agentStubMap;h.each((function(e){a(i,e)&&(e.dirty(),d=!0)})),d&&c.dirty(),r.updatePayload(c,n);var p=r.getPerformArgs(c,i.block);h.each((function(e){e.perform(p)})),c.perform(p)&&(o=!0)}else u&&u.each((function(s,l){a(i,s)&&s.dirty();var u=r.getPerformArgs(s,i.block);u.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),r.updatePayload(s,n),s.perform(u)&&(o=!0)}))}})),this.unfinished=o||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t=e.dataTask.perform()||t})),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each((function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)}))},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,i){var o=this,r=t.seriesTaskMap,a=t.seriesTaskMap=l(),s=e.seriesType,u=e.getTargetSeries;function c(t){var s=t.uid,l=a.set(s,r&&r.get(s)||Bs({plan:wu,reset:Mu,count:Du}));l.context={model:t,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:o},o._pipe(t,l)}e.createOnAllSeries?n.eachRawSeries(c):s?n.eachRawSeriesByType(s,c):u&&u(n,i).each(c)},e.prototype._createOverallStageTask=function(e,t,n,i){var o=this,r=t.overallTask=t.overallTask||Bs({reset:xu});r.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:o};var a=r.agentStubMap,s=r.agentStubMap=l(),c=e.seriesType,h=e.getTargetSeries,p=!0,f=!1;function g(e){var t=e.uid,n=s.set(t,a&&a.get(t)||(f=!0,Bs({reset:_u,onDirty:Su})));n.context={model:e,overallProgress:p},n.agent=r,n.__block=p,o._pipe(e,n)}d(!e.createOnAllSeries,""),c?n.eachRawSeriesByType(c,g):h?h(n,i).each(g):(p=!1,u(n.getSeries(),g)),f&&r.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=t),i.tail&&i.tail.pipe(t),i.tail=t,t.__idxInPipeline=i.count++,t.__pipeline=i},e.wrapStageHandler=function(e,t){return p(e)&&(e={overallReset:e,seriesType:Cu(e)}),e.uid=or("stageHandler"),t&&(e.visualType=t),e},e}();function xu(e){e.overallReset(e.ecModel,e.api,e.payload)}function _u(e){return e.overallProgress&&bu}function bu(){this.agent.dirty(),this.getDownstream().dirty()}function Su(){this.agent&&this.agent.dirty()}function wu(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function Mu(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=fn(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?n(t,(function(e,t){return Tu(t)})):Iu}var Iu=Tu(0);function Tu(e){return function(t,n){var i=n.data,o=n.resetDefines[e];if(o&&o.dataEach)for(var r=t.start;r0&&c===i.length-u.length){var d=i.slice(0,c);"data"!==d&&(t.mainType=d,t[u.toLowerCase()]=e,r=!0)}}s.hasOwnProperty(i)&&(n[i]=e,r=!0),r||(o[i]=e)}))}return{cptQuery:t,dataQuery:n,otherQuery:o}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,o=n.packedEvent,r=n.model,a=n.view;if(!r||!a)return!0;var s=t.cptQuery,l=t.dataQuery;return u(s,r,"mainType")&&u(s,r,"subType")&&u(s,r,"index","componentIndex")&&u(s,r,"name")&&u(s,r,"id")&&u(l,o,"name")&&u(l,o,"dataIndex")&&u(l,o,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,t.otherQuery,i,o));function u(e,t,n,i){return null==e[n]||t[i||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),Gu=["symbol","symbolSize","symbolRotate","symbolOffset"],Fu=Gu.concat(["symbolKeepAspect"]),Wu={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var i={},o={},r=!1,a=0;a0&&e.unfinished);e.unfinished||this._zr.flush()}}},r.prototype.getDom=function(){return this._dom},r.prototype.getId=function(){return this.id},r.prototype.getZr=function(){return this._zr},r.prototype.isSSR=function(){return this._ssr},r.prototype.setOption=function(e,t,n){if(!this.__flagInMainProcess)if(this._disposed)this.id;else{var i,r,a;if(o(t)&&(n=t.lazyUpdate,i=t.silent,r=t.replaceMerge,a=t.transition,t=t.notMerge),this.__flagInMainProcess=!0,!this._model||t){var s=new Ha(this._api),l=this._theme,u=this._model=new Oa;u.scheduler=this._scheduler,u.ssr=this._ssr,u.init(null,null,null,l,this._locale,s)}this._model.setOption(e,{replaceMerge:r},qc);var c={seriesTransition:a,optionChanged:!0};if(n)this.__pendingUpdate={silent:i,updateParams:c},this.__flagInMainProcess=!1,this.getZr().wakeUp();else{try{wc(this),Tc.update.call(this,null,c)}catch(d){throw this.__pendingUpdate=null,this.__flagInMainProcess=!1,d}this._ssr||this._zr.flush(),this.__pendingUpdate=null,this.__flagInMainProcess=!1,Lc.call(this,i),kc.call(this,i)}}},r.prototype.setTheme=function(){},r.prototype.getModel=function(){return this._model},r.prototype.getOption=function(){return this._model&&this._model.getOption()},r.prototype.getWidth=function(){return this._zr.getWidth()},r.prototype.getHeight=function(){return this._zr.getHeight()},r.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||mc&&window.devicePixelRatio||1},r.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},r.prototype.renderToCanvas=function(e){return e=e||{},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},r.prototype.renderToSVGString=function(e){return e=e||{},this._zr.painter.renderToString({useViewBox:e.useViewBox})},r.prototype.getSvgDataURL=function(){if(h.svgSupported){var e=this._zr,t=e.storage.getDisplayList();return u(t,(function(e){e.stopAnimation(null,!0)})),e.painter.toDataURL()}},r.prototype.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,n=this._model,i=[],o=this;u(t,(function(e){n.eachComponent({mainType:e},(function(e){var t=o._componentsMap[e.__viewId];t.group.ignore||(i.push(t),t.group.ignore=!0)}))}));var r="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return u(i,(function(e){e.group.ignore=!1})),r}this.id},r.prototype.getConnectedDataURL=function(e){if(!this._disposed){var t="svg"===e.type,n=this.group,i=Math.min,o=Math.max,r=1/0;if(ed[n]){var a=r,s=r,l=-1/0,c=-1/0,d=[],h=e&&e.pixelRatio||this.getDevicePixelRatio();u(Qc,(function(r,u){if(r.group===n){var h=t?r.getZr().painter.getSvgDom().innerHTML:r.renderToCanvas(oe(e)),p=r.getDom().getBoundingClientRect();a=i(p.left,a),s=i(p.top,s),l=o(p.right,l),c=o(p.bottom,c),d.push({dom:h,left:p.left,top:p.top})}}));var p=(l*=h)-(a*=h),f=(c*=h)-(s*=h),g=ye.createCanvas(),y=xe(g,{renderer:t?"svg":"canvas"});if(y.resize({width:p,height:f}),t){var m="";return u(d,(function(e){var t=e.left-a,n=e.top-s;m+=''+e.dom+""})),y.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&y.painter.setBackgroundColor(e.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}return e.connectedBackgroundColor&&y.add(new E({shape:{x:0,y:0,width:p,height:f},style:{fill:e.connectedBackgroundColor}})),u(d,(function(e){var t=new M({style:{x:e.left*h-a,y:e.top*h-s,image:e.dom}});y.add(t)})),y.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}this.id},r.prototype.convertToPixel=function(e,t){return Dc(this,"convertToPixel",e,t)},r.prototype.convertFromPixel=function(e,t){return Dc(this,"convertFromPixel",e,t)},r.prototype.containPixel=function(e,t){if(!this._disposed){var n,i=Cn(this._model,e);return u(i,(function(e,i){i.indexOf("Models")>=0&&u(e,(function(e){var o=e.coordinateSystem;if(o&&o.containPoint)n=n||!!o.containPoint(t);else if("seriesModels"===i){var r=this._chartsMap[e.__viewId];r&&r.containPoint&&(n=n||r.containPoint(t,e))}}),this)}),this),!!n}this.id},r.prototype.getVisual=function(e,t){var n=Cn(this._model,e,{defaultMainType:"series"}),i=n.seriesModel.getData(),o=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?i.indexOfRawIndex(n.dataIndex):null;return null!=o?Uu(i,o,t):Yu(i,t)},r.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},r.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},r.prototype._initEvents=function(){var e,t,n,i=this;u(Yc,(function(e){var t=function(t){var n,o=i.getModel(),r=t.target;if("globalout"===e?n={}:r&&qu(r,(function(e){var t=Xn(e);if(t&&null!=t.dataIndex){var i=t.dataModel||o.getSeriesByIndex(t.seriesIndex);return n=i&&i.getDataParams(t.dataIndex,t.dataType)||{},!0}if(t.eventData)return n=g({},t.eventData),!0}),!0),n){var a=n.componentType,s=n.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=n.seriesIndex);var l=a&&null!=s&&o.getComponent(a,s),u=l&&i["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];n.event=t,n.type=e,i._$eventProcessor.eventInfo={targetEl:r,packedEvent:n,model:l,view:u},i.trigger(e,n)}};t.zrEventfulCallAtLast=!0,i._zr.on(e,t,i)})),u(Xc,(function(e,t){i._messageCenter.on(t,(function(e){this.trigger(t,e)}),i)})),u(["selectchanged"],(function(e){i._messageCenter.on(e,(function(t){this.trigger(e,t)}),i)})),e=this._messageCenter,t=this,n=this._api,e.on("selectchanged",(function(e){var i=n.getModel();e.isFromClick?(ju("map","selectchanged",t,i,e),ju("pie","selectchanged",t,i,e)):"select"===e.fromAction?(ju("map","selected",t,i,e),ju("pie","selected",t,i,e)):"unselect"===e.fromAction&&(ju("map","unselected",t,i,e),ju("pie","unselected",t,i,e))}))},r.prototype.isDisposed=function(){return this._disposed},r.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},r.prototype.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,this.getDom()&&Nn(this.getDom(),id,"");var e=this,t=e._api,n=e._model;u(e._componentsViews,(function(e){e.dispose(n,t)})),u(e._chartsViews,(function(e){e.dispose(n,t)})),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete Qc[e.id]}},r.prototype.resize=function(e){if(!this.__flagInMainProcess)if(this._disposed)this.id;else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),i=e&&e.silent;this.__pendingUpdate&&(null==i&&(i=this.__pendingUpdate.silent),n=!0,this.__pendingUpdate=null),this.__flagInMainProcess=!0;try{n&&wc(this),Tc.update.call(this,{type:"resize",animation:g({duration:0},e&&e.animation)})}catch(o){throw this.__flagInMainProcess=!1,o}this.__flagInMainProcess=!1,Lc.call(this,i),kc.call(this,i)}}},r.prototype.showLoading=function(e,t){if(this._disposed)this.id;else if(o(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),$c[e]){var n=$c[e](this._api,t),i=this._zr;this._loadingFX=n,i.add(n)}},r.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},r.prototype.makeActionFromEvent=function(e){var t=g({},e);return t.type=Xc[e.type],t},r.prototype.dispatchAction=function(e,t){if(this._disposed)this.id;else if(o(t)||(t={silent:!!t}),Zc[e.type]&&this._model)if(this.__flagInMainProcess)this._pendingActions.push(e);else{var n=t.silent;Ac.call(this,e,n);var i=t.flush;i?this._zr.flush():!1!==i&&h.browser.weChat&&this._throttledZrFlush(),Lc.call(this,n),kc.call(this,n)}},r.prototype.updateLabelLayout=function(){fc.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},r.prototype.appendData=function(e){if(this._disposed)this.id;else{var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},r.internalField=function(){function t(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function i(e){for(var t=[],n=e.currentStates,i=0;i0?{duration:r,delay:n.get("delay"),easing:n.get("easing")}:null;t.eachRendered((function(e){if(e.states&&e.states.emphasis){if(Zi(e))return;if(e instanceof x&&function(e){var t=Jn(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(o){e.stateTransition=a;var n=e.getTextContent(),r=e.getTextGuideLine();n&&(n.stateTransition=a),r&&(r.stateTransition=a)}e.__dirty&&i(e)}}))}wc=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),Mc(e,!0),Mc(e,!1),t.plan()},Mc=function(e,t){for(var n=e._model,i=e._scheduler,o=t?e._componentsViews:e._chartsViews,r=t?e._componentsMap:e._chartsMap,a=e._zr,s=e._api,l=0;lt.get("hoverLayerThreshold")&&!h.node&&!h.worker&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered((function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)}))}}))}(e,t),fc.trigger("series:afterupdate",t,n,r)},Bc=function(e){e.__needsUpdateStatus=!0,e.getZr().wakeUp()},Gc=function(e){e.__needsUpdateStatus&&(e.getZr().storage.traverse((function(e){Zi(e)||i(e)})),e.__needsUpdateStatus=!1)},Vc=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(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},i.prototype.enterEmphasis=function(e,n){vi(e,n),Bc(t)},i.prototype.leaveEmphasis=function(e,n){xi(e,n),Bc(t)},i.prototype.enterBlur=function(e){_i(e),Bc(t)},i.prototype.leaveBlur=function(e){bi(e),Bc(t)},i.prototype.enterSelect=function(e){Si(e),Bc(t)},i.prototype.leaveSelect=function(e){wi(e),Bc(t)},i.prototype.getModel=function(){return t.getModel()},i.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},i.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},i}(Ea))(t)},zc=function(e){function t(e,t){for(var n=0;n=0)){md.push(n);var a=Nu.wrapStageHandler(n,r);a.__prio=t,a.__raw=n,e.push(a)}}function xd(e,t){$c[e]=t}function _d(e,t,n){var i=yc("registerMap");i&&i(e,t,n)}var bd=function(e){var t=(e=oe(e)).type;t||hn("");var n=t.split(":");2!==n.length&&hn("");var i=!1;"echarts"===n[0]&&(t=n[1],i=!0),e.__isBuiltIn=i,tl.set(t,e)};yd(2e3,pu),yd(4500,gu),yd(4500,yu),yd(2e3,Wu),yd(4500,Hu),yd(7e3,(function(e,t){e.eachRawSeries((function(n){if(!e.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each((function(e){var n=i.getItemVisual(e,"decal");n&&(i.ensureUniqueItemVisual(e,"style").decal=cc(n,t))}));var o=i.getVisual("decal");if(o)i.getVisual("style").decal=cc(o,t)}}))})),ld(us),ud(900,(function(e){var t=l();e.eachSeries((function(e){var n=e.get("stack");if(n){var i=t.get(n)||t.set(n,[]),o=e.getData(),r={stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:e};if(!r.stackedDimension||!r.isStackedByIndex&&!r.stackedByDimension)return;i.length&&o.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(r)}})),t.each(cs)})),xd("default",(function(e,t){C(t=t||{},{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 n=new X,i=new E({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(i);var o,r=new j({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new E({style:{fill:"none"},textContent:r,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(a),t.showSpinner&&((o=new B({shape:{startAngle:-mu/2,endAngle:-mu/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*mu/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*mu/2}).delay(300).start("circularInOut"),n.add(o)),n.resize=function(){var n=r.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),u=e.getHeight()/2;t.showSpinner&&o.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n})),pd({type:"highlight",event:"highlight",update:"highlight"},pe),pd({type:"downplay",event:"downplay",update:"downplay"},pe),pd({type:"select",event:"select",update:"select"},pe),pd({type:"unselect",event:"unselect",update:"unselect"},pe),pd({type:"toggleSelect",event:"toggleSelect",update:"toggleSelect"},pe),sd("light",Ru),sd("dark",zu);var Sd=[],wd={registerPreprocessor:ld,registerProcessor:ud,registerPostInit:cd,registerPostUpdate:dd,registerUpdateLifecycle:hd,registerAction:pd,registerCoordinateSystem:fd,registerLayout:gd,registerVisual:yd,registerTransform:bd,registerLoading:xd,registerMap:_d,registerImpl:function(e,t){gc[e]=t},PRIORITY:vc,ComponentModel:sa,ComponentView:Zl,SeriesModel:Ul,ChartView:nu,registerComponentModel:function(e){sa.registerClass(e)},registerComponentView:function(e){Zl.registerClass(e)},registerSeriesModel:function(e){Ul.registerClass(e)},registerChartView:function(e){nu.registerClass(e)},registerSubTypeDefaulter:function(e,t){sa.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){Se(e,t)}};function Md(e){s(e)?u(e,(function(e){Md(e)})):c(Sd,e)>=0||(Sd.push(e),p(e)&&(e={install:e}),e.install(wd))}function Id(e){return null==e?0:e.length||1}function Td(e){return e}var Dd=function(){function e(e,t,n,i,o,r){this._old=e,this._new=t,this._oldKeyGetter=n||Td,this._newKeyGetter=i||Td,this.context=o,this._diffModeMultiple="multiple"===r}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},i=new Array(e.length),o=new Array(t.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(t,n,o,"_newKeyGetter");for(var r=0;r1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,r)}else 1===l?(n[a]=null,this._update&&this._update(s,r)):this._remove&&this._remove(r)}this._performRestAdd(o,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},i={},o=[],r=[];this._initIndexMap(e,n,o,"_oldKeyGetter"),this._initIndexMap(t,i,r,"_newKeyGetter");for(var a=0;a1&&1===d)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===c&&1===d)this._update&&this._update(u,l),i[s]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(u,l),i[s]=null;else if(c>1)for(var h=0;h1)for(var a=0;a30}var Gd,Fd,Wd,Hd,Ud,Yd,Zd,Xd=o,jd=n,qd="undefined"==typeof Int32Array?Array:Int32Array,Kd=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Jd=["_approximateExtent"],$d=function(){function e(e,t){var n;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 o=!1;Ed(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(o=!0,n=e),n=n||["x","y"];for(var r={},a=[],s={},c=!1,d={},h=0;h=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList;if("original"===n.getSource().sourceFormat&&!n.pure)for(var r=[],a=e;a0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var o=i[t];return null==o&&(o=this.getVisual(t),s(o)?o=o.slice():Xd(o)&&(o=g({},o)),i[t]=o),o},e.prototype.setItemVisual=function(e,t,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,Xd(t)?g(i,t):i[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Xd(e)?g(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?g(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;jn(n,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){u(this._graphicEls,(function(n,i){n&&e&&e.call(t,n,i)}))},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:jd(this.dimensions,this._getDimInfo,this),this.hostModel)),Ud(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];p(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(we(arguments)))})},e.internalField=(Gd=function(e){var t=e._invertedIndicesMap;u(t,(function(n,i){var o=e._dimInfos[i],r=o.ordinalMeta,a=e._store;if(r){n=t[i]=new qd(r.categories.length);for(var s=0;s1&&(s+="__ec__"+u),i[t]=s}})),e}(),Qd=$d;function eh(e,t){ms(e)||(e=xs(e));var n=(t=t||{}).coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],a=l(),s=[],c=function(e,t,n,i){var r=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,i||0);return u(t,(function(e){var t;o(e)&&(t=e.dimsDef)&&(r=Math.max(r,t.length))})),r}(e,n,r,t.dimensionsCount),d=t.canOmitUnusedDimensions&&Bd(c),h=r===e.dimensionsDefine,p=h?zd(e):Vd(r),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(e,c));for(var y=l(f),m=new sl(c),v=0;v0&&(i.name=o+(r-1)),r++,t.set(o,r)}}(s),new Rd({source:e,dimensions:s,fullDimensionCount:c,dimensionOmitted:d})}function th(e,t,n){var i=t.data;if(n||i.hasOwnProperty(e)){for(var o=0;i.hasOwnProperty(e+o);)o++;e+=o}return t.set(e,!0),e}var nh=function(e){this.coordSysDims=[],this.axisMap=l(),this.categoryAxisMap=l(),this.coordSysName=e};var ih={cartesian2d:function(e,t,n,i){var o=e.getReferringComponents("xAxis",Ln).models[0],r=e.getReferringComponents("yAxis",Ln).models[0];t.coordSysDims=["x","y"],n.set("x",o),n.set("y",r),oh(o)&&(i.set("x",o),t.firstCategoryDimIndex=0),oh(r)&&(i.set("y",r),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,i){var o=e.getReferringComponents("singleAxis",Ln).models[0];t.coordSysDims=["single"],n.set("single",o),oh(o)&&(i.set("single",o),t.firstCategoryDimIndex=0)},polar:function(e,t,n,i){var o=e.getReferringComponents("polar",Ln).models[0],r=o.findAxisModel("radiusAxis"),a=o.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",r),n.set("angle",a),oh(r)&&(i.set("radius",r),t.firstCategoryDimIndex=0),oh(a)&&(i.set("angle",a),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,i){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,i){var o=e.ecModel,r=o.getComponent("parallel",e.get("parallelIndex")),a=t.coordSysDims=r.dimensions.slice();u(r.parallelAxisIndex,(function(e,r){var s=o.getComponent("parallelAxis",e),l=a[r];n.set(l,s),oh(s)&&(i.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=r))}))}};function oh(e){return"category"===e.get("type")}function rh(e,t,n){var o,r,a,s=(n=n||{}).byIndex,l=n.stackedCoordDimension;!function(e){return!Ed(e.schema)}(t)?(r=t.schema,o=r.dimensions,a=t.store):o=t;var c,d,h,p,f=!(!e||!e.get("stack"));if(u(o,(function(e,t){i(e)&&(o[t]=e={name:e}),f&&!e.isExtraCoord&&(s||c||!e.ordinalMeta||(c=e),d||"ordinal"===e.type||"time"===e.type||l&&l!==e.coordDim||(d=e))})),!d||s||c||(s=!0),d){h="__\0ecstackresult_"+e.id,p="__\0ecstackedover_"+e.id,c&&(c.createInvertedIndices=!0);var g=d.coordDim,y=d.type,m=0;u(o,(function(e){e.coordDim===g&&m++}));var v={name:h,coordDim:g,coordDimIndex:m,type:y,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length},x={name:p,coordDim:p,coordDimIndex:m+1,type:y,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length+1};r?(a&&(v.storeDimIndex=a.ensureCalculationDimension(p,y),x.storeDimIndex=a.ensureCalculationDimension(h,y)),r.appendCalculationDimension(v),r.appendCalculationDimension(x)):(o.push(v),o.push(x))}return{stackedDimension:d&&d.name,stackedByDimension:c&&c.name,isStackedByIndex:s,stackedOverDimension:p,stackResultDimension:h}}function ah(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function sh(e,t){return ah(e,t)?e.getCalculationInfo("stackResultDimension"):t}function lh(e,t,i){i=i||{};var o,r=t.getSourceManager(),a=!1;e?(a=!0,o=xs(e)):a="original"===(o=r.getSource()).sourceFormat;var l=function(e){var t=e.get("coordinateSystem"),n=new nh(t),i=ih[t];if(i)return i(e,n,n.axisMap,n.categoryAxisMap),n}(t),c=function(e,t){var i,o=e.get("coordinateSystem"),r=Ba.get(o);return t&&t.coordSysDims&&(i=n(t.coordSysDims,(function(e){var n={name:e},i=t.axisMap.get(e);if(i){var o=i.get("type");n.type=kd(o)}return n}))),i||(i=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),i}(t,l),d=i.useEncodeDefaulter,h=p(d)?d:d?se(ya,c,t):null,f=eh(o,{coordDimensions:c,generateCoord:i.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:h,canOmitUnusedDimensions:!a}),g=function(e,t,n){var i,o;return n&&u(e,(function(e,r){var a=e.coordDim,s=n.categoryAxisMap.get(a);s&&(null==i&&(i=r),e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(o=!0)})),o||null==i||(e[i].otherDims.itemName=0),i}(f.dimensions,i.createInvertedIndices,l),y=a?null:r.getSharedDataStore(f),m=rh(t,{schema:f,store:y}),v=new Qd(f,t);v.setCalculationInfo(m);var x=null!=g&&function(e){if("original"===e.sourceFormat){var t=function(e){var t=0;for(;tt[1]&&(t[1]=e[1])},e.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();Hn(uh);var ch=uh,dh=0,hh=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++dh}return e.createByAxisModel=function(t){var i=t.option,o=i.data,r=o&&n(o,ph);return new e({categories:r,needCollect:!r,deduplication:!1!==i.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!i(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var o=this._getOrCreateMap();return null==(t=o.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,o.set(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=l(this.categories))},e}();function ph(e){return o(e)&&null!=e.value?e.value:e+""}var fh=hh;function gh(e){return"interval"===e.type||"log"===e.type}function yh(e,t,n,i){var o={},r=e[1]-e[0],a=o.interval=on(r/t,!0);null!=n&&ai&&(a=o.interval=i);var s=o.intervalPrecision=vh(a);return function(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),xh(e,0,t),xh(e,1,t),e[0]>e[1]&&(e[0]=e[1])}(o.niceTickExtent=[Ut(Math.ceil(e[0]/a)*a,s),Ut(Math.floor(e[1]/a)*a,s)],e),o}function mh(e){var t=Math.pow(10,nn(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,Ut(n*t)}function vh(e){return Zt(e)+2}function xh(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function _h(e,t){return e>=t[0]&&e<=t[1]}function bh(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function Sh(e,t){return e*(t[1]-t[0])+t[0]}var wh=function(t){function r(e){var i=t.call(this,e)||this;i.type="ordinal";var r=i.getSetting("ordinalMeta");return r||(r=new fh({})),s(r)&&(r=new fh({categories:n(r,(function(e){return o(e)?e.value:e}))})),i._ordinalMeta=r,i._extent=i.getSetting("extent")||[0,r.categories.length-1],i}return e(r,t),r.prototype.parse=function(e){return null==e?NaN:i(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},r.prototype.contain=function(e){return _h(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},r.prototype.normalize=function(e){return bh(e=this._getTickNumber(this.parse(e)),this._extent)},r.prototype.scale=function(e){return e=Math.round(Sh(e,this._extent)),this.getRawOrdinalNumber(e)},r.prototype.getTicks=function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push({value:n}),n++;return e},r.prototype.getMinorTicks=function(e){},r.prototype.setSortInfo=function(e){if(null!=e){for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,r=this._ordinalMeta.categories.length,a=Math.min(r,t.length);o=0&&e=0&&e=e},r.prototype.getOrdinalMeta=function(){return this._ordinalMeta},r.prototype.calcNiceTicks=function(){},r.prototype.calcNiceExtent=function(){},r.type="ordinal",r}(ch);ch.registerClass(wh);var Mh=wh,Ih=Ut,Th=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return e(n,t),n.prototype.parse=function(e){return e},n.prototype.contain=function(e){return _h(e,this._extent)},n.prototype.normalize=function(e){return bh(e,this._extent)},n.prototype.scale=function(e){return Sh(e,this._extent)},n.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},n.prototype.unionExtent=function(e){var t=this._extent;e[0]t[1]&&(t[1]=e[1]),this.setExtent(t[0],t[1])},n.prototype.getInterval=function(){return this._interval},n.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=vh(e)},n.prototype.getTicks=function(e){var t=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,r=[];if(!t)return r;n[0]1e4)return[];var s=r.length?r[r.length-1].value:i[1];return n[1]>s&&(e?r.push({value:Ih(s+t,o)}):r.push({value:n[1]})),r},n.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],i=this.getExtent(),o=1;oi[0]&&c0&&(r=null===r?s:Math.min(r,s))}n[i]=r}}return n}(e),n=[];return u(e,(function(e){var i,o=e.coordinateSystem.getBaseAxis(),r=o.getExtent();if("category"===o.type)i=o.getBandWidth();else if("value"===o.type||"time"===o.type){var a=o.dim+"_"+o.index,s=t[a],l=Math.abs(r[1]-r[0]),u=o.scale.getExtent(),c=Math.abs(u[1]-u[0]);i=s?l/c*s:l}else{var d=e.getData();i=Math.abs(r[1]-r[0])/d.count()}var h=Ht(e.get("barWidth"),i),p=Ht(e.get("barMaxWidth"),i),f=Ht(e.get("barMinWidth")||(Bh(e)?.5:1),i),g=e.get("barGap"),y=e.get("barCategoryGap");n.push({bandWidth:i,barWidth:h,barMaxWidth:p,barMinWidth:f,barGap:g,barCategoryGap:y,axisKey:Ph(o),stackId:kh(e)})})),Rh(n)}function Rh(e){var t={};u(e,(function(e,n){var i=e.axisKey,o=e.bandWidth,r=t[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=r.stacks;t[i]=r;var s=e.stackId;a[s]||r.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(r.remainedWidth,l),r.remainedWidth-=l);var u=e.barMaxWidth;u&&(a[s].maxWidth=u);var c=e.barMinWidth;c&&(a[s].minWidth=c);var d=e.barGap;null!=d&&(r.gap=d);var h=e.barCategoryGap;null!=h&&(r.categoryGap=h)}));var n={};return u(t,(function(e,t){n[t]={};var i=e.stacks,o=e.bandWidth,r=e.categoryGap;if(null==r){var a=v(i).length;r=Math.max(35-4*a,15)+"%"}var s=Ht(r,o),l=Ht(e.gap,1),c=e.remainedWidth,d=e.autoWidthCount,h=(c-s)/(d+(d-1)*l);h=Math.max(h,0),u(i,(function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){i=e.width;t&&(i=Math.min(i,t)),n&&(i=Math.max(i,n)),e.width=i,c-=i+l*i,d--}else{var i=h;t&&ti&&(i=n),i!==h&&(e.width=i,c-=i+l*i,d--)}})),h=(c-s)/(d+(d-1)*l),h=Math.max(h,0);var p,f=0;u(i,(function(e,t){e.width||(e.width=h),p=e,f+=e.width*(1+l)})),p&&(f-=p.width*l);var g=-f/2;u(i,(function(e,i){n[t][i]=n[t][i]||{bandWidth:o,offset:g,width:e.width},g+=e.width*(1+l)}))})),n}function Eh(e,t){var n=Nh(e,t),i=Oh(n);u(n,(function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),o=kh(e),r=i[Ph(n)][o],a=r.offset,s=r.width;t.setLayout({bandWidth:r.bandWidth,offset:a,size:s})}))}function Vh(e){return{seriesType:e,plan:Xl(),reset:function(e){if(zh(e)){var t=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),o=n.getOtherAxis(i),r=t.getDimensionIndex(t.mapDimension(o.dim)),a=t.getDimensionIndex(t.mapDimension(i.dim)),s=e.get("showBackground",!0),l=t.mapDimension(o.dim),u=t.getCalculationInfo("stackResultDimension"),c=ah(t,l)&&!!t.getCalculationInfo("stackedOnSeries"),d=o.isHorizontal(),h=function(e,t){return t.toGlobalCoord(t.dataToCoord("log"===t.type?1:0))}(0,o),p=Bh(e),f=e.get("barMinHeight")||0,g=u&&t.getDimensionIndex(u),y=t.getLayout("size"),m=t.getLayout("offset");return{progress:function(e,t){for(var i,o=e.count,l=p&&Lh(3*o),u=p&&s&&Lh(3*o),v=p&&Lh(o),x=n.master.getRect(),_=d?x.width:x.height,b=t.getStore(),S=0;null!=(i=e.next());){var w=b.get(c?g:r,i),M=b.get(a,i),I=h,T=void 0;c&&(T=+w-b.get(r,i));var D=void 0,C=void 0,A=void 0,L=void 0;if(d){var k=n.dataToPoint([w,M]);if(c)I=n.dataToPoint([T,M])[0];D=I,C=k[1]+m,A=k[0]-I,L=y,Math.abs(A)0)for(var u=0;u=0;--u)if(c[d]){a=c[d];break}a=a||l.none}if(s(a)){var h=null==e.level?0:e.level>=0?e.level:a.length+e.level;a=a[h=Math.min(h,a.length-1)]}}return vr(new Date(e.value),a,r,o)}(e,t,n,this.getSetting("locale"),o)},o.prototype.getTicks=function(){var e=this._interval,t=this._extent,i=[];if(!e)return i;i.push({value:t[0],level:0});var o=this.getSetting("useUTC"),r=function(e,t,i,o){var r=1e4,a=fr,s=0;function l(e,t,n,i,r,a,s){for(var l=new Date(t),u=t,c=l[i]();u1&&0===u&&r.unshift({value:r[0].value-h})}}for(u=0;u=o[0]&&v<=o[1]&&h++)}var x=(o[1]-o[0])/t;if(h>1.5*x&&p>x/1.5)break;if(c.push(y),h>x||e===a[f])break}d=[]}}var _=ue(n(c,(function(e){return ue(e,(function(e){return e.value>=o[0]&&e.value<=o[1]&&!e.notAdd}))})),(function(e){return e.length>0})),b=[],S=_.length-1;for(f=0;f<_.length;++f)for(var w=_[f],M=0;Mn&&(this._approxInterval=n);var r=Fh.length,a=Math.min(function(e,t,n,i){for(;n>>1;e[o][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function Hh(e){return(e/=2592e6)>6?6:e>3?3:e>2?2:1}function Uh(e){return(e/=36e5)>12?12:e>6?6:e>3.5?4:e>2?2:1}function Yh(e,t){return(e/=t?6e4:1e3)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function Zh(e){return on(e,!0)}function Xh(e,t,n){var i=new Date(e);switch(yr(t)){case"year":case"month":i[Ar(n)](0);case"day":i[Lr(n)](1);case"hour":i[kr(n)](0);case"minute":i[Pr(n)](0);case"second":i[Nr(n)](0),i[Or(n)](0)}return i.getTime()}ch.registerClass(Gh);var jh=Gh,qh=ch.prototype,Kh=Dh.prototype,Jh=Ut,$h=Math.floor,Qh=Math.ceil,ep=Math.pow,tp=Math.log,np=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new Dh,e._interval=0,e}return e(i,t),i.prototype.getTicks=function(e){var t=this._originalScale,i=this._extent,o=t.getExtent(),r=Kh.getTicks.call(this,e);return n(r,(function(e){var t=e.value,n=Ut(ep(this.base,t));return n=t===i[0]&&this._fixMin?op(n,o[0]):n,{value:n=t===i[1]&&this._fixMax?op(n,o[1]):n}}),this)},i.prototype.setExtent=function(e,t){var n=this.base;e=tp(e)/tp(n),t=tp(t)/tp(n),Kh.setExtent.call(this,e,t)},i.prototype.getExtent=function(){var e=this.base,t=qh.getExtent.call(this);t[0]=ep(e,t[0]),t[1]=ep(e,t[1]);var n=this._originalScale.getExtent();return this._fixMin&&(t[0]=op(t[0],n[0])),this._fixMax&&(t[1]=op(t[1],n[1])),t},i.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=tp(e[0])/tp(t),e[1]=tp(e[1])/tp(t),qh.unionExtent.call(this,e)},i.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},i.prototype.calcNiceTicks=function(e){e=e||10;var t=this._extent,n=t[1]-t[0];if(!(n===1/0||n<=0)){var i=tn(n);for(e/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var o=[Ut(Qh(t[0]/i)*i),Ut($h(t[1]/i)*i)];this._interval=i,this._niceExtent=o}},i.prototype.calcNiceExtent=function(e){Kh.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},i.prototype.parse=function(e){return e},i.prototype.contain=function(e){return _h(e=tp(e)/tp(this.base),this._extent)},i.prototype.normalize=function(e){return bh(e=tp(e)/tp(this.base),this._extent)},i.prototype.scale=function(e){return e=Sh(e,this._extent),ep(this.base,e)},i.type="log",i}(ch),ip=np.prototype;function op(e,t){return Jh(e,Zt(t))}ip.getMinorTicks=Kh.getMinorTicks,ip.getLabel=Kh.getLabel,ch.registerClass(np);var rp=np,ap=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var d=this._determinedMin,h=this._determinedMax;return null!=d&&(a=d,l=!0),null!=h&&(s=h,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},e.prototype.modifyDataMinMax=function(e,t){this[lp[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){this[sp[e]]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),sp={min:"_determinedMin",max:"_determinedMax"},lp={min:"_dataMin",max:"_dataMax"};function up(e,t,n){var i=e.rawExtentInfo;return i||(i=new ap(e,t,n),e.rawExtentInfo=i,i)}function cp(e,t){return null==t?null:Me(t)?NaN:e.parse(t)}function dp(e,t){var n=e.type,i=up(e,t,e.getExtent()).calculate();e.setBlank(i.isBlank);var o=i.min,r=i.max,a=t.ecModel;if(a&&"time"===n){var s=Nh("bar",a),l=!1;if(u(s,(function(e){l=l||e.getBaseAxis()===t.axis})),l){var c=Oh(s),d=function(e,t,n,i){var o=n.axis.getExtent(),r=o[1]-o[0],a=function(e,t,n){if(e&&t){var i=e[Ph(t)];return null!=i&&null!=n?i[kh(n)]:i}}(i,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;u(a,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;u(a,(function(e){l=Math.max(e.offset+e.width,l)})),s=Math.abs(s),l=Math.abs(l);var c=s+l,d=t-e,h=d/(1-(s+l)/r)-d;return{min:e-=h*(s/c),max:t+=h*(l/c)}}(o,r,t,c);o=d.min,r=d.max}}return{extent:[o,r],fixMin:i.minFixed,fixMax:i.maxFixed}}function hp(e,t){var n=t,i=dp(e,n),o=i.extent,r=n.get("splitNumber");e instanceof rp&&(e.base=n.get("logBase"));var a=e.type,s=n.get("interval"),l="interval"===a||"time"===a;e.setExtent(o[0],o[1]),e.calcNiceExtent({splitNumber:r,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&e.setInterval&&e.setInterval(s)}function pp(e,t){if(t=t||e.get("type"))switch(t){case"category":return new Mh({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new jh({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(ch.getClass(t)||Dh)}}function fp(e){var t,n,o=e.getLabelModel().get("formatter"),r="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?(n=o,function(t,i){return e.scale.getFormattedLabel(t,i,n)}):i(o)?function(t){return function(n){var i=e.scale.getLabel(n);return t.replace("{value}",null!=i?i:"")}}(o):p(o)?(t=o,function(n,i){return null!=r&&(i=n.value-r),t(gp(e,n),i,null!=n.level?{level:n.level}:null)}):function(t){return e.scale.getLabel(t)}}function gp(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function yp(e,t){var n=t*Math.PI/180,i=e.width,o=e.height,r=i*Math.abs(Math.cos(n))+Math.abs(o*Math.sin(n)),a=i*Math.abs(Math.sin(n))+Math.abs(o*Math.cos(n));return new Q(e.x,e.y,r,a)}function mp(e){var t=e.get("interval");return null==t?"auto":t}function vp(e){return"category"===e.type&&0===mp(e.getLabelModel())}function xp(e,t){var n={};return u(e.mapDimensionsAll(t),(function(t){n[sh(e,t)]=!0})),v(n)}var _p=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}();var bp={isDimensionStacked:ah,enableDataStack:rh,getStackedDimension:sh};var Sp=Object.freeze(Object.defineProperty({__proto__:null,createList:function(e){return lh(null,e)},getLayoutRect:Qr,dataStack:bp,createScale:function(e,t){var n=t;t instanceof nr||(n=new nr(t));var i=pp(n);return i.setExtent(e[0],e[1]),hp(i,n),i},mixinAxisModelCommonMethods:function(e){re(e,_p)},getECData:Xn,createTextStyle:function(e,t){return Po(e,null,null,"normal"!==(t=t||{}).state)},createDimensions:function(e,t){return eh(e,t).dimensions},createSymbol:oc,enableHoverEmphasis:ki},Symbol.toStringTag,{value:"Module"})),wp=[];function Mp(e,t){for(var n=0;nn&&(e=o,n=a)}if(e)return function(e){for(var t=0,n=0,i=0,o=e.length,r=e[o-1][0],a=e[o-1][1],s=0;s>1^-(1&s),l=l>>1^-(1&l),o=s+=o,r=l+=r,i.push([s/n,l/n])}return i}function Np(e,t){return e=function(e){if(!e.UTF8Encoding)return e;var t=e,n=t.UTF8Scale;null==n&&(n=1024);var i=t.features;return u(i,(function(e){var t=e.geometry,i=t.encodeOffsets,o=t.coordinates;if(i)switch(t.type){case"LineString":t.coordinates=Pp(o,i,n);break;case"Polygon":case"MultiLineString":kp(o,i,n);break;case"MultiPolygon":u(o,(function(e,t){return kp(e,i[t],n)}))}})),t.UTF8Encoding=!1,t}(e),n(ue(e.features,(function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0})),(function(e){var n=e.properties,i=e.geometry,o=[];switch(i.type){case"Polygon":var r=i.coordinates;o.push(new Dp(r[0],r.slice(1)));break;case"MultiPolygon":u(i.coordinates,(function(e){e[0]&&o.push(new Dp(e[0],e.slice(1)))}));break;case"LineString":o.push(new Cp([i.coordinates]));break;case"MultiLineString":o.push(new Cp(i.coordinates))}var a=new Ap(n[t||"name"],o,n.cp);return a.properties=n,a}))}var Op=Object.freeze(Object.defineProperty({__proto__:null,linearMap:Wt,round:Ut,asc:Yt,getPrecision:Zt,getPrecisionSafe:Xt,getPixelPrecision:jt,getPercentWithPrecision:qt,MAX_SAFE_INTEGER:9007199254740991,remRadian:Jt,isRadianAroundZero:$t,parseDate:en,quantity:tn,quantityExponent:nn,nice:on,quantile:rn,reformIntervals:an,isNumeric:ln,numericToNumber:sn},Symbol.toStringTag,{value:"Module"})),Rp=Object.freeze(Object.defineProperty({__proto__:null,parse:en,format:vr},Symbol.toStringTag,{value:"Module"})),Ep=Object.freeze(Object.defineProperty({__proto__:null,extendShape:eo,extendPath:no,makePath:ro,makeImage:ao,mergePath:lo,resizePath:uo,createIcon:xo,updateProps:Ui,initProps:Yi,getTransform:ho,clipPointsByRect:mo,clipRectByRect:vo,registerShape:io,getShapeClass:oo,Group:X,Image:M,Text:j,Circle:L,Ellipse:k,Sector:P,Ring:N,Polygon:O,Polyline:R,Rect:E,Line:V,BezierCurve:z,Arc:B,IncrementalDisplayable:q,CompoundPath:K,LinearGradient:J,RadialGradient:$,BoundingRect:Q},Symbol.toStringTag,{value:"Module"})),Vp=Object.freeze(Object.defineProperty({__proto__:null,addCommas:Rr,toCamelCase:Er,normalizeCssArray:Vr,encodeHTML:Gr,formatTpl:Ur,getTooltipMarker:Yr,formatTime:function(e,t,n){"week"!==e&&"month"!==e&&"quarter"!==e&&"half-year"!==e&&"year"!==e||(e="MM-dd\nyyyy");var i=en(t),o=n?"getUTC":"get",r=i[o+"FullYear"](),a=i[o+"Month"]()+1,s=i[o+"Date"](),l=i[o+"Hours"](),u=i[o+"Minutes"](),c=i[o+"Seconds"](),d=i[o+"Milliseconds"]();return e=e.replace("MM",gr(a,2)).replace("M",a).replace("yyyy",r).replace("yy",gr(r%100+"",2)).replace("dd",gr(s,2)).replace("d",s).replace("hh",gr(l,2)).replace("h",l).replace("mm",gr(u,2)).replace("m",u).replace("ss",gr(c,2)).replace("s",c).replace("SSS",gr(d,3))},capitalFirst:function(e){return e?e.charAt(0).toUpperCase()+e.substr(1):e},truncateText:Ae,getTextRect:function(e,t,n,i,o,r,a,s){return new j({style:{text:e,font:t,align:n,verticalAlign:i,padding:o,rich:r,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()}},Symbol.toStringTag,{value:"Module"})),zp=Object.freeze(Object.defineProperty({__proto__:null,map:n,each:u,indexOf:c,inherits:f,reduce:t,filter:ue,bind:ce,curry:se,isArray:s,isString:i,isObject:o,isFunction:p,extend:g,defaults:C,clone:oe,merge:ie},Symbol.toStringTag,{value:"Module"})),Bp=Tn();function Gp(e){return"category"===e.type?function(e){var t=e.getLabelModel(),n=Wp(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),i=fp(e);return{labels:n(t,(function(t,n){return{level:t.level,formattedLabel:i(t,n),rawLabel:e.scale.getLabel(t),tickValue:t.value}}))}}(e)}function Fp(e,t){return"category"===e.type?function(e,t){var i,o,r=Hp(e,"ticks"),a=mp(t),s=Up(r,a);if(s)return s;t.get("show")&&!e.scale.isBlank()||(i=[]);if(p(a))i=Xp(e,a,!0);else if("auto"===a){var l=Wp(e,e.getLabelModel());o=l.labelCategoryInterval,i=n(l.labels,(function(e){return e.tickValue}))}else i=Zp(e,o=a,!0);return Yp(r,a,{ticks:i,tickCategoryInterval:o})}(e,t):{ticks:n(e.scale.getTicks(),(function(e){return e.value}))}}function Wp(e,t){var n,i,o=Hp(e,"labels"),r=mp(t),a=Up(o,r);return a||(p(r)?n=Xp(e,r):(i="auto"===r?function(e){var t=Bp(e).autoInterval;return null!=t?t:Bp(e).autoInterval=e.calculateCategoryInterval()}(e):r,n=Zp(e,i)),Yp(o,r,{labels:n,labelCategoryInterval:i}))}function Hp(e,t){return Bp(e)[t]||(Bp(e)[t]=[])}function Up(e,t){for(var n=0;n1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=vp(e),h=a.get("showMinLabel")||d,p=a.get("showMaxLabel")||d;h&&u!==r[0]&&g(r[0]);for(var f=u;f<=r[1];f+=l)g(f);function g(e){var t={value:e};s.push(n?e:{formattedLabel:i(t),rawLabel:o.getLabel(t),tickValue:e})}return p&&f-l!==r[1]&&g(r[1]),s}function Xp(e,t,n){var i=e.scale,o=fp(e),r=[];return u(i.getTicks(),(function(e){var a=i.getLabel(e),s=e.value;t(e.value,a)&&r.push(n?s:{formattedLabel:o(e),rawLabel:a,tickValue:s})})),r}var jp=[0,1],qp=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return e>=n&&e<=i},e.prototype.containData=function(e){return this.scale.contain(e)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return jt(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this._extent,i=this.scale;return e=i.normalize(e),this.onBand&&"ordinal"===i.type&&Kp(n=n.slice(),i.count()),Wt(e,jp,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&Kp(n=n.slice(),i.count());var o=Wt(e,n,jp,t);return this.scale.scale(o)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){var t=(e=e||{}).tickModel||this.getTickModel(),i=Fp(this,t).ticks,o=n(i,(function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}}),this);return function(e,t,n,i){var o=t.length;if(!e.onBand||n||!o)return;var r,a,s=e.getExtent();if(1===o)t[0].coord=s[0],r=t[1]={coord:s[0]};else{var l=t[o-1].tickValue-t[0].tickValue,c=(t[o-1].coord-t[0].coord)/l;u(t,(function(e){e.coord-=c/2})),a=1+e.scale.getExtent()[1]-t[o-1].tickValue,r={coord:t[o-1].coord+c*a},t.push(r)}var d=s[0]>s[1];h(t[0].coord,s[0])&&(i?t[0].coord=s[0]:t.shift());i&&h(s[0],t[0].coord)&&t.unshift({coord:s[0]});h(s[1],r.coord)&&(i?r.coord=s[1]:t.pop());i&&h(r.coord,s[1])&&t.push({coord:s[1]});function h(e,t){return e=Ut(e),t=Ut(t),d?e>t:e0&&e<100||(e=5);var t=this.scale.getMinorTicks(e);return n(t,(function(e){return n(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},e.prototype.getViewLabels=function(){return Gp(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},e.prototype.calculateCategoryInterval=function(){return function(e){var t=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),n=fp(e),i=(t.axisRotate-t.labelRotate)/180*Math.PI,o=e.scale,r=o.getExtent(),a=o.count();if(r[1]-r[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=r[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),c=Math.abs(u*Math.cos(i)),d=Math.abs(u*Math.sin(i)),h=0,p=0;l<=r[1];l+=s){var f,g,y=Le(n({value:l}),t.font,"center","top");f=1.3*y.width,g=1.3*y.height,h=Math.max(h,f,7),p=Math.max(p,g,7)}var m=h/c,v=p/d;isNaN(m)&&(m=1/0),isNaN(v)&&(v=1/0);var x=Math.max(0,Math.floor(Math.min(m,v))),_=Bp(e.model),b=e.getExtent(),S=_.lastAutoInterval,w=_.lastTickCount;return null!=S&&null!=w&&Math.abs(S-x)<=1&&Math.abs(w-a)<=1&&S>x&&_.axisExtent0===b[0]&&_.axisExtent1===b[1]?x=S:(_.lastTickCount=a,_.lastAutoInterval=x,_.axisExtent0=b[0],_.axisExtent1=b[1]),x}(this)},e}();function Kp(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}var Jp=qp;var $p=2*Math.PI,Qp=ke.CMD,ef=["top","right","bottom","left"];function tf(e,t,n,i,o){var r=n.width,a=n.height;switch(e){case"top":i.set(n.x+r/2,n.y-t),o.set(0,-1);break;case"bottom":i.set(n.x+r/2,n.y+a+t),o.set(0,1);break;case"left":i.set(n.x-t,n.y+a/2),o.set(-1,0);break;case"right":i.set(n.x+r+t,n.y+a/2),o.set(1,0)}}function nf(e,t,n,i,o,r,a,s,l){a-=e,s-=t;var u=Math.sqrt(a*a+s*s),c=(a/=u)*n+e,d=(s/=u)*n+t;if(Math.abs(i-o)%$p<1e-4)return l[0]=c,l[1]=d,u-n;if(r){var h=i;i=Ee(o),o=Ee(h)}else i=Ee(i),o=Ee(o);i>o&&(o+=$p);var p=Math.atan2(s,a);if(p<0&&(p+=$p),p>=i&&p<=o||p+$p>=i&&p+$p<=o)return l[0]=c,l[1]=d,u-n;var f=n*Math.cos(i)+e,g=n*Math.sin(i)+t,y=n*Math.cos(o)+e,m=n*Math.sin(o)+t,v=(f-a)*(f-a)+(g-s)*(g-s),x=(y-a)*(y-a)+(m-s)*(m-s);return v0){t=t/180*Math.PI,uf.fromArray(e[0]),cf.fromArray(e[1]),df.fromArray(e[2]),te.sub(hf,uf,cf),te.sub(pf,df,cf);var n=hf.len(),i=pf.len();if(!(n<.001||i<.001)){hf.scale(1/n),pf.scale(1/i);var o=hf.dot(pf);if(Math.cos(t)1&&te.copy(yf,df),yf.toArray(e[1])}}}}function vf(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,uf.fromArray(e[0]),cf.fromArray(e[1]),df.fromArray(e[2]),te.sub(hf,cf,uf),te.sub(pf,df,cf);var i=hf.len(),o=pf.len();if(!(i<.001||o<.001))if(hf.scale(1/i),pf.scale(1/o),hf.dot(t)=a)te.copy(yf,df);else{yf.scaleAndAdd(pf,r/Math.tan(Math.PI/2-s));var l=df.x!==cf.x?(yf.x-cf.x)/(df.x-cf.x):(yf.y-cf.y)/(df.y-cf.y);if(isNaN(l))return;l<0?te.copy(yf,cf):l>1&&te.copy(yf,df)}yf.toArray(e[1])}}}function xf(e,t,n,i){var o="normal"===n,r=o?e:e.ensureState(n);r.ignore=t;var a=i.get("smooth");a&&!0===a&&(a=.3),r.shape=r.shape||{},a>0&&(r.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();o?e.useStyle(s):r.style=s}function _f(e,t){var n=t.smooth,i=t.points;if(i)if(e.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var o=Pe(i[0],i[1]),r=Pe(i[1],i[2]);if(!o||!r)return e.lineTo(i[1][0],i[1][1]),void e.lineTo(i[2][0],i[2][1]);var a=Math.min(o,r)*n,s=Ne([],i[1],i[0],a/o),l=Ne([],i[1],i[2],a/r),u=Ne([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var c=1;c0&&r&&_(-c/a,0,a);var f,g,y=e[0],m=e[a-1];return v(),f<0&&b(-f,.8),g<0&&b(g,.8),v(),x(f,g,1),x(g,f,-1),v(),f<0&&S(-f),g<0&&S(g),u}function v(){f=y.rect[t]-i,g=o-m.rect[t]-m.rect[n]}function x(e,t,n){if(e<0){var i=Math.min(t,-e);if(i>0){_(i*n,0,a);var o=i+e;o<0&&b(-o*n,1)}else b(-e*n,1)}}function _(n,i,o){0!==n&&(u=!0);for(var r=i;r0)for(l=0;l0;l--){_(-(r[l-1]*d),l,a)}}}function S(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),i=0;i0?_(n,0,i+1):_(-n,a-i-1,a),(e-=n)<=0)return}}function If(e,t,n,i){return Mf(e,"y","height",t,n,i)}function Tf(e){var t=[];e.sort((function(e,t){return t.priority-e.priority}));var n=new Q(0,0,0,0);function i(e){if(!e.ignore){var t=e.ensureState("emphasis");null==t.ignore&&(t.ignore=!1)}e.ignore=!0}for(var o=0;o=0&&n.attr(f.oldLayoutSelect),c(u,"emphasis")>=0&&n.attr(f.oldLayoutEmphasis)),Ui(n,s,t,a)}else if(n.attr(s),!Bo(n).valueAnimation){var d=S(n.style.opacity,1);n.style.opacity=0,Yi(n,{style:{opacity:d}},t,a)}if(f.oldLayout=s,n.states.select){var h=f.oldLayoutSelect={};Nf(h,s,Of),Nf(h,n.states.select,Of)}if(n.states.emphasis){var p=f.oldLayoutEmphasis={};Nf(p,s,Of),Nf(p,n.states.emphasis,Of)}Fo(n,a,l,t,t)}if(i&&!i.ignore&&!i.invisible){o=(f=Pf(i)).oldLayout;var f,g={points:i.shape.points};o?(i.attr({shape:o}),Ui(i,{shape:g},t)):(i.setShape(g),i.style.strokePercent=0,Yi(i,{style:{strokePercent:1}},t)),f.oldLayout=g}},e}(),Ef=Rf,Vf=Tn();var zf=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e.hasSymbolVisual=!0,e}return e(n,t),n.prototype.getInitialData=function(e){return lh(null,this,{useEncodeDefaulter:!0})},n.prototype.getLegendIcon=function(e){var t=new X,n=oc("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var i=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),r="none"===i?"circle":i,a=.8*e.itemHeight,s=oc(r,(e.itemWidth-a)/2,(e.itemHeight-a)/2,a,a,e.itemStyle.fill);t.add(s),s.setStyle(e.itemStyle);var l="inherit"===e.iconRotate?o:e.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),r.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),t},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}(Ul);function Bf(e,t){var n=e.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var o=Rs(e,t,n[0]);return null!=o?o+"":null}if(i){for(var r=[],a=0;a=0&&i.push(t[r])}return i.join(" ")}var Ff=function(t){function n(e,n,i,o){var r=t.call(this)||this;return r.updateData(e,n,i,o),r}return e(n,t),n.prototype._createSymbol=function(e,t,n,i,o){this.removeAll();var r=oc(e,-1,-1,2,2,null,o);r.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),r.drift=Wf,this._symbolType=e,this.add(r)},n.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},n.prototype.getSymbolType=function(){return this._symbolType},n.prototype.getSymbolPath=function(){return this.childAt(0)},n.prototype.highlight=function(){vi(this.childAt(0))},n.prototype.downplay=function(){xi(this.childAt(0))},n.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},n.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?"move":n.cursor},n.prototype.updateData=function(e,t,i,o){this.silent=!1;var r=e.getItemVisual(t,"symbol")||"circle",a=e.hostModel,s=n.getSymbolSize(e,t),l=r!==this._symbolType,u=o&&o.disableAnimation;if(l){var c=e.getItemVisual(t,"symbolKeepAspect");this._createSymbol(r,e,t,s,c)}else{(h=this.childAt(0)).silent=!1;var d={scaleX:s[0]/2,scaleY:s[1]/2};u?h.attr(d):Ui(h,d,a,t),Ki(h)}if(this._updateCommon(e,t,s,i,o),l){var h=this.childAt(0);if(!u){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,Yi(h,d,a,t)}}u&&this.childAt(0).stopAnimation("leave")},n.prototype._updateCommon=function(e,t,n,i,o){var a,s,l,u,c,d,h,p,f,y=this.childAt(0),m=e.hostModel;if(i&&(a=i.emphasisItemStyle,s=i.blurItemStyle,l=i.selectItemStyle,u=i.focus,c=i.blurScope,h=i.labelStatesModels,p=i.hoverScale,f=i.cursorStyle,d=i.emphasisDisabled),!i||e.hasItemOption){var v=i&&i.itemModel?i.itemModel:e.getItemModel(t),x=v.getModel("emphasis");a=x.getModel("itemStyle").getItemStyle(),l=v.getModel(["select","itemStyle"]).getItemStyle(),s=v.getModel(["blur","itemStyle"]).getItemStyle(),u=x.get("focus"),c=x.get("blurScope"),d=x.get("disabled"),h=ko(v),p=x.getShallow("scale"),f=v.getShallow("cursor")}var _=e.getItemVisual(t,"symbolRotate");y.attr("rotation",(_||0)*Math.PI/180||0);var b=ac(e.getItemVisual(t,"symbolOffset"),n);b&&(y.x=b[0],y.y=b[1]),f&&y.attr("cursor",f);var S=e.getItemVisual(t,"style"),w=S.fill;if(y instanceof M){var I=y.style;y.useStyle(g({image:I.image,x:I.x,y:I.y,width:I.width,height:I.height},S))}else y.__isEmptyBrush?y.useStyle(g({},S)):y.useStyle(S),y.style.decal=null,y.setColor(w,o&&o.symbolInnerColor),y.style.strokeNoScale=!0;var T=e.getItemVisual(t,"liftZ"),D=this._z2;null!=T?null==D&&(this._z2=y.z2,y.z2+=T):null!=D&&(y.z2=D,this._z2=null);var C=o&&o.useNameLabel;Lo(y,h,{labelFetcher:m,labelDataIndex:t,defaultText:function(t){return C?e.getName(t):Bf(e,t)},inheritColor:w,defaultOpacity:S.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var A=y.ensureState("emphasis");if(A.style=a,y.ensureState("select").style=l,y.ensureState("blur").style=s,p){var L=Math.max(r(p)?p:1.1,3/this._sizeY);A.scaleX=this._sizeX*L,A.scaleY=this._sizeY*L}this.setSymbolScale(1),Pi(this,u,c,d)},n.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},n.prototype.fadeOut=function(e,t,n){var i=this.childAt(0),o=Xn(this).dataIndex,r=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var a=i.getTextContent();a&&Xi(a,{style:{opacity:0}},t,{dataIndex:o,removeOpt:r,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Xi(i,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:o,cb:e,removeOpt:r})},n.getSymbolSize=function(e,t){return rc(e.getItemVisual(t,"symbolSize"))},n}(X);function Wf(e,t){this.parent.drift(e,t)}var Hf=Ff;function Uf(e,t,n,i){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function Yf(e){return null==e||o(e)||(e={isIgnore:e}),e||{}}function Zf(e){var t=e.hostModel,n=t.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:ko(t),cursorStyle:t.get("cursor")}}var Xf=function(){function e(e){this.group=new X,this._SymbolCtor=e||Hf}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=Yf(t);var n=this.group,i=e.hostModel,o=this._data,r=this._SymbolCtor,a=t.disableAnimation,s=Zf(e),l={disableAnimation:a},u=t.getSymbolPoint||function(t){return e.getItemLayout(t)};o||n.removeAll(),e.diff(o).add((function(i){var o=u(i);if(Uf(e,o,i,t)){var a=new r(e,i,s,l);a.setPosition(o),e.setItemGraphicEl(i,a),n.add(a)}})).update((function(c,d){var h=o.getItemGraphicEl(d),p=u(c);if(Uf(e,p,c,t)){var f=e.getItemVisual(c,"symbol")||"circle",g=h&&h.getSymbolType&&h.getSymbolType();if(!h||g&&g!==f)n.remove(h),(h=new r(e,c,s,l)).setPosition(p);else{h.updateData(e,c,s,l);var y={x:p[0],y:p[1]};a?h.attr(y):Ui(h,y,i)}n.add(h),e.setItemGraphicEl(c,h)}else n.remove(h)})).remove((function(e){var t=o.getItemGraphicEl(e);t&&t.fadeOut((function(){n.remove(t)}),i)})).execute(),this._getSymbolPoint=u,this._data=e},e.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl((function(t,n){var i=e._getSymbolPoint(n);t.setPosition(i),t.markRedraw()}))},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Zf(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){function i(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=Yf(n);for(var o=e.start;o0?n=i[0]:i[1]<0&&(n=i[1]);return n}(a,i),l=o.dim,u=a.dim,c=t.mapDimension(u),d=t.mapDimension(l),h="x"===u||"radius"===u?1:0,p=n(e.dimensions,(function(e){return t.mapDimension(e)})),f=!1,g=t.getCalculationInfo("stackResultDimension");return ah(t,p[0])&&(f=!0,p[0]=g),ah(t,p[1])&&(f=!0,p[1]=g),{dataDimsForPoint:p,valueStart:s,valueAxisDim:u,baseAxisDim:l,stacked:!!f,valueDim:c,baseDim:d,baseDataOffset:h,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function Kf(e,t,n,i){var o=NaN;e.stacked&&(o=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(o)&&(o=e.valueStart);var r=e.baseDataOffset,a=[];return a[r]=n.get(e.baseDim,i),a[1-r]=o,t.dataToPoint(a)}var Jf=Math.min,$f=Math.max;function Qf(e,t){return isNaN(e)||isNaN(t)}function eg(e,t,n,i,o,r,a,s,l){for(var u,c,d,h,p,f,g=n,y=0;y=o||g<0)break;if(Qf(m,v)){if(l){g+=r;continue}break}if(g===n)e[r>0?"moveTo":"lineTo"](m,v),d=m,h=v;else{var x=m-u,_=v-c;if(x*x+_*_<.5){g+=r;continue}if(a>0){for(var b=g+r,S=t[2*b],w=t[2*b+1];S===m&&w===v&&y=i||Qf(S,w))p=m,f=v;else{T=S-u,D=w-c;var L=m-u,k=S-m,P=v-c,N=w-v,O=void 0,R=void 0;if("x"===s){var E=T>0?1:-1;p=m-E*(O=Math.abs(L))*a,f=v,C=m+E*(R=Math.abs(k))*a,A=v}else if("y"===s){var V=D>0?1:-1;p=m,f=v-V*(O=Math.abs(P))*a,C=m,A=v+V*(R=Math.abs(N))*a}else O=Math.sqrt(L*L+P*P),p=m-T*a*(1-(I=(R=Math.sqrt(k*k+N*N))/(R+O))),f=v-D*a*(1-I),A=v+D*a*I,C=Jf(C=m+T*a*I,$f(S,m)),A=Jf(A,$f(w,v)),C=$f(C,Jf(S,m)),f=v-(D=(A=$f(A,Jf(w,v)))-v)*O/R,p=Jf(p=m-(T=C-m)*O/R,$f(u,m)),f=Jf(f,$f(c,v)),C=m+(T=m-(p=$f(p,Jf(u,m))))*R/O,A=v+(D=v-(f=$f(f,Jf(c,v))))*R/O}e.bezierCurveTo(d,h,p,f,m,v),d=C,h=A}else e.lineTo(m,v)}u=m,c=v,g+=r}return y}var tg=function(){this.smooth=0,this.smoothConstraint=!0},ng=function(t){function n(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return e(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new tg},n.prototype.buildPath=function(e,t){var n=t.points,i=0,o=n.length/2;if(t.connectNulls){for(;o>0&&Qf(n[2*o-2],n[2*o-1]);o--);for(;i=0){var y=a?(c-i)*g+i:(u-n)*g+n;return a?[e,y]:[y,e]}n=u,i=c;break;case r.C:u=o[l++],c=o[l++],d=o[l++],h=o[l++],p=o[l++],f=o[l++];var m=a?Be(n,u,d,p,e,s):Be(i,c,h,f,e,s);if(m>0)for(var v=0;v=0){y=a?Ge(i,c,h,f,x):Ge(n,u,d,p,x);return a?[e,y]:[y,e]}}n=p,i=f}}},n}(x),ig=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n}(tg),og=function(t){function n(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return e(n,t),n.prototype.getDefaultShape=function(){return new ig},n.prototype.buildPath=function(e,t){var n=t.points,i=t.stackedOnPoints,o=0,r=n.length/2,a=t.smoothMonotone;if(t.connectNulls){for(;r>0&&Qf(n[2*r-2],n[2*r-1]);r--);for(;o=0;s--){var l=e.getDimensionInfo(o[s].dimension);if("x"===(r=l&&l.coordDim)||"y"===r){a=o[s];break}}if(a){var c=t.getAxis(r),d=n(a.stops,(function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}})),h=d.length,p=a.outerColors.slice();h&&d[0].coord>d[h-1].coord&&(d.reverse(),p.reverse());var f=function(e,t){var n,i,o=[],r=e.length;function a(e,t,n){var i=e.coord,o=(n-i)/(t.coord-i);return{coord:n,color:Fe(o,[e.color,t.color])}}for(var s=0;st){i?o.push(a(i,l,t)):n&&o.push(a(n,l,0),a(n,l,t));break}n&&(o.push(a(n,l,0)),n=null),o.push(l),i=l}}return o}(d,"x"===r?i.getWidth():i.getHeight()),g=f.length;if(!g&&h)return d[0].coord<0?p[1]?p[1]:d[h-1].color:p[0]?p[0]:d[0].color;var y=f[0].coord-10,m=f[g-1].coord+10,v=m-y;if(v<.001)return"transparent";u(f,(function(e){e.offset=(e.coord-y)/v})),f.push({offset:g?f[g-1].offset:.5,color:p[1]||"transparent"}),f.unshift({offset:g?f[0].offset:.5,color:p[0]||"transparent"});var x=new J(0,0,0,0,f,!0);return x[r]=y,x[r+"2"]=m,x}}}function gg(e,t,n){var i=e.get("showAllSymbol"),o="auto"===i;if(!i||o){var r=n.getAxesByScale("ordinal")[0];if(r&&(!o||!function(e,t){var n=e.getExtent(),i=Math.abs(n[1]-n[0])/e.scale.count();isNaN(i)&&(i=0);for(var o=t.count(),r=Math.max(1,Math.round(o/5)),a=0;ai)return!1;return!0}(r,t))){var a=t.mapDimension(r.dim),s={};return u(r.getViewLabels(),(function(e){var t=r.scale.getRawOrdinalNumber(e.tickValue);s[t]=1})),function(e){return!s.hasOwnProperty(t.get(a,e))}}}}function yg(e,t){return[e[2*t],e[2*t+1]]}function mg(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t0&&"bolder"===e.get(["emphasis","lineStyle","width"]))&&(p.getState("emphasis").style.lineWidth=+p.style.lineWidth+1);Xn(p).seriesIndex=e.seriesIndex,Pi(p,k,P,N);var O=hg(e.get("smooth")),R=e.get("smoothMonotone");if(p.setShape({smooth:O,smoothMonotone:R,connectNulls:S}),f){var E=a.getCalculationInfo("stackedOnSeries"),V=0;f.useStyle(C(l.getAreaStyle(),{fill:D,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),E&&(V=hg(E.get("smooth"))),f.setShape({smooth:O,stackedOnSmooth:V,smoothMonotone:R,connectNulls:S}),Ei(f,e,"areaStyle"),Xn(f).seriesIndex=e.seriesIndex,Pi(f,k,P,N)}var z=function(e){i._changePolyState(e)};a.eachItemGraphicEl((function(e){e&&(e.onHoverStateChange=z)})),this._polyline.onHoverStateChange=z,this._data=a,this._coordSys=o,this._stackedOnPoints=_,this._points=u,this._step=T,this._valueOrigin=v,e.get("triggerLineEvent")&&(this.packEventData(e,p),f&&this.packEventData(e,f))},n.prototype.packEventData=function(e,t){Xn(t).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},n.prototype.highlight=function(e,t,n,i){var o=e.getData(),r=In(o,i);if(this._changePolyState("emphasis"),!(r instanceof Array)&&null!=r&&r>=0){var a=o.getLayout("points"),s=o.getItemGraphicEl(r);if(!s){var l=a[2*r],u=a[2*r+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=e.get("zlevel"),d=e.get("z");(s=new Hf(o,r)).x=l,s.y=u,s.setZ(c,d);var h=s.getSymbolPath().getTextContent();h&&(h.zlevel=c,h.z=d,h.z2=this._polyline.z2+1),s.__temp=!0,o.setItemGraphicEl(r,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else nu.prototype.highlight.call(this,e,t,n,i)},n.prototype.downplay=function(e,t,n,i){var o=e.getData(),r=In(o,i);if(this._changePolyState("normal"),null!=r&&r>=0){var a=o.getItemGraphicEl(r);a&&(a.__temp?(o.setItemGraphicEl(r,null),this.group.remove(a)):a.downplay())}else nu.prototype.downplay.call(this,e,t,n,i)},n.prototype._changePolyState=function(e){var t=this._polygon;pi(this._polyline,e),t&&pi(t,e)},n.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new ng({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},n.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new og({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},n.prototype._initSymbolLabelAnimation=function(e,t,n){var i,o,r=t.getBaseAxis(),a=r.inverse;"cartesian2d"===t.type?(i=r.isHorizontal(),o=!1):"polar"===t.type&&(i="angle"===r.dim,o=!0);var s=e.hostModel,l=s.get("animationDuration");p(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=p(u)?u(null):u;e.eachItemGraphicEl((function(e,r){var s=e;if(s){var d=[e.x,e.y],h=void 0,f=void 0,g=void 0;if(n)if(o){var y=n,m=t.pointToCoord(d);i?(h=y.startAngle,f=y.endAngle,g=-m[1]/180*Math.PI):(h=y.r0,f=y.r,g=m[0])}else{var v=n;i?(h=v.x,f=v.x+v.width,g=e.x):(h=v.y+v.height,f=v.y,g=e.y)}var x=f===h?0:(g-h)/(f-h);a&&(x=1-x);var _=p(u)?u(r):l*x+c,b=s.getSymbolPath(),S=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:_}),S&&S.animateFrom({style:{opacity:0}},{duration:300,delay:_}),b.disableLabelAnimation=!0}}))},n.prototype._initOrUpdateEndLabel=function(e,t,n){var i=e.getModel("endLabel");if(mg(e)){var o=e.getData(),r=this._polyline,a=o.getLayout("points");if(!a)return r.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new j({z2:200})).ignoreClip=!0,r.setTextContent(this._endLabel),r.disableLabelAnimation=!0);var l=function(e){for(var t,n,i=e.length/2;i>0&&(t=e[2*i-2],n=e[2*i-1],isNaN(t)||isNaN(n));i--);return i-1}(a);l>=0&&(Lo(r,ko(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:l,defaultText:function(e,t,n){return null!=n?Gf(o,n):Bf(o,e)},enableTextSetter:!0},function(e,t){var n=t.getBaseAxis(),i=n.isHorizontal(),o=n.inverse,r=i?o?"right":"left":"center",a=i?"middle":o?"top":"bottom";return{normal:{align:e.get("align")||r,verticalAlign:e.get("verticalAlign")||a}}}(i,t)),r.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},n.prototype._endLabelOnDuring=function(e,t,n,i,o,r,a){var s=this._endLabel,l=this._polyline;if(s){e<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,d=c.get("connectNulls"),h=r.get("precision"),p=r.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),y=f.inverse,m=t.shape,v=y?g?m.x:m.y+m.height:g?m.x+m.width:m.y,x=(g?p:0)*(y?-1:1),_=(g?0:-p)*(y?-1:1),b=g?"x":"y",S=function(e,t,n){for(var i,o,r=e.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=t||i>=t&&o<=t){l=u;break}s=u,i=o}else i=o;return{range:[s,l],t:(t-i)/(o-i)}}(u,v,b),w=S.range,M=w[1]-w[0],I=void 0;if(M>=1){if(M>1&&!d){var T=yg(u,w[0]);s.attr({x:T[0]+x,y:T[1]+_}),o&&(I=c.getRawValue(w[0]))}else{(T=l.getPointOn(v,b))&&s.attr({x:T[0]+x,y:T[1]+_});var D=c.getRawValue(w[0]),C=c.getRawValue(w[1]);o&&(I=Rn(n,h,D,C,S.t))}i.lastFrameIndex=w[0]}else{var A=1===e||i.lastFrameIndex>0?w[0]:0;T=yg(u,A);o&&(I=c.getRawValue(A)),s.attr({x:T[0]+x,y:T[1]+_})}o&&Bo(s).setLabelText(I)}},n.prototype._doUpdateAnimation=function(e,t,n,i,o,r,a){var s=this._polyline,l=this._polygon,u=e.hostModel,c=function(e,t,n,i,o,r,a,s){for(var l=function(e,t){var n=[];return t.diff(e).add((function(e){n.push({cmd:"+",idx:e})})).update((function(e,t){n.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){n.push({cmd:"-",idx:e})})).execute(),n}(e,t),u=[],c=[],d=[],h=[],p=[],f=[],g=[],y=qf(o,t,a),m=e.getLayout("points")||[],v=t.getLayout("points")||[],x=0;x3e3||l&&dg(h,f)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f})));s.shape.__points=c.current,s.shape.points=d;var g={shape:{points:p}};c.current!==d&&(g.shape.__points=c.next),s.stopAnimation(),Ui(s,g,u),l&&(l.setShape({points:d,stackedOnPoints:h}),l.stopAnimation(),Ui(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var y=[],m=c.status,v=0;vt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&"cartesian2d"===a.type&&r){var l=a.getBaseAxis(),u=a.getOtherAxis(l),c=l.getExtent(),d=n.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(d||1),f=Math.round(s/h);if(isFinite(f)&&f>1){"lttb"===r&&e.setData(o.lttbDownSample(o.mapDimension(u.dim),1/f));var g=void 0;i(r)?g=Sg[r]:p(r)&&(g=r),g&&e.setData(o.downSample(o.mapDimension(u.dim),1/f,g,wg))}}}}}var Ig=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.getInitialData=function(e,t){return lh(null,this,{useEncodeDefaulter:!0})},n.prototype.getMarkerPosition=function(e){var t=this.coordinateSystem;if(t&&t.clampData){var n=t.dataToPoint(t.clampData(e)),i=this.getData(),o=i.getLayout("offset"),r=i.getLayout("size");return n[t.getBaseAxis().isHorizontal()?0:1]+=o+r/2,n}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}(Ul);Ul.registerClass(Ig);var Tg=Ig,Dg=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.getInitialData=function(){return lh(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 e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},n.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},n.type="series.bar",n.dependencies=["grid","polar"],n.defaultOption=rr(Tg.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}(Tg),Cg=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Ag=function(t){function n(e){var n=t.call(this,e)||this;return n.type="sausage",n}return e(n,t),n.prototype.getDefaultShape=function(){return new Cg},n.prototype.buildPath=function(e,t){var n=t.cx,i=t.cy,o=Math.max(t.r0||0,0),r=Math.max(t.r,0),a=.5*(r-o),s=o+a,l=t.startAngle,u=t.endAngle,c=t.clockwise,d=2*Math.PI,h=c?u-lr)return!0;r=u}return!1},i.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,i=n.getExtent(),o=Math.max(0,i[0]),r=Math.min(i[1],n.getOrdinalMeta().categories.length-1);o<=r;++o)if(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},i.prototype._updateSortWithinSameData=function(e,t,n,i){if(this._isOrderChangedWithinSameData(e,t,n)){var o=this._dataSort(e,n,t);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},i.prototype._dispatchInitSort=function(e,t,n){var i=t.baseAxis,o=this._dataSort(e,i,(function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},i.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},i.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},i.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},i.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(t){qi(t,e,Xn(t).dataIndex)}))):t.removeAll(),this._data=null,this._isFirstFrame=!0},i.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},i.type="bar",i}(nu),Eg={cartesian2d:function(e,t){var n=t.width<0?-1:1,i=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height);var o=e.x+e.width,r=e.y+e.height,a=Ng(t.x,e.x),s=Og(t.x+t.width,o),l=Ng(t.y,e.y),u=Og(t.y+t.height,r),c=so?s:a,t.y=d&&l>r?u:l,t.width=c?0:s-a,t.height=d?0:u-l,n<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height),c||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var i=t.r;t.r=t.r0,t.r0=i}var o=Og(t.r,e.r),r=Ng(t.r0,e.r0);t.r=o,t.r0=r;var a=o-r<0;if(n<0){i=t.r;t.r=t.r0,t.r0=i}return a}},Vg={cartesian2d:function(e,t,n,i,o,r,a,s,l){var u=new E({shape:g({},i),z2:1});(u.__dataIndex=n,u.name="item",r)&&(u.shape[o?"height":"width"]=0);return u},polar:function(e,t,n,i,o,r,a,s,l){var u=!o&&l?Lg:P,c=new u({shape:i,z2:1});c.name="item";var d,h,p=Ug(o);if(c.calculateTextPosition=(d=p,h=({isRoundCap:u===Lg}||{}).isRoundCap,function(e,t,n){var i=t.position;if(!i||i instanceof Array)return fe(e,t,n);var o=d(i),r=null!=t.distance?t.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,c=a.r0,p=(u+c)/2,f=a.startAngle,g=a.endAngle,y=(f+g)/2,m=h?Math.abs(u-c)/2:0,v=Math.cos,x=Math.sin,_=s+u*v(f),b=l+u*x(f),S="left",w="top";switch(o){case"startArc":_=s+(c-r)*v(y),b=l+(c-r)*x(y),S="center",w="top";break;case"insideStartArc":_=s+(c+r)*v(y),b=l+(c+r)*x(y),S="center",w="bottom";break;case"startAngle":_=s+p*v(f)+kg(f,r+m,!1),b=l+p*x(f)+Pg(f,r+m,!1),S="right",w="middle";break;case"insideStartAngle":_=s+p*v(f)+kg(f,-r+m,!1),b=l+p*x(f)+Pg(f,-r+m,!1),S="left",w="middle";break;case"middle":_=s+p*v(y),b=l+p*x(y),S="center",w="middle";break;case"endArc":_=s+(u+r)*v(y),b=l+(u+r)*x(y),S="center",w="bottom";break;case"insideEndArc":_=s+(u-r)*v(y),b=l+(u-r)*x(y),S="center",w="top";break;case"endAngle":_=s+p*v(g)+kg(g,r+m,!0),b=l+p*x(g)+Pg(g,r+m,!0),S="left",w="middle";break;case"insideEndAngle":_=s+p*v(g)+kg(g,-r+m,!0),b=l+p*x(g)+Pg(g,-r+m,!0),S="right",w="middle";break;default:return fe(e,t,n)}return(e=e||{}).x=_,e.y=b,e.align=S,e.verticalAlign=w,e}),r){var f=o?"r":"endAngle",g={};c.shape[f]=o?0:i.startAngle,g[f]=i[f],(s?Ui:Yi)(c,{shape:g},r)}return c}};function zg(e,t,n,i,o,r,a,s){var l,u;r?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(a?Ui:Yi)(n,{shape:l},t,o,null),(a?Ui:Yi)(n,{shape:u},t?e.baseAxis.model:null,o)}function Bg(e,t){for(var n=0;n0?1:-1,a=i.height>0?1:-1;return{x:i.x+r*o/2,y:i.y+a*o/2,width:i.width-r*o,height:i.height-a*o}},polar:function(e,t,n){var i=e.getItemLayout(t);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function Ug(e){return function(e){var t=e?"Arc":"Angle";return function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}(e)}function Yg(e,t,n,i,o,a,l,c){var d=t.getItemVisual(n,"style");c||e.setShape("r",i.get(["itemStyle","borderRadius"])||0),e.useStyle(d);var h=i.getShallow("cursor");h&&e.attr("cursor",h);var p=c?l?o.r>=o.r0?"endArc":"startArc":o.endAngle>=o.startAngle?"endAngle":"startAngle":l?o.height>=0?"bottom":"top":o.width>=0?"right":"left",f=ko(i);Lo(e,f,{labelFetcher:a,labelDataIndex:n,defaultText:Bf(a.getData(),n),inheritColor:d.fill,defaultOpacity:d.opacity,defaultOutsidePosition:p});var g=e.getTextContent();if(c&&g){var y=i.get(["label","position"]);e.textConfig.inside="middle"===y||null,function(e,t,n,i){if(r(i))e.setTextConfig({rotation:i});else if(s(t))e.setTextConfig({rotation:0});else{var o,a=e.shape,l=a.clockwise?a.startAngle:a.endAngle,u=a.clockwise?a.endAngle:a.startAngle,c=(l+u)/2,d=n(t);switch(d){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":o=c;break;case"startAngle":case"insideStartAngle":o=l;break;case"endAngle":case"insideEndAngle":o=u;break;default:return void e.setTextConfig({rotation:0})}var h=1.5*Math.PI-o;"middle"===d&&h>Math.PI/2&&h<1.5*Math.PI&&(h-=Math.PI),e.setTextConfig({rotation:h})}}(e,"outside"===y?p:y,Ug(l),i.get(["label","rotate"]))}Go(g,f,a.getRawValue(n),(function(e){return Gf(t,e)}));var m=i.getModel(["emphasis"]);Pi(e,m.get("focus"),m.get("blurScope"),m.get("disabled")),Ei(e,i),function(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}(o)&&(e.style.fill="none",e.style.stroke="none",u(e.states,(function(e){e.style&&(e.style.fill=e.style.stroke="none")})))}var Zg=function(){},Xg=function(t){function n(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return e(n,t),n.prototype.getDefaultShape=function(){return new Zg},n.prototype.buildPath=function(e,t){for(var n=t.points,i=this.baseDimIdx,o=1-this.baseDimIdx,r=[],a=[],s=this.barWidth,l=0;l=s[0]&&t<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return-1}(this,e.offsetX,e.offsetY);Xn(this).dataIndex=t>=0?t:null}),30,!1);function Kg(e,t,n){if(lg(n,"cartesian2d")){var i=t,o=n.getArea();return{x:e?i.x:o.x,y:e?o.y:i.y,width:e?i.width:o.width,height:e?o.height:i.height}}var r=t;return{cx:(o=n.getArea()).cx,cy:o.cy,r0:e?o.r0:r.r0,r:e?o.r:r.r,startAngle:e?r.startAngle:0,endAngle:e?r.endAngle:2*Math.PI}}var Jg=Rg;var $g=2*Math.PI,Qg=Math.PI/180;function ey(e,t){return Qr(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function ty(e,t){var n=ey(e,t),i=e.get("center"),o=e.get("radius");s(o)||(o=[0,o]),s(i)||(i=[i,i]);var r=Ht(n.width,t.getWidth()),a=Ht(n.height,t.getHeight()),l=Math.min(r,a);return{cx:Ht(i[0],r)+n.x,cy:Ht(i[1],a)+n.y,r0:Ht(o[0],l/2),r:Ht(o[1],l/2)}}function ny(e,t,n){t.eachSeriesByType(e,(function(e){var t=e.getData(),i=t.mapDimension("value"),o=ey(e,n),r=ty(e,n),a=r.cx,s=r.cy,l=r.r,u=r.r0,c=-e.get("startAngle")*Qg,d=e.get("minAngle")*Qg,h=0;t.each(i,(function(e){!isNaN(e)&&h++}));var p=t.getSum(i),f=Math.PI/(p||h)*2,g=e.get("clockwise"),y=e.get("roseType"),m=e.get("stillShowZeroSum"),v=t.getDataExtent(i);v[0]=0;var x=$g,_=0,b=c,S=g?1:-1;if(t.setLayout({viewRect:o,r:l}),t.each(i,(function(e,n){var i;if(isNaN(e))t.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:g,cx:a,cy:s,r0:u,r:y?NaN:l});else{(i="area"!==y?0===p&&m?f:e*f:$g/h)n?a:r,c=Math.abs(l.label.y-n);if(c>=u.maxY){var d=l.label.x-t-l.len2*o,h=i+l.len,f=Math.abs(d)e.unconstrainedWidth?null:p:null;i.setStyle("width",f)}var g=i.getBoundingRect();r.width=g.width;var y=(i.style.margin||0)+2.1;r.height=g.height+y,r.y-=(r.height-d)/2}}}function sy(e){return"center"===e.position}function ly(e){var t,n,i=e.getData(),o=[],a=!1,s=(e.get("minShowLabelAngle")||0)*oy,l=i.getLayout("viewRect"),c=i.getLayout("r"),d=l.width,h=l.x,p=l.y,f=l.height;function g(e){e.ignore=!0}i.each((function(e){var l=i.getItemGraphicEl(e),p=l.shape,f=l.getTextContent(),y=l.getTextGuideLine(),m=i.getItemModel(e),v=m.getModel("label"),x=v.get("position")||m.get(["emphasis","label","position"]),_=v.get("distanceToLabelLine"),b=v.get("alignTo"),S=Ht(v.get("edgeDistance"),d),w=v.get("bleedMargin"),M=m.getModel("labelLine"),I=M.get("length");I=Ht(I,d);var T=M.get("length2");if(T=Ht(T,d),Math.abs(p.endAngle-p.startAngle)0?"right":"left":P>0?"left":"right"}var G=Math.PI,F=0,W=v.get("rotate");if(r(W))F=W*(G/180);else if("center"===x)F=0;else if("radial"===W||!0===W){F=P<0?-k+G:-k}else if("tangential"===W&&"outside"!==x&&"outer"!==x){var H=Math.atan2(P,N);H<0&&(H=2*G+H),N>0&&(H=G+H),F=H-G}if(a=!!F,f.x=D,f.y=C,f.rotation=F,f.setStyle({verticalAlign:"middle"}),O){f.setStyle({align:L});var U=f.states.select;U&&(U.x+=f.x,U.y+=f.y)}else{var Y=f.getBoundingRect().clone();Y.applyTransform(f.getComputedTransform());var Z=(f.style.margin||0)+2.1;Y.y-=Z/2,Y.height+=Z,o.push({label:f,labelLine:y,position:x,len:I,len2:T,minTurnAngle:M.get("minTurnAngle"),maxSurfaceAngle:M.get("maxSurfaceAngle"),surfaceNormal:new te(P,N),linePoints:A,textAlign:L,labelDistance:_,labelAlignTo:b,edgeDistance:S,bleedMargin:w,rect:Y,unconstrainedWidth:Y.width,labelStyleWidth:f.style.width})}l.setTextConfig({inside:O})}})),!a&&e.get("avoidLabelOverlap")&&function(e,t,n,i,o,r,a,s){for(var l=[],u=[],c=Number.MAX_VALUE,d=-Number.MAX_VALUE,h=0;h0){for(var l=r.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},n.type="pie",n}(nu);function hy(e,t,n){t=s(t)&&{coordDimensions:t}||g({encodeDefine:e.getEncode()},t);var i=e.getSource(),o=eh(i,t).dimensions,r=new Qd(o,e);return r.initData(i,n),r}var py=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),fy=py,gy=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new fy(ce(this.getData,this),ce(this.getRawData,this)),this._defaultLabelLine(e)},n.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},n.prototype.getInitialData=function(){return hy(this,{coordDimensions:["value"],encodeDefaulter:se(ma,this)})},n.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),o=[];return n.each(n.mapDimension("value"),(function(e){o.push(e)})),i.percent=qt(o,e,n.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},n.prototype._defaultLabelLine=function(e){gn(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.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}(Ul);var yy=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e.hasSymbolVisual=!0,e}return e(n,t),n.prototype.getInitialData=function(e,t){return lh(null,this,{useEncodeDefaulter:!0})},n.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},n.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},n.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},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}(Ul),my=function(){},vy=function(t){function n(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return e(n,t),n.prototype.getDefaultShape=function(){return new my},n.prototype.reset=function(){this.notClear=!1,this._off=0},n.prototype.buildPath=function(e,t){var n,i=t.points,o=t.size,r=this.symbolProxy,a=r.shape,s=e.getContext?e.getContext():e,l=s&&o[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n=0;s--){var l=2*s,u=i[l]-r/2,c=i[l+1]-a/2;if(e>=u&&t>=c&&e<=u+r&&t<=c+a)return s}return-1},n.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),i=this.getBoundingRect();return e=n[0],t=n[1],i.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},n.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,i=t.size,o=i[0],r=i[1],a=1/0,s=1/0,l=-1/0,u=-1/0,c=0;c=0&&(l.dataIndex=n+(e.startIndex||0))}))},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),_y=xy,by=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.render=function(e,t,n){var i=e.getData();this._updateSymbolDraw(i,e).updateData(i,{clipShape:this._getClipShape(e)}),this._finished=!0},n.prototype.incrementalPrepareRender=function(e,t,n){var i=e.getData();this._updateSymbolDraw(i,e).incrementalPrepareUpdate(i),this._finished=!1},n.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},n.prototype.updateTransform=function(e,t,n){var i=e.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=bg("").reset(e,t,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},n.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},n.prototype._getClipShape=function(e){var t=e.coordinateSystem,n=t&&t.getArea&&t.getArea();return e.get("clip",!0)?n:null},n.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,i=t.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new _y:new jf,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},n.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},n.prototype.dispose=function(){},n.type="scatter",n}(nu),Sy=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}(sa),wy=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Ln).models[0]},n.type="cartesian2dAxis",n}(sa);re(wy,_p);var My={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)"]}}},Iy=ie({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},My),Ty=ie({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}}},My),Dy={category:Iy,value:Ty,time:ie({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Ty),log:C({logBase:10},Ty)},Cy={value:1,category:1,time:1,log:1};function Ay(t,n,i,o){u(Cy,(function(r,a){var s=ie(ie({},Dy[a],!0),o,!0),l=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n+"Axis."+a,e}return e(i,t),i.prototype.mergeDefaultAndTheme=function(e,t){var n=ta(this),i=n?ia(e):{},o=t.getTheme();ie(e,o.get(a+"Axis")),ie(e,this.getDefaultOption()),e.type=Ly(e),n&&na(e,i,n)},i.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=fh.createByAxisModel(this))},i.prototype.getCategories=function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},i.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},i.type=n+"Axis."+a,i.defaultOption=s,i}(i);t.registerComponentModel(l)})),t.registerSubTypeDefaulter(n+"Axis",Ly)}function Ly(e){return e.type||(e.data?"category":"value")}var ky=function(){function e(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return n(this._dimList,(function(e){return this._axes[e]}),this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),ue(this.getAxes(),(function(t){return t.scale.type===e}))},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),Py=["x","y"];function Ny(e){return"interval"===e.type||"time"===e.type}var Oy=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=Py,e}return e(n,t),n.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(Ny(e)&&Ny(t)){var n=e.getExtent(),i=t.getExtent(),o=this.dataToPoint([n[0],i[0]]),r=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(r[0]-o[0])/a,u=(r[1]-o[1])/s,c=o[0]-n[0]*l,d=o[1]-i[0]*u,h=this._transform=[l,0,0,u,c,d];this._invTransform=Y([],h)}}},n.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},n.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},n.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},n.prototype.containZone=function(e,t){var n=this.dataToPoint(e),i=this.dataToPoint(t),o=this.getArea(),r=new Q(n[0],n[1],i[0]-n[0],i[1]-n[1]);return o.intersect(r)},n.prototype.dataToPoint=function(e,t,n){n=n||[];var i=e[0],o=e[1];if(this._transform&&null!=i&&isFinite(i)&&null!=o&&isFinite(o))return G(n,e,this._transform);var r=this.getAxis("x"),a=this.getAxis("y");return n[0]=r.toGlobalCoord(r.dataToCoord(i,t)),n[1]=a.toGlobalCoord(a.dataToCoord(o,t)),n},n.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),r=i.getExtent(),a=n.parse(e[0]),s=i.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(o[0],o[1]),a),Math.max(o[0],o[1])),t[1]=Math.min(Math.max(Math.min(r[0],r[1]),s),Math.max(r[0],r[1])),t},n.prototype.pointToData=function(e,t){var n=[];if(this._invTransform)return G(n,e,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(e[0]),t),n[1]=o.coordToData(o.toLocalCoord(e[1]),t),n},n.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},n.prototype.getArea=function(){var e=this.getAxis("x").getGlobalExtent(),t=this.getAxis("y").getGlobalExtent(),n=Math.min(e[0],e[1]),i=Math.min(t[0],t[1]),o=Math.max(e[0],e[1])-n,r=Math.max(t[0],t[1])-i;return new Q(n,i,o,r)},n}(ky),Ry=Oy,Ey=function(t){function n(e,n,i,o,r){var a=t.call(this,e,n,i)||this;return a.index=0,a.type=o||"value",a.position=r||"bottom",a}return e(n,t),n.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},n.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},n.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},n.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},n}(Jp),Vy=Ey;function zy(e,t,n){n=n||{};var i=e.coordinateSystem,o=t.axis,r={},a=o.getAxesOnZeroOf()[0],s=o.position,l=a?"onZero":s,u=o.dim,c=i.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},p=t.get("offset")||0,f="x"===u?[d[2]-p,d[3]+p]:[d[0]-p,d[1]+p];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[h.onZero]=Math.max(Math.min(g,f[1]),f[0])}r.position=["y"===u?f[h[l]]:d[0],"x"===u?f[h[l]]:d[3]],r.rotation=Math.PI/2*("x"===u?0:1);r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],r.labelOffset=a?f[h[s]]-f[h.onZero]:0,t.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),He(n.labelInside,t.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);var y=t.get(["axisLabel","rotate"]);return r.labelRotate="top"===l?-y:y,r.z2=1,r}function By(e){return"cartesian2d"===e.get("coordinateSystem")}function Gy(e){var t={xAxisModel:null,yAxisModel:null};return u(t,(function(n,i){var o=i.replace(/Model$/,""),r=e.getReferringComponents(o,Ln).models[0];t[i]=r})),t}var Fy=Math.log;function Wy(e,t,n){var i=Dh.prototype,o=i.getTicks.call(n),r=i.getTicks.call(n,!0),a=o.length-1,s=i.getInterval.call(n),l=dp(e,t),u=l.extent,c=l.fixMin,d=l.fixMax;if("log"===e.type){var h=Fy(e.base);u=[Fy(u[0])/h,Fy(u[1])/h]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:d});var p=i.getExtent.call(e);c&&(u[0]=p[0]),d&&(u[1]=p[1]);var f=i.getInterval.call(e),g=u[0],y=u[1];if(c&&d)f=(y-g)/a;else if(c)for(y=u[0]+f*a;yu[0]&&isFinite(g)&&isFinite(u[0]);)f=mh(f),g=u[1]-f*a;else{e.getTicks().length-1>a&&(f=mh(f));var m=f*a;(g=Ut((y=Math.ceil(u[1]/f)*f)-m))<0&&u[0]>=0?(g=0,y=Ut(m)):y>0&&u[1]<=0&&(y=0,g=-Ut(m))}var v=(o[0].value-r[0].value)/s,x=(o[a].value-r[a].value)/s;i.setExtent.call(e,g+f*v,y+f*x),i.setInterval.call(e,f),(v||x)&&i.setNiceExtent.call(e,g+f,y-f)}var Hy=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Py,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;function i(e){var t,n=v(e),i=n.length;if(i){for(var o=[],r=i-1;r>=0;r--){var a=e[+n[r]],s=a.model,l=a.scale;gh(l)&&s.get("alignTicks")&&null==s.get("interval")?o.push(a):(hp(l,s),gh(l)&&(t=a))}o.length&&(t||hp((t=o.pop()).scale,t.model),u(o,(function(e){Wy(e.scale,e.model,t.scale)})))}}this._updateScale(e,this.model),i(n.x),i(n.y);var o={};u(n.x,(function(e){Yy(n,"y",e,o)})),u(n.y,(function(e){Yy(n,"x",e,o)})),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var i=e.getBoxLayoutParams(),o=!n&&e.get("containLabel"),r=Qr(i,{width:t.getWidth(),height:t.getHeight()});this._rect=r;var a=this._axesList;function s(){u(a,(function(e){var t=e.isHorizontal(),n=t?[0,r.width]:[0,r.height],i=e.inverse?1:0;e.setExtent(n[i],n[1-i]),function(e,t){var n=e.getExtent(),i=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return i-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return i-e+t}}(e,t?r.x:r.y)}))}s(),o&&(u(a,(function(e){if(!e.model.get(["axisLabel","inside"])){var t=function(e){var t=e.model,n=e.scale;if(t.get(["axisLabel","show"])&&!n.isBlank()){var i,o,r=n.getExtent();o=n instanceof Mh?n.count():(i=n.getTicks()).length;var a,s=e.getLabelModel(),l=fp(e),u=1;o>40&&(u=Math.ceil(o/40));for(var c=0;c0&&i>0||n<0&&i<0)}(e)}var Xy=Hy,jy=Math.PI,qy=function(){function e(e,t){this.group=new X,this.opt=t,this.axisModel=e,C(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new X({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!Ky[e]},e.prototype.add=function(e){Ky[e](this.opt,this.axisModel,this.group,this._transformGroup)},e.prototype.getGroup=function(){return this.group},e.innerTextLayout=function(e,t,n){var i,o,r=Jt(t-e);return $t(r)?(o=n>0?"top":"bottom",i="center"):$t(r-jy)?(o=n>0?"bottom":"top",i="center"):(o="middle",i=r>0&&r0?"right":"left":n>0?"left":"right"),{rotation:r,textAlign:i,textVerticalAlign:o}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},e}(),Ky={axisLine:function(e,t,n,o){var a=t.get(["axisLine","show"]);if("auto"===a&&e.handleAutoShown&&(a=e.handleAutoShown("axisLine")),a){var s=t.axis.getExtent(),l=o.transform,c=[s[0],0],d=[s[1],0];l&&(G(c,c,l),G(d,d,l));var h=g({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),p=new V({subPixelOptimize:!0,shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:h,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});p.anid="line",n.add(p);var f=t.get(["axisLine","symbol"]);if(null!=f){var y=t.get(["axisLine","symbolSize"]);i(f)&&(f=[f,f]),(i(y)||r(y))&&(y=[y,y]);var m=ac(t.get(["axisLine","symbolOffset"])||0,y),v=y[0],x=y[1];u([{rotate:e.rotation+Math.PI/2,offset:m[0],r:0},{rotate:e.rotation-Math.PI/2,offset:m[1],r:Math.sqrt((c[0]-d[0])*(c[0]-d[0])+(c[1]-d[1])*(c[1]-d[1]))}],(function(t,i){if("none"!==f[i]&&null!=f[i]){var o=oc(f[i],-v/2,-x/2,v,x,h.stroke,!0),r=t.r+t.offset;o.attr({rotation:t.rotate,x:c[0]+r*Math.cos(e.rotation),y:c[1]-r*Math.sin(e.rotation),silent:!0,z2:11}),n.add(o)}}))}}},axisTickLabel:function(e,t,i,r){var a=function(e,t,n,i){var o=n.axis,r=n.getModel("axisTick"),a=r.get("show");"auto"===a&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick"));if(!a||o.scale.isBlank())return;for(var s=r.getModel("lineStyle"),l=i.tickDirection*r.get("length"),u=em(o.getTicksCoords(),t.transform,l,C(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;cd[1]?-1:1,p=["start"===s?d[0]-h*c:"end"===s?d[1]+h*c:(d[0]+d[1])/2,Qy(s)?e.labelOffset+l*c:0],f=t.get("nameRotate");null!=f&&(f=f*jy/180),Qy(s)?r=qy.innerTextLayout(e.rotation,null!=f?f:e.rotation,l):(r=function(e,t,n,i){var o,r,a=Jt(n-e),s=i[0]>i[1],l="start"===t&&!s||"start"!==t&&s;$t(a-jy/2)?(r=l?"bottom":"top",o="center"):$t(a-1.5*jy)?(r=l?"top":"bottom",o="center"):(r="middle",o=a<1.5*jy&&a>jy/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:o,textVerticalAlign:r}}(e.rotation,s,f||0,d),null!=(a=e.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(r.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),y=t.get("nameTruncate",!0)||{},m=y.ellipsis,v=He(e.nameTruncateMaxWidth,y.maxWidth,a),x=new j({x:p[0],y:p[1],rotation:r.rotation,silent:qy.isLabelSilent(t),style:Po(u,{text:o,font:g,overflow:"truncate",width:v,ellipsis:m,fill:u.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:u.get("align")||r.textAlign,verticalAlign:u.get("verticalAlign")||r.textVerticalAlign}),z2:1});if(wo({el:x,componentModel:t,itemName:o}),x.__fullText=o,x.anid="name",t.get("triggerEvent")){var _=qy.makeAxisEventDataBase(t);_.targetType="axisName",_.name=o,Xn(x).eventData=_}i.add(x),x.updateTransform(),n.add(x),x.decomposeTransform()}}};function Jy(e){e&&(e.ignore=!0)}function $y(e,t){var n=e&&e.getBoundingRect().clone(),i=t&&t.getBoundingRect().clone();if(n&&i){var o=T([]);return Ue(o,o,-e.rotation),n.applyTransform(D([],o,e.getLocalTransform())),i.applyTransform(D([],o,t.getLocalTransform())),n.intersect(i)}}function Qy(e){return"middle"===e||"center"===e}function em(e,t,n,i,o){for(var r=[],a=[],s=[],l=0;l=0||e===t}function om(e){var t=rm(e);if(t){var n=t.axisPointerModel,i=t.axis.scale,o=n.option,r=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=am(n);null==r&&(o.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a0&&!n.min?n.min=0:null!=n.min&&n.min<0&&!n.max&&(n.max=0);var f=l;null!=n.color&&(f=C({color:n.color},l));var g=ie(oe(n),{boundaryGap:e,splitNumber:t,scale:o,axisLine:r,axisTick:a,axisLabel:s,name:n.text,showName:u,nameLocation:"end",nameGap:d,nameTextStyle:f,triggerEvent:h},!1);if(i(c)){var y=g.name;g.name=c.replace("{value}",null!=y?y:"")}else p(c)&&(g.name=c(g.name,g));var m=new nr(g,null,this.ecModel);return re(m,_p.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m}),this);this._indicatorModels=f},o.prototype.getIndicatorModels=function(){return this._indicatorModels},o.type="radar",o.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:ie({lineStyle:{color:"#bbb"}},Lm.axisLine),axisLabel:km(Lm.axisLabel,!1),axisTick:km(Lm.axisTick,!1),splitLine:km(Lm.splitLine,!0),splitArea:km(Lm.splitArea,!0),indicator:[]},o}(sa),Nm=Pm,Om=["axisLine","axisTickLabel","axisName"],Rm=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=i.type,e}return e(i,t),i.prototype.render=function(e,t,n){this.group.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},i.prototype._buildAxes=function(e){var t=e.coordinateSystem,i=t.getIndicatorAxes(),o=n(i,(function(e){var n=e.model.get("showName")?e.name:"";return new tm(e.model,{axisName:n,position:[t.cx,t.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));u(o,(function(e){u(Om,e.add,e),this.group.add(e.getGroup())}),this)},i.prototype._buildSplitLineAndArea=function(e){var t=e.coordinateSystem,i=t.getIndicatorAxes();if(i.length){var o=e.get("shape"),r=e.getModel("splitLine"),a=e.getModel("splitArea"),l=r.getModel("lineStyle"),c=a.getModel("areaStyle"),d=r.get("show"),h=a.get("show"),p=l.get("color"),f=c.get("color"),g=s(p)?p:[p],y=s(f)?f:[f],m=[],v=[];if("circle"===o)for(var x=i[0].getTicksCoords(),_=t.cx,b=t.cy,S=0;S3?1.4:o>1?1.2:1.1;Ym(this,"zoom","zoomOnMouseWheel",e,{scale:i>0?s:1/s,originX:r,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);Ym(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:r,originY:a,isAvailableBehavior:null})}}},n.prototype._pinchHandler=function(e){Hm(this._zr,"globalPan")||Ym(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})},n}(ve);function qm(e,t,n){var i=e.target;i.x+=t,i.y+=n,i.dirty()}function Km(e,t,n,i){var o=e.target,r=e.zoomLimit,a=e.zoom=e.zoom||1;if(a*=t,r){var s=r.min||0,l=r.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/e.zoom;e.zoom=a,o.x-=(n-o.x)*(u-1),o.y-=(i-o.y)*(u-1),o.scaleX*=u,o.scaleY*=u,o.dirty()}var Jm={axisPointer:1,tooltip:1,brush:1};function $m(e,t,n){var i=t.getComponentByElement(e.topTarget),o=i&&i.coordinateSystem;return i&&i!==n&&!Jm.hasOwnProperty(i.mainType)&&o&&o.model!==n}var Qm=l(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),ev=function(){function e(e,t){this.type="geoSVG",this._usedGraphicMap=l(),this._freedGraphics=[],this._mapName=e,this._parsedXML=je(t)}return e.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=function(e){var t=[],n=l();return u(e,(function(e){if(null==e.namedFrom){var i=new Lp(e.name,e.el);t.push(i),n.set(e.name,i)}})),{regions:t,regionsMap:n}}(e.named),n=t.regions,i=t.regionsMap;this._regions=n,this._regionsMap=i}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},e.prototype._buildGraphic=function(e){var t,n;try{n=(t=e&&qe(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{}).root,d(null!=n)}catch(m){throw new Error("Invalid svg format\n"+m.message)}var i=new X;i.add(n),i.isGeoSVGGraphicRoot=!0;var o=t.width,r=t.height,a=t.viewBoxRect,s=this._boundingRect;if(!s){var l=void 0,c=void 0,h=void 0,p=void 0;if(null!=o?(l=0,h=o):a&&(l=a.x,h=a.width),null!=r?(c=0,p=r):a&&(c=a.y,p=a.height),null==l||null==c){var f=n.getBoundingRect();null==l&&(l=f.x,h=f.width),null==c&&(c=f.y,p=f.height)}s=this._boundingRect=new Q(l,c,h,p)}if(a){var g=Ke(a,s);n.scaleX=n.scaleY=g.scale,n.x=g.x,n.y=g.y}i.setClipPath(new E({shape:s.plain()}));var y=[];return u(t.named,(function(e){var t;null!=Qm.get(e.svgNodeTagLower)&&(y.push(e),(t=e.el).silent=!1,t.isGroup&&t.traverse((function(e){e.silent=!1})))})),{root:i,boundingRect:s,named:y}},e.prototype.useGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,n),n)},e.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);n&&(t.removeKey(e),this._freedGraphics.push(n))},e}();for(var tv=[126,25],nv=[[[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]]],iv=0;iv0,f={api:n,geo:s,mapOrGeoModel:e,data:a,isVisualEncodedByVisualMap:p,isGeo:r,transformInfoRaw:d};"geoJSON"===s.resourceType?this._buildGeoJSON(f):"geoSVG"===s.resourceType&&this._buildSVG(f),this._updateController(e,t,n),this._updateMapSelectHandler(e,l,n,i)},e.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=l(),n=l(),i=this._regionsGroup,o=e.transformInfoRaw,r=e.mapOrGeoModel,a=e.data,s=e.geo.projection,c=s&&s.stream;function d(e,t){return t&&(e=t(e)),e&&[e[0]*o.scaleX+o.x,e[1]*o.scaleY+o.y]}function h(e){for(var t=[],n=!c&&s&&s.project,i=0;i=0)&&(h=o);var p=a?{normal:{align:"center",verticalAlign:"middle"}}:null;Lo(t,ko(i),{labelFetcher:h,labelDataIndex:d,defaultText:n},p);var f=t.getTextContent();if(f&&(vv(f).ignore=f.ignore,t.textConfig&&a)){var g=t.getBoundingRect().clone();t.textConfig.layoutRect=g,t.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function Mv(e,t,n,i,o,r){e.data?e.data.setItemGraphicEl(r,t):Xn(t).eventData={componentType:"geo",componentIndex:o.componentIndex,geoIndex:o.componentIndex,name:n,region:i&&i.option||{}}}function Iv(e,t,n,i,o){e.data||wo({el:t,componentModel:o,itemName:n,itemTooltipOption:i.get("tooltip")})}function Tv(e,t,n,i,o){t.highDownSilentOnTouch=!!o.get("selectedMode");var r=i.getModel("emphasis"),a=r.get("focus");return Pi(t,a,r.get("blurScope"),r.get("disabled")),e.isGeo&&function(e,t,n){var i=Xn(e);i.componentMainType=t.mainType,i.componentIndex=t.componentIndex,i.componentHighDownName=n}(t,o,n),a}function Dv(e,t,n){var i,o=[];function r(){i=[]}function a(){i.length&&(o.push(i),i=[])}var s=t({polygonStart:r,polygonEnd:a,lineStart:r,lineEnd:a,point:function(e,t){isFinite(e)&&isFinite(t)&&i.push([e,t])},sphere:function(){}});return!n&&s.polygonStart(),u(e,(function(e){s.lineStart();for(var t=0;t-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},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}(Ul),Pv=kv;function Nv(e){var t={};e.eachSeriesByType("map",(function(e){var n=e.getHostGeoModel(),i=n?"o"+n.id:"i"+e.getMapType();(t[i]=t[i]||[]).push(e)})),u(t,(function(e,t){for(var i,o,r,a=(i=n(e,(function(e){return e.getData()})),o=e[0].get("mapValueCalculation"),r={},u(i,(function(e){e.each(e.mapDimension("value"),(function(t,n){var i="ec-"+e.getName(n);r[i]=r[i]||[],isNaN(t)||r[i].push(t)}))})),i[0].map(i[0].mapDimension("value"),(function(e,t){for(var n="ec-"+i[0].getName(t),a=0,s=1/0,l=-1/0,u=r[n].length,c=0;c1?(p.width=h,p.height=h/x):(p.height=h,p.width=h*x),p.y=d[1]-p.height/2,p.x=d[0]-p.width/2;else{var b=e.getBoxLayoutParams();b.aspect=x,p=Qr(b,{width:m,height:v})}this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(e.get("center"),t),this.setZoom(e.get("zoom"))}var Yv=function(){function e(){this.dimensions=Gv}return e.prototype.create=function(e,t){var i=[];function o(e){return{nameProperty:e.get("nameProperty"),aspectScale:e.get("aspectScale"),projection:e.get("projection")}}e.eachComponent("geo",(function(e,n){var r=e.get("map"),a=new Hv(r+n,r,g({nameMap:e.get("nameMap")},o(e)));a.zoomLimit=e.get("scaleLimit"),i.push(a),e.coordinateSystem=a,a.model=e,a.resize=Uv,a.resize(e,t)})),e.eachSeries((function(e){if("geo"===e.get("coordinateSystem")){var t=e.get("geoIndex")||0;e.coordinateSystem=i[t]}}));var r={};return e.eachSeriesByType("map",(function(e){if(!e.getHostGeoModel()){var t=e.getMapType();r[t]=r[t]||[],r[t].push(e)}})),u(r,(function(e,r){var a=n(e,(function(e){return e.get("nameMap")})),s=new Hv(r,r,g({nameMap:tt(a)},o(e[0])));s.zoomLimit=He.apply(null,n(e,(function(e){return e.get("scaleLimit")}))),i.push(s),s.resize=Uv,s.resize(e[0],t),u(e,(function(e){e.coordinateSystem=s,function(e,t){u(t.get("geoCoord"),(function(t,n){e.addGeoCoord(n,t)}))}(s,e)}))})),i},e.prototype.getFilledRegions=function(e,t,n,i){for(var o=(e||[]).slice(),r=l(),a=0;a=0;){var r=t[n];r.hierNode.prelim+=i,r.hierNode.modifier+=i,o+=r.hierNode.change,i+=r.hierNode.shift+o}}(e);var r=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;o?(e.hierNode.prelim=o.hierNode.prelim+t(e,o),e.hierNode.modifier=e.hierNode.prelim-r):e.hierNode.prelim=r}else o&&(e.hierNode.prelim=o.hierNode.prelim+t(e,o));e.parentNode.hierNode.defaultAncestor=function(e,t,n,i){if(t){for(var o=e,r=e,a=r.parentNode.children[0],s=t,l=o.hierNode.modifier,u=r.hierNode.modifier,c=a.hierNode.modifier,d=s.hierNode.modifier;s=ox(s),r=rx(r),s&&r;){o=ox(o),a=rx(a),o.hierNode.ancestor=e;var h=s.hierNode.prelim+d-r.hierNode.prelim-u+i(s,r);h>0&&(sx(ax(s,e,n),e,h),u+=h,l+=h),d+=s.hierNode.modifier,u+=r.hierNode.modifier,l+=o.hierNode.modifier,c+=a.hierNode.modifier}s&&!ox(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=d-l),r&&!rx(a)&&(a.hierNode.thread=r,a.hierNode.modifier+=u-c,n=e)}return n}(e,o,e.parentNode.hierNode.defaultAncestor||i[0],t)}function tx(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function nx(e){return arguments.length?e:lx}function ix(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function ox(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function rx(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function ax(e,t,n){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:n}function sx(e,t,n){var i=n/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=i,t.hierNode.shift+=n,t.hierNode.modifier+=n,t.hierNode.prelim+=n,e.hierNode.change+=i}function lx(e,t){return e.parentNode===t.parentNode?1:2}var ux=function(){this.parentPoint=[],this.childPoints=[]},cx=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new ux},n.prototype.buildPath=function(e,t){var n=t.childPoints,i=n.length,o=t.parentPoint,r=n[0],a=n[i-1];if(1===i)return e.moveTo(o[0],o[1]),void e.lineTo(r[0],r[1]);var s=t.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=Ht(t.forkPosition,1),d=[];d[l]=o[l],d[u]=o[u]+(a[u]-o[u])*c,e.moveTo(o[0],o[1]),e.lineTo(d[0],d[1]),e.moveTo(r[0],r[1]),d[l]=r[l],e.lineTo(d[0],d[1]),d[l]=a[l],e.lineTo(d[0],d[1]),e.lineTo(a[0],a[1]);for(var h=1;hv.x)||(_-=Math.PI);var w=b?"left":"right",M=s.getModel("label"),I=M.get("rotate"),T=I*(Math.PI/180),D=y.getTextContent();D&&(y.setTextConfig({position:M.get("position")||w,rotation:null==I?-_:T,origin:"center"}),D.setStyle("verticalAlign","middle"))}var A=s.get(["emphasis","focus"]),L="relative"===A?he(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===A?a.getAncestorsIndices():"descendant"===A?a.getDescendantIndices():null;L&&(Xn(n).focus=L),function(e,t,n,i,o,r,a,s){var l=t.getModel(),u=e.get("edgeShape"),c=e.get("layout"),d=e.getOrient(),h=e.get(["lineStyle","curveness"]),p=e.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),g=i.__edge;if("curve"===u)t.parentNode&&t.parentNode!==n&&(g||(g=i.__edge=new z({shape:mx(c,d,h,o,o)})),Ui(g,{shape:mx(c,d,h,r,a)},e));else if("polyline"===u&&"orthogonal"===c&&t!==n&&t.children&&0!==t.children.length&&!0===t.isExpand){for(var y=t.children,m=[],v=0;vt&&(t=i.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,i=n.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var o=n.getData().tree.root,r=e.targetNode;if(i(r)&&(r=o.getNodeById(r)),r&&o.contains(r))return{node:r};var a=e.targetNodeId;if(null!=a&&(r=o.getNodeById(a)))return{node:r}}}function Px(e){for(var t=[];e;)(e=e.parentNode)&&t.push(e);return t.reverse()}function Nx(e,t){var n=Px(e);return c(n,t)>=0}function Ox(e,t){for(var n=[];e;){var i=e.dataIndex;n.push({name:e.name,dataIndex:i,value:t.getRawValue(i)}),e=e.parentNode}return n.reverse(),n}var Rx=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return e(n,t),n.prototype.getInitialData=function(e){var t={name:e.name,children:e.data},n=e.leaves||{},i=new nr(n,this,this.ecModel),o=Lx.createTree(t,this,(function(e){e.wrapMethod("getItemModel",(function(e,t){var n=o.getNodeByDataIndex(t);return n&&n.children.length&&n.isExpand||(e.parentModel=i),e}))}));var r=0;o.eachNode("preorder",(function(e){e.depth>r&&(r=e.depth)}));var a=e.expandAndCollapse&&e.initialTreeDepth>=0?e.initialTreeDepth:r;return o.root.eachNode("preorder",(function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&null!=t.collapsed?!t.collapsed:e.depth<=a})),o.data},n.prototype.getOrient=function(){var e=this.get("orient");return"horizontal"===e?e="LR":"vertical"===e&&(e="TB"),e},n.prototype.setZoom=function(e){this.option.zoom=e},n.prototype.setCenter=function(e){this.option.center=e},n.prototype.formatTooltip=function(e,t,n){for(var i=this.getData().tree,o=i.root.children[0],r=i.getNodeByDataIndex(e),a=r.getValue(),s=r.name;r&&r!==o;)s=r.parentNode.name+"."+s,r=r.parentNode;return bl("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},n.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=Ox(i,this),n.collapsed=!i.isExpand,n},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}(Ul),Ex=Rx;function Vx(e,t){for(var n,i=[e];n=i.pop();)if(t(n),n.isExpand){var o=n.children;if(o.length)for(var r=o.length-1;r>=0;r--)i.push(o[r])}}function zx(e,t){e.eachSeriesByType("tree",(function(e){!function(e,t){var n=function(e,t){return Qr(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t);e.layoutInfo=n;var i=e.get("layout"),o=0,r=0,a=null;"radial"===i?(o=2*Math.PI,r=Math.min(n.height,n.width)/2,a=nx((function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth}))):(o=n.width,r=n.height,a=nx());var s=e.getData().tree.root,l=s.children[0];if(l){!function(e){var t=e;t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,i,o=[t];n=o.pop();)if(i=n.children,n.isExpand&&i.length)for(var r=i.length-1;r>=0;r--){var a=i[r];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:r,thread:null},o.push(a)}}(s),function(e,t,n){for(var i,o=[e],r=[];i=o.pop();)if(r.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;sc.getLayout().x&&(c=e),e.depth>d.depth&&(d=e)}));var h=u===c?1:a(u,c)/2,p=h-u.getLayout().x,f=0,g=0,y=0,m=0;if("radial"===i)f=o/(c.getLayout().x+h+p),g=r/(d.depth-1||1),Vx(l,(function(e){y=(e.getLayout().x+p)*f,m=(e.depth-1)*g;var t=ix(y,m);e.setLayout({x:t.x,y:t.y,rawX:y,rawY:m},!0)}));else{var v=e.getOrient();"RL"===v||"LR"===v?(g=r/(c.getLayout().x+h+p),f=o/(d.depth-1||1),Vx(l,(function(e){m=(e.getLayout().x+p)*g,y="LR"===v?(e.depth-1)*f:o-(e.depth-1)*f,e.setLayout({x:y,y:m},!0)}))):"TB"!==v&&"BT"!==v||(f=o/(c.getLayout().x+h+p),g=r/(d.depth-1||1),Vx(l,(function(e){y=(e.getLayout().x+p)*f,m="TB"===v?(e.depth-1)*g:r-(e.depth-1)*g,e.setLayout({x:y,y:m},!0)})))}}}(e,t)}))}function Bx(e){e.eachSeriesByType("tree",(function(e){var t=e.getData();t.tree.eachNode((function(e){var n=e.getModel().getModel("itemStyle").getItemStyle(),i=t.ensureUniqueItemVisual(e.dataIndex,"style");g(i,n)}))}))}var Gx=["treemapZoomToNode","treemapRender","treemapMove"];function Fx(e){var t=e.getData().tree,n={};t.eachNode((function(t){for(var i=t;i&&i.depth>1;)i=i.parentNode;var o=Ca(e.ecModel,i.name||i.dataIndex+"",n);t.setVisual("decal",o)}))}function Wx(e){var t=0;u(e.children,(function(e){Wx(e);var n=e.value;s(n)&&(n=n[0]),t+=n}));var n=e.value;s(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),s(e.value)?e.value[0]=n:e.value=n}var Hx=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=i.type,e.preventUsingHoverLayer=!0,e}return e(i,t),i.prototype.getInitialData=function(e,t){var i={name:e.name,children:e.data};Wx(i);var o=e.levels||[],r=this.designatedVisualItemStyle={},a=new nr({itemStyle:r},this,t);o=e.levels=function(e,t){var n,i,o=fn(t.get("color")),r=fn(t.get(["aria","decal","decals"]));if(!o)return;u(e=e||[],(function(e){var t=new nr(e),o=t.get("color"),r=t.get("decal");(t.get(["itemStyle","color"])||o&&"none"!==o)&&(n=!0),(t.get(["itemStyle","decal"])||r&&"none"!==r)&&(i=!0)}));var a=e[0]||(e[0]={});n||(a.color=o.slice());!i&&r&&(a.decal=r.slice());return e}(o,t);var s=n(o||[],(function(e){return new nr(e,a,t)}),this),l=Lx.createTree(i,this,(function(e){e.wrapMethod("getItemModel",(function(e,t){var n=l.getNodeByDataIndex(t),i=n?s[n.depth]:null;return e.parentModel=i||a,e}))}));return l.data},i.prototype.optionUpdated=function(){this.resetViewRoot()},i.prototype.formatTooltip=function(e,t,n){var i=this.getData(),o=this.getRawValue(e);return bl("nameValue",{name:i.getName(e),value:o})},i.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=Ox(i,this),n.treePathInfo=n.treeAncestors,n},i.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},g(this.layoutInfo,e)},i.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=l(),this._idIndexMapCount=0);var n=t.get(e);return null==n&&t.set(e,n=this._idIndexMapCount++),n},i.prototype.getViewRoot=function(){return this._viewRoot},i.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)},i.prototype.enableAriaDecal=function(){Fx(this)},i.type="series.treemap",i.layoutMode="box",i.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:[]},i}(Ul),Ux=function(){function e(e){this.group=new X,e.add(this.group)}return e.prototype.render=function(e,t,n,i){var o=e.getModel("breadcrumb"),r=this.group;if(r.removeAll(),o.get("show")&&n){var a=o.getModel("itemStyle"),s=a.getModel("textStyle"),l={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,l,s),this._renderContent(e,l,a,s,i),ea(r,l.pos,l.box)}},e.prototype._prepare=function(e,t,n){for(var i=e;i;i=i.parentNode){var o=Sn(i.getModel().get("name"),""),r=n.getTextRect(o),a=Math.max(r.width+16,t.emptyItemWidth);t.totalWidth+=a+8,t.renderList.push({node:i,text:o,width:a})}},e.prototype._renderContent=function(e,t,n,i,o){for(var r,a,s,l,u,c,d,h,p,f=0,g=t.emptyItemWidth,y=e.get(["breadcrumb","height"]),m=(r=t.pos,a=t.box,l=a.width,u=a.height,c=Ht(r.left,l),d=Ht(r.top,u),h=Ht(r.right,l),p=Ht(r.bottom,u),(isNaN(c)||isNaN(parseFloat(r.left)))&&(c=0),(isNaN(h)||isNaN(parseFloat(r.right)))&&(h=l),(isNaN(d)||isNaN(parseFloat(r.top)))&&(d=0),(isNaN(p)||isNaN(parseFloat(r.bottom)))&&(p=u),s=Vr(s||0),{width:Math.max(h-c-s[1]-s[3],0),height:Math.max(p-d-s[0]-s[2],0)}),v=t.totalWidth,x=t.renderList,_=x.length-1;_>=0;_--){var b=x[_],S=b.node,w=b.width,M=b.text;v>m.width&&(v-=w-g,w=g,M=null);var I=new O({shape:{points:Yx(f,0,w,y,_===x.length-1,0===_)},style:C(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new j({style:{text:M,fill:i.getTextColor(),font:i.getFont()}}),textConfig:{position:"inside"},z2:1e5,onclick:se(o,S)});I.disableLabelAnimation=!0,this.group.add(I),Zx(I,e,S),f+=w+8}},e.prototype.remove=function(){this.group.removeAll()},e}();function Yx(e,t,n,i,o,r){var a=[[o?e:e-5,t],[e+n,t],[e+n,t+i],[o?e:e-5,t+i]];return!r&&a.splice(2,0,[e+n+5,t+i/2]),!o&&a.push([e,t+i/2]),a}function Zx(e,t,n){Xn(e).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&Ox(n,t)}}var Xx=Ux,jx=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,i,o){return!this._elExistsMap[e.id]&&(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:i,easing:o}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){--t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,o=this._storage.length;i3||Math.abs(e.dy)>3)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},n.prototype._onZoom=function(e){var t=e.originX,n=e.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var o=i.getLayout();if(!o)return;var r=new Q(o.x,o.y,o.width,o.height),a=this.seriesModel.layoutInfo;t-=a.x,n-=a.y;var s=Qe();it(s,s,[-t,-n]),ot(s,s,[e.scale,e.scale]),it(s,s,[t,n]),r.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:r.x,y:r.y,width:r.width,height:r.height}})}},n.prototype._initEvents=function(e){var t=this;e.on("click",(function(e){if("ready"===t._state){var n=t.seriesModel.get("nodeClick",!0);if(n){var i=t.findTarget(e.offsetX,e.offsetY);if(i){var o=i.node;if(o.getLayout().isLeafRoot)t._rootToNode(i);else if("zoomToNode"===n)t._zoomToNode(i);else if("link"===n){var r=o.hostTree.data.getItemModel(o.dataIndex),a=r.get("link",!0),s=r.get("target",!0)||"blank";a&&Xr(a,s)}}}}}),this)},n.prototype._renderBreadcrumb=function(e,t,n){var i=this;n||(n=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||(n={node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new Xx(this.group))).render(e,t,n.node,(function(t){"animating"!==i._state&&(Nx(e.getViewRoot(),t)?i._rootToNode({node:t}):i._zoomToNode({node:t}))}))},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(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},n.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},n.prototype.findTarget=function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(i){var o=this._storage.background[i.getRawIndex()];if(o){var r=o.transformCoordToLocal(e,t),a=o.shape;if(!(a.x<=r[0]&&r[0]<=a.x+a.width&&a.y<=r[1]&&r[1]<=a.y+a.height))return!1;n={node:i,offsetX:r[0],offsetY:r[1]}}}),this),n},n.type="treemap",n}(nu);var t_=e_,n_=u,i_=o,o_=function(){function e(t){var n=t.mappingMethod,i=t.type,r=this.option=oe(t);this.type=i,this.mappingMethod=n,this._normalizeData=f_[n];var a=e.visualHandlers[i];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],"piecewise"===n?(r_(r),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,u(t,(function(t,n){t.originIndex=n,null!=t.visual&&(e.hasSpecialVisual=!0)}))}(r)):"category"===n?r.categories?function(e){var t=e.categories,n=e.categoryMap={},i=e.visual;if(n_(t,(function(e,t){n[e]=t})),!s(i)){var r=[];o(i)?n_(i,(function(e,t){var i=n[t];r[null!=i?i:-1]=e})):r[-1]=i,i=p_(e,r)}for(var a=t.length-1;a>=0;a--)null==i[a]&&(delete n[t[a]],t.pop())}(r):r_(r,!0):(d("linear"!==n||r.dataExtent),r_(r))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return ce(this._normalizeData,this)},e.listVisualTypes=function(){return v(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){o(e)?u(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,i){var r,a=s(t)?[]:o(t)?{}:(r=!0,null);return e.eachVisual(t,(function(e,t){var o=n.call(i,e,t);r?a=o:a[t]=o})),a},e.retrieveVisuals=function(t){var n,i={};return t&&n_(e.visualHandlers,(function(e,o){t.hasOwnProperty(o)&&(i[o]=t[o],n=!0)})),n?i:null},e.prepareVisualTypes=function(e){if(s(e))e=e.slice();else{if(!i_(e))return[];var t=[];n_(e,(function(e,n){t.push(n)})),e=t}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},e.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},e.findPieceIndex=function(e,t,n){for(var o,r=1/0,a=0,s=t.length;au[1]&&(u[1]=l);var c=t.get("colorMappingBy"),d={type:a.name,dataExtent:u,visual:a.range};"color"!==d.type||"index"!==c&&"id"!==c?d.mappingMethod="linear":(d.mappingMethod="category",d.loop=!0);var h=new y_(d);return m_(h).drColorMappingBy=c,h}(0,o,r,0,c,f);u(f,(function(e,t){if(e.depth>=n.length||e===n[e.depth]){var r=function(e,t,n,i,o,r){var a=g({},t);if(o){var s=o.type,l="color"===s&&m_(o).drColorMappingBy,u="index"===l?i:"id"===l?r.mapIdToIndex(n.getId()):n.getValue(e.get("visualDimension"));a[s]=o.mapValueToVisual(u)}return a}(o,c,e,t,y,i);x_(e,r,n,i)}}))}else s=__(c),d.fill=s}}function __(e){var t=b_(e,"color");if(t){var n=b_(e,"colorAlpha"),i=b_(e,"colorSaturation");return i&&(t=st(t,null,null,i)),n&&(t=lt(t,n)),t}}function b_(e,t){var n=e[t];if(null!=n&&"none"!==n)return n}function S_(e,t){var n=e.get(t);return s(n)&&n.length?{name:t,range:n}:null}var w_=Math.max,M_=Math.min,I_=He,T_=u,D_=["itemStyle","borderWidth"],C_=["itemStyle","gapWidth"],A_=["upperLabel","show"],L_=["upperLabel","height"],k_={seriesType:"treemap",reset:function(e,t,n,i){var o=n.getWidth(),r=n.getHeight(),a=e.option,s=Qr(e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=Ht(I_(s.width,l[0]),o),c=Ht(I_(s.height,l[1]),r),d=i&&i.type,h=kx(i,["treemapZoomToNode","treemapRootToNode"],e),p="treemapRender"===d||"treemapMove"===d?i.rootRect:null,f=e.getViewRoot(),y=Px(f);if("treemapMove"!==d){var m="treemapZoomToNode"===d?function(e,t,n,i,o){var r,a=(t||{}).node,s=[i,o];if(!a||a===n)return s;var l=i*o,u=l*e.option.zoomToNodeRatio;for(;r=a.parentNode;){for(var c=0,d=r.children,h=0,p=d.length;h9007199254740991&&(u=9007199254740991),a=r}ua[1]&&(a[1]=t)}))):a=[NaN,NaN];return{sum:i,dataExtent:a}}(t,a,s);if(0===u.sum)return e.viewChildren=[];if(u.sum=function(e,t,n,i,o){if(!i)return n;for(var r=e.get("visibleMin"),a=o.length,s=a,l=a-1;l>=0;l--){var u=o["asc"===i?a-l-1:l].getValue();u/n*ti&&(i=a));var l=e.area*e.area,u=t*t*n;return l?w_(u*i/l,l/(u*o)):1/0}function O_(e,t,n,i,o){var r=t===n.width?0:1,a=1-r,s=["x","y"],l=["width","height"],u=n[s[r]],c=t?e.area/t:0;(o||c>n[l[a]])&&(c=n[l[a]]);for(var d=0,h=e.length;di&&(i=t);var a=i%2?i+2:i+3;o=[];for(var l=0;l0&&(v[0]=-v[0],v[1]=-v[1]);var _=m[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var b=-Math.atan2(m[1],m[0]);u[0].8?"left":c[0]<-.8?"right":"center",h=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":i.x=-c[0]*f+l[0],i.y=-c[1]*g+l[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",h=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=f*_+l[0],i.y=l[1]+S,d=m[0]<0?"right":"left",i.originX=-f*_,i.originY=-S;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+S,d="center",i.originY=-S;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-f*_+u[0],i.y=u[1]+S,d=m[0]>=0?"right":"left",i.originX=f*_,i.originY=-S}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||h,align:i.__align||d})}}}function w(e,t){var n=e.__specifiedRotation;if(null==n){var i=a.tangentAt(t);e.attr("rotation",(1===t?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else e.attr("rotation",n)}},n}(X),yb=gb;function mb(e){var t=e.hostModel,n=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:n.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:n.get("disabled"),blurScope:n.get("blurScope"),focus:n.get("focus"),labelStatesModels:ko(t)}}function vb(e){return isNaN(e[0])||isNaN(e[1])}function xb(e){return e&&!vb(e[0])&&!vb(e[1])}var _b=function(){function e(e){this.group=new X,this._LineCtor=e||yb}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,i=n.group,o=n._lineData;n._lineData=e,o||i.removeAll();var r=mb(e);e.diff(o).add((function(n){t._doAdd(e,n,r)})).update((function(n,i){t._doUpdate(o,e,i,n,r)})).remove((function(e){i.remove(o.getItemGraphicEl(e))})).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl((function(t,n){t.updateLayout(e,n)}),this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=mb(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t){function n(e){e.isGroup||function(e){return e.animators&&e.animators.length>0}(e)||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var i=e.start;i=0?i+=u:i-=u:f>=0?i-=u:i+=u}return i}function Cb(e,t){var n=[],i=mt,o=[[],[],[]],r=[[],[]],a=[];t/=2,e.eachEdge((function(e,s){var l=e.getLayout(),u=e.getVisual("fromSymbol"),c=e.getVisual("toSymbol");l.__original||(l.__original=[ct(l[0]),ct(l[1])],l[2]&&l.__original.push(ct(l[2])));var d=l.__original;if(null!=l[2]){if(et(o[0],d[0]),et(o[1],d[2]),et(o[2],d[1]),u&&"none"!==u){var h=J_(e.node1),p=Db(o,d[0],h*t);i(o[0][0],o[1][0],o[2][0],p,n),o[0][0]=n[3],o[1][0]=n[4],i(o[0][1],o[1][1],o[2][1],p,n),o[0][1]=n[3],o[1][1]=n[4]}if(c&&"none"!==c){h=J_(e.node2),p=Db(o,d[1],h*t);i(o[0][0],o[1][0],o[2][0],p,n),o[1][0]=n[1],o[2][0]=n[2],i(o[0][1],o[1][1],o[2][1],p,n),o[1][1]=n[1],o[2][1]=n[2]}et(l[0],o[0]),et(l[1],o[2]),et(l[2],o[1])}else{if(et(r[0],d[0]),et(r[1],d[1]),dt(a,r[1],r[0]),pt(a,a),u&&"none"!==u){h=J_(e.node1);gt(r[0],r[0],a,h*t)}if(c&&"none"!==c){h=J_(e.node2);gt(r[1],r[1],a,-h*t)}et(l[0],r[0]),et(l[1],r[1])}}))}function Ab(e){return"view"===e.type}var Lb=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.init=function(e,t){var n=new jf,i=new _b,o=this.group;this._controller=new jm(t.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},n.prototype.render=function(e,t,n){var i=this,o=e.coordinateSystem;this._model=e;var r=this._symbolDraw,a=this._lineDraw,s=this.group;if(Ab(o)){var l={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?s.attr(l):Ui(s,l,e)}Cb(e.getGraph(),K_(e));var u=e.getData();r.updateData(u);var c=e.getEdgeData();a.updateData(c),this._updateNodeAndLinkScale(),this._updateController(e,t,n),clearTimeout(this._layoutTimeout);var d=e.forceLayout,h=e.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,h),u.graph.eachNode((function(e){var t=e.dataIndex,n=e.getGraphicEl(),o=e.getModel();if(n){n.off("drag").off("dragend");var r=o.get("draggable");r&&n.on("drag",(function(){d&&(d.warmUp(),!i._layouting&&i._startForceLayoutIteration(d,h),d.setFixed(t),u.setItemLayout(t,[n.x,n.y]))})).on("dragend",(function(){d&&d.setUnfixed(t)})),n.setDraggable(r&&!!d,!!o.get("cursor")),"adjacency"===o.get(["emphasis","focus"])&&(Xn(n).focus=e.getAdjacentDataIndices())}})),u.graph.eachEdge((function(e){var t=e.getGraphicEl(),n=e.getModel().get(["emphasis","focus"]);t&&"adjacency"===n&&(Xn(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})}));var p="circular"===e.get("layout")&&e.get(["circular","rotateLabel"]),f=u.getLayout("cx"),y=u.getLayout("cy");u.eachItemGraphicEl((function(e,t){var n=u.getItemModel(t).get(["label","rotate"])||0,i=e.getSymbolPath();if(p){var o=u.getItemLayout(t),r=Math.atan2(o[1]-y,o[0]-f);r<0&&(r=2*Math.PI+r);var a=o[0]=0&&e.call(t,n[o],o)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,i=n.length,o=0;o=0&&n[o].node1.dataIndex>=0&&n[o].node2.dataIndex>=0&&e.call(t,n[o],o)},e.prototype.breadthFirstTraverse=function(e,t,n,i){if(t instanceof Ob||(t=this._nodesMap[Pb(t)]),t){for(var o="out"===n?"outEdges":"in"===n?"inEdges":"edges",r=0;r=0&&n.node2.dataIndex>=0}));for(o=0,r=i.length;o=0&&this[e][t].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}re(Ob,Eb("hostGraph","data")),re(Rb,Eb("hostGraph","edgeData"));var Vb=Nb;function zb(e,t,n,i,o){for(var r=new Vb(i),a=0;a "+p)),u++)}var f,g=n.get("coordinateSystem");if("cartesian2d"===g||"polar"===g)f=lh(e,n);else{var y=Ba.get(g),m=y&&y.dimensions||[];c(m,"value")<0&&m.concat(["value"]);var v=eh(e,{coordDimensions:m,encodeDefine:n.getEncode()}).dimensions;(f=new Qd(v,n)).initData(e)}var x=new Qd(["value"],n);return x.initData(l,s),o&&o(f,x),_x({mainData:f,struct:r,structAttr:"graph",datas:{node:f,edge:x},datasAttr:{node:"data",edge:"edgeData"}}),r.update(),r}var Bb=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=i.type,e.hasSymbolVisual=!0,e}return e(i,t),i.prototype.init=function(e){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new fy(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},i.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},i.prototype.mergeDefaultAndTheme=function(e){t.prototype.mergeDefaultAndTheme.apply(this,arguments),gn(e,"edgeLabel",["show"])},i.prototype.getInitialData=function(e,t){var n,i=e.edges||e.links||[],o=e.data||e.nodes||[],r=this;if(o&&i){F_(n=this)&&(n.__curvenessList=[],n.__edgeMap={},W_(n));var a=zb(o,i,this,!0,(function(e,t){e.wrapMethod("getItemModel",(function(e){var t=r._categoriesModels[e.getShallow("category")];return t&&(t.parentModel=e.parentModel,e.parentModel=t),e}));var n=nr.prototype.getModel;function i(e,t){var i=n.call(this,e,t);return i.resolveParentPath=o,i}function o(e){if(e&&("label"===e[0]||"label"===e[1])){var t=e.slice();return"label"===e[0]?t[0]="edgeLabel":"label"===e[1]&&(t[1]="edgeLabel"),t}return e}t.wrapMethod("getItemModel",(function(e){return e.resolveParentPath=o,e.getModel=i,e}))}));return u(a.edges,(function(e){!function(e,t,n,i){if(F_(n)){var o=H_(e,t,n),r=n.__edgeMap,a=r[U_(o)];r[o]&&!a?r[o].isForward=!0:a&&r[o]&&(a.isForward=!0,r[o].isForward=!1),r[o]=r[o]||[],r[o].push(i)}}(e.node1,e.node2,this,e.dataIndex)}),this),a.data}},i.prototype.getGraph=function(){return this.getData().graph},i.prototype.getEdgeData=function(){return this.getGraph().edgeData},i.prototype.getCategoriesData=function(){return this._categoriesData},i.prototype.formatTooltip=function(e,t,n){if("edge"===n){var i=this.getData(),o=this.getDataParams(e,n),r=i.graph.getEdgeByIndex(e),a=i.getName(r.node1.dataIndex),s=i.getName(r.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),bl("nameValue",{name:l.join(" > "),value:o.value,noValue:null==o.value})}return Nl({series:this,dataIndex:e,multipleSeries:t})},i.prototype._updateCategoriesData=function(){var e=n(this.option.categories||[],(function(e){return null!=e.value?e:g({value:0},e)})),t=new Qd(["value"],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray((function(e){return t.getItemModel(e)}))},i.prototype.setZoom=function(e){this.option.zoom=e},i.prototype.setCenter=function(e){this.option.center=e},i.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},i.type="series.graph",i.dependencies=["grid","polar","geo","singleAxis","calendar"],i.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"}}},i}(Ul),Gb=Bb,Fb={type:"graphRoam",event:"graphRoam",update:"none"};var Wb=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},Hb=function(t){function n(e){var n=t.call(this,e)||this;return n.type="pointer",n}return e(n,t),n.prototype.getDefaultShape=function(){return new Wb},n.prototype.buildPath=function(e,t){var n=Math.cos,i=Math.sin,o=t.r,r=t.width,a=t.angle,s=t.x-n(a)*r*(r>=o/3?1:2),l=t.y-i(a)*r*(r>=o/3?1:2);a=t.angle-Math.PI/2,e.moveTo(s,l),e.lineTo(t.x+n(a)*r,t.y+i(a)*r),e.lineTo(t.x+n(t.angle)*o,t.y+i(t.angle)*o),e.lineTo(t.x-n(a)*r,t.y-i(a)*r),e.lineTo(s,l)},n}(x);function Ub(e,t){var n=null==e?"":e+"";return t&&(i(t)?n=t.replace("{value}",n):p(t)&&(n=t(e))),n}var Yb=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.render=function(e,t,n){this.group.removeAll();var i=e.get(["axisLine","lineStyle","color"]),o=function(e,t){var n=e.get("center"),i=t.getWidth(),o=t.getHeight(),r=Math.min(i,o);return{cx:Ht(n[0],t.getWidth()),cy:Ht(n[1],t.getHeight()),r:Ht(e.get("radius"),r/2)}}(e,n);this._renderMain(e,t,n,i,o),this._data=e.getData()},n.prototype.dispose=function(){},n.prototype._renderMain=function(e,t,n,i,o){var r=this.group,a=e.get("clockwise"),s=-e.get("startAngle")/180*Math.PI,l=-e.get("endAngle")/180*Math.PI,u=e.getModel("axisLine"),c=u.get("roundCap")?Lg:P,d=u.get("show"),h=u.getModel("lineStyle"),p=h.get("width"),f=[s,l];_t(f,!a);for(var g=(l=f[1])-(s=f[0]),y=s,m=0;d&&m=e&&(0===t?0:i[t-1][0]).8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:O}),silent:!0}))}if(v.get("show")&&L!==_){P=(P=v.get("distance"))?P+l:l;for(var R=0;R<=b;R++){u=Math.cos(M),c=Math.sin(M);var E=new V({shape:{x1:u*(f-P)+h,y1:c*(f-P)+p,x2:u*(f-w-P)+h,y2:c*(f-w-P)+p},silent:!0,style:C});"auto"===C.stroke&&E.setStyle({stroke:i((L+R/b)/_)}),d.add(E),M+=T}M-=T}else M+=I}},n.prototype._renderPointer=function(e,t,n,i,o,r,a,s,l){var u=this.group,c=this._data,d=this._progressEls,h=[],p=e.get(["pointer","show"]),f=e.getModel("progress"),y=f.get("show"),m=e.getData(),v=m.mapDimension("value"),x=+e.get("min"),_=+e.get("max"),b=[x,_],S=[r,a];function w(t,n){var i,r=m.getItemModel(t).getModel("pointer"),a=Ht(r.get("width"),o.r),s=Ht(r.get("length"),o.r),l=e.get(["pointer","icon"]),u=r.get("offsetCenter"),c=Ht(u[0],o.r),d=Ht(u[1],o.r),h=r.get("keepAspect");return(i=l?oc(l,c-a/2,d-s,a,s,null,h):new Hb({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:d}})).rotation=-(n+Math.PI/2),i.x=o.cx,i.y=o.cy,i}function I(e,t){var n=f.get("roundCap")?Lg:P,i=f.get("overlap"),a=i?f.get("width"):l/m.count(),u=i?o.r-a:o.r-(e+1)*a,c=i?o.r:o.r-e*a,d=new n({shape:{startAngle:r,endAngle:t,cx:o.cx,cy:o.cy,clockwise:s,r0:u,r:c}});return i&&(d.z2=_-m.get(v,e)%_),d}(y||p)&&(m.diff(c).add((function(t){var n=m.get(v,t);if(p){var i=w(t,r);Yi(i,{rotation:-((isNaN(+n)?S[0]:Wt(n,b,S,!0))+Math.PI/2)},e),u.add(i),m.setItemGraphicEl(t,i)}if(y){var o=I(t,r),a=f.get("clip");Yi(o,{shape:{endAngle:Wt(n,b,S,a)}},e),u.add(o),jn(e.seriesIndex,m.dataType,t,o),h[t]=o}})).update((function(t,n){var i=m.get(v,t);if(p){var o=c.getItemGraphicEl(n),a=o?o.rotation:r,s=w(t,a);s.rotation=a,Ui(s,{rotation:-((isNaN(+i)?S[0]:Wt(i,b,S,!0))+Math.PI/2)},e),u.add(s),m.setItemGraphicEl(t,s)}if(y){var l=d[n],g=I(t,l?l.shape.endAngle:r),x=f.get("clip");Ui(g,{shape:{endAngle:Wt(i,b,S,x)}},e),u.add(g),jn(e.seriesIndex,m.dataType,t,g),h[t]=g}})).execute(),m.each((function(e){var t=m.getItemModel(e),n=t.getModel("emphasis"),o=n.get("focus"),r=n.get("blurScope"),a=n.get("disabled");if(p){var s=m.getItemGraphicEl(e),l=m.getItemVisual(e,"style"),u=l.fill;if(s instanceof M){var c=s.style;s.useStyle(g({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(t.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",i(Wt(m.get(v,e),b,[0,1],!0))),s.z2EmphasisLift=0,Ei(s,t),Pi(s,o,r,a)}if(y){var d=h[e];d.useStyle(m.getItemVisual(e,"style")),d.setStyle(t.getModel(["progress","itemStyle"]).getItemStyle()),d.z2EmphasisLift=0,Ei(d,t),Pi(d,o,r,a)}})),this._progressEls=h)},n.prototype._renderAnchor=function(e,t){var n=e.getModel("anchor");if(n.get("show")){var i=n.get("size"),o=n.get("icon"),r=n.get("offsetCenter"),a=n.get("keepAspect"),s=oc(o,t.cx-i/2+Ht(r[0],t.r),t.cy-i/2+Ht(r[1],t.r),i,i,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},n.prototype._renderTitleAndDetail=function(e,t,n,i,o){var r=this,a=e.getData(),s=a.mapDimension("value"),l=+e.get("min"),u=+e.get("max"),c=new X,d=[],h=[],p=e.isAnimationEnabled(),f=e.get(["pointer","showAbove"]);a.diff(this._data).add((function(e){d[e]=new j({silent:!0}),h[e]=new j({silent:!0})})).update((function(e,t){d[e]=r._titleEls[t],h[e]=r._detailEls[t]})).execute(),a.each((function(t){var n=a.getItemModel(t),r=a.get(s,t),g=new X,y=i(Wt(r,[l,u],[0,1],!0)),m=n.getModel("title");if(m.get("show")){var v=m.get("offsetCenter"),x=o.cx+Ht(v[0],o.r),_=o.cy+Ht(v[1],o.r);(C=d[t]).attr({z2:f?0:2,style:Po(m,{x:x,y:_,text:a.getName(t),align:"center",verticalAlign:"middle"},{inheritColor:y})}),g.add(C)}var b=n.getModel("detail");if(b.get("show")){var S=b.get("offsetCenter"),w=o.cx+Ht(S[0],o.r),M=o.cy+Ht(S[1],o.r),I=Ht(b.get("width"),o.r),T=Ht(b.get("height"),o.r),D=e.get(["progress","show"])?a.getItemVisual(t,"style").fill:y,C=h[t],A=b.get("formatter");C.attr({z2:f?0:2,style:Po(b,{x:w,y:M,text:Ub(r,A),width:isNaN(I)?null:I,height:isNaN(T)?null:T,align:"center",verticalAlign:"middle"},{inheritColor:D})}),Go(C,{normal:b},r,(function(e){return Ub(e,A)})),p&&Fo(C,t,a,e,{getFormattedLabel:function(e,t,n,i,o,a){return Ub(a?a.interpolatedValue:r,A)}}),g.add(C)}c.add(g)})),this.group.add(c),this._titleEls=d,this._detailEls=h},n.type="gauge",n}(nu),Zb=Yb,Xb=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e.visualStyleAccessPath="itemStyle",e}return e(n,t),n.prototype.getInitialData=function(e,t){return hy(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}(Ul);var jb=["itemStyle","opacity"],qb=function(t){function n(e,n){var i=t.call(this)||this,o=i,r=new R,a=new j;return o.setTextContent(a),i.setTextGuideLine(r),i.updateData(e,n,!0),i}return e(n,t),n.prototype.updateData=function(e,t,n){var i=this,o=e.hostModel,r=e.getItemModel(t),a=e.getItemLayout(t),s=r.getModel("emphasis"),l=r.get(jb);l=null==l?1:l,n||Ki(i),i.useStyle(e.getItemVisual(t,"style")),i.style.lineJoin="round",n?(i.setShape({points:a.points}),i.style.opacity=0,Yi(i,{style:{opacity:l}},o,t)):Ui(i,{style:{opacity:l},shape:{points:a.points}},o,t),Ei(i,r),this._updateLabel(e,t),Pi(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},n.prototype._updateLabel=function(e,t){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),r=e.hostModel,a=e.getItemModel(t),s=e.getItemLayout(t).label,l=e.getItemVisual(t,"style"),u=l.fill;Lo(o,ko(a),{labelFetcher:e.hostModel,labelDataIndex:t,defaultOpacity:l.opacity,defaultText:e.getName(t)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var c=s.linePoints;i.setShape({points:c}),n.textGuideLineConfig={anchor:c?new te(c[0][0],c[0][1]):null},Ui(o,{style:{x:s.x,y:s.y}},r,t),o.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),bf(n,Sf(a),{stroke:u})},n}(O),Kb=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e.ignoreLabelLineUpdate=!0,e}return e(n,t),n.prototype.render=function(e,t,n){var i=e.getData(),o=this._data,r=this.group;i.diff(o).add((function(e){var t=new qb(i,e);i.setItemGraphicEl(e,t),r.add(t)})).update((function(e,t){var n=o.getItemGraphicEl(t);n.updateData(i,e),r.add(n),i.setItemGraphicEl(e,n)})).remove((function(t){qi(o.getItemGraphicEl(t),e,t)})).execute(),this._data=i},n.prototype.remove=function(){this.group.removeAll(),this._data=null},n.prototype.dispose=function(){},n.type="funnel",n}(nu),Jb=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new fy(ce(this.getData,this),ce(this.getRawData,this)),this._defaultLabelLine(e)},n.prototype.getInitialData=function(e,t){return hy(this,{coordDimensions:["value"],encodeDefaulter:se(ma,this)})},n.prototype._defaultLabelLine=function(e){gn(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},n.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),o=n.mapDimension("value"),r=n.getSum(o);return i.percent=r?+(n.get(o,e)/r*100).toFixed(2):0,i.$vars.push("percent"),i},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}(Ul),$b=Jb;function Qb(e,t){e.eachSeriesByType("funnel",(function(e){var n=e.getData(),i=n.mapDimension("value"),o=e.get("sort"),r=function(e,t){return Qr(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t),a=e.get("orient"),s=r.width,l=r.height,u=function(e,t){for(var n=e.mapDimension("value"),i=e.mapArray(n,(function(e){return e})),o=[],r="ascending"===t,a=0,s=e.count();a5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!this._mouseDownPoint&&pS(this,"mousemove")){var t=this._model,n=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i?null:{duration:0}})}}};function pS(e,t){var n=e._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===t}var fS=dS,gS=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},n.prototype.mergeOption=function(e){var t=this.option;e&&ie(t,e,!0),this._initDimensions()},n.prototype.contains=function(e,t){var n=e.get("parallelIndex");return null!=n&&t.getComponent("parallel",n)===this},n.prototype.setAxisExpand=function(e){u(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])}),this)},n.prototype._initDimensions=function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[],n=ue(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(e){return(e.get("parallelIndex")||0)===this.componentIndex}),this);u(n,(function(n){e.push("dim"+n.get("dim")),t.push(n.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}(sa),yS=function(t){function n(e,n,i,o,r){var a=t.call(this,e,n,i)||this;return a.type=o||"value",a.axisIndex=r,a}return e(n,t),n.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},n}(Jp),mS=yS;function vS(e,t,n,i,o,r){e=e||0;var a=n[1]-n[0];if(null!=o&&(o=_S(o,[0,a])),null!=r&&(r=Math.max(r,null!=o?o:0)),"all"===i){var s=Math.abs(t[1]-t[0]);s=_S(s,[0,a]),o=r=_S(s,[o,r]),i=0}t[0]=_S(t[0],n),t[1]=_S(t[1],n);var l=xS(t,i);t[i]+=e;var u,c=o||0,d=n.slice();return l.sign<0?d[0]+=c:d[1]-=c,t[i]=_S(t[i],d),u=xS(t,i),null!=o&&(u.sign!==l.sign||u.spanr&&(t[1-i]=t[i]+u.sign*r),t}function xS(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function _S(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var bS=u,SS=Math.min,wS=Math.max,MS=Math.floor,IS=Math.ceil,TS=Ut,DS=Math.PI,CS=function(){function e(e,t,n){this.type="parallel",this._axesMap=l(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return e.prototype._init=function(e,t,n){var i=e.dimensions,o=e.parallelAxisIndex;bS(i,(function(e,n){var i=o[n],r=t.getComponent("parallelAxis",i),a=this._axesMap.set(e,new mS(e,pp(r),[0,0],r.get("type"),i)),s="category"===a.type;a.onBand=s&&r.get("boundaryGap"),a.inverse=r.get("inverse"),r.axis=a,a.model=r,a.coordinateSystem=r.coordinateSystem=this}),this)},e.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},e.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,i=t.layoutBase,o=t.pixelDimIndex,r=e[1-o],a=e[o];return r>=n&&r<=n+t.axisLength&&a>=i&&a<=i+t.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype._updateAxesFromSeries=function(e,t){t.eachSeries((function(n){if(e.contains(n,t)){var i=n.getData();bS(this.dimensions,(function(e){var t=this._axesMap.get(e);t.scale.unionExtentFromData(i,i.mapDimension(e)),hp(t.scale,t.model)}),this)}}),this)},e.prototype.resize=function(e,t){this._rect=Qr(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var e,t=this._model,n=this._rect,i=["x","y"],o=["width","height"],r=t.get("layout"),a="horizontal"===r?0:1,s=n[o[a]],l=[0,s],u=this.dimensions.length,c=AS(t.get("axisExpandWidth"),l),d=AS(t.get("axisExpandCount")||0,[0,u]),h=t.get("axisExpandable")&&u>3&&u>d&&d>1&&c>0&&s>0,p=t.get("axisExpandWindow");p?(e=AS(p[1]-p[0],l),p[1]=p[0]+e):(e=AS(c*(d-1),l),(p=[c*(t.get("axisExpandCenter")||MS(u/2))-e/2])[1]=p[0]+e);var f=(s-e)/(u-d);f<3&&(f=0);var g=[MS(TS(p[0]/c,1))+1,IS(TS(p[1]/c,1))-1],y=f/c*p[0];return{layout:r,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[o[1-a]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:f,axisExpandWindow:p,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:y}},e.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),o=i.layout;t.each((function(e){var t=[0,i.axisLength],n=e.inverse?1:0;e.setExtent(t[n],t[1-n])})),bS(n,(function(t,n){var r=(i.axisExpandable?kS:LS)(n,i),a={horizontal:{x:r.position,y:i.axisLength},vertical:{x:0,y:r.position}},s={horizontal:DS/2,vertical:0},l=[a[o].x+e.x,a[o].y+e.y],u=s[o],c=Qe();Ue(c,c,u),it(c,c,l),this._axesLayout[t]={position:l,rotation:u,transform:c,axisNameAvailableWidth:r.axisNameAvailableWidth,axisLabelShow:r.axisLabelShow,nameTruncateMaxWidth:r.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},e.prototype.getAxis=function(e){return this._axesMap.get(e)},e.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},e.prototype.eachActiveState=function(e,t,n,i){null==n&&(n=0),null==i&&(i=e.count());var o=this._axesMap,r=this.dimensions,a=[],s=[];u(r,(function(t){a.push(e.mapDimension(t)),s.push(o.get(t).model)}));for(var l=this.hasAxisBrushed(),c=n;co*(1-c[0])?(l="jump",a=s-o*(1-c[2])):(a=s-o*c[1])>=0&&(a=s-o*(1-c[1]))<=0&&(a=0),(a*=t.axisExpandWidth/u)?vS(a,i,r,"all"):l="none";else{var h=i[1]-i[0];(i=[wS(0,r[1]*s/h-h/2)])[1]=SS(r[1],i[0]+h),i[0]=i[1]-h}return{axisExpandWindow:i,behavior:l}},e}();function AS(e,t){return SS(wS(e,t[0]),t[1])}function LS(e,t){var n=t.layoutLength/(t.axisCount-1);return{position:n*e,axisNameAvailableWidth:n,axisLabelShow:!0}}function kS(e,t){var n,i,o=t.layoutLength,r=t.axisExpandWidth,a=t.axisCount,s=t.axisCollapseWidth,l=t.winInnerIndices,u=s,c=!1;return e=0;n--)Yt(t[n])},n.prototype.getActiveState=function(e){var t=this.activeIntervals;if(!t.length)return"normal";if(null==e||isNaN(+e))return"inactive";if(1===t.length){var n=t[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var i=0,o=t.length;i6}(e)||r){if(a&&!r){"single"===s.brushMode&&$S(e);var l=oe(s);l.brushType=gw(l.brushType,a),l.panelId=true===a?null:a.panelId,r=e._creatingCover=US(e,l),e._covers.push(r)}if(r){var u=vw[gw(e._brushType,a)];r.__brushOption.range=u.getCreatingRange(dw(e,r,e._track)),i&&(YS(e,r),u.updateCommon(e,r)),ZS(e,r),o={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&KS(e,t,n)&&$S(e)&&(o={isEnd:i,removeOnClick:!0});return o}function gw(e,t){return"auto"===e?t.defaultBrushType:e}var yw={mousedown:function(e){if(this._dragging)mw(this,e);else if(!e.target||!e.target.draggable){hw(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=KS(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,i=this.group.transformCoordToLocal(t,n);if(function(e,t,n){if(e._brushType&&!function(e,t,n){var i=e._zr;return t<0||t>i.getWidth()||n<0||n>i.getHeight()}(e,t.offsetX,t.offsetY)){var i=e._zr,o=e._covers,r=KS(e,t,n);if(!e._dragging)for(var a=0;a=0&&(r[o[a].depth]=new nr(o[a],this,t));if(i&&n){var s=zb(i,n,this,!0,(function(e,t){e.wrapMethod("getItemModel",(function(e,t){var n=e.parentModel,i=n.getData().getItemLayout(t);if(i){var o=i.depth,r=n.levelModels[o];r&&(e.parentModel=r)}return e})),t.wrapMethod("getItemModel",(function(e,t){var n=e.parentModel,i=n.getGraph().getEdgeByIndex(t).node1.getLayout();if(i){var o=i.depth,r=n.levelModels[o];r&&(e.parentModel=r)}return e}))}));return s.data}},n.prototype.setNodePosition=function(e,t){var n=(this.option.data||this.option.nodes)[e];n.localX=t[0],n.localY=t[1]},n.prototype.getGraph=function(){return this.getData().graph},n.prototype.getEdgeData=function(){return this.getGraph().edgeData},n.prototype.formatTooltip=function(e,t,n){function i(e){return isNaN(e)||null==e}if("edge"===n){var o=this.getDataParams(e,n),r=o.data,a=o.value;return bl("nameValue",{name:r.source+" -- "+r.target,value:a,noValue:i(a)})}var s=this.getGraph().getNodeByIndex(e).getLayout().value,l=this.getDataParams(e,n).data.name;return bl("nameValue",{name:null!=l?l+"":null,value:s,noValue:i(s)})},n.prototype.optionUpdated=function(){},n.prototype.getDataParams=function(e,n){var i=t.prototype.getDataParams.call(this,e,n);if(null==i.value&&"node"===n){var o=this.getGraph().getNodeByIndex(e).getLayout().value;i.value=o}return i},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}(Ul),Rw=Ow;function Ew(e,t){e.eachSeriesByType("sankey",(function(e){var n=e.get("nodeWidth"),i=e.get("nodeGap"),o=function(e,t){return Qr(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t);e.layoutInfo=o;var r=o.width,a=o.height,s=e.getGraph(),l=s.nodes,c=s.edges;!function(e){u(e,(function(e){var t=Zw(e.outEdges,Yw),n=Zw(e.inEdges,Yw),i=e.getValue()||0,o=Math.max(t,n,i);e.setLayout({value:o},!0)}))}(l),function(e,t,n,i,o,r,a,s,l){(function(e,t,n,i,o,r,a){for(var s=[],l=[],c=[],d=[],h=0,p=0;p=0;v&&m.depth>f&&(f=m.depth),y.setLayout({depth:v?m.depth:h},!0),"vertical"===r?y.setLayout({dy:n},!0):y.setLayout({dx:n},!0);for(var x=0;xh-1?f:h-1;a&&"left"!==a&&function(e,t,n,i){if("right"===t){for(var o=[],r=e,a=0;r.length;){for(var s=0;s0;r--)Bw(s,l*=.99,a),zw(s,o,n,i,a),Xw(s,l,a),zw(s,o,n,i,a)}(e,t,r,o,i,a,s),function(e,t){var n="vertical"===t?"x":"y";u(e,(function(e){e.outEdges.sort((function(e,t){return e.node2.getLayout()[n]-t.node2.getLayout()[n]})),e.inEdges.sort((function(e,t){return e.node1.getLayout()[n]-t.node1.getLayout()[n]}))})),u(e,(function(e){var t=0,n=0;u(e.outEdges,(function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy})),u(e.inEdges,(function(e){e.setLayout({ty:n},!0),n+=e.getLayout().dy}))}))}(e,s)}(l,c,n,i,r,a,0!==ue(l,(function(e){return 0===e.getLayout().value})).length?0:e.get("layoutIterations"),e.get("orient"),e.get("nodeAlign"))}))}function Vw(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return null!=t.depth&&t.depth>=0}function zw(e,t,n,i,o){var r="vertical"===o?"x":"y";u(e,(function(e){var a,s,l;e.sort((function(e,t){return e.getLayout()[r]-t.getLayout()[r]}));for(var u=0,c=e.length,d="vertical"===o?"dx":"dy",h=0;h0&&(a=s.getLayout()[r]+l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[r]+s.getLayout()[d]+t;if((l=u-t-("vertical"===o?i:n))>0){a=s.getLayout()[r]-l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(h=c-2;h>=0;--h)(l=(s=e[h]).getLayout()[r]+s.getLayout()[d]+t-u)>0&&(a=s.getLayout()[r]-l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[r]}}))}function Bw(e,t,n){u(e.slice().reverse(),(function(e){u(e,(function(e){if(e.outEdges.length){var i=Zw(e.outEdges,Gw,n)/Zw(e.outEdges,Yw);if(isNaN(i)){var o=e.outEdges.length;i=o?Zw(e.outEdges,Fw,n)/o:0}if("vertical"===n){var r=e.getLayout().x+(i-Uw(e,n))*t;e.setLayout({x:r},!0)}else{var a=e.getLayout().y+(i-Uw(e,n))*t;e.setLayout({y:a},!0)}}}))}))}function Gw(e,t){return Uw(e.node2,t)*e.getValue()}function Fw(e,t){return Uw(e.node2,t)}function Ww(e,t){return Uw(e.node1,t)*e.getValue()}function Hw(e,t){return Uw(e.node1,t)}function Uw(e,t){return"vertical"===t?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function Yw(e){return e.getValue()}function Zw(e,t,n){for(var i=0,o=e.length,r=-1;++ri&&(i=t)})),u(t,(function(t){var o=new y_({type:"color",mappingMethod:"linear",dataExtent:[n,i],visual:e.get("color")}).mapValueToVisual(t.getLayout().value),r=t.getModel().get(["itemStyle","color"]);null!=r?(t.setVisual("color",r),t.setVisual("style",{fill:r})):(t.setVisual("color",o),t.setVisual("style",{fill:o}))}))}}))}var qw=function(){function e(){}return e.prototype.getInitialData=function(e,t){var n,i,o=t.getComponent("xAxis",this.get("xAxisIndex")),r=t.getComponent("yAxis",this.get("yAxisIndex")),a=o.get("type"),l=r.get("type");"category"===a?(e.layout="horizontal",n=o.getOrdinalMeta(),i=!0):"category"===l?(e.layout="vertical",n=r.getOrdinalMeta(),i=!0):e.layout=e.layout||"horizontal";var c=["x","y"],d="horizontal"===e.layout?0:1,h=this._baseAxisDim=c[d],p=c[1-d],f=[o,r],y=f[d].get("type"),m=f[1-d].get("type"),v=e.data;if(v&&i){var x=[];u(v,(function(e,t){var n;s(e)?(n=e.slice(),e.unshift(t)):s(e.value)?((n=g({},e)).value=n.value.slice(),e.value.unshift(t)):n=e,x.push(n)})),e.data=x}var _=this.defaultValueDimensions,b=[{name:h,type:kd(y),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:p,type:kd(m),dimsDef:_.slice()}];return hy(this,{coordDimensions:b,dimensionsCount:_.length+1,encodeDefaulter:se(ya,b,this)})},e.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},e}(),Kw=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],e.visualDrawType="stroke",e}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}(Ul);re(Kw,qw,!0);var Jw=Kw,$w=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.render=function(e,t,n){var i=e.getData(),o=this.group,r=this._data;this._data||o.removeAll();var a="horizontal"===e.get("layout")?1:0;i.diff(r).add((function(e){if(i.hasValue(e)){var t=tM(i.getItemLayout(e),i,e,a,!0);i.setItemGraphicEl(e,t),o.add(t)}})).update((function(e,t){var n=r.getItemGraphicEl(t);if(i.hasValue(e)){var s=i.getItemLayout(e);n?(Ki(n),nM(s,n,i,e)):n=tM(s,i,e,a),o.add(n),i.setItemGraphicEl(e,n)}else o.remove(n)})).remove((function(e){var t=r.getItemGraphicEl(e);t&&o.remove(t)})).execute(),this._data=i},n.prototype.remove=function(e){var t=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(e){e&&t.remove(e)}))},n.type="boxplot",n}(nu),Qw=function(){},eM=function(t){function n(e){var n=t.call(this,e)||this;return n.type="boxplotBoxPath",n}return e(n,t),n.prototype.getDefaultShape=function(){return new Qw},n.prototype.buildPath=function(e,t){var n=t.points,i=0;for(e.moveTo(n[i][0],n[i][1]),i++;i<4;i++)e.lineTo(n[i][0],n[i][1]);for(e.closePath();im){var S=[x,b];o.push(S)}}}return{boxData:n,outliers:o}}(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};var uM=["color","borderColor"],cM=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.render=function(e,t,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},n.prototype.incrementalPrepareRender=function(e,t,n){this._clear(),this._updateDrawMode(e)},n.prototype.incrementalRender=function(e,t,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},n.prototype.eachRendered=function(e){Io(this._progressiveEls||this.group,e)},n.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},n.prototype._renderNormal=function(e){var t=e.getData(),n=this._data,i=this.group,o=t.getLayout("isSimpleBox"),r=e.get("clip",!0),a=e.coordinateSystem,s=a.getArea&&a.getArea();this._data||i.removeAll(),t.diff(n).add((function(n){if(t.hasValue(n)){var a=t.getItemLayout(n);if(r&&fM(s,a))return;var l=pM(a,n,!0);Yi(l,{shape:{points:a.ends}},e,n),gM(l,t,n,o),i.add(l),t.setItemGraphicEl(n,l)}})).update((function(a,l){var u=n.getItemGraphicEl(l);if(t.hasValue(a)){var c=t.getItemLayout(a);r&&fM(s,c)?i.remove(u):(u?(Ui(u,{shape:{points:c.ends}},e,a),Ki(u)):u=pM(c),gM(u,t,a,o),i.add(u),t.setItemGraphicEl(a,u))}else i.remove(u)})).remove((function(e){var t=n.getItemGraphicEl(e);t&&i.remove(t)})).execute(),this._data=t},n.prototype._renderLarge=function(e){this._clear(),xM(e,this.group);var t=e.get("clip",!0)?sg(e.coordinateSystem,!1,e):null;t?this.group.setClipPath(t):this.group.removeClipPath()},n.prototype._incrementalRenderNormal=function(e,t){for(var n,i=t.getData(),o=i.getLayout("isSimpleBox");null!=(n=e.next());){var r=pM(i.getItemLayout(n));gM(r,i,n,o),r.incremental=!0,this.group.add(r),this._progressiveEls.push(r)}},n.prototype._incrementalRenderLarge=function(e,t){xM(t,this.group,this._progressiveEls,!0)},n.prototype.remove=function(e){this._clear()},n.prototype._clear=function(){this.group.removeAll(),this._data=null},n.type="candlestick",n}(nu),dM=function(){},hM=function(t){function n(e){var n=t.call(this,e)||this;return n.type="normalCandlestickBox",n}return e(n,t),n.prototype.getDefaultShape=function(){return new dM},n.prototype.buildPath=function(e,t){var n=t.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))},n}(x);function pM(e,t,n){var i=e.ends;return new hM({shape:{points:n?yM(i,e):i},z2:100})}function fM(e,t){for(var n=!0,i=0;i0?"borderColor":"borderColor0"])||n.get(["itemStyle",e>0?"color":"color0"]),r=n.getModel("itemStyle").getItemStyle(uM);t.useStyle(r),t.style.fill=null,t.style.stroke=o}var bM=cM,SM=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],e}return e(n,t),n.prototype.getShadowDim=function(){return"open"},n.prototype.brushSelector=function(e,t,n){var i=t.getItemLayout(e);return i&&n.rect(i.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}(Ul);re(SM,qw,!0);var wM=SM;function MM(e){e&&s(e.series)&&u(e.series,(function(e){o(e)&&"k"===e.type&&(e.type="candlestick")}))}var IM=["itemStyle","borderColor"],TM=["itemStyle","borderColor0"],DM=["itemStyle","color"],CM=["itemStyle","color0"],AM={seriesType:"candlestick",plan:Xl(),performRawSeries:!0,reset:function(e,t){function n(e,t){return t.get(e>0?DM:CM)}function i(e,t){return t.get(e>0?IM:TM)}if(!t.isSeriesFiltered(e))return!e.pipelineContext.large&&{progress:function(e,t){for(var o;null!=(o=e.next());){var r=t.getItemModel(o),a=t.getItemLayout(o).sign,s=r.getItemStyle();s.fill=n(a,r),s.stroke=i(a,r)||s.fill;var l=t.ensureUniqueItemVisual(o,"style");g(l,s)}}}}},LM={seriesType:"candlestick",plan:Xl(),reset:function(e){var t=e.coordinateSystem,i=e.getData(),o=function(e,t){var n,i=e.getBaseAxis(),o="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/t.count()),r=Ht(S(e.get("barMaxWidth"),o),o),a=Ht(S(e.get("barMinWidth"),1),o),s=e.get("barWidth");return null!=s?Ht(s,o):Math.max(Math.min(o/2,r),a)}(e,i),r=["x","y"],a=i.getDimensionIndex(i.mapDimension(r[0])),s=n(i.mapDimensionsAll(r[1]),i.getDimensionIndex,i),l=s[0],u=s[1],c=s[2],d=s[3];if(i.setLayout({candleWidth:o,isSimpleBox:o<=1.3}),!(a<0||s.length<4))return{progress:e.pipelineContext.large?function(e,n){var i,o,r=Lh(4*e.count),s=0,h=[],p=[],f=n.getStore();for(;null!=(o=e.next());){var g=f.get(a,o),y=f.get(l,o),m=f.get(u,o),v=f.get(c,o),x=f.get(d,o);isNaN(g)||isNaN(v)||isNaN(x)?(r[s++]=NaN,s+=3):(r[s++]=kM(f,o,y,m,u),h[0]=g,h[1]=v,i=t.dataToPoint(h,null,p),r[s++]=i?i[0]:NaN,r[s++]=i?i[1]:NaN,h[1]=x,i=t.dataToPoint(h,null,p),r[s++]=i?i[1]:NaN)}n.setLayout("largePoints",r)}:function(e,n){var i,r=n.getStore();for(;null!=(i=e.next());){var s=r.get(a,i),h=r.get(l,i),p=r.get(u,i),f=r.get(c,i),g=r.get(d,i),y=Math.min(h,p),m=Math.max(h,p),v=w(y,s),x=w(m,s),_=w(f,s),b=w(g,s),S=[];M(S,x,0),M(S,v,1),S.push(T(b),T(x),T(_),T(v)),n.setItemLayout(i,{sign:kM(r,i,h,p,u),initBaseline:h>p?x[1]:v[1],ends:S,brushRect:I(f,g,s)})}function w(e,n){var i=[];return i[0]=n,i[1]=e,isNaN(n)||isNaN(e)?[NaN,NaN]:t.dataToPoint(i)}function M(e,t,n){var i=t.slice(),r=t.slice();i[0]=co(i[0]+o/2,1,!1),r[0]=co(r[0]-o/2,1,!0),n?e.push(i,r):e.push(r,i)}function I(e,t,n){var i=w(e,n),r=w(t,n);return i[0]-=o/2,r[0]-=o/2,{x:i[0],y:i[1],width:o,height:r[1]-i[1]}}function T(e){return e[0]=co(e[0],1),e}}}}};function kM(e,t,n,i,o){return n>i?-1:n0?e.get(o,t-1)<=i?1:-1:1}var PM=LM;function NM(e,t){var n=t.rippleEffectColor||t.color;e.eachChild((function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:"stroke"===t.brushType?n:null,fill:"fill"===t.brushType?n:null}})}))}var OM=function(t){function n(e,n){var i=t.call(this)||this,o=new Hf(e,n),r=new X;return i.add(o),i.add(r),i.updateData(e,n),i}return e(n,t),n.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},n.prototype.startEffectAnimation=function(e){for(var t=e.symbolType,n=e.color,i=e.rippleNumber,o=this.childAt(1),r=0;r0&&(r=this._getLineLength(i)/s*1e3),r!==this._period||a!==this._loop){i.stopAnimation();var u=void 0;u=p(l)?l(n):l,i.__t>0&&(u=-r*i.__t),this._animateSymbol(i,r,u,a)}this._period=r,this._loop=a}},n.prototype._animateSymbol=function(e,t,n,i){if(t>0){e.__t=0;var o=this,r=e.animate("",i).when(t,{__t:1}).delay(n).during((function(){o._updateSymbolPosition(e)}));i||r.done((function(){o.remove(e)})),r.start()}},n.prototype._getLineLength=function(e){return Pe(e.__p1,e.__cp1)+Pe(e.__cp1,e.__p2)},n.prototype._updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},n.prototype.updateData=function(e,t,n){this.childAt(0).updateData(e,t,n),this._updateEffectSymbol(e,t)},n.prototype._updateSymbolPosition=function(e){var t=e.__p1,n=e.__p2,i=e.__cp1,o=e.__t,r=[e.x,e.y],a=r.slice(),s=vt,l=St;r[0]=s(t[0],i[0],n[0],o),r[1]=s(t[1],i[1],n[1],o);var u=l(t[0],i[0],n[0],o),c=l(t[1],i[1],n[1],o);e.rotation=-Math.atan2(c,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==e.__lastT&&e.__lastT=0&&!(i[r]<=t);r--);r=Math.min(r,o-2)}else{for(r=a;rt);r++);r=Math.min(r-1,o-2)}var s=(t-i[r])/(i[r+1]-i[r]),l=n[r],u=n[r+1];e.x=l[0]*(1-s)+s*u[0],e.y=l[1]*(1-s)+s*u[1];var c=u[0]-l[0],d=u[1]-l[1];e.rotation=-Math.atan2(d,c)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=t,e.ignore=!1}},n}(BM),HM=WM,UM=function(){this.polyline=!1,this.curveness=0,this.segs=[]},YM=function(t){function n(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}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 UM},n.prototype.buildPath=function(e,t){var n,i=t.segs,o=t.curveness;if(t.polyline)for(n=this._off;n0){e.moveTo(i[n++],i[n++]);for(var a=1;a0){var d=(s+u)/2-(l-c)*o,h=(l+c)/2-(u-s)*o;e.quadraticCurveTo(d,h,u,c)}else e.lineTo(u,c)}this.incremental&&(this._off=n,this.notClear=!0)},n.prototype.findDataIndex=function(e,t){var n=this.shape,i=n.segs,o=n.curveness,r=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s0)for(var u=i[s++],c=i[s++],d=1;d0){if(Mt(u,c,(u+h)/2-(c-p)*o,(c+p)/2-(h-u)*o,h,p,r,e,t))return a}else if(wt(u,c,h,p,r,e,t))return a;a++}return-1},n.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),i=this.getBoundingRect();return e=n[0],t=n[1],i.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},n.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape.segs,n=1/0,i=1/0,o=-1/0,r=-1/0,a=0;a0&&(r.dataIndex=n+e.__startIndex)}))},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),XM={seriesType:"lines",plan:Xl(),reset:function(e){var t=e.coordinateSystem;if(t){var n=e.get("polyline"),i=e.pipelineContext.large;return{progress:function(o,r){var a=[];if(i){var s=void 0,l=o.end-o.start;if(n){for(var u=0,c=o.start;c0&&(l||s.configLayer(r,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),o.updateData(i);var u=e.get("clip",!0)&&sg(e.coordinateSystem,!1,e);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=r,this._finished=!0},n.prototype.incrementalPrepareRender=function(e,t,n){var i=e.getData();this._updateLineDraw(i,e).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},n.prototype.incrementalRender=function(e,t,n){this._lineDraw.incrementalUpdate(e,t.getData()),this._finished=e.end===t.getData().count()},n.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},n.prototype.updateTransform=function(e,t,n){var i=e.getData(),o=e.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var r=jM.reset(e,t,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},n.prototype._updateLineDraw=function(e,t){var n=this._lineDraw,i=this._showEffect(t),o=!!t.get("polyline"),r=t.pipelineContext.large;return n&&i===this._hasEffet&&o===this._isPolyline&&r===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=r?new ZM:new _b(o?i?HM:FM:i?BM:yb),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=r),this.group.add(n.group),n},n.prototype._showEffect=function(e){return!!e.get(["effect","show"])},n.prototype._clearLayer=function(e){var t=e.getZr();"svg"===t.painter.getType()||null==this._lastZlevel||t.painter.getLayer(this._lastZlevel).clear(!0)},n.prototype.remove=function(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)},n.prototype.dispose=function(e,t){this.remove(e,t)},n.type="lines",n}(nu),KM="undefined"==typeof Uint32Array?Array:Uint32Array,JM="undefined"==typeof Float64Array?Array:Float64Array;function $M(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=n(t,(function(e){var t={coords:[e[0].coord,e[1].coord]};return e[0].name&&(t.fromName=e[0].name),e[1].name&&(t.toName=e[1].name),tt([t,e[0],e[1]])})))}var QM=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e.visualStyleAccessPath="lineStyle",e.visualDrawType="stroke",e}return e(n,t),n.prototype.init=function(e){e.data=e.data||[],$M(e);var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},n.prototype.mergeOption=function(e){if($M(e),e.data){var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},n.prototype.appendData=function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=he(this._flatCoords,t.flatCoords),this._flatCoordsOffset=he(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},n.prototype._getCoordsFromItemModel=function(e){var t=this.getData().getItemModel(e);return t.option instanceof Array?t.option:t.getShallow("coords")},n.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[2*e+1]:this._getCoordsFromItemModel(e).length},n.prototype.getLineCoords=function(e,t){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*e],i=this._flatCoordsOffset[2*e+1],o=0;o ")})},n.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},n.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?1e4:this.get("progressive"):e},n.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?2e4:this.get("progressiveThreshold"):e},n.prototype.getZLevelKey=function(){var e=this.getModel("effect"),t=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&t>0?t+"":""},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}(Ul),eI=QM;function tI(e){return e instanceof Array||(e=[e,e]),e}var nI={seriesType:"lines",reset:function(e){var t=tI(e.get("symbol")),n=tI(e.get("symbolSize")),i=e.getData();return i.setVisual("fromSymbol",t&&t[0]),i.setVisual("toSymbol",t&&t[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),{dataEach:i.hasItemOption?function(e,t){var n=e.getItemModel(t),i=tI(n.getShallow("symbol",!0)),o=tI(n.getShallow("symbolSize",!0));i[0]&&e.setItemVisual(t,"fromSymbol",i[0]),i[1]&&e.setItemVisual(t,"toSymbol",i[1]),o[0]&&e.setItemVisual(t,"fromSymbolSize",o[0]),o[1]&&e.setItemVisual(t,"toSymbolSize",o[1])}:null}}};var iI=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=ye.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,i,o,r){var a=this._getBrush(),s=this._getGradient(o,"inRange"),l=this._getGradient(o,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,d=c.getContext("2d"),h=e.length;c.width=t,c.height=n;for(var p=0;p0){var I=r(m)?s:l;m>0&&(m=m*w+S),x[_++]=I[M],x[_++]=I[M+1],x[_++]=I[M+2],x[_++]=I[M+3]*m*256}else _+=4}return d.putImageData(v,0,0),c},e.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=ye.createCanvas()),t=this.pointSize+this.blurSize,n=2*t;e.width=n,e.height=n;var i=e.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-t,t,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,i=n[t]||(n[t]=new Uint8ClampedArray(1024)),o=[0,0,0,0],r=0,a=0;a<256;a++)e[t](a/255,!0,o),i[r++]=o[0],i[r++]=o[1],i[r++]=o[2],i[r++]=o[3];return i},e}(),oI=iI;function rI(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}var aI=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=i.type,e}return e(i,t),i.prototype.render=function(e,t,n){var i;t.eachComponent("visualMap",(function(t){t.eachTargetSeries((function(n){n===e&&(i=t)}))})),this._progressiveEls=null,this.group.removeAll();var o=e.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):rI(o)&&this._renderOnGeo(o,e,i,n)},i.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},i.prototype.incrementalRender=function(e,t,n,i){var o=t.coordinateSystem;o&&(rI(o)?this.render(t,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(t,i,e.start,e.end,!0)))},i.prototype.eachRendered=function(e){Io(this._progressiveEls||this.group,e)},i.prototype._renderOnCartesianAndCalendar=function(e,t,n,i,o){var r,a,s,l,u=e.coordinateSystem,c=lg(u,"cartesian2d");if(c){var d=u.getAxis("x"),h=u.getAxis("y");r=d.getBandWidth()+.5,a=h.getBandWidth()+.5,s=d.scale.getExtent(),l=h.scale.getExtent()}for(var p=this.group,f=e.getData(),g=e.getModel(["emphasis","itemStyle"]).getItemStyle(),y=e.getModel(["blur","itemStyle"]).getItemStyle(),m=e.getModel(["select","itemStyle"]).getItemStyle(),v=e.get(["itemStyle","borderRadius"]),x=ko(e),_=e.getModel("emphasis"),b=_.get("focus"),S=_.get("blurScope"),w=_.get("disabled"),M=c?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],I=n;Is[1]||Al[1])continue;var L=u.dataToPoint([C,A]);T=new E({shape:{x:L[0]-r/2,y:L[1]-a/2,width:r,height:a},style:D})}else{if(isNaN(f.get(M[1],I)))continue;T=new E({z2:1,shape:u.dataToRect([f.get(M[0],I)]).contentShape,style:D})}if(f.hasItemOption){var k=f.getItemModel(I),P=k.getModel("emphasis");g=P.getModel("itemStyle").getItemStyle(),y=k.getModel(["blur","itemStyle"]).getItemStyle(),m=k.getModel(["select","itemStyle"]).getItemStyle(),v=k.get(["itemStyle","borderRadius"]),b=P.get("focus"),S=P.get("blurScope"),w=P.get("disabled"),x=ko(k)}T.shape.r=v;var N=e.getRawValue(I),O="-";N&&null!=N[2]&&(O=N[2]+""),Lo(T,x,{labelFetcher:e,labelDataIndex:I,defaultOpacity:D.opacity,defaultText:O}),T.ensureState("emphasis").style=g,T.ensureState("blur").style=y,T.ensureState("select").style=m,Pi(T,b,S,w),T.incremental=o,o&&(T.states.emphasis.hoverLayer=!0),p.add(T),f.setItemGraphicEl(I,T),this._progressiveEls&&this._progressiveEls.push(T)}},i.prototype._renderOnGeo=function(e,t,i,o){var r=i.targetVisuals.inRange,a=i.targetVisuals.outOfRange,s=t.getData(),l=this._hmLayer||this._hmLayer||new oI;l.blurSize=t.get("blurSize"),l.pointSize=t.get("pointSize"),l.minOpacity=t.get("minOpacity"),l.maxOpacity=t.get("maxOpacity");var u=e.getViewRect().clone(),c=e.getRoamTransform();u.applyTransform(c);var d=Math.max(u.x,0),h=Math.max(u.y,0),p=Math.min(u.width+u.x,o.getWidth()),f=Math.min(u.height+u.y,o.getHeight()),g=p-d,y=f-h,m=[s.mapDimension("lng"),s.mapDimension("lat"),s.mapDimension("value")],v=s.mapArray(m,(function(t,n,i){var o=e.dataToPoint([t,n]);return o[0]-=d,o[1]-=h,o.push(i),o})),x=i.getExtent(),_="visualMap.continuous"===i.type?function(e,t){var n=e[1]-e[0];return t=[(t[0]-e[0])/n,(t[1]-e[0])/n],function(e){return e>=t[0]&&e<=t[1]}}(x,i.option.range):function(e,t,i){var o=e[1]-e[0],r=(t=n(t,(function(t){return{interval:[(t.interval[0]-e[0])/o,(t.interval[1]-e[0])/o]}}))).length,a=0;return function(e){var n;for(n=a;n=0;n--){var o;if((o=t[n].interval)[0]<=e&&e<=o[1]){a=n;break}}return n>=0&&n0?1:-1}(n,r,o,i,h),function(e,t,n,i,o,r,a,l,u,c){var d,h=u.valueDim,p=u.categoryDim,f=Math.abs(n[p.wh]),g=e.getItemVisual(t,"symbolSize");d=s(g)?g.slice():null==g?["100%","100%"]:[g,g];d[p.index]=Ht(d[p.index],f),d[h.index]=Ht(d[h.index],i?f:Math.abs(r)),c.symbolSize=d,(c.symbolScale=[d[0]/l,d[1]/l])[h.index]*=(u.isHorizontal?-1:1)*a}(e,t,o,r,0,h.boundingLength,h.pxSign,c,i,h),function(e,t,n,i,o){var r=e.get(uI)||0;r&&(dI.attr({scaleX:t[0],scaleY:t[1],rotation:n}),dI.updateTransform(),r/=dI.getLineScale(),r*=t[i.valueDim.index]);o.valueLineWidth=r||0}(n,h.symbolScale,u,i,h);var p=h.symbolSize,f=ac(n.get("symbolOffset"),p);return function(e,t,n,i,o,r,a,s,l,u,c,d){var h=c.categoryDim,p=c.valueDim,f=d.pxSign,y=Math.max(t[p.index]+s,0),m=y;if(i){var v=Math.abs(l),x=He(e.get("symbolMargin"),"15%")+"",_=!1;x.lastIndexOf("!")===x.length-1&&(_=!0,x=x.slice(0,x.length-1));var b=Ht(x,t[p.index]),S=Math.max(y+2*b,0),w=_?0:2*b,M=ln(i),I=M?i:CI((v+w)/S);S=y+2*(b=(v-I*y)/2/(_?I:Math.max(I-1,1))),w=_?0:2*b,M||"fixed"===i||(I=u?CI((Math.abs(u)+w)/S):0),m=I*S-w,d.repeatTimes=I,d.symbolMargin=b}var T=f*(m/2),D=d.pathPosition=[];D[h.index]=n[h.wh]/2,D[p.index]="start"===a?T:"end"===a?l-T:l/2,r&&(D[0]+=r[0],D[1]+=r[1]);var C=d.bundlePosition=[];C[h.index]=n[h.xy],C[p.index]=n[p.xy];var A=d.barRectShape=g({},n);A[p.wh]=f*Math.max(Math.abs(n[p.wh]),Math.abs(D[p.index]+T)),A[h.wh]=n[h.wh];var L=d.clipShape={};L[h.xy]=-n[h.xy],L[h.wh]=c.ecSize[h.wh],L[p.xy]=0,L[p.wh]=n[p.wh]}(n,p,o,r,0,f,l,h.valueLineWidth,h.boundingLength,h.repeatCutLength,i,h),h}function pI(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function fI(e){var t=e.symbolPatternSize,n=oc(e.symbolType,-t/2,-t/2,t,t);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function gI(e,t,n,i){var o=e.__pictorialBundle,r=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=t.valueDim,u=n.repeatTimes||0,c=0,d=r[t.valueDim.index]+a+2*n.symbolMargin;for(II(e,(function(e){e.__pictorialAnimationIndex=c,e.__pictorialRepeatTimes=u,c0:i<0)&&(o=u-1-e),t[l.index]=d*(o-u/2+.5)+s[l.index],{x:t[0],y:t[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function yI(e,t,n,i){var o=e.__pictorialBundle,r=e.__pictorialMainPath;r?TI(r,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(r=e.__pictorialMainPath=fI(n),o.add(r),TI(r,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function mI(e,t,n){var i=g({},t.barRectShape),o=e.__pictorialBarRect;o?TI(o,null,{shape:i},t,n):((o=e.__pictorialBarRect=new E({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,e.add(o))}function vI(e,t,n,i){if(n.symbolClip){var o=e.__pictorialClipPath,r=g({},n.clipShape),a=t.valueDim,s=n.animationModel,l=n.dataIndex;if(o)Ui(o,{shape:r},s,l);else{r[a.wh]=0,o=new E({shape:r}),e.__pictorialBundle.setClipPath(o),e.__pictorialClipPath=o;var u={};u[a.wh]=n.clipShape[a.wh],To[i?"updateProps":"initProps"](o,{shape:u},s,l)}}}function xI(e,t){var n=e.getItemModel(t);return n.getAnimationDelayParams=_I,n.isAnimationEnabled=bI,n}function _I(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function bI(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function SI(e,t,n,i){var o=new X,r=new X;return o.add(r),o.__pictorialBundle=r,r.x=n.bundlePosition[0],r.y=n.bundlePosition[1],n.symbolRepeat?gI(o,t,n):yI(o,0,n),mI(o,n,i),vI(o,t,n,i),o.__pictorialShapeStr=MI(e,n),o.__pictorialSymbolMeta=n,o}function wI(e,t,n,i){var o=i.__pictorialBarRect;o&&o.removeTextContent();var r=[];II(i,(function(e){r.push(e)})),i.__pictorialMainPath&&r.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),u(r,(function(e){Xi(e,{scaleX:0,scaleY:0},n,t,(function(){i.parent&&i.parent.remove(i)}))})),e.setItemGraphicEl(t,null)}function MI(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function II(e,t,n){u(e.__pictorialBundle.children(),(function(i){i!==e.__pictorialBarRect&&t.call(n,i)}))}function TI(e,t,n,i,o,r){t&&e.attr(t),i.symbolClip&&!o?n&&e.attr(n):n&&To[o?"updateProps":"initProps"](e,n,i.animationModel,i.dataIndex,r)}function DI(e,t,n){var i=n.dataIndex,o=n.itemModel,r=o.getModel("emphasis"),a=r.getModel("itemStyle").getItemStyle(),s=o.getModel(["blur","itemStyle"]).getItemStyle(),l=o.getModel(["select","itemStyle"]).getItemStyle(),u=o.getShallow("cursor"),c=r.get("focus"),d=r.get("blurScope"),h=r.get("scale");II(e,(function(e){if(e instanceof M){var t=e.style;e.useStyle(g({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height},n.style))}else e.useStyle(n.style);var i=e.ensureState("emphasis");i.style=a,h&&(i.scaleX=1.1*e.scaleX,i.scaleY=1.1*e.scaleY),e.ensureState("blur").style=s,e.ensureState("select").style=l,u&&(e.cursor=u),e.z2=n.z2}));var p=t.valueDim.posDesc[+(n.boundingLength>0)];Lo(e.__pictorialBarRect,ko(o),{labelFetcher:t.seriesModel,labelDataIndex:i,defaultText:Bf(t.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:p}),Pi(e,c,d,r.get("disabled"))}function CI(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var AI=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.render=function(e,t,n){var i=this.group,o=e.getData(),r=this._data,a=e.coordinateSystem,s=a.getBaseAxis().isHorizontal(),l=a.master.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:a,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:cI[+s],categoryDim:cI[1-+s]};return o.diff(r).add((function(e){if(o.hasValue(e)){var t=xI(o,e),n=hI(o,e,t,u),r=SI(o,u,n);o.setItemGraphicEl(e,r),i.add(r),DI(r,u,n)}})).update((function(e,t){var n=r.getItemGraphicEl(t);if(o.hasValue(e)){var a=xI(o,e),s=hI(o,e,a,u),l=MI(o,s);n&&l!==n.__pictorialShapeStr&&(i.remove(n),o.setItemGraphicEl(e,null),n=null),n?function(e,t,n){var i=n.animationModel,o=n.dataIndex;Ui(e.__pictorialBundle,{x:n.bundlePosition[0],y:n.bundlePosition[1]},i,o),n.symbolRepeat?gI(e,t,n,!0):yI(e,t,n,!0);mI(e,n,!0),vI(e,t,n,!0)}(n,u,s):n=SI(o,u,s,!0),o.setItemGraphicEl(e,n),n.__pictorialSymbolMeta=s,i.add(n),DI(n,u,s)}else i.remove(n)})).remove((function(e){var t=r.getItemGraphicEl(e);t&&wI(r,e,t.__pictorialSymbolMeta.animationModel,t)})).execute(),this._data=o,this.group},n.prototype.remove=function(e,t){var n=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl((function(t){wI(i,Xn(t).dataIndex,e,t)})):n.removeAll()},n.type="pictorialBar",n}(nu),LI=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e.hasSymbolVisual=!0,e.defaultSymbol="roundRect",e}return e(n,t),n.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},n.type="series.pictorialBar",n.dependencies=["grid"],n.defaultOption=rr(Tg.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}(Tg);var kI=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e._layers=[],e}return e(n,t),n.prototype.render=function(e,t,n){var i=e.getData(),o=this,r=this.group,a=e.getLayerSeries(),s=i.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function c(e){return e.name}r.x=0,r.y=l.y+u[0];var d=new Cd(this._layersSeries||[],a,c,c),h=[];function p(t,n,s){var l=o._layers;if("remove"!==t){for(var u,c,d=[],p=[],f=a[n].indices,g=0;gr&&(r=s),i.push(s)}for(var u=0;ur&&(r=d)}return{y0:o,max:r}}(u),d=c.y0,h=i/c.max,p=a.length,f=a[0].indices.length,g=0;gMath.PI/2?"right":"left"):M&&"center"!==M?"left"===M?(x=o.r0+w,s>Math.PI/2&&(M="right")):"right"===M&&(x=o.r-w,s>Math.PI/2&&(M="left")):(x=a===2*Math.PI&&0===o.r0?0:(o.r+o.r0)/2,M="center"),g.style.align=M,g.style.verticalAlign=y(u,"verticalAlign")||"middle",g.x=x*l+o.cx,g.y=x*c+o.cy;var I=y(u,"rotate"),T=0;"radial"===I?(T=-s)<-Math.PI/2&&(T+=Math.PI):"tangential"===I?(T=Math.PI/2-s)>Math.PI/2?T-=Math.PI:T<-Math.PI/2&&(T+=Math.PI):r(I)&&(T=I*Math.PI/180),g.rotation=T})),h.dirtyStyle()},n}(P),zI=VI;var BI=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.render=function(e,t,n,i){var o=this;this.seriesModel=e,this.api=n,this.ecModel=t;var r=e.getData(),a=r.tree.root,s=e.getViewRoot(),l=this.group,u=e.get("renderLabelForZeroData"),c=[];s.eachNode((function(e){c.push(e)}));var d=this._oldChildren||[];!function(i,o){if(0===i.length&&0===o.length)return;function s(e){return e.getId()}function c(s,c){!function(i,o){u||!i||i.getValue()||(i=null);if(i!==a&&o!==a)if(o&&o.piece)i?(o.piece.updateData(!1,i,e,t,n),r.setItemGraphicEl(i.dataIndex,o.piece)):function(e){if(!e)return;e.piece&&(l.remove(e.piece),e.piece=null)}(o);else if(i){var s=new zI(i,e,t,n);l.add(s),r.setItemGraphicEl(i.dataIndex,s)}}(null==s?null:i[s],null==c?null:o[c])}new Cd(o,i,s,s).add(c).update(c).remove(se(c,null)).execute()}(c,d),function(i,r){r.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,i,e,t,n):(o.virtualPiece=new zI(i,e,t,n),l.add(o.virtualPiece)),r.piece.off("click"),o.virtualPiece.on("click",(function(e){o._rootToNode(r.parentNode)}))):o.virtualPiece&&(l.remove(o.virtualPiece),o.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=c},n.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",(function(t){var n=!1;e.seriesModel.getViewRoot().eachNode((function(i){if(!n&&i.piece&&i.piece===t.target){var o=i.getModel().get("nodeClick");if("rootToNode"===o)e._rootToNode(i);else if("link"===o){var r=i.getModel(),a=r.get("link");if(a)Xr(a,r.get("target",!0)||"_blank")}n=!0}}))}))},n.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},n.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var i=e[0]-n.cx,o=e[1]-n.cy,r=Math.sqrt(i*i+o*o);return r<=n.r&&r>=n.r0}},n.type="sunburst",n}(nu),GI=BI;function FI(e){var t=0;u(e.children,(function(e){FI(e);var n=e.value;s(n)&&(n=n[0]),t+=n}));var n=e.value;s(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),s(e.value)?e.value[0]=n:e.value=n}var WI=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=i.type,e.ignoreStyleOnData=!0,e}return e(i,t),i.prototype.getInitialData=function(e,t){var i={name:e.name,children:e.data};FI(i);var o=this._levelModels=n(e.levels||[],(function(e){return new nr(e,this,t)}),this),r=Lx.createTree(i,this,(function(e){e.wrapMethod("getItemModel",(function(e,t){var n=r.getNodeByDataIndex(t),i=o[n.depth];return i&&(e.parentModel=i),e}))}));return r.data},i.prototype.optionUpdated=function(){this.resetViewRoot()},i.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=Ox(i,this),n},i.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},i.prototype.getViewRoot=function(){return this._viewRoot},i.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)},i.prototype.enableAriaDecal=function(){Fx(this)},i.type="series.sunburst",i.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"},i}(Ul),HI=Math.PI/180;function UI(e,t,n){t.eachSeriesByType(e,(function(e){var t=e.get("center"),i=e.get("radius");s(i)||(i=[0,i]),s(t)||(t=[t,t]);var o=n.getWidth(),r=n.getHeight(),a=Math.min(o,r),l=Ht(t[0],o),c=Ht(t[1],r),d=Ht(i[0],a/2),h=Ht(i[1],a/2),p=-e.get("startAngle")*HI,f=e.get("minAngle")*HI,g=e.getData().tree.root,y=e.getViewRoot(),m=y.depth,v=e.get("sort");null!=v&&YI(y,v);var x=0;u(y.children,(function(e){!isNaN(e.getValue())&&x++}));var _=y.getValue(),b=Math.PI/(_||x)*2,S=y.depth>0,w=y.height-(S?-1:1),M=(h-d)/(w||1),I=e.get("clockwise"),T=e.get("stillShowZeroSum"),D=I?1:-1,C=function(t,n){if(t){var i=n;if(t!==g){var o=t.getValue(),r=0===_&&T?b:o*b;r1;)r=r.parentNode;var a=n.getColorFromPalette(r.name||r.dataIndex+"",t);return e.depth>1&&i(a)&&(a=_(a,(e.depth-1)/(o-1)*.5)),a}(r,e,o.root.height));var s=n.ensureUniqueItemVisual(r.dataIndex,"style");g(s,a)}))}))}var XI={color:"fill",borderColor:"stroke"},jI={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},qI=Tn(),KI=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},n.prototype.getInitialData=function(e,t){return lh(null,this)},n.prototype.getDataParams=function(e,n,i){var o=t.prototype.getDataParams.call(this,e,n);return i&&(o.info=qI(i).info),o},n.type="series.custom",n.dependencies=["grid","polar","geo","singleAxis","calendar"],n.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},n}(Ul);function JI(e,t){return t=t||[0,0],n(["x","y"],(function(n,i){var o=this.getAxis(n),r=t[i],a=e[i]/2;return"category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(r-a)-o.dataToCoord(r+a))}),this)}function $I(e,t){return t=t||[0,0],n([0,1],(function(n){var i=t[n],o=e[n]/2,r=[],a=[];return r[n]=i-o,a[n]=i+o,r[1-n]=a[1-n]=t[1-n],Math.abs(this.dataToPoint(r)[n]-this.dataToPoint(a)[n])}),this)}function QI(e,t){var n=this.getAxis(),i=t instanceof Array?t[0]:t,o=(e instanceof Array?e[0]:e)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))}function eT(e,t){return t=t||[0,0],n(["Radius","Angle"],(function(n,i){var o=this["get"+n+"Axis"](),r=t[i],a=e[i]/2,s="category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(r-a)-o.dataToCoord(r+a));return"Angle"===n&&(s=s*Math.PI/180),s}),this)}function tT(e,t,n,i){return e&&(e.legacy||!1!==e.legacy&&!n&&!i&&"tspan"!==t&&("text"===t||Z(e,"text")))}function nT(e,t,n){var i,o,r,a=e;if("text"===t)r=a;else{r={},Z(a,"text")&&(r.text=a.text),Z(a,"rich")&&(r.rich=a.rich),Z(a,"textFill")&&(r.fill=a.textFill),Z(a,"textStroke")&&(r.stroke=a.textStroke),Z(a,"fontFamily")&&(r.fontFamily=a.fontFamily),Z(a,"fontSize")&&(r.fontSize=a.fontSize),Z(a,"fontStyle")&&(r.fontStyle=a.fontStyle),Z(a,"fontWeight")&&(r.fontWeight=a.fontWeight),o={type:"text",style:r,silent:!0},i={};var s=Z(a,"textPosition");n?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),Z(a,"textPosition")&&(i.position=a.textPosition),Z(a,"textOffset")&&(i.offset=a.textOffset),Z(a,"textRotation")&&(i.rotation=a.textRotation),Z(a,"textDistance")&&(i.distance=a.textDistance)}return iT(r,e),u(r.rich,(function(e){iT(e,e)})),{textConfig:i,textContent:o}}function iT(e,t){t&&(t.font=t.textFont||t.font,Z(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),Z(t,"textAlign")&&(e.align=t.textAlign),Z(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),Z(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),Z(t,"textWidth")&&(e.width=t.textWidth),Z(t,"textHeight")&&(e.height=t.textHeight),Z(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),Z(t,"textPadding")&&(e.padding=t.textPadding),Z(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),Z(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),Z(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),Z(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),Z(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),Z(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),Z(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function oT(e,t,n){var i=e;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var o=i.textPosition.indexOf("inside")>=0,r=e.fill||"#000";rT(i,t);var a=null==i.textFill;return o?a&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),!i.textStroke&&(i.textStroke=r),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(a&&(i.textFill=e.fill||n.outsideFill||"#000"),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=t.text,i.rich=t.rich,u(t.rich,(function(e){rT(e,e)})),i}function rT(e,t){t&&(Z(t,"fill")&&(e.textFill=t.fill),Z(t,"stroke")&&(e.textStroke=t.fill),Z(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),Z(t,"font")&&(e.font=t.font),Z(t,"fontStyle")&&(e.fontStyle=t.fontStyle),Z(t,"fontWeight")&&(e.fontWeight=t.fontWeight),Z(t,"fontSize")&&(e.fontSize=t.fontSize),Z(t,"fontFamily")&&(e.fontFamily=t.fontFamily),Z(t,"align")&&(e.textAlign=t.align),Z(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),Z(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),Z(t,"width")&&(e.textWidth=t.width),Z(t,"height")&&(e.textHeight=t.height),Z(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),Z(t,"padding")&&(e.textPadding=t.padding),Z(t,"borderColor")&&(e.textBorderColor=t.borderColor),Z(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),Z(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),Z(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),Z(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),Z(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),Z(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),Z(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),Z(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),Z(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),Z(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var aT={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},sT=v(aT);t(It,(function(e,t){return e[t]=1,e}),{}),It.join(", ");var lT=["","style","shape","extra"],uT=Tn();function cT(e,t,n,i,o){var r=e+"Animation",a=Wi(e,i,o)||{},s=uT(t).userDuring;return a.duration>0&&(a.during=s?ce(mT,{el:t,userDuring:s}):null,a.setToFinal=!0,a.scope=e),g(a,n[r]),a}function dT(e,t,n,i){var o=(i=i||{}).dataIndex,r=i.isInit,a=i.clearStyle,s=n.isAnimationEnabled(),l=uT(e),d=t.style;l.userDuring=t.during;var h={},p={};if(function(e,t,n){for(var i=0;i=0)){var h=e.getAnimationStyleProps(),p=h?h.style:null;if(p){!o&&(o=i.style={});var f=v(n);for(u=0;u0&&e.animateFrom(f,y)}else!function(e,t,n,i,o){if(o){var r=cT("update",e,t,i,n);r.duration>0&&e.animateFrom(o,r)}}(e,t,o||0,n,h);hT(e,t),d?e.dirty():e.markRedraw()}function hT(e,t){for(var n=uT(e).leaveToProps,i=0;i=0){!r&&(r=i[e]={});var p=v(a);for(d=0;di[1]&&i.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:i[1],r0:i[0]},api:{coord:function(i){var o=t.dataToRadius(i[0]),r=n.dataToAngle(i[1]),a=e.coordToPoint([o,r]);return a.push(o,r*Math.PI/180),a},size:ce(eT,e)}}},calendar:function(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)}}}}};function PT(e){return e instanceof x}function NT(e){return e instanceof Je}var OT=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.render=function(e,t,n,i){this._progressiveEls=null;var o=this._data,r=e.getData(),a=this.group,s=BT(e,r,t,n);o||a.removeAll(),r.diff(o).add((function(t){FT(n,null,t,s(t,i),e,a,r)})).remove((function(t){var n=o.getItemGraphicEl(t);pT(n,qI(n).option,e)})).update((function(t,l){var u=o.getItemGraphicEl(l);FT(n,u,t,s(t,i),e,a,r)})).execute();var l=e.get("clip",!0)?sg(e.coordinateSystem,!1,e):null;l?a.setClipPath(l):a.removeClipPath(),this._data=r},n.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll(),this._data=null},n.prototype.incrementalRender=function(e,t,n,i,o){var r=t.getData(),a=BT(t,r,n,i),s=this._progressiveEls=[];function l(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}for(var u=e.start;u=0?t.getStore().get(o,n):void 0}var r=t.get(i.name,n),a=i&&i.ordinalMeta;return a?a.categories[r]:r},styleEmphasis:function(n,i){null==i&&(i=l);var o=x(i,"emphasis").getItemStyle(),r=_(i,"emphasis"),a=Po(r,null,null,!0,!0);a.text=r.getShallow("show")?We(e.getFormattedLabel(i,"emphasis"),e.getFormattedLabel(i,"normal"),Bf(t,i)):null;var s=No(r,null,!0);return w(n,o),o=oT(o,a,s),n&&b(o,n),o.legacy=!0,o},visual:function(e,n){if(null==n&&(n=l),Z(XI,e)){var i=t.getItemVisual(n,"style");return i?i[XI[e]]:null}if(Z(jI,e))return t.getItemVisual(n,e)},barLayout:function(e){if("cartesian2d"===a.type){var t=a.getBaseAxis();return function(e){var t=[],n=e.axis,i="axis0";if("category"===n.type){for(var o=n.getBandWidth(),r=0;r=d;h--){pT(t.childAt(h),qI(t).option,o)}}(e,h,n,i,o),a>=0?r.replaceAt(h,a):r.add(h),h}function HT(e,t,n){var i,o=qI(e),r=t.type,a=t.shape,s=t.style;return n.isUniversalTransitionEnabled()||null!=r&&r!==o.customGraphicType||"path"===r&&((i=a)&&(Z(i,"pathData")||Z(i,"d")))&&KT(a)!==o.customPathData||"image"===r&&Z(s,"image")&&s.image!==o.customImagePath}function UT(e,t,n){var i=t?YT(e,t):e,o=t?ZT(e,i,"emphasis"):e.style,r=e.type,a=i?i.textConfig:null,s=e.textContent,l=s?t?YT(s,t):s:null;if(o&&(n.isLegacy||tT(o,r,!!a,!!l))){n.isLegacy=!0;var u=nT(o,r,!t);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!t&&l){var c=l;!c.type&&(c.type="text")}var d=t?n[t]:n.normal;d.cfg=a,d.conOpt=l}function YT(e,t){return t?e?e[t]:null:e}function ZT(e,t,n){var i=t&&t.style;return null==i&&"emphasis"===n&&e&&(i=e.styleEmphasis),i}function XT(e,t){var n=e&&e.name;return null!=n?n:"e\0\0"+t}function jT(e,t){var n=this.context,i=null!=e?n.newChildren[e]:null,o=null!=t?n.oldChildren[t]:null;WT(n.api,o,n.dataIndex,i,n.seriesModel,n.group)}function qT(e){var t=this.context,n=t.oldChildren[e];pT(n,qI(n).option,t.seriesModel)}function KT(e){return e&&(e.pathData||e.d)}var JT=Tn(),$T=oe,QT=ce,eD=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,i){var o=t.get("value"),r=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,i||this._lastValue!==o||this._lastStatus!==r){this._lastValue=o,this._lastStatus=r;var a=this._group,s=this._handle;if(!r||"hide"===r)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,o,e,t,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(a){var d=se(tD,t,c);this.updatePointerEl(a,l,d),this.updateLabelEl(a,l,d,t)}else a=this._group=new X,this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);rD(a,t,!0),this._renderHandle(o)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get("animation"),i=e.axis,o="category"===i.type,r=t.get("snap");if(!r&&!o)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(o&&i.getBandWidth()>a)return!0;if(r){var s=rm(e).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},e.prototype.makeElOption=function(e,t,n,i,o){},e.prototype.createPointerEl=function(e,t,n,i){var o=t.pointer;if(o){var r=JT(e).pointerEl=new To[o.type]($T(t.pointer));e.add(r)}},e.prototype.createLabelEl=function(e,t,n,i){if(t.label){var o=JT(e).labelEl=new j($T(t.label));e.add(o),iD(o,i)}},e.prototype.updatePointerEl=function(e,t,n){var i=JT(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),n(i,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,i){var o=JT(e).labelEl;o&&(o.setStyle(t.label.style),n(o,{x:t.label.x,y:t.label.y}),iD(o,i))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,i=this._api.getZr(),o=this._handle,r=n.getModel("handle"),a=n.get("status");if(!r.get("show")||!a||"hide"===a)return o&&i.remove(o),void(this._handle=null);this._handle||(t=!0,o=this._handle=xo(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){Xe(e.event)},onmousedown:QT(this._onHandleDragMove,this,0,0),drift:QT(this._onHandleDragMove,this),ondragend:QT(this._onHandleDragEnd,this)}),i.add(o)),rD(o,n,!1),o.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=r.get("size");s(l)||(l=[l,l]),o.scaleX=l[0]/2,o.scaleY=l[1]/2,au(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){tD(this._axisPointerModel,!t&&this._moveAnimation,this._handle,oD(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(oD(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(oD(i)),JT(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,i=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),su(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},e}();function tD(e,t,n,i){nD(JT(n).lastProp,i)||(JT(n).lastProp=i,t?Ui(n,i,e):(n.stopAnimation(),n.attr(i)))}function nD(e,t){if(o(e)&&o(t)){var n=!0;return u(t,(function(t,i){n=n&&nD(e[i],t)})),!!n}return e===t}function iD(e,t){e[t.get(["label","show"])?"show":"hide"]()}function oD(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function rD(e,t,n){var i=t.get("z"),o=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=i&&(e.z=i),null!=o&&(e.zlevel=o),e.silent=n)}))}var aD=eD;function sD(e){var t,n=e.get("type"),i=e.getModel(n+"Style");return"line"===n?(t=i.getLineStyle()).fill=null:"shadow"===n&&((t=i.getAreaStyle()).stroke=null),t}function lD(e,t,n,i,o){var r=uD(n.get("value"),t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=Vr(a.get("padding")||0),l=a.getFont(),u=Le(r,l),c=o.position,d=u.width+s[1]+s[3],h=u.height+s[0]+s[2],p=o.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var f=o.verticalAlign;"bottom"===f&&(c[1]-=h),"middle"===f&&(c[1]-=h/2),function(e,t,n,i){var o=i.getWidth(),r=i.getHeight();e[0]=Math.min(e[0]+t,o)-t,e[1]=Math.min(e[1]+n,r)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(c,d,h,i);var g=a.get("backgroundColor");g&&"auto"!==g||(g=t.get(["axisLine","lineStyle","color"])),e.label={x:c[0],y:c[1],style:Po(a,{text:r,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function uD(e,t,n,o,r){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:r.precision}),s=r.formatter;if(s){var l={value:gp(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};u(o,(function(e){var t=n.getSeriesByIndex(e.seriesIndex),i=e.dataIndexInside,o=t&&t.getDataParams(i);o&&l.seriesData.push(o)})),i(s)?a=s.replace("{value}",a):p(s)&&(a=s(l))}return a}function cD(e,t,n){var i=Qe();return Ue(i,i,n.rotation),it(i,i,n.position),po([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function dD(e,t,n,i,o,r){var a=tm.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=o.get(["label","margin"]),lD(t,i,o,r,{position:cD(i.axis,e,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function hD(e,t,n){return{x1:e[n=n||0],y1:e[1-n],x2:t[n],y2:t[1-n]}}function pD(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}}function fD(e,t,n,i,o,r){return{cx:e,cy:t,r0:n,r:i,startAngle:o,endAngle:r,clockwise:!0}}var gD=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.makeElOption=function(e,t,n,i,o){var r=n.axis,a=r.grid,s=i.get("type"),l=yD(a,r).getOtherAxis(r).getGlobalExtent(),u=r.toGlobalCoord(r.dataToCoord(t,!0));if(s&&"none"!==s){var c=sD(i),d=mD[s](r,u,l);d.style=c,e.graphicKey=d.type,e.pointer=d}dD(t,e,zy(a.model,n),n,i,o)},n.prototype.getHandleTransform=function(e,t,n){var i=zy(t.axis.grid.model,t,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=cD(t.axis,e,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},n.prototype.updateHandleTransform=function(e,t,n,i){var o=n.axis,r=o.grid,a=o.getGlobalExtent(!0),s=yD(r,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,u=[e.x,e.y];u[l]+=t[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,d=[c,c];d[l]=u[l];return{x:u[0],y:u[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},n}(aD);function yD(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var mD={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:hD([t,n[0]],[t,n[1]],vD(e))}},shadow:function(e,t,n){var i=Math.max(1,e.getBandWidth()),o=n[1]-n[0];return{type:"Rect",shape:pD([t-i/2,n[0]],[i,o],vD(e))}}};function vD(e){return"x"===e.dim?0:1}var xD=gD,_D=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}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}(sa),bD=Tn(),SD=u;function wD(e,t,n){if(!h.node){var i=t.getZr();bD(i).records||(bD(i).records={}),function(e,t){if(bD(e).initialized)return;function n(n,i){e.on(n,(function(n){var o=function(e){var t={showTip:[],hideTip:[]},n=function(i){var o=t[i.type];o?o.push(i):(i.dispatchAction=n,e.dispatchAction(i))};return{dispatchAction:n,pendings:t}}(t);SD(bD(e).records,(function(e){e&&i(e,n,o.dispatchAction)})),function(e,t){var n,i=e.showTip.length,o=e.hideTip.length;i?n=e.showTip[i-1]:o&&(n=e.hideTip[o-1]);n&&(n.dispatchAction=null,t.dispatchAction(n))}(o.pendings,t)}))}bD(e).initialized=!0,n("click",se(ID,"click")),n("mousemove",se(ID,"mousemove")),n("globalout",MD)}(i,t),(bD(i).records[e]||(bD(i).records[e]={})).handler=n}}function MD(e,t,n){e.handler("leave",null,n)}function ID(e,t,n,i){t.handler(e,n,i)}function TD(e,t){if(!h.node){var n=t.getZr();(bD(n).records||{})[e]&&(bD(n).records[e]=null)}}var DD=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.render=function(e,t,n){var i=t.getComponent("tooltip"),o=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";wD("axisPointer",n,(function(e,t,n){"none"!==o&&("leave"===e||o.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},n.prototype.remove=function(e,t){TD("axisPointer",t)},n.prototype.dispose=function(e,t){TD("axisPointer",t)},n.type="axisPointer",n}(Zl),CD=DD;function AD(e,t){var i,o=[],r=e.seriesIndex;if(null==r||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),l=In(a,e);if(null==l||l<0||s(l))return{point:[]};var u=a.getItemGraphicEl(l),c=i.coordinateSystem;if(i.getTooltipPosition)o=i.getTooltipPosition(l)||[];else if(c&&c.dataToPoint)if(e.isStacked){var d=c.getBaseAxis(),h=c.getOtherAxis(d).dim,p=d.dim,f="x"===h||"radius"===h?1:0,g=a.mapDimension(p),y=[];y[f]=a.get(g,l),y[1-f]=a.get(a.getCalculationInfo("stackResultDimension"),l),o=c.dataToPoint(y)||[]}else o=c.dataToPoint(a.getValues(n(c.dimensions,(function(e){return a.mapDimension(e)})),l))||[];else if(u){var m=u.getBoundingRect().clone();m.applyTransform(u.transform),o=[m.x+m.width/2,m.y+m.height/2]}return{point:o,el:u}}var LD=Tn();function kD(e,t,n){var i=e.currTrigger,o=[e.x,e.y],r=e,a=e.dispatchAction||ce(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){ED(o)&&(o=AD({seriesIndex:r.seriesIndex,dataIndex:r.dataIndex},t).point);var l=ED(o),c=r.axesInfo,d=s.axesInfo,h="leave"===i||ED(o),p={},f={},g={list:[],map:{}},y={showPointer:se(ND,f),showTooltip:se(OD,g)};u(s.coordSysMap,(function(e,t){var n=l||e.containPoint(o);u(s.coordSysAxesInfo[t],(function(e,t){var i=e.axis,r=function(e,t){for(var n=0;n<(e||[]).length;n++){var i=e[n];if(t.axis.dim===i.axisDim&&t.axis.model.componentIndex===i.axisIndex)return i}}(c,e);if(!h&&n&&(!c||r)){var a=r&&r.value;null!=a||l||(a=i.pointToData(o)),null!=a&&PD(e,a,y,!1,p)}}))}));var m={};return u(d,(function(e,t){var n=e.linkGroup;n&&!f[t]&&u(n.axesInfo,(function(t,i){var o=f[i];if(t!==e&&o){var r=o.value;n.mapper&&(r=e.axis.scale.parse(n.mapper(r,RD(t),RD(e)))),m[e.key]=r}}))})),u(m,(function(e,t){PD(d[t],e,y,!0,p)})),function(e,t,n){var i=n.axesInfo=[];u(t,(function(t,n){var o=t.axisPointerModel.option,r=e[n];r?(!t.useHandle&&(o.status="show"),o.value=r.value,o.seriesDataIndices=(r.payloadBatch||[]).slice()):!t.useHandle&&(o.status="hide"),"show"===o.status&&i.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:o.value})}))}(f,d,p),function(e,t,n,i){if(ED(t)||!e.list.length)return void i({type:"hideTip"});var o=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:e.list})}(g,o,e,a),function(e,t,n){var i=n.getZr(),o="axisPointerLastHighlights",r=LD(i)[o]||{},a=LD(i)[o]={};u(e,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&u(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;a[t]=e}))}));var s=[],l=[];u(r,(function(e,t){!a[t]&&l.push(e)})),u(a,(function(e,t){!r[t]&&s.push(e)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(d,0,n),p}}function PD(e,t,n,i,o){var r=e.axis;if(!r.scale.isBlank()&&r.containData(t))if(e.involveSeries){var a=function(e,t){var n=t.axis,i=n.dim,o=e,r=[],a=Number.MAX_VALUE,s=-1;return u(t.seriesModels,(function(t,l){var c,d,h=t.getData().mapDimensionsAll(i);if(t.getAxisTooltipData){var p=t.getAxisTooltipData(h,e,n);d=p.dataIndices,c=p.nestestValue}else{if(!(d=t.getData().indicesOfNearest(h[0],e,"category"===n.type?.5:null)).length)return;c=t.getData().get(h[0],d[0])}if(null!=c&&isFinite(c)){var f=e-c,g=Math.abs(f);g<=a&&((g=0&&s<0)&&(a=g,s=f,o=c,r.length=0),u(d,(function(e){r.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:r,snapToValue:o}}(t,e),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==o.seriesIndex&&g(o,s[0]),!i&&e.snap&&r.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s),n.showTooltip(e,a,l)}else n.showPointer(e,t)}function ND(e,t,n,i){e[t.key]={value:n,payloadBatch:i}}function OD(e,t,n,i){var o=n.payloadBatch,r=t.axis,a=r.model,s=t.axisPointerModel;if(t.triggerTooltip&&o.length){var l=t.coordSys.model,u=sm(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:r.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:o.slice()})}}function RD(e){var t=e.axis.model,n={},i=n.axisDim=e.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=t.componentIndex,n.axisName=n[i+"AxisName"]=t.name,n.axisId=n[i+"AxisId"]=t.id,n}function ED(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function VD(e){um.registerAxisPointerClass("CartesianAxisPointer",xD),e.registerComponentModel(_D),e.registerComponentView(CD),e.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!s(t)&&(e.axisPointer.link=[t])}})),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=nm(e,t)})),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},kD)}var zD=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.makeElOption=function(e,t,n,i,o){var r=n.axis;"angle"===r.dim&&(this.animationThreshold=Math.PI/18);var a=r.polar,s=a.getOtherAxis(r).getExtent(),l=r.dataToCoord(t),u=i.get("type");if(u&&"none"!==u){var c=sD(i),d=BD[u](r,a,l,s);d.style=c,e.graphicKey=d.type,e.pointer=d}var h=function(e,t,n,i,o){var r=t.axis,a=r.dataToCoord(e),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,c,d=i.getRadiusAxis().getExtent();if("radius"===r.dim){var h=Qe();Ue(h,h,s),it(h,h,[i.cx,i.cy]),l=po([a,-o],h);var p=t.getModel("axisLabel").get("rotate")||0,f=tm.innerTextLayout(s,p*Math.PI/180,-1);u=f.textAlign,c=f.textVerticalAlign}else{var g=d[1];l=i.coordToPoint([g+o,a]);var y=i.cx,m=i.cy;u=Math.abs(l[0]-y)/g<.3?"center":l[0]>y?"left":"right",c=Math.abs(l[1]-m)/g<.3?"middle":l[1]>m?"top":"bottom"}return{position:l,align:u,verticalAlign:c}}(t,n,0,a,i.get(["label","margin"]));lD(e,n,i,o,h)},n}(aD);var BD={line:function(e,t,n,i){return"angle"===e.dim?{type:"Line",shape:hD(t.coordToPoint([i[0],n]),t.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:n}}},shadow:function(e,t,n,i){var o=Math.max(1,e.getBandWidth()),r=Math.PI/180;return"angle"===e.dim?{type:"Sector",shape:fD(t.cx,t.cy,i[0],i[1],(-n-o/2)*r,(o/2-n)*r)}:{type:"Sector",shape:fD(t.cx,t.cy,n-o/2,n+o/2,0,2*Math.PI)}}},GD=zD,FD=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.findAxisModel=function(e){var t;return this.ecModel.eachComponent(e,(function(e){e.getCoordSysModel()===this&&(t=e)}),this),t},n.type="polar",n.dependencies=["radiusAxis","angleAxis"],n.defaultOption={z:0,center:["50%","50%"],radius:"80%"},n}(sa),WD=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Ln).models[0]},n.type="polarAxis",n}(sa);re(WD,_p);var HD=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.type="angleAxis",n}(WD),UD=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.type="radiusAxis",n}(WD),YD=function(t){function n(e,n){return t.call(this,"radius",e,n)||this}return e(n,t),n.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},n}(Jp);YD.prototype.dataToRadius=Jp.prototype.dataToCoord,YD.prototype.radiusToData=Jp.prototype.coordToData;var ZD=YD,XD=Tn(),jD=function(t){function n(e,n){return t.call(this,"angle",e,n||[0,360])||this}return e(n,t),n.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},n.prototype.calculateCategoryInterval=function(){var e=this,t=e.getLabelModel(),n=e.scale,i=n.getExtent(),o=n.count();if(i[1]-i[0]<1)return 0;var r=i[0],a=e.dataToCoord(r+1)-e.dataToCoord(r),s=Math.abs(a),l=Le(null==r?"":r+"",t.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var c=Math.max(0,Math.floor(u)),d=XD(e.model),h=d.lastAutoInterval,p=d.lastTickCount;return null!=h&&null!=p&&Math.abs(h-c)<=1&&Math.abs(p-o)<=1&&h>c?c=h:(d.lastTickCount=o,d.lastAutoInterval=c),c},n}(Jp);jD.prototype.dataToAngle=Jp.prototype.dataToCoord,jD.prototype.angleToData=Jp.prototype.coordToData;var qD=jD,KD=["radius","angle"],JD=function(){function e(e){this.dimensions=KD,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new ZD,this._angleAxis=new qD,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},e.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},e.prototype.getAxis=function(e){return this["_"+e+"Axis"]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===e&&t.push(n),i.scale.type===e&&t.push(i),t},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(e){var t=null!=e&&"auto"!==e?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},e.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},e.prototype.pointToData=function(e,t){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],t),this._angleAxis.angleToData(n[1],t)]},e.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,i=this.getAngleAxis(),o=i.getExtent(),r=Math.min(o[0],o[1]),a=Math.max(o[0],o[1]);i.inverse?r=a-360:a=r+360;var s=Math.sqrt(t*t+n*n);t/=s,n/=s;for(var l=Math.atan2(-n,t)/Math.PI*180,u=la;)l+=360*u;return[s,l]},e.prototype.coordToPoint=function(e){var t=e[0],n=e[1]/180*Math.PI;return[Math.cos(n)*t+this.cx,-Math.sin(n)*t+this.cy]},e.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();var n=e.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:e.inverse,contain:function(e,t){var n=e-this.cx,i=t-this.cy,o=n*n+i*i-1e-4,r=this.r,a=this.r0;return o<=r*r&&o>=a*a}}},e.prototype.convertToPixel=function(e,t,n){return $D(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return $D(t)===this?this.pointToData(n):null},e}();function $D(e){var t=e.seriesModel,n=e.polarModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}var QD=JD;function eC(e,t){var n=this,i=n.getAngleAxis(),o=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),o.scale.setExtent(1/0,-1/0),e.eachSeries((function(e){if(e.coordinateSystem===n){var t=e.getData();u(xp(t,"radius"),(function(e){o.scale.unionExtentFromData(t,e)})),u(xp(t,"angle"),(function(e){i.scale.unionExtentFromData(t,e)}))}})),hp(i.scale,i.model),hp(o.scale,o.model),"category"===i.type&&!i.onBand){var r=i.getExtent(),a=360/i.scale.count();i.inverse?r[1]+=a:r[1]-=a,i.setExtent(r[0],r[1])}}function tC(e,t){if(e.type=t.get("type"),e.scale=pp(t),e.onBand=t.get("boundaryGap")&&"category"===e.type,e.inverse=t.get("inverse"),function(e){return"angleAxis"===e.mainType}(t)){e.inverse=e.inverse!==t.get("clockwise");var n=t.get("startAngle");e.setExtent(n,n+(e.inverse?-360:360))}t.axis=e,e.model=t}var nC={dimensions:KD,create:function(e,t){var n=[];return e.eachComponent("polar",(function(e,i){var o=new QD(i+"");o.update=eC;var r=o.getRadiusAxis(),a=o.getAngleAxis(),l=e.findAxisModel("radiusAxis"),u=e.findAxisModel("angleAxis");tC(r,l),tC(a,u),function(e,t,n){var i=t.get("center"),o=n.getWidth(),r=n.getHeight();e.cx=Ht(i[0],o),e.cy=Ht(i[1],r);var a=e.getRadiusAxis(),l=Math.min(o,r)/2,u=t.get("radius");null==u?u=[0,"100%"]:s(u)||(u=[0,u]);var c=[Ht(u[0],l),Ht(u[1],l)];a.inverse?a.setExtent(c[1],c[0]):a.setExtent(c[0],c[1])}(o,e,t),n.push(o),e.coordinateSystem=o,o.model=e})),e.eachSeries((function(e){if("polar"===e.get("coordinateSystem")){var t=e.getReferringComponents("polar",Ln).models[0];e.coordinateSystem=t.coordinateSystem}})),n}},iC=nC,oC=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function rC(e,t,n){t[1]>t[0]&&(t=t.slice().reverse());var i=e.coordToPoint([t[0],n]),o=e.coordToPoint([t[1],n]);return{x1:i[0],y1:i[1],x2:o[0],y2:o[1]}}function aC(e){return e.getRadiusAxis().inverse?0:1}function sC(e){var t=e[0],n=e[e.length-1];t&&n&&Math.abs(Math.abs(t.coord-n.coord)-360)<1e-4&&e.pop()}var lC=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=i.type,e.axisPointerClass="PolarAxisPointer",e}return e(i,t),i.prototype.render=function(e,t){if(this.group.removeAll(),e.get("show")){var i=e.axis,o=i.polar,r=o.getRadiusAxis().getExtent(),a=i.getTicksCoords(),s=i.getMinorTicksCoords(),l=n(i.getViewLabels(),(function(e){e=oe(e);var t=i.scale,n="ordinal"===t.type?t.getRawOrdinalNumber(e.tickValue):e.tickValue;return e.coord=i.dataToCoord(n),e}));sC(l),sC(a),u(oC,(function(t){!e.get([t,"show"])||i.scale.isBlank()&&"axisLine"!==t||uC[t](this.group,e,o,a,s,r,l)}),this)}},i.type="angleAxis",i}(um),uC={axisLine:function(e,t,n,i,o,r){var a,s=t.getModel(["axisLine","lineStyle"]),l=aC(n),u=l?0:1;(a=0===r[u]?new L({shape:{cx:n.cx,cy:n.cy,r:r[l]},style:s.getLineStyle(),z2:1,silent:!0}):new N({shape:{cx:n.cx,cy:n.cy,r:r[l],r0:r[u]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,e.add(a)},axisTick:function(e,t,i,o,r,a){var s=t.getModel("axisTick"),l=(s.get("inside")?-1:1)*s.get("length"),u=a[aC(i)],c=n(o,(function(e){return new V({shape:rC(i,[u,u+l],e.coord)})}));e.add(lo(c,{style:C(s.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(e,t,n,i,o,r){if(o.length){for(var a=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=r[aC(n)],c=[],d=0;dg?"left":"right",v=Math.abs(f[1]-y)/p<.3?"middle":f[1]>y?"top":"bottom";if(l&&l[u]){var x=l[u];o(x)&&x.textStyle&&(s=new nr(x.textStyle,c,c.ecModel))}var _=new j({silent:tm.isLabelSilent(t),style:Po(s,{x:f[0],y:f[1],fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:i.formattedLabel,align:m,verticalAlign:v})});if(e.add(_),h){var b=tm.makeAxisEventDataBase(t);b.targetType="axisLabel",b.value=i.rawLabel,Xn(_).eventData=b}}),this)},splitLine:function(e,t,n,i,o,r){var a=t.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=0;c=0?"p":"n",T=_;v&&(i[s][M]||(i[s][M]={p:_,n:_}),T=i[s][M][I]);var D=void 0,C=void 0,A=void 0,L=void 0;if("radius"===d.dim){var k=d.dataToCoord(w)-_,P=r.dataToCoord(M);Math.abs(k)=L})}}}))}var xC={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},_C={splitNumber:5},bC=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.type="polar",n}(Zl);function SC(e,t){t=t||{};var n=e.coordinateSystem,i=e.axis,o={},r=i.position,a=i.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};o.position=["vertical"===a?u.vertical[r]:l[0],"horizontal"===a?u.horizontal[r]:l[3]];o.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,right:1,left:-1}[r],e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),He(t.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var c=t.rotate;return null==c&&(c=e.get(["axisLabel","rotate"])),o.labelRotation="top"===r?-c:c,o.z2=1,o}var wC=["axisLine","axisTickLabel","axisName"],MC=["splitArea","splitLine"],IC=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e.axisPointerClass="SingleAxisPointer",e}return e(n,t),n.prototype.render=function(e,n,i,o){var r=this.group;r.removeAll();var a=this._axisGroup;this._axisGroup=new X;var s=SC(e),l=new tm(e,s);u(wC,l.add,l),r.add(this._axisGroup),r.add(l.getGroup()),u(MC,(function(t){e.get([t,"show"])&&TC[t](this,this.group,this._axisGroup,e)}),this),yo(a,this._axisGroup,e),t.prototype.render.call(this,e,n,i,o)},n.prototype.remove=function(){hm(this)},n.type="singleAxis",n}(um),TC={splitLine:function(e,t,n,i){var o=i.axis;if(!o.scale.isBlank()){var r=i.getModel("splitLine"),a=r.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var l=i.coordinateSystem.getRect(),u=o.isHorizontal(),c=[],d=0,h=o.getTicksCoords({tickModel:r}),p=[],f=[],g=0;g=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},e.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e["horizontal"===t.orient?0:1]))]},e.prototype.dataToPoint=function(e){var t=this.getAxis(),n=this.getRect(),i=[],o="horizontal"===t.orient?0:1;return e instanceof Array&&(e=e[0]),i[o]=t.toGlobalCoord(t.dataToCoord(+e)),i[1-o]=0===o?n.y+n.height/2:n.x+n.width/2,i},e.prototype.convertToPixel=function(e,t,n){return OC(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return OC(t)===this?this.pointToData(n):null},e}();function OC(e){var t=e.seriesModel,n=e.singleAxisModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}var RC={create:function(e,t){var n=[];return e.eachComponent("singleAxis",(function(i,o){var r=new NC(i,e,t);r.name="single_"+o,r.resize(i,t),i.coordinateSystem=r,n.push(r)})),e.eachSeries((function(e){if("singleAxis"===e.get("coordinateSystem")){var t=e.getReferringComponents("singleAxis",Ln).models[0];e.coordinateSystem=t&&t.coordinateSystem}})),n},dimensions:PC},EC=["x","y"],VC=["width","height"],zC=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.makeElOption=function(e,t,n,i,o){var r=n.axis,a=r.coordinateSystem,s=FC(a,1-GC(r)),l=a.dataToPoint(t)[0],u=i.get("type");if(u&&"none"!==u){var c=sD(i),d=BC[u](r,l,s);d.style=c,e.graphicKey=d.type,e.pointer=d}dD(t,e,SC(n),n,i,o)},n.prototype.getHandleTransform=function(e,t,n){var i=SC(t,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=cD(t.axis,e,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},n.prototype.updateHandleTransform=function(e,t,n,i){var o=n.axis,r=o.coordinateSystem,a=GC(o),s=FC(r,a),l=[e.x,e.y];l[a]+=t[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=FC(r,1-a),c=(u[1]+u[0])/2,d=[c,c];return d[a]=l[a],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},n}(aD),BC={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:hD([t,n[0]],[t,n[1]],GC(e))}},shadow:function(e,t,n){var i=e.getBandWidth(),o=n[1]-n[0];return{type:"Rect",shape:pD([t-i/2,n[0]],[i,o],GC(e))}}};function GC(e){return e.isHorizontal()?0:1}function FC(e,t){var n=e.getRect();return[n[EC[t]],n[EC[t]]+n[VC[t]]]}var WC=zC,HC=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.type="single",n}(Zl);function UC(e,t){var i,o=e.cellSize;1===(i=s(o)?o:e.cellSize=[o,o]).length&&(i[1]=i[0]);var r=n([0,1],(function(e){return function(e,t){return null!=e[Kr[t][0]]||null!=e[Kr[t][1]]&&null!=e[Kr[t][2]]}(t,e)&&(i[e]="auto"),null!=i[e]&&"auto"!==i[e]}));na(e,t,{type:"box",ignoreSize:r})}var YC=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.init=function(e,n,i){var o=ia(e);t.prototype.init.apply(this,arguments),UC(e,o)},n.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),UC(this.option,e)},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}(sa),ZC=function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=o.type,e}return e(o,t),o.prototype.render=function(e,t,n){var i=this.group;i.removeAll();var o=e.coordinateSystem,r=o.getRangeInfo(),a=o.getOrient(),s=t.getLocaleModel();this._renderDayRect(e,r,i),this._renderLines(e,r,a,i),this._renderYearText(e,r,a,i),this._renderMonthText(e,s,a,i),this._renderWeekText(e,s,r,a,i)},o.prototype._renderDayRect=function(e,t,n){for(var i=e.coordinateSystem,o=e.getModel("itemStyle").getItemStyle(),r=i.getCellWidth(),a=i.getCellHeight(),s=t.start.time;s<=t.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new E({shape:{x:l[0],y:l[1],width:r,height:a},cursor:"default",style:o});n.add(u)}},o.prototype._renderLines=function(e,t,n,i){var o=this,r=e.coordinateSystem,a=e.getModel(["splitLine","lineStyle"]).getLineStyle(),s=e.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,c=0;u.time<=t.end.time;c++){h(u.formatedDate),0===c&&(u=r.getDateInfo(t.start.y+"-"+t.start.m));var d=u.date;d.setMonth(d.getMonth()+1),u=r.getDateInfo(d)}function h(t){o._firstDayOfMonth.push(r.getDateInfo(t)),o._firstDayPoints.push(r.dataToRect([t],!1).tl);var l=o._getLinePointsOfOneWeek(e,t,n);o._tlpoints.push(l[0]),o._blpoints.push(l[l.length-1]),s&&o._drawSplitline(l,a,i)}h(r.getNextNDay(t.end.time,1).formatedDate),s&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,l,n),a,i),s&&this._drawSplitline(o._getEdgesPoints(o._blpoints,l,n),a,i)},o.prototype._getEdgesPoints=function(e,t,n){var i=[e[0].slice(),e[e.length-1].slice()],o="horizontal"===n?0:1;return i[0][o]=i[0][o]-t/2,i[1][o]=i[1][o]+t/2,i},o.prototype._drawSplitline=function(e,t,n){var i=new R({z2:20,shape:{points:e},style:t});n.add(i)},o.prototype._getLinePointsOfOneWeek=function(e,t,n){for(var i=e.coordinateSystem,o=i.getDateInfo(t),r=[],a=0;a<7;a++){var s=i.getNextNDay(o.time,a),l=i.dataToRect([s.time],!1);r[2*s.day]=l.tl,r[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return r},o.prototype._formatterLabel=function(e,t){return i(e)&&e?(n=e,u(t,(function(e,t){n=n.replace("{"+t+"}",o?Gr(e):e)})),n):p(e)?e(t):t.nameMap;var n,o},o.prototype._yearTextPositionControl=function(e,t,n,i,o){var r=t[0],a=t[1],s=["center","bottom"];"bottom"===i?(a+=o,s=["center","top"]):"left"===i?r-=o:"right"===i?(r+=o,s=["center","top"]):a-=o;var l=0;return"left"!==i&&"right"!==i||(l=Math.PI/2),{rotation:l,x:r,y:a,style:{align:s[0],verticalAlign:s[1]}}},o.prototype._renderYearText=function(e,t,n,i){var o=e.getModel("yearLabel");if(o.get("show")){var r=o.get("margin"),a=o.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,c="horizontal"===n?0:1,d={top:[l,s[c][1]],bottom:[l,s[1-c][1]],left:[s[1-c][0],u],right:[s[c][0],u]},h=t.start.y;+t.end.y>+t.start.y&&(h=h+"-"+t.end.y);var p=o.get("formatter"),f={start:t.start.y,end:t.end.y,nameMap:h},g=this._formatterLabel(p,f),y=new j({z2:30,style:Po(o,{text:g})});y.attr(this._yearTextPositionControl(y,d[a],n,a,r)),i.add(y)}},o.prototype._monthTextPositionControl=function(e,t,n,i,o){var r="left",a="top",s=e[0],l=e[1];return"horizontal"===n?(l+=o,t&&(r="center"),"start"===i&&(a="bottom")):(s+=o,t&&(a="middle"),"start"===i&&(r="right")),{x:s,y:l,align:r,verticalAlign:a}},o.prototype._renderMonthText=function(e,t,n,o){var r=e.getModel("monthLabel");if(r.get("show")){var a=r.get("nameMap"),s=r.get("margin"),l=r.get("position"),u=r.get("align"),c=[this._tlpoints,this._blpoints];a&&!i(a)||(a&&(t=cr(a)||t),a=t.get(["time","monthAbbr"])||[]);var d="start"===l?0:1,h="horizontal"===n?0:1;s="start"===l?-s:s;for(var p="center"===u,f=0;f=i.start.time&&n.timea.end.time&&e.reverse(),e},e.prototype._getRangeInfo=function(e){var t,n=[this.getDateInfo(e[0]),this.getDateInfo(e[1])];n[0].time>n[1].time&&(t=!0,n.reverse());var i=Math.floor(n[1].time/864e5)-Math.floor(n[0].time/864e5)+1,o=new Date(n[0].time),r=o.getDate(),a=n[1].date.getDate();o.setDate(r+i-1);var s=o.getDate();if(s!==a)for(var l=o.getTime()-n[1].time>0?1:-1;(s=o.getDate())!==a&&(o.getTime()-n[1].time)*l>0;)i-=l,o.setDate(s-l);var u=Math.floor((i+n[0].day+6)/7),c=t?1-u:u-1;return t&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:u,nthWeek:c,fweek:n[0].day,lweek:n[1].day}},e.prototype._getDateByWeeksAndDay=function(e,t,n){var i=this._getRangeInfo(n);if(e>i.weeks||0===e&&ti.lweek)return null;var o=7*(e-1)-i.fweek+t,r=new Date(i.start.time);return r.setDate(+i.start.d+o),this.getDateInfo(r)},e.create=function(t,n){var i=[];return t.eachComponent("calendar",(function(t){var n=new e(t);i.push(n),t.coordinateSystem=n})),t.eachSeries((function(e){"calendar"===e.get("coordinateSystem")&&(e.coordinateSystem=i[e.get("calendarIndex")||0])})),i},e.dimensions=["time","value"],e}();function qC(e){var t=e.calendarModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}var KC=jC;function JC(e,t){var n;return u(t,(function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)})),n}var $C=["transition","enterFrom","leaveTo"],QC=$C.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function eA(e,t,n){if(n&&(!e[n]&&t[n]&&(e[n]={}),e=e[n],t=t[n]),e&&t)for(var i=n?$C:QC,o=0;o=0;l--){var p,f,g;if(g=null!=(f=Sn((p=n[l]).id,null))?o.get(f):null){var y=g.parent,m=(h=iA(y),{}),v=ea(g,p,y===i?{width:r,height:a}:{width:h.width,height:h.height},null,{hv:p.hv,boundingMode:p.bounding},m);if(!iA(g).isNew&&v){for(var x=p.transition,_={},b=0;b=0)?_[S]=w:g[S]=w}Ui(g,_,e,0)}else g.attr(m)}}},n.prototype._clear=function(){var e=this,t=this._elMap;t.each((function(n){sA(n,iA(n).option,t,e._lastGraphicModel)})),this._elMap=l()},n.prototype.dispose=function(){this._clear()},n.type="graphic",n}(Zl);function rA(e){var t=new(Z(nA,e)?nA[e]:oo(e))({});return iA(t).type=e,t}function aA(e,t,n,i){var o=rA(n);return t.add(o),i.set(e,o),iA(o).id=e,iA(o).isNew=!0,o}function sA(e,t,n,i){e&&e.parent&&("group"===e.type&&e.traverse((function(e){sA(e,t,n,i)})),pT(e,t,i),n.removeKey(iA(e).id))}function lA(e,t,n,i){e.isGroup||u([["cursor",Je.prototype.cursor],["zlevel",i||0],["z",n||0],["z2",0]],(function(n){var i=n[0];Z(t,i)?e[i]=S(t[i],n[1]):null==e[i]&&(e[i]=n[1])})),u(v(t),(function(n){if(0===n.indexOf("on")){var i=t[n];e[n]=p(i)?i:null}})),Z(t,"draggable")&&(e.draggable=t.draggable),null!=t.name&&(e.name=t.name),null!=t.id&&(e.id=t.id)}var uA=["x","y","radius","angle","single"],cA=["cartesian2d","polar","singleAxis"];function dA(e){return e+"Axis"}function hA(e,t){var n,i=l(),o=[],r=l();e.eachComponent({mainType:"dataZoom",query:t},(function(e){r.get(e.uid)||s(e)}));do{n=!1,e.eachComponent("dataZoom",a)}while(n);function a(e){!r.get(e.uid)&&function(e){var t=!1;return e.eachTargetAxis((function(e,n){var o=i.get(e);o&&o[n]&&(t=!0)})),t}(e)&&(s(e),n=!0)}function s(e){r.set(e.uid,!0),o.push(e),e.eachTargetAxis((function(e,t){(i.get(e)||i.set(e,[]))[t]=!0}))}return o}function pA(e){var t=e.ecModel,n={infoList:[],infoMap:l()};return e.eachTargetAxis((function(e,i){var o=t.getComponent(dA(e),i);if(o){var r=o.getCoordSysModel();if(r){var a=r.uid,s=n.infoMap.get(a);s||(s={model:r,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(o)}}})),n}var fA=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),gA=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return e(n,t),n.prototype.init=function(e,t,n){var i=yA(e);this.settledOption=i,this.mergeDefaultAndTheme(e,n),this._doInit(i)},n.prototype.mergeOption=function(e){var t=yA(e);ie(this.option,e,!0),ie(this.settledOption,t,!0),this._doInit(t)},n.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;u([["start","startValue"],["end","endValue"]],(function(e,i){"value"===this._rangePropMode[i]&&(t[e[0]]=n[e[0]]=null)}),this),this._resetTarget()},n.prototype._resetTarget=function(){var e=this.get("orient",!0),t=this._targetAxisInfoMap=l();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each((function(e){e.indexList.length&&(this._noTarget=!1)}),this)},n.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return u(uA,(function(n){var i=this.getReferringComponents(dA(n),kn);if(i.specified){t=!0;var o=new fA;u(i.models,(function(e){o.add(e.componentIndex)})),e.set(n,o)}}),this),t},n.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,i=!0;if(i){var o="vertical"===t?"y":"x";r(n.findComponents({mainType:o+"Axis"}),o)}i&&r(n.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}}),"single");function r(t,n){var o=t[0];if(o){var r=new fA;if(r.add(o.componentIndex),e.set(n,r),i=!1,"x"===n||"y"===n){var a=o.getReferringComponents("grid",Ln).models[0];a&&u(t,(function(e){o.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",Ln).models[0]&&r.add(e.componentIndex)}))}}}i&&u(uA,(function(t){if(i){var o=n.findComponents({mainType:dA(t),filter:function(e){return"category"===e.get("type",!0)}});if(o[0]){var r=new fA;r.add(o[0].componentIndex),e.set(t,r),i=!1}}}),this)},n.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis((function(t){!e&&(e=t)}),this),"y"===e?"vertical":"horizontal"},n.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},n.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");u([["start","startValue"],["end","endValue"]],(function(i,o){var r=null!=e[i[0]],a=null!=e[i[1]];r&&!a?t[o]="percent":!r&&a?t[o]="value":n?t[o]=n[o]:r&&(t[o]="percent")}))},n.prototype.noTarget=function(){return this._noTarget},n.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis((function(t,n){null==e&&(e=this.ecModel.getComponent(dA(t),n))}),this),e},n.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each((function(n,i){u(n.indexList,(function(n){e.call(t,i,n)}))}))},n.prototype.getAxisProxy=function(e,t){var n=this.getAxisModel(e,t);if(n)return n.__dzAxisProxy},n.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(dA(e),t)},n.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;u([["start","startValue"],["end","endValue"]],(function(i){null==e[i[0]]&&null==e[i[1]]||(t[i[0]]=n[i[0]]=e[i[0]],t[i[1]]=n[i[1]]=e[i[1]])}),this),this._updateRangeUse(e)},n.prototype.setCalculatedRange=function(e){var t=this.option;u(["start","startValue","end","endValue"],(function(n){t[n]=e[n]}))},n.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},n.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},n.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,n=this._targetAxisInfoMap.keys(),i=0;i=0}(t)){var n=dA(this._dimName),i=t.getReferringComponents(n,Ln).models[0];i&&this._axisIndex===i.componentIndex&&e.push(t)}}),this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return oe(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,n=this._dataExtent,i=this.getAxisModel().axis.scale,o=this._dataZoomModel.getRangePropMode(),r=[0,100],a=[],s=[];bA(["start","end"],(function(l,u){var c=e[l],d=e[l+"Value"];"percent"===o[u]?(null==c&&(c=r[u]),d=i.parse(Wt(c,r,n))):(t=!0,c=Wt(d=null==d?n[u]:i.parse(d),n,r)),s[u]=d,a[u]=c})),SA(s),SA(a);var l=this._minMaxSpan;function u(e,t,n,o,r){var a=r?"Span":"ValueSpan";vS(0,e,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)t[s]=Wt(e[s],n,o,!0),r&&(t[s]=i.parse(t[s]))}return t?u(s,a,n,r,!1):u(a,s,r,n,!0),{valueWindow:s,percentWindow:a}},e.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,n){var i=[1/0,-1/0];bA(n,(function(e){!function(e,t,n){t&&u(xp(t,n),(function(n){var i=t.getApproximateExtent(n);i[0]e[1]&&(e[1]=i[1])}))}(i,e.getData(),t)}));var o=e.getAxisModel(),r=up(o.axis.scale,o,i).calculate();return[r.min,r.max]}(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(e,t){if(e===this._dataZoomModel){var i=this._dimName,o=this.getTargetSeriesModels(),r=e.get("filterMode"),a=this._valueWindow;"none"!==r&&bA(o,(function(e){var t=e.getData(),o=t.mapDimensionsAll(i);if(o.length){if("weakFilter"===r){var s=t.getStore(),l=n(o,(function(e){return t.getDimensionIndex(e)}),t);t.filterSelf((function(e){for(var t,n,i,r=0;ra[1];if(c&&!d&&!h)return!0;c&&(i=!0),d&&(t=!0),h&&(n=!0)}return i&&t&&n}))}else bA(o,(function(n){if("empty"===r)e.setData(t=t.map(n,(function(e){return function(e){return e>=a[0]&&e<=a[1]}(e)?e:NaN})));else{var i={};i[n]=a,t.selectRange(i)}}));bA(o,(function(e){t.setApproximateExtent(a,e)}))}}))}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;bA(["min","max"],(function(i){var o=t.get(i+"Span"),r=t.get(i+"ValueSpan");null!=r&&(r=this.getAxisModel().axis.scale.parse(r)),null!=r?o=Wt(n[0]+r,n,[0,100],!0):null!=o&&(r=Wt(o,[0,100],n,!0)-n[0]),e[i+"Span"]=o,e[i+"ValueSpan"]=r}),this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var i=jt(n,[0,500]);i=Math.min(i,20);var o=e.axis.scale.rawExtentInfo;0!==t[0]&&o.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==t[1]&&o.setDeterminedMinMax("max",+n[1].toFixed(i)),o.freeze()}},e}();var MA=wA,IA={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(i,o){var r=e.getComponent(dA(i),o);t(i,o,r,n)}))}))}t((function(e,t,n,i){n.__dzAxisProxy=null}));var n=[];t((function(t,i,o,r){o.__dzAxisProxy||(o.__dzAxisProxy=new MA(t,i,r,e),n.push(o.__dzAxisProxy))}));var i=l();return u(n,(function(e){u(e.getTargetSeriesModels(),(function(e){i.set(e.uid,e)}))})),i},overallReset:function(e,t){e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(t,n){e.getAxisProxy(t,n).reset(e)})),e.eachTargetAxis((function(n,i){e.getAxisProxy(n,i).filterData(e,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getDataPercentWindow(),i=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}}))}};var TA=!1;function DA(e){TA||(TA=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,IA),function(e){e.registerAction("dataZoom",(function(e,t){var n=hA(t,e);u(n,(function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}))}(e),e.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function CA(e){e.registerComponentModel(vA),e.registerComponentView(_A),DA(e)}var AA=function(){},LA={};function kA(e,t){LA[e]=t}function PA(e){return LA[e]}var NA=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;u(this.option.feature,(function(t,n){var i=PA(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),ie(t,i.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}(sa);function OA(e,t){var n=Vr(t.get("padding")),i=t.getItemStyle(["color","opacity"]);return i.fill=t.get("backgroundColor"),e=new E({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:i,silent:!0,z2:-1})}var RA=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.render=function(e,t,n,o){var r=this.group;if(r.removeAll(),e.get("show")){var a=+e.get("itemSize"),s="vertical"===e.get("orient"),l=e.get("feature")||{},c=this._features||(this._features={}),d=[];u(l,(function(e,t){d.push(t)})),new Cd(this._featureNames||[],d).add(h).update(h).remove(se(h,null)).execute(),this._featureNames=d,function(e,t,n){var i=t.getBoxLayoutParams(),o=t.get("padding"),r={width:n.getWidth(),height:n.getHeight()},a=Qr(i,r,o);$r(t.get("orient"),e,t.get("itemGap"),a.width,a.height),ea(e,i,r,o)}(r,e,n),r.add(OA(r.getBoundingRect(),e)),s||r.eachChild((function(e){var t=e.__title,i=e.ensureState("emphasis"),o=i.textConfig||(i.textConfig={}),s=e.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!p(l)&&t){var u=l.style||(l.style={}),c=Le(t,j.makeFont(u)),d=e.x+r.x,h=!1;e.y+r.y+a+c.height>n.getHeight()&&(o.position="top",h=!0);var f=h?-5-c.height:a+10;d+c.width/2>n.getWidth()?(o.position=["100%",f],u.align="right"):d-c.width/2<0&&(o.position=[0,f],u.align="left")}}))}function h(h,p){var f,g=d[h],y=d[p],m=l[g],v=new nr(m,e,e.ecModel);if(o&&null!=o.newTitle&&o.featureName===g&&(m.title=o.newTitle),g&&!y){if(function(e){return 0===e.indexOf("my")}(g))f={onclick:v.option.onclick,featureName:g};else{var x=PA(g);if(!x)return;f=new x}c[g]=f}else if(!(f=c[y]))return;f.uid=or("toolbox-feature"),f.model=v,f.ecModel=t,f.api=n;var _=f instanceof AA;g||!y?!v.get("show")||_&&f.unusable?_&&f.remove&&f.remove(t,n):(!function(o,l,c){var d,h,p=o.getModel("iconStyle"),f=o.getModel(["emphasis","iconStyle"]),g=l instanceof AA&&l.getIcons?l.getIcons():o.get("icon"),y=o.get("title")||{};i(g)?(d={})[c]=g:d=g;i(y)?(h={})[c]=y:h=y;var m=o.iconPaths={};u(d,(function(i,u){var c=xo(i,{},{x:-a/2,y:-a/2,width:a,height:a});c.setStyle(p.getItemStyle()),c.ensureState("emphasis").style=f.getItemStyle();var d=new j({style:{text:h[u],align:f.get("textAlign"),borderRadius:f.get("textBorderRadius"),padding:f.get("textPadding"),fill:null},ignore:!0});c.setTextContent(d),wo({el:c,componentModel:e,itemName:u,formatterParamsExtra:{title:h[u]}}),c.__title=h[u],c.on("mouseover",(function(){var t=f.getItemStyle(),i=s?null==e.get("right")&&"right"!==e.get("left")?"right":"left":null==e.get("bottom")&&"bottom"!==e.get("top")?"bottom":"top";d.setStyle({fill:f.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:f.get("textBackgroundColor")}),c.setTextConfig({position:f.get("textPosition")||i}),d.ignore=!e.get("showTitle"),n.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==o.get(["iconStatus",u])&&n.leaveEmphasis(this),d.hide()})),("emphasis"===o.get(["iconStatus",u])?vi:xi)(c),r.add(c),c.on("click",ce(l.onclick,l,t,n,u)),m[u]=c}))}(v,f,g),v.setIconStatus=function(e,t){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,i[e]&&("emphasis"===t?vi:xi)(i[e])},f instanceof AA&&f.render&&f.render(v,t,n,o)):_&&f.dispose&&f.dispose(t,n)}},n.prototype.updateView=function(e,t,n,i){u(this._features,(function(e){e instanceof AA&&e.updateView&&e.updateView(e.model,t,n,i)}))},n.prototype.remove=function(e,t){u(this._features,(function(n){n instanceof AA&&n.remove&&n.remove(e,t)})),this.group.removeAll()},n.prototype.dispose=function(e,t){u(this._features,(function(n){n instanceof AA&&n.dispose&&n.dispose(e,t)}))},n.type="toolbox",n}(Zl);var EA=RA,VA=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.onclick=function(e,t){var n=this.model,i=n.get("name")||e.get("title.0.text")||"echarts",o="svg"===t.getZr().painter.getType(),r=o?"svg":n.get("type",!0)||"png",a=t.getConnectedDataURL({type:r,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=h.browser;if(p(MouseEvent)&&(s.newEdge||!s.ie&&!s.edge)){var l=document.createElement("a");l.download=i+"."+r,l.target="_blank",l.href=a;var u=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});l.dispatchEvent(u)}else if(window.navigator.msSaveOrOpenBlob||o){var c=a.split(","),d=c[0].indexOf("base64")>-1,f=o?decodeURIComponent(c[1]):c[1];d&&(f=window.atob(f));var g=i+"."+r;if(window.navigator.msSaveOrOpenBlob){for(var y=f.length,m=new Uint8Array(y);y--;)m[y]=f.charCodeAt(y);var v=new Blob([m]);window.navigator.msSaveOrOpenBlob(v,g)}else{var x=document.createElement("iframe");document.body.appendChild(x);var _=x.contentWindow,b=_.document;b.open("image/svg+xml","replace"),b.write(f),b.close(),_.focus(),b.execCommand("SaveAs",!0,g),document.body.removeChild(x)}}else{var S=n.get("lang"),w='',M=window.open();M.document.write(w),M.document.title=i}},n.getDefaultOption=function(e){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:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},n}(AA),zA=[["line","bar"],["stack"]],BA=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return u(e.get("type"),(function(e){t[e]&&(n[e]=t[e])})),n},n.getDefaultOption=function(e){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:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},n.prototype.onclick=function(e,t,n){var i=this.model,o=i.get(["seriesIndex",n]);if(GA[n]){var r,a={series:[]};u(zA,(function(e){c(e,n)>=0&&u(e,(function(e){i.setIconStatus(e,"normal")}))})),i.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},(function(e){var t=e.subType,o=e.id,r=GA[n](t,o,e,i);r&&(C(r,e.option),a.series.push(r));var s=e.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",c=e.getReferringComponents(u,Ln).models[0].componentIndex;a[u]=a[u]||[];for(var d=0;d<=c;d++)a[u][c]=a[u][c]||{};a[u][c].boundaryGap="bar"===n}}}));var s=n;"stack"===n&&(r=ie({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(s="tiled")),t.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:r,featureName:"magicType"})}},n}(AA),GA={line:function(e,t,n,i){if("bar"===e)return ie({id:t,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(e,t,n,i){if("line"===e)return ie({id:t,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(e,t,n,i){var o="__ec_magicType_stack__"===n.get("stack");if("line"===e||"bar"===e)return i.setIconStatus("stack",o?"normal":"emphasis"),ie({id:t,stack:o?"":"__ec_magicType_stack__"},i.get(["option","stack"])||{},!0)}};pd({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(e,t){t.mergeOption(e.newOption)}));var FA=BA,WA=new Array(60).join("-");function HA(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var UA=new RegExp("[\t]+","g");function YA(e,t){var i=e.split(new RegExp("\n*"+WA+"\n*","g")),o={series:[]};return u(i,(function(e,i){if(function(e){if(e.slice(0,e.indexOf("\n")).indexOf("\t")>=0)return!0}(e)){var r=function(e){for(var t=e.split(/\n+/g),i=HA(t.shift()).split(UA),o=[],r=n(i,(function(e){return{name:e,data:[]}})),a=0;a=0)&&e(o,i._targetInfoList)}))}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,(function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var i=sL[e.brushType](0,n,t);e.__rangeOffset={offset:uL[e.brushType](i.values,e.range,[1,1]),xyMinMax:i.xyMinMax}}})),e},e.prototype.matchOutputRanges=function(e,t,n){u(e,(function(e){var i=this.findTargetInfo(e,t);i&&!0!==i&&u(i.coordSyses,(function(i){var o=sL[e.brushType](1,i,e.range,!0);n(e,o.values,i,t)}))}),this)},e.prototype.setInputRanges=function(e,t){u(e,(function(e){var n,i,o,r,a,s=this.findTargetInfo(e,t);if(e.range=e.range||[],s&&!0!==s){e.panelId=s.panelId;var l=sL[e.brushType](0,s.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?uL[e.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,o=dL(n),r=dL(i),a=[o[0]/r[0],o[1]/r[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},e.prototype.makePanelOpts=function(e,t){return n(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:bw(i),isTargetByCursor:ww(i,e,n.coordSysModel),getLinearBrushOtherExtent:Sw(i)}}))},e.prototype.controlSeries=function(e,t,n){var i=this.findTargetInfo(e,n);return!0===i||i&&c(i.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,i=iL(t,e),o=0;oe[1]&&e.reverse(),e}function iL(e,t){return Cn(e,t,{includeMainTypes:eL})}var oL={grid:function(e,t){var n=e.xAxisModels,i=e.yAxisModels,o=e.gridModels,r=l(),a={},s={};(n||i||o)&&(u(n,(function(e){var t=e.axis.grid.model;r.set(t.id,t),a[t.id]=!0})),u(i,(function(e){var t=e.axis.grid.model;r.set(t.id,t),s[t.id]=!0})),u(o,(function(e){r.set(e.id,e),a[e.id]=!0,s[e.id]=!0})),r.each((function(e){var o=e.coordinateSystem,r=[];u(o.getCartesians(),(function(e,t){(c(n,e.getAxis("x").model)>=0||c(i,e.getAxis("y").model)>=0)&&r.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:r[0],coordSyses:r,getPanelRect:aL.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){u(e.geoModels,(function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:aL.geo})}))}},rL=[function(e,t){var n=e.xAxisModel,i=e.yAxisModel,o=e.gridModel;return!o&&n&&(o=n.axis.grid.model),!o&&i&&(o=i.axis.grid.model),o&&o===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],aL={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(ho(e)),t}},sL={lineX:se(lL,0),lineY:se(lL,1),rect:function(e,t,n,i){var o=e?t.pointToData([n[0][0],n[1][0]],i):t.dataToPoint([n[0][0],n[1][0]],i),r=e?t.pointToData([n[0][1],n[1][1]],i):t.dataToPoint([n[0][1],n[1][1]],i),a=[nL([o[0],r[0]]),nL([o[1],r[1]])];return{values:a,xyMinMax:a}},polygon:function(e,t,i,o){var r=[[1/0,-1/0],[1/0,-1/0]];return{values:n(i,(function(n){var i=e?t.pointToData(n,o):t.dataToPoint(n,o);return r[0][0]=Math.min(r[0][0],i[0]),r[1][0]=Math.min(r[1][0],i[1]),r[0][1]=Math.max(r[0][1],i[0]),r[1][1]=Math.max(r[1][1],i[1]),i})),xyMinMax:r}}};function lL(e,t,i,o){var r=i.getAxis(["x","y"][e]),a=nL(n([0,1],(function(e){return t?r.coordToData(r.toLocalCoord(o[e]),!0):r.toGlobalCoord(r.dataToCoord(o[e]))}))),s=[];return s[e]=a,s[1-e]=[NaN,NaN],{values:a,xyMinMax:s}}var uL={lineX:se(cL,0),lineY:se(cL,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,i){return n(e,(function(e,n){return[e[0]-i[0]*t[n][0],e[1]-i[1]*t[n][1]]}))}};function cL(e,t,n,i){return[t[0]-i[e]*n[0],t[1]-i[e]*n[1]]}function dL(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var hL,pL,fL=tL,gL=u,yL="\0_ec_\0"+"toolbox-dataZoom_",mL=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.render=function(e,t,n,i){this._brushController||(this._brushController=new _w(n.getZr()),this._brushController.on("brush",ce(this._onBrush,this)).mount()),function(e,t,n,i,o){var r=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(r="dataZoomSelect"===i.key&&i.dataZoomSelectActive);n._isZoomActive=r,e.setIconStatus("zoom",r?"emphasis":"normal");var a=new fL(xL(e),t,{include:["grid"]}).makePanelOpts(o,(function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"}));n._brushController.setPanels(a).enableBrush(!(!r||!a.length)&&{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()})}(e,t,this,i,n),function(e,t){e.setIconStatus("back",function(e){return JA(e).length}(t)>1?"emphasis":"normal")}(e,t)},n.prototype.onclick=function(e,t,n){vL[n].call(this)},n.prototype.remove=function(e,t){this._brushController&&this._brushController.unmount()},n.prototype.dispose=function(e,t){this._brushController&&this._brushController.dispose()},n.prototype._onBrush=function(e){var t=e.areas;if(e.isEnd&&t.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new fL(xL(this.model),i,{include:["grid"]}).matchOutputRanges(t,i,(function(e,t,n){if("cartesian2d"===n.type){var i=e.brushType;"rect"===i?(o("x",n,t[0]),o("y",n,t[1])):o({lineX:"x",lineY:"y"}[i],n,t)}})),function(e,t){var n=JA(e);qA(t,(function(t,i){for(var o=n.length-1;o>=0&&!n[o][i];o--);if(o<0){var r=e.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(r){var a=r.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}})),n.push(t)}(i,n),this._dispatchZoomAction(n)}function o(e,t,o){var r=t.getAxis(e),a=r.model,s=function(e,t,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(e,t.componentIndex)&&(i=n)})),i}(e,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(o=vS(0,o.slice(),r.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:o[0],endValue:o[1]})}},n.prototype._dispatchZoomAction=function(e){var t=[];gL(e,(function(e,n){t.push(oe(e))})),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},n.getDefaultOption=function(e){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:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},n}(AA),vL={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(function(e){var t=JA(e),n=t[t.length-1];t.length>1&&t.pop();var i={};return qA(n,(function(e,n){for(var o=t.length-1;o>=0;o--)if(e=t[o][n]){i[n]=e;break}})),i}(this.ecModel))}};function xL(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return null==t.xAxisIndex&&null==t.xAxisId&&(t.xAxisIndex="all"),null==t.yAxisIndex&&null==t.yAxisId&&(t.yAxisIndex="all"),t}hL="dataZoom",pL=function(e){var t=e.getComponent("toolbox",0),n=["feature","dataZoom"];if(t&&null!=t.get(n)){var i=t.getModel(n),o=[],r=Cn(e,xL(i));return gL(r.xAxisModels,(function(e){return a(e,"xAxis","xAxisIndex")})),gL(r.yAxisModels,(function(e){return a(e,"yAxis","yAxisIndex")})),o}function a(e,t,n){var r=e.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:yL+t+r};a[n]=r,o.push(a)}},d(null==ba.get(hL)&&pL),ba.set(hL,pL);var _L=mL;var bL=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}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}(sa);function SL(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function wL(e){if(h.domSupported)for(var t=document.documentElement.style,n=0,i=e.length;n-1?(d+="top:50%",h+="translateY(-50%) rotate("+(s="left"===l?-225:-45)+"deg)"):(d+="left:50%",h+="translateX(-50%) rotate("+(s="top"===l?225:45)+"deg)");var p=s*Math.PI/180,f=u+r,g=f*Math.abs(Math.cos(p))+f*Math.abs(Math.sin(p)),y=t+" solid "+r+"px;";return'
'}(n,o,r)),i(e))a.innerHTML=e+l;else if(e){a.innerHTML="",s(e)||(e=[e]);for(var u=0;u=0?this._tryShow(n,i):"leave"===t&&this._hide(i))}),this))},n.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,i=e.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&o.manuallyShowTip(e,t,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})}))}},n.prototype.manuallyShowTip=function(e,t,n,i){if(i.from!==this.uid&&!h.node&&n.getDom()){var o=WL(i,n);this._ticket="";var r=i.dataByCoordSys,a=function(e,t,n){var i=An(e).queryOptionMap,o=i.keys()[0];if(!o||"series"===o)return;var r,a=Pn(t,o,i.get(o),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(!a)return;if(n.getViewOfComponentModel(a).group.traverse((function(t){var n=Xn(t).tooltipConfig;if(n&&n.name===e.name)return r=t,!0})),r)return{componentMainType:o,componentIndex:a.componentIndex,el:r}}(i,t,n);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:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&null!=i.x&&null!=i.y){var l=BL;l.x=i.x,l.y=i.y,l.update(),Xn(l).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:l},o)}else if(r)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:r,tooltipOption:i.tooltipOption},o);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,i))return;var u=AD(i,t),c=u.point[0],d=u.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:u.el,position:i.position,positionDefault:"bottom"},o)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o))}},n.prototype.manuallyHideTip=function(e,t,n,i){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(WL(i,n))},n.prototype._manuallyAxisShowTip=function(e,t,n,i){var o=i.seriesIndex,r=i.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=r&&null!=a){var s=t.getSeriesByIndex(o);if(s)if("axis"===FL([s.getData().getItemModel(r),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:r,position:i.position}),!0}},n.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var i=e.dataByCoordSys;if(i&&i.length)this._showAxisTooltip(i,e);else if(n){var o,r;this._lastDataByCoordSys=null,qu(n,(function(e){return null!=Xn(e).dataIndex?(o=e,!0):null!=Xn(e).tooltipConfig?(r=e,!0):void 0}),!0),o?this._showSeriesItemTooltip(e,o,t):r?this._showComponentItemTooltip(e,r,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},n.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=ce(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},n.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,i=this._tooltipModel,o=[t.offsetX,t.offsetY],r=FL([t.tooltipOption],i),a=this._renderMode,s=[],l=bl("section",{blocks:[],noHeader:!0}),c=[],d=new Pl;u(e,(function(e){u(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),o=e.value;if(t&&null!=o){var r=uD(o,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),h=bl("section",{header:r,noHeader:!ne(r),sortBlocks:!0,blocks:[]});l.blocks.push(h),u(e.seriesDataIndices,(function(l){var u=n.getSeriesByIndex(l.seriesIndex),p=l.dataIndexInside,f=u.getDataParams(p);if(!(f.dataIndex<0)){f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=gp(t.axis,{value:o}),f.axisValueLabel=r,f.marker=d.makeTooltipMarker("item",Zr(f.color),a);var y=zs(u.formatTooltip(p,!0,null)),m=y.frag;if(m){var v=FL([u],i).get("valueFormatter");h.blocks.push(v?g({valueFormatter:v},m):m)}y.text&&c.push(y.text),s.push(f)}}))}}))})),l.blocks.reverse(),c.reverse();var h=t.position,p=r.get("order"),f=Dl(l,d,a,p,n.get("useUTC"),r.get("textStyle"));f&&c.unshift(f);var y="richText"===a?"\n\n":"
",m=c.join(y);this._showOrMove(r,(function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(r,h,o[0],o[1],this._tooltipContent,s):this._showTooltipContent(r,m,s,Math.random()+"",o[0],o[1],h,null,d)}))},n.prototype._showSeriesItemTooltip=function(e,t,n){var i=this._ecModel,o=Xn(t),r=o.seriesIndex,a=i.getSeriesByIndex(r),s=o.dataModel||a,l=o.dataIndex,u=o.dataType,c=s.getData(u),d=this._renderMode,h=e.positionDefault,p=FL([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,h?{position:h}:null),f=p.get("trigger");if(null==f||"item"===f){var y=s.getDataParams(l,u),m=new Pl;y.marker=m.makeTooltipMarker("item",Zr(y.color),d);var v=zs(s.formatTooltip(l,!1,u)),x=p.get("order"),_=p.get("valueFormatter"),b=v.frag,S=b?Dl(_?g({valueFormatter:_},b):b,m,d,x,i.get("useUTC"),p.get("textStyle")):v.text,w="item_"+s.name+"_"+l;this._showOrMove(p,(function(){this._showTooltipContent(p,S,y,w,e.offsetX,e.offsetY,e.position,e.target,m)})),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:r,from:this.uid})}},n.prototype._showComponentItemTooltip=function(e,t,n){var o=Xn(t),r=o.tooltipConfig.option||{};if(i(r)){r={content:r,formatter:r}}var a=[r],s=this._ecModel.getComponent(o.componentMainType,o.componentIndex);s&&a.push(s),a.push({formatter:r.content});var l=e.positionDefault,u=FL(a,this._tooltipModel,l?{position:l}:null),c=u.get("content"),d=Math.random()+"",h=new Pl;this._showOrMove(u,(function(){var n=oe(u.get("formatterParams")||{});this._showTooltipContent(u,c,n,d,e.offsetX,e.offsetY,e.position,t,h)})),n({type:"showTip",from:this.uid})},n.prototype._showTooltipContent=function(e,t,n,o,r,a,l,u,c){if(this._ticket="",e.get("showContent")&&e.get("show")){var d=this._tooltipContent;d.setEnterable(e.get("enterable"));var h=e.get("formatter");l=l||e.get("position");var f=t,g=this._getNearestPoint([r,a],n,e.get("trigger"),e.get("borderColor")).color;if(h)if(i(h)){var y=e.ecModel.get("useUTC"),m=s(n)?n[0]:n;f=h,m&&m.axisType&&m.axisType.indexOf("time")>=0&&(f=vr(m.axisValue,f,y)),f=Ur(f,n,!0)}else if(p(h)){var v=ce((function(t,i){t===this._ticket&&(d.setContent(i,c,e,g,l),this._updatePosition(e,l,r,a,d,n,u))}),this);this._ticket=o,f=h(n,o,v)}else f=h;d.setContent(f,c,e,g,l),d.show(e,g),this._updatePosition(e,l,r,a,d,n,u)}},n.prototype._getNearestPoint=function(e,t,n,i){return"axis"===n||s(t)?{color:i||("html"===this._renderMode?"#fff":"none")}:s(t)?void 0:{color:i||t.color||t.borderColor}},n.prototype._updatePosition=function(e,t,n,r,a,l,u){var c=this._api.getWidth(),d=this._api.getHeight();t=t||e.get("position");var h=a.getSize(),f=e.get("align"),g=e.get("verticalAlign"),y=u&&u.getBoundingRect().clone();if(u&&y.applyTransform(u.transform),p(t)&&(t=t([n,r],l,a.el,y,{viewSize:[c,d],contentSize:h.slice()})),s(t))n=Ht(t[0],c),r=Ht(t[1],d);else if(o(t)){var m=t;m.width=h[0],m.height=h[1];var v=Qr(m,{width:c,height:d});n=v.x,r=v.y,f=null,g=null}else if(i(t)&&u){var x=function(e,t,n,i){var o=n[0],r=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-o/2,l=t.y+c/2-r/2;break;case"top":s=t.x+u/2-o/2,l=t.y-r-a;break;case"bottom":s=t.x+u/2-o/2,l=t.y+c+a;break;case"left":s=t.x-o-a,l=t.y+c/2-r/2;break;case"right":s=t.x+u+a,l=t.y+c/2-r/2}return[s,l]}(t,y,h,e.get("borderWidth"));n=x[0],r=x[1]}else{x=function(e,t,n,i,o,r,a){var s=n.getSize(),l=s[0],u=s[1];null!=r&&(e+l+r+2>i?e-=l+r:e+=r);null!=a&&(t+u+a>o?t-=u+a:t+=a);return[e,t]}(n,r,a,c,d,f?null:20,g?null:20);n=x[0],r=x[1]}if(f&&(n-=HL(f)?h[0]/2:"right"===f?h[0]:0),g&&(r-=HL(g)?h[1]/2:"bottom"===g?h[1]:0),SL(e)){x=function(e,t,n,i,o){var r=n.getSize(),a=r[0],s=r[1];return e=Math.min(e+a,i)-a,t=Math.min(t+s,o)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(n,r,a,c,d);n=x[0],r=x[1]}a.moveTo(n,r)},n.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===e.length;return o&&u(n,(function(n,r){var a=n.dataByAxis||[],s=(e[r]||{}).dataByAxis||[];(o=o&&a.length===s.length)&&u(a,(function(e,n){var r=s[n]||{},a=e.seriesDataIndices||[],l=r.seriesDataIndices||[];(o=o&&e.value===r.value&&e.axisType===r.axisType&&e.axisId===r.axisId&&a.length===l.length)&&u(a,(function(e,t){var n=l[t];o=o&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex})),i&&u(e.seriesDataIndices,(function(e){var n=e.seriesIndex,r=t[n],a=i[n];r&&a&&a.data!==r.data&&(o=!1)}))}))})),this._lastDataByCoordSys=e,this._cbParamsList=t,!!o},n.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},n.prototype.dispose=function(e,t){!h.node&&t.getDom()&&(su(this,"_updatePosition"),this._tooltipContent.dispose(),TD("itemTooltip",t))},n.type="tooltip",n}(Zl);function FL(e,t,n){var o,r=t.ecModel;n?(o=new nr(n,r,r),o=new nr(t.option,o,r)):o=t;for(var a=e.length-1;a>=0;a--){var s=e[a];s&&(s instanceof nr&&(s=s.get("tooltip",!0)),i(s)&&(s={formatter:s}),s&&(o=new nr(s,o,r)))}return o}function WL(e,t){return e.dispatchAction||ce(t.dispatchAction,t)}function HL(e){return"center"===e||"middle"===e}var UL=GL;var YL=["rect","polygon","keep","clear"];function ZL(e,t){var n=fn(e?e.brush:[]);if(n.length){var i=[];u(n,(function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(i=i.concat(t))}));var o=e&&e.toolbox;s(o)&&(o=o[0]),o||(o={feature:{}},e.toolbox=[o]);var r=o.feature||(o.feature={}),a=r.brush||(r.brush={}),l=a.type||(a.type=[]);l.push.apply(l,i),function(e){var t={};u(e,(function(e){t[e]=1})),e.length=0,u(t,(function(t,n){e.push(n)}))}(l),t&&!l.length&&l.push.apply(l,YL)}}var XL=u;function jL(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}function qL(e,t,n){var i={};return XL(t,(function(t){var o,r=i[t]=((o=function(){}).prototype.__hidden=o.prototype,new o);XL(e[t],(function(e,i){if(y_.isValidType(i)){var o={type:i,visual:e};n&&n(o,t),r[i]=new y_(o),"opacity"===i&&((o=oe(o)).type="colorAlpha",r.__hidden.__alphaForOpacity=new y_(o))}}))})),i}function KL(e,t,n){var i;u(n,(function(e){t.hasOwnProperty(e)&&jL(t[e])&&(i=!0)})),i&&u(n,(function(n){t.hasOwnProperty(n)&&jL(t[n])?e[n]=oe(t[n]):delete e[n]}))}var JL={lineX:$L(0),lineY:$L(1),rect:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])},rect:function(e,t,n){return e&&n.boundingRect.intersect(e)}},polygon:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])&&Te(n.range,e[0],e[1])},rect:function(e,t,n){var i=n.range;if(!e||i.length<=1)return!1;var o=e.x,r=e.y,a=e.width,s=e.height,l=i[0];return!!(Te(i,o,r)||Te(i,o+a,r)||Te(i,o,r+s)||Te(i,o+a,r+s)||Q.create(e).contain(l[0],l[1])||_o(o,r,o+a,r,i)||_o(o,r,o,r+s,i)||_o(o+a,r,o+a,r+s,i)||_o(o,r+s,o+a,r+s,i))||void 0}}};function $L(e){var t=["x","y"],n=["width","height"];return{point:function(t,n,i){if(t){var o=i.range;return QL(t[e],o)}},rect:function(i,o,r){if(i){var a=r.range,s=[i[t[e]],i[t[e]]+i[n[e]]];return s[1]t[0][1]&&(t[0][1]=r[0]),r[1]t[1][1]&&(t[1][1]=r[1])}return t&&sk(t)}};function sk(e){return new Q(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var lk=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new _w(t.getZr())).on("brush",ce(this._onBrush,this)).mount()},n.prototype.render=function(e,t,n,i){this.model=e,this._updateController(e,t,n,i)},n.prototype.updateTransform=function(e,t,n,i){nk(t),this._updateController(e,t,n,i)},n.prototype.updateVisual=function(e,t,n,i){this.updateTransform(e,t,n,i)},n.prototype.updateView=function(e,t,n,i){this._updateController(e,t,n,i)},n.prototype._updateController=function(e,t,n,i){(!i||i.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},n.prototype.dispose=function(){this._brushController.dispose()},n.prototype._onBrush=function(e){var t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:t,areas:oe(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:t,areas:oe(n),$from:t})},n.type="brush",n}(Zl);function uk(e,t){return ie({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new nr(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var ck=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=i.type,e.areas=[],e.brushOption={},e}return e(i,t),i.prototype.optionUpdated=function(e,t){var n=this.option;!t&&KL(n,e,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},i.hasOwnProperty("liftZ")||(i.liftZ=5)},i.prototype.setAreas=function(e){e&&(this.areas=n(e,(function(e){return uk(this.option,e)}),this))},i.prototype.setBrushOption=function(e){this.brushOption=uk(this.option,e),this.brushType=this.brushOption.brushType},i.type="brush",i.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],i.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},i}(sa),dk=["rect","polygon","lineX","lineY","keep","clear"],hk=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.render=function(e,t,n){var i,o,r;t.eachComponent({mainType:"brush"},(function(e){i=e.brushType,o=e.brushOption.brushMode||"single",r=r||!!e.areas.length})),this._brushType=i,this._brushMode=o,u(e.get("type",!0),(function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?r:t===i)?"emphasis":"normal")}))},n.prototype.updateView=function(e,t,n){this.render(e,t,n)},n.prototype.getIcons=function(){var e=this.model,t=e.get("icon",!0),n={};return u(e.get("type",!0),(function(e){t[e]&&(n[e]=t[e])})),n},n.prototype.onclick=function(e,t,n){var i=this._brushType,o=this._brushMode;"clear"===n?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===o?"single":"multiple":o}})},n.getDefaultOption=function(e){return{show:!0,type:dk.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:e.getLocaleModel().get(["toolbox","brush","title"])}},n}(AA);var pk=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e.layoutMode={type:"box",ignoreSize:!0},e}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}(sa),fk=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get("show")){var i=this.group,o=e.getModel("textStyle"),r=e.getModel("subtextStyle"),a=e.get("textAlign"),s=S(e.get("textBaseline"),e.get("textVerticalAlign")),l=new j({style:Po(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),d=new j({style:Po(r,{text:c,fill:r.getTextColor(),y:u.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),h=e.get("link"),p=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!h&&!f,d.silent=!p&&!f,h&&l.on("click",(function(){Xr(h,"_"+e.get("target"))})),p&&d.on("click",(function(){Xr(p,"_"+e.get("subtarget"))})),Xn(l).eventData=Xn(d).eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,i.add(l),c&&i.add(d);var g=i.getBoundingRect(),y=e.getBoxLayoutParams();y.width=g.width,y.height=g.height;var m=Qr(y,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));a||("middle"===(a=e.get("left")||e.get("right"))&&(a="center"),"right"===a?m.x+=m.width:"center"===a&&(m.x+=m.width/2)),s||("center"===(s=e.get("top")||e.get("bottom"))&&(s="middle"),"bottom"===s?m.y+=m.height:"middle"===s&&(m.y+=m.height/2),s=s||"top"),i.x=m.x,i.y=m.y,i.markRedraw();var v={align:a,verticalAlign:s};l.setStyle(v),d.setStyle(v),g=i.getBoundingRect();var x=m.margin,_=e.getItemStyle(["color","opacity"]);_.fill=e.get("backgroundColor");var b=new E({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:e.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});i.add(b)}},n.type="title",n}(Zl);var gk=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e.layoutMode="box",e}return e(n,t),n.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._initData()},n.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},n.prototype.setCurrentIndex=function(e){null==e&&(e=this.option.currentIndex);var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},n.prototype.getCurrentIndex=function(){return this.option.currentIndex},n.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},n.prototype.setPlayState=function(e){this.option.autoPlay=!!e},n.prototype.getPlayState=function(){return!!this.option.autoPlay},n.prototype._initData=function(){var e,t=this.option,n=t.data||[],i=t.axisType,r=this._names=[];"category"===i?(e=[],u(n,(function(t,n){var i,a=Sn(mn(t),"");o(t)?(i=oe(t)).value=n:i=n,e.push(i),r.push(a)}))):e=n;var a={category:"ordinal",time:"time",value:"number"}[i]||"number";(this._data=new Qd([{name:"value",type:a}],this)).initData(e,r)},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}(sa),yk=gk,mk=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.type="timeline.slider",n.defaultOption=rr(yk.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}(yk);re(mk,Vs.prototype);var vk=mk,xk=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.type="timeline",n}(Zl),_k=function(t){function n(e,n,i,o){var r=t.call(this,e,n,i)||this;return r.type=o||"value",r}return e(n,t),n.prototype.getLabelModel=function(){return this.model.getModel("label")},n.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},n}(Jp),bk=_k,Sk=Math.PI,wk=Tn(),Mk=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.init=function(e,t){this.api=t},n.prototype.render=function(e,t,n){if(this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var i=this._layout(e,n),o=this._createGroup("_mainGroup"),r=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(i,e);e.formatTooltip=function(e){return bl("nameValue",{noName:!0,value:a.scale.getLabel({value:e})})},u(["AxisLine","AxisTick","Control","CurrentPointer"],(function(t){this["_render"+t](i,o,a,e)}),this),this._renderAxisLabel(i,r,a,e),this._position(i,e)}this._doPlayStop(),this._updateTicksStatus()},n.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},n.prototype.dispose=function(){this._clearTimer()},n.prototype._layout=function(e,t){var n,o,r,a,s=e.get(["label","position"]),l=e.get("orient"),u=function(e,t){return Qr(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},e.get("padding"))}(e,t),c={horizontal:"center",vertical:(n=null==s||"auto"===s?"horizontal"===l?u.y+u.height/2=0||"+"===n?"left":"right"},d={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:Sk/2},p="vertical"===l?u.height:u.width,f=e.getModel("controlStyle"),g=f.get("show",!0),y=g?f.get("itemSize"):0,m=g?f.get("itemGap"):0,v=y+m,x=e.get(["label","rotate"])||0;x=x*Sk/180;var _=f.get("position",!0),b=g&&f.get("showPlayBtn",!0),S=g&&f.get("showPrevBtn",!0),w=g&&f.get("showNextBtn",!0),M=0,I=p;"left"===_||"bottom"===_?(b&&(o=[0,0],M+=v),S&&(r=[M,0],M+=v),w&&(a=[I-y,0],I-=v)):(b&&(o=[I-y,0],I-=v),S&&(r=[0,0],M+=v),w&&(a=[I-y,0],I-=v));var T=[M,I];return e.get("inverse")&&T.reverse(),{viewRect:u,mainLength:p,orient:l,rotation:h[l],labelRotation:x,labelPosOpt:n,labelAlign:e.get(["label","align"])||c[l],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||d[l],playPosition:o,prevBtnPosition:r,nextBtnPosition:a,axisExtent:T,controlSize:y,controlGap:m}},n.prototype._position=function(e,t){var n=this._mainGroup,o=this._labelGroup,r=e.viewRect;if("vertical"===e.orient){var a=Qe(),s=r.x,l=r.y+r.height;it(a,a,[-s,-l]),Ue(a,a,-Sk/2),it(a,a,[s,l]),(r=r.clone()).applyTransform(a)}var u=m(r),c=m(n.getBoundingRect()),d=m(o.getBoundingRect()),h=[n.x,n.y],p=[o.x,o.y];p[0]=h[0]=u[0][0];var f,g=e.labelPosOpt;null==g||i(g)?(v(h,c,u,1,f="+"===g?0:1),v(p,d,u,1,1-f)):(v(h,c,u,1,f=g>=0?0:1),p[1]=h[1]+g);function y(e){e.originX=u[0][0]-e.x,e.originY=u[1][0]-e.y}function m(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function v(e,t,n,i,o){e[i]+=n[i][o]-t[i][o]}n.setPosition(h),o.setPosition(p),n.rotation=o.rotation=e.rotation,y(n),y(o)},n.prototype._createAxis=function(e,t){var n=t.getData(),i=t.get("axisType"),o=function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new Mh({ordinalMeta:e.getCategories(),extent:[1/0,-1/0]});case"time":return new jh({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new Dh}}(t,i);o.getTicks=function(){return n.mapArray(["value"],(function(e){return{value:e}}))};var r=n.getDataExtent("value");o.setExtent(r[0],r[1]),o.calcNiceTicks();var a=new bk("value",o,e.axisExtent,i);return a.model=t,a},n.prototype._createGroup=function(e){var t=this[e]=new X;return this.group.add(t),t},n.prototype._renderAxisLine=function(e,t,n,i){var o=n.getExtent();if(i.get(["lineStyle","show"])){var r=new V({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:g({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});t.add(r);var a=this._progressLine=new V({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:C({lineCap:"round",lineWidth:r.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});t.add(a)}},n.prototype._renderAxisTick=function(e,t,n,i){var o=this,r=i.getData(),a=n.scale.getTicks();this._tickSymbols=[],u(a,(function(e){var a=n.dataToCoord(e.value),s=r.getItemModel(e.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),c=s.getModel(["progress","itemStyle"]),d={x:a,y:0,onclick:ce(o._changeTimeline,o,e.value)},h=Ik(s,l,t,d);h.ensureState("emphasis").style=u.getItemStyle(),h.ensureState("progress").style=c.getItemStyle(),ki(h);var p=Xn(h);s.get("tooltip")?(p.dataIndex=e.value,p.dataModel=i):p.dataIndex=p.dataModel=null,o._tickSymbols.push(h)}))},n.prototype._renderAxisLabel=function(e,t,n,i){var o=this;if(n.getLabelModel().get("show")){var r=i.getData(),a=n.getViewLabels();this._tickLabels=[],u(a,(function(i){var a=i.tickValue,s=r.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),c=s.getModel(["progress","label"]),d=n.dataToCoord(i.tickValue),h=new j({x:d,y:0,rotation:e.labelRotation-e.rotation,onclick:ce(o._changeTimeline,o,a),silent:!1,style:Po(l,{text:i.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});h.ensureState("emphasis").style=Po(u),h.ensureState("progress").style=Po(c),t.add(h),ki(h),wk(h).dataIndex=a,o._tickLabels.push(h)}))}},n.prototype._renderControl=function(e,t,n,i){var o=e.controlSize,r=e.rotation,a=i.getModel("controlStyle").getItemStyle(),s=i.getModel(["emphasis","controlStyle"]).getItemStyle(),l=i.getPlayState(),u=i.get("inverse",!0);function c(e,n,l,u){if(e){var c=Ie(S(i.get(["controlStyle",n+"BtnSize"]),o),o),d=function(e,t,n,i){var o=i.style,r=xo(e.get(["controlStyle",t]),i||{},new Q(n[0],n[1],n[2],n[3]));o&&r.setStyle(o);return r}(i,n+"Icon",[0,-c/2,c,c],{x:e[0],y:e[1],originX:o/2,originY:0,rotation:u?-r:0,rectHover:!0,style:a,onclick:l});d.ensureState("emphasis").style=s,t.add(d),ki(d)}}c(e.nextBtnPosition,"next",ce(this._changeTimeline,this,u?"-":"+")),c(e.prevBtnPosition,"prev",ce(this._changeTimeline,this,u?"+":"-")),c(e.playPosition,l?"stop":"play",ce(this._handlePlayClick,this,!l),!0)},n.prototype._renderCurrentPointer=function(e,t,n,i){var o=i.getData(),r=i.getCurrentIndex(),a=o.getItemModel(r).getModel("checkpointStyle"),s=this,l={onCreate:function(e){e.draggable=!0,e.drift=ce(s._handlePointerDrag,s),e.ondragend=ce(s._handlePointerDragend,s),Tk(e,s._progressLine,r,n,i,!0)},onUpdate:function(e){Tk(e,s._progressLine,r,n,i)}};this._currentPointer=Ik(a,a,this._mainGroup,{},this._currentPointer,l)},n.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},n.prototype._handlePointerDrag=function(e,t,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},n.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},n.prototype._pointerChangeTimeline=function(e,t){var n=this._toAxisCoord(e)[0],i=Yt(this._axis.getExtent().slice());n>i[1]&&(n=i[1]),n=0&&(a[r]=+a[r].toFixed(d)),[a,c]}var Bk={min:se(zk,"min"),max:se(zk,"max"),average:se(zk,"average"),median:se(zk,"median")};function Gk(e,t){var n=e.getData(),i=e.coordinateSystem;if(t&&!function(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}(t)&&!s(t.coord)&&i){var o=i.dimensions,r=Fk(t,n,i,e);if((t=oe(t)).type&&Bk[t.type]&&r.baseAxis&&r.valueAxis){var a=c(o,r.baseAxis.dim),l=c(o,r.valueAxis.dim),u=Bk[t.type](n,r.baseDataDim,r.valueDataDim,a,l);t.coord=u[0],t.value=u[1]}else{for(var d=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis],h=0;h<2;h++)Bk[d[h]]&&(d[h]=Uk(n,n.mapDimension(o[h]),d[h]));t.coord=d}}return t}function Fk(e,t,n,i){var o={};return null!=e.valueIndex||null!=e.valueDim?(o.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,o.valueAxis=n.getAxis(function(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}(i,o.valueDataDim)),o.baseAxis=n.getOtherAxis(o.valueAxis),o.baseDataDim=t.mapDimension(o.baseAxis.dim)):(o.baseAxis=i.getBaseAxis(),o.valueAxis=n.getOtherAxis(o.baseAxis),o.baseDataDim=t.mapDimension(o.baseAxis.dim),o.valueDataDim=t.mapDimension(o.valueAxis.dim)),o}function Wk(e,t){return!(e&&e.containData&&t.coord&&!Vk(t))||e.containData(t.coord)}function Hk(e,t){return e?function(e,n,i,o){return Ws(o<2?e.coord&&e.coord[o]:e.value,t[o])}:function(e,n,i,o){return Ws(e.value,t[o])}}function Uk(e,t,n){if("average"===n){var i=0,o=0;return e.each(t,(function(e,t){isNaN(e)||(i+=e,o++)})),i/o}return"median"===n?e.getMedian(t):e.getDataExtent(t)["max"===n?1:0]}var Yk=Tn(),Zk=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.init=function(){this.markerGroupMap=l()},n.prototype.render=function(e,t,n){var i=this,o=this.markerGroupMap;o.each((function(e){Yk(e).keep=!1})),t.eachSeries((function(e){var o=Rk.getMarkerModelFromSeries(e,i.type);o&&i.renderSeries(e,o,t,n)})),o.each((function(e){!Yk(e).keep&&i.group.remove(e.group)}))},n.prototype.markKeep=function(e){Yk(e).keep=!0},n.prototype.toggleBlurSeries=function(e,t){var n=this;u(e,(function(e){var i=Rk.getMarkerModelFromSeries(e,n.type);i&&i.getData().eachItemGraphicEl((function(e){e&&(t?_i(e):bi(e))}))}))},n.type="marker",n}(Zl);function Xk(e,t,n){var i=t.coordinateSystem;e.each((function(o){var r,a=e.getItemModel(o),s=Ht(a.get("x"),n.getWidth()),l=Ht(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(t.getMarkerPosition)r=t.getMarkerPosition(e.getValues(e.dimensions,o));else if(i){var u=e.get(i.dimensions[0],o),c=e.get(i.dimensions[1],o);r=i.dataToPoint([u,c])}}else r=[s,l];isNaN(s)||(r[0]=s),isNaN(l)||(r[1]=l),e.setItemLayout(o,r)}))}var jk=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=i.type,e}return e(i,t),i.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=Rk.getMarkerModelFromSeries(e,"markPoint");t&&(Xk(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())}),this)},i.prototype.renderSeries=function(e,t,i,o){var r=e.coordinateSystem,a=e.id,s=e.getData(),l=this.markerGroupMap,u=l.get(a)||l.set(a,new jf),c=function(e,t,i){var o;o=e?n(e&&e.dimensions,(function(e){var n=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return g(g({},n),{name:e,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new Qd(o,i),a=n(i.get("data"),se(Gk,t));e&&(a=ue(a,se(Wk,e)));var s=Hk(!!e,o);return r.initData(a,null,s),r}(r,e,t);t.setData(c),Xk(t.getData(),e,o),c.each((function(e){var n=c.getItemModel(e),i=n.getShallow("symbol"),o=n.getShallow("symbolSize"),r=n.getShallow("symbolRotate"),a=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if(p(i)||p(o)||p(r)||p(a)){var u=t.getRawValue(e),d=t.getDataParams(e);p(i)&&(i=i(u,d)),p(o)&&(o=o(u,d)),p(r)&&(r=r(u,d)),p(a)&&(a=a(u,d))}var h=n.getModel("itemStyle").getItemStyle(),f=Yu(s,"color");h.fill||(h.fill=f),c.setItemVisual(e,{symbol:i,symbolSize:o,symbolRotate:r,symbolOffset:a,symbolKeepAspect:l,style:h})})),u.updateData(c),this.group.add(u.group),c.eachItemGraphicEl((function(e){e.traverse((function(e){Xn(e).dataModel=t}))})),this.markKeep(u),u.group.silent=t.get("silent")||e.get("silent")},i.type="markPoint",i}(Zk);var qk=jk;var Kk=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.createMarkerModelFromSeries=function(e,t,i){return new n(e,t,i)},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}(Rk),Jk=Tn(),$k=function(e,t,n,i){var o,a=e.getData();if(s(i))o=i;else{var l=i.type;if("min"===l||"max"===l||"average"===l||"median"===l||null!=i.xAxis||null!=i.yAxis){var u=void 0,c=void 0;if(null!=i.yAxis||null!=i.xAxis)u=t.getAxis(null!=i.yAxis?"y":"x"),c=He(i.yAxis,i.xAxis);else{var d=Fk(i,a,t,e);u=d.valueAxis,c=Uk(a,sh(a,d.valueDataDim),l)}var h="x"===u.dim?0:1,p=1-h,f=oe(i),y={coord:[]};f.type=null,f.coord=[],f.coord[p]=-1/0,y.coord[p]=1/0;var m=n.get("precision");m>=0&&r(c)&&(c=+c.toFixed(Math.min(m,20))),f.coord[h]=y.coord[h]=c,o=[f,y,{type:l,valueIndex:i.valueIndex,value:c}]}else o=[]}var v=[Gk(e,o[0]),Gk(e,o[1]),g({},o[2])];return v[2].type=v[2].type||null,ie(v[2],v[0]),ie(v[2],v[1]),v};function Qk(e){return!isNaN(e)&&!isFinite(e)}function eP(e,t,n,i){var o=1-e,r=i.dimensions[e];return Qk(t[o])&&Qk(n[o])&&t[e]===n[e]&&i.getAxis(r).containData(t[e])}function tP(e,t){if("cartesian2d"===e.type){var n=t[0].coord,i=t[1].coord;if(n&&i&&(eP(1,n,i,e)||eP(0,n,i,e)))return!0}return Wk(e,t[0])&&Wk(e,t[1])}function nP(e,t,n,i,o){var r,a=i.coordinateSystem,s=e.getItemModel(t),l=Ht(s.get("x"),o.getWidth()),u=Ht(s.get("y"),o.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)r=i.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=a.dimensions,d=e.get(c[0],t),h=e.get(c[1],t);r=a.dataToPoint([d,h])}if(lg(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y");c=a.dimensions;Qk(e.get(c[0],t))?r[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):Qk(e.get(c[1],t))&&(r[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];e.setItemLayout(t,r)}var iP=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=i.type,e}return e(i,t),i.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=Rk.getMarkerModelFromSeries(e,"markLine");if(t){var i=t.getData(),o=Jk(t).from,r=Jk(t).to;o.each((function(t){nP(o,t,!0,e,n),nP(r,t,!1,e,n)})),i.each((function(e){i.setItemLayout(e,[o.getItemLayout(e),r.getItemLayout(e)])})),this.markerGroupMap.get(e.id).updateLayout()}}),this)},i.prototype.renderSeries=function(e,t,i,o){var r=e.coordinateSystem,a=e.id,l=e.getData(),u=this.markerGroupMap,c=u.get(a)||u.set(a,new _b);this.group.add(c.group);var d=function(e,t,i){var o;o=e?n(e&&e.dimensions,(function(e){var n=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return g(g({},n),{name:e,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new Qd(o,i),a=new Qd(o,i),s=new Qd([],i),l=n(i.get("data"),se($k,t,e,i));e&&(l=ue(l,se(tP,e)));var u=Hk(!!e,o);return r.initData(n(l,(function(e){return e[0]})),null,u),a.initData(n(l,(function(e){return e[1]})),null,u),s.initData(n(l,(function(e){return e[2]}))),s.hasItemOption=!0,{from:r,to:a,line:s}}(r,e,t),h=d.from,p=d.to,f=d.line;Jk(t).from=h,Jk(t).to=p,t.setData(f);var y=t.get("symbol"),m=t.get("symbolSize"),v=t.get("symbolRotate"),x=t.get("symbolOffset");function _(t,n,i){var r=t.getItemModel(n);nP(t,n,i,e,o);var a=r.getModel("itemStyle").getItemStyle();null==a.fill&&(a.fill=Yu(l,"color")),t.setItemVisual(n,{symbolKeepAspect:r.get("symbolKeepAspect"),symbolOffset:S(r.get("symbolOffset",!0),x[i?0:1]),symbolRotate:S(r.get("symbolRotate",!0),v[i?0:1]),symbolSize:S(r.get("symbolSize"),m[i?0:1]),symbol:S(r.get("symbol",!0),y[i?0:1]),style:a})}s(y)||(y=[y,y]),s(m)||(m=[m,m]),s(v)||(v=[v,v]),s(x)||(x=[x,x]),d.from.each((function(e){_(h,e,!0),_(p,e,!1)})),f.each((function(e){var t=f.getItemModel(e).getModel("lineStyle").getLineStyle();f.setItemLayout(e,[h.getItemLayout(e),p.getItemLayout(e)]),null==t.stroke&&(t.stroke=h.getItemVisual(e,"style").fill),f.setItemVisual(e,{fromSymbolKeepAspect:h.getItemVisual(e,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(e,"symbolOffset"),fromSymbolRotate:h.getItemVisual(e,"symbolRotate"),fromSymbolSize:h.getItemVisual(e,"symbolSize"),fromSymbol:h.getItemVisual(e,"symbol"),toSymbolKeepAspect:p.getItemVisual(e,"symbolKeepAspect"),toSymbolOffset:p.getItemVisual(e,"symbolOffset"),toSymbolRotate:p.getItemVisual(e,"symbolRotate"),toSymbolSize:p.getItemVisual(e,"symbolSize"),toSymbol:p.getItemVisual(e,"symbol"),style:t})})),c.updateData(f),d.line.eachItemGraphicEl((function(e){Xn(e).dataModel=t,e.traverse((function(e){Xn(e).dataModel=t}))})),this.markKeep(c),c.group.silent=t.get("silent")||e.get("silent")},i.type="markLine",i}(Zk);var oP=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.createMarkerModelFromSeries=function(e,t,i){return new n(e,t,i)},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}(Rk),rP=Tn(),aP=function(e,t,n,i){var o=Gk(e,i[0]),r=Gk(e,i[1]),a=o.coord,s=r.coord;a[0]=He(a[0],-1/0),a[1]=He(a[1],-1/0),s[0]=He(s[0],1/0),s[1]=He(s[1],1/0);var l=tt([{},o,r]);return l.coord=[o.coord,r.coord],l.x0=o.x,l.y0=o.y,l.x1=r.x,l.y1=r.y,l};function sP(e){return!isNaN(e)&&!isFinite(e)}function lP(e,t,n,i){var o=1-e;return sP(t[o])&&sP(n[o])}function uP(e,t){var n=t.coord[0],i=t.coord[1],o={coord:n,x:t.x0,y:t.y0},r={coord:i,x:t.x1,y:t.y1};return lg(e,"cartesian2d")?!(!n||!i||!lP(1,n,i)&&!lP(0,n,i))||function(e,t,n){return!(e&&e.containZone&&t.coord&&n.coord&&!Vk(t)&&!Vk(n))||e.containZone(t.coord,n.coord)}(e,o,r):Wk(e,o)||Wk(e,r)}function cP(e,t,n,i,o){var r,a=i.coordinateSystem,s=e.getItemModel(t),l=Ht(s.get(n[0]),o.getWidth()),u=Ht(s.get(n[1]),o.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)r=i.getMarkerPosition(e.getValues(n,t));else{var c=[p=e.get(n[0],t),f=e.get(n[1],t)];a.clampData&&a.clampData(c,c),r=a.dataToPoint(c,!0)}if(lg(a,"cartesian2d")){var d=a.getAxis("x"),h=a.getAxis("y"),p=e.get(n[0],t),f=e.get(n[1],t);sP(p)?r[0]=d.toGlobalCoord(d.getExtent()["x0"===n[0]?0:1]):sP(f)&&(r[1]=h.toGlobalCoord(h.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];return r}var dP=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],hP=function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=o.type,e}return e(o,t),o.prototype.updateTransform=function(e,t,i){t.eachSeries((function(e){var t=Rk.getMarkerModelFromSeries(e,"markArea");if(t){var o=t.getData();o.each((function(t){var r=n(dP,(function(n){return cP(o,t,n,e,i)}));o.setItemLayout(t,r),o.getItemGraphicEl(t).setShape("points",r)}))}}),this)},o.prototype.renderSeries=function(e,t,o,r){var a=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new X});this.group.add(c.group),this.markKeep(c);var d=function(e,t,i){var o,r,a=["x0","y0","x1","y1"];if(e){var s=n(e&&e.dimensions,(function(e){var n=t.getData(),i=n.getDimensionInfo(n.mapDimension(e))||{};return g(g({},i),{name:e,ordinalMeta:null})}));r=n(a,(function(e,t){return{name:e,type:s[t%2].type}})),o=new Qd(r,i)}else o=new Qd(r=[{name:"value",type:"float"}],i);var l=n(i.get("data"),se(aP,t,e,i));e&&(l=ue(l,se(uP,e)));var u=e?function(e,t,n,i){return Ws(e.coord[Math.floor(i/2)][i%2],r[i])}:function(e,t,n,i){return Ws(e.value,r[i])};return o.initData(l,null,u),o.hasItemOption=!0,o}(a,e,t);t.setData(d),d.each((function(t){var o=n(dP,(function(n){return cP(d,t,n,e,r)})),s=a.getAxis("x").scale,u=a.getAxis("y").scale,c=s.getExtent(),h=u.getExtent(),p=[s.parse(d.get("x0",t)),s.parse(d.get("x1",t))],f=[u.parse(d.get("y0",t)),u.parse(d.get("y1",t))];Yt(p),Yt(f);var g=!!(c[0]>p[1]||c[1]f[1]||h[1]=0},o.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},o.type="legend.plain",o.dependencies=["series"],o.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}},o}(sa),gP=fP,yP=se,mP=u,vP=X,xP=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e.newlineDisabled=!1,e}return e(n,t),n.prototype.init=function(){this.group.add(this._contentGroup=new vP),this.group.add(this._selectorGroup=new vP),this._isFirstRender=!0},n.prototype.getContentGroup=function(){return this._contentGroup},n.prototype.getSelectorGroup=function(){return this._selectorGroup},n.prototype.render=function(e,t,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var o=e.get("align"),r=e.get("orient");o&&"auto"!==o||(o="right"===e.get("left")&&"vertical"===r?"right":"left");var a=e.get("selector",!0),s=e.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===r?"end":"start"),this.renderInner(o,e,t,n,a,r,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),d=Qr(l,u,c),h=this.layoutInner(e,o,d,i,a,s),p=Qr(C({width:h.width,height:h.height},l),u,c);this.group.x=p.x-h.x,this.group.y=p.y-h.y,this.group.markRedraw(),this.group.add(this._backgroundEl=OA(h,e))}},n.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},n.prototype.renderInner=function(e,t,n,i,o,r,a){var s=this.getContentGroup(),u=l(),c=t.get("selectedMode"),d=[];n.eachRawSeries((function(e){!e.get("legendHoverLink")&&d.push(e.id)})),mP(t.getData(),(function(o,r){var a=o.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var l=new vP;return l.newline=!0,void s.add(l)}var h=n.getSeriesByName(a)[0];if(!u.get(a))if(h){var p=h.getData(),f=p.getVisual("legendLineStyle")||{},y=p.getVisual("legendIcon"),m=p.getVisual("style");this._createItem(h,a,r,o,t,e,f,m,y,c,i).on("click",yP(_P,a,null,i,d)).on("mouseover",yP(SP,h.name,null,i,d)).on("mouseout",yP(wP,h.name,null,i,d)),u.set(a,!0)}else n.eachRawSeries((function(n){if(!u.get(a)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(a))return;var l=s.indexOfName(a),h=s.getItemVisual(l,"style"),p=s.getItemVisual(l,"legendIcon"),f=ut(h.fill);f&&0===f[3]&&(f[3]=.2,h=g(g({},h),{fill:at(f,"rgba")})),this._createItem(n,a,r,o,t,e,{},h,p,c,i).on("click",yP(_P,null,a,i,d)).on("mouseover",yP(SP,null,a,i,d)).on("mouseout",yP(wP,null,a,i,d)),u.set(a,!0)}}),this)}),this),o&&this._createSelector(o,t,i,r,a)},n.prototype._createSelector=function(e,t,n,i,o){var r=this.getSelectorGroup();mP(e,(function(e){var i=e.type,o=new j({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});r.add(o),Lo(o,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),ki(o)}))},n.prototype._createItem=function(e,t,n,o,r,a,s,l,u,c,d){var h=e.visualDrawType,f=r.get("itemWidth"),g=r.get("itemHeight"),y=r.isSelected(t),m=o.get("symbolRotate"),v=o.get("symbolKeepAspect"),x=o.get("icon"),_=function(e,t,n,i,o,r,a){function s(e,t){"auto"===e.lineWidth&&(e.lineWidth=t.lineWidth>0?2:0),mP(e,(function(n,i){"inherit"===e[i]&&(e[i]=t[i])}))}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=0===e.lastIndexOf("empty",0)?"fill":"stroke",d=l.getShallow("decal");u.decal=d&&"inherit"!==d?cc(d,a):i.decal,"inherit"===u.fill&&(u.fill=i[o]);"inherit"===u.stroke&&(u.stroke=i[c]);"inherit"===u.opacity&&(u.opacity=("fill"===o?i:n).opacity);s(u,i);var h=t.getModel("lineStyle"),p=h.getLineStyle();if(s(p,n),"auto"===u.fill&&(u.fill=i.fill),"auto"===u.stroke&&(u.stroke=i.fill),"auto"===p.stroke&&(p.stroke=i.fill),!r){var f=t.get("inactiveBorderWidth"),g=u[c];u.lineWidth="auto"===f?i.lineWidth>0&&g?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),p.stroke=h.get("inactiveColor"),p.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(u=x||u||"roundRect",o,s,l,h,y,d),b=new vP,S=o.getModel("textStyle");if(!p(e.getLegendIcon)||x&&"inherit"!==x){var w="inherit"===x&&e.getData().getVisual("symbol")?"inherit"===m?e.getData().getVisual("symbolRotate"):m:0;b.add(function(e){var t=e.icon||"roundRect",n=oc(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:f,itemHeight:g,icon:u,iconRotate:w,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:v}))}else b.add(e.getLegendIcon({itemWidth:f,itemHeight:g,icon:u,iconRotate:m,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:v}));var M="left"===a?f+5:-5,I=a,T=r.get("formatter"),D=t;i(T)&&T?D=T.replace("{name}",null!=t?t:""):p(T)&&(D=T(t));var C=o.get("inactiveColor");b.add(new j({style:Po(S,{text:D,x:M,y:g/2,fill:y?S.getTextColor():C,align:I,verticalAlign:"middle"})}));var A=new E({shape:b.getBoundingRect(),invisible:!0}),L=o.getModel("tooltip");return L.get("show")&&wo({el:A,componentModel:r,itemName:t,itemTooltipOption:L.option}),b.add(A),b.eachChild((function(e){e.silent=!0})),A.silent=!c,this.getContentGroup().add(b),ki(b),b.__legendDataIndex=n,b},n.prototype.layoutInner=function(e,t,n,i,o,r){var a=this.getContentGroup(),s=this.getSelectorGroup();$r(e.get("orient"),a,e.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),o){$r("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),d=[-c.x,-c.y],h=e.get("selectorButtonGap",!0),p=e.getOrient().index,f=0===p?"width":"height",g=0===p?"height":"width",y=0===p?"y":"x";"end"===r?d[p]+=l[f]+h:u[p]+=c[f]+h,d[1-p]+=l[g]/2-c[g]/2,s.x=d[0],s.y=d[1],a.x=u[0],a.y=u[1];var m={x:0,y:0};return m[f]=l[f]+h+c[f],m[g]=Math.max(l[g],c[g]),m[y]=Math.min(0,c[y]+d[1-p]),m}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},n.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},n.type="legend.plain",n}(Zl);function _P(e,t,n,i){wP(e,t,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),SP(e,t,n,i)}function bP(e){for(var t,n=e.getZr().storage.getDisplayList(),i=0,o=n.length;in[o],f=[-d.x,-d.y];t||(f[i]=l[s]);var g=[0,0],y=[-h.x,-h.y],m=S(e.get("pageButtonGap",!0),e.get("itemGap",!0));p&&("end"===e.get("pageButtonPosition",!0)?y[i]+=n[o]-h[o]:g[i]+=h[o]+m);y[1-i]+=d[r]/2-h[r]/2,l.setPosition(f),u.setPosition(g),c.setPosition(y);var v={x:0,y:0};if(v[o]=p?n[o]:d[o],v[r]=Math.max(d[r],h[r]),v[a]=Math.min(0,h[a]+y[1-i]),u.__rectSize=n[o],p){var x={x:0,y:0};x[o]=Math.max(n[o]-h[o]-m,0),x[r]=v[r],u.setClipPath(new E({shape:x})),u.__rectSize=x[o]}else c.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var _=this._getPageInfo(e);return null!=_.pageIndex&&Ui(l,{x:_.contentPosition[0],y:_.contentPosition[1]},p?e:null),this._updatePageInfoView(e,_),v},n.prototype._pageGo=function(e,t,n){var i=this._getPageInfo(t)[e];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:t.id})},n.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;u(["pagePrev","pageNext"],(function(i){var o=null!=t[i+"DataIndex"],r=n.childOfName(i);r&&(r.setStyle("fill",o?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),r.cursor=o?"pointer":"default")}));var o=n.childOfName("pageText"),r=e.get("pageFormatter"),a=t.pageIndex,s=null!=a?a+1:0,l=t.pageCount;o&&r&&o.setStyle("text",i(r)?r.replace("{current}",null==s?"":s+"").replace("{total}",null==l?"":l+""):r({current:s,total:l}))},n.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=e.getOrient().index,r=kP[o],a=PP[o],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,d=c?1:0,h={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return h;var p=v(u);h.contentPosition[o]=-p.s;for(var f=s+1,g=p,y=p,m=null;f<=c;++f)(!(m=v(l[f]))&&y.e>g.s+i||m&&!x(m,g.s))&&(g=y.i>g.i?y:m)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=g.i),++h.pageCount),y=m;for(f=s-1,g=p,y=p,m=null;f>=-1;--f)(m=v(l[f]))&&x(y,m.s)||!(g.i=t&&e.s<=t+i}},n.prototype._findTargetItemIndex=function(e){return this._showController?(this.getContentGroup().eachChild((function(i,o){var r=i.__legendDataIndex;null==n&&null!=r&&(n=o),r===e&&(t=o)})),null!=t?t:n):0;var t,n},n.type="legend.scroll",n}(MP),OP=NP;function RP(e){Md(DP),e.registerComponentModel(AP),e.registerComponentView(OP),function(e){e.registerAction("legendScroll","legendscroll",(function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(n)}))}))}(e)}var EP=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.type="dataZoom.inside",n.defaultOption=rr(mA.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),n}(mA),VP=Tn();function zP(e,t,n){VP(e).coordSysRecordMap.each((function(e){var i=e.dataZoomInfoMap.get(t.uid);i&&(i.getRange=n)}))}function BP(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function GP(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function FP(e,t,n,i){return e.coordinateSystem.containPoint([n,i])}function WP(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,(function(e,t){var n=VP(t),i=n.coordSysRecordMap||(n.coordSysRecordMap=l());i.each((function(e){e.dataZoomInfoMap=null})),e.eachComponent({mainType:"dataZoom",subType:"inside"},(function(e){var n=pA(e);u(n.infoList,(function(n){var o=n.model.uid,r=i.get(o)||i.set(o,function(e,t){var n={model:t,containsPoint:se(FP,t),dispatchAction:se(GP,e),dataZoomInfoMap:null,controller:null},i=n.controller=new jm(e.getZr());return u(["pan","zoom","scrollMove"],(function(e){i.on(e,(function(t){var i=[];n.dataZoomInfoMap.each((function(o){if(t.isAvailableBehavior(o.model.option)){var r=(o.getRange||{})[e],a=r&&r(o.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!o.model.get("disabled",!0)&&a&&i.push({dataZoomId:o.model.id,start:a[0],end:a[1]})}})),i.length&&n.dispatchAction(i)}))})),n}(t,n.model));(r.dataZoomInfoMap||(r.dataZoomInfoMap=l())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})}))})),i.each((function(e){var t,n=e.controller,o=e.dataZoomInfoMap;if(o){var r=o.keys()[0];null!=r&&(t=o.get(r))}if(t){var a=function(e){var t,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return e.each((function(e){var r=e.model,a=!r.get("disabled",!0)&&(!r.get("zoomLock",!0)||"move");i[n+a]>i[n+t]&&(t=a),o=o&&r.get("preventDefaultMouseMove",!0)})),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o}}}(o);n.enable(a.controlType,a.opt),n.setPointerChecker(e.containsPoint),au(e,"dispatchAction",t.model.get("throttle",!0),"fixRate")}else BP(i,e)}))}))}var HP=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return e(n,t),n.prototype.render=function(e,n,i){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),zP(i,e,{pan:ce(UP.pan,this),zoom:ce(UP.zoom,this),scrollMove:ce(UP.scrollMove,this)}))},n.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},n.prototype._clear=function(){!function(e,t){for(var n=VP(e).coordSysRecordMap,i=n.keys(),o=0;o0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(r[1]-r[0])+r[0],u=Math.max(1/i.scale,0);r[0]=(r[0]-l)*u+l,r[1]=(r[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return vS(0,r,[0,100],0,c.minSpan,c.maxSpan),this.range=r,o[0]!==r[0]||o[1]!==r[1]?r:void 0}},pan:YP((function(e,t,n,i,o,r){var a=ZP[i]([r.oldX,r.oldY],[r.newX,r.newY],t,o,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength})),scrollMove:YP((function(e,t,n,i,o,r){return ZP[i]([0,0],[r.scrollDelta,r.scrollDelta],t,o,n).signal*(e[1]-e[0])*r.scrollDelta}))};function YP(e){return function(t,n,i,o){var r=this.range,a=r.slice(),s=t.axisModels[0];if(s)return vS(e(a,s,t,n,i,o),a,[0,100],"all"),this.range=a,r[0]!==a[0]||r[1]!==a[1]?a:void 0}}var ZP={grid:function(e,t,n,i,o){var r=n.axis,a={},s=o.model.coordinateSystem.getRect();return e=e||[0,0],"x"===r.dim?(a.pixel=t[0]-e[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=r.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=r.inverse?-1:1),a},polar:function(e,t,n,i,o){var r=n.axis,a={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(a.pixel=t[0]-e[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=r.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=r.inverse?-1:1),a},singleAxis:function(e,t,n,i,o){var r=n.axis,a=o.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===r.orient?(s.pixel=t[0]-e[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=r.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=r.inverse?-1:1),s}},XP=HP;function jP(e){DA(e),e.registerComponentModel(EP),e.registerComponentView(XP),WP(e)}var qP=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.type="dataZoom.slider",n.layoutMode="box",n.defaultOption=rr(mA.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}(mA),KP=E,JP=["line","bar","candlestick","scatter"],$P={easing:"cubicOut",duration:100,delay:0},QP=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e._displayables={},e}return e(n,t),n.prototype.init=function(e,t){this.api=t,this._onBrush=ce(this._onBrush,this),this._onBrushEnd=ce(this._onBrushEnd,this)},n.prototype.render=function(e,n,i,o){if(t.prototype.render.apply(this,arguments),au(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1!==e.get("show")){if(e.noTarget())return this._clear(),void this.group.removeAll();o&&"dataZoom"===o.type&&o.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(){su(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},n.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new X;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},n.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect")?7:0,i=this._findCoordRect(),o={width:t.getWidth(),height:t.getHeight()},r="horizontal"===this._orient?{right:o.width-i.x-i.width,top:o.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=ia(e.option);u(["right","top","width","height"],(function(e){"ph"===a[e]&&(a[e]=r[e])}));var s=Qr(a,o);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 e=this.group,t=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),r=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;r.attr("horizontal"!==n||o?"horizontal"===n&&o?{scaleY:a?1:-1,scaleX:-1}:"vertical"!==n||o?{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=e.getBoundingRect([r]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},n.prototype._getViewExtent=function(){return[0,this._size[0]]},n.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,i=e.get("brushSelect");n.add(new KP({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new KP({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:ce(this._onClickPanel,this)}),r=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",r.on("mousemove",this._onBrush),r.on("mouseup",this._onBrushEnd)):(r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)),n.add(o)},n.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=this._shadowSize||[],i=e.series,o=i.getRawData(),r=i.getShadowDim?i.getShadowDim():e.otherDim;if(null!=r){var a=this._shadowPolygonPts,s=this._shadowPolylinePts;if(o!==this._shadowData||r!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var l=o.getDataExtent(r),u=.3*(l[1]-l[0]);l=[l[0]-u,l[1]+u];var c,d=[0,t[1]],h=[0,t[0]],p=[[t[0],0],[0,0]],f=[],g=h[1]/(o.count()-1),y=0,m=Math.round(o.count()/t[0]);o.each([r],(function(e,t){if(m>0&&t%m)y+=g;else{var n=null==e||isNaN(e)||""===e,i=n?0:Wt(e,l,d,!0);n&&!c&&t?(p.push([p[p.length-1][0],0]),f.push([f[f.length-1][0],0])):!n&&c&&(p.push([y,0]),f.push([y,0])),p.push([y,i]),f.push([y,i]),y+=g,c=n}})),a=this._shadowPolygonPts=p,s=this._shadowPolylinePts=f}this._shadowData=o,this._shadowDim=r,this._shadowSize=[t[0],t[1]];for(var v=this.dataZoomModel,x=0;x<3;x++){var _=b(1===x);this._displayables.sliderGroup.add(_),this._displayables.dataShadowSegs.push(_)}}}function b(e){var t=v.getModel(e?"selectedDataBackground":"dataBackground"),n=new X,i=new O({shape:{points:a},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),o=new R({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(o),n}},n.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,i=this.ecModel;return e.eachTargetAxis((function(o,r){var a=e.getAxisProxy(o,r).getTargetSeriesModels();u(a,(function(e){if(!(n||!0!==t&&c(JP,e.get("type"))<0)){var a,s=i.getComponent(dA(o),r).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[o],u=e.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),n={thisAxis:s,series:e,thisDim:o,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},n.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],i=t.handleLabels=[null,null],o=this._displayables.sliderGroup,r=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,c=a.get("brushSelect"),d=t.filler=new KP({silent:c,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});o.add(d),o.add(new KP({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:r[0],height:r[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),u([0,1],(function(t){var r=a.get("handleIcon");!tc[r]&&r.indexOf("path://")<0&&r.indexOf("image://")<0&&(r="path://"+r);var s=oc(r,-1,0,2,2,null,!0);s.attr({cursor:eN(this._orient),draggable:!0,drift:ce(this._onDragMove,this,t),ondragend:ce(this._onDragEnd,this),onmouseover:ce(this._showDataInfo,this,!0),onmouseout:ce(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=Ht(u,this._size[1]),this._handleWidth=l.width/l.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(),ki(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),o.add(n[t]=s);var d=a.getModel("textStyle");e.add(i[t]=new j({silent:!0,invisible:!0,style:Po(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))}),this);var h=d;if(c){var p=Ht(a.get("moveHandleSize"),r[1]),f=t.moveHandle=new E({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:r[1]-.5,height:p}}),g=.8*p,y=t.moveHandleIcon=oc(a.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=r[1]+p/2-.5,f.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(r[1]/2,Math.max(p,10));(h=t.moveZone=new E({invisible:!0,shape:{y:r[1]-m,height:p+m}})).on("mouseover",(function(){s.enterEmphasis(f)})).on("mouseout",(function(){s.leaveEmphasis(f)})),o.add(f),o.add(y),o.add(h)}h.attr({draggable:!0,cursor:eN(this._orient),drift:ce(this._onDragMove,this,"all"),ondragstart:ce(this._showDataInfo,this,!0),ondragend:ce(this._onDragEnd,this),onmouseover:ce(this._showDataInfo,this,!0),onmouseout:ce(this._showDataInfo,this,!1)})},n.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[Wt(e[0],[0,100],t,!0),Wt(e[1],[0,100],t,!0)]},n.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),r=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];vS(t,i,o,n.get("zoomLock")?"all":e,null!=r.minSpan?Wt(r.minSpan,a,o,!0):null,null!=r.maxSpan?Wt(r.maxSpan,a,o,!0):null);var s=this._range,l=this._range=Yt([Wt(i[0],o,a,!0),Wt(i[1],o,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},n.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,i=Yt(n.slice()),o=this._size;u([0,1],(function(e){var i=t.handles[e],r=this._handleHeight;i.attr({scaleX:r/2,scaleY:r/2,x:n[e]+(e?-1:1),y:o[1]/2-r/2})}),this),t.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var r={x:i[0],width:i[1]-i[0]};t.moveHandle&&(t.moveHandle.setShape(r),t.moveZone.setShape(r),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",r.x+r.width/2));for(var a=t.dataShadowSegs,s=[0,i[0],i[1],o[0]],l=0;lt[0]||n[1]<0||n[1]>t[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,r=this._updateInterval("all",n[0]-o);this._updateView(),r&&this._dispatchZoomAction(!1)}},n.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new te(t,n),this._brushing=!0,this._brushStartTime=+new Date},n.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),o=[0,100];this._range=Yt([Wt(n.x,i,o,!0),Wt(n.x+n.width,i,o,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},n.prototype._onBrush=function(e){this._brushing&&(Xe(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},n.prototype._updateBrushRect=function(e,t){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new KP({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var r=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(e,t),l=a.transformCoordToLocal(r.x,r.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),o.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},n.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?$P:null,start:t[0],end:t[1]})},n.prototype._findCoordRect=function(){var e,t=pA(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var i=this.api.getWidth(),o=this.api.getHeight();e={x:.2*i,y:.2*o,width:.6*i,height:.6*o}}return e},n.type="dataZoom.slider",n}(xA);function eN(e){return"vertical"===e?"ns-resize":"ew-resize"}var tN=QP;function nN(e){e.registerComponentModel(qP),e.registerComponentView(tN),DA(e)}var iN={get:function(e,t,n){var i=oe((oN[e]||{})[t]);return n&&s(i)?i[i.length-1]:i}},oN={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]}},rN=iN,aN=y_.mapVisual,sN=y_.eachVisual,lN=s,uN=u,cN=Yt,dN=Wt,hN=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return e(n,t),n.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},n.prototype.optionUpdated=function(e,t){var n=this.option;!t&&KL(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},n.prototype.resetVisual=function(e){var t=this.stateList;e=ce(e,this),this.controllerVisuals=qL(this.option.controller,t,e),this.targetVisuals=qL(this.option.target,t,e)},n.prototype.getItemSymbol=function(){return null},n.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesIndex,t=[];return null==e||"all"===e?this.ecModel.eachSeries((function(e,n){t.push(n)})):t=fn(e),t},n.prototype.eachTargetSeries=function(e,t){u(this.getTargetSeriesIndices(),(function(n){var i=this.ecModel.getSeriesByIndex(n);i&&e.call(t,i)}),this)},n.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries((function(n){n===e&&(t=!0)})),t},n.prototype.formatValueText=function(e,t,n){var o,r=this.option,a=r.precision,l=this.dataBound,u=r.formatter;n=n||["<",">"],s(e)&&(e=e.slice(),o=!0);var c=t?e:o?[d(e[0]),d(e[1])]:d(e);return i(u)?u.replace("{value}",o?c[0]:c).replace("{value2}",o?c[1]:c):p(u)?o?u(e[0],e[1]):u(e):o?e[0]===l[0]?n[0]+" "+c[1]:e[1]===l[1]?n[1]+" "+c[0]:c[0]+" - "+c[1]:c;function d(e){return e===l[0]?"min":e===l[1]?"max":(+e).toFixed(Math.min(a,20))}},n.prototype.resetExtent=function(){var e=this.option,t=cN([e.min,e.max]);this._dataExtent=t},n.prototype.getDataDimensionIndex=function(e){var t=this.option.dimension;if(null!=t)return e.getDimensionIndex(t);for(var n=e.dimensions,i=n.length-1;i>=0;i--){var o=n[i],r=e.getDimensionInfo(o);if(!r.isCalculationCoord)return r.storeDimIndex}},n.prototype.getExtent=function(){return this._dataExtent.slice()},n.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},i=t.target||(t.target={}),o=t.controller||(t.controller={});ie(i,n),ie(o,n);var r=this.isCategory();function a(n){lN(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get("gradientColor")}}a.call(this,i),a.call(this,o),function(e,t,n){var i=e[t],o=e[n];i&&!o&&(o=e[n]={},uN(i,(function(e,t){if(y_.isValidType(t)){var n=rN.get(t,"inactive",r);null!=n&&(o[t]=n,"color"!==t||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,i=this.get("inactiveColor"),o=this.getItemSymbol()||"roundRect";uN(this.stateList,(function(a){var s=this.itemSize,l=e[a];l||(l=e[a]={color:r?i:[i]}),null==l.symbol&&(l.symbol=t&&oe(t)||(r?o:[o])),null==l.symbolSize&&(l.symbolSize=n&&oe(n)||(r?s[0]:[s[0],s[0]])),l.symbol=aN(l.symbol,(function(e){return"none"===e?o:e}));var u=l.symbolSize;if(null!=u){var c=-1/0;sN(u,(function(e){e>c&&(c=e)})),l.symbolSize=aN(u,(function(e){return dN(e,[0,c],[0,s[0]],!0)}))}}),this)}.call(this,o)},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(e){},n.prototype.getSelected=function(){return null},n.prototype.getValueState=function(e){return null},n.prototype.getVisualMeta=function(e){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}(sa),pN=hN,fN=[20,140],gN=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(e){e.mappingMethod="linear",e.dataExtent=this.getExtent()})),this._resetRange()},n.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(null==e[0]||isNaN(e[0]))&&(e[0]=fN[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=fN[1])},n.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):s(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},n.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),u(this.stateList,(function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)}),this)},n.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},n.prototype.getSelected=function(){var e=this.getExtent(),t=Yt((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?"inRange":"outOfRange"},n.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries((function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),(function(t,n){e[0]<=t&&t<=e[1]&&i.push(n)}),this),t.push({seriesId:n.id,dataIndex:i})}),this),t},n.prototype.getVisualMeta=function(e){var t=yN(this,"outOfRange",this.getExtent()),n=yN(this,"inRange",this.option.range.slice()),i=[];function o(t,n){i.push({value:t,color:e(t,n)})}for(var r=0,a=0,s=n.length,l=t.length;ae[1])break;n.push({color:this.getControllerVisual(r,"color",t),offset:o/100})}return n.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),n},n.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},n.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get("inverse");return new X("horizontal"!==t||n?"horizontal"===t&&n?{scaleX:"bottom"===e?-1:1,rotation:-Math.PI/2}:"vertical"!==t||n?{scaleX:"left"===e?1:-1}:{scaleX:"left"===e?1:-1,scaleY:-1}:{scaleX:"bottom"===e?1:-1,rotation:Math.PI/2})},n.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,r=n.handleLabels,a=i.itemSize,s=i.getExtent();wN([0,1],(function(l){var u=o[l];u.setStyle("fill",t.handlesColor[l]),u.y=e[l];var c=SN(e[l],[0,a[1]],s,!0),d=this.getControllerVisual(c,"symbolSize");u.scaleX=u.scaleY=d/a[0],u.x=a[0]-d/2;var h=po(n.handleLabelPoints[l],ho(u,this.group));r[l].setStyle({x:h[0],y:h[1],text:i.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},n.prototype._showIndicator=function(e,t,n,i){var o=this.visualMapModel,r=o.getExtent(),a=o.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var c=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,"symbolSize"),h=SN(e,r,s,!0),p=a[0]-d/2,f={x:u.x,y:u.y};u.y=h,u.x=p;var g=po(l.indicatorLabelPoint,ho(u,this.group)),y=l.indicatorLabel;y.attr("invisible",!1);var m=this._applyTransform("left",l.mainGroup),v="horizontal"===this._orient;y.setStyle({text:(n||"")+o.formatValueText(t),verticalAlign:v?m:"middle",align:v?"center":m});var x={x:p,y:h,style:{fill:c}},_={style:{x:g[0],y:g[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var b={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(x,b),y.animateTo(_,b)}else u.attr(x),y.attr(_);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var w=0;wo[1]&&(u[1]=1/0),t&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var c=this._hoverLinkDataIndices,d=[];(t||CN(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var h=function(e,t){var n={},i={};return o(e||[],n),o(t||[],i,n),[r(n),r(i)];function o(e,t,n){for(var i=0,o=e.length;i=0&&(o.dimension=r,i.push(o))}})),e.getData().setVisual("visualMeta",i)}}];function ON(e,t,n,i){for(var o=t.targetVisuals[i],r=y_.prepareVisualTypes(o),a={color:Yu(e.getData(),"color")},s=0,l=r.length;s0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"})),e.registerAction(kN,PN),u(NN,(function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)})),e.registerPreprocessor(EN))}function GN(e){e.registerComponentModel(mN),e.registerComponentView(LN),BN(e)}var FN=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=i.type,e._pieceList=[],e}return e(i,t),i.prototype.optionUpdated=function(e,i){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var o=this._mode=this._determineMode();this._pieceList=[],WN[this._mode].call(this,this._pieceList),this._resetSelected(e,i);var r=this.option.categories;this.resetVisual((function(e,t){"categories"===o?(e.mappingMethod="category",e.categories=oe(r)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=n(this._pieceList,(function(e){return e=oe(e),"inRange"!==t&&(e.visual=null),e})))}))},i.prototype.completeVisualOption=function(){var e=this.option,n={},i=y_.listVisualTypes(),o=this.isCategory();function r(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}u(e.pieces,(function(e){u(i,(function(t){e.hasOwnProperty(t)&&(n[t]=1)}))})),u(n,(function(t,n){var i=!1;u(this.stateList,(function(t){i=i||r(e,t,n)||r(e.target,t,n)}),this),!i&&u(this.stateList,(function(t){(e[t]||(e[t]={}))[n]=rN.get(n,"inRange"===t?"active":"inactive",o)}))}),this),t.prototype.completeVisualOption.apply(this,arguments)},i.prototype._resetSelected=function(e,t){var n=this.option,i=this._pieceList,o=(t?n:e).selected||{};if(n.selected=o,u(i,(function(e,t){var n=this.getSelectedMapKey(e);o.hasOwnProperty(n)||(o[n]=!0)}),this),"single"===n.selectedMode){var r=!1;u(i,(function(e,t){var n=this.getSelectedMapKey(e);o[n]&&(r?o[n]=!1:r=!0)}),this)}},i.prototype.getItemSymbol=function(){return this.get("itemSymbol")},i.prototype.getSelectedMapKey=function(e){return"categories"===this._mode?e.value+"":e.index+""},i.prototype.getPieceList=function(){return this._pieceList},i.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},i.prototype.setSelected=function(e){this.option.selected=oe(e)},i.prototype.getValueState=function(e){var t=y_.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},i.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries((function(i){var o=[],r=i.getData();r.each(this.getDataDimensionIndex(r),(function(t,i){y_.findPieceIndex(t,n)===e&&o.push(i)}),this),t.push({seriesId:i.id,dataIndex:o})}),this),t},i.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},i.prototype.getVisualMeta=function(e){if(!this.isCategory()){var t=[],n=["",""],i=this,o=this._pieceList.slice();if(o.length){var r=o[0].interval[0];r!==-1/0&&o.unshift({interval:[-1/0,r]}),(r=o[o.length-1].interval[1])!==1/0&&o.push({interval:[r,1/0]})}else o.push({interval:[-1/0,1/0]});var a=-1/0;return u(o,(function(e){var t=e.interval;t&&(t[0]>a&&s([a,t[0]],"outOfRange"),s(t.slice()),a=t[1])}),this),{stops:t,outerColors:n}}function s(o,r){var a=i.getRepresentValue({interval:o});r||(r=i.getValueState(a));var s=e(a,r);o[0]===-1/0?n[0]=s:o[1]===1/0?n[1]=s:t.push({value:o[0],color:s},{value:o[1],color:s})}},i.type="visualMap.piecewise",i.defaultOption=rr(pN.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}),i}(pN),WN={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),i=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var r=(i[1]-i[0])/o;+r.toFixed(n)!==r&&n<5;)n++;t.precision=n,r=+r.toFixed(n),t.minOpen&&e.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a","≥"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,n)}),this)}};function HN(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}var UN=FN,YN=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=i.type,e}return e(i,t),i.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get("textGap"),i=t.textStyleModel,o=i.getFont(),r=i.getTextColor(),a=this._getItemAlign(),s=t.itemSize,l=this._getViewData(),c=l.endsText,d=He(t.get("showLabel",!0),!c);c&&this._renderEndsText(e,c[0],s,d,a),u(l.viewPieceList,(function(i){var l=i.piece,u=new X;u.onclick=ce(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var c=t.getRepresentValue(l);if(this._createItemSymbol(u,c,[0,0,s[0],s[1]]),d){var h=this.visualMapModel.getValueState(c);u.add(new j({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:o,fill:r,opacity:"outOfRange"===h?.5:1}}))}e.add(u)}),this),c&&this._renderEndsText(e,c[1],s,d,a),$r(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},i.prototype._enableHoverLink=function(e,t){var n=this;e.on("mouseover",(function(){return i("highlight")})).on("mouseout",(function(){return i("downplay")}));var i=function(e){var i=n.visualMapModel;i.option.hoverLink&&n.api.dispatchAction({type:e,batch:bN(i.findTargetDataIndices(t),i)})}},i.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return _N(e,this.api,e.itemSize);var n=t.align;return n&&"auto"!==n||(n="left"),n},i.prototype._renderEndsText=function(e,t,n,i,o){if(t){var r=new X,a=this.visualMapModel.textStyleModel;r.add(new j({style:Po(a,{x:i?"right"===o?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:t})})),e.add(r)}},i.prototype._getViewData=function(){var e=this.visualMapModel,t=n(e.getPieceList(),(function(e,t){return{piece:e,indexInModelPieceList:t}})),i=e.get("text"),o=e.get("orient"),r=e.get("inverse");return("horizontal"===o?r:!r)?t.reverse():i&&(i=i.slice().reverse()),{viewPieceList:t,endsText:i}},i.prototype._createItemSymbol=function(e,t,n){e.add(oc(this.getControllerVisual(t,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(t,"color")))},i.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,i=n.selectedMode;if(i){var o=oe(n.selected),r=t.getSelectedMapKey(e);"single"===i||!0===i?(o[r]=!0,u(o,(function(e,t){o[t]=t===r}))):o[r]=!o[r],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},i.type="visualMap.piecewise",i}(vN);function ZN(e){e.registerComponentModel(UN),e.registerComponentView(YN),BN(e)}var XN={label:{enabled:!0},decal:{show:!1}},jN=Tn(),qN={};function KN(e,t){var n=e.getModel("aria");if(n.get("enabled")){var o=oe(XN);ie(o.label,e.getLocaleModel().get("aria"),!1),ie(n.option,o,!1),function(){if(n.getModel("decal").get("show")){var t=l();e.eachSeries((function(e){if(!e.isColorBySeries()){var n=t.get(e.type);n||(n={},t.set(e.type,n)),jN(e).scope=n}})),e.eachRawSeries((function(t){if(!e.isSeriesFiltered(t))if(p(t.enableAriaDecal))t.enableAriaDecal();else{var n=t.getData();if(t.isColorBySeries()){var i=Ca(t.ecModel,t.name,qN,e.getSeriesCount()),o=n.getVisual("decal");n.setVisual("decal",u(o,i))}else{var r=t.getRawData(),a={},s=jN(t).scope;n.each((function(e){var t=n.getRawIndex(e);a[t]=e}));var l=r.count();r.each((function(e){var i=a[e],o=r.getName(e)||e+"",c=Ca(t.ecModel,o,s,l),d=n.getItemVisual(i,"decal");n.setItemVisual(i,"decal",u(d,c))}))}}function u(e,t){var n=e?g(g({},t),e):t;return n.dirty=!0,n}}))}}(),function(){var i=e.getLocaleModel().get("aria"),o=n.getModel("label");if(o.option=C(o.option,i),!o.get("enabled"))return;var a=t.getZr().dom;if(o.get("description"))return void a.setAttribute("aria-label",o.get("description"));var s,l=e.getSeriesCount(),u=o.get(["data","maxCount"])||10,c=o.get(["series","maxCount"])||10,d=Math.min(l,c);if(l<1)return;var h=function(){var t=e.get("title");t&&t.length&&(t=t[0]);return t&&t.text}();if(h){var p=o.get(["general","withTitle"]);s=r(p,{title:h})}else s=o.get(["general","withoutTitle"]);var f=[],g=l>1?o.get(["series","multiple","prefix"]):o.get(["series","single","prefix"]);s+=r(g,{seriesCount:l}),e.eachSeries((function(t,n){if(n1?o.get(["series","multiple",a]):o.get(["series","single",a]),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(x=t.subType,e.getLocaleModel().get(["series","typeNames"])[x]||"自定义图")});var s=t.getData();if(s.count()>u)i+=r(o.get(["data","partialData"]),{displayCnt:u});else i+=o.get(["data","allData"]);for(var c=o.get(["data","separator","middle"]),h=o.get(["data","separator","end"]),p=[],g=0;g":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},QN=function(){function e(e){if(null==(this._condVal=i(e)?new RegExp(e):kt(e)?e:null)){hn("")}}return e.prototype.evaluate=function(e){var t=typeof e;return i(t)?this._condVal.test(e):!!r(t)&&this._condVal.test(e+"")},e}(),eO=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),tO=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t=0;o--)if(!n[o].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}r=l.length;var u=Math.ceil(r/2);n[o].many=l.slice(u,r),n[s].many=l.slice(0,u),s++}return n}var gO={clone:function(e){for(var t=[],n=1-Math.pow(1-e.path.style.opacity,1/e.count),i=0;i0){var s,l,u=i.getModel("universalTransition").get("delay"),c=Object.assign({setToFinal:!0},a);pO(e)&&(s=e,l=t),pO(t)&&(s=t,l=e);for(var d=s?s===e:e.length>t.length,h=s?fO(l,s):fO(d?t:e,[d?e:t]),p=0,f=0;f1e4))for(var i=n.getIndices(),o=function(e){for(var t=e.dimensions,n=0;n0&&n.group.traverse((function(e){e instanceof x&&!e.animators.length&&e.animateFrom({style:{opacity:0}},o)}))}))}function IO(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function TO(e){return s(e)?e.sort().join(","):e}function DO(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function CO(e,t){for(var n=0;n=0&&o.push({data:t.oldData[n],divide:DO(t.oldData[n]),dim:e.dimension})})),u(fn(e.to),(function(e){var t=CO(n.updatedSeries,e);if(t>=0){var i=n.updatedSeries[t].getData();r.push({data:i,divide:DO(i),dim:e.dimension})}})),o.length>0&&r.length>0&&MO(o,r,i)}(e,i,n,t)}));else{var r=function(e,t){var n=l(),i=l(),o=l();return u(e.oldSeries,(function(t,n){var r=e.oldData[n],a=IO(t),l=TO(a);i.set(l,r),s(a)&&u(a,(function(e){o.set(e,{data:r,key:l})}))})),u(t.updatedSeries,(function(e){if(e.isUniversalTransitionEnabled()&&e.isAnimationEnabled()){var t=e.getData(),r=IO(e),a=TO(r),l=i.get(a);if(l)n.set(a,{oldSeries:[{divide:DO(l),data:l}],newSeries:[{divide:DO(t),data:t}]});else if(s(r)){var c=[];u(r,(function(e){var t=i.get(e);t&&c.push({divide:DO(t),data:t})})),c.length&&n.set(a,{oldSeries:c,newSeries:[{data:t,divide:DO(t)}]})}else{var d=o.get(r);if(d){var h=n.get(d.key);h||(h={oldSeries:[{data:d.data,divide:DO(d.data)}],newSeries:[]},n.set(d.key,h)),h.newSeries.push({data:t,divide:DO(t)})}}}})),n}(i,n);u(r.keys(),(function(e){var n=r.get(e);MO(n.oldSeries,n.newSeries,t)}))}u(n.updatedSeries,(function(e){e.__universalTransitionEnabled&&(e.__universalTransitionEnabled=!1)}))}for(var a=e.getSeries(),c=i.oldSeries=[],d=i.oldData=[],h=0;h