!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 v=function(t,e){return(v=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}v(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function _(){for(var t=0,e=0,n=arguments.length;e>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",o[u]+":0",i[1-l]+":auto",o[1-u]+":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||!b.canvasSupported?pe(t,e,n):b.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(b.domSupported&&t.getBoundingClientRect){var i,o=e.clientX,e=e.clientY;if(se(t))return i=t.getBoundingClientRect(),n.zrX=o-i.left,void(n.zrY=e-i.top);if(ae(he,t,o,e))return n.zrX=he[0],void(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),i=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,t=t.deltaY;return null!=n&&null!=t?3*(0!==t?Math.abs(t):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 Ee(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 ze(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 Ne(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 Fe(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}I(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){ke.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(it(e)){var o,r=it((r=e)&&r[0])?2:1;if(0e);u++);u=Math.min(u-1,r-2)}var h,c,p,d,f,g,y,m=o[u+1],v=o[u];v&&m&&(this._lastFrame=u,this._lastFramePercent=e,0!=(h=m.percent-v.percent))&&(h=(e-v.percent)/h,c=n?this._additiveValue:l?En:t[a],(0=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},jn.prototype.clone=function(){return new jn(this.x,this.y,this.width,this.height)},jn.prototype.copy=function(t){jn.copy(this,t)},jn.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},jn.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},jn.prototype.isZero=function(){return 0===this.width||0===this.height},jn.create=function(t){return new jn(t.x,t.y,t.width,t.height)},jn.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},jn.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 Li(D,L){var P,O,R=Ci,E=0,z=(D.length,[]);function e(t){var e=P[t],n=O[t],i=P[t+1],o=O[t+1],t=(O[t]=n+o,t===E-3&&(P[t+1]=P[t+2],O[t+1]=O[t+2]),E--,Di(D[i],D,e,n,0,L));if(e+=t,0!=(n-=t)&&0!==(o=ki(D[e+n-1],D,i,o,o-1,L)))if(n<=o){var r=e,a=n,t=i,s=o,l=0;for(l=0;lO[t+1])break;e(t)}},forceMergeRuns:function(){for(;1>=1;return t+e}(o);do{}while((r=Ai(t,n,i,e))this._sleepAfterStill)&&this.animation.stop()},n.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},n.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},n.prototype.addHover=function(t){},n.prototype.removeHover=function(t){},n.prototype.clearHover=function(){},n.prototype.refreshHover=function(){this._needsRefreshHover=!0},n.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},n.prototype.resize=function(t){this.painter.resize((t=t||{}).width,t.height),this.handler.resize()},n.prototype.clearAnimation=function(){this.animation.clear()},n.prototype.getWidth=function(){return this.painter.getWidth()},n.prototype.getHeight=function(){return this.painter.getHeight()},n.prototype.pathToImage=function(t,e){if(this.painter.pathToImage)return this.painter.pathToImage(t,e)},n.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},n.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},n.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},n.prototype.off=function(t,e){this.handler.off(t,e)},n.prototype.trigger=function(t,e){this.handler.trigger(t,e)},n.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 z(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 wo(t){var t=t.toString(),e=t.indexOf("e");return 0=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=Lr(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||Ia(e-this._yi)>this._uy||this._len<5;return this.addData(ya.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},r.prototype.bezierCurveTo=function(t,e,n,i,o,r){return this.addData(ya.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},r.prototype.quadraticCurveTo=function(t,e,n,i){return this.addData(ya.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},r.prototype.arc=function(t,e,n,i,o,r){return Pa[0]=i,Pa[1]=o,Ra(Pa,r),this.addData(ya.A,t,e,n,n,i=Pa[0],(o=Pa[1])-i,0,r?0:1),this._ctx&&this._ctx.arc(t,e,n,i,o,r),this._xi=Ta(o)*n+t,this._yi=Ca(o)*n+e,this},r.prototype.arcTo=function(t,e,n,i,o){return this._ctx&&this._ctx.arcTo(t,e,n,i,o),this},r.prototype.rect=function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(ya.R,t,e,n,i),this},r.prototype.closePath=function(){this.addData(ya.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},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.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;hn||Ia(y)>i||c===e-1)&&(f=Math.sqrt(A*A+y*y),o=g,r=_);break;case ya.C:var m=t[c++],v=t[c++],g=t[c++],_=t[c++],x=t[c++],w=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=jr(t,n,o,a,f),f=jr(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,w,10),o=x,r=w;break;case ya.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=ta(t,n,o,p),p=ta(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 ya.A:var x=t[c++],w=t[c++],b=t[c++],S=t[c++],M=t[c++],T=t[c++],C=T+M;c+=1,t[c++],d&&(a=Ta(M)*b+x,s=Ca(M)*S+w),f=Ma(b,S)*Sa(Da,Math.abs(T)),o=Ta(C)*b+x,r=Ca(C)*S+w;break;case ya.R:a=o=t[c++],s=r=t[c++];f=2*t[c++]+2*t[c++];break;case ya.Z:var A=a-o,y=s-r;f=Math.sqrt(A*A+y*y),o=a,r=s}0<=f&&(u+=l[h++]=f)}return this._pathLen=u},r.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||Ia(E-i)>l||d===u-1){if(h){if(r=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+w,b,T,o);u=Math.cos(x+w)*v+y,h=Math.sin(x+w)*_+m;break;case Ha.R:c=u=a[d++],p=h=a[d++];if(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+=Va(S,p,S,M,i,o))+Va(c,M,c,p,i,o);break;case Ha.Z:if(n){if(za(u,h,c,p,e,i,o))return!0}else l+=Va(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,np={"&":"&","<":"<",">":">",'"':""","'":"'"};function ip(t){return null==t?"":(t+"").replace(ep,function(t,e){return np[e]})}function op(t,e,n){function i(t){return t&&St(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?Co(t):t;if(!isNaN(+r))return zc(r,"{yyyy}-{MM}-{dd} {hh}:{mm}:{ss}",n);if(a)return"-"}return"ordinal"===e?ut(t)?i(t):ht(t)&&o(t)?t+"":"-":o(r=Do(t))?Jc(r):ut(t)?i(t):"-"}function rp(t,e){return"{"+t+(null==e?"":e)+"}"}var ap=["a","b","c","d","e","f","g"];function sp(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 up(t,e){return e=e||"transparent",C(t)?t:k(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function hp(t,e){var n;"_blank"===e||"blank"===e?((n=window.open()).opener=null,n.location.href=t):window.open(t,e)}var cp=I,pp=["left","right","top","bottom","width","height"],dp=[["width","left","right"],["height","top","bottom"]];function fp(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?(i=r.width+(e?-e.x+r.x:0),u<(n=c+i)||t.newline?(c=0,n=i,p+=d+l,r.height):Math.max(d,r.height)):(i=r.height+(e?-e.y+r.y:0),h<(o=p+i)||t.newline?(c+=d+l,p=0,o=i,r.width):Math.max(d,r.width)),t.newline||(t.x=c,t.y=p,t.markRedraw(),"horizontal"===a?c=n+l:p=o+l)})}var gp=fp;function yp(t,e,n){n=tp(n||0);var i=e.width,o=e.height,r=z(t.left,i),a=z(t.top,o),e=z(t.right,i),s=z(t.bottom,o),l=z(t.width,i),u=z(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]}var Kp,$p="\0_ec_inner",Jp=(u(s,Kp=dc),s.prototype.init=function(t,e,n,i,o,r){i=i||{},this.option=null,this._theme=new dc(i),this._locale=new dc(o),this._optionManager=r},s.prototype.setOption=function(t,e,n){e=ed(e);this._optionManager.setOption(t,n,e),this._resetOption(null,e)},s.prototype.resetOption=function(t,e){return this._resetOption(t,ed(e))},s.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)):Yp(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&&I(n,function(t){i=!0,this._mergeOption(t,e)},this),i},s.prototype.mergeOption=function(t){this._mergeOption(t,null)},s.prototype._mergeOption=function(i,t){var o=this.option,u=this._componentsMap,h=this._componentsCount,n=[],r=D(),c=t&&t.replaceMergeMainTypeMap;Np(this).datasetMap=D(),I(i,function(t,e){null!=t&&(g.hasClass(e)?e&&(n.push(e),r.set(e,!0)):o[e]=null==o[e]?M(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){var t=function(t,e,n){return(e=(e=Wp.get(e))&&e(t))?n.concat(e):n}(this,r,zo(i[r])),e=u.get(r),n=e?c&&c.get(r)?"replaceMerge":"normalMerge":"replaceAll",e=Vo(e,t,n),a=(Uo(e,r,g),o[r]=null,u.set(r,null),h.set(r,0),[]),s=[],l=0;I(e,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=T({componentIndex:e},t.keyInfo),T(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&&Gp(this)},this),this._seriesIndices||Gp(this)},s.prototype.getOption=function(){var a=M(this.option);return I(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]&&!Yo(n[r])?o=!0:(n[r]=null,o||i--);n.length=i,a[e]=n}}),delete a[$p],a},s.prototype.getTheme=function(){return this._theme},s.prototype.getLocaleModel=function(){return this._locale},s.prototype.getLocale=function(t){return this.getLocaleModel().get(t)},s.prototype.setUpdatePayload=function(t){this._payload=t},s.prototype.getUpdatePayload=function(){return this._payload},s.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;i0?u.html:0,o);n!=null&&r.push(n)}),r.length)return"richText"===i.renderMode?r.join(u.richText):Jf(r.join(""),e)}(t,e,o?n:r.html,i);return o?a:(o=op(e.header,"ordinal",t.useUTC),e=Xf(i,t.renderMode).nameStyle,"richText"===t.renderMode?Qf(t,o,e)+r.richText+a:Jf('
'+ip(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?"":op(p,"ordinal",f),r=e.valueType,e=h?[]:F(d)?j(d,function(t,e){return op(t,F(r)?r[e]:r,f)}):[op(d,F(r)?r[0]:r,f)],d=!c||!u,a=!c&&u,i=Xf(i,l),s=i.nameStyle,i=i.valueStyle,"richText"===l?(c?"":o)+(u?"":Qf(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)):Jf((c?"":o)+(u?"":''+ip(p)+"")+(h?"":function(t,e,n,i){n=n?"10px":"20px";return''+j(t,ip).join("  ")+""}(e,d,a,i)),n)}}};function Kf(t,e,n,i,o,r){var a;if(t)return(a=jf(t)).planLayout(t),a.build({useUTC:o,renderMode:n,orderMode:i,markupStyleCreator:e},t,0,r)}function $f(t){t=t.__gapLevelBetweenSubBlocks;return{html:Yf[t],richText:Uf[t]}}function Jf(t,e){return'
'+t+'
'}function Qf(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function tg(t,e){t=t.get("padding");return null!=t?t:"richText"===e?[8,10]:10}ng.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},ng.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,e=lp({color:e,type:t,renderMode:n,markerId:i});return C(e)?e:(this.richTextStyles[i]=e.style,e.content)},ng.prototype.wrapRichTextStyle=function(t,e){var n={},e=(F(e)?I(e,function(t){return T(n,t)}):T(n,e),this._generateStyleName());return this.richTextStyles[e]=n,"{"+e+"|"+t+"}"};var eg=ng;function ng(){this.richTextStyles={},this._nextStyleNameId=Po()}function ig(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,up((w=p).getData().getItemVisual(_,"style")[w.visualDrawType]));function x(t,e){e=s.getDimensionInfo(e);e&&!1!==e.otherDims.tooltip&&(l?c.push(Zf("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)},l.prototype.restoreData=function(){this.dataTask.dirty()},l.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel;return Zp.prototype.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},l.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},l.prototype.getProgressive=function(){return this.get("progressive")},l.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},l.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},l.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 pg(e,n){I(_(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(t){e.wrapMethod(t,st(dg,n))})}function dg(t,e){t=fg(t);return t&&t.setOutputEnd((e||this).count()),e}function fg(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}nt(sg,hc),nt(sg,Zp),lr(sg,g);yg.prototype.init=function(t,e){},yg.prototype.render=function(t,e,n,i){},yg.prototype.dispose=function(t,e){},yg.prototype.updateView=function(t,e,n,i){},yg.prototype.updateLayout=function(t,e,n,i){},yg.prototype.updateVisual=function(t,e,n,i){},yg.prototype.blurSeries=function(t,e){};var gg=yg;function yg(){this.group=new uo,this.uid=yc("viewComponent")}function mg(){var r=jo();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"}}sr(gg),pr(gg);var vg=jo(),_g=mg(),xg=(wg.prototype.init=function(t,e){},wg.prototype.render=function(t,e,n,i){},wg.prototype.highlight=function(t,e,n,i){Sg(t.getData(),i,"emphasis")},wg.prototype.downplay=function(t,e,n,i){Sg(t.getData(),i,"normal")},wg.prototype.remove=function(t,e){this.group.removeAll()},wg.prototype.dispose=function(t,e){},wg.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},wg.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},wg.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},wg.markUpdateMethod=function(t,e){vg(t).updateMethod=e},wg.protoInitialize=void(wg.prototype.type="chart"),wg);function wg(){this.group=new uo,this.uid=yc("viewChart"),this.renderTask=sf({plan:Mg,reset:Tg}),this.renderTask.context={view:this}}function bg(t,e,n){t&&("emphasis"===e?al:sl)(t,n)}function Sg(e,t,n){var i,o=Zo(e,t),r=t&&null!=t.highlightKey?(t=t.highlightKey,i=null==(i=Ds[t])&&ks<=32?Ds[t]=ks++:i):null;null!=o?I(zo(o),function(t){bg(e.getItemGraphicEl(t),n,r)}):e.eachItemGraphicEl(function(t){bg(t,n,r)})}function Mg(t){return _g(t.model)}function Tg(t){var e=t.model,n=t.ecModel,i=t.api,o=t.payload,r=e.pipelineContext.progressiveRender,t=t.view,a=o&&vg(o).updateMethod,r=r?"incrementalPrepareRender":a&&t[a]?a:"render";return"render"!==r&&t[r](e,n,i,o),Cg[r]}sr(xg),pr(xg);var Cg={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)}}},Ag="\0__throttleOriginMethod",Ig="\0__throttleRate",kg="\0__throttleType";function Dg(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}},Vg.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},Vg.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}},Vg.prototype.restorePipelines=function(t){var i=this,o=i._pipelineMap=D();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)})},Vg.prototype.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.api.getModel(),o=this.api;I(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,{});bt(!(t.reset&&t.overallReset),""),t.reset&&this._createSeriesStageTask(t,e,i,o),t.overallReset&&this._createOverallStageTask(t,e,i,o)},this)},Vg.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)},Vg.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},Vg.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},Vg.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))}I(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},Vg.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},Vg.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())})},Vg.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},Vg.prototype._createSeriesStageTask=function(n,t,i,o){var r=this,a=t.seriesTaskMap,s=t.seriesTaskMap=D(),t=n.seriesType,e=n.getTargetSeries;function l(t){var e=t.uid,e=s.set(e,a&&a.get(e)||sf({plan:Yg,reset:Ug,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)},Vg.prototype._createOverallStageTask=function(t,e,n,i){var o=this,r=e.overallTask=e.overallTask||sf({reset:Hg}),a=(r.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:o},r.agentStubMap),s=r.agentStubMap=D(),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,sf({reset:Wg,onDirty:Xg})));e.context={model:t,overallProgress:u},e.agent=r,e.__block=u,o._pipe(t,e)}bt(!t.createOnAllSeries,""),e?n.eachRawSeriesByType(e,c):l?l(n,i).each(c):(u=!1,I(n.getSeries(),c)),h&&r.dirty()},Vg.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},Vg.wrapStageHandler=function(t,e){return(t=lt(t)?{overallReset:t,seriesType:function(t){Kg=null;try{t($g,Jg)}catch(t){}return Kg}(t)}:t).uid=yc("stageHandler"),e&&(t.visualType=e),t};var Fg=Vg;function Vg(t,e,n,i){this._stageTaskMap=D(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}function Hg(t){t.overallReset(t.ecModel,t.api,t.payload)}function Wg(t){return t.overallProgress&&Gg}function Gg(){this.agent.dirty(),this.getDownstream().dirty()}function Xg(){this.agent&&this.agent.dirty()}function Yg(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Ug(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);i.push([(o=s+=o)/n,(r=l+=r)/n])}return i}function tm(t,o){return j(rt((t=function(t){if(t.UTF8Encoding){for(var e=t.UTF8Scale,n=(null==e&&(e=1024),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 gs({shape:{x:0,y:0,width:t,height:n},style:{fill:i.connectedBackgroundColor}})),fm(p,function(t){t=new as({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)},h.prototype.convertToPixel=function(t,e){return Rm(this,"convertToPixel",t,e)},h.prototype.convertFromPixel=function(t,e){return Rm(this,"convertFromPixel",t,e)},h.prototype.containPixel=function(t,i){var o;if(!this._disposed)return I(Ko(this._model,t),function(t,n){0<=n.indexOf("Models")&&I(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},h.prototype.getVisual=function(t,e){var t=Ko(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){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)}}else{var a=n,s=e;switch(s){case"color":return a.getVisual("style")[a.getVisual("drawType")];case"opacity":return a.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return a.getVisual(s)}}},h.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},h.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},h.prototype._initEvents=function(){var t,n,i,s=this;fm(iv,function(a){function t(t){var n,e,i,o=s.getModel(),r=t.target;"globalout"===a?n={}:r&&Py(r,function(t){var e,t=O(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=T({},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)}),fm(rv,function(t,e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),fm(["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?(Ly("map","selectchanged",n,e,t),Ly("pie","selectchanged",n,e,t)):"select"===t.fromAction?(Ly("map","selected",n,e,t),Ly("pie","selected",n,e,t)):"unselect"===t.fromAction&&(Ly("map","unselected",n,e,t),Ly("pie","unselected",n,e,t))})},h.prototype.isDisposed=function(){return this._disposed},h.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},h.prototype.dispose=function(){var e,n;this._disposed?this.id:(this._disposed=!0,er(this.getDom(),mv,""),e=this._api,n=this._model,fm(this._componentsViews,function(t){t.dispose(n,e)}),fm(this._chartsViews,function(t){t.dispose(n,e)}),this._zr.dispose(),delete dv[this.id])},h.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[_m]=!0,e&&Dm(this),Om.update.call(this,{type:"resize",animation:T({duration:0},t&&t.animation)}),this[_m]=!1,Bm.call(this,n),Nm.call(this,n)))},h.prototype.showLoading=function(t,e){this._disposed?this.id:(ym(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),pv[t]&&(t=pv[t](this._api,e),e=this._zr,this._loadingFX=t,e.add(t)))},h.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},h.prototype.makeActionFromEvent=function(t){var e=T({},t);return e.type=rv[t.type],e},h.prototype.dispatchAction=function(t,e){var n;this._disposed?this.id:(ym(e)||(e={silent:!!e}),ov[t.type]&&this._model&&(this[_m]?this._pendingActions.push(t):(n=e.silent,zm.call(this,t,n),(t=e.flush)?this._zr.flush():!1!==t&&b.browser.weChat&&this._throttledZrFlush(),Bm.call(this,n),Nm.call(this,n))))},h.prototype.updateLabelLayout=function(){var t=this._labelManager;t.updateLayoutConfig(this._api),t.layout(this._api),t.processLabelsOverall()},h.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())},h.internalField=(Dm=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),Lm(t,!0),Lm(t,!1),e.plan()},Lm=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")&&!b.node&&!b.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)})})},Ym=function(e,n){fm(uv,function(t){t(e,n)})},qm=function(t){t[wm]=!0,t.getZr().wakeUp()},Km=function(t){t[wm]&&(t.getZr().storage.traverse(function(t){Dh(t)||Qm(t)}),t[wm]=!1)},Um=function(n){return u(t,e=nd),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){al(t,e),qm(n)},t.prototype.leaveEmphasis=function(t,e){sl(t,e),qm(n)},t.prototype.enterBlur=function(t){Qs(t,js),qm(n)},t.prototype.leaveBlur=function(t){ll(t),qm(n)},t.prototype.enterSelect=function(t){ul(t),qm(n)},t.prototype.leaveSelect=function(t){hl(t),qm(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},Zm=function(i){function o(t,e){for(var n=0;nm[1]&&(m[1]=y)}e&&(this._nameList[d]=e[f],this._dontMakeIdFromName||jv(this,d))}this._rawCount=this._count=s,this._extent={},Hv(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===kp,p=0;px[1]&&(x[1]=w)}c&&!i.pure&&y&&(v=y.name,null==l[m]&&null!=v&&(l[m]=Go(v,null)),v=y.id,null==u[m])&&null!=v&&(u[m]=Go(v,null)),this._dontMakeIdFromName||jv(this,m)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent={},Hv(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();lt[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=Kv(this,[t]),r=o._storage,a=[],s=e_(1/e),l=r[t],u=this.count(),h=o._rawExtent[t],c=new(Wv(this))(u),p=0,d=0;dh[1]&&(h[1]=y),c[p++]=m}return o._count=p,o._indices=c,o.getRawIndex=Yv,o},c.prototype.lttbDownSample=function(t,e){var n,i=Kv(this,[]),o=i._storage[t],r=this.count(),a=new(Wv(this))(r),s=0,l=e_(1/e),u=this.getRawIndex(0);a[s++]=u;for(var h=1;he[1]&&(e[1]=t[1])},S_.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},S_.prototype.getExtent=function(){return this._extent.slice()},S_.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},S_.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},S_.prototype.isBlank=function(){return this._isBlank},S_.prototype.setBlank=function(t){this._isBlank=t};var b_=S_;function S_(t){this._setting=t||{},this._extent=[1/0,-1/0]}pr(b_);T_.createByAxisModel=function(t){var t=t.option,e=t.data,e=e&&j(e,C_);return new T_({categories:e,needCollect:!e,deduplication:!1!==t.dedplication})},T_.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},T_.prototype.parseAndCollect=function(t){var e,n,i=this._needCollect;return"string"==typeof t||i?(i&&!this._deduplication?(n=this.categories.length,this.categories[n]=t):null==(n=(e=this._getOrCreateMap()).get(t))&&(i?(n=this.categories.length,this.categories[n]=t,e.set(t,n)):n=NaN),n):t},T_.prototype._getOrCreateMap=function(){return this._map||(this._map=D(this.categories))};var M_=T_;function T_(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication}function C_(t){return k(t)&&null!=t.value?t.value:t+""}var A_=_o;function I_(t,e,n,i){var o={},r=t[1]-t[0],r=o.interval=ko(r/e,!0),e=(null!=n&&ri[1]&&(i[0]=i[1]),o}function k_(t){return wo(t)+2}function D_(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function L_(t,e){return t>=e[0]&&t<=e[1]}function P_(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function O_(t,e){return t*(e[1]-e[0])+e[0]}u(z_,R_=b_),z_.prototype.parse=function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},z_.prototype.contain=function(t){return L_(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},z_.prototype.normalize=function(t){return P_(t=this._getTickNumber(this.parse(t)),this._extent)},z_.prototype.scale=function(t){return t=Math.round(O_(t,this._extent)),this.getRawOrdinalNumber(t)},z_.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},z_.prototype.getMinorTicks=function(t){},z_.prototype.setSortInfo=function(t){if(null==t)this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;else{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},z_.prototype.getOrdinalMeta=function(){return this._ordinalMeta},z_.prototype.niceTicks=function(){},z_.prototype.niceExtent=function(){},z_.type="ordinal";var R_,E_=z_;function z_(t){var t=R_.call(this,t)||this,e=(t.type="ordinal",t.getSetting("ordinalMeta"));return F(e=e||new M_({}))&&(e=new M_({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}b_.registerClass(E_);var B_,N_=_o,F_=(u(V_,B_=b_),V_.prototype.parse=function(t){return t},V_.prototype.contain=function(t){return L_(t,this._extent)},V_.prototype.normalize=function(t){return P_(t,this._extent)},V_.prototype.scale=function(t){return O_(t,this._extent)},V_.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},V_.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},V_.prototype.getInterval=function(){return this._interval},V_.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=k_(t)},V_.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:N_(s+e,o)}:{value:n[1]})}return r},V_.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),o=1;oi[0]&&h=M[0]&&d<=M[1]&&a++)}u=(M[1]-M[0])/b;if(1.5*u=M[0]&&t.value<=M[1]&&!t.notAdd})}),function(t){return 0n&&(this._approxInterval=n),n1.length),t=Math.min(function(t,e,n,i){for(;n>>1;t[o][1]u&&(u=l[c],h=c);++a[h],l[h]=0,++s}return a[e]/o},getPixelPrecision:bo,getPrecision:function(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},getPrecisionSafe:wo,isNumeric:Lo,isRadianAroundZero:Mo,linearMap:vo,nice:ko,numericToNumber:Do,parseDate:Co,quantile:function(t,e){var e=(t.length-1)*e+1,n=Math.floor(e),i=+t[n-1];return(e=e-n)?i+e*(t[n]-i):i},quantity:Ao,quantityExponent:Io,reformIntervals:function(t){t.sort(function(t,e){return function t(e,n,i){return e.interval[i]l[1],h(n[0].coord,l[0])&&(t?n[0].coord=l[0]:n.shift()),t&&h(l[0],n[0].coord)&&n.unshift({coord:l[0]}),h(l[1],i.coord)&&(t?i.coord=l[1]:n.pop()),t)&&h(i.coord,l[1])&&n.push({coord:l[1]}),u},U1.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 r,a=this.__startIndex;ao[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 Q("Layer of zlevel "+t+" is not valid")},y.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={},I(a.getViewLabels(),function(t){t=a.scale.getRawOrdinalNumber(t.tickValue);r[t]=1}),function(t){return!r.hasOwnProperty(e.get(o,t))}}}function Iw(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";I(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 Ku(0,0,0,0,e,!0);return l[r]=h,l[r+"2"]=c,l}}}(l,a)||l.getVisual("style")[l.getVisual("drawType")]),d=(g&&d.type===a.type&&T===this._step?(_&&!y?y=this._newPolygon(c,w):y&&!_&&(m.remove(y),y=this._polygon=null),p||this._initOrUpdateEndLabel(t,a,up(C)),m.setClipPath(Dw(this,a,!1,t)),b&&f.updateData(l,{isIgnore:S,clipShape:o,disableAnimation:!0,getSymbolPoint:function(t){return[c[2*t],c[2*t+1]]}}),bw(this._stackedOnPoints,w)&&bw(this._points,c)||(v?this._doUpdateAnimation(l,w,a,n,T,x):(T&&(c=Cw(c,a,T),w=w&&Cw(w,a,T)),g.setShape({points:c}),y&&y.setShape({points:c,stackedOnPoints:w})))):(b&&f.updateData(l,{isIgnore:S,clipShape:o,disableAnimation:!0,getSymbolPoint:function(t){return[c[2*t],c[2*t+1]]}}),v&&this._initSymbolLabelAnimation(l,a,o),T&&(c=Cw(c,a,T),w=w&&Cw(w,a,T)),g=this._newPolyline(c),_&&(y=this._newPolygon(c,w)),p||this._initOrUpdateEndLabel(t,a,up(C)),m.setClipPath(Dw(this,a,!0,t))),t.get(["emphasis","focus"])),n=t.get(["emphasis","blurScope"]),b=(g.useStyle(N(u.getLineStyle(),{fill:"none",stroke:C,lineJoin:"bevel"})),xl(g,t,"lineStyle"),0=t&&(0===e?0:i[e-1][0])e[1]&&e.reverse(),e},hb.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},hb.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)};var lb,ub=hb;function hb(t,e,n,i,o){t=lb.call(this,t,e,n)||this;return t.index=0,t.type=i||"value",t.position=o||"bottom",t}function cb(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),vt(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 pb(t){return"cartesian2d"===t.get("coordinateSystem")}function db(i){var o={xAxisModel:null,yAxisModel:null};return I(o,function(t,e){var n=e.replace(/Model$/,""),n=i.getReferringComponents(n,Jo).models[0];o[e]=n}),o}gb.prototype.getRect=function(){return this._rect},gb.prototype.update=function(t,e){var n=this._axesMap,i=(this._updateScale(t,this.model),I(n.x,function(t){S1(t.scale,t.model)}),I(n.y,function(t){S1(t.scale,t.model)}),{});I(n.x,function(t){mb(n,"y",t,i)}),I(n.y,function(t){mb(n,"x",t,i)}),this.resize(this.model,e)},gb.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),n=!n&&t.get("containLabel"),a=yp(i,{width:e.getWidth(),height:e.getHeight()}),o=(this._rect=a,this._axesList);function r(){I(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&&(I(o,function(t){var e,n,i;t.model.get(["axisLabel","inside"])||(e=A1(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()),I(this._coordsList,function(t){t.calcAffineTransform()})},gb.prototype.getAxis=function(t,e){t=this._axesMap[t];if(null!=t)return t[e||0]},gb.prototype.getAxes=function(){return this._axesList.slice()},gb.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,r=["start"===c?h[0]-r*u:"end"===c?h[1]+r*u:(h[0]+h[1])/2,Tb(c)?t.labelOffset+l*u:0],null!=(u=e.get("nameRotate"))&&(u=u*_b/180),Tb(c)?a=xb.innerTextLayout(t.rotation,null!=u?u:t.rotation,l):(a=function(t,e,n,i){var o,n=So(n-t),t=i[0]>i[1],i="start"===e&&!t||"start"!==e&&t;e=Mo(n-_b/2)?(o=i?"bottom":"top","center"):Mo(n-1.5*_b)?(o=i?"top":"bottom","center"):(o="middle",n<1.5*_b&&_b/2u[1]&&u.reverse(),(s=null==s||s>u[1]?u[1]:s)=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},fS.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},fS.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[o]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-o]=0==o?n.y+n.height/2:n.x+n.width/2,i},fS.prototype.convertToPixel=function(t,e,n){return gS(e)===this?this.dataToPoint(n):null},fS.prototype.convertFromPixel=function(t,e,n){return gS(e)===this?this.pointToData(n):null};var dS=fS;function fS(t,e,n){this.type="single",this.dimension="single",this.dimensions=["single"],this.axisPointerEnabled=!0,this.model=t,this._init(t,e,n)}function gS(t){var e=t.seriesModel,t=t.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var yS={create:function(i,o){var r=[];return i.eachComponent("singleAxis",function(t,e){var n=new dS(t,i,o);n.name="single_"+e,n.resize(t,o),t.coordinateSystem=n,r.push(n)}),i.eachSeries(function(t){var e;"singleAxis"===t.get("coordinateSystem")&&(e=t.getReferringComponents("singleAxis",Jo).models[0],t.coordinateSystem=e&&e.coordinateSystem)}),r},dimensions:dS.prototype.dimensions},mS=jo(),vS=M,_S=S,Yu=(xS.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=st(wS,e,r),this.updatePointerEl(i,s,r),this.updateLabelEl(i,s,r,e)):(i=this._group=new uo,this.createPointerEl(i,s,t,e),this.createLabelEl(i,s,t,e),n.getZr().add(i)),MS(i,e,!0),this._renderHandle(a)):(i&&i.hide(),o&&o.hide()))},xS.prototype.remove=function(t){this.clear(t)},xS.prototype.dispose=function(t){this.clear(t)},xS.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=kb(t).seriesDataCount,e=o.getExtent(),Math.abs(e[0]-e[1])/r>n)):!0===i)},xS.prototype.makeElOption=function(t,e,n,i,o){},xS.prototype.createPointerEl=function(t,e,n,i){var o=e.pointer;o&&(o=mS(t).pointerEl=new Hh[o.type](vS(e.pointer)),t.add(o))},xS.prototype.createLabelEl=function(t,e,n,i){e.label&&(e=mS(t).labelEl=new xs(vS(e.label)),t.add(e),bS(e,i))},xS.prototype.updatePointerEl=function(t,e,n){t=mS(t).pointerEl;t&&e.pointer&&(t.setStyle(e.pointer.style),n(t,{shape:e.pointer.shape}))},xS.prototype.updateLabelEl=function(t,e,n,i){t=mS(t).labelEl;t&&(t.setStyle(e.label.style),n(t,{x:e.label.x,y:e.label.y}),bS(t,i))},xS.prototype._renderHandle=function(t){var e,n,i,o,r,a;!this._dragging&&this.updateHandleTransform&&(e=this._axisPointerModel,n=this._api.getZr(),i=this._handle,o=e.getModel("handle"),a=e.get("status"),o.get("show")&&a&&"hide"!==a?(this._handle||(r=!0,i=this._handle=Nh(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){ye(t.event)},onmousedown:_S(this._onHandleDragMove,this,0,0),drift:_S(this._onHandleDragMove,this),ondragend:_S(this._onHandleDragEnd,this)}),n.add(i)),MS(i,e,!1),i.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"])),F(a=o.get("size"))||(a=[a,a]),i.scaleX=a[0]/2,i.scaleY=a[1]/2,Lg(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,r)):(i&&n.remove(i),this._handle=null))},xS.prototype._moveHandleToValue=function(t,e){wS(this._axisPointerModel,!e&&this._moveAnimation,this._handle,SS(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},xS.prototype._onHandleDragMove=function(t,e){var n=this._handle;n&&(this._dragging=!0,t=this.updateHandleTransform(SS(n),[t,e],this._axisModel,this._axisPointerModel),this._payloadInfo=t,n.stopAnimation(),n.attr(SS(t)),mS(n).lastProp=null,this._doDispatchAxisPointer())},xS.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}]}))},xS.prototype._onHandleDragEnd=function(){var t;this._dragging=!1,this._handle&&(t=this._axisPointerModel.get("value"),this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"}))},xS.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)},xS.prototype.doClear=function(){},xS.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},xS);function xS(){this._dragging=!1,this.animationThreshold=15}function wS(t,e,n,i){!function n(i,t){{var o;return k(i)&&k(t)?(o=!0,I(t,function(t,e){o=o&&n(i[e],t)}),!!o):i===t}}(mS(n).lastProp,i)&&(mS(n).lastProp=i,e?Th(n,i,t):(n.stopAnimation(),n.attr(i)))}function bS(t,e){t[e.get(["label","show"])?"show":"hide"]()}function SS(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function MS(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 TS(t){var e,n=t.get("type"),t=t.getModel(n+"Style");return"line"===n?(e=t.getLineStyle()).fill=null:"shadow"===n&&((e=t.getAreaStyle()).stroke=null),e}function CS(t,e,n,i,o){var r=AS(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=tp(n.get("padding")||0),s=n.getFont(),l=ni(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:Zh(n,{text:r,font:s,fill:n.getTextColor(),padding:a,backgroundColor:i}),z2:10}}function AS(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:C1(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]},I(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),t=t.dataIndexInside,e=e&&e.getDataParams(t);e&&r.seriesData.push(e)}),C(o)?a=o.replace("{value}",a):lt(o)&&(a=o(r))),a}function IS(t,e,n){var i=Pe();return Be(i,i,n.rotation),ze(i,i,n.position),Ph([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function kS(t,e,n,i,o,r){var a=xb.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=o.get(["label","margin"]),CS(e,i,o,r,{position:IS(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function DS(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function LS(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}u(RS,PS=Yu),RS.prototype.makeElOption=function(t,e,n,i,o){var r,a=n.axis,s=a.grid,l=i.get("type"),u=ES(s,a).getOtherAxis(a).getGlobalExtent(),h=a.toGlobalCoord(a.dataToCoord(e,!0)),a=(l&&"none"!==l&&(r=TS(i),(l=zS[l](a,h,u)).style=r,t.graphicKey=l.type,t.pointer=l),cb(s.model,n));kS(e,t,a,n,i,o)},RS.prototype.getHandleTransform=function(t,e,n){var i=cb(e.axis.grid.model,e,{labelInside:!1}),n=(i.labelMargin=n.get(["handle","margin"]),IS(e.axis,t,i));return{x:n[0],y:n[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},RS.prototype.updateHandleTransform=function(t,e,n,i){var n=n.axis,o=n.grid,r=n.getGlobalExtent(!0),o=ES(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];r[n]=a[n];return{x:a[0],y:a[1],rotation:t.rotation,cursorPoint:r,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][n]}};var PS,OS=RS;function RS(){return null!==PS&&PS.apply(this,arguments)||this}function ES(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var zS={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:DS([e,n[0]],[e,n[1]],BS(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),o=n[1]-n[0];return{type:"Rect",shape:LS([e-i/2,n[0]],[i,o],BS(t))}}};function BS(t){return"x"===t.dim?0:1}u(VS,NS=g),VS.type="axisPointer",VS.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 NS,FS=VS;function VS(){var t=null!==NS&&NS.apply(this,arguments)||this;return t.type=VS.type,t}var HS=jo(),WS=I;function GS(t,e,n){var i,c,p;function o(t,h){c.on(t,function(e){n=p;var n,i,o={dispatchAction:r,pendings:i={showTip:[],hideTip:[]}};function r(t){var e=i[t.type];e?e.push(t):(t.dispatchAction=r,n.dispatchAction(t))}WS(HS(c).records,function(t){t&&h(t,e,o.dispatchAction)});var t,a=o.pendings,s=p,l=a.showTip.length,u=a.hideTip.length;l?t=a.showTip[l-1]:u&&(t=a.hideTip[u-1]),t&&(t.dispatchAction=null,s.dispatchAction(t))})}b.node||(i=e.getZr(),HS(i).records||(HS(i).records={}),p=e,HS(c=i).initialized||(HS(c).initialized=!0,o("click",st(YS,"click")),o("mousemove",st(YS,"mousemove")),o("globalout",XS)),(HS(i).records[t]||(HS(i).records[t]={})).handler=n)}function XS(t,e,n){t.handler("leave",null,n)}function YS(t,e,n,i){e.handler(t,n,i)}function US(t,e){b.node||(e=e.getZr(),(HS(e).records||{})[t]&&(HS(e).records[t]=null))}u(qS,ZS=gg),qS.prototype.render=function(t,e,n){var e=e.getComponent("tooltip"),i=t.get("triggerOn")||e&&e.get("triggerOn")||"mousemove|click";GS("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})})},qS.prototype.remove=function(t,e){US("axisPointer",e)},qS.prototype.dispose=function(t,e){US("axisPointer",e)},qS.type="axisPointer";var ZS,jS=qS;function qS(){var t=null!==ZS&&ZS.apply(this,arguments)||this;return t.type=qS.type,t}function KS(t,e){var n,i,o,r,a=[],s=t.seriesIndex;return null==s||!(e=e.getSeriesByIndex(s))||null==(s=Zo(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 $S=jo();function JS(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),w=e.getComponent("axisPointer").coordSysAxesInfo;if(w)return iM(v)&&(v=KS({seriesIndex:_.seriesIndex,dataIndex:_.dataIndex},e).point),r=iM(v),a=_.axesInfo,i=w.axesInfo,s="leave"===m||iM(v),l={},e={list:[],map:{}},u={showPointer:st(tM,o={}),showTooltip:st(eM,e)},I(w.coordSysMap,function(t,e){var o=r||t.containPoint(v);I(w.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))&&QS(t,i,u,!1,l)})}),h={},I(i,function(n,t){var i=n.linkGroup;i&&!o[t]&&I(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,nM(t),nM(n)))),h[n.key]=e)})}),I(h,function(t,e){QS(i[e],t,u,!0,l)}),c=o,_=i,p=l.axesInfo=[],I(_,function(t,e){var n=t.axisPointerModel.option,e=c[e];e?(t.useHandle||(n.status="show"),n.value=e.value,n.seriesDataIndices=(e.payloadBatch||[]).slice()):t.useHandle||(n.status="hide"),"show"===n.status&&p.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}),m=e,_=t,e=x,iM(t=v)||!m.list.length?e({type:"hideTip"}):(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=i,_=(t=n).getZr(),x="axisPointerLastHighlights",d=$S(_)[x]||{},f=$S(_)[x]={},I(e,function(t,e){t=t.axisPointerModel.option;"show"===t.status&&I(t.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;f[e]=t})}),g=[],y=[],I(d,function(t,e){f[e]||y.push(t)}),I(f,function(t,e){d[e]||g.push(t)}),y.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:y}),g.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:g}),l}function QS(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?(a=e,s=t.axis,l=s.dim,u=a,h=[],c=Number.MAX_VALUE,p=-1,I(t.seriesModels,function(e,t){var n,i=e.getData().mapDimensionsAll(l);if(e.getAxisTooltipData)var o=e.getAxisTooltipData(i,a,s),r=o.dataIndices,o=o.nestestValue;else{if(!(r=e.getData().indicesOfNearest(i[0],a,"category"===s.type?.5:null)).length)return;o=e.getData().get(i[0],r[0])}null!=o&&isFinite(o)&&(i=a-o,(n=Math.abs(i))<=c)&&((n'}(n.get("backgroundColor"),i,o)),C(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)})},qM.prototype._showSeriesItemTooltip=function(t,e,n){var i,o,r,a,s=this._ecModel,e=O(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=KM([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 eg,i.marker=o.makeTooltipMarker("item",up(i.color),d),f=af(h.formatTooltip(c,!1,e)),u=g.get("order"),r=f.markupFragment?Kf(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}))},qM.prototype._showComponentItemTooltip=function(e,n,t){var i=O(n),o=i.tooltipConfig.option,o=[o=C(o)?{content:o,formatter:o}:o],i=this._ecModel.getComponent(i.componentMainType,i.componentIndex),i=(i&&o.push(i),e.positionDefault),r=KM(o,this._tooltipModel,i?{position:i}:null),a=r.get("content"),s=Math.random()+"",l=new eg;this._showOrMove(r,function(){var t=M(r.get("formatterParams")||{});this._showTooltipContent(r,a,t,s,e.offsetX,e.offsetY,e.position,n,l)}),t({type:"showTip",from:this.uid})},qM.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&&C(h)?(p=n.ecModel.get("useUTC"),t=h,t=sp(t=(d=F(i)?i[0]:i)&&d.axisType&&0<=d.axisType.indexOf("time")?zc(d.axisValue,t,p):t,i,!0)):lt(h)&&(d=XM(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))},qM.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}},qM.prototype._updatePosition=function(t,e,n,i,o,r,a){var s,l=this._api.getWidth(),u=this._api.getHeight(),h=(e=e||t.get("position"),o.getSize()),c=t.get("align"),p=t.get("verticalAlign"),d=a&&a.getBoundingRect().clone();a&&d.applyTransform(a.transform),F(e=lt(e)?e([n,i],r,o.el,d,{viewSize:[l,u],contentSize:h.slice()}):e)?(n=UM(e[0],l),i=UM(e[1],u)):k(e)?((r=e).width=h[0],r.height=h[1],n=(r=yp(r,{width:l,height:u})).x,i=r.y,p=c=null):i=(n=(s=C(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,d,h):function(t,e,n,i,o,r,a){var n=n.getOuterSize(),s=n.width,n=n.height;null!=r&&(ir&&(e[1-i]=e[i]+n.sign*r),e}function g2(t,e){t=t[e]-t[1-e];return{span:Math.abs(t),sign:0e[1]&&(e[1]=t[1])})}),[(e=x1((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())},V2.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)&&B2(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}):B2(u,function(t){var e;"empty"===o?n.setData(l=l.map(t,function(t){return(e=t)>=h[0]&&e<=h[1]?t:NaN;var e})):((e={})[t]=h,l.selectRange(e))}),B2(u,function(t){l.setApproximateExtent(h,t)}))})},V2.prototype._updateMinMaxSpan=function(){var i=this._minMaxSpan={},o=this._dataZoomModel,r=this._dataExtent;B2(["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)},V2.prototype._setAxisModel=function(){var t,e=this.getAxisModel(),n=this._percentWindow,i=this._valueWindow;n&&(t=bo(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())},V2);function V2(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}var H2={getTargetSeries:function(r){function t(o){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(t,e){var n=r.getComponent(e2(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 F2(t,e,i,r),o.push(n.__dzAxisProxy))}),D());return I(o,function(t){I(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 W2=!1;function G2(t){W2||(W2=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,H2),t.registerAction("dataZoom",function(e,t){I(n2(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 X2(t){G2(t),t.registerComponentModel(h2),t.registerComponentView(P2),D2(t)}u(Z2,Y2=mu),Z2.type="dataZoom.slider",Z2.layoutMode="box",Z2.defaultOption=mc(mu.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 Y2,U2=Z2;function Z2(){var t=null!==Y2&&Y2.apply(this,arguments)||this;return t.type=Z2.type,t}var j2,q2=gs,K2="horizontal",$2="vertical",J2=["line","bar","candlestick","scatter"],Q2={easing:"cubicOut",duration:100},tT=(u(m,j2=i),m.prototype.init=function(t,e){this.api=e,this._onBrush=S(this._onBrush,this),this._onBrushEnd=S(this._onBrushEnd,this)},m.prototype.render=function(t,e,n,i){j2.prototype.render.apply(this,arguments),Lg(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1===t.get("show")?this.group.removeAll():t.noTarget()?(this._clear(),this.group.removeAll()):(i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView())},m.prototype.dispose=function(){this._clear(),j2.prototype.dispose.apply(this,arguments)},m.prototype._clear=function(){(e=(n=this)[t="_dispatchZoomAction"])&&e[Ag]&&(n[t]=e[Ag]);var t,e,n=this.api.getZr();n.off("mousemove",this._onBrush),n.off("mouseup",this._onBrushEnd)},m.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 uo);this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},m.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===K2?{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=_p(t.option),n=(I(["right","top","width","height"],function(t){"ph"===r[t]&&(r[t]=o[t])}),yp(r,e));this._location={x:n.x,y:n.y},this._size=[n.width,n.height],this._orient===$2&&this._size.reverse()},m.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!==K2||i?n===K2&&i?{scaleY:r?1:-1,scaleX:-1}:n!==$2||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()},m.prototype._getViewExtent=function(){return[0,this._size[0]]},m.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect"),t=(n.add(new q2({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),new q2({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)},m.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=t.series,i=n.getRawData(),n=n.getShadowDim?n.getShadowDim():t.otherDim;if(null!=n)for(var o,r,a,t=.3*((s=i.getDataExtent(n))[1]-s[0]),s=[s[0]-t,s[1]+t],l=[0,e[1]],t=[0,e[0]],u=[[e[0],0],[0,0]],h=[],c=t[1]/(i.count()-1),p=0,d=Math.round(i.count()/e[0]),f=(i.each([n],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))},m.prototype._onBrushStart=function(t){var e=t.offsetX,t=t.offsetY;this._brushStart=new L(e,t),this._brushing=!0,this._brushStartTime=+new Date},m.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)))},m.prototype._onBrush=function(t){this._brushing&&(ye(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},m.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect,i=(o||(o=n.brushRect=new q2({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]})},m.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?Q2:null,start:e[0],end:e[1]})},m.prototype._findCoordRect=function(){var t,e,n=i2(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}},m.type="dataZoom.slider",m);function m(){var t=null!==j2&&j2.apply(this,arguments)||this;return t.type=m.type,t._displayables={},t}function eT(t){return"vertical"===t?"ns-resize":"ew-resize"}function nT(t){t.registerComponentModel(U2),t.registerComponentView(tT),G2(t)}E1(function(t){E1(X2),E1(nT)});u(rT,iT=mu),rT.type="dataZoom.select";var iT,oT=rT;function rT(){var t=null!==iT&&iT.apply(this,arguments)||this;return t.type=rT.type,t}u(lT,aT=i),lT.type="dataZoom.select";var aT,sT=lT;function lT(){var t=null!==aT&&aT.apply(this,arguments)||this;return t.type=lT.type,t}function uT(t){t.registerComponentModel(oT),t.registerComponentView(sT),G2(t)}function hT(){}var cT={};function pT(t,e){cT[t]=e}function dT(t){return cT[t]}u(yT,fT=g),yT.prototype.optionUpdated=function(){fT.prototype.optionUpdated.apply(this,arguments);var n=this.ecModel;I(this.option.feature,function(t,e){e=dT(e);e&&(e.getDefaultOption&&(e.defaultOption=e.getDefaultOption(n)),p(t,e.defaultOption))})},yT.type="toolbox",yT.layoutMode={type:"box",ignoreSize:!0},yT.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 fT,gT=yT;function yT(){var t=null!==fT&&fT.apply(this,arguments)||this;return t.type=yT.type,t}function mT(t,e,n){var i,o,r,a=e.getBoxLayoutParams(),s=e.get("padding"),n={width:n.getWidth(),height:n.getHeight()},l=yp(a,n,s);gp(e.get("orient"),t,e.get("itemGap"),l.width,l.height),e=t,l=a,t=n,a=s,n=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],i=i&&i.boundingMode||"all",(n||s)&&("raw"===i?o="group"===e.type?new Y(0,0,+l.width||0,+l.height||0):e.getBoundingRect():(o=e.getBoundingRect(),e.needLocalTransform()&&(r=e.getLocalTransform(),(o=o.clone()).applyTransform(r))),r=yp(N({width:o.width,height:o.height},l),t,a),l=n?r.x-o.x:0,t=s?r.y-o.y:0,"raw"===i?(e.x=l,e.y=t):(e.x+=l,e.y+=t),e.markRedraw())}u(xT,vT=gg),xT.prototype.render=function(p,d,f,g){var y,m,v,_,t,e,n,i,x=this.group;function o(t,e){var n,t=_[t],e=_[e],i=m[t],o=new dc(i,p,p.ecModel);if(g&&null!=g.newTitle&&g.featureName===t&&(i.title=g.newTitle),t&&!e){if(0===t.indexOf("my"))n={onclick:o.option.onclick,featureName:t};else{i=dT(t);if(!i)return;n=new i}v[t]=n}else if(!(n=v[e]))return;if(n.uid=yc("toolbox-feature"),n.model=o,n.ecModel=d,n.api=f,n instanceof hT){if(!t&&e)return void(n.dispose&&n.dispose(d,f));if(!o.get("show")||n.unusable)return void(n.remove&&n.remove(d,f))}var r,a,s=o,l=n,i=t,u=s.getModel("iconStyle"),h=s.getModel(["emphasis","iconStyle"]),e=l instanceof hT&&l.getIcons?l.getIcons():s.get("icon"),t=s.get("title")||{},c=("string"==typeof e?(r={})[i]=e:r=e,"string"==typeof t?(a={})[i]=t:a=t,s.iconPaths={});I(r,function(t,e){var n=Nh(t,{},{x:-y/2,y:-y/2,width:y,height:y});n.setStyle(u.getItemStyle());n.ensureState("emphasis").style=h.getItemStyle();var i=new xs({style:{text:a[e],align:h.get("textAlign"),borderRadius:h.get("textBorderRadius"),padding:h.get("textPadding"),fill:null},ignore:!0});n.setTextContent(i),Vh({el:n,componentModel:p,itemName:e,formatterParamsExtra:{title:a[e]}}),n.__title=a[e],n.on("mouseover",function(){var t=h.getItemStyle(),e="vertical"===p.get("orient")?null==p.get("right")?"right":"left":null==p.get("bottom")?"bottom":"top";i.setStyle({fill:h.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:h.get("textBackgroundColor")}),n.setTextConfig({position:h.get("textPosition")||e}),i.ignore=!p.get("showTitle"),al(this)}).on("mouseout",function(){"emphasis"!==s.get(["iconStatus",e])&&sl(this),i.hide()}),("emphasis"===s.get(["iconStatus",e])?al:sl)(n),x.add(n),n.on("click",S(l.onclick,l,d,f,e)),c[e]=n}),o.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?al:sl)(i[t])},n instanceof hT&&n.render&&n.render(o,d,f,g)}x.removeAll(),p.get("show")&&(y=+p.get("itemSize"),m=p.get("feature")||{},v=this._features||(this._features={}),_=[],I(m,function(t,e){_.push(e)}),new zv(this._featureNames||[],_).add(o).update(o).remove(st(o,null)).execute(),this._featureNames=_,mT(x,p,f),x.add((t=x.getBoundingRect(),n=tp((e=p).get("padding")),(i=e.getItemStyle(["color","opacity"])).fill=e.get("backgroundColor"),t=new gs({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1}))),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&&!lt(r)&&i&&(r=r.style||(r.style={}),i=ni(i,xs.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"))}))},xT.prototype.updateView=function(t,e,n,i){I(this._features,function(t){t instanceof hT&&t.updateView&&t.updateView(t.model,e,n,i)})},xT.prototype.remove=function(e,n){I(this._features,function(t){t instanceof hT&&t.remove&&t.remove(e,n)}),this.group.removeAll()},xT.prototype.dispose=function(e,n){I(this._features,function(t){t instanceof hT&&t.dispose&&t.dispose(e,n)})},xT.type="toolbox";var vT,_T=xT;function xT(){return null!==vT&&vT.apply(this,arguments)||this}u(ST,wT=hT),ST.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||!b.browser.newEdge&&(b.browser.ie||b.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)}},ST.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 wT,bT=ST;function ST(){return null!==wT&&wT.apply(this,arguments)||this}bT.prototype.unusable=!b.canvasSupported;var MT,TT="__ec_magicType_stack__",CT=[["line","bar"],["stack"]],AT=(u(IT,MT=hT),IT.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return I(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n},IT.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:{}}},IT.prototype.onclick=function(t,e,a){var s,n,l=this.model,i=l.get(["seriesIndex",a]);kT[a]&&(s={series:[]},I(CT,function(t){0<=A(t,a)&&I(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=kT[a](e,n,t,l),n=(e&&(N(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,Jo).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"}))},IT);function IT(){return null!==MT&&MT.apply(this,arguments)||this}var kT={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")===TT;if("line"===t||"bar"===t)return i.setIconStatus("stack",n?"normal":"emphasis"),p({id:e,stack:n?"":TT},i.get(["option","stack"])||{},!0)}},DT=(Tv({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),new Array(60).join("-")),LT="\t";function PT(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:rt([(h=[],I(t.seriesGroupByCategoryAxis,function(t,e){for(var n=t.categoryAxis,i=t.valueAxis.dim,o=[" "].concat(j(t.series,function(t){return t.name})),r=[n.model.getCategories()],a=(I(t.series,function(t){var e=t.getRawData();r.push(t.getRawData().mapArray(e.mapDimension(i),function(t){return t}))}),[o.join(LT)]),s=0;st.getWidth()||n<0||n>t.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,o=t._covers,r=pC(t,e,n);if(!t._dragging)for(var a=0;at[1]&&t.reverse(),t}function YC(t,e){return Ko(t,e,{includeMainTypes:HC})}var UC={grid:function(t,i){var o=t.xAxisModels,r=t.yAxisModels,t=t.gridModels,e=D(),a={},s={};(o||r||t)&&(I(o,function(t){t=t.axis.grid.model;e.set(t.id,t),a[t.id]=!0}),I(r,function(t){t=t.axis.grid.model;e.set(t.id,t),s[t.id]=!0}),I(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=[];I(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:jC.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,n){I(t.geoModels,function(t){var e=t.coordinateSystem;n.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:e,coordSyses:[e],getPanelRect:jC.geo})})}},ZC=[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}],jC={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Lh(t)),e}},qC={lineX:st(KC,0),lineY:st(KC,1),rect:function(t,e,n){var i=e[VC[t]]([n[0][0],n[1][0]]),e=e[VC[t]]([n[0][1],n[1][1]]),t=[XC([i[0],e[0]]),XC([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[VC[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 KC(t,e,n,i){var o=n.getAxis(["x","y"][t]),n=XC(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 $C={lineX:st(JC,0),lineY:st(JC,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 JC(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function QC(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var tA,eA=I,nA=(u(iA,tA=hT),iA.prototype.render=function(t,e,n,i){this._brushController||(this._brushController=new oC(n.getZr()),this._brushController.on("brush",S(this._onBrush,this)).mount());var o=t,r=e,a=this,s=a._isZoomActive;i&&"takeGlobalCursor"===i.type&&(s="dataZoomSelect"===i.key&&i.dataZoomSelectActive),a._isZoomActive=s,o.setIconStatus("zoom",s?"emphasis":"normal"),i=new WC(rA(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"},sA=(lA.prototype.evaluate=function(t){var e=typeof t;return"string"==e?this._condVal.test(t):"number"==e&&this._condVal.test(t+"")},lA);function lA(t){null==(this._condVal=C(t)?new RegExp(t):yt(t)?t:null)&&f("")}hA.prototype.evaluate=function(){return this.value};var uA=hA;function hA(){}pA.prototype.evaluate=function(){for(var t=this.children,e=0;e