!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).echarts={})}(this,function(t){"use strict";var h=function(t,e){return(h=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)};function u(t,e){function n(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var y=function(){return(y=Object.assign||function(t){for(var e,n=1,i=arguments.length;n>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",o[l]+":0",i[1-s]+":auto",o[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}}return n}(e,r),r,o);if(e)return e(t,n,i),!0}return!1}function se(t){return"CANVAS"===t.nodeName.toUpperCase()}var le="undefined"!=typeof window&&!!window.addEventListener,ue=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,he=[];function ce(t,e,n,i){return n=n||{},i||!w.canvasSupported?pe(t,e,n):w.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):pe(t,e,n),n}function pe(t,e,n){if(w.domSupported&&t.getBoundingClientRect){var i,o=e.clientX,e=e.clientY;if(se(t))return i=t.getBoundingClientRect(),n.zrX=o-i.left,n.zrY=e-i.top;if(ae(he,t,o,e))return n.zrX=he[0],n.zrY=he[1]}n.zrX=n.zrY=0}function de(t){return t||window.event}function fe(t,e,n){var i;return null==(e=de(e)).zrX&&((i=e.type)&&0<=i.indexOf("touch")?(i=("touchend"!==i?e.targetTouches:e.changedTouches)[0])&&ce(t,i,e,n):(ce(t,e,e,n),t=(t=(i=e).wheelDelta)||(n=i.deltaX,i=i.deltaY,null==n||null==i?t:3*(0!==i?Math.abs(i):Math.abs(n))*(0t.getWidth()||n<0||n>t.getHeight()}function Pe(){return[1,0,0,1,0,0]}function Oe(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Re(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Ne(t,e,n){var i=e[0]*n[0]+e[2]*n[1],o=e[1]*n[0]+e[3]*n[1],r=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],n=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=o,t[2]=r,t[3]=a,t[4]=s,t[5]=n,t}function Ee(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function Be(t,e,n){var i=e[0],o=e[2],r=e[4],a=e[1],s=e[3],e=e[5],l=Math.sin(n),n=Math.cos(n);return t[0]=i*n+a*l,t[1]=-i*l+a*n,t[2]=o*n+s*l,t[3]=-o*l+n*s,t[4]=n*r+l*e,t[5]=n*e-l*r,t}function ze(t,e,n){var i=n[0],n=n[1];return t[0]=e[0]*i,t[1]=e[1]*n,t[2]=e[2]*i,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*n,t}function Ve(t,e){var n=e[0],i=e[2],o=e[4],r=e[1],a=e[3],e=e[5],s=n*a-r*i;return s?(t[0]=a*(s=1/s),t[1]=-r*s,t[2]=-i*s,t[3]=n*s,t[4]=(i*e-a*o)*s,t[5]=(r*o-n*e)*s,t):null}N(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){Ae.prototype[a]=function(t){var e,n,i=t.zrX,o=t.zrY,r=Le(this,i,o);if("mouseup"===a&&r||(n=(e=this.findHover(i,o)).target),"mousedown"===a)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===a)this._upEl=n;else if("click"===a){if(this._downEl!==this._upEl||!this._downPoint||4=this._maxSize&&0>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===i?parseInt(n.slice(4),16)/15:1),gn(t,e),e):void cn(e,0,0,0,1):7===i||9===i?0<=(o=parseInt(n.slice(1,7),16))&&o<=16777215?(cn(e,(16711680&o)>>16,(65280&o)>>8,255&o,9===i?parseInt(n.slice(7),16)/255:1),gn(t,e),e):void cn(e,0,0,0,1):void 0;var o=n.indexOf("("),r=n.indexOf(")");if(-1!==o&&r+1===i){var i=n.substr(0,o),a=n.substr(o+1,r-(o+1)).split(","),s=1;switch(i){case"rgba":if(4!==a.length)return 3===a.length?cn(e,+a[0],+a[1],+a[2],1):cn(e,0,0,0,1);s=ln(a.pop());case"rgb":return 3!==a.length?void cn(e,0,0,0,1):(cn(e,sn(a[0]),sn(a[1]),sn(a[2]),s),gn(t,e),e);case"hsla":return 4!==a.length?void cn(e,0,0,0,1):(a[3]=ln(a[3]),mn(a,e),gn(t,e),e);case"hsl":return 3!==a.length?void cn(e,0,0,0,1):(mn(a,e),gn(t,e),e);default:return}}cn(e,0,0,0,1)}}function mn(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=ln(t[1]),o=ln(t[2]),i=o<=.5?o*(i+1):o+i-o*i,o=2*o-i;return cn(e=e||[],rn(255*un(o,i,n+1/3)),rn(255*un(o,i,n)),rn(255*un(o,i,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function vn(t,e){var n=yn(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,255=this.maxTime?this.maxTime=t:this._needsSort=!0;var n=this.keyframes,i=n.length;if(this.interpolable)if(rt(e)){var o,r=rt((r=e)&&r[0])?2:1;if(0e);n++);n=Math.min(n-1,a-2)}var h,c,p,d,f,g=r[n+1],y=r[n];y&&g&&(this._lastFrame=n,this._lastFramePercent=e,0!=(h=g.percent-y.percent))&&(h=(e-y.percent)/h,c=i?this._additiveValue:u?En:t[s],(0=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},Kn.prototype.clone=function(){return new Kn(this.x,this.y,this.width,this.height)},Kn.prototype.copy=function(t){Kn.copy(this,t)},Kn.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},Kn.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Kn.prototype.isZero=function(){return 0===this.width||0===this.height},Kn.create=function(t){return new Kn(t.x,t.y,t.width,t.height)},Kn.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},Kn.applyTransform=function(t,e,n){var i,o,r,a;n?n[1]<1e-5&&-1e-5>>1])<0?l=r:s=1+r;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0>>1);0>>1);r(t,e[n+h])<0?l=h:a=h+1}return l}function Oi(t,e,n,i){var f,g,r,a,y,s,m,o=(i=i||t.length)-(n=n||0);if(!(o<2)){var l=0;if(oa[t+1])break;p(t)}},forceMergeRuns:function(){for(;1>=1;return t+e}(o);do{}while((l=Di(t,n,i,e))this._sleepAfterStill)&&this.animation.stop()},e.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},e.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},e.prototype.addHover=function(t){},e.prototype.removeHover=function(t){},e.prototype.clearHover=function(){},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},e.prototype.resize=function(t){this.painter.resize((t=t||{}).width,t.height),this.handler.resize()},e.prototype.clearAnimation=function(){this.animation.clear()},e.prototype.getWidth=function(){return this.painter.getWidth()},e.prototype.getHeight=function(){return this.painter.getHeight()},e.prototype.pathToImage=function(t,e){if(this.painter.pathToImage)return this.painter.pathToImage(t,e)},e.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},e.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},e.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},e.prototype.off=function(t,e){this.handler.off(t,e)},e.prototype.trigger=function(t,e){this.handler.trigger(t,e)},e.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/o*r+n[0]}function B(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?t.replace(/^\s+|\s+$/g,"").match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function _o(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function xo(t){return t.sort(function(t,e){return t-e}),t}function bo(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}function wo(t){var t=t.toString(),e=t.indexOf("e");return 0u&&(u=l[c],h=c);++a[h],l[h]=0,++s}return a[e]/o}function To(t){var e=2*Math.PI;return(t%e+e)%e}function Co(t){return-1e-4=e.maxIterations){t+=e.ellipsis;break}var s=0===a?function(t,e,n,i){for(var o=0,r=0,a=t.length;rr){0i.width&&(r=e.split("\n"),c=!0),i.accumWidth=t):(t=Or(e,h,i.width,i.breakAll,i.accumWidth),i.accumWidth=t.accumWidth+n,a=t.linesWidths,r=t.lines)):r=e.split("\n");for(var p=0;pthis._ux||ka(e-this._yi)>this._uy||this._len<5;return this.addData(va.L,t,e),this._ctx&&n&&(this._needsDash?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},o.prototype.bezierCurveTo=function(t,e,n,i,o,r){return this.addData(va.C,t,e,n,i,o,r),this._ctx&&(this._needsDash?this._dashedBezierTo(t,e,n,i,o,r):this._ctx.bezierCurveTo(t,e,n,i,o,r)),this._xi=o,this._yi=r,this},o.prototype.quadraticCurveTo=function(t,e,n,i){return this.addData(va.Q,t,e,n,i),this._ctx&&(this._needsDash?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},o.prototype.arc=function(t,e,n,i,o,r){Ra[0]=i,Ra[1]=o,Ea(Ra,r);var a=(o=Ra[1])-(i=Ra[0]);return this.addData(va.A,t,e,n,n,i,a,0,r?0:1),this._ctx&&this._ctx.arc(t,e,n,i,o,r),this._xi=Ia(o)*n+t,this._yi=Aa(o)*n+e,this},o.prototype.arcTo=function(t,e,n,i,o){return this._ctx&&this._ctx.arcTo(t,e,n,i,o),this},o.prototype.rect=function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(va.R,t,e,n,i),this},o.prototype.closePath=function(){this.addData(va.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},o.prototype.fill=function(t){t&&t.fill(),this.toStatic()},o.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},o.prototype.setLineDash=function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,n=0;nu.length&&(this._expandData(),u=this.data);for(var h=0;hd);v++);for(a=(x-d)/m;a<=1;)u=Kr(g,t,n,o,a),h=Kr(y,e,i,r,a),v%2?c.moveTo(u,h):c.lineTo(u,h),a+=f[v]/m,v=(v+1)%_;v%2!=0&&c.lineTo(o,r),this._dashOffset=-Da((s=o-u)*s+(l=r-h)*l)},o.prototype._dashedQuadraticTo=function(t,e,n,i){var o=n,r=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,o,r)},o.prototype.toStatic=function(){var t;this._saveData&&(t=this.data)instanceof Array&&(t.length=this._len,Oa)&&11n||ka(y)>i||c===e-1)&&(f=Math.sqrt(I*I+y*y),o=g,r=_);break;case va.C:var m=t[c++],v=t[c++],_=(g=t[c++],t[c++]),x=t[c++],b=t[c++],f=function(t,e,n,i,o,r,a,s,l){for(var u=t,h=e,c=0,p=1/l,d=1;d<=l;d++){var f=d*p,g=Kr(t,n,o,a,f),f=Kr(e,i,r,s,f),y=g-u,m=f-h;c+=Math.sqrt(y*y+m*m),u=g,h=f}return c}(o,r,m,v,g,_,x,b,10),o=x,r=b;break;case va.Q:f=function(t,e,n,i,o,r,a){for(var s=t,l=e,u=0,h=1/a,c=1;c<=a;c++){var p=c*h,d=na(t,n,o,p),p=na(e,i,r,p),f=d-s,g=p-l;u+=Math.sqrt(f*f+g*g),s=d,l=p}return u}(o,r,m=t[c++],v=t[c++],g=t[c++],_=t[c++],10),o=g,r=_;break;case va.A:var x=t[c++],b=t[c++],w=t[c++],S=t[c++],M=t[c++],T=t[c++],C=T+M;c+=1,t[c++],d&&(a=Ia(M)*w+x,s=Aa(M)*S+b),f=Ca(w,S)*Ta(Pa,Math.abs(T)),o=Ia(C)*w+x,r=Aa(C)*S+b;break;case va.R:a=o=t[c++],s=r=t[c++],f=2*t[c++]+2*t[c++];break;case va.Z:var I=a-o,y=s-r;f=Math.sqrt(I*I+y*y),o=a,r=s}0<=f&&(u+=l[h++]=f)}return this._pathLen=u},o.prototype.rebuildPath=function(t,e){var n,i,o,r,a=this.data,s=this._ux,l=this._uy,u=this._len,h=e<1,c=0,p=0;if(!h||(this._pathSegLen||this._calculateLength(),o=this._pathSegLen,r=e*this._pathLen))t:for(var d=0;ds||ka(N-i)>l||d===u-1){if(h){if(c+(f=o[p++])>r){var y=(r-c)/f;t.lineTo(n*(1-y)+R*y,i*(1-y)+N*y);break t}c+=f}t.lineTo(R,N),n=R,i=N}break;case va.C:var m=a[d++],v=a[d++],_=a[d++],x=a[d++],b=a[d++],w=a[d++];if(h){if(c+(f=o[p++])>r){ta(n,m,_,b,y=(r-c)/f,_a),ta(i,v,x,w,y,xa),t.bezierCurveTo(_a[1],xa[1],_a[2],xa[2],_a[3],xa[3]);break t}c+=f}t.bezierCurveTo(m,v,_,x,b,w),n=b,i=w;break;case va.Q:if(m=a[d++],v=a[d++],_=a[d++],x=a[d++],h){if(c+(f=o[p++])>r){ra(n,m,_,y=(r-c)/f,_a),ra(i,v,x,y,xa),t.quadraticCurveTo(_a[1],xa[1],_a[2],xa[2]);break t}c+=f}t.quadraticCurveTo(m,v,_,x),n=_,i=x;break;case va.A:var b=a[d++],w=a[d++],S=a[d++],M=a[d++],T=a[d++],C=a[d++],I=a[d++],A=!a[d++],B=Mr&&(k=T+C*(r-c)/f,L=!0),c+=f),D&&t.ellipse?t.ellipse(b,w,S,M,I,T,k,A):t.arc(b,w,B,T,k,A),L)break t;g&&(P=Ia(T)*S+b,O=Aa(T)*M+w),n=Ia(k)*S+b,i=Aa(k)*M+w;break;case va.R:var P=n=a[d],O=i=a[d+1],R=a[d++],N=a[d++],C=a[d++],D=a[d++];if(h){if(c+(f=o[p++])>r){I=r-c;t.moveTo(R,N),t.lineTo(R+Ta(I,C),N),0<(I-=C)&&t.lineTo(R+C,N+Ta(I,D)),0<(I-=D)&&t.lineTo(R+Ca(C-I,0),N+D),0<(I-=C)&&t.lineTo(R,N+Ca(D-I,0));break t}c+=f}t.rect(R,N,C,D);break;case va.Z:if(h){if(c+(f=o[p++])>r){t.lineTo(n*(1-(y=(r-c)/f))+P*y,i*(1-y)+O*y);break t}c+=f}t.closePath(),n=P,i=O}}},o.CMD=va,o.initDefaultProps=((xu=o.prototype)._saveData=!0,xu._needsDash=!1,xu._dashOffset=0,xu._dashIdx=0,xu._dashSum=0,xu._ux=0,void(xu._uy=0));var Ba=o;function o(t){this.dpr=1,this._version=0,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}function za(t,e,n,i,o,r,a){var s;if(0!==o)return s=0,!(e+(o=o)n||s<-n)return 0;var e=Math.sqrt(n*n-s*s);if(Xa[0]=-e,Xa[1]=e,(n=Math.abs(i-o))<1e-4)return 0;if(Ua-1e-4<=n)return o=Ua,h=r?1:-1,a>=Xa[i=0]+t&&a<=Xa[1]+t?h:0;oMath.PI/2&&c<1.5*Math.PI?-h:h)}return l}(y,m,_,x,x+b,w,T,o);u=Math.cos(x+b)*v+y,h=Math.sin(x+b)*_+m;break;case Wa.R:if(c=u=a[d++],p=h=a[d++],S=c+a[d++],M=p+a[d++],n){if(za(c,p,S,p,e,i,o)||za(S,p,S,M,e,i,o)||za(S,M,c,M,e,i,o)||za(c,M,c,p,e,i,o))return!0}else l=(l+=Ga(S,p,S,M,i,o))+Ga(c,M,c,p,i,o);break;case Wa.Z:if(n){if(za(u,h,c,p,e,i,o))return!0}else l+=Ga(u,h,c,p,i,o);u=c,h=p}}return n||(t=h,r=p,Math.abs(t-r)i.len()&&(uMath.abs(i[1])?0"'])/g,ip={"&":"&","<":"<",">":">",'"':""","'":"'"};function op(t){return null==t?"":(t+"").replace(np,function(t,e){return ip[e]})}function rp(t,e,n){function i(t){return t&&Mt(t)?t:"-"}function o(t){return null!=t&&!isNaN(t)&&isFinite(t)}var r="time"===e,a=t instanceof Date;if(r||a){var r=r?Ao(t):t;if(!isNaN(+r))return Bc(r,"{yyyy}-{MM}-{dd} {hh}:{mm}:{ss}",n);if(a)return"-"}return"ordinal"===e?ht(t)?i(t):ct(t)&&o(t)?t+"":"-":o(r=Po(t))?Qc(r):ht(t)?i(t):"-"}function ap(t,e){return"{"+t+(null==e?"":e)+"}"}var sp=["a","b","c","d","e","f","g"];function lp(t,e,n){var i=(e=F(e)?e:[e]).length;if(!i)return"";for(var o=e[0].$vars||[],r=0;r':'':{renderMode:o,content:"{"+(t.markerId||"markerX")+"|} ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}:""}function hp(t,e){return e=e||"transparent",D(t)?t:k(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function cp(t,e){var n;"_blank"===e||"blank"===e?((n=window.open()).opener=null,n.location.href=t):window.open(t,e)}var pp=N,dp=["left","right","top","bottom","width","height"],fp=[["width","left","right"],["height","top","bottom"]];function gp(a,s,l,u,h){var c=0,p=0,d=(null==u&&(u=1/0),null==h&&(h=1/0),0);s.eachChild(function(t,e){var n,i,o,r=t.getBoundingRect(),e=s.childAt(e+1),e=e&&e.getBoundingRect();d="horizontal"===a?(o=r.width+(e?-e.x+r.x:0),(n=c+o)>u||t.newline?(c=0,n=o,p+=d+l,r.height):Math.max(d,r.height)):(o=r.height+(e?-e.y+r.y:0),(i=p+o)>h||t.newline?(c+=d+l,p=0,i=o,r.width):Math.max(d,r.width)),t.newline||(t.x=c,t.y=p,t.markRedraw(),"horizontal"===a?c=n+l:p=i+l)})}var yp=gp;function mp(t,e,n){n=ep(n||0);var i=e.width,o=e.height,r=B(t.left,i),a=B(t.top,o),e=B(t.right,i),s=B(t.bottom,o),l=B(t.width,i),u=B(t.height,o),h=n[2]+n[0],c=n[1]+n[3],p=t.aspect;switch(isNaN(l)&&(l=i-e-c-r),isNaN(u)&&(u=o-s-h-a),null!=p&&(isNaN(l)&&isNaN(u)&&(i/oe)return t[i];return t[n-1]}(o,n):i)||i)&&o.length?(n=o[r],t&&(e[t]=n),a.paletteIdx=(r+1)%o.length,n):void 0},qp.prototype.clearColorPalette=function(){var t,e;(e=Zp)(t=this).paletteIdx=0,e(t).paletteNameMap={}},qp);function qp(){}var Kp,$p,Jp,Qp,td="\0_ec_inner",ed=(u(r,Qp=fc),r.prototype.init=function(t,e,n,i,o,r){i=i||{},this.option=null,this._theme=new fc(i),this._locale=new fc(o),this._optionManager=r},r.prototype.setOption=function(t,e,n){e=od(e);this._optionManager.setOption(t,n,e),this._resetOption(null,e)},r.prototype.resetOption=function(t,e){return this._resetOption(t,od(e))},r.prototype._resetOption=function(t,e){var n,i=!1,o=this._optionManager;return t&&"recreate"!==t||(n=o.mountOption("recreate"===t),this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(n,e)):Jp(this,n),i=!0),"timeline"!==t&&"media"!==t||this.restoreData(),t&&"recreate"!==t&&"timeline"!==t||(n=o.getTimelineOption(this))&&(i=!0,this._mergeOption(n,e)),t&&"recreate"!==t&&"media"!==t||(n=o.getMediaOption(this)).length&&N(n,function(t){i=!0,this._mergeOption(t,e)},this),i},r.prototype.mergeOption=function(t){this._mergeOption(t,null)},r.prototype._mergeOption=function(i,t){var o=this.option,u=this._componentsMap,h=this._componentsCount,n=[],r=L(),c=t&&t.replaceMergeMainTypeMap;Hp(this).datasetMap=L(),N(i,function(t,e){null!=t&&(g.hasClass(e)?e&&(n.push(e),r.set(e,!0)):o[e]=null==o[e]?C(t):p(o[e],t,!0))}),c&&c.each(function(t,e){g.hasClass(e)&&!r.get(e)&&(n.push(e),r.set(e,!0))}),g.topologicalTravel(n,g.getAllClassMainTypes(),function(r){t=this,n=zo(i[e=r]);var t=(e=(e=Xp.get(e))&&e(t))?n.concat(e):n,e=u.get(r),n=Go(e,t,e?c&&c.get(r)?"replaceMerge":"normalMerge":"replaceAll"),a=(jo(n,r,g),o[r]=null,u.set(r,null),h.set(r,0),[]),s=[],l=0;N(n,function(t,e){var n=t.existing,i=t.newOption;if(i){var o=g.getClass(r,t.keyInfo.subType,!("series"===r));if(!o)return;n&&n.constructor===o?(n.name=t.keyInfo.name,n.mergeOption(i,this),n.optionUpdated(i,!1)):(e=I({componentIndex:e},t.keyInfo),I(n=new o(i,this,this,e),e),t.brandNew&&(n.__requireNewView=!0),n.init(i,this,this),n.optionUpdated(null,!0))}else n&&(n.mergeOption({},this),n.optionUpdated({},!1));n?(a.push(n.option),s.push(n),l++):(a.push(void 0),s.push(void 0))},this),o[r]=a,u.set(r,s),h.set(r,l),"series"===r&&Kp(this)},this),this._seriesIndices||Kp(this)},r.prototype.getOption=function(){var a=C(this.option);return N(a,function(t,e){if(g.hasClass(e)){for(var n=zo(t),i=n.length,o=!1,r=i-1;0<=r;r--)n[r]&&!Zo(n[r])?o=!0:(n[r]=null,o||i--);n.length=i,a[e]=n}}),delete a[td],a},r.prototype.getTheme=function(){return this._theme},r.prototype.getLocaleModel=function(){return this._locale},r.prototype.getLocale=function(t){return this.getLocaleModel().get(t)},r.prototype.setUpdatePayload=function(t){this._payload=t},r.prototype.getUpdatePayload=function(){return this._payload},r.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){t=n[e||0];if(t)return t;if(null==e)for(var i=0;i'+op(o)+""+a,n))}},nameValue:{planLayout:function(t){t.__gapLevelBetweenSubBlocks=0},build:function(t,e,n,i){var o,r,a,s,l=t.renderMode,u=e.noName,h=e.noValue,c=!e.markerType,p=e.name,d=e.value,f=t.useUTC;if(!u||!h)return o=c?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",l),p=u?"":rp(p,"ordinal",f),r=e.valueType,e=h?[]:F(d)?j(d,function(t,e){return rp(t,F(r)?r[e]:r,f)}):[rp(d,F(r)?r[0]:r,f)],d=!c||!u,a=!c&&u,i=Zf(i,l),s=i.nameStyle,i=i.valueStyle,"richText"===l?(c?"":o)+(u?"":ng(t,p,s))+(h?"":function(t,e,n,i,o){o=[o],i=i?10:20;return n&&o.push({padding:[0,0,0,i],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(e.join(" "),o)}(t,e,d,a,i)):eg((c?"":o)+(u?"":''+op(p)+"")+(h?"":(l=a,''+j(e,op).join("  ")+"")),n)}}};function Qf(t,e,n,i,o,r){var a;if(t)return(a=$f(t)).planLayout(t),a.build({useUTC:o,renderMode:n,orderMode:i,markupStyleCreator:e},t,0,r)}function tg(t){t=t.__gapLevelBetweenSubBlocks;return{html:jf[t],richText:qf[t]}}function eg(t,e){return'
'+t+'
'}function ng(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function ig(t,e){t=t.get("padding");return null!=t?t:"richText"===e?[8,10]:10}rg.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},rg.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,e=up({color:e,type:t,renderMode:n,markerId:i});return D(e)?e:(this.richTextStyles[i]=e.style,e.content)},rg.prototype.wrapRichTextStyle=function(t,e){var n={},e=(F(e)?N(e,function(t){return I(n,t)}):I(n,e),this._generateStyleName());return this.richTextStyles[e]=n,"{"+e+"|"+t+"}"};var og=rg;function rg(){this.richTextStyles={},this._nextStyleNameId=Ro()}function ag(t){var e,n,i,o,r,a,s,l,u,h,c,p=t.series,d=t.dataIndex,t=t.multipleSeries,f=p.getData(),g=f.mapDimensionsAll("defaultedTooltip"),y=g.length,m=p.getRawValue(d),v=F(m),_=(_=d,hp((b=p).getData().getItemVisual(_,"style")[b.visualDrawType]));function x(t,e){e=s.getDimensionInfo(e);e&&!1!==e.otherDims.tooltip&&(l?c.push(Kf("nameValue",{markerType:"subItem",markerColor:a,name:e.displayName,value:t,valueType:e.type})):(u.push(t),h.push(e.type)))}1this.getShallow("animationThreshold")?!1:t)},cg.prototype.restoreData=function(){this.dataTask.dirty()},cg.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel;return jp.prototype.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},cg.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},cg.prototype.getProgressive=function(){return this.get("progressive")},cg.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},cg.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},cg.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n)for(var i=this.getData(e),o=0;oe.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function yg(e,n){N(m(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(t){e.wrapMethod(t,M(mg,n))})}function mg(t,e){t=vg(t);return t&&t.setOutputEnd((e||this).count()),e}function vg(t){var e,n=(t.ecModel||{}).scheduler,n=n&&n.getPipeline(t.uid);if(n)return(n=n.currentTask)&&(e=n.agentStubMap)?e.get(t.uid):n}ot(hg,cc),ot(hg,jp),hr(hg,g);xg.prototype.init=function(t,e){},xg.prototype.render=function(t,e,n,i){},xg.prototype.dispose=function(t,e){},xg.prototype.updateView=function(t,e,n,i){},xg.prototype.updateLayout=function(t,e,n,i){},xg.prototype.updateVisual=function(t,e,n,i){},xg.prototype.blurSeries=function(t,e){};var _g=xg;function xg(){this.group=new O,this.uid=mc("viewComponent")}function bg(){var r=Ko();return function(t){var e=r(t),t=t.pipelineContext,n=!!e.large,i=!!e.progressiveRender,o=e.large=!(!t||!t.large),e=e.progressiveRender=!(!t||!t.progressiveRender);return!(n==o&&i==e)&&"reset"}}ur(_g),fr(_g);var wg=Ko(),Sg=bg(),Mg=(Tg.prototype.init=function(t,e){},Tg.prototype.render=function(t,e,n,i){},Tg.prototype.highlight=function(t,e,n,i){Ig(t.getData(),i,"emphasis")},Tg.prototype.downplay=function(t,e,n,i){Ig(t.getData(),i,"normal")},Tg.prototype.remove=function(t,e){this.group.removeAll()},Tg.prototype.dispose=function(t,e){},Tg.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},Tg.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},Tg.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},Tg.markUpdateMethod=function(t,e){wg(t).updateMethod=e},Tg.protoInitialize=void(Tg.prototype.type="chart"),Tg);function Tg(){this.group=new O,this.uid=mc("viewChart"),this.renderTask=hf({plan:Ag,reset:Dg}),this.renderTask.context={view:this}}function Cg(t,e,n){t&&("emphasis"===e?ll:ul)(t,n)}function Ig(e,t,n){var i,o=qo(e,t),r=t&&null!=t.highlightKey?(t=t.highlightKey,i=null==(i=Ps[t])&&Ls<=32?Ps[t]=Ls++:i):null;null!=o?N(zo(o),function(t){Cg(e.getItemGraphicEl(t),n,r)}):e.eachItemGraphicEl(function(t){Cg(t,n,r)})}function Ag(t){return Sg(t.model)}function Dg(t){var e=t.model,n=t.ecModel,i=t.api,o=t.payload,r=e.pipelineContext.progressiveRender,t=t.view,a=o&&wg(o).updateMethod,r=r?"incrementalPrepareRender":a&&t[a]?a:"render";return"render"!==r&&t[r](e,n,i,o),kg[r]}ur(Mg),fr(Mg);var kg={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Lg="\0__throttleOriginMethod",Pg="\0__throttleRate",Og="\0__throttleType";function Rg(t,o,r){var a,s,l,u,h,c=0,p=0,d=null;function f(){p=(new Date).getTime(),d=null,t.apply(l,u||[])}o=o||0;function e(){for(var t=[],e=0;en.blockIndex?n.step:null,modBy:null!=(t=i&&i.modDataCount)?Math.ceil(t/e):null,modDataCount:t}},Ug.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},Ug.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),e=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),i="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:e,modDataCount:i,large:o}},Ug.prototype.restorePipelines=function(t){var i=this,o=i._pipelineMap=L();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;o.set(n,{id:n,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),i._pipe(t,t.dataTask)})},Ug.prototype.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.api.getModel(),o=this.api;N(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,{});St(!(t.reset&&t.overallReset),""),t.reset&&this._createSeriesStageTask(t,e,i,o),t.overallReset&&this._createOverallStageTask(t,e,i,o)},this)},Ug.prototype.prepareView=function(t,e,n,i){var o=t.renderTask,r=o.context;r.model=e,r.ecModel=n,r.api=i,o.__block=!t.incrementalPrepareRender,this._pipe(e,o)},Ug.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},Ug.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},Ug.prototype._performStageTasks=function(t,s,l,u){u=u||{};var h=!1,c=this;function p(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}N(t,function(i,t){var e,n,o,r,a;u.visualType&&u.visualType!==i.visualType||(e=(n=c._stageTaskMap.get(i.uid)).seriesTaskMap,(n=n.overallTask)?((r=n.agentStubMap).each(function(t){p(u,t)&&(t.dirty(),o=!0)}),o&&n.dirty(),c.updatePayload(n,l),a=c.getPerformArgs(n,u.block),r.each(function(t){t.perform(a)}),n.perform(a)&&(h=!0)):e&&e.each(function(t,e){p(u,t)&&t.dirty();var n=c.getPerformArgs(t,u.block);n.skip=!i.performRawSeries&&s.isSeriesFiltered(t.context.model),c.updatePayload(t,l),t.perform(n)&&(h=!0)}))}),this.unfinished=h||this.unfinished},Ug.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},Ug.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}}while(e=e.getUpstream())})},Ug.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},Ug.prototype._createSeriesStageTask=function(n,t,i,o){var r=this,a=t.seriesTaskMap,s=t.seriesTaskMap=L(),t=n.seriesType,e=n.getTargetSeries;function l(t){var e=t.uid,e=s.set(e,a&&a.get(e)||hf({plan:qg,reset:Kg,count:Qg}));e.context={model:t,ecModel:i,api:o,useClearVisual:n.isVisual&&!n.isLayout,plan:n.plan,reset:n.reset,scheduler:r},r._pipe(t,e)}n.createOnAllSeries?i.eachRawSeries(l):t?i.eachRawSeriesByType(t,l):e&&e(i,o).each(l)},Ug.prototype._createOverallStageTask=function(t,e,n,i){var o=this,r=e.overallTask=e.overallTask||hf({reset:Yg}),a=(r.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:o},r.agentStubMap),s=r.agentStubMap=L(),e=t.seriesType,l=t.getTargetSeries,u=!0,h=!1;function c(t){var e=t.uid,e=s.set(e,a&&a.get(e)||(h=!0,hf({reset:Xg,onDirty:jg})));e.context={model:t,overallProgress:u},e.agent=r,e.__block=u,o._pipe(t,e)}St(!t.createOnAllSeries,""),e?n.eachRawSeriesByType(e,c):l?l(n,i).each(c):(u=!1,N(n.getSeries(),c)),h&&r.dirty()},Ug.prototype._pipe=function(t,e){t=t.uid,t=this._pipelineMap.get(t);t.head||(t.head=e),t.tail&&t.tail.pipe(e),(t.tail=e).__idxInPipeline=t.count++,e.__pipeline=t},Ug.wrapStageHandler=function(t,e){return(t=ut(t)?{overallReset:t,seriesType:function(t){ty=null;try{t(ey,ny)}catch(t){}return ty}(t)}:t).uid=mc("stageHandler"),e&&(t.visualType=e),t};var Wg=Ug;function Ug(t,e,n,i){this._stageTaskMap=L(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}function Yg(t){t.overallReset(t.ecModel,t.api,t.payload)}function Xg(t){return t.overallProgress&&Zg}function Zg(){this.agent.dirty(),this.getDownstream().dirty()}function jg(){this.agent&&this.agent.dirty()}function qg(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Kg(t){t.useClearVisual&&t.data.clearAllVisual();t=t.resetDefines=zo(t.reset(t.model,t.ecModel,t.api,t.payload));return 1>1^-(1&s),l=(l=t.charCodeAt(a+1)-64)>>1^-(1&l),o=s+=o,r=l+=r;i.push([s/n,l/n])}return i}function d0(t,o){return j(st((t=function(t){if(t.UTF8Encoding){var e=t.UTF8Scale;null==e&&(e=1024);for(var n=t.features,i=0;i'+t.dom+""}),f.painter.getSvgRoot().innerHTML=g,i.connectedBackgroundColor&&f.painter.setBackgroundColor(i.connectedBackgroundColor),f.refreshImmediately(),f.painter.toDataURL()):(i.connectedBackgroundColor&&f.add(new ms({shape:{x:0,y:0,width:t,height:n},style:{fill:i.connectedBackgroundColor}})),I0(p,function(t){t=new ls({style:{x:t.left*e-l,y:t.top*e-u,image:t.dom}});f.add(t)}),f.refreshImmediately(),d.toDataURL("image/"+(i&&i.type||"png")))):this.getDataURL(i)},s.prototype.convertToPixel=function(t,e){return U0(this,"convertToPixel",t,e)},s.prototype.convertFromPixel=function(t,e){return U0(this,"convertFromPixel",t,e)},s.prototype.containPixel=function(t,i){var o;if(!this._disposed)return N(Jo(this._model,t),function(t,n){0<=n.indexOf("Models")&&N(t,function(t){var e=t.coordinateSystem;e&&e.containPoint?o=o||!!e.containPoint(i):"seriesModels"===n&&(e=this._chartsMap[t.__viewId])&&e.containPoint&&(o=o||e.containPoint(i,t))},this)},this),!!o;this.id},s.prototype.getVisual=function(t,e){var t=Jo(this._model,t,{defaultMainType:"series"}),n=t.seriesModel.getData(),t=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;if(null==t)return hy(n,e);var i=n,o=t,r=e;switch(r){case"color":return i.getItemVisual(o,"style")[i.getVisual("drawType")];case"opacity":return i.getItemVisual(o,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return i.getItemVisual(o,r)}},s.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},s.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},s.prototype._initEvents=function(){var t,n,i,s=this;I0(yv,function(a){function t(t){var n,e,i,o=s.getModel(),r=t.target;"globalout"===a?n={}:r&&Uy(r,function(t){var e,t=z(t);return t&&null!=t.dataIndex?(e=t.dataModel||o.getSeriesByIndex(t.seriesIndex),n=e&&e.getDataParams(t.dataIndex,t.dataType)||{},1):t.eventData&&(n=I({},t.eventData),1)},!0),n&&(e=n.componentType,i=n.componentIndex,"markLine"!==e&&"markPoint"!==e&&"markArea"!==e||(e="series",i=n.seriesIndex),i=(e=e&&null!=i&&o.getComponent(e,i))&&s["series"===e.mainType?"_chartsMap":"_componentsMap"][e.__viewId],n.event=t,n.type=a,s._$eventProcessor.eventInfo={targetEl:r,packedEvent:n,model:e,view:i},s.trigger(a,n))}t.zrEventfulCallAtLast=!0,s._zr.on(a,t,s)}),I0(vv,function(t,e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),I0(["selectchanged"],function(e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),t=this._messageCenter,i=(n=this)._api,t.on("selectchanged",function(t){var e=i.getModel();t.isFromClick?(Wy("map","selectchanged",n,e,t),Wy("pie","selectchanged",n,e,t)):"select"===t.fromAction?(Wy("map","selected",n,e,t),Wy("pie","selected",n,e,t)):"unselect"===t.fromAction&&(Wy("map","unselected",n,e,t),Wy("pie","unselected",n,e,t))})},s.prototype.isDisposed=function(){return this._disposed},s.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},s.prototype.dispose=function(){var e,n;this._disposed?this.id:(this._disposed=!0,ir(this.getDom(),kv,""),e=this._api,n=this._model,I0(this._componentsViews,function(t){t.dispose(n,e)}),I0(this._chartsViews,function(t){t.dispose(n,e)}),this._zr.dispose(),delete Cv[this.id])},s.prototype.resize=function(t){var e,n;this._disposed?this.id:(this._zr.resize(t),e=this._model,this._loadingFX&&this._loadingFX.resize(),e&&(e=e.resetOption("media"),n=t&&t.silent,this[P0]=!0,e&&F0(this),W0.update.call(this,{type:"resize",animation:I({duration:0},t&&t.animation)}),this[P0]=!1,Z0.call(this,n),j0.call(this,n)))},s.prototype.showLoading=function(t,e){this._disposed?this.id:(D0(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Tv[t]&&(t=Tv[t](this._api,e),e=this._zr,this._loadingFX=t,e.add(t)))},s.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},s.prototype.makeActionFromEvent=function(t){var e=I({},t);return e.type=vv[t.type],e},s.prototype.dispatchAction=function(t,e){var n;this._disposed?this.id:(D0(e)||(e={silent:!!e}),mv[t.type]&&this._model&&(this[P0]?this._pendingActions.push(t):(n=e.silent,X0.call(this,t,n),(t=e.flush)?this._zr.flush():!1!==t&&w.browser.weChat&&this._throttledZrFlush(),Z0.call(this,n),j0.call(this,n))))},s.prototype.updateLabelLayout=function(){var t=this._labelManager;t.updateLayoutConfig(this._api),t.layout(this._api),t.processLabelsOverall()},s.prototype.appendData=function(t){var e;this._disposed?this.id:(e=t.seriesIndex,this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp())},s.internalField=(F0=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),H0(t,!0),H0(t,!1),e.plan()},H0=function(t,o){for(var r=t._model,a=t._scheduler,s=o?t._componentsViews:t._chartsViews,l=o?t._componentsMap:t._chartsMap,u=t._zr,h=t._api,e=0;ee.get("hoverLayerThreshold")&&!w.node&&!w.worker&&e.eachSeries(function(t){t.preventUsingHoverLayer||(t=n._chartsMap[t.__viewId]).__alive&&t.group.traverse(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})})},ev=function(e,n){I0(wv,function(t){t(e,n)})},rv=function(t){t[R0]=!0,t.getZr().wakeUp()},av=function(t){t[R0]&&(t.getZr().storage.traverse(function(t){Oh(t)||pv(t)}),t[R0]=!1)},nv=function(n){return u(t,e=rd),t.prototype.getCoordinateSystems=function(){return n._coordSysMgr.getCoordinateSystems()},t.prototype.getComponentByElement=function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return n._model.getComponent(e.mainType,e.index);t=t.parent}},t.prototype.enterEmphasis=function(t,e){ll(t,e),rv(n)},t.prototype.leaveEmphasis=function(t,e){ul(t,e),rv(n)},t.prototype.enterBlur=function(t){hl(t),rv(n)},t.prototype.leaveBlur=function(t){cl(t),rv(n)},t.prototype.enterSelect=function(t){pl(t),rv(n)},t.prototype.leaveSelect=function(t){dl(t),rv(n)},t.prototype.getModel=function(){return n.getModel()},t.prototype.getViewOfComponentModel=function(t){return n.getViewOfComponentModel(t)},t.prototype.getViewOfSeriesModel=function(t){return n.getViewOfSeriesModel(t)},new t(n);function t(){return null!==e&&e.apply(this,arguments)||this}var e},iv=function(i){function o(t,e){for(var n=0;nm[1]&&(m[1]=y)}e&&(this._nameList[d]=e[f],this._dontMakeIdFromName||s_(this,d))}this._rawCount=this._count=s,this._extent={},t_(this)},c.prototype._initDataFromProvider=function(t,e,n){if(!(e<=t)){for(var i=this._rawData,o=this._storage,r=this.dimensions,a=r.length,s=this._dimensionInfos,l=this._nameList,u=this._idList,h=this._rawExtent,c=i.getSource().sourceFormat===Pp,p=0;px[1]&&(x[1]=b)}c&&!i.pure&&y&&(v=y.name,null==l[m]&&null!=v&&(l[m]=Yo(v,null)),v=y.id,null==u[m])&&null!=v&&(u[m]=Yo(v,null)),this._dontMakeIdFromName||s_(this,m)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent={},t_(this)}},c.prototype.count=function(){return this._count},c.prototype.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,n=this._count;if(e===Array)for(var i=new e(n),o=0;o=this._rawCount||t<0)){if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return r;o=r-1}}}return-1},c.prototype.indicesOfNearest=function(t,e,n){var i=this._storage[t],o=[];if(i){null==n&&(n=1/0);for(var r=1/0,a=-1,s=0,l=0,u=this.count();l=c&&x<=p||isNaN(x))&&(s[l++]=f),f++;u=!0}else if(2===r){for(var g=d[h[0]],m=d[h[1]],v=t[o[1]][0],_=t[o[1]][1],y=0;y=c&&x<=p||isNaN(x))&&(s[l++]=w)}else for(y=0;yt[T][1])&&(S=!1)}S&&(s[l++]=this.getRawIndex(y))}return l_[1]&&(_[1]=v)}}}return n},c.prototype.downSample=function(t,e,n,i){for(var o=u_(this,[t]),r=o._storage,a=[],s=f_(1/e),l=r[t],u=this.count(),h=o._rawExtent[t],c=new(e_(this))(u),p=0,d=0;dh[1]&&(h[1]=y),c[p++]=m}return o._count=p,o._indices=c,o.getRawIndex=o_,o},c.prototype.lttbDownSample=function(t,e){var n,i=u_(this,[]),o=i._storage[t],r=this.count(),a=new(e_(this))(r),s=0,l=f_(1/e),u=this.getRawIndex(0);a[s++]=u;for(var h=1;hx&&(x=n,b=w)}u=a[s++]=b}return a[s++]=this.getRawIndex(r-1),i._count=s,i._indices=a,i.getRawIndex=o_,i},c.prototype.getItemModel=function(t){var e=this.hostModel,t=this.getRawDataItem(t);return new fc(t,e,e&&e.ecModel)},c.prototype.diff=function(e){var n=this;return new qv(e?e.getIndices():[],this.getIndices(),function(t){return r_(e,t)},function(t){return r_(n,t)})},c.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},c.prototype.setVisual=function(t,e){this._visual=this._visual||{},g_(t)?I(this._visual,t):this._visual[t]=e},c.prototype.getItemVisual=function(t,e){t=this._itemVisuals[t],t=t&&t[e];return null==t?this.getVisual(e):t},c.prototype.hasItemVisual=function(){return 0e[1]&&(e[1]=t[1])},E_.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},E_.prototype.getExtent=function(){return this._extent.slice()},E_.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},E_.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},E_.prototype.isBlank=function(){return this._isBlank},E_.prototype.setBlank=function(t){this._isBlank=t};var N_=E_;function E_(t){this._setting=t||{},this._extent=[1/0,-1/0]}fr(N_);z_.createByAxisModel=function(t){var t=t.option,e=t.data,e=e&&j(e,V_);return new z_({categories:e,needCollect:!e,deduplication:!1!==t.dedplication})},z_.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},z_.prototype.parseAndCollect=function(t){var e,n,i=this._needCollect;return"string"==typeof t||i?(i&&!this._deduplication?(e=this.categories.length,this.categories[e]=t):null==(e=(n=this._getOrCreateMap()).get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e):t},z_.prototype._getOrCreateMap=function(){return this._map||(this._map=L(this.categories))};var B_=z_;function z_(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication}function V_(t){return k(t)&&null!=t.value?t.value:t+""}var F_=_o;function H_(t,e,n,i){var o={},r=t[1]-t[0],r=o.interval=Lo(r/e,!0),e=(null!=n&&rn[1]&&(n[0]=n[1]),o}function G_(t){return wo(t)+2}function W_(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function U_(t,e){return t>=e[0]&&t<=e[1]}function Y_(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function X_(t,e){return t*(e[1]-e[0])+e[0]}u(q_,Z_=N_),q_.prototype.parse=function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},q_.prototype.contain=function(t){return U_(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},q_.prototype.normalize=function(t){return Y_(t=this._getTickNumber(this.parse(t)),this._extent)},q_.prototype.scale=function(t){return t=Math.round(X_(t,this._extent)),this.getRawOrdinalNumber(t)},q_.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},q_.prototype.getMinorTicks=function(t){},q_.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,r=this._ordinalMeta.categories.length,a=Math.min(r,e.length);o=t},q_.prototype.getOrdinalMeta=function(){return this._ordinalMeta},q_.prototype.niceTicks=function(){},q_.prototype.niceExtent=function(){},q_.type="ordinal";var Z_,j_=q_;function q_(t){var t=Z_.call(this,t)||this,e=(t.type="ordinal",t.getSetting("ordinalMeta"));return F(e=e||new B_({}))&&(e=new B_({categories:j(e,function(t){return k(t)?t.value:t})})),t._ordinalMeta=e,t._extent=t.getSetting("extent")||[0,e.categories.length-1],t}N_.registerClass(j_);var K_,$_=_o,J_=(u(Q_,K_=N_),Q_.prototype.parse=function(t){return t},Q_.prototype.contain=function(t){return U_(t,this._extent)},Q_.prototype.normalize=function(t){return Y_(t,this._extent)},Q_.prototype.scale=function(t){return X_(t,this._extent)},Q_.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},Q_.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},Q_.prototype.getInterval=function(){return this._interval},Q_.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=G_(t)},Q_.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,r=[];if(e){n[0]s&&r.push(t?{value:$_(s+e,o)}:{value:n[1]})}return r},Q_.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),o=1;oi[0]&&h=M[0]&&p<=M[1]&&a++)}u=(M[1]-M[0])/w;if(1.5*u=M[0]&&t.value<=M[1]&&!t.notAdd})}),function(t){return 0n&&(this._approxInterval=n),f1.length),t=Math.min(function(t,e,n,i){for(;n>>1;t[o][1]r[1],h(l[0].coord,r[0])&&(t?l[0].coord=r[0]:l.shift()),t&&h(r[0],l[0].coord)&&l.unshift({coord:r[0]}),h(r[1],e.coord)&&(t?e.coord=r[1]:l.pop()),t)&&h(e.coord,r[1])&&l.push({coord:r[1]}),a},rx.prototype.getMinorTicksCoords=function(){var t;return"ordinal"===this.scale.type?[]:(t=this.model.getModel("minorTick").get("splitNumber"),j(this.scale.getMinorTicks(t=0=u}}for(var a,s=this.__startIndex;so[0]){for(l=0;lt);l++);s=i[o[l]]}o.splice(l+1,0,t),(i[t]=e).virtual||(s?(n=s.dom).nextSibling?a.insertBefore(e.dom,n.nextSibling):a.appendChild(e.dom):a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom)),e.__painter=this}else tt("Layer of zlevel "+t+" is not valid")},l.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;ie&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;ni)return;return 1}(a,e)))return o=e.mapDimension(a.dim),r={},N(a.getViewLabels(),function(t){t=a.scale.getRawOrdinalNumber(t.tickValue);r[t]=1}),function(t){return!r.hasOwnProperty(e.get(o,t))}}}function Hb(t){for(var e,n,i=t.length/2;0e[l-1].coord&&(e.reverse(),u.reverse()),e[0].coord-10),c=e[l-1].coord+10,p=c-h;if(p<.001)return"transparent";N(e,function(t){t.offset=(t.coord-h)/p}),e.push({offset:l?e[l-1].offset:.5,color:u[1]||"transparent"}),e.unshift({offset:l?e[0].offset:.5,color:u[0]||"transparent"});l=new Qu(0,0,0,0,e,!0);return l[i]=h,l[i+"2"]=c,l}}}(a,o)||a.getVisual("style")[a.getVisual("drawType")]),c=(d&&c.type===o.type&&T===this._step?(m&&!f?f=this._newPolygon(u,_):f&&!m&&(g.remove(f),f=this._polygon=null),h||this._initOrUpdateEndLabel(t,o,hp(C)),g.setClipPath(Wb(this,o,!1,t)),x&&p.updateData(a,{isIgnore:b,clipShape:M,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),Nb(this._stackedOnPoints,_)&&Nb(this._points,u)||(y?this._doUpdateAnimation(a,_,o,n,T,v):(T&&(u=Vb(u,o,T),_=_&&Vb(_,o,T)),d.setShape({points:u}),f&&f.setShape({points:u,stackedOnPoints:_})))):(x&&p.updateData(a,{isIgnore:b,clipShape:M,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),y&&this._initSymbolLabelAnimation(a,o,M),T&&(u=Vb(u,o,T),_=_&&Vb(_,o,T)),d=this._newPolyline(u),m&&(f=this._newPolygon(u,_)),h||this._initOrUpdateEndLabel(t,o,hp(C)),g.setClipPath(Wb(this,o,!0,t))),t.get(["emphasis","focus"])),n=t.get(["emphasis","blurScope"]),x=(d.useStyle(V(s.getLineStyle(),{fill:"none",stroke:C,lineJoin:"bevel"})),Sl(d,t,"lineStyle"),0l?x:_,(g=Math.abs(d.label.y-l))>f.maxY&&(m=d.label.x-s-d.len2*h,y=u+d.len,m=Math.abs(m)=e.r0},rw.type="pie",rw);function rw(){var t=null!==ew&&ew.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}function aw(t,e,n){var i=nw.call(this)||this,o=(i.z2=2,new ws);return i.setTextContent(o),i.updateData(t,e,n,!0),i}lw.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},lw.prototype.containName=function(t){return 0<=this._getRawData().indexOfName(t)},lw.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},lw.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)};var sw=lw;function lw(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}u(cw,uw=hg),cw.prototype.init=function(t){uw.prototype.init.apply(this,arguments),this.legendVisualProvider=new sw(S(this.getData,this),S(this.getRawData,this)),this._defaultLabelLine(t)},cw.prototype.mergeOption=function(){uw.prototype.mergeOption.apply(this,arguments)},cw.prototype.getInitialData=function(){return e=F(e={coordDimensions:["value"],encodeDefaulter:M(Wp,t=this)})?{coordDimensions:e}:I({},e),i=t.getSource(),e=I_(i,e),(e=new S_(e,t)).initData(i,n),e;var t,e,n,i},cw.prototype.getDataParams=function(t){var e=this.getData(),n=uw.prototype.getDataParams.call(this,t),i=[];return e.each(e.mapDimension("value"),function(t){i.push(t)}),n.percent=Mo(i,t,e.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},cw.prototype._defaultLabelLine=function(t){Vo(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},cw.type="series.pie",cw.defaultOption={zlevel:0,z:2,legendHoverLink:!0,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},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"};var uw,hw=cw;function cw(){var t=null!==uw&&uw.apply(this,arguments)||this;return t.useColorPaletteOnData=!0,t}j1(function(t){t.registerChartView(ow),t.registerSeriesModel(hw),Gy("pie",t.registerAction),t.registerLayout(M(qb,"pie")),t.registerProcessor({seriesType:"pie",reset:function(t,e){var i,o=e.findComponents({mainType:"legend"});o&&o.length&&(i=t.getData()).filterSelf(function(t){for(var e=i.getName(t),n=0;ne[1]&&e.reverse(),e},kw.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},kw.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)};var Aw,Dw=kw;function kw(t,e,n,i,o){t=Aw.call(this,t,e,n)||this;return t.index=0,t.type=i||"value",t.position=o||"bottom",t}function Lw(t,e,n){n=n||{};var t=t.coordinateSystem,i=e.axis,o={},r=i.getAxesOnZeroOf()[0],a=i.position,s=r?"onZero":a,i=i.dim,t=t.getRect(),t=[t.x,t.x+t.width,t.y,t.y+t.height],l={left:0,right:1,top:0,bottom:1,onZero:2},u=e.get("offset")||0,u="x"===i?[t[2]-u,t[3]+u]:[t[0]-u,t[1]+u],h=(r&&(h=r.toGlobalCoord(r.dataToCoord(0)),u[l.onZero]=Math.max(Math.min(h,u[1]),u[0])),o.position=["y"===i?u[l[s]]:t[0],"x"===i?u[l[s]]:t[3]],o.rotation=Math.PI/2*("x"===i?0:1),o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[a],o.labelOffset=r?u[l[a]]-u[l.onZero]:0,e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),_t(n.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection),e.get(["axisLabel","rotate"]));return o.labelRotate="top"===s?-h:h,o.z2=1,o}function Pw(t){return"cartesian2d"===t.get("coordinateSystem")}function Ow(i){var o={xAxisModel:null,yAxisModel:null};return N(o,function(t,e){var n=e.replace(/Model$/,""),n=i.getReferringComponents(n,tr).models[0];o[e]=n}),o}Nw.prototype.getRect=function(){return this._rect},Nw.prototype.update=function(t,e){var n=this._axesMap,i=(this._updateScale(t,this.model),N(n.x,function(t){E1(t.scale,t.model)}),N(n.y,function(t){E1(t.scale,t.model)}),{});N(n.x,function(t){Bw(n,"y",t,i)}),N(n.y,function(t){Bw(n,"x",t,i)}),this.resize(this.model,e)},Nw.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),n=!n&&t.get("containLabel"),a=mp(i,{width:e.getWidth(),height:e.getHeight()}),o=(this._rect=a,this._axesList);function r(){N(o,function(t){var e,n,i=t.isHorizontal(),o=i?[0,a.width]:[0,a.height],r=t.inverse?1:0;t.setExtent(o[r],o[1-r]),o=t,e=i?a.x:a.y,r=o.getExtent(),n=r[0]+r[1],o.toGlobalCoord="x"===o.dim?function(t){return t+e}:function(t){return n-t+e},o.toLocalCoord="x"===o.dim?function(t){return t-e}:function(t){return n-t+e}})}r(),n&&(N(o,function(t){var e,n,i;t.model.get(["axisLabel","inside"])||(e=F1(t))&&(n=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]),a[n]-=e[n]+i,"top"===t.position?a.y+=e.height+i:"left"===t.position&&(a.x+=e.width+i))}),r()),N(this._coordsList,function(t){t.calcAffineTransform()})},Nw.prototype.getAxis=function(t,e){t=this._axesMap[t];if(null!=t)return t[e||0]},Nw.prototype.getAxes=function(){return this._axesList.slice()},Nw.prototype.getCartesian=function(t,e){if(null!=t&&null!=e)return this._coordsMap["x"+t+"y"+e];k(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,i=this._coordsList;nh[1]?-1:1,a=["start"===l?h[0]-a*u:"end"===l?h[1]+a*u:(h[0]+h[1])/2,Yw(l)?t.labelOffset+s*u:0],null!=(u=e.get("nameRotate"))&&(u=u*Vw/180),Yw(l)?o=Fw.innerTextLayout(t.rotation,null!=u?u:t.rotation,s):(s=t.rotation,l=l,h=h,u=To((u=u||0)-s),s=h[0]>h[1],h="start"===l&&!s||"start"!==l&&s,l=Co(u-Vw/2)?(c=h?"bottom":"top","center"):Co(u-1.5*Vw)?(c=h?"top":"bottom","center"):(c="middle",u<1.5*Vw&&Vw/2u[1]&&u.reverse(),(s=null==s||s>u[1]?u[1]:s)n[o],f=[-c.x,-c.y],e=(e||(f[i]=l[s]),[0,0]),s=[-p.x,-p.y],g=P(t.get("pageButtonGap",!0),t.get("itemGap",!0)),f=(d&&("end"===t.get("pageButtonPosition",!0)?s[i]+=n[o]-p[o]:e[i]+=p[o]+g),s[1-i]+=c[r]/2-p[r]/2,l.setPosition(f),u.setPosition(e),h.setPosition(s),{x:0,y:0}),c=(f[o]=(d?n:c)[o],f[r]=Math.max(c[r],p[r]),f[a]=Math.min(0,p[a]+s[1-i]),u.__rectSize=n[o],d?((e={x:0,y:0})[o]=Math.max(n[o]-p[o]-g,0),e[r]=f[r],u.setClipPath(new ms({shape:e})),u.__rectSize=e[o]):h.eachChild(function(t){t.attr({invisible:!0,silent:!0})}),this._getPageInfo(t));return null!=c.pageIndex&&Ah(l,{x:c.contentPosition[0],y:c.contentPosition[1]},d?t:null),this._updatePageInfoView(t,c),f},KS.prototype._pageGo=function(t,e,n){t=this._getPageInfo(e)[t];null!=t&&n.dispatchAction({type:"legendScroll",scrollDataIndex:t,legendId:e.id})},KS.prototype._updatePageInfoView=function(n,i){var o=this._controllerGroup,t=(N(["pagePrev","pageNext"],function(t){var e=null!=i[t+"DataIndex"],t=o.childOfName(t);t&&(t.setStyle("fill",e?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),t.cursor=e?"pointer":"default")}),o.childOfName("pageText")),e=n.get("pageFormatter"),r=i.pageIndex,r=null!=r?r+1:0,a=i.pageCount;t&&e&&t.setStyle("text",D(e)?e.replace("{current}",null==r?"":r+"").replace("{total}",null==a?"":a+""):e({current:r,total:a}))},KS.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,t=t.getOrient().index,o=ZS[t],r=jS[t],e=this._findTargetItemIndex(e),a=n.children(),s=a[e],l=a.length,u=l?1:0,h={contentPosition:[n.x,n.y],pageCount:u,pageIndex:u-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(s){n=g(s);h.contentPosition[t]=-n.s;for(var c=e+1,p=n,d=n,f=null;c<=l;++c)(!(f=g(a[c]))&&d.e>p.s+i||f&&!y(f,p.s))&&(p=d.i>p.i?d:f)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=p.i),++h.pageCount),d=f;for(c=e-1,d=p=n,f=null;-1<=c;--c)(f=g(a[c]))&&y(d,f.s)||!(p.i=e&&t.s<=e+i}},KS.prototype._findTargetItemIndex=function(n){return this._showController?(this.getContentGroup().eachChild(function(t,e){t=t.__legendDataIndex;null==o&&null!=t&&(o=e),t===n&&(i=e)}),null!=i?i:o):0;var i,o},KS.type="legend.scroll",KS);function KS(){var t=null!==YS&&YS.apply(this,arguments)||this;return t.type=KS.type,t.newlineDisabled=!0,t._currentIndex=0,t}j1(function(t){j1(FS),t.registerComponentModel(GS),t.registerComponentView(qS),t.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})})});var $S=Ko(),JS=C,QS=S;function tM(){this._dragging=!1,this.animationThreshold=15}function eM(t,e,n,i){!function n(i,t){{var o;if(k(i)&&k(t))return o=!0,N(t,function(t,e){o=o&&n(i[e],t)}),!!o}return i===t}($S(n).lastProp,i)&&($S(n).lastProp=i,e?Ah(n,i,t):(n.stopAnimation(),n.attr(i)))}function nM(t,e){t[e.get(["label","show"])?"show":"hide"]()}function iM(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function oM(t,e,n){var i=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=o&&(t.zlevel=o),t.silent=n)})}function rM(t,e,n,i,o){var r=aM(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),n=n.getModel("label"),a=ep(n.get("padding")||0),s=n.getFont(),l=oi(r,s),u=o.position,h=l.width+a[1]+a[3],l=l.height+a[0]+a[2],c=o.align,c=("right"===c&&(u[0]-=h),"center"===c&&(u[0]-=h/2),o.verticalAlign),i=("bottom"===c&&(u[1]-=l),"middle"===c&&(u[1]-=l/2),o=u,c=h,h=l,i=(l=i).getWidth(),l=l.getHeight(),o[0]=Math.min(o[0]+c,i)-c,o[1]=Math.min(o[1]+h,l)-h,o[0]=Math.max(o[0],0),o[1]=Math.max(o[1],0),n.get("backgroundColor"));i&&"auto"!==i||(i=e.get(["axisLine","lineStyle","color"])),t.label={x:u[0],y:u[1],style:Kh(n,{text:r,font:s,fill:n.getTextColor(),padding:a,backgroundColor:i}),z2:10}}function aM(t,e,n,i,o){t=e.scale.parse(t);var r,a=e.scale.getLabel({value:t},{precision:o.precision}),o=o.formatter;return o&&(r={value:V1(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]},N(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),t=t.dataIndexInside,e=e&&e.getDataParams(t);e&&r.seriesData.push(e)}),D(o)?a=o.replace("{value}",a):ut(o)&&(a=o(r))),a}function sM(t,e,n){var i=Pe();return Be(i,i,n.rotation),Ee(i,i,n.position),Nh([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}tM.prototype.render=function(t,e,n,i){var o,r,a=e.get("value"),s=e.get("status");this._axisModel=t,this._axisPointerModel=e,this._api=n,!i&&this._lastValue===a&&this._lastStatus===s||(this._lastValue=a,this._lastStatus=s,i=this._group,o=this._handle,s&&"hide"!==s?(i&&i.show(),o&&o.show(),this.makeElOption(s={},a,t,e,n),(r=s.graphicKey)!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=r,r=this._moveAnimation=this.determineAnimation(t,e),i?(r=M(eM,e,r),this.updatePointerEl(i,s,r),this.updateLabelEl(i,s,r,e)):(i=this._group=new O,this.createPointerEl(i,s,t,e),this.createLabelEl(i,s,t,e),n.getZr().add(i)),oM(i,e,!0),this._renderHandle(a)):(i&&i.hide(),o&&o.hide()))},tM.prototype.remove=function(t){this.clear(t)},tM.prototype.dispose=function(t){this.clear(t)},tM.prototype.determineAnimation=function(t,e){var n,i=e.get("animation"),o=t.axis,r="category"===o.type,e=e.get("snap");return!(!e&&!r)&&("auto"===i||null==i?(n=this.animationThreshold,r&&o.getBandWidth()>n||!!e&&(r=qw(t).seriesDataCount,e=o.getExtent(),Math.abs(e[0]-e[1])/r>n)):!0===i)},tM.prototype.makeElOption=function(t,e,n,i,o){},tM.prototype.createPointerEl=function(t,e,n,i){var o=e.pointer;o&&(o=$S(t).pointerEl=new Uh[o.type](JS(e.pointer)),t.add(o))},tM.prototype.createLabelEl=function(t,e,n,i){e.label&&(e=$S(t).labelEl=new ws(JS(e.label)),t.add(e),nM(e,i))},tM.prototype.updatePointerEl=function(t,e,n){t=$S(t).pointerEl;t&&e.pointer&&(t.setStyle(e.pointer.style),n(t,{shape:e.pointer.shape}))},tM.prototype.updateLabelEl=function(t,e,n,i){t=$S(t).labelEl;t&&(t.setStyle(e.label.style),n(t,{x:e.label.x,y:e.label.y}),nM(t,i))},tM.prototype._renderHandle=function(t){var e,n,i,o,r,a;!this._dragging&&this.updateHandleTransform&&(n=this._axisPointerModel,i=this._api.getZr(),o=this._handle,r=n.getModel("handle"),a=n.get("status"),r.get("show")&&a&&"hide"!==a?(this._handle||(e=!0,o=this._handle=Hh(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){ye(t.event)},onmousedown:QS(this._onHandleDragMove,this,0,0),drift:QS(this._onHandleDragMove,this),ondragend:QS(this._onHandleDragEnd,this)}),i.add(o)),oM(o,n,!1),o.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"])),F(a=r.get("size"))||(a=[a,a]),o.scaleX=a[0]/2,o.scaleY=a[1]/2,Ng(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)):(o&&i.remove(o),this._handle=null))},tM.prototype._moveHandleToValue=function(t,e){eM(this._axisPointerModel,!e&&this._moveAnimation,this._handle,iM(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},tM.prototype._onHandleDragMove=function(t,e){var n=this._handle;n&&(this._dragging=!0,t=this.updateHandleTransform(iM(n),[t,e],this._axisModel,this._axisPointerModel),this._payloadInfo=t,n.stopAnimation(),n.attr(iM(t)),$S(n).lastProp=null,this._doDispatchAxisPointer())},tM.prototype._doDispatchAxisPointer=function(){var t,e;this._handle&&(t=this._payloadInfo,e=this._axisModel,this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]}))},tM.prototype._onHandleDragEnd=function(){var t;this._dragging=!1,this._handle&&(t=this._axisPointerModel.get("value"),this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"}))},tM.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var t=t.getZr(),e=this._group,n=this._handle;t&&e&&(this._lastGraphicKey=null,e&&t.remove(e),n&&t.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},tM.prototype.doClear=function(){},tM.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}};u(hM,lM=tM),hM.prototype.makeElOption=function(t,e,n,i,o){var r,a,s=n.axis,l=s.grid,u=i.get("type"),h=cM(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(e,!0)),p=(u&&"none"!==u&&(r=(a=i).get("type"),a=a.getModel(r+"Style"),"line"===r?(p=a.getLineStyle()).fill=null:"shadow"===r&&((p=a.getAreaStyle()).stroke=null),r=p,(a=pM[u](s,c,h)).style=r,t.graphicKey=a.type,t.pointer=a),Lw(l.model,n));u=e,s=t,c=p,h=n,r=i,a=o,l=Fw.innerTextLayout(c.rotation,0,c.labelDirection),c.labelMargin=r.get(["label","margin"]),rM(s,h,r,a,{position:sM(h.axis,u,c),align:l.textAlign,verticalAlign:l.textVerticalAlign})},hM.prototype.getHandleTransform=function(t,e,n){var i=Lw(e.axis.grid.model,e,{labelInside:!1}),n=(i.labelMargin=n.get(["handle","margin"]),sM(e.axis,t,i));return{x:n[0],y:n[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},hM.prototype.updateHandleTransform=function(t,e,n,i){var n=n.axis,o=n.grid,r=n.getGlobalExtent(!0),o=cM(o,n).getOtherAxis(n).getGlobalExtent(),n="x"===n.dim?0:1,a=[t.x,t.y],e=(a[n]+=e[n],a[n]=Math.min(r[1],a[n]),a[n]=Math.max(r[0],a[n]),(o[1]+o[0])/2),r=[e,e];return r[n]=a[n],{x:a[0],y:a[1],rotation:t.rotation,cursorPoint:r,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][n]}};var lM,uM=hM;function hM(){return null!==lM&&lM.apply(this,arguments)||this}function cM(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var pM={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:(i=[e,n[0]],e=[e,n[1]],n=dM(t),{x1:i[n=n||0],y1:i[1-n],x2:e[n],y2:e[1-n]})};var i},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),o=n[1]-n[0];return{type:"Rect",shape:(e=[e-i/2,n[0]],n=[i,o],i=dM(t),{x:e[i=i||0],y:e[1-i],width:n[i],height:n[1-i]})}}};function dM(t){return"x"===t.dim?0:1}u(yM,fM=g),yM.type="axisPointer",yM.defaultOption={show:"auto",zlevel:0,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}};var fM,gM=yM;function yM(){var t=null!==fM&&fM.apply(this,arguments)||this;return t.type=yM.type,t}var mM=Ko(),vM=N;function _M(t,e,n){var i,c,p;function o(t,h){c.on(t,function(e){n=p;var n,i,t,o,r,a,s,l={dispatchAction:u,pendings:i={showTip:[],hideTip:[]}};function u(t){var e=i[t.type];e?e.push(t):(t.dispatchAction=u,n.dispatchAction(t))}vM(mM(c).records,function(t){t&&h(t,e,l.dispatchAction)}),o=p,a=(t=l.pendings).showTip.length,s=t.hideTip.length,a?r=t.showTip[a-1]:s&&(r=t.hideTip[s-1]),r&&(r.dispatchAction=null,o.dispatchAction(r))})}w.node||(i=e.getZr(),mM(i).records||(mM(i).records={}),p=e,mM(c=i).initialized||(mM(c).initialized=!0,o("click",M(bM,"click")),o("mousemove",M(bM,"mousemove")),o("globalout",xM)),(mM(i).records[t]||(mM(i).records[t]={})).handler=n)}function xM(t,e,n){t.handler("leave",null,n)}function bM(t,e,n,i){e.handler(t,n,i)}function wM(t,e){w.node||(e=e.getZr(),(mM(e).records||{})[t]&&(mM(e).records[t]=null))}u(TM,SM=_g),TM.prototype.render=function(t,e,n){var e=e.getComponent("tooltip"),i=t.get("triggerOn")||e&&e.get("triggerOn")||"mousemove|click";_M("axisPointer",n,function(t,e,n){"none"!==i&&("leave"===t||0<=i.indexOf(t))&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},TM.prototype.remove=function(t,e){wM("axisPointer",e)},TM.prototype.dispose=function(t,e){wM("axisPointer",e)},TM.type="axisPointer";var SM,MM=TM;function TM(){var t=null!==SM&&SM.apply(this,arguments)||this;return t.type=TM.type,t}function CM(t,e){var n,i,o,r,a=[],s=t.seriesIndex;return null==s||!(e=e.getSeriesByIndex(s))||null==(s=qo(n=e.getData(),t))||s<0||F(s)?{point:[]}:(i=n.getItemGraphicEl(s),o=e.coordinateSystem,e.getTooltipPosition?a=e.getTooltipPosition(s)||[]:o&&o.dataToPoint?a=t.isStacked?(e=o.getBaseAxis(),t=o.getOtherAxis(e).dim,e=e.dim,t="x"===t||"radius"===t?1:0,e=n.mapDimension(e),(r=[])[t]=n.get(e,s),r[1-t]=n.get(n.getCalculationInfo("stackResultDimension"),s),o.dataToPoint(r)||[]):o.dataToPoint(n.getValues(j(o.dimensions,function(t){return n.mapDimension(t)}),s))||[]:i&&((e=i.getBoundingRect().clone()).applyTransform(i.transform),a=[e.x+e.width/2,e.y+e.height/2]),{point:a,el:i})}var IM=Ko();function AM(t,e,n){var r,a,i,s,l,o,u,h,c,p,d,f,g,y,m=t.currTrigger,v=[t.x,t.y],_=t,x=t.dispatchAction||S(n.dispatchAction,n),b=e.getComponent("axisPointer").coordSysAxesInfo;if(b)return OM(v)&&(v=CM({seriesIndex:_.seriesIndex,dataIndex:_.dataIndex},e).point),r=OM(v),a=_.axesInfo,i=b.axesInfo,s="leave"===m||OM(v),l={},e={list:[],map:{}},u={showPointer:M(kM,o={}),showTooltip:M(LM,e)},N(b.coordSysMap,function(t,e){var o=r||t.containPoint(v);N(b.coordSysAxesInfo[e],function(t,e){var n=t.axis,i=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(a,t);s||!o||a&&!i||null!=(i=null!=(i=i&&i.value)||r?i:n.pointToData(v))&&DM(t,i,u,!1,l)})}),h={},N(i,function(n,t){var i=n.linkGroup;i&&!o[t]&&N(i.axesInfo,function(t,e){var e=o[e];t!==n&&e&&(e=e.value,i.mapper&&(e=n.axis.scale.parse(i.mapper(e,PM(t),PM(n)))),h[n.key]=e)})}),N(h,function(t,e){DM(i[e],t,u,!0,l)}),g=o,_=i,y=l.axesInfo=[],N(_,function(t,e){var n=t.axisPointerModel.option,e=g[e];e?(t.useHandle||(n.status="show"),n.value=e.value,n.seriesDataIndices=(e.payloadBatch||[]).slice()):t.useHandle||(n.status="hide"),"show"===n.status&&y.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}),m=e,_=t,e=x,!OM(t=v)&&m.list.length?(x=((m.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{},e({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:_.tooltipOption,position:_.position,dataIndexInside:x.dataIndexInside,dataIndex:x.dataIndex,seriesIndex:x.seriesIndex,dataByCoordSys:m.list})):e({type:"hideTip"}),t=i,x=(_=n).getZr(),m="axisPointerLastHighlights",c=IM(x)[m]||{},p=IM(x)[m]={},N(t,function(t,e){t=t.axisPointerModel.option;"show"===t.status&&N(t.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;p[e]=t})}),d=[],f=[],N(c,function(t,e){p[e]||f.push(t)}),N(p,function(t,e){c[e]||d.push(t)}),f.length&&_.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:f}),d.length&&_.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:d}),l}function DM(t,e,n,i,o){var r,a,s,l,u,h,c,p,d,f,g=t.axis;!g.scale.isBlank()&&g.containData(e)&&(t.involveSeries?(l=e,u=t.axis,h=u.dim,c=l,p=[],d=Number.MAX_VALUE,f=-1,N(t.seriesModels,function(e,t){var n,i=e.getData().mapDimensionsAll(h);if(e.getAxisTooltipData)var o=e.getAxisTooltipData(i,l,u),r=o.dataIndices,o=o.nestestValue;else{if(!(r=e.getData().indicesOfNearest(i[0],l,"category"===u.type?.5:null)).length)return;o=e.getData().get(i[0],r[0])}null!=o&&isFinite(o)&&(i=l-o,(n=Math.abs(i))<=d)&&((n'}(n.get("backgroundColor"),i,o)),D(t))r.innerHTML=t;else if(t){r.innerHTML="",F(t)||(t=[t]);for(var a=0;a"),a=p.join(n);this._showOrMove(o,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(o,r,i[0],i[1],this._tooltipContent,h):this._showTooltipContent(o,a,h,Math.random()+"",i[0],i[1],r,null,d)})},l2.prototype._showSeriesItemTooltip=function(t,e,n){var i,o,r,a,s=this._ecModel,e=z(e),l=e.seriesIndex,u=s.getSeriesByIndex(l),h=e.dataModel||u,c=e.dataIndex,e=e.dataType,p=h.getData(e),d=this._renderMode,f=t.positionDefault,g=u2([p.getItemModel(c),h,u&&(u.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),u=g.get("trigger");null!=u&&"item"!==u||(i=h.getDataParams(c,e),o=new og,i.marker=o.makeTooltipMarker("item",hp(i.color),d),f=uf(h.formatTooltip(c,!1,e)),u=g.get("order"),r=f.markupFragment?Qf(f.markupFragment,o,d,u,s.get("useUTC"),g.get("textStyle")):f.markupText,a="item_"+h.name+"_"+c,this._showOrMove(g,function(){this._showTooltipContent(g,r,i,a,t.offsetX,t.offsetY,t.position,t.target,o)}),n({type:"showTip",dataIndexInside:c,dataIndex:p.getRawIndex(c),seriesIndex:l,from:this.uid}))},l2.prototype._showComponentItemTooltip=function(e,n,t){var i=z(n),o=i.tooltipConfig.option,o=[o=D(o)?{content:o,formatter:o}:o],i=this._ecModel.getComponent(i.componentMainType,i.componentIndex),i=(i&&o.push(i),e.positionDefault),r=u2(o,this._tooltipModel,i?{position:i}:null),a=r.get("content"),s=Math.random()+"",l=new og;this._showOrMove(r,function(){var t=C(r.get("formatterParams")||{});this._showTooltipContent(r,a,t,s,e.offsetX,e.offsetY,e.position,n,l)}),t({type:"showTip",from:this.uid})},l2.prototype._showTooltipContent=function(n,t,i,e,o,r,a,s,l){var u,h,c,p,d;this._ticket="",n.get("showContent")&&n.get("show")&&(u=this._tooltipContent,h=n.get("formatter"),a=a||n.get("position"),t=t,c=this._getNearestPoint([o,r],i,n.get("trigger"),n.get("borderColor")).color,h&&D(h)?(p=n.ecModel.get("useUTC"),t=h,t=lp(t=(d=F(i)?i[0]:i)&&d.axisType&&0<=d.axisType.indexOf("time")?Bc(d.axisValue,t,p):t,i,!0)):ut(h)&&(d=i2(function(t,e){t===this._ticket&&(u.setContent(e,l,n,c,a),this._updatePosition(n,a,o,r,u,i,s))},this),this._ticket=e,t=h(i,e,d)),u.setContent(t,l,n,c,a),u.show(n,c),this._updatePosition(n,a,o,r,u,i,s))},l2.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||F(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:F(e)?void 0:{color:i||e.color||e.borderColor}},l2.prototype._updatePosition=function(t,e,n,i,o,r,a){var s,l,u,h,c=this._api.getWidth(),p=this._api.getHeight(),d=(e=e||t.get("position"),o.getSize()),f=t.get("align"),g=t.get("verticalAlign"),y=a&&a.getBoundingRect().clone();a&&y.applyTransform(a.transform),F(e=ut(e)?e([n,i],r,o.el,y,{viewSize:[c,p],contentSize:d.slice()}):e)?(n=r2(e[0],c),i=r2(e[1],p)):k(e)?((r=e).width=d[0],r.height=d[1],n=(r=mp(r,{width:c,height:p})).x,i=r.y,g=f=null):i=(n=(s=D(e)&&a?function(t,e,n){var i=n[0],o=n[1],r=0,a=0,s=e.width,l=e.height;switch(t){case"inside":r=e.x+s/2-i/2,a=e.y+l/2-o/2;break;case"top":r=e.x+s/2-i/2,a=e.y-o-10;break;case"bottom":r=e.x+s/2-i/2,a=e.y+l+10;break;case"left":r=e.x-i-10-5,a=e.y+l/2-o/2;break;case"right":r=e.x+s+10+5,a=e.y+l/2-o/2}return[r,a]}(e,y,d):(r=n,a=i,e=c,y=p,l=f?null:20,u=g?null:20,h=(h=o).getOuterSize(),s=h.width,h=h.height,null!=l&&(en[1]||o[1]i[1]||r[1]=this._data.count()-1},AT.prototype.setPlayState=function(t){this.option.autoPlay=!!t},AT.prototype.getPlayState=function(){return!!this.option.autoPlay},AT.prototype._initData=function(){var o,t=this.option,e=t.data||[],t=t.axisType,r=this._names=[],e=("category"===t?(o=[],N(e,function(t,e){var n,i=Yo(Ho(t),"");k(t)?(n=C(t)).value=e:n=e,o.push(n),r.push(i)})):o=e,{category:"ordinal",time:"time",value:"number"}[t]||"number");(this._data=new S_([{name:"value",type:e}],this)).initData(o,r)},AT.prototype.getData=function(){return this._data},AT.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},AT.type="timeline",AT.defaultOption={zlevel:0,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:[]};var IT,ju=AT;function AT(){var t=null!==IT&&IT.apply(this,arguments)||this;return t.type=AT.type,t.layoutMode="box",t}u(LT,DT=ju),LT.type="timeline.slider",LT.defaultOption=vc(ju.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:[]});var DT,kT=LT;function LT(){var t=null!==DT&&DT.apply(this,arguments)||this;return t.type=LT.type,t}ot(kT,cc.prototype);u(OT,PT=_g),OT.type="timeline";var PT,xu=OT;function OT(){var t=null!==PT&&PT.apply(this,arguments)||this;return t.type=OT.type,t}u(ET,RT=$y),ET.prototype.getLabelModel=function(){return this.model.getModel("label")},ET.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")};var RT,NT=ET;function ET(t,e,n,i){t=RT.call(this,t,e,n)||this;return t.type=i||"value",t}var BT,zT=Math.PI,VT=Ko(),FT=(u(HT,BT=xu),HT.prototype.init=function(t,e){this.api=e},HT.prototype.render=function(e,t,n){var i,o,r;this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)&&(i=this._layout(e,n),o=this._createGroup("_mainGroup"),t=this._createGroup("_labelGroup"),r=this._axis=this._createAxis(i,e),e.formatTooltip=function(t){return Kf("nameValue",{noName:!0,value:r.scale.getLabel({value:t})})},N(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](i,o,r,e)},this),this._renderAxisLabel(i,t,r,e),this._position(i,e)),this._doPlayStop(),this._updateTicksStatus()},HT.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},HT.prototype.dispose=function(){this._clearTimer()},HT.prototype._layout=function(t,e){var n,i,o,r,a=t.get(["label","position"]),s=t.get("orient"),l=(l=e,mp((r=t).getBoxLayoutParams(),{width:l.getWidth(),height:l.getHeight()},r.get("padding"))),e={horizontal:"center",vertical:0<=(r=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2n[1]?n[1]:t)r&&(e[1-i]=e[i]+n.sign*r),e}function uC(t,e){t=t[e]-t[1-e];return{span:Math.abs(t),sign:0e[1]&&(e[1]=t[1])})}),[(e=O1((n=e.getAxisModel()).axis.scale,n,o).calculate()).min,e.max]),this._updateMinMaxSpan(),n=this.calculateDataWindow(t.settledOption),this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel())},RC.prototype.filterData=function(t,e){var i,n,o,h;t===this._dataZoomModel&&(i=this._dimName,n=this.getTargetSeriesModels(),o=t.get("filterMode"),h=this._valueWindow,"none"!==o)&&LC(n,function(n){var l=n.getData(),u=l.mapDimensionsAll(i);u.length&&("weakFilter"===o?l.filterSelf(function(t){for(var e,n,i,o=0;oh[1];if(a&&!s&&!r)return!0;a&&(i=!0),s&&(e=!0),r&&(n=!0)}return i&&e&&n}):LC(u,function(t){var e;"empty"===o?n.setData(l=l.map(t,function(t){return t>=h[0]&&t<=h[1]?t:NaN})):((e={})[t]=h,l.selectRange(e))}),LC(u,function(t){l.setApproximateExtent(h,t)}))})},RC.prototype._updateMinMaxSpan=function(){var i=this._minMaxSpan={},o=this._dataZoomModel,r=this._dataExtent;LC(["min","max"],function(t){var e=o.get(t+"Span"),n=o.get(t+"ValueSpan");null!=(n=null!=n?this.getAxisModel().axis.scale.parse(n):n)?e=vo(r[0]+n,r,[0,100],!0):null!=e&&(n=vo(e,[0,100],r,!0)-r[0]),i[t+"Span"]=e,i[t+"ValueSpan"]=n},this)},RC.prototype._setAxisModel=function(){var t,e=this.getAxisModel(),n=this._percentWindow,i=this._valueWindow;n&&(t=So(i,[0,500]),t=Math.min(t,20),e=e.axis.scale.rawExtentInfo,0!==n[0]&&e.setDeterminedMinMax("min",+i[0].toFixed(t)),100!==n[1]&&e.setDeterminedMinMax("max",+i[1].toFixed(t)),e.freeze())},RC);function RC(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}var NC={getTargetSeries:function(r){function t(o){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(t,e){var n=r.getComponent(qT(t),e);o(t,e,n,i)})})}t(function(t,e,n,i){n.__dzAxisProxy=null});var o=[],e=(t(function(t,e,n,i){n.__dzAxisProxy||(n.__dzAxisProxy=new OC(t,e,i,r),o.push(n.__dzAxisProxy))}),L());return N(o,function(t){N(t.getTargetSeriesModels(),function(t){e.set(t.uid,t)})}),e},overallReset:function(t,i){t.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(t,e){n.getAxisProxy(t,e).reset(n)}),n.eachTargetAxis(function(t,e){n.getAxisProxy(t,e).filterData(n,i)})}),t.eachComponent("dataZoom",function(t){var e,n=t.findRepresentativeAxisProxy();n&&(e=n.getDataPercentWindow(),n=n.getDataValueWindow(),t.setCalculatedRange({start:e[0],end:e[1],startValue:n[0],endValue:n[1]}))})}};var EC=!1;function BC(t){EC||(EC=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,NC),t.registerAction("dataZoom",function(e,t){N(KT(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})}),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function zC(t){BC(t),t.registerComponentModel(oC),t.registerComponentView(CC),MC(t)}u(HC,VC=cr),HC.type="dataZoom.slider",HC.layoutMode="box",HC.defaultOption=vc(cr.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"}}});var VC,FC=HC;function HC(){var t=null!==VC&&VC.apply(this,arguments)||this;return t.type=HC.type,t}var GC,WC=ms,UC="horizontal",YC="vertical",XC=["line","bar","candlestick","scatter"],ZC={easing:"cubicOut",duration:100},jC=(u(qC,GC=Hu),qC.prototype.init=function(t,e){this.api=e,this._onBrush=S(this._onBrush,this),this._onBrushEnd=S(this._onBrushEnd,this)},qC.prototype.render=function(t,e,n,i){GC.prototype.render.apply(this,arguments),Ng(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")?t.noTarget()?(this._clear(),this.group.removeAll()):(i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},qC.prototype.dispose=function(){this._clear(),GC.prototype.dispose.apply(this,arguments)},qC.prototype._clear=function(){(e=(n=this)[t="_dispatchZoomAction"])&&e[Lg]&&(n[t]=e[Lg]);var t,e,n=this.api.getZr();n.off("mousemove",this._onBrush),n.off("mouseup",this._onBrushEnd)},qC.prototype._buildView=function(){var t=this.group,e=(t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval(),this._displayables.sliderGroup=new O);this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},qC.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),e={width:e.getWidth(),height:e.getHeight()},o=this._orient===UC?{right:e.width-i.x-i.width,top:e.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},r=bp(t.option),n=(N(["right","top","width","height"],function(t){"ph"===r[t]&&(r[t]=o[t])}),mp(r,e));this._location={x:n.x,y:n.y},this._size=[n.width,n.height],this._orient===YC&&this._size.reverse()},qC.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),i=i&&i.get("inverse"),o=this._displayables.sliderGroup,r=(this._dataShadowInfo||{}).otherAxisInverse,n=(o.attr(n!==UC||i?n===UC&&i?{scaleY:r?1:-1,scaleX:-1}:n!==YC||i?{scaleY:r?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:r?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:r?1:-1,scaleX:1}),t.getBoundingRect([o]));t.x=e.x-n.x,t.y=e.y-n.y,t.markRedraw()},qC.prototype._getViewExtent=function(){return[0,this._size[0]]},qC.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect"),t=(n.add(new WC({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),new WC({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:S(this._onClickPanel,this)})),e=this.api.getZr();i?(t.on("mousedown",this._onBrushStart,this),t.cursor="crosshair",e.on("mousemove",this._onBrush),e.on("mouseup",this._onBrushEnd)):(e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)),n.add(t)},qC.prototype._renderDataShadow=function(){var t,e,n=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],n){var i=this._size,o=n.series,r=o.getRawData(),o=o.getShadowDim?o.getShadowDim():n.otherDim;if(null!=o){var a,n=.3*((s=r.getDataExtent(o))[1]-s[0]),s=[s[0]-n,s[1]+n],l=[0,i[1]],n=[0,i[0]],u=[[i[0],0],[0,0]],h=[],c=n[1]/(r.count()-1),p=0,d=Math.round(r.count()/i[0]);r.each([o],function(t,e){var n;0e[0]||t[1]<0||t[1]>e[1]||(e=((e=this._handleEnds)[0]+e[1])/2,t=this._updateInterval("all",t[0]-e),this._updateView(),t&&this._dispatchZoomAction(!1))},qC.prototype._onBrushStart=function(t){var e=t.offsetX,t=t.offsetY;this._brushStart=new E(e,t),this._brushing=!0,this._brushStartTime=+new Date},qC.prototype._onBrushEnd=function(t){var e,n,i;this._brushing&&(e=this._displayables.brushRect,this._brushing=!1,e)&&(e.attr("ignore",!0),e=e.shape,+new Date-this._brushStartTime<200&&Math.abs(e.width)<5||(n=this._getViewExtent(),this._range=xo([vo(e.x,n,i=[0,100],!0),vo(e.x+e.width,n,i,!0)]),this._handleEnds=[e.x,e.x+e.width],this._updateView(),this._dispatchZoomAction(!1)))},qC.prototype._onBrush=function(t){this._brushing&&(ye(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},qC.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect,i=(o||(o=n.brushRect=new WC({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1),this._brushStart),n=this._displayables.sliderGroup,t=n.transformCoordToLocal(t,e),e=n.transformCoordToLocal(i.x,i.y),n=this._size;t[0]=Math.max(Math.min(n[0],t[0]),0),o.setShape({x:e[0],y:0,width:t[0]-e[0],height:n[1]})},qC.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?ZC:null,start:e[0],end:e[1]})},qC.prototype._findCoordRect=function(){var t,e,n=$T(this.dataZoomModel).infoList;return t=(t=!t&&n.length?(n=n[0].model.coordinateSystem).getRect&&n.getRect():t)?t:{x:.2*(n=this.api.getWidth()),y:.2*(e=this.api.getHeight()),width:.6*n,height:.6*e}},qC.type="dataZoom.slider",qC);function qC(){var t=null!==GC&&GC.apply(this,arguments)||this;return t.type=qC.type,t._displayables={},t}function KC(t){return"vertical"===t?"ns-resize":"ew-resize"}function $C(t){t.registerComponentModel(FC),t.registerComponentView(jC),BC(t)}j1(function(t){j1(zC),j1($C)});u(tI,JC=cr),tI.type="dataZoom.select";var JC,QC=tI;function tI(){var t=null!==JC&&JC.apply(this,arguments)||this;return t.type=tI.type,t}u(iI,eI=Hu),iI.type="dataZoom.select";var eI,nI=iI;function iI(){var t=null!==eI&&eI.apply(this,arguments)||this;return t.type=iI.type,t}function oI(t){t.registerComponentModel(QC),t.registerComponentView(nI),BC(t)}function rI(){}var aI={};function sI(t,e){aI[t]=e}function lI(t){return aI[t]}u(cI,uI=g),cI.prototype.optionUpdated=function(){uI.prototype.optionUpdated.apply(this,arguments);var n=this.ecModel;N(this.option.feature,function(t,e){e=lI(e);e&&(e.getDefaultOption&&(e.defaultOption=e.getDefaultOption(n)),p(t,e.defaultOption))})},cI.type="toolbox",cI.layoutMode={type:"box",ignoreSize:!0},cI.defaultOption={show:!0,z:6,zlevel:0,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"}};var uI,hI=cI;function cI(){var t=null!==uI&&uI.apply(this,arguments)||this;return t.type=cI.type,t}u(fI,pI=_g),fI.prototype.render=function(p,d,f,g){var y,m,v,_,t,e,n,i,o,r,x=this.group;function a(t,e){var n,o,r,i,a,s,l,u,t=_[t],e=_[e],h=m[t],c=new fc(h,p,p.ecModel);if(g&&null!=g.newTitle&&g.featureName===t&&(h.title=g.newTitle),t&&!e){if(0===t.indexOf("my"))n={onclick:c.option.onclick,featureName:t};else{var h=lI(t);if(!h)return;n=new h}v[t]=n}else if(!(n=v[e]))return;if(n.uid=mc("toolbox-feature"),n.model=c,n.ecModel=d,n.api=f,n instanceof rI){if(!t&&e)return void(n.dispose&&n.dispose(d,f));if(!c.get("show")||n.unusable)return void(n.remove&&n.remove(d,f))}r=n,h=t,s=(o=c).getModel("iconStyle"),l=o.getModel(["emphasis","iconStyle"]),e=r instanceof rI&&r.getIcons?r.getIcons():o.get("icon"),t=o.get("title")||{},"string"==typeof e?(i={})[h]=e:i=e,"string"==typeof t?(a={})[h]=t:a=t,u=o.iconPaths={},N(i,function(t,e){var n=Hh(t,{},{x:-y/2,y:-y/2,width:y,height:y}),i=(n.setStyle(s.getItemStyle()),n.ensureState("emphasis").style=l.getItemStyle(),new ws({style:{text:a[e],align:l.get("textAlign"),borderRadius:l.get("textBorderRadius"),padding:l.get("textPadding"),fill:null},ignore:!0}));n.setTextContent(i),Wh({el:n,componentModel:p,itemName:e,formatterParamsExtra:{title:a[e]}}),n.__title=a[e],n.on("mouseover",function(){var t=l.getItemStyle(),e="vertical"===p.get("orient")?null==p.get("right")?"right":"left":null==p.get("bottom")?"bottom":"top";i.setStyle({fill:l.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:l.get("textBackgroundColor")}),n.setTextConfig({position:l.get("textPosition")||e}),i.ignore=!p.get("showTitle"),ll(this)}).on("mouseout",function(){"emphasis"!==o.get(["iconStatus",e])&&ul(this),i.hide()}),("emphasis"===o.get(["iconStatus",e])?ll:ul)(n),x.add(n),n.on("click",S(r.onclick,r,d,f,e)),u[e]=n}),c.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?ll:ul)(i[t])},n instanceof rI&&n.render&&n.render(c,d,f,g)}x.removeAll(),p.get("show")&&(y=+p.get("itemSize"),m=p.get("feature")||{},v=this._features||(this._features={}),_=[],N(m,function(t,e){_.push(e)}),new qv(this._featureNames||[],_).add(a).update(a).remove(M(a,null)).execute(),this._featureNames=_,t=x,n=f,i=(e=p).getBoxLayoutParams(),o=e.get("padding"),n={width:n.getWidth(),height:n.getHeight()},r=mp(i,n,o),yp(e.get("orient"),t,e.get("itemGap"),r.width,r.height),vp(t,i,n,o),x.add(IS(x.getBoundingRect(),p)),x.eachChild(function(t){var e,n,i=t.__title,o=t.ensureState("emphasis"),o=o.textConfig||(o.textConfig={}),r=t.getTextContent(),r=r&&r.states.emphasis;r&&!ut(r)&&i&&(r=r.style||(r.style={}),i=oi(i,ws.makeFont(r)),e=t.x+x.x,n=!1,t.y+x.y+y+i.height>f.getHeight()&&(o.position="top",n=!0),t=n?-5-i.height:y+8,e+i.width/2>f.getWidth()?(o.position=["100%",t],r.align="right"):e-i.width/2<0&&(o.position=[0,t],r.align="left"))}))},fI.prototype.updateView=function(t,e,n,i){N(this._features,function(t){t instanceof rI&&t.updateView&&t.updateView(t.model,e,n,i)})},fI.prototype.remove=function(e,n){N(this._features,function(t){t instanceof rI&&t.remove&&t.remove(e,n)}),this.group.removeAll()},fI.prototype.dispose=function(e,n){N(this._features,function(t){t instanceof rI&&t.dispose&&t.dispose(e,n)})},fI.type="toolbox";var pI,dI=fI;function fI(){return null!==pI&&pI.apply(this,arguments)||this}u(mI,gI=rI),mI.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o="svg"===e.getZr().painter.getType(),r=o?"svg":n.get("type",!0)||"png",e=e.getConnectedDataURL({type:r,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!=typeof MouseEvent||!w.browser.newEdge&&(w.browser.ie||w.browser.edge))if(window.navigator.msSaveOrOpenBlob||o){var t=e.split(","),a=-1',o=window.open();o.document.write(h),o.document.title=i}else{a=document.createElement("a"),n=(a.download=i+"."+r,a.target="_blank",a.href=e,new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1}));a.dispatchEvent(n)}},mI.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocale(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocale(["toolbox","saveAsImage","lang"])}};var gI,yI=mI;function mI(){return null!==gI&&gI.apply(this,arguments)||this}yI.prototype.unusable=!w.canvasSupported;var vI,_I="__ec_magicType_stack__",xI=[["line","bar"],["stack"]],bI=(u(SI,vI=rI),SI.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return N(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n},SI.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocale(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},SI.prototype.onclick=function(t,e,a){var n,s,l=this.model,i=l.get(["seriesIndex",a]);wI[a]&&(s={series:[]},N(xI,function(t){0<=A(t,a)&&N(t,function(t){l.setIconStatus(t,"normal")})}),l.setIconStatus(a,"emphasis"),t.eachComponent({mainType:"series",query:null==i?null:{seriesIndex:i}},function(t){var e=t.subType,n=t.id,e=wI[a](e,n,t,l),n=(e&&(V(e,t.option),s.series.push(e)),t.coordinateSystem);if(n&&"cartesian2d"===n.type&&("line"===a||"bar"===a)){e=n.getAxesByScale("ordinal")[0];if(e){var i=e.dim+"Axis",o=t.getReferringComponents(i,tr).models[0].componentIndex;s[i]=s[i]||[];for(var r=0;r<=o;r++)s[i][o]=s[i][o]||{};s[i][o].boundaryGap="bar"===a}}}),"stack"===a&&(n=p({stack:l.option.title.tiled,tiled:l.option.title.stack},l.option.title)),e.dispatchAction({type:"changeMagicType",currentType:a,newOption:s,newTitle:n,featureName:"magicType"}))},SI),wI={line:function(t,e,n,i){if("bar"===t)return p({id:e,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(t,e,n,i){if("line"===t)return p({id:e,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(t,e,n,i){n=n.get("stack")===_I;if("line"===t||"bar"===t)return i.setIconStatus("stack",n?"normal":"emphasis"),p({id:e,stack:n?"":_I},i.get(["option","stack"])||{},!0)}};function SI(){return null!==vI&&vI.apply(this,arguments)||this}zv({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});var MI=new Array(60).join("-"),TI="\t";function CI(t){o={},r=[],a=[],t.eachRawSeries(function(t){var e,n,i=t.coordinateSystem;(i&&("cartesian2d"===i.type||"polar"===i.type)&&"category"===(e=i.getBaseAxis()).type?(n=e.dim+"_"+e.index,o[n]||(o[n]={categoryAxis:e,valueAxis:i.getOtherAxis(e),series:[]},a.push({axisDim:e.dim,axisIndex:e.index})),o[n].series):r).push(t)});var o,r,a,h,t={seriesGroupByCategoryAxis:o,other:r,meta:a};return{value:st([(h=[],N(t.seriesGroupByCategoryAxis,function(t,e){var n=t.categoryAxis,i=t.valueAxis.dim,o=[" "].concat(j(t.series,function(t){return t.name})),r=[n.model.getCategories()];N(t.series,function(t){var e=t.getRawData();r.push(t.getRawData().mapArray(e.mapDimension(i),function(t){return t}))});for(var a=[o.join(TI)],s=0;st.getWidth()||n<0||n>t.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,o=t._covers,r=aA(t,e,n);if(!t._dragging)for(var a=0;aYI}(t)||a?(s&&!a&&("single"===l.brushMode&&lA(t),(r=C(l)).brushType=CA(r.brushType,s),r.panelId=s===FI?null:s.panelId,a=t._creatingCover=tA(t,r),t._covers.push(a)),a&&(r=DA[CA(t._brushType,s)],a.__brushOption.range=r.getCreatingRange(bA(t,a,t._track)),i&&(eA(t,a),r.updateCommon(t,a)),nA(t,a),o={isEnd:i})):i&&"single"===l.brushMode&&l.removeOnClick&&aA(t,e,n)&&lA(t)&&(o={isEnd:i,removeOnClick:!0}),o}function CA(t,e){return"auto"===t?e.defaultBrushType:t}var IA={mousedown:function(t){var e;this._dragging?AA(this,t):t.target&&t.target.draggable||(SA(t),e=this.group.transformCoordToLocal(t.offsetX,t.offsetY),this._creatingCover=null,(this._creatingPanel=aA(this,t,e))&&(this._dragging=!0,this._track=[e.slice()]))},mousemove:function(t){var e=t.offsetX,n=t.offsetY,e=this.group.transformCoordToLocal(e,n);wA(this,t,e),this._dragging&&(SA(t),n=TA(this,t,e,!1))&&uA(this,n)},mouseup:function(t){AA(this,t)}};function AA(t,e){var n,i;t._dragging&&(SA(e),n=e.offsetX,i=e.offsetY,n=t.group.transformCoordToLocal(n,i),i=TA(t,e,n,!0),t._dragging=!1,t._track=[],t._creatingCover=null,i)&&uA(t,i)}var DA={lineX:kA(0),lineY:kA(1),rect:{createCover:function(t,e){function n(t){return t}return cA({toRectRange:n,fromRectRange:n},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){t=hA(t);return yA(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(t,e,n,i){pA(t,e,n,i)},updateCommon:dA,contain:MA},polygon:{createCover:function(t,e){var n=new O;return n.add(new ku({name:"main",style:gA(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Cu({name:"main",draggable:!0,drift:M(_A,t,e),ondragend:M(uA,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n,i){e.childAt(0).setShape({points:bA(t,e,n)})},updateCommon:dA,contain:MA}};function kA(r){return{createCover:function(t,e){return cA({toRectRange:function(t){t=[t,[0,100]];return r&&t.reverse(),t},fromRectRange:function(t){return t[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){t=hA(t);return[HI(t[0][r],t[1][r]),GI(t[0][r],t[1][r])]},updateCoverShape:function(t,e,n,i){var o=sA(t,e),o=[n,o!==FI&&o.getLinearBrushOtherExtent?o.getLinearBrushOtherExtent(r):[0,[(n=t._zr).getWidth(),n.getHeight()][1-r]]];r&&o.reverse(),pA(t,e,o,i)},updateCommon:dA,contain:MA}}var LA={axisPointer:1,tooltip:1,brush:1};function PA(t,i,o){var r=OA(t);return function(t,e){return r.contain(e[0],e[1])&&(e=t,t=o,n=(n=i).getComponentByElement(e.topTarget),e=n&&n.coordinateSystem,!(n&&n!==t&&!LA.hasOwnProperty(n.mainType)&&e&&e.model!==t));var n}}function OA(t){return R.create(t)}var RA=["dataToPoint","pointToData"],NA=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],EA=(BA.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(t,e,n){(t.coordRanges||(t.coordRanges=[])).push(e),t.coordRange||(t.coordRange=e,n=WA[t.brushType](0,n,e),t.__rangeOffset={offset:YA[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax})}),t},BA.prototype.matchOutputRanges=function(t,i,o){N(t,function(n){var t=this.findTargetInfo(n,i);t&&!0!==t&&N(t.coordSyses,function(t){var e=WA[n.brushType](1,t,n.range);o(n,e.values,t,i)})},this)},BA.prototype.setInputRanges=function(t,i){N(t,function(t){var e,n=this.findTargetInfo(t,i);t.range=t.range||[],n&&!0!==n&&(t.panelId=n.panelId,n=WA[t.brushType](0,n.coordSys,t.coordRange),e=t.__rangeOffset,t.range=e?YA[t.brushType](n.values,e.offset,function(t,e){t=ZA(t),e=ZA(e),t=[t[0]/e[0],t[1]/e[1]];return isNaN(t[0])&&(t[0]=1),isNaN(t[1])&&(t[1]=1),t}(n.xyMinMax,e.xyMinMax)):n.values)},this)},BA.prototype.makePanelOpts=function(r,a){return j(this._targetInfoList,function(t){var n,i,e,o=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:a?a(t):null,clipPath:(e=OA(e=o),function(t){return Vh(t,e)}),isTargetByCursor:PA(o,r,t.coordSysModel),getLinearBrushOtherExtent:(n=OA(n=o),function(t){var t=null!=i?i:t,e=t?n.width:n.height,t=t?n.x:n.y;return[t,t+(e||0)]})}})},BA.prototype.controlSeries=function(t,e,n){t=this.findTargetInfo(t,n);return!0===t||t&&0<=A(t.coordSyses,e.coordinateSystem)},BA.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=VA(e,t),o=0;ot[1]&&t.reverse(),t}function VA(t,e){return Jo(t,e,{includeMainTypes:NA})}var FA={grid:function(t,i){var o=t.xAxisModels,r=t.yAxisModels,t=t.gridModels,e=L(),a={},s={};(o||r||t)&&(N(o,function(t){t=t.axis.grid.model;e.set(t.id,t),a[t.id]=!0}),N(r,function(t){t=t.axis.grid.model;e.set(t.id,t),s[t.id]=!0}),N(t,function(t){e.set(t.id,t),a[t.id]=!0,s[t.id]=!0}),e.each(function(t){var e=t.coordinateSystem,n=[];N(e.getCartesians(),function(t,e){(0<=A(o,t.getAxis("x").model)||0<=A(r,t.getAxis("y").model))&&n.push(t)}),i.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:n[0],coordSyses:n,getPanelRect:GA.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,n){N(t.geoModels,function(t){var e=t.coordinateSystem;n.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:e,coordSyses:[e],getPanelRect:GA.geo})})}},HA=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,t=t.gridModel;return(t=!(t=!t&&n?n.axis.grid.model:t)&&i?i.axis.grid.model:t)&&t===e.gridModel},function(t,e){t=t.geoModel;return t&&t===e.geoModel}],GA={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Rh(t)),e}},WA={lineX:M(UA,0),lineY:M(UA,1),rect:function(t,e,n){var i=e[RA[t]]([n[0][0],n[1][0]]),e=e[RA[t]]([n[0][1],n[1][1]]),t=[zA([i[0],e[0]]),zA([i[1],e[1]])];return{values:t,xyMinMax:t}},polygon:function(e,n,t){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:j(t,function(t){t=n[RA[e]](t);return i[0][0]=Math.min(i[0][0],t[0]),i[1][0]=Math.min(i[1][0],t[1]),i[0][1]=Math.max(i[0][1],t[0]),i[1][1]=Math.max(i[1][1],t[1]),t}),xyMinMax:i}}};function UA(t,e,n,i){var o=n.getAxis(["x","y"][t]),n=zA(j([0,1],function(t){return e?o.coordToData(o.toLocalCoord(i[t])):o.toGlobalCoord(o.dataToCoord(i[t]))})),r=[];return r[t]=n,r[1-t]=[NaN,NaN],{values:n,xyMinMax:r}}var YA={lineX:M(XA,0),lineY:M(XA,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,n,i){return j(t,function(t,e){return[t[0]-i[0]*n[e][0],t[1]-i[1]*n[e][1]]})}};function XA(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function ZA(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var jA,qA=N,KA=Bo+"toolbox-dataZoom_",$A=(u(QA,jA=rI),QA.prototype.render=function(t,e,n,i){var o,r,a,s;this._brushController||(this._brushController=new JI(n.getZr()),this._brushController.on("brush",S(this._onBrush,this)).mount()),o=t,r=e,i=i,n=n,s=(a=this)._isZoomActive,i&&"takeGlobalCursor"===i.type&&(s="dataZoomSelect"===i.key&&i.dataZoomSelectActive),a._isZoomActive=s,o.setIconStatus("zoom",s?"emphasis":"normal"),i=new EA(tD(o),r,{include:["grid"]}).makePanelOpts(n,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}),a._brushController.setPanels(i).enableBrush(!(!s||!i.length)&&{brushType:"auto",brushStyle:o.getModel("brushStyle").getItemStyle()}),t.setIconStatus("back",1":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},gD=(CD.prototype.evaluate=function(t){var e=typeof t;return"string"==e?this._condVal.test(t):"number"==e&&this._condVal.test(t+"")},CD),yD=(TD.prototype.evaluate=function(){return this.value},TD),mD=(MD.prototype.evaluate=function(){for(var t=this.children,e=0;e=v&&_<=e+1){for(var n=[],i=0;i=v&&_<=o+1){var s=e.components;for(var l=0,u=s.length,h=0,c=0;l\n\r<"))},mo("svg",Ak),t.Axis=$y,t.ChartView=Mg,t.ComponentModel=g,t.ComponentView=_g,t.List=S_,t.Model=fc,t.PRIORITY=Ky,t.SeriesModel=hg,t.color=Tn,t.connect=function(e){var t;return F(e)&&(t=e,e=null,I0(t,function(t){null!=t.group&&(e=t.group)}),e=e||"g_"+Dv++,I0(t,function(t){t.group=e})),Iv[e]=!0,e},t.dataTool={},t.dependencies={zrender:"5.1.0"},t.disConnect=Lv,t.disconnect=qy,t.dispose=function(t){"string"==typeof t?t=Cv[t]:t instanceof cv||(t=Pv(t)),t instanceof cv&&!t.isDisposed()&&t.dispose()},t.env=w,t.extendChartView=function(t){return t=Mg.extend(t),Mg.registerClass(t),t},t.extendComponentModel=function(t){return t=g.extend(t),g.registerClass(t),t},t.extendComponentView=function(t){return t=_g.extend(t),_g.registerClass(t),t},t.extendSeriesModel=function(t){return t=hg.extend(t),hg.registerClass(t),t},t.format=n,t.getCoordinateSystemDimensions=function(t){if(t=ld.get(t))return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()},t.getInstanceByDom=Pv,t.getInstanceById=function(t){return Cv[t]},t.getMap=function(t){return T0(t)},t.graphic=sy,t.helper=Lc,t.init=function(t,e,n){var i,o=Pv(t);return o||((i=new cv(t,e,n)).id="ec_"+Av++,Cv[i.id]=i,ir(t,kv,i.id),iv(i),I0(bv,function(t){t(i)}),i)},t.innerDrawElementOnCanvas=Sm,t.matrix=Fe,t.number=Ku,t.parseGeoJSON=d0,t.parseGeoJson=d0,t.registerAction=zv,t.registerCoordinateSystem=Vv,t.registerLayout=Fv,t.registerLoading=Uv,t.registerLocale=Tc,t.registerMap=Yv,t.registerPostInit=Ev,t.registerPostUpdate=Bv,t.registerPreprocessor=Rv,t.registerProcessor=Nv,t.registerTheme=Ov,t.registerTransform=Xv,t.registerVisual=Hv,t.setCanvasCreator=function(t){$("createCanvas",t)},t.throttle=Rg,t.time=mr,t.use=j1,t.util=ay,t.vector=Kt,t.version="5.1.1",t.zrUtil=Pt,t.zrender=pi});