!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 d=function(t,e){return(d=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){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}d(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var y=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},w=new function(){this.browser=new y,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(w.wxa=!0,w.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?w.worker=!0:!w.hasGlobalWindow||"Deno"in window||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&-1>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)}e.clearMarkers=function(){nt(n,function(t){t.parentNode&&t.parentNode.removeChild(t)})}}return n}(e,r),r,o);if(e)return e(t,n,i),!0}return!1}function xe(t){return"CANVAS"===t.nodeName.toUpperCase()}var be=/([&<>"'])/g,we={"&":"&","<":"<",">":">",'"':""","'":"'"};function Se(t){return null==t?"":(t+"").replace(be,function(t,e){return we[e]})}var Me=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=[],Ie=w.browser.firefox&&+w.browser.version.split(".")[0]<39;function Ce(t,e,n,i){return n=n||{},i?De(t,e,n):Ie&&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):De(t,e,n),n}function De(t,e,n){if(w.domSupported&&t.getBoundingClientRect){var i,o=e.clientX,e=e.clientY;if(xe(t))return i=t.getBoundingClientRect(),n.zrX=o-i.left,void(n.zrY=e-i.top);if(_e(Te,t,o,e))return n.zrX=Te[0],void(n.zrY=Te[1])}n.zrX=n.zrY=0}function ke(t){return t||window.event}function Ae(t,e,n){var i;return null==(e=ke(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))*(0=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},sn.prototype.contain=function(t,e){return sn.contain(this,t,e)},sn.prototype.clone=function(){return new sn(this.x,this.y,this.width,this.height)},sn.prototype.copy=function(t){sn.copy(this,t)},sn.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},sn.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},sn.prototype.isZero=function(){return 0===this.width||0===this.height},sn.create=function(t){return new sn(t.x,t.y,t.width,t.height)},sn.copy=function(t,e){return t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t},sn.applyTransform=function(t,e,n){var i,o,r,a;n?n[1]<1e-5&&-1e-5t.getWidth()||n<0||n>t.getHeight()}nt(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){bn.prototype[a]=function(t){var e,n,i=t.zrX,o=t.zrY,r=Mn(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>>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 Ln(A,L){var P,O,R=In,N=0,E=[];function e(t){var e=P[t],n=O[t],i=P[t+1],o=O[t+1],t=(O[t]=n+o,t===N-3&&(P[t+1]=P[t+2],O[t+1]=O[t+2]),N--,An(A[i],A,e,n,0,L));if(e+=t,0!=(n-=t)&&0!==(o=kn(A[e+n-1],A,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=Cn(t,n,i,e))=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),ki(t,e),e):void Ti(e,0,0,0,1):7===i||9===i?0<=(o=parseInt(n.slice(1,7),16))&&o<=16777215?(Ti(e,(16711680&o)>>16,(65280&o)>>8,255&o,9===i?parseInt(n.slice(7),16)/255:1),ki(t,e),e):void Ti(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?Ti(e,+a[0],+a[1],+a[2],1):Ti(e,0,0,0,1);s=wi(a.pop());case"rgb":return 3<=a.length?(Ti(e,bi(a[0]),bi(a[1]),bi(a[2]),3===a.length?s:wi(a[3])),ki(t,e),e):void Ti(e,0,0,0,1);case"hsla":return 4!==a.length?void Ti(e,0,0,0,1):(a[3]=wi(a[3]),Li(a,e),ki(t,e),e);case"hsl":return 3!==a.length?void Ti(e,0,0,0,1):(Li(a,e),ki(t,e),e);default:return}}Ti(e,0,0,0,1)}}function Li(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=wi(t[1]),o=wi(t[2]),i=o<=.5?o*(i+1):o+i-o*i,o=2*o-i;return Ti(e=e||[],_i(255*Si(o,i,n+1/3)),_i(255*Si(o,i,n)),_i(255*Si(o,i,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Pi(t,e){var n=Ai(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,255e);g++);g=f(g-1,h-2)}i=u[g+1],n=u[g]}n&&i&&(this._lastFr=g,this._lastFrP=e,p=i.percent-n.percent,o=0==p?1:f((e-n.percent)/p,1),i.easingFunc&&(o=i.easingFunc(o)),f=a?this._additiveValue:d?$i:t[c],(Ki(l)||d)&&(f=f||(this._additiveValue=[])),this.discrete?t[c]=(o<1?n:i).rawValue:Ki(l)?(1===l?Yi:function(t,e,n,i){for(var o=e.length,r=o&&e[0].length,a=0;athis._sleepAfterStill)&&this.animation.stop()},mr.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},mr.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},mr.prototype.refreshHover=function(){this._needsRefreshHover=!0},mr.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},mr.prototype.resize=function(t){this._disposed||(this.painter.resize((t=t||{}).width,t.height),this.handler.resize())},mr.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},mr.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},mr.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},mr.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},mr.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},mr.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},mr.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},mr.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},mr.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;el&&(l=s[h],u=h);++r[u],s[u]=0,++a}return B(r,function(t){return t/i})}function Rr(t){var e=2*Math.PI;return(t%e+e)%e}function Nr(t){return-1e-4=n.maxIterations){e+=n.ellipsis;break}var s=0===a?function(t,e,n){for(var i=0,o=0,r=t.length;oh){C=r.lines.length;0i.width&&(r=e.split("\n"),c=!0),i.accumWidth=s):(s=Ga(e,t,i.width,i.breakAll,i.accumWidth),i.accumWidth=s.accumWidth+n,a=s.linesWidths,r=s.lines)),r=r||e.split("\n"),Go(t)),p=0;pthis._ux||i>this._uy;return this.addData(fs.L,t,e),this._ctx&&o&&this._ctx.lineTo(t,e),o?(this._xi=t,this._yi=e,this._pendingPtDist=0):(o=n*n+i*i)>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o),this},o.prototype.bezierCurveTo=function(t,e,n,i,o,r){return this._drawPendingPt(),this.addData(fs.C,t,e,n,i,o,r),this._ctx&&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._drawPendingPt(),this.addData(fs.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},o.prototype.arc=function(t,e,n,i,o,r){return this._drawPendingPt(),ks[0]=i,ks[1]=o,Ls(ks,r),this.addData(fs.A,t,e,n,n,i=ks[0],(o=ks[1])-i,0,r?0:1),this._ctx&&this._ctx.arc(t,e,n,i,o,r),this._xi=Ss(o)*n+t,this._yi=Ms(o)*n+e,this},o.prototype.arcTo=function(t,e,n,i,o){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,o),this},o.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(fs.R,t,e,n,i),this},o.prototype.closePath=function(){this._drawPendingPt(),this.addData(fs.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&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.len=function(){return this._len},o.prototype.setData=function(t){if(this._saveData){var e=t.length;this.data&&this.data.length===e||!Ds||(this.data=new Float32Array(e));for(var n=0;nu.length&&(this._expandData(),u=this.data);for(var h=0;hn||Ts(y)>i||c===e-1)&&(f=Math.sqrt(C*C+y*y),o=g,r=_);break;case fs.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,d=1/l,p=1;p<=l;p++){var f=p*d,g=Qn(t,n,o,a,f),f=Qn(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 fs.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 d=c*h,p=oi(t,n,o,d),d=oi(e,i,r,d),f=p-s,g=d-l;u+=Math.sqrt(f*f+g*g),s=p,l=d}return u}(o,r,m=t[c++],v=t[c++],g=t[c++],_=t[c++],10),o=g,r=_;break;case fs.A:var x=t[c++],b=t[c++],w=t[c++],S=t[c++],M=t[c++],T=t[c++],I=T+M;c+=1,p&&(a=Ss(M)*w+x,s=Ms(M)*S+b),f=ws(w,S)*bs(Cs,Math.abs(T)),o=Ss(I)*w+x,r=Ms(I)*S+b;break;case fs.R:a=o=t[c++],s=r=t[c++];f=2*t[c++]+2*t[c++];break;case fs.Z:var C=a-o,y=s-r;f=Math.sqrt(C*C+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,s,l,u,h=this.data,E=this._ux,z=this._uy,B=this._len,c=e<1,d=0,p=0,f=0;if(!c||(this._pathSegLen||this._calculateLength(),a=this._pathSegLen,s=e*this._pathLen))t:for(var g=0;g=Gs[i=0]+t&&a<=Gs[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 Bs.R:c=u=a[p++],d=h=a[p++];if(S=c+a[p++],M=d+a[p++],n){if(Os(c,d,S,d,e,i,o)||Os(S,d,S,M,e,i,o)||Os(S,M,c,M,e,i,o)||Os(c,M,c,d,e,i,o))return!0}else l=(l+=zs(S,d,S,M,i,o))+zs(c,M,c,d,i,o);break;case Bs.Z:if(n){if(Os(u,h,c,d,e,i,o))return!0}else l+=zs(u,h,c,d,i,o);u=c,h=d}}return n||(t=h,r=d,Math.abs(t-r)n,i=(o=o.slice(0,n)).length*c),t&&u&&null!=f)for(var y=Oa(f,l,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),m={},v=0;vhc.len()&&(sTr(i[1])?0':'':{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 Lp(t,e){return e=e||"transparent",F(t)?t:E(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function Pp(t,e){var n;"_blank"===e||"blank"===e?((n=window.open()).opener=null,n.location.href=t):window.open(t,e)}var Op={},Rp={},Np=(Ep.prototype.create=function(i,o){function t(t){var n=[];return nt(t,function(t,e){t=t.create(i,o);n=n.concat(t||[])}),n}this._nonSeriesBoxMasterList=t(Op),this._normalMasterList=t(Rp)},Ep.prototype.update=function(e,n){nt(this._normalMasterList,function(t){t.update&&t.update(e,n)})},Ep.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},Ep.register=function(t,e){"matrix"===t||"calendar"===t?Op[t]=e:Rp[t]=e},Ep.get=function(t){return Rp[t]||Op[t]},Ep);function Ep(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}var zp={coord:1,coord2:2};var Bp=it();var Vp={none:0,dataCoordSys:1,boxCoordSys:2};function Fp(t){var e=t.getShallow("coordinateSystem"),n=t.getShallow("coordinateSystemUsage",!0),i=Vp.none;return e&&(t="series"===t.mainType,"data"===(n=null==n?t?"data":"box":n)?(i=Vp.dataCoordSys,t||(i=Vp.none)):"box"===n&&(i=Vp.boxCoordSys,t||Op[e]||(i=Vp.none))),{coordSysType:e,kind:i}}function Gp(t){var e=t.targetModel,n=t.coordSysType,i=t.coordSysProvider,o=t.isDefaultDataCoordSys,t=(t.allowNotFound,Fp(e)),r=t.kind,t=t.coordSysType;o&&r!==Vp.dataCoordSys&&(r=Vp.dataCoordSys,t=n),r!==Vp.none&&t===n&&(o=i(n,e))&&(r===Vp.dataCoordSys?e.coordinateSystem=o:e.boxCoordinateSystem=o)}var Wp=nt,Hp=["left","right","top","bottom","width","height"],Yp=[["width","left","right"],["height","top","bottom"]];function Xp(a,s,l,u,h){var c=0,d=0,p=(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();p="horizontal"===a?(i=r.width+(e?-e.x+r.x:0),u<(n=c+i)||t.newline?(c=0,n=i,d+=p+l,r.height):Math.max(p,r.height)):(i=r.height+(e?-e.y+r.y:0),h<(o=d+i)||t.newline?(c+=p+l,d=0,o=i,r.width):Math.max(p,r.width)),t.newline||(t.x=c,t.y=d,t.markRedraw(),"horizontal"===a?c=n+l:d=o+l)})}var Up=Xp;function Zp(t,e){o=Kp(r=t,n=e,{enableLayoutOnlyByCenter:!0}),i=r.getBoxLayoutParams(),o.type===qp.point?(s=o.refPoint,a=jp(i,{width:n.getWidth(),height:n.getHeight()})):(r=V(n=r.get("center"))?n:[n,n],a=jp(i,o.refContainer),s=o.boxCoordFrom===zp.coord2?o.refPoint:[Y(r[0],a.width)+a.x,Y(r[1],a.height)+a.y]);var n={viewRect:a,center:s},i=n.viewRect,o=n.center,r=t.get("radius"),a=(V(r)||(r=[0,r]),Y(i.width,e.getWidth())),s=Y(i.height,e.getHeight()),n=Math.min(a,s),t=Y(r[0],n/2),e=Y(r[1],n/2);return{cx:o[0],cy:o[1],r0:t,r:e,viewRect:i}}function jp(t,e,n){n=Tp(n||0);var i=e.width,o=e.height,r=Y(t.left,i),a=Y(t.top,o),s=Y(t.right,i),l=Y(t.bottom,o),u=Y(t.width,i),h=Y(t.height,o),c=n[2]+n[0],d=n[1]+n[3],p=t.aspect;switch(isNaN(u)&&(u=i-s-d-r),isNaN(h)&&(h=o-l-c-a),null!=p&&(isNaN(u)&&isNaN(h)&&(i/oe)return t[i];return t[n-1]}var Ef,zf="\0_ec_inner",Bf=(u(Vf,Ef=Nd),Vf.prototype.init=function(t,e,n,i,o,r){i=i||{},this.option=null,this._theme=new Nd(i),this._locale=new Nd(o),this._optionManager=r},Vf.prototype.setOption=function(t,e,n){e=Wf(e);this._optionManager.setOption(t,n,e),this._resetOption(null,e)},Vf.prototype.resetOption=function(t,e){return this._resetOption(t,Wf(e))},Vf.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)):Lf(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&&nt(n,function(t){i=!0,this._mergeOption(t,e)},this),i},Vf.prototype.mergeOption=function(t){this._mergeOption(t,null)},Vf.prototype._mergeOption=function(i,t){var o=this.option,h=this._componentsMap,c=this._componentsCount,n=[],r=it(),d=t&&t.replaceMergeMainTypeMap;wf(this).datasetMap=it(),nt(i,function(t,e){null!=t&&(g.hasClass(e)?e&&(n.push(e),r.set(e,!0)):o[e]=null==o[e]?v(t):p(o[e],t,!0))}),d&&d.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 a,t=function(t,e,n){return(e=(e=Df.get(e))&&e(t))?n.concat(e):n}(this,r,Zr(i[r])),e=h.get(r),n=e?d&&d.get(r)?"replaceMerge":"normalMerge":"replaceAll",e=$r(e,t,n),s=(ia(e,r,g),o[r]=null,h.set(r,null),c.set(r,0),[]),l=[],u=0;nt(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;if("tooltip"===r){if(a)return;a=!0}n&&n.constructor===o?(n.name=t.keyInfo.name,n.mergeOption(i,this),n.optionUpdated(i,!1)):(e=P({componentIndex:e},t.keyInfo),P(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?(s.push(n.option),l.push(n),u++):(s.push(void 0),l.push(void 0))},this),o[r]=s,h.set(r,l),c.set(r,u),"series"===r&&kf(this)},this),this._seriesIndices||kf(this)},Vf.prototype.getOption=function(){var a=v(this.option);return nt(a,function(t,e){if(g.hasClass(e)){for(var n=Zr(t),i=n.length,o=!1,r=i-1;0<=r;r--)n[r]&&!na(n[r])?o=!0:(n[r]=null,o||i--);n.length=i,a[e]=n}}),delete a[zf],a},Vf.prototype.setTheme=function(t){this._theme=new Nd(t),this._resetOption("recreate",null)},Vf.prototype.getTheme=function(){return this._theme},Vf.prototype.getLocaleModel=function(){return this._locale},Vf.prototype.setUpdatePayload=function(t){this._payload=t},Vf.prototype.getUpdatePayload=function(){return this._payload},Vf.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;ig[1]&&(g[1]=f)}return{start:a,end:this._rawCount=this._count=s}},l.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,o=this._chunks,r=this._dimensions,a=r.length,s=this._rawExtent,l=B(r,function(t){return t.property}),u=0;uf[1]&&(f[1]=g)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},l.prototype.count=function(){return this._count},l.prototype.get=function(t,e){return 0<=e&&e=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},l.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;ot[S][1])&&(b=!1)}b&&(a[s++]=e.getRawIndex(f))}return sy[1]&&(y[1]=g)}}}},l.prototype.lttbDownSample=function(t,e){var n,i=this.clone([t],!0),o=i._chunks[t],r=this.count(),a=0,s=Math.floor(1/e),l=this.getRawIndex(0),u=new(Iy(this._rawCount))(Math.min(2*(Math.ceil(r/s)+2),r));u[a++]=l;for(var h=1;hh[1]&&(h[1]=y),c[d++]=m}return o._count=d,o._indices=c,o._updateGetRawIdx(),o},l.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,o=0,r=this.count();o'+Se(u)+""+h,t))}function Xy(t,e,n,i){var o,r,a,s,l,u=t.renderMode,h=e.noName,c=e.noValue,d=!e.markerType,p=e.name,f=t.useUTC,g=e.valueFormatter||t.valueFormatter||function(t){return B(t=V(t)?t:[t],function(t,e){return Ip(t,V(r)?r[e]:r,f)})};if(!h||!c)return o=d?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||_.color.secondary,u),p=h?"":Ip(p,"ordinal",f),r=e.valueType,g=c?[]:g(e.value,e.dataIndex),e=!d||!h,a=!d&&h,l=By(i,u),s=l.nameStyle,l=l.valueStyle,"richText"===u?(d?"":o)+(h?"":jy(t,p,s))+(c?"":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(V(e)?e.join(" "):e,o)}(t,g,e,a,l)):Zy(i,(d?"":o)+(h?"":''+Se(p)+"")+(c?"":function(t,e,n,i){n=n?"10px":"20px",e=e?"float:right;margin-left:"+n:"";return t=V(t)?t:[t],''+B(t,Se).join("  ")+""}(g,e,a,l)),n)}function Uy(t,e,n,i,o,r){if(t)return Hy(t)({useUTC:o,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,r)}function Zy(t,e,n){return'
'+e+'
'}function jy(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function qy(t,e){return Lp(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function Ky(t,e){t=t.get("padding");return null!=t?t:"richText"===e?[8,10]:10}Qy.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},Qy.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,e=Ap({color:e,type:t,renderMode:n,markerId:i});return F(e)?e:(this.richTextStyles[i]=e.style,e.content)},Qy.prototype.wrapRichTextStyle=function(t,e){var n={},e=(V(e)?nt(e,function(t){return P(n,t)}):P(n,e),this._generateStyleName());return this.richTextStyles[e]=n,"{"+e+"|"+t+"}"};var $y=Qy;function Qy(){this.richTextStyles={},this._nextStyleNameId=Hr()}function Jy(t){var e,n,i,o,r,a,s,l,u,h,c,d=t.series,p=t.dataIndex,t=t.multipleSeries,f=d.getData(),g=f.mapDimensionsAll("defaultedTooltip"),y=g.length,m=d.getRawValue(p),v=V(m),_=qy(d,p);function x(t,e){e=s.getDimensionInfo(e);e&&!1!==e.otherDims.tooltip&&(l?c.push(Gy("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)},r.prototype.restoreData=function(){this.dataTask.dirty()},r.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel;return Of.prototype.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},r.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},r.prototype.getProgressive=function(){return this.get("progressive")},r.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},r.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},r.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,o=this.getData(e);if("series"===i||"all"===n)this.option.selectedMap={},this._selectedDataIndicesMap={};else for(var r=0;re.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function lm(e,n){nt(Nt(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(t){e.wrapMethod(t,M(um,n))})}function um(t,e){t=hm(t);return t&&t.setOutputEnd((e||this).count()),e}function hm(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}st(im,Gg),st(im,Of),va(im,g);dm.prototype.init=function(t,e){},dm.prototype.render=function(t,e,n,i){},dm.prototype.dispose=function(t,e){},dm.prototype.updateView=function(t,e,n,i){},dm.prototype.updateLayout=function(t,e,n,i){},dm.prototype.updateVisual=function(t,e,n,i){},dm.prototype.toggleBlurSeries=function(t,e,n){},dm.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)};var cm=dm;function dm(){this.group=new cr,this.uid=Bd("viewComponent")}function pm(){var r=i();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"}}ma(cm),wa(cm);var fm=i(),gm=pm(),ym=(mm.prototype.init=function(t,e){},mm.prototype.render=function(t,e,n,i){},mm.prototype.highlight=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&_m(t,i,"emphasis")},mm.prototype.downplay=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&_m(t,i,"normal")},mm.prototype.remove=function(t,e){this.group.removeAll()},mm.prototype.dispose=function(t,e){},mm.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},mm.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},mm.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},mm.prototype.eachRendered=function(t){td(this.group,t)},mm.markUpdateMethod=function(t,e){fm(t).updateMethod=e},mm.protoInitialize=void(mm.prototype.type="chart"),mm);function mm(){this.group=new cr,this.uid=Bd("viewChart"),this.renderTask=Yg({plan:xm,reset:bm}),this.renderTask.context={view:this}}function vm(t,e,n){t&&Iu(t)&&("emphasis"===e?lu:uu)(t,n)}function _m(e,t,n){var i,o=oa(e,t),r=t&&null!=t.highlightKey?(t=t.highlightKey,i=null==(i=Pl[t])&&Ll<=32?Pl[t]=Ll++:i):null;null!=o?nt(Zr(o),function(t){vm(e.getItemGraphicEl(t),n,r)}):e.eachItemGraphicEl(function(t){vm(t,n,r)})}function xm(t){return gm(t.model)}function bm(t){var e=t.model,n=t.ecModel,i=t.api,o=t.payload,r=e.pipelineContext.progressiveRender,t=t.view,a=o&&fm(o).updateMethod,r=r?"incrementalPrepareRender":a&&t[a]?a:"render";return"render"!==r&&t[r](e,n,i,o),wm[r]}ma(ym),wa(ym);var wm={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)}}},Sm="\0__throttleOriginMethod",Mm="\0__throttleRate",Tm="\0__throttleType";function Im(t,o,r){var a,s,l,u,h,c=0,d=0,p=null;function f(){d=(new Date).getTime(),p=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}},zm.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},zm.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}},zm.prototype.restorePipelines=function(t){var i=this,o=i._pipelineMap=it();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)})},zm.prototype.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.api.getModel(),o=this.api;nt(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,{});Tt(!(t.reset&&t.overallReset),""),t.reset&&this._createSeriesStageTask(t,e,i,o),t.overallReset&&this._createOverallStageTask(t,e,i,o)},this)},zm.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)},zm.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},zm.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},zm.prototype._performStageTasks=function(t,s,l,u){u=u||{};var h=!1,c=this;function d(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}nt(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){d(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){d(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},zm.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},zm.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())})},zm.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},zm.prototype._createSeriesStageTask=function(n,t,i,o){var r=this,a=t.seriesTaskMap,s=t.seriesTaskMap=it(),t=n.seriesType,e=n.getTargetSeries;function l(t){var e=t.uid,e=s.set(e,a&&a.get(e)||Yg({plan:Wm,reset:Hm,count:Um}));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)},zm.prototype._createOverallStageTask=function(t,e,n,i){var o=this,r=e.overallTask=e.overallTask||Yg({reset:Bm}),a=(r.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:o},r.agentStubMap),s=r.agentStubMap=it(),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,Yg({reset:Vm,onDirty:Gm})));e.context={model:t,overallProgress:u},e.agent=r,e.__block=u,o._pipe(t,e)}Tt(!t.createOnAllSeries,""),e?n.eachRawSeriesByType(e,c):l?l(n,i).each(c):(u=!1,nt(n.getSeries(),c)),h&&r.dirty()},zm.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},zm.wrapStageHandler=function(t,e){return(t=N(t)?{overallReset:t,seriesType:function(t){Zm=null;try{t(jm,qm)}catch(t){}return Zm}(t)}:t).uid=Bd("stageHandler"),e&&(t.visualType=e),t};var Em=zm;function zm(t,e,n,i){this._stageTaskMap=it(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}function Bm(t){t.overallReset(t.ecModel,t.api,t.payload)}function Vm(t){return t.overallProgress&&Fm}function Fm(){this.agent.dirty(),this.getDownstream().dirty()}function Gm(){this.agent&&this.agent.dirty()}function Wm(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Hm(t){t.useClearVisual&&t.data.clearAllVisual();t=t.resetDefines=Zr(t.reset(t.model,t.ecModel,t.api,t.payload));return 1'+t.dom+""}),f.painter.getSvgRoot().innerHTML=g,i.connectedBackgroundColor&&f.painter.setBackgroundColor(i.connectedBackgroundColor),f.refreshImmediately(),f.painter.toDataURL()):(i.connectedBackgroundColor&&f.add(new pl({shape:{x:0,y:0,width:t,height:n},style:{fill:i.connectedBackgroundColor}})),nt(d,function(t){t=new ol({style:{x:t.left*e-l,y:t.top*e-u,image:t.dom}});f.add(t)}),f.refreshImmediately(),p.toDataURL("image/"+(i&&i.type||"png")))):this.getDataURL(i);this.id},h.prototype.convertToPixel=function(t,e,n){return fv(this,"convertToPixel",t,e,n)},h.prototype.convertToLayout=function(t,e,n){return fv(this,"convertToLayout",t,e,n)},h.prototype.convertFromPixel=function(t,e,n){return fv(this,"convertFromPixel",t,e,n)},h.prototype.containPixel=function(t,i){var o;if(!this._disposed)return nt(aa(this._model,t),function(t,n){0<=n.indexOf("Models")&&nt(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=aa(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 n0(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)}},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 n,i,s=this,o=(nt(Ev,function(a){function t(t){var n,e,i,o=s.getModel(),r=t.target;"globalout"===a?n={}:r&&r0(r,function(t){var e,t=U(t);return t&&null!=t.dataIndex?(e=t.dataModel||o.getSeriesByIndex(t.seriesIndex),n=e&&e.getDataParams(t.dataIndex,t.dataType,r)||{},1):t.eventData&&(n=P({},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)}),this._messageCenter);nt(Vv,function(t,e){o.on(e,function(t){s.trigger(e,t)})}),i=(n=this)._api,o.on("selectchanged",function(t){var e=i.getModel();t.isFromClick?(o0("map","selectchanged",n,e,t),o0("pie","selectchanged",n,e,t)):"select"===t.fromAction?(o0("map","selected",n,e,t),o0("pie","selected",n,e,t)):"unselect"===t.fromAction&&(o0("map","unselected",n,e,t),o0("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 t,e,n;this._disposed?this.id:(this._disposed=!0,this.getDom()&&ca(this.getDom(),qv,""),e=(t=this)._api,n=t._model,nt(t._componentsViews,function(t){t.dispose(n,e)}),nt(t._chartsViews,function(t){t.dispose(n,e)}),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete Xv[t.id])},h.prototype.resize=function(t){if(!this[Q0])if(this._disposed)this.id;else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var e=e.resetOption("media"),n=t&&t.silent;this[tv]&&(null==n&&(n=this[tv].silent),e=!0,this[tv]=null),this[Q0]=!0,Dv(this);try{e&&hv(this),pv.update.call(this,{type:"resize",animation:P({duration:0},t&&t.animation)})}catch(t){throw this[Q0]=!1,t}this[Q0]=!1,mv.call(this,n),vv.call(this,n)}}},h.prototype.showLoading=function(t,e){this._disposed?this.id:(E(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Yv[t]&&(t=Yv[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=P({},t);return e.type=Bv[t.type],e},h.prototype.dispatchAction=function(t,e){var n;this._disposed?this.id:(E(e)||(e={silent:!!e}),zv[t.type]&&this._model&&(this[Q0]?this._pendingActions.push(t):(n=e.silent,yv.call(this,t,n),(t=e.flush)?this._zr.flush():!1!==t&&w.browser.weChat&&this._throttledZrFlush(),mv.call(this,n),vv.call(this,n))))},h.prototype.updateLabelLayout=function(){K0.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},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=(hv=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),cv(t,!0),cv(t,!1),e.plan()},cv=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;es.get("hoverLayerThreshold")&&!w.node&&!w.worker&&s.eachSeries(function(t){t.preventUsingHoverLayer||(t=i._chartsMap[t.__viewId]).__alive&&t.eachRendered(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})}),K0.trigger("series:afterupdate",t,e,n)},Iv=function(t){t[ev]=!0,t.getZr().wakeUp()},Dv=function(t){t[J0]=(t[J0]+1)%1e3},Cv=function(t){t[ev]&&(t.getZr().storage.traverse(function(t){xc(t)||Pv(t)}),t[ev]=!1)},Mv=function(n){return u(t,e=Hf),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){lu(t,e),Iv(n)},t.prototype.leaveEmphasis=function(t,e){uu(t,e),Iv(n)},t.prototype.enterBlur=function(t){hu(t),Iv(n)},t.prototype.leaveBlur=function(t){cu(t),Iv(n)},t.prototype.enterSelect=function(t){du(t),Iv(n)},t.prototype.leaveSelect=function(t){pu(t),Iv(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)},t.prototype.getMainProcessVersion=function(){return n[J0]},new t(n);function t(){return null!==e&&e.apply(this,arguments)||this}var e},void(Tv=function(i){function o(t,e){for(var n=0;no[1]&&(o[0]=o[1]),r}function tx(t){var e=Math.pow(10,Vr(t)),t=t/e;return t?2===t?t=3:3===t?t=5:t*=2:t=1,Dr(t*e)}function ex(t){return Ar(t)+2}function nx(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function ix(t,e){return t>=e[0]&&t<=e[1]}rx.prototype.updateMethods=function(t){t.hasBreaks()?(this.normalize=S(t.normalize,t),this.scale=S(t.scale,t)):(this.normalize=ax,this.scale=sx)};var ox=rx;function rx(){this.normalize=ax,this.scale=sx}function ax(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function sx(t,e){return t*(e[1]-e[0])+e[0]}function lx(t,e,n){t=Math.log(t);return[Math.log(n?e[0]:Math.max(0,e[0]))/t,Math.log(n?e[1]:Math.max(0,e[1]))/t]}hx.prototype.getSetting=function(t){return this._setting[t]},hx.prototype._innerUnionExtent=function(t){var e=this._extent;this._innerSetExtent((t[0]e[1]?t:e)[1])},hx.prototype.unionExtentFromData=function(t,e){this._innerUnionExtent(t.getApproximateExtent(e))},hx.prototype.getExtent=function(){return this._extent.slice()},hx.prototype.setExtent=function(t,e){this._innerSetExtent(t,e)},hx.prototype._innerSetExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e),this._brkCtx&&this._brkCtx.update(n)},hx.prototype.setBreaksFromOption=function(t){},hx.prototype._innerSetBreak=function(t){this._brkCtx&&(this._brkCtx.setBreaks(t),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},hx.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},hx.prototype.hasBreaks=function(){return!!this._brkCtx&&this._brkCtx.hasBreaks()},hx.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},hx.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},hx.prototype.isBlank=function(){return this._isBlank},hx.prototype.setBlank=function(t){this._isBlank=t};var ux=hx;function hx(t){this._calculator=new ox,this._setting=t||{},this._extent=[1/0,-1/0]}wa(ux);var cx=0,dx=(px.createByAxisModel=function(t){var t=t.option,e=t.data,e=e&&B(e,fx);return new px({categories:e,needCollect:!e,deduplication:!1!==t.dedplication})},px.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},px.prototype.parseAndCollect=function(t){var e,n,i=this._needCollect;return F(t)||i?(i&&!this._deduplication?(n=this.categories.length,this.categories[n]=t,this._onCollect&&this._onCollect(t,n)):null==(n=(e=this._getOrCreateMap()).get(t))&&(i?(n=this.categories.length,this.categories[n]=t,e.set(t,n),this._onCollect&&this._onCollect(t,n)):n=NaN),n):t},px.prototype._getOrCreateMap=function(){return this._map||(this._map=it(this.categories))},px);function px(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++cx,this._onCollect=t.onCollect}function fx(t){return E(t)&&null!=t.value?t.value:t+""}u(mx,gx=ux),mx.prototype.parse=function(t){return null==t?NaN:F(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},mx.prototype.contain=function(t){return ix(t,this._extent)&&0<=t&&t=t},mx.prototype.getOrdinalMeta=function(){return this._ordinalMeta},mx.prototype.calcNiceTicks=function(){},mx.prototype.calcNiceExtent=function(){},mx.type="ordinal";var gx,yx=mx;function mx(t){var t=gx.call(this,t)||this,e=(t.type="ordinal",t.getSetting("ordinalMeta"));return V(e=e||new dx({}))&&(e=new dx({categories:B(e,function(t){return E(t)?t.value:t})})),t._ordinalMeta=e,t._extent=t.getSetting("extent")||[0,e.categories.length-1],t}ux.registerClass(yx);var vx,_x=Dr,xx=(u(bx,vx=ux),bx.prototype.parse=function(t){return null==t||""===t?NaN:Number(t)},bx.prototype.contain=function(t){return ix(t,this._extent)},bx.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},bx.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},bx.prototype.getInterval=function(){return this._interval},bx.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=ex(t)},bx.prototype.getTicks=function(t){t=t||{};var n=this._interval,e=this._extent,i=this._niceExtent,o=this._intervalPrecision,r=Zd,a=[];if(n)if("only_break"===t.breakTicks&&r)r.addBreaksToTicks(a,this._brkCtx.breaks,this._extent);else{e[0]h&&(t.expandToNicedExtent?a.push({value:_x(h+n,o)}):a.push({value:e[1]})),"none"!==t.breakTicks&&r&&r.addBreaksToTicks(a,this._brkCtx.breaks,this._extent)}return a},bx.prototype.getMinorTicks=function(t){for(var e=this.getTicks({expandToNicedExtent:!0}),n=[],i=this.getExtent(),o=1;oi[0]&&cx));)g[o](g[i]()+t),f=g.getTime(),y&&0<(d=y.calcNiceTickMultiple(f,p))&&(g[o](g[i]()+d*t),f=g.getTime());a.push({value:f,notAdd:!0})}function i(t,e,n){var i,o,r,a,s=[],l=!e.length;if(i=ap(t),o=_[0],r=_[1],a=v,up(new Date(o),i,a).getTime()!==up(new Date(r),i,a).getTime()){l&&(e=[{value:function(t,e,n){e=Math.max(0,D(np,e)-1);return up(new Date(t),np[e],n).getTime()}(_[0],t,v)},{value:_[1]}]);for(var u,h,c=0;c=_[0]&&d<=_[1]&&w(f,d,p,g,y,0,s),"year"===t&&1=_[0]&&p<=_[1]&&a++)}u=e/m;if(1.5*u=_[0]&&t.value<=_[1]&&!t.notAdd})}),function(t){return 0n&&(this._approxInterval=n),Bx.length),t=Math.min(function(t,e,n,i){for(;n>>1;t[o][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 O1(t,r){var e,n,o;return B(ht((t=(e=t).UTF8Encoding?(null==(o=(n=e).UTF8Scale)&&(o=1024),nt(n.features,function(t){var e=t.geometry,n=e.encodeOffsets,i=e.coordinates;if(n)switch(e.type){case"LineString":e.coordinates=P1(i,n,o);break;case"Polygon":case"MultiLineString":L1(i,n,o);break;case"MultiPolygon":nt(i,function(t,e){return L1(t,n[e],o)})}}),n.UTF8Encoding=!1,n):e).features,function(t){return t.geometry&&t.properties&&0=e[0]&&t<=e[1]}),function(t){var e={value:t};return{formattedLabel:i(e),rawLabel:n.scale.getLabel(e),tickValue:t,time:void 0,break:void 0}})}):"category"===n.type?(s=t,a=(t=n).getLabelModel(),s=G1(t,a,s),!a.get("show")||t.scale.isBlank()?{labels:[]}:s):(a=(o=n).scale.getTicks(),r=o1(o),{labels:B(a,function(t,e){return{formattedLabel:r(t,e),rawLabel:o.scale.getLabel(t),tickValue:t.value,time:t.time,break:t.break}})})}function F1(t,e,n){var i,o,r,a,s,l,u=t.getTickModel().get("customValues");return u?(i=t.scale.getExtent(),{ticks:ht(B1(t,u),function(t){return t>=i[0]&&t<=i[1]})}):"category"===t.type?(u=e,a=W1(e=t),s=a1(u),(l=X1(a,s))||(u.get("show")&&!e.scale.isBlank()||(o=[]),o=N(s)?K1(e,s,!0):"auto"===s?(l=G1(e,e.getLabelModel(),z1(E1.determine)),r=l.labelCategoryInterval,B(l.labels,function(t){return t.tickValue})):q1(e,r=s,!0),U1(a,s,{ticks:o,tickCategoryInterval:r}))):{ticks:B(t.scale.getTicks(n),function(t){return t.value})}}function G1(t,e,n){var i,o=H1(t),r=a1(e),e=n.kind===E1.estimate;if(!e){var a=X1(o,r);if(a)return a}var s={labels:N(r)?K1(t,r):q1(t,i="auto"===r?function(t,e){{var n;if(e.kind===E1.estimate)return n=t.calculateCategoryInterval(e),e.out.noPxChangeTryDetermine.push(function(){return N1(t).autoInterval=n,!0}),n}var i=N1(t).autoInterval;return null!=i?i:N1(t).autoInterval=t.calculateCategoryInterval(e)}(t,n):r),labelCategoryInterval:i};return e?n.out.noPxChangeTryDetermine.push(function(){return U1(o,r,s),!0}):U1(o,r,s),s}var W1=Y1("axisTick"),H1=Y1("axisLabel");function Y1(e){return function(t){return N1(t)[e]||(N1(t)[e]={list:[]})}}function X1(t,e){for(var n=0;nl[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],onBand:!0}),h(l[1],i.coord)&&(t?i.coord=l[1]:n.pop()),t)&&h(i.coord,l[1])&&n.push({coord:l[1],onBand:!0}),u},Q1.prototype.getMinorTicksCoords=function(){var t;return"ordinal"===this.scale.type?[]:(t=this.model.getModel("minorTick").get("splitNumber"),B(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||(e.painter=this)}},Kb.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;n=o.r0?"endArc":"startArc":o.endAngle>=o.startAngle?"endAngle":"startAngle":a?0<=o.height?"bottom":"top":0<=o.width?"right":"left"),h=cd(i),l=(hd(t,h,{labelFetcher:r,labelDataIndex:n,defaultText:xw(r.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:u}),t.getTextContent()),h=(s&&l&&(s=i.get(["label","position"]),t.textConfig.inside="middle"===s||null,function(t,e,n,i){if(G(i))t.setTextConfig({rotation:i});else if(V(e))t.setTextConfig({rotation:0});else{var o,i=t.shape,r=i.clockwise?i.startAngle:i.endAngle,a=i.clockwise?i.endAngle:i.startAngle,s=(r+a)/2,i=n(e);switch(i){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":o=s;break;case"startAngle":case"insideStartAngle":o=r;break;case"endAngle":case"insideEndAngle":o=a;break;default:return t.setTextConfig({rotation:0})}n=1.5*Math.PI-o;"middle"===i&&n>Math.PI/2&&n<1.5*Math.PI&&(n-=Math.PI),t.setTextConfig({rotation:n})}}(t,"outside"===s?u:s,Bw(a),i.get(["label","rotate"]))),u=l,s=h,a=r.getRawValue(n),l=function(t){return bw(e,t)},u&&((u=vd(u)).prevValue=u.value,u.value=a,a=s.normal,u.valueAnimation=a.get("valueAnimation"),u.valueAnimation)&&(u.precision=a.get("precision"),u.defaultInterpolatedText=l,u.statesModels=s),i.getModel(["emphasis"]));bu(t,h.get("focus"),h.get("blurScope"),h.get("disabled")),Mu(t,i),null!=(r=o).startAngle&&null!=r.endAngle&&r.startAngle===r.endAngle&&(t.style.fill="none",t.style.stroke="none",nt(t.states,function(t){t.style&&(t.style.fill=t.style.stroke="none")}))}var Fw,Gw=function(){},Ww=(u(Hw,Fw=Ks),Hw.prototype.getDefaultShape=function(){return new Gw},Hw.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,o=1-this.baseDimIdx,r=[],a=[],s=this.barWidth,l=0;le[u-1].coord&&(e.reverse(),h.reverse()),function(t,e){var n,i,o=[],r=t.length;function a(t,e,n){var i=t.coord;return{coord:n,color:Ni((n-i)/(e.coord-i),[t.color,e.color])}}for(var s=0;si)return;return 1}(a,e))return o=e.mapDimension(a.dim),r={},nt(a.getViewLabels(),function(t){t=a.scale.getRawOrdinalNumber(t.tickValue);r[t]=1}),function(t){return!r.hasOwnProperty(e.get(o,t))}}}function DS(t){for(var e,n,i=t.length/2;0l?x:_,(g=Math.abs(p.label.y-l))>=f.maxY&&(m=p.label.x-s-p.len2*h,y=u+p.len,m=Math.abs(m)t.unconstrainedWidth)?null:s,i.setStyle("width",l)),HS(o,i))}function HS(t,e){XS.rect=t,Ib(XS,e,YS)}var YS={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},XS={};function US(t){return"center"===t.position}function ZS(t){var S,M,T=t.getData(),I=[],C=!1,E=(t.get("minShowLabelAngle")||0)*FS,e=T.getLayout("viewRect"),D=T.getLayout("r"),k=e.width,A=e.x,n=e.y,L=e.height;function P(t){t.ignore=!0}if(T.each(function(t){var e,n,i,o,r,a,s,l,u,h,c=T.getItemGraphicEl(t),d=c.shape,p=c.getTextContent(),f=c.getTextGuideLine(),t=T.getItemModel(t),g=t.getModel("label"),y=g.get("position")||t.get(["emphasis","label","position"]),m=g.get("distanceToLabelLine"),v=g.get("alignTo"),_=Y(g.get("edgeDistance"),k),x=g.get("bleedMargin"),t=(null==x&&(x=200=e.r0},JS.type="pie";var $S,QS=JS;function JS(){var t=null!==$S&&$S.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}function tM(t,e,n){e=V(e)?{coordDimensions:e}:P({encodeDefine:t.getEncode()},e);var i=t.getSource(),e=Y_(i,e).dimensions,e=new H_(e,t);return e.initData(i,n),e}nM.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},nM.prototype.containName=function(t){return 0<=this._getRawData().indexOfName(t)},nM.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},nM.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)};var eM=nM;function nM(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}var iM,oM=i(),rM=(u(aM,iM=im),aM.prototype.init=function(t){iM.prototype.init.apply(this,arguments),this.legendVisualProvider=new eM(S(this.getData,this),S(this.getRawData,this)),this._defaultLabelLine(t)},aM.prototype.mergeOption=function(){iM.prototype.mergeOption.apply(this,arguments)},aM.prototype.getInitialData=function(){return tM(this,{coordDimensions:["value"],encodeDefaulter:M(Mf,this)})},aM.prototype.getDataParams=function(t){var e,n=this.getData(),i=oM(n),o=i.seats,i=(o||(e=[],n.each(n.mapDimension("value"),function(t){e.push(t)}),o=i.seats=Or(e,n.hostModel.get("percentPrecision"))),iM.prototype.getDataParams.call(this,t));return i.percent=o[t]||0,i.$vars.push("percent"),i},aM.prototype._defaultLabelLine=function(t){jr(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},aM.type="series.pie",aM.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",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%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},aM);function aM(){return null!==iM&&iM.apply(this,arguments)||this}Id={fullType:rM.type,getCoord2:function(t){return t.getShallow("center")}},Bp.set(Id.fullType,{getCoord2:void 0}).getCoord2=Id.getCoord2,y1(function(t){t.registerChartView(QS),t.registerSeriesModel(rM),i0("pie",t.registerAction),t.registerLayout(M(zS,"pie")),t.registerProcessor(VS("pie")),t.registerProcessor({seriesType:"pie",reset:function(t,e){var n=t.getData();n.filterSelf(function(t){var e=n.mapDimension("value"),e=n.get(e,t);return!(G(e)&&!isNaN(e)&&e<0)})}})});var sM=["itemStyle","borderColor"],lM=["itemStyle","borderColor0"],uM=["itemStyle","borderColorDoji"],hM=["itemStyle","color"],cM=["itemStyle","color0"];function dM(t,e){return e.get(0i[1],i="start"===e&&!t||"start"!==e&&t;e=Nr(n-nT/2)?(o=i?"bottom":"top","center"):Nr(n-1.5*nT)?(o=i?"top":"bottom","center"):(o="middle",n<1.5*nT&&nT/2l[0]&&isFinite(c)&&isFinite(l[0]);)h=tx(h),c=l[1]-h*a;else{e=(h=a "+d)),u++)}var p,f,g,i=n.get("coordinateSystem"),i=("cartesian2d"===i||"polar"===i||"matrix"===i?p=$_(t,n):(D(i=(i=Np.get(i))&&i.dimensions||[],"value")<0&&i.concat(["value"]),i=Y_(t,{coordDimensions:i,encodeDefine:n.getEncode()}).dimensions,(p=new H_(i,n)).initData(t)),new H_(["value"],n));return i.initData(l,s),o&&o(p,i),g=(f={mainData:p,struct:r,structAttr:"graph",datas:{node:p,edge:i},datasAttr:{node:"data",edge:"edgeData"}}).mainData,(n=f.datas)||(n={main:g},f.datasAttr={main:"data"}),f.datas=f.mainData=null,kC(g,n,f),nt(n,function(e){nt(g.TRANSFERABLE_METHODS,function(t){e.wrapMethod(t,M(MC,f))})}),g.wrapMethod("cloneShallow",M(IC,f)),nt(g.CHANGABLE_METHODS,function(t){g.wrapMethod(t,M(TC,f))}),Tt(n[g.dataType]===g),r.update(),r}u(RC,PC=im),RC.prototype.init=function(t){PC.prototype.init.apply(this,arguments);var e=this;function n(){return e._categoriesData}this.legendVisualProvider=new eM(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},RC.prototype.mergeOption=function(t){PC.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},RC.prototype.mergeDefaultAndTheme=function(t){PC.prototype.mergeDefaultAndTheme.apply(this,arguments),jr(t,"edgeLabel",["show"])},RC.prototype.getInitialData=function(t,e){var n,i=t.edges||t.links||[],t=t.data||t.nodes||[],r=this;if(t&&i)return GT(n=this)&&(n.__curvenessList=[],n.__edgeMap={},WT(n)),nt((n=LC(t,i,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t){var e=r._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var n=Nd.prototype.getModel;function i(t,e){t=n.call(this,t,e);return t.resolveParentPath=o,t}function o(t){var e;return!t||"label"!==t[0]&&"label"!==t[1]?t:(e=t.slice(),"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e)}e.wrapMethod("getItemModel",function(t){return t.resolveParentPath=o,t.getModel=i,t})})).edges,function(t){var e,n,i;e=t.node1,n=t.node2,i=this,t=t.dataIndex,GT(i)&&(e=HT(e,n,i),i=(n=i.__edgeMap)[YT(e)],n[e]&&!i?n[e].isForward=!0:i&&n[e]&&(i.isForward=!0,n[e].isForward=!1),n[e]=n[e]||[],n[e].push(t))},this),n.data},RC.prototype.getGraph=function(){return this.getData().graph},RC.prototype.getEdgeData=function(){return this.getGraph().edgeData},RC.prototype.getCategoriesData=function(){return this._categoriesData},RC.prototype.formatTooltip=function(t,e,n){var i,o,r;return"edge"===n?(o=this.getData(),n=this.getDataParams(t,n),r=o.graph.getEdgeByIndex(t),i=o.getName(r.node1.dataIndex),o=o.getName(r.node2.dataIndex),r=[],null!=i&&r.push(i),null!=o&&r.push(o),Gy("nameValue",{name:r.join(" > "),value:n.value,noValue:null==n.value})):Jy({series:this,dataIndex:t,multipleSeries:e})},RC.prototype._updateCategoriesData=function(){var t=B(this.option.categories||[],function(t){return null!=t.value?t:P({value:0},t)}),e=new H_(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t)})},RC.prototype.setZoom=function(t){this.option.zoom=t},RC.prototype.setCenter=function(t){this.option.center=t},RC.prototype.isAnimationEnabled=function(){return PC.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},RC.type="series.graph",RC.dependencies=["grid","polar","geo","singleAxis","calendar"],RC.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:_.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:_.color.primary}}};var PC,OC=RC;function RC(){var t=null!==PC&&PC.apply(this,arguments)||this;return t.type=RC.type,t.hasSymbolVisual=!0,t}y1(function(t){t.registerChartView(pC),t.registerSeriesModel(OC),t.registerProcessor(ET),t.registerVisual(zT),t.registerVisual(VT),t.registerLayout($T),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,rI),t.registerLayout(sI),t.registerCoordinateSystem("graphView",{dimensions:yI.dimensions,create:xI}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Vt),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Vt),t.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(n,t,i){t.eachComponent({mainType:"series",query:n},function(t){var e=i.getViewOfSeriesModel(t);e&&(null!=n.dx&&null!=n.dy&&e.updateViewOnPan(t,i,n),null!=n.zoom)&&null!=n.originX&&null!=n.originY&&e.updateViewOnZoom(t,i,n);e=cI(t.coordinateSystem,n,t.get("scaleLimit"));t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})})});var NC,EC=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0},zC=(u(BC,NC=Ks),BC.prototype.getDefaultShape=function(){return new EC},BC.prototype.buildPath=function(t,e){var n=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineTo(e.x2+n,e.y2),t.bezierCurveTo(e.cpx2+n,e.cpy2,e.cpx1+n,e.cpy1,e.x1+n,e.y1)):(t.lineTo(e.x2,e.y2+n),t.bezierCurveTo(e.cpx2,e.cpy2+n,e.cpx1,e.cpy1+n,e.x1,e.y1+n)),t.closePath()},BC.prototype.highlight=function(){lu(this)},BC.prototype.downplay=function(){uu(this)},BC);function BC(t){return NC.call(this,t)||this}u(GC,VC=ym),GC.prototype.init=function(t,e){this._controller=new ZI(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},GC.prototype.render=function(b,t,i){var e,n,o,r,a,s,l,u,h,c=this,d=b.getGraph(),w=this._mainGroup,p=b.layoutInfo,S=p.width,M=p.height,f=b.getData(),T=b.getData("edge"),I=b.get("orient");this._model=b,w.removeAll(),w.x=p.x,w.y=p.y,this._updateViewCoordSys(b,i),e=b,n=i,o=w,p=this._controller,r=this._controllerHost,a=null,s=new X(0,0,0,0),p.enable(e.get("roam"),{api:n,zInfo:{component:e},triggerInfo:{roamTrigger:e.get("roamTrigger"),isInSelf:function(t,e,n){return s.copy(o.getBoundingRect()),s.applyTransform(o.getComputedTransform()),s.contain(e,n)},isInClip:function(t,e,n){return!a||a.contain(e,n)}}}),r.zoomLimit=e.get("scaleLimit"),u=e.coordinateSystem,r.zoom=u?u.getZoom():1,l=e.subType+"Roam",p.off("pan").off("zoom").on("pan",function(t){lI(r,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:l,dx:t.dx,dy:t.dy})}).on("zoom",function(t){uI(r,t.scale,t.originX,t.originY),n.dispatchAction({seriesId:e.id,type:l,zoom:t.scale,originX:t.originX,originY:t.originY}),n.updateLabelLayout()}),d.eachEdge(function(e){var t,n,i,o,r,a,s,l=new zC,u=U(l),u=(u.dataIndex=e.dataIndex,u.seriesIndex=b.seriesIndex,u.dataType="edge",e.getModel()),h=u.getModel("lineStyle"),c=h.get("curveness"),d=e.node1.getLayout(),p=e.node1.getModel(),f=p.get("localX"),p=p.get("localY"),g=e.node2.getLayout(),y=e.node2.getModel(),m=y.get("localX"),y=y.get("localY"),v=e.getLayout(),_=(l.shape.extent=Math.max(1,v.dy),f="vertical"===(l.shape.orient=I)?(t=(null!=f?f*S:d.x)+v.sy,n=(null!=p?p*M:d.y)+d.dy,i=(null!=m?m*S:g.x)+v.ty,r=t,a=n*(1-c)+(o=null!=y?y*M:g.y)*c,s=i,n*c+o*(1-c)):(t=(null!=f?f*S:d.x)+d.dx,n=(null!=p?p*M:d.y)+v.sy,r=t*(1-c)+(i=null!=m?m*S:g.x)*c,a=n,s=t*c+i*(1-c),o=(null!=y?y*M:g.y)+v.ty),l.setShape({x1:t,y1:n,x2:i,y2:o,cpx1:r,cpy1:a,cpx2:s,cpy2:f}),l.useStyle(h.getItemStyle()),WC(l.style,I,e),""+u.get("value")),x=cd(u,"edgeLabel"),p=(hd(l,x,{labelFetcher:{getFormattedLabel:function(t,e,n,i,o,r){return b.getFormattedLabel(t,e,"edge",i,wt(o,x.normal&&x.normal.get("formatter"),_),r)}},labelDataIndex:e.dataIndex,defaultText:_}),l.setTextConfig({position:"inside"}),u.getModel("emphasis")),d=(Mu(l,u,"lineStyle",function(t){t=t.getItemStyle();return WC(t,I,e),t}),w.add(l),T.setItemGraphicEl(e.dataIndex,l),p.get("focus"));bu(l,"adjacency"===d?e.getAdjacentDataIndices():"trajectory"===d?e.getTrajectoryDataIndices():d,p.get("blurScope"),p.get("disabled"))}),d.eachNode(function(t){var e=t.getLayout(),n=t.getModel(),i=n.get("localX"),o=n.get("localY"),r=n.getModel("emphasis"),a=n.get(["itemStyle","borderRadius"])||0,i=new pl({shape:{x:null!=i?i*S:e.x,y:null!=o?o*M:e.y,width:e.dx,height:e.dy,r:a},style:n.getModel("itemStyle").getItemStyle(),z2:10}),o=(hd(i,cd(n),{labelFetcher:{getFormattedLabel:function(t,e){return b.getFormattedLabel(t,e,"node")}},labelDataIndex:t.dataIndex,defaultText:t.id}),i.disableLabelAnimation=!0,i.setStyle("fill",t.getVisual("color")),i.setStyle("decal",t.getVisual("style").decal),Mu(i,n),w.add(i),f.setItemGraphicEl(t.dataIndex,i),U(i).dataType="node",r.get("focus"));bu(i,"adjacency"===o?t.getAdjacentDataIndices():"trajectory"===o?t.getTrajectoryDataIndices():o,r.get("blurScope"),r.get("disabled"))}),f.eachItemGraphicEl(function(t,n){f.getItemModel(n).get("draggable")&&(t.drift=function(t,e){c._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=e,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:b.id,dataIndex:f.getRawIndex(n),localX:this.shape.x/S,localY:this.shape.y/M})},t.ondragend=function(){c._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move")}),!this._data&&b.isAnimationEnabled()&&w.setClipPath((u=w.getBoundingRect(),p=b,d=function(){w.removeClipPath()},_c(h=new pl({shape:{x:u.x-10,y:u.y-10,width:0,height:u.height+20}}),{shape:{width:u.width+20}},p,d),h)),this._data=b.getData()},GC.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},GC.prototype._updateViewCoordSys=function(t,e){var n=t.layoutInfo,i=n.width,n=n.height,e=t.coordinateSystem=new yI(null,{api:e,ecModel:t.ecModel});e.zoomLimit=t.get("scaleLimit"),e.setBoundingRect(0,0,i,n),e.setCenter(t.get("center")),e.setZoom(t.get("zoom")),this._controllerHost.target.attr({x:e.x,y:e.y,scaleX:e.scaleX,scaleY:e.scaleY})},GC.type="sankey";var VC,FC=GC;function GC(){var t=null!==VC&&VC.apply(this,arguments)||this;return t.type=GC.type,t._mainGroup=new cr,t._focusAdjacencyDisabled=!1,t}function WC(t,e,n){switch(t.fill){case"source":t.fill=n.node1.getVisual("color"),t.decal=n.node1.getVisual("style").decal;break;case"target":t.fill=n.node2.getVisual("color"),t.decal=n.node2.getVisual("style").decal;break;case"gradient":var i=n.node1.getVisual("color"),o=n.node2.getVisual("color");F(i)&&F(o)&&(t.fill=new Jh(0,0,+("horizontal"===e),+("vertical"===e),[{color:i,offset:0},{color:o,offset:1}]))}}u(XC,HC=im),XC.prototype.getInitialData=function(t,e){for(var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=t.levels||[],r=(this.levelModels=[],this.levelModels),a=0;av&&(v=b.depth),x.setLayout({depth:B?b.depth:y},!0),"vertical"===c?x.setLayout({dy:h},!0):x.setLayout({dx:h},!0);for(var w=0;we[1]&&e.reverse(),e},B2.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},B2.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)};var E2,z2=B2;function B2(t,e,n,i,o){t=E2.call(this,t,e,n)||this;return t.index=0,t.type=i||"value",t.position=o||"bottom",t}function V2(t,e,n){n=n||{};var i=e.axis,o={},r=i.getAxesOnZeroOf()[0],a=i.position,s=r?"onZero":a,i=i.dim,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),bt(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 F2(i){var o={xAxisModel:null,yAxisModel:null};return nt(o,function(t,e){var n=e.replace(/Model$/,""),n=i.getReferringComponents(n,la).models[0];o[e]=n}),o}var G2=[[3,1],[0,2]],W2=(H2.prototype.getRect=function(){return this._rect},H2.prototype.update=function(t,e){var n=this._axesMap;function i(t){var e,n=dt(t),i=n.length;if(i){for(var o=[],r=i-1;0<=r;r--){var a=t[+n[r]],s=a.model,l=a.scale;Q_(l)&&s.get("alignTicks")&&null==s.get("interval")?o.push(a):(n1(l,s),Q_(l)&&(e=a))}o.length&&(e||n1((e=o.pop()).scale,e.model),nt(o,function(t){PT(t.scale,t.model,e.scale)}))}}this._updateScale(t,this.model),i(n.x),i(n.y);var o={};nt(n.x,function(t){X2(n,"y",t,o)}),nt(n.y,function(t){X2(n,"x",t,o)}),this.resize(this.model,e)},H2.prototype.resize=function(t,e,n){var i,o,r,a,s,l=Kp(t,e),u=this._rect=jp(t.getBoxLayoutParams(),l.refContainer),h=this._axesMap,c=this._coordsList,d=t.get("containLabel");Z2(h,u),n||(i=u,o=c,n=h,r=d,a=e,s=new sT($2),nt(n,function(t){return nt(t,function(t){h1(t.model)&&(t.axisBuilder=function(t,e,n,i,o,r){for(var t=V2(t,n),a=!1,s=!1,l=0;lu[1]&&u.reverse(),(s=null==s||s>u[1]?u[1]:s)n||!!e&&(r=tD(t).seriesDataCount,e=o.getExtent(),Math.abs(e[0]-e[1])/r>n)):!0===i)},TD.prototype.makeElOption=function(t,e,n,i,o){},TD.prototype.createPointerEl=function(t,e,n,i){var o=e.pointer;o&&(o=wD(t).pointerEl=new ad[o.type](SD(e.pointer)),t.add(o))},TD.prototype.createLabelEl=function(t,e,n,i){e.label&&(e=wD(t).labelEl=new _l(SD(e.label)),t.add(e),CD(e,i))},TD.prototype.updatePointerEl=function(t,e,n){t=wD(t).pointerEl;t&&e.pointer&&(t.setStyle(e.pointer.style),n(t,{shape:e.pointer.shape}))},TD.prototype.updateLabelEl=function(t,e,n,i){t=wD(t).labelEl;t&&(t.setStyle(e.label.style),n(t,{x:e.label.x,y:e.label.y}),CD(t,i))},TD.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=Zc(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Le(t.event)},onmousedown:MD(this._onHandleDragMove,this,0,0),drift:MD(this._onHandleDragMove,this),ondragend:MD(this._onHandleDragEnd,this)}),n.add(i)),kD(i,e,!1),i.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"])),V(a=o.get("size"))||(a=[a,a]),i.scaleX=a[0]/2,i.scaleY=a[1]/2,Cm(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,r)):(i&&n.remove(i),this._handle=null))},TD.prototype._moveHandleToValue=function(t,e){ID(this._axisPointerModel,!e&&this._moveAnimation,this._handle,DD(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},TD.prototype._onHandleDragMove=function(t,e){var n=this._handle;n&&(this._dragging=!0,t=this.updateHandleTransform(DD(n),[t,e],this._axisModel,this._axisPointerModel),this._payloadInfo=t,n.stopAnimation(),n.attr(DD(t)),wD(n).lastProp=null,this._doDispatchAxisPointer())},TD.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}]}))},TD.prototype._onHandleDragEnd=function(){var t;this._dragging=!1,this._handle&&(t=this._axisPointerModel.get("value"),this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"}))},TD.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),Dm(this,"_doDispatchAxisPointer")},TD.prototype.doClear=function(){},TD.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},TD);function TD(){this._dragging=!1,this.animationThreshold=15}function ID(t,e,n,i){!function n(i,t){{var o;return E(i)&&E(t)?(o=!0,nt(t,function(t,e){o=o&&n(i[e],t)}),!!o):i===t}}(wD(n).lastProp,i)&&(wD(n).lastProp=i,e?vc(n,i,t):(n.stopAnimation(),n.attr(i)))}function CD(t,e){t[e.get(["label","show"])?"show":"hide"]()}function DD(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function kD(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 AD(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 LD(t,e,n,i,o){var r=PD(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=Uo(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:dd(n,{text:r,font:s,fill:n.getTextColor(),padding:a,backgroundColor:i}),z2:10}}function PD(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:r1(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]},nt(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),t=t.dataIndexInside,e=e&&e.getDataParams(t);e&&r.seriesData.push(e)}),F(o)?a=o.replace("{value}",a):N(o)&&(a=o(r))),a}function OD(t,e,n){var i=ze();return We(i,i,n.rotation),Ge(i,i,n.position),Gc([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function RD(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function ND(t,e,n,i,o,r){return{cx:t,cy:e,r0:n,r:i,startAngle:o,endAngle:r,clockwise:!0}}u(BD,ED=Xl),BD.prototype.makeElOption=function(t,e,n,i,o){var r,a=n.axis,s=("angle"===a.dim&&(this.animationThreshold=Math.PI/18),a.polar),l=s.getOtherAxis(a).getExtent(),u=a.dataToCoord(e),h=i.get("type"),a=(h&&"none"!==h&&(r=AD(i),(h=FD[h](a,s,u,l)).style=r,t.graphicKey=h.type,t.pointer=h),i.get(["label","margin"]));LD(t,n,i,o,function(t,e,n,i){var o,r,a=e.axis,t=a.dataToCoord(t),s=(l=(l=n.getAngleAxis().getExtent()[0])/180*Math.PI,n.getRadiusAxis().getExtent());{var l;s="radius"===a.dim?(a=ze(),We(a,a,l),Ge(a,a,[n.cx,n.cy]),o=Gc([t,-i],a),a=e.getModel("axisLabel").get("rotate")||0,e=fT.innerTextLayout(l,a*Math.PI/180,-1),r=e.textAlign,e.textVerticalAlign):(l=s[1],o=n.coordToPoint([l+i,t]),a=n.cx,e=n.cy,r=Math.abs(o[0]-a)/l<.3?"center":o[0]>a?"left":"right",Math.abs(o[1]-e)/l<.3?"middle":o[1]>e?"top":"bottom")}return{position:o,align:r,verticalAlign:s}}(e,n,s,a))};var ED,zD=BD;function BD(){return null!==ED&&ED.apply(this,arguments)||this}var VD,FD={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:RD(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var o=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:ND(e.cx,e.cy,i[0],i[1],(-n-o/2)*r,(o/2-n)*r)}:{type:"Sector",shape:ND(e.cx,e.cy,n-o/2,n+o/2,0,2*Math.PI)}}},GD=(u(WD,VD=Xl),WD.prototype.makeElOption=function(t,e,n,i,o){var r,a=n.axis,s=a.grid,l=i.get("type"),u=HD(s,a).getOtherAxis(a).getGlobalExtent(),h=a.toGlobalCoord(a.dataToCoord(e,!0)),a=(l&&"none"!==l&&(r=AD(i),(l=YD[l](a,h,u)).style=r,t.graphicKey=l.type,t.pointer=l),V2(s.getRect(),n));h=e,u=t,r=a,l=n,s=i,e=o,t=fT.innerTextLayout(r.rotation,0,r.labelDirection),r.labelMargin=s.get(["label","margin"]),LD(u,l,s,e,{position:OD(l.axis,h,r),align:t.textAlign,verticalAlign:t.textVerticalAlign})},WD.prototype.getHandleTransform=function(t,e,n){var i=V2(e.axis.grid.getRect(),e,{labelInside:!1}),n=(i.labelMargin=n.get(["handle","margin"]),OD(e.axis,t,i));return{x:n[0],y:n[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},WD.prototype.updateHandleTransform=function(t,e,n,i){var n=n.axis,o=n.grid,r=n.getGlobalExtent(!0),o=HD(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]}},WD);function WD(){return null!==VD&&VD.apply(this,arguments)||this}function HD(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var YD={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:RD([e,n[0]],[e,n[1]],XD(t))}},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=XD(t),{x:e[i=i||0],y:e[1-i],width:n[i],height:n[1-i]})}}};function XD(t){return"x"===t.dim?0:1}u(jD,UD=g),jD.type="axisPointer",jD.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:_.color.border,width:1,type:"dashed"},shadowStyle:{color:_.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:_.color.neutral00,padding:[5,7,5,7],backgroundColor:_.color.accent60,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:_.color.accent40,throttle:40}};var UD,ZD=jD;function jD(){var t=null!==UD&&UD.apply(this,arguments)||this;return t.type=jD.type,t}var qD=i(),KD=nt;function $D(t,e,n){var i,c,d;function o(t,h){c.on(t,function(e){n=d;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))}KD(qD(c).records,function(t){t&&h(t,e,o.dispatchAction)});var t,a=o.pendings,s=d,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))})}w.node||(i=e.getZr(),qD(i).records||(qD(i).records={}),d=e,qD(c=i).initialized||(qD(c).initialized=!0,o("click",M(JD,"click")),o("mousemove",M(JD,"mousemove")),o("globalout",QD)),(qD(i).records[t]||(qD(i).records[t]={})).handler=n)}function QD(t,e,n){t.handler("leave",null,n)}function JD(t,e,n,i){e.handler(t,n,i)}function tk(t,e){w.node||(e=e.getZr(),(qD(e).records||{})[t]&&(qD(e).records[t]=null))}u(ik,ek=cm),ik.prototype.render=function(t,e,n){var e=e.getComponent("tooltip"),i=t.get("triggerOn")||e&&e.get("triggerOn")||"mousemove|click";$D("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})})},ik.prototype.remove=function(t,e){tk("axisPointer",e)},ik.prototype.dispose=function(t,e){tk("axisPointer",e)},ik.type="axisPointer";var ek,nk=ik;function ik(){var t=null!==ek&&ek.apply(this,arguments)||this;return t.type=ik.type,t}function ok(t,e){var n,i,o,r,a=[],s=t.seriesIndex;return null==s||!(e=e.getSeriesByIndex(s))||null==(s=oa(n=e.getData(),t))||s<0||V(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(B(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 rk=i();function ak(t,e,n){var r,a,i,s,l,o,u,h,c,d,p,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 ck(v)&&(v=ok({seriesIndex:_.seriesIndex,dataIndex:_.dataIndex},e).point),r=ck(v),a=_.axesInfo,i=b.axesInfo,s="leave"===m||ck(v),l={},e={list:[],map:{}},u={showPointer:M(lk,o={}),showTooltip:M(uk,e)},nt(b.coordSysMap,function(t,e){var o=r||t.containPoint(v);nt(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))&&sk(t,i,u,!1,l)})}),h={},nt(i,function(n,t){var i=n.linkGroup;i&&!o[t]&&nt(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,hk(t),hk(n)))),h[n.key]=e)})}),nt(h,function(t,e){sk(i[e],t,u,!0,l)}),c=o,_=i,d=l.axesInfo=[],nt(_,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&&d.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}),m=e,_=t,e=x,ck(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",p=rk(_)[x]||{},f=rk(_)[x]={},nt(e,function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&t.triggerEmphasis&&nt(n.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;f[e]=t})}),g=[],y=[],nt(p,function(t,e){f[e]||y.push(t)}),nt(f,function(t,e){p[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 sk(t,e,n,i,o){var r,a,s,l,u,h,c,d,p,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,d=-1,nt(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.indicesOfNearest(l,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)&&((ne[1]&&e.reverse(),t.getExtent()),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var t=t-this.cx,e=e-this.cy,t=t*t+e*e,e=this.r,n=this.r0;return e!==n&&t-1e-4<=e*e&&n*n<=1e-4+t},x:this.cx-e[1],y:this.cy-e[1],width:2*e[1],height:2*e[1]}},Ok.prototype.convertToPixel=function(t,e,n){return Rk(e)===this?this.dataToPoint(n):null},Ok.prototype.convertFromPixel=function(t,e,n){return Rk(e)===this?this.pointToData(n):null},Ok);function Ok(t){this.dimensions=Lk,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Tk,this._angleAxis=new kk,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}function Rk(t){var e=t.seriesModel,t=t.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Nk(t,e){var n,i=this,o=i.getAngleAxis(),r=i.getRadiusAxis();o.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){var e;t.coordinateSystem===i&&(nt(l1(e=t.getData(),"radius"),function(t){r.scale.unionExtentFromData(e,t)}),nt(l1(e,"angle"),function(t){o.scale.unionExtentFromData(e,t)}))}),n1(o.scale,o.model),n1(r.scale,r.model),"category"!==o.type||o.onBand||(t=o.getExtent(),n=360/o.scale.count(),o.inverse?t[1]+=n:t[1]-=n,o.setExtent(t[0],t[1]))}function Ek(t,e){var n,i;t.type=e.get("type"),t.scale=i1(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType&&(t.inverse=t.inverse!==e.get("clockwise"),n=e.get("startAngle"),i=null!=(i=e.get("endAngle"))?i:n+(t.inverse?-360:360),t.setExtent(n,i)),(e.axis=t).model=e}var zk={dimensions:Lk,create:function(t,a){var s=[];return t.eachComponent("polar",function(t,e){var e=new Pk(e+""),n=(e.update=Nk,e.getRadiusAxis()),i=e.getAngleAxis(),o=t.findAxisModel("radiusAxis"),r=t.findAxisModel("angleAxis");Ek(n,o),Ek(i,r),n=e,o=a,r=(i=t).get("center"),o=Kp(i,o).refContainer,n.cx=Y(r[0],o.width)+o.x,n.cy=Y(r[1],o.height)+o.y,r=n.getRadiusAxis(),n=Math.min(o.width,o.height)/2,null==(o=i.get("radius"))?o=[0,"100%"]:V(o)||(o=[0,o]),i=[Y(o[0],n),Y(o[1],n)],r.inverse?r.setExtent(i[1],i[0]):r.setExtent(i[0],i[1]),s.push(e),(t.coordinateSystem=e).model=t}),t.eachSeries(function(t){var e;"polar"===t.get("coordinateSystem")&&(e=t.getReferringComponents("polar",la).models[0],t.coordinateSystem=e.coordinateSystem)}),s}},Bk=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Vk(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),t=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:t[0],y2:t[1]}}function Fk(t){return t.getRadiusAxis().inverse?0:1}function Gk(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}u(Yk,Wk=rD),Yk.prototype.render=function(e,t){var n,i,o,r,a,s;this.group.removeAll(),e.get("show")&&(n=e.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),r=n.getTicksCoords({breakTicks:"none"}),a=n.getMinorTicksCoords(),Gk(s=B(n.getViewLabels(),function(t){t=v(t);var e=n.scale,e="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(e),t})),Gk(r),nt(Bk,function(t){!e.get([t,"show"])||n.scale.isBlank()&&"axisLine"!==t||Uk[t](this.group,e,i,r,a,o,s)},this))},Yk.type="angleAxis";var Wk,Hk=Yk;function Yk(){var t=null!==Wk&&Wk.apply(this,arguments)||this;return t.type=Yk.type,t.axisPointerClass="PolarAxisPointer",t}var Xk,Uk={axisLine:function(t,e,n,i,o,r){var e=e.getModel(["axisLine","lineStyle"]),a=n.getAngleAxis(),s=Math.PI/180,l=a.getExtent(),u=Fk(n),h=u?0:1,c=360===Math.abs(l[1]-l[0])?"Circle":"Arc",c=0===r[h]?new ad[c]({shape:{cx:n.cx,cy:n.cy,r:r[u],startAngle:-l[0]*s,endAngle:-l[1]*s,clockwise:a.inverse},style:e.getLineStyle(),z2:1,silent:!0}):new bh({shape:{cx:n.cx,cy:n.cy,r:r[u],r0:r[h]},style:e.getLineStyle(),z2:1,silent:!0});c.style.fill=null,t.add(c)},axisTick:function(t,e,n,i,o,r){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=r[Fk(n)],r=B(i,function(t){return new Nh({shape:Vk(n,[l,l+s],t.coord)})});t.add(Ec(r,{style:z(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,o,r){if(o.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=r[Fk(n)],h=[],c=0;ca?"left":"right",o=Math.abs(r[1]-s)/o<.3?"middle":r[1]>s?"top":"bottom",l=(p&&p[i]&&E(s=p[i])&&s.textStyle&&(n=new Nd(s.textStyle,f,f.ecModel)),new _l({silent:fT.isLabelSilent(h),style:dd(n,{x:r[0],y:r[1],fill:n.getTextColor()||h.get(["axisLine","lineStyle","color"]),text:t.formattedLabel,align:a,verticalAlign:o})}));u.add(l),Qc({el:l,componentModel:h,itemName:t.formattedLabel,formatterParamsExtra:{isTruncated:function(){return l.isTruncated},value:t.rawLabel,tickIndex:e}}),y&&((i=fT.makeAxisEventDataBase(h)).targetType="axisLabel",i.value=t.rawLabel,U(l).eventData=i)},this)},splitLine:function(t,e,n,i,o,r){for(var a=e.getModel("splitLine").getModel("lineStyle"),s=0,l=(l=a.get("color"))instanceof Array?l:[l],u=[],h=0;hn[o],f=[-c.x,-c.y],e=(e||(f[i]=l[s]),[0,0]),s=[-d.x,-d.y],g=W(t.get("pageButtonGap",!0),t.get("itemGap",!0)),f=(p&&("end"===t.get("pageButtonPosition",!0)?s[i]+=n[o]-d[o]:e[i]+=d[o]+g),s[1-i]+=c[r]/2-d[r]/2,l.setPosition(f),u.setPosition(e),h.setPosition(s),{x:0,y:0}),c=(f[o]=(p?n:c)[o],f[r]=Math.max(c[r],d[r]),f[a]=Math.min(0,d[a]+s[1-i]),u.__rectSize=n[o],p?((e={x:0,y:0})[o]=Math.max(n[o]-d[o]-g,0),e[r]=f[r],u.setClipPath(new pl({shape:e})),u.__rectSize=e[o]):h.eachChild(function(t){t.attr({invisible:!0,silent:!0})}),this._getPageInfo(t));return null!=c.pageIndex&&vc(l,{x:c.contentPosition[0],y:c.contentPosition[1]},p?t:null),this._updatePageInfoView(t,c),f},zA.prototype._pageGo=function(t,e,n){t=this._getPageInfo(e)[t];null!=t&&n.dispatchAction({type:"legendScroll",scrollDataIndex:t,legendId:e.id})},zA.prototype._updatePageInfoView=function(n,i){var o=this._controllerGroup,t=(nt(["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",F(e)?e.replace("{current}",null==r?"":r+"").replace("{total}",null==a?"":a+""):e({current:r,total:a}))},zA.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,t=t.getOrient().index,o=RA[t],r=NA[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,d=n,p=n,f=null;c<=l;++c)(!(f=g(a[c]))&&p.e>d.s+i||f&&!y(f,d.s))&&(d=p.i>d.i?p:f)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=d.i),++h.pageCount),p=f;for(c=e-1,d=n,p=n,f=null;-1<=c;--c)(f=g(a[c]))&&y(p,f.s)||!(d.i=e&&t.s<=e+i}},zA.prototype._findTargetItemIndex=function(n){var i,o;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},zA.type="legend.scroll",zA);function zA(){var t=null!==PA&&PA.apply(this,arguments)||this;return t.type=zA.type,t.newlineDisabled=!0,t._currentIndex=0,t}y1(function(t){y1(CA),t.registerComponentModel(kA),t.registerComponentView(EA),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)})})});u(FA,BA=g),FA.type="tooltip",FA.dependencies=["axisPointer"],FA.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:_.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:_.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:_.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:_.color.tertiary,fontSize:14}};var BA,VA=FA;function FA(){var t=null!==BA&&BA.apply(this,arguments)||this;return t.type=FA.type,t}function GA(t){var e=t.get("confine");return null!=e?e:"richText"===t.get("renderMode")}function WA(t){if(w.domSupported)for(var e=document.documentElement.style,n=0,i=t.length;n'):""),F(t))r.innerHTML=t+c;else if(t){r.innerHTML="",V(t)||(t=[t]);for(var d,p=0;p"),r=f.join(e);this._showOrMove(i,function(){this._updateContentNotChangedOnAxis(t,d)?this._updatePosition(i,o,n[0],n[1],this._tooltipContent,d):this._showTooltipContent(i,r,d,Math.random()+"",n[0],n[1],o,null,g)})},sL.prototype._showSeriesItemTooltip=function(t,e,n){var i,o,r,a,s,l=this._ecModel,e=U(e),u=e.seriesIndex,h=l.getSeriesByIndex(u),c=e.dataModel||h,d=e.dataIndex,e=e.dataType,p=c.getData(e),f=this._renderMode,g=t.positionDefault,y=lL([p.getItemModel(d),c,h&&(h.coordinateSystem||{}).model],this._tooltipModel,g?{position:g}:null),h=y.get("trigger");null!=h&&"item"!==h||(i=c.getDataParams(d,e),o=new $y,i.marker=o.makeTooltipMarker("item",Lp(i.color),f),g=Hg(c.formatTooltip(d,!1,e)),h=y.get("order"),e=y.get("valueFormatter"),r=g.frag,a=r?Uy(e?P({valueFormatter:e},r):r,o,f,h,l.get("useUTC"),y.get("textStyle")):g.text,s="item_"+c.name+"_"+d,this._showOrMove(y,function(){this._showTooltipContent(y,a,i,s,t.offsetX,t.offsetY,t.position,t.target,o)}),n({type:"showTip",dataIndexInside:d,dataIndex:p.getRawIndex(d),seriesIndex:u,from:this.uid}))},sL.prototype._showComponentItemTooltip=function(e,n,t){var i="html"===this._renderMode,o=U(n),r=o.tooltipConfig.option||{},a=r.encodeHTMLContent,a=(F(r)&&(r={content:r,formatter:r},a=!0),a&&i&&r.content&&((r=v(r)).content=Se(r.content)),[r]),i=this._ecModel.getComponent(o.componentMainType,o.componentIndex),o=(i&&a.push(i),a.push({formatter:r.content}),e.positionDefault),s=lL(a,this._tooltipModel,o?{position:o}:null),l=s.get("content"),u=Math.random()+"",h=new $y;this._showOrMove(s,function(){var t=v(s.get("formatterParams")||{});this._showTooltipContent(s,l,t,u,e.offsetX,e.offsetY,e.position,n,h)}),t({type:"showTip",from:this.uid})},sL.prototype._showTooltipContent=function(n,t,i,e,o,r,a,s,l){var u,h,c,d,p;this._ticket="",n.get("showContent")&&n.get("show")&&((u=this._tooltipContent).setEnterable(n.get("enterable")),h=n.get("formatter"),a=a||n.get("position"),t=t,c=this._getNearestPoint([o,r],i,n.get("trigger"),n.get("borderColor"),n.get("defaultBorderColor",!0)).color,h&&(t=F(h)?(d=n.ecModel.get("useUTC"),t=h,kp(t=(p=V(i)?i[0]:i)&&p.axisType&&0<=p.axisType.indexOf("time")?sp(p.axisValue,t,d):t,i,!0)):N(h)?(p=S(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,h(i,e,p)):h),u.setContent(t,l,n,c,a),u.show(n,c),this._updatePosition(n,a,o,r,u,i,s))},sL.prototype._getNearestPoint=function(t,e,n,i,o){return"axis"===n||V(e)?{color:i||o}:V(e)?void 0:{color:i||e.color||e.borderColor}},sL.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"),d=t.get("verticalAlign"),p=a&&a.getBoundingRect().clone();a&&p.applyTransform(a.transform),V(e=N(e)?e([n,i],r,o.el,p,{viewSize:[l,u],contentSize:h.slice()}):e)?(n=Y(e[0],l),i=Y(e[1],u)):E(e)?((r=e).width=h[0],r.height=h[1],n=(r=jp(r,{width:l,height:u})).x,i=r.y,d=c=null):i=(n=(s=F(e)&&a?function(t,e,n,i){var o=n[0],r=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-o/2,l=e.y+h/2-r/2;break;case"top":s=e.x+u/2-o/2,l=e.y-r-a;break;case"bottom":s=e.x+u/2-o/2,l=e.y+h+a;break;case"left":s=e.x-o-a,l=e.y+h/2-r/2;break;case"right":s=e.x+u+a,l=e.y+h/2-r/2}return[s,l]}(e,p,h,t.get("borderWidth")):function(t,e,n,i,o,r,a){var n=n.getSize(),s=n[0],n=n[1];null!=r&&(ih[0]?s:o)[0]:r[0]=(a[0]>h[0]?o:s)[0],"y0"===n[1]?r[1]=(a[1]>h[1]?s:o)[1]:r[1]=(a[1]>h[1]?o:s)[1],i.getMarkerPosition(r,n,!0)):(a=[l=t.get(n[0],e),u=t.get(n[1],e)],c.clampData&&c.clampData(a,a),c.dataToPoint(a,!0)),_w(c,"cartesian2d")&&(o=c.getAxis("x"),s=c.getAxis("y"),l=t.get(n[0],e),u=t.get(n[1],e),QL(l)?h[0]=o.toGlobalCoord(o.getExtent()["x0"===n[0]?0:1]):QL(u)&&(h[1]=s.toGlobalCoord(s.getExtent()["y0"===n[1]?0:1]))),isNaN(p)||(h[0]=p),isNaN(d)||(h[1]=d)):h=[p,d],h}var nP,iP=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],oP=(u(rP,nP=_a),rP.prototype.updateTransform=function(t,e,o){e.eachSeries(function(n){var i,t=gL.getMarkerModelFromSeries(n,"markArea");t&&(i=t.getData()).each(function(e){var t=B(iP,function(t){return eP(i,e,t,n,o)});i.setItemLayout(e,t),i.getItemGraphicEl(e).setShape("points",t)})},this)},rP.prototype.renderSeries=function(a,o,t,s){var l=a.coordinateSystem,e=a.id,u=a.getData(),n=this.markerGroupMap,r=n.get(e)||n.set(e,{group:new cr}),h=(this.group.add(r.group),this.markKeep(r),function(t,n,e){var i,o;{var r;i=t?(r=B(t&&t.dimensions,function(t){var e=n.getData();return P(P({},e.getDimensionInfo(e.mapDimension(t))||{}),{name:t,ordinalMeta:null})}),o=B(["x0","y0","x1","y1"],function(t,e){return{name:t,type:r[e%2].type}}),new H_(o,e)):new H_(o=[{name:"value",type:"float"}],e)}e=B(e.get("data"),M(KL,n,t,e));t&&(e=ht(e,M(tP,t)));t=t?function(t,e,n,i){return ny(t.coord[Math.floor(i/2)][i%2],o[i])}:function(t,e,n,i){return ny(t.value,o[i])};return i.initData(e,null,t),i.hasItemOption=!0,i}(l,a,o));o.setData(h),h.each(function(e){var t=B(iP,function(t){return eP(h,e,t,a,s)}),n=l.getAxis("x").scale,i=l.getAxis("y").scale,o=n.getExtent(),r=i.getExtent(),n=[n.parse(h.get("x0",e)),n.parse(h.get("x1",e))],i=[i.parse(h.get("y0",e)),i.parse(h.get("y1",e))],o=(kr(n),kr(i),!(o[0]>n[1]||o[1]i[1]||r[1]r&&(e[1-i]=e[i]+n.sign*r)}function wP(t,e){t=t[e]-t[1-e];return{span:Math.abs(t),sign:0e[1]&&(e[1]=t[1])})}),[(e=Jx((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())},BP.prototype.filterData=function(t,e){var o,n,r,c;t===this._dataZoomModel&&(o=this._dimName,n=this.getTargetSeriesModels(),r=t.get("filterMode"),c=this._valueWindow,"none"!==r)&&NP(n,function(n){var l,u,i=n.getData(),h=i.mapDimensionsAll(o);h.length&&("weakFilter"===r?(l=i.getStore(),u=B(h,function(t){return i.getDimensionIndex(t)},i),i.filterSelf(function(t){for(var e,n,i,o=0;oc[1];if(a&&!s&&!r)return!0;a&&(i=!0),s&&(e=!0),r&&(n=!0)}return i&&e&&n})):NP(h,function(t){var e;"empty"===r?n.setData(i=i.map(t,function(t){return(e=t)>=c[0]&&e<=c[1]?t:NaN;var e})):((e={})[t]=c,i.selectRange(e))}),NP(h,function(t){i.setApproximateExtent(c,t)}))})},BP.prototype._updateMinMaxSpan=function(){var i=this._minMaxSpan={},o=this._dataZoomModel,r=this._dataExtent;NP(["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=Ir(r[0]+n,r,[0,100],!0):null!=e&&(n=Ir(e,[0,100],r,!0)-r[0]),i[t+"Span"]=e,i[t+"ValueSpan"]=n},this)},BP.prototype._setAxisModel=function(){var t,e=this.getAxisModel(),n=this._percentWindow,i=this._valueWindow;n&&(t=Pr(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())},BP);function BP(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}var VP={getTargetSeries:function(r){function t(o){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(t,e){var n=r.getComponent(lP(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 zP(t,e,i,r),o.push(n.__dzAxisProxy))}),it());return nt(o,function(t){nt(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 FP=!1;function GP(t){FP||(FP=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,VP),t.registerAction("dataZoom",function(e,t){nt(uP(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 WP(t){GP(t),t.registerComponentModel(mP),t.registerComponentView(AP),DP(t)}u(XP,HP=c0),XP.type="dataZoom.slider",XP.layoutMode="box",XP.defaultOption=Vd(c0.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:_.color.accent10,borderRadius:0,backgroundColor:_.color.transparent,dataBackground:{lineStyle:{color:_.color.accent30,width:.5},areaStyle:{color:_.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:_.color.accent40,width:.5},areaStyle:{color:_.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:_.color.neutral00,borderColor:_.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:_.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:_.color.tertiary},brushSelect:!0,brushStyle:{color:_.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:_.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15});var HP,YP=XP;function XP(){var t=null!==HP&&HP.apply(this,arguments)||this;return t.type=XP.type,t}var UP,ZP=pl,jP="horizontal",qP="vertical",KP=["line","bar","candlestick","scatter"],$P={easing:"cubicOut",duration:100,delay:0},QP=(u(JP,UP=jh),JP.prototype.init=function(t,e){this.api=e,this._onBrush=S(this._onBrush,this),this._onBrushEnd=S(this._onBrushEnd,this)},JP.prototype.render=function(t,e,n,i){UP.prototype.render.apply(this,arguments),Cm(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())},JP.prototype.dispose=function(){this._clear(),UP.prototype.dispose.apply(this,arguments)},JP.prototype._clear=function(){Dm(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},JP.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 cr);this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},JP.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,e=Kp(t,e).refContainer,i=this._findCoordRect(),o=t.get("defaultLocationEdgeGap",!0)||0,r=this._orient===jP?{right:e.width-i.x-i.width,top:e.height-30-o-n,width:i.width,height:30}:{right:o,top:i.y,width:30,height:i.height},a=Jp(t.option),n=(nt(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=r[t])}),jp(a,e));this._location={x:n.x,y:n.y},this._size=[n.width,n.height],this._orient===qP&&this._size.reverse()},JP.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!==jP||i?n===jP&&i?{scaleY:r?1:-1,scaleX:-1}:n!==qP||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()},JP.prototype._getViewExtent=function(){return[0,this._size[0]]},JP.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect"),t=(n.add(new ZP({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),new ZP({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)},JP.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=this._shadowSize||[],i=t.series,o=i.getRawData(),r=i.getShadowDim&&i.getShadowDim(),r=r&&o.getDimensionInfo(r)?i.getShadowDim():t.otherDim;if(null!=r)for(var a,s,l,u,h,c,d,p,f,g,y,m,v,_=this._shadowPolygonPts,x=this._shadowPolylinePts,b=(o===this._shadowData&&r===this._shadowDim&&e[0]===n[0]&&e[1]===n[1]||(a=o.getDataExtent(t.thisDim),i=.3*((s=o.getDataExtent(r))[1]-s[0]),s=[s[0]-i,s[1]+i],l=[0,e[1]],n=[0,e[0]],u=[[e[0],0],[0,0]],h=[],c=n[1]/Math.max(1,o.count()-1),d=e[0]/(a[1]-a[0]),p="time"===t.thisAxis.type,f=-c,g=Math.round(o.count()/e[0]),o.each([t.thisDim,r],function(t,e,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))},JP.prototype._onBrushStart=function(t){var e=t.offsetX,t=t.offsetY;this._brushStart=new H(e,t),this._brushing=!0,this._brushStartTime=+new Date},JP.prototype._onBrushEnd=function(t){var e,n,i,o;this._brushing&&(i=this._displayables.brushRect,this._brushing=!1,i)&&(i.attr("ignore",!0),i=i.shape,+new Date-this._brushStartTime<200&&Math.abs(i.width)<5||(e=this._getViewExtent(),n=[0,100],bP(0,i=this._handleEnds=[i.x,i.x+i.width],e,0,null!=(o=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan()).minSpan?Ir(o.minSpan,n,e,!0):null,null!=o.maxSpan?Ir(o.maxSpan,n,e,!0):null),this._range=kr([Ir(i[0],e,n,!0),Ir(i[1],e,n,!0)]),this._updateView(),this._dispatchZoomAction(!1)))},JP.prototype._onBrush=function(t){this._brushing&&(Le(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},JP.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect,i=(o||(o=n.brushRect=new ZP({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]})},JP.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?$P:null,start:e[0],end:e[1]})},JP.prototype._findCoordRect=function(){var t,e,n=hP(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}},JP.type="dataZoom.slider",JP);function JP(){var t=null!==UP&&UP.apply(this,arguments)||this;return t.type=JP.type,t._displayables={},t}function tO(t){t.registerComponentModel(YP),t.registerComponentView(QP),GP(t)}y1(function(t){y1(WP),y1(tO)}),y1(iw);var eO={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},nO=(iO.prototype.evaluate=function(t){var e=typeof t;return F(e)?this._condVal.test(t):!!G(e)&&this._condVal.test(t+"")},iO);function iO(t){null==(this._condVal=F(t)?new RegExp(t):_t(t)?t:null)&&f("")}rO.prototype.evaluate=function(){return this.value};var oO=rO;function rO(){}sO.prototype.evaluate=function(){for(var t=this.children,e=0;e