import{g as GN,R as FN,d as HN}from"./react-vendor-DgfcBpad.js";/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var lm=function(r,t){return lm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])},lm(r,t)};function N(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");lm(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var Nu=function(){return Nu=Object.assign||function(t){for(var e,a=1,n=arguments.length;a0&&i[i.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]"u"&&typeof self<"u"?Mt.worker=!0:!Mt.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Mt.node=!0,Mt.svgSupported=!0):XN(navigator.userAgent,Mt);function XN(r,t){var e=t.browser,a=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),i=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);a&&(e.firefox=!0,e.version=a[1]),n&&(e.ie=!0,e.version=n[1]),i&&(e.edge=!0,e.version=i[1],e.newEdge=+i[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11);var s=t.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in l||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}}var x_=12,TI="sans-serif",pn=x_+"px "+TI,ZN=20,$N=100,qN="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function KN(r){var t={};if(typeof JSON>"u")return t;for(var e=0;e=0)s=o*e.length;else for(var l=0;l=eB&&(Td=0),Td++}function Mp(){for(var r=[],t=0;t>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",a[l]+":0",n[u]+":0",a[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return t.clearMarkers=function(){A(e,function(f){f.parentNode&&f.parentNode.removeChild(f)})},e}function SB(r,t,e){for(var a=e?"invTrans":"trans",n=t[a],i=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),v=2*u,h=f.left,c=f.top;o.push(h,c),l=l&&i&&h===i[v]&&c===i[v+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(t.srcCoords=o,t[a]=e?Ax(s,o):Ax(o,s))}function OI(r){return r.nodeName.toUpperCase()==="CANVAS"}var xB=/([&<>"'])/g,bB={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ue(r){return r==null?"":(r+"").replace(xB,function(t,e){return bB[e]})}var wB=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ad=[],TB=Mt.browser.firefox&&+Mt.browser.version.split(".")[0]<39;function cm(r,t,e,a){return e=e||{},a?Mx(r,t,e):TB&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):Mx(r,t,e),e}function Mx(r,t,e){if(Mt.domSupported&&r.getBoundingClientRect){var a=t.clientX,n=t.clientY;if(OI(r)){var i=r.getBoundingClientRect();e.zrX=a-i.left,e.zrY=n-i.top;return}else if(hm(Ad,r,a,n)){e.zrX=Ad[0],e.zrY=Ad[1];return}}e.zrX=e.zrY=0}function D_(r){return r||window.event}function Dr(r,t,e){if(t=D_(t),t.zrX!=null)return t;var a=t.type,n=a&&a.indexOf("touch")>=0;if(n){var o=a!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&cm(r,o,t,e)}else{cm(r,t,t,e);var i=CB(t);t.zrDelta=i?i/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&wB.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function CB(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,a=r.deltaY;if(e==null||a==null)return t;var n=Math.abs(a!==0?a:e),i=a>0?-1:a<0?1:e>0?-1:1;return 3*n*i}function pm(r,t,e,a){r.addEventListener(t,e,a)}function AB(r,t,e,a){r.removeEventListener(t,e,a)}var dn=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function Dx(r){return r.which===2||r.which===3}var MB=(function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,a){return this._doTrack(t,e,a),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,a){var n=t.touches;if(n){for(var i={points:[],touches:[],target:e,event:t},o=0,s=n.length;o1&&a&&a.length>1){var i=Ix(a)/Ix(n);!isFinite(i)&&(i=1),t.pinchScale=i;var o=DB(a);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function Kt(){return[1,0,0,1,0,0]}function Wo(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function ri(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function _r(r,t,e){var a=t[0]*e[0]+t[2]*e[1],n=t[1]*e[0]+t[3]*e[1],i=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=a,r[1]=n,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function ta(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function Cn(r,t,e,a){a===void 0&&(a=[0,0]);var n=t[0],i=t[2],o=t[4],s=t[1],l=t[3],u=t[5],f=Math.sin(e),v=Math.cos(e);return r[0]=n*v+s*f,r[1]=-n*f+s*v,r[2]=i*v+l*f,r[3]=-i*f+v*l,r[4]=v*(o-a[0])+f*(u-a[1])+a[0],r[5]=v*(u-a[1])-f*(o-a[0])+a[1],r}function Lp(r,t,e){var a=e[0],n=e[1];return r[0]=t[0]*a,r[1]=t[1]*n,r[2]=t[2]*a,r[3]=t[3]*n,r[4]=t[4]*a,r[5]=t[5]*n,r}function Sr(r,t){var e=t[0],a=t[2],n=t[4],i=t[1],o=t[3],s=t[5],l=e*o-i*a;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-a*l,r[3]=e*l,r[4]=(a*s-o*n)*l,r[5]=(i*n-e*s)*l,r):null}function NI(r){var t=Kt();return ri(t,r),t}const IB=Object.freeze(Object.defineProperty({__proto__:null,clone:NI,copy:ri,create:Kt,identity:Wo,invert:Sr,mul:_r,rotate:Cn,scale:Lp,translate:ta},Symbol.toStringTag,{value:"Module"}));var ut=(function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,a=this.y-t.y;return Math.sqrt(e*e+a*a)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,a=this.y-t.y;return e*e+a*a},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(t){var e=this.x,a=this.y;return this.x=t[0]*e+t[2]*a+t[4],this.y=t[1]*e+t[3]*a+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,a){t.x=e,t.y=a},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,a){t.x=e.x+a.x,t.y=e.y+a.y},r.sub=function(t,e,a){t.x=e.x-a.x,t.y=e.y-a.y},r.scale=function(t,e,a){t.x=e.x*a,t.y=e.y*a},r.scaleAndAdd=function(t,e,a,n){t.x=e.x+a.x*n,t.y=e.y+a.y*n},r.lerp=function(t,e,a,n){var i=1-n;t.x=i*e.x+n*a.x,t.y=i*e.y+n*a.y},r})(),eo=Math.min,Rs=Math.max,dm=Math.abs,Lx=["x","y"],LB=["width","height"],gi=new ut,yi=new ut,mi=new ut,_i=new ut,pr=zI(),wu=pr.minTv,gm=pr.maxTv,Gu=[0,0],ot=(function(){function r(t,e,a,n){Dd(this,t,e,a,n)}return r.set=function(t,e,a,n,i){return n<0&&(e=e+n,n=-n),i<0&&(a=a+i,i=-i),t.x=e,t.y=a,t.width=n,t.height=i,t},r.prototype.union=function(t){var e=eo(t.x,this.x),a=eo(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Rs(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Rs(t.y+t.height,this.y+this.height)-a:this.height=t.height,this.x=e,this.y=a},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){return BI(Kt(),this,t)},r.prototype.intersect=function(t,e,a){return r.intersect(this,t,e,a)},r.intersect=function(t,e,a,n){a&&ut.set(a,0,0);var i=n&&n.outIntersectRect||null,o=n&&n.clamp;if(i&&(i.x=i.y=i.width=i.height=NaN),!t||!e)return!1;t instanceof r||(t=Dd(RB,t.x,t.y,t.width,t.height)),e instanceof r||(e=Dd(EB,e.x,e.y,e.width,e.height));var s=!!a;pr.reset(n,s);var l=pr.touchThreshold,u=t.x+l,f=t.x+t.width-l,v=t.y+l,h=t.y+t.height-l,c=e.x+l,p=e.x+e.width-l,d=e.y+l,g=e.y+e.height-l;if(u>f||v>h||c>p||d>g)return!1;var y=!(f=t.x&&e<=t.x+t.width&&a>=t.y&&a<=t.y+t.height},r.prototype.contain=function(t,e){return r.contain(this,t,e)},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){js(this,t)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(t){return new r(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},r.copy=function(t,e){return t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t},r.applyTransform=function(t,e,a){if(!a){t!==e&&js(t,e);return}if(a[1]<1e-5&&a[1]>-1e-5&&a[2]<1e-5&&a[2]>-1e-5){var n=a[0],i=a[3],o=a[4],s=a[5];t.x=e.x*n+o,t.y=e.y*i+s,t.width=e.width*n,t.height=e.height*i,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}gi.x=mi.x=e.x,gi.y=_i.y=e.y,yi.x=_i.x=e.x+e.width,yi.y=mi.y=e.y+e.height,gi.transform(a),_i.transform(a),yi.transform(a),mi.transform(a),t.x=eo(gi.x,yi.x,mi.x,_i.x),t.y=eo(gi.y,yi.y,mi.y,_i.y);var l=Rs(gi.x,yi.x,mi.x,_i.x),u=Rs(gi.y,yi.y,mi.y,_i.y);t.width=l-t.x,t.height=u-t.y},r.calculateTransform=function(t,e,a){var n=a.width/e.width,i=a.height/e.height;return t=Wo(t||[]),ta(t,t,on(Id,-e.x,-e.y)),Lp(t,t,on(Id,n,i)),ta(t,t,on(Id,a.x,a.y)),t},r})(),Pp=ot.create,Dd=ot.set,js=ot.copy,BI=ot.calculateTransform,VI=ot.applyTransform,PB=ot.contain,RB=new ot(0,0,0,0),EB=new ot(0,0,0,0),Id=[];function Px(r,t,e,a,n,i,o,s){var l=dm(t-e),u=dm(a-r),f=eo(l,u),v=Lx[n],h=Lx[1-n],c=LB[n];t=u||!pr.bidirectional)&&(wu[v]=-u,wu[h]=0,pr.useDir&&pr.calcDirMTV())))}function zI(){var r=0,t=new ut,e=new ut,a={minTv:new ut,maxTv:new ut,useDir:!1,dirMinTv:new ut,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,o){a.touchThreshold=0,i&&i.touchThreshold!=null&&(a.touchThreshold=Rs(0,i.touchThreshold)),a.negativeSize=!1,o&&(a.minTv.set(1/0,1/0),a.maxTv.set(0,0),a.useDir=!1,i&&i.direction!=null&&(a.useDir=!0,a.dirMinTv.copy(a.minTv),e.copy(a.minTv),r=i.direction,a.bidirectional=i.bidirectional==null||!!i.bidirectional,a.bidirectional||t.set(Math.cos(r),Math.sin(r))))},calcDirMTV:function(){var i=a.minTv,o=a.dirMinTv,s=i.y*i.y+i.x*i.x,l=Math.sin(r),u=Math.cos(r),f=l*i.y+u*i.x;if(n(f)){n(i.x)&&n(i.y)&&o.set(0,0);return}if(e.x=s*u/f,e.y=s*l/f,n(e.x)&&n(e.y)){o.set(0,0);return}(a.bidirectional||t.dot(e)>0)&&e.len()=0;v--){var h=i[v];h!==n&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(Ld.copy(h.getBoundingRect()),h.transform&&Ld.applyTransform(h.transform),Ld.intersect(f)&&s.push(h))}if(s.length)for(var c=4,p=Math.PI/12,d=Math.PI*2,g=0;g4)return;this._downPoint=null}this.dispatchToElement(i,r,t)}});function VB(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var a=r,n=void 0,i=!1;a;){if(a.ignoreClip&&(i=!0),!i){var o=a.getClipPath();if(o&&!o.contain(t,e))return!1}a.silent&&(n=!0);var s=a.__hostTarget;a=s?a.ignoreHostSilent?null:s:a.parent}return n?GI:!0}return!1}function Rx(r,t,e,a,n){for(var i=r.length-1;i>=0;i--){var o=r[i],s=void 0;if(o!==n&&!o.ignore&&(s=VB(o,e,a))&&(!t.topTarget&&(t.topTarget=o),s!==GI)){t.target=o;break}}}function HI(r,t,e){var a=r.painter;return t<0||t>a.getWidth()||e<0||e>a.getHeight()}var WI=32,Fl=7;function zB(r){for(var t=0;r>=WI;)t|=r&1,r>>=1;return r+t}function Ex(r,t,e,a){var n=t+1;if(n===e)return 1;if(a(r[n++],r[t])<0){for(;n=0;)n++;return n-t}function GB(r,t,e){for(e--;t>>1,n(i,r[l])<0?s=l:o=l+1;var u=a-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=i}}function Pd(r,t,e,a,n,i){var o=0,s=0,l=1;if(i(r,t[e+n])>0){for(s=a-n;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o>>1);i(r,t[e+f])>0?o=f+1:l=f}return l}function Rd(r,t,e,a,n,i){var o=0,s=0,l=1;if(i(r,t[e+n])<0){for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=a-n;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o>>1);i(r,t[e+f])<0?l=f:o=f+1}return l}function FB(r,t){var e=Fl,a,n,i=0,o=[];a=[],n=[];function s(c,p){a[i]=c,n[i]=p,i+=1}function l(){for(;i>1;){var c=i-2;if(c>=1&&n[c-1]<=n[c]+n[c+1]||c>=2&&n[c-2]<=n[c]+n[c-1])n[c-1]n[c+1])break;f(c)}}function u(){for(;i>1;){var c=i-2;c>0&&n[c-1]=Fl||w>=Fl);if(C)break;x<0&&(x=0),x+=2}if(e=x,e<1&&(e=1),p===1){for(y=0;y=0;y--)r[b+y]=r[x+y];r[S]=o[_];return}for(var w=e;;){var C=0,T=0,M=!1;do if(t(o[_],r[m])<0){if(r[S--]=r[m--],C++,T=0,--p===0){M=!0;break}}else if(r[S--]=o[_--],T++,C=0,--g===1){M=!0;break}while((C|T)=0;y--)r[b+y]=r[x+y];if(p===0){M=!0;break}}if(r[S--]=o[_--],--g===1){M=!0;break}if(T=g-Pd(r[m],o,0,g,g-1,t),T!==0){for(S-=T,_-=T,g-=T,b=S+1,x=_+1,y=0;y=Fl||T>=Fl);if(M)break;w<0&&(w=0),w+=2}if(e=w,e<1&&(e=1),g===1){for(S-=p,m-=p,b=S+1,x=m+1,y=p-1;y>=0;y--)r[b+y]=r[x+y];r[S]=o[_]}else{if(g===0)throw new Error;for(x=S-(g-1),y=0;ys&&(l=s),kx(r,e,e+l,e+i,t),i=l}o.pushRun(e,i),o.mergeRuns(),n-=i,e+=i}while(n!==0);o.forceMergeRuns()}}var lr=1,Tu=2,Ds=4,Ox=!1;function Ed(){Ox||(Ox=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Nx(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var HB=(function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Nx}return r.prototype.traverse=function(t,e){for(var a=0;a=0&&this._roots.splice(n,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r})(),sc;sc=Mt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var Fu={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var t,e=.1,a=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=a/4):t=a*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/a)))},elasticOut:function(r){var t,e=.1,a=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=a/4):t=a*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/a)+1)},elasticInOut:function(r){var t,e=.1,a=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=a/4):t=a*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/a)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/a)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-Fu.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?Fu.bounceIn(r*2)*.5:Fu.bounceOut(r*2-1)*.5+.5}},cv=Math.pow,$n=Math.sqrt,lc=1e-8,UI=1e-4,Bx=$n(3),pv=1/3,da=vi(),Rr=vi(),Gs=vi();function Fn(r){return r>-lc&&rlc||r<-lc}function _e(r,t,e,a,n){var i=1-n;return i*i*(i*r+3*n*t)+n*n*(n*a+3*i*e)}function Vx(r,t,e,a,n){var i=1-n;return 3*(((t-r)*i+2*(e-t)*n)*i+(a-e)*n*n)}function uc(r,t,e,a,n,i){var o=a+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-n,f=s*s-3*o*l,v=s*l-9*o*u,h=l*l-3*s*u,c=0;if(Fn(f)&&Fn(v))if(Fn(s))i[0]=0;else{var p=-l/s;p>=0&&p<=1&&(i[c++]=p)}else{var d=v*v-4*f*h;if(Fn(d)){var g=v/f,p=-s/o+g,y=-g/2;p>=0&&p<=1&&(i[c++]=p),y>=0&&y<=1&&(i[c++]=y)}else if(d>0){var m=$n(d),_=f*s+1.5*o*(-v+m),S=f*s+1.5*o*(-v-m);_<0?_=-cv(-_,pv):_=cv(_,pv),S<0?S=-cv(-S,pv):S=cv(S,pv);var p=(-s-(_+S))/(3*o);p>=0&&p<=1&&(i[c++]=p)}else{var x=(2*f*s-3*o*v)/(2*$n(f*f*f)),b=Math.acos(x)/3,w=$n(f),C=Math.cos(b),p=(-s-2*w*C)/(3*o),y=(-s+w*(C+Bx*Math.sin(b)))/(3*o),T=(-s+w*(C-Bx*Math.sin(b)))/(3*o);p>=0&&p<=1&&(i[c++]=p),y>=0&&y<=1&&(i[c++]=y),T>=0&&T<=1&&(i[c++]=T)}}return c}function XI(r,t,e,a,n){var i=6*e-12*t+6*r,o=9*t+3*a-3*r-9*e,s=3*t-3*r,l=0;if(Fn(o)){if(YI(i)){var u=-s/i;u>=0&&u<=1&&(n[l++]=u)}}else{var f=i*i-4*o*s;if(Fn(f))n[0]=-i/(2*o);else if(f>0){var v=$n(f),u=(-i+v)/(2*o),h=(-i-v)/(2*o);u>=0&&u<=1&&(n[l++]=u),h>=0&&h<=1&&(n[l++]=h)}}return l}function ai(r,t,e,a,n,i){var o=(t-r)*n+r,s=(e-t)*n+t,l=(a-e)*n+e,u=(s-o)*n+o,f=(l-s)*n+s,v=(f-u)*n+u;i[0]=r,i[1]=o,i[2]=u,i[3]=v,i[4]=v,i[5]=f,i[6]=l,i[7]=a}function ZI(r,t,e,a,n,i,o,s,l,u,f){var v,h=.005,c=1/0,p,d,g,y;da[0]=l,da[1]=u;for(var m=0;m<1;m+=.05)Rr[0]=_e(r,e,n,o,m),Rr[1]=_e(t,a,i,s,m),g=Zn(da,Rr),g=0&&g=0&&u<=1&&(n[l++]=u)}}else{var f=o*o-4*i*s;if(Fn(f)){var u=-o/(2*i);u>=0&&u<=1&&(n[l++]=u)}else if(f>0){var v=$n(f),u=(-o+v)/(2*i),h=(-o-v)/(2*i);u>=0&&u<=1&&(n[l++]=u),h>=0&&h<=1&&(n[l++]=h)}}return l}function $I(r,t,e){var a=r+e-2*t;return a===0?.5:(r-t)/a}function ef(r,t,e,a,n){var i=(t-r)*a+r,o=(e-t)*a+t,s=(o-i)*a+i;n[0]=r,n[1]=i,n[2]=s,n[3]=s,n[4]=o,n[5]=e}function qI(r,t,e,a,n,i,o,s,l){var u,f=.005,v=1/0;da[0]=o,da[1]=s;for(var h=0;h<1;h+=.05){Rr[0]=Me(r,e,n,h),Rr[1]=Me(t,a,i,h);var c=Zn(da,Rr);c=0&&c=1?1:uc(0,a,i,1,l,s)&&_e(0,n,o,1,s[0])}}}var ZB=(function(){function r(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||te,this.ondestroy=t.ondestroy||te,this.onrestart=t.onrestart||te,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var a=this._life,n=t-this._startTime-this._pausedTime,i=n/a;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,s=o?o(i):i;if(this.onframe(s),i===1)if(this.loop){var l=n%a;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(t){this.easing=t,this.easingFunc=at(t)?t:Fu[t]||I_(t)},r})(),KI=(function(){function r(t){this.value=t}return r})(),$B=(function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new KI(t);return this.insertEntry(e),e},r.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},r.prototype.remove=function(t){var e=t.prev,a=t.next;e?e.next=a:this.head=a,a?a.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r})(),Js=(function(){function r(t){this._list=new $B,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var a=this._list,n=this._map,i=null;if(n[t]==null){var o=a.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=a.head;a.remove(l),delete n[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new KI(e),s.key=t,a.insertEntry(s),n[t]=s}return i},r.prototype.get=function(t){var e=this._map[t],a=this._list;if(e!=null)return e!==a.tail&&(a.remove(e),a.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r})(),zx={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Kr(r){return r=Math.round(r),r<0?0:r>255?255:r}function qB(r){return r=Math.round(r),r<0?0:r>360?360:r}function rf(r){return r<0?0:r>1?1:r}function Rh(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?Kr(parseFloat(t)/100*255):Kr(parseInt(t,10))}function sn(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?rf(parseFloat(t)/100):rf(parseFloat(t))}function kd(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function Hn(r,t,e){return r+(t-r)*e}function Ar(r,t,e,a,n){return r[0]=t,r[1]=e,r[2]=a,r[3]=n,r}function mm(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var jI=new Js(20),dv=null;function ns(r,t){dv&&mm(dv,t),dv=jI.put(r,dv||t.slice())}function Xe(r,t){if(r){t=t||[];var e=jI.get(r);if(e)return mm(t,e);r=r+"";var a=r.replace(/ /g,"").toLowerCase();if(a in zx)return mm(t,zx[a]),ns(r,t),t;var n=a.length;if(a.charAt(0)==="#"){if(n===4||n===5){var i=parseInt(a.slice(1,4),16);if(!(i>=0&&i<=4095)){Ar(t,0,0,0,1);return}return Ar(t,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,n===5?parseInt(a.slice(4),16)/15:1),ns(r,t),t}else if(n===7||n===9){var i=parseInt(a.slice(1,7),16);if(!(i>=0&&i<=16777215)){Ar(t,0,0,0,1);return}return Ar(t,(i&16711680)>>16,(i&65280)>>8,i&255,n===9?parseInt(a.slice(7),16)/255:1),ns(r,t),t}return}var o=a.indexOf("("),s=a.indexOf(")");if(o!==-1&&s+1===n){var l=a.substr(0,o),u=a.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Ar(t,+u[0],+u[1],+u[2],1):Ar(t,0,0,0,1);f=sn(u.pop());case"rgb":if(u.length>=3)return Ar(t,Rh(u[0]),Rh(u[1]),Rh(u[2]),u.length===3?f:sn(u[3])),ns(r,t),t;Ar(t,0,0,0,1);return;case"hsla":if(u.length!==4){Ar(t,0,0,0,1);return}return u[3]=sn(u[3]),_m(u,t),ns(r,t),t;case"hsl":if(u.length!==3){Ar(t,0,0,0,1);return}return _m(u,t),ns(r,t),t;default:return}}Ar(t,0,0,0,1)}}function _m(r,t){var e=(parseFloat(r[0])%360+360)%360/360,a=sn(r[1]),n=sn(r[2]),i=n<=.5?n*(a+1):n+a-n*a,o=n*2-i;return t=t||[],Ar(t,Kr(kd(o,i,e+1/3)*255),Kr(kd(o,i,e)*255),Kr(kd(o,i,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function KB(r){if(r){var t=r[0]/255,e=r[1]/255,a=r[2]/255,n=Math.min(t,e,a),i=Math.max(t,e,a),o=i-n,s=(i+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(i+n):u=o/(2-i-n);var f=((i-t)/6+o/2)/o,v=((i-e)/6+o/2)/o,h=((i-a)/6+o/2)/o;t===i?l=h-v:e===i?l=1/3+f-h:a===i&&(l=2/3+v-f),l<0&&(l+=1),l>1&&(l-=1)}var c=[l*360,u,s];return r[3]!=null&&c.push(r[3]),c}}function fc(r,t){var e=Xe(r);if(e){for(var a=0;a<3;a++)t<0?e[a]=e[a]*(1-t)|0:e[a]=(255-e[a])*t+e[a]|0,e[a]>255?e[a]=255:e[a]<0&&(e[a]=0);return kr(e,e.length===4?"rgba":"rgb")}}function jB(r){var t=Xe(r);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function Hu(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){e=e||[];var a=r*(t.length-1),n=Math.floor(a),i=Math.ceil(a),o=t[n],s=t[i],l=a-n;return e[0]=Kr(Hn(o[0],s[0],l)),e[1]=Kr(Hn(o[1],s[1],l)),e[2]=Kr(Hn(o[2],s[2],l)),e[3]=rf(Hn(o[3],s[3],l)),e}}var JB=Hu;function L_(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var a=r*(t.length-1),n=Math.floor(a),i=Math.ceil(a),o=Xe(t[n]),s=Xe(t[i]),l=a-n,u=kr([Kr(Hn(o[0],s[0],l)),Kr(Hn(o[1],s[1],l)),Kr(Hn(o[2],s[2],l)),rf(Hn(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:n,rightIndex:i,value:a}:u}}var QB=L_;function ln(r,t,e,a){var n=Xe(r);if(r)return n=KB(n),t!=null&&(n[0]=qB(at(t)?t(n[0]):t)),e!=null&&(n[1]=sn(at(e)?e(n[1]):e)),a!=null&&(n[2]=sn(at(a)?a(n[2]):a)),kr(_m(n),"rgba")}function af(r,t){var e=Xe(r);if(e&&t!=null)return e[3]=rf(t),kr(e,"rgba")}function kr(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function nf(r,t){var e=Xe(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}function tV(){return kr([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var Gx=new Js(100);function vc(r){if(Z(r)){var t=Gx.get(r);return t||(t=fc(r,-.1),Gx.put(r,t)),t}else if(Wf(r)){var e=G({},r);return e.colorStops=W(r.colorStops,function(a){return{offset:a.offset,color:fc(a.color,-.1)}}),e}return r}const eV=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:Hu,fastMapToColor:JB,lerp:L_,lift:fc,liftColor:vc,lum:nf,mapToColor:QB,modifyAlpha:af,modifyHSL:ln,parse:Xe,parseCssFloat:sn,parseCssInt:Rh,random:tV,stringify:kr,toHex:jB},Symbol.toStringTag,{value:"Module"}));var hc=Math.round;function of(r){var t;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var e=Xe(r);e&&(r="rgb("+e[0]+","+e[1]+","+e[2]+")",t=e[3])}return{color:r,opacity:t??1}}var Fx=1e-4;function Wn(r){return r-Fx}function gv(r){return hc(r*1e3)/1e3}function Sm(r){return hc(r*1e4)/1e4}function rV(r){return"matrix("+gv(r[0])+","+gv(r[1])+","+gv(r[2])+","+gv(r[3])+","+Sm(r[4])+","+Sm(r[5])+")"}var aV={left:"start",right:"end",center:"middle",middle:"middle"};function nV(r,t,e){return e==="top"?r+=t/2:e==="bottom"&&(r-=t/2),r}function iV(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function oV(r){var t=r.style,e=r.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),e[0],e[1]].join(",")}function JI(r){return r&&!!r.image}function sV(r){return r&&!!r.svgElement}function P_(r){return JI(r)||sV(r)}function QI(r){return r.type==="linear"}function tL(r){return r.type==="radial"}function eL(r){return r&&(r.type==="linear"||r.type==="radial")}function Rp(r){return"url(#"+r+")"}function rL(r){var t=r.getGlobalScale(),e=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(e)/Math.log(10)),1)}function aL(r){var t=r.x||0,e=r.y||0,a=(r.rotation||0)*Bu,n=J(r.scaleX,1),i=J(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(t||e)&&l.push("translate("+t+"px,"+e+"px)"),a&&l.push("rotate("+a+")"),(n!==1||i!==1)&&l.push("scale("+n+","+i+")"),(o||s)&&l.push("skew("+hc(o*Bu)+"deg, "+hc(s*Bu)+"deg)"),l.join(" ")}var lV=(function(){return typeof Buffer<"u"&&typeof Buffer.from=="function"?function(r){return Buffer.from(r).toString("base64")}:typeof btoa=="function"&&typeof unescape=="function"&&typeof encodeURIComponent=="function"?function(r){return btoa(unescape(encodeURIComponent(r)))}:function(r){return null}})(),xm=Array.prototype.slice;function Ja(r,t,e){return(t-r)*e+r}function Od(r,t,e,a){for(var n=t.length,i=0;ia?t:r,i=Math.min(e,a),o=n[i-1]||{color:[0,0,0,0],offset:0},s=i;so;if(s)a.length=o;else for(var l=i;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(t,e,a){this._needsSort=!0;var n=this.keyframes,i=n.length,o=!1,s=Wx,l=e;if(Ne(e)){var u=hV(e);s=u,(u===1&&!It(e[0])||u===2&&!It(e[0][0]))&&(o=!0)}else if(It(e)&&!Oe(e))s=mv;else if(Z(e))if(!isNaN(+e))s=mv;else{var f=Xe(e);f&&(l=f,s=Cu)}else if(Wf(e)){var v=G({},l);v.colorStops=W(e.colorStops,function(c){return{offset:c.offset,color:Xe(c.color)}}),QI(e)?s=bm:tL(e)&&(s=wm),l=v}i===0?this.valType=s:(s!==this.valType||s===Wx)&&(o=!0),this.discrete=this.discrete||o;var h={time:t,value:l,rawValue:e,percent:0};return a&&(h.easing=a,h.easingFunc=at(a)?a:Fu[a]||I_(a)),n.push(h),h},r.prototype.prepare=function(t,e){var a=this.keyframes;this._needsSort&&a.sort(function(d,g){return d.time-g.time});for(var n=this.valType,i=a.length,o=a[i-1],s=this.discrete,l=_v(n),u=Ux(n),f=0;f=0&&!(o[f].percent<=e);f--);f=h(f,s-2)}else{for(f=v;fe);f++);f=h(f-1,s-2)}p=o[f+1],c=o[f]}if(c&&p){this._lastFr=f,this._lastFrP=e;var g=p.percent-c.percent,y=g===0?1:h((e-c.percent)/g,1);p.easingFunc&&(y=p.easingFunc(y));var m=a?this._additiveValue:u?Hl:t[l];if((_v(i)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)t[l]=y<1?c.rawValue:p.rawValue;else if(_v(i))i===kh?Od(m,c[n],p[n],y):uV(m,c[n],p[n],y);else if(Ux(i)){var _=c[n],S=p[n],x=i===bm;t[l]={type:x?"linear":"radial",x:Ja(_.x,S.x,y),y:Ja(_.y,S.y,y),colorStops:W(_.colorStops,function(w,C){var T=S.colorStops[C];return{offset:Ja(w.offset,T.offset,y),color:Eh(Od([],w.color,T.color,y))}}),global:S.global},x?(t[l].x2=Ja(_.x2,S.x2,y),t[l].y2=Ja(_.y2,S.y2,y)):t[l].r=Ja(_.r,S.r,y)}else if(u)Od(m,c[n],p[n],y),a||(t[l]=Eh(m));else{var b=Ja(c[n],p[n],y);a?this._additiveValue=b:t[l]=b}a&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,a=this.propName,n=this._additiveValue;e===mv?t[a]=t[a]+n:e===Cu?(Xe(t[a],Hl),yv(Hl,Hl,n,1),t[a]=Eh(Hl)):e===kh?yv(t[a],t[a],n,1):e===nL&&Hx(t[a],t[a],n,1)},r})(),R_=(function(){function r(t,e,a,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n){Mp("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=a}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(t){this._target=t},r.prototype.when=function(t,e,a){return this.whenWithKeys(t,e,At(e),a)},r.prototype.whenWithKeys=function(t,e,a,n){for(var i=this._tracks,o=0;o0&&l.addKeyframe(0,Wu(u),n),this._trackKeys.push(s)}l.addKeyframe(t,Wu(e[s]),n)}return this._maxTime=Math.max(this._maxTime,t),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,a=0;a0)){this._started=1;for(var e=this,a=[],n=this._maxTime||0,i=0;i1){var s=o.pop();i.addKeyframe(s.time,t[n]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},r})();function Es(){return new Date().getTime()}var pV=(function(r){N(t,r);function t(e){var a=r.call(this)||this;return a._running=!1,a._time=0,a._pausedTime=0,a._pauseStart=0,a._paused=!1,e=e||{},a.stage=e.stage||{},a}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var a=e.getClip();a&&this.addClip(a)},t.prototype.removeClip=function(e){if(e.animation){var a=e.prev,n=e.next;a?a.next=n:this._head=n,n?n.prev=a:this._tail=a,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var a=e.getClip();a&&this.removeClip(a),e.animation=null},t.prototype.update=function(e){for(var a=Es()-this._pausedTime,n=a-this._time,i=this._head;i;){var o=i.next,s=i.step(a,n);s&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=a,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function a(){e._running&&(sc(a),!e._paused&&e.update())}sc(a)},t.prototype.start=function(){this._running||(this._time=Es(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Es(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Es()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var a=e.next;e.prev=e.next=e.animation=null,e=a}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,a){a=a||{},this.start();var n=new R_(e,a.loop);return this.addAnimator(n),n},t})(Hr),dV=300,Nd=Mt.domSupported,Bd=(function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},a=W(r,function(n){var i=n.replace("mouse","pointer");return e.hasOwnProperty(i)?i:n});return{mouse:r,touch:t,pointer:a}})(),Yx={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Xx=!1;function Tm(r){var t=r.pointerType;return t==="pen"||t==="touch"}function gV(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function Vd(r){r&&(r.zrByTouch=!0)}function yV(r,t){return Dr(r.dom,new mV(r,t),!0)}function iL(r,t){for(var e=t,a=!1;e&&e.nodeType!==9&&!(a=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return a}var mV=(function(){function r(t,e){this.stopPropagation=te,this.stopImmediatePropagation=te,this.preventDefault=te,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r})(),Zr={mousedown:function(r){r=Dr(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Dr(this.dom,r);var t=this.__mayPointerCapture;t&&(r.zrX!==t[0]||r.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Dr(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Dr(this.dom,r);var t=r.toElement||r.relatedTarget;iL(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){Xx=!0,r=Dr(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){Xx||(r=Dr(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Dr(this.dom,r),Vd(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Zr.mousemove.call(this,r),Zr.mousedown.call(this,r)},touchmove:function(r){r=Dr(this.dom,r),Vd(r),this.handler.processGesture(r,"change"),Zr.mousemove.call(this,r)},touchend:function(r){r=Dr(this.dom,r),Vd(r),this.handler.processGesture(r,"end"),Zr.mouseup.call(this,r),+new Date-+this.__lastTouchMomentqx||r<-qx}var xi=[],is=[],Gd=Kt(),Fd=Math.abs,Ga=(function(){function r(){}return r.prototype.getLocalTransform=function(t){return ni(this,t)},r.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},r.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},r.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},r.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},r.prototype.needLocalTransform=function(){return Si(this.rotation)||Si(this.x)||Si(this.y)||Si(this.scaleX-1)||Si(this.scaleY-1)||Si(this.skewX)||Si(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),a=this.transform;if(!(e||t)){a&&($x(a),this.invTransform=null);return}a=a||Kt(),e?this.getLocalTransform(a):$x(a),t&&(e?_r(a,t,a):ri(a,t)),this.transform=a,this._resolveGlobalScaleRatio(a),this.invTransform=this.invTransform||Kt(),Sr(this.invTransform,a)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(xi);var a=xi[0]<0?-1:1,n=xi[1]<0?-1:1,i=((xi[0]-a)*e+a)/xi[0]||0,o=((xi[1]-n)*e+n)/xi[1]||0;t[0]*=i,t[1]*=i,t[2]*=o,t[3]*=o}},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],a=t[2]*t[2]+t[3]*t[3],n=Math.atan2(t[1],t[0]),i=Math.PI/2+n-Math.atan2(t[3],t[2]);a=Math.sqrt(a)*Math.cos(i),e=Math.sqrt(e),this.skewX=i,this.skewY=0,this.rotation=-n,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=a,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||Kt(),_r(is,t.invTransform,e),e=is);var a=this.originX,n=this.originY;(a||n)&&(Gd[4]=a,Gd[5]=n,_r(is,e,Gd),is[4]-=a,is[5]-=n,e=is),this.setLocalTransform(e)}},r.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},r.prototype.transformCoordToLocal=function(t,e){var a=[t,e],n=this.invTransform;return n&&ee(a,a,n),a},r.prototype.transformCoordToGlobal=function(t,e){var a=[t,e],n=this.transform;return n&&ee(a,a,n),a},r.prototype.getLineScale=function(){var t=this.transform;return t&&Fd(t[0]-1)>1e-10&&Fd(t[3]-1)>1e-10?Math.sqrt(Fd(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){La(this,t)},r.getLocalTransform=function(t,e){e=e||[];var a=t.originX||0,n=t.originY||0,i=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,f=t.x,v=t.y,h=t.skewX?Math.tan(t.skewX):0,c=t.skewY?Math.tan(-t.skewY):0;if(a||n||s||l){var p=a+s,d=n+l;e[4]=-p*i-h*d*o,e[5]=-d*o-c*p*i}else e[4]=e[5]=0;return e[0]=i,e[3]=o,e[1]=c*i,e[2]=h*o,u&&Cn(e,e,u),e[4]+=a+f,e[5]+=n+v,e},r.initDefaultProps=(function(){var t=r.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),r})(),ni=Ga.getLocalTransform;function Fs(){return new Ga}var gn=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function La(r,t){return DI(r,t,gn)}function wa(r){Sv||(Sv=new Js(100)),r=r||pn;var t=Sv.get(r);return t||(t={font:r,strWidthCache:new Js(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:xe.measureText("国",r).width,asciiCharWidth:xe.measureText("a",r).width},Sv.put(r,t)),t}var Sv;function wV(r){if(!(Hd>=Kx)){r=r||pn;for(var t=[],e=+new Date,a=0;a<=127;a++)t[a]=xe.measureText(String.fromCharCode(a),r).width;var n=+new Date-e;return n>16?Hd=Kx:n>2&&Hd++,t}}var Hd=0,Kx=5;function sL(r,t){return r.asciiWidthMapTried||(r.asciiWidthMap=wV(r.font),r.asciiWidthMapTried=!0),0<=t&&t<=127?r.asciiWidthMap!=null?r.asciiWidthMap[t]:r.asciiCharWidth:r.stWideCharWidth}function Ta(r,t){var e=r.strWidthCache,a=e.get(t);return a==null&&(a=xe.measureText(t,r.font).width,e.put(t,a)),a}function jx(r,t,e,a){var n=Ta(wa(t),r),i=Xf(t),o=Qs(0,n,e),s=lo(0,i,a),l=new ot(o,s,n,i);return l}function Ep(r,t,e,a){var n=((r||"")+"").split(` `),i=n.length;if(i===1)return jx(n[0],t,e,a);for(var o=new ot(0,0,0,0),s=0;s=0?parseFloat(r)/100*t:parseFloat(r):r}function pc(r,t,e){var a=t.position||"inside",n=t.distance!=null?t.distance:5,i=e.height,o=e.width,s=i/2,l=e.x,u=e.y,f="left",v="top";if(a instanceof Array)l+=Pa(a[0],e.width),u+=Pa(a[1],e.height),f=null,v=null;else switch(a){case"left":l-=n,u+=s,f="right",v="middle";break;case"right":l+=n+o,u+=s,v="middle";break;case"top":l+=o/2,u-=n,f="center",v="bottom";break;case"bottom":l+=o/2,u+=i+n,f="center";break;case"inside":l+=o/2,u+=s,f="center",v="middle";break;case"insideLeft":l+=n,u+=s,v="middle";break;case"insideRight":l+=o-n,u+=s,f="right",v="middle";break;case"insideTop":l+=o/2,u+=n,f="center";break;case"insideBottom":l+=o/2,u+=i-n,f="center",v="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,f="right";break;case"insideBottomLeft":l+=n,u+=i-n,v="bottom";break;case"insideBottomRight":l+=o-n,u+=i-n,f="right",v="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=v,r}var Wd="__zr_normal__",Ud=gn.concat(["ignore"]),TV=Br(gn,function(r,t){return r[t]=!0,r},{ignore:!1}),os={},CV=new ot(0,0,0,0),xv=[],Nh=0,kp=1,Op=(function(){function r(t){this.id=T_(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,a){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var a=this.textConfig,n=a.local,i=e.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=n?this:null;var u=!1;i.copyTransform(e);var f=a.position!=null,v=a.autoOverflowArea,h=void 0;if((v||f)&&(h=CV,a.layoutRect?h.copy(a.layoutRect):h.copy(this.getBoundingRect()),n||h.applyTransform(this.transform)),f){this.calculateTextPosition?this.calculateTextPosition(os,a,h):pc(os,a,h),i.x=os.x,i.y=os.y,o=os.align,s=os.verticalAlign;var c=a.origin;if(c&&a.rotation!=null){var p=void 0,d=void 0;c==="center"?(p=h.width*.5,d=h.height*.5):(p=Pa(c[0],h.width),d=Pa(c[1],h.height)),u=!0,i.originX=-i.x+p+(n?0:h.x),i.originY=-i.y+d+(n?0:h.y)}}a.rotation!=null&&(i.rotation=a.rotation);var g=a.offset;g&&(i.x+=g[0],i.y+=g[1],u||(i.originX=-g[0],i.originY=-g[1]));var y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(v){var m=y.overflowRect=y.overflowRect||new ot(0,0,0,0);i.getLocalTransform(xv),Sr(xv,xv),ot.copy(m,h),m.applyTransform(xv)}else y.overflowRect=null;var _=a.inside==null?typeof a.position=="string"&&a.position.indexOf("inside")>=0:a.inside,S=void 0,x=void 0,b=void 0;_&&this.canBeInsideText()?(S=a.insideFill,x=a.insideStroke,(S==null||S==="auto")&&(S=this.getInsideTextFill()),(x==null||x==="auto")&&(x=this.getInsideTextStroke(S),b=!0)):(S=a.outsideFill,x=a.outsideStroke,(S==null||S==="auto")&&(S=this.getOutsideFill()),(x==null||x==="auto")&&(x=this.getOutsideStroke(S),b=!0)),S=S||"#000",(S!==y.fill||x!==y.stroke||b!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=S,y.stroke=x,y.autoStroke=b,y.align=o,y.verticalAlign=s,e.setDefaultTextStyle(y)),e.__dirty|=lr,l&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Dm:Mm},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),a=typeof e=="string"&&Xe(e);a||(a=[255,255,255,1]);for(var n=a[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)a[o]=a[o]*n+(i?0:255)*(1-n);return a[3]=1,kr(a,"rgba")},r.prototype.traverse=function(t,e){},r.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},G(this.extra,e)):this[t]=e},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(lt(t))for(var a=t,n=At(a),i=0;i0},r.prototype.getState=function(t){return this.states[t]},r.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},r.prototype.clearStates=function(t){this.useState(Wd,!1,t)},r.prototype.useState=function(t,e,a,n){var i=t===Wd,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(pt(s,t)>=0&&(e||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!i){Mp("State "+t+" not exists.");return}i||this.saveCurrentToNormalState(u);var f=this._textContent,v=Jx(this,f,u,n);v&&!this.__inHover&&(this.__inHover=v),this._applyStateObj(t,u,this._normalState,e,tb(this,a,l),l);var h=this._textGuide;return f&&f.useState(t,e,a,!!v),h&&h.useState(t,e,a,!!v),i?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!v&&this.__inHover&&(this.__inHover=Nh,this.__dirty&=~lr),u}}},r.prototype.useStates=function(t,e,a){if(!t.length)this.clearStates();else{var n=[],i=this.currentStates,o=t.length,s=o===i.length;if(s){for(var l=0;l=0){var a=this.currentStates.slice();a.splice(e,1),this.useStates(a)}},r.prototype.replaceState=function(t,e,a){var n=this.currentStates.slice(),i=pt(n,t),o=pt(n,e)>=0;i>=0?o?n.splice(i,1):n[i]=e:a&&!o&&n.push(e),this.useStates(n)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},a,n=0;n=0&&i.splice(o,1)}),this.animators.push(t),a&&a.animation.addAnimator(t),a&&a.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var a=this.animators,n=a.length,i=[],o=0;o0&&e.during&&i[0].during(function(p,d){e.during(d)});for(var h=0;h0||n.force&&!o.length){var C=void 0,T=void 0,M=void 0;if(s){T={},h&&(C={});for(var S=0;S<_;S++){var y=d[S];T[y]=e[y],h?C[y]=a[y]:e[y]=a[y]}}else if(h){M={};for(var S=0;S<_;S++){var y=d[S];M[y]=Wu(e[y]),MV(e,a,y)}}var x=new R_(e,!1,!1,v?Nt(p,function(L){return L.targetName===t}):null);x.targetName=t,n.scope&&(x.scope=n.scope),h&&C&&x.whenWithKeys(0,C,d),M&&x.whenWithKeys(0,M,d),x.whenWithKeys(u??500,s?T:a,d).delay(f||0),r.addAnimator(x,t),o.push(x)}}function Jx(r,t,e,a){return!(e&&e.hoverLayer||a)||Qx(r)||t&&Qx(t)?Nh:kp}function Qx(r){return r.type==="text"||r.type==="tspan"}function tb(r,t,e){return!t&&!r.__inHover&&e&&e.duration>0}var it=(function(r){N(t,r);function t(e){var a=r.call(this)||this;return a.isGroup=!0,a._children=[],a.attr(e),a}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var a=this._children,n=0;n=0&&(n.splice(i,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,a){var n=pt(this._children,e);return n>=0&&this.replaceAt(a,n),this},t.prototype.replaceAt=function(e,a){var n=this._children,i=n[a];if(e&&e!==this&&e.parent!==this&&e!==i){n[a]=e,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var a=this.__zr;a&&a!==e.__zr&&e.addSelfToZr(a),a&&a.refresh()},t.prototype.remove=function(e){var a=this.__zr,n=this._children,i=pt(n,e);return i<0?this:(n.splice(i,1),e.parent=null,a&&e.removeSelfFromZr(a),a&&a.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,a=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},r.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},r.prototype.on=function(t,e,a){return this._disposed||this.handler.on(t,e,a),this},r.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},r.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},r.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e0){if(r<=n)return o;if(r>=i)return s}else{if(r>=n)return o;if(r<=i)return s}else{if(r===n)return o;if(r===i)return s}return(r-n)/l*u+o}var $=FV;function FV(r,t,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return yc(r,t,e)}function yc(r,t,e){return Z(r)?hL(r)?parseFloat(r)/100*t+(e||0):parseFloat(r):r==null?NaN:+r}function HV(r){return Z(r)&&hL(r)}function hL(r){return!!zV(r).match(/%$/)}function Pt(r,t,e){return isNaN(t)?e?""+r:+r:(t=Vt(xt(0,t),dc),r=(+r).toFixed(t),e?r:+r)}function WV(r,t,e){return t==null&&(t=10),Pt(r,t,e)}function De(r){return r.sort(function(t,e){return t-e}),r}function ya(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Ra(r*t)/t===r)return e}return cL(r)}function cL(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),a=e>0?+t.slice(e+1):0,n=e>0?e:t.length,i=t.indexOf("."),o=i<0?0:n-1-i;return xt(0,o-a)}function UV(r,t){var e=Vr(mo(r[1]-r[0])/sf),a=Ra(mo(Qt(t[1]-t[0]))/sf),n=Vt(xt(-e+a,0),dc);return isFinite(n)?n:dc}function E_(r,t,e){var a=Qt(r[1]-r[0]);if(!isFinite(a)||a===0)return NaN;var n=mo(2*Qt(e||1)*Qt(a))/sf,i=mo(Qt(t))/sf,o=xt(0,Uo(-n+i));return isFinite(o)||(o=NaN),o}function YV(r,t,e){if(!r[t])return 0;var a=pL(r,e);return a[t]||0}function pL(r,t){var e=Br(r,function(c,p){return c+(isNaN(p)?0:p)},0);if(e===0)return[];for(var a=Yo(10,t),n=W(r,function(c){return(isNaN(c)?0:c)/e*a*100}),i=a*100,o=W(n,function(c){return Vr(c)}),s=Br(o,function(c,p){return c+p},0),l=W(n,function(c,p){return c-o[p]});su&&(u=l[v],f=v);++o[f],l[f]=0,++s}return W(o,function(c){return c/a})}function Ui(r,t){var e=xt(ya(r),ya(t)),a=r+t;return e>dc?a:Pt(a,e)}var lf=Yo(2,53)-1;function k_(r){var t=gc*2;return(r%t+t)%t}function _o(r){return r>-eb&&r=10&&t++,t}var dL=2;function Bp(r,t){var e=Np(r),a=Yo(10,e),n=r/a,i;return t===dL?i=1:t?n<1.5?i=1:n<2.5?i=2:n<4?i=3:n<7?i=5:i=10:n<1?i=1:n<2?i=2:n<3?i=3:n<5?i=5:i=10,r=i*a,Pt(r,-e)}function Vh(r,t){var e=(r.length-1)*t+1,a=Vr(e),n=+r[a-1],i=e-a;return i?n+i*(r[a]-n):n}function Pm(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,e=1,a=0;a0?t.length:0),this.item=null,this.key=NaN,this},r.prototype.next=function(){return(this._step>0?this._idx=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},r})();function Zd(r){r.option=r.parentModel=r.ecModel=null}function ke(){return[1/0,-1/0]}function Em(r,t){yn(t)&&(tr[1]&&(r[1]=t))}function TL(r,t){yn(t)&&tr[1]&&(r[1]=t)}function vz(r,t){bo(t[0],t[1])&&(t[0]r[1]&&(r[1]=t[1]))}function yn(r){return r!=null&&isFinite(r)}function bo(r,t){return yn(r)&&yn(t)&&r<=t}function hz(r){var t=r[1]-r[0];return isFinite(t)&&t>=0}function zh(r){bo(r[0],r[1])&&r[0]>r[1]&&(r[0]=r[1])}function _l(){var r="__ec_once_"+cz++;return function(t,e){j(t,r)||(t[r]=1,e())}}var cz=B_();function Vp(r,t,e){var a=K(),n=0;A(r,function(i){var o=t(i),s=a.get(o)||0;e&&e(i,s),!s&&!e&&(r[n++]=i),a.set(o,s+1)}),e||(r.length=n)}function pz(r){return r.value+""}function dz(r){return r+""}function Ca(r,t){return J(t,!0)?r.seriesIndex+2:0}function AL(r,t,e){var a=r.getData().count();return{progressiveRender:e.progressiveEnabled&&t.incrementalPrepareRender&&a>=e.threshold,large:r.get("large")&&a>=r.get("largeThreshold"),modDataCount:r.get("progressiveChunkMode")==="mod"?r.getData().count():null}}function ye(r,t){return{seriesType:r,overallReset:t}}function Zf(r){return{overallReset:r}}var gz=".",bi="___EC__COMPONENT__CONTAINER___",ML="___EC__EXTENDED_CLASS___";function ma(r){var t={main:"",sub:""};if(r){var e=r.split(gz);t.main=e[0]||"",t.sub=e[1]||""}return t}function yz(r){Be(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function mz(r){return!!(r&&r[ML])}function F_(r,t){r.$constructor=r,r.extend=function(e){var a=this,n;return _z(a)?n=(function(i){N(o,i);function o(){return i.apply(this,arguments)||this}return o})(a):(n=function(){(e.$constructor||a).apply(this,arguments)},C_(n,this)),G(n.prototype,e),n[ML]=!0,n.extend=this.extend,n.superCall=bz,n.superApply=wz,n.superClass=a,n}}function _z(r){return at(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function DL(r,t){r.extend=t.extend}var Sz=Math.round(Math.random()*10);function xz(r){var t=["__\0is_clz",Sz++].join("_");r.prototype[t]=!0,r.isInstance=function(e){return!!(e&&e[t])}}function bz(r,t){for(var e=[],a=2;a=0||i&&pt(i,l)<0)){var u=a.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var Tz=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Cz=wo(Tz),Az=(function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return Cz(this,t,e)},r})(),km=new Js(50);function Mz(r){if(typeof r=="string"){var t=km.get(r);return t&&t.image}else return r}function H_(r,t,e,a,n){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var i=km.get(r),o={hostEl:e,cb:a,cbPayload:n};return i?(t=i.image,!Gp(t)&&i.pending.push(o)):(t=xe.loadImage(r,ib,ib),t.__zrImageSrc=r,km.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function ib(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=s;u++)l-=s;var f=Ta(o,e);return f>l&&(e="",f=0),l=r-f,n.ellipsis=e,n.ellipsisWidth=f,n.contentWidth=l,n.containerWidth=r,n}function PL(r,t,e){var a=e.containerWidth,n=e.contentWidth,i=e.fontMeasureInfo;if(!a){r.textLine="",r.isTruncated=!1;return}var o=Ta(i,t);if(o<=a){r.textLine=t,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=n||s>=e.maxIterations){t+=e.ellipsis;break}var l=s===0?Iz(t,n,i):o>0?Math.floor(t.length*n/o):0;t=t.substr(0,l),o=Ta(i,t)}t===""&&(t=e.placeholder),r.textLine=t,r.isTruncated=!0}function Iz(r,t,e){for(var a=0,n=0,i=r.length;ng&&c){var _=Math.floor(g/h);p=p||y.length>_,y=y.slice(0,_),m=y.length*h}if(n&&f&&d!=null)for(var S=LL(d,u,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},b=0;bp&&qd(i,o.substring(p,g),t,c),qd(i,d[2],t,c,d[1]),p=$d.lastIndex}pv){var V=i.lines.length;L>0?(T.tokens=T.tokens.slice(0,L),w(T,D,M),i.lines=i.lines.slice(0,C+1)):i.lines=i.lines.slice(0,C),i.isTruncated=i.isTruncated||i.lines.length0&&p+a.accumWidth>a.width&&(f=t.split(` `),u=!0),a.accumWidth=p}else{var d=RL(t,l,a.width,a.breakAll,a.accumWidth);a.accumWidth=d.accumWidth+c,v=d.linesWidths,f=d.lines}}f||(f=t.split(` `));for(var g=wa(l),y=0;y=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Oz=Br(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function Nz(r){return kz(r)?!!Oz[r]:!0}function RL(r,t,e,a,n){for(var i=[],o=[],s="",l="",u=0,f=0,v=wa(t),h=0;he:n+f+p>e){f?(s||l)&&(d?(s||(s=l,l="",u=0,f=u),i.push(s),o.push(f-u),l+=c,u+=p,s="",f=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(f),s=c,f=p)):d?(i.push(l),o.push(u),l=c,u=p):(i.push(c),o.push(p));continue}f+=p,d?(l+=c,u+=p):(l&&(s+=l,l="",u=0),s+=c)}return l&&(s+=l),s&&(i.push(s),o.push(f)),i.length===1&&(f+=n),{accumWidth:f,lines:i,linesWidths:o}}function sb(r,t,e,a,n,i){if(r.baseX=e,r.baseY=a,r.outerWidth=r.outerHeight=null,!!t){var o=t.width*2,s=t.height*2;ot.set(lb,Qs(e,o,n),lo(a,s,i),o,s),ot.intersect(t,lb,null,ub);var l=ub.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=Qs(l.x,l.width,n,!0),r.baseY=lo(l.y,l.height,i,!0)}}var lb=new ot(0,0,0,0),ub={outIntersectRect:{},clamp:!0};function W_(r){return r!=null?r+="":r=""}function Bz(r){var t=W_(r.text),e=r.font,a=Ta(wa(e),t),n=Xf(e);return Om(r,a,n,null)}function Om(r,t,e,a){var n=new ot(Qs(r.x||0,t,r.textAlign),lo(r.y||0,e,r.textBaseline),t,e),i=a??(EL(r)?r.lineWidth:0);return i>0&&(n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i),n}function EL(r){var t=r.stroke;return t!=null&&t!=="none"&&r.lineWidth>0}var Nm="__zr_style_"+Math.round(Math.random()*10),uo={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Fp={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};uo[Nm]=!0;var fb=["z","z2","invisible"],Vz=["invisible"],Gr=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var a=At(e),n=0;n1e-4){s[0]=r-e,s[1]=t-a,l[0]=r+e,l[1]=t+a;return}if(bv[0]=Qd(n)*e+r,bv[1]=Jd(n)*a+t,wv[0]=Qd(i)*e+r,wv[1]=Jd(i)*a+t,u(s,bv,wv),f(l,bv,wv),n=n%wi,n<0&&(n=n+wi),i=i%wi,i<0&&(i=i+wi),n>i&&!o?i+=wi:nn&&(Tv[0]=Qd(c)*e+r,Tv[1]=Jd(c)*a+t,u(s,Tv,s),f(l,Tv,l))}var Xt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ti=[],Ci=[],ia=[],Dn=[],oa=[],sa=[],tg=Math.min,eg=Math.max,Ai=Math.cos,Mi=Math.sin,Ua=Math.abs,Bm=Math.PI,Nn=Bm*2,rg=typeof Float32Array<"u",Wl=[];function ag(r){var t=Math.round(r/Bm*1e8)/1e8;return t%2*Bm}function Wp(r,t){var e=ag(r[0]);e<0&&(e+=Nn);var a=e-r[0],n=r[1];n+=a,!t&&n-e>=Nn?n=e+Nn:t&&e-n>=Nn?n=e-Nn:!t&&e>n?n=e+(Nn-ag(e-n)):t&&e0&&(this._ux=Ua(a/cc/t)||0,this._uy=Ua(a/cc/e)||0)},r.prototype.setDPR=function(t){this.dpr=t},r.prototype.setContext=function(t){this._ctx=t},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(Xt.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var a=Ua(t-this._xi),n=Ua(e-this._yi),i=a>this._ux||n>this._uy;if(this.addData(Xt.L,t,e),this._ctx&&i&&this._ctx.lineTo(t,e),i)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=a*a+n*n;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,a,n,i,o){return this._drawPendingPt(),this.addData(Xt.C,t,e,a,n,i,o),this._ctx&&this._ctx.bezierCurveTo(t,e,a,n,i,o),this._xi=i,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,a,n){return this._drawPendingPt(),this.addData(Xt.Q,t,e,a,n),this._ctx&&this._ctx.quadraticCurveTo(t,e,a,n),this._xi=a,this._yi=n,this},r.prototype.arc=function(t,e,a,n,i,o){this._drawPendingPt(),Wl[0]=n,Wl[1]=i,Wp(Wl,o),n=Wl[0],i=Wl[1];var s=i-n;return this.addData(Xt.A,t,e,a,a,n,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,a,n,i,o),this._xi=Ai(i)*a+t,this._yi=Mi(i)*a+e,this},r.prototype.arcTo=function(t,e,a,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,a,n,i),this},r.prototype.rect=function(t,e,a,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,a,n),this.addData(Xt.R,t,e,a,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(Xt.Z);var t=this._ctx,e=this._x0,a=this._y0;return t&&t.closePath(),this._xi=e,this._yi=a,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){if(this._saveData){var e=t.length;!(this.data&&this.data.length===e)&&rg&&(this.data=new Float32Array(e));for(var a=0;a0&&o))for(var s=0;sf.length&&(this._expandData(),f=this.data);for(var v=0;v0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){ia[0]=ia[1]=oa[0]=oa[1]=Number.MAX_VALUE,Dn[0]=Dn[1]=sa[0]=sa[1]=-Number.MAX_VALUE;var t=this.data,e=0,a=0,n=0,i=0,o;for(o=0;oa||Ua(_)>n||h===e-1)&&(d=Math.sqrt(m*m+_*_),i=g,o=y);break}case Xt.C:{var S=t[h++],x=t[h++],g=t[h++],y=t[h++],b=t[h++],w=t[h++];d=WB(i,o,S,x,g,y,b,w,10),i=b,o=w;break}case Xt.Q:{var S=t[h++],x=t[h++],g=t[h++],y=t[h++];d=YB(i,o,S,x,g,y,10),i=g,o=y;break}case Xt.A:var C=t[h++],T=t[h++],M=t[h++],D=t[h++],L=t[h++],I=t[h++],P=I+L;h+=1,p&&(s=Ai(L)*M+C,l=Mi(L)*D+T),d=eg(M,D)*tg(Nn,Math.abs(I)),i=Ai(P)*M+C,o=Mi(P)*D+T;break;case Xt.R:{s=i=t[h++],l=o=t[h++];var R=t[h++],E=t[h++];d=R*2+E*2;break}case Xt.Z:{var m=s-i,_=l-o;d=Math.sqrt(m*m+_*_),i=s,o=l;break}}d>=0&&(u[v++]=d,f+=d)}return this._pathLen=f,f},r.prototype.rebuildPath=function(t,e){var a=this.data,n=this._ux,i=this._uy,o=this._len,s,l,u,f,v,h,c=e<1,p,d,g=0,y=0,m,_=0,S,x;if(!(c&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,d=this._pathLen,m=e*d,!m)))t:for(var b=0;b0&&(t.lineTo(S,x),_=0),w){case Xt.M:s=u=a[b++],l=f=a[b++],t.moveTo(u,f);break;case Xt.L:{v=a[b++],h=a[b++];var T=Ua(v-u),M=Ua(h-f);if(T>n||M>i){if(c){var D=p[y++];if(g+D>m){var L=(m-g)/D;t.lineTo(u*(1-L)+v*L,f*(1-L)+h*L);break t}g+=D}t.lineTo(v,h),u=v,f=h,_=0}else{var I=T*T+M*M;I>_&&(S=v,x=h,_=I)}break}case Xt.C:{var P=a[b++],R=a[b++],E=a[b++],O=a[b++],k=a[b++],V=a[b++];if(c){var D=p[y++];if(g+D>m){var L=(m-g)/D;ai(u,P,E,k,L,Ti),ai(f,R,O,V,L,Ci),t.bezierCurveTo(Ti[1],Ci[1],Ti[2],Ci[2],Ti[3],Ci[3]);break t}g+=D}t.bezierCurveTo(P,R,E,O,k,V),u=k,f=V;break}case Xt.Q:{var P=a[b++],R=a[b++],E=a[b++],O=a[b++];if(c){var D=p[y++];if(g+D>m){var L=(m-g)/D;ef(u,P,E,L,Ti),ef(f,R,O,L,Ci),t.quadraticCurveTo(Ti[1],Ci[1],Ti[2],Ci[2]);break t}g+=D}t.quadraticCurveTo(P,R,E,O),u=E,f=O;break}case Xt.A:var z=a[b++],F=a[b++],U=a[b++],X=a[b++],Y=a[b++],Q=a[b++],gt=a[b++],kt=!a[b++],vt=U>X?U:X,tt=Ua(U-X)>.001,dt=Y+Q,et=!1;if(c){var D=p[y++];g+D>m&&(dt=Y+Q*(m-g)/D,et=!0),g+=D}if(tt&&t.ellipse?t.ellipse(z,F,U,X,gt,Y,dt,kt):t.arc(z,F,vt,Y,dt,kt),et)break t;C&&(s=Ai(Y)*U+z,l=Mi(Y)*X+F),u=Ai(dt)*U+z,f=Mi(dt)*X+F;break;case Xt.R:s=u=a[b],l=f=a[b+1],v=a[b++],h=a[b++];var ht=a[b++],Ft=a[b++];if(c){var D=p[y++];if(g+D>m){var Lt=m-g;t.moveTo(v,h),t.lineTo(v+tg(Lt,ht),h),Lt-=ht,Lt>0&&t.lineTo(v+ht,h+tg(Lt,Ft)),Lt-=Ft,Lt>0&&t.lineTo(v+eg(ht-Lt,0),h+Ft),Lt-=ht,Lt>0&&t.lineTo(v,h+eg(Ft-Lt,0));break t}g+=D}t.rect(v,h,ht,Ft);break;case Xt.Z:if(c){var D=p[y++];if(g+D>m){var L=(m-g)/D;t.lineTo(u*(1-L)+s*L,f*(1-L)+l*L);break t}g+=D}t.closePath(),u=s,f=l}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.prototype.canSave=function(){return!!this._saveData},r.CMD=Xt,r.initDefaultProps=(function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),r})();function Vn(r,t,e,a,n,i,o){if(n===0)return!1;var s=n,l=0,u=r;if(o>t+s&&o>a+s||or+s&&i>e+s||it+v&&f>a+v&&f>i+v&&f>s+v||fr+v&&u>e+v&&u>n+v&&u>o+v||ut+u&&l>a+u&&l>i+u||lr+u&&s>e+u&&s>n+u||se||f+un&&(n+=Ul);var h=Math.atan2(l,s);return h<0&&(h+=Ul),h>=a&&h<=n||h+Ul>=a&&h+Ul<=n}function Qa(r,t,e,a,n,i){if(i>t&&i>a||in?s:0}var In=ka.CMD,Di=Math.PI*2,Yz=1e-4;function Xz(r,t){return Math.abs(r-t)t&&u>a&&u>i&&u>s||u1&&Zz(),c=_e(t,a,i,s,Lr[0]),h>1&&(p=_e(t,a,i,s,Lr[1]))),h===2?gt&&s>a&&s>i||s=0&&u<=1){for(var f=0,v=Me(t,a,i,u),h=0;he||s<-e)return 0;var l=Math.sqrt(e*e-s*s);Ke[0]=-l,Ke[1]=l;var u=Math.abs(a-n);if(u<1e-4)return 0;if(u>=Di-1e-4){a=0,n=Di;var f=i?1:-1;return o>=Ke[0]+r&&o<=Ke[1]+r?f:0}if(a>n){var v=a;a=n,n=v}a<0&&(a+=Di,n+=Di);for(var h=0,c=0;c<2;c++){var p=Ke[c];if(p+r>o){var d=Math.atan2(s,p),f=i?1:-1;d<0&&(d=Di+d),(d>=a&&d<=n||d+Di>=a&&d+Di<=n)&&(d>Math.PI/2&&d1&&(e||(s+=Qa(l,u,f,v,a,n))),g&&(l=i[p],u=i[p+1],f=l,v=u),d){case In.M:f=i[p++],v=i[p++],l=f,u=v;break;case In.L:if(e){if(Vn(l,u,i[p],i[p+1],t,a,n))return!0}else s+=Qa(l,u,i[p],i[p+1],a,n)||0;l=i[p++],u=i[p++];break;case In.C:if(e){if(Wz(l,u,i[p++],i[p++],i[p++],i[p++],i[p],i[p+1],t,a,n))return!0}else s+=$z(l,u,i[p++],i[p++],i[p++],i[p++],i[p],i[p+1],a,n)||0;l=i[p++],u=i[p++];break;case In.Q:if(e){if(kL(l,u,i[p++],i[p++],i[p],i[p+1],t,a,n))return!0}else s+=qz(l,u,i[p++],i[p++],i[p],i[p+1],a,n)||0;l=i[p++],u=i[p++];break;case In.A:var y=i[p++],m=i[p++],_=i[p++],S=i[p++],x=i[p++],b=i[p++];p+=1;var w=!!(1-i[p++]);h=Math.cos(x)*_+y,c=Math.sin(x)*S+m,g?(f=h,v=c):s+=Qa(l,u,h,c,a,n);var C=(a-y)*S/_+y;if(e){if(Uz(y,m,S,x,x+b,w,t,C,n))return!0}else s+=Kz(y,m,S,x,x+b,w,C,n);l=Math.cos(x+b)*_+y,u=Math.sin(x+b)*S+m;break;case In.R:f=l=i[p++],v=u=i[p++];var T=i[p++],M=i[p++];if(h=f+T,c=v+M,e){if(Vn(f,v,h,v,t,a,n)||Vn(h,v,h,c,t,a,n)||Vn(h,c,f,c,t,a,n)||Vn(f,c,f,v,t,a,n))return!0}else s+=Qa(h,v,h,c,a,n),s+=Qa(f,c,f,v,a,n);break;case In.Z:if(e){if(Vn(l,u,f,v,t,a,n))return!0}else s+=Qa(l,u,f,v,a,n);l=f,u=v;break}}return!e&&!Xz(u,v)&&(s+=Qa(l,u,f,v,a,n)||0),s!==0}function jz(r,t,e){return OL(r,0,!1,t,e)}function Jz(r,t,e,a){return OL(r,t,!0,e,a)}var mc=st({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},uo),Qz={style:st({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Fp.style)},ng=gn.concat(["invisible","culling","z","z2","zlevel","parent"]),Ct=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.update=function(){var e=this;r.prototype.update.call(this);var a=this.style;if(a.decal){var n=this._decalEl=this._decalEl||new t;n.buildPath===t.prototype.buildPath&&(n.buildPath=function(l){e.buildPath(l,e.shape)}),n.silent=!0;var i=n.style;for(var o in a)i[o]!==a[o]&&(i[o]=a[o]);i.fill=a.fill?a.decal:null,i.decal=null,i.shadowColor=null,a.strokeFirst&&(i.stroke=null);for(var s=0;s.5?Mm:a>.2?bV:Dm}else if(e)return Dm}return Mm},t.prototype.getInsideTextStroke=function(e){var a=this.style.fill;if(Z(a)){var n=this.__zr,i=!!(n&&n.isDarkMode()),o=nf(e,0)0))},t.prototype.hasFill=function(){var e=this.style,a=e.fill;return a!=null&&a!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,a=this.style,n=!e;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&Ds)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){s.copy(e);var l=a.strokeNoScale?this.getLineScale():1,u=a.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return e},t.prototype.contain=function(e,a){var n=this.transformCoordToLocal(e,a),i=this.getBoundingRect(),o=this.style;if(e=n[0],a=n[1],i.contain(e,a)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),Jz(s,l/u,e,a)))return!0}if(this.hasFill())return jz(s,e,a)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=Ds,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():e==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(e,a){e==="shape"?this.setShape(a):r.prototype.attrKV.call(this,e,a)},t.prototype.setShape=function(e,a){var n=this.shape;return n||(n=this.shape={}),typeof e=="string"?n[e]=a:G(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&Ds)},t.prototype.createStyle=function(e){return Yf(mc,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var a=this._normalState;e.shape&&!a.shape&&(a.shape=G({},this.shape))},t.prototype._applyStateObj=function(e,a,n,i,o,s){if(r.prototype._applyStateObj.call(this,e,a,n,i,o,s),this.__inHover!==kp){var l=!(a&&i),u;if(a&&a.shape?o?i?u=a.shape:(u=G({},n.shape),G(u,a.shape)):(u=G({},i?this.shape:n.shape),G(u,a.shape)):l&&(u=n.shape),u)if(o){this.shape=G({},this.shape);for(var f={},v=At(u),h=0;hn&&(v=s+l,s*=n/v,l*=n/v),u+f>n&&(v=u+f,u*=n/v,f*=n/v),l+u>i&&(v=l+u,l*=i/v,u*=i/v),s+f>i&&(v=s+f,s*=i/v,f*=i/v),r.moveTo(e+s,a),r.lineTo(e+n-l,a),l!==0&&r.arc(e+n-l,a+l,l,-Math.PI/2,0),r.lineTo(e+n,a+i-u),u!==0&&r.arc(e+n-u,a+i-u,u,0,Math.PI/2),r.lineTo(e+f,a+i),f!==0&&r.arc(e+f,a+i-f,f,Math.PI/2,Math.PI),r.lineTo(e,a+s),s!==0&&r.arc(e+s,a+s,s,Math.PI,Math.PI*1.5),r.closePath()}var ks=Math.round;function Up(r,t,e){if(t){var a=t.x1,n=t.x2,i=t.y1,o=t.y2;r.x1=a,r.x2=n,r.y1=i,r.y2=o;var s=e&&e.lineWidth;return s&&(ks(a*2)===ks(n*2)&&(r.x1=r.x2=mr(a,s,!0)),ks(i*2)===ks(o*2)&&(r.y1=r.y2=mr(i,s,!0))),r}}function NL(r,t,e){if(t){var a=t.x,n=t.y,i=t.width,o=t.height;r.x=a,r.y=n,r.width=i,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=mr(a,s,!0),r.y=mr(n,s,!0),r.width=Math.max(mr(a+i,s,!1)-r.x,i===0?0:1),r.height=Math.max(mr(n+o,s,!1)-r.y,o===0?0:1)),r}}function mr(r,t,e){if(!t)return r;var a=ks(r*2);return(a+ks(t))%2===0?a/2:(a+(e?1:-1))/2}var i5=(function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r})(),o5={},bt=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new i5},t.prototype.buildPath=function(e,a){var n,i,o,s;if(this.subPixelOptimize){var l=NL(o5,a,this.style);n=l.x,i=l.y,o=l.width,s=l.height,l.r=a.r,a=l}else n=a.x,i=a.y,o=a.width,s=a.height;a.r?n5(e,a):e.rect(n,i,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t})(Ct);bt.prototype.type="rect";var db={fill:"#000"},gb=2,la={},s5={style:st({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Fp.style)},Dt=(function(r){N(t,r);function t(e){var a=r.call(this)||this;return a.type="text",a._children=[],a._defaultStyle=db,a.attr(e),a}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e0,L=0;L=0&&(P=b[I],P.align==="right");)this._placeToken(P,e,C,y,L,"right",_),T-=P.width,L-=P.width,I--;for(D+=(f-(D-g)-(m-L)-T)/2;M<=I;)P=b[M],this._placeToken(P,e,C,y,D+P.width/2,"center",_),D+=P.width,M++;y+=C}},t.prototype._placeToken=function(e,a,n,i,o,s,l){var u=a.rich[e.styleName]||{};u.text=e.text;var f=e.verticalAlign,v=i+n/2;f==="top"?v=i+e.height/2:f==="bottom"&&(v=i+n-e.height/2);var h=!e.isLineHolder&&ig(u);h&&this._renderBackground(u,a,s==="right"?o-e.width:s==="center"?o-e.width/2:o,v-e.height/2,e.width,e.height);var c=!!u.backgroundColor,p=e.textPadding;p&&(o=bb(o,s,p),v-=e.height/2-p[0]-e.innerHeight/2);var d=this._getOrCreateChild(tl),g=d.createStyle();d.useStyle(g);var y=this._defaultStyle,m=!1,_=0,S=!1,x=xb("fill"in u?u.fill:"fill"in a?a.fill:(m=!0,y.fill)),b=Sb("stroke"in u?u.stroke:"stroke"in a?a.stroke:!c&&!l&&(!y.autoStroke||m)?(_=gb,S=!0,y.stroke):null),w=u.textShadowBlur>0||a.textShadowBlur>0;g.text=e.text,g.x=o,g.y=v,w&&(g.shadowBlur=u.textShadowBlur||a.textShadowBlur||0,g.shadowColor=u.textShadowColor||a.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||a.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||a.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=e.font||pn,g.opacity=fr(u.opacity,a.opacity,1),mb(g,u),b&&(g.lineWidth=fr(u.lineWidth,a.lineWidth,_),g.lineDash=J(u.lineDash,a.lineDash),g.lineDashOffset=a.lineDashOffset||0,g.stroke=b),x&&(g.fill=x),d.setBoundingRect(Om(g,e.contentWidth,e.contentHeight,S?0:null))},t.prototype._renderBackground=function(e,a,n,i,o,s){var l=e.backgroundColor,u=e.borderWidth,f=e.borderColor,v=l&&l.image,h=l&&!v,c=e.borderRadius,p=this,d,g;if(h||e.lineHeight||u&&f){d=this._getOrCreateChild(bt),d.useStyle(d.createStyle()),d.style.fill=null;var y=d.shape;y.x=n,y.y=i,y.width=o,y.height=s,y.r=c,d.dirtyShape()}if(h){var m=d.style;m.fill=l||null,m.fillOpacity=J(e.fillOpacity,1)}else if(v){g=this._getOrCreateChild(Te),g.onload=function(){p.dirtyStyle()};var _=g.style;_.image=l.image,_.x=n,_.y=i,_.width=o,_.height=s}if(u&&f){var m=d.style;m.lineWidth=u,m.stroke=f,m.strokeOpacity=J(e.strokeOpacity,1),m.lineDash=e.borderDash,m.lineDashOffset=e.borderDashOffset||0,d.strokeContainThreshold=0,d.hasFill()&&d.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(d||g).style;S.shadowBlur=e.shadowBlur||0,S.shadowColor=e.shadowColor||"transparent",S.shadowOffsetX=e.shadowOffsetX||0,S.shadowOffsetY=e.shadowOffsetY||0,S.opacity=fr(e.opacity,a.opacity,1)},t.makeFont=function(e){var a="";return VL(e)&&(a=[e.fontStyle,e.fontWeight,BL(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),a&&gr(a)||e.textFont||e.font},t})(Gr),l5={left:!0,right:1,center:1},u5={top:1,bottom:1,middle:1},yb=["fontStyle","fontWeight","fontSize","fontFamily"];function BL(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?x_+"px":r+"px"}function mb(r,t){for(var e=0;e=0,i=!1;if(r instanceof Ct){var o=UL(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(ss(s)||ss(l)){a=a||{};var u=a.style||{};u.fill==="inherit"?(i=!0,a=G({},a),u=G({},u),u.fill=s):!ss(u.fill)&&ss(s)?(i=!0,a=G({},a),u=G({},u),u.fill=vc(s)):!ss(u.stroke)&&ss(l)&&(i||(a=G({},a),u=G({},u)),u.stroke=vc(l)),a.style=u}}if(a&&a.z2==null){i||(a=G({},a));var f=r.z2EmphasisLift;a.z2=r.z2+(f??xl)}return a}function y5(r,t,e){if(e&&e.z2==null){e=G({},e);var a=r.z2SelectLift;e.z2=r.z2+(a??h5)}return e}function m5(r,t,e){var a=pt(r.currentStates,t)>=0,n=r.style.opacity,i=a?null:d5(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=G({},e),o=G({opacity:a?n:i.opacity*.1},o),e.style=o),e}function og(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return g5(this,r,t,e);if(r==="blur")return m5(this,r,e);if(r==="select")return y5(this,r,e)}return e}function To(r){r.stateProxy=og;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=og),e&&(e.stateProxy=og)}function Mb(r,t){!jL(r,t)&&!r.__highByOuter&&An(r,YL)}function Db(r,t){!jL(r,t)&&!r.__highByOuter&&An(r,XL)}function mn(r,t){r.__highByOuter|=1<<(t||0),An(r,YL)}function _n(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&An(r,XL)}function $L(r){An(r,Z_)}function $_(r){An(r,ZL)}function qL(r){An(r,c5)}function KL(r){An(r,p5)}function jL(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function JL(r){var t=r.getModel(),e=[],a=[];t.eachComponent(function(n,i){var o=U_(i),s=WL(r,i),l=n==="series";!l&&a.push(s),o.isBlured&&(s.group.traverse(function(u){ZL(u)}),l&&e.push(i)),o.isBlured=!1}),A(a,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(e,!1,t)})}function Gm(r,t,e,a){var n=a.getModel();e=e||"coordinateSystem";function i(u,f){for(var v=0;v0){var s={dataIndex:o,seriesIndex:e.seriesIndex};i!=null&&(s.dataType=i),t.push(s)}})}),t}function jn(r,t,e){ao(r,!0),An(r,To),Hm(r,t,e)}function T5(r){ao(r,!1)}function jt(r,t,e,a){a?T5(r):jn(r,t,e)}function Hm(r,t,e){var a=ft(r);t!=null?(a.focus=t,a.blurScope=e):a.focus&&(a.focus=null)}var Lb=["emphasis","blur","select"],C5={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function de(r,t,e,a){e=e||"itemStyle";for(var n=0;n1&&(o*=sg(p),s*=sg(p));var d=(n===i?-1:1)*sg((o*o*(s*s)-o*o*(c*c)-s*s*(h*h))/(o*o*(c*c)+s*s*(h*h)))||0,g=d*o*c/s,y=d*-s*h/o,m=(r+e)/2+Av(v)*g-Cv(v)*y,_=(t+a)/2+Cv(v)*g+Av(v)*y,S=kb([1,0],[(h-g)/o,(c-y)/s]),x=[(h-g)/o,(c-y)/s],b=[(-1*h-g)/o,(-1*c-y)/s],w=kb(x,b);if(Um(x,b)<=-1&&(w=Yl),Um(x,b)>=1&&(w=0),w<0){var C=Math.round(w/Yl*1e6)/1e6;w=Yl*2+C%2*Yl}f.addData(u,m,_,o,s,S,w,v,i)}var P5=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,R5=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function E5(r){var t=new ka;if(!r)return t;var e=0,a=0,n=e,i=a,o,s=ka.CMD,l=r.match(P5);if(!l)return t;for(var u=0;uP*P+R*R&&(C=M,T=D),{cx:C,cy:T,x0:-f,y0:-v,x1:C*(n/x-1),y1:T*(n/x-1)}}function G5(r){var t;if(H(r)){var e=r.length;if(!e)return r;e===1?t=[r[0],r[0],0,0]:e===2?t=[r[0],r[0],r[1],r[1]]:e===3?t=r.concat(r[2]):t=r}else t=[r,r,r,r];return t}function F5(r,t){var e,a=Au(t.r,0),n=Au(t.r0||0,0),i=a>0,o=n>0;if(!(!i&&!o)){if(i||(a=n,n=0),n>a){var s=a;a=n,n=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var f=t.cx,v=t.cy,h=!!t.clockwise,c=Nb(u-l),p=c>lg&&c%lg;if(p>Xr&&(c=p),!(a>Xr))r.moveTo(f,v);else if(c>lg-Xr)r.moveTo(f+a*us(l),v+a*Ii(l)),r.arc(f,v,a,l,u,!h),n>Xr&&(r.moveTo(f+n*us(u),v+n*Ii(u)),r.arc(f,v,n,u,l,h));else{var d=void 0,g=void 0,y=void 0,m=void 0,_=void 0,S=void 0,x=void 0,b=void 0,w=void 0,C=void 0,T=void 0,M=void 0,D=void 0,L=void 0,I=void 0,P=void 0,R=a*us(l),E=a*Ii(l),O=n*us(u),k=n*Ii(u),V=c>Xr;if(V){var z=t.cornerRadius;z&&(e=G5(z),d=e[0],g=e[1],y=e[2],m=e[3]);var F=Nb(a-n)/2;if(_=ua(F,y),S=ua(F,m),x=ua(F,d),b=ua(F,g),T=w=Au(_,S),M=C=Au(x,b),(w>Xr||C>Xr)&&(D=a*us(u),L=a*Ii(u),I=n*us(l),P=n*Ii(l),cXr){var tt=ua(y,T),dt=ua(m,T),et=Mv(I,P,R,E,a,tt,h),ht=Mv(D,L,O,k,a,dt,h);r.moveTo(f+et.cx+et.x0,v+et.cy+et.y0),T0&&r.arc(f+et.cx,v+et.cy,tt,Fe(et.y0,et.x0),Fe(et.y1,et.x1),!h),r.arc(f,v,a,Fe(et.cy+et.y1,et.cx+et.x1),Fe(ht.cy+ht.y1,ht.cx+ht.x1),!h),dt>0&&r.arc(f+ht.cx,v+ht.cy,dt,Fe(ht.y1,ht.x1),Fe(ht.y0,ht.x0),!h))}else r.moveTo(f+R,v+E),r.arc(f,v,a,l,u,!h);if(!(n>Xr)||!V)r.lineTo(f+O,v+k);else if(M>Xr){var tt=ua(d,M),dt=ua(g,M),et=Mv(O,k,D,L,n,-dt,h),ht=Mv(R,E,I,P,n,-tt,h);r.lineTo(f+et.cx+et.x0,v+et.cy+et.y0),M0&&r.arc(f+et.cx,v+et.cy,dt,Fe(et.y0,et.x0),Fe(et.y1,et.x1),!h),r.arc(f,v,n,Fe(et.cy+et.y1,et.cx+et.x1),Fe(ht.cy+ht.y1,ht.cx+ht.x1),h),tt>0&&r.arc(f+ht.cx,v+ht.cy,tt,Fe(ht.y1,ht.x1),Fe(ht.y0,ht.x0),!h))}else r.lineTo(f+O,v+k),r.arc(f,v,n,u,l,h)}r.closePath()}}}var H5=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r})(),Ve=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new H5},t.prototype.buildPath=function(e,a){F5(e,a)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t})(Ct);Ve.prototype.type="sector";var W5=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r})(),bl=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new W5},t.prototype.buildPath=function(e,a){var n=a.cx,i=a.cy,o=Math.PI*2;e.moveTo(n+a.r,i),e.arc(n,i,a.r,0,o,!1),e.moveTo(n+a.r0,i),e.arc(n,i,a.r0,0,o,!0)},t})(Ct);bl.prototype.type="ring";function U5(r,t,e,a){var n=[],i=[],o=[],s=[],l,u,f,v;if(a){f=[1/0,1/0],v=[-1/0,-1/0];for(var h=0,c=r.length;h=2){if(a){var i=U5(n,a,e,t.smoothConstraint);r.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(e?o:o-1);s++){var l=i[s*2],u=i[s*2+1],f=n[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(n[0][0],n[0][1]);for(var s=1,v=n.length;sPi[1]){if(i=!1,Ae.negativeSize||a)return i;var l=Dv(Pi[0]-Li[1]),u=Dv(Li[0]-Pi[1]);ug(l,u)>Lv.len()&&(l=u||!Ae.bidirectional)&&(ut.scale(Iv,s,-u*n),Ae.useDir&&Ae.calcDirMTV()))}}return i},r.prototype._getProjMinMaxOnAxis=function(t,e,a){for(var n=this._axes[t],i=this._origin,o=e[0].dot(n)+i[t],s=o,l=o,u=1;u0){var v=f.duration,h=f.delay,c=f.easing,p={duration:v,delay:h||0,easing:c,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,p):t.animateTo(e,p)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),i&&i()}function Rt(r,t,e,a,n,i){J_("update",r,t,e,a,n,i)}function $t(r,t,e,a,n,i){J_("enter",r,t,e,a,n,i)}function Ws(r){if(!r.__zr)return!0;for(var t=0;tQt(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function zb(r){return!r.isGroup}function iG(r){return r.shape!=null}function Jf(r,t,e){if(!r||!t)return;function a(o){var s={};return o.traverse(function(l){zb(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return iG(o)&&(s.shape=rt(o.shape)),s}var i=a(r);t.traverse(function(o){if(zb(o)&&o.anid){var s=i[o.anid];if(s){var l=n(o);o.attr(n(s)),Rt(o,l,e,ft(o).dataIndex)}}})}function e1(r,t){return W(r,function(e){var a=e[0];a=xt(a,t.x),a=Vt(a,t.x+t.width);var n=e[1];return n=xt(n,t.y),n=Vt(n,t.y+t.height),[a,n]})}function g2(r,t){var e=xt(r.x,t.x),a=Vt(r.x+r.width,t.x+t.width),n=xt(r.y,t.y),i=Vt(r.y+r.height,t.y+t.height);if(a>=e&&i>=n)return{x:e,y:n,width:a-e,height:i-n}}function Al(r,t,e){var a=G({rectHover:!0},t),n=a.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),st(n,e),new Te(a)):el(r.replace("path://",""),a,e,"center")}function Mu(r,t,e,a,n){for(var i=0,o=n[n.length-1];i1)return!1;var g=fg(c,p,f,v)/h;return!(g<0||g>1)}function fg(r,t,e,a){return r*a-e*t}function oG(r){return r<=1e-6&&r>=-1e-6}function Co(r,t,e,a,n){return t==null||(It(t)?Jt[0]=Jt[1]=Jt[2]=Jt[3]=t:(Jt[0]=t[0],Jt[1]=t[1],Jt[2]=t[2],Jt[3]=t[3]),a&&(Jt[0]=xt(0,Jt[0]),Jt[1]=xt(0,Jt[1]),Jt[2]=xt(0,Jt[2]),Jt[3]=xt(0,Jt[3])),e&&(Jt[0]=-Jt[0],Jt[1]=-Jt[1],Jt[2]=-Jt[2],Jt[3]=-Jt[3]),Gb(r,Jt,"x","width",3,1,n&&n[0]||0),Gb(r,Jt,"y","height",0,2,n&&n[1]||0)),r}var Jt=[0,0,0,0];function Gb(r,t,e,a,n,i,o){var s=t[i]+t[n],l=r[a];r[a]+=s,o=xt(0,Vt(o,l)),r[a]=0?-t[n]:t[i]>=0?l+t[i]:Qt(s)>1e-8?(l-o)*t[n]/s:0):r[e]-=t[n]}function Mn(r){var t=r.itemTooltipOption,e=r.componentModel,a=r.itemName,n=Z(t)?{formatter:t}:t,i=e.mainType,o=e.componentIndex,s={componentType:i,name:a,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&A(At(l),function(f){j(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=ft(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:a,option:st({content:a,encodeHTMLContent:!0,formatterParams:s},n)}}function Xm(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function hi(r,t){if(r)if(H(r))for(var e=0;et&&(t=o),ot&&(e=t=0),{min:e,max:t}}function $p(r,t,e){_2(r,t,e,-1/0)}function _2(r,t,e,a){if(r.ignoreModelZ)return a;var n=r.getTextContent(),i=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l=0&&s.push(l)}),s}}function ci(r,t){return yt(yt({},r,!0),t,!0)}const mG={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},_G={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var wc="ZH",o1="EN",Us=o1,Wh={},s1={},C2=Mt.domSupported?(function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Us).toUpperCase();return r.indexOf(wc)>-1?wc:Us})():Us;function l1(r,t){r=r.toUpperCase(),s1[r]=new Tt(t),Wh[r]=t}function SG(r){if(Z(r)){var t=Wh[r.toUpperCase()]||{};return r===wc||r===o1?rt(t):yt(rt(t),rt(Wh[Us]),!1)}else return yt(rt(r),rt(Wh[Us]),!1)}function qm(r){return s1[r]}function xG(){return s1[Us]}l1(o1,mG);l1(wc,_G);var Km=null;function bG(r){Km||(Km=r)}function se(){return Km}function A2(r,t){var e=se(),a=t.breakOption,n=t.breakParsed;return!n&&e&&(n=e.parseAxisBreakOption(a,r)),n}function Tc(r){var t=r.brk;return t?t.breaks:[]}function Cc(r){var t=r.brk;return t?t.hasBreaks():!1}var u1=1e3,f1=u1*60,Xu=f1*60,Er=Xu*24,Yb=Er*365,wG={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},Uh={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},TG="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",Rv="{yyyy}-{MM}-{dd}",Xb={year:"{yyyy}",month:"{yyyy}-{MM}",day:Rv,hour:Rv+" "+Uh.hour,minute:Rv+" "+Uh.minute,second:Rv+" "+Uh.second,millisecond:TG},cr=["year","month","day","hour","minute","second","millisecond"],CG=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function AG(r){return!Z(r)&&!at(r)?MG(r):r}function MG(r){r=r||{};var t={},e=!0;return A(cr,function(a){e&&(e=r[a]==null)}),A(cr,function(a,n){var i=r[a];t[a]={};for(var o=null,s=n;s>=0;s--){var l=cr[s],u=lt(i)&&!H(i)?i[l]:i,f=void 0;H(u)?(f=u.slice(),o=f[0]||""):Z(u)?(o=u,f=[o]):(o==null?o=Uh[a]:wG[l].test(o)||(o=t[l][l][0]+" "+o),f=[o],e&&(f[1]="{primary|"+o+"}")),t[a][l]=f}}),t}function je(r,t){return r+="","0000".substr(0,t-r.length)+r}function Zu(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function DG(r){return r===Zu(r)}function IG(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Qf(r,t,e,a){var n=Fa(r),i=n[M2(e)](),o=n[v1(e)]()+1,s=Math.floor((o-1)/3)+1,l=n[h1(e)](),u=n["get"+(e?"UTC":"")+"Day"](),f=n[c1(e)](),v=(f-1)%12+1,h=n[p1(e)](),c=n[d1(e)](),p=n[g1(e)](),d=f>=12?"pm":"am",g=d.toUpperCase(),y=a instanceof Tt?a:qm(a||C2)||xG(),m=y.getModel("time"),_=m.get("month"),S=m.get("monthAbbr"),x=m.get("dayOfWeek"),b=m.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,d+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,je(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,je(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,je(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,je(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,je(v+"",2)).replace(/{h}/g,v+"").replace(/{mm}/g,je(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,je(c,2)).replace(/{s}/g,c+"").replace(/{SSS}/g,je(p,3)).replace(/{S}/g,p+"")}function LG(r,t,e,a,n){var i=null;if(Z(e))i=e;else if(at(e)){var o={time:r.time,level:r.time?r.time.level:0},s=se();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),i=e(r.value,t,o)}else{var l=r.time;if(l){var u=e[l.lowerTimeUnit][l.upperTimeUnit];i=u[Math.min(l.level,u.length-1)]||""}else{var f=Ys(r.value,n);i=e[f][f][0]}}return Qf(new Date(r.value),i,n,a)}function Ys(r,t){var e=Fa(r),a=e[v1(t)]()+1,n=e[h1(t)](),i=e[c1(t)](),o=e[p1(t)](),s=e[d1(t)](),l=e[g1(t)](),u=l===0,f=u&&s===0,v=f&&o===0,h=v&&i===0,c=h&&n===1,p=c&&a===1;return p?"year":c?"month":h?"day":v?"hour":f?"minute":u?"second":"millisecond"}function Ac(r,t,e){switch(t){case"year":r[D2(e)](0);case"month":r[I2(e)](1);case"day":r[L2(e)](0);case"hour":r[P2(e)](0);case"minute":r[R2(e)](0);case"second":r[E2(e)](0)}return r}function M2(r){return r?"getUTCFullYear":"getFullYear"}function v1(r){return r?"getUTCMonth":"getMonth"}function h1(r){return r?"getUTCDate":"getDate"}function c1(r){return r?"getUTCHours":"getHours"}function p1(r){return r?"getUTCMinutes":"getMinutes"}function d1(r){return r?"getUTCSeconds":"getSeconds"}function g1(r){return r?"getUTCMilliseconds":"getMilliseconds"}function PG(r){return r?"setUTCFullYear":"setFullYear"}function D2(r){return r?"setUTCMonth":"setMonth"}function I2(r){return r?"setUTCDate":"setDate"}function L2(r){return r?"setUTCHours":"setHours"}function P2(r){return r?"setUTCMinutes":"setMinutes"}function R2(r){return r?"setUTCSeconds":"setSeconds"}function E2(r){return r?"setUTCMilliseconds":"setMilliseconds"}function RG(r,t,e,a,n,i,o,s){var l=new Dt({style:{text:r,font:t,align:e,verticalAlign:a,padding:n,rich:i,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function y1(r){if(!N_(r))return Z(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function m1(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,a){return a.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Dl=Uf;function jm(r,t,e){var a="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(f){return f&&gr(f)?f:"-"}function i(f){return zr(f)}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?Fa(r):r;if(isNaN(+l)){if(s)return"-"}else return Qf(l,a,e)}if(t==="ordinal")return ac(r)?n(r):It(r)&&i(r)?r+"":"-";var u=Ea(r);return i(u)?y1(u):ac(r)?n(r):typeof r=="boolean"?r+"":"-"}var Zb=["a","b","c","d","e","f","g"],cg=function(r,t){return"{"+r+(t??"")+"}"};function _1(r,t,e){H(t)||(t=[t]);var a=t.length;if(!a)return"";for(var n=t[0].$vars||[],i=0;i':'';var o=e.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}}function EG(r,t,e){(r==="week"||r==="month"||r==="quarter"||r==="half-year"||r==="year")&&(r=`MM-dd yyyy`);var a=Fa(t),n=e?"getUTC":"get",i=a[n+"FullYear"](),o=a[n+"Month"]()+1,s=a[n+"Date"](),l=a[n+"Hours"](),u=a[n+"Minutes"](),f=a[n+"Seconds"](),v=a[n+"Milliseconds"]();return r=r.replace("MM",je(o,2)).replace("M",o).replace("yyyy",i).replace("yy",je(i%100+"",2)).replace("dd",je(s,2)).replace("d",s).replace("hh",je(l,2)).replace("h",l).replace("mm",je(u,2)).replace("m",u).replace("ss",je(f,2)).replace("s",f).replace("SSS",je(v,3)),r}function kG(r){return r&&r.charAt(0).toUpperCase()+r.substr(1)}function Mo(r,t){return t=t||"transparent",Z(r)?r:lt(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function Mc(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var Yh={},pg={},Il=(function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(t,e){this._nonSeriesBoxMasterList=a(Yh),this._normalMasterList=a(pg);function a(n,i){var o=[];return A(n,function(s,l){var u=s.create(t,e);o=o.concat(u||[])}),o}},r.prototype.update=function(t,e){A(this._normalMasterList,function(a){a.update&&a.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(t,e){if(t==="matrix"||t==="calendar"){Yh[t]=e;return}pg[t]=e},r.get=function(t){return pg[t]||Yh[t]},r})();function OG(r){return!!Yh[r]}var NG=1,N2=2;function BG(r){B2.set(r.fullType,{getCoord2:void 0}).getCoord2=r.getCoord2}var B2=K();function V2(r){var t=r.getShallow("coord",!0),e=NG;if(t==null){var a=B2.get(r.type);a&&a.getCoord2&&(e=N2,t=a.getCoord2(r))}return{coord:t,from:e}}var Xs=0,Xh=1,z2=2;function G2(r,t){var e=r.getShallow("coordinateSystem"),a=r.getShallow("coordinateSystemUsage",!0),n=Xs;if(e){var i=r.mainType==="series";a==null&&(a=i?"data":"box"),a==="data"?(n=Xh,i||(n=Xs)):a==="box"&&(n=z2,!i&&!OG(e)&&(n=Xs))}return{coordSysType:e,kind:n}}function tv(r){var t=r.targetModel,e=r.coordSysType,a=r.coordSysProvider,n=r.isDefaultDataCoordSys;r.allowNotFound;var i=G2(t),o=i.kind,s=i.coordSysType;if(n&&o!==Xh&&(o=Xh,s=e),o===Xs||s!==e)return Xs;var l=a(e,t);return l?(o===Xh?t.coordinateSystem=l:t.boxCoordinateSystem=l,o):Xs}var F2=function(r,t){var e=t.getReferringComponents(r,re).models[0];return e&&e.coordinateSystem},Zh=A,H2=["left","right","top","bottom","width","height"],no=[["width","left","right"],["height","top","bottom"]];function S1(r,t,e,a,n){var i=0,o=0;a==null&&(a=1/0),n==null&&(n=1/0);var s=0;t.eachChild(function(l,u){var f=l.getBoundingRect(),v=t.childAt(u+1),h=v&&v.getBoundingRect(),c,p;if(r==="horizontal"){var d=f.width+(h?-h.x+f.x:0);c=i+d,c>a||l.newline?(i=0,c=d,o+=s+e,s=f.height):s=Math.max(s,f.height)}else{var g=f.height+(h?-h.y+f.y:0);p=o+g,p>n||l.newline?(i+=s+e,o=0,p=g,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=c+e:o=p+e)})}var ho=S1;St(S1,"vertical");St(S1,"horizontal");function W2(r,t){return{left:r.getShallow("left",t),top:r.getShallow("top",t),right:r.getShallow("right",t),bottom:r.getShallow("bottom",t),width:r.getShallow("width",t),height:r.getShallow("height",t)}}function VG(r,t){var e=me(r,t,{enableLayoutOnlyByCenter:!0}),a=r.getBoxLayoutParams(),n,i;if(e.type===Iu.point)i=e.refPoint,n=qt(a,{width:t.getWidth(),height:t.getHeight()});else{var o=r.get("center"),s=H(o)?o:[o,o];n=qt(a,e.refContainer),i=e.boxCoordFrom===N2?e.refPoint:[$(s[0],n.width)+n.x,$(s[1],n.height)+n.y]}return{viewRect:n,center:i}}function U2(r,t){var e=VG(r,t),a=e.viewRect,n=e.center,i=r.get("radius");H(i)||(i=[0,i]);var o=$(a.width,t.getWidth()),s=$(a.height,t.getHeight()),l=Math.min(o,s),u=$(i[0],l/2),f=$(i[1],l/2);return{cx:n[0],cy:n[1],r0:u,r:f,viewRect:a}}function qt(r,t,e){e=Dl(e||0);var a=t.width,n=t.height,i=$(r.left,a),o=$(r.top,n),s=$(r.right,a),l=$(r.bottom,n),u=$(r.width,a),f=$(r.height,n),v=e[2]+e[0],h=e[1]+e[3],c=r.aspect;switch(isNaN(u)&&(u=a-s-h-i),isNaN(f)&&(f=n-l-v-o),c!=null&&(isNaN(u)&&isNaN(f)&&(c>a/n?u=a*.8:f=n*.8),isNaN(u)&&(u=c*f),isNaN(f)&&(f=u/c)),isNaN(i)&&(i=a-s-u-h),isNaN(o)&&(o=n-l-f-v),r.left||r.right){case"center":i=a/2-u/2-e[3];break;case"right":i=a-u-h;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-f/2-e[0];break;case"bottom":o=n-f-v;break}i=i||0,o=o||0,isNaN(u)&&(u=a-h-i-(s||0)),isNaN(f)&&(f=n-v-o-(l||0));var p=new ot((t.x||0)+i+e[3],(t.y||0)+o+e[0],u,f);return p.margin=e,p}function Y2(r,t,e){var a=r.getShallow("preserveAspect",!0);if(!a)return t;var n=t.width/t.height;if(Math.abs(Math.atan(e)-Math.atan(n))<1e-9)return t;var i=r.getShallow("preserveAspectAlign",!0),o=r.getShallow("preserveAspectVerticalAlign",!0),s={width:t.width,height:t.height},l=a==="cover";return n>e&&!l||n=d)return v;for(var g=0;g=0;l--)s=yt(s,n[l],!0);a.defaultOption=s}return a.defaultOption},t.prototype.getReferringComponents=function(e,a){var n=e+"Index",i=e+"Id";return ml(this.ecModel,e,{index:this.get(n,!0),id:this.get(i,!0)},a)},t.prototype.getBoxLayoutParams=function(){return W2(this,!1)},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=(function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0})(),t})(Tt);DL(wt,Tt);zp(wt);gG(wt);yG(wt,FG);function FG(r){var t=[];return A(wt.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=W(t,function(e){return ma(e).main}),r!=="dataset"&&pt(t,"dataset")<=0&&t.unshift("dataset"),t}var B={color:{},darkColor:{},size:{}},ne=B.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};G(ne,{primary:ne.neutral80,secondary:ne.neutral70,tertiary:ne.neutral60,quaternary:ne.neutral50,disabled:ne.neutral20,border:ne.neutral30,borderTint:ne.neutral20,borderShade:ne.neutral40,background:ne.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:ne.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:ne.neutral70,axisLineTint:ne.neutral40,axisTick:ne.neutral70,axisTickMinor:ne.neutral60,axisLabel:ne.neutral70,axisSplitLine:ne.neutral15,axisMinorSplitLine:ne.neutral05});for(var Ri in ne)if(ne.hasOwnProperty(Ri)){var $b=ne[Ri];Ri==="theme"?B.darkColor.theme=ne.theme.slice():Ri==="highlight"?B.darkColor.highlight="rgba(255,231,130,0.4)":Ri.indexOf("accent")===0?B.darkColor[Ri]=ln($b,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):B.darkColor[Ri]=ln($b,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)})}B.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var Z2="";typeof navigator<"u"&&(Z2=navigator.platform||"");var fs="rgba(0, 0, 0, 0.2)",$2=B.color.theme[0],HG=ln($2,null,null,.9);const q2={darkMode:"auto",colorBy:"series",color:B.color.theme,gradientColor:[HG,$2],aria:{decal:{decals:[{color:fs,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:fs,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:fs,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:fs,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:fs,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:fs,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Z2.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var Pe={Must:1,Might:2,Not:3},K2=mt();function WG(r){K2(r).datasetMap=K()}function j2(r,t,e){var a={},n=b1(t);if(!n||!r)return a;var i=[],o=[],s=t.ecModel,l=K2(s).datasetMap,u=n.uid+"_"+e.seriesLayoutBy,f,v;r=r.slice(),A(r,function(d,g){var y=lt(d)?d:r[g]={name:d};y.type==="ordinal"&&f==null&&(f=g,v=p(y)),a[y.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:v,valueWayDim:0});A(r,function(d,g){var y=d.name,m=p(d);if(f==null){var _=h.valueWayDim;c(a[y],_,m),c(o,_,m),h.valueWayDim+=m}else if(f===g)c(a[y],0,m),c(i,0,m);else{var _=h.categoryWayDim;c(a[y],_,m),c(o,_,m),h.categoryWayDim+=m}});function c(d,g,y){for(var m=0;mt)return r[a];return r[e-1]}function tP(r,t,e,a,n,i,o){i=i||r;var s=t(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var f=o==null||!a?e:$G(a,o);if(f=f||e,!(!f||!f.length)){var v=f[l];return n&&(u[n]=v),s.paletteIdx=(l+1)%f.length,v}}function qG(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var Ev,Xl,Kb,jb="\0_ec_inner",KG=1,T1=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,a,n,i,o,s){i=i||{},this.option=null,this._theme=new Tt(i),this._locale=new Tt(o),this._optionManager=s},t.prototype.setOption=function(e,a,n){var i=tw(a);this._optionManager.setOption(e,n,i),this._resetOption(null,i)},t.prototype.resetOption=function(e,a){return this._resetOption(e,tw(a))},t.prototype._resetOption=function(e,a){var n=!1,i=this._optionManager;if(!e||e==="recreate"){var o=i.mountOption(e==="recreate");!this.option||e==="recreate"?Kb(this,o):(this.restoreData(),this._mergeOption(o,a)),n=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=i.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,a))}if(!e||e==="recreate"||e==="media"){var l=i.getMediaOption(this);l.length&&A(l,function(u){n=!0,this._mergeOption(u,a)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,a){var n=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=K(),u=a&&a.replaceMergeMainTypeMap;WG(this),A(e,function(v,h){v!=null&&(wt.hasClass(h)?h&&(s.push(h),l.set(h,!0)):n[h]=n[h]==null?rt(v):yt(n[h],v,!0))}),u&&u.each(function(v,h){wt.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),wt.topologicalTravel(s,wt.getAllClassMainTypes(),f,this);function f(v){var h=XG(this,v,Ut(e[v])),c=i.get(v),p=c?u&&u.get(v)?"replaceMerge":"normalMerge":"replaceAll",d=SL(c,h,p);nz(d,v,wt),n[v]=null,i.set(v,null),o.set(v,0);var g=[],y=[],m=0,_;A(d,function(S,x){var b=S.existing,w=S.newOption;if(!w)b&&(b.mergeOption({},this),b.optionUpdated({},!1));else{var C=v==="series",T=wt.getClass(v,S.keyInfo.subType,!C);if(!T)return;if(v==="tooltip"){if(_)return;_=!0}if(b&&b.constructor===T)b.name=S.keyInfo.name,b.mergeOption(w,this),b.optionUpdated(w,!1);else{var M=G({componentIndex:x},S.keyInfo);b=new T(w,this,this,M),G(b,M),S.brandNew&&(b.__requireNewView=!0),b.init(w,this,this),b.optionUpdated(null,!0)}}b?(g.push(b.option),y.push(b),m++):(g.push(void 0),y.push(void 0))},this),n[v]=g,i.set(v,y),o.set(v,m),v==="series"&&Ev(this)}this._seriesIndices||Ev(this)},t.prototype.getOption=function(){var e=rt(this.option);return A(e,function(a,n){if(wt.hasClass(n)){for(var i=Ut(a),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!uf(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,e[n]=i}}),delete e[jb],e},t.prototype.setTheme=function(e){this._theme=new Tt(e),this._resetOption("recreate",null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,a){var n=this._componentsMap.get(e);if(n){var i=n[a||0];if(i)return i;if(a==null){for(var o=0;o=t:e==="max"?r<=t:r===t}function nF(r,t){return r.join(",")===t.join(",")}var Yr=A,df=lt,ew=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function dg(r){var t=r&&r.itemStyle;if(t)for(var e=0,a=ew.length;e0?e[o-1].seriesModel:null)}),pF(e)}})}function pF(r){A(r,function(t,e){var a=[],n=[NaN,NaN],i=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(i,function(u,f,v){var h=o.get(t.stackedDimension,v);if(isNaN(h))return n;var c,p;s?p=o.getRawIndex(v):c=o.get(t.stackedByDimension,v);for(var d=NaN,g=e-1;g>=0;g--){var y=r[g];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,c)),p>=0){var m=y.data.getByRawIndex(y.stackResultDimension,p);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&h>=0&&m>0||l==="samesign"&&h<=0&&m<0){h=Ui(h,m),d=m;break}}}return a[0]=h,a[1]=d,a})})}var Jp=(function(){function r(t){this.data=t.data||(t.sourceFormat===ra?{}:[]),this.sourceFormat=t.sourceFormat||GL,this.seriesLayoutBy=t.seriesLayoutBy||jr,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var a=0;ad&&(d=_)}c[0]=p,c[1]=d}},n=function(){return this._data?this._data.length/this._dimSize:0};lw=(t={},t[Ie+"_"+jr]={pure:!0,appendData:i},t[Ie+"_"+Xo]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[br]={pure:!0,appendData:i},t[ra]={pure:!0,appendData:function(o){var s=this._data;A(o,function(l,u){for(var f=s[u]||(s[u]=[]),v=0;v<(l||[]).length;v++)f.push(l[v])})}},t[xr]={appendData:i},t[Kn]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function i(o){for(var s=0;s=0&&(d=o.interpolatedValue[g])}return d!=null?d+"":""})}},r.prototype.getRawValue=function(t,e){return al(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,a){},r})();function hw(r){var t,e;return lt(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function $u(r){return new bF(r)}var bF=(function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,a=t&&t.skip;if(this._dirty&&e){var n=this.context;n.data=n.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!a&&(i=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(i="reset");function f(m){return!(m>=1)&&(m=1),m}var v;(this._dirty||i==="reset")&&(this._dirty=!1,v=this._doReset(a)),this._modBy=l,this._modDataCount=u;var h=t&&t.step;if(e?this._dueEnd=e._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var c=this._dueIndex,p=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!a&&(v||c1&&a>0?s:o}};return i;function o(){return t=r?null:lt},gte:function(r,t){return r>=t}},TF=(function(){function r(t,e){if(!It(e)){var a="";Ot(a)}this._opFn=fP[t],this._rvalFloat=Ea(e)}return r.prototype.evaluate=function(t){return It(t)?this._opFn(t,this._rvalFloat):this._opFn(Ea(t),this._rvalFloat)},r})(),vP=(function(){function r(t,e){var a=t==="desc";this._resultLT=a?1:-1,e==null&&(e=a?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var a=It(t)?t:Ea(t),n=It(e)?e:Ea(e),i=isNaN(a),o=isNaN(n);if(i&&(a=this._incomparable),o&&(n=this._incomparable),i&&o){var s=Z(t),l=Z(e);s&&(a=l?t:0),l&&(n=s?e:0)}return an?-this._resultLT:0},r})(),CF=(function(){function r(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=Ea(e)}return r.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var a=typeof t;a!==this._rvalTypeof&&(a==="number"||this._rvalTypeof==="number")&&(e=Ea(t)===this._rvalFloat)}return this._isEQ?e:!e},r})();function AF(r,t){return r==="eq"||r==="ne"?new CF(r==="eq",t):j(fP,r)?new TF(r,t):null}function hP(r){var t="",e=-1/0,a=-1/0,n=1/0,i=1/0;return r&&(r.g!=null&&(t+="G"+r.g,e=r.g),r.ge!=null&&(t+="GE"+r.ge,a=r.ge),r.l!=null&&(t+="L"+r.l,n=r.l),r.le!=null&&(t+="LE"+r.le,i=r.le)),{key:t,g:e,ge:a,l:n,le:i}}function cP(r,t){return t>r.g&&t>=r.ge&&t65535?NF:BF}function VF(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function dw(r,t,e,a,n){var i=gP[e||"float"];if(n){var o=r[t],s=o&&o.length;if(s!==a){for(var l=new i(a),u=0;ug[1]&&(g[1]=d)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,a){for(var n=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=W(o,function(m){return m.property}),f=0;fy[1]&&(y[1]=g)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,a=e[t];if(a!=null&&at)i=o-1;else return o}return-1},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var a=e.constructor,n=this._count;if(a===Array){t=new a(n);for(var i=0;i=v&&m<=h||isNaN(m))&&(l[u++]=d),d++}p=!0}else if(i===2){for(var g=c[n[0]],_=c[n[1]],S=t[n[1]][0],x=t[n[1]][1],y=0;y=v&&m<=h||isNaN(m))&&(b>=S&&b<=x||isNaN(b))&&(l[u++]=d),d++}p=!0}}if(!p)if(i===1)for(var y=0;y=v&&m<=h||isNaN(m))&&(l[u++]=w)}else for(var y=0;yt[M][1])&&(C=!1)}C&&(l[u++]=e.getRawIndex(y))}return uy[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(t,e){var a=this.clone([t],!0),n=a._chunks,i=n[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),f,v,h,c=new(vs(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));c[s++]=u;for(var p=1;pf&&(f=v,h=S)}D>0&&Ds&&(d=s-f);for(var g=0;gp&&(p=m,c=f+g)}var _=this.getRawIndex(v),S=this.getRawIndex(c);vf-p&&(l=f-p,s.length=l);for(var d=0;dv[1]&&(v[1]=y),h[c++]=m}return i._count=c,i._indices=h,i._updateGetRawIdx(),i},r.prototype.each=function(t,e){if(this._count)for(var a=t.length,n=this._chunks,i=0,o=this.count();ic&&(c=g))}return l[f]=[h,c]},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var a=[],n=this._chunks,i=0;i=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=(function(){function t(e,a,n,i){return Jn(e[i],this._dimensions[i])}mg={arrayRows:t,objectRows:function(e,a,n,i){return Jn(e[a],this._dimensions[i])},keyedColumns:t,original:function(e,a,n,i){var o=e&&(e.value==null?e:e.value);return Jn(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(e,a,n,i){return e[i]}}})(),r})(),yP=(function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,e=this._getUpstreamSourceManagers(),a=!!e.length,n,i;if(Ov(t)){var o=t,s=void 0,l=void 0,u=void 0;if(a){var f=e[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,i=[f._getVersionSign()]}else s=o.get("data",!0),l=er(s)?Kn:xr,i=[];var v=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},c=J(v.seriesLayoutBy,h.seriesLayoutBy)||null,p=J(v.sourceHeader,h.sourceHeader),d=J(v.dimensions,h.dimensions),g=c!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||d;n=g?[t0(s,{seriesLayoutBy:c,sourceHeader:p,dimensions:d},l)]:[]}else{var y=t;if(a){var m=this._applyTransform(e);n=m.sourceList,i=m.upstreamSignList}else{var _=y.get("source",!0);n=[t0(_,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(n,i)},r.prototype._applyTransform=function(t){var e=this._sourceHost,a=e.get("transform",!0),n=e.get("fromTransformResult",!0);if(n!=null){var i="";t.length!==1&&yw(i)}var o,s=[],l=[];return A(t,function(u){u.prepareSource();var f=u.getSource(n||0),v="";n!=null&&!f&&yw(v),s.push(f),l.push(u._getVersionSign())}),a?o=kF(a,s,{datasetIndex:e.componentIndex}):n!=null&&(o=[dF(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e1||e>0&&!r.noHeader;return A(r.blocks,function(n){var i=xP(n);i>=t&&(t=i+ +(a&&(!i||r0(n)&&!n.noHeader)))}),t}return 0}function HF(r,t,e,a){var n=t.noHeader,i=UF(xP(t)),o=[],s=t.blocks||[];Be(!s||H(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(j(u,l)){var f=new vP(u[l],null);s.sort(function(d,g){return f.evaluate(d.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}A(s,function(d,g){var y=t.valueFormatter,m=SP(d)(y?G(G({},r),{valueFormatter:y}):r,d,g>0?i.html:0,a);m!=null&&o.push(m)});var v=r.renderMode==="richText"?o.join(i.richText):a0(a,o.join(""),n?e:i.html);if(n)return v;var h=jm(t.header,"ordinal",r.useUTC),c=_P(a,r.renderMode).nameStyle,p=mP(a);return r.renderMode==="richText"?bP(r,h,c)+i.richText+v:a0(a,'
'+Ue(h)+"
"+v,e)}function WF(r,t,e,a){var n=r.renderMode,i=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,f=t.valueFormatter||r.valueFormatter||function(S){return S=H(S)?S:[S],W(S,function(x,b){return jm(x,H(c)?c[b]:c,u)})};if(!(i&&o)){var v=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||B.color.secondary,n),h=i?"":jm(l,"ordinal",u),c=t.valueType,p=o?[]:f(t.value,t.rawDataIndex),d=!s||!i,g=!s&&i,y=_P(a,n),m=y.nameStyle,_=y.valueStyle;return n==="richText"?(s?"":v)+(i?"":bP(r,h,m))+(o?"":ZF(r,p,d,g,_)):a0(a,(s?"":v)+(i?"":YF(h,!s,m))+(o?"":XF(p,d,g,_)),e)}}function mw(r,t,e,a,n,i){if(r){var o=SP(r),s={useUTC:n,renderMode:e,orderMode:a,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function UF(r){return{html:GF[r],richText:FF[r]}}function a0(r,t,e){var a='
',n="margin: "+e+"px 0 0",i=mP(r);return'
'+t+a+"
"}function YF(r,t,e){var a=t?"margin-left:2px":"";return''+Ue(r)+""}function XF(r,t,e,a){var n=e?"10px":"20px",i=t?"float:right;margin-left:"+n:"";return r=H(r)?r:[r],''+W(r,function(o){return Ue(o)}).join("  ")+""}function bP(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function ZF(r,t,e,a,n){var i=[n],o=a?10:20;return e&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(H(t)?t.join(" "):t,i)}function wP(r,t){var e=r.getData().getItemVisual(t,"style"),a=e[r.visualDrawType];return Mo(a)}function TP(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var _g=(function(){function r(){this.richTextStyles={},this._nextStyleNameId=B_()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,a){var n=a==="richText"?this._generateStyleName():null,i=O2({color:e,type:t,renderMode:a,markerId:n});return Z(i)?i:(this.richTextStyles[n]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(t,e){var a={};H(e)?A(e,function(i){return G(a,i)}):G(a,e);var n=this._generateStyleName();return this.richTextStyles[n]=a,"{"+n+"|"+t+"}"},r})();function CP(r){var t=r.series,e=r.dataIndex,a=r.multipleSeries,n=t.getData(),i=n.mapDimensionsAll("defaultedTooltip"),o=i.length,s=t.getRawValue(e),l=H(s),u=wP(t,e),f,v,h,c;if(o>1||l&&!o){var p=$F(s,t,e,i,u);f=p.inlineValues,v=p.inlineValueTypes,h=p.blocks,c=p.inlineValues[0]}else if(o){var d=n.getDimensionInfo(i[0]);c=f=al(n,e,i[0]),v=d.type}else c=f=l?s[0]:s;var g=V_(t),y=g&&t.name||"",m=n.getName(e),_=a?y:m;return he("section",{header:y,noHeader:a||!g,sortParam:c,blocks:[he("nameValue",{markerType:"item",markerColor:u,name:_,noName:!gr(_),value:f,valueType:v,rawDataIndex:n.getRawIndex(e)})].concat(h||[])})}function $F(r,t,e,a,n){var i=t.getData(),o=Br(r,function(v,h,c){var p=i.getDimensionInfo(c);return v=v||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];a.length?A(a,function(v){f(al(i,e,v),v)}):A(r,f);function f(v,h){var c=i.getDimensionInfo(h);!c||c.otherDims.tooltip===!1||(o?u.push(he("nameValue",{markerType:"subItem",markerColor:n,name:c.displayName,value:v,valueType:c.type})):(s.push(v),l.push(c.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Ln=mt();function Nv(r,t){return r.getName(t)||r.getId(t)}var $h="__universalTransitionEnabled",Gt=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,a,n){this.seriesIndex=this.componentIndex,this.dataTask=$u({count:KF,reset:jF}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n);var i=Ln(this).sourceManager=new yP(this);i.prepareSource();var o=this.getInitialData(e,n);Sw(o,this),this.dataTask.context.data=o,Ln(this).dataBeforeProcessed=o,_w(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,a){var n=pf(this),i=n?Ko(e):{},o=this.subType;wt.hasClass(o)&&(o+="Series"),yt(e,a.getTheme().get(this.subType)),yt(e,this.getDefaultOption()),So(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Na(e,i,n)},t.prototype.mergeOption=function(e,a){e=yt(this.option,e,!0),this.fillDataTextStyle(e.data);var n=pf(this);n&&Na(this.option,e,n);var i=Ln(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(e,a);Sw(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Ln(this).dataBeforeProcessed=o,_w(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!er(e))for(var a=["show"],n=0;n=0&&h<0)&&(v=x,h=S,c=0),S===h&&(f[c++]=g))}return f.length=c,f},t.prototype.formatTooltip=function(e,a,n){return CP({series:this,dataIndex:e,multipleSeries:a})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Mt.node&&!(e&&e.ssr))return!1;var a=this.getShallow("animation");return a&&this.getData().count()>this.getShallow("animationThreshold")&&(a=!1),!!a},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,a,n){var i=this.ecModel,o=w1.prototype.getColorFromPalette.call(this,e,a,n);return o||(o=i.getColorFromPalette(e,a,n)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,a){this._innerSelect(this.getData(a),e)},t.prototype.unselect=function(e,a){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,o=this.getData(a);if(i==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&n.push(o)}return n},t.prototype.isSelected=function(e,a){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(a);return(n==="all"||n[Nv(i,e)])&&!i.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[$h])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,a){var n,i,o=this.option,s=o.selectedMode,l=a.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){lt(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(e,a)}},t.registerClass=function(e){return wt.registerClass(e)},t.protoInitialize=(function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"})(),t})(wt);ue(Gt,Qp);ue(Gt,w1);DL(Gt,wt);function _w(r){var t=r.name;V_(r)||(r.name=qF(r)||t)}function qF(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),a=[];return A(e,function(n){var i=t.getDimensionInfo(n);i.displayName&&a.push(i.displayName)}),a.join(" ")}function KF(r){return r.model.getRawData().count()}function jF(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),JF}function JF(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Sw(r,t){A(Ks(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,St(QF,t))})}function QF(r,t){var e=n0(r);return e&&e.setOutputEnd((t||this).count()),t}function n0(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var a=e.currentTask;if(a){var n=a.agentStubMap;n&&(a=n.get(r.uid))}return a}}var Yt=(function(){function r(){this.group=new it,this.uid=qo("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,a,n){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,a,n){},r.prototype.updateLayout=function(t,e,a,n){},r.prototype.updateVisual=function(t,e,a,n){},r.prototype.toggleBlurSeries=function(t,e,a){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r})();F_(Yt);zp(Yt);function jo(){var r=mt();return function(t){var e=r(t),a=t.pipelineContext,n=!!e.large,i=!!e.progressiveRender,o=e.large=!!(a&&a.large),s=e.progressiveRender=!!(a&&a.progressiveRender);return(n!==o||i!==s)&&"reset"}}var AP=mt(),t3=jo(),zt=(function(){function r(){this.group=new it,this.uid=qo("viewChart"),this.renderTask=$u({plan:e3,reset:r3}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,a,n){},r.prototype.highlight=function(t,e,a,n){var i=t.getData(n&&n.dataType);i&&bw(i,n,"emphasis")},r.prototype.downplay=function(t,e,a,n){var i=t.getData(n&&n.dataType);i&&bw(i,n,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,a,n){this.render(t,e,a,n)},r.prototype.updateVisual=function(t,e,a,n){this.render(t,e,a,n)},r.prototype.eachRendered=function(t){hi(this.group,t)},r.markUpdateMethod=function(t,e){AP(t).updateMethod=e},r.protoInitialize=(function(){var t=r.prototype;t.type="chart"})(),r})();function xw(r,t,e){r&&vf(r)&&(t==="emphasis"?mn:_n)(r,e)}function bw(r,t,e){var a=xo(r,t),n=t&&t.highlightKey!=null?M5(t.highlightKey):null;a!=null?A(Ut(a),function(i){xw(r.getItemGraphicEl(i),e,n)}):r.eachItemGraphicEl(function(i){xw(i,e,n)})}F_(zt);zp(zt);function e3(r){return t3(r.model)}function r3(r){var t=r.model,e=r.ecModel,a=r.api,n=r.payload,i=t.pipelineContext.progressiveRender,o=r.view,s=n&&AP(n).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,a,n),a3[l]}var a3={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Dc="\0__throttleOriginMethod",ww="\0__throttleRate",Tw="\0__throttleType";function td(r,t,e){var a,n=0,i=0,o=null,s,l,u,f;t=t||0;function v(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var h=function(){for(var c=[],p=0;p=0?v():o=setTimeout(v,-s),n=a};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(c){f=c},h}function Ll(r,t,e,a){var n=r[t];if(n){var i=n[Dc]||n,o=n[Tw],s=n[ww];if(s!==e||o!==a){if(e==null||!a)return r[t]=i;n=r[t]=td(i,e,a==="debounce"),n[Dc]=i,n[Tw]=a,n[ww]=e}return n}}function gf(r,t){var e=r[t];e&&e[Dc]&&(e.clear&&e.clear(),r[t]=e[Dc])}var Cw=mt(),Aw={itemStyle:wo(T2,!0),lineStyle:wo(w2,!0)},n3={lineStyle:"stroke",itemStyle:"fill"};function MP(r,t){var e=r.visualStyleMapper||Aw[t];return e||(console.warn("Unknown style type '"+t+"'."),Aw.itemStyle)}function DP(r,t){var e=r.visualDrawType||n3[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var i3={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=r.getModel(a),i=MP(r,a),o=i(n),s=n.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=DP(r,a),u=o[l],f=at(u)?u:null,v=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||v){var h=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=h,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||at(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||at(o.stroke)?h:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&f)return e.setVisual("colorFromPalette",!1),{dataEach:function(c,p){var d=r.getDataParams(p),g=G({},o);g[l]=f(d),c.setItemVisual(p,"style",g)}}}},$l=new Tt,o3={createOnAllSeries:!0,reset:function(r,t){if(!r.ignoreStyleOnData){var e=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=MP(r,a),i=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[a]){$l.option=l[a];var u=n($l),f=o.ensureUniqueItemVisual(s,"style");G(f,u),$l.option.decal&&(o.setItemVisual(s,"decal",$l.option.decal),$l.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},s3={performRawSeries:!0,overallReset:function(r){var t=K();r.eachSeries(function(e){if(!e.isColorBySeries()){var a=e.type+"-"+e.getColorBy();Cw(e).scope=t.get(a)||t.set(a,{})}}),r.eachSeries(function(e){if(!e.isColorBySeries()){var a=e.getRawData(),n={},i=e.getData(),o=Cw(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=DP(e,s);i.each(function(u){var f=i.getRawIndex(u);n[f]=u}),a.each(function(u){var f=n[u],v=i.getItemVisual(f,"colorFromPalette");if(v){var h=i.ensureUniqueItemVisual(f,"style"),c=a.getName(u)||u+"",p=a.count();h[l]=e.getColorFromPalette(c,o,p)}})}})}},Bv=Math.PI;function l3(r,t){t=t||{},st(t,{text:"loading",textColor:B.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:B.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var e=new it,a=new bt({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(a);var n=new Dt({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),i=new bt({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(i);var o;return t.showSpinner&&(o=new Kf({shape:{startAngle:-Bv/2,endAngle:-Bv/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Bv*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Bv*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=n.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:f}),i.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),a.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var IP=(function(){function r(t,e,a,n){this._stageTaskMap=K(),this.ecInstance=t,this.api=e,a=this._dataProcessorHandlers=a.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=a.concat(n)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(a){var n=a.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var a=this._pipelineMap.get(t.__pipeline.id),n=a.context,i=!e&&a.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>a.blockIndex,o=i?a.step:null,s=n&&n.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var a=this._pipelineMap.get(t.uid),n=t.__preparePipelineContext?t.__preparePipelineContext(e,a):AL(t,e,a);t.pipelineContext=a.context=n},r.prototype.restorePipelines=function(t,e){var a=this,n=a._pipelineMap=K();e.eachSeries(function(i){var o=t.painter.type==="canvas"&&i.getProgressive(),s=i.uid;n.set(s,{id:s,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:o&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(o||700),count:0}),a._pipe(i,i.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),a=this.api;A(this._allHandlers,function(n){var i=t.get(n.uid)||t.set(n.uid,{}),o="";Be(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,i,e,a),n.overallReset&&this._createOverallStageTask(n,i,e,a)},this)},r.prototype.prepareView=function(t,e,a,n){var i=t.renderTask,o=i.context;o.model=e,o.ecModel=a,o.api=n,i.__block=!t.incrementalPrepareRender,this._pipe(e,i)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,a){this._performStageTasks(this._visualHandlers,t,e,a)},r.prototype._performStageTasks=function(t,e,a,n){n=n||{};var i=!1,o=this;A(t,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),v=f.seriesTaskMap,h=f.overallTask;if(h){var c,p=h.agentStubMap;p.each(function(g){s(n,g)&&(g.dirty(),c=!0)}),c&&h.dirty(),o.updatePayload(h,a);var d=o.getPerformArgs(h,n.block);p.each(function(g){g.perform(d)}),h.perform(d)&&(i=!0)}else v&&v.each(function(g,y){s(n,g)&&g.dirty();var m=o.getPerformArgs(g,n.block);m.skip=!l.performRawSeries&&e.isSeriesFiltered(g.context.model),o.updatePayload(g,a),g.perform(m)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(a){e=a.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,a,n){var i=this,o=e.seriesTaskMap,s=e.seriesTaskMap=K(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?a.eachRawSeries(f):l?a.eachRawSeriesByType(l,f):u&&u(a,n).each(f);function f(v){var h=v.uid,c=s.set(h,o&&o.get(h)||$u({plan:c3,reset:p3,count:g3}));c.context={model:v,ecModel:a,api:n,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:i},i._pipe(v,c)}},r.prototype._createOverallStageTask=function(t,e,a,n){var i=this,o=e.overallTask=e.overallTask||$u({reset:u3});o.context={ecModel:a,api:n,overallReset:t.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=K(),u=t.seriesType,f=t.getTargetSeries,v=t.dirtyOnOverallProgress,h=!1,c="";Be(!t.createOnAllSeries,c),u?a.eachRawSeriesByType(u,p):f?f(a,n).each(p):A(a.getSeries(),p);function p(d){var g=d.uid,y=l.set(g,s&&s.get(g)||(h=!0,$u({reset:f3,onDirty:h3})));y.context={model:d,dirtyOnOverallProgress:v},y.agent=o,y.__block=v,i._pipe(d,y)}h&&o.dirty()},r.prototype._pipe=function(t,e){var a=t.uid,n=this._pipelineMap.get(a);!n.head&&(n.head=e),n.tail&&n.tail.pipe(e),n.tail=e,e.__idxInPipeline=n.count++,e.__pipeline=n},r.wrapStageHandler=function(t,e){return at(t)&&(t={overallReset:t,seriesType:y3(t)}),t.uid=qo("stageHandler"),e&&(t.visualType=e),t},r})();function u3(r){r.overallReset(r.ecModel,r.api,r.payload)}function f3(r){return r.dirtyOnOverallProgress&&v3}function v3(){this.agent.dirty(),this.getDownstream().dirty()}function h3(){this.agent&&this.agent.dirty()}function c3(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function p3(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=Ut(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?W(t,function(e,a){return LP(a)}):d3}var d3=LP(0);function LP(r){return function(t,e){var a=e.data,n=e.resetDefines[r];if(n&&n.dataEach)for(var i=t.start;i0&&c===u.length-h.length){var p=u.slice(0,c);p!=="data"&&(e.mainType=p,e[h.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(a[u]=l,f=!0),f||(n[u]=l)})}return{cptQuery:e,dataQuery:a,otherQuery:n}},r.prototype.filter=function(t,e){var a=this.eventInfo;if(!a)return!0;var n=a.targetEl,i=a.packedEvent,o=a.model,s=a.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,i,"name")&&f(u,i,"dataIndex")&&f(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,n,i));function f(v,h,c,p){return v[c]==null||h[p||c]===v[c]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r})(),i0=["symbol","symbolSize","symbolRotate","symbolOffset"],Iw=i0.concat(["symbolKeepAspect"]),_3={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var a={},n={},i=!1,o=0;o=0&&oo(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function o0(r,t,e){for(var a=t.type==="radial"?V3(r,t,e):B3(r,t,e),n=t.colorStops,i=0;i0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:It(r)?[r]:H(r)?r:null}function L1(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&G3(t.lineDash,t.lineWidth),a=t.lineDashOffset;if(e){var n=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(e=W(e,function(i){return i/n}),a/=n)}return[e,a]}var F3=new ka(!0);function Pc(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function Lw(r){return typeof r=="string"&&r!=="none"}function Rc(r){var t=r.fill;return t!=null&&t!=="none"}function Pw(r,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.fillOpacity*t.opacity,r.fill(),r.globalAlpha=e}else r.fill()}function Rw(r,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.strokeOpacity*t.opacity,r.stroke(),r.globalAlpha=e}else r.stroke()}function s0(r,t,e){var a=H_(t.image,t.__image,e);if(Gp(a)){var n=r.createPattern(a,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var i=new DOMMatrix;i.translateSelf(t.x||0,t.y||0),i.rotateSelf(0,0,(t.rotation||0)*Bu),i.scaleSelf(t.scaleX||1,t.scaleY||1),n.setTransform(i)}return n}}function H3(r,t,e,a,n){var i,o=Pc(e),s=Rc(e),l=e.strokePercent,u=l<1,f=!t.path;(!t.silent||u)&&f&&t.createPathProxy();var v=t.path||F3,h=t.__dirty;if(!a){var c=e.fill,p=e.stroke,d=s&&!!c.colorStops,g=o&&!!p.colorStops,y=s&&!!c.image,m=o&&!!p.image,_=void 0,S=void 0,x=void 0,b=void 0,w=void 0;(d||g)&&(w=t.getBoundingRect()),d&&(_=h?o0(r,c,w):t.__canvasFillGradient,t.__canvasFillGradient=_),g&&(S=h?o0(r,p,w):t.__canvasStrokeGradient,t.__canvasStrokeGradient=S),y&&(x=h||!t.__canvasFillPattern?s0(r,c,t):t.__canvasFillPattern,t.__canvasFillPattern=x),m&&(b=h||!t.__canvasStrokePattern?s0(r,p,t):t.__canvasStrokePattern,t.__canvasStrokePattern=b),d?r.fillStyle=_:y&&(x?r.fillStyle=x:s=!1),g?r.strokeStyle=S:m&&(b?r.strokeStyle=b:o=!1)}var C=t.getGlobalScale();v.setScale(C[0],C[1],t.segmentIgnoreThreshold);var T,M;r.setLineDash&&e.lineDash&&(i=L1(t),T=i[0],M=i[1]);var D=!0;(f||h&Ds)&&(v.setDPR(r.dpr),u?v.setContext(null):(v.setContext(r),D=!1),v.reset(),t.buildPath(v,t.shape,a),v.toStatic(),t.pathUpdated()),D&&v.rebuildPath(r,u?l:1),T&&(r.setLineDash(T),r.lineDashOffset=M),a?(n.batchFill=s,n.batchStroke=o):e.strokeFirst?(o&&Rw(r,e),s&&Pw(r,e)):(s&&Pw(r,e),o&&Rw(r,e)),T&&r.setLineDash([])}function W3(r,t,e){var a=t.__image=H_(e.image,t.__image,t,t.onload);if(!(!a||!Gp(a))){var n=e.x||0,i=e.y||0,o=t.getWidth(),s=t.getHeight(),l=a.width/a.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=a.width,s=a.height),e.sWidth&&e.sHeight){var u=e.sx||0,f=e.sy||0;r.drawImage(a,u,f,e.sWidth,e.sHeight,n,i,o,s)}else if(e.sx&&e.sy){var u=e.sx,f=e.sy,v=o-u,h=s-f;r.drawImage(a,u,f,v,h,n,i,o,s)}else r.drawImage(a,n,i,o,s)}}function U3(r,t,e){var a,n=e.text;if(n!=null&&(n+=""),n){r.font=e.font||pn,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var i=void 0,o=void 0;r.setLineDash&&e.lineDash&&(a=L1(t),i=a[0],o=a[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),e.strokeFirst?(Pc(e)&&r.strokeText(n,e.x,e.y),Rc(e)&&r.fillText(n,e.x,e.y)):(Rc(e)&&r.fillText(n,e.x,e.y),Pc(e)&&r.strokeText(n,e.x,e.y)),i&&r.setLineDash([])}}var Ew=["shadowBlur","shadowOffsetX","shadowOffsetY"],kw=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function FP(r,t,e,a,n){var i=!1;if(!a&&(e=e||{},t===e))return!1;if(a||t.opacity!==e.opacity){Qe(r,n),i=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?uo.opacity:o}(a||t.blend!==e.blend)&&(i||(Qe(r,n),i=!0),r.globalCompositeOperation=t.blend||uo.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,a,n){if(!this[ce]){if(this._disposed){this.id;return}var i,o,s;if(lt(a)&&(n=a.lazyUpdate,i=a.silent,o=a.replaceMerge,s=a.transition,a=a.notMerge),this[ce]=!0,ds(this),!this._model||a){var l=new tF(this._api),u=this._theme,f=this._model=new T1;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},v0);var v={seriesTransition:s,optionChanged:!0};if(n)this[Ce]={silent:i,updateParams:v},this[ce]=!1,this.getZr().wakeUp();else{try{Bi(this),Xa.update.call(this,null,v)}catch(h){throw this[Ce]=null,this[ce]=!1,h}this._ssr||this._zr.flush(),this[Ce]=null,this[ce]=!1,cs.call(this,i),ps.call(this,i)}}},t.prototype.setTheme=function(e,a){if(!this[ce]){if(this._disposed){this.id;return}var n=this._model;if(n){var i=a&&a.silent,o=null;this[Ce]&&(i==null&&(i=this[Ce].silent),o=this[Ce].updateParams,this[Ce]=null),this[ce]=!0,ds(this);try{this._updateTheme(e),n.setTheme(this._theme),Bi(this),Xa.update.call(this,{type:"setTheme"},o)}catch(s){throw this[ce]=!1,s}this[ce]=!1,cs.call(this,i),ps.call(this,i)}}},t.prototype._updateTheme=function(e){Z(e)&&(e=rR[e]),e&&(e=rt(e),e&&rP(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Mt.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var a=this._zr.painter;return a.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var a=this._zr.painter;return a.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr,a=e.storage.getDisplayList();return A(a,function(n){n.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var a=e.excludeComponents,n=this._model,i=[],o=this;A(a,function(l){n.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(i.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return A(i,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var a=e.type==="svg",n=this.group,i=Math.min,o=Math.max,s=1/0;if(Nc[n]){var l=s,u=s,f=-s,v=-s,h=[],c=e&&e.pixelRatio||this.getDevicePixelRatio();A(co,function(_,S){if(_.group===n){var x=a?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(rt(e)),b=_.getDom().getBoundingClientRect();l=i(b.left,l),u=i(b.top,u),f=o(b.right,f),v=o(b.bottom,v),h.push({dom:x,left:b.left,top:b.top})}}),l*=c,u*=c,f*=c,v*=c;var p=f-l,d=v-u,g=xe.createCanvas(),y=Im(g,{renderer:a?"svg":"canvas"});if(y.resize({width:p,height:d}),a){var m="";return A(h,function(_){var S=_.left-l,x=_.top-u;m+=''+_.dom+""}),y.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&y.painter.setBackgroundColor(e.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return e.connectedBackgroundColor&&y.add(new bt({shape:{x:0,y:0,width:p,height:d},style:{fill:e.connectedBackgroundColor}})),A(h,function(_){var S=new Te({style:{x:_.left*c-l,y:_.top*c-u,image:_.dom}});y.add(S)}),y.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,a,n){return Fv(this,"convertToPixel",e,a,n)},t.prototype.convertToLayout=function(e,a,n){return Fv(this,"convertToLayout",e,a,n)},t.prototype.convertFromPixel=function(e,a,n){return Fv(this,"convertFromPixel",e,a,n)},t.prototype.containPixel=function(e,a){if(this._disposed){this.id;return}var n=this._model,i,o=Hs(n,e);return A(o,function(s,l){l.indexOf("Models")>=0&&A(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)i=i||!!f.containPoint(a);else if(l==="seriesModels"){var v=this._chartsMap[u.__viewId];v&&v.containPoint&&(i=i||v.containPoint(a,u))}},this)},this),!!i},t.prototype.getVisual=function(e,a){var n=this._model,i=Hs(n,e,{defaultMainType:"series"}),o=i.seriesModel,s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?I1(s,l,a):ev(s,a)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;A(dH,function(n){var i=function(o){var s=e.getModel(),l=o.target,u,f=n==="globalout";if(f?u={}:l&&io(l,function(d){var g=ft(d);if(g&&g.dataIndex!=null){var y=g.dataModel||s.getSeriesByIndex(g.seriesIndex);return u=y&&y.getDataParams(g.dataIndex,g.dataType,l)||{},!0}else if(g.eventData)return u=G({},g.eventData),!0},!0),u){var v=u.componentType,h=u.componentIndex;(v==="markLine"||v==="markPoint"||v==="markArea")&&(v="series",h=u.seriesIndex);var c=v&&h!=null&&s.getComponent(v,h),p=c&&e[c.mainType==="series"?"_chartsMap":"_componentsMap"][c.__viewId];u.event=o,u.type=n,e._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:c,view:p},e.trigger(n,u)}};i.zrEventfulCallAtLast=!0,e._zr.on(n,i,e)});var a=this._messageCenter;A(u0,function(n,i){a.on(i,function(o){e.trigger(i,o)})}),x3(a,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var e=this.getDom();e&&bL(this.getDom(),k1,"");var a=this,n=a._api,i=a._model;A(a._componentsViews,function(o){o.dispose(i,n)}),A(a._chartsViews,function(o){o.dispose(i,n)}),a._zr.dispose(),a._dom=a._model=a._chartsMap=a._componentsMap=a._chartsViews=a._componentsViews=a._scheduler=a._api=a._zr=a._throttledZrFlush=a._theme=a._coordSysMgr=a._messageCenter=null,delete co[a.id]},t.prototype.resize=function(e){if(!this[ce]){if(this._disposed){this.id;return}this._zr.resize(e);var a=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!a){var n=a.resetOption("media"),i=e&&e.silent;this[Ce]&&(i==null&&(i=this[Ce].silent),n=!0,this[Ce]=null),this[ce]=!0,ds(this);try{n&&Bi(this),Xa.update.call(this,{type:"resize",animation:G({duration:0},e&&e.animation)})}catch(o){throw this[ce]=!1,o}this[ce]=!1,cs.call(this,i),ps.call(this,i)}}},t.prototype.showLoading=function(e,a){if(this._disposed){this.id;return}if(lt(e)&&(a=e,e=""),e=e||"default",this.hideLoading(),!!h0[e]){var n=h0[e](this._api,a),i=this._zr;this._loadingFX=n,i.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var a=G({},e);return a.type=l0[e.type],a},t.prototype.dispatchAction=function(e,a){if(this._disposed){this.id;return}if(lt(a)||(a={silent:!!a}),!!kc[e.type]&&this._model){if(this[ce]){this._pendingActions.push(e);return}var n=a.silent;Cg.call(this,e,n);var i=a.flush;i?this._zr.flush():i!==!1&&Mt.browser.weChat&&this._throttledZrFlush(),cs.call(this,n),ps.call(this,n)}},t.prototype.updateLabelLayout=function(){Mr.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var a=e.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(a);i.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=(function(){Bi=function(v){T3(v._model);var h=v._scheduler;h.restorePipelines(v._zr,v._model),h.prepareStageTasks(),wg(v,!0),wg(v,!1),h.plan()},wg=function(v,h){for(var c=v._model,p=v._scheduler,d=h?v._componentsViews:v._chartsViews,g=h?v._componentsMap:v._chartsMap,y=v._zr,m=v._api,_=0;_J(h.get("hoverLayerThreshold"),q2.hoverLayerThreshold)&&!Mt.node&&!Mt.worker;(v._usingTHL||g)&&(h.eachSeries(function(y){if(!y.preventUsingHoverLayer){var m=v._chartsMap[y.__viewId];m.__alive&&m.eachRendered(function(_){var S=_.states.emphasis;S&&S.hoverLayer!==Cl&&(S.hoverLayer=g?h2:v2)})}}),v._usingTHL=g)}}function s(v,h){var c=v.get("blendMode")||null;h.eachRendered(function(p){p.isGroup||(p.style.blend=c)})}function l(v,h){if(!v.preventAutoZ){var c=Ao(v);h.eachRendered(function(p){return $p(p,c.z,c.zlevel),!0})}}function u(v,h){h.eachRendered(function(c){if(!Ws(c)){var p=c.getTextContent(),d=c.getTextGuideLine();c.stateTransition&&(c.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),c.hasState()?(c.prevStates=c.currentStates,c.clearStates()):c.prevStates&&(c.prevStates=null)}})}function f(v,h){var c=v.getModel("stateAnimation"),p=v.isAnimationEnabled(),d=c.get("duration"),g=d>0?{duration:d,delay:c.get("delay"),easing:c.get("easing")}:null;h.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Ws(y))return;if(y instanceof Ct&&D5(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(p){y.stateTransition=g;var _=y.getTextContent(),S=y.getTextGuideLine();_&&(_.stateTransition=g),S&&(S.stateTransition=g)}y.__dirty&&i(y)}})}$w=function(v){return new((function(h){N(c,h);function c(){return h!==null&&h.apply(this,arguments)||this}return c.prototype.getCoordinateSystems=function(){return v._coordSysMgr.getCoordinateSystems()},c.prototype.getComponentByElement=function(p){for(;p;){var d=p.__ecComponentInfo;if(d!=null)return v._model.getComponent(d.mainType,d.index);p=p.parent}},c.prototype.enterEmphasis=function(p,d){mn(p,d),wr(v)},c.prototype.leaveEmphasis=function(p,d){_n(p,d),wr(v)},c.prototype.enterBlur=function(p){$L(p),wr(v)},c.prototype.leaveBlur=function(p){$_(p),wr(v)},c.prototype.enterSelect=function(p){qL(p),wr(v)},c.prototype.leaveSelect=function(p){KL(p),wr(v)},c.prototype.getModel=function(){return v.getModel()},c.prototype.getViewOfComponentModel=function(p){return v.getViewOfComponentModel(p)},c.prototype.getViewOfSeriesModel=function(p){return v.getViewOfSeriesModel(p)},c.prototype.getECUpdateCycleVersion=function(){return v[zv]},c.prototype.usingTHL=function(){return v._usingTHL},c})(HL))(v)},eR=function(v){function h(c,p){for(var d=0;d=0)){Kw.push(e);var o=IP.wrapStageHandler(e,n);o.__prio=t,o.__raw=e,r.push(o)}}function G1(r,t){h0[r]=t}function CH(r){CI({createCanvas:r})}function lR(r,t,e){var a=BP("registerMap");a&&a(r,t,e)}function AH(r){var t=BP("getMap");return t&&t(r)}var uR=EF;pi(R1,i3);pi(rd,o3);pi(rd,s3);pi(R1,_3);pi(rd,S3);pi($P,J3);B1(rP);V1(nH,hF);G1("default",l3);aa({type:fo,event:fo,update:fo},te);aa({type:Gh,event:Gh,update:Gh},te);aa({type:_c,event:X_,update:_c,action:te,refineEvent:F1,publishNonRefinedEvent:!0});aa({type:zm,event:X_,update:zm,action:te,refineEvent:F1,publishNonRefinedEvent:!0});aa({type:Sc,event:X_,update:Sc,action:te,refineEvent:F1,publishNonRefinedEvent:!0});function F1(r,t,e,a){return{eventContent:{selected:w5(e),isFromClick:t.isFromClick||!1}}}N1("default",{});N1("dark",EP);var MH={},jw=[],DH={registerPreprocessor:B1,registerProcessor:V1,registerPostInit:nR,registerPostUpdate:iR,registerUpdateLifecycle:ad,registerAction:aa,registerCoordinateSystem:oR,registerLayout:sR,registerVisual:pi,registerTransform:uR,registerLoading:G1,registerMap:lR,registerImpl:b3,PRIORITY:qP,ComponentModel:wt,ComponentView:Yt,SeriesModel:Gt,ChartView:zt,registerComponentModel:function(r){wt.registerClass(r)},registerComponentView:function(r){Yt.registerClass(r)},registerSeriesModel:function(r){Gt.registerClass(r)},registerChartView:function(r){zt.registerClass(r)},registerCustomSeries:function(r,t){zP(r,t)},registerSubTypeDefaulter:function(r,t){wt.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){uL(r,t)}};function _t(r){if(H(r)){A(r,function(t){_t(t)});return}pt(jw,r)>=0||(jw.push(r),at(r)&&(r={install:r}),r.install(DH))}function Kl(r){return r==null?0:r.length||1}function Jw(r){return r}var Sn=(function(){function r(t,e,a,n,i,o){this._old=t,this._new=e,this._oldKeyGetter=a||Jw,this._newKeyGetter=n||Jw,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,a={},n=new Array(t.length),i=new Array(e.length);this._initIndexMap(t,null,n,"_oldKeyGetter"),this._initIndexMap(e,a,i,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(a[s]=l[0]),this._update&&this._update(f,o)}else u===1?(a[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,a)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,a={},n={},i=[],o=[];this._initIndexMap(t,a,i,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var s=0;s1&&h===1)this._updateManyToOne&&this._updateManyToOne(f,u),n[l]=null;else if(v===1&&h>1)this._updateOneToMany&&this._updateOneToMany(f,u),n[l]=null;else if(v===1&&h===1)this._update&&this._update(f,u),n[l]=null;else if(v>1&&h>1)this._updateManyToMany&&this._updateManyToMany(f,u),n[l]=null;else if(v>1)for(var c=0;c1)for(var s=0;s30}var jl=lt,Pn=W,kH=typeof Int32Array>"u"?Array:Int32Array,OH="e\0\0",Qw=-1,NH=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],BH=["_approximateExtent"],tT,Wv,Jl,Ql,Dg,tu,Ig,Ze=(function(){function r(t,e){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var a,n=!1;vR(t)?(a=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(n=!0,a=t),a=a||["x","y"];for(var i={},o=[],s={},l=!1,u={},f=0;f=e)){var a=this._store,n=a.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===xr;if(l&&!n.pure)for(var u=[],f=t;f0},r.prototype.ensureUniqueItemVisual=function(t,e){var a=this._itemVisuals,n=a[t];n||(n=a[t]={});var i=n[e];return i==null&&(i=this.getVisual(e),H(i)?i=i.slice():jl(i)&&(i=G({},i)),n[e]=i),i},r.prototype.setItemVisual=function(t,e,a){var n=this._itemVisuals[t]||{};this._itemVisuals[t]=n,jl(e)?G(n,e):n[e]=a},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){jl(t)?G(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,a){this._itemLayouts[t]=a?G(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var a=this.hostModel&&this.hostModel.seriesIndex;Vm(a,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){A(this._graphicEls,function(a,n){a&&t&&t.call(e,a,n)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:Pn(this.dimensions,this._getDimInfo,this),this.hostModel)),Dg(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var a=this[t];at(a)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var n=a.apply(this,arguments);return e.apply(this,[n].concat(Ip(arguments)))})},r.internalField=(function(){tT=function(t){var e=t._invertedIndicesMap;A(e,function(a,n){var i=t._dimInfos[n],o=i.ordinalMeta,s=t._store;if(o){a=e[n]=new kH(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),n[e]=l}}})(),r})();function VH(r,t){return El(r,t).dimensions}function El(r,t){C1(r)||(r=A1(r)),t=t||{};var e=t.coordDimensions||[],a=t.dimensionsDefine||r.dimensionsDefine||[],n=K(),i=[],o=zH(r,e,a,t.dimensionsCount),s=t.canOmitUnusedDimensions&&cR(o),l=a===r.dimensionsDefine,u=l?hR(r):H1(a),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(r,o));for(var v=K(f),h=new dP(o),c=0;c0&&(T.name=T.name+(M-1))}),new fR({source:r,dimensions:i,fullDimensionCount:o,dimensionOmitted:s})}function zH(r,t,e,a){var n=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,a||0);return A(t,function(i){var o;lt(i)&&(o=i.dimsDef)&&(n=Math.max(n,o.length))}),n}function GH(r,t,e){if(e||t.hasKey(r)){for(var a=0;t.hasKey(r+a);)a++;r+=a}return t.set(r,!0),r}var FH=(function(){function r(t){this.coordSysDims=[],this.axisMap=K(),this.categoryAxisMap=K(),this.coordSysName=t}return r})();function HH(r){var t=r.get("coordinateSystem"),e=new FH(t),a=WH[t];if(a)return a(r,e,e.axisMap,e.categoryAxisMap),e}var WH={cartesian2d:function(r,t,e,a){var n=r.getReferringComponents("xAxis",re).models[0],i=r.getReferringComponents("yAxis",re).models[0];t.coordSysDims=["x","y"],e.set("x",n),e.set("y",i),gs(n)&&(a.set("x",n),t.firstCategoryDimIndex=0),gs(i)&&(a.set("y",i),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,a){var n=r.getReferringComponents("singleAxis",re).models[0];t.coordSysDims=["single"],e.set("single",n),gs(n)&&(a.set("single",n),t.firstCategoryDimIndex=0)},polar:function(r,t,e,a){var n=r.getReferringComponents("polar",re).models[0],i=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",i),e.set("angle",o),gs(i)&&(a.set("radius",i),t.firstCategoryDimIndex=0),gs(o)&&(a.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,a){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,a){var n=r.ecModel,i=n.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=i.dimensions.slice();A(i.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),f=o[l];e.set(f,u),gs(u)&&(a.set(f,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})},matrix:function(r,t,e,a){var n=r.getReferringComponents("matrix",re).models[0];t.coordSysDims=["x","y"];var i=n.getDimensionModel("x"),o=n.getDimensionModel("y");e.set("x",i),e.set("y",o),a.set("x",i),a.set("y",o)}};function gs(r){return r.get("type")==="category"}function pR(r,t,e){e=e||{};var a=e.byIndex,n=e.stackedCoordDimension,i,o,s;UH(t)?i=t:(o=t.schema,i=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,f,v,h,c=!0;function p(S){return S.type!=="ordinal"&&S.type!=="time"}if(A(i,function(S,x){Z(S)&&(i[x]=S={name:S}),p(S)||(c=!1)}),A(i,function(S,x){l&&!S.isExtraCoord&&(!a&&!u&&S.ordinalMeta&&(u=S),!f&&p(S)&&(!c||S.coordDim!=="x"&&S.coordDim!=="angle")&&(!n||n===S.coordDim)&&(f=S))}),f&&!a&&!u&&(a=!0),f){v="__\0ecstackresult_"+r.id,h="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var d=f.coordDim,g=f.type,y=0;A(i,function(S){S.coordDim===d&&y++});var m={name:v,coordDim:d,coordDimIndex:y,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},_={name:h,coordDim:h,coordDimIndex:y+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(h,g),_.storeDimIndex=s.ensureCalculationDimension(v,g)),o.appendCalculationDimension(m),o.appendCalculationDimension(_)):(i.push(m),i.push(_))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:a,stackedOverDimension:h,stackResultDimension:v}}function UH(r){return!vR(r.schema)}function xn(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function W1(r,t){return xn(r,t)?r.getCalculationInfo("stackResultDimension"):t}function YH(r,t){var e=r.get("coordinateSystem"),a=Il.get(e),n;return t&&t.coordSysDims&&(n=W(t.coordSysDims,function(i){var o={name:i},s=t.axisMap.get(i);if(s){var l=s.get("type");o.type=Bc(l)}return o})),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]),n}function XH(r,t,e){var a,n;return e&&A(r,function(i,o){var s=i.coordDim,l=e.categoryAxisMap.get(s);l&&(a==null&&(a=o),i.ordinalMeta=l.getOrdinalMeta(),t&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(n=!0)}),!n&&a!=null&&(r[a].otherDims.itemName=0),a}function Wa(r,t,e){e=e||{};var a=t.getSourceManager(),n,i=!1;r?(i=!0,n=A1(r)):(n=a.getSource(),i=n.sourceFormat===xr);var o=HH(t),s=YH(t,o),l=e.useEncodeDefaulter,u=at(l)?l:l?St(j2,s,t):null,f={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},v=El(n,f),h=XH(v.dimensions,e.createInvertedIndices,o),c=i?null:a.getSharedDataStore(v),p=pR(t,{schema:v,store:c}),d=new Ze(v,t);d.setCalculationInfo(p);var g=h!=null&&ZH(n)?function(y,m,_,S){return S===h?_:this.defaultDimValueGetter(y,m,_,S)}:null;return d.hasItemOption=!1,d.initData(i?n:c,null,g),d}function ZH(r){if(r.sourceFormat===xr){var t=$H(r.data||[]);return!H(yl(t))}}function $H(r){for(var t=0;t=t[0]&&r<=t[1]},getExtent:function(){return this._extents[ur].slice()},getExtentUnsafe:function(r){return this._extents[r]},setExtent:function(r,t){eT(this._extents,ur,r,t)},setExtent2:function(r,t,e){var a=this._extents;a[r]||(a[r]=a[ur].slice()),eT(a,r,t,e)},freeze:function(){}};function eT(r,t,e,a){bo(e,a)&&(r[t][0]=e,r[t][1]=a)}function yR(r){return zc(r)||il(r)}function zc(r){return r.type==="interval"}function rv(r){return r.type==="time"}function il(r){return r.type==="log"}function $e(r){return r.type==="ordinal"}function t4(r){var t=Np(r),e=Yo(10,t),a=Ra(r/e);return a?a===2?a=3:a===3?a=5:a*=2:a=1,Pt(a*e,-t)}function Do(r){return ya(r)+2}function Uv(r,t){return mo(r)/mo(t)}function Lg(r,t,e){var a=e&&e.lookup;if(a){for(var n=0;n1&&i/o>2&&(n=Math.round(Math.ceil(n/o)*o)),n!==a[0]&&l(a[0],!0,!0);for(var s=n;s<=a[1];s+=o)l(s,!1,s===a[0]||s===a[1]);s-o!==a[1]&&l(a[1],!0,!0);function l(u,f,v){e({value:u,offInterval:f},v)}}var xf=(function(r){N(t,r);function t(e){var a=r.call(this)||this;a.type="ordinal",a.parse=t.parse,Y1(a,t.decoratedMethods);var n=e.ordinalMeta;n||(n=new mf({})),H(n)&&(n=new mf({categories:W(n,function(o){return lt(o)?o.value:o})})),a._ordinalMeta=n;var i=U1(null,null,e.extent||[0,n.categories.length-1]);return a._mapper=i.mapper,X1(a),a}return t.parse=function(e){return e==null?e=NaN:Z(e)?(e=this._ordinalMeta.getOrdinal(e),e==null&&(e=NaN)):e=Ra(e),e},t.prototype.getTicks=function(){var e=[];return _R(this,0,function(a){e.push(a)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var a=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Vt(s,a.length);o=0&&e=0&&e=0&&eo[0]&&do[1]||!isFinite(d)||!isFinite(o[1]))break}else{if(g>p)break;d=Vt(d,o[1]),g===p&&(d=o[1])}if(v.push({value:d}),d=Pt(d+n,s),u){var y=u.calcNiceTickMultiple(d,c);y>=0&&(d=Pt(d+y*n,s))}if(v.length>0&&d===v[v.length-1].value)break;if(v.length>h)return[]}var m=v.length?v[v.length-1].value:o[1];return i[1]>m&&v.push({value:e.expandToNicedExtent?Pt(m+n,s):i[1]}),f&&l.pruneTicksByBreak(e.pruneByBreak,v,u.breaks,function(_){return _.value},a.interval,i),f&&e.breakTicks!=="none"&&l.addBreaksToTicks(v,u.breaks,i),v},t.prototype.getMinorTicks=function(e){return Z1(this,e,Tc(this),this._cfg.interval)},t.prototype.getLabel=function(e,a){if(e==null)return"";var n=a&&a.precision;n==null?n=ya(e.value)||0:n==="auto"&&(n=this._cfg.intervalPrecision);var i=Pt(e.value,n,!0);return y1(i)},t.type="interval",t})(na);na.registerClass(Qn);var r4=function(r,t,e,a){for(;e>>1;r[n][1]16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function n4(r){var t=30*Er;return r/=t,r>6?6:r>3?3:r>2?2:1}function i4(r){return r/=Xu,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function rT(r,t){return r/=t?f1:u1,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function o4(r){return xt(Bp(r,!0),1)}function s4(r,t,e){var a=Math.max(0,pt(cr,t)-1);return Ac(new Date(r),cr[a],e).getTime()}function l4(r,t){var e=new Date(0);e[r](1);var a=e.getTime();e[r](1+t);var n=e.getTime()-a;return function(i,o){return Math.max(0,Math.round((o-i)/n))}}function u4(r,t,e,a,n,i){var o=3e3,s=CG,l=0;function u(E,O,k,V,z,F,U){for(var X=l4(z,E),Y=O,Q=new Date(Y);Yo));)if(Q[z](Q[V]()+E),Y=Q.getTime(),i){var gt=i.calcNiceTickMultiple(Y,X);gt>0&&(Q[z](Q[V]()+gt*E),Y=Q.getTime())}U.push({value:Y,notAdd:Y>a[1]})}function f(E,O,k){var V=[],z=!O.length;if(!xR(Zu(E),a[0],a[1],e)){z&&(O=[{value:s4(a[0],E,e)},{value:a[1]}]);for(var F=0;F=a[0]&&U<=a[1]&&u(Y,U,X,Q,gt,kt,V),E==="year"&&k.length>1&&F===0&&k.unshift({value:k[0].value-Y})}}for(var F=0;F=a[0]&&S<=a[1]&&c++)}var x=n/t;if(c>x*1.5&&p>x/1.5||(v.push(m),c>x||r===s[d]))break}h=[]}}}for(var b=Nt(W(v,function(E){return Nt(E,function(O){return O.value>=a[0]&&O.value<=a[1]&&!O.notAdd})}),function(E){return E.length>0}),w=b.length-1,C=[],d=0;da[0])&&C.unshift({value:a[0],time:{level:0,upperTimeUnit:P,lowerTimeUnit:P},notNice:!0}),(!I||I.values&&(i=s);var l=Yv.length,u=Math.min(r4(Yv,i,0,l),l-1),f=Yv[u][1],v=Yv[Math.max(u-1,0)][0];r.setTimeInterval({approxInterval:i,interval:f,minLevelUnit:v})};na.registerClass(SR);var Xv=0,Zv=1,v4=2,bR=(function(r){N(t,r);function t(e){var a=r.call(this)||this;a.type="log",a.parse=Qn.parse,a.base=e.logBase||10;var n=[],i=[],o=a._lookup={from:n,to:i};n[Xv]=n[Zv]=i[Xv]=i[Zv]=NaN,Y1(a,t.mapperMethods);var s=se(),l=e.breakOption,u={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(l,a,{noNegative:!0},v4,u),a.powStub=new Qn({breakParsed:u.original}),a.intervalStub=new Qn({breakParsed:u.transformed}),X1(a,a.intervalStub),a}return t.prototype.getTicks=function(e){var a=this.base,n=this.powStub,i=se(),o=this.intervalStub,s=o.getExtent(),l=n.getExtent(),u={lookup:{from:s,to:l}};return W(o.getTicks(e||{}),function(f){var v=f.value,h=Lg(v,a,u),c;if(i){var p=i.getTicksBreakOutwardTransform(this,f,Tc(n),this._lookup);p&&(c=p.vBreak,h=p.tickVal)}return{value:h,break:c}},this)},t.prototype.getMinorTicks=function(e){return Z1(this,e,Tc(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,a){return this.intervalStub.getLabel(e,a)},t.type="log",t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(Uv(e,this.base))},scale:function(e){return Lg(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,a){return e=Uv(e,this.base),a&&a.depth===fn?e:this.intervalStub.transformIn(e,a)},transformOut:function(e,a){var n=a?a.depth:null;return aT.depth=n,nT.lookup=this._lookup,Lg(n===fn?e:this.intervalStub.transformOut(e,aT),this.base,nT)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,a){this.setExtent2(ur,e,a)},setExtent2:function(e,a,n){if(!(!bo(a,n)||a<=0||n<=0)){var i=iT,o=iT;if(e===ur){var s=this._lookup;i=s.to,o=s.from}this.powStub.setExtent2(e,i[Xv]=a,i[Zv]=n);var l=this.base;this.intervalStub.setExtent2(e,o[Xv]=Uv(a,l),o[Zv]=Uv(n,l))}},getFilter:function(){return{g:0}},sanitize:function(e,a){return bo(a[0],a[1])&&zr(e)&&e<=0&&(e=a[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,a){return a===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,a)}},t})(na);na.registerClass(bR);var aT={},nT={},iT=[],wR={value:1,category:1,time:1,log:1},TR=mt();function av(r){var t=r.get("type");return(t==null||!j(wR,t)&&!na.getClass(t))&&(t="value"),t}function kl(r,t,e){var a=se(),n;switch(a&&(n=CR(r,t,e)),t){case"category":return new xf({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:ke()});case"time":return new SR({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC"),breakOption:n});case"log":return new bR({logBase:r.get("logBase"),breakOption:n});case"value":return new Qn({breakOption:n});default:return new(na.getClass(t)||Qn)({})}}function h4(r,t,e){var a=r.getExtentUnsafe(ur,null),n=a[0],i=a[1];return bo(n,i)?n===t||i===t?p4:nt?c4:p0:p0}var c4=1,p4=2,p0=3;function d4(r){TR(r).noOnMyZero=!0}function g4(r){return TR(r).noOnMyZero}function nv(r){var t=r.getLabelModel().get("formatter");if(r.type==="time"){var e=AG(t);return function(n,i){return r.scale.getFormattedLabel(n,i,e)}}else{if(Z(t))return function(n){var i=r.scale.getLabel(n),o=t.replace("{value}",i??"");return o};if(at(t)){if(r.type==="category")return function(n,i){return t(Gc(r,n),n.value-r.scale.getExtent()[0],null)};var a=se();return function(n,i){var o=null;return a&&(o=a.makeAxisLabelFormatterParamBreak(o,n.break)),t(Gc(r,n),i,o)}}else return function(n){return r.scale.getLabel(n)}}}function Gc(r,t){var e=r.scale;return $e(e)?e.getLabel(t):t.value}function $1(r){var t=r.get("interval");return t??"auto"}function y4(r){return r.type==="category"&&$1(r.getLabelModel())===0}function m4(r,t){var e={};return A(r.mapDimensionsAll(t),function(a){e[W1(r,a)]=!0}),At(e)}function ol(r){return r==="middle"||r==="center"}function bf(r){return r.getShallow("show")}function CR(r,t,e){var a=r.get("breaks",!0);if(a!=null)return!se()||!e||!_4(t)?void 0:a}function _4(r){return r!=="category"}function AR(r,t,e,a,n,i){var o=il(r),s=o?r.intervalStub:r;if(s.setExtent(a[0],a[1]),o){var l=r.powStub,u={depth:fn},f=r.transformOut(a[0],u),v=r.transformOut(a[1],u),h=e4(e,a);t[0]&&!h[0]&&(f=n[0]),t[1]&&!h[1]&&(v=n[1]),l.setExtent(f,v)}s.setConfig(i)}function Ol(r,t){return $e(r)?r.getRawOrdinalNumber(t.value):t.value}function iv(r,t){return $e(r)&&!!t.get("boundaryGap")}var Nl=(function(){function r(){}return r.prototype.needIncludeZero=function(){return!this.option.scale},r.prototype.getCoordSysModel=function(){},r})(),S4=_l(),Fc="|&",Bl=mt(),MR=-2,x4=-1,b4=mt();function q1(r,t){var e=r.model,a=Bl(Pl(e.ecModel)).keyed,n=a&&a.get(t);return n&&n.get(e.uid)}function w4(r,t){return IR(q1(r,t))}function T4(r,t){var e=[];return DR(r.model.ecModel,function(a){for(var n=0;n0&&v[1]>0&&!h[0]&&(v[0]=0),v[0]<0&&v[1]<0&&!h[1]&&(v[1]=0));var S=!1;v[0]>v[1]&&(v.reverse(),S=!0);var x=eu(t,e.get("startValue",!0)),b=x!=null;!zr(x)&&n&&(x=t.getDefaultStartValue?t.getDefaultStartValue():0),zr(x)&&(b||!m||_)&&(xv[1]&&!h[1]&&(v[1]=x,h[1]=!0));var w=this._i={scale:t,dataMM:f,noZoomEffMM:v,zoomMM:[],fixMM:h,zoomFixMM:[!1,!1],startValue:x,isBlank:y,incl0:_,tggAxInv:S,ctnShp:i};oT(w,v)}return r.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},r.prototype.makeFinal=function(){var t=this._i,e=t.zoomMM,a=t.noZoomEffMM,n=t.zoomFixMM,i=t.fixMM,o={fixMM:i,zoomFixMM:n,isBlank:t.isBlank,incl0:t.incl0,tggAxInv:t.tggAxInv,ctnShp:t.ctnShp,effMM:a.slice()},s=o.effMM;return e[0]!=null&&(s[0]=e[0],i[0]=n[0]=!0),e[1]!=null&&(s[1]=e[1],i[1]=n[1]=!0),oT(t,s),o},r.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},r.prototype.setZoomMM=function(t,e){this._i.zoomMM[t]=e},r})();function oT(r,t){var e=r.scale,a=r.dataMM;e.sanitize&&(t[0]=e.sanitize(t[0],a),t[1]=e.sanitize(t[1],a),zh(t))}function eu(r,t){return t==null?null:Oe(t)?NaN:r.parse(t)}function R4(r,t){var e;if($e(r))e=[0,0];else{var a=t.get("boundaryGap");typeof a=="boolean"&&(a=null),e=H(a)?a:[a,a]}return[sT(e[0]),sT(e[1])]}function sT(r){return Pa(typeof r=="boolean"?0:r,1)||0}function ER(r){var t=I4(r.scale);return t.extent||(t.extent=ke()),t}function E4(r,t){ER(r).dimIdxInCoord=t.get(r.dim)}function Po(r,t){var e=r.scale,a=r.model,n=r.dim;e.rawExtentInfo||k4(e,r,n,a,t)}function k4(r,t,e,a,n){var i=ER(t),o=i.extent,s=!1;C4(t,function(f){if(f.boxCoordinateSystem){var v=V2(f).coord,h=i.dimIdxInCoord;if(h>=0){if(H(v)){var c=v[h];c!=null&&!H(c)&&Em(o,r.parse(c))}}}else if(f.coordinateSystem){var p=f.getData();if(p){var d=r.getFilter?r.getFilter():null;A(m4(p,e),function(g){vz(o,p.getApproximateExtent(g,d))})}f.__requireStartValue&&f.__requireStartValue(t)&&(s=!0)}});var l=N4(r,t,a),u=new RR(r,a,o,s,l);kR(r,u,n),i.extent=null}function O4(r,t){var e=r.scale;kR(e,new RR(e,r.model,t,!1,!1),P4)}function kR(r,t,e){r.rawExtentInfo=t,t.from=e}function sd(r,t){J1.set(r,t)}var J1=K();function OR(r,t,e,a,n){r.rawExtentInfo||O4({scale:r,model:t},n||ke());var i=r.rawExtentInfo.makeFinal(),o=i.effMM;return r.setExtent(o[0],o[1]),r.setBlank(i.isBlank),a&&i.tggAxInv&&e&&!e.get("legacyMinMaxDontInverseAxis")&&(a.inverse=!a.inverse),i}function N4(r,t,e){var a=iv(r,e),n=e.get("containShape",!0);if(n==null&&!a&&(n=!0),!n)return!1;var i=!1;return LR(t,function(o){i=!!J1.get(o)||i}),i}function B4(r,t,e,a){if(e.ctnShp){var n;if(LR(r,function(s){var l=J1.get(s);if(l){var u=l(r,a);u&&(n=n||[0,0],TL(n,u[0]),CL(n,u[1]),d4(r))}}),!!n){var i=t.getExtent();if($e(t))r.onBand||t.setExtent2(_f,Vt(i[0],i[0]+n[0]),xt(i[1],i[1]+n[1]));else{var o=i.slice();e.zoomFixMM[0]||(o[0]=Vt(o[0],t.transformOut(t.transformIn(o[0],null)+n[0],null))),e.zoomFixMM[1]||(o[1]=xt(o[1],t.transformOut(t.transformIn(o[1],null)+n[1],null))),(o[0]i[1])&&t.setExtent2(_f,o[0],o[1])}}}}function lT(r,t){var e=il(r),a=e?r.intervalStub:r,n=t.fixMinMax||[],i=e?r.getExtent():null,o=a.getExtent(),s=mR(o,n,t.rawExtentResult);a.setExtent(s[0],s[1]),s=a.getExtent();var l=e?z4(a,t):V4(a,t),u=l.intervalPrecision,f=l.interval,v=t.userInterval;v!=null&&(l.interval=v,l.intervalPrecision=Do(v)),n[0]||(s[0]=Pt(Vr(s[0]/f)*f,u)),n[1]||(s[1]=Pt(Uo(s[1]/f)*f,u)),v!=null&&(l.niceExtent=s.slice()),AR(r,n,o,s,i,l)}function V4(r,t){var e=id(t.splitNumber,5),a=nd(r),n=t.minInterval,i=t.maxInterval,o=Bp(a/e,!0);n!=null&&oi&&(o=i);var s=Do(o),l=r.getExtent(),u=[Pt(Uo(l[0]/o)*o,s),Pt(Vr(l[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:u}}function z4(r,t){var e=id(t.splitNumber,10),a=r.getExtent(),n=nd(r),i=xt(O_(n),1),o=e/n*i;o<=.5&&(i*=10);var s=Do(i),l=[Pt(Uo(a[0]/i)*i,s),Pt(Vr(a[1]/i)*i,s)];return{intervalPrecision:s,interval:i,niceExtent:l}}function ll(r){var t=r.scale,e=r.model,a=e.axis,n=e.ecModel;NR(t,e,a,n,null)}function NR(r,t,e,a,n){var i=OR(r,t,a,e,n),o=zc(r)||rv(r);BR(r,{splitNumber:t.get("splitNumber"),fixMinMax:i.fixMM,userInterval:t.get("interval"),minInterval:o?t.get("minInterval"):null,maxInterval:o?t.get("maxInterval"):null,rawExtentResult:i}),e&&a&&B4(e,r,i,a)}function BR(r,t){G4[r.type](r,t)}var G4={interval:lT,log:lT,time:f4,ordinal:te};function F4(r){return Wa(null,r)}var H4={isDimensionStacked:xn,enableDataStack:pR,getStackedDimension:W1};function W4(r,t){var e=t;t instanceof Tt||(e=new Tt(t));var a=av(e),n=kl(e,a,!1);return r[1]n&&(a=o,n=l)}if(a)return q4(a.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(e){var a=this._rect;if(a&&!e)return a;var n=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return A(o,function(s){s.type==="polygon"?fT(s.exterior,n,i,e):A(s.points,function(l){fT(l,n,i,e)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])||(n[0]=n[1]=i[0]=i[1]=0),a=new ot(n[0],n[1],i[0]-n[0],i[1]-n[1]),e||(this._rect=a),a},t.prototype.contain=function(e){var a=this.getBoundingRect(),n=this.geometries;if(!a.contain(e[0],e[1]))return!1;t:for(var i=0,o=n.length;i>1^-(s&1),l=l>>1^-(l&1),s+=n,l+=i,n=s,i=l,a.push([s/e,l/e])}return a}function y0(r,t){return r=j4(r),W(Nt(r.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var a=e.properties,n=e.geometry,i=[];switch(n.type){case"Polygon":var o=n.coordinates;i.push(new vT(o[0],o.slice(1)));break;case"MultiPolygon":A(n.coordinates,function(l){l[0]&&i.push(new vT(l[0],l.slice(1)))});break;case"LineString":i.push(new hT([n.coordinates]));break;case"MultiLineString":i.push(new hT(n.coordinates))}var s=new zR(a[t||"name"],i,a.cp);return s.properties=a,s})}const J4=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:lf,asc:De,getPercentWithPrecision:YV,getPixelPrecision:UV,getPrecision:ya,getPrecisionSafe:cL,isNumeric:N_,isRadianAroundZero:_o,linearMap:Et,nice:Bp,numericToNumber:Ea,parseDate:Fa,parsePercent:$,quantile:Vh,quantity:O_,quantityExponent:Np,reformIntervals:Pm,remRadian:k_,round:WV},Symbol.toStringTag,{value:"Module"})),Q4=Object.freeze(Object.defineProperty({__proto__:null,format:Qf,parse:Fa,roundTime:Ac},Symbol.toStringTag,{value:"Module"})),tW=Object.freeze(Object.defineProperty({__proto__:null,Arc:Kf,BezierCurve:wl,BoundingRect:ot,Circle:Ha,CompoundPath:jf,Ellipse:qf,Group:it,Image:Te,IncrementalDisplayable:u2,Line:oe,LinearGradient:Zo,Polygon:ze,Polyline:Le,RadialGradient:j_,Rect:bt,Ring:bl,Sector:Ve,Text:Dt,clipPointsByRect:e1,clipRectByRect:g2,createIcon:Al,extendPath:p2,extendShape:c2,getShapeClass:hf,getTransform:vo,initProps:$t,makeImage:Q_,makePath:el,mergePath:dr,registerShape:Wr,resizePath:t1,updateProps:Rt},Symbol.toStringTag,{value:"Module"})),eW=Object.freeze(Object.defineProperty({__proto__:null,addCommas:y1,capitalFirst:kG,encodeHTML:Ue,formatTime:EG,formatTpl:_1,getTextRect:RG,getTooltipMarker:O2,normalizeCssArray:Dl,toCamelCase:m1,truncateText:Dz},Symbol.toStringTag,{value:"Module"})),rW=Object.freeze(Object.defineProperty({__proto__:null,bind:q,clone:rt,curry:St,defaults:st,each:A,extend:G,filter:Nt,indexOf:pt,inherits:C_,isArray:H,isFunction:at,isObject:lt,isString:Z,map:W,merge:yt,reduce:Br},Symbol.toStringTag,{value:"Module"}));var aW=mt(),qu=mt(),ea={estimate:1,determine:2};function Hc(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function nW(r,t){var e=r.getLabelModel().get("customValues");if(e){var a=r.scale;return{labels:W(FR(e,a),function(n,i){return{formattedLabel:nv(r)(n,i),rawLabel:a.getLabel(n),tick:n}})}}return r.type==="category"?oW(r,t):lW(r)}function iW(r,t,e){var a=r.scale,n=r.getTickModel().get("customValues");return n?{ticks:FR(n,a)}:r.type==="category"?sW(r,t):{ticks:a.getTicks(e)}}function FR(r,t){var e=t.getExtent(),a=[];return A(r,function(n){n=t.parse(n),n>=e[0]&&n<=e[1]&&a.push(n)}),Vp(a,dz,null),De(a),W(a,function(n){return{value:n}})}function oW(r,t){var e=r.getLabelModel(),a=HR(r,e,t);return!e.get("show")||r.scale.isBlank()?{labels:[]}:a}function HR(r,t,e){var a=fW(r),n=$1(t),i=e.kind===ea.estimate;if(!i){var o=UR(a,n);if(o)return o}var s,l;at(n)?s=Wc(r,n,!1):(l=n==="auto"?vW(r,e):n,s=Wc(r,l,!1));var u={labels:s,labelCategoryInterval:l};return i?e.out.noPxChangeTryDetermine.push(function(){return m0(a,n,u),!0}):m0(a,n,u),u}function sW(r,t){var e=uW(r),a=$1(t),n=UR(e,a);if(n)return n;var i,o;if((!t.get("show")||r.scale.isBlank())&&(i=[]),at(a))i=Wc(r,a,!0);else if(a==="auto"){var s=HR(r,r.getLabelModel(),Hc(ea.determine));o=s.labelCategoryInterval,i=W(s.labels,function(l){return l.tick})}else o=a,i=Wc(r,o,!0);return m0(e,a,{ticks:i,tickCategoryInterval:o})}function lW(r){var t=r.scale.getTicks(),e=nv(r);return{labels:W(t,function(a,n){return{formattedLabel:e(a,n),rawLabel:r.scale.getLabel(a),tick:a}})}}var uW=WR("axisTick"),fW=WR("axisLabel");function WR(r){return function(e){return qu(e)[r]||(qu(e)[r]={list:[]})}}function UR(r,t){for(var e=0;ef&&(u=Math.max(1,Math.floor(l/f)));for(var v=s[0],h=r.dataToCoord(v+1)-r.dataToCoord(v),c=Math.abs(h*Math.cos(i)),p=Math.abs(h*Math.sin(i)),d=0,g=0;v<=s[1];v+=u){var y=0,m=0,_=Ep(n({value:v}),a.font,"center","top");y=_.width*1.3,m=_.height*1.3,d=Math.max(d,y,7),g=Math.max(g,m,7)}var S=d/c,x=g/p;isNaN(S)&&(S=1/0),isNaN(x)&&(x=1/0);var b=Math.max(0,Math.floor(Math.min(S,x)));if(e===ea.estimate)return t.out.noPxChangeTryDetermine.push(q(cW,null,r,b,l)),b;var w=YR(r,b,l);return w??b}function cW(r,t,e){return YR(r,t,e)==null}function YR(r,t,e){var a=aW(r.model),n=r.getExtent(),i=a.lastAutoInterval,o=a.lastTickCount;if(i!=null&&o!=null&&Math.abs(i-t)<=1&&Math.abs(o-e)<=1&&i>t&&a.axisExtent0===n[0]&&a.axisExtent1===n[1])return i;a.lastTickCount=e,a.lastAutoInterval=t,a.axisExtent0=n[0],a.axisExtent1=n[1]}function pW(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function Wc(r,t,e){var a=nv(r),n=r.scale,i=[],o=at(t);return _R(n,o?0:t,function(s,l){var u=n.getLabel(s);if(o){var f=!!t(s.value,u);if(s.offInterval=!f,!f&&!l)return}i.push(e?s:{formattedLabel:a(s),rawLabel:u,tick:s})}),i}var dW=.8;function Ge(r,t){t=t||{};var e={w:NaN,w2:NaN},a=r.scale,n=t.fromStat,i=t.min,o=JH(a);zr(o)||(o=NaN);var s=r.getExtent(),l=Qt(s[1]-s[0]);return $e(a)?gW(e,r,o,l):n&&yW(e,r,o,l,n),i!=null&&(e.w=zr(e.w)?xt(i,e.w):i),e}function gW(r,t,e,a){var n=t.onBand,i=e+(n?1:0);i===0&&(i=1),r.w=a/i,!n&&e&&a&&(r.w2=r.w*e/a)}function yW(r,t,e,a,n){var i=!1,o=-1/0;A(n.key?[w4(t,n.key)]:T4(t,n.sers||[]),function(s){var l=s.liPosMinGap;l!=null&&(l>0?(l>o&&(o=l),i=!1):l===MR&&(i=!0))}),zr(e)&&e>0&&zr(o)?(r.w=a/e*o,r.w2=o):i&&(r.w=a*dW,r.w2=r.w*e/a)}var cT=[0,1],Ur=(function(){function r(t,e,a){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=a||[0,0]}return r.prototype.contain=function(t){var e=this._extent,a=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=a&&t<=n},r.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){var a=this._extent;a[0]=t,a[1]=e},r.prototype.dataToCoord=function(t,e){var a=this.scale;return t=a.normalize(a.parse(t)),Et(t,cT,pT(this),e)},r.prototype.coordToData=function(t,e){var a=Et(t,pT(this),cT,e);return this.scale.scale(a)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),a=iW(this,e,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),n=W(a.ticks,function(s){return{coord:this.dataToCoord(Ol(this.scale,s)),tick:s}},this),i=e.get("alignWithLabel"),o=mW(this,n,i);return W(n,function(s){return{coord:s.coord,tickValue:s.tick.value,onBand:o}})},r.prototype.getMinorTicksCoords=function(){if($e(this.scale))return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var a=this.scale.getMinorTicks(e),n=W(a,function(i){return W(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(t){return t=t||Hc(ea.determine),nW(this,t).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){return Ge(this,{min:1}).w},r.prototype.calculateCategoryInterval=function(t){return t=t||Hc(ea.determine),hW(this,t)},r})();function pT(r){var t=r.getExtent();if(r.onBand){var e=t[1]-t[0],a=e/r.scale.count()/2;t[0]+=a,t[1]-=a}return t}function mW(r,t,e){var a=t.length;if(!r.onBand||e||!a)return!1;var n=Ge(r).w;if(!n)return!1;A(t,function(s){s.coord-=n/2});var i=r.scale.getExtent(),o=t[a-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+n,tick:{value:i[1]+1}}),!0}function _W(r){var t=wt.extend(r);return wt.registerClass(t),t}function SW(r){var t=Yt.extend(r);return Yt.registerClass(t),t}function xW(r){var t=Gt.extend(r);return Gt.registerClass(t),t}function bW(r){var t=zt.extend(r);return zt.registerClass(t),t}var ru=Math.PI*2,Vi=ka.CMD,wW=["top","right","bottom","left"];function TW(r,t,e,a,n){var i=e.width,o=e.height;switch(r){case"top":a.set(e.x+i/2,e.y-t),n.set(0,-1);break;case"bottom":a.set(e.x+i/2,e.y+o+t),n.set(0,1);break;case"left":a.set(e.x-t,e.y+o/2),n.set(-1,0);break;case"right":a.set(e.x+i+t,e.y+o/2),n.set(1,0);break}}function CW(r,t,e,a,n,i,o,s,l){o-=r,s-=t;var u=Math.sqrt(o*o+s*s);o/=u,s/=u;var f=o*e+r,v=s*e+t;if(Math.abs(a-n)%ru<1e-4)return l[0]=f,l[1]=v,u-e;if(i){var h=a;a=yr(n),n=yr(h)}else a=yr(a),n=yr(n);a>n&&(n+=ru);var c=Math.atan2(s,o);if(c<0&&(c+=ru),c>=a&&c<=n||c+ru>=a&&c+ru<=n)return l[0]=f,l[1]=v,u-e;var p=e*Math.cos(a)+r,d=e*Math.sin(a)+t,g=e*Math.cos(n)+r,y=e*Math.sin(n)+t,m=(p-o)*(p-o)+(d-s)*(d-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(l[0]=p,l[1]=d,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function Uc(r,t,e,a,n,i,o,s){var l=n-r,u=i-t,f=e-r,v=a-t,h=Math.sqrt(f*f+v*v);f/=h,v/=h;var c=l*f+u*v,p=c/h;s&&(p=Math.min(Math.max(p,0),1)),p*=h;var d=o[0]=r+p*f,g=o[1]=t+p*v;return Math.sqrt((d-n)*(d-n)+(g-i)*(g-i))}function XR(r,t,e,a,n,i,o){e<0&&(r=r+e,e=-e),a<0&&(t=t+a,a=-a);var s=r+e,l=t+a,u=o[0]=Math.min(Math.max(n,r),s),f=o[1]=Math.min(Math.max(i,t),l);return Math.sqrt((u-n)*(u-n)+(f-i)*(f-i))}var $r=[];function AW(r,t,e){var a=XR(t.x,t.y,t.width,t.height,r.x,r.y,$r);return e.set($r[0],$r[1]),a}function MW(r,t,e){for(var a=0,n=0,i=0,o=0,s,l,u=1/0,f=t.data,v=r.x,h=r.y,c=0;c0){t=t/180*Math.PI,qr.fromArray(r[0]),Zt.fromArray(r[1]),ie.fromArray(r[2]),ut.sub(_a,qr,Zt),ut.sub(ga,ie,Zt);var e=_a.len(),a=ga.len();if(!(e<.001||a<.001)){_a.scale(1/e),ga.scale(1/a);var n=_a.dot(ga),i=Math.cos(t);if(i1&&ut.copy(Je,ie),Je.toArray(r[1])}}}}function DW(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,qr.fromArray(r[0]),Zt.fromArray(r[1]),ie.fromArray(r[2]),ut.sub(_a,Zt,qr),ut.sub(ga,ie,Zt);var a=_a.len(),n=ga.len();if(!(a<.001||n<.001)){_a.scale(1/a),ga.scale(1/n);var i=_a.dot(t),o=Math.cos(e);if(i=l)ut.copy(Je,ie);else{Je.scaleAndAdd(ga,s/Math.tan(Math.PI/2-f));var v=ie.x!==Zt.x?(Je.x-Zt.x)/(ie.x-Zt.x):(Je.y-Zt.y)/(ie.y-Zt.y);if(isNaN(v))return;v<0?ut.copy(Je,Zt):v>1&&ut.copy(Je,ie)}Je.toArray(r[1])}}}}function Eg(r,t,e,a){var n=e==="normal",i=n?r:r.ensureState(e);i.ignore=t;var o=a.get("smooth");o=o===!0?.3:Math.max(+o,0)||0,i.shape=i.shape||{},i.shape.smooth=o;var s=a.getModel("lineStyle").getLineStyle();n?r.useStyle(s):i.style=s}function IW(r,t){var e=t.smooth,a=t.points;if(a)if(r.moveTo(a[0][0],a[0][1]),e>0&&a.length>=3){var n=en(a[0],a[1]),i=en(a[1],a[2]);if(!n||!i){r.lineTo(a[1][0],a[1][1]),r.lineTo(a[2][0],a[2][1]);return}var o=Math.min(n,i)*e,s=zu([],a[1],a[0],o/n),l=zu([],a[1],a[2],o/i),u=zu([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],a[2][0],a[2][1])}else for(var f=1;f0){S(M*T,0,i);var D=M+w;D<0&&x(-D*T,1)}else x(-w*T,1)}}function S(w,C,T){w!==0&&(f=!0);for(var M=C;M0)for(var D=0;D0;D--){var R=T[D-1]*P;S(-R,D,i)}}}function b(w){var C=w<0?-1:1;w=Math.abs(w);for(var T=Math.ceil(w/(i-1)),M=0;M0?S(T,0,M+1):S(-T,i-M-1,i),w-=T,w<=0)return}return f}function RW(r){for(var t=0;t=0&&a.attr(i.oldLayoutSelect),pt(h,"emphasis")>=0&&a.attr(i.oldLayoutEmphasis)),Rt(a,u,e,l)}else if(a.attr(u),!Ml(a).valueAnimation){var v=J(a.style.opacity,1);a.style.opacity=0,$t(a,{style:{opacity:v}},e,l)}if(i.oldLayout=u,a.states.select){var c=i.oldLayoutSelect={};$v(c,u,qv),$v(c,a.states.select,qv)}if(a.states.emphasis){var p=i.oldLayoutEmphasis={};$v(p,u,qv),$v(p,a.states.emphasis,qv)}b2(a,l,f,e,e)}if(n&&!n.ignore&&!n.invisible){var i=OW(n),o=i.oldLayout,d={points:n.shape.points};o?(n.attr({shape:o}),Rt(n,{shape:d},e)):(n.setShape(d),n.style.strokePercent=0,$t(n,{style:{strokePercent:1}},e)),i.oldLayout=d}},r})(),Ng=mt();function BW(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,a){var n=Ng(e).labelManager;n||(n=Ng(e).labelManager=new NW),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(t,e,a){var n=Ng(e).labelManager;A(a.updatedSeries,function(i){n.addLabelsOfSeries(e.getViewOfSeriesModel(i))}),n.updateLayoutConfig(e),n.layout(e),n.processLabelsOverall()})}var Bg=Math.sin,Vg=Math.cos,JR=Math.PI,zi=Math.PI*2,VW=180/JR,QR=(function(){function r(){}return r.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},r.prototype.moveTo=function(t,e){this._add("M",t,e)},r.prototype.lineTo=function(t,e){this._add("L",t,e)},r.prototype.bezierCurveTo=function(t,e,a,n,i,o){this._add("C",t,e,a,n,i,o)},r.prototype.quadraticCurveTo=function(t,e,a,n){this._add("Q",t,e,a,n)},r.prototype.arc=function(t,e,a,n,i,o){this.ellipse(t,e,a,a,0,n,i,o)},r.prototype.ellipse=function(t,e,a,n,i,o,s,l){var u=s-o,f=!l,v=Math.abs(u),h=Wn(v-zi)||(f?u>=zi:-u>=zi),c=u>0?u%zi:u%zi+zi,p=!1;h?p=!0:Wn(v)?p=!1:p=c>=JR==!!f;var d=t+a*Vg(o),g=e+n*Bg(o);this._start&&this._add("M",d,g);var y=Math.round(i*VW);if(h){var m=1/this._p,_=(f?1:-1)*(zi-m);this._add("A",a,n,y,1,+f,t+a*Vg(o+_),e+n*Bg(o+_)),m>.01&&this._add("A",a,n,y,0,+f,d,g)}else{var S=t+a*Vg(s),x=e+n*Bg(s);this._add("A",a,n,y,+p,+f,S,x)}},r.prototype.rect=function(t,e,a,n){this._add("M",t,e),this._add("l",a,0),this._add("l",0,n),this._add("l",-a,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(t,e,a,n,i,o,s,l,u){for(var f=[],v=this._p,h=1;h"}function ZW(r){return""}function rS(r,t){t=t||{};var e=t.newline?` `:"";function a(n){var i=n.children,o=n.tag,s=n.attrs,l=n.text;return XW(o,s)+(o!=="style"?Ue(l):l||"")+(i?""+e+W(i,function(u){return a(u)}).join(e)+e:"")+ZW(o)}return a(r)}function $W(r,t,e){e=e||{};var a=e.newline?` `:"",n=" {"+a,i=a+"}",o=W(At(r),function(l){return l+n+W(At(r[l]),function(u){return u+":"+r[l][u]+";"}).join(a)+i}).join(a),s=W(At(t),function(l){return"@keyframes "+l+n+W(At(t[l]),function(u){return u+n+W(At(t[l][u]),function(f){var v=t[l][u][f];return f==="d"&&(v='path("'+v+'")'),f+":"+v+";"}).join(a)+i}).join(a)+i}).join(a);return!o&&!s?"":[""].join(a)}function w0(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function ST(r,t,e,a){return Se("svg","root",{width:r,height:t,xmlns:tE,"xmlns:xlink":eE,version:"1.1",baseProfile:"full",viewBox:a?"0 0 "+r+" "+t:!1},e)}var qW=0;function aE(){return qW++}var xT={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Yi="transform-origin";function KW(r,t,e){var a=G({},r.shape);G(a,t),r.buildPath(e,a);var n=new QR;return n.reset(rL(r)),e.rebuildPath(n,1),n.generateStr(),n.getStr()}function jW(r,t){var e=t.originX,a=t.originY;(e||a)&&(r[Yi]=e+"px "+a+"px")}var JW={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function nE(r,t){var e=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[e]=r,e}function QW(r,t,e){var a=r.shape.paths,n={},i,o;if(A(a,function(l){var u=w0(e.zrId);u.animation=!0,ud(l,{},u,!0);var f=u.cssAnims,v=u.cssNodes,h=At(f),c=h.length;if(c){o=h[c-1];var p=f[o];for(var d in p){var g=p[d];n[d]=n[d]||{d:""},n[d].d+=g.d||""}for(var y in v){var m=v[y].animation;m.indexOf(o)>=0&&(i=m)}}}),!!i){t.d=!1;var s=nE(n,e);return i.replace(o,s)}}function bT(r){return Z(r)?xT[r]?"cubic-bezier("+xT[r]+")":I_(r)?r:"":""}function ud(r,t,e,a){var n=r.animators,i=n.length,o=[];if(r instanceof jf){var s=QW(r,t,e);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u0}).length){var kt=nE(w,e);return kt+" "+m[0]+" both"}}for(var g in l){var s=d(l[g]);s&&o.push(s)}if(o.length){var y=e.zrId+"-cls-"+aE();e.cssNodes["."+y]={animation:o.join(",")},t.class=y}}function tU(r,t,e){if(!r.ignore)if(r.isSilent()){var a={"pointer-events":"none"};wT(a,t,e)}else{var n=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},i=n.fill;if(!i){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(i=vc(l))}var u=n.lineWidth;if(u){var f=!n.strokeNoScale&&r.transform?r.transform[0]:1;u=u/f}var a={cursor:"pointer"};i&&(a.fill=i),n.stroke&&(a.stroke=n.stroke),u&&(a["stroke-width"]=u),wT(a,t,e)}}function wT(r,t,e,a){var n=JSON.stringify(r),i=e.cssStyleCache[n];i||(i=e.zrId+"-cls-"+aE(),e.cssStyleCache[n]=i,e.cssNodes["."+i+":hover"]=r),t.class=t.class?t.class+" "+i:i}var wf=Math.round;function iE(r){return r&&Z(r.src)}function oE(r){return r&&at(r.toDataURL)}function aS(r,t,e,a){WW(function(n,i){var o=n==="fill"||n==="stroke";o&&eL(i)?lE(t,r,n,a):o&&P_(i)?uE(e,r,n,a):r[n]=i,o&&a.ssr&&i==="none"&&(r["pointer-events"]="visible")},t,e,!1),sU(e,r,a)}function nS(r,t){var e=fL(t);e&&(e.each(function(a,n){a!=null&&(r[(_T+n).toLowerCase()]=a+"")}),t.isSilent()&&(r[_T+"silent"]="true"))}function TT(r){return Wn(r[0]-1)&&Wn(r[1])&&Wn(r[2])&&Wn(r[3]-1)}function eU(r){return Wn(r[4])&&Wn(r[5])}function iS(r,t,e){if(t&&!(eU(t)&&TT(t))){var a=1e4;r.transform=TT(t)?"translate("+wf(t[4]*a)/a+" "+wf(t[5]*a)/a+")":rV(t)}}function CT(r,t,e){for(var a=r.points,n=[],i=0;i"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";Be(h,g),Be(c,g)}else if(h==null||c==null){var y=function(M,D){if(M){var L=M.elm,I=h||D.width,P=c||D.height;M.tag==="pattern"&&(u?(P=1,I/=i.width):f&&(I=1,P/=i.height)),M.attrs.width=I,M.attrs.height=P,L&&(L.setAttribute("width",I),L.setAttribute("height",P))}},m=H_(p,null,r,function(M){l||y(b,M),y(v,M)});m&&m.width&&m.height&&(h=h||m.width,c=c||m.height)}v=Se("image","img",{href:p,width:h,height:c}),o.width=h,o.height=c}else n.svgElement&&(v=rt(n.svgElement),o.width=n.svgWidth,o.height=n.svgHeight);if(v){var _,S;l?_=S=1:u?(S=1,_=o.width/i.width):f?(_=1,S=o.height/i.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),S!=null&&!isNaN(S)&&(o.height=S);var x=aL(n);x&&(o.patternTransform=x);var b=Se("pattern","",o,[v]),w=rS(b),C=a.patternCache,T=C[w];T||(T=a.zrId+"-p"+a.patternIdx++,C[w]=T,o.id=T,b=a.defs[T]=Se("pattern",T,o,[v])),t[e]=Rp(T)}}function lU(r,t,e){var a=e.clipPathCache,n=e.defs,i=a[r.id];if(!i){i=e.zrId+"-c"+e.clipPathIdx++;var o={id:i};a[r.id]=i,n[i]=Se("clipPath",i,o,[sE(r,e)])}t["clip-path"]=Rp(i)}function DT(r){return document.createTextNode(r)}function Ji(r,t,e){r.insertBefore(t,e)}function IT(r,t){r.removeChild(t)}function LT(r,t){r.appendChild(t)}function fE(r){return r.parentNode}function vE(r){return r.nextSibling}function zg(r,t){r.textContent=t}var PT=58,uU=120,fU=Se("","");function T0(r){return r===void 0}function pa(r){return r!==void 0}function vU(r,t,e){for(var a={},n=t;n<=e;++n){var i=r[n].key;i!==void 0&&(a[i]=n)}return a}function Pu(r,t){var e=r.key===t.key,a=r.tag===t.tag;return a&&e}function Tf(r){var t,e=r.children,a=r.tag;if(pa(a)){var n=r.elm=rE(a);if(oS(fU,r),H(e))for(t=0;ti?(p=e[l+1]==null?null:e[l+1].elm,hE(r,p,e,n,l)):$c(r,t,a,i))}function Is(r,t){var e=t.elm=r.elm,a=r.children,n=t.children;r!==t&&(oS(r,t),T0(t.text)?pa(a)&&pa(n)?a!==n&&hU(e,a,n):pa(n)?(pa(r.text)&&zg(e,""),hE(e,null,n,0,n.length-1)):pa(a)?$c(e,a,0,a.length-1):pa(r.text)&&zg(e,""):r.text!==t.text&&(pa(a)&&$c(e,a,0,a.length-1),zg(e,t.text)))}function cU(r,t){if(Pu(r,t))Is(r,t);else{var e=r.elm,a=fE(e);Tf(t),a!==null&&(Ji(a,t.elm,vE(e)),$c(a,[r],0,0))}return t}var pU=0,dU=(function(){function r(t,e,a){if(this.type="svg",this.configLayer=gU(),this.storage=e,this._opts=a=G({},a),this.root=t,this._id="zr"+pU++,this._oldVNode=ST(a.width,a.height),t&&!a.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=rE("svg");oS(null,this._oldVNode),n.appendChild(i),t.appendChild(n)}this.resize(a.width,a.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",cU(this._oldVNode,t),this._oldVNode=t}},r.prototype.renderOneToVNode=function(t){return MT(t,w0(this._id))},r.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),a=this._width,n=this._height,i=w0(this._id);i.animation=t.animation,i.willUpdate=t.willUpdate,i.compress=t.compress,i.emphasis=t.emphasis,i.ssr=this._opts.ssr;var o=[],s=this._bgVNode=yU(a,n,this._backgroundColor,i);s&&o.push(s);var l=t.compress?null:this._mainVNode=Se("g","main",{},[]);this._paintList(e,i,l?l.children:o),l&&o.push(l);var u=W(At(i.defs),function(h){return i.defs[h]});if(u.length&&o.push(Se("defs","defs",{},u)),t.animation){var f=$W(i.cssNodes,i.cssAnims,{newline:!0});if(f){var v=Se("style","stl",{},[],f);o.push(v)}}return ST(a,n,o,t.useViewBox)},r.prototype.renderToString=function(t){return t=t||{},rS(this.renderToVNode({animation:J(t.cssAnimation,!0),emphasis:J(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:J(t.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(t,e,a){for(var n=t.length,i=[],o=0,s,l,u=0,f=0;f=0&&!(h&&l&&h[d]===l[d]);d--);for(var g=p-1;g>d;g--)o--,s=i[o-1];for(var y=d+1;y=s)}}for(var v=ET(this),h=v.startIdx;h=0)&&(o=!0)}),!(!o&&!i.__dirty)){var s=a._opts.useDirtyRect&&!Gg(i)?i.createRepaintRects(t,e,a._width,a._height):null,l=a._i.layerStack[0],u=!0;if(i.__dirty){u=!1,i.__dirty=!1;var f=i.zlevel===l.zl&&i.zlevel2===l.zl2?a._backgroundColor:null;i.clear(!1,f,s)}Kv(i,function(v){var h=a._paintPerCursor(i,v,t,s,u);n=n&&h})}},jv),Mt.wxa&&He(this._i,function(i){i&&i.ctx&&i.ctx.draw&&i.ctx.draw()}),n},r.prototype._paintPerCursor=function(t,e,a,n,i){var o=t.ctx;if(n)if(!n.length)e.drawIdx=e.endIdx;else for(var s=this.dpr,l=0;l=e.endIdx},r.prototype._paintPerCursorInRect=function(t,e,a,n,i){for(var o={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:i}},s=t.ctx,l=Gg(t),u=l&&xe.getTime(),f=e.drawIdx,v=e.notClearIdx,h=v>=0?Math.min(v,f):f;h15){h++;break}}}}Zs(s,o),e.drawIdx=Math.max(h,f)},r.prototype.getLayer=function(t,e){return this._ensureLayer(t,0,e)},r.prototype._ensureLayer=function(t,e,a){e=e||0;var n=this._singleCanvas;n&&!this._needsManuallyCompositing&&(t=Gi,e=0);var i=Wg(this._i,t)[e];return i||(i=OT("zr_"+t+"."+e,this,t,e),this._layerConfig[t]&&yt(i,this._layerConfig[t],!0),(a||n&&t!==Gi)&&(i.virtual=!0),this._insertLayer(i,t,e,!1),i.initContext()),i},r.prototype.insertLayer=function(t,e){this._insertLayer(e,t,0,!1)},r.prototype._insertLayer=function(t,e,a,n){var i=this._i,o=i.layers,s=i.layerStack,l=this._domRoot,u=null;if(!(o[e]&&o[e][a])&&SU(t)){for(var f=s.length,v=0;v0&&(u=Wg(i,s[v-1].zl)[s[v-1].zl2]),s.splice(v,0,{zl:e,zl2:a}),Wg(i,e)[a]=t,!n&&!t.virtual)if(u){var h=u.dom;h.nextSibling?l.insertBefore(t.dom,h.nextSibling):l.appendChild(t.dom)}else l.firstChild?l.insertBefore(t.dom,l.firstChild):l.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(t,e){return He(this._i,function(a,n){t.call(e,a,n)})},r.prototype.eachBuiltinLayer=function(t,e){return He(this._i,function(a,n){t.call(e,a,n)},Ku)},r.prototype.eachOtherLayer=function(t,e){return He(this._i,function(a,n){t.call(e,a,n)},C0)},r.prototype.getLayers=function(){var t={};return He(this._i,function(e,a,n){t[e.id]=e}),t},r.prototype._updateLayerStatus=function(t,e){var a=this;if(a._singleCanvas)for(var n=1;n=0;_--){var S=m.get(y[_]);if(!S.used)g.__dirty=!0,m.removeKey(y[_]),y.splice(_,1);else{var x=S.endIdxNew;(Gg(g)?x=0;n--){var i=e[n];if(i.zl===t){var o=a[t][i.zl2];if(o.__builtin__)continue;if(e.splice(n,1),a[t][i.zl2]=void 0,!o.virtual){var s=o.dom.parentNode;s&&s.removeChild(o.dom)}}}},r.prototype.resize=function(t,e){if(this._domRoot.style){var a=this._domRoot;a.style.display="none";var n=this._opts,i=this.root;t!=null&&(n.width=t),e!=null&&(n.height=e),t=Ns(i,0,n),e=Ns(i,1,n),a.style.display="",(this._width!==t||e!==this._height)&&(a.style.width=t+"px",a.style.height=e+"px",He(this._i,function(o){o.resize(t,e)}),this.refresh({paintAll:!0})),this._width=t,this._height=e}else{if(t==null||e==null)return;this._width=t,this._height=e,this._ensureLayer(Gi).resize(t,e)}return this},r.prototype.clearLayer=function(t){A(this._i.layers[t],function(e){e&&!e.__builtin__&&e.clear()})},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._i=null},r.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._i.layers[Gi][0].dom;var e=new cE("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var a=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var n=e.dom.width,i=e.dom.height;He(this._i,function(v){v.__builtin__?a.drawImage(v.dom,0,0,n,i):v.renderToCanvas&&(a.save(),v.renderToCanvas(a),a.restore())})}else{for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},s=this.storage.getDisplayList(!0),l=0,u=s.length;l-1&&(u.style.stroke=u.style.fill,u.style.fill=B.color.neutral00,u.style.lineWidth=2),a},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1,triggerEvent:!1},t})(Gt);function ul(r,t){var e=r.mapDimensionsAll("defaultedLabel"),a=e.length;if(a===1){var n=al(r,t,e[0]);return n!=null?n+"":null}else if(a){for(var i=[],o=0;o=0&&a.push(t[i])}return a.join(" ")}var ov=(function(r){N(t,r);function t(e,a,n,i){var o=r.call(this)||this;return o.updateData(e,a,n,i),o}return t.prototype._createSymbol=function(e,a,n,i,o,s){this.removeAll();var l=le(e,-1,-1,2,2,null,s);l.attr({z2:J(o,100),culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),l.drift=MU,this._symbolType=e,this.add(l)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){mn(this.childAt(0))},t.prototype.downplay=function(){_n(this.childAt(0))},t.prototype.setZ=function(e,a){var n=this.childAt(0);n.zlevel=e,n.z=a},t.prototype.setDraggable=function(e,a){var n=this.childAt(0);n.draggable=e,n.cursor=!a&&e?"move":n.cursor},t.prototype.updateData=function(e,a,n,i){this.silent=!1;var o=e.getItemVisual(a,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,a),u=t.getSymbolZ2(e,a),f=o!==this._symbolType,v=i&&i.disableAnimation;if(f){var h=e.getItemVisual(a,"symbolKeepAspect");this._createSymbol(o,e,a,l,u,h)}else{var c=this.childAt(0);c.silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};v?c.attr(p):Rt(c,p,s,a),Fr(c)}if(this._updateCommon(e,a,l,n,i),f){var c=this.childAt(0);if(!v){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:c.style.opacity}};c.scaleX=c.scaleY=0,c.style.opacity=0,$t(c,p,s,a)}}v&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,a,n,i,o){var s=this.childAt(0),l=e.hostModel,u,f,v,h,c,p,d,g,y;if(i&&(u=i.emphasisItemStyle,f=i.blurItemStyle,v=i.selectItemStyle,h=i.focus,c=i.blurScope,d=i.labelStatesModels,g=i.hoverScale,y=i.cursorStyle,p=i.emphasisDisabled),!i||e.hasItemOption){var m=i&&i.itemModel?i.itemModel:e.getItemModel(a),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),v=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),h=_.get("focus"),c=_.get("blurScope"),p=_.get("disabled"),d=ge(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var S=e.getItemVisual(a,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var x=Jo(e.getItemVisual(a,"symbolOffset"),n);x&&(s.x=x[0],s.y=x[1]),y&&s.attr("cursor",y);var b=e.getItemVisual(a,"style"),w=b.fill;if(s instanceof Te){var C=s.style;s.useStyle(G({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},b))}else s.__isEmptyBrush?s.useStyle(G({},b)):s.useStyle(b),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var T=e.getItemVisual(a,"liftZ"),M=this._z2;T!=null?M==null&&(this._z2=s.z2,s.z2+=T):M!=null&&(s.z2=M,this._z2=null);var D=o&&o.useNameLabel;we(s,d,{labelFetcher:l,labelDataIndex:a,defaultText:L,inheritColor:w,defaultOpacity:b.opacity});function L(R){return D?e.getName(R):ul(e,R)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var I=s.ensureState("emphasis");I.style=u,s.ensureState("select").style=v,s.ensureState("blur").style=f;var P=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;I.scaleX=this._sizeX*P,I.scaleY=this._sizeY*P,this.setSymbolScale(1),jt(this,h,c,p)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,a,n){var i=this.childAt(0),o=ft(this).dataIndex,s=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var l=i.getTextContent();l&&ii(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();ii(i,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,a){return Rl(e.getItemVisual(a,"symbolSize"))},t.getSymbolZ2=function(e,a){return e.getItemVisual(a,"z2")},t})(it);function MU(r,t){this.parent.drift(r,t)}function Jv(r,t,e,a){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(a&&a.isIgnore&&a.isIgnore(e))&&!(a&&a.clipShape&&!a.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function NT(r){return r!=null&&!lt(r)&&(r={isIgnore:r}),r||{}}function BT(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:ge(t),cursorStyle:t.get("cursor")}}function VT(r,t,e,a,n,i,o){var s=new r(t,e,a,n);return s.setPosition(i),t.setItemGraphicEl(e,s),o.add(s),s}var sv=(function(){function r(t){this.group=new it,this._SymbolCtor=t||ov}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=NT(e);var a=this.group,n=t.hostModel,i=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=this._seriesScope=BT(t),u={disableAnimation:s},f=e.getSymbolPoint||function(v){return t.getItemLayout(v)};i||a.removeAll(),t.diff(i).add(function(v){var h=f(v);Jv(t,h,v,e)&&VT(o,t,v,l,u,h,a)}).update(function(v,h){var c=i.getItemGraphicEl(h),p=f(v);if(!Jv(t,p,v,e)){a.remove(c);return}var d=t.getItemVisual(v,"symbol")||"circle",g=c&&c.getSymbolType&&c.getSymbolType();if(!c||g&&g!==d)a.remove(c),c=new o(t,v,l,u),c.setPosition(p);else{c.updateData(t,v,l,u);var y={x:p[0],y:p[1]};s?c.attr(y):Rt(c,y,n)}a.add(c),t.setItemGraphicEl(v,c)}).remove(function(v){var h=i.getItemGraphicEl(v);h&&h.fadeOut(function(){a.remove(h)},n)}).execute(),this._getSymbolPoint=f,this._data=t},r.prototype.updateLayout=function(t){var e=this._data;if(e)for(var a=this,n=e.getStore(),i=0,o=n.count();i0?e=a[0]:a[1]<0&&(e=a[1]),e}function mE(r,t,e,a){var n=NaN;r.stacked&&(n=e.get(e.getCalculationInfo("stackedOverDimension"),a)),isNaN(n)&&(n=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=e.get(r.baseDim,a),o[1-i]=n,t.dataToPoint(o)}function Or(r,t){return!isFinite(r)||!isFinite(t)}var IU=typeof Float32Array!==Sl?Float32Array:void 0,LU=typeof Float64Array!==Sl?Float64Array:void 0;function Sa(r){return sS({ctor:IU},r).arr}function sS(r,t){var e=r.arr,a=r.ctor;if(t>lf&&(t=lf),!e||r.typed&&e.length=n||d<0)break;if(Or(y,m)){if(l){d+=i;continue}break}if(d===e)r[i>0?"moveTo":"lineTo"](y,m),v=y,h=m;else{var _=y-u,S=m-f;if(_*_+S*S<.5){d+=i;continue}if(o>0){for(var x=d+i,b=t[x*2],w=t[x*2+1];b===y&&w===m&&g=a||Or(b,w))c=y,p=m;else{M=b-u,D=w-f;var P=y-u,R=b-y,E=m-f,O=w-m,k=void 0,V=void 0;if(s==="x"){k=Math.abs(P),V=Math.abs(R);var z=M>0?1:-1;c=y-z*k*o,p=m,L=y+z*V*o,I=m}else if(s==="y"){k=Math.abs(E),V=Math.abs(O);var F=D>0?1:-1;c=y,p=m-F*k*o,L=y,I=m+F*V*o}else k=Math.sqrt(P*P+E*E),V=Math.sqrt(R*R+O*O),T=V/(V+k),c=y-M*o*(1-T),p=m-D*o*(1-T),L=y+M*o*T,I=m+D*o*T,L=Rn(L,En(b,y)),I=Rn(I,En(w,m)),L=En(L,Rn(b,y)),I=En(I,Rn(w,m)),M=L-y,D=I-m,c=y-M*k/V,p=m-D*k/V,c=Rn(c,En(u,y)),p=Rn(p,En(f,m)),c=En(c,Rn(u,y)),p=En(p,Rn(f,m)),M=y-c,D=m-p,L=y+M*V/k,I=m+D*V/k}r.bezierCurveTo(v,h,c,p,y,m),v=L,h=I}else r.lineTo(y,m)}u=y,f=m,d+=i}return g}var _E=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),EU=(function(r){N(t,r);function t(e){var a=r.call(this,e)||this;return a.type="ec-polyline",a}return t.prototype.getDefaultStyle=function(){return{stroke:B.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new _E},t.prototype.buildPath=function(e,a){var n=a.points,i=0,o=n.length/2;if(a.connectNulls){for(;o>0&&Or(n[o*2-2],n[o*2-1]);o--);for(;i=0){var S=u?(p-l)*_+l:(c-s)*_+s;return u?[e,S]:[S,e]}s=c,l=p;break;case o.C:c=i[v++],p=i[v++],d=i[v++],g=i[v++],y=i[v++],m=i[v++];var x=u?uc(s,c,d,y,e,f):uc(l,p,g,m,e,f);if(x>0)for(var b=0;b=0){var S=u?_e(l,p,g,m,w):_e(s,c,d,y,w);return u?[e,S]:[S,e]}}s=y,l=m;break}}},t})(Ct),kU=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(_E),SE=(function(r){N(t,r);function t(e){var a=r.call(this,e)||this;return a.type="ec-polygon",a}return t.prototype.getDefaultShape=function(){return new kU},t.prototype.buildPath=function(e,a){var n=a.points,i=a.stackedOnPoints,o=0,s=n.length/2,l=a.smoothMonotone;if(a.connectNulls){for(;s>0&&Or(n[s*2-2],n[s*2-1]);s--);for(;o=0,i=r.fill||B.color.neutral99;HT(a,t);var o=a.textFill==null;return n?o&&(a.textFill=e.insideFill||B.color.neutral00,!a.textStroke&&e.insideStroke&&(a.textStroke=e.insideStroke),!a.textStroke&&(a.textStroke=i),a.textStrokeWidth==null&&(a.textStrokeWidth=2)):(o&&(a.textFill=r.fill||e.outsideFill||B.color.neutral00),!a.textStroke&&e.outsideStroke&&(a.textStroke=e.outsideStroke)),a.text=t.text,a.rich=t.rich,A(t.rich,function(s){HT(s,s)}),a}function HT(r,t){t&&(j(t,"fill")&&(r.textFill=t.fill),j(t,"stroke")&&(r.textStroke=t.fill),j(t,"lineWidth")&&(r.textStrokeWidth=t.lineWidth),j(t,"font")&&(r.font=t.font),j(t,"fontStyle")&&(r.fontStyle=t.fontStyle),j(t,"fontWeight")&&(r.fontWeight=t.fontWeight),j(t,"fontSize")&&(r.fontSize=t.fontSize),j(t,"fontFamily")&&(r.fontFamily=t.fontFamily),j(t,"align")&&(r.textAlign=t.align),j(t,"verticalAlign")&&(r.textVerticalAlign=t.verticalAlign),j(t,"lineHeight")&&(r.textLineHeight=t.lineHeight),j(t,"width")&&(r.textWidth=t.width),j(t,"height")&&(r.textHeight=t.height),j(t,"backgroundColor")&&(r.textBackgroundColor=t.backgroundColor),j(t,"padding")&&(r.textPadding=t.padding),j(t,"borderColor")&&(r.textBorderColor=t.borderColor),j(t,"borderWidth")&&(r.textBorderWidth=t.borderWidth),j(t,"borderRadius")&&(r.textBorderRadius=t.borderRadius),j(t,"shadowColor")&&(r.textBoxShadowColor=t.shadowColor),j(t,"shadowBlur")&&(r.textBoxShadowBlur=t.shadowBlur),j(t,"shadowOffsetX")&&(r.textBoxShadowOffsetX=t.shadowOffsetX),j(t,"shadowOffsetY")&&(r.textBoxShadowOffsetY=t.shadowOffsetY),j(t,"textShadowColor")&&(r.textShadowColor=t.textShadowColor),j(t,"textShadowBlur")&&(r.textShadowBlur=t.textShadowBlur),j(t,"textShadowOffsetX")&&(r.textShadowOffsetX=t.textShadowOffsetX),j(t,"textShadowOffsetY")&&(r.textShadowOffsetY=t.textShadowOffsetY))}function WT(r,t){if(r.length===t.length){for(var e=0;et){i?e.push(o(i,l,t)):n&&e.push(o(n,l,0),o(n,l,t));break}else n&&(e.push(o(n,l,0)),n=null),e.push(l),i=l}return e}function BU(r,t,e){var a=r.getVisual("visualMeta");if(!(!a||!a.length||!r.count())&&t.type==="cartesian2d"){for(var n,i,o=a.length-1;o>=0;o--){var s=r.getDimensionInfo(a[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){i=a[o];break}}if(i){var l=t.getAxis(n),u=W(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,v=i.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),v.reverse());var h=NU(u,n==="x"?e.getWidth():e.getHeight()),c=h.length;if(!c&&f)return u[0].coord<0?v[1]?v[1]:u[f-1].color:v[0]?v[0]:u[0].color;var p=10,d=h[0].coord-p,g=h[c-1].coord+p,y=g-d;if(y<.001)return"transparent";A(h,function(_){_.offset=(_.coord-d)/y}),h.push({offset:c?h[c-1].offset:.5,color:v[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:v[0]||"transparent"});var m=new Zo(0,0,0,0,h,!0);return m[n]=d,m[n+"2"]=g,m}}}function VU(r,t,e){var a=r.get("showAllSymbol"),n=a==="auto";if(!(a&&!n)){var i=e.getAxesByScale("ordinal")[0];if(i&&!(n&&zU(i,t))){var o=t.mapDimension(i.dim),s={};return A(i.getViewLabels(),function(l){l.tick.offInterval||(s[Ol(i.scale,l.tick)]=1)}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function zU(r,t){var e=r.getExtent(),a=Math.abs(e[1]-e[0])/r.scale.count();isNaN(a)&&(a=0);for(var n=t.count(),i=Math.max(1,Math.round(n/5)),o=0;oa)return!1;return!0}function GU(r){for(var t=r.length/2;t>0&&Or(r[t*2-2],r[t*2-1]);t--);return t-1}function ZT(r,t){return[r[t*2],r[t*2+1]]}function FU(r,t,e){for(var a=r.length/2,n=e==="x"?0:1,i,o,s=0,l=-1,u=0;u=t||i>=t&&o<=t){l=u;break}s=u,i=o}return{range:[s,l],t:(t-i)/(o-i)}}function AE(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var V=p.getState("emphasis").style;V.lineWidth=+p.style.lineWidth+1}ft(p).seriesIndex=e.seriesIndex,jt(p,E,O,k);var z=XT(e.get("smooth")),F=e.get("smoothMonotone");if(p.setShape({smooth:z,smoothMonotone:F,connectNulls:w}),d){var U=s.getCalculationInfo("stackedOnSeries"),X=0;d.useStyle(st(u.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),U&&(X=XT(U.get("smooth"))),d.setShape({smooth:z,stackedOnSmooth:X,smoothMonotone:F,connectNulls:w}),de(d,e,"areaStyle"),ft(d).seriesIndex=e.seriesIndex,jt(d,E,O,k)}var Y=this._changePolyState;s.eachItemGraphicEl(function(tt){tt&&(tt.onHoverStateChange=Y)}),this._polyline.onHoverStateChange=Y,this._data=s,this._coordSys=i,this._stackedOnPoints=x,this._points=f,this._step=M,this._valueOrigin=_;var Q=e.get("triggerEvent"),gt=e.get("triggerLineEvent"),kt=gt===!0||Q===!0||Q==="line",vt=gt===!0||Q===!0||Q==="area";this.packEventData(e,p,kt),d&&this.packEventData(e,d,vt)},t.prototype.packEventData=function(e,a,n){ft(a).eventData=n?{componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line",selfType:a===this._polygon?"area":"line"}:null},t.prototype.highlight=function(e,a,n,i){var o=e.getData(),s=xo(o,i);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],v=l[s*2+1];if(Or(f,v)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,v))return;var h=e.get("zlevel")||0,c=e.get("z")||0;u=new ov(o,s),u.x=f,u.y=v,u.setZ(h,c);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=c,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else zt.prototype.highlight.call(this,e,a,n,i)},t.prototype.downplay=function(e,a,n,i){var o=e.getData(),s=xo(o,i);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else zt.prototype.downplay.call(this,e,a,n,i)},t.prototype._changePolyState=function(e){var a=this._polygon;xc(this._polyline,e),a&&xc(a,e)},t.prototype._newPolyline=function(e){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new EU({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},t.prototype._newPolygon=function(e,a){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new SE({shape:{points:e,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,a,n){var i,o,s=a.getBaseAxis(),l=s.inverse;a.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):a.type==="polar"&&(i=s.dim==="angle",o=!0);var u=e.hostModel,f=u.get("animationDuration");at(f)&&(f=f(null));var v=u.get("animationDelay")||0,h=at(v)?v(null):v;e.eachItemGraphicEl(function(c,p){var d=c;if(d){var g=[c.x,c.y],y=void 0,m=void 0,_=void 0;if(n)if(o){var S=n,x=a.pointToCoord(g);i?(y=S.startAngle,m=S.endAngle,_=-x[1]/180*Math.PI):(y=S.r0,m=S.r,_=x[0])}else{var b=n;i?(y=b.x,m=b.x+b.width,_=c.x):(y=b.y+b.height,m=b.y,_=c.y)}var w=m===y?0:(_-y)/(m-y);l&&(w=1-w);var C=at(v)?v(p):f*w+h,T=d.getSymbolPath(),M=T.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:C}),M&&M.animateFrom({style:{opacity:0}},{duration:300,delay:C}),T.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,a,n){var i=e.getModel("endLabel");if(AE(e)){var o=e.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Dt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=GU(l);f>=0&&(we(s,ge(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:f,defaultText:function(v,h,c){return c!=null?gE(o,c):ul(o,v)},enableTextSetter:!0},HU(i,a)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,a,n,i,o,s,l){var u=this._endLabel,f=this._polyline;if(u){e<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var v=n.getLayout("points"),h=n.hostModel,c=h.get("connectNulls"),p=s.get("precision"),d=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=a.shape,S=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,x=(y?d:0)*(m?-1:1),b=(y?0:-d)*(m?-1:1),w=y?"x":"y",C=FU(v,S,w),T=C.range,M=T[1]-T[0],D=void 0;if(M>=1){if(M>1&&!c){var L=ZT(v,T[0]);u.attr({x:L[0]+x,y:L[1]+b}),o&&(D=h.getRawValue(T[0]))}else{var L=f.getPointOn(S,w);L&&u.attr({x:L[0]+x,y:L[1]+b});var I=h.getRawValue(T[0]),P=h.getRawValue(T[1]);o&&(D=wL(n,p,I,P,C.t))}i.lastFrameIndex=T[0]}else{var R=e===1||i.lastFrameIndex>0?T[0]:0,L=ZT(v,R);o&&(D=h.getRawValue(R)),u.attr({x:L[0]+x,y:L[1]+b})}if(o){var E=Ml(u);typeof E.setLabelText=="function"&&E.setLabelText(D)}}},t.prototype._doUpdateAnimation=function(e,a,n,i,o,s,l){var u=this._polyline,f=this._polygon,v=e.hostModel,h=RU(this._data,e,this._stackedOnPoints,a,this._coordSys,n,this._valueOrigin),c=h.current,p=h.stackedOnCurrent,d=h.next,g=h.stackedOnNext;if(o&&(p=kn(h.stackedOnCurrent,h.current,n,o,l),c=kn(h.current,null,n,o,l),g=kn(h.stackedOnNext,h.next,n,o,l),d=kn(h.next,null,n,o,l)),YT(c,d)>3e3||f&&YT(p,g)>3e3){u.stopAnimation(),u.setShape({points:d}),f&&(f.stopAnimation(),f.setShape({points:d,stackedOnPoints:g}));return}u.shape.__points=h.current,u.shape.points=c;var y={shape:{points:d}};h.current!==c&&(y.shape.__points=h.next),u.stopAnimation(),Rt(u,y,v),f&&(f.setShape({points:c,stackedOnPoints:p}),f.stopAnimation(),Rt(f,{shape:{stackedOnPoints:g}},v),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var m=[],_=h.status,S=0;S<_.length;S++){var x=_[S].cmd;if(x==="="){var b=e.getItemGraphicEl(_[S].idx1);b&&m.push({el:b,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var w=u.shape.__points,C=0;Ct&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),v=a.getDevicePixelRatio(),h=Math.abs(f[1]-f[0])*(v||1),c=Math.round(s/h);if(isFinite(c)&&c>1){i==="lttb"?t.setData(n.lttbDownSample(n.mapDimension(u.dim),1/c)):i==="minmax"&&t.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/c));var p=void 0;Z(i)?p=UU[i]:at(i)&&(p=i),p&&t.setData(n.downSample(n.mapDimension(u.dim),1/c,p,YU))}}}}}function XU(r){r.registerChartView(WU),r.registerSeriesModel(AU),r.registerLayout(lv("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),a=t.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",a)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,ME("line"))}var DE=(function(r){N(t,r);function t(e,a,n,i,o){var s=r.call(this,e,a,n)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var a=this.getExtent();return a[0]=this.toGlobalCoord(a[0]),a[1]=this.toGlobalCoord(a[1]),e&&a[0]>a[1]&&a.reverse(),a},t.prototype.pointToData=function(e,a){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),a)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t})(Ur),M0=null;function ZU(r){M0||(M0=r)}function uv(){return M0}var fd="expandAxisBreak",IE="collapseAxisBreak",LE="toggleAxisBreak",lS="axisbreakchanged",$U={type:fd,event:lS,update:"update",refineEvent:uS},qU={type:IE,event:lS,update:"update",refineEvent:uS},KU={type:LE,event:lS,update:"update",refineEvent:uS};function uS(r,t,e,a){var n=[];return A(r,function(i){n=n.concat(i.eventBreaks)}),{eventContent:{breaks:n}}}function jU(r){r.registerAction($U,t),r.registerAction(qU,t),r.registerAction(KU,t);function t(e,a){var n=[],i=Hs(a,e);function o(s,l){A(i[s],function(u){var f=u.updateAxisBreaks(e);A(f.breaks,function(v){var h;n.push(st((h={},h[l]=u.componentIndex,h),v))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:n}}}var Un=Math.PI,JU=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],QU=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],ko=mt(),PE=mt(),RE=(function(){function r(t){this.recordMap={},this.resolveAxisNameOverlap=t}return r.prototype.ensureRecord=function(t){var e=t.axis.dim,a=t.componentIndex,n=this.recordMap,i=n[e]||(n[e]=[]);return i[a]||(i[a]={ready:{}})},r})();function tY(r,t,e,a){var n=e.axis,i=t.ensureRecord(e),o=[],s,l=fS(r.axisName)&&ol(r.nameLocation);A(a,function(p){var d=Ba(p);if(!(!d||d.label.ignore)){o.push(d);var g=i.transGroup;l&&(g.transform?Sr(au,g.transform):Wo(au),d.transform&&_r(au,au,d.transform),ot.copy(Qv,d.localRect),Qv.applyTransform(au),s?s.union(Qv):ot.copy(s=new ot(0,0,0,0),Qv))}});var u=Math.abs(i.dirVec.x)>.1?"x":"y",f=i.transGroup[u];if(o.sort(function(p,d){return Math.abs(p.label[u]-f)-Math.abs(d.label[u]-f)}),l&&s){var v=n.getExtent(),h=Math.min(v[0],v[1]),c=Math.max(v[0],v[1])-h;s.union(new ot(h,0,c,1))}i.stOccupiedRect=s,i.labelInfoList=o}var au=Kt(),Qv=new ot(0,0,0,0),EE=function(r,t,e,a,n,i){if(ol(r.nameLocation)){var o=i.stOccupiedRect;o&&kE(PW({},o,i.transGroup.transform),a,n)}else OE(i.labelInfoList,i.dirVec,a,n)};function kE(r,t,e){var a=new ut;ld(r,t,a,{direction:Math.atan2(e.y,e.x),bidirectional:!1,touchThreshold:.05})&&_0(t,a)}function OE(r,t,e,a){for(var n=ut.dot(a,t)>=0,i=0,o=r.length;i0?"top":"bottom",i="center"):_o(n-Un)?(o=a>0?"bottom":"top",i="center"):(o="middle",n>0&&n0?"right":"left":i=a>0?"left":"right"),{rotation:n,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r})(),eY=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],rY={axisLine:function(r,t,e,a,n,i,o){var s=a.get(["axisLine","show"]);if(s==="auto"&&(s=!0,r.raw.axisLineAutoShow!=null&&(s=!!r.raw.axisLineAutoShow)),!!s){var l=a.axis.getExtent(),u=i.transform,f=[l[0],0],v=[l[1],0],h=f[0]>v[0];u&&(ee(f,f,u),ee(v,v,u));var c=G({lineCap:"round"},a.getModel(["axisLine","lineStyle"]).getLineStyle()),p={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:c};if(a.get(["axisLine","breakLine"])&&Cc(a.axis.scale))uv().buildAxisBreakLine(a,n,i,p);else{var d=new oe(G({shape:{x1:f[0],y1:f[1],x2:v[0],y2:v[1]}},p));rl(d.shape,d.style.lineWidth),d.anid="line",n.add(d)}var g=a.get(["axisLine","symbol"]);if(g!=null){var y=a.get(["axisLine","symbolSize"]);Z(g)&&(g=[g,g]),(Z(y)||It(y))&&(y=[y,y]);var m=Jo(a.get(["axisLine","symbolOffset"])||0,y),_=y[0],S=y[1];A([{rotate:r.rotation+Math.PI/2,offset:m[0],r:0},{rotate:r.rotation-Math.PI/2,offset:m[1],r:Math.sqrt((f[0]-v[0])*(f[0]-v[0])+(f[1]-v[1])*(f[1]-v[1]))}],function(x,b){if(g[b]!=="none"&&g[b]!=null){var w=le(g[b],-_/2,-S/2,_,S,c.stroke,!0),C=x.r+x.offset,T=h?v:f;w.attr({rotation:x.rotate,x:T[0]+C*Math.cos(r.rotation),y:T[1]-C*Math.sin(r.rotation),silent:!0,z2:11}),n.add(w)}})}}},axisTickLabelEstimate:function(r,t,e,a,n,i,o,s){var l=qT(t,n,s);l&&$T(r,t,e,a,n,i,o,ea.estimate)},axisTickLabelDetermine:function(r,t,e,a,n,i,o,s){var l=qT(t,n,s);l&&$T(r,t,e,a,n,i,o,ea.determine);var u=oY(r,n,i,a);iY(r,t.labelLayoutList,u),sY(r,n,i,a,r.tickDirection)},axisName:function(r,t,e,a,n,i,o,s){var l=e.ensureRecord(a);t.nameEl&&(n.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var u=r.axisName;if(fS(u)){var f=r.nameLocation,v=r.nameDirection,h=a.getModel("nameTextStyle"),c=a.get("nameGap")||0,p=a.axis.getExtent(),d=a.axis.inverse?-1:1,g=new ut(0,0),y=new ut(0,0);f==="start"?(g.x=p[0]-d*c,y.x=-d):f==="end"?(g.x=p[1]+d*c,y.x=d):(g.x=(p[0]+p[1])/2,g.y=r.labelOffset+v*c,y.y=v);var m=Kt();y.transform(Cn(m,m,r.rotation));var _=a.get("nameRotate");_!=null&&(_=_*Un/180);var S,x;ol(f)?S=tr.innerTextLayout(r.rotation,_??r.rotation,v):(S=aY(r.rotation,f,_||0,p),x=r.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(S.rotation)),!isFinite(x)&&(x=null)));var b=h.getFont(),w=a.get("nameTruncate",!0)||{},C=w.ellipsis,T=Ye(r.raw.nameTruncateMaxWidth,w.maxWidth,x),M=s.nameMarginLevel||0,D=new Dt({x:g.x,y:g.y,rotation:S.rotation,silent:tr.isLabelSilent(a),style:Wt(h,{text:u,font:b,overflow:"truncate",width:T,ellipsis:C,fill:h.getTextColor()||a.get(["axisLine","lineStyle","color"]),align:h.get("align")||S.textAlign,verticalAlign:h.get("verticalAlign")||S.textVerticalAlign}),z2:1});if(Mn({el:D,componentModel:a,itemName:u}),D.__fullText=u,D.anid="name",a.get("triggerEvent")){var L=tr.makeAxisEventDataBase(a);L.targetType="axisName",L.name=u,ft(D).eventData=L}i.add(D),D.updateTransform(),t.nameEl=D;var I=l.nameLayout=Ba({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:ol(f)?JU[M]:QU[M]});if(l.nameLocation=f,n.add(D),D.decomposeTransform(),r.shouldNameMoveOverlap&&I){var P=e.ensureRecord(a);e.resolveAxisNameOverlap(r,e,a,I,y,P)}}}};function $T(r,t,e,a,n,i,o,s){BE(t)||lY(r,t,n,s,a,o);var l=t.labelLayoutList;uY(r,a,l,i),hY(a,r.rotation,l);var u=r.optionHideOverlap;nY(a,l,u),u&&jR(Nt(l,function(f){return f&&!f.label.ignore})),tY(r,e,a,l)}function aY(r,t,e,a){var n=k_(e-r),i,o,s=a[0]>a[1],l=t==="start"&&!s||t!=="start"&&s;return _o(n-Un/2)?(o=l?"bottom":"top",i="center"):_o(n-Un*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",nUn/2?i=l?"left":"right":i=l?"right":"left"),{rotation:n,textAlign:i,textVerticalAlign:o}}function nY(r,t,e){var a=r.axis,n=r.get(["axisLabel","customValues"]);if(y4(a))return;function i(u,f,v){var h=Ba(t[f]),c=Ba(t[v]),p=a.scale;if(!(!h||!c)){if(u==null){if(!e&&n)return;var d=ko(h.label).labelInfo.tick;if(rv(p)&&d.notNice||$e(p)&&d.offInterval){Ls(h.label);return}}if(u===!1||h.suggestIgnore){Ls(h.label);return}if(c.suggestIgnore){Ls(c.label);return}var g=.1;if(!e){var y=[0,0,0,0];h=S0({marginForce:y},h),c=S0({marginForce:y},c)}ld(h,c,null,{touchThreshold:g})&&Ls(u?c.label:h.label)}}var o=r.get(["axisLabel","showMinLabel"]),s=r.get(["axisLabel","showMaxLabel"]),l=t.length;i(o,0,1),i(s,l-1,l-2)}function iY(r,t,e){r.showMinorTicks||A(t,function(a){if(a&&a.label.ignore)for(var n=0;n=0&&_(b,S,x.getStore())})}var c=0;if(h(function(_,S,x){a.set(S.uid,1),(!n||!n.hasKey(S.uid))&&(o=!0),c+=x.count()}),(!n||n.keys().length!==a.keys().length)&&(o=!0),!o&&i!=null){t.liPosMinGap=i;return}sS(Fi,c);var p=0;h(function(_,S,x){for(var b=0,w=x.count();b0&&m0?MR:x4,e.serUids=a}var Fi=sS({ctor:LU},50);function vd(r){return function(t,e){var a=Ge(t,{fromStat:{key:r}});if(zr(a.w2))return[-a.w2/2,a.w2/2]}}function po(r){return r+Fc}function Qo(r,t){return r+Fc+t}function vS(r){return mY(),{liPosMinGap:!$e(r.scale)}}var Aa="bar",Df="pictorialBar";function VE(r,t,e,a){j1(r,{key:t,seriesType:e,coordSysType:a,getMetrics:vS})}function zE(r){var t=r.scale.rawExtentInfo.makeRenderInfo().startValue;return t}var GE={left:0,right:0,top:0,bottom:0},Kc=["25%","25%"],Qr="cartesian2d",SY=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(e,a){var n=Ko(e.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),n&&e.outerBounds&&Na(e.outerBounds,n)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&e.outerBounds&&Na(this.option.outerBounds,e.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:GE,outerBoundsContain:"all",outerBoundsClampWidth:Kc[0],outerBoundsClampHeight:Kc[1],backgroundColor:B.color.transparent,borderWidth:1,borderColor:B.color.neutral30},t})(wt),xY=_l(),I0="__ec_stack_";function FE(r){return r.get("stack")||I0+r.seriesIndex}function bY(r){if($e(r.axis.scale)){for(var t=Ge(r.axis),e=[],a=0;a_&&(_=m),_!==f&&(g.width=_,e-=_+u*_,a--)}}),f=(e-l)/(a+(a-1)*u),f=xt(f,0);var v=0,h;A(o,function(d){var g=s[d];g.width||(g.width=f),h=g,v+=g.width*(1+u)}),h&&(v-=h.width*u);var c={},p=-v/2;return A(o,function(d){var g=s[d];c[d]=c[d]||{bandWidth:t,offset:p,width:g.width},p+=g.width*(1+u)}),c}function WE(r){return{seriesType:r,overallReset:function(t){var e=Qo(r,Qr);K1(t,e,function(a){var n=wY(a,r);Io(a,e,function(i){var o=n.columnMap[FE(i)];i.getData().setLayout({bandWidth:o.bandWidth,offset:o.offset,size:o.width})})})}}}function UE(r){return{seriesType:r,plan:jo(),reset:function(t){if(cY(t)){var e=t.getData(),a=t.coordinateSystem,n=a.getBaseAxis(),i=a.getOtherAxis(n),o=e.getDimensionIndex(e.mapDimension(i.dim)),s=e.getDimensionIndex(e.mapDimension(n.dim)),l=t.get("showBackground",!0),u=e.mapDimension(i.dim),f=e.getCalculationInfo("stackResultDimension"),v=xn(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),h=i.isHorizontal(),c=i.toGlobalCoord(i.dataToCoord(zE(i))),p=YE(t),d=t.get("barMinHeight")||0,g=f&&e.getDimensionIndex(f),y=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(_,S){for(var x=_.count,b=p&&Sa(x*3),w=p&&l&&Sa(x*3),C=p&&Sa(x),T=a.master.getRect(),M=h?T.width:T.height,D,L=S.getStore(),I=0;(D=_.next())!=null;){var P=L.get(v?g:o,D),R=L.get(s,D),E=c,O=void 0;v&&(O=+P-L.get(o,D));var k=void 0,V=void 0,z=void 0,F=void 0;if(h){var U=a.dataToPoint([P,R]);v&&(E=a.dataToPoint([O,R])[0]),k=E,V=U[1]+m,z=U[0]-E,F=y,Qt(z)g){_=(b+m)/2;break}x===1&&(S=w-p[0].tickValue)}_==null&&(m?m&&(_=p[p.length-1].coord):_=p[0].coord),s[c]=h.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),v=i.getBaseAxis().isHorizontal()?0:1;s[v]+=u+f/2}return s}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t})(Gt);Gt.registerClass(If);var AY=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return Wa(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.__preparePipelineContext=function(e,a){var n=AL(this,e,a);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,a,n){return n.rect(a.getItemLayout(e))},t.type="series."+Aa,t.dependencies=["grid","polar"],t.defaultOption=ci(If.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:B.color.primary,borderWidth:2}},realtimeSort:!1}),t})(If),MY=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),jc=(function(r){N(t,r);function t(e){var a=r.call(this,e)||this;return a.type="sausage",a}return t.prototype.getDefaultShape=function(){return new MY},t.prototype.buildPath=function(e,a){var n=a.cx,i=a.cy,o=Math.max(a.r0||0,0),s=Math.max(a.r,0),l=(s-o)*.5,u=o+l,f=a.startAngle,v=a.endAngle,h=a.clockwise,c=Math.PI*2,p=h?v-fMath.PI/2&&fs)return!0;s=v}return!1},t.prototype._isOrderDifferentInView=function(e,a){for(var n=a.scale,i=n.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,a,n,i){if(this._isOrderChangedWithinSameData(e,a,n)){var o=this._dataSort(e,n,a);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,a,n){var i=a.baseAxis,o=this._dataSort(e,i,function(s){return e.get(e.mapDimension(a.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},t.prototype.remove=function(e,a){this._clear(this._model),this._removeOnRenderedListener(a)},t.prototype.dispose=function(e,a){this._removeOnRenderedListener(a)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var a=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(i){un(i,e,ft(i).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=Aa,t})(zt),KT={cartesian2d:function(r,t){var e=t.width<0?-1:1,a=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),a<0&&(t.y+=t.height,t.height=-t.height);var n=r.x+r.width,i=r.y+r.height,o=Yg(t.x,r.x),s=Xg(t.x+t.width,n),l=Yg(t.y,r.y),u=Xg(t.y+t.height,i),f=sn?s:o,t.y=v&&l>i?u:l,t.width=f?0:s-o,t.height=v?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),a<0&&(t.y+=t.height,t.height=-t.height),f||v},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var a=t.r;t.r=t.r0,t.r0=a}var n=Xg(t.r,r.r),i=Yg(t.r0,r.r0);t.r=n,t.r0=i;var o=n-i<0;if(e<0){var a=t.r;t.r=t.r0,t.r0=a}return o}},jT={cartesian2d:function(r,t,e,a,n,i,o,s,l){var u=new bt({shape:G({},a),z2:1});if(u.__dataIndex=e,u.name="item",i){var f=u.shape,v=n?"height":"width";f[v]=0}return u},polar:function(r,t,e,a,n,i,o,s,l){var u=!n&&l?jc:Ve,f=new u({shape:a,z2:1});f.name="item";var v=ZE(n);if(f.calculateTextPosition=DY(v,{isRoundCap:u===jc}),i){var h=f.shape,c=n?"r":"endAngle",p={};h[c]=n?a.r0:a.startAngle,p[c]=a[c],(s?Rt:$t)(f,{shape:p},i)}return f}};function PY(r,t){var e=r.get("realtimeSort",!0),a=t.getBaseAxis();if(e&&a.type==="category"&&t.type==="cartesian2d")return{baseAxis:a,otherAxis:t.getOtherAxis(a)}}function JT(r,t,e,a,n,i,o,s){var l,u;i?(u={x:a.x,width:a.width},l={y:a.y,height:a.height}):(u={y:a.y,height:a.height},l={x:a.x,width:a.width}),s||(o?Rt:$t)(e,{shape:l},t,n,null);var f=t?r.baseAxis.model:null;(o?Rt:$t)(e,{shape:u},f,n)}function QT(r,t){for(var e=0;e0?1:-1,o=a.height>0?1:-1;return{x:a.x+i*n/2,y:a.y+o*n/2,width:a.width-i*n,height:a.height-o*n}},polar:function(r,t,e){var a=r.getItemLayout(t);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function kY(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function ZE(r){return(function(t){var e=t?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+e;default:return a}}})(r)}function eC(r,t,e,a,n,i,o,s){var l=t.getItemVisual(e,"style");if(s){if(!i.get("roundCap")){var f=r.shape,v=xa(a.getModel("itemStyle"),f,!0);G(f,v),r.setShape(f)}}else{var u=a.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var h=a.getShallow("cursor");h&&r.attr("cursor",h);var c=s?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?zY(n,i.coordinateSystem):GY(n,i.coordinateSystem),p=ge(a);we(r,p,{labelFetcher:i,labelDataIndex:e,defaultText:ul(i.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:c});var d=r.getTextContent();if(s&&d){var g=a.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,IY(r,g==="outside"?c:g,ZE(o),a.get(["label","rotate"]))}x2(d,p,i.getRawValue(e),function(m){return gE(t,m)});var y=a.getModel(["emphasis"]);jt(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),de(r,a),kY(n)&&(r.style.fill="none",r.style.stroke="none",A(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function OY(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var a=r.get(["itemStyle","borderWidth"])||0,n=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(a,n,i)}var NY=(function(){function r(){}return r})(),rC=(function(r){N(t,r);function t(e){var a=r.call(this,e)||this;return a.type="largeBar",a}return t.prototype.getDefaultShape=function(){return new NY},t.prototype.buildPath=function(e,a){for(var n=a.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?e:null},30,!1);function BY(r,t,e){for(var a=r.baseDimIdx,n=1-a,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,v=i.length/3;f=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[f]}return-1}function $E(r,t,e){if(Eo(e,"cartesian2d")){var a=t,n=e.getArea();return{x:r?a.x:n.x,y:r?n.y:a.y,width:r?a.width:n.width,height:r?n.height:a.height}}else{var n=e.getArea(),i=t;return{cx:n.cx,cy:n.cy,r0:r?n.r0:i.r0,r:r?n.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function VY(r,t,e){var a=r.type==="polar"?Ve:bt;return new a({shape:$E(t,e,r),silent:!0,z2:0})}function zY(r,t){if(r.height===0){var e=t.getOtherAxis(t.getBaseAxis());return e.inverse?"bottom":"top"}return r.height>0?"bottom":"top"}function GY(r,t){if(r.width===0){var e=t.getOtherAxis(t.getBaseAxis());return e.inverse?"left":"right"}return r.width>=0?"right":"left"}function FY(r){r.registerChartView(LY),r.registerSeriesModel(AY),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,WE(Aa)),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,UE(Aa)),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,ME(Aa)),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var a=t.componentType||"series";e.eachComponent({mainType:a,query:t},function(n){t.sortInfo&&n.axis.setCategorySortInfo(t.sortInfo)})}),XE(r)}function fv(r){return{seriesType:r,reset:function(t,e){var a=e.findComponents({mainType:"legend"});if(!(!a||!a.length)){var n=t.getData();n.filterSelf(function(i){for(var o=n.getName(i),s=0;s=0},r.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},r.prototype.getItemVisual=function(t,e){var a=this._getDataWithEncodedVisual();return a.getItemVisual(t,e)},r})(),ti="pie",HY=mt(),qE=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new zl(q(this.getData,this),q(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return Vl(this,{coordDimensions:["value"],encodeDefaulter:St(x1,this)})},t.prototype.getDataParams=function(e){var a=this.getData(),n=HY(a),i=n.seats;if(!i){var o=[];a.each(a.mapDimension("value"),function(l){o.push(l)}),i=n.seats=pL(o,a.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,e);return s.percent=i[e]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){So(e,"labelLine",["show"]);var a=e.labelLine,n=e.emphasis.labelLine;a.show=a.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type="series."+ti,t.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"},t})(Gt);BG({fullType:qE.type,getCoord2:function(r){return r.getShallow("center")}});var WY=Math.PI/180;function iC(r,t,e,a,n,i,o,s,l,u){if(r.length<2)return;function f(d){for(var g=d.rB,y=g*g,m=0;me?y:g,x=Math.abs(_.label.y-e);if(x>=S.maxY){var b=_.label.x-t-_.len2*n,w=a+_.len,C=Math.abs(b)r.unconstrainedWidth?null:h:null;a.setStyle("width",c)}jE(i,a)}}}function jE(r,t){oC.rect=r,KR(oC,t,YY)}var YY={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},oC={};function Zg(r){return r.position==="center"}function XY(r){var t=r.getData(),e=[],a,n,i=!1,o=(r.get("minShowLabelAngle")||0)*WY,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,f=s.x,v=s.y,h=s.height;function c(b){b.ignore=!0}function p(b){if(!b.ignore)return!0;for(var w in b.states)if(b.states[w].ignore===!1)return!0;return!1}t.each(function(b){var w=t.getItemGraphicEl(b),C=w.shape,T=w.getTextContent(),M=w.getTextGuideLine(),D=t.getItemModel(b),L=D.getModel("label"),I=L.get("position")||D.get(["emphasis","label","position"]),P=L.get("distanceToLabelLine"),R=L.get("alignTo"),E=$(L.get("edgeDistance"),u),O=L.get("bleedMargin");O==null&&(O=Math.min(u,h)>200?10:2);var k=D.getModel("labelLine"),V=k.get("length");V=$(V,u);var z=k.get("length2");if(z=$(z,u),Math.abs(C.endAngle-C.startAngle)0?"right":"left":U>0?"left":"right"}var Bt=Math.PI,Ht=0,fe=L.get("rotate");if(It(fe))Ht=fe*(Bt/180);else if(I==="center")Ht=0;else if(fe==="radial"||fe===!0){var vr=U<0?-F+Bt:-F;Ht=vr}else if(fe==="tangential"||fe==="tangential-noflip"&&I!=="outside"&&I!=="outer"){var nr=Math.atan2(U,X);nr<0&&(nr=Bt*2+nr);var di=X>0;di&&fe!=="tangential-noflip"&&(nr=Bt+nr),Ht=nr-Bt}if(i=!!Ht,T.x=Y,T.y=Q,T.rotation=Ht,T.setStyle({verticalAlign:"middle"}),vt){T.setStyle({align:kt});var wd=T.states.select;wd&&(wd.x+=T.x,wd.y+=T.y)}else{var rs=new ot(0,0,0,0);jE(rs,T),e.push({label:T,labelLine:M,position:I,len:V,len2:z,minTurnAngle:k.get("minTurnAngle"),maxSurfaceAngle:k.get("maxSurfaceAngle"),surfaceNormal:new ut(U,X),linePoints:gt,textAlign:kt,labelDistance:P,labelAlignTo:R,edgeDistance:E,bleedMargin:O,rect:rs,unconstrainedWidth:rs.width,labelStyleWidth:T.style.width})}w.setTextConfig({inside:vt})}}),!i&&r.get("avoidLabelOverlap")&&UY(e,a,n,l,u,h,f,v);for(var d=0;dk?(z=P+w*k/2,F=z):(z=P+T,F=V-T),a.setItemLayout(O,{angle:k,startAngle:z,endAngle:F,clockwise:_,cx:o,cy:s,r0:u,r:S?Et(E,b,[u,l]):l}),P=V}),L0){for(var f=o.getItemLayout(0),v=1;isNaN(f&&f.startAngle)&&v=i.r0}},t.type=ti,t})(zt);function jY(r){return{seriesType:r,reset:function(t,e){var a=t.getData();a.filterSelf(function(n){var i=a.mapDimension("value"),o=a.get(i,n);return!(It(o)&&!isNaN(o)&&o<0)})}}}function JY(r){r.registerChartView(KY),r.registerSeriesModel(qE),OP(ti,r.registerAction),r.registerLayout(ZY),r.registerProcessor(fv(ti)),r.registerProcessor(jY(ti))}var QY=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,a){return Wa(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(e,a,n){return n.point(a.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:B.color.primary}},universalTransition:{divideShape:"clone"}},t})(Gt),QE=4,t6=(function(){function r(){}return r})(),e6=(function(r){N(t,r);function t(e){var a=r.call(this,e)||this;return a._off=0,a.hoverDataIdx=-1,a}return t.prototype.getDefaultShape=function(){return new t6},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(e){e&&!e.contentRetained&&this.reset()},t.prototype.buildPath=function(e,a){var n=a.points,i=a.size,o=this.symbolProxy,s=o.shape,l=e.getContext?e.getContext():e,u=l&&i[0]=0;u--){var f=u*2,v=i[f]-s/2,h=i[f+1]-l/2;if(e>=v&&a>=h&&e<=v+s&&a<=h+l)return u}return-1},t.prototype.contain=function(e,a){var n=this.transformCoordToLocal(e,a),i=this.getBoundingRect();if(e=n[0],a=n[1],i.contain(e,a)){var o=this.hoverDataIdx=this.findDataIndex(e,a);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var a=this.shape,n=a.points,i=a.size,o=i[0],s=i[1],l=1/0,u=1/0,f=-1/0,v=-1/0,h=0;h=0&&(u.dataIndex=v+(t.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),a6=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.updateData(i,$g(e)),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,a,n){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.incrementalPrepareUpdate(i),this._finished=!1},t.prototype.incrementalRender=function(e,a,n){this._symbolDraw.incrementalUpdate(e,a.getData(),Ca(a),$g(a)),this._finished=e.end===a.getData().count()},t.prototype.updateTransform=function(e,a,n){var i=e.getData();if(this.group.dirty(),this._finished){var o=lv("").reset(e,a,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout($g(e))}else return{update:!0}},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._updateSymbolDraw=function(e,a){var n=this._symbolDraw,i=a.pipelineContext,o=i.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new r6:new sv,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t})(zt);function $g(r){return{clipShape:wE(r)}}var L0=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",re).models[0]},t.type="cartesian2dAxis",t})(wt);ue(L0,Nl);var tk={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:"auto",onZeroAxisIndex:null,lineStyle:{color:B.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:B.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:B.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[B.color.backgroundTint,B.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:B.color.neutral00,borderColor:B.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},n6=yt({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},tk),hS=yt({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:B.color.axisMinorSplitLine,width:1}}},tk),i6=yt({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},hS),o6=st({logBase:10},hS);const ek={category:n6,value:hS,time:i6,log:o6};function fl(r,t,e,a){A(wR,function(n,i){var o=yt(yt({},ek[i],!0),a,!0),s=(function(l){N(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=t+"Axis."+i,f}return u.prototype.mergeDefaultAndTheme=function(f,v){var h=pf(this),c=h?Ko(f):{},p=v.getTheme();yt(f,p.get(i+"Axis")),yt(f,this.getDefaultOption()),f.type=lC(f),h&&Na(f,c,h)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=mf.createByAxisModel(this))},u.prototype.getCategories=function(f){var v=this.option;if(v.type==="category")return f?v.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(f){var v=uv();return v?v.updateModelAxisBreak(this,f):{breaks:[]}},u.type=t+"Axis."+i,u.defaultOption=o,u})(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",lC)}function lC(r){return r.type||(r.data?"category":"value")}var s6=(function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return W(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Nt(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r})(),Kh=["x","y"];function uC(r){return(r.type==="interval"||r.type==="time")&&!Cc(r)}var l6=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=Qr,e.dimensions=Kh,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,a=this.getAxis("y").scale;if(!(!uC(e)||!uC(a))){var n=Vc(e,null),i=Vc(a,null),o=this.dataToPoint([n[0],i[0]]),s=this.dataToPoint([n[1],i[1]]),l=n[1]-n[0],u=i[1]-i[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,v=(s[1]-o[1])/u,h=o[0]-n[0]*f,c=o[1]-i[0]*v,p=this._transform=[f,0,0,v,h,c];this._invTransform=Sr([],p)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var a=this.getAxis("x"),n=this.getAxis("y");return a.contain(a.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,a){var n=this.dataToPoint(e),i=this.dataToPoint(a),o=this.getArea(),s=new ot(n[0],n[1],i[0]-n[0],i[1]-n[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,a,n){n=n||[];var i=e[0],o=e[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return ee(n,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(i,a)),n[1]=l.toGlobalCoord(l.dataToCoord(o,a)),n},t.prototype.clampData=function(e,a){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),s=i.getExtent(),l=n.parse(e[0]),u=i.parse(e[1]);return a=a||[],a[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),a[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),a},t.prototype.pointToData=function(e,a,n){if(n=n||[],this._invTransform)return ee(n,e,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(e[0]),a),n[1]=o.coordToData(o.toLocalCoord(e[1]),a),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var a=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(a[0],a[1])-e,o=Math.min(n[0],n[1])-e,s=Math.max(a[0],a[1])-i+e,l=Math.max(n[0],n[1])-o+e;return new ot(i,o,s,l)},t})(s6);function rk(r,t){var e=r.scale,a=r.model,n=OR(e,a,a.ecModel,r,null),i=il(e),o=il(t)?t.intervalStub:t,s=i?e.intervalStub:e,l=e.base,u=o.getTicks(),f=o.getTicks({expandToNicedExtent:!0}),v=u.length-1,h,c,p;if(v===1)h=c=0,p=1;else if(v===2){var d=Qt(u[0].value-u[1].value),g=Qt(u[1].value-u[2].value);h=c=0,d===g?p=2:(p=1,d=w[1])return!0})):S[1]?(T=w[1],P(function(){if(k(),I=Pt(L-M*p,D),R(),C<=w[0])return!0})):P(function(){I=Pt(Uo(w[0]/M)*M,D),L=Pt(Vr(w[1]/M)*M,D);var U=Ra((L-I)/M);if(U<=p){var X=p-U,Y=void 0,Q=n.incl0||i;if(Q&&w[0]===0)Y=[0,X];else if(Q&&w[1]===0)Y=[X,0];else{var gt=Vr(X/2);Y=X%2===0?[gt,gt]:C+T=w[1])return!0}})}AR(e,S,b,[C,T],x,{interval:M,intervalCount:p,intervalPrecision:D,niceExtent:[I,L]})}var fC=[[3,1],[0,2]],u6=(function(){function r(t,e,a){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Kh,this._initCartesian(t,e,a),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var a=this._axesMap;A(this._axesList,function(o){Po(o,sl);var s=o.scale;$e(s)&&s.setSortInfo(o.model.get("categorySortInfo"))});function n(o){for(var s=At(o),l=[],u=s.length-1;u>=0;u--){var f=o[+s[u]];f.__alignTo?l.push(f):ll(f)}A(l,function(v){v6(v,v.__alignTo)?ll(v):rk(v,v.__alignTo.scale)})}n(a.x),n(a.y);var i={};A(a.x,function(o){vC(a,"y",o,i)}),A(a.y,function(o){vC(a,"x",o,i)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,a){var n=me(t,e),i=this._rect=qt(t.getBoxLayoutParams(),n.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(P0(o,i),!a){var u=p6(i,s,o,l,e),f=void 0;if(l)R0?(R0(this._axesList,i),P0(o,i)):f=dC(i.clone(),"axisLabel",null,i,o,u,n);else{var v=d6(t,i,n),h=v.outerBoundsRect,c=v.parsedOuterBoundsContain,p=v.outerBoundsClamp;h&&(f=dC(h,c,p,i,o,u,n))}ak(i,o,ea.determine,null,f,n),A(this._coordsList,function(d){d.calcAffineTransform()})}},r.prototype.getAxis=function(t,e){var a=this._axesMap[t];if(a!=null)return a[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var a="x"+t+"y"+e;return this._coordsMap[a]}lt(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,i=this._coordsList;n=0;n--){var i=r[+t[n]];yR(i.scale)&&CR(i.model,i.type,!0)==null&&(i.model.get("alignTicks")&&i.model.get("interval")==null?a.push(i):e=i)}e||(e=a.pop()),e&&A(a,function(o){o.__alignTo=e})}function v6(r,t){return Cc(r.scale)||Cc(t.scale)||t.scale.getTicks().length<2}function h6(r,t){var e=r.getExtent(),a=e[0]+e[1];r.toGlobalCoord=r.dim==="x"?function(n){return n+t}:function(n){return a-n+t},r.toLocalCoord=r.dim==="x"?function(n){return n-t}:function(n){return a-n+t}}function P0(r,t){A(r.x,function(e){return pC(e,t.x,t.width)}),A(r.y,function(e){return pC(e,t.y,t.height)})}function pC(r,t,e){var a=[0,e],n=r.inverse?1:0;r.setExtent(a[n],a[1-n]),h6(r,t)}var R0;function c6(r){R0=r}function dC(r,t,e,a,n,i,o){ak(a,n,ea.estimate,t,!1,o);var s=[0,0,0,0];u(0),u(1),f(a,0,NaN),f(a,1,NaN);var l=Tn(s,function(h){return h>0})==null;return Co(a,s,!0,!0,e),P0(n,a),l;function u(h){A(n[ct[h]],function(c){if(bf(c.model)){var p=i.ensureRecord(c.model),d=p.labelInfoList;if(d)for(var g=0;g0&&!Oe(c)&&c>1e-4&&(h/=c),h}}function p6(r,t,e,a,n){var i=new RE(g6);return A(e,function(o){return A(o,function(s){if(bf(s.model)){var l=!a;s.axisBuilder=dY(r,t,s.model,n,i,l)}})}),i}function ak(r,t,e,a,n,i){var o=e===ea.determine;A(t,function(u){return A(u,function(f){bf(f.model)&&(gY(f.axisBuilder,r,f.model),f.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:n}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[ct[1-u]]=r[ae[u]]<=i.refContainer[ae[u]]*.5?0:1-u===1?2:1}A(t,function(u,f){return A(u,function(v){bf(v.model)&&((a==="all"||o)&&v.axisBuilder.build({axisName:!0},{nameMarginLevel:s[f]}),o&&v.axisBuilder.build({axisLine:!0}))})})}function d6(r,t,e){var a,n=r.get("outerBoundsMode",!0);n==="same"?a=t.clone():(n==null||n==="auto")&&(a=qt(r.get("outerBounds",!0)||GE,e.refContainer));var i=r.get("outerBoundsContain",!0),o;i==null||i==="auto"||pt(["all","axisLabel"],i)<0?o="all":o=i;var s=[yc(J(r.get("outerBoundsClampWidth",!0),Kc[0]),t.width),yc(J(r.get("outerBoundsClampHeight",!0),Kc[1]),t.height)];return{outerBoundsRect:a,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var g6=function(r,t,e,a,n,i){var o=e.axis.dim==="x"?"y":"x";EE(r,t,e,a,n,i),ol(r.nameLocation)||A(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&OE(s.labelInfoList,s.dirVec,a,n)})};function y6(r,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return m6(e,r,t),e.seriesInvolved&&S6(e,r),e}function m6(r,t,e){var a=t.getComponent("tooltip"),n=t.getComponent("axisPointer"),i=n.get("link",!0)||[],o=[];A(e.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=Lf(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var f=s.model,v=f.getModel("tooltip",a);if(A(s.getAxes(),St(d,!1,null)),s.getTooltipAxes&&a&&v.get("show")){var h=v.get("trigger")==="axis",c=v.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(v.get(["axisPointer","axis"]));(h||c)&&A(p.baseAxes,St(d,c?"cross":!0,h)),c&&A(p.otherAxes,St(d,"cross",!1))}function d(g,y,m){var _=m.model.getModel("axisPointer",n),S=_.get("show");if(!(!S||S==="auto"&&!g&&!E0(_))){y==null&&(y=_.get("triggerTooltip")),_=g?_6(m,v,n,t,g,y):_;var x=_.get("snap"),b=_.get("triggerEmphasis"),w=Lf(m.model),C=y||x||m.type==="category",T=r.axesInfo[w]={key:w,axis:m,coordSys:s,axisPointerModel:_,triggerTooltip:y,triggerEmphasis:b,involveSeries:C,snap:x,useHandle:E0(_),seriesModels:[],linkGroup:null};u[w]=T,r.seriesInvolved=r.seriesInvolved||C;var M=x6(i,m);if(M!=null){var D=o[M]||(o[M]={axesInfo:{}});D.axesInfo[w]=T,D.mapper=i[M].mapper,T.linkGroup=D}}}})}function _6(r,t,e,a,n,i){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};A(s,function(h){l[h]=rt(o.get(h))}),l.snap=r.type!=="category"&&!!i,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),n==="cross"){var f=o.get(["label","show"]);if(u.show=f??!0,!i){var v=l.lineStyle=o.get("crossStyle");v&&st(u,v.textStyle)}}return r.model.getModel("axisPointer",new Tt(l,e,a))}function S6(r,t){t.eachSeries(function(e){var a=e.coordinateSystem,n=e.get(["tooltip","trigger"],!0),i=e.get(["tooltip","show"],!0);!a||!a.model||n==="none"||n===!1||n==="item"||i===!1||e.get(["axisPointer","show"],!0)===!1||A(r.coordSysAxesInfo[Lf(a.model)],function(o){var s=o.axis;a.getAxis(s.dim)===s&&(o.seriesModels.push(e),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=e.getData().count())})})}function x6(r,t){for(var e=t.model,a=t.dim,n=0;n=0||r===t}function b6(r){var t=cS(r);if(t){var e=t.axisPointerModel,a=t.axis.scale,n=e.option,i=e.get("status"),o=e.get("value");o!=null&&(o=a.parse(o));var s=E0(e);i==null&&(n.status=s?"show":"hide");var l=a.getExtent();(o==null||o>l[1])&&(o=l[1]),o0;return o&&s}var L6=mt();function mC(r,t,e,a){if(r instanceof DE){var n=r.scale.type;if(n!=="ordinal")return e}var i=r.model,o=i.get("jitter");if(!(o>0))return e;var s=i.get("jitterOverlap"),l=i.get("jitterMargin")||0,u=$e(r.scale)?Ge(r).w:null;return s?uk(e,o,u,a):P6(r,t,e,a,o,l)}function uk(r,t,e,a){if(e===null)return r+(Math.random()-.5)*t;var n=e-a*2,i=Math.min(Math.max(0,t),n);return r+(Math.random()-.5)*i}function P6(r,t,e,a,n,i){var o=L6(r);o.items||(o.items=[]);var s=o.items,l=_C(s,t,e,a,n,i,1),u=_C(s,t,e,a,n,i,-1),f=Math.abs(l-e)n/2||v&&h>v/2-a?uk(e,n,v,a):(s.push({fixedCoord:t,floatCoord:f,r:a}),f)}function _C(r,t,e,a,n,i,o){for(var s=e,l=0;ln/2)return Number.MAX_VALUE;if(o===1&&p>s||o===-1&&p0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var g=u;d.color!=null&&(g=st({color:d.color},u));var y=yt(rt(d),{boundaryGap:e,splitNumber:a,clockwise:n,scale:i,axisLine:o,axisTick:s,axisLabel:l,name:d.text,showName:f,nameLocation:"end",nameGap:h,nameTextStyle:g,triggerEvent:c},!1);if(Z(v)){var m=y.name;y.name=v.replace("{value}",m??"")}else at(v)&&(y.name=v(y.name,y));var _=new Tt(y,null,this.ecModel);return ue(_,Nl.prototype),_.mainType="radar",_.componentIndex=this.componentIndex,_.uid=qo("ec_radar"),_},this);this._indicatorModels=p},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type=fk,t.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,clockwise:!1,axisName:{show:!0,color:B.color.axisLabel},boundaryGap:[0,0],splitNumber:vk,axisNameGap:15,scale:!1,shape:"polygon",axisLine:yt({lineStyle:{color:B.color.neutral20}},nu.axisLine),axisLabel:nh(nu.axisLabel,!1),axisTick:nh(nu.axisTick,!1),splitLine:nh(nu.splitLine,!0),splitArea:nh(nu.splitArea,!0),indicator:[]},t})(wt),G6=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=this.group;i.removeAll(),this._buildAxes(e,n),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e,a){var n=e.coordinateSystem,i=n.getIndicatorAxes(),o=W(i,function(s){var l=s.model.get("showName")?s.name:"",u=new tr(s.model,a,{axisName:l,position:[n.cx,n.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});A(o,function(s){s.build(),this.group.add(s.group)},this)},t.prototype._buildSplitLineAndArea=function(e){var a=e.coordinateSystem,n=a.getIndicatorAxes();if(!n.length)return;var i=e.get("shape"),o=e.getModel("splitLine"),s=e.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),f=o.get("show"),v=s.get("show"),h=l.get("color"),c=u.get("color"),p=H(h)?h:[h],d=H(c)?c:[c],g=[],y=[];function m(R,E,O){var k=O%E.length;return R[k]=R[k]||[],k}if(i==="circle")for(var _=n[0].getTicksCoords(),S=a.cx,x=a.cy,b=0;b<_.length;b++){if(f){var w=m(g,p,b);g[w].push(new Ha({shape:{cx:S,cy:x,r:_[b].coord}}))}if(v&&b<_.length-1){var w=m(y,d,b);y[w].push(new bl({shape:{cx:S,cy:x,r0:_[b].coord,r:_[b+1].coord}}))}}else for(var C,T=W(n,function(R,E){var O=R.getTicksCoords();return C=C==null?O.length-1:Math.min(O.length-1,C),W(O,function(k){return a.coordToPoint(k.coord,E)})}),M=[],b=0;b<=C;b++){for(var D=[],L=0;L3?1.4:o>1?1.2:1.1,f=i>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",e,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(n){var v=Math.abs(i),h=(i>0?1:-1)*(v>3?.4:v>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(bC(this._zr,"globalPan")||iu(e))){var a=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,e,{scale:a,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,a,n,i,o){e._checkPointer(i,o.originX,o.originY)&&(dn(i.event),i.__ecRoamConsumed=!0,wC(e,a,n,i,o))},t})(Hr);function iu(r){return r.__ecRoamConsumed}var K6=mt();function cd(r){var t=K6(r);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function ou(r,t,e,a){for(var n=cd(r),i=n.roam,o=i[t]=i[t]||[],s=0;s=4&&(f={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(f&&s!=null&&l!=null&&(v=dk(f,{x:0,y:0,width:s,height:l}),!e.ignoreViewBox)){var c=n;n=new it,n.add(c),c.scaleX=c.scaleY=v.scale,c.x=v.x,c.y=v.y}return!e.ignoreRootClip&&s!=null&&l!=null&&n.setClipPath(new bt({shape:{x:0,y:0,width:s,height:l}})),{root:n,width:s,height:l,viewBoxRect:f,viewBoxTransform:v,named:i}},r.prototype._parseNode=function(t,e,a,n,i,o){var s=t.nodeName.toLowerCase(),l,u=n;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=e;else{if(!i){var f=Kg[s];if(f&&j(Kg,s)){l=f.call(this,t,e);var v=t.getAttribute("name");if(v){var h={name:v,namedFrom:null,svgNodeTagLower:s,el:l};a.push(h),s==="g"&&(u=h)}else n&&a.push({name:n.name,namedFrom:n,svgNodeTagLower:s,el:l});e.add(l)}}var c=AC[s];if(c&&j(AC,s)){var p=c.call(this,t),d=t.getAttribute("id");d&&(this._defs[d]=p)}}if(l&&l.isGroup)for(var g=t.firstChild;g;)g.nodeType===1?this._parseNode(g,l,a,u,i,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(t,e){var a=new tl({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Tr(e,a),hr(t,a,this._defsUsePending,!1,!1),t8(a,e);var n=a.style,i=n.fontSize;i&&i<9&&(n.fontSize=9,a.scaleX*=i/9,a.scaleY*=i/9);var o=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=o;var s=a.getBoundingRect();return this._textX+=s.width,e.add(a),a},r.internalField=(function(){Kg={g:function(t,e){var a=new it;return Tr(e,a),hr(t,a,this._defsUsePending,!1,!1),a},rect:function(t,e){var a=new bt;return Tr(e,a),hr(t,a,this._defsUsePending,!1,!1),a.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),a.silent=!0,a},circle:function(t,e){var a=new Ha;return Tr(e,a),hr(t,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),a.silent=!0,a},line:function(t,e){var a=new oe;return Tr(e,a),hr(t,a,this._defsUsePending,!1,!1),a.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),a.silent=!0,a},ellipse:function(t,e){var a=new qf;return Tr(e,a),hr(t,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),a.silent=!0,a},polygon:function(t,e){var a=t.getAttribute("points"),n;a&&(n=IC(a));var i=new ze({shape:{points:n||[]},silent:!0});return Tr(e,i),hr(t,i,this._defsUsePending,!1,!1),i},polyline:function(t,e){var a=t.getAttribute("points"),n;a&&(n=IC(a));var i=new Le({shape:{points:n||[]},silent:!0});return Tr(e,i),hr(t,i,this._defsUsePending,!1,!1),i},image:function(t,e){var a=new Te;return Tr(e,a),hr(t,a,this._defsUsePending,!1,!1),a.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),a.silent=!0,a},text:function(t,e){var a=t.getAttribute("x")||"0",n=t.getAttribute("y")||"0",i=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(a)+parseFloat(i),this._textY=parseFloat(n)+parseFloat(o);var s=new it;return Tr(e,s),hr(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,e){var a=t.getAttribute("x"),n=t.getAttribute("y");a!=null&&(this._textX=parseFloat(a)),n!=null&&(this._textY=parseFloat(n));var i=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",s=new it;return Tr(e,s),hr(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(t,e){var a=t.getAttribute("d")||"",n=a2(a);return Tr(e,n),hr(t,n,this._defsUsePending,!1,!1),n.silent=!0,n}}})(),r})(),AC={lineargradient:function(r){var t=parseInt(r.getAttribute("x1")||"0",10),e=parseInt(r.getAttribute("y1")||"0",10),a=parseInt(r.getAttribute("x2")||"10",10),n=parseInt(r.getAttribute("y2")||"0",10),i=new Zo(t,e,a,n);return MC(r,i),DC(r,i),i},radialgradient:function(r){var t=parseInt(r.getAttribute("cx")||"0",10),e=parseInt(r.getAttribute("cy")||"0",10),a=parseInt(r.getAttribute("r")||"0",10),n=new j_(t,e,a);return MC(r,n),DC(r,n),n}};function MC(r,t){var e=r.getAttribute("gradientUnits");e==="userSpaceOnUse"&&(t.global=!0)}function DC(r,t){for(var e=r.firstChild;e;){if(e.nodeType===1&&e.nodeName.toLocaleLowerCase()==="stop"){var a=e.getAttribute("offset"),n=void 0;a&&a.indexOf("%")>0?n=parseInt(a,10)/100:a?n=parseFloat(a):n=0;var i={};pk(e,i,i);var o=i.stopColor||e.getAttribute("stop-color")||"#000000",s=i.stopOpacity||e.getAttribute("stop-opacity");if(s){var l=Xe(o),u=l&&l[3];u&&(l[3]*=sn(s),o=kr(l,"rgba"))}t.colorStops.push({offset:n,color:o})}e=e.nextSibling}}function Tr(r,t){r&&r.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),st(t.__inheritedStyle,r.__inheritedStyle))}function IC(r){for(var t=pd(r),e=[],a=0;a0;i-=2){var o=a[i],s=a[i-1],l=pd(o);switch(n=n||Kt(),s){case"translate":ta(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Lp(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Cn(n,n,-parseFloat(l[0])*jg,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*jg);_r(n,[1,0,u,1,0,0],n);break;case"skewY":var f=Math.tan(parseFloat(l[0])*jg);_r(n,[1,f,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(l[0]),n[1]=parseFloat(l[1]),n[2]=parseFloat(l[2]),n[3]=parseFloat(l[3]),n[4]=parseFloat(l[4]),n[5]=parseFloat(l[5]);break}}t.setLocalTransform(n)}}var PC=/([^\s:;]+)\s*:\s*([^:;]+)/g;function pk(r,t,e){var a=r.getAttribute("style");if(a){PC.lastIndex=0;for(var n;(n=PC.exec(a))!=null;){var i=n[1],o=j(Jc,i)?Jc[i]:null;o&&(t[o]=n[2]);var s=j(Qc,i)?Qc[i]:null;s&&(e[s]=n[2])}}}function o8(r,t,e){for(var a=0;a1e-6;uu[0]=o?(n[0]-a.x)/i:n[0],uu[1]=o?(n[1]-a.y)/i:n[1],ee(uu,uu,r.mtRawInv);var s=P8(r,uu);zC(t,s,i),A(e,function(l){l!==t&&zC(l,s.slice(),i)})}var uu=[];function zC(r,t,e){var a=r.option;a.center=t,a.zoom=e}function _S(r,t){if(t){var e=t.min||0,a=t.max||1/0;r=Math.max(Math.min(a,r),e)}return r}function Tk(r,t){var e=t.getShallow("nodeScaleRatio",!0)||1,a=r;return((a.zoom-1)*e+1)/(a.trans[Va].scaleX||1)}function yd(r,t,e,a,n,i,o,s){var l=rp(r);if(!l){e.disable();return}e.enable(J(r.get("roam"),o),{api:t,zInfo:{component:r},triggerInfo:{roamTrigger:r.get("roamTrigger"),isInSelf:a,isInClip:function(f,v,h){return!n||n.contain(v,h)}}});function u(f){var v=r.mainType,h=n1(st({type:Ak(v,r.subType,FL)},f));s&&(h.componentType=v),h[v+"Id"]=r.id,t.dispatchAction(h)}e.off("pan").off("zoom").on("pan",function(f){i&&i("pan"),u({dx:f.dx,dy:f.dy})}).on("zoom",function(f){i&&i("zoom"),u({zoom:f.scale,originX:f.originX,originY:f.originY})})}function Ck(r){return function(t,e,a){return ey.copy(r.getBoundingRect()),ey.applyTransform(r.getComputedTransform()),ey.contain(e,a)}}var ey=new ot(0,0,0,0);function SS(r,t,e){var a=Ak(t,e,FL);r.registerAction({type:a,event:a,update:"none"},function(n,i,o){i.eachComponent(G_(n,t,e),function(s){Sk(n,s),xk(n,s,i,o)})})}function Ak(r,t,e){return(r!==Oa?r:t==="map"?"geo":t)+e}function Mk(r){return r.zoom!=null}function xS(r,t,e,a,n,i,o){var s=new dd(null,wk(r.ecModel,t));return gd(s,e,a,n,i),o?ep(s,o.x,o.y,o.width,o.height):ep(s,e,a,n,i),yS(s,r),s}var bS=["rect","circle","line","ellipse","polygon","polyline","path"],E8=K(bS),k8=K(bS.concat(["g"])),O8=K(bS.concat(["g"])),Dk=mt();function lh(r){var t=r.getItemStyle(),e=r.get("areaColor");return e!=null&&(t.fill=e),t}function GC(r){var t=r.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var Ik=(function(){function r(t){var e=this.group=new it,a=this._transformGroup=new it;e.add(a),this.uid=qo("ec_map_draw"),this._controller=new es(t.getZr()),a.add(this._regionsGroup=new it),a.add(this._svgGroup=new it)}return r.prototype.draw=function(t,e,a,n,i){var o=this,s=t.getData&&t.getData();$s(t)&&e.eachComponent({mainType:"series",subType:"map"},function(d){!s&&d.getHostGeoModel()===t&&(s=d.getData())});var l=t.coordinateSystem,u=l.view,f=this._regionsGroup,v=this._transformGroup,h=!f.childAt(0)||i,c;l.shouldClip()?(c=dS(null,u),this.group.setClipPath(new bt({shape:c.clone()}))):this.group.removeClipPath(),oi(v,No,u,h?null:t);var p=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0;l.resourceType==="geoJSON"?this._buildGeoJSON(u,a,l,t,s,p):l.resourceType==="geoSVG"&&this._buildSVG(u,a,l,t,s,p),yd(t,a,this._controller,function(d,g,y){return t.coordinateSystem.containPoint([g,y])},c,function(){o._mouseDownFlag=!1},!1,!0),this._updateMapSelectHandler(t,f,a,n)},r.prototype.__updateOnOwnRoam=function(t){oi(this._transformGroup,No,t.coordinateSystem.view,null)},r.prototype._buildGeoJSON=function(t,e,a,n,i,o){var s=this._regionsGroupByName=K(),l=K(),u=this._regionsGroup,f=a.projection,v=f&&f.stream,h=ni(Rf(null,t,Oo));function c(g,y){return y&&(g=y(g)),g&&ee([],g,h)}function p(g){for(var y=[],m=!v&&f&&f.project,_=0;_=0)&&(f=r);var v=o?{normal:{align:"center",verticalAlign:"middle"}}:null;we(e,ge(n),{labelFetcher:f,labelDataIndex:u,defaultText:a},v);var h=e.getTextContent();if(h&&(Dk(h).ignore=h.ignore,e.textConfig&&o)){var c=e.getBoundingRect().clone();e.textConfig.layoutRect=c,e.textConfig.position=[(o[0]-c.x)/c.width*100+"%",(o[1]-c.y)/c.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function WC(r,t,e,a,n,i){t?t.setItemGraphicEl(i,e):ft(e).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:a,region:n&&n.option||{}}}function UC(r,t,e,a,n){t||Mn({el:e,componentModel:r,itemName:a,itemTooltipOption:n.get("tooltip")})}function YC(r,t,e,a){t.highDownSilentOnTouch=!!r.get("selectedMode");var n=a.getModel("emphasis"),i=n.get("focus");return jt(t,i,n.get("blurScope"),n.get("disabled")),$s(r)&&A5(t,r,e),i}function XC(r,t,e){var a=[],n;function i(){n=[]}function o(){n.length&&(a.push(n),n=[])}var s=t({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!e&&s.polygonStart(),A(r,function(l){s.lineStart();for(var u=0;u-1&&(n.style.stroke=n.style.fill,n.style.fill=B.color.neutral00,n.style.lineWidth=2),n},t.prototype.__ownRoamView=function(){return ap(this)?this.coordinateSystem.view:null},t.type="series."+Bo,t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:B.color.tertiary},itemStyle:{borderWidth:.5,borderColor:B.color.border,areaColor:B.color.background},emphasis:{label:{show:!0,color:B.color.primary},itemStyle:{areaColor:B.color.highlight}},select:{label:{show:!0,color:B.color.primary},itemStyle:{color:B.color.highlight}},nameProperty:"name"},t})(Gt);function Lk(r){return r.indexOf("i")===0}function ap(r){return Ef(r.seriesGroup)===r&&!r.getHostGeoModel()}function Ef(r){return r.f[0]}function wS(r,t){var e={};return r.eachRawSeriesByType(Bo,function(a){var n=a.getHostGeoModel(),i=n?"o"+n.id:"i"+a.getMapType(),o=e[i]=e[i]||{f:[],r:[]};!r.isSeriesFiltered(a)&&!t&&o.f.push(a),o.r.push(a)}),e}var B8=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=Bo,e}return t.prototype.render=function(e,a,n,i){if(!(i&&i.type==="mapToggleSelect"&&i.from===this.uid)){var o=this.group;if(o.removeAll(),!e.getHostGeoModel()){var s=this._mapDraw;s&&i&&i.type==="geoRoam"&&s.resetForLabelLayout(),i&&i.type==="geoRoam"&&i.componentType==="series"&&i.seriesId===e.id?s&&o.add(s.group):ap(e)?(s=s||(this._mapDraw=new Ik(n)),o.add(s.group),s.draw(e,a,n,this,i)):this._clearMapDraw(),e.get("showLegendSymbol")&&a.getComponent("legend")&&this._renderSymbols(e)}}},t.prototype.__updateOnOwnRoam=function(e,a,n){var i=this._mapDraw;ap(a)&&i&&i.__updateOnOwnRoam(a)},t.prototype.remove=function(){this._clearMapDraw(),this.group.removeAll()},t.prototype.dispose=function(){this._clearMapDraw()},t.prototype._clearMapDraw=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(e){var a=e.originalData,n=this.group;a.each(a.mapDimension("value"),function(i,o){if(!isNaN(i)){var s=a.getItemLayout(o);if(!(!s||!s.point)){var l=s.point,u=s.offset,f=new Ha({style:{fill:e.getData().getVisual("style").fill},shape:{cx:l[0]+u*9,cy:l[1],r:3},silent:!0,z2:8+(u?0:xl+1)});if(!u){var v=Ef(e.seriesGroup).getData(),h=a.getName(o),c=v.indexOfName(h),p=a.getItemModel(o),d=p.getModel("label"),g=v.getItemGraphicEl(c);we(f,ge(p),{labelFetcher:{getFormattedLabel:function(y,m){return e.getFormattedLabel(c,m)}},defaultText:h}),f.disableLabelAnimation=!0,d.get("position")||f.setTextConfig({position:"bottom"}),g.onHoverStateChange=function(y){xc(f,y)}}n.add(f)}}})},t.type=Bo,t})(zt),V8={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},Pk=["lng","lat"],ZC=(function(r){N(t,r);function t(e,a,n){var i=r.call(this)||this;i.dimensions=Pk,i.type="geo",i._nameCoordMap=K(),i.name=e;var o=n.projection,s=bn.load(a,n.nameMap,n.nameProperty),l=bn.getGeoResource(a);i.resourceType=l?l.type:null;var u=i.regions=s.regions,f=V8[l.type];i._clip=n.clip;var v=o?!1:f.invertLongitute;i.view=new dd(v,wk(n.ecModel,n.api),i),i.map=a,i._regionsMap=s.regionsMap,i.regions=s.regions,i.projection=o;var h;if(o)for(var c=0;c1?(S.width=_,S.height=_/g):(S.height=_,S.width=_*g),S.y=m[1]-S.height/2,S.x=m[0]-S.width/2;else{var x=r.getBoxLayoutParams();x.aspect=g,S=qt(x,d),S=Y2(r,S,g)}ep(e,S.x,S.y,S.width,S.height),yS(e,r)}function z8(r,t){A(t.get("geoCoord"),function(e,a){r.addGeoCoord(a,e)})}var G8=(function(){function r(){this.dimensions=Pk}return r.prototype.create=function(t,e){var a=[];function n(i){return{nameProperty:i.get("nameProperty"),aspectScale:i.get("aspectScale"),projection:i.get("projection"),clip:i.getShallow("clip",!0)}}return t.eachComponent("geo",function(i,o){var s=i.get("map"),l=new ZC(s+o,s,G({nameMap:i.get("nameMap"),api:e,ecModel:t},n(i)));a.push(l),i.coordinateSystem=l,l.model=i,l.resize=qC,l.resize(i,e)}),t.eachSeries(function(i){tv({targetModel:i,coordSysType:"geo",coordSysProvider:function(){var o=i.subType===Bo?i.getHostGeoModel():i.getReferringComponents("geo",re).models[0];return o&&o.coordinateSystem},allowNotFound:!0})}),A(wS(t,!0),function(i,o){if(Lk(o)){var s=i.r[0],l=[];A(i.r,function(h){l.push(h.get("nameMap")),h.seriesGroup=null});var u=o.slice(1),f=new ZC(u,u,G({nameMap:Dp(l),api:e,ecModel:t},n(s))),v;A(i.r,function(h){v=J(v,h.get("scaleLimit"))}),a.push(f),f.resize=qC,f.resize(s,e),A(i.r,function(h){h.coordinateSystem=f,z8(f,h)})}}),a},r.prototype.getFilledRegions=function(t,e,a,n){for(var i=(t||[]).slice(),o=K(),s=0;s=0;o--){var s=n[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},e.push(s)}}function j8(r,t){var e=r.isExpand?r.children:[],a=r.parentNode.children,n=r.hierNode.i?a[r.hierNode.i-1]:null;if(e.length){Q8(r);var i=(e[0].hierNode.prelim+e[e.length-1].hierNode.prelim)/2;n?(r.hierNode.prelim=n.hierNode.prelim+t(r,n),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else n&&(r.hierNode.prelim=n.hierNode.prelim+t(r,n));r.parentNode.hierNode.defaultAncestor=t7(r,n,r.parentNode.hierNode.defaultAncestor||a[0],t)}function J8(r){var t=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:t},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function KC(r){return arguments.length?r:a7}function Ru(r,t){return r-=Math.PI/2,{x:t*Math.cos(r),y:t*Math.sin(r)}}function Q8(r){for(var t=r.children,e=t.length,a=0,n=0;--e>=0;){var i=t[e];i.hierNode.prelim+=a,i.hierNode.modifier+=a,n+=i.hierNode.change,a+=i.hierNode.shift+n}}function t7(r,t,e,a){if(t){for(var n=r,i=r,o=i.parentNode.children[0],s=t,l=n.hierNode.modifier,u=i.hierNode.modifier,f=o.hierNode.modifier,v=s.hierNode.modifier;s=ry(s),i=ay(i),s&&i;){n=ry(n),o=ay(o),n.hierNode.ancestor=r;var h=s.hierNode.prelim+v-i.hierNode.prelim-u+a(s,i);h>0&&(r7(e7(s,r,e),r,h),u+=h,l+=h),v+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=n.hierNode.modifier,f+=o.hierNode.modifier}s&&!ry(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=v-l),i&&!ay(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-f,e=r)}return e}function ry(r){var t=r.children;return t.length&&r.isExpand?t[t.length-1]:r.hierNode.thread}function ay(r){var t=r.children;return t.length&&r.isExpand?t[0]:r.hierNode.thread}function e7(r,t,e){return r.hierNode.ancestor.parentNode===t.parentNode?r.hierNode.ancestor:e}function r7(r,t,e){var a=e/(t.hierNode.i-r.hierNode.i);t.hierNode.change-=a,t.hierNode.shift+=e,t.hierNode.modifier+=e,t.hierNode.prelim+=e,r.hierNode.change+=a}function a7(r,t){return r.parentNode===t.parentNode?1:2}var Nr=mt();function kk(r){var t=r.mainData,e=r.datas;e||(e={main:t},r.datasAttr={main:"data"}),r.datas=r.mainData=null,Ok(t,e,r),A(e,function(a){A(t.TRANSFERABLE_METHODS,function(n){a.wrapMethod(n,St(n7,r))})}),t.wrapMethod("cloneShallow",St(o7,r)),A(t.CHANGABLE_METHODS,function(a){t.wrapMethod(a,St(i7,r))}),Be(e[t.dataType]===t)}function n7(r,t){if(u7(this)){var e=G({},Nr(this).datas);e[this.dataType]=t,Ok(t,e,r)}else TS(t,this.dataType,Nr(this).mainData,r);return t}function i7(r,t){return r.struct&&r.struct.update(),t}function o7(r,t){return A(Nr(t).datas,function(e,a){e!==t&&TS(e.cloneShallow(),a,t,r)}),t}function s7(r){var t=Nr(this).mainData;return r==null||t==null?t:Nr(t).datas[r]}function l7(){var r=Nr(this).mainData;return r==null?[{data:r}]:W(At(Nr(r).datas),function(t){return{type:t,data:Nr(r).datas[t]}})}function u7(r){return Nr(r).mainData===r}function Ok(r,t,e){Nr(r).datas={},A(t,function(a,n){TS(a,n,r,e)})}function TS(r,t,e,a){Nr(e).datas[t]=r,Nr(r).mainData=e,r.dataType=t,a.struct&&(r[a.structAttr]=a.struct,a.struct[a.datasAttr[t]]=r),r.getLinkedData=s7,r.getLinkedDataAll=l7}var f7=(function(){function r(t,e){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=e}return r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(t,e,a){at(t)&&(a=e,e=t,t=null),t=t||{},Z(t)&&(t={order:t});var n=t.order||"preorder",i=this[t.attr||"children"],o;n==="preorder"&&(o=e.call(a,this));for(var s=0;!o&&se&&(e=n.height)}this.height=e+1},r.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,a=this.children,n=a.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostTree,a=e.data.getItemModel(this.dataIndex);return a.getModel(t)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},r.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e=0){var a=e.getData().tree.root,n=r.targetNode;if(Z(n)&&(n=a.getNodeById(n)),n&&a.contains(n))return{node:n};var i=r.targetNodeId;if(i!=null&&(n=a.getNodeById(i)))return{node:n}}}function Nk(r){for(var t=[];r;)r=r.parentNode,r&&t.push(r);return t.reverse()}function AS(r,t){var e=Nk(r);return pt(e,t)>=0}function md(r,t){for(var e=[];r;){var a=r.dataIndex;e.push({name:r.name,dataIndex:a,value:t.getRawValue(a)}),r=r.parentNode}return e.reverse(),e}var Vo="tree",h7=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e){var a={name:e.name,children:e.data},n=e.leaves||{},i=new Tt(n,this,this.ecModel),o=CS.createTree(a,this,s);function s(v){v.wrapMethod("getItemModel",function(h,c){var p=o.getNodeByDataIndex(c);return p&&p.children.length&&p.isExpand||(h.parentModel=i),h})}var l=0;o.eachNode("preorder",function(v){v.depth>l&&(l=v.depth)});var u=e.expandAndCollapse,f=u&&e.initialTreeDepth>=0?e.initialTreeDepth:l;return o.root.eachNode("preorder",function(v){var h=v.hostTree.data.getRawDataItem(v.dataIndex);v.isExpand=h&&h.collapsed!=null?!h.collapsed:v.depth<=f}),o.data},t.prototype.getOrient=function(){var e=this.get("orient");return e==="horizontal"?e="LR":e==="vertical"&&(e="TB"),e},t.prototype.formatTooltip=function(e,a,n){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(e),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return he("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},t.prototype.getDataParams=function(e){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return a.treeAncestors=md(n,this),a.collapsed=!n.isExpand,a},t.prototype.__ownRoamView=function(){return this.coordinateSystem},t.type="series."+Vo,t.layoutMode="box",t.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:B.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t})(Gt),c7=(function(){function r(){this.parentPoint=[],this.childPoints=[]}return r})(),p7=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:B.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new c7},t.prototype.buildPath=function(e,a){var n=a.childPoints,i=n.length,o=a.parentPoint,s=n[0],l=n[i-1];if(i===1){e.moveTo(o[0],o[1]),e.lineTo(s[0],s[1]);return}var u=a.orient,f=u==="TB"||u==="BT"?0:1,v=1-f,h=$(a.forkPosition,1),c=[];c[f]=o[f],c[v]=o[v]+(l[v]-o[v])*h,e.moveTo(o[0],o[1]),e.lineTo(c[0],c[1]),e.moveTo(s[0],s[1]),c[f]=s[f],e.lineTo(c[0],c[1]),c[f]=l[f],e.lineTo(c[0],c[1]),e.lineTo(l[0],l[1]);for(var p=1;pm.x,x||(S=S-Math.PI));var w=x?"left":"right",C=s.getModel("label"),T=C.get("rotate"),M=T*(Math.PI/180),D=g.getTextContent();D&&(g.setTextConfig({position:C.get("position")||w,rotation:T==null?-S:M,origin:"center"}),D.setStyle("verticalAlign","middle"))}var L=s.get(["emphasis","focus"]),I=L==="relative"?Ks(o.getAncestorsIndices(),o.getDescendantIndices()):L==="ancestor"?o.getAncestorsIndices():L==="descendant"?o.getDescendantIndices():null;I&&(ft(e).focus=I),g7(n,o,f,e,p,c,d,a),e.__edge&&(e.onHoverStateChange=function(P){if(P!=="blur"){var R=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);R&&R.hoverState===$f||xc(e.__edge,P)}})}function g7(r,t,e,a,n,i,o,s){var l=t.getModel(),u=r.get("edgeShape"),f=r.get("layout"),v=r.getOrient(),h=r.get(["lineStyle","curveness"]),c=r.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),d=a.__edge;if(u==="curve")t.parentNode&&t.parentNode!==e&&(d||(d=a.__edge=new wl({shape:B0(f,v,h,n,n)})),Rt(d,{shape:B0(f,v,h,i,o)},r));else if(u==="polyline"&&f==="orthogonal"&&t!==e&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var g=t.children,y=[],m=0;m=0;i--)e.push(n[i])}}function m7(r,t){r.eachSeriesByType("tree",function(e){_7(e,t)})}function _7(r,t){var e=me(r,t).refContainer,a=qt(r.getBoxLayoutParams(),e);r.layoutInfo=a;var n=r.get("layout"),i=0,o=0,s=null;n==="radial"?(i=2*Math.PI,o=Math.min(a.height,a.width)/2,s=KC(function(S,x){return(S.parentNode===x.parentNode?1:2)/S.depth})):(i=a.width,o=a.height,s=KC());var l=r.getData().tree.root,u=l.children[0];if(u){K8(l),y7(u,j8,s),l.hierNode.modifier=-u.hierNode.prelim,fu(u,J8);var f=u,v=u,h=u;fu(u,function(S){var x=S.getLayout().x;xv.getLayout().x&&(v=S),S.depth>h.depth&&(h=S)});var c=f===v?1:s(f,v)/2,p=c-f.getLayout().x,d=0,g=0,y=0,m=0;if(n==="radial")d=i/(v.getLayout().x+c+p),g=o/(h.depth-1||1),fu(u,function(S){y=(S.getLayout().x+p)*d,m=(S.depth-1)*g;var x=Ru(y,m);S.setLayout({x:x.x,y:x.y,rawX:y,rawY:m},!0)});else{var _=r.getOrient();_==="RL"||_==="LR"?(g=o/(v.getLayout().x+c+p),d=i/(h.depth-1||1),fu(u,function(S){m=(S.getLayout().x+p)*g,y=_==="LR"?(S.depth-1)*d:i-(S.depth-1)*d,S.setLayout({x:y,y:m},!0)})):(_==="TB"||_==="BT")&&(d=i/(v.getLayout().x+c+p),g=o/(h.depth-1||1),fu(u,function(S){y=(S.getLayout().x+p)*d,m=_==="TB"?(S.depth-1)*g:o-(S.depth-1)*g,S.setLayout({x:y,y:m},!0)}))}}}function S7(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:Oa,subType:Vo,query:t},function(a){var n=t.dataIndex,i=a.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),SS(r,Oa,Vo)}var x7=ye(Vo,b7);function b7(r){r.eachSeriesByType(Vo,function(t){var e=t.getData(),a=e.tree;a.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=e.ensureUniqueItemVisual(n.dataIndex,"style");G(s,o)})})}function w7(r){r.registerChartView(d7),r.registerSeriesModel(h7),r.registerLayout(m7),r.registerVisual(x7),S7(r)}var eA=["treemapZoomToNode","treemapRender","treemapMove"];function T7(r){for(var t=0;t1;)i=i.parentNode;var o=Qm(r.ecModel,i.name||i.dataIndex+"",a);n.setVisual("decal",o)})}var C7=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.preventUsingHoverLayer=!0,e}return t.prototype.getInitialData=function(e,a){var n={name:e.name,children:e.data};zk(n);var i=e.levels||[],o=this.designatedVisualItemStyle={},s=new Tt({itemStyle:o},this,a);i=e.levels=A7(i,a);var l=W(i||[],function(v){return new Tt(v,s,a)},this),u=CS.createTree(n,this,f);function f(v){v.wrapMethod("getItemModel",function(h,c){var p=u.getNodeByDataIndex(c),d=p?l[p.depth]:null;return h.parentModel=d||s,h})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,a,n){var i=this.getData(),o=this.getRawValue(e),s=i.getName(e);return he("nameValue",{name:s,value:o})},t.prototype.getDataParams=function(e){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return a.treeAncestors=md(n,this),a.treePathInfo=a.treeAncestors,a},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},G(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var a=this._idIndexMap;a||(a=this._idIndexMap=K(),this._idIndexMapCount=0);var n=a.get(e);return n==null&&a.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var a=this.getRawData().tree.root;(!e||e!==a&&!a.contains(e))&&(this._viewRoot=a)},t.prototype.enableAriaDecal=function(){Vk(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,coordinateSystemUsage:"box",left:B.size.l,top:B.size.xxxl,right:B.size.l,bottom:B.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:B.size.m,emptyItemWidth:25,itemStyle:{color:B.color.backgroundShade,textStyle:{color:B.color.secondary}},emphasis:{itemStyle:{color:B.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:B.color.neutral00,overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:B.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t})(Gt);function zk(r){var t=0;A(r.children,function(a){zk(a);var n=a.value;H(n)&&(n=n[0]),t+=n});var e=r.value;H(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),H(r.value)?r.value[0]=e:r.value=e}function A7(r,t){var e=Ut(t.get("color")),a=Ut(t.get(["aria","decal","decals"]));if(e){r=r||[];var n,i;A(r,function(s){var l=new Tt(s),u=l.get("color"),f=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||f&&f!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return n||(o.color=e.slice()),!i&&a&&(o.decal=a.slice()),r}}var M7=8,rA=8,ny=5,D7=(function(){function r(t){this.group=new it,t.add(this.group)}return r.prototype.render=function(t,e,a,n){var i=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!a)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),f=l.getModel(["itemStyle","textStyle"]),v=me(t,e).refContainer,h={left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},c={emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]},p=qt(h,v);this._prepare(a,c,u),this._renderContent(t,c,p,s,l,u,f,n),jp(o,h,v)}},r.prototype._prepare=function(t,e,a){for(var n=t;n;n=n.parentNode){var i=pe(n.getModel().get("name"),""),o=a.getTextRect(i),s=Math.max(o.width+M7*2,e.emptyItemWidth);e.totalWidth+=s+rA,e.renderList.push({node:n,text:i,width:s})}},r.prototype._renderContent=function(t,e,a,n,i,o,s,l){for(var u=0,f=e.emptyItemWidth,v=t.get(["breadcrumb","height"]),h=e.totalWidth,c=e.renderList,p=i.getModel("itemStyle").getItemStyle(),d=c.length-1;d>=0;d--){var g=c[d],y=g.node,m=g.width,_=g.text;h>a.width&&(h-=m-f,m=f,_=null);var S=new ze({shape:{points:I7(u,0,m,v,d===c.length-1,d===0)},style:st(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Dt({style:Wt(o,{text:_})}),textConfig:{position:"inside"},z2:xl*1e4,onclick:St(l,y)});S.disableLabelAnimation=!0,S.getTextContent().ensureState("emphasis").style=Wt(s,{text:_}),S.ensureState("emphasis").style=p,jt(S,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(S),L7(S,t,y),u+=m+rA}},r.prototype.remove=function(){this.group.removeAll()},r})();function I7(r,t,e,a,n,i){var o=[[n?r:r-ny,t],[r+e,t],[r+e,t+a],[n?r:r-ny,t+a]];return!i&&o.splice(2,0,[r+e+ny,t+a/2]),!n&&o.push([r,t+a/2]),o}function L7(r,t,e){ft(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:e&&e.dataIndex,name:e&&e.name},treePathInfo:e&&md(e,t)}}var P7=(function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(t,e,a,n,i){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:a,delay:n,easing:i}),!0)},r.prototype.finished=function(t){return this._finishedCallback=t,this},r.prototype.start=function(){for(var t=this,e=this._storage.length,a=function(){e--,e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},n=0,i=this._storage.length;n=0;l--){var u=n[a==="asc"?o-l-1:l].getValue();u/e*ts[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function F7(r,t,e){for(var a=0,n=1/0,i=0,o=void 0,s=r.length;ia&&(a=o));var l=r.area*r.area,u=t*t*e;return l?Of(u*a/l,l/(u*n)):1/0}function aA(r,t,e,a,n){var i=t===e.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=e[s[i]],f=t?r.area/t:0;(n||f>e[l[o]])&&(f=e[l[o]]);for(var v=0,h=r.length;vlf&&(f=lf),n=l}fiA||Math.abs(e.dy)>iA)){var a=this.seriesModel.getData().tree.root;if(!a)return;var n=a.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var a=e.originX,n=e.originY,i=e.scale,o=this.seriesModel;if(this._state!=="animating"){var s=o.getData().tree.root;if(!s)return;var l=s.getLayout();if(!l)return;var u=new ot(l.x,l.y,l.width,l.height),f=o.layoutInfo,v=Uk(f,l),h=v*i;h=Yk(h,o);var c=h/v;a-=f.x,n-=f.y;var p=Kt();ta(p,p,[-a,-n]),Lp(p,p,[c,c]),ta(p,p,[a,n]),u.applyTransform(p),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:u.x,y:u.y,width:u.width,height:u.height}})}},t.prototype._initEvents=function(e){var a=this;e.on("click",function(n){if(a._state==="ready"){var i=a.seriesModel.get("nodeClick",!0);if(i){var o=a.findTarget(n.offsetX,n.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)a._rootToNode(o);else if(i==="zoomToNode")a._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),f=l.get("target",!0)||"blank";u&&Mc(u,f)}}}}},this)},t.prototype._renderBreadcrumb=function(e,a,n){var i=this;n||(n=e.get("leafDepth",!0)!=null?{node:e.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),n||(n={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new D7(this.group))).render(e,a,n.node,function(o){i._state!=="animating"&&(AS(e.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=vu(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,a){var n,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(e,a),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)n={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),n},t.type="treemap",t})(zt);function vu(){return{nodeGroup:[],background:[],content:[]}}function $7(r,t,e,a,n,i,o,s,l,u){if(!o)return;var f=o.getLayout(),v=r.getData(),h=o.getModel();if(v.setItemGraphicEl(o.dataIndex,null),!f||!f.isInView)return;var c=f.width,p=f.height,d=f.borderWidth,g=f.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,S=f.upperHeight,x=_&&_.length,b=h.getModel("itemStyle"),w=h.getModel(["emphasis","itemStyle"]),C=h.getModel(["blur","itemStyle"]),T=h.getModel(["select","itemStyle"]),M=b.get("borderRadius")||0,D=Q("nodeGroup",V0);if(!D)return;if(l.add(D),D.x=f.x||0,D.y=f.y||0,D.markRedraw(),ip(D).nodeWidth=c,ip(D).nodeHeight=p,f.isAboveViewRoot)return D;var L=Q("background",nA,u,Y7);L&&z(D,L,x&&f.upperLabelHeight);var I=h.getModel("emphasis"),P=I.get("focus"),R=I.get("blurScope"),E=I.get("disabled"),O=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(x)vf(D)&&ao(D,!1),L&&(ao(L,!E),v.setItemGraphicEl(o.dataIndex,L),Hm(L,O,R));else{var k=Q("content",nA,u,X7);k&&F(D,k),L.disableMorphing=!0,L&&vf(L)&&ao(L,!1),ao(D,!E),v.setItemGraphicEl(o.dataIndex,D);var V=h.getShallow("cursor");V&&k.attr("cursor",V),Hm(D,O,R)}return D;function z(vt,tt,dt){var et=ft(tt);if(et.dataIndex=o.dataIndex,et.seriesIndex=r.seriesIndex,tt.setShape({x:0,y:0,width:c,height:p,r:M}),g)U(tt);else{tt.invisible=!1;var ht=o.getVisual("style"),Ft=ht.stroke,Lt=lA(b);Lt.fill=Ft;var Bt=Zi(w);Bt.fill=w.get("borderColor");var Ht=Zi(C);Ht.fill=C.get("borderColor");var fe=Zi(T);if(fe.fill=T.get("borderColor"),dt){var vr=c-2*d;X(tt,Ft,ht.opacity,{x:d,y:0,width:vr,height:S})}else tt.removeTextContent();tt.setStyle(Lt),tt.ensureState("emphasis").style=Bt,tt.ensureState("blur").style=Ht,tt.ensureState("select").style=fe,To(tt)}vt.add(tt)}function F(vt,tt){var dt=ft(tt);dt.dataIndex=o.dataIndex,dt.seriesIndex=r.seriesIndex;var et=Math.max(c-2*d,0),ht=Math.max(p-2*d,0);if(tt.culling=!0,tt.setShape({x:d,y:d,width:et,height:ht,r:M}),g)U(tt);else{tt.invisible=!1;var Ft=o.getVisual("style"),Lt=Ft.fill,Bt=lA(b);Bt.fill=Lt,Bt.decal=Ft.decal;var Ht=Zi(w),fe=Zi(C),vr=Zi(T);X(tt,Lt,Ft.opacity,null),tt.setStyle(Bt),tt.ensureState("emphasis").style=Ht,tt.ensureState("blur").style=fe,tt.ensureState("select").style=vr,To(tt)}vt.add(tt)}function U(vt){!vt.invisible&&i.push(vt)}function X(vt,tt,dt,et){var ht=h.getModel(et?sA:oA),Ft=pe(h.get("name"),null),Lt=ht.getShallow("show");we(vt,ge(h,et?sA:oA),{defaultText:Lt?Ft:null,inheritColor:tt,defaultOpacity:dt,labelFetcher:r,labelDataIndex:o.dataIndex});var Bt=vt.getTextContent();if(Bt){var Ht=Bt.style,fe=Uf(Ht.padding||0);et&&(vt.setTextConfig({layoutRect:et}),Bt.disableLabelLayout=!0),Bt.beforeUpdate=function(){var nr=Math.max((et?et.width:vt.shape.width)-fe[1]-fe[3],0),di=Math.max((et?et.height:vt.shape.height)-fe[0]-fe[2],0);(Ht.width!==nr||Ht.height!==di)&&Bt.setStyle({width:nr,height:di})},Ht.truncateMinChar=2,Ht.lineOverflow="truncate",Y(Ht,et,f);var vr=Bt.getState("emphasis");Y(vr?vr.style:null,et,f)}}function Y(vt,tt,dt){var et=vt?vt.text:null;if(!tt&&dt.isLeafRoot&&et!=null){var ht=r.get("drillDownIcon",!0);vt.text=ht?ht+" "+et:et}}function Q(vt,tt,dt,et){var ht=m!=null&&e[vt][m],Ft=n[vt];return ht?(e[vt][m]=null,gt(Ft,ht)):g||(ht=new tt,ht instanceof Gr&&(ht.z2=q7(dt,et)),kt(Ft,ht)),t[vt][y]=ht}function gt(vt,tt){var dt=vt[y]={};tt instanceof V0?(dt.oldX=tt.x,dt.oldY=tt.y):dt.oldShape=G({},tt.shape)}function kt(vt,tt){var dt=vt[y]={},et=o.parentNode,ht=tt instanceof it;if(et&&(!a||a.direction==="drillDown")){var Ft=0,Lt=0,Bt=n.background[et.getRawIndex()];!a&&Bt&&Bt.oldShape&&(Ft=Bt.oldShape.width,Lt=Bt.oldShape.height),ht?(dt.oldX=0,dt.oldY=Lt):dt.oldShape={x:Ft,y:Lt,width:0,height:0}}dt.fadein=!ht}}function q7(r,t){return r*U7+t}var Nf=A,K7=lt,op=-1,be=(function(){function r(t){var e=t.mappingMethod,a=t.type,n=this.option=rt(t);this.type=a,this.mappingMethod=e,this._normalizeData=Q7[e];var i=r.visualHandlers[a];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[e],e==="piecewise"?(iy(n),j7(n)):e==="category"?n.categories?J7(n):iy(n,!0):(Be(e!=="linear"||n.dataExtent),iy(n))}return r.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},r.prototype.getNormalizer=function(){return q(this._normalizeData,this)},r.listVisualTypes=function(){return At(r.visualHandlers)},r.isValidType=function(t){return r.visualHandlers.hasOwnProperty(t)},r.eachVisual=function(t,e,a){lt(t)?A(t,e,a):e.call(a,t)},r.mapVisual=function(t,e,a){var n,i=H(t)?[]:lt(t)?{}:(n=!0,null);return r.eachVisual(t,function(o,s){var l=e.call(a,o,s);n?i=l:i[s]=l}),i},r.retrieveVisuals=function(t){var e={},a;return t&&Nf(r.visualHandlers,function(n,i){t.hasOwnProperty(i)&&(e[i]=t[i],a=!0)}),a?e:null},r.prepareVisualTypes=function(t){if(H(t))t=t.slice();else if(K7(t)){var e=[];Nf(t,function(a,n){e.push(n)}),t=e}else return[];return t.sort(function(a,n){return n==="color"&&a!=="color"&&a.indexOf("color")===0?1:-1}),t},r.dependsOn=function(t,e){return e==="color"?!!(t&&t.indexOf(e)===0):t===e},r.findPieceIndex=function(t,e,a){for(var n,i=1/0,o=0,s=e.length;o=0;i--)a[i]==null&&(delete e[t[i]],t.pop())}function iy(r,t){var e=r.visual,a=[];lt(e)?Nf(e,function(i){a.push(i)}):e!=null&&a.push(e);var n={color:1,symbol:1};!t&&a.length===1&&!n.hasOwnProperty(r.type)&&(a[1]=a[0]),Xk(r,a)}function uh(r){return{applyVisual:function(t,e,a){var n=this.mapValueToVisual(t);a("color",r(e("color"),n))},_normalizedToVisual:z0([0,1])}}function uA(r){var t=this.option.visual;return t[Math.round(Et(r,[0,1],[0,t.length-1],!0))]||{}}function hu(r){return function(t,e,a){a(r,this.mapValueToVisual(t))}}function Eu(r){var t=this.option.visual;return t[this.option.loop&&r!==op?r%t.length:r]}function $i(){return this.option.visual[0]}function z0(r){return{linear:function(t){return Et(t,r,this.option.visual,!0)},category:Eu,piecewise:function(t,e){var a=G0.call(this,e);return a==null&&(a=Et(t,r,this.option.visual,!0)),a},fixed:$i}}function G0(r){var t=this.option,e=t.pieceList;if(t.hasSpecialVisual){var a=be.findPieceIndex(r,e),n=e[a];if(n&&n.visual)return n.visual[this.type]}}function Xk(r,t){return r.visual=t,r.type==="color"&&(r.parsedVisual=W(t,function(e){var a=Xe(e);return a||[0,0,0,1]})),t}var Q7={linear:function(r){return Et(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var t=this.option.pieceList,e=be.findPieceIndex(r,t,!0);if(e!=null)return Et(e,[0,t.length-1],[0,1],!0)},category:function(r){var t=this.option.categories?this.option.categoryMap[r]:r;return t??op},fixed:te};function fh(r,t,e){return r?t<=e:t=e.length||d===e[d.depth]){var y=iX(n,l,d,g,p,a);$k(d,y,e,a)}})}}}function rX(r,t,e){var a=G({},t),n=e.designatedVisualItemStyle;return A(["color","colorAlpha","colorSaturation"],function(i){n[i]=t[i];var o=r.get(i);n[i]=null,o!=null&&(a[i]=o)}),a}function fA(r){var t=oy(r,"color");if(t){var e=oy(r,"colorAlpha"),a=oy(r,"colorSaturation");return a&&(t=ln(t,null,null,a)),e&&(t=af(t,e)),t}}function aX(r,t){return t!=null?ln(t,null,null,r):null}function oy(r,t){var e=r[t];if(e!=null&&e!=="none")return e}function nX(r,t,e,a,n,i){if(!(!i||!i.length)){var o=sy(t,"color")||n.color!=null&&n.color!=="none"&&(sy(t,"colorAlpha")||sy(t,"colorSaturation"));if(o){var s=t.get("visualMin"),l=t.get("visualMax"),u=e.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var f=t.get("colorMappingBy"),v={type:o.name,dataExtent:u,visual:o.range};v.type==="color"&&(f==="index"||f==="id")?(v.mappingMethod="category",v.loop=!0):v.mappingMethod="linear";var h=new be(v);return Zk(h).drColorMappingBy=f,h}}}function sy(r,t){var e=r.get(t);return H(e)&&e.length?{name:t,range:e}:null}function iX(r,t,e,a,n,i){var o=G({},t);if(n){var s=n.type,l=s==="color"&&Zk(n).drColorMappingBy,u=l==="index"?a:l==="id"?i.mapIdToIndex(e.getId()):e.getValue(r.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}function oX(r){r.registerSeriesModel(C7),r.registerChartView(Z7),r.registerVisual(eX),r.registerLayout(N7),T7(r)}function ms(r){return"_EC_"+r}var sX=(function(){function r(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(t,e){t=t==null?""+e:""+t;var a=this._nodesMap;if(!a[ms(t)]){var n=new qi(t,e);return n.hostGraph=this,this.nodes.push(n),a[ms(t)]=n,n}},r.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},r.prototype.getNodeById=function(t){return this._nodesMap[ms(t)]},r.prototype.addEdge=function(t,e,a){var n=this._nodesMap,i=this._edgesMap;if(It(t)&&(t=this.nodes[t]),It(e)&&(e=this.nodes[e]),t instanceof qi||(t=n[ms(t)]),e instanceof qi||(e=n[ms(e)]),!(!t||!e)){var o=t.id+"-"+e.id,s=new qk(t,e,a);return s.hostGraph=this,this._directed&&(t.outEdges.push(s),e.inEdges.push(s)),t.edges.push(s),t!==e&&e.edges.push(s),this.edges.push(s),i[o]=s,s}},r.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},r.prototype.getEdge=function(t,e){t instanceof qi&&(t=t.id),e instanceof qi&&(e=e.id);var a=this._edgesMap;return this._directed?a[t+"-"+e]:a[t+"-"+e]||a[e+"-"+t]},r.prototype.eachNode=function(t,e){for(var a=this.nodes,n=a.length,i=0;i=0&&t.call(e,a[i],i)},r.prototype.eachEdge=function(t,e){for(var a=this.edges,n=a.length,i=0;i=0&&a[i].node1.dataIndex>=0&&a[i].node2.dataIndex>=0&&t.call(e,a[i],i)},r.prototype.breadthFirstTraverse=function(t,e,a,n){if(e instanceof qi||(e=this._nodesMap[ms(e)]),!!e){for(var i=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var i=0,o=n.length;i=0&&!t.hasKey(p)&&(t.set(p,!0),o.push(c.node1))}for(l=0;l=0&&!t.hasKey(_)&&(t.set(_,!0),s.push(m.node2))}}}return{edge:t.keys(),node:e.keys()}},r})(),qk=(function(){function r(t,e,a){this.dataIndex=-1,this.node1=t,this.node2=e,this.dataIndex=a??-1}return r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,a=e.edgeData.getItemModel(this.dataIndex);return a.getModel(t)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var t=K(),e=K();t.set(this.dataIndex,!0);for(var a=[this.node1],n=[this.node2],i=0;i=0&&!t.hasKey(v)&&(t.set(v,!0),a.push(f.node1))}for(i=0;i=0&&!t.hasKey(d)&&(t.set(d,!0),n.push(p.node2))}return{edge:t.keys(),node:e.keys()}},r})();function Kk(r,t){return{getValue:function(e){var a=this[r][t];return a.getStore().get(a.getDimensionIndex(e||"value"),this.dataIndex)},setVisual:function(e,a){this.dataIndex>=0&&this[r][t].setItemVisual(this.dataIndex,e,a)},getVisual:function(e){return this[r][t].getItemVisual(this.dataIndex,e)},setLayout:function(e,a){this.dataIndex>=0&&this[r][t].setItemLayout(this.dataIndex,e,a)},getLayout:function(){return this[r][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][t].getRawIndex(this.dataIndex)}}}ue(qi,Kk("hostGraph","data"));ue(qk,Kk("hostGraph","edgeData"));function DS(r,t,e,a,n){for(var i=new sX(a),o=0;o "+h)),u++)}var c=e.get("coordinateSystem"),p;if(c==="cartesian2d"||c==="polar"||c==="matrix")p=Wa(r,e);else{var d=Il.get(c),g=d?d.dimensions||[]:[];pt(g,"value")<0&&g.concat(["value"]);var y=El(r,{coordDimensions:g,encodeDefine:e.getEncode()}).dimensions;p=new Ze(y,e),p.initData(r)}var m=new Ze(["value"],e);return m.initData(l,s),n&&n(p,m),kk({mainData:p,struct:i,structAttr:"graph",datas:{node:p,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var F0="-->",_d=function(r){return r.get("autoCurveness")||null},jk=function(r,t){var e=_d(r),a=20,n=[];if(It(e))a=e;else if(H(e)){r.__curvenessList=e;return}t>a&&(a=t);var i=a%2?a+2:a+3;n=[];for(var o=0;o "),value:o.value,noValue:o.value==null})}var v=CP({series:this,dataIndex:e,multipleSeries:a});return v},t.prototype._updateCategoriesData=function(){var e=W(this.option.categories||[],function(n){return n.value!=null?n:G({value:0},n)}),a=new Ze(["value"],this);a.initData(e),this._categoriesData=a,this._categoriesModels=a.mapArray(function(n){return a.getItemModel(n)})},t.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.prototype.__ownRoamView=function(){var e=this.coordinateSystem;return _k(e)&&e},t.type="series."+ar,t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.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:B.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:B.color.primary}}},t})(Gt);function vh(r){return r instanceof Array||(r=[r,r]),r}var cX=ye(ar,pX);function pX(r){r.eachSeriesByType(ar,function(t){var e=t.getGraph(),a=t.getEdgeData(),n=vh(t.get("edgeSymbol")),i=vh(t.get("edgeSymbolSize"));a.setVisual("fromSymbol",n&&n[0]),a.setVisual("toSymbol",n&&n[1]),a.setVisual("fromSymbolSize",i&&i[0]),a.setVisual("toSymbolSize",i&&i[1]),a.setVisual("style",t.getModel("lineStyle").getLineStyle()),a.each(function(o){var s=a.getItemModel(o),l=e.getEdgeByIndex(o),u=vh(s.getShallow("symbol",!0)),f=vh(s.getShallow("symbolSize",!0)),v=s.getModel("lineStyle").getLineStyle(),h=a.ensureUniqueItemVisual(o,"style");switch(G(h,v),h.stroke){case"source":{var c=l.node1.getVisual("style");h.stroke=c&&c.fill;break}case"target":{var c=l.node2.getVisual("style");h.stroke=c&&c.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),f[0]&&l.setVisual("fromSymbolSize",f[0]),f[1]&&l.setVisual("toSymbolSize",f[1])})})}function Qk(r){var t=r.coordinateSystem;if(!(t&&t.type!=="view")){var e=r.getGraph();e.eachNode(function(a){var n=a.getModel();a.setLayout([+n.get("x"),+n.get("y")])}),LS(e,r)}}function LS(r,t){r.eachEdge(function(e,a){var n=fr(e.getModel().get(["lineStyle","curveness"]),-IS(e,t,a,!0),0),i=ba(e.node1.getLayout()),o=ba(e.node2.getLayout()),s=[i,o];+n&&s.push([(i[0]+o[0])/2-(i[1]-o[1])*n,(i[1]+o[1])/2-(o[0]-i[0])*n]),e.setLayout(s)})}var dX=ye(ar,gX);function gX(r,t){r.eachSeriesByType(ar,function(e){var a=e.get("layout"),n=e.coordinateSystem;if(n&&n.type!=="view"){var i=e.getData(),o=[];A(n.dimensions,function(h){o=o.concat(i.mapDimensionsAll(h))});for(var s=0;s0&&(x[0]=-x[0],x[1]=-x[1]);var w=S[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var C=-Math.atan2(S[1],S[0]);v[0].8?"left":h[0]<-.8?"right":"center",d=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*y+f[0],i.y=-h[1]*m+f[1],p=h[0]>.8?"right":h[0]<-.8?"left":"center",d=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=y*w+f[0],i.y=f[1]+T,p=S[0]<0?"right":"left",i.originX=-y*w,i.originY=-T;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=b[0],i.y=b[1]+T,p="center",i.originY=-T;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*w+v[0],i.y=v[1]+T,p=S[0]>=0?"right":"left",i.originX=y*w,i.originY=-T;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||p})}},t})(it),ES=(function(){function r(t){this.group=new it,this._LineCtor=t||RS}return r.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var a=this,n=a.group,i=a._lineData;a._lineData=t,i||n.removeAll();var o=gA(t);t.diff(i).add(function(s){e._doAdd(t,s,o)}).update(function(s,l){e._doUpdate(i,t,l,s,o)}).remove(function(s){n.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,a){e.updateLayout(t,a)},this)},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=gA(t),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,a){this._progressiveEls=[];function n(l){!l.isGroup&&!AX(l)&&(l.incremental=a,l.ensureState("emphasis").hoverLayer=Cl)}for(var i=t.start;i0}function gA(r){var t=r.hostModel,e=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:ge(t)}}function yA(r){return isNaN(r[0])||isNaN(r[1])}function hy(r){return r&&!yA(r[0])&&!yA(r[1])}var cy=[],py=[],dy=[],Ss=Me,gy=Zn,mA=Math.abs;function _A(r,t,e){for(var a=r[0],n=r[1],i=r[2],o=1/0,s,l=e*e,u=.1,f=.1;f<=.9;f+=.1){cy[0]=Ss(a[0],n[0],i[0],f),cy[1]=Ss(a[1],n[1],i[1],f);var v=mA(gy(cy,t)-l);v=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function yy(r,t){var e=[],a=ef,n=[[],[],[]],i=[[],[]],o=[];t/=2,r.eachEdge(function(s,l){var u=s.getLayout(),f=s.getVisual("fromSymbol"),v=s.getVisual("toSymbol");u.__original||(u.__original=[ba(u[0]),ba(u[1])],u[2]&&u.__original.push(ba(u[2])));var h=u.__original;if(u[2]!=null){if(Re(n[0],h[0]),Re(n[1],h[2]),Re(n[2],h[1]),f&&f!=="none"){var c=Ou(s.node1),p=_A(n,h[0],c*t);a(n[0][0],n[1][0],n[2][0],p,e),n[0][0]=e[3],n[1][0]=e[4],a(n[0][1],n[1][1],n[2][1],p,e),n[0][1]=e[3],n[1][1]=e[4]}if(v&&v!=="none"){var c=Ou(s.node2),p=_A(n,h[1],c*t);a(n[0][0],n[1][0],n[2][0],p,e),n[1][0]=e[1],n[2][0]=e[2],a(n[0][1],n[1][1],n[2][1],p,e),n[1][1]=e[1],n[2][1]=e[2]}Re(u[0],n[0]),Re(u[1],n[2]),Re(u[2],n[1])}else{if(Re(i[0],h[0]),Re(i[1],h[1]),Gn(o,i[1],i[0]),Ho(o,o),f&&f!=="none"){var c=Ou(s.node1);nc(i[0],i[0],o,c*t)}if(v&&v!=="none"){var c=Ou(s.node2);nc(i[1],i[1],o,-c*t)}Re(u[0],i[0]),Re(u[1],i[1])}})}var aO=mt();function MX(r){if(r)return aO(r).bridge}function SA(r,t){r&&(aO(r).bridge=t)}var DX=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=ar,e}return t.prototype.init=function(e,a){var n=new sv,i=new ES,o=this.group,s=new it;this._controller=new es(a.getZr()),s.add(n.group),s.add(i.group),o.add(s),this._symbolDraw=n,this._lineDraw=i,this._mainGroup=s,this._firstRender=!0},t.prototype.render=function(e,a,n){var i=this,o=rp(e),s=!1;this._model=e,this._api=n,this._active=!0;var l=this._mainGroup,u=this._getThumbnailInfo();u&&u.bridge.reset(n);var f=this._symbolDraw,v=this._lineDraw;o&&oi(l,Va,o,this._firstRender?null:e),yy(e.getGraph(),ku(e));var h=e.getData();f.updateData(h);var c=e.getEdgeData();v.updateData(c),this._updateNodeAndLinkScale(),o&&yd(e,n,this._controller,function(S,x,b){return e.coordinateSystem.containPoint([x,b])},null),clearTimeout(this._layoutTimeout);var p=e.forceLayout,d=e.get(["force","layoutAnimation"]);p&&(s=!0,this._startForceLayoutIteration(p,n,d));var g=e.get("layout");h.graph.eachNode(function(S){var x=S.dataIndex,b=S.getGraphicEl(),w=S.getModel();if(b){b.off("drag").off("dragend");var C=w.get("draggable");C&&b.on("drag",function(M){switch(g){case"force":p.warmUp(),!i._layouting&&i._startForceLayoutIteration(p,n,d),p.setFixed(x),h.setItemLayout(x,[b.x,b.y]);break;case"circular":h.setItemLayout(x,[b.x,b.y]),S.setLayout({fixed:!0},!0),PS(e,"symbolSize",S,[M.offsetX,M.offsetY]),i.updateLayout(e);break;case"none":default:h.setItemLayout(x,[b.x,b.y]),LS(e.getGraph(),e),i.updateLayout(e);break}}).on("dragend",function(){p&&p.setUnfixed(x)}),b.setDraggable(C,!!w.get("cursor"));var T=w.get(["emphasis","focus"]);T==="adjacency"&&(ft(b).focus=S.getAdjacentDataIndices())}}),h.graph.eachEdge(function(S){var x=S.getGraphicEl(),b=S.getModel().get(["emphasis","focus"]);x&&b==="adjacency"&&(ft(x).focus={edge:[S.dataIndex],node:[S.node1.dataIndex,S.node2.dataIndex]})});var y=e.get("layout")==="circular"&&e.get(["circular","rotateLabel"]),m=h.getLayout("cx"),_=h.getLayout("cy");h.graph.eachNode(function(S){tO(S,y,m,_)}),this._firstRender=!1,s||this._renderThumbnail(e,n,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose()},t.prototype._startForceLayoutIteration=function(e,a,n){var i=this,o=!1;(function s(){e.step(function(l){i.updateLayout(i._model),(l||!o)&&(o=!0,i._renderThumbnail(i._model,a,i._symbolDraw,i._lineDraw)),(i._layouting=!l)&&(n?i._layoutTimeout=setTimeout(s,16):s())})})()},t.prototype.__updateOnOwnRoam=function(e,a,n){var i=rp(a);!this._active||!i||(oi(this._mainGroup,Va,i,null),Mk(e)&&(this._updateNodeAndLinkScale(),yy(a.getGraph(),ku(a)),this._lineDraw.updateLayout(),n.updateLabelLayout()),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,a=e.getData(),n=ku(e);a.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},t.prototype.updateLayout=function(e){this._active&&(yy(e.getGraph(),ku(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var e=this._model,a=e.coordinateSystem;if(a.type==="view"){var n=MX(e);if(n)return{bridge:n,coordSys:a}}},t.prototype._updateThumbnailWindow=function(){var e=this._getThumbnailInfo();e&&e.bridge.updateWindow(tp(null,e.coordSys),this._api)},t.prototype._renderThumbnail=function(e,a,n,i){var o=this._getThumbnailInfo();if(o){var s=new it,l=n.group.children(),u=i.group.children(),f=new it,v=new it;s.add(v),s.add(f);for(var h=0;h "),value:i.value,noValue:i.value==null})}return he("nameValue",{name:i.name,value:i.value,noValue:i.value==null})},t.prototype.getDataParams=function(e,a){var n=r.prototype.getDataParams.call(this,e,a);if(a==="node"){var i=this.getData(),o=this.getGraph().getNodeByIndex(e);if(n.name==null&&(n.name=i.getName(e)),n.value==null){var s=o.getLayout().value;n.value=s}}return n},t.type="series."+Vf,t.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},t})(Gt),xA=(function(r){N(t,r);function t(e,a,n){var i=r.call(this)||this;ft(i).dataType="node",i.z2=2;var o=new Dt;return i.setTextContent(o),i.updateData(e,a,n,!0),i}return t.prototype.updateData=function(e,a,n,i){var o=this,s=e.graph.getNodeByIndex(a),l=e.hostModel,u=s.getModel(),f=u.getModel("emphasis"),v=e.getItemLayout(a),h=G(xa(u.getModel("itemStyle"),v,!0),v),c=this;if(isNaN(h.startAngle)){c.setShape(h);return}i?c.setShape(h):Rt(c,{shape:h},l,a);var p=G(xa(u.getModel("itemStyle"),v,!0),v);o.setShape(p),o.useStyle(e.getItemVisual(a,"style")),de(o,u),this._updateLabel(l,u,s),e.setItemGraphicEl(a,c),de(c,u,"itemStyle");var d=f.get("focus");jt(this,d==="adjacency"?s.getAdjacentDataIndices():d,f.get("blurScope"),f.get("disabled"))},t.prototype._updateLabel=function(e,a,n){var i=this.getTextContent(),o=n.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),f=a.getModel("label");i.ignore=!f.get("show");var v=ge(a),h=n.getVisual("style");we(i,v,{labelFetcher:{getFormattedLabel:function(m,_,S,x,b,w){return e.getFormattedLabel(m,_,"node",x,fr(b,v.normal&&v.normal.get("formatter"),a.get("name")),w)}},labelDataIndex:n.dataIndex,defaultText:n.dataIndex+"",inheritColor:h.fill,defaultOpacity:h.opacity,defaultOutsidePosition:"startArc"});var c=f.get("position")||"outside",p=f.get("distance")||0,d;c==="outside"?d=o.r+p:d=(o.r+o.r0)/2,this.textConfig={inside:c!=="outside"};var g=c!=="outside"?f.get("align")||"center":l>0?"left":"right",y=c!=="outside"?f.get("verticalAlign")||"middle":u>0?"top":"bottom";i.attr({x:l*d+o.cx,y:u*d+o.cy,rotation:0,style:{align:g,verticalAlign:y}})},t})(Ve),OX=(function(r){N(t,r);function t(e,a,n,i){var o=r.call(this)||this;return ft(o).dataType="edge",o.updateData(e,a,n,i,!0),o}return t.prototype.buildPath=function(e,a){e.moveTo(a.s1[0],a.s1[1]);var n=.7,i=a.clockwise;e.arc(a.cx,a.cy,a.r,a.sStartAngle,a.sEndAngle,!i),e.bezierCurveTo((a.cx-a.s2[0])*n+a.s2[0],(a.cy-a.s2[1])*n+a.s2[1],(a.cx-a.t1[0])*n+a.t1[0],(a.cy-a.t1[1])*n+a.t1[1],a.t1[0],a.t1[1]),e.arc(a.cx,a.cy,a.r,a.tStartAngle,a.tEndAngle,!i),e.bezierCurveTo((a.cx-a.t2[0])*n+a.t2[0],(a.cy-a.t2[1])*n+a.t2[1],(a.cx-a.s1[0])*n+a.s1[0],(a.cy-a.s1[1])*n+a.s1[1],a.s1[0],a.s1[1]),e.closePath()},t.prototype.updateData=function(e,a,n,i,o){var s=e.hostModel,l=a.graph.getEdgeByIndex(n),u=l.getLayout(),f=l.node1.getModel(),v=a.getItemModel(l.dataIndex),h=v.getModel("lineStyle"),c=v.getModel("emphasis"),p=c.get("focus"),d=G(xa(f.getModel("itemStyle"),u,!0),u),g=this;if(isNaN(d.sStartAngle)||isNaN(d.tStartAngle)){g.setShape(d);return}o?(g.setShape(d),bA(g,l,e,h)):(Fr(g),bA(g,l,e,h),Rt(g,{shape:d},s,n)),jt(this,p==="adjacency"?l.getAdjacentDataIndices():p,c.get("blurScope"),c.get("disabled")),de(g,v,"lineStyle"),a.setItemGraphicEl(l.dataIndex,g)},t})(Ct);function bA(r,t,e,a){var n=t.node1,i=t.node2,o=r.style;r.setStyle(a.getLineStyle());var s=a.get("color");switch(s){case"source":o.fill=e.getItemVisual(n.dataIndex,"style").fill,o.decal=n.getVisual("style").decal;break;case"target":o.fill=e.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"gradient":var l=e.getItemVisual(n.dataIndex,"style").fill,u=e.getItemVisual(i.dataIndex,"style").fill;if(Z(l)&&Z(u)){var f=r.shape,v=(f.s1[0]+f.s2[0])/2,h=(f.s1[1]+f.s2[1])/2,c=(f.t1[0]+f.t2[0])/2,p=(f.t1[1]+f.t2[1])/2;o.fill=new Zo(v,h,c,p,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var NX=Math.PI/180,BX=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=Vf,e}return t.prototype.init=function(e,a){},t.prototype.render=function(e,a,n){var i=e.getData(),o=this._data,s=this.group,l=-e.get("startAngle")*NX;if(i.diff(o).add(function(f){var v=i.getItemLayout(f);if(v){var h=new xA(i,f,l);ft(h).dataIndex=f,s.add(h)}}).update(function(f,v){var h=o.getItemGraphicEl(v),c=i.getItemLayout(f);if(!c){h&&un(h,e,v);return}h?h.updateData(i,f,l):h=new xA(i,f,l),s.add(h)}).remove(function(f){var v=o.getItemGraphicEl(f);v&&un(v,e,f)}).execute(),!o){var u=e.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=$(u[0],n.getWidth()),this.group.originY=$(u[1],n.getHeight()),$t(this.group,{scaleX:1,scaleY:1},e)}this._data=i,this.renderEdges(e,l)},t.prototype.renderEdges=function(e,a){var n=e.getData(),i=e.getEdgeData(),o=this._edgeData,s=this.group;i.diff(o).add(function(l){var u=new OX(n,i,l,a);ft(u).dataIndex=l,s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(n,i,l,a),s.add(f)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&un(u,e,l)}).execute(),this._edgeData=i},t.prototype.dispose=function(){},t.type=Vf,t})(zt),my=Math.PI/180,VX=ye(Vf,zX);function zX(r,t){r.eachSeriesByType(Vf,function(e){GX(e,t)})}function GX(r,t){var e=r.getData(),a=e.graph,n=r.getEdgeData(),i=n.count();if(i){var o=U2(r,t),s=o.cx,l=o.cy,u=o.r,f=o.r0,v=Math.max((r.get("padAngle")||0)*my,0),h=Math.max((r.get("minAngle")||0)*my,0),c=-r.get("startAngle")*my,p=c+Math.PI*2,d=r.get("clockwise"),g=d?1:-1,y=[c,p];Wp(y,!d);var m=y[0],_=y[1],S=_-m,x=e.getSum("value")===0&&n.getSum("value")===0,b=[],w=0;a.eachEdge(function(k){var V=x?1:k.getValue("value");x&&(V>0||h)&&(w+=2);var z=k.node1.dataIndex,F=k.node2.dataIndex;b[z]=(b[z]||0)+V,b[F]=(b[F]||0)+V});var C=0;if(a.eachNode(function(k){var V=k.getValue("value");isNaN(V)||(b[k.dataIndex]=Math.max(V,b[k.dataIndex]||0)),!x&&(b[k.dataIndex]>0||h)&&w++,C+=b[k.dataIndex]||0}),!(w===0||C===0)){v*w>=Math.abs(S)&&(v=Math.max(0,(Math.abs(S)-h*w)/w)),(v+h)*w>=Math.abs(S)&&(h=(Math.abs(S)-v*w)/w);var T=(S-v*w*g)/C,M=0,D=0,L=0;a.eachNode(function(k){var V=b[k.dataIndex]||0,z=T*(C?V:1)*g;Math.abs(z)D){var P=M/D;a.eachNode(function(k){var V=k.getLayout().angle;Math.abs(V)>=h?k.setLayout({angle:V*P,ratio:P},!0):k.setLayout({angle:h,ratio:h===0?1:V/h},!0)})}else a.eachNode(function(k){if(!I){var V=k.getLayout().angle,z=Math.min(V/L,1),F=z*M;V-Fh&&h>0){var z=I?1:Math.min(V/L,1),F=V-h,U=Math.min(F,Math.min(R,M*z));R-=U,k.setLayout({angle:V-U,ratio:(V-U)/V},!0)}else h>0&&k.setLayout({angle:h,ratio:V===0?1:h/V},!0)}});var E=m,O=[];a.eachNode(function(k){var V=Math.max(k.getLayout().angle,h);k.setLayout({cx:s,cy:l,r0:f,r:u,startAngle:E,endAngle:E+V*g,clockwise:d},!0),O[k.dataIndex]=E,E+=(V+v)*g}),a.eachEdge(function(k){var V=x?1:k.getValue("value"),z=T*(C?V:1)*g,F=k.node1.dataIndex,U=O[F]||0,X=Math.abs((k.node1.getLayout().ratio||1)*z),Y=U+X*g,Q=[s+f*Math.cos(U),l+f*Math.sin(U)],gt=[s+f*Math.cos(Y),l+f*Math.sin(Y)],kt=k.node2.dataIndex,vt=O[kt]||0,tt=Math.abs((k.node2.getLayout().ratio||1)*z),dt=vt+tt*g,et=[s+f*Math.cos(vt),l+f*Math.sin(vt)],ht=[s+f*Math.cos(dt),l+f*Math.sin(dt)];k.setLayout({s1:Q,s2:gt,sStartAngle:U,sEndAngle:Y,t1:et,t2:ht,tStartAngle:vt,tEndAngle:dt,cx:s,cy:l,r:f,value:V,clockwise:d}),O[F]=Y,O[kt]=dt})}}}function FX(r){r.registerChartView(BX),r.registerSeriesModel(kX),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,VX),r.registerProcessor(fv("chord"))}var HX=(function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r})(),WX=(function(r){N(t,r);function t(e){var a=r.call(this,e)||this;return a.type="pointer",a}return t.prototype.getDefaultShape=function(){return new HX},t.prototype.buildPath=function(e,a){var n=Math.cos,i=Math.sin,o=a.r,s=a.width,l=a.angle,u=a.x-n(l)*s*(s>=o/3?1:2),f=a.y-i(l)*s*(s>=o/3?1:2);l=a.angle-Math.PI/2,e.moveTo(u,f),e.lineTo(a.x+n(l)*s,a.y+i(l)*s),e.lineTo(a.x+n(a.angle)*o,a.y+i(a.angle)*o),e.lineTo(a.x-n(l)*s,a.y-i(l)*s),e.lineTo(u,f)},t})(Ct);function UX(r,t){var e=r.get("center"),a=t.getWidth(),n=t.getHeight(),i=Math.min(a,n),o=$(e[0],t.getWidth()),s=$(e[1],t.getHeight()),l=$(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function hh(r,t){var e=r==null?"":r+"";return t&&(Z(t)?e=t.replace("{value}",e):at(t)&&(e=t(r))),e}var YX=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){this.group.removeAll();var i=e.get(["axisLine","lineStyle","color"]),o=UX(e,n);this._renderMain(e,a,n,i,o),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,a,n,i,o){var s=this.group,l=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,f=-e.get("endAngle")/180*Math.PI,v=e.getModel("axisLine"),h=v.get("roundCap"),c=h?jc:Ve,p=v.get("show"),d=v.getModel("lineStyle"),g=d.get("width"),y=[u,f];Wp(y,!l),u=y[0],f=y[1];for(var m=f-u,_=u,S=[],x=0;p&&x=T&&(M===0?0:i[M-1][0])Math.PI/2&&(Y+=Math.PI)):X==="tangential"?Y=-C-Math.PI/2:It(X)&&(Y=X*Math.PI/180),Y===0?v.add(new Dt({style:Wt(_,{text:V,x:F,y:U,verticalAlign:R<-.8?"top":R>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:z}),silent:!0})):v.add(new Dt({style:Wt(_,{text:V,x:F,y:U,verticalAlign:"middle",align:"center"},{inheritColor:z}),silent:!0,originX:F,originY:U,rotation:Y}))}if(m.get("show")&&E!==S){var O=m.get("distance");O=O?O+f:f;for(var Q=0;Q<=x;Q++){P=Math.cos(C),R=Math.sin(C);var gt=new oe({shape:{x1:P*(p-O)+h,y1:R*(p-O)+c,x2:P*(p-w-O)+h,y2:R*(p-w-O)+c},silent:!0,style:L});L.stroke==="auto"&>.setStyle({stroke:i((E+Q/x)/S)}),v.add(gt),C+=M}C-=M}else C+=T}},t.prototype._renderPointer=function(e,a,n,i,o,s,l,u,f){var v=this.group,h=this._data,c=this._progressEls,p=[],d=e.get(["pointer","show"]),g=e.getModel("progress"),y=g.get("show"),m=e.getData(),_=m.mapDimension("value"),S=+e.get("min"),x=+e.get("max"),b=[S,x],w=[s,l];function C(M,D){var L=m.getItemModel(M),I=L.getModel("pointer"),P=$(I.get("width"),o.r),R=$(I.get("length"),o.r),E=e.get(["pointer","icon"]),O=I.get("offsetCenter"),k=$(O[0],o.r),V=$(O[1],o.r),z=I.get("keepAspect"),F;return E?F=le(E,k-P/2,V-R,P,R,null,z):F=new WX({shape:{angle:-Math.PI/2,width:P,r:R,x:k,y:V}}),F.rotation=-(D+Math.PI/2),F.x=o.cx,F.y=o.cy,F}function T(M,D){var L=g.get("roundCap"),I=L?jc:Ve,P=g.get("overlap"),R=P?g.get("width"):f/m.count(),E=P?o.r-R:o.r-(M+1)*R,O=P?o.r:o.r-M*R,k=new I({shape:{startAngle:s,endAngle:D,cx:o.cx,cy:o.cy,clockwise:u,r0:E,r:O}});return P&&(k.z2=Et(m.get(_,M),[S,x],[100,0],!0)),k}(y||d)&&(m.diff(h).add(function(M){var D=m.get(_,M);if(d){var L=C(M,s);$t(L,{rotation:-((isNaN(+D)?w[0]:Et(D,b,w,!0))+Math.PI/2)},e),v.add(L),m.setItemGraphicEl(M,L)}if(y){var I=T(M,s),P=g.get("clip");$t(I,{shape:{endAngle:Et(D,b,w,P)}},e),v.add(I),Vm(e.seriesIndex,m.dataType,M,I),p[M]=I}}).update(function(M,D){var L=m.get(_,M);if(d){var I=h.getItemGraphicEl(D),P=I?I.rotation:s,R=C(M,P);R.rotation=P,Rt(R,{rotation:-((isNaN(+L)?w[0]:Et(L,b,w,!0))+Math.PI/2)},e),v.add(R),m.setItemGraphicEl(M,R)}if(y){var E=c[D],O=E?E.shape.endAngle:s,k=T(M,O),V=g.get("clip");Rt(k,{shape:{endAngle:Et(L,b,w,V)}},e),v.add(k),Vm(e.seriesIndex,m.dataType,M,k),p[M]=k}}).execute(),m.each(function(M){var D=m.getItemModel(M),L=D.getModel("emphasis"),I=L.get("focus"),P=L.get("blurScope"),R=L.get("disabled"),E=i(Et(m.get(_,M),b,[0,1],!0));if(d){var O=m.getItemGraphicEl(M),k=m.getItemVisual(M,"style"),V=k.fill;if(O instanceof Te){var z=O.style;O.useStyle(G({image:z.image,x:z.x,y:z.y,width:z.width,height:z.height},k))}else O.useStyle(k),O.type!=="pointer"&&O.setColor(V);O.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),O.style.fill==="auto"&&O.setStyle("fill",E),O.z2EmphasisLift=0,de(O,D),jt(O,I,P,R)}if(y){var F=p[M];F.useStyle(m.getItemVisual(M,"style")),F.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),F.style.fill==="auto"&&F.setStyle("fill",E),F.z2EmphasisLift=0,de(F,D),jt(F,I,P,R)}}),this._progressEls=p)},t.prototype._renderAnchor=function(e,a){var n=e.getModel("anchor"),i=n.get("show");if(i){var o=n.get("size"),s=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),f=le(s,a.cx-o/2+$(l[0],a.r),a.cy-o/2+$(l[1],a.r),o,o,null,u);f.z2=n.get("showAbove")?1:0,f.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(f)}},t.prototype._renderTitleAndDetail=function(e,a,n,i,o){var s=this,l=e.getData(),u=l.mapDimension("value"),f=+e.get("min"),v=+e.get("max"),h=new it,c=[],p=[],d=e.isAnimationEnabled(),g=e.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){c[y]=new Dt({silent:!0}),p[y]=new Dt({silent:!0})}).update(function(y,m){c[y]=s._titleEls[m],p[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),_=l.get(u,y),S=new it,x=i(Et(_,[f,v],[0,1],!0)),b=m.getModel("title");if(b.get("show")){var w=b.get("offsetCenter"),C=o.cx+$(w[0],o.r),T=o.cy+$(w[1],o.r),M=c[y];M.attr({z2:g?0:2,style:Wt(b,{x:C,y:T,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:x})}),S.add(M)}var D=m.getModel("detail");if(D.get("show")){var L=D.get("offsetCenter"),I=o.cx+$(L[0],o.r),P=o.cy+$(L[1],o.r),R=$(D.get("width"),o.r),E=$(D.get("height"),o.r),O=e.get(["progress","show"])?l.getItemVisual(y,"style").fill:x,M=p[y],k=D.get("formatter");M.attr({z2:g?0:2,style:Wt(D,{x:I,y:P,text:hh(_,k),width:isNaN(R)?null:R,height:isNaN(E)?null:E,align:"center",verticalAlign:"middle"},{inheritColor:O})}),x2(M,{normal:D},_,function(z){return hh(z,k)}),d&&b2(M,y,l,e,{getFormattedLabel:function(z,F,U,X,Y,Q){return hh(Q?Q.interpolatedValue:_,k)}}),S.add(M)}h.add(S)}),this.group.add(h),this._titleEls=c,this._detailEls=p},t.type="gauge",t})(zt),XX=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="itemStyle",e}return t.prototype.getInitialData=function(e,a){return Vl(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,B.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:B.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:B.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:B.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:B.color.neutral00,borderWidth:0,borderColor:B.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:B.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:B.color.transparent,borderWidth:0,borderColor:B.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:B.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t})(Gt);function ZX(r){r.registerChartView(YX),r.registerSeriesModel(XX)}var vl="funnel",$X=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new zl(q(this.getData,this),q(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.getInitialData=function(e,a){return Vl(this,{coordDimensions:["value"],encodeDefaulter:St(x1,this)})},t.prototype._defaultLabelLine=function(e){So(e,"labelLine",["show"]);var a=e.labelLine,n=e.emphasis.labelLine;a.show=a.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(e){var a=this.getData(),n=r.prototype.getDataParams.call(this,e),i=a.mapDimension("value"),o=a.getSum(i);return n.percent=o?+(a.get(i,e)/o*100).toFixed(2):0,n.$vars.push("percent"),n},t.type="series."+vl,t.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:B.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:B.color.primary}}},t})(Gt),qX=["itemStyle","opacity"],KX=(function(r){N(t,r);function t(e,a){var n=r.call(this)||this,i=n,o=new Le,s=new Dt;return i.setTextContent(s),n.setTextGuideLine(o),n.updateData(e,a,!0),n}return t.prototype.updateData=function(e,a,n){var i=this,o=e.hostModel,s=e.getItemModel(a),l=e.getItemLayout(a),u=s.getModel("emphasis"),f=s.get(qX);f=f??1,n||Fr(i),i.useStyle(e.getItemVisual(a,"style")),i.style.lineJoin="round",n?(i.setShape({points:l.points}),i.style.opacity=0,$t(i,{style:{opacity:f}},o,a)):Rt(i,{style:{opacity:f},shape:{points:l.points}},o,a),de(i,s),this._updateLabel(e,a),jt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,a){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),s=e.hostModel,l=e.getItemModel(a),u=e.getItemLayout(a),f=u.label,v=e.getItemVisual(a,"style"),h=v.fill;we(o,ge(l),{labelFetcher:e.hostModel,labelDataIndex:a,defaultOpacity:v.opacity,defaultText:e.getName(a)},{normal:{align:f.textAlign,verticalAlign:f.verticalAlign}});var c=l.getModel("label"),p=c.get("color"),d=p==="inherit"?h:null;n.setTextConfig({local:!0,inside:!!f.inside,insideStroke:d,outsideFill:d});var g=f.linePoints;i.setShape({points:g}),n.textGuideLineConfig={anchor:g?new ut(g[0][0],g[0][1]):null},Rt(o,{style:{x:f.x,y:f.y}},s,a),o.attr({rotation:f.rotation,originX:f.x,originY:f.y,z2:10}),Q1(n,tS(l),{stroke:h})},t})(ze),jX=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=vl,e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new KX(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(i,l),s.add(f),i.setItemGraphicEl(l,f)}).remove(function(l){var u=o.getItemGraphicEl(l);un(u,e,l)}).execute(),this._data=i},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type=vl,t})(zt);function JX(r,t){for(var e=r.mapDimension("value"),a=r.mapArray(e,function(l){return l}),n=[],i=t==="ascending",o=0,s=r.count();o-1&&(o="left"),e&&pt(["left","right"],o)>-1&&(o="bottom")),o==="left"?(d=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,y=d-_,h=y-5,v="right"):o==="right"?(d=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,y=d+_,h=y+5,v="left"):o==="top"?(d=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=g-_,c=m-5,v="center"):o==="bottom"?(d=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=g+_,c=m+5,v="center"):o==="rightTop"?(d=e?u[3][0]:u[1][0],g=e?u[3][1]:u[1][1],e?(m=g-_,c=m-5,v="center"):(y=d+_,h=y+5,v="top")):o==="rightBottom"?(d=u[2][0],g=u[2][1],e?(m=g+_,c=m+5,v="center"):(y=d+_,h=y+5,v="bottom")):o==="leftTop"?(d=u[0][0],g=e?u[0][1]:u[1][1],e?(m=g-_,c=m-5,v="center"):(y=d-_,h=y-5,v="right")):o==="leftBottom"?(d=e?u[1][0]:u[3][0],g=e?u[1][1]:u[2][1],e?(m=g+_,c=m+5,v="center"):(y=d-_,h=y-5,v="right")):(d=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,e?(m=g+_,c=m+5,v="center"):(y=d+_,h=y+5,v="left")),e?(y=d,h=y):(m=g,c=m),p=[[d,g],[y,m]]}l.label={linePoints:p,x:h,y:c,verticalAlign:"middle",textAlign:v,inside:f}})}var t9=ye(vl,e9);function e9(r,t){r.eachSeriesByType(vl,function(e){var a=e.getData(),n=a.mapDimension("value"),i=e.get("sort"),o=me(e,t),s=qt(e.getBoxLayoutParams(),o.refContainer),l=nO(e),u=s.width,f=s.height,v=JX(a,i),h=s.x,c=s.y,p=l?[$(e.get("minSize"),f),$(e.get("maxSize"),f)]:[$(e.get("minSize"),u),$(e.get("maxSize"),u)],d=a.getDataExtent(n),g=e.get("min"),y=e.get("max");g==null&&(g=Math.min(d[0],0)),y==null&&(y=d[1]);var m=e.get("funnelAlign"),_=e.get("gap"),S=l?u:f,x=(S-_*(a.count()-1))/a.count(),b=function(R,E){if(l){var O=a.get(n,R)||0,k=Et(O,[g,y],p,!0),V=void 0;switch(m){case"top":V=c;break;case"center":V=c+(f-k)/2;break;case"bottom":V=c+(f-k);break}return[[E,V],[E,V+k]]}var z=a.get(n,R)||0,F=Et(z,[g,y],p,!0),U;switch(m){case"left":U=h;break;case"center":U=h+(u-F)/2;break;case"right":U=h+u-F;break}return[[U,E],[U+F,E]]};i==="ascending"&&(x=-x,_=-_,l?h+=u:c+=f,v=v.reverse());for(var w=0;wd9)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);n.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!Sy(this,"mousemove"))){var t=this._model,e=t.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),a=e.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:e.axisExpandWindow,animation:a==="jump"?null:{duration:0}})}}};function Sy(r,t){var e=r._model;return e.get("axisExpandable")&&e.get("axisExpandTriggerOn")===t}var sp="parallel",U0=sp,m9=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var a=this.option;e&&yt(a,e,!0),this._initDimensions()},t.prototype.contains=function(e,a){var n=e.get("parallelIndex");return n!=null&&a.getComponent("parallel",n)===this},t.prototype.setAxisExpand=function(e){A(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(a){e.hasOwnProperty(a)&&(this.option[a]=e[a])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],a=this.parallelAxisIndex=[],n=Nt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);A(n,function(i){e.push("dim"+i.get("dim")),a.push(i.componentIndex)})},t.type=U0,t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t})(wt),_9=(function(r){N(t,r);function t(e,a,n,i,o){var s=r.call(this,e,a,n)||this;return s.type=i||"value",s.axisIndex=o,s}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t})(Ur);function si(r,t,e,a,n,i){r=r||0;var o=Ui(e[1],-e[0]);if(n!=null&&(n=xs(n,[0,o])),i!=null&&(i=Math.max(i,n??0)),a==="all"){var s=Math.abs(Ui(t[1],-t[0]));s=xs(s,[0,o]),n=i=xs(s,[n,i]),a=0}t[0]=xs(t[0],e),t[1]=xs(t[1],e);var l=xy(t,a);t[a]+=r;var u=n||0,f=e.slice();l.sign<0?f[0]=Ui(f[0],u):f[1]=Ui(f[1],-u),t[a]=xs(t[a],f);var v;return v=xy(t,a),n!=null&&(v.sign!==l.sign||v.spani&&(t[1-a]=Ui(t[a],v.sign*i)),t}function xy(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function xs(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var S9=(function(){function r(t,e,a){this.type=sp,this._axesMap=K(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,a)}return r.prototype._init=function(t,e,a){var n=t.dimensions,i=t.parallelAxisIndex;A(n,function(o,s){var l=i[s],u=e.getComponent("parallelAxis",l),f=av(u),v=this._axesMap.set(o,new _9(o,kl(u,f,!1),[0,0],f,l));v.onBand=iv(v.scale,u),v.inverse=u.get("inverse"),u.axis=v,v.model=u,v.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(t,e){A(this.dimensions,function(a){var n=this._axesMap.get(a);Po(n,sl),ll(n)},this)},r.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),a=e.axisBase,n=e.layoutBase,i=e.pixelDimIndex,o=t[1-i],s=t[i];return o>=a&&o<=a+e.axisLength&&s>=n&&s<=n+e.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype.resize=function(t,e){var a=me(t,e).refContainer;this._rect=qt(t.getBoxLayoutParams(),a),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var t=this._model,e=this._rect,a=["x","y"],n=["width","height"],i=t.get("layout"),o=i==="horizontal"?0:1,s=e[n[o]],l=[0,s],u=this.dimensions.length,f=ch(t.get("axisExpandWidth"),l),v=ch(t.get("axisExpandCount")||0,[0,u]),h=t.get("axisExpandable")&&u>3&&u>v&&v>1&&f>0&&s>0,c=t.get("axisExpandWindow"),p;if(c)p=ch(c[1]-c[0],l),c[1]=c[0]+p;else{p=ch(f*(v-1),l);var d=t.get("axisExpandCenter")||Vr(u/2);c=[f*d-p/2],c[1]=c[0]+p}var g=(s-p)/(u-v);g<3&&(g=0);var y=[Vr(Pt(c[0]/f,1))+1,Uo(Pt(c[1]/f,1))-1],m=g/f*c[0];return{layout:i,pixelDimIndex:o,layoutBase:e[a[o]],layoutLength:s,axisBase:e[a[1-o]],axisLength:e[n[1-o]],axisExpandable:h,axisExpandWidth:f,axisCollapseWidth:g,axisExpandWindow:c,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,a=this.dimensions,n=this._makeLayoutInfo(),i=n.layout;e.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),A(a,function(o,s){var l=(n.axisExpandable?b9:x9)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},f={horizontal:gc/2,vertical:0},v=[u[i].x+t.x,u[i].y+t.y],h=f[i],c=Kt();Cn(c,c,h),ta(c,c,v),this._axesLayout[o]={position:v,rotation:h,transform:c,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(t){return this._axesMap.get(t)},r.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},r.prototype.eachActiveState=function(t,e,a,n){a==null&&(a=0),n==null&&(n=t.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];A(o,function(g){s.push(t.mapDimension(g)),l.push(i.get(g).model)});for(var u=this.hasAxisBrushed(),f=a;fi*(1-v[0])?(u="jump",l=s-i*(1-v[2])):(l=s-i*v[1])>=0&&(l=s-i*(1-v[1]))<=0&&(l=0),l*=e.axisExpandWidth/f,l?si(l,n,o,"all"):u="none";else{var c=n[1]-n[0],p=o[1]*s/c;n=[xt(0,p-c/2)],n[1]=Vt(o[1],n[0]+c),n[0]=n[1]-c}return{axisExpandWindow:n,behavior:u}},r})();function ch(r,t){return Vt(xt(r,t[0]),t[1])}function x9(r,t){var e=t.layoutLength/(t.axisCount-1);return{position:e*r,axisNameAvailableWidth:e,axisLabelShow:!0}}function b9(r,t){var e=t.layoutLength,a=t.axisExpandWidth,n=t.axisCount,i=t.axisCollapseWidth,o=t.winInnerIndices,s,l=i,u=!1,f;return r=0;n--)De(a[n])},t.prototype.getActiveState=function(e){var a=this.activeIntervals;if(!a.length)return"normal";if(e==null||isNaN(+e))return"inactive";if(a.length===1){var n=a[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var i=0,o=a.length;iM9}function vO(r){var t=r.length-1;return t<0&&(t=0),[r[0],r[t]]}function hO(r,t,e,a){var n=new it;return n.add(new bt({name:"main",style:VS(e),silent:!0,draggable:!0,cursor:"move",drift:St(MA,r,t,n,["n","s","w","e"]),ondragend:St(Go,t,{isEnd:!0})})),A(a,function(i){n.add(new bt({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:St(MA,r,t,n,i),ondragend:St(Go,t,{isEnd:!0})}))}),n}function cO(r,t,e,a){var n=a.brushStyle.lineWidth||0,i=hl(n,D9),o=e[0][0],s=e[1][0],l=o-n/2,u=s-n/2,f=e[0][1],v=e[1][1],h=f-i+n/2,c=v-i+n/2,p=f-o,d=v-s,g=p+n,y=d+n;$a(r,t,"main",o,s,p,d),a.transformable&&($a(r,t,"w",l,u,i,y),$a(r,t,"e",h,u,i,y),$a(r,t,"n",l,u,g,i),$a(r,t,"s",l,c,g,i),$a(r,t,"nw",l,u,i,i),$a(r,t,"ne",h,u,i,i),$a(r,t,"sw",l,c,i,i),$a(r,t,"se",h,c,i,i))}function Z0(r,t){var e=t.__brushOption,a=e.transformable,n=t.childAt(0);n.useStyle(VS(e)),n.attr({silent:!a,cursor:a?"move":"default"}),A([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=t.childOfName(i.join("")),s=i.length===1?$0(r,i[0]):k9(r,i);o&&o.attr({silent:!a,invisible:!a,cursor:a?L9[s]+"-resize":null})})}function $a(r,t,e,a,n,i,o){var s=t.childOfName(e);s&&s.setShape(N9(zS(r,t,[[a,n],[a+i,n+o]])))}function VS(r){return st({strokeNoScale:!0},r.brushStyle)}function pO(r,t,e,a){var n=[zf(r,e),zf(t,a)],i=[hl(r,e),hl(t,a)];return[[n[0],i[0]],[n[1],i[1]]]}function E9(r){return vo(r.group)}function $0(r,t){var e={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},n=Zp(e[t],E9(r));return a[n]}function k9(r,t){var e=[$0(r,t[0]),$0(r,t[1])];return(e[0]==="e"||e[0]==="w")&&e.reverse(),e.join("")}function MA(r,t,e,a,n,i){var o=e.__brushOption,s=r.toRectRange(o.range),l=dO(t,n,i);A(a,function(u){var f=I9[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange(pO(s[0][0],s[1][0],s[0][1],s[1][1])),OS(t,e),Go(t,{isEnd:!1})}function O9(r,t,e,a){var n=t.__brushOption.range,i=dO(r,e,a);A(n,function(o){o[0]+=i[0],o[1]+=i[1]}),OS(r,t),Go(r,{isEnd:!1})}function dO(r,t,e){var a=r.group,n=a.transformCoordToLocal(t,e),i=a.transformCoordToLocal(0,0);return[n[0]-i[0],n[1]-i[1]]}function zS(r,t,e){var a=fO(r,t);return a&&a!==zo?a.clipPath(e,r._transform):rt(e)}function N9(r){var t=zf(r[0][0],r[1][0]),e=zf(r[0][1],r[1][1]),a=hl(r[0][0],r[1][0]),n=hl(r[0][1],r[1][1]);return{x:t,y:e,width:a-t,height:n-e}}function B9(r,t,e){if(!(!r._brushType||z9(r,t.offsetX,t.offsetY))){var a=r._zr,n=r._covers,i=BS(r,t,e);if(!r._dragging)for(var o=0;oa.getWidth()||e<0||e>a.getHeight()}var Sd={lineX:LA(0),lineY:LA(1),rect:{createCover:function(r,t){function e(a){return a}return hO({toRectRange:e,fromRectRange:e},r,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var t=vO(r);return pO(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(r,t,e,a){cO(r,t,e,a)},updateCommon:Z0,contain:K0},polygon:{createCover:function(r,t){var e=new it;return e.add(new Le({name:"main",style:VS(t),silent:!0})),e},getCreatingRange:function(r){return r},endCreating:function(r,t){t.remove(t.childAt(0)),t.add(new ze({name:"main",draggable:!0,drift:St(O9,r,t),ondragend:St(Go,r,{isEnd:!0})}))},updateCoverShape:function(r,t,e,a){t.childAt(0).setShape({points:zS(r,t,e)})},updateCommon:Z0,contain:K0}};function LA(r){return{createCover:function(t,e){return hO({toRectRange:function(a){var n=[a,[0,100]];return r&&n.reverse(),n},fromRectRange:function(a){return a[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){var e=vO(t),a=zf(e[0][r],e[1][r]),n=hl(e[0][r],e[1][r]);return[a,n]},updateCoverShape:function(t,e,a,n){var i,o=fO(t,e);if(o!==zo&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=t._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[a,i];r&&l.reverse(),cO(t,e,l,n)},updateCommon:Z0,contain:K0}}function yO(r){return r=GS(r),function(t){return e1(t,r)}}function mO(r,t){return r=GS(r),function(e){var a=t??e,n=a?r.width:r.height,i=a?r.x:r.y;return[i,i+(n||0)]}}function _O(r,t,e){var a=GS(r);return function(n,i){return a.contain(i[0],i[1])&&!hk(n,t,e)}}function GS(r){return ot.create(r)}var G9=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){r.prototype.init.apply(this,arguments),(this._brushController=new kS(a.getZr())).on("brush",q(this._onBrush,this))},t.prototype.render=function(e,a,n,i){if(!F9(e,a,i)){this.axisModel=e,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new it,this.group.add(this._axisGroup),!!e.get("show")){var s=W9(e,a),l=s.coordinateSystem,u=e.getAreaSelectStyle(),f=u.width,v=e.axis.dim,h=l.getAxisLayout(v),c=G({strokeContainThreshold:f},h),p=new tr(e,n,c);p.build(),this._axisGroup.add(p.group),this._refreshBrushController(c,u,e,s,f,n),Jf(o,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,a,n,i,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],f=Math.min(30,Math.abs(u)*.1),v=ot.create({x:l[0],y:-o/2,width:u,height:o});v.x-=f,v.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:yO(v),isTargetByCursor:_O(v,s,i),getLinearBrushOtherExtent:mO(v,0)}]).enableBrush({brushType:"lineX",brushStyle:a,removeOnClick:!0}).updateCovers(H9(n))},t.prototype._onBrush=function(e){var a=e.areas,n=this.axisModel,i=n.axis,o=W(a,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t})(Yt);function F9(r,t,e){return e&&e.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:e})[0]===r}function H9(r){var t=r.axis;return W(r.activeIntervals,function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}function W9(r,t){return t.getComponent("parallel",r.get("parallelIndex"))}var U9={type:"axisAreaSelect",event:"axisAreaSelected"};function Y9(r){r.registerAction(U9,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(a){a.axis.model.setActiveIntervals(t.intervals)})}),r.registerAction("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(a){a.setAxisExpand(t)})})}var X9={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function SO(r){r.registerComponentView(g9),r.registerComponentModel(m9),r.registerCoordinateSystem("parallel",T9),r.registerPreprocessor(h9),r.registerComponentModel(Y0),r.registerComponentView(G9),fl(r,"parallel",Y0,X9),Y9(r)}function Z9(r){_t(SO),r.registerChartView(n9),r.registerSeriesModel(s9),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,v9)}var wn="sankey",$9=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){var n=e.edges||e.links||[],i=e.data||e.nodes||[],o=e.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new Tt(o[l],this,a));var u=DS(i,n,this,!0,f);return u.data;function f(v,h){v.wrapMethod("getItemModel",function(c,p){var d=c.parentModel,g=d.getData().getItemLayout(p);if(g){var y=g.depth,m=d.levelModels[y];m&&(c.parentModel=m)}return c}),h.wrapMethod("getItemModel",function(c,p){var d=c.parentModel,g=d.getGraph().getEdgeByIndex(p),y=g.node1.getLayout();if(y){var m=y.depth,_=d.levelModels[m];_&&(c.parentModel=_)}return c})}},t.prototype.setNodePosition=function(e,a){var n=this.option.data||this.option.nodes,i=n[e];i.localX=a[0],i.localY=a[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,a,n){function i(c){return isNaN(c)||c==null}if(n==="edge"){var o=this.getDataParams(e,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return he("nameValue",{name:u,value:l,noValue:i(l)})}else{var f=this.getGraph().getNodeByIndex(e),v=f.getLayout().value,h=this.getDataParams(e,n).data.name;return he("nameValue",{name:h!=null?h+"":null,value:v,noValue:i(v)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(e,a){var n=r.prototype.getDataParams.call(this,e,a);if(n.value==null&&a==="node"){var i=this.getGraph().getNodeByIndex(e),o=i.getLayout().value;n.value=o}return n},t.prototype.__ownRoamView=function(){return this.coordinateSystem},t.type="series."+wn,t.layoutMode="box",t.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:B.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:B.color.primary}},animationEasing:"linear",animationDuration:1e3},t})(Gt),q9=(function(){function r(){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}return r})(),K9=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new q9},t.prototype.buildPath=function(e,a){var n=a.extent;e.moveTo(a.x1,a.y1),e.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(e.lineTo(a.x2+n,a.y2),e.bezierCurveTo(a.cpx2+n,a.cpy2,a.cpx1+n,a.cpy1,a.x1+n,a.y1)):(e.lineTo(a.x2,a.y2+n),e.bezierCurveTo(a.cpx2,a.cpy2+n,a.cpx1,a.cpy1+n,a.x1,a.y1+n)),e.closePath()},t.prototype.highlight=function(){mn(this)},t.prototype.downplay=function(){_n(this)},t})(Ct),j9=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=wn,e._mainGroup=new it,e}return t.prototype.init=function(e,a){this._controller=new es(a.getZr()),this.group.add(this._mainGroup),this._firstRender=!0},t.prototype.render=function(e,a,n){var i=e.getGraph(),o=this._mainGroup,s=e.layoutInfo,l=s.width,u=s.height,f=e.getData(),v=e.getData("edge"),h=e.get("orient");o.removeAll(),o.x=s.x,o.y=s.y,this._updateViewCoordSys(e,n),yd(e,n,this._controller,Ck(o),null),i.eachEdge(function(c){var p=new K9,d=ft(p);d.dataIndex=c.dataIndex,d.seriesIndex=e.seriesIndex,d.dataType="edge";var g=c.getModel(),y=g.getModel("lineStyle"),m=y.get("curveness"),_=c.node1.getLayout(),S=c.node1.getModel(),x=S.get("localX"),b=S.get("localY"),w=c.node2.getLayout(),C=c.node2.getModel(),T=C.get("localX"),M=C.get("localY"),D=c.getLayout(),L,I,P,R,E,O,k,V;p.shape.extent=Math.max(1,D.dy),p.shape.orient=h,h==="vertical"?(L=(x!=null?x*l:_.x)+D.sy,I=(b!=null?b*u:_.y)+_.dy,P=(T!=null?T*l:w.x)+D.ty,R=M!=null?M*u:w.y,E=L,O=I*(1-m)+R*m,k=P,V=I*m+R*(1-m)):(L=(x!=null?x*l:_.x)+_.dx,I=(b!=null?b*u:_.y)+D.sy,P=T!=null?T*l:w.x,R=(M!=null?M*u:w.y)+D.ty,E=L*(1-m)+P*m,O=I,k=L*m+P*(1-m),V=R),p.setShape({x1:L,y1:I,x2:P,y2:R,cpx1:E,cpy1:O,cpx2:k,cpy2:V}),p.useStyle(y.getItemStyle()),PA(p.style,h,c);var z=""+g.get("value"),F=ge(g,"edgeLabel");we(p,F,{labelFetcher:{getFormattedLabel:function(Y,Q,gt,kt,vt,tt){return e.getFormattedLabel(Y,Q,"edge",kt,fr(vt,F.normal&&F.normal.get("formatter"),z),tt)}},labelDataIndex:c.dataIndex,defaultText:z}),p.setTextConfig({position:"inside"});var U=g.getModel("emphasis");de(p,g,"lineStyle",function(Y){var Q=Y.getItemStyle();return PA(Q,h,c),Q}),o.add(p),v.setItemGraphicEl(c.dataIndex,p);var X=U.get("focus");jt(p,X==="adjacency"?c.getAdjacentDataIndices():X==="trajectory"?c.getTrajectoryDataIndices():X,U.get("blurScope"),U.get("disabled"))}),i.eachNode(function(c){var p=c.getLayout(),d=c.getModel(),g=d.get("localX"),y=d.get("localY"),m=d.getModel("emphasis"),_=d.get(["itemStyle","borderRadius"])||0,S=new bt({shape:{x:g!=null?g*l:p.x,y:y!=null?y*u:p.y,width:p.dx,height:p.dy,r:_},style:d.getModel("itemStyle").getItemStyle(),z2:10});we(S,ge(d),{labelFetcher:{getFormattedLabel:function(b,w){return e.getFormattedLabel(b,w,"node")}},labelDataIndex:c.dataIndex,defaultText:c.id}),S.disableLabelAnimation=!0,S.setStyle("fill",c.getVisual("color")),S.setStyle("decal",c.getVisual("style").decal),de(S,d),o.add(S),f.setItemGraphicEl(c.dataIndex,S),ft(S).dataType="node";var x=m.get("focus");jt(S,x==="adjacency"?c.getAdjacentDataIndices():x==="trajectory"?c.getTrajectoryDataIndices():x,m.get("blurScope"),m.get("disabled"))}),f.eachItemGraphicEl(function(c,p){var d=f.getItemModel(p);d.get("draggable")&&(c.drift=function(g,y){this.shape.x+=g,this.shape.y+=y,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:f.getRawIndex(p),localX:this.shape.x/l,localY:this.shape.y/u})},c.draggable=!0,c.cursor="move")}),!this._data&&e.isAnimationEnabled()&&o.setClipPath(J9(o.getBoundingRect(),e,function(){o.removeClipPath()})),this._data=e.getData(),this._firstRender=!1},t.prototype.__updateOnOwnRoam=function(e,a,n){oi(this.group,Va,a.coordinateSystem,null)},t.prototype.dispose=function(){this._controller&&this._controller.dispose()},t.prototype._updateViewCoordSys=function(e,a){var n=e.layoutInfo,i=e.coordinateSystem=xS(e,a,n.x,n.y,n.width,n.height);oi(this.group,Va,i,this._firstRender?null:e)},t.type=wn,t})(zt);function PA(r,t,e){switch(r.fill){case"source":r.fill=e.node1.getVisual("color"),r.decal=e.node1.getVisual("style").decal;break;case"target":r.fill=e.node2.getVisual("color"),r.decal=e.node2.getVisual("style").decal;break;case"gradient":var a=e.node1.getVisual("color"),n=e.node2.getVisual("color");Z(a)&&Z(n)&&(r.fill=new Zo(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:a,offset:0},{color:n,offset:1}]))}}function J9(r,t,e){var a=new bt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return $t(a,{shape:{width:r.width+20}},t,e),a}var Q9=ye(wn,tZ);function tZ(r,t){r.eachSeriesByType(wn,function(e){var a=e.get("nodeWidth"),n=e.get("nodeGap"),i=me(e,t).refContainer,o=qt(e.getBoxLayoutParams(),i);e.layoutInfo=o;var s=o.width,l=o.height,u=e.getGraph(),f=u.nodes,v=u.edges;rZ(f);var h=Nt(f,function(g){return g.getLayout().value===0}),c=h.length!==0?0:e.get("layoutIterations"),p=e.get("orient"),d=e.get("nodeAlign");eZ(f,v,a,n,s,l,c,p,d)})}function eZ(r,t,e,a,n,i,o,s,l){aZ(r,t,e,n,i,s,l),sZ(r,t,i,n,a,o,s),gZ(r,s)}function rZ(r){A(r,function(t){var e=ei(t.outEdges,lp),a=ei(t.inEdges,lp),n=t.getValue()||0,i=Math.max(e,a,n);t.setLayout({value:i},!0)})}function aZ(r,t,e,a,n,i,o){for(var s=[],l=[],u=[],f=[],v=0,h=0;h=0;y&&g.depth>c&&(c=g.depth),d.setLayout({depth:y?g.depth:v},!0),i==="vertical"?d.setLayout({dy:e},!0):d.setLayout({dx:e},!0);for(var m=0;mv-1?c:v-1;o&&o!=="left"&&nZ(r,o,i,w);var C=i==="vertical"?(n-e)/w:(a-e)/w;oZ(r,C,i)}function xO(r){var t=r.hostGraph.data.getRawDataItem(r.dataIndex);return t.depth!=null&&t.depth>=0}function nZ(r,t,e,a){if(t==="right"){for(var n=[],i=r,o=0;i.length;){for(var s=0;s0;i--)l*=.99,fZ(s,l,o),by(s,n,e,a,o),dZ(s,l,o),by(s,n,e,a,o)}function lZ(r,t){var e=[],a=t==="vertical"?"y":"x",n=Rm(r,function(i){return i.getLayout()[a]});return De(n.keys),A(n.keys,function(i){e.push(n.buckets.get(i))}),e}function uZ(r,t,e,a,n,i){var o=1/0;A(r,function(s){var l=s.length,u=0;A(s,function(v){u+=v.getLayout().value});var f=i==="vertical"?(a-(l-1)*n)/u:(e-(l-1)*n)/u;f0&&(s=l.getLayout()[i]+u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[i]+l.getLayout()[h]+t;var p=n==="vertical"?a:e;if(u=f-t-p,u>0){s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),f=s;for(var c=v-2;c>=0;--c)l=o[c],u=l.getLayout()[i]+l.getLayout()[h]+t-f,u>0&&(s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[i]}})}function fZ(r,t,e){A(r.slice().reverse(),function(a){A(a,function(n){if(n.outEdges.length){var i=ei(n.outEdges,vZ,e)/ei(n.outEdges,lp);if(isNaN(i)){var o=n.outEdges.length;i=o?ei(n.outEdges,hZ,e)/o:0}if(e==="vertical"){var s=n.getLayout().x+(i-li(n,e))*t;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-li(n,e))*t;n.setLayout({y:l},!0)}}})})}function vZ(r,t){return li(r.node2,t)*r.getValue()}function hZ(r,t){return li(r.node2,t)}function cZ(r,t){return li(r.node1,t)*r.getValue()}function pZ(r,t){return li(r.node1,t)}function li(r,t){return t==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function lp(r){return r.getValue()}function ei(r,t,e){for(var a=0,n=r.length,i=-1;++io&&(o=l)}),A(a,function(s){var l=new be({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),f=s.getModel().get(["itemStyle","color"]);f!=null?(s.setVisual("color",f),s.setVisual("style",{fill:f})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}n.length&&A(n,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function _Z(r){r.registerChartView(j9),r.registerSeriesModel($9),r.registerLayout(Q9),r.registerVisual(yZ),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:Oa,subType:wn,query:t},function(a){a.setNodePosition(t.dataIndex,[t.localX,t.localY])})}),SS(r,Oa,wn)}var bO=(function(){function r(){}return r.prototype._hasEncodeRule=function(t){var e=this.getEncode();return e&&e.get(t)!=null},r.prototype.getInitialData=function(t,e){var a,n=e.getComponent("xAxis",this.get("xAxisIndex")),i=e.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),s=i.get("type"),l,u=t.layout;o==="category"?(u="horizontal",a=n.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"&&(u="vertical",a=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")),u||(u=s==="time"?"vertical":"horizontal"),this._layout=u;var f=["x","y"],v=u==="horizontal"?0:1,h=this._baseAxisDim=f[v],c=f[1-v],p=[n,i],d=p[v].get("type"),g=p[1-v].get("type"),y=t.data;if(y&&l){var m=[];A(y,function(x,b){var w;H(x)?(w=x.slice(),x.unshift(b)):H(x.value)?(w=G({},x),w.value=w.value.slice(),x.value.unshift(b)):w=x,m.push(w)}),t.data=m}var _=this.defaultValueDimensions,S=[{name:h,type:Bc(d),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:Bc(g),dimsDef:_.slice()}];return Vl(this,{coordDimensions:S,dimensionsCount:_.length+1,encodeDefaulter:St(j2,S,this)})},r.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},r.prototype.getWhiskerBoxesLayout=function(){return this._layout},r})();function up(r,t){for(var e=t.ends.length,a=0,n=0;nd){var S=[y,_];a.push(S)}}}return{boxData:e,outliers:a}}var PZ={type:"echarts:boxplot",transform:function(t){var e=t.upstream;if(e.sourceFormat!==Ie){var a="";Ot(a)}var n=LZ(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function RZ(r){r.registerSeriesModel(wO),r.registerChartView(SZ),r.registerLayout(CZ),r.registerTransform(PZ),IZ(r)}var ui="candlestick",CO=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],e}return t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(e,a,n){var i=a.getItemLayout(e);return i&&n.rect(i.brushRect)},t.type="series."+ui,t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t})(Gt);ue(CO,bO,!0);var EZ=["itemStyle","borderColor"],kZ=["itemStyle","borderColor0"],OZ=["itemStyle","borderColorDoji"],NZ=["itemStyle","color"],BZ=["itemStyle","color0"];function FS(r,t){return t.get(r>0?NZ:BZ)}function HS(r,t){return t.get(r===0?OZ:r>0?EZ:kZ)}var VZ={seriesType:ui,plan:jo(),performRawSeries:!0,reset:function(r,t){if(!t.isSeriesFiltered(r)){var e=r.pipelineContext.large;return!e&&{progress:function(a,n){for(var i;(i=a.next())!=null;){var o=n.getItemModel(i),s=n.getItemLayout(i).sign,l=o.getItemStyle();l.fill=FS(s,o),l.stroke=HS(s,o)||l.fill;var u=n.ensureUniqueItemVisual(i,"style");G(u,l)}}}}}},zZ=["color","borderColor"],GZ=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,a,n){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,a,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,a):this._incrementalRenderNormal(e,a)},t.prototype.eachRendered=function(e){hi(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var a=e.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},t.prototype._renderNormal=function(e){var a=e.getData(),n=this._data,i=this.group,o=a.getLayout("isSimpleBox"),s=e.get("clip",!0),l=e.coordinateSystem,u=l.getArea&&l.getArea(),f=s&&Ro(l,!1,e);this._data||i.removeAll();var v=EA(e);a.diff(n).add(function(h){if(a.hasValue(h)){var c=a.getItemLayout(h),p=s?up(u,c):Cf;if(p===Mf)return;var d=wy(c,h,v,!0);$t(d,{shape:{points:c.ends}},e,h),Bs(p===Af,d,f),Ty(d,a,h,o),i.add(d),a.setItemGraphicEl(h,d)}}).update(function(h,c){var p=n.getItemGraphicEl(c);if(!a.hasValue(h)){i.remove(p);return}var d=a.getItemLayout(h),g=s?up(u,d):Cf;if(g===Mf){i.remove(p);return}p?(Rt(p,{shape:{points:d.ends}},e,h),Fr(p)):p=wy(d,h,v),Ty(p,a,h,o),Bs(g===Af,p,f),i.add(p),a.setItemGraphicEl(h,p)}).remove(function(h){var c=n.getItemGraphicEl(h);c&&i.remove(c)}).execute(),this._data=a},t.prototype._renderLarge=function(e){this._clear(),kA(e,this.group);var a=e.get("clip",!0)?Ro(e.coordinateSystem,!1,e):null;Bs(!!a,this.group,a)},t.prototype._incrementalRenderNormal=function(e,a){for(var n=a.getData(),i=n.getLayout("isSimpleBox"),o=EA(a),s;(s=e.next())!=null;){var l=n.getItemLayout(s),u=wy(l,s,o);Ty(u,n,s,i),u.incremental=Ca(a),this.group.add(u),this._progressiveEls.push(u)}},t.prototype._incrementalRenderLarge=function(e,a){kA(a,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),Bs(!1,this.group,null),this._data=null},t.type=ui,t})(zt),FZ=(function(){function r(){}return r})(),HZ=(function(r){N(t,r);function t(e){var a=r.call(this,e)||this;return a.type="normalCandlestickBox",a}return t.prototype.getDefaultShape=function(){return new FZ},t.prototype.buildPath=function(e,a){var n=a.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))},t})(Ct);function wy(r,t,e,a){var n=r.ends;return new HZ({shape:{points:a?WZ(n,e,r):n},z2:100})}function Ty(r,t,e,a){var n=t.getItemModel(e);r.useStyle(t.getItemVisual(e,"style")),r.style.strokeNoScale=!0;var i=n.getShallow("cursor");i&&r.attr("cursor",i),r.__simpleBox=a,de(r,n);var o=t.getItemLayout(e).sign;A(r.states,function(l,u){var f=n.getModel(u),v=FS(o,f),h=HS(o,f)||v,c=l.style||(l.style={});v&&(c.fill=v),h&&(c.stroke=h)});var s=n.getModel("emphasis");jt(r,s.get("focus"),s.get("blurScope"),s.get("disabled"))}function WZ(r,t,e){return W(r,function(a){return a=a.slice(),a[t]=e.initBaseline,a})}function EA(r){return r.getWhiskerBoxesLayout()==="horizontal"?1:0}var UZ=(function(){function r(){}return r})(),Cy=(function(r){N(t,r);function t(e){var a=r.call(this,e)||this;return a.type="largeCandlestickBox",a}return t.prototype.getDefaultShape=function(){return new UZ},t.prototype.buildPath=function(e,a){for(var n=a.points,i=0;ix?D[i]:M[i],ends:P,brushRect:V(b,w,_)})}function O(F,U){var X=[];return X[n]=U,X[i]=F,isNaN(U)||isNaN(F)?[NaN,NaN]:t.dataToPoint(X)}function k(F,U,X){var Y=U.slice(),Q=U.slice();Y[n]=Hh(Y[n]+a/2,1,!1),Q[n]=Hh(Q[n]-a/2,1,!0),X?F.push(Y,Q):F.push(Q,Y)}function V(F,U,X){var Y=O(F,X),Q=O(U,X);return Y[n]-=a/2,Q[n]-=a/2,{x:Y[0],y:Y[1],width:i?a:Q[0]-Y[0],height:i?Q[1]-Y[1]:a}}function z(F){return F[n]=Hh(F[n],1),F}}function p(d,g){for(var y=Sa(d.count*4),m=0,_,S=[],x=[],b,w=g.getStore(),C=!!r.get(["itemStyle","borderColorDoji"]);(b=d.next())!=null;){var T=w.get(s,b),M=w.get(u,b),D=w.get(f,b),L=w.get(v,b),I=w.get(h,b);if(isNaN(T)||isNaN(L)||isNaN(I)){y[m++]=NaN,m+=3;continue}y[m++]=OA(w,b,M,D,f,C),S[n]=T,S[i]=L,_=t.dataToPoint(S,null,x),y[m++]=_?_[0]:NaN,y[m++]=_?_[1]:NaN,S[i]=I,_=t.dataToPoint(S,null,x),y[m++]=_?_[1]:NaN}g.setLayout("largePoints",y)}}};function OA(r,t,e,a,n,i){var o;return e>a?o=-1:e0?r.get(n,t-1)<=a?1:-1:1,o}function $Z(r,t){var e=r.getBaseAxis(),a=Ge(e,{fromStat:{key:po(ui)},min:1}).w,n=$(J(r.get("barMaxWidth"),a),a),i=$(J(r.get("barMinWidth"),1),a),o=r.get("barWidth");return o!=null?$(o,a):xt(Vt(a/2,n),i)}function qZ(r){XZ(r,function(){var t=po(ui);j1(r,{key:t,seriesType:ui,getMetrics:vS}),sd(t,vd(t))})}function KZ(r){r.registerChartView(GZ),r.registerSeriesModel(CO),r.registerPreprocessor(YZ),r.registerVisual(VZ),r.registerLayout(ZZ),qZ(r)}function NA(r,t){var e=t.rippleEffectColor||t.color;r.eachChild(function(a){a.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?e:null,fill:t.brushType==="fill"?e:null}})})}var jZ=(function(r){N(t,r);function t(e,a){var n=r.call(this)||this,i=new ov(e,a),o=new it;return n.add(i),n.add(o),n.updateData(e,a),n}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var a=e.symbolType,n=e.color,i=e.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(i)/f*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var h=void 0;at(v)?h=v(n):h=v,i.__t>0&&(h=-s*i.__t),this._animateSymbol(i,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},t.prototype._animateSymbol=function(e,a,n,i,o){if(a>0){e.__t=0;var s=this,l=e.animate("",i).when(o?a*2:a,{__t:o?2:1}).delay(n).during(function(){s._updateSymbolPosition(e)});i||l.done(function(){s.remove(e)}),l.start()}},t.prototype._getLineLength=function(e){return en(e.__p1,e.__cp1)+en(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,a){e.__p1=a[0],e.__p2=a[1],e.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},t.prototype.updateData=function(e,a,n){this.childAt(0).updateData(e,a,n),this._updateEffectSymbol(e,a)},t.prototype._updateSymbolPosition=function(e){var a=e.__p1,n=e.__p2,i=e.__cp1,o=e.__t<=1?e.__t:2-e.__t,s=[e.x,e.y],l=s.slice(),u=Me,f=ym;s[0]=u(a[0],i[0],n[0],o),s[1]=u(a[1],i[1],n[1],o);var v=e.__t<=1?f(a[0],i[0],n[0],o):f(n[0],i[0],a[0],1-o),h=e.__t<=1?f(a[1],i[1],n[1],o):f(n[1],i[1],a[1],1-o);e.rotation=-Math.atan2(h,v)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(e.__lastT!==void 0&&e.__lastT=0&&!(i[l]<=a);l--);l=Math.min(l,o-2)}else{for(l=s;la);l++);l=Math.min(l-1,o-2)}var f=(a-i[l])/(i[l+1]-i[l]),v=n[l],h=n[l+1];e.x=v[0]*(1-f)+f*h[0],e.y=v[1]*(1-f)+f*h[1];var c=e.__t<=1?h[0]-v[0]:v[0]-h[0],p=e.__t<=1?h[1]-v[1]:v[1]-h[1];e.rotation=-Math.atan2(p,c)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,e.ignore=!1}},t})(AO),r$=(function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r})(),a$=(function(r){N(t,r);function t(e){var a=r.call(this,e)||this;return a._off=0,a.hoverDataIdx=-1,a}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(e){e&&!e.contentRetained&&this.reset()},t.prototype.getDefaultStyle=function(){return{stroke:B.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new r$},t.prototype.buildPath=function(e,a){var n=a.segs,i=a.curveness,o;if(a.polyline)for(o=this._off;o0){e.moveTo(n[o++],n[o++]);for(var l=1;l0){var c=(u+v)/2-(f-h)*i,p=(f+h)/2-(v-u)*i;e.quadraticCurveTo(c,p,v,h)}else e.lineTo(v,h)}this.incremental&&(this._off=o,this.notClear=!0)},t.prototype.findDataIndex=function(e,a){var n=this.shape,i=n.segs,o=n.curveness,s=this.style.lineWidth;if(n.polyline)for(var l=0,u=0;u0)for(var v=i[u++],h=i[u++],c=1;c0){var g=(v+p)/2-(h-d)*o,y=(h+d)/2-(p-v)*o;if(kL(v,h,g,y,p,d,s,e,a))return l}else if(Vn(v,h,p,d,s,e,a))return l;l++}return-1},t.prototype.contain=function(e,a){var n=this.transformCoordToLocal(e,a),i=this.getBoundingRect();if(e=n[0],a=n[1],i.contain(e,a)){var o=this.hoverDataIdx=this.findDataIndex(e,a);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var a=this.shape,n=a.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+t.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),DO={seriesType:"lines",plan:jo(),reset:function(r){var t=r.coordinateSystem;if(t){var e=r.get("polyline"),a=r.pipelineContext.large;return{progress:function(n,i){var o=[];if(a){var s=void 0,l=n.end-n.start;if(e){for(var u=0,f=n.start;f0&&f&&u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)}),o.updateData(i);var v=e.get("clip",!0)&&Ro(e.coordinateSystem,!1,e);v?this.group.setClipPath(v):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,a,n){var i=e.getData(),o=this._updateLineDraw(i,e);o.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},t.prototype.incrementalRender=function(e,a,n){this._lineDraw.incrementalUpdate(e,a.getData(),Ca(a)),this._finished=e.end===a.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,a,n){var i=e.getData(),o=this._lineDraw;if(!this._finished||!o||!o.updateLayout)return{update:!0};var s=DO.reset(e,a,n);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),o.updateLayout(),this._clearLayer(n)},t.prototype._updateLineDraw=function(e,a){var n=this._lineDraw,i=this._showEffect(a),o=!!a.get("polyline"),s=a.pipelineContext,l=s.large;return(!n||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=l?new n$:new ES(o?i?e$:MO:i?AO:RS),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(n.group),n},t.prototype._showEffect=function(e){return!!e.get(["effect","show"])},t.prototype._clearLayer=function(e){var a=Zm(e);a&&this._lastZlevel!=null&&a.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},t.prototype.dispose=function(e,a){this.remove(e,a)},t.type="lines",t})(zt),o$=typeof Uint32Array>"u"?Array:Uint32Array,s$=typeof Float64Array>"u"?Array:Float64Array;function VA(r){var t=r.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(r.data=W(t,function(e){var a=[e[0].coord,e[1].coord],n={coords:a};return e[0].name&&(n.fromName=e[0].name),e[1].name&&(n.toName=e[1].name),Dp([n,e[0],e[1]])}))}var l$=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="lineStyle",e.visualDrawType="stroke",e}return t.prototype.init=function(e){e.data=e.data||[],VA(e);var a=this._processFlatCoordsArray(e.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(e.data=new Float32Array(a.count)),r.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(e){if(VA(e),e.data){var a=this._processFlatCoordsArray(e.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(e.data=new Float32Array(a.count))}r.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var a=this._processFlatCoordsArray(e.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=Ks(this._flatCoords,a.flatCoords),this._flatCoordsOffset=Ks(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),e.data=new Float32Array(a.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var a=this.getData().getItemModel(e),n=a.option instanceof Array?a.option:a.getShallow("coords");return n},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[e*2+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,a){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[e*2],i=this._flatCoordsOffset[e*2+1],o=0;o ")}return he("nameValue",{name:l,value:o,noValue:o==null||isNaN(o)})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?1e4:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?2e4:this.get("progressiveThreshold"))},t.prototype.getZLevelKey=function(){var e=this.getModel("effect"),a=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&a>0?a+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t})(Gt);function ph(r){return r instanceof Array||(r=[r,r]),r}var u$={seriesType:"lines",reset:function(r){var t=ph(r.get("symbol")),e=ph(r.get("symbolSize")),a=r.getData();a.setVisual("fromSymbol",t&&t[0]),a.setVisual("toSymbol",t&&t[1]),a.setVisual("fromSymbolSize",e&&e[0]),a.setVisual("toSymbolSize",e&&e[1]);function n(i,o){var s=i.getItemModel(o),l=ph(s.getShallow("symbol",!0)),u=ph(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?n:null}}};function f$(r){r.registerChartView(i$),r.registerSeriesModel(l$),r.registerLayout(DO),r.registerVisual(u$)}var v$=256,h$=(function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=xe.createCanvas();this.canvas=t}return r.prototype.update=function(t,e,a,n,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),f=this.pointSize+this.blurSize,v=this.canvas,h=v.getContext("2d"),c=t.length;v.width=e,v.height=a;for(var p=0;p0){var L=o(_)?l:u;_>0&&(_=_*M+C),x[b++]=L[D],x[b++]=L[D+1],x[b++]=L[D+2],x[b++]=L[D+3]*_*256}else b+=4}return h.putImageData(S,0,0),v},r.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=xe.createCanvas()),e=this.pointSize+this.blurSize,a=e*2;t.width=a,t.height=a;var n=t.getContext("2d");return n.clearRect(0,0,a,a),n.shadowOffsetX=a,n.shadowBlur=this.blurSize,n.shadowColor=B.color.neutral99,n.beginPath(),n.arc(-e,e,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),t},r.prototype._getGradient=function(t,e){for(var a=this._gradientPixels,n=a[e]||(a[e]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)t[e](s/255,!0,i),n[o++]=i[0],n[o++]=i[1],n[o++]=i[2],n[o++]=i[3];return n},r})();function c$(r,t,e){var a=r[1]-r[0];t=W(t,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var n=t.length,i=0;return function(o){var s;for(s=i;s=0;s--){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s=t[0]&&a<=t[1]}}var d$=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i;a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===e&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=e.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(e,n,0,e.getData().count()):zT(o)&&this._renderOnGeo(o,e,i,n)},t.prototype.incrementalPrepareRender=function(e,a,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,a,n,i){var o=a.coordinateSystem;o&&(zT(o)?this.render(a,n,i):(this._progressiveEls=[],this._renderOnGridLike(a,i,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){hi(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,a,n,i,o){var s=e.coordinateSystem,l=Eo(s,"cartesian2d"),u=Eo(s,"matrix"),f,v,h,c;if(l){var p=s.getAxis("x"),d=s.getAxis("y");f=Ge(p).w+.5,v=Ge(d).w+.5,h=p.scale.getExtent(),c=d.scale.getExtent()}for(var g=this.group,y=e.getData(),m=e.getModel(["emphasis","itemStyle"]).getItemStyle(),_=e.getModel(["blur","itemStyle"]).getItemStyle(),S=e.getModel(["select","itemStyle"]).getItemStyle(),x=e.get(["itemStyle","borderRadius"]),b=ge(e),w=e.getModel("emphasis"),C=w.get("focus"),T=w.get("blurScope"),M=w.get("disabled"),D=l||u?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],L=n;Lh[1]||Ec[1])continue;var O=s.dataToPoint([R,E]);I=new bt({shape:{x:O[0]-f/2,y:O[1]-v/2,width:f,height:v},style:P})}else if(u){var k=s.dataToLayout([y.get(D[0],L),y.get(D[1],L)]).rect;if(Oe(k.x))continue;I=new bt({z2:1,shape:k,style:P})}else{if(isNaN(y.get(D[1],L)))continue;var V=s.dataToLayout([y.get(D[0],L)]),k=V.contentRect||V.rect;if(Oe(k.x)||Oe(k.y))continue;I=new bt({z2:1,shape:k,style:P})}if(y.hasItemOption){var z=y.getItemModel(L),F=z.getModel("emphasis");m=F.getModel("itemStyle").getItemStyle(),_=z.getModel(["blur","itemStyle"]).getItemStyle(),S=z.getModel(["select","itemStyle"]).getItemStyle(),x=z.get(["itemStyle","borderRadius"]),C=F.get("focus"),T=F.get("blurScope"),M=F.get("disabled"),b=ge(z)}I.shape.r=x;var U=e.getRawValue(L),X="-";U&&U[2]!=null&&(X=U[2]+""),we(I,b,{labelFetcher:e,labelDataIndex:L,defaultOpacity:P.opacity,defaultText:X}),I.ensureState("emphasis").style=m,I.ensureState("blur").style=_,I.ensureState("select").style=S,jt(I,C,T,M),I.incremental=Ca(e,o),o&&(I.states.emphasis.hoverLayer=Cl),g.add(I),y.setItemGraphicEl(L,I),this._progressiveEls&&this._progressiveEls.push(I)}},t.prototype._renderOnGeo=function(e,a,n,i){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new h$;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var f=e.getViewRect().clone(),v=e.getRoamTransform();f.applyTransform(v);var h=Math.max(f.x,0),c=Math.max(f.y,0),p=Math.min(f.width+f.x,i.getWidth()),d=Math.min(f.height+f.y,i.getHeight()),g=p-h,y=d-c,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(m,function(w,C,T){var M=e.dataToPoint([w,C]);return M[0]-=h,M[1]-=c,M.push(T),M}),S=n.getExtent(),x=n.type==="visualMap.continuous"?p$(S,n.option.range):c$(S,n.getPieceList(),n.option.selected);u.update(_,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},x);var b=new Te({style:{width:g,height:y,x:h,y:c,image:u.canvas},silent:!0});this.group.add(b)},t.type="heatmap",t})(zt),g$=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){return Wa(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=Il.get(this.get("coordinateSystem"));if(e&&e.dimensions)return e.dimensions[0]==="lng"&&e.dimensions[1]==="lat"},t.type="series.heatmap",t.dependencies=["grid","geo","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:B.color.primary}}},t})(Gt);function y$(r){r.registerChartView(d$),r.registerSeriesModel(g$)}var m$=["itemStyle","borderWidth"],zA=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],My=new Ha,_$=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=Df,e}return t.prototype.render=function(e,a,n){var i=this.group,o=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis(),f=u.isHorizontal(),v=l.master.getRect(),h={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:l,coordSysExtent:[[v.x,v.x+v.width],[v.y,v.y+v.height]],isHorizontal:f,valueDim:zA[+f],categoryDim:zA[1-+f]};o.diff(s).add(function(p){if(o.hasValue(p)){var d=FA(o,p),g=GA(o,p,d,h),y=HA(o,h,g);o.setItemGraphicEl(p,y),i.add(y),UA(y,h,g)}}).update(function(p,d){var g=s.getItemGraphicEl(d);if(!o.hasValue(p)){i.remove(g);return}var y=FA(o,p),m=GA(o,p,y,h),_=kO(o,m);g&&_!==g.__pictorialShapeStr&&(i.remove(g),o.setItemGraphicEl(p,null),g=null),g?A$(g,h,m):g=HA(o,h,m,!0),o.setItemGraphicEl(p,g),g.__pictorialSymbolMeta=m,i.add(g),UA(g,h,m)}).remove(function(p){var d=s.getItemGraphicEl(p);d&&WA(s,p,d.__pictorialSymbolMeta.animationModel,d)}).execute();var c=e.get("clip",!0)?Ro(e.coordinateSystem,!1,e):null;return c?i.setClipPath(c):i.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(e,a){var n=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl(function(o){WA(i,ft(o).dataIndex,e,o)}):n.removeAll()},t.type=Df,t})(zt);function GA(r,t,e,a){var n=r.getItemLayout(t),i=e.get("symbolRepeat"),o=e.get("symbolClip"),s=e.get("symbolPosition")||"start",l=e.get("symbolRotate"),u=(l||0)*Math.PI/180||0,f=e.get("symbolPatternSize")||2,v=e.isAnimationEnabled(),h={dataIndex:t,layout:n,itemModel:e,symbolType:r.getItemVisual(t,"symbol")||"circle",style:r.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:e.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:u,animationModel:v?e:null,hoverScale:v&&e.get(["emphasis","scale"]),z2:e.getShallow("z",!0)||0};S$(e,i,n,a,h),x$(r,t,n,i,o,h.boundingLength,h.pxSign,f,a,h),b$(e,h.symbolScale,u,a,h);var c=h.symbolSize,p=Jo(e.get("symbolOffset"),c);return w$(e,c,n,i,o,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,a,h),h}function S$(r,t,e,a,n){var i=a.valueDim,o=r.get("symbolBoundingData"),s=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(e[i.wh]<=0),f;if(H(o)){var v=[Dy(s,o[0])-l,Dy(s,o[1])-l];v[1]=0?1:-1:f>0?1:-1}function Dy(r,t){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(t)))}function x$(r,t,e,a,n,i,o,s,l,u){var f=l.valueDim,v=l.categoryDim,h=Math.abs(e[v.wh]),c=r.getItemVisual(t,"symbolSize"),p;H(c)?p=c.slice():c==null?p=["100%","100%"]:p=[c,c],p[v.index]=$(p[v.index],h),p[f.index]=$(p[f.index],a?h:Math.abs(i)),u.symbolSize=p;var d=u.symbolScale=[p[0]/s,p[1]/s];d[f.index]*=(l.isHorizontal?-1:1)*o}function b$(r,t,e,a,n){var i=r.get(m$)||0;i&&(My.attr({scaleX:t[0],scaleY:t[1],rotation:e}),My.updateTransform(),i/=My.getLineScale(),i*=t[a.valueDim.index]),n.valueLineWidth=i||0}function w$(r,t,e,a,n,i,o,s,l,u,f,v){var h=f.categoryDim,c=f.valueDim,p=v.pxSign,d=Math.max(t[c.index]+s,0),g=d;if(a){var y=Math.abs(l),m=Ye(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var S=$(m,t[c.index]),x=Math.max(d+S*2,0),b=_?0:S*2,w=N_(a),C=w?a:YA((y+b)/x),T=y-C*d;S=T/2/(_?C:Math.max(C-1,1)),x=d+S*2,b=_?0:S*2,!w&&a!=="fixed"&&(C=u?YA((Math.abs(u)+b)/x):0),g=C*x-b,v.repeatTimes=C,v.symbolMargin=S}var M=p*(g/2),D=v.pathPosition=[];D[h.index]=e[h.wh]/2,D[c.index]=o==="start"?M:o==="end"?l-M:l/2,i&&(D[0]+=i[0],D[1]+=i[1]);var L=v.bundlePosition=[];L[h.index]=e[h.xy],L[c.index]=e[c.xy];var I=v.barRectShape=G({},e);I[c.wh]=p*Math.max(Math.abs(e[c.wh]),Math.abs(D[c.index]+M)),I[h.wh]=e[h.wh];var P=v.clipShape={};P[h.xy]=-e[h.xy],P[h.wh]=f.ecSize[h.wh],P[c.xy]=0,P[c.wh]=e[c.wh]}function IO(r){var t=r.symbolPatternSize,e=le(r.symbolType,-t/2,-t/2,t,t);return e.attr({culling:!0}),e.type!=="image"&&e.setStyle({strokeNoScale:!0}),e}function LO(r,t,e,a){var n=r.__pictorialBundle,i=e.symbolSize,o=e.valueLineWidth,s=e.pathPosition,l=t.valueDim,u=e.repeatTimes||0,f=0,v=i[t.valueDim.index]+o+e.symbolMargin*2;for(WS(r,function(d){d.__pictorialAnimationIndex=f,d.__pictorialRepeatTimes=u,f0:y<0)&&(m=u-1-d),g[l.index]=v*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation}}}function PO(r,t,e,a){var n=r.__pictorialBundle,i=r.__pictorialMainPath;i?qs(i,null,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation},e,a):(i=r.__pictorialMainPath=IO(e),n.add(i),qs(i,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:0,scaleY:0,rotation:e.rotation},{scaleX:e.symbolScale[0],scaleY:e.symbolScale[1]},e,a))}function RO(r,t,e){var a=G({},t.barRectShape),n=r.__pictorialBarRect;n?qs(n,null,{shape:a},t,e):(n=r.__pictorialBarRect=new bt({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,r.add(n))}function EO(r,t,e,a){if(e.symbolClip){var n=r.__pictorialClipPath,i=G({},e.clipShape),o=t.valueDim,s=e.animationModel,l=e.dataIndex;if(n)Rt(n,{shape:i},s,l);else{i[o.wh]=0,n=new bt({shape:i}),r.__pictorialBundle.setClipPath(n),r.__pictorialClipPath=n;var u={};u[o.wh]=e.clipShape[o.wh],$o[a?"updateProps":"initProps"](n,{shape:u},s,l)}}}function FA(r,t){var e=r.getItemModel(t);return e.getAnimationDelayParams=T$,e.isAnimationEnabled=C$,e}function T$(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function C$(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function HA(r,t,e,a){var n=new it,i=new it;return n.add(i),n.__pictorialBundle=i,i.x=e.bundlePosition[0],i.y=e.bundlePosition[1],e.symbolRepeat?LO(n,t,e):PO(n,t,e),RO(n,e,a),EO(n,t,e,a),n.__pictorialShapeStr=kO(r,e),n.__pictorialSymbolMeta=e,n}function A$(r,t,e){var a=e.animationModel,n=e.dataIndex,i=r.__pictorialBundle;Rt(i,{x:e.bundlePosition[0],y:e.bundlePosition[1]},a,n),e.symbolRepeat?LO(r,t,e,!0):PO(r,t,e,!0),RO(r,e,!0),EO(r,t,e,!0)}function WA(r,t,e,a){var n=a.__pictorialBarRect;n&&n.removeTextContent();var i=[];WS(a,function(o){i.push(o)}),a.__pictorialMainPath&&i.push(a.__pictorialMainPath),a.__pictorialClipPath&&(e=null),A(i,function(o){ii(o,{scaleX:0,scaleY:0},e,t,function(){a.parent&&a.parent.remove(a)})}),r.setItemGraphicEl(t,null)}function kO(r,t){return[r.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function WS(r,t,e){A(r.__pictorialBundle.children(),function(a){a!==r.__pictorialBarRect&&t.call(e,a)})}function qs(r,t,e,a,n,i){t&&r.attr(t),a.symbolClip&&!n?e&&r.attr(e):e&&$o[n?"updateProps":"initProps"](r,e,a.animationModel,a.dataIndex,i)}function UA(r,t,e){var a=e.dataIndex,n=e.itemModel,i=n.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=n.getModel(["blur","itemStyle"]).getItemStyle(),l=n.getModel(["select","itemStyle"]).getItemStyle(),u=n.getShallow("cursor"),f=i.get("focus"),v=i.get("blurScope"),h=i.get("scale");WS(r,function(d){if(d instanceof Te){var g=d.style;d.useStyle(G({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},e.style))}else d.useStyle(e.style);var y=d.ensureState("emphasis");y.style=o,h&&(y.scaleX=d.scaleX*1.1,y.scaleY=d.scaleY*1.1),d.ensureState("blur").style=s,d.ensureState("select").style=l,u&&(d.cursor=u),d.z2=e.z2});var c=t.valueDim.posDesc[+(e.boundingLength>0)],p=r.__pictorialBarRect;p.ignoreClip=!0,we(p,ge(n),{labelFetcher:t.seriesModel,labelDataIndex:a,defaultText:ul(t.seriesModel.getData(),a),inheritColor:e.style.fill,defaultOpacity:e.style.opacity,defaultOutsidePosition:c}),jt(r,f,v,i.get("disabled"))}function YA(r){var t=Math.round(r);return Math.abs(r-t)<1e-4?t:Math.ceil(r)}var M$=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e.defaultSymbol="roundRect",e}return t.prototype.getInitialData=function(e){return e.stack=null,r.prototype.getInitialData.apply(this,arguments)},t.type="series."+Df,t.dependencies=["grid"],t.defaultOption=ci(If.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:B.color.primary}}}),t})(If);function D$(r){r.registerChartView(_$),r.registerSeriesModel(M$),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,WE(Df)),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,UE(Df)),XE(r)}var Iy=2,cl="themeRiver",I$=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new zl(q(this.getData,this),q(this.getRawData,this))},t.prototype.fixData=function(e){var a=e.length,n={},i=Rm(e,function(h){return n.hasOwnProperty(h[0]+"")||(n[h[0]+""]=-1),h[2]}),o=[];i.buckets.each(function(h,c){o.push({name:c,dataList:h})});for(var s=o.length,l=0;li&&(i=s),a.push(s)}for(var u=0;ui&&(i=v)}return{y0:n,max:i}}function O$(r){r.registerChartView(L$),r.registerSeriesModel(I$),r.registerLayout(R$),r.registerProcessor(fv(cl))}var N$=2,B$=4,ZA=(function(r){N(t,r);function t(e,a,n,i){var o=r.call(this)||this;o.z2=N$,o.textConfig={inside:!0},ft(o).seriesIndex=a.seriesIndex;var s=new Dt({z2:B$,silent:e.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,e,a,n,i),o}return t.prototype.updateData=function(e,a,n,i,o){this.node=a,a.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var s=this;ft(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),f=a.getLayout(),v=G({},f);v.label=null;var h=a.getVisual("style");h.lineJoin="bevel";var c=a.getVisual("decal");c&&(h.decal=nl(c,o));var p=xa(l.getModel("itemStyle"),v,!0);G(v,p),A(rr,function(m){var _=s.ensureState(m),S=l.getModel([m,"itemStyle"]);_.style=S.getItemStyle();var x=xa(S,v);x&&(_.shape=x)}),e?(s.setShape(v),s.shape.r=f.r0,$t(s,{shape:{r:f.r}},n,a.dataIndex)):(Rt(s,{shape:v},n),Fr(s)),s.useStyle(h),this._updateLabel(n);var d=l.getShallow("cursor");d&&s.attr("cursor",d),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),y=g==="relative"?Ks(a.getAncestorsIndices(),a.getDescendantIndices()):g==="ancestor"?a.getAncestorsIndices():g==="descendant"?a.getDescendantIndices():g;jt(this,y,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e){var a=this,n=this.node.getModel(),i=n.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),f=Math.sin(l),v=this,h=v.getTextContent(),c=this.node.dataIndex,p=i.get("minAngle")/180*Math.PI,d=i.get("show")&&!(p!=null&&Math.abs(s)P&&!_o(E-P)&&E0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,e,a,n):(o.virtualPiece=new ZA(m,e,a,n),f.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(S){o._rootToNode(_.parentNode)})):o.virtualPiece&&(f.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",function(a){var n=!1,i=e.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&o.piece&&o.piece===a.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")e._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var f=l.get("target",!0)||"_blank";Mc(u,f)}}n=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:j0,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,a){var n=a.getData(),i=n.getItemLayout(0);if(i){var o=e[0]-i.cx,s=e[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},t.type=Fo,t})(zt),H$=ye(Fo,W$);function W$(r){var t={};function e(a,n,i){if(a.depth===0)return B.color.neutral50;for(var o=a;o&&o.depth>1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",t);return a.depth>1&&Z(s)&&(s=fc(s,(a.depth-1)/(i-1)*.5)),s}r.eachSeriesByType(Fo,function(a){var n=a.getData(),i=n.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=e(o,a,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");G(u,l)})})}var qA=Math.PI/180,U$=ye(Fo,Y$);function Y$(r,t){r.eachSeriesByType(Fo,function(e){var a=e.get("center"),n=e.get("radius");H(n)||(n=[0,n]),H(a)||(a=[a,a]);var i=t.getWidth(),o=t.getHeight(),s=Math.min(i,o),l=$(a[0],i),u=$(a[1],o),f=$(n[0],s/2),v=$(n[1],s/2),h=-e.get("startAngle")*qA,c=e.get("minAngle")*qA,p=e.getData().tree.root,d=e.getViewRoot(),g=d.depth,y=e.get("sort");y!=null&&NO(d,y);var m=0;A(d.children,function(R){!isNaN(R.getValue())&&m++});var _=d.getValue(),S=Math.PI/(_||m)*2,x=d.depth>0,b=d.height-(x?-1:1),w=(v-f)/(b||1),C=e.get("clockwise"),T=e.get("stillShowZeroSum"),M=C?1:-1,D=function(R,E){if(R){var O=E;if(R!==p){var k=R.getValue(),V=_===0&&T?S:k*S;Va[1]&&a.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:a[1],r0:a[0]},api:{coord:function(n){var i=t.dataToRadius(n[0]),o=e.dataToAngle(n[1]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:q(rq,r)}}}function nq(r){var t=r.getRect(),e=r.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(a,n){return r.dataToPoint(a,n)},layout:function(a,n){return r.dataToLayout(a,n)}}}}function iq(r){var t=r.getRect();return{coordSys:{type:"matrix",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e,a){return r.dataToPoint(e,a)},layout:function(e,a){return r.dataToLayout(e,a)}}}}var BO={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},jA=At(BO);Br(gn,function(r,t){return r[t]=1,r},{});gn.join(", ");var fp=["","style","shape","extra"],pl=mt();function US(r,t,e,a,n){var i=r+"Animation",o=Tl(r,a,n)||{},s=pl(t).userDuring;return o.duration>0&&(o.during=s?q(fq,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=r),G(o,e[i]),o}function Qh(r,t,e,a){a=a||{};var n=a.dataIndex,i=a.isInit,o=a.clearStyle,s=e.isAnimationEnabled(),l=pl(r),u=t.style;l.userDuring=t.during;var f={},v={};if(hq(r,t,v),r.type==="compound")for(var h=r.shape.paths,c=t.shape.paths,p=0;p0&&r.animateFrom(g,y)}else sq(r,t,n||0,e,f);VO(r,t),u?r.dirty():r.markRedraw()}function VO(r,t){for(var e=pl(r).leaveToProps,a=0;a0&&r.animateFrom(n,i)}}function lq(r,t){j(t,"silent")&&(r.silent=t.silent),j(t,"ignore")&&(r.ignore=t.ignore),r instanceof Gr&&j(t,"invisible")&&(r.invisible=t.invisible),r instanceof Ct&&j(t,"autoBatch")&&(r.autoBatch=t.autoBatch)}var ha={},uq={setTransform:function(r,t){return ha.el[r]=t,this},getTransform:function(r){return ha.el[r]},setShape:function(r,t){var e=ha.el,a=e.shape||(e.shape={});return a[r]=t,e.dirtyShape&&e.dirtyShape(),this},getShape:function(r){var t=ha.el.shape;if(t)return t[r]},setStyle:function(r,t){var e=ha.el,a=e.style;return a&&(a[r]=t,e.dirtyStyle&&e.dirtyStyle()),this},getStyle:function(r){var t=ha.el.style;if(t)return t[r]},setExtra:function(r,t){var e=ha.el.extra||(ha.el.extra={});return e[r]=t,this},getExtra:function(r){var t=ha.el.extra;if(t)return t[r]}};function fq(){var r=this,t=r.el;if(t){var e=pl(t).userDuring,a=r.userDuring;if(e!==a){r.el=r.userDuring=null;return}ha.el=t,a(uq)}}function JA(r,t,e,a){var n=e[r];if(n){var i=t[r],o;if(i){var s=e.transition,l=n.transition;if(l)if(!o&&(o=a[r]={}),go(l))G(o,i);else for(var u=Ut(l),f=0;f=0){!o&&(o=a[r]={});for(var c=At(i),f=0;f=0)){var h=r.getAnimationStyleProps(),c=h?h.style:null;if(c){!i&&(i=a.style={});for(var p=At(e),u=0;u=0?t.getStore().get(k,E):void 0}var V=t.get(O.name,E),z=O&&O.ordinalMeta;return z?z.categories[V]:V}function w(R,E){E==null&&(E=f);var O=t.getItemVisual(E,"style"),k=O&&O.fill,V=O&&O.opacity,z=_(E,Yn).getItemStyle();k!=null&&(z.fill=k),V!=null&&(z.opacity=V);var F={inheritColor:Z(k)?k:B.color.neutral99},U=S(E,Yn),X=Wt(U,null,F,!1,!0);X.text=U.getShallow("show")?J(r.getFormattedLabel(E,Yn),ul(t,E)):null;var Y=bc(U,F,!1);return M(R,z),z=FT(z,X,Y),R&&T(z,R),z.legacy=!0,z}function C(R,E){E==null&&(E=f);var O=_(E,hn).getItemStyle(),k=S(E,hn),V=Wt(k,null,null,!0,!0);V.text=k.getShallow("show")?fr(r.getFormattedLabel(E,hn),r.getFormattedLabel(E,Yn),ul(t,E)):null;var z=bc(k,null,!0);return M(R,O),O=FT(O,V,z),R&&T(O,R),O.legacy=!0,O}function T(R,E){for(var O in E)j(E,O)&&(R[O]=E[O])}function M(R,E){R&&(R.textFill&&(E.textFill=R.textFill),R.textPosition&&(E.textPosition=R.textPosition))}function D(R,E){if(E==null&&(E=f),j(KA,R)){var O=t.getItemVisual(E,"style");return O?O[KA[R]]:null}if(j($$,R))return t.getItemVisual(E,R)}function L(R){if(o.type==="cartesian2d"){var E=o.getBaseAxis();return bY(st({axis:E},R))}}function I(){return e.getCurrentSeriesIndices()}function P(R){return i1(R,e)}}function wq(r){var t={};return A(r.dimensions,function(e){var a=r.getDimensionInfo(e);if(!a.isExtraCoord){var n=a.coordDim,i=t[n]=t[n]||[];i[a.coordDimIndex]=r.getDimensionIndex(e)}}),t}function Ey(r,t,e,a,n,i,o){if(!a){i.remove(t);return}var s=qS(r,t,e,a,n,i);return s&&o.setItemGraphicEl(e,s),s&&jt(s,a.focus,a.blurScope,a.emphasisDisabled),s}function qS(r,t,e,a,n,i){var o=-1,s=t;t&&HO(t,a,n)&&(o=pt(i.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=ZS(a),s&&_q(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),a.tooltipDisabled&&(u.tooltipDisabled=!0),Cr.normal.cfg=Cr.normal.conOpt=Cr.emphasis.cfg=Cr.emphasis.conOpt=Cr.blur.cfg=Cr.blur.conOpt=Cr.select.cfg=Cr.select.conOpt=null,Cr.isLegacy=!1,Cq(u,e,a,n,l,Cr),Tq(u,e,a,n,l),$S(r,u,e,a,Cr,n,l),j(a,"info")&&(vn(u).info=a.info);for(var f=0;f=0?i.replaceAt(u,o):i.add(u),u}function HO(r,t,e){var a=vn(r),n=t.type,i=t.shape,o=t.style;return e.isUniversalTransitionEnabled()||n!=null&&n!==a.customGraphicType||n==="path"&&Lq(i)&&WO(i)!==a.customPathData||n==="image"&&j(o,"image")&&o.image!==a.customImagePath}function Tq(r,t,e,a,n){var i=e.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&HO(o,i,a)&&(o=null),o||(o=ZS(i),r.setClipPath(o)),$S(null,o,t,i,null,a,n)}}function Cq(r,t,e,a,n,i){if(!(r.isGroup||r.type==="compoundPath")){tM(e,null,i),tM(e,hn,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var f=r.getTextContent();if(o===!1)f&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},f?f.clearStates():(f=ZS(o),r.setTextContent(f)),$S(null,f,t,o,null,a,n);for(var v=o&&o.style,h=0;h=f;c--){var p=t.childAt(c);Mq(t,p,n)}}}function Mq(r,t,e){t&&xd(t,vn(r).option,e)}function Dq(r){new Sn(r.oldChildren,r.newChildren,eM,eM,r).add(rM).update(rM).remove(Iq).execute()}function eM(r,t){var e=r&&r.name;return e??yq+t}function rM(r,t){var e=this.context,a=r!=null?e.newChildren[r]:null,n=t!=null?e.oldChildren[t]:null;qS(e.api,n,e.dataIndex,a,e.seriesModel,e.group)}function Iq(r){var t=this.context,e=t.oldChildren[r];e&&xd(e,vn(e).option,t.seriesModel)}function WO(r){return r&&(r.pathData||r.d)}function Lq(r){return r&&(j(r,"pathData")||j(r,"d"))}function Pq(r){r.registerChartView(Sq),r.registerSeriesModel(q$)}var Qi=mt(),aM=rt,ky=q,jS=(function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,a,n){var i=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=a,!(!n&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,i,t,e,a);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(a),this._lastGraphicKey=f;var v=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new it,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),a.getZr().add(s);else{var h=St(nM,e,v);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,e)}oM(s,e,!0),this._renderHandle(i)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var a=e.get("animation"),n=t.axis,i=n.type==="category",o=e.get("snap");if(!o&&!i)return!1;if(a==="auto"||a==null){var s=this.animationThreshold;if(i&&Ge(n).w>s)return!0;if(o){var l=cS(t).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return a===!0},r.prototype.makeElOption=function(t,e,a,n,i){},r.prototype.createPointerEl=function(t,e,a,n){var i=e.pointer;if(i){var o=Qi(t).pointerEl=new $o[i.type](aM(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,a,n){if(e.label){var i=Qi(t).labelEl=new Dt(aM(e.label));t.add(i),iM(i,n)}},r.prototype.updatePointerEl=function(t,e,a){var n=Qi(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),a(n,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,a,n){var i=Qi(t).labelEl;i&&(i.setStyle(e.label.style),a(i,{x:e.label.x,y:e.label.y}),iM(i,n))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,a=this._api.getZr(),n=this._handle,i=e.getModel("handle"),o=e.get("status");if(!i.get("show")||!o||o==="hide"){n&&a.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=Al(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){dn(u.event)},onmousedown:ky(this._onHandleDragMove,this,0,0),drift:ky(this._onHandleDragMove,this),ondragend:ky(this._onHandleDragEnd,this)}),a.add(n)),oM(n,e,!1),n.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");H(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,Ll(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){nM(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Oy(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var a=this._handle;if(a){this._dragging=!0;var n=this.updateHandleTransform(Oy(a),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,a.stopAnimation(),a.attr(Oy(n)),Qi(a).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,a=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:a.axis.dim,axisIndex:a.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),a=this._group,n=this._handle;e&&a&&(this._lastGraphicKey=null,a&&e.remove(a),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),gf(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,a){return a=a||0,{x:t[a],y:t[1-a],width:e[a],height:e[1-a]}},r})();function nM(r,t,e,a){UO(Qi(e).lastProp,a)||(Qi(e).lastProp=a,t?Rt(e,a,r):(e.stopAnimation(),e.attr(a)))}function UO(r,t){if(lt(r)&<(t)){var e=!0;return A(t,function(a,n){e=e&&UO(r[n],a)}),!!e}else return r===t}function iM(r,t){r[t.get(["label","show"])?"show":"hide"]()}function Oy(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function oM(r,t,e){var a=t.get("z"),n=t.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(a!=null&&(i.z=a),n!=null&&(i.zlevel=n),i.silent=e)})}function JS(r){var t=r.get("type"),e=r.getModel(t+"Style"),a;return t==="line"?(a=e.getLineStyle(),a.fill=null):t==="shadow"&&(a=e.getAreaStyle(),a.stroke=null),a}function YO(r,t,e,a,n){var i=e.get("value"),o=XO(i,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=Dl(s.get("padding")||0),u=s.getFont(),f=Ep(o,u),v=n.position,h=f.width+l[1]+l[3],c=f.height+l[0]+l[2],p=n.align;p==="right"&&(v[0]-=h),p==="center"&&(v[0]-=h/2);var d=n.verticalAlign;d==="bottom"&&(v[1]-=c),d==="middle"&&(v[1]-=c/2),Rq(v,h,c,a);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),r.label={x:v[0],y:v[1],style:Wt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function Rq(r,t,e,a){var n=a.getWidth(),i=a.getHeight();r[0]=Math.min(r[0]+t,n)-t,r[1]=Math.min(r[1]+e,i)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function XO(r,t,e,a,n){r=t.scale.parse(r);var i=t.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:Gc(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};A(a,function(l){var u=e.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,v=u&&u.getDataParams(f);v&&s.seriesData.push(v)}),Z(o)?i=o.replace("{value}",i):at(o)&&(i=o(s))}return i}function QS(r,t,e){var a=Kt();return Cn(a,a,e.rotation),ta(a,a,e.position),Jr([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],a)}function ZO(r,t,e,a,n,i){var o=tr.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=n.get(["label","margin"]),YO(t,a,n,i,{position:QS(a.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function tx(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function $O(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}function sM(r,t,e,a,n,i){return{cx:r,cy:t,r0:e,r:a,startAngle:n,endAngle:i,clockwise:!0}}function ex(r,t,e){return Ge(r,{fromStat:{sers:W(t,function(a){return e.getSeriesByIndex(a.seriesIndex)})},min:1}).w}function rx(r,t,e){return[xt(Vt(t[0],t[1]),r-e/2),Vt(r+e/2,xt(t[0],t[1]))]}var Eq=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,a,n,i,o){var s=n.axis,l=s.grid,u=i.get("type"),f=s.getGlobalExtent(),v=lM(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(a,!0));if(u&&u!=="none"){var c=JS(i),p=kq[u](s,h,f,v,i.get("seriesDataIndices"),i.ecModel);p.style=c,e.graphicKey=p.type,e.pointer=p}var d=qc(l.getRect(),n);ZO(a,e,d,n,i,o)},t.prototype.getHandleTransform=function(e,a,n){var i=qc(a.axis.grid.getRect(),a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=QS(a.axis,e,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,a,n,i){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=lM(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,v=[e.x,e.y];v[f]+=a[f],v[f]=Vt(l[1],v[f]),v[f]=xt(l[0],v[f]);var h=(u[1]+u[0])/2,c=[h,h];c[f]=v[f];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:v[0],y:v[1],rotation:e.rotation,cursorPoint:c,tooltipOption:p[f]}},t})(jS);function lM(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var kq={line:function(r,t,e,a){var n=tx([t,a[0]],[t,a[1]],uM(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,t,e,a,n,i){var o=ex(r,n,i),s=a[1]-a[0],l=rx(t,e,o),u=l[0],f=l[1];return{type:"Rect",shape:$O([u,a[0]],[f-u,s],uM(r))}}};function uM(r){return r.dim==="x"?0:1}var Oq=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:B.color.border,width:1,type:"dashed"},shadowStyle:{color:B.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:B.color.neutral00,padding:[5,7,5,7],backgroundColor:B.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:B.color.accent40,throttle:40}},t})(wt),nn=mt(),Nq=A;function qO(r,t,e){if(!Mt.node){var a=t.getZr();nn(a).records||(nn(a).records={}),Bq(a,t);var n=nn(a).records[r]||(nn(a).records[r]={});n.handler=e}}function Bq(r,t){if(nn(r).initialized)return;nn(r).initialized=!0,e("click",St(Ny,"click")),e("mousemove",St(Ny,"mousemove")),e("mousewheel",St(Ny,"mousewheel")),e("globalout",zq);function e(a,n){r.on(a,function(i){var o=Gq(t);Nq(nn(r).records,function(s){s&&n(s,i,o.dispatchAction)}),Vq(o.pendings,t)})}}function Vq(r,t){var e=r.showTip.length,a=r.hideTip.length,n;e?n=r.showTip[e-1]:a&&(n=r.hideTip[a-1]),n&&(n.dispatchAction=null,t.dispatchAction(n))}function zq(r,t,e){r.handler("leave",null,e)}function Ny(r,t,e,a){t.handler(r,e,a)}function Gq(r){var t={showTip:[],hideTip:[]},e=function(a){var n=t[a.type];n?n.push(a):(a.dispatchAction=e,r.dispatchAction(a))};return{dispatchAction:e,pendings:t}}function t_(r,t){if(!Mt.node){var e=t.getZr(),a=(nn(e).records||{})[r];a&&(nn(e).records[r]=null)}}var Fq=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=a.getComponent("tooltip"),o=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click|mousewheel";qO("axisPointer",n,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(e,a){t_("axisPointer",a)},t.prototype.dispose=function(e,a){t_("axisPointer",a)},t.type="axisPointer",t})(Yt);function KO(r,t){var e=[],a=r.seriesIndex,n;if(a==null||!(n=t.getSeriesByIndex(a)))return{point:[]};var i=n.getData(),o=xo(i,r);if(o==null||o<0||H(o))return{point:[]};var s=i.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)e=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),v=f.dim,h=u.dim,c=v==="x"||v==="radius"?1:0,p=i.mapDimension(h),d=[];d[c]=i.get(p,o),d[1-c]=i.get(i.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(d)||[]}else e=l.dataToPoint(i.getValues(W(l.dimensions,function(y){return i.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),e=[g.x+g.width/2,g.y+g.height/2]}return{point:e,el:s}}var fM=mt();function Hq(r,t,e){var a=r.currTrigger,n=[r.x,r.y],i=r,o=r.dispatchAction||q(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){tc(n)&&(n=KO({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var l=tc(n),u=i.axesInfo,f=s.axesInfo,v=a==="leave"||tc(n),h={},c={},p={list:[],map:{}},d={showPointer:St(Uq,c),showTooltip:St(Yq,p)};A(s.coordSysMap,function(y,m){var _=l||y.containPoint(n);A(s.coordSysAxesInfo[m],function(S,x){var b=S.axis,w=qq(u,S);if(!v&&_&&(!u||w)){var C=w&&w.value;C==null&&!l&&(C=b.pointToData(n)),C!=null&&vM(S,C,d,!1,h)}})});var g={};return A(f,function(y,m){var _=y.linkGroup;_&&!c[m]&&A(_.axesInfo,function(S,x){var b=c[x];if(S!==y&&b){var w=b.value;_.mapper&&(w=y.axis.scale.parse(_.mapper(w,hM(S),hM(y)))),g[y.key]=w}})}),A(g,function(y,m){vM(f[m],y,d,!0,h)}),Xq(c,f,h),Zq(p,n,r,o),$q(f,o,e),h}}function vM(r,t,e,a,n){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=Wq(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&G(n,s[0]),!a&&r.snap&&i.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function Wq(r,t){var e=t.axis,a=e.dim,n=r,i=[],o=Number.MAX_VALUE,s=-1;return A(t.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(a),v,h;if(l.getAxisTooltipData){var c=l.getAxisTooltipData(f,r,e);h=c.dataIndices,v=c.nestestValue}else{if(h=l.indicesOfNearest(a,f[0],r,e.type==="category"?.5:null),!h.length)return;v=l.getData().get(f[0],h[0])}if(zr(v)){var p=r-v,d=Math.abs(p);d<=o&&((d=0&&s<0)&&(o=d,s=p,n=v,i.length=0),A(h,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:n}}function Uq(r,t,e,a){r[t.key]={value:e,payloadBatch:a}}function Yq(r,t,e,a){var n=e.payloadBatch,i=t.axis,o=i.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!n.length)){var l=t.coordSys.model,u=Lf(l),f=r.map[u];f||(f=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:a,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function Xq(r,t,e){var a=e.axesInfo=[];A(t,function(n,i){var o=n.axisPointerModel.option,s=r[i];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&a.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function Zq(r,t,e,a){if(tc(t)||!r.list.length){a({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function $q(r,t,e){var a=e.getZr(),n="axisPointerLastHighlights",i=fM(a)[n]||{},o=fM(a)[n]={};A(r,function(f,v){var h=f.axisPointerModel.option;h.status==="show"&&f.triggerEmphasis&&A(h.seriesDataIndices,function(c){o[c.seriesIndex+"|"+c.dataIndex]=c})});var s=[],l=[];function u(f){return{seriesIndex:f.seriesIndex,dataIndex:f.dataIndex}}A(i,function(f,v){!o[v]&&l.push(u(f))}),A(o,function(f,v){!i[v]&&s.push(u(f))}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function qq(r,t){for(var e=0;e<(r||[]).length;e++){var a=r[e];if(t.axis.dim===a.axisDim&&t.axis.model.componentIndex===a.axisIndex)return a}}function hM(r){var t=r.axis.model,e={},a=e.axisDim=r.axis.dim;return e.axisIndex=e[a+"AxisIndex"]=t.componentIndex,e.axisName=e[a+"AxisName"]=t.name,e.axisId=e[a+"AxisId"]=t.id,e}function tc(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function vv(r){ts.registerAxisPointerClass("CartesianAxisPointer",Eq),r.registerComponentModel(Oq),r.registerComponentView(Fq),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!H(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=y6(t,e)}}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Hq)}function Kq(r){_t(lk),_t(vv)}var jq=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,a,n,i,o){var s=n.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=s.getExtent(),f=l.getOtherAxis(s).getExtent(),v=s.dataToCoord(a),h=i.get("type");if(h&&h!=="none"){var c=JS(i),p=Qq[h](s,l,v,u,f,i.get("seriesDataIndices"),i.ecModel);p.style=c,e.graphicKey=p.type,e.pointer=p}var d=i.get(["label","margin"]),g=Jq(a,n,i,l,d);YO(e,n,i,o,g)},t})(jS);function Jq(r,t,e,a,n){var i=t.axis,o=i.dataToCoord(r),s=a.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=a.getRadiusAxis().getExtent(),u,f,v;if(i.dim==="radius"){var h=Kt();Cn(h,h,s),ta(h,h,[a.cx,a.cy]),u=Jr([o,-n],h);var c=t.getModel("axisLabel").get("rotate")||0,p=tr.innerTextLayout(s,c*Math.PI/180,-1);f=p.textAlign,v=p.textVerticalAlign}else{var d=l[1];u=a.coordToPoint([d+n,o]);var g=a.cx,y=a.cy;f=Math.abs(u[0]-g)/d<.3?"center":u[0]>g?"left":"right",v=Math.abs(u[1]-y)/d<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:f,verticalAlign:v}}var Qq={line:function(r,t,e,a,n){return r.dim==="angle"?{type:"Line",shape:tx(t.coordToPoint([n[0],e]),t.coordToPoint([n[1],e]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:e}}},shadow:function(r,t,e,a,n,i,o){var s=Math.PI/180,l=ex(r,i,o),u;if(r.dim==="angle")u=sM(t.cx,t.cy,n[0],n[1],(-e-l/2)*s,(-e+l/2)*s);else{var f=rx(e,a,l),v=f[0],h=f[1];u=sM(t.cx,t.cy,v,h,0,Math.PI*2)}return{type:"Sector",shape:u}}},Da="polar",cM=Da,tK=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.findAxisModel=function(e){var a,n=this.ecModel;return n.eachComponent(e,function(i){i.getCoordSysModel()===this&&(a=i)},this),a},t.type=Da,t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t})(wt),ax=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",re).models[0]},t.type="polarAxis",t})(wt);ue(ax,Nl);var eK=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="angleAxis",t})(ax),rK=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="radiusAxis",t})(ax),nx=(function(r){N(t,r);function t(e,a){return r.call(this,"radius",e,a)||this}return t.prototype.pointToData=function(e,a){return this.polar.pointToData(e,a)[this.dim==="radius"?0:1]},t})(Ur);nx.prototype.dataToRadius=Ur.prototype.dataToCoord;nx.prototype.radiusToData=Ur.prototype.coordToData;var aK=mt(),ix=(function(r){N(t,r);function t(e,a){return r.call(this,"angle",e,a||[0,360])||this}return t.prototype.pointToData=function(e,a){return this.polar.pointToData(e,a)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,a=e.getLabelModel(),n=e.scale,i=n.getExtent(),o=n.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=e.dataToCoord(s+1)-e.dataToCoord(s),u=Math.abs(l),f=Ep(s==null?"":s+"",a.getFont(),"center","top"),v=Math.max(f.height,7),h=v/u;isNaN(h)&&(h=1/0);var c=Math.max(0,Math.floor(h)),p=aK(e.model),d=p.lastAutoInterval,g=p.lastTickCount;return d!=null&&g!=null&&Math.abs(d-c)<=1&&Math.abs(g-o)<=1&&d>c?c=d:(p.lastTickCount=o,p.lastAutoInterval=c),c},t})(Ur);ix.prototype.dataToAngle=Ur.prototype.dataToCoord;ix.prototype.angleToData=Ur.prototype.coordToData;var jO=["radius","angle"],nK=(function(){function r(t){this.dimensions=jO,this.type=Da,this.cx=0,this.cy=0,this._radiusAxis=new nx,this._angleAxis=new ix,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},r.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},r.prototype.getAxis=function(t){var e="_"+t+"Axis";return this[e]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(t){var e=[],a=this._angleAxis,n=this._radiusAxis;return a.scale.type===t&&e.push(a),n.scale.type===t&&e.push(n),e},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(t){var e=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},r.prototype.dataToPoint=function(t,e,a){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)],a)},r.prototype.pointToData=function(t,e,a){a=a||[];var n=this.pointToCoord(t);return a[0]=this._radiusAxis.radiusToData(n[0],e),a[1]=this._angleAxis.angleToData(n[1],e),a},r.prototype.pointToCoord=function(t){var e=t[0]-this.cx,a=t[1]-this.cy,n=this.getAngleAxis(),i=n.getExtent(),o=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);n.inverse?o=s-360:s=o+360;var l=Math.sqrt(e*e+a*a);e/=l,a/=l;for(var u=Math.atan2(-a,e)/Math.PI*180,f=us;)u+=f*360;return[l,u]},r.prototype.coordToPoint=function(t,e){e=e||[];var a=t[0],n=t[1]/180*Math.PI;return e[0]=Math.cos(n)*a+this.cx,e[1]=-Math.sin(n)*a+this.cy,e},r.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),a=e.getExtent().slice();a[0]>a[1]&&a.reverse();var n=t.getExtent(),i=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:a[0],r:a[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(s,l){var u=s-this.cx,f=l-this.cy,v=u*u+f*f,h=this.r,c=this.r0;return h!==c&&v-o<=h*h&&v+o>=c*c},x:this.cx-a[1],y:this.cy-a[1],width:a[1]*2,height:a[1]*2}},r.prototype.convertToPixel=function(t,e,a){var n=pM(e);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(t,e,a){var n=pM(e);return n===this?this.pointToData(a):null},r})();function pM(r){var t=r.seriesModel,e=r.polarModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}function iK(r,t,e){var a=t.get("center"),n=me(t,e).refContainer;r.cx=$(a[0],n.width)+n.x,r.cy=$(a[1],n.height)+n.y;var i=r.getRadiusAxis(),o=Math.min(n.width,n.height)/2,s=t.get("radius");s==null?s=[0,"100%"]:H(s)||(s=[0,s]);var l=[$(s[0],o),$(s[1],o)];i.inverse?i.setExtent(l[1],l[0]):i.setExtent(l[0],l[1])}function oK(r,t){var e=this,a=e.getAngleAxis(),n=e.getRadiusAxis();if(Po(a,sl),Po(n,sl),ll(a),ll(n),a.type==="category"&&!a.onBand){var i=a.getExtent(),o=360/a.scale.count();a.inverse?i[1]+=o:i[1]-=o,a.setExtent(i[0],i[1])}}function sK(r){return r.mainType==="angleAxis"}function dM(r,t){var e;if(r.type=av(t),r.scale=kl(t,r.type,!1),r.onBand=iv(r.scale,t),r.inverse=t.get("inverse"),sK(t)){r.inverse=r.inverse!==t.get("clockwise");var a=t.get("startAngle"),n=(e=t.get("endAngle"))!==null&&e!==void 0?e:a+(r.inverse?-360:360);r.setExtent(a,n)}t.axis=r,r.model=t}var lK={dimensions:jO,create:function(r,t){var e=[];return r.eachComponent(cM,function(a,n){var i=new nK(n+"");i.update=oK;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");dM(o,l),dM(s,u),iK(i,a,t),e.push(i),a.coordinateSystem=i,i.model=a}),r.eachSeries(function(a){if(a.get("coordinateSystem")===Da){var n=a.getReferringComponents(cM,re).models[0],i=a.coordinateSystem=n.coordinateSystem;i&&(Lo(i.getRadiusAxis(),a,Da),Lo(i.getAngleAxis(),a,Da))}}),e}},uK=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function dh(r,t,e){t[1]>t[0]&&(t=t.slice().reverse());var a=r.coordToPoint([t[0],e]),n=r.coordToPoint([t[1],e]);return{x1:a[0],y1:a[1],x2:n[0],y2:n[1]}}function gh(r){var t=r.getRadiusAxis();return t.inverse?0:1}function gM(r){var t=r[0],e=r[r.length-1];t&&e&&Math.abs(Math.abs(t.coord-e.coord)-360)<1e-4&&r.pop()}var fK=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="PolarAxisPointer",e}return t.prototype.render=function(e,a){if(this.group.removeAll(),!!e.get("show")){var n=e.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),s=n.getTicksCoords({breakTicks:"none"}),l=n.getMinorTicksCoords(),u=[];A(n.getViewLabels(),function(f){if(!f.tick.offInterval){f=rt(f);var v=n.scale;f.coord=n.dataToCoord(Ol(v,f.tick)),u.push(f)}}),gM(u),gM(s),A(uK,function(f){e.get([f,"show"])&&(!n.scale.isBlank()||f==="axisLine")&&vK[f](this.group,e,i,s,l,o,u)},this)}},t.type="angleAxis",t})(ts),vK={axisLine:function(r,t,e,a,n,i){var o=t.getModel(["axisLine","lineStyle"]),s=e.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),f=gh(e),v=f?0:1,h,c=Math.abs(u[1]-u[0])===360?"Circle":"Arc";i[v]===0?h=new $o[c]({shape:{cx:e.cx,cy:e.cy,r:i[f],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):h=new bl({shape:{cx:e.cx,cy:e.cy,r:i[f],r0:i[v]},style:o.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,r.add(h)},axisTick:function(r,t,e,a,n,i){var o=t.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[gh(e)],u=W(a,function(f){return new oe({shape:dh(e,[l,l+s],f.coord)})});r.add(dr(u,{style:st(o.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,t,e,a,n,i){if(n.length){for(var o=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[gh(e)],f=[],v=0;vy?"left":"right",S=Math.abs(g[1]-m)/d<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[p]){var x=s[p];lt(x)&&x.textStyle&&(c=new Tt(x.textStyle,l,l.ecModel))}var b=new Dt({silent:tr.isLabelSilent(t),style:Wt(c,{x:g[0],y:g[1],fill:c.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:v.formattedLabel,align:_,verticalAlign:S})});if(r.add(b),Mn({el:b,componentModel:t,itemName:v.formattedLabel,formatterParamsExtra:{isTruncated:function(){return b.isTruncated},value:v.rawLabel,tickIndex:h}}),f){var w=tr.makeAxisEventDataBase(t);w.targetType="axisLabel",w.value=v.rawLabel,ft(b).eventData=w}},this)},splitLine:function(r,t,e,a,n,i){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var f=[],v=0;v=0?"p":"n",T=_;y&&(a[i][w]||(a[i][w]={p:_,n:_}),T=a[i][w][C]);var M=void 0,D=void 0,L=void 0,I=void 0;if(f.dim==="radius"){var P=f.dataToCoord(b)-_,R=r.dataToCoord(w);Qt(P)=I})}}function SK(r,t){var e=Qo(t,Da),a=Ge(r,{fromStat:{key:e},min:1}).w,n=a,i=0,o="20%",s="30%",l={};Io(r,e,function(g){var y=JO(g);l[y]||i++,l[y]=l[y]||{width:0,maxWidth:0};var m=$(g.get("barWidth"),a),_=$(g.get("barMaxWidth"),a),S=g.get("barGap"),x=g.get("barCategoryGap");m&&!l[y].width&&(m=Vt(n,m),l[y].width=m,n-=m),_&&(l[y].maxWidth=_),S!=null&&(s=S),x!=null&&(o=x)});var u={},f=$(o,a),v=$(s,1),h=(n-f)/(i+(i-1)*v);h=xt(h,0),A(l,function(g,y){var m=g.maxWidth;m&&m=e.y&&t[1]<=e.y+e.height:a.contain(a.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},r.prototype.pointToData=function(t,e,a){a=a||[];var n=this.getAxis();return a[0]=n.coordToData(n.toLocalCoord(t[n.orient==="horizontal"?0:1])),a},r.prototype.dataToPoint=function(t,e,a){var n=this.getAxis(),i=this.getRect();a=a||[];var o=n.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),a[o]=n.toGlobalCoord(n.dataToCoord(+t)),a[1-o]=o===0?i.y+i.height/2:i.x+i.width/2,a},r.prototype.convertToPixel=function(t,e,a){var n=yM(e);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(t,e,a){var n=yM(e);return n===this?this.pointToData(a):null},r})();function yM(r){var t=r.seriesModel,e=r.singleAxisModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}function PK(r,t){var e=[];return r.eachComponent(O0,function(a,n){var i=new LK(a,r,t);i.name="single_"+n,i.resize(a,t),a.coordinateSystem=i,e.push(i)}),r.eachSeries(function(a){if(a.get("coordinateSystem")===D6){var n=a.getReferringComponents(O0,re).models[0],i=a.coordinateSystem=n&&n.coordinateSystem;i&&Lo(i.getAxis(),a,hd)}}),e}var RK={create:PK,dimensions:QO},mM=["x","y"],EK=["width","height"],kK=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,a,n,i,o){var s=n.axis,l=s.coordinateSystem,u=cp(s),f=yh(l,u),v=yh(l,1-u),h=l.dataToPoint(a)[0],c=i.get("type");if(c&&c!=="none"){var p=JS(i),d=OK[c](s,h,f,v,i.get("seriesDataIndices"),i.ecModel);d.style=p,e.graphicKey=d.type,e.pointer=d}var g=e_(n);ZO(a,e,g,n,i,o)},t.prototype.getHandleTransform=function(e,a,n){var i=e_(a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=QS(a.axis,e,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,a,n,i){var o=n.axis,s=o.coordinateSystem,l=cp(o),u=yh(s,l),f=[e.x,e.y];f[l]+=a[l],f[l]=Math.min(u[1],f[l]),f[l]=Math.max(u[0],f[l]);var v=yh(s,1-l),h=(v[1]+v[0])/2,c=[h,h];return c[l]=f[l],{x:f[0],y:f[1],rotation:e.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},t})(jS),OK={line:function(r,t,e,a){var n=tx([t,a[0]],[t,a[1]],cp(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,t,e,a,n,i){var o=ex(r,n,i),s=a[1]-a[0],l=rx(t,e,o),u=l[0],f=l[1];return{type:"Rect",shape:$O([u,a[0]],[f-u,s],cp(r))}}};function cp(r){return r.isHorizontal()?0:1}function yh(r,t){var e=r.getRect();return[e[mM[t]],e[mM[t]]+e[EK[t]]]}var NK=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="single",t})(Yt);function BK(r){_t(vv),ts.registerAxisPointerClass("SingleAxisPointer",kK),r.registerComponentView(NK),r.registerComponentView(MK),r.registerComponentModel(jh),fl(r,"single",jh,jh.defaultOption),r.registerCoordinateSystem("single",RK)}var VK=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a,n){var i=Ko(e);r.prototype.init.apply(this,arguments),_M(e,i)},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),_M(this.option,e)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.layoutMode="box",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:B.color.axisLine,width:1,type:"solid"}},itemStyle:{color:B.color.neutral00,borderWidth:1,borderColor:B.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:B.size.s,color:B.color.secondary},monthLabel:{show:!0,position:"start",margin:B.size.s,align:"center",formatter:null,color:B.color.secondary},yearLabel:{show:!0,position:null,margin:B.size.xl,formatter:null,color:B.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t})(wt);function _M(r,t){var e=r.cellSize,a;H(e)?a=e:a=r.cellSize=[e,e],a.length===1&&(a[1]=a[0]);var n=W([0,1],function(i){return zG(t,i)&&(a[i]="auto"),a[i]!=null&&a[i]!=="auto"});Na(r,t,{type:"box",ignoreSize:n})}var zK=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=this.group;i.removeAll();var o=e.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=a.getLocaleModel();this._renderDayRect(e,s,i),this._renderLines(e,s,l,i),this._renderYearText(e,s,l,i),this._renderMonthText(e,u,l,i),this._renderWeekText(e,u,s,l,i)},t.prototype._renderDayRect=function(e,a,n){for(var i=e.coordinateSystem,o=e.getModel("itemStyle").getItemStyle(),s=i.getCellWidth(),l=i.getCellHeight(),u=a.start.time;u<=a.end.time;u=i.getNextNDay(u,1).time){var f=i.dataToCalendarLayout([u],!1).tl,v=new bt({shape:{x:f[0],y:f[1],width:s,height:l},cursor:"default",style:o});n.add(v)}},t.prototype._renderLines=function(e,a,n,i){var o=this,s=e.coordinateSystem,l=e.getModel(["splitLine","lineStyle"]).getLineStyle(),u=e.get(["splitLine","show"]),f=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var v=a.start,h=0;v.time<=a.end.time;h++){p(v.formatedDate),h===0&&(v=s.getDateInfo(a.start.y+"-"+a.start.m));var c=v.date;c.setMonth(c.getMonth()+1),v=s.getDateInfo(c)}p(s.getNextNDay(a.end.time,1).formatedDate);function p(d){o._firstDayOfMonth.push(s.getDateInfo(d)),o._firstDayPoints.push(s.dataToCalendarLayout([d],!1).tl);var g=o._getLinePointsOfOneWeek(e,d,n);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,i)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,f,n),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,f,n),l,i)},t.prototype._getEdgesPoints=function(e,a,n){var i=[e[0].slice(),e[e.length-1].slice()],o=n==="horizontal"?0:1;return i[0][o]=i[0][o]-a/2,i[1][o]=i[1][o]+a/2,i},t.prototype._drawSplitline=function(e,a,n){var i=new Le({z2:20,shape:{points:e},style:a});n.add(i)},t.prototype._getLinePointsOfOneWeek=function(e,a,n){for(var i=e.coordinateSystem,o=i.getDateInfo(a),s=[],l=0;l<7;l++){var u=i.getNextNDay(o.time,l),f=i.dataToCalendarLayout([u.time],!1);s[2*u.day]=f.tl,s[2*u.day+1]=f[n==="horizontal"?"bl":"tr"]}return s},t.prototype._formatterLabel=function(e,a){return Z(e)&&e?k2(e,a):at(e)?e(a):a.nameMap},t.prototype._yearTextPositionControl=function(e,a,n,i,o){var s=a[0],l=a[1],u=["center","bottom"];i==="bottom"?(l+=o,u=["center","top"]):i==="left"?s-=o:i==="right"?(s+=o,u=["center","top"]):l-=o;var f=0;return(i==="left"||i==="right")&&(f=Math.PI/2),{rotation:f,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},t.prototype._renderYearText=function(e,a,n,i){var o=e.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=n!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],f=(u[0][0]+u[1][0])/2,v=(u[0][1]+u[1][1])/2,h=n==="horizontal"?0:1,c={top:[f,u[h][1]],bottom:[f,u[1-h][1]],left:[u[1-h][0],v],right:[u[h][0],v]},p=a.start.y;+a.end.y>+a.start.y&&(p=p+"-"+a.end.y);var d=o.get("formatter"),g={start:a.start.y,end:a.end.y,nameMap:p},y=this._formatterLabel(d,g),m=new Dt({z2:30,style:Wt(o,{text:y}),silent:o.get("silent")});m.attr(this._yearTextPositionControl(m,c[l],n,l,s)),i.add(m)}},t.prototype._monthTextPositionControl=function(e,a,n,i,o){var s="left",l="top",u=e[0],f=e[1];return n==="horizontal"?(f=f+o,a&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,a&&(l="middle"),i==="start"&&(s="right")),{x:u,y:f,align:s,verticalAlign:l}},t.prototype._renderMonthText=function(e,a,n,i){var o=e.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),f=o.get("align"),v=[this._tlpoints,this._blpoints];(!s||Z(s))&&(s&&(a=qm(s)||a),s=a.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,c=n==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=f==="center",d=o.get("silent"),g=0;g=i.start.time&&n.times.end.time&&e.reverse(),e},r.prototype._getRangeInfo=function(t){var e=[this.getDateInfo(t[0]),this.getDateInfo(t[1])],a;e[0].time>e[1].time&&(a=!0,e.reverse());var n=Math.floor(e[1].time/By)-Math.floor(e[0].time/By)+1,i=new Date(e[0].time),o=i.getDate(),s=e[1].date.getDate();i.setDate(o+n-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-e[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-e[1].time)*u>0;)n-=u,i.setDate(l-u);var f=Math.floor((n+e[0].day+6)/7),v=a?-f+1:f-1;return a&&e.reverse(),{range:[e[0].formatedDate,e[1].formatedDate],start:e[0],end:e[1],allDay:n,weeks:f,nthWeek:v,fweek:e[0].day,lweek:e[1].day}},r.prototype._getDateByWeeksAndDay=function(t,e,a){var n=this._getRangeInfo(a);if(t>n.weeks||t===0&&en.lweek)return null;var i=(t-1)*7-n.fweek+e,o=new Date(n.start.time);return o.setDate(+n.start.d+i),this.getDateInfo(o)},r.create=function(t,e){var a=[];return t.eachComponent("calendar",function(n){var i=new r(n,t,e);a.push(i),n.coordinateSystem=i}),t.eachComponent(function(n,i){tv({targetModel:i,coordSysType:"calendar",coordSysProvider:F2})}),a},r.dimensions=["time","value"],r})();function Vy(r){var t=r.calendarModel,e=r.seriesModel,a=t?t.coordinateSystem:e?e.coordinateSystem:null;return a}function FK(r){r.registerComponentModel(VK),r.registerComponentView(zK),r.registerCoordinateSystem("calendar",GK)}var tn={level:1,leaf:2,nonLeaf:3},cn={none:0,all:1,body:2,corner:3};function r_(r,t,e){var a=t[ct[e]].getCell(r);return!a&&It(r)&&r<0&&(a=t[ct[1-e]].getUnitLayoutInfo(e,Math.round(r))),a}function tN(r){var t=r||[];return t[0]=t[0]||[],t[1]=t[1]||[],t[0][0]=t[0][1]=t[1][0]=t[1][1]=NaN,t}function eN(r,t,e,a,n){SM(r[0],t,n,e,a,0),SM(r[1],t,n,e,a,1)}function SM(r,t,e,a,n,i){r[0]=1/0,r[1]=-1/0;var o=a[i],s=H(o)?o:[o],l=s.length,u=!!e;if(l>=1?(xM(r,t,s,u,n,i,0),l>1&&xM(r,t,s,u,n,i,l-1)):r[0]=r[1]=NaN,u){var f=-n[ct[1-i]].getLocatorCount(i),v=n[ct[i]].getLocatorCount(i)-1;e===cn.body?f=xt(0,f):e===cn.corner&&(v=Vt(-1,v)),v=t[0]&&r[0]<=t[1]}function TM(r,t){r.id.set(t[0][0],t[1][0]),r.span.set(t[0][1]-r.id.x+1,t[1][1]-r.id.y+1)}function UK(r,t){r[0][0]=t[0][0],r[0][1]=t[0][1],r[1][0]=t[1][0],r[1][1]=t[1][1]}function CM(r,t,e,a){var n=r_(t[a][0],e,a),i=r_(t[a][1],e,a);r[ct[a]]=r[ae[a]]=NaN,n&&i&&(r[ct[a]]=n.xy,r[ae[a]]=i.xy+i.wh-n.xy)}function cu(r,t,e,a){return r[ct[t]]=e,r[ct[1-t]]=a,r}function YK(r){return r&&(r.type===tn.leaf||r.type===tn.nonLeaf)?r:null}function pp(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var AM=(function(){function r(t,e){this._cells=[],this._levels=[],this.dim=t,this.dimIdx=t==="x"?0:1,this._model=e,this._uniqueValueGen=XK(t);var a=e.get("data",!0),n=e.get("length",!0);if(a!=null&&!H(a)&&(a=[]),a)this._initByDimModelData(a);else if(n!=null){a=Array(n);for(var i=0;i=1,_=e[ct[a]],S=i.getLocatorCount(a)-1,x=new qn;for(o.resetLayoutIterator(x,a);x.next();)b(x.item);for(i.resetLayoutIterator(x,a);x.next();)b(x.item);function b(w){Oe(w.wh)&&(w.wh=y),w.xy=_,w.id[ct[a]]===S&&!m&&(w.wh=e[ct[a]]+e[ae[a]]-w.xy),_+=w.wh}}function EM(r,t){for(var e=t[ct[r]].resetCellIterator();e.next();){var a=e.item;dp(a.rect,r,a.id,a.span,t),dp(a.rect,1-r,a.id,a.span,t),a.type===tn.nonLeaf&&(a.xy=a.rect[ct[r]],a.wh=a.rect[ae[r]])}}function kM(r,t){r.travelExistingCells(function(e){var a=e.span;if(a){var n=e.spanRect,i=e.id;dp(n,0,i,a,t),dp(n,1,i,a,t)}})}function dp(r,t,e,a,n){r[ae[t]]=0;var i=e[ct[t]],o=i<0?n[ct[1-t]]:n[ct[t]],s=o.getUnitLayoutInfo(t,e[ct[t]]);if(r[ct[t]]=s.xy,r[ae[t]]=s.wh,a[ct[t]]>1){var l=o.getUnitLayoutInfo(t,e[ct[t]]+a[ct[t]]-1);r[ae[t]]=l.xy+l.wh-s.xy}}function ij(r,t,e){var a=yc(r,e[ae[t]]);return n_(a,e[ae[t]])}function n_(r,t){return Math.max(Math.min(r,J(t,1/0)),0)}function Fy(r){var t=r.matrixModel,e=r.seriesModel,a=t?t.coordinateSystem:e?e.coordinateSystem:null;return a}var Ee={inBody:1,inCorner:2,outside:3},fa={x:null,y:null,point:[]};function OM(r,t,e,a,n){var i=e[ct[t]],o=e[ct[1-t]],s=i.getUnitLayoutInfo(t,i.getLocatorCount(t)-1),l=i.getUnitLayoutInfo(t,0),u=o.getUnitLayoutInfo(t,-o.getLocatorCount(t)),f=o.shouldShow()?o.getUnitLayoutInfo(t,-1):null,v=r.point[t]=a[t];if(!l&&!f){r[ct[t]]=Ee.outside;return}if(n===cn.body){l?(r[ct[t]]=Ee.inBody,v=Vt(s.xy+s.wh,xt(l.xy,v)),r.point[t]=v):r[ct[t]]=Ee.outside;return}else if(n===cn.corner){f?(r[ct[t]]=Ee.inCorner,v=Vt(f.xy+f.wh,xt(u.xy,v)),r.point[t]=v):r[ct[t]]=Ee.outside;return}var h=l?l.xy:f?f.xy+f.wh:NaN,c=u?u.xy:h,p=s?s.xy+s.wh:h;if(vp){if(!n){r[ct[t]]=Ee.outside;return}v=p}r.point[t]=v,r[ct[t]]=h<=v&&v<=p?Ee.inBody:c<=v&&v<=h?Ee.inCorner:Ee.outside}function NM(r,t,e,a){var n=1-e;if(r[ct[e]]!==Ee.outside)for(a[ct[e]].resetCellIterator(Gy);Gy.next();){var i=Gy.item;if(VM(r.point[e],i.rect,e)&&VM(r.point[n],i.rect,n)){t[e]=i.ordinal,t[n]=i.id[ct[n]];return}}}function BM(r,t,e,a){if(r[ct[e]]!==Ee.outside){var n=r[ct[e]]===Ee.inCorner?a[ct[1-e]]:a[ct[e]];for(n.resetLayoutIterator(bh,e);bh.next();)if(oj(r.point[e],bh.item)){t[e]=bh.item.id[ct[e]];return}}}function oj(r,t){return t.xy<=r&&r<=t.xy+t.wh}function VM(r,t,e){return t[ct[e]]<=r&&r<=t[ct[e]]+t[ae[e]]}function sj(r){r.registerComponentModel(KK),r.registerComponentView(ej),r.registerCoordinateSystem("matrix",nj)}function lj(r,t){var e=r.existing;if(t.id=r.keyInfo.id,!t.type&&e&&(t.type=e.type),t.parentId==null){var a=t.parentOption;a?t.parentId=a.id:e&&(t.parentId=e.parentId)}t.parentOption=null}function zM(r,t){var e;return A(t,function(a){r[a]!=null&&r[a]!=="auto"&&(e=!0)}),e}function uj(r,t,e){var a=G({},e),n=r[t],i=e.$action||"merge";i==="merge"?n?(yt(n,a,!0),Na(n,a,{ignoreSize:!0}),X2(e,n),wh(e,n),wh(e,n,"shape"),wh(e,n,"style"),wh(e,n,"extra"),e.clipPath=n.clipPath):r[t]=a:i==="replace"?r[t]=a:i==="remove"&&n&&(r[t]=null)}var aN=["transition","enterFrom","leaveTo"],fj=aN.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function wh(r,t,e){if(e&&(!r[e]&&t[e]&&(r[e]={}),r=r[e],t=t[e]),!(!r||!t))for(var a=e?aN:fj,n=0;n=0;f--){var v=n[f],h=pe(v.id,null),c=h!=null?o.get(h):null;if(c){var p=c.parent,y=Pr(p),m=p===i?{width:s,height:l}:{width:y.width,height:y.height},_={},S=jp(c,v,m,null,{hv:v.hv,boundingMode:v.bounding},_);if(!Pr(c).isNew&&S){for(var x=v.transition,b={},w=0;w=0)?b[C]=T:c[C]=T}Rt(c,b,e,0)}else c.attr(_)}}},t.prototype._clear=function(){var e=this,a=this._elMap;a.each(function(n){ec(n,Pr(n).option,a,e._lastGraphicModel)}),this._elMap=K()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t})(Yt);function i_(r){var t=j(GM,r)?GM[r]:hf(r),e=new t({});return Pr(e).type=r,e}function FM(r,t,e,a){var n=i_(e);return t.add(n),a.set(r,n),Pr(n).id=r,Pr(n).isNew=!0,n}function ec(r,t,e,a){var n=r&&r.parent;n&&(r.type==="group"&&r.traverse(function(i){ec(i,t,e,a)}),xd(r,t,a),e.removeKey(Pr(r).id))}function HM(r,t,e,a){r.isGroup||A([["cursor",Gr.prototype.cursor],["zlevel",a||0],["z",e||0],["z2",0]],function(n){var i=n[0];j(t,i)?r[i]=J(t[i],n[1]):r[i]==null&&(r[i]=n[1])}),A(At(t),function(n){if(n.indexOf("on")===0){var i=t[n];r[n]=at(i)?i:null}}),j(t,"draggable")&&(r.draggable=t.draggable),t.name!=null&&(r.name=t.name),t.id!=null&&(r.id=t.id)}function pj(r){return r=G({},r),A(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(H2),function(t){delete r[t]}),r}function dj(r,t,e){var a=ft(r).eventData;!r.silent&&!r.ignore&&!a&&(a=ft(r).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:r.name}),a&&(a.info=e.info)}function gj(r){r.registerComponentModel(hj),r.registerComponentView(cj),r.registerPreprocessor(function(t){var e=t.graphic;H(e)?!e[0]||!e[0].elements?t.graphic=[{elements:e}]:t.graphic=[t.graphic[0]]:e&&!e.elements&&(t.graphic=[{elements:[e]}])})}var WM=["x","y","radius","angle","single"],yj=mt(),mj=["cartesian2d","polar","singleAxis"];function _j(r){var t=r.get("coordinateSystem");return pt(mj,t)>=0}function Xn(r){return r+"Axis"}function Sj(r,t){var e=K(),a=[],n=K();r.eachComponent({mainType:"dataZoom",query:t},function(f){n.get(f.uid)||s(f)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(f){!n.get(f.uid)&&l(f)&&(s(f),i=!0)}function s(f){n.set(f.uid,!0),a.push(f),u(f)}function l(f){var v=!1;return f.eachTargetAxis(function(h,c){var p=e.get(h);p&&p[c]&&(v=!0)}),v}function u(f){f.eachTargetAxis(function(v,h){(e.get(v)||e.set(v,[]))[h]=!0})}return a}function nN(r){var t=r.ecModel,e={infoList:[],infoMap:K()};return r.eachTargetAxis(function(a,n){var i=t.getComponent(Xn(a),n);if(i){var o=i.getCoordSysModel();if(o){var s=o.uid,l=e.infoMap.get(s);l||(l={model:o,axisModels:[]},e.infoList.push(l),e.infoMap.set(s,l)),l.axisModels.push(i)}}}),e}function iN(r){var t=yj(GP(r));return t.axisProxyMap||(t.axisProxyMap=K())}function gp(r){if(r)return iN(r.ecModel).get(r.uid)}function xj(r,t){iN(r.ecModel).set(r.uid,t)}function oN(r,t){var e=t.getAxisModel().axis.__alignTo;return e&&r.getAxisProxy(e.dim,e.model.componentIndex)?gp(e.model):null}var Hy=(function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r})(),Gf=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,a,n){var i=UM(e);this.settledOption=i,this.mergeDefaultAndTheme(e,n),this._doInit(i)},t.prototype.mergeOption=function(e){var a=UM(e);yt(this.option,e,!0),yt(this.settledOption,a,!0),this._doInit(a)},t.prototype._doInit=function(e){var a=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;A([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(a[i[0]]=n[i[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),a=this._targetAxisInfoMap=K(),n=this._fillSpecifiedTargetAxis(a);n?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(a,this._orient)),this._noTarget=!0,a.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var a=!1;return A(WM,function(n){var i=this.getReferringComponents(Xn(n),lz);if(i.specified){a=!0;var o=new Hy;A(i.models,function(s){o.add(s.componentIndex)}),e.set(n,o)}},this),a},t.prototype._fillAutoTargetAxisByOrient=function(e,a){var n=this.ecModel,i=!0;if(i){var o=a==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=n.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===a}});l(s,"single")}function l(u,f){var v=u[0];if(v){var h=new Hy;if(h.add(v.componentIndex),e.set(f,h),i=!1,f==="x"||f==="y"){var c=v.getReferringComponents("grid",re).models[0];c&&A(u,function(p){v.componentIndex!==p.componentIndex&&c===p.getReferringComponents("grid",re).models[0]&&h.add(p.componentIndex)})}}}i&&A(WM,function(u){if(i){var f=n.findComponents({mainType:Xn(u),filter:function(h){return h.get("type",!0)==="category"}});if(f[0]){var v=new Hy;v.add(f[0].componentIndex),e.set(u,v),i=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(a){!e&&(e=a)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var a=this.ecModel.option;this.option.throttle=a.animation&&a.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var a=this._rangePropMode,n=this.get("rangeMode");A([["start","startValue"],["end","endValue"]],function(i,o){var s=e[i[0]]!=null,l=e[i[1]]!=null;s&&!l?a[o]="percent":!s&&l?a[o]="value":n?a[o]=n[o]:s&&(a[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(a,n){e==null&&(e=this.ecModel.getComponent(Xn(a),n))},this),e},t.prototype.eachTargetAxis=function(e,a){this._targetAxisInfoMap.each(function(n,i){A(n.indexList,function(o){e.call(a,i,o)})})},t.prototype.getAxisProxy=function(e,a){return gp(this.getAxisModel(e,a))},t.prototype.getAxisModel=function(e,a){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[a])return this.ecModel.getComponent(Xn(e),a)},t.prototype.setRawRange=function(e){var a=this.option,n=this.settledOption;A([["start","startValue"],["end","endValue"]],function(i){(e[i[0]]!=null||e[i[1]]!=null)&&(a[i[0]]=n[i[0]]=e[i[0]],a[i[1]]=n[i[1]]=e[i[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var a=this.option;A(["start","startValue","end","endValue"],function(n){a[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getWindow().percent},t.prototype.getValueRange=function(e,a){if(e==null&&a==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getWindow().value}else return this.getAxisProxy(e,a).getWindow().value},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return gp(e);for(var a,n=this._targetAxisInfoMap.keys(),i=0;io[1];if(_&&!S&&!x)return!0;_&&(g=!0),S&&(p=!0),x&&(d=!0)}return g&&p&&d})}else A(f,function(c){if(i==="empty")l.setData(u=u.map(c,function(d){return s(d)?d:NaN}));else{var p={};p[c]=o,u.selectRange(p)}});A(f,function(c){u.setApproximateExtent(o,c)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,a=this._extent;A(["min","max"],function(n){var i=e.get(n+"Span"),o=e.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=Et(a[0]+o,a,[0,100],!0):i!=null&&(o=Et(i,[0,100],a,!0)-a[0]),t[n+"Span"]=i,t[n+"ValueSpan"]=o},this)},r})(),Cj={dirtyOnOverallProgress:!0,getTargetSeries:function(r){function t(n){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(Xn(o),s);n(o,s,l,i)})})}var e=[];t(function(n,i,o,s){if(!gp(o)){var l=new Tj(n,i,s,r);e.push(l),xj(o,l)}});var a=K();return A(e,function(n){A(n.getTargetSeriesModels(),function(i){a.set(i.uid,i)})}),a},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){var a=[];e.eachTargetAxis(function(n,i){var o=e.getAxisProxy(n,i),s=oN(e,o);s?a.push([o,s]):o.reset(e,null)}),A(a,function(n){n[0].reset(e,n[1].getWindow().percentInverted)}),e.eachTargetAxis(function(n,i){e.getAxisProxy(n,i).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var a=e.findRepresentativeAxisProxy();if(a){var n=a.getWindow(),i=n.percent,o=n.value;e.setCalculatedRange({start:i[0],end:i[1],startValue:o[0],endValue:o[1]})}})}};function Aj(r){r.registerAction("dataZoom",function(t,e){var a=Sj(e,t);A(a,function(n){n.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var Mj=_l();function ux(r){Mj(r,function(){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,Cj),Aj(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"})})}function Dj(r){r.registerComponentModel(bj),r.registerComponentView(wj),ux(r)}var Ia=(function(){function r(){}return r})(),sN={};function Ps(r,t){sN[r]=t}function lN(r){return sN[r]}var Ij=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a,n){var i=n.getTheme().get("toolbox"),o=i?i.feature:null;o&&(this._themeFeatureOption=G({},o),i.feature={}),r.prototype.init.call(this,e,a,n),o&&(i.feature=o)},t.prototype.optionUpdated=function(){A(this.option.feature,function(e,a){var n=this._themeFeatureOption,i=lN(a);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(this.ecModel)),n&&n[a]&&(yt(e,n[a]),n[a]=null),yt(e,i.defaultOption))},this)},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:B.color.border,borderRadius:0,borderWidth:0,padding:B.size.m,itemSize:15,itemGap:B.size.s,showTitle:!0,iconStyle:{borderColor:B.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:B.color.accent70}},tooltip:{show:!1,position:"bottom"}},t})(wt);function uN(r,t){var e=Dl(t.get("padding")),a=t.getItemStyle(["color","opacity"]);a.fill=t.get("backgroundColor");var n=new bt({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:a,silent:!0,z2:-1});return n}var Lj=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,a,n,i){var o=this.group;if(o.removeAll(),!e.get("show"))return;var s=+e.get("itemSize"),l=e.get("orient")==="vertical",u=e.get("feature")||{},f=this._features||(this._features=K()),v=[];A(u,function(m,_){v.push(_)}),new Sn(this._featureNames||[],v).add(h).update(h).remove(St(h,null)).execute(),this._featureNames=Nt(v,function(m){return f.hasKey(m)});function h(m,_){var S=m!=null&&_==null,x=m!=null&&_!=null,b=m==null,w=S||x?v[m]:v[_],C=u[w],T=S||x?new Tt(C,e,a):null,M=T&&T.get("show"),D;if(S){if(!M)return;if(Pj(w))D={onclick:T.option.onclick,featureName:w};else{var L=lN(w);if(!L)return;D=new L}f.set(w,D)}else D=f.get(w);if(b||!M){YM(D)&&D.dispose&&D.dispose(a,n),f.removeKey(w);return}i&&i.newTitle!=null&&i.featureName===w&&(C.title=i.newTitle),S&&(D.uid=qo("toolbox-feature")),D.model=T,D.ecModel=a,D.api=n,c(T,D,w),T.setIconStatus=function(I,P){var R=this.option,E=this.iconPaths;R.iconStatus=R.iconStatus||{},R.iconStatus[I]=P,E[I]&&(P==="emphasis"?mn:_n)(E[I])},YM(D)&&D.render&&D.render(T,a,n,i)}function c(m,_,S){var x=m.getModel("iconStyle"),b=m.getModel(["emphasis","iconStyle"]),w=_ instanceof Ia&&_.getIcons?_.getIcons():m.get("icon"),C=m.get("title")||{},T,M;Z(w)?(T={},T[S]=w):T=w,Z(C)?(M={},M[S]=C):M=C;var D=m.iconPaths={};A(T,function(L,I){var P=Al(L,{},{x:-s/2,y:-s/2,width:s,height:s});P.setStyle(x.getItemStyle());var R=P.ensureState("emphasis");R.style=b.getItemStyle();var E=new Dt({style:{text:M[I],align:b.get("textAlign"),borderRadius:b.get("textBorderRadius"),padding:b.get("textPadding"),fill:null,font:i1({fontStyle:b.get("textFontStyle"),fontFamily:b.get("textFontFamily"),fontSize:b.get("textFontSize"),fontWeight:b.get("textFontWeight")},a)},ignore:!0});P.setTextContent(E),Mn({el:P,componentModel:e,itemName:I,formatterParamsExtra:{title:M[I]}}),P.__title=M[I],P.on("mouseover",function(){var O=b.getItemStyle(),k=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";E.setStyle({fill:b.get("textFill")||O.fill||O.stroke||B.color.neutral99,backgroundColor:b.get("textBackgroundColor")}),P.setTextConfig({position:b.get("textPosition")||k}),E.ignore=!e.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){m.get(["iconStatus",I])!=="emphasis"&&n.leaveEmphasis(this),E.hide()}),(m.get(["iconStatus",I])==="emphasis"?mn:_n)(P),o.add(P),P.on("click",q(_.onclick,_,a,n,I)),D[I]=P})}var p=me(e,n).refContainer,d=e.getBoxLayoutParams(),g=e.get("padding"),y=qt(d,p,g);ho(e.get("orient"),o,e.get("itemGap"),y.width,y.height),jp(o,d,p,g),o.add(uN(o.getBoundingRect(),e)),l||o.eachChild(function(m){var _=m.__title,S=m.ensureState("emphasis"),x=S.textConfig||(S.textConfig={}),b=m.getTextContent(),w=b&&b.ensureState("emphasis");if(w&&!at(w)&&_){var C=w.style||(w.style={}),T=Ep(_,Dt.makeFont(C)),M=m.x+o.x,D=m.y+o.y+s,L=!1;D+T.height>n.getHeight()&&(x.position="top",L=!0);var I=L?-5-T.height:s+10;M+T.width/2>n.getWidth()?(x.position=["100%",I],C.align="right"):M-T.width/2<0&&(x.position=[0,I],C.align="left")}})},t.prototype.updateView=function(e,a,n,i){A(this._features,function(o){o&&o instanceof Ia&&o.updateView&&o.updateView(o.model,a,n,i)})},t.prototype.dispose=function(e,a){A(this._features,function(n){n&&n instanceof Ia&&n.dispose&&n.dispose(e,a)})},t.type="toolbox",t})(Yt);function Pj(r){return r.indexOf("my")===0}function YM(r){return r instanceof Ia}var Rj=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,a){var n=this.model,i=n.get("name")||e.get("title.0.text")||"echarts",o=a.getZr().painter.getType()==="svg",s=o?"svg":n.get("type",!0)||"png",l=a.getConnectedDataURL({type:s,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||B.color.neutral00,connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=Mt.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=i+"."+s,f.target="_blank",f.href=l;var v=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(v)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),c=h[0].indexOf("base64")>-1,p=o?decodeURIComponent(h[1]):h[1];c&&(p=window.atob(p));var d=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,y=new Uint8Array(g);g--;)y[g]=p.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,d)}else{var _=document.createElement("iframe");document.body.appendChild(_);var S=_.contentWindow,x=S.document;x.open("image/svg+xml","replace"),x.write(p),x.close(),S.focus(),x.execCommand("SaveAs",!0,d),document.body.removeChild(_)}}else{var b=n.get("lang"),w='',C=window.open();C.document.write(w),C.document.title=i}},t.getDefaultOption=function(e){var a={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:B.color.neutral00,name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return a},t})(Ia),XM="__ec_magicType_stack__",Ej=[["line","bar"],["stack"]],kj=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,a=e.get("icon"),n={};return A(e.get("type"),function(i){a[i]&&(n[i]=a[i])}),n},t.getDefaultOption=function(e){var a={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return a},t.prototype.onclick=function(e,a,n){var i=this.model,o=i.get(["seriesIndex",n]);if(ZM[n]){var s={series:[]},l=function(v){var h=v.subType,c=v.id,p=ZM[n](h,c,v,i);p&&(st(p,v.option),s.series.push(p));var d=v.coordinateSystem;if(d&&d.type==="cartesian2d"&&(n==="line"||n==="bar")){var g=d.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",_=v.getReferringComponents(m,re).models[0],S=_.componentIndex;s[m]=s[m]||[];for(var x=0;x<=S;x++)s[m][S]=s[m][S]||{};s[m][S].boundaryGap=n==="bar"}}};A(Ej,function(v){pt(v,n)>=0&&A(v,function(h){i.setIconStatus(h,"normal")})}),i.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=n;n==="stack"&&(u=yt({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",n])!=="emphasis"&&(f="tiled")),a.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},t})(Ia),ZM={line:function(r,t,e,a){if(r==="bar")return yt({id:t,type:"line",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},a.get(["option","line"])||{},!0)},bar:function(r,t,e,a){if(r==="line")return yt({id:t,type:"bar",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},a.get(["option","bar"])||{},!0)},stack:function(r,t,e,a){var n=e.get("stack")===XM;if(r==="line"||r==="bar")return a.setIconStatus("stack",n?"normal":"emphasis"),yt({id:t,stack:n?"":XM},a.get(["option","stack"])||{},!0)}};aa({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,t){t.mergeOption(r.newOption)});var bd=new Array(60).join("-"),dl=" ";function Oj(r){var t={},e=[],a=[];return r.eachRawSeries(function(n){var i=n.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=yY(o);t[s]||(t[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},a.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(n)}else e.push(n)}else e.push(n)}),{seriesGroupByCategoryAxis:t,other:e,meta:a}}function Nj(r){var t=[];return A(r,function(e,a){var n=e.categoryAxis,i=e.valueAxis,o=i.dim,s=[" "].concat(W(e.series,function(c){return c.name})),l=[n.model.getCategories()];A(e.series,function(c){var p=c.getRawData();l.push(c.getRawData().mapArray(p.mapDimension(o),function(d){return d}))});for(var u=[s.join(dl)],f=0;f=0)return!0}var o_=new RegExp("["+dl+"]+","g");function Gj(r){for(var t=r.split(/\n+/g),e=yp(t.shift()).split(o_),a=[],n=W(e,function(l){return{name:l,data:[]}}),i=0;i=0;i--){var o=e[i];if(o[n])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(s){var l=s.getPercentRange();e[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),e.push(t)}function Xj(r){var t=fx(r),e=t[t.length-1];t.length>1&&t.pop();var a={};return fN(e,function(n,i){for(var o=t.length-1;o>=0;o--)if(n=t[o][i],n){a[i]=n;break}}),a}function Zj(r){vN(r).snapshots=null}function $j(r){return fx(r).length}function fx(r){var t=vN(r);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var qj=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,a){Zj(e),a.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){var a={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])};return a},t})(Ia);aa({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,t){t.resetOption("recreate")});var Kj=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],vx=(function(){function r(t,e,a){var n=this;this._targetInfoList=[];var i=$M(e,t);A(jj,function(o,s){(!a||!a.include||pt(a.include,s)>=0)&&o(i,n._targetInfoList)})}return r.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(a,n,i){if((a.coordRanges||(a.coordRanges=[])).push(n),!a.coordRange){a.coordRange=n;var o=Wy[a.brushType](0,i,n);a.__rangeOffset={offset:JM[a.brushType](o.values,a.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},r.prototype.matchOutputRanges=function(t,e,a){A(t,function(n){var i=this.findTargetInfo(n,e);i&&i!==!0&&A(i.coordSyses,function(o){var s=Wy[n.brushType](1,o,n.range,!0);a(n,s.values,o,e)})},this)},r.prototype.setInputRanges=function(t,e){A(t,function(a){var n=this.findTargetInfo(a,e);if(a.range=a.range||[],n&&n!==!0){a.panelId=n.panelId;var i=Wy[a.brushType](0,n.coordSys,a.coordRange),o=a.__rangeOffset;a.range=o?JM[a.brushType](i.values,o.offset,Jj(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(t,e){return W(this._targetInfoList,function(a){var n=a.getPanelRect();return{panelId:a.panelId,defaultBrushType:e?e(a):null,clipPath:yO(n),isTargetByCursor:_O(n,t,a.coordSysModel),getLinearBrushOtherExtent:mO(n)}})},r.prototype.controlSeries=function(t,e,a){var n=this.findTargetInfo(t,a);return n===!0||n&&pt(n.coordSyses,e.coordinateSystem)>=0},r.prototype.findTargetInfo=function(t,e){for(var a=this._targetInfoList,n=$M(e,t),i=0;ir[1]&&r.reverse(),r}function $M(r,t){return Hs(r,t,{includeMainTypes:Kj})}var jj={grid:function(r,t){var e=r.xAxisModels,a=r.yAxisModels,n=r.gridModels,i=K(),o={},s={};!e&&!a&&!n||(A(e,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),A(a,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),A(n,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,f=[];A(u.getCartesians(),function(v,h){(pt(e,v.getAxis("x").model)>=0||pt(a,v.getAxis("y").model)>=0)&&f.push(v)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:KM.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,t){A(r.geoModels,function(e){var a=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:a,coordSyses:[a],getPanelRect:KM.geo})})}},qM=[function(r,t){var e=r.xAxisModel,a=r.yAxisModel,n=r.gridModel;return!n&&e&&(n=e.axis.grid.model),!n&&a&&(n=a.axis.grid.model),n&&n===t.gridModel},function(r,t){var e=r.geoModel;return e&&e===t.geoModel}],KM={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys.view,t=gk(null,r);return VI(t,t,tp(null,r)),t}},Wy={lineX:St(jM,0),lineY:St(jM,1),rect:function(r,t,e,a){var n=r?t.pointToData([e[0][0],e[1][0]],a):t.dataToPoint([e[0][0],e[1][0]],a),i=r?t.pointToData([e[0][1],e[1][1]],a):t.dataToPoint([e[0][1],e[1][1]],a),o=[s_([n[0],i[0]]),s_([n[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,t,e,a){var n=[ke(),ke()],i=W(e,function(o){var s=r?t.pointToData(o,a):t.dataToPoint(o,a);return n[0][0]=Math.min(n[0][0],s[0]),n[1][0]=Math.min(n[1][0],s[1]),n[0][1]=Math.max(n[0][1],s[0]),n[1][1]=Math.max(n[1][1],s[1]),s});return{values:i,xyMinMax:n}}};function jM(r,t,e,a){var n=e.getAxis(["x","y"][r]),i=s_(W([0,1],function(s){return t?n.coordToData(n.toLocalCoord(a[s]),!0):n.toGlobalCoord(n.dataToCoord(a[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var JM={lineX:St(QM,0),lineY:St(QM,1),rect:function(r,t,e){return[[r[0][0]-e[0]*t[0][0],r[0][1]-e[0]*t[0][1]],[r[1][0]-e[1]*t[1][0],r[1][1]-e[1]*t[1][1]]]},polygon:function(r,t,e){return W(r,function(a,n){return[a[0]-e[0]*t[n][0],a[1]-e[1]*t[n][1]]})}};function QM(r,t,e,a){return[t[0]-a[r]*e[0],t[1]-a[r]*e[1]]}function Jj(r,t){var e=tD(r),a=tD(t),n=[e[0]/a[0],e[1]/a[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function tD(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var l_=A,Qj=az("toolbox-dataZoom_"),tJ={x:"width",y:"height"},eJ=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,a,n,i){this._brushController||(this._brushController=new kS(n.getZr()),this._brushController.on("brush",q(this._onBrush,this)).mount()),nJ(e,a,this,i,n),aJ(e,a)},t.prototype.onclick=function(e,a,n){rJ[n].call(this)},t.prototype.dispose=function(e,a){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var a=e.areas;if(!e.isEnd||!a.length)return;var n={},i=this.ecModel;this._brushController.updateCovers([]);var o=new vx(hx(this.model),i,{include:["grid"]});o.matchOutputRanges(a,i,function(u,f,v){if(v.type==="cartesian2d"){var h=v.master.getRect().clone(),c=u.brushType;c==="rect"?(s("x",v,h,f[0]),s("y",v,h,f[1])):s({lineX:"x",lineY:"y"}[c],v,h,f)}}),Yj(i,n),this._dispatchZoomAction(n);function s(u,f,v,h){var c=f.getAxis(u),p=c.model,d=l(u,p,i),g=d.findRepresentativeAxisProxy(p).getMinMaxSpan(),y=c.scale.getExtent();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(h=si(0,h.slice(),y,0,g.minValueSpan,g.maxValueSpan));var m=E_(y,v[tJ[u]],.5);d&&(n[d.id]={dataZoomId:d.id,startValue:isFinite(m)?Pt(h[0],m):h[0],endValue:isFinite(m)?Pt(h[1],m):h[1]})}function l(u,f,v){var h;return v.eachComponent({mainType:"dataZoom",subType:"select"},function(c){var p=c.getAxisModel(u,f.componentIndex);p&&(h=c)}),h}},t.prototype._dispatchZoomAction=function(e){var a=[];l_(e,function(n,i){a.push(rt(n))}),a.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:a})},t.getDefaultOption=function(e){var a={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:B.color.backgroundTint}};return a},t})(Ia),rJ={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(Xj(this.ecModel))}};function hx(r){var t={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function aJ(r,t){r.setIconStatus("back",$j(t)>1?"emphasis":"normal")}function nJ(r,t,e,a,n){var i=e._isZoomActive;a&&a.type==="takeGlobalCursor"&&(i=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),e._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new vx(hx(r),t,{include:["grid"]}),s=o.makePanelOpts(n,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});e._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}YG("dataZoom",function(r){var t=r.getComponent("toolbox",0),e=["feature","dataZoom"];if(!t||t.get(e)==null)return;var a=t.getModel(e),n=[],i=hx(a),o=Hs(r,i);l_(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),l_(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var v=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:a.get("filterMode",!0)||"filter",id:Qj+u+v};h[f]=v,n.push(h)}return n});function iJ(r){r.registerComponentModel(Ij),r.registerComponentView(Lj),Ps("saveAsImage",Rj),Ps("magicType",kj),Ps("dataView",Wj),Ps("dataZoom",eJ),Ps("restore",qj),_t(Dj)}var oJ=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click|mousewheel",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:B.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:B.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:B.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:B.color.tertiary,fontSize:14}},t})(wt);function hN(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function cN(r){if(Mt.domSupported){for(var t=document.documentElement.style,e=0,a=r.length;e-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var f=u*Math.PI/180,v=o+n,h=v*Math.abs(Math.cos(f))+v*Math.abs(Math.sin(f)),c=Math.round(((h-Math.SQRT2*n)/2+Math.SQRT2*n-(h-v)/2)*100)/100;s+=";"+i+":-"+c+"px";var p=t+" solid "+n+"px;",d=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+a+";"];return'
'}function cJ(r,t,e){var a="cubic-bezier(0.23,1,0.32,1)",n="",i="";return e&&(n=" "+r/2+"s "+a,i="opacity"+n+",visibility"+n),t||(n=" "+r+"s "+a,i+=(i.length?",":"")+(Mt.transformSupported?""+cx+n:",left"+n+",top"+n)),uJ+":"+i}function eD(r,t,e){var a=r.toFixed(0)+"px",n=t.toFixed(0)+"px";if(!Mt.transformSupported)return e?"top:"+n+";left:"+a+";":[["top",n],["left",a]];var i=Mt.transform3dSupported,o="translate"+(i?"3d":"")+"("+a+","+n+(i?",0":"")+")";return e?"top:0;left:0;"+cx+":"+o+";":[["top",0],["left",0],[pN,o]]}function pJ(r){var t=[],e=r.get("fontSize"),a=r.getTextColor();a&&t.push("color:"+a),t.push("font:"+r.getFont());var n=J(r.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+n+"px");var i=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return i&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+i),A(["decoration","align"],function(u){var f=r.get(u);f&&t.push("text-"+u+":"+f)}),t.join(";")}function dJ(r,t,e,a){var n=[],i=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),f=r.get("shadowOffsetY"),v=r.getModel("textStyle"),h=TP(r,"html"),c=u+"px "+f+"px "+s+"px "+l;return n.push("box-shadow:"+c),t&&i>0&&n.push(cJ(i,e,a)),o&&n.push("background-color:"+o),A(["width","color","radius"],function(p){var d="border-"+p,g=m1(d),y=r.get(g);y!=null&&n.push(d+":"+y+(p==="color"?"":"px"))}),n.push(pJ(v)),h!=null&&n.push("padding:"+Dl(h).join("px ")+"px"),n.join(";")+";"}function rD(r,t,e,a,n){var i=t&&t.painter;if(e){var o=i&&i.getViewportRoot();o&&yB(r,o,e,a,n)}else{r[0]=a,r[1]=n;var s=i&&i.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var gJ=(function(){function r(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Mt.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var n=this._zr=t.getZr(),i=e.appendTo,o=i&&(Z(i)?document.querySelector(i):yo(i)?i:at(i)&&i(t.getDom()));rD(this._styleCoord,n,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(a),this._api=t,this._container=o;var s=this;a.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},a.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,f=n.painter.getViewportRoot();Dr(f,l,!0),u.dispatch("mousemove",l)}},a.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),a=lJ(e,"position"),n=e.style;n.position!=="absolute"&&a!=="absolute"&&(n.position="relative")}var i=t.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var a=this.el,n=a.style,i=this._styleCoord;a.innerHTML?n.cssText=fJ+dJ(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+eD(i[0],i[1],!0)+("border-color:"+Mo(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,a,n,i){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(Z(i)&&a.get("trigger")==="item"&&!hN(a)&&(s=hJ(a,n,i)),Z(t))o.innerHTML=t+s;else if(t){o.innerHTML="",H(t)||(t=[t]);for(var l=0;l=0?this._tryShow(i,o):n==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,a=this._ecModel,n=this._api,i=e.get("triggerOn");if(e.get("trigger")!=="axis"&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(e,a,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,a,n,i){if(!(i.from===this.uid||Mt.node||!n.getDom())){var o=iD(i,n);this._ticket="";var s=i.dataByCoordSys,l=wJ(i,a,n);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var f=mJ;f.x=i.x,f.y=i.y,f.update(),ft(f).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:f},o)}else if(s)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(e,a,n,i))return;var v=KO(i,a),h=v.point[0],c=v.point[1];h!=null&&c!=null&&this._tryShow({offsetX:h,offsetY:c,target:v.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o))}},t.prototype.manuallyHideTip=function(e,a,n,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,i.from!==this.uid&&this._hide(iD(i,n))},t.prototype._manuallyAxisShowTip=function(e,a,n,i){var o=i.seriesIndex,s=i.dataIndex,l=a.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=a.getSeriesByIndex(o);if(u){var f=u.getData(),v=du([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(v.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},t.prototype._tryShow=function(e,a){var n=e.target,i=this._tooltipModel;if(i){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(n){var s=ft(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null,this._cbParamsList=null;var l,u;io(n,function(f){if(f.tooltipDisabled)return l=u=null,!0;l||u||(ft(f).dataIndex!=null?l=f:ft(f).tooltipConfig!=null&&(u=f))},!0),l?this._showSeriesItemTooltip(e,l,a):u?this._showComponentItemTooltip(e,u,a):this._hide(a)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(a)}},t.prototype._showOrMove=function(e,a){var n=e.get("showDelay");a=q(a,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(a,n):a()},t.prototype._showAxisTooltip=function(e,a){var n=this._ecModel,i=this._tooltipModel,o=[a.offsetX,a.offsetY],s=du([a.tooltipOption],i),l=this._renderMode,u=[],f=he("section",{blocks:[],noHeader:!0}),v=[],h=new _g;A(e,function(m){A(m.dataByAxis,function(_){var S=n.getComponent(_.axisDim+"Axis",_.axisIndex),x=_.value,b=S.axis,w=b.scale.parse(x);if(!(!S||x==null)){var C=XO(x,b,n,_.seriesDataIndices,_.valueLabelOpt),T=he("section",{header:C,noHeader:!gr(C),sortBlocks:!0,blocks:[]});f.blocks.push(T),A(_.seriesDataIndices,function(M){var D=n.getSeriesByIndex(M.seriesIndex),L=M.dataIndexInside,I=D.getDataParams(L);if(!(I.dataIndex<0)){I.axisDim=_.axisDim,I.axisIndex=_.axisIndex,I.axisType=_.axisType,I.axisId=_.axisId,I.axisValue=Gc(S.axis,{value:w}),I.axisValueLabel=C,I.marker=h.makeTooltipMarker("item",Mo(I.color),l);var P=hw(D.formatTooltip(L,!0,null)),R=P.frag;if(R){var E=du([D],i).get("valueFormatter");T.blocks.push(E?G({valueFormatter:E},R):R)}P.text&&v.push(P.text),u.push(I)}})}})}),f.blocks.reverse(),v.reverse();var c=a.position,p=s.get("order"),d=mw(f,h,l,p,n.get("useUTC"),s.get("textStyle"));d&&v.unshift(d);var g=l==="richText"?` `:"
",y=v.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,c,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],c,null,h)})},t.prototype._showSeriesItemTooltip=function(e,a,n){var i=this._ecModel,o=ft(a),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,v=o.dataType,h=u.getData(v),c=this._renderMode,p=e.positionDefault,d=du([h.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=d.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(f,v),m=new _g;y.marker=m.makeTooltipMarker("item",Mo(y.color),c);var _=hw(u.formatTooltip(f,!1,v)),S=d.get("order"),x=d.get("valueFormatter"),b=_.frag,w=b?mw(x?G({valueFormatter:x},b):b,m,c,S,i.get("useUTC"),d.get("textStyle")):_.text,C="item_"+u.name+"_"+f;this._showOrMove(d,function(){this._showTooltipContent(d,w,y,C,e.offsetX,e.offsetY,e.position,e.target,m)}),n({type:"showTip",dataIndexInside:f,dataIndex:h.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,a,n){var i=this._renderMode==="html",o=ft(a),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(Z(l)){var f=l;l={content:f,formatter:f},u=!0}u&&i&&l.content&&(l=rt(l),l.content=Ue(l.content));var v=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&v.push(h),v.push({formatter:l.content});var c=e.positionDefault,p=du(v,this._tooltipModel,c?{position:c}:null),d=p.get("content"),g=Math.random()+"",y=new _g;this._showOrMove(p,function(){var m=rt(p.get("formatterParams")||{});this._showTooltipContent(p,d,m,g,e.offsetX,e.offsetY,e.position,a,y)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,a,n,i,o,s,l,u,f){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var v=this._tooltipContent;v.setEnterable(e.get("enterable"));var h=e.get("formatter");l=l||e.get("position");var c=a,p=this._getNearestPoint([o,s],n,e.get("trigger"),e.get("borderColor"),e.get("defaultBorderColor",!0)),d=p.color;if(h)if(Z(h)){var g=e.ecModel.get("useUTC"),y=H(n)?n[0]:n,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;c=h,m&&(c=Qf(y.axisValue,c,g)),c=_1(c,n,!0)}else if(at(h)){var _=q(function(S,x){S===this._ticket&&(v.setContent(x,f,e,d,l),this._updatePosition(e,l,o,s,v,n,u))},this);this._ticket=i,c=h(n,i,_)}else c=h;v.setContent(c,f,e,d,l),v.show(e,d),this._updatePosition(e,l,o,s,v,n,u)}},t.prototype._getNearestPoint=function(e,a,n,i,o){if(n==="axis"||H(a))return{color:i||o};if(!H(a))return{color:i||a.color||a.borderColor}},t.prototype._updatePosition=function(e,a,n,i,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();a=a||e.get("position");var v=o.getSize(),h=e.get("align"),c=e.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),at(a)&&(a=a([n,i],s,o.el,p,{viewSize:[u,f],contentSize:v.slice()})),H(a))n=$(a[0],u),i=$(a[1],f);else if(lt(a)){var d=a;d.width=v[0],d.height=v[1];var g=qt(d,{width:u,height:f});n=g.x,i=g.y,h=null,c=null}else if(Z(a)&&l){var y=bJ(a,p,v,e.get("borderWidth"));n=y[0],i=y[1]}else{var y=SJ(n,i,o,u,f,h?null:20,c?null:20);n=y[0],i=y[1]}if(h&&(n-=oD(h)?v[0]/2:h==="right"?v[0]:0),c&&(i-=oD(c)?v[1]/2:c==="bottom"?v[1]:0),hN(e)){var y=xJ(n,i,o,u,f);n=y[0],i=y[1]}o.moveTo(n,i)},t.prototype._updateContentNotChangedOnAxis=function(e,a){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===e.length;return o&&A(n,function(s,l){var u=s.dataByAxis||[],f=e[l]||{},v=f.dataByAxis||[];o=o&&u.length===v.length,o&&A(u,function(h,c){var p=v[c]||{},d=h.seriesDataIndices||[],g=p.seriesDataIndices||[];o=o&&h.value===p.value&&h.axisType===p.axisType&&h.axisId===p.axisId&&d.length===g.length,o&&A(d,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),i&&A(h.seriesDataIndices,function(y){var m=y.seriesIndex,_=a[m],S=i[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=a,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,a){Mt.node||!a.getDom()||(gf(this,"_updatePosition"),this._tooltipContent.dispose(),t_("itemTooltip",a),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type="tooltip",t})(Yt);function du(r,t,e){var a=t.ecModel,n;e?(n=new Tt(e,a,a),n=new Tt(t.option,n,a)):n=t;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof Tt&&(o=o.get("tooltip",!0)),Z(o)&&(o={formatter:o}),o&&(n=new Tt(o,n,a)))}return n}function iD(r,t){return r.dispatchAction||q(t.dispatchAction,t)}function SJ(r,t,e,a,n,i,o){var s=e.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>a?r-=l+i:r+=i),o!=null&&(t+u+o>n?t-=u+o:t+=o),[r,t]}function xJ(r,t,e,a,n){var i=e.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,a)-o,t=Math.min(t+s,n)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function bJ(r,t,e,a){var n=e[0],i=e[1],o=Math.ceil(Math.SQRT2*a)+8,s=0,l=0,u=t.width,f=t.height;switch(r){case"inside":s=t.x+u/2-n/2,l=t.y+f/2-i/2;break;case"top":s=t.x+u/2-n/2,l=t.y-i-o;break;case"bottom":s=t.x+u/2-n/2,l=t.y+f+o;break;case"left":s=t.x-n-o,l=t.y+f/2-i/2;break;case"right":s=t.x+u+o,l=t.y+f/2-i/2}return[s,l]}function oD(r){return r==="center"||r==="middle"}function wJ(r,t,e){var a=z_(r).queryOptionMap,n=a.keys()[0];if(!(!n||n==="series")){var i=ml(t,n,a.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=ft(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}function TJ(r){_t(vv),r.registerComponentModel(oJ),r.registerComponentView(_J),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},te),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},te)}var CJ=["rect","polygon","keep","clear"];function AJ(r,t){var e=Ut(r?r.brush:[]);if(e.length){var a=[];A(e,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var n=r&&r.toolbox;H(n)&&(n=n[0]),n||(n={feature:{}},r.toolbox=[n]);var i=n.feature||(n.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),Vp(s,function(l){return l+""},null),t&&!s.length&&s.push.apply(s,CJ)}}var sD=A;function lD(r){if(r){for(var t in r)if(r.hasOwnProperty(t))return!0}}function u_(r,t,e){var a={};return sD(t,function(i){var o=a[i]=n();sD(r[i],function(s,l){if(be.isValidType(l)){var u={type:l,visual:s};e&&e(u,i),o[l]=new be(u),l==="opacity"&&(u=rt(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new be(u))}})}),a;function n(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function gN(r,t,e){var a;A(e,function(n){t.hasOwnProperty(n)&&lD(t[n])&&(a=!0)}),a&&A(e,function(n){t.hasOwnProperty(n)&&lD(t[n])?r[n]=rt(t[n]):delete r[n]})}function MJ(r,t,e,a,n,i){var o={};A(r,function(v){var h=be.prepareVisualTypes(t[v]);o[v]=h});var s;function l(v){return I1(e,s,v)}function u(v,h){kP(e,s,v,h)}e.each(f);function f(v,h){s=v;var c=e.getRawDataItem(s);if(!(c&&c.visualMap===!1))for(var p=a.call(n,v),d=t[p],g=o[p],y=0,m=g.length;yt[0][1]&&(t[0][1]=i[0]),i[1]t[1][1]&&(t[1][1]=i[1])}return t&&cD(t)}};function cD(r){return new ot(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var NJ=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){this.ecModel=e,this.api=a,this.model,(this._brushController=new kS(a.getZr())).on("brush",q(this._onBrush,this)).mount()},t.prototype.render=function(e,a,n,i){this.model=e,this._updateController(e,a,n,i)},t.prototype.updateTransform=function(e,a,n,i){yN(a),this._updateController(e,a,n,i)},t.prototype.updateVisual=function(e,a,n,i){this.updateTransform(e,a,n,i)},t.prototype.updateView=function(e,a,n,i){this._updateController(e,a,n,i)},t.prototype._updateController=function(e,a,n,i){(!i||i.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var a=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:rt(n),$from:a}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:rt(n),$from:a})},t.type="brush",t})(Yt),BJ=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.areas=[],e.brushOption={},e}return t.prototype.optionUpdated=function(e,a){var n=this.option;!a&&gN(n,e,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:this.option.defaultOutOfBrushColor},i.hasOwnProperty("liftZ")||(i.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=W(e,function(a){return pD(this.option,a)},this))},t.prototype.setBrushOption=function(e){this.brushOption=pD(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:B.color.backgroundTint,borderColor:B.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:B.color.disabled},t})(wt);function pD(r,t){return yt({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Tt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},t,!0)}var VJ=["rect","polygon","lineX","lineY","keep","clear"],zJ=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,a,n){var i,o,s;a.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,A(e.get("type",!0),function(l){e.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},t.prototype.updateView=function(e,a,n){this.render(e,a,n)},t.prototype.getIcons=function(){var e=this.model,a=e.get("icon",!0),n={};return A(e.get("type",!0),function(i){a[i]&&(n[i]=a[i])}),n},t.prototype.onclick=function(e,a,n){var i=this._brushType,o=this._brushMode;n==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?i:i===n?!1:n,brushMode:n==="keep"?o==="multiple"?"single":"multiple":o}})},t.getDefaultOption=function(e){var a={show:!0,type:VJ.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:e.getLocaleModel().get(["toolbox","brush","title"])};return a},t})(Ia);function GJ(r){r.registerComponentView(NJ),r.registerComponentModel(BJ),r.registerPreprocessor(AJ),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,LJ),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(a){a.setAreas(t.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},te),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},te),Ps("brush",zJ)}var FJ=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:B.size.m,backgroundColor:B.color.transparent,borderColor:B.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:B.color.primary},subtextStyle:{fontSize:12,color:B.color.quaternary}},t})(wt),HJ=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){if(this.group.removeAll(),!!e.get("show")){var i=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=J(e.get("textBaseline"),e.get("textVerticalAlign")),f=new Dt({style:Wt(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),v=f.getBoundingRect(),h=e.get("subtext"),c=new Dt({style:Wt(s,{text:h,fill:s.getTextColor(),y:v.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=e.get("link"),d=e.get("sublink"),g=e.get("triggerEvent",!0);f.silent=!p&&!g,c.silent=!d&&!g,p&&f.on("click",function(){Mc(p,"_"+e.get("target"))}),d&&c.on("click",function(){Mc(d,"_"+e.get("subtarget"))}),ft(f).eventData=ft(c).eventData=g?{componentType:"title",componentIndex:e.componentIndex}:null,i.add(f),h&&i.add(c);var y=i.getBoundingRect(),m=e.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=me(e,n),S=qt(m,_.refContainer,e.get("padding"));l||(l=e.get("left")||e.get("right"),l==="middle"&&(l="center"),l==="right"?S.x+=S.width:l==="center"&&(S.x+=S.width/2)),u||(u=e.get("top")||e.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?S.y+=S.height:u==="middle"&&(S.y+=S.height/2),u=u||"top"),i.x=S.x,i.y=S.y,i.markRedraw();var x={align:l,verticalAlign:u};f.setStyle(x),c.setStyle(x),y=i.getBoundingRect();var b=S.margin,w=e.getItemStyle(["color","opacity"]);w.fill=e.get("backgroundColor");var C=new bt({shape:{x:y.x-b[3],y:y.y-b[0],width:y.width+b[1]+b[3],height:y.height+b[0]+b[2],r:e.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});i.add(C)}},t.type="title",t})(Yt);function WJ(r){r.registerComponentModel(FJ),r.registerComponentView(HJ)}var dD=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode="box",e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n),this._initData()},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){e==null&&(e=this.option.currentIndex);var a=this._data.count();this.option.loop?e=(e%a+a)%a:(e>=a&&(e=a-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e=this.option,a=e.data||[],n=e.axisType,i=this._names=[],o;n==="category"?(o=[],A(a,function(u,f){var v=pe(yl(u),""),h;lt(u)?(h=rt(u),h.value=f):h=f,o.push(h),i.push(v)})):o=a;var s={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new Ze([{name:"value",type:s}],this);l.initData(o,i)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:B.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:B.color.secondary},data:[]},t})(wt),mN=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline.slider",t.defaultOption=ci(dD.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:B.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:B.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:B.color.tertiary},itemStyle:{color:B.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:B.color.accent50,borderColor:B.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:B.color.accent50,borderColor:B.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:B.color.accent60},itemStyle:{color:B.color.accent60,borderColor:B.color.accent60},controlStyle:{color:B.color.accent70,borderColor:B.color.accent70}},progress:{lineStyle:{color:B.color.accent30},itemStyle:{color:B.color.accent40}},data:[]}),t})(dD);ue(mN,Qp.prototype);var UJ=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline",t})(Yt),YJ=(function(r){N(t,r);function t(e,a,n,i){var o=r.call(this,e,a,n)||this;return o.type=i||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t})(Ur),Yy=Math.PI,gD=mt(),XJ=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){this.api=a},t.prototype.render=function(e,a,n){if(this.model=e,this.api=n,this.ecModel=a,this.group.removeAll(),e.get("show",!0)){var i=this._layout(e,n),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,e);e.formatTooltip=function(u){var f=l.scale.getLabel({value:u});return he("nameValue",{noName:!0,value:f})},A(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,e)},this),this._renderAxisLabel(i,s,l,e),this._position(i,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,a){var n=e.get(["label","position"]),i=e.get("orient"),o=ZJ(e,a),s;n==null||n==="auto"?s=i==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},f={horizontal:0,vertical:Yy/2},v=i==="vertical"?o.height:o.width,h=e.getModel("controlStyle"),c=h.get("show",!0),p=c?h.get("itemSize"):0,d=c?h.get("itemGap"):0,g=p+d,y=e.get(["label","rotate"])||0;y=y*Yy/180;var m,_,S,x=h.get("position",!0),b=c&&h.get("showPlayBtn",!0),w=c&&h.get("showPrevBtn",!0),C=c&&h.get("showNextBtn",!0),T=0,M=v;x==="left"||x==="bottom"?(b&&(m=[0,0],T+=g),w&&(_=[T,0],T+=g),C&&(S=[M-p,0],M-=g)):(b&&(m=[M-p,0],M-=g),w&&(_=[0,0],T+=g),C&&(S=[M-p,0],M-=g));var D=[T,M];return e.get("inverse")&&D.reverse(),{viewRect:o,mainLength:v,orient:i,rotation:f[i],labelRotation:y,labelPosOpt:s,labelAlign:e.get(["label","align"])||l[i],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||u[i],playPosition:m,prevBtnPosition:_,nextBtnPosition:S,axisExtent:D,controlSize:p,controlGap:d}},t.prototype._position=function(e,a){var n=this._mainGroup,i=this._labelGroup,o=e.viewRect;if(e.orient==="vertical"){var s=Kt(),l=o.x,u=o.y+o.height;ta(s,s,[-l,-u]),Cn(s,s,-Yy/2),ta(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var f=m(o),v=m(n.getBoundingRect()),h=m(i.getBoundingRect()),c=[n.x,n.y],p=[i.x,i.y];p[0]=c[0]=f[0][0];var d=e.labelPosOpt;if(d==null||Z(d)){var g=d==="+"?0:1;_(c,v,f,1,g),_(p,h,f,1,1-g)}else{var g=d>=0?0:1;_(c,v,f,1,g),p[1]=c[1]+d}n.setPosition(c),i.setPosition(p),n.rotation=i.rotation=e.rotation,y(n),y(i);function y(S){S.originX=f[0][0]-S.x,S.originY=f[1][0]-S.y}function m(S){return[[S.x,S.x+S.width],[S.y,S.y+S.height]]}function _(S,x,b,w,C){S[w]+=b[w][C]-x[w][C]}},t.prototype._createAxis=function(e,a){var n=a.getData(),i=a.get("axisType")||a.get("type");i!=="category"&&i!=="time"&&(i="value");var o=kl(a,i,!1);o.getTicks=function(){return n.mapArray(["value"],function(u){return{value:u}})};var s=n.getDataExtent("value");o.setExtent(s[0],s[1]),BR(o,{fixMinMax:[!0,!0]});var l=new YJ("value",o,e.axisExtent,i);return l.model=a,l},t.prototype._createGroup=function(e){var a=this[e]=new it;return this.group.add(a),a},t.prototype._renderAxisLine=function(e,a,n,i){var o=n.getExtent();if(i.get(["lineStyle","show"])){var s=new oe({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:G({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});a.add(s);var l=this._progressLine=new oe({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:st({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});a.add(l)}},t.prototype._renderAxisTick=function(e,a,n,i){var o=this,s=i.getData(),l=n.scale.getTicks();this._tickSymbols=[],A(l,function(u){var f=n.dataToCoord(u.value),v=s.getItemModel(u.value),h=v.getModel("itemStyle"),c=v.getModel(["emphasis","itemStyle"]),p=v.getModel(["progress","itemStyle"]),d={x:f,y:0,onclick:q(o._changeTimeline,o,u.value)},g=yD(v,h,a,d);g.ensureState("emphasis").style=c.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),jn(g);var y=ft(g);v.get("tooltip")?(y.dataIndex=u.value,y.dataModel=i):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},t.prototype._renderAxisLabel=function(e,a,n,i){var o=this,s=n.getLabelModel();if(s.get("show")){var l=i.getData(),u=n.getViewLabels();this._tickLabels=[],A(u,function(f){if(!f.tick.offInterval){var v=f.tick.value,h=l.getItemModel(v),c=h.getModel("label"),p=h.getModel(["emphasis","label"]),d=h.getModel(["progress","label"]),g=n.dataToCoord(v),y=new Dt({x:g,y:0,rotation:e.labelRotation-e.rotation,onclick:q(o._changeTimeline,o,v),silent:!1,style:Wt(c,{text:f.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});y.ensureState("emphasis").style=Wt(p),y.ensureState("progress").style=Wt(d),a.add(y),jn(y),gD(y).dataIndex=v,o._tickLabels.push(y)}})}},t.prototype._renderControl=function(e,a,n,i){var o=e.controlSize,s=e.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),f=i.getPlayState(),v=i.get("inverse",!0);h(e.nextBtnPosition,"next",q(this._changeTimeline,this,v?"-":"+")),h(e.prevBtnPosition,"prev",q(this._changeTimeline,this,v?"+":"-")),h(e.playPosition,f?"stop":"play",q(this._handlePlayClick,this,!f),!0);function h(c,p,d,g){if(c){var y=Pa(J(i.get(["controlStyle",p+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=$J(i,p+"Icon",m,{x:c[0],y:c[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:d});_.ensureState("emphasis").style=u,a.add(_),jn(_)}}},t.prototype._renderCurrentPointer=function(e,a,n,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,f={onCreate:function(v){v.draggable=!0,v.drift=q(u._handlePointerDrag,u),v.ondragend=q(u._handlePointerDragend,u),mD(v,u._progressLine,s,n,i,!0)},onUpdate:function(v){mD(v,u._progressLine,s,n,i)}};this._currentPointer=yD(l,l,this._mainGroup,{},this._currentPointer,f)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,a,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,a){var n=this._toAxisCoord(e)[0],i=this._axis,o=De(i.getExtent().slice());n>o[1]&&(n=o[1]),n=0&&(s[o]=+s[o].toFixed(p)),[s,c]}var Mh={min:St(Ah,"min"),max:St(Ah,"max"),average:St(Ah,"average"),median:St(Ah,"median")};function Ff(r,t){if(t){var e=r.getData(),a=r.coordinateSystem,n=a&&a.dimensions;if(!tQ(t)&&!H(t.coord)&&H(n)){var i=_N(t,e,a,r);if(t=rt(t),t.type&&Mh[t.type]&&i.baseAxis&&i.valueAxis){var o=pt(n,i.baseAxis.dim),s=pt(n,i.valueAxis.dim),l=Mh[t.type](e,i.valueAxis.dim,i.baseDataDim,i.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!H(n)){t.coord=[];var u=r.getBaseAxis();if(u&&t.type&&Mh[t.type]){var f=a.getOtherAxis(u);f&&(t.value=mp(e,e.mapDimension(f.dim),t.type))}}else for(var v=t.coord,h=0;h<2;h++)Mh[v[h]]&&(v[h]=mp(e,e.mapDimension(n[h]),v[h]));return t}}function _N(r,t,e,a){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?t.getDimension(r.valueIndex):r.valueDim,n.valueAxis=e.getAxis(eQ(a,n.valueDataDim)),n.baseAxis=e.getOtherAxis(n.valueAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim)):(n.baseAxis=a.getBaseAxis(),n.valueAxis=e.getOtherAxis(n.baseAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim),n.valueDataDim=t.mapDimension(n.valueAxis.dim)),n}function eQ(r,t){var e=r.getData().getDimensionInfo(t);return e&&e.coordDim}function Hf(r,t){return r&&r.containData&&t.coord&&!v_(t)?r.containData(t.coord):!0}function rQ(r,t,e){return r&&r.containZone&&t.coord&&e.coord&&!v_(t)&&!v_(e)?r.containZone(t.coord,e.coord):!0}function SN(r,t){return r?function(e,a,n,i){var o=i<2?e.coord&&e.coord[i]:e.value;return Jn(o,t[i])}:function(e,a,n,i){return Jn(e.value,t[i])}}function mp(r,t,e){if(e==="average"){var a=0,n=0;return r.each(t,function(i,o){isNaN(i)||(a+=i,n++)}),a/n}else return e==="median"?r.getMedian(t):r.getDataExtent(t)[e==="max"?1:0]}var Xy=mt(),dx=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this.markerGroupMap=K()},t.prototype.render=function(e,a,n){var i=this,o=this.markerGroupMap;o.each(function(s){Xy(s).keep=!1}),a.eachSeries(function(s){var l=za.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,a,n)}),o.each(function(s){!Xy(s).keep&&i.group.remove(s.group)}),aQ(a,o,this.type)},t.prototype.markKeep=function(e){Xy(e).keep=!0},t.prototype.toggleBlurSeries=function(e,a){var n=this;A(e,function(i){var o=za.getMarkerModelFromSeries(i,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(a?$L(l):$_(l))})}})},t.type="marker",t})(Yt);function aQ(r,t,e){r.eachSeries(function(a){var n=za.getMarkerModelFromSeries(a,e),i=t.get(a.id);if(n&&i&&i.group){var o=Ao(n),s=o.z,l=o.zlevel;$p(i.group,s,l)}})}function SD(r,t,e){var a=t.coordinateSystem,n=e.getWidth(),i=e.getHeight(),o=a&&a.getArea&&a.getArea();r.each(function(s){var l=r.getItemModel(s),u=l.get("relativeTo")==="coordinate",f=u?o?o.width:0:n,v=u?o?o.height:0:i,h=u&&o?o.x:0,c=u&&o?o.y:0,p,d=$(l.get("x"),f)+h,g=$(l.get("y"),v)+c;if(!isNaN(d)&&!isNaN(g))p=[d,g];else if(t.getMarkerPosition)p=t.getMarkerPosition(r.getValues(r.dimensions,s));else if(a){var y=r.get(a.dimensions[0],s),m=r.get(a.dimensions[1],s);p=a.dataToPoint([y,m])}isNaN(d)||(p[0]=d),isNaN(g)||(p[1]=g),r.setItemLayout(s,p)})}var nQ=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,n){a.eachSeries(function(i){var o=za.getMarkerModelFromSeries(i,"markPoint");o&&(SD(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},t.prototype.renderSeries=function(e,a,n,i){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new sv),v=iQ(o,e,a);a.setData(v),SD(a.getData(),e,i),v.each(function(h){var c=v.getItemModel(h),p=c.getShallow("symbol"),d=c.getShallow("symbolSize"),g=c.getShallow("symbolRotate"),y=c.getShallow("symbolOffset"),m=c.getShallow("symbolKeepAspect");if(at(p)||at(d)||at(g)||at(y)){var _=a.getRawValue(h),S=a.getDataParams(h);at(p)&&(p=p(_,S)),at(d)&&(d=d(_,S)),at(g)&&(g=g(_,S)),at(y)&&(y=y(_,S))}var x=c.getModel("itemStyle").getItemStyle(),b=c.get("z2"),w=ev(l,"color");x.fill||(x.fill=w),v.setItemVisual(h,{z2:J(b,0),symbol:p,symbolSize:d,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:x})}),f.updateData(v),this.group.add(f.group),v.eachItemGraphicEl(function(h){h.traverse(function(c){ft(c).dataModel=a})}),this.markKeep(f),f.group.silent=a.get("silent")||e.get("silent")},t.type="markPoint",t})(dx);function iQ(r,t,e){var a;r?a=W(r&&r.dimensions,function(s){var l=t.getData(),u=l.getDimensionInfo(l.mapDimension(s))||{};return G(G({},u),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new Ze(a,e),i=W(e.get("data"),St(Ff,t));r&&(i=Nt(i,St(Hf,r)));var o=SN(!!r,a);return n.initData(i,null,o),n}function oQ(r){r.registerComponentModel(QJ),r.registerComponentView(nQ),r.registerPreprocessor(function(t){px(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var sQ=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,a,n){return new t(e,a,n)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t})(za),Dh=mt(),lQ=function(r,t,e,a){var n=r.getData(),i;if(H(a))i=a;else{var o=a.type;if(o==="min"||o==="max"||o==="average"||o==="median"||a.xAxis!=null||a.yAxis!=null){var s=void 0,l=void 0;if(a.yAxis!=null||a.xAxis!=null)s=t.getAxis(a.yAxis!=null?"y":"x"),l=Ye(a.yAxis,a.xAxis);else{var u=_N(a,n,t,r);s=u.valueAxis;var f=W1(n,u.valueDataDim);l=mp(n,f,o)}var v=s.dim==="x"?0:1,h=1-v,c=rt(a),p={coord:[]};c.type=null,c.coord=[],c.coord[h]=-1/0,p.coord[h]=1/0;var d=e.get("precision");d>=0&&It(l)&&(l=+l.toFixed(Math.min(d,20))),c.coord[v]=p.coord[v]=l,i=[c,p,{type:o,valueIndex:a.valueIndex,value:l}]}else i=[]}var g=[Ff(r,i[0]),Ff(r,i[1]),G({},i[2])];return g[2].type=g[2].type||null,yt(g[2],g[0]),yt(g[2],g[1]),g};function _p(r){return!isNaN(r)&&!isFinite(r)}function xD(r,t,e,a){var n=1-r,i=a.dimensions[r];return _p(t[n])&&_p(e[n])&&t[r]===e[r]&&a.getAxis(i).containData(t[r])}function uQ(r,t){if(r.type==="cartesian2d"){var e=t[0].coord,a=t[1].coord;if(e&&a&&(xD(1,e,a,r)||xD(0,e,a,r)))return!0}return Hf(r,t[0])&&Hf(r,t[1])}function Zy(r,t,e,a,n){var i=a.coordinateSystem,o=r.getItemModel(t),s,l=$(o.get("x"),n.getWidth()),u=$(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(r.getValues(r.dimensions,t));else{var f=i.dimensions,v=r.get(f[0],t),h=r.get(f[1],t);s=i.dataToPoint([v,h])}if(Eo(i,"cartesian2d")){var c=i.getAxis("x"),p=i.getAxis("y"),f=i.dimensions;_p(r.get(f[0],t))?s[0]=c.toGlobalCoord(c.getExtent()[e?0:1]):_p(r.get(f[1],t))&&(s[1]=p.toGlobalCoord(p.getExtent()[e?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(t,s)}var fQ=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,n){a.eachSeries(function(i){var o=za.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=Dh(o).from,u=Dh(o).to;l.each(function(f){Zy(l,f,!0,i,n),Zy(u,f,!1,i,n)}),s.each(function(f){s.setItemLayout(f,[l.getItemLayout(f),u.getItemLayout(f)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,a,n,i){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new ES);this.group.add(f.group);var v=vQ(o,e,a),h=v.from,c=v.to,p=v.line;Dh(a).from=h,Dh(a).to=c,a.setData(p);var d=a.get("symbol"),g=a.get("symbolSize"),y=a.get("symbolRotate"),m=a.get("symbolOffset");H(d)||(d=[d,d]),H(g)||(g=[g,g]),H(y)||(y=[y,y]),H(m)||(m=[m,m]),v.from.each(function(S){_(h,S,!0),_(c,S,!1)}),p.each(function(S){var x=p.getItemModel(S),b=x.getModel("lineStyle").getLineStyle();p.setItemLayout(S,[h.getItemLayout(S),c.getItemLayout(S)]);var w=x.get("z2");b.stroke==null&&(b.stroke=h.getItemVisual(S,"style").fill),p.setItemVisual(S,{z2:J(w,0),fromSymbolKeepAspect:h.getItemVisual(S,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(S,"symbolOffset"),fromSymbolRotate:h.getItemVisual(S,"symbolRotate"),fromSymbolSize:h.getItemVisual(S,"symbolSize"),fromSymbol:h.getItemVisual(S,"symbol"),toSymbolKeepAspect:c.getItemVisual(S,"symbolKeepAspect"),toSymbolOffset:c.getItemVisual(S,"symbolOffset"),toSymbolRotate:c.getItemVisual(S,"symbolRotate"),toSymbolSize:c.getItemVisual(S,"symbolSize"),toSymbol:c.getItemVisual(S,"symbol"),style:b})}),f.updateData(p),v.line.eachItemGraphicEl(function(S){ft(S).dataModel=a,S.traverse(function(x){ft(x).dataModel=a})});function _(S,x,b){var w=S.getItemModel(x);Zy(S,x,b,e,i);var C=w.getModel("itemStyle").getItemStyle();C.fill==null&&(C.fill=ev(l,"color")),S.setItemVisual(x,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:J(w.get("symbolOffset",!0),m[b?0:1]),symbolRotate:J(w.get("symbolRotate",!0),y[b?0:1]),symbolSize:J(w.get("symbolSize"),g[b?0:1]),symbol:J(w.get("symbol",!0),d[b?0:1]),style:C})}this.markKeep(f),f.group.silent=a.get("silent")||e.get("silent")},t.type="markLine",t})(dx);function vQ(r,t,e){var a;r?a=W(r&&r.dimensions,function(u){var f=t.getData(),v=f.getDimensionInfo(f.mapDimension(u))||{};return G(G({},v),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new Ze(a,e),i=new Ze(a,e),o=new Ze([],e),s=W(e.get("data"),St(lQ,t,r,e));r&&(s=Nt(s,St(uQ,r)));var l=SN(!!r,a);return n.initData(W(s,function(u){return u[0]}),null,l),i.initData(W(s,function(u){return u[1]}),null,l),o.initData(W(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}function hQ(r){r.registerComponentModel(sQ),r.registerComponentView(fQ),r.registerPreprocessor(function(t){px(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var cQ=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,a,n){return new t(e,a,n)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t})(za),Ih=mt(),pQ=function(r,t,e,a){var n=a[0],i=a[1];if(!(!n||!i)){var o=Ff(r,n),s=Ff(r,i),l=o.coord,u=s.coord;l[0]=Ye(l[0],-1/0),l[1]=Ye(l[1],-1/0),u[0]=Ye(u[0],1/0),u[1]=Ye(u[1],1/0);var f=Dp([{},o,s]);return f.coord=[o.coord,s.coord],f.x0=o.x,f.y0=o.y,f.x1=s.x,f.y1=s.y,f}};function Sp(r){return!isNaN(r)&&!isFinite(r)}function bD(r,t,e,a){var n=1-r;return Sp(t[n])&&Sp(e[n])}function dQ(r,t){var e=t.coord[0],a=t.coord[1],n={coord:e,x:t.x0,y:t.y0},i={coord:a,x:t.x1,y:t.y1};return Eo(r,"cartesian2d")?e&&a&&(bD(1,e,a)||bD(0,e,a))?!0:rQ(r,n,i):Hf(r,n)||Hf(r,i)}function wD(r,t,e,a,n){var i=a.coordinateSystem,o=r.getItemModel(t),s,l=$(o.get(e[0]),n.getWidth()),u=$(o.get(e[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition){var f=r.getValues(["x0","y0"],t),v=r.getValues(["x1","y1"],t),h=i.clampData(f),c=i.clampData(v),p=[];e[0]==="x0"?p[0]=h[0]>c[0]?v[0]:f[0]:p[0]=h[0]>c[0]?f[0]:v[0],e[1]==="y0"?p[1]=h[1]>c[1]?v[1]:f[1]:p[1]=h[1]>c[1]?f[1]:v[1],s=a.getMarkerPosition(p,e,!0)}else{var d=r.get(e[0],t),g=r.get(e[1],t),y=[d,g];i.clampData&&i.clampData(y,y),s=i.dataToPoint(y,!0)}if(Eo(i,"cartesian2d")){var m=i.getAxis("x"),_=i.getAxis("y"),d=r.get(e[0],t),g=r.get(e[1],t);Sp(d)?s[0]=m.toGlobalCoord(m.getExtent()[e[0]==="x0"?0:1]):Sp(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[e[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var TD=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],gQ=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,n){a.eachSeries(function(i){var o=za.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=W(TD,function(v){return wD(s,l,v,i,n)});s.setItemLayout(l,u);var f=s.getItemGraphicEl(l);f.setShape("points",u)})}},this)},t.prototype.renderSeries=function(e,a,n,i){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,{group:new it});this.group.add(f.group),this.markKeep(f);var v=yQ(o,e,a);a.setData(v),v.each(function(h){var c=W(TD,function(M){return wD(v,h,M,e,i)}),p=o.getAxis("x").scale,d=o.getAxis("y").scale,g=p.getExtent(),y=d.getExtent(),m=[p.parse(v.get("x0",h)),p.parse(v.get("x1",h))],_=[d.parse(v.get("y0",h)),d.parse(v.get("y1",h))];De(m),De(_);var S=!(g[0]>m[1]||g[1]_[1]||y[1]<_[0]),x=!S;v.setItemLayout(h,{points:c,allClipped:x});var b=v.getItemModel(h),w=b.getModel("itemStyle").getItemStyle(),C=b.get("z2"),T=ev(l,"color");w.fill||(w.fill=T,Z(w.fill)&&(w.fill=af(w.fill,.4))),w.stroke||(w.stroke=T),v.setItemVisual(h,"style",w),v.setItemVisual(h,"z2",J(C,0))}),v.diff(Ih(f).data).add(function(h){var c=v.getItemLayout(h),p=v.getItemVisual(h,"z2");if(!c.allClipped){var d=new ze({z2:J(p,0),shape:{points:c.points}});v.setItemGraphicEl(h,d),f.group.add(d)}}).update(function(h,c){var p=Ih(f).data.getItemGraphicEl(c),d=v.getItemLayout(h),g=v.getItemVisual(h,"z2");d.allClipped?p&&f.group.remove(p):(p?Rt(p,{z2:J(g,0),shape:{points:d.points}},a,h):p=new ze({shape:{points:d.points}}),v.setItemGraphicEl(h,p),f.group.add(p))}).remove(function(h){var c=Ih(f).data.getItemGraphicEl(h);f.group.remove(c)}).execute(),v.eachItemGraphicEl(function(h,c){var p=v.getItemModel(c),d=v.getItemVisual(c,"style");h.useStyle(v.getItemVisual(c,"style")),we(h,ge(p),{labelFetcher:a,labelDataIndex:c,defaultText:v.getName(c)||"",inheritColor:Z(d.fill)?af(d.fill,1):B.color.neutral99}),de(h,p),jt(h,null,null,p.get(["emphasis","disabled"])),ft(h).dataModel=a}),Ih(f).data=v,f.group.silent=a.get("silent")||e.get("silent")},t.type="markArea",t})(dx);function yQ(r,t,e){var a,n,i=["x0","y0","x1","y1"];if(r){var o=W(r&&r.dimensions,function(u){var f=t.getData(),v=f.getDimensionInfo(f.mapDimension(u))||{};return G(G({},v),{name:u,ordinalMeta:null})});n=W(i,function(u,f){return{name:u,type:o[f%2].type}}),a=new Ze(n,e)}else n=[{name:"value",type:"float"}],a=new Ze(n,e);var s=W(e.get("data"),St(pQ,t,r,e));r&&(s=Nt(s,St(dQ,r)));var l=r?function(u,f,v,h){var c=u.coord[Math.floor(h/2)][h%2];return Jn(c,n[h])}:function(u,f,v,h){return Jn(u.value,n[h])};return a.initData(s,null,l),a.hasItemOption=!0,a}function mQ(r){r.registerComponentModel(cQ),r.registerComponentView(gQ),r.registerPreprocessor(function(t){px(t.series,"markArea")&&(t.markArea=t.markArea||{})})}var _Q=function(r,t){if(t==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},h_=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.call(this,e,a),this._updateSelector(e)},t.prototype._updateSelector=function(e){var a=e.selector,n=this.ecModel;a===!0&&(a=e.selector=["all","inverse"]),H(a)&&A(a,function(i,o){Z(i)&&(i={type:i}),a[o]=yt(i,_Q(n,i.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var a=!1,n=0;n=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:B.size.m,align:"auto",backgroundColor:B.color.transparent,borderColor:B.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:B.color.disabled,inactiveBorderColor:B.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:B.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:B.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:B.color.tertiary,borderWidth:1,borderColor:B.color.border},emphasis:{selectorLabel:{show:!0,color:B.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t})(wt),ws=St,c_=A,Lh=it,xN=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new Lh),this.group.add(this._selectorGroup=new Lh),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,a,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,a,n,l,s,u);var f=me(e,n).refContainer,v=e.getBoxLayoutParams(),h=e.get("padding"),c=qt(v,f,h),p=this.layoutInner(e,o,c,i,l,u),d=qt(st({width:p.width,height:p.height},v),f,h);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=uN(p,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,a,n,i,o,s,l){var u=this.getContentGroup(),f=K(),v=a.get("selectedMode"),h=a.get("triggerEvent"),c=[];n.eachRawSeries(function(p){!p.get("legendHoverLink")&&c.push(p.id)}),c_(a.getData(),function(p,d){var g=this,y=p.get("name");if(!this.newlineDisabled&&(y===""||y===` `)){var m=new Lh;m.newline=!0,u.add(m);return}var _=n.getSeriesByName(y)[0];if(!f.get(y))if(_){var S=_.getData(),x=S.getVisual("legendLineStyle")||{},b=S.getVisual("legendIcon"),w=S.getVisual("style"),C=this._createItem(_,y,d,p,a,e,x,w,b,v,i);C.on("click",ws(CD,y,null,i,c)).on("mouseover",ws(p_,_.name,null,i,c)).on("mouseout",ws(d_,_.name,null,i,c)),n.ssr&&C.eachChild(function(T){var M=ft(T);M.seriesIndex=_.seriesIndex,M.dataIndex=d,M.ssrType="legend"}),h&&C.eachChild(function(T){g.packEventData(T,a,_,d,y)}),f.set(y,!0)}else n.eachRawSeries(function(T){var M=this;if(!f.get(y)&&T.legendVisualProvider){var D=T.legendVisualProvider;if(!D.containName(y))return;var L=D.indexOfName(y),I=D.getItemVisual(L,"style"),P=D.getItemVisual(L,"legendIcon"),R=Xe(I.fill);R&&R[3]===0&&(R[3]=.2,I=G(G({},I),{fill:kr(R,"rgba")}));var E=this._createItem(T,y,d,p,a,e,{},I,P,v,i);E.on("click",ws(CD,null,y,i,c)).on("mouseover",ws(p_,null,y,i,c)).on("mouseout",ws(d_,null,y,i,c)),n.ssr&&E.eachChild(function(O){var k=ft(O);k.seriesIndex=T.seriesIndex,k.dataIndex=d,k.ssrType="legend"}),h&&E.eachChild(function(O){M.packEventData(O,a,T,d,y)}),f.set(y,!0)}},this)},this),o&&this._createSelector(o,a,i,s,l)},t.prototype.packEventData=function(e,a,n,i,o){var s={componentType:"legend",componentIndex:a.componentIndex,dataIndex:i,value:o,seriesIndex:n.seriesIndex};ft(e).eventData=s},t.prototype._createSelector=function(e,a,n,i,o){var s=this.getSelectorGroup();c_(e,function(u){var f=u.type,v=new Dt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:a.id})}});s.add(v);var h=a.getModel("selectorLabel"),c=a.getModel(["emphasis","selectorLabel"]);we(v,{normal:h,emphasis:c},{defaultText:u.title}),jn(v)})},t.prototype._createItem=function(e,a,n,i,o,s,l,u,f,v,h){var c=e.visualDrawType,p=o.get("itemWidth"),d=o.get("itemHeight"),g=o.isSelected(a),y=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),_=i.get("icon");f=_||f||"roundRect";var S=SQ(f,i,l,u,c,g,h),x=new Lh,b=i.getModel("textStyle");if(at(e.getLegendIcon)&&(!_||_==="inherit"))x.add(e.getLegendIcon({itemWidth:p,itemHeight:d,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var w=_==="inherit"&&e.getData().getVisual("symbol")?y==="inherit"?e.getData().getVisual("symbolRotate"):y:0;x.add(xQ({itemWidth:p,itemHeight:d,icon:f,iconRotate:w,itemStyle:S.itemStyle,symbolKeepAspect:m}))}var C=s==="left"?p+5:-5,T=s,M=o.get("formatter"),D=a;Z(M)&&M?D=M.replace("{name}",a??""):at(M)&&(D=M(a));var L=g?b.getTextColor():i.get("inactiveColor");x.add(new Dt({style:Wt(b,{text:D,x:C,y:d/2,fill:L,align:T,verticalAlign:"middle"},{inheritColor:L})}));var I=new bt({shape:x.getBoundingRect(),style:{fill:"transparent"}}),P=i.getModel("tooltip");return P.get("show")&&Mn({el:I,componentModel:o,itemName:a,itemTooltipOption:P.option}),x.add(I),x.eachChild(function(R){R.silent=!0}),I.silent=!v,this.getContentGroup().add(x),jn(x),x.__legendDataIndex=n,x},t.prototype.layoutInner=function(e,a,n,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();ho(e.get("orient"),l,e.get("itemGap"),n.width,n.height);var f=l.getBoundingRect(),v=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){ho("horizontal",u,e.get("selectorItemGap",!0));var h=u.getBoundingRect(),c=[-h.x,-h.y],p=e.get("selectorButtonGap",!0),d=e.getOrient().index,g=d===0?"width":"height",y=d===0?"height":"width",m=d===0?"y":"x";s==="end"?c[d]+=f[g]+p:v[d]+=h[g]+p,c[1-d]+=f[y]/2-h[y]/2,u.x=c[0],u.y=c[1],l.x=v[0],l.y=v[1];var _={x:0,y:0};return _[g]=f[g]+p+h[g],_[y]=Math.max(f[y],h[y]),_[m]=Math.min(0,h[m]+c[1-d]),_}else return l.x=v[0],l.y=v[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t})(Yt);function SQ(r,t,e,a,n,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),c_(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",v=l.getShallow("decal");u.decal=!v||v==="inherit"?a.decal:nl(v,o),u.fill==="inherit"&&(u.fill=a[n]),u.stroke==="inherit"&&(u.stroke=a[f]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?a:e).opacity),s(u,a);var h=t.getModel("lineStyle"),c=h.getLineStyle();if(s(c,e),u.fill==="auto"&&(u.fill=a.fill),u.stroke==="auto"&&(u.stroke=a.fill),c.stroke==="auto"&&(c.stroke=a.fill),!i){var p=t.get("inactiveBorderWidth"),d=u[f];u.lineWidth=p==="auto"?a.lineWidth>0&&d?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),c.stroke=h.get("inactiveColor"),c.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:c}}function xQ(r){var t=r.icon||"roundRect",e=le(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill=B.color.neutral00,e.style.lineWidth=2),e}function CD(r,t,e,a){d_(r,t,e,a),e.dispatchAction({type:"legendToggleSelect",name:r??t}),p_(r,t,e,a)}function p_(r,t,e,a){e.usingTHL()||e.dispatchAction({type:"highlight",seriesName:r,name:t,excludeSeriesId:a})}function d_(r,t,e,a){e.usingTHL()||e.dispatchAction({type:"downplay",seriesName:r,name:t,excludeSeriesId:a})}function yu(r,t,e){var a=r==="allSelect"||r==="inverseSelect",n={},i=[];e.eachComponent({mainType:"legend",query:t},function(s){a?s[r]():s[r](t.name),AD(s,n),i.push(s.componentIndex)});var o={};return e.eachComponent("legend",function(s){A(n,function(l,u){s[l?"select":"unSelect"](u)}),AD(s,o)}),a?{selected:o,legendIndex:i}:{name:t.name,selected:o}}function AD(r,t){var e=t||{};return A(r.getData(),function(a){var n=a.get("name");if(!(n===` `||n==="")){var i=r.isSelected(n);j(e,n)?e[n]=e[n]&&i:e[n]=i}}),e}function bQ(r){r.registerAction("legendToggleSelect","legendselectchanged",St(yu,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",St(yu,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",St(yu,"inverseSelect")),r.registerAction("legendSelect","legendselected",St(yu,"select")),r.registerAction("legendUnSelect","legendunselected",St(yu,"unSelect"))}var wQ=Zf(TQ);function TQ(r){var t=r.findComponents({mainType:"legend"});t&&t.length&&r.filterSeries(function(e){for(var a=0;an[o],g=[-c.x,-c.y];a||(g[i]=f[u]);var y=[0,0],m=[-p.x,-p.y],_=J(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(d){var S=e.get("pageButtonPosition",!0);S==="end"?m[i]+=n[o]-p[o]:y[i]+=p[o]+_}m[1-i]+=c[s]/2-p[s]/2,f.setPosition(g),v.setPosition(y),h.setPosition(m);var x={x:0,y:0};if(x[o]=d?n[o]:c[o],x[s]=Math.max(c[s],p[s]),x[l]=Math.min(0,p[l]+m[1-i]),v.__rectSize=n[o],d){var b={x:0,y:0};b[o]=Math.max(n[o]-p[o]-_,0),b[s]=x[s],v.setClipPath(new bt({shape:b})),v.__rectSize=b[o]}else h.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(e);return w.pageIndex!=null&&Rt(f,{x:w.contentPosition[0],y:w.contentPosition[1]},d?e:null),this._updatePageInfoView(e,w),x},t.prototype._pageGo=function(e,a,n){var i=this._getPageInfo(a)[e];i!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:a.id})},t.prototype._updatePageInfoView=function(e,a){var n=this._controllerGroup;A(["pagePrev","pageNext"],function(f){var v=f+"DataIndex",h=a[v]!=null,c=n.childOfName(f);c&&(c.setStyle("fill",h?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),c.cursor=h?"pointer":"default")});var i=n.childOfName("pageText"),o=e.get("pageFormatter"),s=a.pageIndex,l=s!=null?s+1:0,u=a.pageCount;i&&o&&i.setStyle("text",Z(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var a=e.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=e.getOrient().index,s=$y[o],l=qy[o],u=this._findTargetItemIndex(a),f=n.children(),v=f[u],h=f.length,c=h?1:0,p={contentPosition:[n.x,n.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!v)return p;var d=S(v);p.contentPosition[o]=-d.s;for(var g=u+1,y=d,m=d,_=null;g<=h;++g)_=S(f[g]),(!_&&m.e>y.s+i||_&&!x(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),m=_;for(var g=u-1,y=d,m=d,_=null;g>=-1;--g)_=S(f[g]),(!_||!x(m,_.s))&&y.i=w&&b.s<=w+i}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var a,n=this.getContentGroup(),i;return n.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===e&&(a=s)}),a??i},t.type="legend.scroll",t})(xN);function MQ(r){r.registerAction("legendScroll","legendscroll",function(t,e){var a=t.scrollDataIndex;a!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(n){n.setScrollDataIndex(a)})})}function DQ(r){_t(bN),r.registerComponentModel(CQ),r.registerComponentView(AQ),MQ(r)}function IQ(r){_t(bN),_t(DQ)}var LQ=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.inside",t.defaultOption=ci(Gf.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t})(Gf),gx=mt();function PQ(r,t,e){gx(r).coordSysRecordMap.each(function(a){var n=a.dataZoomInfoMap.get(t.uid);n&&(n.getRange=e)})}function RQ(r,t){for(var e=gx(r).coordSysRecordMap,a=e.keys(),n=0;ni[n+a]&&(a=v),o=o&&f.get("preventDefaultMouseMove",!0),s=J(f.get("cursorGrab",!0),s),l=J(f.get("cursorGrabbing",!0),l)}),{controlType:a,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:e,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint},cursorGrab:s,cursorGrabbing:l}}}function BQ(r){r.registerUpdateLifecycle("coordsys:aftercreate",function(t,e){var a=gx(e),n=a.coordSysRecordMap||(a.coordSysRecordMap=K());n.each(function(i){i.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=nN(i);A(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,EQ(e,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=K());f.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),n.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){wN(n,i);return}var f=NQ(l,i,e);o.enable(f.controlType,f.opt),Ll(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var VQ=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,a,n){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),PQ(n,e,{pan:q(Ky.pan,this),zoom:q(Ky.zoom,this),scrollMove:q(Ky.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){RQ(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t})(lx),Ky={zoom:function(r,t,e,a){var n=this.range,i=n.slice(),o=r.axisModels[0];if(o){var s=jy[t](null,[a.originX,a.originY],o,e,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/a.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(si(0,i,[0,100],0,f.minSpan,f.maxSpan),this.range=i,n[0]!==i[0]||n[1]!==i[1])return i}},pan:ID(function(r,t,e,a,n,i){var o=jy[a]([i.oldX,i.oldY],[i.newX,i.newY],t,n,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:ID(function(r,t,e,a,n,i){var o=jy[a]([0,0],[i.scrollDelta,i.scrollDelta],t,n,e);return o.signal*(r[1]-r[0])*i.scrollDelta})};function ID(r){return function(t,e,a,n){var i=this.range,o=i.slice(),s=t.axisModels[0];if(s){var l=r(o,s,t,e,a,n);if(si(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var jy={grid:function(r,t,e,a,n){var i=e.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,t,e,a,n){var i=e.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],t=s.pointToCoord(t),e.mainType==="radiusAxis"?(o.pixel=t[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,t,e,a,n){var i=e.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};function TN(r){ux(r),r.registerComponentModel(LQ),r.registerComponentView(VQ),BQ(r)}var zQ=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=ci(Gf.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:B.color.accent10,borderRadius:0,backgroundColor:B.color.transparent,dataBackground:{lineStyle:{color:B.color.accent30,width:.5},areaStyle:{color:B.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:B.color.accent40,width:.5},areaStyle:{color:B.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:B.color.neutral00,borderColor:B.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:B.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:B.color.tertiary},brushSelect:!0,brushStyle:{color:B.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:B.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t})(Gf),mu=bt,GQ=1,Jy=30,FQ=7,_u="horizontal",LD="vertical",HQ=5,WQ=["line","bar","candlestick","scatter"],UQ={easing:"cubicOut",duration:100,delay:0},YQ=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,a){this.api=a,this._onBrush=q(this._onBrush,this),this._onBrushEnd=q(this._onBrushEnd,this)},t.prototype.render=function(e,a,n,i){if(r.prototype.render.apply(this,arguments),Ll(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){gf(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var a=this._displayables.sliderGroup=new it;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(a),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,a=this.api,n=e.get("brushSelect"),i=n?FQ:0,o=me(e,a).refContainer,s=this._findCoordRect(),l=e.get("defaultLocationEdgeGap",!0)||0,u=this._orient===_u?{right:o.width-s.x-s.width,top:o.height-Jy-l-i,width:s.width,height:Jy}:{right:l,top:s.y,width:Jy,height:s.height},f=Ko(e.option);A(["right","top","width","height"],function(h){f[h]==="ph"&&(f[h]=u[h])});var v=qt(f,o);this._location={x:v.x,y:v.y},this._size=[v.width,v.height],this._orient===LD&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,a=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===_u&&!o?{scaleY:l?1:-1,scaleX:1}:n===_u&&o?{scaleY:l?1:-1,scaleX:-1}:n===LD&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]),f=isNaN(u.x)?0:u.x,v=isNaN(u.y)?0:u.y;e.x=a.x-f,e.y=a.y-v,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,a=this._size,n=this._displayables.sliderGroup,i=e.get("brushSelect");n.add(new mu({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new mu({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:q(this._onClickPanel,this)}),s=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),n.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var a=this._size,n=this._shadowSize||[],i=e.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||a[0]!==n[0]||a[1]!==n[1]){var v=o.getDataExtent(e.thisDim),h=o.getDataExtent(l),c=(h[1]-h[0])*.3;h=[h[0]-c,h[1]+c];var p=[0,a[1]],d=[0,a[0]],g=[[a[0],0],[0,0]],y=[],m=d[1]/Math.max(1,o.count()-1),_=a[0]/(v[1]-v[0]),S=e.thisAxis.type==="time",x=-m,b=Math.round(o.count()/a[0]),w;o.each([e.thisDim,l],function(L,I,P){if(b>0&&P%b){S||(x+=m);return}x=S?(+L-v[0])*_:x+m;var R=I==null||isNaN(I)||I==="",E=R?0:Et(I,h,p,!0);R&&!w&&P?(g.push([g[g.length-1][0],0]),y.push([y[y.length-1][0],0])):!R&&w&&(g.push([x,0]),y.push([x,0])),R||(g.push([x,E]),y.push([x,E])),w=R}),u=this._shadowPolygonPts=g,f=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var C=this.dataZoomModel;function T(L){var I=C.getModel(L?"selectedDataBackground":"dataBackground"),P=new it,R=new ze({shape:{points:u},segmentIgnoreThreshold:1,style:I.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),E=new Le({shape:{points:f},segmentIgnoreThreshold:1,style:I.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return P.add(R),P.add(E),P}for(var M=0;M<3;M++){var D=T(M===1);this._displayables.sliderGroup.add(D),this._displayables.dataShadowSegs.push(D)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,a=e.get("showDataShadow");if(a!==!1){var n,i=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();A(l,function(u){if(!n&&!(a!==!0&&pt(WQ,u.get("type"))<0)){var f=i.getComponent(Xn(o),s).axis,v=XQ(o),h,c=u.coordinateSystem;v!=null&&c.getOtherAxis&&(h=c.getOtherAxis(f).inverse),v=u.getData().mapDimension(v);var p=u.getData().mapDimension(o);n={thisAxis:f,series:u,thisDim:p,otherDim:v,otherAxisInverse:h}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,a=this._displayables,n=a.handles=[null,null],i=a.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,v=l.get("brushSelect"),h=a.filler=new mu({silent:v,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new mu({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:GQ,fill:B.color.transparent}})),A([0,1],function(_){var S=l.get("handleIcon");!Lc[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var x=le(S,-1,0,2,2,null,!0);x.attr({cursor:ZQ(this._orient),draggable:!0,drift:q(this._onDragMove,this,_),ondragend:q(this._onDragEnd,this),onmouseover:q(this._onOverDataInfoTriggerArea,this,!0),onmouseout:q(this._onOverDataInfoTriggerArea,this,!1),z2:5});var b=x.getBoundingRect(),w=l.get("handleSize");this._handleHeight=$(w,this._size[1]),this._handleWidth=b.width/b.height*this._handleHeight,x.setStyle(l.getModel("handleStyle").getItemStyle()),x.style.strokeNoScale=!0,x.rectHover=!0,x.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),jn(x);var C=l.get("handleColor");C!=null&&(x.style.fill=C),o.add(n[_]=x);var T=l.getModel("textStyle"),M=l.get("handleLabel")||{},D=M.show||!1;e.add(i[_]=new Dt({silent:!0,invisible:!D,style:Wt(T,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:T.getTextColor(),font:T.getFont()}),z2:10}))},this);var c=h;if(v){var p=$(l.get("moveHandleSize"),s[1]),d=a.moveHandle=new bt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),g=p*.8,y=a.moveHandleIcon=le(l.get("moveHandleIcon"),-g/2,-g/2,g,g,B.color.neutral00,!0);y.silent=!0,y.y=s[1]+p/2-.5,d.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(p,10));c=a.moveZone=new bt({invisible:!0,shape:{y:s[1]-m,height:p+m}}),c.on("mouseover",function(){u.enterEmphasis(d)}).on("mouseout",function(){u.leaveEmphasis(d)}),o.add(d),o.add(y),o.add(c)}c.attr({draggable:!0,cursor:"grab",drift:q(this._onActualMoveZoneDrift,this),ondragstart:q(this._onActualMoveZoneDragStart,this),ondragend:q(this._onActualMoveZoneDragEnd,this),onmouseover:q(this._onOverDataInfoTriggerArea,this,!0),onmouseout:q(this._onOverDataInfoTriggerArea,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[Et(e[0],[0,100],a,!0),Et(e[1],[0,100],a,!0)]},t.prototype._updateInterval=function(e,a){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];si(a,i,o,n.get("zoomLock")?"all":e,s.minSpan!=null?Et(s.minSpan,l,o,!0):null,s.maxSpan!=null?Et(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=De([Et(i[0],o,l,!0),Et(i[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},t.prototype._updateView=function(e){var a=this._displayables,n=this._handleEnds,i=De(n.slice()),o=this._size;A([0,1],function(c){var p=a.handles[c],d=this._handleHeight;p.attr({scaleX:d/2,scaleY:d/2,x:n[c]+(c?-1:1),y:o[1]/2-d/2})},this),a.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};a.moveHandle&&(a.moveHandle.setShape(s),a.moveZone.setShape(s),a.moveZone.getBoundingRect(),a.moveHandleIcon&&a.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=a.dataShadowSegs,u=[0,i[0],i[1],o[0]],f=0;fa[0]||n[1]<0||n[1]>a[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var a=e.offsetX,n=e.offsetY;this._brushStart=new ut(a,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var n=a.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[n.x,n.x+n.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();si(0,l,o,0,u.minSpan!=null?Et(u.minSpan,s,o,!0):null,u.maxSpan!=null?Et(u.maxSpan,s,o,!0):null),this._range=De([Et(l[0],o,s,!0),Et(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(dn(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,a){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new mu({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,a),f=l.transformCoordToLocal(s.x,s.y),v=this._size;u[0]=Math.max(Math.min(v[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:v[1]})},t.prototype._dispatchZoomAction=function(e){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?UQ:null,start:a[0],end:a[1]})},t.prototype._findCoordRect=function(){var e,a=nN(this.dataZoomModel).infoList;if(!e&&a.length){var n=a[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var i=this.api.getWidth(),o=this.api.getHeight();e={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return e},t.type="dataZoom.slider",t})(lx);function PD(r,t,e,a){var n=r.get("labelFormatter"),i=r.get("labelPrecision");(i==null||i==="auto")&&(i=e.valuePrecision);var o=e.value[t],s=o==null||isNaN(o)?"":$e(a)||rv(a)?a.getLabel({value:Math.round(o)}):isFinite(i)?Pt(o,i,!0):o+"";return at(n)?n(o,s):Z(n)?n.replace("{value}",s):s}function XQ(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function ZQ(r){return r==="vertical"?"ns-resize":"ew-resize"}function CN(r){r.registerComponentModel(zQ),r.registerComponentView(YQ),ux(r)}function $Q(r){_t(TN),_t(CN)}var AN={get:function(r,t,e){var a=rt((qQ[r]||{})[t]);return e&&H(a)?a[a.length-1]:a}},qQ={color:{active:["#006edd","#e0ffff"],inactive:[B.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},RD=be.mapVisual,KQ=be.eachVisual,jQ=H,Qy=A,JQ=De,QQ=Et,xp=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,a){var n=this.option;!a&&gN(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var a=this.stateList;e=q(e,this),this.controllerVisuals=u_(this.option.controller,a,e),this.targetVisuals=u_(this.option.target,a,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,a=this.option.seriesTargets;if(a){var n=[];return Qy(a,function(l){if(l.seriesIndex!=null)n.push(l.seriesIndex);else if(l.seriesId!=null){var u;e.ecModel.eachSeries(function(f){f.id===l.seriesId&&(u=f)}),u&&n.push(u.componentIndex)}}),n}var i=this.option.seriesId,o=this.option.seriesIndex;o==null&&i==null&&(o="all");var s=ml(this.ecModel,"series",{index:o,id:i},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return W(s,function(l){return l.componentIndex})},t.prototype.eachTargetSeries=function(e,a){A(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&e.call(a,i)},this)},t.prototype.isTargetSeries=function(e){var a=!1;return this.eachTargetSeries(function(n){n===e&&(a=!0)}),a},t.prototype.formatValueText=function(e,a,n){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;n=n||["<",">"],H(e)&&(e=e.slice(),u=!0);var f=a?e:u?[v(e[0]),v(e[1])]:v(e);if(Z(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(at(l))return u?l(e[0],e[1]):l(e);if(u)return e[0]===s[0]?n[0]+" "+f[1]:e[1]===s[1]?n[1]+" "+f[0]:f[0]+" - "+f[1];return f;function v(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,a=JQ([e.min,e.max]);this._dataExtent=a},t.prototype.getDimension=function(e){var a=this,n=this.option.seriesTargets;if(n){var i=Tn(n,function(o){return o.seriesIndex!=null&&o.seriesIndex===e||o.seriesId!=null&&o.seriesId===a.ecModel.getSeriesByIndex(e).id});if(i)return i.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var a=e.hostModel.seriesIndex,n=this.getDimension(a);if(n!=null)return e.getDimensionIndex(n);for(var i=e.dimensions,o=i.length-1;o>=0;o--){var s=i[o],l=e.getDimensionInfo(s);if(!l.isCalculationCoord)return l.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,a=this.option,n={inRange:a.inRange,outOfRange:a.outOfRange},i=a.target||(a.target={}),o=a.controller||(a.controller={});yt(i,n),yt(o,n);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),f.call(this,o);function l(v){jQ(a.color)&&!v.inRange&&(v.inRange={color:a.color.slice().reverse()}),v.inRange=v.inRange||{color:e.get("gradientColor")}}function u(v,h,c){var p=v[h],d=v[c];p&&!d&&(d=v[c]={},Qy(p,function(g,y){if(be.isValidType(y)){var m=AN.get(y,"inactive",s);m!=null&&(d[y]=m,y==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function f(v){var h=(v.inRange||{}).symbol||(v.outOfRange||{}).symbol,c=(v.inRange||{}).symbolSize||(v.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),d=this.getItemSymbol(),g=d||"roundRect";Qy(this.stateList,function(y){var m=this.itemSize,_=v[y];_||(_=v[y]={color:s?p:[p]}),_.symbol==null&&(_.symbol=h&&rt(h)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=c&&rt(c)||(s?m[0]:[m[0],m[0]])),_.symbol=RD(_.symbol,function(b){return b==="none"?g:b});var S=_.symbolSize;if(S!=null){var x=-1/0;KQ(S,function(b){b>x&&(x=b)}),_.symbolSize=RD(S,function(b){return QQ(b,[0,x],[0,m[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:B.color.transparent,borderColor:B.color.borderTint,contentColor:B.color.theme[0],inactiveColor:B.color.disabled,borderWidth:0,padding:B.size.m,textGap:10,precision:0,textStyle:{color:B.color.secondary}},t})(wt),ED=[20,140],ttt=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=ED[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=ED[1])},t.prototype._resetRange=function(){var e=this.getExtent(),a=this.option.range;!a||a.auto?(e.auto=1,this.option.range=e):H(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],e[0]),a[1]=Math.min(a[1],e[1]))},t.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),A(this.stateList,function(e){var a=this.option.controller[e].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),a=De((this.get("range")||[]).slice());return a[0]>e[1]&&(a[0]=e[1]),a[1]>e[1]&&(a[1]=e[1]),a[0]=n[1]||e<=a[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){e[0]<=s&&s<=e[1]&&i.push(l)},this),a.push({seriesId:n.id,dataIndex:i})},this),a},t.prototype.getVisualMeta=function(e){var a=kD(this,"outOfRange",this.getExtent()),n=kD(this,"inRange",this.option.range.slice()),i=[];function o(c,p){i.push({value:c,color:e(c,p)})}for(var s=0,l=0,u=n.length,f=a.length;le[1])break;i.push({color:this.getControllerVisual(l,"color",a),offset:s/n})}return i.push({color:this.getControllerVisual(e[1],"color",a),offset:1}),i},t.prototype._createBarPoints=function(e,a){var n=this.visualMapModel.itemSize;return[[n[0]-a[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-a[1],e[1]]]},t.prototype._createBarGroup=function(e){var a=this._orient,n=this.visualMapModel.get("inverse");return new it(a==="horizontal"&&!n?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&n?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!n?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},t.prototype._updateHandle=function(e,a){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=i.itemSize,u=i.getExtent(),f=this._applyTransform("left",n.mainGroup);ett([0,1],function(v){var h=o[v];h.setStyle("fill",a.handlesColor[v]),h.y=e[v];var c=ca(e[v],[0,l[1]],u,!0),p=this.getControllerVisual(c,"symbolSize");h.scaleX=h.scaleY=p/l[0],h.x=l[0]-p/2;var d=Jr(n.handleLabelPoints[v],vo(h,this.group));if(this._orient==="horizontal"){var g=f==="left"||f==="top"?(l[0]-p)/2:(l[0]-p)/-2;d[1]+=g}s[v].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[v]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,a,n,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],f=this._shapes,v=f.indicator;if(v){v.attr("invisible",!1);var h={convertOpacityToAlpha:!0},c=this.getControllerVisual(e,"color",h),p=this.getControllerVisual(e,"symbolSize"),d=ca(e,s,u,!0),g=l[0]-p/2,y={x:v.x,y:v.y};v.y=d,v.x=g;var m=Jr(f.indicatorLabelPoint,vo(v,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",f.mainGroup),x=this._orient,b=x==="horizontal";_.setStyle({text:(n||"")+o.formatValueText(a),verticalAlign:b?S:"middle",align:b?"center":S});var w={x:g,y:d,style:{fill:c}},C={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var T={duration:100,easing:"cubicInOut",additive:!0};v.x=y.x,v.y=y.y,v.animateTo(w,T),_.animateTo(C,T)}else v.attr(w),_.attr(C);this._firstShowIndicator=!1;var M=this._shapes.handleLabels;if(M)for(var D=0;Do[1]&&(v[1]=1/0),a&&(v[0]===-1/0?this._showIndicator(f,v[1],"< ",l):v[1]===1/0?this._showIndicator(f,v[0],"> ",l):this._showIndicator(f,f,"≈ ",l));var h=this._hoverLinkDataIndices,c=[];(a||VD(n))&&(c=this._hoverLinkDataIndices=n.findTargetDataIndices(v));var p=oz(h,c);this._dispatchHighDown("downplay",rc(p[0],n)),this._dispatchHighDown("highlight",rc(p[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var a;if(io(e.target,function(l){var u=ft(l);if(u.dataIndex!=null)return a=u,!0},!0),!!a){var n=this.ecModel.getSeriesByIndex(a.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(n)){var o=n.getData(a.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),a.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var a=this._shapes.handleLabels;if(a)for(var n=0;n=0&&(i.dimension=o,a.push(i))}}),r.getData().setVisual("visualMeta",a)}}];function utt(r,t,e,a){for(var n=t.targetVisuals[a],i=be.prepareVisualTypes(n),o={color:ev(r.getData(),"color")},s=0,l=i.length;s0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),r.registerAction(ott,stt),A(ltt,function(t){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,t)}),r.registerPreprocessor(ftt))}function LN(r){r.registerComponentModel(ttt),r.registerComponentView(ntt),IN(r)}var vtt=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._pieceList=[],e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],htt[this._mode].call(this,this._pieceList),this._resetSelected(e,a);var i=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=rt(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=W(this._pieceList,function(l){return l=rt(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var e=this.option,a={},n=be.listVisualTypes(),i=this.isCategory();A(e.pieces,function(s){A(n,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),A(a,function(s,l){var u=!1;A(this.stateList,function(f){u=u||o(e,f,l)||o(e.target,f,l)},this),!u&&A(this.stateList,function(f){(e[f]||(e[f]={}))[l]=AN.get(l,f==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,a){var n=this.option,i=this._pieceList,o=(a?n:e).selected||{};if(n.selected=o,A(i,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),n.selectedMode==="single"){var s=!1;A(i,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return this._mode==="categories"?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=rt(e)},t.prototype.getValueState=function(e){var a=be.findPieceIndex(e,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[],n=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=be.findPieceIndex(l,n);f===e&&o.push(u)},this),a.push({seriesId:i.id,dataIndex:o})},this),a},t.prototype.getRepresentValue=function(e){var a;if(this.isCategory())a=e.value;else if(e.value!=null)a=e.value;else{var n=e.interval||[];a=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return a},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var a=[],n=["",""],i=this;function o(f,v){var h=i.getRepresentValue({interval:f});v||(v=i.getValueState(h));var c=e(h,v);f[0]===-1/0?n[0]=c:f[1]===1/0?n[1]=c:a.push({value:f[0],color:c},{value:f[1],color:c})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return A(s,function(f){var v=f.interval;v&&(v[0]>u&&o([u,v[0]],"outOfRange"),o(v.slice()),u=v[1])},this),{stops:a,outerColors:n}},t.type="visualMap.piecewise",t.defaultOption=ci(xp.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t})(xp),htt={splitNumber:function(r){var t=this.option,e=Math.min(t.precision,20),a=this.getExtent(),n=t.splitNumber;n=Math.max(parseInt(n,10),1),t.splitNumber=n;for(var i=(a[1]-a[0])/n;+i.toFixed(e)!==i&&e<5;)e++;t.precision=e,i=+i.toFixed(e),t.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o","≥"][a[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,n)},this)}};function HD(r,t){var e=r.inverse;(r.orient==="vertical"?!e:e)&&t.reverse()}var ctt=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var a=this.visualMapModel,n=a.get("textGap"),i=a.textStyleModel,o=this._getItemAlign(),s=a.itemSize,l=this._getViewData(),u=l.endsText,f=Ye(a.get("showLabel",!0),!u),v=!a.get("selectedMode");u&&this._renderEndsText(e,u[0],s,f,o),A(l.viewPieceList,function(h){var c=h.piece,p=new it;p.onclick=q(this._onItemClick,this,c),this._enableHoverLink(p,h.indexInModelPieceList);var d=a.getRepresentValue(c);if(this._createItemSymbol(p,d,[0,0,s[0],s[1]],v),f){var g=this.visualMapModel.getValueState(d),y=i.get("align")||o;p.add(new Dt({style:Wt(i,{x:y==="right"?-n:s[0]+n,y:s[1]/2,text:c.text,verticalAlign:i.get("verticalAlign")||"middle",align:y,opacity:J(i.get("opacity"),g==="outOfRange"?.5:1)}),silent:v}))}e.add(p)},this),u&&this._renderEndsText(e,u[1],s,f,o),ho(a.get("orient"),e,a.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,a){var n=this;e.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:rc(s.findTargetDataIndices(a),s)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,a=e.option;if(a.orient==="vertical")return DN(e,this.api,e.itemSize);var n=a.align;return(!n||n==="auto")&&(n="left"),n},t.prototype._renderEndsText=function(e,a,n,i,o){if(a){var s=new it,l=this.visualMapModel.textStyleModel;s.add(new Dt({style:Wt(l,{x:i?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:a})})),e.add(s)}},t.prototype._getViewData=function(){var e=this.visualMapModel,a=W(e.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=e.get("text"),i=e.get("orient"),o=e.get("inverse");return(i==="horizontal"?o:!o)?a.reverse():n&&(n=n.slice().reverse()),{viewPieceList:a,endsText:n}},t.prototype._createItemSymbol=function(e,a,n,i){var o=le(this.getControllerVisual(a,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(a,"color"));o.silent=i,e.add(o)},t.prototype._onItemClick=function(e){var a=this.visualMapModel,n=a.option,i=n.selectedMode;if(i){var o=rt(n.selected),s=a.getSelectedMapKey(e);i==="single"||i===!0?(o[s]=!0,A(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t})(MN);function PN(r){r.registerComponentModel(vtt),r.registerComponentView(ctt),IN(r)}function ptt(r){_t(LN),_t(PN)}var dtt=(function(){function r(t){this._thumbnailModel=t}return r.prototype.reset=function(t){this._renderVersion=t.getECUpdateCycleVersion()},r.prototype.renderContent=function(t){var e=t.api.getViewOfComponentModel(this._thumbnailModel);e&&(t.group.silent=!0,e.renderContent({group:t.group,targetTrans:t.targetTrans,z2Range:m2(t.group),roamType:t.roamType,viewportRect:t.viewportRect,renderVersion:this._renderVersion}))},r.prototype.updateWindow=function(t,e){var a=e.getViewOfComponentModel(this._thumbnailModel);a&&a.updateWindow({targetTrans:t,renderVersion:this._renderVersion})},r})(),gtt=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.preventAutoZ=!0,e}return t.prototype.optionUpdated=function(e,a){this._updateBridge()},t.prototype._updateBridge=function(){var e=this._birdge=this._birdge||new dtt(this);if(this._target=null,this.ecModel.eachSeries(function(n){SA(n,null)}),this.shouldShow()){var a=this.getTarget();SA(a.baseMapProvider,e)}},t.prototype.shouldShow=function(){return this.getShallow("show",!0)},t.prototype.getBridge=function(){return this._birdge},t.prototype.getTarget=function(){if(this._target)return this._target;var e=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return e?e.subType!=="graph"&&(e=null):e=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:e},this._target},t.type="thumbnail",t.layoutMode="box",t.dependencies=["series","geo"],t.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:B.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:B.color.neutral30,borderColor:B.color.neutral40,opacity:.3},z:10},t})(wt),ytt=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){if(this._api=n,this._model=e,this._coordSys||(this._coordSys=new dd),!this._isEnabled()){this._clear();return}this._renderVersion=n.getECUpdateCycleVersion();var i=this.group;i.removeAll();var o=e.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=a.get("backgroundColor")||B.color.neutral00);var l=me(e,n).refContainer,u=qt(W2(e,!0),l),f=s.lineWidth||0,v=this._contentRect=Co(u.clone(),f/2,!0,!0),h=new it;i.add(h),h.setClipPath(new bt({shape:v.plain()}));var c=this._targetGroup=new it;h.add(c);var p=u.plain();p.r=o.getShallow("borderRadius",!0),i.add(this._bgRect=new bt({style:s,shape:p,silent:!1,cursor:"grab"}));var d=e.getModel("windowStyle"),g=d.getShallow("borderRadius",!0);h.add(this._windowRect=new bt({shape:{x:0,y:0,width:0,height:0,r:g},style:d.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),UD(e,this)},t.prototype.renderContent=function(e){this._bridgeRendered=e,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),UD(this._model,this))},t.prototype._dealRenderContent=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var a=this._targetGroup,n=this._coordSys,i=this._contentRect;if(a.removeAll(),!!e){var o=e.group,s=o.getBoundingRect();a.add(o),this._bgRect.z2=e.z2Range.min-10,gd(n,s.x,s.y,s.width,s.height);var l=qt({left:"center",top:"center",aspect:s.width/s.height},i);ep(n,l.x,l.y,l.width,l.height),Rf(o,n,Oo),o.dirty(),this._windowRect.z2=e.z2Range.max+10,this._resetRoamController(e.roamType)}}},t.prototype.updateWindow=function(e){var a=this._bridgeRendered;a&&a.renderVersion===e.renderVersion&&(a.targetTrans=e.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},t.prototype._dealUpdateWindow=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var a=Sr([],e.targetTrans),n=_r([],tp(null,this._coordSys),a);this._transThisToTarget=Sr([],n);var i=e.viewportRect;i?i=i.clone():i=new ot(0,0,this._api.getWidth(),this._api.getHeight()),i.applyTransform(n);var o=this._windowRect,s=o.shape.r;o.setShape(st({r:s},i))}},t.prototype._resetRoamController=function(e){var a=this,n=this._api,i=this._roamController;if(i||(i=this._roamController=new es(n.getZr())),!e||!this._isEnabled()){i.disable();return}i.enable(e,{api:n,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return a._contentRect.contain(s,l)}}}),i.off("pan").off("zoom").on("pan",q(this._onPan,this)).on("zoom",q(this._onZoom,this))},t.prototype._onPan=function(e){var a=this._transThisToTarget;if(!(!this._isEnabled()||!a)){var n=ee([],[e.oldX,e.oldY],a),i=ee([],[e.oldX-e.dx,e.oldY-e.dy],a);this._api.dispatchAction(WD(this._model.getTarget().baseMapProvider,{dx:i[0]-n[0],dy:i[1]-n[1]}))}},t.prototype._onZoom=function(e){var a=this._transThisToTarget;if(!(!this._isEnabled()||!a)){var n=ee([],[e.originX,e.originY],a);this._api.dispatchAction(WD(this._model.getTarget().baseMapProvider,{zoom:1/e.scale,originX:n[0],originY:n[1]}))}},t.prototype._isEnabled=function(){var e=this._model;if(!e||!e.shouldShow())return!1;var a=e.getTarget().baseMapProvider;return!!a},t.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},t.prototype.remove=function(){this._clear()},t.prototype.dispose=function(){this._clear()},t.type="thumbnail",t})(Yt);function WD(r,t){var e=r.mainType==="series"?r.subType+"Roam":r.mainType+"Roam",a={type:e};return a[r.mainType+"Id"]=r.id,G(a,t),a}function UD(r,t){var e=Ao(r);$p(t.group,e.z,e.zlevel)}function mtt(r){r.registerComponentModel(gtt),r.registerComponentView(ytt)}var _tt={label:{enabled:!0},decal:{show:!1}},YD=mt(),XD=mt(),Stt=Zf(xtt);function xtt(r,t){var e=r.getModel("aria");if(!e.get("enabled"))return;var a=XD(r).scope||(XD(r).scope={}),n=rt(_tt);yt(n.label,r.getLocaleModel().get("aria"),!1),yt(e.option,n,!1),i(),o();function i(){var f=e.getModel("decal"),v=f.get("show");if(v){var h=K();r.eachSeries(function(c){c.isColorBySeries()||(YD(c).scope=h.get(c.type)||h.set(c.type,{}))}),r.eachSeries(function(c){if(at(c.enableAriaDecal)){c.enableAriaDecal();return}var p=c.getData();if(c.isColorBySeries()){var _=Qm(c.ecModel,c.name,a,r.getSeriesCount()),S=p.getVisual("decal");p.setVisual("decal",x(S,_))}else{var d=c.getRawData(),g={},y=YD(c).scope;p.each(function(b){var w=p.getRawIndex(b);g[w]=b});var m=d.count();d.each(function(b){var w=g[b],C=d.getName(b)||b+"",T=Qm(c.ecModel,C,y,m),M=p.getItemVisual(w,"decal");p.setItemVisual(w,"decal",x(M,T))})}function x(b,w){var C=b?G(G({},w),b):w;return C.dirty=!0,C}})}}function o(){var f=t.getZr().dom;if(f){var v=r.getLocaleModel().get("aria"),h=e.getModel("label");if(h.option=st(h.option,v),!!h.get("enabled")){if(f.setAttribute("role","img"),h.get("description")){f.setAttribute("aria-label",h.get("description"));return}var c=r.getSeriesCount(),p=h.get(["data","maxCount"])||10,d=h.get(["series","maxCount"])||10,g=Math.min(c,d),y;if(!(c<1)){var m=l();if(m){var _=h.get(["general","withTitle"]);y=s(_,{title:m})}else y=h.get(["general","withoutTitle"]);var S=[],x=c>1?h.get(["series","multiple","prefix"]):h.get(["series","single","prefix"]);y+=s(x,{seriesCount:c}),r.eachSeries(function(T,M){if(M1?h.get(["series","multiple",I]):h.get(["series","single",I]),D=s(D,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:u(T.subType)});var P=T.getData();if(P.count()>p){var R=h.get(["data","partialData"]);D+=s(R,{displayCnt:p})}else D+=h.get(["data","allData"]);for(var E=h.get(["data","separator","middle"]),O=h.get(["data","separator","end"]),k=h.get(["data","excludeDimensionId"]),V=[],z=0;z":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Ttt=(function(){function r(t){var e=this._condVal=Z(t)?new RegExp(t):LI(t)?t:null;if(e==null){var a="";Ot(a)}}return r.prototype.evaluate=function(t){var e=typeof t;return Z(e)?this._condVal.test(t):It(e)?this._condVal.test(t+""):!1},r})(),Ctt=(function(){function r(){}return r.prototype.evaluate=function(){return this.value},r})(),Att=(function(){function r(){}return r.prototype.evaluate=function(){for(var t=this.children,e=0;e2&&a.push(n),n=[I,P]}function f(I,P,R,E){Vs(I,R)&&Vs(P,E)||n.push(I,P,R,E,R,E)}function v(I,P,R,E,O,k){var V=Math.abs(P-I),z=Math.tan(V/4)*4/3,F=PC:D2&&a.push(n),a}function y_(r,t,e,a,n,i,o,s,l,u){if(Vs(r,e)&&Vs(t,a)&&Vs(n,o)&&Vs(i,s)){l.push(o,s);return}var f=2/u,v=f*f,h=o-r,c=s-t,p=Math.sqrt(h*h+c*c);h/=p,c/=p;var d=e-r,g=a-t,y=n-o,m=i-s,_=d*d+g*g,S=y*y+m*m;if(_=0&&C=0){l.push(o,s);return}var T=[],M=[];ai(r,e,n,o,.5,T),ai(t,a,i,s,.5,M),y_(T[0],M[0],T[1],M[1],T[2],M[2],T[3],M[3],l,u),y_(T[4],M[4],T[5],M[5],T[6],M[6],T[7],M[7],l,u)}function Gtt(r,t){var e=g_(r),a=[];t=t||1;for(var n=0;n0)for(var u=0;uMath.abs(u),v=EN([l,u],f?0:1,t),h=(f?s:u)/v.length,c=0;cn,o=EN([a,n],i?0:1,t),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",f=i?"y":"x",v=r[s]/o.length,h=0;h1?null:new ut(d*l+r,d*u+t)}function Wtt(r,t,e){var a=new ut;ut.sub(a,e,t),a.normalize();var n=new ut;ut.sub(n,r,t);var i=n.dot(a);return i}function Cs(r,t){var e=r[r.length-1];e&&e[0]===t[0]&&e[1]===t[1]||r.push(t)}function Utt(r,t,e){for(var a=r.length,n=[],i=0;io?(u.x=f.x=s+i/2,u.y=l,f.y=l+o):(u.y=f.y=l+o/2,u.x=s,f.x=s+i),Utt(t,u,f)}function bp(r,t,e,a){if(e===1)a.push(t);else{var n=Math.floor(e/2),i=r(t);bp(r,i[0],n,a),bp(r,i[1],e-n,a)}return a}function Ytt(r,t){for(var e=[],a=0;a0;u/=2){var f=0,v=0;(r&u)>0&&(f=1),(t&u)>0&&(v=1),s+=u*u*(3*f^v),v===0&&(f===1&&(r=u-1-r,t=u-1-t),l=r,r=t,t=l)}return s}function Cp(r){var t=1/0,e=1/0,a=-1/0,n=-1/0,i=W(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),f=l.x+l.width/2+(u?u[4]:0),v=l.y+l.height/2+(u?u[5]:0);return t=Math.min(f,t),e=Math.min(v,e),a=Math.max(f,a),n=Math.max(v,n),[f,v]}),o=W(i,function(s,l){return{cp:s,z:tet(s[0],s[1],t,e,a,n),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function NN(r){return $tt(r.path,r.count)}function m_(){return{fromIndividuals:[],toIndividuals:[],count:0}}function eet(r,t,e){var a=[];function n(x){for(var b=0;b=0;n--)if(!e[n].many.length){var l=e[s].many;if(l.length<=1)if(s)s=0;else return e;var i=l.length,u=Math.ceil(i/2);e[n].many=l.slice(u,i),e[s].many=l.slice(0,u),s++}return e}var aet={clone:function(r){for(var t=[],e=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a0))return;var s=a.getModel("universalTransition").get("delay"),l=G({setToFinal:!0},o),u,f;eI(r)&&(u=r,f=t),eI(t)&&(u=t,f=r);function v(y,m,_,S,x){var b=y.many,w=y.one;if(b.length===1&&!x){var C=m?b[0]:w,T=m?w:b[0];if(wp(C))v({many:[C],one:T},!0,_,S,!0);else{var M=s?st({delay:s(_,S)},l):l;mx(C,T,M),i(C,T,C,T,M)}}else for(var D=st({dividePath:aet[e],individualDelay:s&&function(O,k,V,z){return s(O+_,S)}},l),L=m?eet(b,w,D):ret(w,b,D),I=L.fromIndividuals,P=L.toIndividuals,R=I.length,E=0;Et.length,c=u?rI(f,u):rI(h?t:r,[h?r:t]),p=0,d=0;dBN))for(var i=a.getIndices(),o=0;o0&&b.group.traverse(function(C){C instanceof Ct&&!C.animators.length&&C.animateFrom({style:{opacity:0}},w)})})}function sI(r){var t=r.getModel("universalTransition").get("seriesKey");return t||r.id}function lI(r){return H(r)?r.sort().join(","):r}function zn(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function vet(r,t){var e=K(),a=K(),n=K();return A(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=sI(i),f=lI(u);a.set(f,{dataGroupId:s,data:l}),H(u)&&A(u,function(v){n.set(v,{key:f,dataGroupId:s,data:l})})}),A(t.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=sI(i),u=lI(l),f=a.get(u);if(f)e.set(u,{oldSeries:[{dataGroupId:f.dataGroupId,divide:zn(f.data),data:f.data}],newSeries:[{dataGroupId:o,divide:zn(s),data:s}]});else if(H(l)){var v=[];A(l,function(p){var d=a.get(p);d.data&&v.push({dataGroupId:d.dataGroupId,divide:zn(d.data),data:d.data})}),v.length&&e.set(u,{oldSeries:v,newSeries:[{dataGroupId:o,data:s,divide:zn(s)}]})}else{var h=n.get(l);if(h){var c=e.get(h.key);c||(c={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:zn(h.data)}],newSeries:[]},e.set(h.key,c)),c.newSeries.push({dataGroupId:o,data:s,divide:zn(s)})}}}}),e}function uI(r,t){for(var e=0;e=0&&n.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:zn(t.oldData[s]),groupIdDim:o.dimension})}),A(Ut(r.to),function(o){var s=uI(e.updatedSeries,o);if(s>=0){var l=e.updatedSeries[s].getData();i.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:zn(l),groupIdDim:o.dimension})}}),n.length>0&&i.length>0&&VN(n,i,a)}function cet(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,a){A(Ut(a.seriesTransition),function(n){A(Ut(n.to),function(i){for(var o=a.updatedSeries,s=0;ss.vmin?a+=s.vmin-n+(t-s.vmin)/(s.vmax-s.vmin)*s.gapReal:a+=t-n,n=s.vmax,i=!1;break}a+=s.vmin-n+s.gapReal,n=s.vmax}return i&&(a+=t-n),a},transformOut:function(t,e){if(e&&e.depth===fn)return t;for(var a=fI,n=vI,i=!0,o=0,s=0;su?o=l.vmin+(t-u)/(f-u)*(l.vmax-l.vmin):o=n+t-a,n=l.vmax,i=!1;break}a=f,n=l.vmax}return i&&(o=n+t-a),o}},r})();function det(r,t){return new pet(r,t)}var fI=0,vI=0;function get(r,t){var e=0,a={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},n=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},i={S:{tpAbs:n(),tpPrct:n()},E:{tpAbs:n(),tpPrct:n()}};A(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(e+=l.val);var u=_x(s,t);if(u){var f=u.vmin!==s.vmin,v=u.vmax!==s.vmax,h=u.vmax-u.vmin;if(!(f&&v))if(f||v){var c=f?"S":"E";i[c][l.type].has=!0,i[c][l.type].span=h,i[c][l.type].inExtFrac=h/(s.vmax-s.vmin),i[c][l.type].val=l.val}else a[l.type].span+=h,a[l.type].val+=l.val}});var o=e*(0+(t[1]-t[0])+(a.tpAbs.val-a.tpAbs.span)+(i.S.tpAbs.has?(i.S.tpAbs.val-i.S.tpAbs.span)*i.S.tpAbs.inExtFrac:0)+(i.E.tpAbs.has?(i.E.tpAbs.val-i.E.tpAbs.span)*i.E.tpAbs.inExtFrac:0)-a.tpPrct.span-(i.S.tpPrct.has?i.S.tpPrct.span*i.S.tpPrct.inExtFrac:0)-(i.E.tpPrct.has?i.E.tpPrct.span*i.E.tpPrct.inExtFrac:0))/(1-a.tpPrct.val-(i.S.tpPrct.has?i.S.tpPrct.val*i.S.tpPrct.inExtFrac:0)-(i.E.tpPrct.has?i.E.tpPrct.val*i.E.tpPrct.inExtFrac:0));A(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=e!==0?xt(o,0)*l.val/e:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function yet(r,t,e,a,n,i){r!=="no"&&A(e,function(o){var s=_x(o,i);if(s)for(var l=t.length-1;l>=0;l--){var u=t[l],f=a(u),v=n*3/4;f>s.vmin-v&&ft[0]&&e=0&&o<1-1e-5}A(r,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:rt(o),vmin:t.parse(o.start),vmax:t.parse(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(Z(o.gap)){var u=gr(o.gap);if(u.match(/%$/)){var f=parseFloat(u)/100;n(f)||(f=0),s.gapParsed.type="tpPrct",s.gapParsed.val=f,l=!0}}if(!l){var v=t.parse(o.gap);(!isFinite(v)||v<0)&&(v=0),s.gapParsed.type="tpAbs",s.gapParsed.val=v}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),e&&e.noNegative&&A(["vmin","vmax"],function(c){s[c]<0&&(s[c]=0)}),s.vmin>s.vmax){var h=s.vmax;s.vmax=s.vmin,s.vmin=h}a.push(s)}}),a.sort(function(o,s){return o.vmin-s.vmin});var i=-1/0;return A(a,function(o,s){i>o.vmin&&(a[s]=null),i=o.vmax}),{breaks:Nt(a,function(o){return!!o})}}function Sx(r,t){return S_(t)===S_(r)}function S_(r){return r.start+"_\0_"+r.end}function _et(r,t,e){var a=[];A(r,function(i,o){var s=t(i);s&&s.type==="vmin"&&a.push([o])}),A(r,function(i,o){var s=t(i);if(s&&s.type==="vmax"){var l=Tn(a,function(u){return Sx(t(r[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var n=[];return A(a,function(i){i.length===2&&n.push(e?i:[r[i[0]],r[i[1]]])}),n}function Set(r,t,e,a){if(t.break){var n=t.break.parsedBreak,i=Tn(e,function(f){return Sx(f.breakOption,t.break.parsedBreak.breakOption)}),o={lookup:a,depth:fn},s=r.transformOut(n.vmin,o),l=r.transformOut(n.vmax,o),u={vmin:s,vmax:l,breakOption:n.breakOption,gapParsed:rt(i.gapParsed),gapReal:n.gapReal};return{tickVal:u[t.break.type],vBreak:{type:t.break.type,parsedBreak:u}}}}function xet(r,t,e,a,n){n.original=__(r,t,e);var i=n.transformed=__(r,t,e),o=n.lookup;i.breaks=W(i.breaks,function(s,l){var u={depth:fn},f=t.transformIn(s.vmin,u),v=t.transformIn(s.vmax,u),h={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?t.transformIn(s.vmin+s.gapParsed.val,u)-f:s.gapParsed.val};return o.from[a+l]=f,o.to[a+l]=s.vmin,o.from[a+l+1]=v,o.to[a+l+1]=s.vmax,{vmin:f,vmax:v,gapParsed:h,gapReal:s.gapReal,breakOption:s.breakOption}})}var bet={vmin:"start",vmax:"end"};function wet(r,t){return t&&(r=r||{},r.break={type:bet[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),r}function Tet(){bG({createBreakScaleMapper:det,pruneTicksByBreak:yet,addBreaksToTicks:met,parseAxisBreakOption:__,identifyAxisBreak:Sx,serializeAxisBreakIdentifier:S_,retrieveAxisBreakPairs:_et,getTicksBreakOutwardTransform:Set,parseAxisBreakOptionInwardTransform:xet,makeAxisLabelFormatterParamBreak:wet})}var hI=mt();function Cet(r,t){var e=Tn(r,function(a){return se().identifyAxisBreak(a.parsedBreak.breakOption,t.breakOption)});return e||r.push(e={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),e}function Aet(r){A(r,function(t){return t.shouldRemove=!0})}function Met(r){for(var t=r.length-1;t>=0;t--)r[t].shouldRemove&&r.splice(t,1)}function Det(r,t,e,a,n){var i=e.axis;if(i.scale.isBlank()||!se())return;var o=se().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:"only_break"}),function(T){return T.break},!1);if(!o.length)return;var s=e.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),f=s.get("zigzagMaxSpan");u=Math.max(2,u||0),f=Math.max(u,f||0);var v=s.get("expandOnClick"),h=s.get("zigzagZ"),c=s.getModel("itemStyle"),p=c.getItemStyle(),d=p.stroke,g=p.lineWidth,y=p.lineDash,m=p.fill,_=new it({ignoreModelZ:!0}),S=i.isHorizontal(),x=hI(t).visualList||(hI(t).visualList=[]);Aet(x);for(var b=function(T){var M=o[T][0].break.parsedBreak,D=[];D[0]=i.toGlobalCoord(i.dataToCoord(M.vmin,!0)),D[1]=i.toGlobalCoord(i.dataToCoord(M.vmax,!0)),D[1]=k;gt&&(X=k);var kt=[],vt=[];kt[E]=D,vt[E]=L,!Q&&!gt&&(kt[E]+=U?-l:l,vt[E]-=U?l:-l),kt[O]=X,vt[O]=X,z.push(kt),F.push(vt);var tt=void 0;if(Ym[1]&&m.reverse(),{coordPair:m,brkId:se().serializeAxisBreakIdentifier(y.breakOption)}});l.sort(function(g,y){return g.coordPair[0]-y.coordPair[0]});for(var u=o[0],f=null,v=0;v=0?l[0].width:l[1].width),h=(v+f.x)/2-u.x,c=Math.min(h,h-f.x),p=Math.max(h,h-f.x),d=p<0?p:c>0?c:0;s=(h-d)/f.x}var g=new ut,y=new ut;ut.scale(g,a,-s),ut.scale(y,a,1-s),_0(e[0],g),_0(e[1],y)}function Pet(r,t){var e={breaks:[]};return A(t.breaks,function(a){if(a){var n=Tn(r.get("breaks",!0),function(s){return se().identifyAxisBreak(s,a)});if(n){var i=t.type,o={isExpanded:!!n.isExpanded};n.isExpanded=i===fd?!0:i===IE?!1:i===LE?!n.isExpanded:n.isExpanded,e.breaks.push({start:n.start,end:n.end,isExpanded:!!n.isExpanded,old:o})}}}),e}function Ret(){ZU({adjustBreakLabelPair:Let,buildAxisBreakLine:Iet,rectCoordBuildBreakAxis:Det,updateModelAxisBreak:Pet})}function Eet(r){jU(r),Tet(),Ret()}function ket(){c6(Oet)}function Oet(r,t){A(r,function(e){if(!e.model.get(["axisLabel","inside"])){var a=Net(e);if(a){var n=e.isHorizontal()?"height":"width",i=e.model.get(["axisLabel","margin"]);t[n]-=a[n]+i,e.position==="top"?t.y+=a.height+i:e.position==="left"&&(t.x+=a.width+i)}}})}function Net(r){var t=r.model,e=r.scale;if(!t.get(["axisLabel","show"])||e.isBlank())return;var a,n,i=e.getExtent();e instanceof xf?n=e.count():(a=e.getTicks(),n=a.length);var o=r.getLabelModel(),s=nv(r),l,u=1;n>40&&(u=Math.ceil(n/40));for(var f=0;f1&&arguments[1]!==void 0?arguments[1]:60,n=null;return function(){for(var i=this,o=arguments.length,s=new Array(o),l=0;l