/*! ***************************************************************************** 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 Ad=function(r,e){return Ad=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])},Ad(r,e)};function B(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ad(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var kR=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),ER=function(){function r(){this.browser=new kR,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r}(),Qa=new ER;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Qa.wxa=!0,Qa.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Qa.worker=!0:!Qa.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Qa.node=!0,Qa.svgSupported=!0):OR(navigator.userAgent,Qa);function OR(r,e){var t=e.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&&(t.firefox=!0,t.version=a[1]),n&&(t.ie=!0,t.version=n[1]),i&&(t.edge=!0,t.version=i[1],t.newEdge=+i[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in l||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}}const It=Qa;var Ny=12,ZC="sans-serif",Ra=Ny+"px "+ZC,BR=20,NR=100,VR="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function zR(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t=0)s=o*t.length;else for(var l=0;l>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),t.push(o)}return e.clearMarkers=function(){A(t,function(f){f.parentNode&&f.parentNode.removeChild(f)})},t}function sk(r,e,t){for(var a=t?"invTrans":"trans",n=e[a],i=e.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:(e.srcCoords=o,e[a]=t?v_(s,o):v_(o,s))}function tA(r){return r.nodeName.toUpperCase()==="CANVAS"}var lk=/([&<>"'])/g,uk={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ie(r){return r==null?"":(r+"").replace(lk,function(e,t){return uk[t]})}var fk=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Jh=[],vk=It.browser.firefox&&+It.browser.version.split(".")[0]<39;function kd(r,e,t,a){return t=t||{},a?h_(r,e,t):vk&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):h_(r,e,t),t}function h_(r,e,t){if(It.domSupported&&r.getBoundingClientRect){var a=e.clientX,n=e.clientY;if(tA(r)){var i=r.getBoundingClientRect();t.zrX=a-i.left,t.zrY=n-i.top;return}else if(Rd(Jh,r,a,n)){t.zrX=Jh[0],t.zrY=Jh[1];return}}t.zrX=t.zrY=0}function $y(r){return r||window.event}function vr(r,e,t){if(e=$y(e),e.zrX!=null)return e;var a=e.type,n=a&&a.indexOf("touch")>=0;if(n){var o=a!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&kd(r,o,e,t)}else{kd(r,e,e,t);var i=hk(e);e.zrDelta=i?i/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&fk.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function hk(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,a=r.deltaY;if(t==null||a==null)return e;var n=Math.abs(a!==0?a:t),i=a>0?-1:a<0?1:t>0?-1:1;return 3*n*i}function Ed(r,e,t,a){r.addEventListener(e,t,a)}function ck(r,e,t,a){r.removeEventListener(e,t,a)}var ka=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function c_(r){return r.which===2||r.which===3}var pk=function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,a){return this._doTrack(e,t,a),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,a){var n=e.touches;if(n){for(var i={points:[],touches:[],target:t,event:e},o=0,s=n.length;o1&&a&&a.length>1){var i=p_(a)/p_(n);!isFinite(i)&&(i=1),e.pinchScale=i;var o=dk(a);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function xe(){return[1,0,0,1,0,0]}function ch(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function ph(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function oa(r,e,t){var a=e[0]*t[0]+e[2]*t[1],n=e[1]*t[0]+e[3]*t[1],i=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=a,r[1]=n,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function va(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function Ln(r,e,t,a){a===void 0&&(a=[0,0]);var n=e[0],i=e[2],o=e[4],s=e[1],l=e[3],u=e[5],f=Math.sin(t),v=Math.cos(t);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 Uy(r,e,t){var a=t[0],n=t[1];return r[0]=e[0]*a,r[1]=e[1]*n,r[2]=e[2]*a,r[3]=e[3]*n,r[4]=e[4]*a,r[5]=e[5]*n,r}function Or(r,e){var t=e[0],a=e[2],n=e[4],i=e[1],o=e[3],s=e[5],l=t*o-i*a;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-a*l,r[3]=t*l,r[4]=(a*s-o*n)*l,r[5]=(i*n-t*s)*l,r):null}function gk(r){var e=xe();return ph(e,r),e}var yk=function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.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 e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,a=this.y-e.y;return Math.sqrt(t*t+a*a)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,a=this.y-e.y;return t*t+a*a},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,a=this.y;return this.x=e[0]*t+e[2]*a+e[4],this.y=e[1]*t+e[3]*a+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,a){e.x=t,e.y=a},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,a){e.x=t.x+a.x,e.y=t.y+a.y},r.sub=function(e,t,a){e.x=t.x-a.x,e.y=t.y-a.y},r.scale=function(e,t,a){e.x=t.x*a,e.y=t.y*a},r.scaleAndAdd=function(e,t,a,n){e.x=t.x+a.x*n,e.y=t.y+a.y*n},r.lerp=function(e,t,a,n){var i=1-n;e.x=i*t.x+n*a.x,e.y=i*t.y+n*a.y},r}();const it=yk;var yi=Math.min,Eo=Math.max,Od=Math.abs,d_=["x","y"],mk=["width","height"],En=new it,On=new it,Bn=new it,Nn=new it,Qe=eA(),el=Qe.minTv,Bd=Qe.maxTv,dl=[0,0],Yy=function(){function r(e,t,a,n){r.set(this,e,t,a,n)}return r.set=function(e,t,a,n,i){return n<0&&(t=t+n,n=-n),i<0&&(a=a+i,i=-i),e.x=t,e.y=a,e.width=n,e.height=i,e},r.prototype.union=function(e){var t=yi(e.x,this.x),a=yi(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Eo(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Eo(e.y+e.height,this.y+this.height)-a:this.height=e.height,this.x=t,this.y=a},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,a=e.width/t.width,n=e.height/t.height,i=xe();return va(i,i,[-t.x,-t.y]),Uy(i,i,[a,n]),va(i,i,[e.x,e.y]),i},r.prototype.intersect=function(e,t,a){return r.intersect(this,e,t,a)},r.intersect=function(e,t,a,n){a&&it.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),!e||!t)return!1;e instanceof r||(e=r.set(_k,e.x,e.y,e.width,e.height)),t instanceof r||(t=r.set(Sk,t.x,t.y,t.width,t.height));var s=!!a;Qe.reset(n,s);var l=Qe.touchThreshold,u=e.x+l,f=e.x+e.width-l,v=e.y+l,h=e.y+e.height-l,c=t.x+l,p=t.x+t.width-l,d=t.y+l,g=t.y+t.height-l;if(u>f||v>h||c>p||d>g)return!1;var y=!(f=e.x&&t<=e.x+e.width&&a>=e.y&&a<=e.y+e.height},r.prototype.contain=function(e,t){return r.contain(this,e,t)},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},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(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},r.applyTransform=function(e,t,a){if(!a){e!==t&&r.copy(e,t);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];e.x=t.x*n+o,e.y=t.y*i+s,e.width=t.width*n,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}En.x=Bn.x=t.x,En.y=Nn.y=t.y,On.x=Nn.x=t.x+t.width,On.y=Bn.y=t.y+t.height,En.transform(a),Nn.transform(a),On.transform(a),Bn.transform(a),e.x=yi(En.x,On.x,Bn.x,Nn.x),e.y=yi(En.y,On.y,Bn.y,Nn.y);var l=Eo(En.x,On.x,Bn.x,Nn.x),u=Eo(En.y,On.y,Bn.y,Nn.y);e.width=l-e.x,e.height=u-e.y},r}(),_k=new Yy(0,0,0,0),Sk=new Yy(0,0,0,0);function g_(r,e,t,a,n,i,o,s){var l=Od(e-t),u=Od(a-r),f=yi(l,u),v=d_[n],h=d_[1-n],c=mk[n];e=u||!Qe.bidirectional)&&(el[v]=-u,el[h]=0,Qe.useDir&&Qe.calcDirMTV())))}function eA(){var r=0,e=new it,t=new it,a={minTv:new it,maxTv:new it,useDir:!1,dirMinTv:new it,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,o){a.touchThreshold=0,i&&i.touchThreshold!=null&&(a.touchThreshold=Eo(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),t.copy(a.minTv),r=i.direction,a.bidirectional=i.bidirectional==null||!!i.bidirectional,a.bidirectional||e.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(t.x=s*u/f,t.y=s*l/f,n(t.x)&&n(t.y)){o.set(0,0);return}(a.bidirectional||e.dot(t)>0)&&t.len()=0;v--){var h=i[v];h!==n&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(tc.copy(h.getBoundingRect()),h.transform&&tc.applyTransform(h.transform),tc.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,e)}});function Ck(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var a=r,n=void 0,i=!1;a;){if(a.ignoreClip&&(i=!0),!i){var o=a.getClipPath();if(o&&!o.contain(e,t))return!1}a.silent&&(n=!0);var s=a.__hostTarget;a=s?a.ignoreHostSilent?null:s:a.parent}return n?rA:!0}return!1}function y_(r,e,t,a,n){for(var i=r.length-1;i>=0;i--){var o=r[i],s=void 0;if(o!==n&&!o.ignore&&(s=Ck(o,t,a))&&(!e.topTarget&&(e.topTarget=o),s!==rA)){e.target=o;break}}}function nA(r,e,t){var a=r.painter;return e<0||e>a.getWidth()||t<0||t>a.getHeight()}const Ak=aA;var iA=32,Ts=7;function Mk(r){for(var e=0;r>=iA;)e|=r&1,r>>=1;return r+e}function m_(r,e,t,a){var n=e+1;if(n===t)return 1;if(a(r[n++],r[e])<0){for(;n=0;)n++;return n-e}function Dk(r,e,t){for(t--;e>>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 ec(r,e,t,a,n,i){var o=0,s=0,l=1;if(i(r,e[t+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,e[t+f])>0?o=f+1:l=f}return l}function rc(r,e,t,a,n,i){var o=0,s=0,l=1;if(i(r,e[t+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,e[t+f])<0?l=f:o=f+1}return l}function Lk(r,e){var t=Ts,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]=Ts||w>=Ts);if(T)break;b<0&&(b=0),b+=2}if(t=b,t<1&&(t=1),p===1){for(y=0;y=0;y--)r[x+y]=r[b+y];r[S]=o[_];return}for(var w=t;;){var T=0,C=0,M=!1;do if(e(o[_],r[m])<0){if(r[S--]=r[m--],T++,C=0,--p===0){M=!0;break}}else if(r[S--]=o[_--],C++,T=0,--g===1){M=!0;break}while((T|C)=0;y--)r[x+y]=r[b+y];if(p===0){M=!0;break}}if(r[S--]=o[_--],--g===1){M=!0;break}if(C=g-ec(r[m],o,0,g,g-1,e),C!==0){for(S-=C,_-=C,g-=C,x=S+1,b=_+1,y=0;y=Ts||C>=Ts);if(M)break;w<0&&(w=0),w+=2}if(t=w,t<1&&(t=1),g===1){for(S-=p,m-=p,x=S+1,b=m+1,y=p-1;y>=0;y--)r[x+y]=r[b+y];r[S]=o[_]}else{if(g===0)throw new Error;for(b=S-(g-1),y=0;ys&&(l=s),__(r,t,t+l,t+i,e),i=l}o.pushRun(t,i),o.mergeRuns(),n-=i,t+=i}while(n!==0);o.forceMergeRuns()}}var tr=1,rl=2,Io=4,S_=!1;function ac(){S_||(S_=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function x_(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var Ik=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=x_}return r.prototype.traverse=function(e,t){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}();const Pk=Ik;var oA;oA=It.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};const Nd=oA;var zf={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 e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)))},elasticOut:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/a)+1)},elasticInOut:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-zf.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?zf.bounceIn(r*2)*.5:zf.bounceOut(r*2-1)*.5+.5}};const sA=zf;var xu=Math.pow,pn=Math.sqrt,iv=1e-8,lA=1e-4,b_=pn(3),bu=1/3,jr=$i(),dr=$i(),Fo=$i();function ln(r){return r>-iv&&riv||r<-iv}function de(r,e,t,a,n){var i=1-n;return i*i*(i*r+3*n*e)+n*n*(n*a+3*i*t)}function w_(r,e,t,a,n){var i=1-n;return 3*(((e-r)*i+2*(t-e)*n)*i+(a-t)*n*n)}function ov(r,e,t,a,n,i){var o=a+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-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(ln(f)&&ln(v))if(ln(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(ln(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=pn(d),_=f*s+1.5*o*(-v+m),S=f*s+1.5*o*(-v-m);_<0?_=-xu(-_,bu):_=xu(_,bu),S<0?S=-xu(-S,bu):S=xu(S,bu);var p=(-s-(_+S))/(3*o);p>=0&&p<=1&&(i[c++]=p)}else{var b=(2*f*s-3*o*v)/(2*pn(f*f*f)),x=Math.acos(b)/3,w=pn(f),T=Math.cos(x),p=(-s-2*w*T)/(3*o),y=(-s+w*(T+b_*Math.sin(x)))/(3*o),C=(-s+w*(T-b_*Math.sin(x)))/(3*o);p>=0&&p<=1&&(i[c++]=p),y>=0&&y<=1&&(i[c++]=y),C>=0&&C<=1&&(i[c++]=C)}}return c}function fA(r,e,t,a,n){var i=6*t-12*e+6*r,o=9*e+3*a-3*r-9*t,s=3*e-3*r,l=0;if(ln(o)){if(uA(i)){var u=-s/i;u>=0&&u<=1&&(n[l++]=u)}}else{var f=i*i-4*o*s;if(ln(f))n[0]=-i/(2*o);else if(f>0){var v=pn(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 xn(r,e,t,a,n,i){var o=(e-r)*n+r,s=(t-e)*n+e,l=(a-t)*n+t,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 vA(r,e,t,a,n,i,o,s,l,u,f){var v,h=.005,c=1/0,p,d,g,y;jr[0]=l,jr[1]=u;for(var m=0;m<1;m+=.05)dr[0]=de(r,t,n,o,m),dr[1]=de(e,a,i,s,m),g=Ti(jr,dr),g=0&&g=0&&u<=1&&(n[l++]=u)}}else{var f=o*o-4*i*s;if(ln(f)){var u=-o/(2*i);u>=0&&u<=1&&(n[l++]=u)}else if(f>0){var v=pn(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 hA(r,e,t){var a=r+t-2*e;return a===0?.5:(r-e)/a}function Dl(r,e,t,a,n){var i=(e-r)*a+r,o=(t-e)*a+e,s=(o-i)*a+i;n[0]=r,n[1]=i,n[2]=s,n[3]=s,n[4]=o,n[5]=t}function cA(r,e,t,a,n,i,o,s,l){var u,f=.005,v=1/0;jr[0]=o,jr[1]=s;for(var h=0;h<1;h+=.05){dr[0]=Se(r,t,n,h),dr[1]=Se(e,a,i,h);var c=Ti(jr,dr);c=0&&c=1?1:ov(0,a,i,1,l,s)&&de(0,n,o,1,s[0])}}}var Bk=function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Qt,this.ondestroy=e.ondestroy||Qt,this.onrestart=e.onrestart||Qt,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var a=this._life,n=e-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=e-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(e){this.easing=e,this.easingFunc=et(e)?e:sA[e]||Zy(e)},r}();const Nk=Bk;var pA=function(){function r(e){this.value=e}return r}(),Vk=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new pA(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,a=e.next;t?t.next=a:this.head=a,a?a.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),zk=function(){function r(e){this._list=new Vk,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var a=this._list,n=this._map,i=null;if(n[e]==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=t:s=new pA(t),s.key=e,a.insertEntry(s),n[e]=s}return i},r.prototype.get=function(e){var t=this._map[e],a=this._list;if(t!=null)return t!==a.tail&&(a.remove(t),a.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}();const Zo=zk;var T_={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 Pr(r){return r=Math.round(r),r<0?0:r>255?255:r}function Gk(r){return r=Math.round(r),r<0?0:r>360?360:r}function Ll(r){return r<0?0:r>1?1:r}function nc(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Pr(parseFloat(e)/100*255):Pr(parseInt(e,10))}function dn(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Ll(parseFloat(e)/100):Ll(parseFloat(e))}function ic(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function un(r,e,t){return r+(e-r)*t}function fr(r,e,t,a,n){return r[0]=e,r[1]=t,r[2]=a,r[3]=n,r}function zd(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var dA=new Zo(20),wu=null;function no(r,e){wu&&zd(wu,e),wu=dA.put(r,wu||e.slice())}function Xe(r,e){if(r){e=e||[];var t=dA.get(r);if(t)return zd(e,t);r=r+"";var a=r.replace(/ /g,"").toLowerCase();if(a in T_)return zd(e,T_[a]),no(r,e),e;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)){fr(e,0,0,0,1);return}return fr(e,(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),no(r,e),e}else if(n===7||n===9){var i=parseInt(a.slice(1,7),16);if(!(i>=0&&i<=16777215)){fr(e,0,0,0,1);return}return fr(e,(i&16711680)>>16,(i&65280)>>8,i&255,n===9?parseInt(a.slice(7),16)/255:1),no(r,e),e}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?fr(e,+u[0],+u[1],+u[2],1):fr(e,0,0,0,1);f=dn(u.pop());case"rgb":if(u.length>=3)return fr(e,nc(u[0]),nc(u[1]),nc(u[2]),u.length===3?f:dn(u[3])),no(r,e),e;fr(e,0,0,0,1);return;case"hsla":if(u.length!==4){fr(e,0,0,0,1);return}return u[3]=dn(u[3]),Gd(u,e),no(r,e),e;case"hsl":if(u.length!==3){fr(e,0,0,0,1);return}return Gd(u,e),no(r,e),e;default:return}}fr(e,0,0,0,1)}}function Gd(r,e){var t=(parseFloat(r[0])%360+360)%360/360,a=dn(r[1]),n=dn(r[2]),i=n<=.5?n*(a+1):n+a-n*a,o=n*2-i;return e=e||[],fr(e,Pr(ic(o,i,t+1/3)*255),Pr(ic(o,i,t)*255),Pr(ic(o,i,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function Fk(r){if(r){var e=r[0]/255,t=r[1]/255,a=r[2]/255,n=Math.min(e,t,a),i=Math.max(e,t,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-e)/6+o/2)/o,v=((i-t)/6+o/2)/o,h=((i-a)/6+o/2)/o;e===i?l=h-v:t===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 Fd(r,e){var t=Xe(r);if(t){for(var a=0;a<3;a++)e<0?t[a]=t[a]*(1-e)|0:t[a]=(255-t[a])*e+t[a]|0,t[a]>255?t[a]=255:t[a]<0&&(t[a]=0);return sa(t,t.length===4?"rgba":"rgb")}}function oc(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var a=r*(e.length-1),n=Math.floor(a),i=Math.ceil(a),o=e[n],s=e[i],l=a-n;return t[0]=Pr(un(o[0],s[0],l)),t[1]=Pr(un(o[1],s[1],l)),t[2]=Pr(un(o[2],s[2],l)),t[3]=Ll(un(o[3],s[3],l)),t}}function Hk(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var a=r*(e.length-1),n=Math.floor(a),i=Math.ceil(a),o=Xe(e[n]),s=Xe(e[i]),l=a-n,u=sa([Pr(un(o[0],s[0],l)),Pr(un(o[1],s[1],l)),Pr(un(o[2],s[2],l)),Ll(un(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:n,rightIndex:i,value:a}:u}}function gn(r,e,t,a){var n=Xe(r);if(r)return n=Fk(n),e!=null&&(n[0]=Gk(et(e)?e(n[0]):e)),t!=null&&(n[1]=dn(et(t)?t(n[1]):t)),a!=null&&(n[2]=dn(et(a)?a(n[2]):a)),sa(Gd(n),"rgba")}function sv(r,e){var t=Xe(r);if(t&&e!=null)return t[3]=Ll(e),sa(t,"rgba")}function sa(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function lv(r,e){var t=Xe(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var C_=new Zo(100);function Hd(r){if(Z(r)){var e=C_.get(r);return e||(e=Fd(r,-.1),C_.put(r,e)),e}else if(fh(r)){var t=G({},r);return t.colorStops=$(r.colorStops,function(a){return{offset:a.offset,color:Fd(a.color,-.1)}}),t}return r}var uv=Math.round;function Il(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=Xe(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e??1}}var A_=1e-4;function fn(r){return r-A_}function Tu(r){return uv(r*1e3)/1e3}function Wd(r){return uv(r*1e4)/1e4}function Wk(r){return"matrix("+Tu(r[0])+","+Tu(r[1])+","+Tu(r[2])+","+Tu(r[3])+","+Wd(r[4])+","+Wd(r[5])+")"}var $k={left:"start",right:"end",center:"middle",middle:"middle"};function Uk(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function Yk(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function Zk(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function gA(r){return r&&!!r.image}function Xk(r){return r&&!!r.svgElement}function Xy(r){return gA(r)||Xk(r)}function yA(r){return r.type==="linear"}function mA(r){return r.type==="radial"}function _A(r){return r&&(r.type==="linear"||r.type==="radial")}function dh(r){return"url(#"+r+")"}function SA(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function xA(r){var e=r.x||0,t=r.y||0,a=(r.rotation||0)*Of,n=Q(r.scaleX,1),i=Q(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),a&&l.push("rotate("+a+")"),(n!==1||i!==1)&&l.push("scale("+n+","+i+")"),(o||s)&&l.push("skew("+uv(o*Of)+"deg, "+uv(s*Of)+"deg)"),l.join(" ")}var qk=function(){return It.hasGlobalWindow&&et(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}(),$d=Array.prototype.slice;function ba(r,e,t){return(e-r)*t+r}function sc(r,e,t,a){for(var n=e.length,i=0;ia?e:r,i=Math.min(t,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(e,t,a){this._needsSort=!0;var n=this.keyframes,i=n.length,o=!1,s=D_,l=t;if(Re(t)){var u=Qk(t);s=u,(u===1&&!wt(t[0])||u===2&&!wt(t[0][0]))&&(o=!0)}else if(wt(t)&&!Pe(t))s=Au;else if(Z(t))if(!isNaN(+t))s=Au;else{var f=Xe(t);f&&(l=f,s=al)}else if(fh(t)){var v=G({},l);v.colorStops=$(t.colorStops,function(c){return{offset:c.offset,color:Xe(c.color)}}),yA(t)?s=Ud:mA(t)&&(s=Yd),l=v}i===0?this.valType=s:(s!==this.valType||s===D_)&&(o=!0),this.discrete=this.discrete||o;var h={time:e,value:l,rawValue:t,percent:0};return a&&(h.easing=a,h.easingFunc=et(a)?a:sA[a]||Zy(a)),n.push(h),h},r.prototype.prepare=function(e,t){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=Mu(n),u=L_(n),f=0;f=0&&!(o[f].percent<=t);f--);f=h(f,s-2)}else{for(f=v;ft);f++);f=h(f-1,s-2)}p=o[f+1],c=o[f]}if(c&&p){this._lastFr=f,this._lastFrP=t;var g=p.percent-c.percent,y=g===0?1:h((t-c.percent)/g,1);p.easingFunc&&(y=p.easingFunc(y));var m=a?this._additiveValue:u?Cs:e[l];if((Mu(i)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)e[l]=y<1?c.rawValue:p.rawValue;else if(Mu(i))i===Ff?sc(m,c[n],p[n],y):Kk(m,c[n],p[n],y);else if(L_(i)){var _=c[n],S=p[n],b=i===Ud;e[l]={type:b?"linear":"radial",x:ba(_.x,S.x,y),y:ba(_.y,S.y,y),colorStops:$(_.colorStops,function(w,T){var C=S.colorStops[T];return{offset:ba(w.offset,C.offset,y),color:Gf(sc([],w.color,C.color,y))}}),global:S.global},b?(e[l].x2=ba(_.x2,S.x2,y),e[l].y2=ba(_.y2,S.y2,y)):e[l].r=ba(_.r,S.r,y)}else if(u)sc(m,c[n],p[n],y),a||(e[l]=Gf(m));else{var x=ba(c[n],p[n],y);a?this._additiveValue=x:e[l]=x}a&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,a=this.propName,n=this._additiveValue;t===Au?e[a]=e[a]+n:t===al?(Xe(e[a],Cs),Cu(Cs,Cs,n,1),e[a]=Gf(Cs)):t===Ff?Cu(e[a],e[a],n,1):t===bA&&M_(e[a],e[a],n,1)},r}(),qy=function(){function r(e,t,a,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&n){Gy("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(e){this._target=e},r.prototype.when=function(e,t,a){return this.whenWithKeys(e,t,bt(t),a)},r.prototype.whenWithKeys=function(e,t,a,n){for(var i=this._tracks,o=0;o0&&l.addKeyframe(0,gl(u),n),this._trackKeys.push(s)}l.addKeyframe(e,gl(t[s]),n)}return this._maxTime=Math.max(this._maxTime,e),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(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,a=0;a0)){this._started=1;for(var t=this,a=[],n=this._maxTime||0,i=0;i1){var s=o.pop();i.addKeyframe(s.time,e[n]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},r}();function Oo(){return new Date().getTime()}var eE=function(r){B(e,r);function e(t){var a=r.call(this)||this;return a._running=!1,a._time=0,a._pausedTime=0,a._pauseStart=0,a._paused=!1,t=t||{},a.stage=t.stage||{},a}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var a=t.getClip();a&&this.addClip(a)},e.prototype.removeClip=function(t){if(t.animation){var a=t.prev,n=t.next;a?a.next=n:this._head=n,n?n.prev=a:this._tail=a,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var a=t.getClip();a&&this.removeClip(a),t.animation=null},e.prototype.update=function(t){for(var a=Oo()-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,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function a(){t._running&&(Nd(a),!t._paused&&t.update())}Nd(a)},e.prototype.start=function(){this._running||(this._time=Oo(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Oo(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Oo()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var a=t.next;t.prev=t.next=t.animation=null,t=a}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,a){a=a||{},this.start();var n=new qy(t,a.loop);return this.addAnimator(n),n},e}(Tr);const rE=eE;var aE=300,lc=It.domSupported,uc=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},a=$(r,function(n){var i=n.replace("mouse","pointer");return t.hasOwnProperty(i)?i:n});return{mouse:r,touch:e,pointer:a}}(),I_={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},P_=!1;function Zd(r){var e=r.pointerType;return e==="pen"||e==="touch"}function nE(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 fc(r){r&&(r.zrByTouch=!0)}function iE(r,e){return vr(r.dom,new oE(r,e),!0)}function wA(r,e){for(var t=e,a=!1;t&&t.nodeType!==9&&!(a=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return a}var oE=function(){function r(e,t){this.stopPropagation=Qt,this.stopImmediatePropagation=Qt,this.preventDefault=Qt,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),Mr={mousedown:function(r){r=vr(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=vr(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=vr(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=vr(this.dom,r);var e=r.toElement||r.relatedTarget;wA(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){P_=!0,r=vr(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){P_||(r=vr(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=vr(this.dom,r),fc(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Mr.mousemove.call(this,r),Mr.mousedown.call(this,r)},touchmove:function(r){r=vr(this.dom,r),fc(r),this.handler.processGesture(r,"change"),Mr.mousemove.call(this,r)},touchend:function(r){r=vr(this.dom,r),fc(r),this.handler.processGesture(r,"end"),Mr.mouseup.call(this,r),+new Date-+this.__lastTouchMomentE_||r<-E_}var zn=[],io=[],hc=xe(),cc=Math.abs,hE=function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return Vn(this.rotation)||Vn(this.x)||Vn(this.y)||Vn(this.scaleX-1)||Vn(this.scaleY-1)||Vn(this.skewX)||Vn(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),a=this.transform;if(!(t||e)){a&&(k_(a),this.invTransform=null);return}a=a||xe(),t?this.getLocalTransform(a):k_(a),e&&(t?oa(a,e,a):ph(a,e)),this.transform=a,this._resolveGlobalScaleRatio(a)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(zn);var a=zn[0]<0?-1:1,n=zn[1]<0?-1:1,i=((zn[0]-a)*t+a)/zn[0]||0,o=((zn[1]-n)*t+n)/zn[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||xe(),Or(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],a=e[2]*e[2]+e[3]*e[3],n=Math.atan2(e[1],e[0]),i=Math.PI/2+n-Math.atan2(e[3],e[2]);a=Math.sqrt(a)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-n,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=a,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||xe(),oa(io,e.invTransform,t),t=io);var a=this.originX,n=this.originY;(a||n)&&(hc[4]=a,hc[5]=n,oa(io,t,hc),io[4]-=a,io[5]-=n,t=io),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var a=[e,t],n=this.invTransform;return n&&te(a,a,n),a},r.prototype.transformCoordToGlobal=function(e,t){var a=[e,t],n=this.transform;return n&&te(a,a,n),a},r.prototype.getLineScale=function(){var e=this.transform;return e&&cc(e[0]-1)>1e-10&&cc(e[3]-1)>1e-10?Math.sqrt(cc(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){vv(this,e)},r.getLocalTransform=function(e,t){t=t||[];var a=e.originX||0,n=e.originY||0,i=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,f=e.x,v=e.y,h=e.skewX?Math.tan(e.skewX):0,c=e.skewY?Math.tan(-e.skewY):0;if(a||n||s||l){var p=a+s,d=n+l;t[4]=-p*i-h*d*o,t[5]=-d*o-c*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=o,t[1]=c*i,t[2]=h*o,u&&Ln(t,t,u),t[4]+=a+f,t[5]+=n+v,t},r.initDefaultProps=function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),r}(),ha=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function vv(r,e){for(var t=0;t=O_)){r=r||Ra;for(var e=[],t=+new Date,a=0;a<=127;a++)e[a]=Er.measureText(String.fromCharCode(a),r).width;var n=+new Date-t;return n>16?pc=O_:n>2&&pc++,e}}var pc=0,O_=5;function CA(r,e){return r.asciiWidthMapTried||(r.asciiWidthMap=cE(r.font),r.asciiWidthMapTried=!0),0<=e&&e<=127?r.asciiWidthMap!=null?r.asciiWidthMap[e]:r.asciiCharWidth:r.stWideCharWidth}function ua(r,e){var t=r.strWidthCache,a=t.get(e);return a==null&&(a=Er.measureText(e,r.font).width,t.put(e,a)),a}function B_(r,e,t,a){var n=ua(la(e),r),i=nu(e),o=Xo(0,n,t),s=Ci(0,i,a),l=new lt(o,s,n,i);return l}function gh(r,e,t,a){var n=((r||"")+"").split(` `),i=n.length;if(i===1)return B_(n[0],e,t,a);for(var o=new lt(0,0,0,0),s=0;s=0?parseFloat(r)/100*e:parseFloat(r):r}function hv(r,e,t){var a=e.position||"inside",n=e.distance!=null?e.distance:5,i=t.height,o=t.width,s=i/2,l=t.x,u=t.y,f="left",v="top";if(a instanceof Array)l+=Br(a[0],t.width),u+=Br(a[1],t.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 dc="__zr_normal__",gc=ha.concat(["ignore"]),pE=fa(ha,function(r,e){return r[e]=!0,r},{ignore:!1}),oo={},dE=new lt(0,0,0,0),Lu=[],Ky=function(){function r(e){this.id=KC(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,a){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=e,n[5]+=t,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(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var a=this.textConfig,n=a.local,i=t.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=n?this:null;var u=!1;i.copyTransform(t);var f=a.position!=null,v=a.autoOverflowArea,h=void 0;if((v||f)&&(h=dE,a.layoutRect?h.copy(a.layoutRect):h.copy(this.getBoundingRect()),n||h.applyTransform(this.transform)),f){this.calculateTextPosition?this.calculateTextPosition(oo,a,h):hv(oo,a,h),i.x=oo.x,i.y=oo.y,o=oo.align,s=oo.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=Br(c[0],h.width),d=Br(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 lt(0,0,0,0);i.getLocalTransform(Lu),Or(Lu,Lu),lt.copy(m,h),m.applyTransform(Lu)}else y.overflowRect=null;var _=a.inside==null?typeof a.position=="string"&&a.position.indexOf("inside")>=0:a.inside,S=void 0,b=void 0,x=void 0;_&&this.canBeInsideText()?(S=a.insideFill,b=a.insideStroke,(S==null||S==="auto")&&(S=this.getInsideTextFill()),(b==null||b==="auto")&&(b=this.getInsideTextStroke(S),x=!0)):(S=a.outsideFill,b=a.outsideStroke,(S==null||S==="auto")&&(S=this.getOutsideFill()),(b==null||b==="auto")&&(b=this.getOutsideStroke(S),x=!0)),S=S||"#000",(S!==y.fill||b!==y.stroke||x!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=S,y.stroke=b,y.autoStroke=x,y.align=o,y.verticalAlign=s,t.setDefaultTextStyle(y)),t.__dirty|=tr,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?jd:Kd},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),a=typeof t=="string"&&Xe(t);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,sa(a,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},G(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(st(e))for(var a=e,n=bt(a),i=0;i0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(dc,!1,e)},r.prototype.useState=function(e,t,a,n){var i=e===dc,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(gt(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!i){Gy("State "+e+" not exists.");return}i||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||n);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!a&&!this.__inHover&&l&&l.duration>0,l);var v=this._textContent,h=this._textGuide;return v&&v.useState(e,t,a,f),h&&h.useState(e,t,a,f),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~tr),u}}},r.prototype.useStates=function(e,t,a){if(!e.length)this.clearStates();else{var n=[],i=this.currentStates,o=e.length,s=o===i.length;if(s){for(var l=0;l0,p);var d=this._textContent,g=this._textGuide;d&&d.useStates(e,t,h),g&&g.useStates(e,t,h),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~tr)}},r.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},r.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var a=this.currentStates.slice();a.splice(t,1),this.useStates(a)}},r.prototype.replaceState=function(e,t,a){var n=this.currentStates.slice(),i=gt(n,e),o=gt(n,t)>=0;i>=0?o?n.splice(i,1):n[i]=t:a&&!o&&n.push(t),this.useStates(n)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},a,n=0;n=0&&i.splice(o,1)}),this.animators.push(e),a&&a.animation.addAnimator(e),a&&a.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var a=this.animators,n=a.length,i=[],o=0;o0&&t.during&&i[0].during(function(p,d){t.during(d)});for(var h=0;h0||n.force&&!o.length){var T=void 0,C=void 0,M=void 0;if(s){C={},h&&(T={});for(var S=0;S<_;S++){var y=d[S];C[y]=t[y],h?T[y]=a[y]:t[y]=a[y]}}else if(h){M={};for(var S=0;S<_;S++){var y=d[S];M[y]=gl(t[y]),yE(t,a,y)}}var b=new qy(t,!1,!1,v?kt(p,function(I){return I.targetName===e}):null);b.targetName=e,n.scope&&(b.scope=n.scope),h&&T&&b.whenWithKeys(0,T,d),M&&b.whenWithKeys(0,M,d),b.whenWithKeys(u??500,s?C:a,d).delay(f||0),r.addAnimator(b,e),o.push(b)}}const MA=Ky;var DA=function(r){B(e,r);function e(t){var a=r.call(this)||this;return a.isGroup=!0,a._children=[],a.attr(t),a}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var a=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,a){var n=gt(this._children,t);return n>=0&&this.replaceAt(a,n),this},e.prototype.replaceAt=function(t,a){var n=this._children,i=n[a];if(t&&t!==this&&t.parent!==this&&t!==i){n[a]=t,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var a=this.__zr;a&&a!==t.__zr&&t.addSelfToZr(a),a&&a.refresh()},e.prototype.remove=function(t){var a=this.__zr,n=this._children,i=gt(n,t);return i<0?this:(n.splice(i,1),t.parent=null,a&&t.removeSelfFromZr(a),a&&a.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,a=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},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._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.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(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,a){return this._disposed||this.handler.on(e,t,a),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t0){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 Y=ME;function ME(r,e,t){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return cv(r,e,t)}function cv(r,e,t){return Z(r)?AE(r).match(/%$/)?parseFloat(r)/100*e+(t||0):parseFloat(r):r==null?NaN:+r}function re(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),IA),r=(+r).toFixed(e),t?r:+r}function Sr(r){return r.sort(function(e,t){return e-t}),r}function ea(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return DE(r)}function DE(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),a=t>0?+e.slice(t+1):0,n=t>0?t:e.length,i=e.indexOf("."),o=i<0?0:n-1-i;return Math.max(0,o-a)}function PA(r,e){var t=Math.log,a=Math.LN10,n=Math.floor(t(r[1]-r[0])/a),i=Math.round(t(ta(e[1]-e[0]))/a),o=Math.min(Math.max(-n+i,0),20);return isFinite(o)?o:20}function LE(r,e){var t=fa(r,function(c,p){return c+(isNaN(p)?0:p)},0);if(t===0)return[];for(var a=Math.pow(10,e),n=$(r,function(c){return(isNaN(c)?0:c)/t*a*100}),i=a*100,o=$(n,function(c){return Math.floor(c)}),s=fa(o,function(c,p){return c+p},0),l=$(n,function(c,p){return c-o[p]});su&&(u=l[v],f=v);++o[f],l[f]=0,++s}return $(o,function(c){return c/a})}function IE(r,e){var t=Math.max(ea(r),ea(e)),a=r+e;return t>IA?a:re(a,t)}var z_=9007199254740991;function RA(r){var e=Math.PI*2;return(r%e+e)%e}function Pl(r){return r>-V_&&r=10&&e++,e}function kA(r,e){var t=jy(r),a=Math.pow(10,t),n=r/a,i;return e?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,t>=-20?+r.toFixed(t<0?-t:0):r}function _c(r,e){var t=(r.length-1)*e+1,a=Math.floor(t),n=+r[a-1],i=t-a;return i?n+i*(r[a]-n):n}function G_(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,a=0;a0?e.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 Sc(r){r.option=r.parentModel=r.ecModel=null}var jE=".",Gn="___EC__COMPONENT__CONTAINER___",$A="___EC__EXTENDED_CLASS___";function ra(r){var e={main:"",sub:""};if(r){var t=r.split(jE);e.main=t[0]||"",e.sub=t[1]||""}return e}function JE(r){ke(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function QE(r){return!!(r&&r[$A])}function tm(r,e){r.$constructor=r,r.extend=function(t){var a=this,n;return tO(a)?n=function(i){B(o,i);function o(){return i.apply(this,arguments)||this}return o}(a):(n=function(){(t.$constructor||a).apply(this,arguments)},UR(n,this)),G(n.prototype,t),n[$A]=!0,n.extend=this.extend,n.superCall=aO,n.superApply=nO,n.superClass=a,n}}function tO(r){return et(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function UA(r,e){r.extend=e.extend}var eO=Math.round(Math.random()*10);function rO(r){var e=["__\0is_clz",eO++].join("_");r.prototype[e]=!0,r.isInstance=function(t){return!!(t&&t[e])}}function aO(r,e){for(var t=[],a=2;a=0||i&>(i,l)<0)){var u=a.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var iO=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],oO=Bi(iO),sO=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return oO(this,e,t)},r}(),tg=new Zo(50);function lO(r){if(typeof r=="string"){var e=tg.get(r);return e&&e.image}else return r}function em(r,e,t,a,n){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var i=tg.get(r),o={hostEl:t,cb:a,cbPayload:n};return i?(e=i.image,!mh(e)&&i.pending.push(o)):(e=Er.loadImage(r,U_,U_),e.__zrImageSrc=r,tg.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function U_(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=s;u++)l-=s;var f=ua(o,t);return f>l&&(t="",f=0),l=r-f,n.ellipsis=t,n.ellipsisWidth=f,n.contentWidth=l,n.containerWidth=r,n}function ZA(r,e,t){var a=t.containerWidth,n=t.contentWidth,i=t.fontMeasureInfo;if(!a){r.textLine="",r.isTruncated=!1;return}var o=ua(i,e);if(o<=a){r.textLine=e,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=n||s>=t.maxIterations){e+=t.ellipsis;break}var l=s===0?fO(e,n,i):o>0?Math.floor(e.length*n/o):0;e=e.substr(0,l),o=ua(i,e)}e===""&&(e=t.placeholder),r.textLine=e,r.isTruncated=!0}function fO(r,e,t){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=YA(d,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),b={},x=0;xp&&bc(i,o.substring(p,g),e,c),bc(i,d[2],e,c,d[1]),p=xc.lastIndex}pv){var N=i.lines.length;I>0?(C.tokens=C.tokens.slice(0,I),w(C,D,M),i.lines=i.lines.slice(0,T+1)):i.lines=i.lines.slice(0,T),i.isTruncated=i.isTruncated||i.lines.length0&&p+a.accumWidth>a.width&&(f=e.split(` `),u=!0),a.accumWidth=p}else{var d=XA(e,l,a.width,a.breakAll,a.accumWidth);a.accumWidth=d.accumWidth+c,v=d.linesWidths,f=d.lines}}f||(f=e.split(` `));for(var g=la(l),y=0;y=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var gO=fa(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function yO(r){return dO(r)?!!gO[r]:!0}function XA(r,e,t,a,n){for(var i=[],o=[],s="",l="",u=0,f=0,v=la(e),h=0;ht:n+f+p>t){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 Z_(r,e,t,a,n,i){if(r.baseX=t,r.baseY=a,r.outerWidth=r.outerHeight=null,!!e){var o=e.width*2,s=e.height*2;lt.set(X_,Xo(t,o,n),Ci(a,s,i),o,s),lt.intersect(e,X_,null,q_);var l=q_.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=Xo(l.x,l.width,n,!0),r.baseY=Ci(l.y,l.height,i,!0)}}var X_=new lt(0,0,0,0),q_={outIntersectRect:{},clamp:!0};function rm(r){return r!=null?r+="":r=""}function mO(r){var e=rm(r.text),t=r.font,a=ua(la(t),e),n=nu(t);return eg(r,a,n,null)}function eg(r,e,t,a){var n=new lt(Xo(r.x||0,e,r.textAlign),Ci(r.y||0,t,r.textBaseline),e,t),i=a??(qA(r)?r.lineWidth:0);return i>0&&(n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i),n}function qA(r){var e=r.stroke;return e!=null&&e!=="none"&&r.lineWidth>0}var rg="__zr_style_"+Math.round(Math.random()*10),Ai={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},_h={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ai[rg]=!0;var K_=["z","z2","invisible"],_O=["invisible"],SO=function(r){B(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var a=bt(t),n=0;n1e-4){s[0]=r-t,s[1]=e-a,l[0]=r+t,l[1]=e+a;return}if(Iu[0]=Ac(n)*t+r,Iu[1]=Cc(n)*a+e,Pu[0]=Ac(i)*t+r,Pu[1]=Cc(i)*a+e,u(s,Iu,Pu),f(l,Iu,Pu),n=n%Fn,n<0&&(n=n+Fn),i=i%Fn,i<0&&(i=i+Fn),n>i&&!o?i+=Fn:nn&&(Ru[0]=Ac(c)*t+r,Ru[1]=Cc(c)*a+e,u(s,Ru,s),f(l,Ru,l))}var zt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Hn=[],Wn=[],Fr=[],$a=[],Hr=[],Wr=[],Mc=Math.min,Dc=Math.max,$n=Math.cos,Un=Math.sin,ya=Math.abs,ag=Math.PI,tn=ag*2,Lc=typeof Float32Array<"u",As=[];function Ic(r){var e=Math.round(r/ag*1e8)/1e8;return e%2*ag}function xh(r,e){var t=Ic(r[0]);t<0&&(t+=tn);var a=t-r[0],n=r[1];n+=a,!e&&n-t>=tn?n=t+tn:e&&t-n>=tn?n=t-tn:!e&&t>n?n=t+(tn-Ic(t-n)):e&&t0&&(this._ux=ya(a/fv/e)||0,this._uy=ya(a/fv/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},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(e,t){return this._drawPendingPt(),this.addData(zt.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var a=ya(e-this._xi),n=ya(t-this._yi),i=a>this._ux||n>this._uy;if(this.addData(zt.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=a*a+n*n;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,a,n,i,o){return this._drawPendingPt(),this.addData(zt.C,e,t,a,n,i,o),this._ctx&&this._ctx.bezierCurveTo(e,t,a,n,i,o),this._xi=i,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,a,n){return this._drawPendingPt(),this.addData(zt.Q,e,t,a,n),this._ctx&&this._ctx.quadraticCurveTo(e,t,a,n),this._xi=a,this._yi=n,this},r.prototype.arc=function(e,t,a,n,i,o){this._drawPendingPt(),As[0]=n,As[1]=i,xh(As,o),n=As[0],i=As[1];var s=i-n;return this.addData(zt.A,e,t,a,a,n,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,a,n,i,o),this._xi=$n(i)*a+e,this._yi=Un(i)*a+t,this},r.prototype.arcTo=function(e,t,a,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,a,n,i),this},r.prototype.rect=function(e,t,a,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,a,n),this.addData(zt.R,e,t,a,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(zt.Z);var e=this._ctx,t=this._x0,a=this._y0;return e&&e.closePath(),this._xi=t,this._yi=a,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&Lc&&(this.data=new Float32Array(t));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 e=[],t=0;t11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){Fr[0]=Fr[1]=Hr[0]=Hr[1]=Number.MAX_VALUE,$a[0]=$a[1]=Wr[0]=Wr[1]=-Number.MAX_VALUE;var e=this.data,t=0,a=0,n=0,i=0,o;for(o=0;oa||ya(_)>n||h===t-1)&&(d=Math.sqrt(m*m+_*_),i=g,o=y);break}case zt.C:{var S=e[h++],b=e[h++],g=e[h++],y=e[h++],x=e[h++],w=e[h++];d=Rk(i,o,S,b,g,y,x,w,10),i=x,o=w;break}case zt.Q:{var S=e[h++],b=e[h++],g=e[h++],y=e[h++];d=Ek(i,o,S,b,g,y,10),i=g,o=y;break}case zt.A:var T=e[h++],C=e[h++],M=e[h++],D=e[h++],I=e[h++],L=e[h++],P=L+I;h+=1,p&&(s=$n(I)*M+T,l=Un(I)*D+C),d=Dc(M,D)*Mc(tn,Math.abs(L)),i=$n(P)*M+T,o=Un(P)*D+C;break;case zt.R:{s=i=e[h++],l=o=e[h++];var k=e[h++],R=e[h++];d=k*2+R*2;break}case zt.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(e,t){var a=this.data,n=this._ux,i=this._uy,o=this._len,s,l,u,f,v,h,c=t<1,p,d,g=0,y=0,m,_=0,S,b;if(!(c&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,d=this._pathLen,m=t*d,!m)))t:for(var x=0;x0&&(e.lineTo(S,b),_=0),w){case zt.M:s=u=a[x++],l=f=a[x++],e.moveTo(u,f);break;case zt.L:{v=a[x++],h=a[x++];var C=ya(v-u),M=ya(h-f);if(C>n||M>i){if(c){var D=p[y++];if(g+D>m){var I=(m-g)/D;e.lineTo(u*(1-I)+v*I,f*(1-I)+h*I);break t}g+=D}e.lineTo(v,h),u=v,f=h,_=0}else{var L=C*C+M*M;L>_&&(S=v,b=h,_=L)}break}case zt.C:{var P=a[x++],k=a[x++],R=a[x++],O=a[x++],E=a[x++],N=a[x++];if(c){var D=p[y++];if(g+D>m){var I=(m-g)/D;xn(u,P,R,E,I,Hn),xn(f,k,O,N,I,Wn),e.bezierCurveTo(Hn[1],Wn[1],Hn[2],Wn[2],Hn[3],Wn[3]);break t}g+=D}e.bezierCurveTo(P,k,R,O,E,N),u=E,f=N;break}case zt.Q:{var P=a[x++],k=a[x++],R=a[x++],O=a[x++];if(c){var D=p[y++];if(g+D>m){var I=(m-g)/D;Dl(u,P,R,I,Hn),Dl(f,k,O,I,Wn),e.quadraticCurveTo(Hn[1],Wn[1],Hn[2],Wn[2]);break t}g+=D}e.quadraticCurveTo(P,k,R,O),u=R,f=O;break}case zt.A:var z=a[x++],F=a[x++],H=a[x++],U=a[x++],K=a[x++],ft=a[x++],At=a[x++],Ot=!a[x++],vt=H>U?H:U,tt=ya(H-U)>.001,pt=K+ft,J=!1;if(c){var D=p[y++];g+D>m&&(pt=K+ft*(m-g)/D,J=!0),g+=D}if(tt&&e.ellipse?e.ellipse(z,F,H,U,At,K,pt,Ot):e.arc(z,F,vt,K,pt,Ot),J)break t;T&&(s=$n(K)*H+z,l=Un(K)*U+F),u=$n(pt)*H+z,f=Un(pt)*U+F;break;case zt.R:s=u=a[x],l=f=a[x+1],v=a[x++],h=a[x++];var ht=a[x++],Bt=a[x++];if(c){var D=p[y++];if(g+D>m){var Tt=m-g;e.moveTo(v,h),e.lineTo(v+Mc(Tt,ht),h),Tt-=ht,Tt>0&&e.lineTo(v+ht,h+Mc(Tt,Bt)),Tt-=Bt,Tt>0&&e.lineTo(v+Dc(ht-Tt,0),h+Bt),Tt-=ht,Tt>0&&e.lineTo(v,h+Dc(Bt-Tt,0));break t}g+=D}e.rect(v,h,ht,Bt);break;case zt.Z:if(c){var D=p[y++];if(g+D>m){var I=(m-g)/D;e.lineTo(u*(1-I)+s*I,f*(1-I)+l*I);break t}g+=D}e.closePath(),u=s,f=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.prototype.canSave=function(){return!!this._saveData},r.CMD=zt,r.initDefaultProps=function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),r}();function rn(r,e,t,a,n,i,o){if(n===0)return!1;var s=n,l=0,u=r;if(o>e+s&&o>a+s||or+s&&i>t+s||ie+v&&f>a+v&&f>i+v&&f>s+v||fr+v&&u>t+v&&u>n+v&&u>o+v||ue+u&&l>a+u&&l>i+u||lr+u&&s>t+u&&s>n+u||st||f+un&&(n+=Ms);var h=Math.atan2(l,s);return h<0&&(h+=Ms),h>=a&&h<=n||h+Ms>=a&&h+Ms<=n}function wa(r,e,t,a,n,i){if(i>e&&i>a||in?s:0}var Ua=ca.CMD,Yn=Math.PI*2,MO=1e-4;function DO(r,e){return Math.abs(r-e)e&&u>a&&u>i&&u>s||u1&&LO(),c=de(e,a,i,s,cr[0]),h>1&&(p=de(e,a,i,s,cr[1]))),h===2?ge&&s>a&&s>i||s=0&&u<=1){for(var f=0,v=Se(e,a,i,u),h=0;ht||s<-t)return 0;var l=Math.sqrt(t*t-s*s);Ne[0]=-l,Ne[1]=l;var u=Math.abs(a-n);if(u<1e-4)return 0;if(u>=Yn-1e-4){a=0,n=Yn;var f=i?1:-1;return o>=Ne[0]+r&&o<=Ne[1]+r?f:0}if(a>n){var v=a;a=n,n=v}a<0&&(a+=Yn,n+=Yn);for(var h=0,c=0;c<2;c++){var p=Ne[c];if(p+r>o){var d=Math.atan2(s,p),f=i?1:-1;d<0&&(d=Yn+d),(d>=a&&d<=n||d+Yn>=a&&d+Yn<=n)&&(d>Math.PI/2&&d1&&(t||(s+=wa(l,u,f,v,a,n))),g&&(l=i[p],u=i[p+1],f=l,v=u),d){case Ua.M:f=i[p++],v=i[p++],l=f,u=v;break;case Ua.L:if(t){if(rn(l,u,i[p],i[p+1],e,a,n))return!0}else s+=wa(l,u,i[p],i[p+1],a,n)||0;l=i[p++],u=i[p++];break;case Ua.C:if(t){if(CO(l,u,i[p++],i[p++],i[p++],i[p++],i[p],i[p+1],e,a,n))return!0}else s+=IO(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 Ua.Q:if(t){if(KA(l,u,i[p++],i[p++],i[p],i[p+1],e,a,n))return!0}else s+=PO(l,u,i[p++],i[p++],i[p],i[p+1],a,n)||0;l=i[p++],u=i[p++];break;case Ua.A:var y=i[p++],m=i[p++],_=i[p++],S=i[p++],b=i[p++],x=i[p++];p+=1;var w=!!(1-i[p++]);h=Math.cos(b)*_+y,c=Math.sin(b)*S+m,g?(f=h,v=c):s+=wa(l,u,h,c,a,n);var T=(a-y)*S/_+y;if(t){if(AO(y,m,S,b,b+x,w,e,T,n))return!0}else s+=RO(y,m,S,b,b+x,w,T,n);l=Math.cos(b+x)*_+y,u=Math.sin(b+x)*S+m;break;case Ua.R:f=l=i[p++],v=u=i[p++];var C=i[p++],M=i[p++];if(h=f+C,c=v+M,t){if(rn(f,v,h,v,e,a,n)||rn(h,v,h,c,e,a,n)||rn(h,c,f,c,e,a,n)||rn(f,c,f,v,e,a,n))return!0}else s+=wa(h,v,h,c,a,n),s+=wa(f,c,f,v,a,n);break;case Ua.Z:if(t){if(rn(l,u,f,v,e,a,n))return!0}else s+=wa(l,u,f,v,a,n);l=f,u=v;break}}return!t&&!DO(u,v)&&(s+=wa(l,u,f,v,a,n)||0),s!==0}function kO(r,e,t){return jA(r,0,!1,e,t)}function EO(r,e,t,a){return jA(r,e,!0,t,a)}var pv=ot({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ai),OO={style:ot({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},_h.style)},Pc=ha.concat(["invisible","culling","z","z2","zlevel","parent"]),BO=function(r){B(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var a=this.style;if(a.decal){var n=this._decalEl=this._decalEl||new e;n.buildPath===e.prototype.buildPath&&(n.buildPath=function(l){t.buildPath(l,t.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?Kd:a>.2?vE:jd}else if(t)return jd}return Kd},e.prototype.getInsideTextStroke=function(t){var a=this.style.fill;if(Z(a)){var n=this.__zr,i=!!(n&&n.isDarkMode()),o=lv(t,0)0))},e.prototype.hasFill=function(){var t=this.style,a=t.fill;return a!=null&&a!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,a=this.style,n=!t;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&Io)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){s.copy(t);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 t},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect(),o=this.style;if(t=n[0],a=n[1],i.contain(t,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)),EO(s,l/u,t,a)))return!0}if(this.hasFill())return kO(s,t,a)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Io,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,a){t==="shape"?this.setShape(a):r.prototype.attrKV.call(this,t,a)},e.prototype.setShape=function(t,a){var n=this.shape;return n||(n=this.shape={}),typeof t=="string"?n[t]=a:G(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Io)},e.prototype.createStyle=function(t){return hh(pv,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var a=this._normalState;t.shape&&!a.shape&&(a.shape=G({},this.shape))},e.prototype._applyStateObj=function(t,a,n,i,o,s){r.prototype._applyStateObj.call(this,t,a,n,i,o,s);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=bt(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(t+s,a),r.lineTo(t+n-l,a),l!==0&&r.arc(t+n-l,a+l,l,-Math.PI/2,0),r.lineTo(t+n,a+i-u),u!==0&&r.arc(t+n-u,a+i-u,u,0,Math.PI/2),r.lineTo(t+f,a+i),f!==0&&r.arc(t+f,a+i-f,f,Math.PI/2,Math.PI),r.lineTo(t,a+s),s!==0&&r.arc(t+s,a+s,s,Math.PI,Math.PI*1.5)}var Bo=Math.round;function bh(r,e,t){if(e){var a=e.x1,n=e.x2,i=e.y1,o=e.y2;r.x1=a,r.x2=n,r.y1=i,r.y2=o;var s=t&&t.lineWidth;return s&&(Bo(a*2)===Bo(n*2)&&(r.x1=r.x2=rr(a,s,!0)),Bo(i*2)===Bo(o*2)&&(r.y1=r.y2=rr(i,s,!0))),r}}function tM(r,e,t){if(e){var a=e.x,n=e.y,i=e.width,o=e.height;r.x=a,r.y=n,r.width=i,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=rr(a,s,!0),r.y=rr(n,s,!0),r.width=Math.max(rr(a+i,s,!1)-r.x,i===0?0:1),r.height=Math.max(rr(n+o,s,!1)-r.y,o===0?0:1)),r}}function rr(r,e,t){if(!e)return r;var a=Bo(r*2);return(a+Bo(e))%2===0?a/2:(a+(t?1:-1))/2}var HO=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),WO={},eM=function(r){B(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new HO},e.prototype.buildPath=function(t,a){var n,i,o,s;if(this.subPixelOptimize){var l=tM(WO,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?FO(t,a):t.rect(n,i,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(xt);eM.prototype.type="rect";const _t=eM;var e1={fill:"#000"},r1=2,$r={},$O={style:ot({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},_h.style)},rM=function(r){B(e,r);function e(t){var a=r.call(this)||this;return a.type="text",a._children=[],a._defaultStyle=e1,a.attr(t),a}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,I=0;I=0&&(P=x[L],P.align==="right");)this._placeToken(P,t,T,y,I,"right",_),C-=P.width,I-=P.width,L--;for(D+=(f-(D-g)-(m-I)-C)/2;M<=L;)P=x[M],this._placeToken(P,t,T,y,D+P.width/2,"center",_),D+=P.width,M++;y+=T}},e.prototype._placeToken=function(t,a,n,i,o,s,l){var u=a.rich[t.styleName]||{};u.text=t.text;var f=t.verticalAlign,v=i+n/2;f==="top"?v=i+t.height/2:f==="bottom"&&(v=i+n-t.height/2);var h=!t.isLineHolder&&Rc(u);h&&this._renderBackground(u,a,s==="right"?o-t.width:s==="center"?o-t.width/2:o,v-t.height/2,t.width,t.height);var c=!!u.backgroundColor,p=t.textPadding;p&&(o=l1(o,s,p),v-=t.height/2-p[0]-t.innerHeight/2);var d=this._getOrCreateChild(kl),g=d.createStyle();d.useStyle(g);var y=this._defaultStyle,m=!1,_=0,S=!1,b=s1("fill"in u?u.fill:"fill"in a?a.fill:(m=!0,y.fill)),x=o1("stroke"in u?u.stroke:"stroke"in a?a.stroke:!c&&!l&&(!y.autoStroke||m)?(_=r1,S=!0,y.stroke):null),w=u.textShadowBlur>0||a.textShadowBlur>0;g.text=t.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=t.font||Ra,g.opacity=ar(u.opacity,a.opacity,1),n1(g,u),x&&(g.lineWidth=ar(u.lineWidth,a.lineWidth,_),g.lineDash=Q(u.lineDash,a.lineDash),g.lineDashOffset=a.lineDashOffset||0,g.stroke=x),b&&(g.fill=b),d.setBoundingRect(eg(g,t.contentWidth,t.contentHeight,S?0:null))},e.prototype._renderBackground=function(t,a,n,i,o,s){var l=t.backgroundColor,u=t.borderWidth,f=t.borderColor,v=l&&l.image,h=l&&!v,c=t.borderRadius,p=this,d,g;if(h||t.lineHeight||u&&f){d=this._getOrCreateChild(_t),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=Q(t.fillOpacity,1)}else if(v){g=this._getOrCreateChild(Me),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=Q(t.strokeOpacity,1),m.lineDash=t.borderDash,m.lineDashOffset=t.borderDashOffset||0,d.strokeContainThreshold=0,d.hasFill()&&d.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(d||g).style;S.shadowBlur=t.shadowBlur||0,S.shadowColor=t.shadowColor||"transparent",S.shadowOffsetX=t.shadowOffsetX||0,S.shadowOffsetY=t.shadowOffsetY||0,S.opacity=ar(t.opacity,a.opacity,1)},e.makeFont=function(t){var a="";return nM(t)&&(a=[t.fontStyle,t.fontWeight,aM(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),a&&_r(a)||t.textFont||t.font},e}(br),UO={left:!0,right:1,center:1},YO={top:1,bottom:1,middle:1},a1=["fontStyle","fontWeight","fontSize","fontFamily"];function aM(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?Ny+"px":r+"px"}function n1(r,e){for(var t=0;t=0,i=!1;if(r instanceof xt){var o=iM(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(so(s)||so(l)){a=a||{};var u=a.style||{};u.fill==="inherit"?(i=!0,a=G({},a),u=G({},u),u.fill=s):!so(u.fill)&&so(s)?(i=!0,a=G({},a),u=G({},u),u.fill=Hd(s)):!so(u.stroke)&&so(l)&&(i||(a=G({},a),u=G({},u)),u.stroke=Hd(l)),a.style=u}}if(a&&a.z2==null){i||(a=G({},a));var f=r.z2EmphasisLift;a.z2=r.z2+(f??fs)}return a}function QO(r,e,t){if(t&&t.z2==null){t=G({},t);var a=r.z2SelectLift;t.z2=r.z2+(a??XO)}return t}function tB(r,e,t){var a=gt(r.currentStates,e)>=0,n=r.style.opacity,i=a?null:jO(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=G({},t),o=G({opacity:a?n:i.opacity*.1},o),t.style=o),t}function kc(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return JO(this,r,e,t);if(r==="blur")return tB(this,r,t);if(r==="select")return QO(this,r,t)}return t}function Ni(r){r.stateProxy=kc;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=kc),t&&(t.stateProxy=kc)}function c1(r,e){!hM(r,e)&&!r.__highByOuter&&Fa(r,oM)}function p1(r,e){!hM(r,e)&&!r.__highByOuter&&Fa(r,sM)}function Oa(r,e){r.__highByOuter|=1<<(e||0),Fa(r,oM)}function Ba(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&Fa(r,sM)}function uM(r){Fa(r,om)}function sm(r){Fa(r,lM)}function fM(r){Fa(r,qO)}function vM(r){Fa(r,KO)}function hM(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function cM(r){var e=r.getModel(),t=[],a=[];e.eachComponent(function(n,i){var o=am(i),s=n==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&a.push(l),o.isBlured&&(l.group.traverse(function(u){lM(u)}),s&&t.push(i)),o.isBlured=!1}),A(a,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(t,!1,e)})}function og(r,e,t,a){var n=a.getModel();t=t||"coordinateSystem";function i(u,f){for(var v=0;v0){var s={dataIndex:o,seriesIndex:t.seriesIndex};i!=null&&(s.dataType=i),e.push(s)}})}),e}function Di(r,e,t){mi(r,!0),Fa(r,Ni),lg(r,e,t)}function oB(r){mi(r,!1)}function $t(r,e,t,a){a?oB(r):Di(r,e,t)}function lg(r,e,t){var a=ut(r);e!=null?(a.focus=e,a.blurScope=t):a.focus&&(a.focus=null)}var g1=["emphasis","blur","select"],sB={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function ve(r,e,t,a){t=t||"itemStyle";for(var n=0;n1&&(o*=Ec(p),s*=Ec(p));var d=(n===i?-1:1)*Ec((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+t)/2+Eu(v)*g-ku(v)*y,_=(e+a)/2+ku(v)*g+Eu(v)*y,S=S1([1,0],[(h-g)/o,(c-y)/s]),b=[(h-g)/o,(c-y)/s],x=[(-1*h-g)/o,(-1*c-y)/s],w=S1(b,x);if(fg(b,x)<=-1&&(w=Ds),fg(b,x)>=1&&(w=0),w<0){var T=Math.round(w/Ds*1e6)/1e6;w=Ds*2+T%2*Ds}f.addData(u,m,_,o,s,S,w,v,i)}var cB=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,pB=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function dB(r){var e=new ca;if(!r)return e;var t=0,a=0,n=t,i=a,o,s=ca.CMD,l=r.match(cB);if(!l)return e;for(var u=0;uP*P+k*k&&(T=M,C=D),{cx:T,cy:C,x0:-f,y0:-v,x1:T*(n/b-1),y1:C*(n/b-1)}}function bB(r){var e;if(W(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function wB(r,e){var t,a=nl(e.r,0),n=nl(e.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=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var f=e.cx,v=e.cy,h=!!e.clockwise,c=b1(u-l),p=c>Oc&&c%Oc;if(p>Ar&&(c=p),!(a>Ar))r.moveTo(f,v);else if(c>Oc-Ar)r.moveTo(f+a*uo(l),v+a*Zn(l)),r.arc(f,v,a,l,u,!h),n>Ar&&(r.moveTo(f+n*uo(u),v+n*Zn(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,b=void 0,x=void 0,w=void 0,T=void 0,C=void 0,M=void 0,D=void 0,I=void 0,L=void 0,P=void 0,k=a*uo(l),R=a*Zn(l),O=n*uo(u),E=n*Zn(u),N=c>Ar;if(N){var z=e.cornerRadius;z&&(t=bB(z),d=t[0],g=t[1],y=t[2],m=t[3]);var F=b1(a-n)/2;if(_=Ur(F,y),S=Ur(F,m),b=Ur(F,d),x=Ur(F,g),C=w=nl(_,S),M=T=nl(b,x),(w>Ar||T>Ar)&&(D=a*uo(u),I=a*Zn(u),L=n*uo(l),P=n*Zn(l),cAr){var tt=Ur(y,C),pt=Ur(m,C),J=Ou(L,P,k,R,a,tt,h),ht=Ou(D,I,O,E,a,pt,h);r.moveTo(f+J.cx+J.x0,v+J.cy+J.y0),C0&&r.arc(f+J.cx,v+J.cy,tt,De(J.y0,J.x0),De(J.y1,J.x1),!h),r.arc(f,v,a,De(J.cy+J.y1,J.cx+J.x1),De(ht.cy+ht.y1,ht.cx+ht.x1),!h),pt>0&&r.arc(f+ht.cx,v+ht.cy,pt,De(ht.y1,ht.x1),De(ht.y0,ht.x0),!h))}else r.moveTo(f+k,v+R),r.arc(f,v,a,l,u,!h);if(!(n>Ar)||!N)r.lineTo(f+O,v+E);else if(M>Ar){var tt=Ur(d,M),pt=Ur(g,M),J=Ou(O,E,D,I,n,-pt,h),ht=Ou(k,R,L,P,n,-tt,h);r.lineTo(f+J.cx+J.x0,v+J.cy+J.y0),M0&&r.arc(f+J.cx,v+J.cy,pt,De(J.y0,J.x0),De(J.y1,J.x1),!h),r.arc(f,v,n,De(J.cy+J.y1,J.cx+J.x1),De(ht.cy+ht.y1,ht.cx+ht.x1),h),tt>0&&r.arc(f+ht.cx,v+ht.cy,tt,De(ht.y1,ht.x1),De(ht.y0,ht.x0),!h))}else r.lineTo(f+O,v+E),r.arc(f,v,n,u,l,h)}r.closePath()}}}var TB=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}(),bM=function(r){B(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new TB},e.prototype.buildPath=function(t,a){wB(t,a)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(xt);bM.prototype.type="sector";const Fe=bM;var CB=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),wM=function(r){B(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new CB},e.prototype.buildPath=function(t,a){var n=a.cx,i=a.cy,o=Math.PI*2;t.moveTo(n+a.r,i),t.arc(n,i,a.r,0,o,!1),t.moveTo(n+a.r0,i),t.arc(n,i,a.r0,0,o,!0)},e}(xt);wM.prototype.type="ring";const Ch=wM;function AB(r,e,t,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=AB(n,a,t,e.smoothConstraint);r.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(t?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;sqn[1]){if(i=!1,_e.negativeSize||a)return i;var l=Bu(qn[0]-Xn[1]),u=Bu(Xn[0]-qn[1]);Bc(l,u)>Vu.len()&&(l=u||!_e.bidirectional)&&(it.scale(Nu,s,-u*n),_e.useDir&&_e.calcDirMTV()))}}return i},r.prototype._getProjMinMaxOnAxis=function(e,t,a){for(var n=this._axes[e],i=this._origin,o=t[0].dot(n)+i[e],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?e.animateFrom(t,p):e.animateTo(t,p)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),i&&i()}function Dt(r,e,t,a,n,i){hm("update",r,e,t,a,n,i)}function Wt(r,e,t,a,n,i){hm("enter",r,e,t,a,n,i)}function Wo(r){if(!r.__zr)return!0;for(var e=0;eta(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function C1(r){return!r.isGroup}function ZB(r){return r.shape!=null}function ou(r,e,t){if(!r||!e)return;function a(o){var s={};return o.traverse(function(l){C1(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return ZB(o)&&(s.shape=rt(o.shape)),s}var i=a(r);e.traverse(function(o){if(C1(o)&&o.anid){var s=i[o.anid];if(s){var l=n(o);o.attr(n(s)),Dt(o,l,t,ut(o).dataIndex)}}})}function NM(r,e){return $(r,function(t){var a=t[0];a=Jt(a,e.x),a=nr(a,e.x+e.width);var n=t[1];return n=Jt(n,e.y),n=nr(n,e.y+e.height),[a,n]})}function XB(r,e){var t=Jt(r.x,e.x),a=nr(r.x+r.width,e.x+e.width),n=Jt(r.y,e.y),i=nr(r.y+r.height,e.y+e.height);if(a>=t&&i>=n)return{x:t,y:n,width:a-t,height:i-n}}function su(r,e,t){var a=G({rectHover:!0},e),n=a.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),ot(n,t),new Me(a)):Bl(r.replace("path://",""),a,t,"center")}function il(r,e,t,a,n){for(var i=0,o=n[n.length-1];i1)return!1;var g=Nc(c,p,f,v)/h;return!(g<0||g>1)}function Nc(r,e,t,a){return r*a-t*e}function qB(r){return r<=1e-6&&r>=-1e-6}function Vi(r,e,t,a,n){return e==null||(wt(e)?Zt[0]=Zt[1]=Zt[2]=Zt[3]=e:(Zt[0]=e[0],Zt[1]=e[1],Zt[2]=e[2],Zt[3]=e[3]),a&&(Zt[0]=Jt(0,Zt[0]),Zt[1]=Jt(0,Zt[1]),Zt[2]=Jt(0,Zt[2]),Zt[3]=Jt(0,Zt[3])),t&&(Zt[0]=-Zt[0],Zt[1]=-Zt[1],Zt[2]=-Zt[2],Zt[3]=-Zt[3]),A1(r,Zt,"x","width",3,1,n&&n[0]||0),A1(r,Zt,"y","height",0,2,n&&n[1]||0)),r}var Zt=[0,0,0,0];function A1(r,e,t,a,n,i,o){var s=e[i]+e[n],l=r[a];r[a]+=s,o=Jt(0,nr(o,l)),r[a]=0?-e[n]:e[i]>=0?l+e[i]:ta(s)>1e-8?(l-o)*e[n]/s:0):r[t]-=e[n]}function Ha(r){var e=r.itemTooltipOption,t=r.componentModel,a=r.itemName,n=Z(e)?{formatter:e}:e,i=t.mainType,o=t.componentIndex,s={componentType:i,name:a,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&A(bt(l),function(f){q(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=ut(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:a,option:ot({content:a,encodeHTMLContent:!0,formatterParams:s},n)}}function hg(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function Pn(r,e){if(r)if(W(r))for(var t=0;te&&(e=o),oe&&(t=e=0),{min:t,max:e}}function Lh(r,e,t){GM(r,e,t,-1/0)}function GM(r,e,t,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 Rn(r,e){return yt(yt({},r,!0),e,!0)}const lN={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:". "}}}},uN={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 Sv="ZH",gm="EN",$o=gm,Yf={},ym={},YM=It.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||$o).toUpperCase();return r.indexOf(Sv)>-1?Sv:$o}():$o;function ZM(r,e){r=r.toUpperCase(),ym[r]=new Lt(e),Yf[r]=e}function fN(r){if(Z(r)){var e=Yf[r.toUpperCase()]||{};return r===Sv||r===gm?rt(e):yt(rt(e),rt(Yf[$o]),!1)}else return yt(rt(r),rt(Yf[$o]),!1)}function pg(r){return ym[r]}function vN(){return ym[$o]}ZM(gm,lN);ZM(Sv,uN);var dg=null;function hN(r){dg||(dg=r)}function ae(){return dg}var mm=1e3,_m=mm*60,_l=_m*60,mr=_l*24,P1=mr*365,cN={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})/},Zf={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},pN="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",Gu="{yyyy}-{MM}-{dd}",R1={year:"{yyyy}",month:"{yyyy}-{MM}",day:Gu,hour:Gu+" "+Zf.hour,minute:Gu+" "+Zf.minute,second:Gu+" "+Zf.second,millisecond:pN},Je=["year","month","day","hour","minute","second","millisecond"],dN=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function gN(r){return!Z(r)&&!et(r)?yN(r):r}function yN(r){r=r||{};var e={},t=!0;return A(Je,function(a){t&&(t=r[a]==null)}),A(Je,function(a,n){var i=r[a];e[a]={};for(var o=null,s=n;s>=0;s--){var l=Je[s],u=st(i)&&!W(i)?i[l]:i,f=void 0;W(u)?(f=u.slice(),o=f[0]||""):Z(u)?(o=u,f=[o]):(o==null?o=Zf[a]:cN[l].test(o)||(o=e[l][l][0]+" "+o),f=[o],t&&(f[1]="{primary|"+o+"}")),e[a][l]=f}}),e}function Ya(r,e){return r+="","0000".substr(0,e-r.length)+r}function Sl(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 mN(r){return r===Sl(r)}function _N(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Ph(r,e,t,a){var n=Ui(r),i=n[XM(t)](),o=n[Sm(t)]()+1,s=Math.floor((o-1)/3)+1,l=n[xm(t)](),u=n["get"+(t?"UTC":"")+"Day"](),f=n[bm(t)](),v=(f-1)%12+1,h=n[wm(t)](),c=n[Tm(t)](),p=n[Cm(t)](),d=f>=12?"pm":"am",g=d.toUpperCase(),y=a instanceof Lt?a:pg(a||YM)||vN(),m=y.getModel("time"),_=m.get("month"),S=m.get("monthAbbr"),b=m.get("dayOfWeek"),x=m.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,d+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,Ya(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,Ya(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Ya(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Ya(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,Ya(v+"",2)).replace(/{h}/g,v+"").replace(/{mm}/g,Ya(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Ya(c,2)).replace(/{s}/g,c+"").replace(/{SSS}/g,Ya(p,3)).replace(/{S}/g,p+"")}function SN(r,e,t,a,n){var i=null;if(Z(t))i=t;else if(et(t)){var o={time:r.time,level:r.time.level},s=ae();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),i=t(r.value,e,o)}else{var l=r.time;if(l){var u=t[l.lowerTimeUnit][l.upperTimeUnit];i=u[Math.min(l.level,u.length-1)]||""}else{var f=Vo(r.value,n);i=t[f][f][0]}}return Ph(new Date(r.value),i,n,a)}function Vo(r,e){var t=Ui(r),a=t[Sm(e)]()+1,n=t[xm(e)](),i=t[bm(e)](),o=t[wm(e)](),s=t[Tm(e)](),l=t[Cm(e)](),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 gg(r,e,t){switch(e){case"year":r[qM(t)](0);case"month":r[KM(t)](1);case"day":r[jM(t)](0);case"hour":r[JM(t)](0);case"minute":r[QM(t)](0);case"second":r[tD(t)](0)}return r}function XM(r){return r?"getUTCFullYear":"getFullYear"}function Sm(r){return r?"getUTCMonth":"getMonth"}function xm(r){return r?"getUTCDate":"getDate"}function bm(r){return r?"getUTCHours":"getHours"}function wm(r){return r?"getUTCMinutes":"getMinutes"}function Tm(r){return r?"getUTCSeconds":"getSeconds"}function Cm(r){return r?"getUTCMilliseconds":"getMilliseconds"}function xN(r){return r?"setUTCFullYear":"setFullYear"}function qM(r){return r?"setUTCMonth":"setMonth"}function KM(r){return r?"setUTCDate":"setDate"}function jM(r){return r?"setUTCHours":"setHours"}function JM(r){return r?"setUTCMinutes":"setMinutes"}function QM(r){return r?"setUTCSeconds":"setSeconds"}function tD(r){return r?"setUTCMilliseconds":"setMilliseconds"}function eD(r){if(!EA(r))return Z(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function rD(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,a){return a.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var lu=vh;function yg(r,e,t){var a="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(f){return f&&_r(f)?f:"-"}function i(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?Ui(r):r;if(isNaN(+l)){if(s)return"-"}else return Ph(l,a,t)}if(e==="ordinal")return Md(r)?n(r):wt(r)&&i(r)?r+"":"-";var u=Ea(r);return i(u)?eD(u):Md(r)?n(r):typeof r=="boolean"?r+"":"-"}var k1=["a","b","c","d","e","f","g"],Gc=function(r,e){return"{"+r+(e??"")+"}"};function aD(r,e,t){W(e)||(e=[e]);var a=e.length;if(!a)return"";for(var n=e[0].$vars||[],i=0;i':'';var o=t.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 Gi(r,e){return e=e||"transparent",Z(r)?r:st(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function xv(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var Xf={},Fc={},uu=function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(e,t){this._nonSeriesBoxMasterList=a(Xf),this._normalMasterList=a(Fc);function a(n,i){var o=[];return A(n,function(s,l){var u=s.create(e,t);o=o.concat(u||[])}),o}},r.prototype.update=function(e,t){A(this._normalMasterList,function(a){a.update&&a.update(e,t)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(e,t){if(e==="matrix"||e==="calendar"){Xf[e]=t;return}Fc[e]=t},r.get=function(e){return Fc[e]||Xf[e]},r}();function TN(r){return!!Xf[r]}var mg={coord:1,coord2:2};function CN(r){nD.set(r.fullType,{getCoord2:void 0}).getCoord2=r.getCoord2}var nD=j();function AN(r){var e=r.getShallow("coord",!0),t=mg.coord;if(e==null){var a=nD.get(r.type);a&&a.getCoord2&&(t=mg.coord2,e=a.getCoord2(r))}return{coord:e,from:t}}var Jr={none:0,dataCoordSys:1,boxCoordSys:2};function iD(r,e){var t=r.getShallow("coordinateSystem"),a=r.getShallow("coordinateSystemUsage",!0),n=Jr.none;if(t){var i=r.mainType==="series";a==null&&(a=i?"data":"box"),a==="data"?(n=Jr.dataCoordSys,i||(n=Jr.none)):a==="box"&&(n=Jr.boxCoordSys,!i&&!TN(t)&&(n=Jr.none))}return{coordSysType:t,kind:n}}function fu(r){var e=r.targetModel,t=r.coordSysType,a=r.coordSysProvider,n=r.isDefaultDataCoordSys;r.allowNotFound;var i=iD(e),o=i.kind,s=i.coordSysType;if(n&&o!==Jr.dataCoordSys&&(o=Jr.dataCoordSys,s=t),o===Jr.none||s!==t)return!1;var l=a(t,e);return l?(o===Jr.dataCoordSys?e.coordinateSystem=l:e.boxCoordinateSystem=l,!0):!1}var oD=function(r,e){var t=e.getReferringComponents(r,qt).models[0];return t&&t.coordinateSystem},qf=A,sD=["left","right","top","bottom","width","height"],_i=[["width","left","right"],["height","top","bottom"]];function Am(r,e,t,a,n){var i=0,o=0;a==null&&(a=1/0),n==null&&(n=1/0);var s=0;e.eachChild(function(l,u){var f=l.getBoundingRect(),v=e.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+t,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+t,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+t:o=p+t)})}var Ii=Am;dt(Am,"vertical");dt(Am,"horizontal");function lD(r,e){return{left:r.getShallow("left",e),top:r.getShallow("top",e),right:r.getShallow("right",e),bottom:r.getShallow("bottom",e),width:r.getShallow("width",e),height:r.getShallow("height",e)}}function MN(r,e){var t=ce(r,e,{enableLayoutOnlyByCenter:!0}),a=r.getBoxLayoutParams(),n,i;if(t.type===ol.point)i=t.refPoint,n=Ut(a,{width:e.getWidth(),height:e.getHeight()});else{var o=r.get("center"),s=W(o)?o:[o,o];n=Ut(a,t.refContainer),i=t.boxCoordFrom===mg.coord2?t.refPoint:[Y(s[0],n.width)+n.x,Y(s[1],n.height)+n.y]}return{viewRect:n,center:i}}function uD(r,e){var t=MN(r,e),a=t.viewRect,n=t.center,i=r.get("radius");W(i)||(i=[0,i]);var o=Y(a.width,e.getWidth()),s=Y(a.height,e.getHeight()),l=Math.min(o,s),u=Y(i[0],l/2),f=Y(i[1],l/2);return{cx:n[0],cy:n[1],r0:u,r:f,viewRect:a}}function Ut(r,e,t){t=lu(t||0);var a=e.width,n=e.height,i=Y(r.left,a),o=Y(r.top,n),s=Y(r.right,a),l=Y(r.bottom,n),u=Y(r.width,a),f=Y(r.height,n),v=t[2]+t[0],h=t[1]+t[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-t[3];break;case"right":i=a-u-h;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-f/2-t[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 lt((e.x||0)+i+t[3],(e.y||0)+o+t[0],u,f);return p.margin=t,p}function fD(r,e,t){var a=r.getShallow("preserveAspect",!0);if(!a)return e;var n=e.width/e.height;if(Math.abs(Math.atan(t)-Math.atan(n))<1e-9)return e;var i=r.getShallow("preserveAspectAlign",!0),o=r.getShallow("preserveAspectVerticalAlign",!0),s={width:e.width,height:e.height},l=a==="cover";return n>t&&!l||n=d)return v;for(var g=0;g=0;l--)s=yt(s,n[l],!0);a.defaultOption=s}return a.defaultOption},e.prototype.getReferringComponents=function(t,a){var n=t+"Index",i=t+"Id";return us(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},a)},e.prototype.getBoxLayoutParams=function(){return lD(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(Lt);UA(ds,Lt);yh(ds);oN(ds);sN(ds,IN);function IN(r){var e=[];return A(ds.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=$(e,function(t){return ra(t).main}),r!=="dataset"&>(e,"dataset")<=0&&e.unshift("dataset"),e}const Ct=ds;var Si={color:{},darkColor:{},size:{}},Kt=Si.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(Kt,{primary:Kt.neutral80,secondary:Kt.neutral70,tertiary:Kt.neutral60,quaternary:Kt.neutral50,disabled:Kt.neutral20,border:Kt.neutral30,borderTint:Kt.neutral20,borderShade:Kt.neutral40,background:Kt.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:Kt.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:Kt.neutral70,axisLineTint:Kt.neutral40,axisTick:Kt.neutral70,axisTickMinor:Kt.neutral60,axisLabel:Kt.neutral70,axisSplitLine:Kt.neutral15,axisMinorSplitLine:Kt.neutral05});for(var Kn in Kt)if(Kt.hasOwnProperty(Kn)){var E1=Kt[Kn];Kn==="theme"?Si.darkColor.theme=Kt.theme.slice():Kn==="highlight"?Si.darkColor.highlight="rgba(255,231,130,0.4)":Kn.indexOf("accent")===0?Si.darkColor[Kn]=gn(E1,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):Si.darkColor[Kn]=gn(E1,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)})}Si.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};const V=Si;var hD="";typeof navigator<"u"&&(hD=navigator.platform||"");var fo="rgba(0, 0, 0, 0.2)",cD=V.color.theme[0],PN=gn(cD,null,null,.9);const RN={darkMode:"auto",colorBy:"series",color:V.color.theme,gradientColor:[PN,cD],aria:{decal:{decals:[{color:fo,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:fo,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:fo,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:fo,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:fo,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:fo,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:hD.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 pD=j(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),ir="original",be="arrayRows",or="objectRows",zr="keyedColumns",mn="typedArray",dD="unknown",kr="column",qi="row",we={Must:1,Might:2,Not:3},gD=St();function kN(r){gD(r).datasetMap=j()}function yD(r,e,t){var a={},n=Dm(e);if(!n||!r)return a;var i=[],o=[],s=e.ecModel,l=gD(s).datasetMap,u=n.uid+"_"+t.seriesLayoutBy,f,v;r=r.slice(),A(r,function(d,g){var y=st(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;me)return r[a];return r[t-1]}function SD(r,e,t,a,n,i,o){i=i||r;var s=e(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var f=o==null||!a?t:VN(a,o);if(f=f||t,!(!f||!f.length)){var v=f[l];return n&&(u[n]=v),s.paletteIdx=(l+1)%f.length,v}}function zN(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var Fu,Ls,B1,N1="\0_ec_inner",GN=1,xD=function(r){B(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,a,n,i,o,s){i=i||{},this.option=null,this._theme=new Lt(i),this._locale=new Lt(o),this._optionManager=s},e.prototype.setOption=function(t,a,n){var i=G1(a);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,a){return this._resetOption(t,G1(a))},e.prototype._resetOption=function(t,a){var n=!1,i=this._optionManager;if(!t||t==="recreate"){var o=i.mountOption(t==="recreate");!this.option||t==="recreate"?B1(this,o):(this.restoreData(),this._mergeOption(o,a)),n=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=i.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,a))}if(!t||t==="recreate"||t==="media"){var l=i.getMediaOption(this);l.length&&A(l,function(u){n=!0,this._mergeOption(u,a)},this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,a){var n=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=j(),u=a&&a.replaceMergeMainTypeMap;kN(this),A(t,function(v,h){v!=null&&(Ct.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){Ct.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),Ct.topologicalTravel(s,Ct.getAllClassMainTypes(),f,this);function f(v){var h=BN(this,v,Vt(t[v])),c=i.get(v),p=c?u&&u.get(v)?"replaceMerge":"normalMerge":"replaceAll",d=GA(c,h,p);$E(d,v,Ct),n[v]=null,i.set(v,null),o.set(v,0);var g=[],y=[],m=0,_;A(d,function(S,b){var x=S.existing,w=S.newOption;if(!w)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var T=v==="series",C=Ct.getClass(v,S.keyInfo.subType,!T);if(!C)return;if(v==="tooltip"){if(_)return;_=!0}if(x&&x.constructor===C)x.name=S.keyInfo.name,x.mergeOption(w,this),x.optionUpdated(w,!1);else{var M=G({componentIndex:b},S.keyInfo);x=new C(w,this,this,M),G(x,M),S.brandNew&&(x.__requireNewView=!0),x.init(w,this,this),x.optionUpdated(null,!0)}}x?(g.push(x.option),y.push(x),m++):(g.push(void 0),y.push(void 0))},this),n[v]=g,i.set(v,y),o.set(v,m),v==="series"&&Fu(this)}this._seriesIndices||Fu(this)},e.prototype.getOption=function(){var t=rt(this.option);return A(t,function(a,n){if(Ct.hasClass(n)){for(var i=Vt(a),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!Rl(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,t[n]=i}}),delete t[N1],t},e.prototype.setTheme=function(t){this._theme=new Lt(t),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,a){var n=this._componentsMap.get(t);if(n){var i=n[a||0];if(i)return i;if(a==null){for(var o=0;o=e:t==="max"?r<=e:r===e}function KN(r,e){return r.join(",")===e.join(",")}const jN=YN;var Cr=A,zl=st,F1=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Hc(r){var e=r&&r.itemStyle;if(e)for(var t=0,a=F1.length;t0?t[o-1].seriesModel:null)}),oV(t)}})}function oV(r){A(r,function(e,t){var a=[],n=[NaN,NaN],i=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(i,function(u,f,v){var h=o.get(e.stackedDimension,v);if(isNaN(h))return n;var c,p;s?p=o.getRawIndex(v):c=o.get(e.stackedByDimension,v);for(var d=NaN,g=t-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=IE(h,m),d=m;break}}}return a[0]=h,a[1]=d,a})})}var kh=function(){function r(e){this.data=e.data||(e.sourceFormat===zr?{}:[]),this.sourceFormat=e.sourceFormat||dD,this.seriesLayoutBy=e.seriesLayoutBy||kr,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var a=0;ad&&(d=_)}c[0]=p,c[1]=d}},n=function(){return this._data?this._data.length/this._dimSize:0};X1=(e={},e[be+"_"+kr]={pure:!0,appendData:i},e[be+"_"+qi]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[or]={pure:!0,appendData:i},e[zr]={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])})}},e[ir]={appendData:i},e[mn]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(o){for(var s=0;s=0&&(d=o.interpolatedValue[g])}return d!=null?d+"":""})}},r.prototype.getRawValue=function(e,t){return Ko(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,a){},r}();function J1(r){var e,t;return st(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function xl(r){return new pV(r)}var pV=function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,a=e&&e.skip;if(this._dirty&&t){var n=this.context;n.data=n.outputData=t.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(e&&e.modBy),u=e&&e.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=e&&e.step;if(t?this._dueEnd=t._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 e=r?null:le},gte:function(r,e){return r>=e}},gV=function(){function r(e,t){if(!wt(t)){var a="";Pt(a)}this._opFn=kD[e],this._rvalFloat=Ea(t)}return r.prototype.evaluate=function(e){return wt(e)?this._opFn(e,this._rvalFloat):this._opFn(Ea(e),this._rvalFloat)},r}(),ED=function(){function r(e,t){var a=e==="desc";this._resultLT=a?1:-1,t==null&&(t=a?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var a=wt(e)?e:Ea(e),n=wt(t)?t:Ea(t),i=isNaN(a),o=isNaN(n);if(i&&(a=this._incomparable),o&&(n=this._incomparable),i&&o){var s=Z(e),l=Z(t);s&&(a=l?e:0),l&&(n=s?t:0)}return an?-this._resultLT:0},r}(),yV=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Ea(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var a=typeof e;a!==this._rvalTypeof&&(a==="number"||this._rvalTypeof==="number")&&(t=Ea(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function mV(r,e){return r==="eq"||r==="ne"?new yV(r==="eq",e):q(kD,r)?new gV(r,e):null}var _V=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return _n(e,t)},r}();function SV(r,e){var t=new _V,a=r.data,n=t.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==kr&&Pt(o);var s=[],l={},u=r.dimensionsDefine;if(u)A(u,function(d,g){var y=d.name,m={index:g,name:y,displayName:d.displayName};if(s.push(m),y!=null){var _="";q(l,y)&&Pt(_),l[y]=m}});else for(var f=0;f65535?DV:LV}function ho(){return[1/0,-1/0]}function IV(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function eS(r,e,t,a,n){var i=ND[t||"float"];if(n){var o=r[e],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(e,t,a){for(var n=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=$(o,function(m){return m.property}),f=0;fy[1]&&(y[1]=g)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,a=t[e];if(a!=null&&ae)i=o-1;else return o}return-1},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var a=t.constructor,n=this._count;if(a===Array){e=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=e[n[1]][0],b=e[n[1]][1],y=0;y=v&&m<=h||isNaN(m))&&(x>=S&&x<=b||isNaN(x))&&(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;ye[M][1])&&(T=!1)}T&&(l[u++]=t.getRawIndex(y))}return uy[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(e,t){var a=this.clone([e],!0),n=a._chunks,i=n[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),f,v,h,c=new(vo(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(e,t){if(this._count)for(var a=e.length,n=this._chunks,i=0,o=this.count();il&&(l=v)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var a=[],n=this._chunks,i=0;i=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function e(t,a,n,i){return _n(t[i],this._dimensions[i])}Uc={arrayRows:e,objectRows:function(t,a,n,i){return _n(t[a],this._dimensions[i])},keyedColumns:e,original:function(t,a,n,i){var o=t&&(t.value==null?t:t.value);return _n(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(t,a,n,i){return t[i]}}}(),r}(),VD=function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,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 e=this._sourceHost,t=this._getUpstreamSourceManagers(),a=!!t.length,n,i;if(Wu(e)){var o=e,s=void 0,l=void 0,u=void 0;if(a){var f=t[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,i=[f._getVersionSign()]}else s=o.get("data",!0),l=qe(s)?mn:ir,i=[];var v=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},c=Q(v.seriesLayoutBy,h.seriesLayoutBy)||null,p=Q(v.sourceHeader,h.sourceHeader),d=Q(v.dimensions,h.dimensions),g=c!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||d;n=g?[xg(s,{seriesLayoutBy:c,sourceHeader:p,dimensions:d},l)]:[]}else{var y=e;if(a){var m=this._applyTransform(t);n=m.sourceList,i=m.upstreamSignList}else{var _=y.get("source",!0);n=[xg(_,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(n,i)},r.prototype._applyTransform=function(e){var t=this._sourceHost,a=t.get("transform",!0),n=t.get("fromTransformResult",!0);if(n!=null){var i="";e.length!==1&&aS(i)}var o,s=[],l=[];return A(e,function(u){u.prepareSource();var f=u.getSource(n||0),v="";n!=null&&!f&&aS(v),s.push(f),l.push(u._getVersionSign())}),a?o=AV(a,s,{datasetIndex:t.componentIndex}):n!=null&&(o=[sV(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||t>0&&!r.noHeader;return A(r.blocks,function(n){var i=HD(n);i>=e&&(e=i+ +(a&&(!i||wg(n)&&!n.noHeader)))}),e}return 0}function EV(r,e,t,a){var n=e.noHeader,i=BV(HD(e)),o=[],s=e.blocks||[];ke(!s||W(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(q(u,l)){var f=new ED(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=e.valueFormatter,m=FD(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):Tg(a,o.join(""),n?t:i.html);if(n)return v;var h=yg(e.header,"ordinal",r.useUTC),c=GD(a,r.renderMode).nameStyle,p=zD(a);return r.renderMode==="richText"?WD(r,h,c)+i.richText+v:Tg(a,'
'+Ie(h)+"
"+v,t)}function OV(r,e,t,a){var n=r.renderMode,i=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,f=e.valueFormatter||r.valueFormatter||function(S){return S=W(S)?S:[S],$(S,function(b,x){return yg(b,W(c)?c[x]:c,u)})};if(!(i&&o)){var v=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||V.color.secondary,n),h=i?"":yg(l,"ordinal",u),c=e.valueType,p=o?[]:f(e.value,e.dataIndex),d=!s||!i,g=!s&&i,y=GD(a,n),m=y.nameStyle,_=y.valueStyle;return n==="richText"?(s?"":v)+(i?"":WD(r,h,m))+(o?"":zV(r,p,d,g,_)):Tg(a,(s?"":v)+(i?"":NV(h,!s,m))+(o?"":VV(p,d,g,_)),t)}}function nS(r,e,t,a,n,i){if(r){var o=FD(r),s={useUTC:n,renderMode:t,orderMode:a,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function BV(r){return{html:RV[r],richText:kV[r]}}function Tg(r,e,t){var a='
',n="margin: "+t+"px 0 0",i=zD(r);return'
'+e+a+"
"}function NV(r,e,t){var a=e?"margin-left:2px":"";return''+Ie(r)+""}function VV(r,e,t,a){var n=t?"10px":"20px",i=e?"float:right;margin-left:"+n:"";return r=W(r)?r:[r],''+$(r,function(o){return Ie(o)}).join("  ")+""}function WD(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function zV(r,e,t,a,n){var i=[n],o=a?10:20;return t&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(W(e)?e.join(" "):e,i)}function $D(r,e){var t=r.getData().getItemVisual(e,"style"),a=t[r.visualDrawType];return Gi(a)}function UD(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var Yc=function(){function r(){this.richTextStyles={},this._nextStyleNameId=OA()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,a){var n=a==="richText"?this._generateStyleName():null,i=wN({color:t,type:e,renderMode:a,markerId:n});return Z(i)?i:(this.richTextStyles[n]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(e,t){var a={};W(t)?A(t,function(i){return G(a,i)}):G(a,t);var n=this._generateStyleName();return this.richTextStyles[n]=a,"{"+n+"|"+e+"}"},r}();function YD(r){var e=r.series,t=r.dataIndex,a=r.multipleSeries,n=e.getData(),i=n.mapDimensionsAll("defaultedTooltip"),o=i.length,s=e.getRawValue(t),l=W(s),u=$D(e,t),f,v,h,c;if(o>1||l&&!o){var p=GV(s,e,t,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=Ko(n,t,i[0]),v=d.type}else c=f=l?s[0]:s;var g=Jy(e),y=g&&e.name||"",m=n.getName(t),_=a?y:m;return ie("section",{header:y,noHeader:a||!g,sortParam:c,blocks:[ie("nameValue",{markerType:"item",markerColor:u,name:_,noName:!_r(_),value:f,valueType:v,dataIndex:t})].concat(h||[])})}function GV(r,e,t,a,n){var i=e.getData(),o=fa(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(Ko(i,t,v),v)}):A(r,f);function f(v,h){var c=i.getDimensionInfo(h);!c||c.otherDims.tooltip===!1||(o?u.push(ie("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 Za=St();function $u(r,e){return r.getName(e)||r.getId(e)}var Kf="__universalTransitionEnabled",Bh=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,a,n){this.seriesIndex=this.componentIndex,this.dataTask=xl({count:HV,reset:WV}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n);var i=Za(this).sourceManager=new VD(this);i.prepareSource();var o=this.getInitialData(t,n);oS(o,this),this.dataTask.context.data=o,Za(this).dataBeforeProcessed=o,iS(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,a){var n=Vl(this),i=n?Xi(t):{},o=this.subType;Ct.hasClass(o)&&(o+="Series"),yt(t,a.getTheme().get(this.subType)),yt(t,this.getDefaultOption()),Ei(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&pa(t,i,n)},e.prototype.mergeOption=function(t,a){t=yt(this.option,t,!0),this.fillDataTextStyle(t.data);var n=Vl(this);n&&pa(this.option,t,n);var i=Za(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,a);oS(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Za(this).dataBeforeProcessed=o,iS(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!qe(t))for(var a=["show"],n=0;n=0&&h<0)&&(v=m,h=y,c=0),y===h&&(f[c++]=d))}),f.length=c,f},e.prototype.formatTooltip=function(t,a,n){return YD({series:this,dataIndex:t,multipleSeries:a})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(It.node&&!(t&&t.ssr))return!1;var a=this.getShallow("animation");return a&&this.getData().count()>this.getShallow("animationThreshold")&&(a=!1),!!a},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,a,n){var i=this.ecModel,o=Lm.prototype.getColorFromPalette.call(this,t,a,n);return o||(o=i.getColorFromPalette(t,a,n)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,a){this._innerSelect(this.getData(a),t)},e.prototype.unselect=function(t,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},e.prototype.isSelected=function(t,a){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(a);return(n==="all"||n[$u(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Kf])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,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"){st(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(t,a)}},e.registerClass=function(t){return Ct.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(Ct);se(Bh,Eh);se(Bh,Lm);UA(Bh,Ct);function iS(r){var e=r.name;Jy(r)||(r.name=FV(r)||e)}function FV(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),a=[];return A(t,function(n){var i=e.getDimensionInfo(n);i.displayName&&a.push(i.displayName)}),a.join(" ")}function HV(r){return r.model.getRawData().count()}function WV(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),$V}function $V(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function oS(r,e){A(Ml(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,dt(UV,e))})}function UV(r,e){var t=Cg(r);return t&&t.setOutputEnd((e||this).count()),e}function Cg(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var a=t.currentTask;if(a){var n=a.agentStubMap;n&&(a=n.get(r.uid))}return a}}const Yt=Bh;var Em=function(){function r(){this.group=new at,this.uid=ps("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,a,n){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,a,n){},r.prototype.updateLayout=function(e,t,a,n){},r.prototype.updateVisual=function(e,t,a,n){},r.prototype.toggleBlurSeries=function(e,t,a){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();tm(Em);yh(Em);const Xt=Em;function gs(){var r=St();return function(e){var t=r(e),a=e.pipelineContext,n=!!t.large,i=!!t.progressiveRender,o=t.large=!!(a&&a.large),s=t.progressiveRender=!!(a&&a.progressiveRender);return(n!==o||i!==s)&&"reset"}}var ZD=St(),YV=gs(),Om=function(){function r(){this.group=new at,this.uid=ps("viewChart"),this.renderTask=xl({plan:ZV,reset:XV}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,a,n){},r.prototype.highlight=function(e,t,a,n){var i=e.getData(n&&n.dataType);i&&lS(i,n,"emphasis")},r.prototype.downplay=function(e,t,a,n){var i=e.getData(n&&n.dataType);i&&lS(i,n,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,a,n){this.render(e,t,a,n)},r.prototype.updateLayout=function(e,t,a,n){this.render(e,t,a,n)},r.prototype.updateVisual=function(e,t,a,n){this.render(e,t,a,n)},r.prototype.eachRendered=function(e){Pn(this.group,e)},r.markUpdateMethod=function(e,t){ZD(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function sS(r,e,t){r&&Ol(r)&&(e==="emphasis"?Oa:Ba)(r,t)}function lS(r,e,t){var a=Oi(r,e),n=e&&e.highlightKey!=null?uB(e.highlightKey):null;a!=null?A(Vt(a),function(i){sS(r.getItemGraphicEl(i),t,n)}):r.eachItemGraphicEl(function(i){sS(i,t,n)})}tm(Om);yh(Om);function ZV(r){return YV(r.model)}function XV(r){var e=r.model,t=r.ecModel,a=r.api,n=r.payload,i=e.pipelineContext.progressiveRender,o=r.view,s=n&&ZD(n).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,a,n),qV[l]}var qV={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};const Ft=Om;var bv="\0__throttleOriginMethod",uS="\0__throttleRate",fS="\0__throttleType";function Bm(r,e,t){var a,n=0,i=0,o=null,s,l,u,f;e=e||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 ys(r,e,t,a){var n=r[e];if(n){var i=n[bv]||n,o=n[fS],s=n[uS];if(s!==t||o!==a){if(t==null||!a)return r[e]=i;n=r[e]=Bm(i,t,a==="debounce"),n[bv]=i,n[fS]=a,n[uS]=t}return n}}function Gl(r,e){var t=r[e];t&&t[bv]&&(t.clear&&t.clear(),r[e]=t[bv])}var vS=St(),hS={itemStyle:Bi(UM,!0),lineStyle:Bi($M,!0)},KV={lineStyle:"stroke",itemStyle:"fill"};function XD(r,e){var t=r.visualStyleMapper||hS[e];return t||(console.warn("Unknown style type '"+e+"'."),hS.itemStyle)}function qD(r,e){var t=r.visualDrawType||KV[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var jV={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=r.getModel(a),i=XD(r,a),o=i(n),s=n.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=qD(r,a),u=o[l],f=et(u)?u:null,v=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||v){var h=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=h,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||et(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||et(o.stroke)?h:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&f)return t.setVisual("colorFromPalette",!1),{dataEach:function(c,p){var d=r.getDataParams(p),g=G({},o);g[l]=f(d),c.setItemVisual(p,"style",g)}}}},Ps=new Lt,JV={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=XD(r,a),i=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[a]){Ps.option=l[a];var u=n(Ps),f=o.ensureUniqueItemVisual(s,"style");G(f,u),Ps.option.decal&&(o.setItemVisual(s,"decal",Ps.option.decal),Ps.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},QV={performRawSeries:!0,overallReset:function(r){var e=j();r.eachSeries(function(t){var a=t.getColorBy();if(!t.isColorBySeries()){var n=t.type+"-"+a,i=e.get(n);i||(i={},e.set(n,i)),vS(t).scope=i}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var a=t.getRawData(),n={},i=t.getData(),o=vS(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=qD(t,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]=t.getColorFromPalette(c,o,p)}})}})}},Uu=Math.PI;function tz(r,e){e=e||{},ot(e,{text:"loading",textColor:V.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:V.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var t=new at,a=new _t({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(a);var n=new Mt({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),i=new _t({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(i);var o;return e.showSpinner&&(o=new vm({shape:{startAngle:-Uu/2,endAngle:-Uu/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Uu*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Uu*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=n.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;e.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()})},t.resize(),t}var ez=function(){function r(e,t,a,n){this._stageTaskMap=j(),this.ecInstance=e,this.api=t,a=this._dataProcessorHandlers=a.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=a.concat(n)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(a){var n=a.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var a=this._pipelineMap.get(e.__pipeline.id),n=a.context,i=!t&&a.progressiveEnabled&&(!n||n.progressiveRender)&&e.__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(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var a=this._pipelineMap.get(e.uid),n=e.getData(),i=n.count(),o=a.progressiveEnabled&&t.incrementalPrepareRender&&i>=a.threshold,s=e.get("large")&&i>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?i:null;e.pipelineContext=a.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,a=t._pipelineMap=j();e.eachSeries(function(n){var i=n.getProgressive(),o=n.uid;a.set(o,{id:o,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:i&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),t._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),a=this.api;A(this._allHandlers,function(n){var i=e.get(n.uid)||e.set(n.uid,{}),o="";ke(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,i,t,a),n.overallReset&&this._createOverallStageTask(n,i,t,a)},this)},r.prototype.prepareView=function(e,t,a,n){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=a,o.api=n,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,a){this._performStageTasks(this._visualHandlers,e,t,a)},r.prototype._performStageTasks=function(e,t,a,n){n=n||{};var i=!1,o=this;A(e,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&&t.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(e){var t;e.eachSeries(function(a){t=a.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,a,n){var i=this,o=t.seriesTaskMap,s=t.seriesTaskMap=j(),l=e.seriesType,u=e.getTargetSeries;e.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)||xl({plan:oz,reset:sz,count:uz}));c.context={model:v,ecModel:a,api:n,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(v,c)}},r.prototype._createOverallStageTask=function(e,t,a,n){var i=this,o=t.overallTask=t.overallTask||xl({reset:rz});o.context={ecModel:a,api:n,overallReset:e.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=j(),u=e.seriesType,f=e.getTargetSeries,v=!0,h=!1,c="";ke(!e.createOnAllSeries,c),u?a.eachRawSeriesByType(u,p):f?f(a,n).each(p):(v=!1,A(a.getSeries(),p));function p(d){var g=d.uid,y=l.set(g,s&&s.get(g)||(h=!0,xl({reset:az,onDirty:iz})));y.context={model:d,overallProgress:v},y.agent=o,y.__block=v,i._pipe(d,y)}h&&o.dirty()},r.prototype._pipe=function(e,t){var a=e.uid,n=this._pipelineMap.get(a);!n.head&&(n.head=t),n.tail&&n.tail.pipe(t),n.tail=t,t.__idxInPipeline=n.count++,t.__pipeline=n},r.wrapStageHandler=function(e,t){return et(e)&&(e={overallReset:e,seriesType:fz(e)}),e.uid=ps("stageHandler"),t&&(e.visualType=t),e},r}();function rz(r){r.overallReset(r.ecModel,r.api,r.payload)}function az(r){return r.overallProgress&&nz}function nz(){this.agent.dirty(),this.getDownstream().dirty()}function iz(){this.agent&&this.agent.dirty()}function oz(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function sz(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=Vt(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?$(e,function(t,a){return KD(a)}):lz}var lz=KD(0);function KD(r){return function(e,t){var a=t.data,n=t.resetDefines[r];if(n&&n.dataEach)for(var i=e.start;i0&&c===u.length-h.length){var p=u.slice(0,c);p!=="data"&&(t.mainType=p,t[h.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(a[u]=l,f=!0),f||(n[u]=l)})}return{cptQuery:t,dataQuery:a,otherQuery:n}},r.prototype.filter=function(e,t){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=t.cptQuery,u=t.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(e,t.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}(),Ag=["symbol","symbolSize","symbolRotate","symbolOffset"],pS=Ag.concat(["symbolKeepAspect"]),pz={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var a={},n={},i=!1,o=0;o=0&&bi(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function Mg(r,e,t){for(var a=e.type==="radial"?Iz(r,e,t):Lz(r,e,t),n=e.colorStops,i=0;i0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:wt(r)?[r]:W(r)?r:null}function Vm(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&Rz(e.lineDash,e.lineWidth),a=e.lineDashOffset;if(t){var n=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(t=$(t,function(i){return i/n}),a/=n)}return[t,a]}var kz=new ca(!0);function Cv(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function dS(r){return typeof r=="string"&&r!=="none"}function Av(r){var e=r.fill;return e!=null&&e!=="none"}function gS(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function yS(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function Dg(r,e,t){var a=em(e.image,e.__image,t);if(mh(a)){var n=r.createPattern(a,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var i=new DOMMatrix;i.translateSelf(e.x||0,e.y||0),i.rotateSelf(0,0,(e.rotation||0)*Of),i.scaleSelf(e.scaleX||1,e.scaleY||1),n.setTransform(i)}return n}}function Ez(r,e,t,a){var n,i=Cv(t),o=Av(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var f=e.path||kz,v=e.__dirty;if(!a){var h=t.fill,c=t.stroke,p=o&&!!h.colorStops,d=i&&!!c.colorStops,g=o&&!!h.image,y=i&&!!c.image,m=void 0,_=void 0,S=void 0,b=void 0,x=void 0;(p||d)&&(x=e.getBoundingRect()),p&&(m=v?Mg(r,h,x):e.__canvasFillGradient,e.__canvasFillGradient=m),d&&(_=v?Mg(r,c,x):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(S=v||!e.__canvasFillPattern?Dg(r,h,e):e.__canvasFillPattern,e.__canvasFillPattern=S),y&&(b=v||!e.__canvasStrokePattern?Dg(r,c,e):e.__canvasStrokePattern,e.__canvasStrokePattern=b),p?r.fillStyle=m:g&&(S?r.fillStyle=S:o=!1),d?r.strokeStyle=_:y&&(b?r.strokeStyle=b:i=!1)}var w=e.getGlobalScale();f.setScale(w[0],w[1],e.segmentIgnoreThreshold);var T,C;r.setLineDash&&t.lineDash&&(n=Vm(e),T=n[0],C=n[1]);var M=!0;(u||v&Io)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),M=!1),f.reset(),e.buildPath(f,e.shape,a),f.toStatic(),e.pathUpdated()),M&&f.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=C),a||(t.strokeFirst?(i&&yS(r,t),o&&gS(r,t)):(o&&gS(r,t),i&&yS(r,t))),T&&r.setLineDash([])}function Oz(r,e,t){var a=e.__image=em(t.image,e.__image,e,e.onload);if(!(!a||!mh(a))){var n=t.x||0,i=t.y||0,o=e.getWidth(),s=e.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),t.sWidth&&t.sHeight){var u=t.sx||0,f=t.sy||0;r.drawImage(a,u,f,t.sWidth,t.sHeight,n,i,o,s)}else if(t.sx&&t.sy){var u=t.sx,f=t.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 Bz(r,e,t){var a,n=t.text;if(n!=null&&(n+=""),n){r.font=t.font||Ra,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var i=void 0,o=void 0;r.setLineDash&&t.lineDash&&(a=Vm(e),i=a[0],o=a[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),t.strokeFirst?(Cv(t)&&r.strokeText(n,t.x,t.y),Av(t)&&r.fillText(n,t.x,t.y)):(Av(t)&&r.fillText(n,t.x,t.y),Cv(t)&&r.strokeText(n,t.x,t.y)),i&&r.setLineDash([])}}var mS=["shadowBlur","shadowOffsetX","shadowOffsetY"],_S=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function aL(r,e,t,a,n){var i=!1;if(!a&&(t=t||{},e===t))return!1;if(a||e.opacity!==t.opacity){Ze(r,n),i=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?Ai.opacity:o}(a||e.blend!==t.blend)&&(i||(Ze(r,n),i=!0),r.globalCompositeOperation=e.blend||Ai.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,a,n){if(!this[le]){if(this._disposed){this.id;return}var i,o,s;if(st(a)&&(n=a.lazyUpdate,i=a.silent,o=a.replaceMerge,s=a.transition,a=a.notMerge),this[le]=!0,yo(this),!this._model||a){var l=new jN(this._api),u=this._theme,f=this._model=new bD;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},Rg);var v={seriesTransition:s,optionChanged:!0};if(n)this[me]={silent:i,updateParams:v},this[le]=!1,this.getZr().wakeUp();else{try{ei(this),_a.update.call(this,null,v)}catch(h){throw this[me]=null,this[le]=!1,h}this._ssr||this._zr.flush(),this[me]=null,this[le]=!1,po.call(this,i),go.call(this,i)}}},e.prototype.setTheme=function(t,a){if(!this[le]){if(this._disposed){this.id;return}var n=this._model;if(n){var i=a&&a.silent,o=null;this[me]&&(i==null&&(i=this[me].silent),o=this[me].updateParams,this[me]=null),this[le]=!0,yo(this);try{this._updateTheme(t),n.setTheme(this._theme),ei(this),_a.update.call(this,{type:"setTheme"},o)}catch(s){throw this[le]=!1,s}this[le]=!1,po.call(this,i),go.call(this,i)}}},e.prototype._updateTheme=function(t){Z(t)&&(t=xL[t]),t&&(t=rt(t),t&&CD(t,!0),this._theme=t)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||It.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var a=this._zr.painter;return a.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var a=this._zr.painter;return a.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){var t=this._zr,a=t.storage.getDisplayList();return A(a,function(n){n.stopAnimation(null,!0)}),t.painter.toDataURL()},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var a=t.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(t).toDataURL("image/"+(t&&t.type||"png"));return A(i,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var a=t.type==="svg",n=this.group,i=Math.min,o=Math.max,s=1/0;if(ES[n]){var l=s,u=s,f=-s,v=-s,h=[],c=t&&t.pixelRatio||this.getDevicePixelRatio();A(bl,function(_,S){if(_.group===n){var b=a?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(rt(t)),x=_.getDom().getBoundingClientRect();l=i(x.left,l),u=i(x.top,u),f=o(x.right,f),v=o(x.bottom,v),h.push({dom:b,left:x.left,top:x.top})}}),l*=c,u*=c,f*=c,v*=c;var p=f-l,d=v-u,g=Er.createCanvas(),y=N_(g,{renderer:a?"svg":"canvas"});if(y.resize({width:p,height:d}),a){var m="";return A(h,function(_){var S=_.left-l,b=_.top-u;m+=''+_.dom+""}),y.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return t.connectedBackgroundColor&&y.add(new _t({shape:{x:0,y:0,width:p,height:d},style:{fill:t.connectedBackgroundColor}})),A(h,function(_){var S=new Me({style:{x:_.left*c-l,y:_.top*c-u,image:_.dom}});y.add(S)}),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,a,n){return qu(this,"convertToPixel",t,a,n)},e.prototype.convertToLayout=function(t,a,n){return qu(this,"convertToLayout",t,a,n)},e.prototype.convertFromPixel=function(t,a,n){return qu(this,"convertFromPixel",t,a,n)},e.prototype.containPixel=function(t,a){if(this._disposed){this.id;return}var n=this._model,i,o=Ho(n,t);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},e.prototype.getVisual=function(t,a){var n=this._model,i=Ho(n,t,{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?Nm(s,l,a):vu(s,a)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;A(f5,function(n){var i=function(o){var s=t.getModel(),l=o.target,u,f=n==="globalout";if(f?u={}:l&&xi(l,function(d){var g=ut(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&&t[c.mainType==="series"?"_chartsMap":"_componentsMap"][c.__viewId];u.event=o,u.type=n,t._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:c,view:p},t.trigger(n,u)}};i.zrEventfulCallAtLast=!0,t._zr.on(n,i,t)});var a=this._messageCenter;A(Ig,function(n,i){a.on(i,function(o){t.trigger(i,o)})}),gz(a,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&HA(this.getDom(),Fm,"");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 bl[a.id]},e.prototype.resize=function(t){if(!this[le]){if(this._disposed){this.id;return}this._zr.resize(t);var a=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!a){var n=a.resetOption("media"),i=t&&t.silent;this[me]&&(i==null&&(i=this[me].silent),n=!0,this[me]=null),this[le]=!0,yo(this);try{n&&ei(this),_a.update.call(this,{type:"resize",animation:G({duration:0},t&&t.animation)})}catch(o){throw this[le]=!1,o}this[le]=!1,po.call(this,i),go.call(this,i)}}},e.prototype.showLoading=function(t,a){if(this._disposed){this.id;return}if(st(t)&&(a=t,t=""),t=t||"default",this.hideLoading(),!!kg[t]){var n=kg[t](this._api,a),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var a=G({},t);return a.type=Lg[t.type],a},e.prototype.dispatchAction=function(t,a){if(this._disposed){this.id;return}if(st(a)||(a={silent:!!a}),!!Mv[t.type]&&this._model){if(this[le]){this._pendingActions.push(t);return}var n=a.silent;Jc.call(this,t,n);var i=a.flush;i?this._zr.flush():i!==!1&&It.browser.weChat&&this._throttledZrFlush(),po.call(this,n),go.call(this,n)}},e.prototype.updateLabelLayout=function(){Dr.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var a=t.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(a);i.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){ei=function(v){var h=v._scheduler;h.restorePipelines(v._model),h.prepareStageTasks(),Kc(v,!0),Kc(v,!1),h.plan()},Kc=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;_h.get("hoverLayerThreshold")&&!It.node&&!It.worker&&h.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=v._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}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=zi(v);h.eachRendered(function(p){return Lh(p,c.z,c.zlevel),!0})}}function u(v,h){h.eachRendered(function(c){if(!Wo(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(Wo(y))return;if(y instanceof xt&&fB(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)}})}RS=function(v){return new(function(h){B(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){Oa(p,d),sr(v)},c.prototype.leaveEmphasis=function(p,d){Ba(p,d),sr(v)},c.prototype.enterBlur=function(p){uM(p),sr(v)},c.prototype.leaveBlur=function(p){sm(p),sr(v)},c.prototype.enterSelect=function(p){fM(p),sr(v)},c.prototype.leaveSelect=function(p){vM(p),sr(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.getMainProcessVersion=function(){return v[Zu]},c}(wD))(v)},_L=function(v){function h(c,p){for(var d=0;d=0)){OS.push(t);var i=QD.wrapStageHandler(t,n);i.__prio=e,i.__raw=t,r.push(i)}}function CL(r,e){kg[r]=e}function y5(r,e,t){var a=Zz("registerMap");a&&a(r,e,t)}var m5=CV;ji(zm,jV);ji(Nh,JV);ji(Nh,QV);ji(zm,pz);ji(Nh,dz);ji(cL,$z);wL(CD);TL(Jz,iV);CL("default",tz);ga({type:Mi,event:Mi,update:Mi},Qt);ga({type:$f,event:$f,update:$f},Qt);ga({type:dv,event:im,update:dv,action:Qt,refineEvent:$m,publishNonRefinedEvent:!0});ga({type:ig,event:im,update:ig,action:Qt,refineEvent:$m,publishNonRefinedEvent:!0});ga({type:gv,event:im,update:gv,action:Qt,refineEvent:$m,publishNonRefinedEvent:!0});function $m(r,e,t,a){return{eventContent:{selected:iB(t),isFromClick:e.isFromClick||!1}}}bL("default",{});bL("dark",hz);var BS=[],_5={registerPreprocessor:wL,registerProcessor:TL,registerPostInit:c5,registerPostUpdate:p5,registerUpdateLifecycle:Hm,registerAction:ga,registerCoordinateSystem:d5,registerLayout:g5,registerVisual:ji,registerTransform:m5,registerLoading:CL,registerMap:y5,registerImpl:Yz,PRIORITY:s5,ComponentModel:Ct,ComponentView:Xt,SeriesModel:Yt,ChartView:Ft,registerComponentModel:function(r){Ct.registerClass(r)},registerComponentView:function(r){Xt.registerClass(r)},registerSeriesModel:function(r){Yt.registerClass(r)},registerChartView:function(r){Ft.registerClass(r)},registerCustomSeries:function(r,e){Xz(r,e)},registerSubTypeDefaulter:function(r,e){Ct.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){wE(r,e)}};function mt(r){if(W(r)){A(r,function(e){mt(e)});return}gt(BS,r)>=0||(BS.push(r),et(r)&&(r={install:r}),r.install(_5))}function ks(r){return r==null?0:r.length||1}function NS(r){return r}var S5=function(){function r(e,t,a,n,i,o){this._old=e,this._new=t,this._oldKeyGetter=a||NS,this._newKeyGetter=n||NS,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,a={},n=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,n,"_oldKeyGetter"),this._initIndexMap(t,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 e=this._old,t=this._new,a={},n={},i=[],o=[];this._initIndexMap(e,a,i,"_oldKeyGetter"),this._initIndexMap(t,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 Es=st,Xa=$,M5=typeof Int32Array>"u"?Array:Int32Array,D5="e\0\0",VS=-1,L5=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],I5=["_approximateExtent"],zS,ju,Os,Bs,ep,Ns,rp,P5=function(){function r(e,t){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;ML(e)?(a=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(n=!0,a=e),a=a||["x","y"];for(var i={},o=[],s={},l=!1,u={},f=0;f=t)){var a=this._store,n=a.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===ir;if(l&&!n.pure)for(var u=[],f=e;f0},r.prototype.ensureUniqueItemVisual=function(e,t){var a=this._itemVisuals,n=a[e];n||(n=a[e]={});var i=n[t];return i==null&&(i=this.getVisual(t),W(i)?i=i.slice():Es(i)&&(i=G({},i)),n[t]=i),i},r.prototype.setItemVisual=function(e,t,a){var n=this._itemVisuals[e]||{};this._itemVisuals[e]=n,Es(t)?G(n,t):n[t]=a},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Es(e)?G(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,a){this._itemLayouts[e]=a?G(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var a=this.hostModel&&this.hostModel.seriesIndex;ng(a,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){A(this._graphicEls,function(a,n){a&&e&&e.call(t,a,n)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:Xa(this.dimensions,this._getDimInfo,this),this.hostModel)),ep(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var a=this[e];et(a)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var n=a.apply(this,arguments);return t.apply(this,[n].concat(Hy(arguments)))})},r.internalField=function(){zS=function(e){var t=e._invertedIndicesMap;A(t,function(a,n){var i=e._dimInfos[n],o=i.ordinalMeta,s=e._store;if(o){a=t[n]=new M5(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),n[t]=l}}}(),r}();const ze=P5;function hu(r,e){Im(r)||(r=Pm(r)),e=e||{};var t=e.coordDimensions||[],a=e.dimensionsDefine||r.dimensionsDefine||[],n=j(),i=[],o=k5(r,t,a,e.dimensionsCount),s=e.canOmitUnusedDimensions&&IL(o),l=a===r.dimensionsDefine,u=l?LL(r):DL(a),f=e.encodeDefine;!f&&e.encodeDefaulter&&(f=e.encodeDefaulter(r,o));for(var v=j(f),h=new BD(o),c=0;c0&&(a.name=n+(i-1)),i++,e.set(n,i)}}function k5(r,e,t,a){var n=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,a||0);return A(e,function(i){var o;st(i)&&(o=i.dimsDef)&&(n=Math.max(n,o.length))}),n}function E5(r,e,t){if(t||e.hasKey(r)){for(var a=0;e.hasKey(r+a);)a++;r+=a}return e.set(r,!0),r}var O5=function(){function r(e){this.coordSysDims=[],this.axisMap=j(),this.categoryAxisMap=j(),this.coordSysName=e}return r}();function B5(r){var e=r.get("coordinateSystem"),t=new O5(e),a=N5[e];if(a)return a(r,t,t.axisMap,t.categoryAxisMap),t}var N5={cartesian2d:function(r,e,t,a){var n=r.getReferringComponents("xAxis",qt).models[0],i=r.getReferringComponents("yAxis",qt).models[0];e.coordSysDims=["x","y"],t.set("x",n),t.set("y",i),mo(n)&&(a.set("x",n),e.firstCategoryDimIndex=0),mo(i)&&(a.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,a){var n=r.getReferringComponents("singleAxis",qt).models[0];e.coordSysDims=["single"],t.set("single",n),mo(n)&&(a.set("single",n),e.firstCategoryDimIndex=0)},polar:function(r,e,t,a){var n=r.getReferringComponents("polar",qt).models[0],i=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",i),t.set("angle",o),mo(i)&&(a.set("radius",i),e.firstCategoryDimIndex=0),mo(o)&&(a.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,a){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,a){var n=r.ecModel,i=n.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=i.dimensions.slice();A(i.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),f=o[l];t.set(f,u),mo(u)&&(a.set(f,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(r,e,t,a){var n=r.getReferringComponents("matrix",qt).models[0];e.coordSysDims=["x","y"];var i=n.getDimensionModel("x"),o=n.getDimensionModel("y");t.set("x",i),t.set("y",o),a.set("x",i),a.set("y",o)}};function mo(r){return r.get("type")==="category"}function V5(r,e,t){t=t||{};var a=t.byIndex,n=t.stackedCoordDimension,i,o,s;z5(e)?i=e:(o=e.schema,i=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,f,v,h;if(A(i,function(m,_){Z(m)&&(i[_]=m={name:m}),l&&!m.isExtraCoord&&(!a&&!u&&m.ordinalMeta&&(u=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!n||n===m.coordDim)&&(f=m))}),f&&!a&&!u&&(a=!0),f){v="__\0ecstackresult_"+r.id,h="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var c=f.coordDim,p=f.type,d=0;A(i,function(m){m.coordDim===c&&d++});var g={name:v,coordDim:c,coordDimIndex:d,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:h,coordDim:h,coordDimIndex:d+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(h,p),y.storeDimIndex=s.ensureCalculationDimension(v,p)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(i.push(g),i.push(y))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:a,stackedOverDimension:h,stackResultDimension:v}}function z5(r){return!ML(r.schema)}function wn(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function PL(r,e){return wn(r,e)?r.getCalculationInfo("stackResultDimension"):e}function G5(r,e){var t=r.get("coordinateSystem"),a=uu.get(t),n;return e&&e.coordSysDims&&(n=$(e.coordSysDims,function(i){var o={name:i},s=e.axisMap.get(i);if(s){var l=s.get("type");o.type=Lv(l)}return o})),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]),n}function F5(r,e,t){var a,n;return t&&A(r,function(i,o){var s=i.coordDim,l=t.categoryAxisMap.get(s);l&&(a==null&&(a=o),i.ordinalMeta=l.getOrdinalMeta(),e&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(n=!0)}),!n&&a!=null&&(r[a].otherDims.itemName=0),a}function Wa(r,e,t){t=t||{};var a=e.getSourceManager(),n,i=!1;r?(i=!0,n=Pm(r)):(n=a.getSource(),i=n.sourceFormat===ir);var o=B5(e),s=G5(e,o),l=t.useEncodeDefaulter,u=et(l)?l:l?dt(yD,s,e):null,f={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},v=hu(n,f),h=F5(v.dimensions,t.createInvertedIndices,o),c=i?null:a.getSharedDataStore(v),p=V5(e,{schema:v,store:c}),d=new ze(v,e);d.setCalculationInfo(p);var g=h!=null&&H5(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 H5(r){if(r.sourceFormat===ir){var e=W5(r.data||[]);return!W(ls(e))}}function W5(r){for(var e=0;en&&(o=i.interval=n);var s=i.intervalPrecision=Wl(o),l=i.niceTickExtent=[re(Math.ceil(r[0]/o)*o,s),re(Math.floor(r[1]/o)*o,s)];return U5(l,r),i}function ap(r){var e=Math.pow(10,jy(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,re(t*e)}function Wl(r){return ea(r)+2}function GS(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function U5(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),GS(r,0,e),GS(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function Um(r,e){return r>=e[0]&&r<=e[1]}var Y5=function(){function r(){this.normalize=FS,this.scale=HS}return r.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=X(e.normalize,e),this.scale=X(e.scale,e)):(this.normalize=FS,this.scale=HS)},r}();function FS(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function HS(r,e){return r*(e[1]-e[0])+e[0]}function Og(r,e,t){var a=Math.log(r);return[Math.log(t?e[0]:Math.max(0,e[0]))/a,Math.log(t?e[1]:Math.max(0,e[1]))/a]}var RL=function(){function r(e){this._calculator=new Y5,this._setting=e||{},this._extent=[1/0,-1/0];var t=ae();t&&(this._brkCtx=t.createScaleBreakContext(),this._brkCtx.update(this._extent))}return r.prototype.getSetting=function(e){return this._setting[e]},r.prototype._innerUnionExtent=function(e){var t=this._extent;this._innerSetExtent(e[0]t[1]?e[1]:t[1])},r.prototype.unionExtentFromData=function(e,t){this._innerUnionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){this._innerSetExtent(e,t)},r.prototype._innerSetExtent=function(e,t){var a=this._extent;isNaN(e)||(a[0]=e),isNaN(t)||(a[1]=t),this._brkCtx&&this._brkCtx.update(a)},r.prototype.setBreaksFromOption=function(e){var t=ae();t&&this._innerSetBreak(t.parseAxisBreakOption(e,X(this.parse,this)))},r.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},r.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},r.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},r.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r}();yh(RL);const Ji=RL;var Z5=0,X5=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++Z5,this._onCollect=e.onCollect}return r.createByAxisModel=function(e){var t=e.option,a=t.data,n=a&&$(a,q5);return new r({categories:n,needCollect:!n,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,a=this._needCollect;if(!Z(e)&&!a)return e;if(a&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var n=this._getOrCreateMap();return t=n.get(e),t==null&&(a?(t=this.categories.length,this.categories[t]=e,n.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=j(this.categories))},r}();function q5(r){return st(r)&&r.value!=null?r.value:r+""}const $l=X5;var kL=function(r){B(e,r);function e(t){var a=r.call(this,t)||this;a.type="ordinal";var n=a.getSetting("ordinalMeta");return n||(n=new $l({})),W(n)&&(n=new $l({categories:$(n,function(i){return st(i)?i.value:i})})),a._ordinalMeta=n,a._extent=a.getSetting("extent")||[0,n.categories.length-1],a}return e.prototype.parse=function(t){return t==null?NaN:Z(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return Um(t,this._extent)&&t>=0&&t=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(Ji);Ji.registerClass(kL);const Ul=kL;var qa=re,EL=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t==null||t===""?NaN:Number(t)},e.prototype.contain=function(t){return Um(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Wl(t)},e.prototype.getTicks=function(t){t=t||{};var a=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=ae(),l=[];if(!a)return l;if(t.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;n[0]=0&&(v=qa(v+h*a,o))}if(l.length>0&&v===l[l.length-1].value)break;if(l.length>u)return[]}var c=l.length?l[l.length-1].value:i[1];return n[1]>c&&(t.expandToNicedExtent?l.push({value:qa(c+a,o)}):l.push({value:n[1]})),s&&s.pruneTicksByBreak(t.pruneByBreak,l,this._brkCtx.breaks,function(p){return p.value},this._interval,this._extent),t.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},e.prototype.getMinorTicks=function(t){for(var a=this.getTicks({expandToNicedExtent:!0}),n=[],i=this.getExtent(),o=1;oi[0]&&p0&&(i=i===null?s:Math.min(i,s))}t[a]=i}}return t}function NL(r){var e=J5(r),t=[];return A(r,function(a){var n=a.coordinateSystem,i=n.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=e[l],f=Math.abs(o[1]-o[0]),v=i.scale.getExtent(),h=Math.abs(v[1]-v[0]);s=u?f/h*u:f}else{var c=a.getData();s=Math.abs(o[1]-o[0])/c.count()}var p=Y(a.get("barWidth"),s),d=Y(a.get("barMaxWidth"),s),g=Y(a.get("barMinWidth")||(HL(a)?.5:1),s),y=a.get("barGap"),m=a.get("barCategoryGap"),_=a.get("defaultBarGap");t.push({bandWidth:s,barWidth:p,barMaxWidth:d,barMinWidth:g,barGap:y,barCategoryGap:m,defaultBarGap:_,axisKey:Zm(i),stackId:Ym(a)})}),VL(t)}function VL(r){var e={};A(r,function(a,n){var i=a.axisKey,o=a.bandWidth,s=e[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:a.defaultBarGap||0,stacks:{}},l=s.stacks;e[i]=s;var u=a.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=a.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var v=a.barMaxWidth;v&&(l[u].maxWidth=v);var h=a.barMinWidth;h&&(l[u].minWidth=h);var c=a.barGap;c!=null&&(s.gap=c);var p=a.barCategoryGap;p!=null&&(s.categoryGap=p)});var t={};return A(e,function(a,n){t[n]={};var i=a.stacks,o=a.bandWidth,s=a.categoryGap;if(s==null){var l=bt(i).length;s=Math.max(35-l*4,15)+"%"}var u=Y(s,o),f=Y(a.gap,1),v=a.remainedWidth,h=a.autoWidthCount,c=(v-u)/(h+(h-1)*f);c=Math.max(c,0),A(i,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var S=y.width;m&&(S=Math.min(S,m)),_&&(S=Math.max(S,_)),y.width=S,v-=S+f*S,h--}else{var S=c;m&&mS&&(S=_),S!==c&&(y.width=S,v-=S+f*S,h--)}}),c=(v-u)/(h+(h-1)*f),c=Math.max(c,0);var p=0,d;A(i,function(y,m){y.width||(y.width=c),d=y,p+=y.width*(1+f)}),d&&(p-=d.width*f);var g=-p/2;A(i,function(y,m){t[n][m]=t[n][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+f)})}),t}function Q5(r,e,t){if(r&&e){var a=r[Zm(e)];return a!=null&&t!=null?a[Ym(t)]:a}}function zL(r,e){var t=BL(r,e),a=NL(t);A(t,function(n){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=Ym(n),u=a[Zm(s)][l],f=u.offset,v=u.width;i.setLayout({bandWidth:u.bandWidth,offset:f,size:v})})}function GL(r){return{seriesType:r,plan:gs(),reset:function(e){if(FL(e)){var t=e.getData(),a=e.coordinateSystem,n=a.getBaseAxis(),i=a.getOtherAxis(n),o=t.getDimensionIndex(t.mapDimension(i.dim)),s=t.getDimensionIndex(t.mapDimension(n.dim)),l=e.get("showBackground",!0),u=t.mapDimension(i.dim),f=t.getCalculationInfo("stackResultDimension"),v=wn(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),h=i.isHorizontal(),c=tG(n,i),p=HL(e),d=e.get("barMinHeight")||0,g=f&&t.getDimensionIndex(f),y=t.getLayout("size"),m=t.getLayout("offset");return{progress:function(_,S){for(var b=_.count,x=p&&aa(b*3),w=p&&l&&aa(b*3),T=p&&aa(b),C=a.master.getRect(),M=h?C.width:C.height,D,I=S.getStore(),L=0;(D=_.next())!=null;){var P=I.get(v?g:o,D),k=I.get(s,D),R=c,O=void 0;v&&(O=+P-I.get(o,D));var E=void 0,N=void 0,z=void 0,F=void 0;if(h){var H=a.dataToPoint([P,k]);if(v){var U=a.dataToPoint([O,k]);R=U[0]}E=R,N=H[1]+m,z=H[0]-R,F=y,Math.abs(z)0?t:1:t))}var eG=function(r,e,t,a){for(;t>>1;r[n][1]n&&(this._approxInterval=n);var o=Ju.length,s=Math.min(eG(Ju,this._approxInterval,0,o),o-1);this._interval=Ju[s][1],this._intervalPrecision=Wl(this._interval),this._minLevelUnit=Ju[Math.max(s-1,0)][0]},e.prototype.parse=function(t){return wt(t)?t:+Ui(t)},e.prototype.contain=function(t){return Um(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.type="time",e}(Tn),Ju=[["second",mm],["minute",_m],["hour",_l],["quarter-day",_l*6],["half-day",_l*12],["day",mr*1.2],["half-week",mr*3.5],["week",mr*7],["month",mr*31],["quarter",mr*95],["half-year",P1/2],["year",P1]];function $L(r,e,t,a){return gg(new Date(e),r,a).getTime()===gg(new Date(t),r,a).getTime()}function rG(r,e){return r/=mr,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function aG(r){var e=30*mr;return r/=e,r>6?6:r>3?3:r>2?2:1}function nG(r){return r/=_l,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function WS(r,e){return r/=e?_m:mm,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function iG(r){return kA(r,!0)}function oG(r,e,t){var a=Math.max(0,gt(Je,e)-1);return gg(new Date(r),Je[a],t).getTime()}function sG(r,e){var t=new Date(0);t[r](1);var a=t.getTime();t[r](1+e);var n=t.getTime()-a;return function(i,o){return Math.max(0,Math.round((o-i)/n))}}function lG(r,e,t,a,n,i){var o=1e4,s=dN,l=0;function u(L,P,k,R,O,E,N){for(var z=sG(O,L),F=P,H=new Date(F);Fo));)if(H[O](H[R]()+L),F=H.getTime(),i){var U=i.calcNiceTickMultiple(F,z);U>0&&(H[O](H[R]()+U*L),F=H.getTime())}N.push({value:F,notAdd:!0})}function f(L,P,k){var R=[],O=!P.length;if(!$L(Sl(L),a[0],a[1],t)){O&&(P=[{value:oG(a[0],L,t)},{value:a[1]}]);for(var E=0;E=a[0]&&N<=a[1]&&u(F,N,z,H,U,K,R),L==="year"&&k.length>1&&E===0&&k.unshift({value:k[0].value-F})}}for(var E=0;E=a[0]&&S<=a[1]&&c++)}var b=n/e;if(c>b*1.5&&p>b/1.5||(v.push(m),c>b||r===s[d]))break}h=[]}}}for(var x=kt($(v,function(L){return kt(L,function(P){return P.value>=a[0]&&P.value<=a[1]&&!P.notAdd})}),function(L){return L.length>0}),w=[],T=x.length-1,d=0;d0;)i*=10;var s=[Ng(fG(a[0]/i)*i),Ng(uG(a[1]/i)*i)];this._interval=i,this._intervalPrecision=Wl(i),this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){r.prototype.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.contain=function(t){return t=tf(t)/tf(this.base),r.prototype.contain.call(this,t)},e.prototype.normalize=function(t){return t=tf(t)/tf(this.base),r.prototype.normalize.call(this,t)},e.prototype.scale=function(t){return t=r.prototype.scale.call(this,t),Qu(this.base,t)},e.prototype.setBreaksFromOption=function(t){var a=ae();if(a){var n=a.logarithmicParseBreaksFromOption(t,this.base,X(this.parse,this)),i=n.parsedOriginal,o=n.parsedLogged;this._originalScale._innerSetBreak(i),this._innerSetBreak(o)}},e.type="log",e}(Tn);function ef(r,e){return Ng(r,ea(e))}Ji.registerClass(YL);const vG=YL;var hG=function(){function r(e,t,a){this._prepareParams(e,t,a)}return r.prototype._prepareParams=function(e,t,a){a[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var h=this._determinedMin,c=this._determinedMax;return h!=null&&(s=h,u=!0),c!=null&&(l=c,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:v}},r.prototype.modifyDataMinMax=function(e,t){this[pG[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var a=cG[e];this[a]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),cG={min:"_determinedMin",max:"_determinedMax"},pG={min:"_dataMin",max:"_dataMax"};function ZL(r,e,t){var a=r.rawExtentInfo;return a||(a=new hG(r,e,t),r.rawExtentInfo=a,a)}function rf(r,e){return e==null?null:Pe(e)?NaN:r.parse(e)}function XL(r,e){var t=r.type,a=ZL(r,e,r.getExtent()).calculate();r.setBlank(a.isBlank);var n=a.min,i=a.max,o=e.ecModel;if(o&&t==="time"){var s=BL("bar",o),l=!1;if(A(s,function(v){l=l||v.getBaseAxis()===e.axis}),l){var u=NL(s),f=dG(n,i,e,u);n=f.min,i=f.max}}return{extent:[n,i],fixMin:a.minFixed,fixMax:a.maxFixed}}function dG(r,e,t,a){var n=t.axis.getExtent(),i=Math.abs(n[1]-n[0]),o=Q5(a,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;A(o,function(c){s=Math.min(c.offset,s)});var l=-1/0;A(o,function(c){l=Math.max(c.offset+c.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=e-r,v=1-(s+l)/i,h=f/v-f;return e+=h*(l/u),r-=h*(s/u),{min:r,max:e}}function Jo(r,e){var t=e,a=XL(r,t),n=a.extent,i=t.get("splitNumber");r instanceof vG&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setBreaksFromOption(KL(t)),r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:i,fixMin:a.fixMin,fixMax:a.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function Vh(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new Ul({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new UL({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(Ji.getClass(e)||Tn)}}function gG(r){var e=r.scale.getExtent(),t=e[0],a=e[1];return!(t>0&&a>0||t<0&&a<0)}function _s(r){var e=r.getLabelModel().get("formatter");if(r.type==="time"){var t=gN(e);return function(n,i){return r.scale.getFormattedLabel(n,i,t)}}else{if(Z(e))return function(n){var i=r.scale.getLabel(n),o=e.replace("{value}",i??"");return o};if(et(e)){if(r.type==="category")return function(n,i){return e(Iv(r,n),n.value-r.scale.getExtent()[0],null)};var a=ae();return function(n,i){var o=null;return a&&(o=a.makeAxisLabelFormatterParamBreak(o,n.break)),e(Iv(r,n),i,o)}}else return function(n){return r.scale.getLabel(n)}}}function Iv(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function Xm(r){var e=r.get("interval");return e??"auto"}function qL(r){return r.type==="category"&&Xm(r.getLabelModel())===0}function Pv(r,e){var t={};return A(r.mapDimensionsAll(e),function(a){t[PL(r,a)]=!0}),bt(t)}function yG(r,e,t){e&&A(Pv(e,t),function(a){var n=e.getApproximateExtent(a);n[0]r[1]&&(r[1]=n[1])})}function Qo(r){return r==="middle"||r==="center"}function Yl(r){return r.getShallow("show")}function KL(r){var e=r.get("breaks",!0);if(e!=null)return!ae()||!mG(r.axis)?void 0:e}function mG(r){return(r.dim==="x"||r.dim==="y"||r.dim==="z"||r.dim==="single")&&r.type!=="category"}var cu=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}(),_G=1e-8;function $S(r,e){return Math.abs(r-e)<_G}function hi(r,e,t){var a=0,n=r[0];if(!n)return!1;for(var i=1;in&&(a=o,n=l)}if(a)return xG(a.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var a=this._rect;if(a&&!t)return a;var n=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return A(o,function(s){s.type==="polygon"?US(s.exterior,n,i,t):A(s.points,function(l){US(l,n,i,t)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])||(n[0]=n[1]=i[0]=i[1]=0),a=new lt(n[0],n[1],i[0]-n[0],i[1]-n[1]),t||(this._rect=a),a},e.prototype.contain=function(t){var a=this.getBoundingRect(),n=this.geometries;if(!a.contain(t[0],t[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/t,l/t])}return a}function TG(r,e){return r=wG(r),$(kt(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var a=t.properties,n=t.geometry,i=[];switch(n.type){case"Polygon":var o=n.coordinates;i.push(new YS(o[0],o.slice(1)));break;case"MultiPolygon":A(n.coordinates,function(l){l[0]&&i.push(new YS(l[0],l.slice(1)))});break;case"LineString":i.push(new ZS([n.coordinates]));break;case"MultiLineString":i.push(new ZS(n.coordinates))}var s=new JL(a[e||"name"],i,a.cp);return s.properties=a,s})}var CG=St(),wl=St(),Nr={estimate:1,determine:2};function Rv(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function tI(r,e){var t=$(e,function(a){return r.scale.parse(a)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function AG(r,e){var t=r.getLabelModel().get("customValues");if(t){var a=_s(r),n=r.scale.getExtent(),i=tI(r,t),o=kt(i,function(s){return s>=n[0]&&s<=n[1]});return{labels:$(o,function(s){var l={value:s};return{formattedLabel:a(l),rawLabel:r.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return r.type==="category"?DG(r,e):IG(r)}function MG(r,e,t){var a=r.getTickModel().get("customValues");if(a){var n=r.scale.getExtent(),i=tI(r,a);return{ticks:kt(i,function(o){return o>=n[0]&&o<=n[1]})}}return r.type==="category"?LG(r,e):{ticks:$(r.scale.getTicks(t),function(o){return o.value})}}function DG(r,e){var t=r.getLabelModel(),a=eI(r,t,e);return!t.get("show")||r.scale.isBlank()?{labels:[]}:a}function eI(r,e,t){var a=RG(r),n=Xm(e),i=t.kind===Nr.estimate;if(!i){var o=aI(a,n);if(o)return o}var s,l;et(n)?s=oI(r,n):(l=n==="auto"?kG(r,t):n,s=iI(r,l));var u={labels:s,labelCategoryInterval:l};return i?t.out.noPxChangeTryDetermine.push(function(){return Vg(a,n,u),!0}):Vg(a,n,u),u}function LG(r,e){var t=PG(r),a=Xm(e),n=aI(t,a);if(n)return n;var i,o;if((!e.get("show")||r.scale.isBlank())&&(i=[]),et(a))i=oI(r,a,!0);else if(a==="auto"){var s=eI(r,r.getLabelModel(),Rv(Nr.determine));o=s.labelCategoryInterval,i=$(s.labels,function(l){return l.tickValue})}else o=a,i=iI(r,o,!0);return Vg(t,a,{ticks:i,tickCategoryInterval:o})}function IG(r){var e=r.scale.getTicks(),t=_s(r);return{labels:$(e,function(a,n){return{formattedLabel:t(a,n),rawLabel:r.scale.getLabel(a),tickValue:a.value,time:a.time,break:a.break}})}}var PG=rI("axisTick"),RG=rI("axisLabel");function rI(r){return function(t){return wl(t)[r]||(wl(t)[r]={list:[]})}}function aI(r,e){for(var t=0;tf&&(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,_=gh(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,b=g/p;isNaN(S)&&(S=1/0),isNaN(b)&&(b=1/0);var x=Math.max(0,Math.floor(Math.min(S,b)));if(t===Nr.estimate)return e.out.noPxChangeTryDetermine.push(X(OG,null,r,x,l)),x;var w=nI(r,x,l);return w??x}function OG(r,e,t){return nI(r,e,t)==null}function nI(r,e,t){var a=CG(r.model),n=r.getExtent(),i=a.lastAutoInterval,o=a.lastTickCount;if(i!=null&&o!=null&&Math.abs(i-e)<=1&&Math.abs(o-t)<=1&&i>e&&a.axisExtent0===n[0]&&a.axisExtent1===n[1])return i;a.lastTickCount=t,a.lastAutoInterval=e,a.axisExtent0=n[0],a.axisExtent1=n[1]}function BG(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function iI(r,e,t){var a=_s(r),n=r.scale,i=n.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=i[0],f=n.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var v=qL(r),h=o.get("showMinLabel")||v,c=o.get("showMaxLabel")||v;h&&u!==i[0]&&d(i[0]);for(var p=u;p<=i[1];p+=l)d(p);c&&p-l!==i[1]&&d(i[1]);function d(g){var y={value:g};s.push(t?g:{formattedLabel:a(y),rawLabel:n.getLabel(y),tickValue:g,time:void 0,break:void 0})}return s}function oI(r,e,t){var a=r.scale,n=_s(r),i=[];return A(a.getTicks(),function(o){var s=a.getLabel(o),l=o.value;e(o.value,s)&&i.push(t?l:{formattedLabel:n(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),i}var XS=[0,1],NG=function(){function r(e,t,a){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=a||[0,0]}return r.prototype.contain=function(e){var t=this._extent,a=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return e>=a&&e<=n},r.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return PA(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var a=this._extent;a[0]=e,a[1]=t},r.prototype.dataToCoord=function(e,t){var a=this._extent,n=this.scale;return e=n.normalize(n.parse(e)),this.onBand&&n.type==="ordinal"&&(a=a.slice(),qS(a,n.count())),Rt(e,XS,a,t)},r.prototype.coordToData=function(e,t){var a=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(a=a.slice(),qS(a,n.count()));var i=Rt(e,a,XS,t);return this.scale.scale(i)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),a=MG(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),n=a.ticks,i=$(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return VG(this,i,o,e.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var a=this.scale.getMinorTicks(t),n=$(a,function(i){return $(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(e){return e=e||Rv(Nr.determine),AG(this,e).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),a=t[1]-t[0]+(this.onBand?1:0);a===0&&(a=1);var n=Math.abs(e[1]-e[0]);return Math.abs(n)/a},r.prototype.calculateCategoryInterval=function(e){return e=e||Rv(Nr.determine),EG(this,e)},r}();function qS(r,e){var t=r[1]-r[0],a=e,n=t/a/2;r[0]+=n,r[1]-=n}function VG(r,e,t,a){var n=e.length;if(!r.onBand||t||!n)return;var i=r.getExtent(),o,s;if(n===1)e[0].coord=i[0],e[0].onBand=!0,o=e[1]={coord:i[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[n-1].tickValue-e[0].tickValue,u=(e[n-1].coord-e[0].coord)/l;A(e,function(c){c.coord-=u/2,c.onBand=!0});var f=r.scale.getExtent();s=1+f[1]-e[n-1].tickValue,o={coord:e[n-1].coord+u*s,tickValue:f[1]+1,onBand:!0},e.push(o)}var v=i[0]>i[1];h(e[0].coord,i[0])&&(a?e[0].coord=i[0]:e.shift()),a&&h(i[0],e[0].coord)&&e.unshift({coord:i[0],onBand:!0}),h(i[1],o.coord)&&(a?o.coord=i[1]:e.pop()),a&&h(o.coord,i[1])&&e.push({coord:i[1],onBand:!0});function h(c,p){return c=re(c),p=re(p),v?c>p:cn&&(n+=Vs);var c=Math.atan2(s,o);if(c<0&&(c+=Vs),c>=a&&c<=n||c+Vs>=a&&c+Vs<=n)return l[0]=f,l[1]=v,u-t;var p=t*Math.cos(a)+r,d=t*Math.sin(a)+e,g=t*Math.cos(n)+r,y=t*Math.sin(n)+e,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 kv(r,e,t,a,n,i,o,s){var l=n-r,u=i-e,f=t-r,v=a-e,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]=e+p*v;return Math.sqrt((d-n)*(d-n)+(g-i)*(g-i))}function sI(r,e,t,a,n,i,o){t<0&&(r=r+t,t=-t),a<0&&(e=e+a,a=-a);var s=r+t,l=e+a,u=o[0]=Math.min(Math.max(n,r),s),f=o[1]=Math.min(Math.max(i,e),l);return Math.sqrt((u-n)*(u-n)+(f-i)*(f-i))}var Lr=[];function HG(r,e,t){var a=sI(e.x,e.y,e.width,e.height,r.x,r.y,Lr);return t.set(Lr[0],Lr[1]),a}function WG(r,e,t){for(var a=0,n=0,i=0,o=0,s,l,u=1/0,f=e.data,v=r.x,h=r.y,c=0;c0){e=e/180*Math.PI,Ir.fromArray(r[0]),Ht.fromArray(r[1]),jt.fromArray(r[2]),it.sub(na,Ir,Ht),it.sub(Qr,jt,Ht);var t=na.len(),a=Qr.len();if(!(t<.001||a<.001)){na.scale(1/t),Qr.scale(1/a);var n=na.dot(Qr),i=Math.cos(e);if(i1&&it.copy(Ve,jt),Ve.toArray(r[1])}}}}function $G(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,Ir.fromArray(r[0]),Ht.fromArray(r[1]),jt.fromArray(r[2]),it.sub(na,Ht,Ir),it.sub(Qr,jt,Ht);var a=na.len(),n=Qr.len();if(!(a<.001||n<.001)){na.scale(1/a),Qr.scale(1/n);var i=na.dot(e),o=Math.cos(t);if(i=l)it.copy(Ve,jt);else{Ve.scaleAndAdd(Qr,s/Math.tan(Math.PI/2-f));var v=jt.x!==Ht.x?(Ve.x-Ht.x)/(jt.x-Ht.x):(Ve.y-Ht.y)/(jt.y-Ht.y);if(isNaN(v))return;v<0?it.copy(Ve,Ht):v>1&&it.copy(Ve,jt)}Ve.toArray(r[1])}}}}function op(r,e,t,a){var n=t==="normal",i=n?r:r.ensureState(t);i.ignore=e;var o=a.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=a.getModel("lineStyle").getLineStyle();n?r.useStyle(s):i.style=s}function UG(r,e){var t=e.smooth,a=e.points;if(a)if(r.moveTo(a[0][0],a[0][1]),t>0&&a.length>=3){var n=nn(a[0],a[1]),i=nn(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)*t,s=Nf([],a[1],a[0],o/n),l=Nf([],a[1],a[2],o/i),u=Nf([],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&&n&&x(-v/i,0,i);var g=r[0],y=r[i-1],m,_;S(),m<0&&w(-m,.8),_<0&&w(_,.8),S(),b(m,_,1),b(_,m,-1),S(),m<0&&T(-m),_<0&&T(_);function S(){m=g.rect[o]-t,_=a-y.rect[o]-y.rect[s]}function b(C,M,D){if(C<0){var I=Math.min(M,-C);if(I>0){x(I*D,0,i);var L=I+C;L<0&&w(-L*D,1)}else w(-C*D,1)}}function x(C,M,D){C!==0&&(f=!0);for(var I=M;I0)for(var L=0;L0;L--){var O=D[L-1]*R;x(-O,L,i)}}}function T(C){var M=C<0?-1:1;C=Math.abs(C);for(var D=Math.ceil(C/(i-1)),I=0;I0?x(D,0,I+1):x(-D,i-I-1,i),C-=D,C<=0)return}return f}function XG(r){for(var e=0;e=0&&a.attr(i.oldLayoutSelect),gt(h,"emphasis")>=0&&a.attr(i.oldLayoutEmphasis)),Dt(a,u,t,l)}else if(a.attr(u),!cs(a).valueAnimation){var v=Q(a.style.opacity,1);a.style.opacity=0,Wt(a,{style:{opacity:v}},t,l)}if(i.oldLayout=u,a.states.select){var c=i.oldLayoutSelect={};af(c,u,nf),af(c,a.states.select,nf)}if(a.states.emphasis){var p=i.oldLayoutEmphasis={};af(p,u,nf),af(p,a.states.emphasis,nf)}WM(a,l,f,t,t)}if(n&&!n.ignore&&!n.invisible){var i=jG(n),o=i.oldLayout,d={points:n.shape.points};o?(n.attr({shape:o}),Dt(n,{shape:d},t)):(n.setShape(d),n.style.strokePercent=0,Wt(n,{style:{strokePercent:1}},t)),i.oldLayout=d}},r}();const QG=JG;var up=St();function tF(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){var n=up(t).labelManager;n||(n=up(t).labelManager=new QG),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,a){var n=up(t).labelManager;a.updatedSeries.forEach(function(i){n.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}var fp=Math.sin,vp=Math.cos,cI=Math.PI,ai=Math.PI*2,eF=180/cI,rF=function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,a,n,i,o){this._add("C",e,t,a,n,i,o)},r.prototype.quadraticCurveTo=function(e,t,a,n){this._add("Q",e,t,a,n)},r.prototype.arc=function(e,t,a,n,i,o){this.ellipse(e,t,a,a,0,n,i,o)},r.prototype.ellipse=function(e,t,a,n,i,o,s,l){var u=s-o,f=!l,v=Math.abs(u),h=fn(v-ai)||(f?u>=ai:-u>=ai),c=u>0?u%ai:u%ai+ai,p=!1;h?p=!0:fn(v)?p=!1:p=c>=cI==!!f;var d=e+a*vp(o),g=t+n*fp(o);this._start&&this._add("M",d,g);var y=Math.round(i*eF);if(h){var m=1/this._p,_=(f?1:-1)*(ai-m);this._add("A",a,n,y,1,+f,e+a*vp(o+_),t+n*fp(o+_)),m>.01&&this._add("A",a,n,y,0,+f,d,g)}else{var S=e+a*vp(s),b=t+n*fp(s);this._add("A",a,n,y,+p,+f,S,b)}},r.prototype.rect=function(e,t,a,n){this._add("M",e,t),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(e,t,a,n,i,o,s,l,u){for(var f=[],v=this._p,h=1;h"}function vF(r){return""}function jm(r,e){e=e||{};var t=e.newline?` `:"";function a(n){var i=n.children,o=n.tag,s=n.attrs,l=n.text;return fF(o,s)+(o!=="style"?Ie(l):l||"")+(i?""+t+$(i,function(u){return a(u)}).join(t)+t:"")+vF(o)}return a(r)}function hF(r,e,t){t=t||{};var a=t.newline?` `:"",n=" {"+a,i=a+"}",o=$(bt(r),function(l){return l+n+$(bt(r[l]),function(u){return u+":"+r[l][u]+";"}).join(a)+i}).join(a),s=$(bt(e),function(l){return"@keyframes "+l+n+$(bt(e[l]),function(u){return u+n+$(bt(e[l][u]),function(f){var v=e[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 Wg(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function ex(r,e,t,a){return ge("svg","root",{width:r,height:e,xmlns:dI,"xmlns:xlink":gI,version:"1.1",baseProfile:"full",viewBox:a?"0 0 "+r+" "+e:!1},t)}var cF=0;function mI(){return cF++}var rx={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"},oi="transform-origin";function pF(r,e,t){var a=G({},r.shape);G(a,e),r.buildPath(t,a);var n=new pI;return n.reset(SA(r)),t.rebuildPath(n,1),n.generateStr(),n.getStr()}function dF(r,e){var t=e.originX,a=e.originY;(t||a)&&(r[oi]=t+"px "+a+"px")}var gF={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function _I(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function yF(r,e,t){var a=r.shape.paths,n={},i,o;if(A(a,function(l){var u=Wg(t.zrId);u.animation=!0,Gh(l,{},u,!0);var f=u.cssAnims,v=u.cssNodes,h=bt(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){e.d=!1;var s=_I(n,t);return i.replace(o,s)}}function ax(r){return Z(r)?rx[r]?"cubic-bezier("+rx[r]+")":Zy(r)?r:"":""}function Gh(r,e,t,a){var n=r.animators,i=n.length,o=[];if(r instanceof Mh){var s=yF(r,e,t);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u0}).length){var Ot=_I(w,t);return Ot+" "+m[0]+" both"}}for(var g in l){var s=d(l[g]);s&&o.push(s)}if(o.length){var y=t.zrId+"-cls-"+mI();t.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function mF(r,e,t){if(!r.ignore)if(r.isSilent()){var a={"pointer-events":"none"};nx(a,e,t,!0)}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=Hd(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),nx(a,e,t,!0)}}function nx(r,e,t,a){var n=JSON.stringify(r),i=t.cssStyleCache[n];i||(i=t.zrId+"-cls-"+mI(),t.cssStyleCache[n]=i,t.cssNodes["."+i+(a?":hover":"")]=r),e.class=e.class?e.class+" "+i:i}var Zl=Math.round;function SI(r){return r&&Z(r.src)}function xI(r){return r&&et(r.toDataURL)}function Jm(r,e,t,a){sF(function(n,i){var o=n==="fill"||n==="stroke";o&&_A(i)?wI(e,r,n,a):o&&Xy(i)?TI(t,r,n,a):r[n]=i,o&&a.ssr&&i==="none"&&(r["pointer-events"]="visible")},e,t,!1),CF(t,r,a)}function Qm(r,e){var t=TE(e);t&&(t.each(function(a,n){a!=null&&(r[(tx+n).toLowerCase()]=a+"")}),e.isSilent()&&(r[tx+"silent"]="true"))}function ix(r){return fn(r[0]-1)&&fn(r[1])&&fn(r[2])&&fn(r[3]-1)}function _F(r){return fn(r[4])&&fn(r[5])}function t0(r,e,t){if(e&&!(_F(e)&&ix(e))){var a=t?10:1e4;r.transform=ix(e)?"translate("+Zl(e[4]*a)/a+" "+Zl(e[5]*a)/a+")":Wk(e)}}function ox(r,e,t){for(var a=r.points,n=[],i=0;i"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";ke(h,g),ke(c,g)}else if(h==null||c==null){var y=function(M,D){if(M){var I=M.elm,L=h||D.width,P=c||D.height;M.tag==="pattern"&&(u?(P=1,L/=i.width):f&&(L=1,P/=i.height)),M.attrs.width=L,M.attrs.height=P,I&&(I.setAttribute("width",L),I.setAttribute("height",P))}},m=em(p,null,r,function(M){l||y(x,M),y(v,M)});m&&m.width&&m.height&&(h=h||m.width,c=c||m.height)}v=ge("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 b=xA(n);b&&(o.patternTransform=b);var x=ge("pattern","",o,[v]),w=jm(x),T=a.patternCache,C=T[w];C||(C=a.zrId+"-p"+a.patternIdx++,T[w]=C,o.id=C,x=a.defs[C]=ge("pattern",C,o,[v])),e[t]=dh(C)}}function AF(r,e,t){var a=t.clipPathCache,n=t.defs,i=a[r.id];if(!i){i=t.zrId+"-c"+t.clipPathIdx++;var o={id:i};a[r.id]=i,n[i]=ge("clipPath",i,o,[bI(r,t)])}e["clip-path"]=dh(i)}function ux(r){return document.createTextNode(r)}function ci(r,e,t){r.insertBefore(e,t)}function fx(r,e){r.removeChild(e)}function vx(r,e){r.appendChild(e)}function CI(r){return r.parentNode}function AI(r){return r.nextSibling}function hp(r,e){r.textContent=e}var hx=58,MF=120,DF=ge("","");function $g(r){return r===void 0}function Kr(r){return r!==void 0}function LF(r,e,t){for(var a={},n=e;n<=t;++n){var i=r[n].key;i!==void 0&&(a[i]=n)}return a}function ll(r,e){var t=r.key===e.key,a=r.tag===e.tag;return a&&t}function Xl(r){var e,t=r.children,a=r.tag;if(Kr(a)){var n=r.elm=yI(a);if(e0(DF,r),W(t))for(e=0;ei?(p=t[l+1]==null?null:t[l+1].elm,MI(r,p,t,n,l)):Nv(r,e,a,i))}function Po(r,e){var t=e.elm=r.elm,a=r.children,n=e.children;r!==e&&(e0(r,e),$g(e.text)?Kr(a)&&Kr(n)?a!==n&&IF(t,a,n):Kr(n)?(Kr(r.text)&&hp(t,""),MI(t,null,n,0,n.length-1)):Kr(a)?Nv(t,a,0,a.length-1):Kr(r.text)&&hp(t,""):r.text!==e.text&&(Kr(a)&&Nv(t,a,0,a.length-1),hp(t,e.text)))}function PF(r,e){if(ll(r,e))Po(r,e);else{var t=r.elm,a=CI(t);Xl(e),a!==null&&(ci(a,e.elm,AI(t)),Nv(a,[r],0,0))}return e}var RF=0,kF=function(){function r(e,t,a){if(this.type="svg",this.refreshHover=cx(),this.configLayer=cx(),this.storage=t,this._opts=a=G({},a),this.root=e,this._id="zr"+RF++,this._oldVNode=ex(a.width,a.height),e&&!a.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=yI("svg");e0(null,this._oldVNode),n.appendChild(i),e.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 e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",PF(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return lx(e,Wg(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),a=this._width,n=this._height,i=Wg(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var o=[],s=this._bgVNode=EF(a,n,this._backgroundColor,i);s&&o.push(s);var l=e.compress?null:this._mainVNode=ge("g","main",{},[]);this._paintList(t,i,l?l.children:o),l&&o.push(l);var u=$(bt(i.defs),function(h){return i.defs[h]});if(u.length&&o.push(ge("defs","defs",{},u)),e.animation){var f=hF(i.cssNodes,i.cssAnims,{newline:!0});if(f){var v=ge("style","stl",{},[],f);o.push(v)}}return ex(a,n,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},jm(this.renderToVNode({animation:Q(e.cssAnimation,!0),emphasis:Q(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Q(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,a){for(var n=e.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=this.__startIndex;v15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var M=c.dpr,D=0;D0&&e>n[0]){for(l=0;le);l++);s=a[n[l]]}if(n.splice(l+1,0,e),a[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var a=this._zlevelList,n=0;n0?of:0),this._needsManuallyCompositing),f.__builtin__||Gy("ZLevel "+u+" has been used by unkown layer "+f.id),f!==i&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,t(l),i=f),n.__dirty&tr&&!n.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(v,h){!v.__used&&v.getElementCount()>0&&(v.__dirty=!0,v.__startIndex=v.__endIndex=v.__drawIndex=0),v.__dirty&&v.__drawIndex<0&&(v.__drawIndex=v.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,A(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var a=this._layerConfig;a[e]?yt(a[e],t,!0):a[e]=t;for(var n=0;n-1&&(u.style.stroke=u.style.fill,u.style.fill=V.color.neutral00,u.style.lineWidth=2),a},e.type="series.line",e.dependencies=["grid","polar"],e.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},e}(Yt);const UF=$F;function ts(r,e){var t=r.mapDimensionsAll("defaultedLabel"),a=t.length;if(a===1){var n=Ko(r,e,t[0]);return n!=null?n+"":null}else if(a){for(var i=[],o=0;o=0&&a.push(e[i])}return a.join(" ")}var YF=function(r){B(e,r);function e(t,a,n,i){var o=r.call(this)||this;return o.updateData(t,a,n,i),o}return e.prototype._createSymbol=function(t,a,n,i,o,s){this.removeAll();var l=oe(t,-1,-1,2,2,null,s);l.attr({z2:Q(o,100),culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),l.drift=ZF,this._symbolType=t,this.add(l)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Oa(this.childAt(0))},e.prototype.downplay=function(){Ba(this.childAt(0))},e.prototype.setZ=function(t,a){var n=this.childAt(0);n.zlevel=t,n.z=a},e.prototype.setDraggable=function(t,a){var n=this.childAt(0);n.draggable=t,n.cursor=!a&&t?"move":n.cursor},e.prototype.updateData=function(t,a,n,i){this.silent=!1;var o=t.getItemVisual(a,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,a),u=e.getSymbolZ2(t,a),f=o!==this._symbolType,v=i&&i.disableAnimation;if(f){var h=t.getItemVisual(a,"symbolKeepAspect");this._createSymbol(o,t,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):Dt(c,p,s,a),wr(c)}if(this._updateCommon(t,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,Wt(c,p,s,a)}}v&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,a,n,i,o){var s=this.childAt(0),l=t.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||t.hasItemOption){var m=i&&i.itemModel?i.itemModel:t.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=he(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var S=t.getItemVisual(a,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var b=Ki(t.getItemVisual(a,"symbolOffset"),n);b&&(s.x=b[0],s.y=b[1]),y&&s.attr("cursor",y);var x=t.getItemVisual(a,"style"),w=x.fill;if(s instanceof Me){var T=s.style;s.useStyle(G({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},x))}else s.__isEmptyBrush?s.useStyle(G({},x)):s.useStyle(x),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=t.getItemVisual(a,"liftZ"),M=this._z2;C!=null?M==null&&(this._z2=s.z2,s.z2+=C):M!=null&&(s.z2=M,this._z2=null);var D=o&&o.useNameLabel;ye(s,d,{labelFetcher:l,labelDataIndex:a,defaultText:I,inheritColor:w,defaultOpacity:x.opacity});function I(k){return D?t.getName(k):ts(t,k)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var L=s.ensureState("emphasis");L.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;L.scaleX=this._sizeX*P,L.scaleY=this._sizeY*P,this.setSymbolScale(1),$t(this,h,c,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,a,n){var i=this.childAt(0),o=ut(this).dataIndex,s=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var l=i.getTextContent();l&&bn(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();bn(i,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,a){return ms(t.getItemVisual(a,"symbolSize"))},e.getSymbolZ2=function(t,a){return t.getItemVisual(a,"z2")},e}(at);function ZF(r,e){this.parent.drift(r,e)}const pu=YF;function pp(r,e,t,a){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(a.isIgnore&&a.isIgnore(t))&&!(a.clipShape&&!a.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function gx(r){return r!=null&&!st(r)&&(r={isIgnore:r}),r||{}}function yx(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:he(e),cursorStyle:e.get("cursor")}}var XF=function(){function r(e){this.group=new at,this._SymbolCtor=e||pu}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=gx(t);var a=this.group,n=e.hostModel,i=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=yx(e),u={disableAnimation:s},f=t.getSymbolPoint||function(v){return e.getItemLayout(v)};i||a.removeAll(),e.diff(i).add(function(v){var h=f(v);if(pp(e,h,v,t)){var c=new o(e,v,l,u);c.setPosition(h),e.setItemGraphicEl(v,c),a.add(c)}}).update(function(v,h){var c=i.getItemGraphicEl(h),p=f(v);if(!pp(e,p,v,t)){a.remove(c);return}var d=e.getItemVisual(v,"symbol")||"circle",g=c&&c.getSymbolType&&c.getSymbolType();if(!c||g&&g!==d)a.remove(c),c=new o(e,v,l,u),c.setPosition(p);else{c.updateData(e,v,l,u);var y={x:p[0],y:p[1]};s?c.attr(y):Dt(c,y,n)}a.add(c),e.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=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(a,n){var i=e._getSymbolPoint(n);a.setPosition(i),a.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=yx(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,a){this._progressiveEls=[],a=gx(a);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0?t=a[0]:a[1]<0&&(t=a[1]),t}function II(r,e,t,a){var n=NaN;r.stacked&&(n=t.get(t.getCalculationInfo("stackedOverDimension"),a)),isNaN(n)&&(n=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=t.get(r.baseDim,a),o[1-i]=n,e.dataToPoint(o)}function KF(r,e){var t=[];return e.diff(r).add(function(a){t.push({cmd:"+",idx:a})}).update(function(a,n){t.push({cmd:"=",idx:n,idx1:a})}).remove(function(a){t.push({cmd:"-",idx:a})}).execute(),t}function jF(r,e,t,a,n,i,o,s){for(var l=KF(r,e),u=[],f=[],v=[],h=[],c=[],p=[],d=[],g=LI(n,e,o),y=r.getLayout("points")||[],m=e.getLayout("points")||[],_=0;_=n||d<0)break;if(Pi(y,m)){if(l){d+=i;continue}break}if(d===t)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 b=d+i,x=e[b*2],w=e[b*2+1];x===y&&w===m&&g=a||Pi(x,w))c=y,p=m;else{M=x-u,D=w-f;var P=y-u,k=x-y,R=m-f,O=w-m,E=void 0,N=void 0;if(s==="x"){E=Math.abs(P),N=Math.abs(k);var z=M>0?1:-1;c=y-z*E*o,p=m,I=y+z*N*o,L=m}else if(s==="y"){E=Math.abs(R),N=Math.abs(O);var F=D>0?1:-1;c=y,p=m-F*E*o,I=y,L=m+F*N*o}else E=Math.sqrt(P*P+R*R),N=Math.sqrt(k*k+O*O),C=N/(N+E),c=y-M*o*(1-C),p=m-D*o*(1-C),I=y+M*o*C,L=m+D*o*C,I=Ka(I,ja(x,y)),L=Ka(L,ja(w,m)),I=ja(I,Ka(x,y)),L=ja(L,Ka(w,m)),M=I-y,D=L-m,c=y-M*E/N,p=m-D*E/N,c=Ka(c,ja(u,y)),p=Ka(p,ja(f,m)),c=ja(c,Ka(u,y)),p=ja(p,Ka(f,m)),M=y-c,D=m-p,I=y+M*N/E,L=m+D*N/E}r.bezierCurveTo(v,h,c,p,y,m),v=I,h=L}else r.lineTo(y,m)}u=y,f=m,d+=i}return g}var PI=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),JF=function(r){B(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polyline",a}return e.prototype.getDefaultStyle=function(){return{stroke:V.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new PI},e.prototype.buildPath=function(t,a){var n=a.points,i=0,o=n.length/2;if(a.connectNulls){for(;o>0&&Pi(n[o*2-2],n[o*2-1]);o--);for(;i=0){var S=u?(p-l)*_+l:(c-s)*_+s;return u?[t,S]:[S,t]}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 b=u?ov(s,c,d,y,t,f):ov(l,p,g,m,t,f);if(b>0)for(var x=0;x=0){var S=u?de(l,p,g,m,w):de(s,c,d,y,w);return u?[t,S]:[S,t]}}s=y,l=m;break}}},e}(xt),QF=function(r){B(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(PI),RI=function(r){B(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polygon",a}return e.prototype.getDefaultShape=function(){return new QF},e.prototype.buildPath=function(t,a){var n=a.points,i=a.stackedOnPoints,o=0,s=n.length/2,l=a.smoothMonotone;if(a.connectNulls){for(;s>0&&Pi(n[s*2-2],n[s*2-1]);s--);for(;oe){i?t.push(o(i,l,e)):n&&t.push(o(n,l,0),o(n,l,e));break}else n&&(t.push(o(n,l,0)),n=null),t.push(l),i=l}return t}function r3(r,e,t){var a=r.getVisual("visualMeta");if(!(!a||!a.length||!r.count())&&e.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=e.getAxis(n),u=$(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=e3(u,n==="x"?t.getWidth():t.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 vs(0,0,0,0,h,!0);return m[n]=d,m[n+"2"]=g,m}}}function a3(r,e,t){var a=r.get("showAllSymbol"),n=a==="auto";if(!(a&&!n)){var i=t.getAxesByScale("ordinal")[0];if(i&&!(n&&n3(i,e))){var o=e.mapDimension(i.dim),s={};return A(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function n3(r,e){var t=r.getExtent(),a=Math.abs(t[1]-t[0])/r.scale.count();isNaN(a)&&(a=0);for(var n=e.count(),i=Math.max(1,Math.round(n/5)),o=0;oa)return!1;return!0}function i3(r,e){return isNaN(r)||isNaN(e)}function o3(r){for(var e=r.length/2;e>0&&i3(r[e*2-2],r[e*2-1]);e--);return e-1}function bx(r,e){return[r[e*2],r[e*2+1]]}function s3(r,e,t){for(var a=r.length/2,n=t==="x"?0:1,i,o,s=0,l=-1,u=0;u=e||i>=e&&o<=e){l=u;break}s=u,i=o}return{range:[s,l],t:(e-i)/(o-i)}}function OI(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var N=p.getState("emphasis").style;N.lineWidth=+p.style.lineWidth+1}ut(p).seriesIndex=t.seriesIndex,$t(p,R,O,E);var z=xx(t.get("smooth")),F=t.get("smoothMonotone");if(p.setShape({smooth:z,smoothMonotone:F,connectNulls:w}),d){var H=s.getCalculationInfo("stackedOnSeries"),U=0;d.useStyle(ot(u.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),H&&(U=xx(H.get("smooth"))),d.setShape({smooth:z,stackedOnSmooth:U,smoothMonotone:F,connectNulls:w}),ve(d,t,"areaStyle"),ut(d).seriesIndex=t.seriesIndex,$t(d,R,O,E)}var K=this._changePolyState;s.eachItemGraphicEl(function(ft){ft&&(ft.onHoverStateChange=K)}),this._polyline.onHoverStateChange=K,this._data=s,this._coordSys=i,this._stackedOnPoints=b,this._points=f,this._step=M,this._valueOrigin=_,t.get("triggerLineEvent")&&(this.packEventData(t,p),d&&this.packEventData(t,d))},e.prototype.packEventData=function(t,a){ut(a).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,a,n,i){var o=t.getData(),s=Oi(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(isNaN(f)||isNaN(v)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,v))return;var h=t.get("zlevel")||0,c=t.get("z")||0;u=new pu(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 Ft.prototype.highlight.call(this,t,a,n,i)},e.prototype.downplay=function(t,a,n,i){var o=t.getData(),s=Oi(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 Ft.prototype.downplay.call(this,t,a,n,i)},e.prototype._changePolyState=function(t){var a=this._polygon;yv(this._polyline,t),a&&yv(a,t)},e.prototype._newPolyline=function(t){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new JF({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},e.prototype._newPolygon=function(t,a){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new RI({shape:{points:t,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,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=t.hostModel,f=u.get("animationDuration");et(f)&&(f=f(null));var v=u.get("animationDelay")||0,h=et(v)?v(null):v;t.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,b=a.pointToCoord(g);i?(y=S.startAngle,m=S.endAngle,_=-b[1]/180*Math.PI):(y=S.r0,m=S.r,_=b[0])}else{var x=n;i?(y=x.x,m=x.x+x.width,_=c.x):(y=x.y+x.height,m=x.y,_=c.y)}var w=m===y?0:(_-y)/(m-y);l&&(w=1-w);var T=et(v)?v(p):f*w+h,C=d.getSymbolPath(),M=C.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),M&&M.animateFrom({style:{opacity:0}},{duration:300,delay:T}),C.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,a,n){var i=t.getModel("endLabel");if(OI(t)){var o=t.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 Mt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=o3(l);f>=0&&(ye(s,he(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:f,defaultText:function(v,h,c){return c!=null?DI(o,c):ts(o,v)},enableTextSetter:!0},l3(i,a)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,a,n,i,o,s,l){var u=this._endLabel,f=this._polyline;if(u){t<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,b=(y?d:0)*(m?-1:1),x=(y?0:-d)*(m?-1:1),w=y?"x":"y",T=s3(v,S,w),C=T.range,M=C[1]-C[0],D=void 0;if(M>=1){if(M>1&&!c){var I=bx(v,C[0]);u.attr({x:I[0]+b,y:I[1]+x}),o&&(D=h.getRawValue(C[0]))}else{var I=f.getPointOn(S,w);I&&u.attr({x:I[0]+b,y:I[1]+x});var L=h.getRawValue(C[0]),P=h.getRawValue(C[1]);o&&(D=WA(n,p,L,P,T.t))}i.lastFrameIndex=C[0]}else{var k=t===1||i.lastFrameIndex>0?C[0]:0,I=bx(v,k);o&&(D=h.getRawValue(k)),u.attr({x:I[0]+b,y:I[1]+x})}if(o){var R=cs(u);typeof R.setLabelText=="function"&&R.setLabelText(D)}}},e.prototype._doUpdateAnimation=function(t,a,n,i,o,s,l){var u=this._polyline,f=this._polygon,v=t.hostModel,h=jF(this._data,t,this._stackedOnPoints,a,this._coordSys,n,this._valueOrigin),c=h.current,p=h.stackedOnCurrent,d=h.next,g=h.stackedOnNext;if(o&&(p=Ja(h.stackedOnCurrent,h.current,n,o,l),c=Ja(h.current,null,n,o,l),g=Ja(h.stackedOnNext,h.next,n,o,l),d=Ja(h.next,null,n,o,l)),Sx(c,d)>3e3||f&&Sx(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(),Dt(u,y,v),f&&(f.setShape({points:c,stackedOnPoints:p}),f.stopAnimation(),Dt(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 b=_[S].cmd;if(b==="="){var x=t.getItemGraphicEl(_[S].idx1);x&&m.push({el:x,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var w=u.shape.__points,T=0;Te&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t10&&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"?e.setData(n.lttbDownSample(n.mapDimension(u.dim),1/c)):i==="minmax"&&e.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/c));var p=void 0;Z(i)?p=v3[i]:et(i)&&(p=i),p&&e.setData(n.downSample(n.mapDimension(u.dim),1/c,p,h3))}}}}}function c3(r){r.registerChartView(f3),r.registerSeriesModel(UF),r.registerLayout(yu("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),a=e.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",a)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,BI("line"))}var NI=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return Wa(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,a,n){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(t),s=i.dataToPoint(o);if(n)A(i.getAxes(),function(h,c){if(h.type==="category"&&a!=null){var p=h.getTicksCoords(),d=h.getTickModel().get("alignWithLabel"),g=o[c],y=a[c]==="x1"||a[c]==="y1";if(y&&!d&&(g+=1),p.length<2)return;if(p.length===2){s[c]=h.toGlobalCoord(h.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,S=1,b=0;bg){_=(x+m)/2;break}b===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]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e}(Yt);Yt.registerClass(NI);const Vv=NI;var p3=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return Wa(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),a=this.get("largeThreshold");return a>t&&(t=a),t},e.prototype.brushSelector=function(t,a,n){return n.rect(a.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Rn(Vv.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:V.color.primary,borderWidth:2}},realtimeSort:!1}),e}(Vv);const d3=p3;var g3=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}(),y3=function(r){B(e,r);function e(t){var a=r.call(this,t)||this;return a.type="sausage",a}return e.prototype.getDefaultShape=function(){return new g3},e.prototype.buildPath=function(t,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},e.prototype._isOrderDifferentInView=function(t,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(t.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,a,n,i){if(this._isOrderChangedWithinSameData(t,a,n)){var o=this._dataSort(t,n,a);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,a,n){var i=a.baseAxis,o=this._dataSort(t,i,function(s){return t.get(t.mapDimension(a.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},e.prototype.remove=function(t,a){this._clear(this._model),this._removeOnRenderedListener(a)},e.prototype.dispose=function(t,a){this._removeOnRenderedListener(a)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var a=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(i){Da(i,t,ut(i).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Ft),Tx={cartesian2d:function(r,e){var t=e.width<0?-1:1,a=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height);var n=r.x+r.width,i=r.y+r.height,o=gp(e.x,r.x),s=yp(e.x+e.width,n),l=gp(e.y,r.y),u=yp(e.y+e.height,i),f=sn?s:o,e.y=v&&l>i?u:l,e.width=f?0:s-o,e.height=v?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height),f||v},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}var n=yp(e.r,r.r),i=gp(e.r0,r.r0);e.r=n,e.r0=i;var o=n-i<0;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}return o}},Cx={cartesian2d:function(r,e,t,a,n,i,o,s,l){var u=new _t({shape:G({},a),z2:1});if(u.__dataIndex=t,u.name="item",i){var f=u.shape,v=n?"height":"width";f[v]=0}return u},polar:function(r,e,t,a,n,i,o,s,l){var u=!n&&l?zv:Fe,f=new u({shape:a,z2:1});f.name="item";var v=VI(n);if(f.calculateTextPosition=m3(v,{isRoundCap:u===zv}),i){var h=f.shape,c=n?"r":"endAngle",p={};h[c]=n?a.r0:a.startAngle,p[c]=a[c],(s?Dt:Wt)(f,{shape:p},i)}return f}};function b3(r,e){var t=r.get("realtimeSort",!0),a=e.getBaseAxis();if(t&&a.type==="category"&&e.type==="cartesian2d")return{baseAxis:a,otherAxis:e.getOtherAxis(a)}}function Ax(r,e,t,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?Dt:Wt)(t,{shape:l},e,n,null);var f=e?r.baseAxis.model:null;(o?Dt:Wt)(t,{shape:u},f,n)}function Mx(r,e){for(var t=0;t0?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,e,t){var a=r.getItemLayout(e);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function C3(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function VI(r){return function(e){var t=e?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+t;default:return a}}}(r)}function Lx(r,e,t,a,n,i,o,s){var l=e.getItemVisual(t,"style");if(s){if(!i.get("roundCap")){var f=r.shape,v=ia(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?n.height>=0?"bottom":"top":n.width>=0?"right":"left",p=he(a);ye(r,p,{labelFetcher:i,labelDataIndex:t,defaultText:ts(i.getData(),t),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,_3(r,g==="outside"?c:g,VI(o),a.get(["label","rotate"]))}HM(d,p,i.getRawValue(t),function(m){return DI(e,m)});var y=a.getModel(["emphasis"]);$t(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),ve(r,a),C3(n)&&(r.style.fill="none",r.style.stroke="none",A(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function A3(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var a=r.get(["itemStyle","borderWidth"])||0,n=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(a,n,i)}var M3=function(){function r(){}return r}(),Ix=function(r){B(e,r);function e(t){var a=r.call(this,t)||this;return a.type="largeBar",a}return e.prototype.getDefaultShape=function(){return new M3},e.prototype.buildPath=function(t,a){for(var n=a.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?t:null},30,!1);function D3(r,e,t){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]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[f]}return-1}function zI(r,e,t){if(Cn(t,"cartesian2d")){var a=e,n=t.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=t.getArea(),i=e;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 L3(r,e,t){var a=r.type==="polar"?Fe:_t;return new a({shape:zI(e,t,r),silent:!0,z2:0})}const I3=x3;function P3(r){r.registerChartView(I3),r.registerSeriesModel(d3),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,dt(zL,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,GL("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,BI("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var a=e.componentType||"series";t.eachComponent({mainType:a,query:e},function(n){e.sortInfo&&n.axis.setCategorySortInfo(e.sortInfo)})})}var kx=Math.PI*2,ff=Math.PI/180;function R3(r,e,t){e.eachSeriesByType(r,function(a){var n=a.getData(),i=n.mapDimension("value"),o=uD(a,t),s=o.cx,l=o.cy,u=o.r,f=o.r0,v=o.viewRect,h=-a.get("startAngle")*ff,c=a.get("endAngle"),p=a.get("padAngle")*ff;c=c==="auto"?h-kx:-c*ff;var d=a.get("minAngle")*ff,g=d+p,y=0;n.each(i,function(O){!isNaN(O)&&y++});var m=n.getSum(i),_=Math.PI/(m||y)*2,S=a.get("clockwise"),b=a.get("roseType"),x=a.get("stillShowZeroSum"),w=n.getDataExtent(i);w[0]=0;var T=S?1:-1,C=[h,c],M=T*p/2;xh(C,!S),h=C[0],c=C[1];var D=GI(a);D.startAngle=h,D.endAngle=c,D.clockwise=S,D.cx=s,D.cy=l,D.r=u,D.r0=f;var I=Math.abs(c-h),L=I,P=0,k=h;if(n.setLayout({viewRect:v,r:u}),n.each(i,function(O,E){var N;if(isNaN(O)){n.setItemLayout(E,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:s,cy:l,r0:f,r:b?NaN:u});return}b!=="area"?N=m===0&&x?_:O*_:N=I/y,NN?(F=k+T*N/2,H=F):(F=k+M,H=z-M),n.setItemLayout(E,{angle:N,startAngle:F,endAngle:H,clockwise:S,cx:s,cy:l,r0:f,r:b?Rt(O,w,[f,u]):u}),k=z}),Lt?y:g,b=Math.abs(_.label.y-t);if(b>=S.maxY){var x=_.label.x-e-_.len2*n,w=a+_.len,T=Math.abs(x)r.unconstrainedWidth?null:h:null;a.setStyle("width",c)}HI(i,a)}}}function HI(r,e){Ox.rect=r,vI(Ox,e,O3)}var O3={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},Ox={};function mp(r){return r.position==="center"}function B3(r){var e=r.getData(),t=[],a,n,i=!1,o=(r.get("minShowLabelAngle")||0)*k3,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,f=s.x,v=s.y,h=s.height;function c(x){x.ignore=!0}function p(x){if(!x.ignore)return!0;for(var w in x.states)if(x.states[w].ignore===!1)return!0;return!1}e.each(function(x){var w=e.getItemGraphicEl(x),T=w.shape,C=w.getTextContent(),M=w.getTextGuideLine(),D=e.getItemModel(x),I=D.getModel("label"),L=I.get("position")||D.get(["emphasis","label","position"]),P=I.get("distanceToLabelLine"),k=I.get("alignTo"),R=Y(I.get("edgeDistance"),u),O=I.get("bleedMargin");O==null&&(O=Math.min(u,h)>200?10:2);var E=D.getModel("labelLine"),N=E.get("length");N=Y(N,u);var z=E.get("length2");if(z=Y(z,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":H>0?"left":"right"}var Et=Math.PI,Nt=0,pe=I.get("rotate");if(wt(pe))Nt=pe*(Et/180);else if(L==="center")Nt=0;else if(pe==="radial"||pe===!0){var Ke=H<0?-F+Et:-F;Nt=Ke}else if(pe==="tangential"&&L!=="outside"&&L!=="outer"){var We=Math.atan2(H,U);We<0&&(We=Et*2+We);var kn=U>0;kn&&(We=Et+We),Nt=We-Et}if(i=!!Nt,C.x=K,C.y=ft,C.rotation=Nt,C.setStyle({verticalAlign:"middle"}),vt){C.setStyle({align:Ot});var Kh=C.states.select;Kh&&(Kh.x+=C.x,Kh.y+=C.y)}else{var ro=new lt(0,0,0,0);HI(ro,C),t.push({label:C,labelLine:M,position:L,len:N,len2:z,minTurnAngle:E.get("minTurnAngle"),maxSurfaceAngle:E.get("maxSurfaceAngle"),surfaceNormal:new it(H,U),linePoints:At,textAlign:Ot,labelDistance:P,labelAlignTo:k,edgeDistance:R,bleedMargin:O,rect:ro,unconstrainedWidth:ro.width,labelStyleWidth:C.style.width})}w.setTextConfig({inside:vt})}}),!i&&r.get("avoidLabelOverlap")&&E3(t,a,n,l,u,h,f,v);for(var d=0;d0){for(var f=o.getItemLayout(0),v=1;isNaN(f&&f.startAngle)&&v=i.r0}},e.type="pie",e}(Ft);const z3=V3;function xs(r,e,t){e=W(e)&&{coordDimensions:e}||G({encodeDefine:r.getEncode()},e);var a=r.getSource(),n=hu(a,e).dimensions,i=new ze(n,r);return i.initData(a,t),i}var G3=function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var a=this._getDataWithEncodedVisual();return a.getItemVisual(e,t)},r}();const bs=G3;var F3=St(),WI=function(r){B(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new bs(X(this.getData,this),X(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return xs(this,{coordDimensions:["value"],encodeDefaulter:dt(Mm,this)})},e.prototype.getDataParams=function(t){var a=this.getData(),n=F3(a),i=n.seats;if(!i){var o=[];a.each(a.mapDimension("value"),function(l){o.push(l)}),i=n.seats=LE(o,a.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=i[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){Ei(t,"labelLine",["show"]);var a=t.labelLine,n=t.emphasis.labelLine;a.show=a.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.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"},e}(Yt);CN({fullType:WI.type,getCoord2:function(r){return r.getShallow("center")}});const H3=WI;function W3(r){return{seriesType:r,reset:function(e,t){var a=e.getData();a.filterSelf(function(n){var i=a.mapDimension("value"),o=a.get(i,n);return!(wt(o)&&!isNaN(o)&&o<0)})}}}function $3(r){r.registerChartView(z3),r.registerSeriesModel(H3),rL("pie",r.registerAction),r.registerLayout(dt(R3,"pie")),r.registerProcessor(Ss("pie")),r.registerProcessor(W3("pie"))}var U3=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,a){return Wa(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,a,n){return n.point(a.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:V.color.primary}},universalTransition:{divideShape:"clone"}},e}(Yt);const Y3=U3;var $I=4,Z3=function(){function r(){}return r}(),X3=function(r){B(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.getDefaultShape=function(){return new Z3},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,a){var n=a.points,i=a.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&i[0]<$I,f=this.softClipShape,v;if(u){this._ctx=l;return}for(this._ctx=null,v=this._off;v=0;u--){var f=u*2,v=i[f]-s/2,h=i[f+1]-l/2;if(t>=v&&a>=h&&t<=v+s&&a<=h+l)return u}return-1},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect();if(t=n[0],a=n[1],i.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){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+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}();const K3=q3;var j3=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,n){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,a,n){this._symbolDraw.incrementalUpdate(t,a.getData(),{clipShape:this._getClipShape(a)}),this._finished=t.end===a.getData().count()},e.prototype.updateTransform=function(t,a,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=yu("").reset(t,a,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var a=t.coordinateSystem;return a&&a.getArea&&a.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,a){var n=this._symbolDraw,i=a.pipelineContext,o=i.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new K3:new du,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Ft);const J3=j3;var UI={left:0,right:0,top:0,bottom:0},Gv=["25%","25%"],Q3=function(r){B(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(t,a){var n=Xi(t.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),n&&t.outerBounds&&pa(t.outerBounds,n)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&pa(this.option.outerBounds,t.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:UI,outerBoundsContain:"all",outerBoundsClampWidth:Gv[0],outerBoundsClampHeight:Gv[1],backgroundColor:V.color.transparent,borderWidth:1,borderColor:V.color.neutral30},e}(Ct);const tH=Q3;var Yg=function(r){B(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",qt).models[0]},e.type="cartesian2dAxis",e}(Ct);se(Yg,cu);var YI={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:V.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:V.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:V.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[V.color.backgroundTint,V.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:V.color.neutral00,borderColor:V.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},eH=yt({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},YI),r0=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:V.color.axisMinorSplitLine,width:1}}},YI),rH=yt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},r0),aH=ot({logBase:10},r0);const ZI={category:eH,value:r0,time:rH,log:aH};var nH={value:1,category:1,time:1,log:1},Zg=null;function iH(r){Zg||(Zg=r)}function mu(){return Zg}function es(r,e,t,a){A(nH,function(n,i){var o=yt(yt({},ZI[i],!0),a,!0),s=function(l){B(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=e+"Axis."+i,f}return u.prototype.mergeDefaultAndTheme=function(f,v){var h=Vl(this),c=h?Xi(f):{},p=v.getTheme();yt(f,p.get(i+"Axis")),yt(f,this.getDefaultOption()),f.type=Bx(f),h&&pa(f,c,h)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=$l.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=mu();return v?v.updateModelAxisBreak(this,f):{breaks:[]}},u.type=e+"Axis."+i,u.defaultOption=o,u}(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",Bx)}function Bx(r){return r.type||(r.data?"category":"value")}var oH=function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return $(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),kt(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}();const sH=oH;var Xg=["x","y"];function Nx(r){return(r.type==="interval"||r.type==="time")&&!r.hasBreaks()}var lH=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=Xg,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,a=this.getAxis("y").scale;if(!(!Nx(t)||!Nx(a))){var n=t.getExtent(),i=a.getExtent(),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=Or([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var a=this.getAxis("x"),n=this.getAxis("y");return a.contain(a.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,a){var n=this.dataToPoint(t),i=this.dataToPoint(a),o=this.getArea(),s=new lt(n[0],n[1],i[0]-n[0],i[1]-n[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,a,n){n=n||[];var i=t[0],o=t[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return te(n,t,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},e.prototype.clampData=function(t,a){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),s=i.getExtent(),l=n.parse(t[0]),u=i.parse(t[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},e.prototype.pointToData=function(t,a,n){if(n=n||[],this._invTransform)return te(n,t,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),a),n[1]=o.coordToData(o.toLocalCoord(t[1]),a),n},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var a=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(a[0],a[1])-t,o=Math.min(n[0],n[1])-t,s=Math.max(a[0],a[1])-i+t,l=Math.max(n[0],n[1])-o+t;return new lt(i,o,s,l)},e}(sH),uH=function(r){B(e,r);function e(t,a,n,i,o){var s=r.call(this,t,a,n)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var a=this.getExtent();return a[0]=this.toGlobalCoord(a[0]),a[1]=this.toGlobalCoord(a[1]),t&&a[0]>a[1]&&a.reverse(),a},e.prototype.pointToData=function(t,a){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),a)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(Gr);const XI=uH;var Fh="expandAxisBreak",qI="collapseAxisBreak",KI="toggleAxisBreak",a0="axisbreakchanged",fH={type:Fh,event:a0,update:"update",refineEvent:n0},vH={type:qI,event:a0,update:"update",refineEvent:n0},hH={type:KI,event:a0,update:"update",refineEvent:n0};function n0(r,e,t,a){var n=[];return A(r,function(i){n=n.concat(i.eventBreaks)}),{eventContent:{breaks:n}}}function cH(r){r.registerAction(fH,e),r.registerAction(vH,e),r.registerAction(hH,e);function e(t,a){var n=[],i=Ho(a,t);function o(s,l){A(i[s],function(u){var f=u.updateAxisBreaks(t);A(f.breaks,function(v){var h;n.push(ot((h={},h[l]=u.componentIndex,h),v))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:n}}}var vn=Math.PI,pH=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],dH=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],rs=St(),jI=St(),JI=function(){function r(e){this.recordMap={},this.resolveAxisNameOverlap=e}return r.prototype.ensureRecord=function(e){var t=e.axis.dim,a=e.componentIndex,n=this.recordMap,i=n[t]||(n[t]=[]);return i[a]||(i[a]={ready:{}})},r}();function gH(r,e,t,a){var n=t.axis,i=e.ensureRecord(t),o=[],s,l=i0(r.axisName)&&Qo(r.nameLocation);A(a,function(p){var d=da(p);if(!(!d||d.label.ignore)){o.push(d);var g=i.transGroup;l&&(g.transform?Or(zs,g.transform):ch(zs),d.transform&&oa(zs,zs,d.transform),lt.copy(vf,d.localRect),vf.applyTransform(zs),s?s.union(vf):lt.copy(s=new lt(0,0,0,0),vf))}});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 lt(h,0,c,1))}i.stOccupiedRect=s,i.labelInfoList=o}var zs=xe(),vf=new lt(0,0,0,0),QI=function(r,e,t,a,n,i){if(Qo(r.nameLocation)){var o=i.stOccupiedRect;o&&t2(ZG({},o,i.transGroup.transform),a,n)}else e2(i.labelInfoList,i.dirVec,a,n)};function t2(r,e,t){var a=new it;zh(r,e,a,{direction:Math.atan2(t.y,t.x),bidirectional:!1,touchThreshold:.05})&&zg(e,a)}function e2(r,e,t,a){for(var n=it.dot(a,e)>=0,i=0,o=r.length;i0?"top":"bottom",i="center"):Pl(n-vn)?(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(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r}(),yH=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],mH={axisLine:function(r,e,t,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&&(te(f,f,u),te(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"])&&a.axis.scale.hasBreaks())mu().buildAxisBreakLine(a,n,i,p);else{var d=new fe(G({shape:{x1:f[0],y1:f[1],x2:v[0],y2:v[1]}},p));qo(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)||wt(y))&&(y=[y,y]);var m=Ki(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(b,x){if(g[x]!=="none"&&g[x]!=null){var w=oe(g[x],-_/2,-S/2,_,S,c.stroke,!0),T=b.r+b.offset,C=h?v:f;w.attr({rotation:b.rotate,x:C[0]+T*Math.cos(r.rotation),y:C[1]-T*Math.sin(r.rotation),silent:!0,z2:11}),n.add(w)}})}}},axisTickLabelEstimate:function(r,e,t,a,n,i,o,s){var l=zx(e,n,s);l&&Vx(r,e,t,a,n,i,o,Nr.estimate)},axisTickLabelDetermine:function(r,e,t,a,n,i,o,s){var l=zx(e,n,s);l&&Vx(r,e,t,a,n,i,o,Nr.determine);var u=bH(r,n,i,a);xH(r,e.labelLayoutList,u),wH(r,n,i,a,r.tickDirection)},axisName:function(r,e,t,a,n,i,o,s){var l=t.ensureRecord(a);e.nameEl&&(n.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var u=r.axisName;if(i0(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 it(0,0),y=new it(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=xe();y.transform(Ln(m,m,r.rotation));var _=a.get("nameRotate");_!=null&&(_=_*vn/180);var S,b;Qo(f)?S=Ri.innerTextLayout(r.rotation,_??r.rotation,v):(S=_H(r.rotation,f,_||0,p),b=r.raw.axisNameAvailableWidth,b!=null&&(b=Math.abs(b/Math.sin(S.rotation)),!isFinite(b)&&(b=null)));var x=h.getFont(),w=a.get("nameTruncate",!0)||{},T=w.ellipsis,C=Ce(r.raw.nameTruncateMaxWidth,w.maxWidth,b),M=s.nameMarginLevel||0,D=new Mt({x:g.x,y:g.y,rotation:S.rotation,silent:Ri.isLabelSilent(a),style:Gt(h,{text:u,font:x,overflow:"truncate",width:C,ellipsis:T,fill:h.getTextColor()||a.get(["axisLine","lineStyle","color"]),align:h.get("align")||S.textAlign,verticalAlign:h.get("verticalAlign")||S.textVerticalAlign}),z2:1});if(Ha({el:D,componentModel:a,itemName:u}),D.__fullText=u,D.anid="name",a.get("triggerEvent")){var I=Ri.makeAxisEventDataBase(a);I.targetType="axisName",I.name=u,ut(D).eventData=I}i.add(D),D.updateTransform(),e.nameEl=D;var L=l.nameLayout=da({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:Qo(f)?pH[M]:dH[M]});if(l.nameLocation=f,n.add(D),D.decomposeTransform(),r.shouldNameMoveOverlap&&L){var P=t.ensureRecord(a);t.resolveAxisNameOverlap(r,t,a,L,y,P)}}}};function Vx(r,e,t,a,n,i,o,s){a2(e)||TH(r,e,n,s,a,o);var l=e.labelLayoutList;CH(r,a,l,i),DH(a,r.rotation,l);var u=r.optionHideOverlap;SH(a,l,u),u&&hI(kt(l,function(f){return f&&!f.label.ignore})),gH(r,t,a,l)}function _H(r,e,t,a){var n=RA(t-r),i,o,s=a[0]>a[1],l=e==="start"&&!s||e!=="start"&&s;return Pl(n-vn/2)?(o=l?"bottom":"top",i="center"):Pl(n-vn*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",nvn/2?i=l?"left":"right":i=l?"right":"left"),{rotation:n,textAlign:i,textVerticalAlign:o}}function SH(r,e,t){if(qL(r.axis))return;function a(s,l,u){var f=da(e[l]),v=da(e[u]);if(!(!f||!v)){if(s===!1||f.suggestIgnore){ul(f.label);return}if(v.suggestIgnore){ul(v.label);return}var h=.1;if(!t){var c=[0,0,0,0];f=Gg({marginForce:c},f),v=Gg({marginForce:c},v)}zh(f,v,null,{touchThreshold:h})&&ul(s?v.label:f.label)}}var n=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]),o=e.length;a(n,0,1),a(i,o-1,o-2)}function xH(r,e,t){r.showMinorTicks||A(e,function(a){if(a&&a.label.ignore)for(var n=0;nu[0]&&isFinite(p)&&isFinite(u[0]);)c=ap(c),p=u[1]-c*o;else{var g=r.getTicks().length-1;g>o&&(c=ap(c));var y=c*o;d=Math.ceil(u[1]/c)*c,p=re(d-y),p<0&&u[0]>=0?(p=0,d=re(y)):d>0&&u[1]<=0&&(d=0,p=-re(y))}var m=(n[0].value-i[0].value)/s,_=(n[o].value-i[o].value)/s;a.setExtent.call(r,p+c*m,d+c*_),a.setInterval.call(r,c),(m||_)&&a.setNiceExtent.call(r,p+c,d-c)}var Fx=[[3,1],[0,2]],RH=function(){function r(e,t,a){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Xg,this._initCartesian(e,t,a),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var a=this._axesMap;this._updateScale(e,this.model);function n(o){var s,l=bt(o),u=l.length;if(u){for(var f=[],v=u-1;v>=0;v--){var h=+l[v],c=o[h],p=c.model,d=c.scale;Eg(d)&&p.get("alignTicks")&&p.get("interval")==null?f.push(c):(Jo(d,p),Eg(d)&&(s=c))}f.length&&(s||(s=f.pop(),Jo(s.scale,s.model)),A(f,function(g){n2(g.scale,g.model,s.scale)}))}}n(a.x),n(a.y);var i={};A(a.x,function(o){Hx(a,"y",o,i)}),A(a.y,function(o){Hx(a,"x",o,i)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,a){var n=ce(e,t),i=this._rect=Ut(e.getBoxLayoutParams(),n.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if(Kg(o,i),!a){var u=OH(i,s,o,l,t),f=void 0;if(l)jg?(jg(this._axesList,i),Kg(o,i)):f=Ux(i.clone(),"axisLabel",null,i,o,u,n);else{var v=BH(e,i,n),h=v.outerBoundsRect,c=v.parsedOuterBoundsContain,p=v.outerBoundsClamp;h&&(f=Ux(h,c,p,i,o,u,n))}i2(i,o,Nr.determine,null,f,n)}A(this._coordsList,function(d){d.calcAffineTransform()})},r.prototype.getAxis=function(e,t){var a=this._axesMap[e];if(a!=null)return a[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var a="x"+e+"y"+t;return this._coordsMap[a]}st(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var n=0,i=this._coordsList;n0})==null;return Vi(a,s,!0,!0,t),Kg(n,a),l;function u(h){A(n[ct[h]],function(c){if(Yl(c.model)){var p=i.ensureRecord(c.model),d=p.labelInfoList;if(d)for(var g=0;g0&&!Pe(c)&&c>1e-4&&(h/=c),h}}function OH(r,e,t,a,n){var i=new JI(NH);return A(t,function(o){return A(o,function(s){if(Yl(s.model)){var l=!a;s.axisBuilder=IH(r,e,s.model,n,i,l)}})}),i}function i2(r,e,t,a,n,i){var o=t===Nr.determine;A(e,function(u){return A(u,function(f){Yl(f.model)&&(PH(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[ne[u]]<=i.refContainer[ne[u]]*.5?0:1-u===1?2:1}A(e,function(u,f){return A(u,function(v){Yl(v.model)&&((a==="all"||o)&&v.axisBuilder.build({axisName:!0},{nameMarginLevel:s[f]}),o&&v.axisBuilder.build({axisLine:!0}))})})}function BH(r,e,t){var a,n=r.get("outerBoundsMode",!0);n==="same"?a=e.clone():(n==null||n==="auto")&&(a=Ut(r.get("outerBounds",!0)||UI,t.refContainer));var i=r.get("outerBoundsContain",!0),o;i==null||i==="auto"||gt(["all","axisLabel"],i)<0?o="all":o=i;var s=[cv(Q(r.get("outerBoundsClampWidth",!0),Gv[0]),e.width),cv(Q(r.get("outerBoundsClampHeight",!0),Gv[1]),e.height)];return{outerBoundsRect:a,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var NH=function(r,e,t,a,n,i){var o=t.axis.dim==="x"?"y":"x";QI(r,e,t,a,n,i),Qo(r.nameLocation)||A(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&e2(s.labelInfoList,s.dirVec,a,n)})};const VH=RH;function zH(r,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return GH(t,r,e),t.seriesInvolved&&HH(t,r),t}function GH(r,e,t){var a=e.getComponent("tooltip"),n=e.getComponent("axisPointer"),i=n.get("link",!0)||[],o=[];A(t.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=ql(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var f=s.model,v=f.getModel("tooltip",a);if(A(s.getAxes(),dt(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,dt(d,c?"cross":!0,h)),c&&A(p.otherAxes,dt(d,"cross",!1))}function d(g,y,m){var _=m.model.getModel("axisPointer",n),S=_.get("show");if(!(!S||S==="auto"&&!g&&!Jg(_))){y==null&&(y=_.get("triggerTooltip")),_=g?FH(m,v,n,e,g,y):_;var b=_.get("snap"),x=_.get("triggerEmphasis"),w=ql(m.model),T=y||b||m.type==="category",C=r.axesInfo[w]={key:w,axis:m,coordSys:s,axisPointerModel:_,triggerTooltip:y,triggerEmphasis:x,involveSeries:T,snap:b,useHandle:Jg(_),seriesModels:[],linkGroup:null};u[w]=C,r.seriesInvolved=r.seriesInvolved||T;var M=WH(i,m);if(M!=null){var D=o[M]||(o[M]={axesInfo:{}});D.axesInfo[w]=C,D.mapper=i[M].mapper,C.linkGroup=D}}}})}function FH(r,e,t,a,n,i){var o=e.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&&ot(u,v.textStyle)}}return r.model.getModel("axisPointer",new Lt(l,t,a))}function HH(r,e){e.eachSeries(function(t){var a=t.coordinateSystem,n=t.get(["tooltip","trigger"],!0),i=t.get(["tooltip","show"],!0);!a||!a.model||n==="none"||n===!1||n==="item"||i===!1||t.get(["axisPointer","show"],!0)===!1||A(r.coordSysAxesInfo[ql(a.model)],function(o){var s=o.axis;a.getAxis(s.dim)===s&&(o.seriesModels.push(t),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=t.getData().count())})})}function WH(r,e){for(var t=e.model,a=e.dim,n=0;n=0||r===e}function $H(r){var e=o0(r);if(e){var t=e.axisPointerModel,a=e.axis.scale,n=t.option,i=t.get("status"),o=t.get("value");o!=null&&(o=a.parse(o));var s=Jg(t);i==null&&(n.status=s?"show":"hide");var l=a.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0;return o&&s}var JH=St();function Xx(r,e,t,a){if(r instanceof XI){var n=r.scale.type;if(n!=="category"&&n!=="ordinal")return t}var i=r.model,o=i.get("jitter"),s=i.get("jitterOverlap"),l=i.get("jitterMargin")||0,u=r.scale.type==="ordinal"?r.getBandWidth():null;return o>0?s?v2(t,o,u,a):QH(r,e,t,a,o,l):t}function v2(r,e,t,a){if(t===null)return r+(Math.random()-.5)*e;var n=t-a*2,i=Math.min(Math.max(0,e),n);return r+(Math.random()-.5)*i}function QH(r,e,t,a,n,i){var o=JH(r);o.items||(o.items=[]);var s=o.items,l=qx(s,e,t,a,n,i,1),u=qx(s,e,t,a,n,i,-1),f=Math.abs(l-t)n/2||v&&h>v/2-a?v2(t,n,v,a):(s.push({fixedCoord:e,floatCoord:f,r:a}),f)}function qx(r,e,t,a,n,i,o){for(var s=t,l=0;ln/2)return Number.MAX_VALUE;if(o===1&&p>s||o===-1&&p0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var d=l;p.color!=null&&(d=ot({color:p.color},l));var g=yt(rt(p),{boundaryGap:t,splitNumber:a,scale:n,axisLine:i,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:v,nameTextStyle:d,triggerEvent:h},!1);if(Z(f)){var y=g.name;g.name=f.replace("{value}",y??"")}else et(f)&&(g.name=f(g.name,g));var m=new Lt(g,null,this.ecModel);return se(m,cu.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=c},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:V.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:yt({lineStyle:{color:V.color.neutral20}},Gs.axisLine),axisLabel:hf(Gs.axisLabel,!1),axisTick:hf(Gs.axisTick,!1),splitLine:hf(Gs.splitLine,!0),splitArea:hf(Gs.splitArea,!0),indicator:[]},e}(Ct);const f4=u4;var v4=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=this.group;i.removeAll(),this._buildAxes(t,n),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t,a){var n=t.coordinateSystem,i=n.getIndicatorAxes(),o=$(i,function(s){var l=s.model.get("showName")?s.name:"",u=new Va(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)},e.prototype._buildSplitLineAndArea=function(t){var a=t.coordinateSystem,n=a.getIndicatorAxes();if(!n.length)return;var i=t.get("shape"),o=t.getModel("splitLine"),s=t.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=W(h)?h:[h],d=W(c)?c:[c],g=[],y=[];function m(k,R,O){var E=O%R.length;return k[E]=k[E]||[],E}if(i==="circle")for(var _=n[0].getTicksCoords(),S=a.cx,b=a.cy,x=0;x<_.length;x++){if(f){var w=m(g,p,x);g[w].push(new In({shape:{cx:S,cy:b,r:_[x].coord}}))}if(v&&x<_.length-1){var w=m(y,d,x);y[w].push(new Ch({shape:{cx:S,cy:b,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var T,C=$(n,function(k,R){var O=k.getTicksCoords();return T=T==null?O.length-1:Math.min(O.length-1,T),$(O,function(E){return a.coordToPoint(E.coord,R)})}),M=[],x=0;x<=T;x++){for(var D=[],I=0;I3?1.4:o>1?1.2:1.1,f=i>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",t,{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",t,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(t){if(!(Jx(this._zr,"globalPan")||Fs(t))){var a=t.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,t,{scale:a,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(t,a,n,i,o){t._checkPointer(i,o.originX,o.originY)&&(ka(i.event),i.__ecRoamConsumed=!0,Qx(t,a,n,i,o))},e}(Tr);function Fs(r){return r.__ecRoamConsumed}var w4=St();function Hh(r){var e=w4(r);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function Hs(r,e,t,a){for(var n=Hh(r),i=n.roam,o=i[e]=i[e]||[],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=y2(f,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var c=n;n=new at,n.add(c),c.scaleX=c.scaleY=v.scale,c.x=v.x,c.y=v.y}return!t.ignoreRootClip&&s!=null&&l!=null&&n.setClipPath(new _t({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(e,t,a,n,i,o){var s=e.nodeName.toLowerCase(),l,u=n;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!i){var f=xp[s];if(f&&q(xp,s)){l=f.call(this,e,t);var v=e.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});t.add(l)}}var c=ab[s];if(c&&q(ab,s)){var p=c.call(this,e),d=e.getAttribute("id");d&&(this._defs[d]=p)}}if(l&&l.isGroup)for(var g=e.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(e,t){var a=new kl({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});lr(t,a),je(e,a,this._defsUsePending,!1,!1),M4(a,t);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,t.add(a),a},r.internalField=function(){xp={g:function(e,t){var a=new at;return lr(t,a),je(e,a,this._defsUsePending,!1,!1),a},rect:function(e,t){var a=new _t;return lr(t,a),je(e,a,this._defsUsePending,!1,!1),a.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),a.silent=!0,a},circle:function(e,t){var a=new In;return lr(t,a),je(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),a.silent=!0,a},line:function(e,t){var a=new fe;return lr(t,a),je(e,a,this._defsUsePending,!1,!1),a.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),a.silent=!0,a},ellipse:function(e,t){var a=new fm;return lr(t,a),je(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),a.silent=!0,a},polygon:function(e,t){var a=e.getAttribute("points"),n;a&&(n=ob(a));var i=new He({shape:{points:n||[]},silent:!0});return lr(t,i),je(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var a=e.getAttribute("points"),n;a&&(n=ob(a));var i=new Ee({shape:{points:n||[]},silent:!0});return lr(t,i),je(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var a=new Me;return lr(t,a),je(e,a,this._defsUsePending,!1,!1),a.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),a.silent=!0,a},text:function(e,t){var a=e.getAttribute("x")||"0",n=e.getAttribute("y")||"0",i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(a)+parseFloat(i),this._textY=parseFloat(n)+parseFloat(o);var s=new at;return lr(t,s),je(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var a=e.getAttribute("x"),n=e.getAttribute("y");a!=null&&(this._textX=parseFloat(a)),n!=null&&(this._textY=parseFloat(n));var i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new at;return lr(t,s),je(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(e,t){var a=e.getAttribute("d")||"",n=mM(a);return lr(t,n),je(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}}(),r}(),ab={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),a=parseInt(r.getAttribute("x2")||"10",10),n=parseInt(r.getAttribute("y2")||"0",10),i=new vs(e,t,a,n);return nb(r,i),ib(r,i),i},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),a=parseInt(r.getAttribute("r")||"0",10),n=new PM(e,t,a);return nb(r,n),ib(r,n),n}};function nb(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function ib(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var a=t.getAttribute("offset"),n=void 0;a&&a.indexOf("%")>0?n=parseInt(a,10)/100:a?n=parseFloat(a):n=0;var i={};g2(t,i,i);var o=i.stopColor||t.getAttribute("stop-color")||"#000000",s=i.stopOpacity||t.getAttribute("stop-opacity");if(s){var l=Xe(o),u=l&&l[3];u&&(l[3]*=dn(s),o=sa(l,"rgba"))}e.colorStops.push({offset:n,color:o})}t=t.nextSibling}}function lr(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),ot(e.__inheritedStyle,r.__inheritedStyle))}function ob(r){for(var e=$h(r),t=[],a=0;a0;i-=2){var o=a[i],s=a[i-1],l=$h(o);switch(n=n||xe(),s){case"translate":va(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Uy(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Ln(n,n,-parseFloat(l[0])*bp,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*bp);oa(n,[1,0,u,1,0,0],n);break;case"skewY":var f=Math.tan(parseFloat(l[0])*bp);oa(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}}e.setLocalTransform(n)}}var lb=/([^\s:;]+)\s*:\s*([^:;]+)/g;function g2(r,e,t){var a=r.getAttribute("style");if(a){lb.lastIndex=0;for(var n;(n=lb.exec(a))!=null;){var i=n[1],o=q(Hv,i)?Hv[i]:null;o&&(e[o]=n[2]);var s=q(Wv,i)?Wv[i]:null;s&&(t[s]=n[2])}}}function k4(r,e,t){for(var a=0;a0,m={api:a,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:y,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(m):l.resourceType==="geoSVG"&&this._buildSVG(m),this._updateController(e,g,t,a),this._updateMapSelectHandler(e,u,a,n)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=j(),a=j(),n=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function f(c,p){return p&&(c=p(c)),c&&[c[0]*i.scaleX+i.x,c[1]*i.scaleY+i.y]}function v(c){for(var p=[],d=!u&&l&&l.project,g=0;g=0)&&(h=n);var c=o?{normal:{align:"center",verticalAlign:"middle"}}:null;ye(e,he(a),{labelFetcher:h,labelDataIndex:v,defaultText:t},c);var p=e.getTextContent();if(p&&(m2(p).ignore=p.ignore,e.textConfig&&o)){var d=e.getBoundingRect().clone();e.textConfig.layoutRect=d,e.textConfig.position=[(o[0]-d.x)/d.width*100+"%",(o[1]-d.y)/d.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function cb(r,e,t,a,n,i){r.data?r.data.setItemGraphicEl(i,e):ut(e).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:t,region:a&&a.option||{}}}function pb(r,e,t,a,n){r.data||Ha({el:e,componentModel:n,itemName:t,itemTooltipOption:a.get("tooltip")})}function db(r,e,t,a,n){e.highDownSilentOnTouch=!!n.get("selectedMode");var i=a.getModel("emphasis"),o=i.get("focus");return $t(e,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&lB(e,n,t),o}function gb(r,e,t){var a=[],n;function i(){n=[]}function o(){n.length&&(a.push(n),n=[])}var s=e({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),A(r,function(l){s.lineStart();for(var u=0;u-1&&(n.style.stroke=n.style.fill,n.style.fill=V.color.neutral00,n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.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:V.color.tertiary},itemStyle:{borderWidth:.5,borderColor:V.color.border,areaColor:V.color.background},emphasis:{label:{show:!0,color:V.color.primary},itemStyle:{areaColor:V.color.highlight}},select:{label:{show:!0,color:V.color.primary},itemStyle:{color:V.color.highlight}},nameProperty:"name"},e}(Yt);const eW=tW;function rW(r,e){var t={};return A(r,function(a){a.each(a.mapDimension("value"),function(n,i){var o="ec-"+a.getName(i);t[o]=t[o]||[],isNaN(n)||t[o].push(n)})}),r[0].map(r[0].mapDimension("value"),function(a,n){for(var i="ec-"+r[0].getName(n),o=0,s=1/0,l=-1/0,u=t[i].length,f=0;f1?(_.width=m,_.height=m/d):(_.height=m,_.width=m*d),_.y=y[1]-_.height/2,_.x=y[0]-_.width/2;else{var S=r.getBoxLayoutParams();S.aspect=d,_=Ut(S,p),_=fD(r,_,d)}this.setViewRect(_.x,_.y,_.width,_.height),this.setCenter(r.get("center")),this.setZoom(r.get("zoom"))}function sW(r,e){A(e.get("geoCoord"),function(t,a){r.addGeoCoord(a,t)})}var lW=function(){function r(){this.dimensions=S2}return r.prototype.create=function(e,t){var a=[];function n(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new Sb(l+s,l,G({nameMap:o.get("nameMap"),api:t,ecModel:e},n(o)));u.zoomLimit=o.get("scaleLimit"),a.push(u),o.coordinateSystem=u,u.model=o,u.resize=xb,u.resize(o,t)}),e.eachSeries(function(o){fu({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",qt).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var i={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),A(i,function(o,s){var l=$(o,function(f){return f.get("nameMap")}),u=new Sb(s,s,G({nameMap:Fy(l),api:t,ecModel:e},n(o[0])));u.zoomLimit=Ce.apply(null,$(o,function(f){return f.get("scaleLimit")})),a.push(u),u.resize=xb,u.resize(o[0],t),A(o,function(f){f.coordinateSystem=u,sW(u,f)})}),a},r.prototype.getFilledRegions=function(e,t,a,n){for(var i=(e||[]).slice(),o=j(),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},t.push(s)}}function yW(r,e){var t=r.isExpand?r.children:[],a=r.parentNode.children,n=r.hierNode.i?a[r.hierNode.i-1]:null;if(t.length){_W(r);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;n?(r.hierNode.prelim=n.hierNode.prelim+e(r,n),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else n&&(r.hierNode.prelim=n.hierNode.prelim+e(r,n));r.parentNode.hierNode.defaultAncestor=SW(r,n,r.parentNode.hierNode.defaultAncestor||a[0],e)}function mW(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function bb(r){return arguments.length?r:wW}function fl(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function _W(r){for(var e=r.children,t=e.length,a=0,n=0;--t>=0;){var i=e[t];i.hierNode.prelim+=a,i.hierNode.modifier+=a,n+=i.hierNode.change,a+=i.hierNode.shift+n}}function SW(r,e,t,a){if(e){for(var n=r,i=r,o=i.parentNode.children[0],s=e,l=n.hierNode.modifier,u=i.hierNode.modifier,f=o.hierNode.modifier,v=s.hierNode.modifier;s=wp(s),i=Tp(i),s&&i;){n=wp(n),o=Tp(o),n.hierNode.ancestor=r;var h=s.hierNode.prelim+v-i.hierNode.prelim-u+a(s,i);h>0&&(bW(xW(s,r,t),r,h),u+=h,l+=h),v+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=n.hierNode.modifier,f+=o.hierNode.modifier}s&&!wp(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=v-l),i&&!Tp(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-f,t=r)}return t}function wp(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function Tp(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function xW(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function bW(r,e,t){var a=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=a}function wW(r,e){return r.parentNode===e.parentNode?1:2}var TW=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),CW=function(r){B(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:V.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new TW},e.prototype.buildPath=function(t,a){var n=a.childPoints,i=n.length,o=a.parentPoint,s=n[0],l=n[i-1];if(i===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=a.orient,f=u==="TB"||u==="BT"?0:1,v=1-f,h=Y(a.forkPosition,1),c=[];c[f]=o[f],c[v]=o[v]+(l[v]-o[v])*h,t.moveTo(o[0],o[1]),t.lineTo(c[0],c[1]),t.moveTo(s[0],s[1]),c[f]=s[f],t.lineTo(c[0],c[1]),c[f]=l[f],t.lineTo(c[0],c[1]),t.lineTo(l[0],l[1]);for(var p=1;pm.x,b||(S=S-Math.PI));var w=b?"left":"right",T=s.getModel("label"),C=T.get("rotate"),M=C*(Math.PI/180),D=g.getTextContent();D&&(g.setTextConfig({position:T.get("position")||w,rotation:C==null?-S:M,origin:"center"}),D.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),L=I==="relative"?Ml(o.getAncestorsIndices(),o.getDescendantIndices()):I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():null;L&&(ut(t).focus=L),MW(n,o,f,t,p,c,d,a),t.__edge&&(t.onHoverStateChange=function(P){if(P!=="blur"){var k=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);k&&k.hoverState===iu||yv(t.__edge,P)}})}function MW(r,e,t,a,n,i,o,s){var l=e.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")e.parentNode&&e.parentNode!==t&&(d||(d=a.__edge=new Ah({shape:ey(f,v,h,n,n)})),Dt(d,{shape:ey(f,v,h,i,o)},r));else if(u==="polyline"&&f==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,y=[],m=0;mt&&(t=n.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,a=this.children,n=a.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,a=t.data.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},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 e=this.parentNode.children,t=0;t=0){var a=t.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 M2(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function p0(r,e){var t=M2(r);return gt(t,e)>=0}function Uh(r,e){for(var t=[];r;){var a=r.dataIndex;t.push({name:r.name,dataIndex:a,value:e.getRawValue(a)}),r=r.parentNode}return t.reverse(),t}var VW=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var a={name:t.name,children:t.data},n=t.leaves||{},i=new Lt(n,this,this.ecModel),o=c0.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=t.expandAndCollapse,f=u&&t.initialTreeDepth>=0?t.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},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,a,n){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return ie("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=Uh(n,this),a.collapsed=!n.isExpand,a},e.type="series.tree",e.layoutMode="box",e.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:V.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Yt);const zW=VW;function GW(r,e,t){for(var a=[r],n=[],i;i=a.pop();)if(n.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s=0;i--)t.push(n[i])}}function FW(r,e){r.eachSeriesByType("tree",function(t){HW(t,e)})}function HW(r,e){var t=ce(r,e).refContainer,a=Ut(r.getBoxLayoutParams(),t);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=bb(function(S,b){return(S.parentNode===b.parentNode?1:2)/S.depth})):(i=a.width,o=a.height,s=bb());var l=r.getData().tree.root,u=l.children[0];if(u){gW(l),GW(u,yW,s),l.hierNode.modifier=-u.hierNode.prelim,Us(u,mW);var f=u,v=u,h=u;Us(u,function(S){var b=S.getLayout().x;bv.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),Us(u,function(S){y=(S.getLayout().x+p)*d,m=(S.depth-1)*g;var b=fl(y,m);S.setLayout({x:b.x,y:b.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),Us(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),Us(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 WW(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),a=t.tree;a.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(n.dataIndex,"style");G(s,o)})})}function $W(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var n=e.dataIndex,i=a.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=n.coordinateSystem,o=Wh(i,e,n.get("scaleLimit"));n.setCenter(o.center),n.setZoom(o.zoom)})})}function UW(r){r.registerChartView(DW),r.registerSeriesModel(zW),r.registerLayout(FW),r.registerVisual(WW),$W(r)}var Mb=["treemapZoomToNode","treemapRender","treemapMove"];function YW(r){for(var e=0;e1;)i=i.parentNode;var o=Sg(r.ecModel,i.name||i.dataIndex+"",a);n.setVisual("decal",o)})}var ZW=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,a){var n={name:t.name,children:t.data};L2(n);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new Lt({itemStyle:o},this,a);i=t.levels=XW(i,a);var l=$(i||[],function(v){return new Lt(v,s,a)},this),u=c0.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},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,a,n){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return ie("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=Uh(n,this),a.treePathInfo=a.treeAncestors,a},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},G(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var a=this._idIndexMap;a||(a=this._idIndexMap=j(),this._idIndexMapCount=0);var n=a.get(t);return n==null&&a.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){D2(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,coordinateSystemUsage:"box",left:V.size.l,top:V.size.xxxl,right:V.size.l,bottom:V.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:V.size.m,emptyItemWidth:25,itemStyle:{color:V.color.backgroundShade,textStyle:{color:V.color.secondary}},emphasis:{itemStyle:{color:V.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:V.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:V.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:[]},e}(Yt);function L2(r){var e=0;A(r.children,function(a){L2(a);var n=a.value;W(n)&&(n=n[0]),e+=n});var t=r.value;W(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),W(r.value)?r.value[0]=t:r.value=t}function XW(r,e){var t=Vt(e.get("color")),a=Vt(e.get(["aria","decal","decals"]));if(t){r=r||[];var n,i;A(r,function(s){var l=new Lt(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=t.slice()),!i&&a&&(o.decal=a.slice()),r}}const qW=ZW;var KW=8,Db=8,Cp=5,jW=function(){function r(e){this.group=new at,e.add(this.group)}return r.prototype.render=function(e,t,a,n){var i=e.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=ce(e,t).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=Ut(h,v);this._prepare(a,c,u),this._renderContent(e,c,p,s,l,u,f,n),Rh(o,h,v)}},r.prototype._prepare=function(e,t,a){for(var n=e;n;n=n.parentNode){var i=ue(n.getModel().get("name"),""),o=a.getTextRect(i),s=Math.max(o.width+KW*2,t.emptyItemWidth);t.totalWidth+=s+Db,t.renderList.push({node:n,text:i,width:s})}},r.prototype._renderContent=function(e,t,a,n,i,o,s,l){for(var u=0,f=t.emptyItemWidth,v=e.get(["breadcrumb","height"]),h=t.totalWidth,c=t.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 He({shape:{points:JW(u,0,m,v,d===c.length-1,d===0)},style:ot(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Mt({style:Gt(o,{text:_})}),textConfig:{position:"inside"},z2:fs*1e4,onclick:dt(l,y)});S.disableLabelAnimation=!0,S.getTextContent().ensureState("emphasis").style=Gt(s,{text:_}),S.ensureState("emphasis").style=p,$t(S,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(S),QW(S,e,y),u+=m+Db}},r.prototype.remove=function(){this.group.removeAll()},r}();function JW(r,e,t,a,n,i){var o=[[n?r:r-Cp,e],[r+t,e],[r+t,e+a],[n?r:r-Cp,e+a]];return!i&&o.splice(2,0,[r+t+Cp,e+a/2]),!n&&o.push([r,e+a/2]),o}function QW(r,e,t){ut(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&Uh(t,e)}}const t$=jW;var e$=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,a,n,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:a,delay:n,easing:i}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,a=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},n=0,i=this._storage.length;nIb||Math.abs(t.dy)>Ib)){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+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var a=t.originX,n=t.originY,i=t.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new lt(s.x,s.y,s.width,s.height),u=null,f=this._controllerHost;u=f.zoomLimit;var v=f.zoom=f.zoom||1;if(v*=i,u){var h=u.min||0,c=u.max||1/0;v=Math.max(Math.min(c,v),h)}var p=v/f.zoom;f.zoom=v;var d=this.seriesModel.layoutInfo;a-=d.x,n-=d.y;var g=xe();va(g,g,[-a,-n]),Uy(g,g,[p,p]),va(g,g,[a,n]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var a=this;t.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&&xv(u,f)}}}}},this)},e.prototype._renderBreadcrumb=function(t,a,n){var i=this;n||(n=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),n||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new t$(this.group))).render(t,a,n.node,function(o){i._state!=="animating"&&(p0(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Ys(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,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(t,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},e.type="treemap",e}(Ft);function Ys(){return{nodeGroup:[],background:[],content:[]}}function s$(r,e,t,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,b=_&&_.length,x=h.getModel("itemStyle"),w=h.getModel(["emphasis","itemStyle"]),T=h.getModel(["blur","itemStyle"]),C=h.getModel(["select","itemStyle"]),M=x.get("borderRadius")||0,D=ft("nodeGroup",ry);if(!D)return;if(l.add(D),D.x=f.x||0,D.y=f.y||0,D.markRedraw(),$v(D).nodeWidth=c,$v(D).nodeHeight=p,f.isAboveViewRoot)return D;var I=ft("background",Lb,u,n$);I&&z(D,I,b&&f.upperLabelHeight);var L=h.getModel("emphasis"),P=L.get("focus"),k=L.get("blurScope"),R=L.get("disabled"),O=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(b)Ol(D)&&mi(D,!1),I&&(mi(I,!R),v.setItemGraphicEl(o.dataIndex,I),lg(I,O,k));else{var E=ft("content",Lb,u,i$);E&&F(D,E),I.disableMorphing=!0,I&&Ol(I)&&mi(I,!1),mi(D,!R),v.setItemGraphicEl(o.dataIndex,D);var N=h.getShallow("cursor");N&&E.attr("cursor",N),lg(D,O,k)}return D;function z(vt,tt,pt){var J=ut(tt);if(J.dataIndex=o.dataIndex,J.seriesIndex=r.seriesIndex,tt.setShape({x:0,y:0,width:c,height:p,r:M}),g)H(tt);else{tt.invisible=!1;var ht=o.getVisual("style"),Bt=ht.stroke,Tt=kb(x);Tt.fill=Bt;var Et=li(w);Et.fill=w.get("borderColor");var Nt=li(T);Nt.fill=T.get("borderColor");var pe=li(C);if(pe.fill=C.get("borderColor"),pt){var Ke=c-2*d;U(tt,Bt,ht.opacity,{x:d,y:0,width:Ke,height:S})}else tt.removeTextContent();tt.setStyle(Tt),tt.ensureState("emphasis").style=Et,tt.ensureState("blur").style=Nt,tt.ensureState("select").style=pe,Ni(tt)}vt.add(tt)}function F(vt,tt){var pt=ut(tt);pt.dataIndex=o.dataIndex,pt.seriesIndex=r.seriesIndex;var J=Math.max(c-2*d,0),ht=Math.max(p-2*d,0);if(tt.culling=!0,tt.setShape({x:d,y:d,width:J,height:ht,r:M}),g)H(tt);else{tt.invisible=!1;var Bt=o.getVisual("style"),Tt=Bt.fill,Et=kb(x);Et.fill=Tt,Et.decal=Bt.decal;var Nt=li(w),pe=li(T),Ke=li(C);U(tt,Tt,Bt.opacity,null),tt.setStyle(Et),tt.ensureState("emphasis").style=Nt,tt.ensureState("blur").style=pe,tt.ensureState("select").style=Ke,Ni(tt)}vt.add(tt)}function H(vt){!vt.invisible&&i.push(vt)}function U(vt,tt,pt,J){var ht=h.getModel(J?Rb:Pb),Bt=ue(h.get("name"),null),Tt=ht.getShallow("show");ye(vt,he(h,J?Rb:Pb),{defaultText:Tt?Bt:null,inheritColor:tt,defaultOpacity:pt,labelFetcher:r,labelDataIndex:o.dataIndex});var Et=vt.getTextContent();if(Et){var Nt=Et.style,pe=vh(Nt.padding||0);J&&(vt.setTextConfig({layoutRect:J}),Et.disableLabelLayout=!0),Et.beforeUpdate=function(){var We=Math.max((J?J.width:vt.shape.width)-pe[1]-pe[3],0),kn=Math.max((J?J.height:vt.shape.height)-pe[0]-pe[2],0);(Nt.width!==We||Nt.height!==kn)&&Et.setStyle({width:We,height:kn})},Nt.truncateMinChar=2,Nt.lineOverflow="truncate",K(Nt,J,f);var Ke=Et.getState("emphasis");K(Ke?Ke.style:null,J,f)}}function K(vt,tt,pt){var J=vt?vt.text:null;if(!tt&&pt.isLeafRoot&&J!=null){var ht=r.get("drillDownIcon",!0);vt.text=ht?ht+" "+J:J}}function ft(vt,tt,pt,J){var ht=m!=null&&t[vt][m],Bt=n[vt];return ht?(t[vt][m]=null,At(Bt,ht)):g||(ht=new tt,ht instanceof br&&(ht.z2=l$(pt,J)),Ot(Bt,ht)),e[vt][y]=ht}function At(vt,tt){var pt=vt[y]={};tt instanceof ry?(pt.oldX=tt.x,pt.oldY=tt.y):pt.oldShape=G({},tt.shape)}function Ot(vt,tt){var pt=vt[y]={},J=o.parentNode,ht=tt instanceof at;if(J&&(!a||a.direction==="drillDown")){var Bt=0,Tt=0,Et=n.background[J.getRawIndex()];!a&&Et&&Et.oldShape&&(Bt=Et.oldShape.width,Tt=Et.oldShape.height),ht?(pt.oldX=0,pt.oldY=Tt):pt.oldShape={x:Bt,y:Tt,width:0,height:0}}pt.fadein=!ht}}function l$(r,e){return r*a$+e}const u$=o$;var jl=A,f$=st,Uv=-1,d0=function(){function r(e){var t=e.mappingMethod,a=e.type,n=this.option=rt(e);this.type=a,this.mappingMethod=t,this._normalizeData=c$[t];var i=r.visualHandlers[a];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[t],t==="piecewise"?(Ap(n),v$(n)):t==="category"?n.categories?h$(n):Ap(n,!0):(ke(t!=="linear"||n.dataExtent),Ap(n))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return X(this._normalizeData,this)},r.listVisualTypes=function(){return bt(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,a){st(e)?A(e,t,a):t.call(a,e)},r.mapVisual=function(e,t,a){var n,i=W(e)?[]:st(e)?{}:(n=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(a,o,s);n?i=l:i[s]=l}),i},r.retrieveVisuals=function(e){var t={},a;return e&&jl(r.visualHandlers,function(n,i){e.hasOwnProperty(i)&&(t[i]=e[i],a=!0)}),a?t:null},r.prepareVisualTypes=function(e){if(W(e))e=e.slice();else if(f$(e)){var t=[];jl(e,function(a,n){t.push(n)}),e=t}else return[];return e.sort(function(a,n){return n==="color"&&a!=="color"&&a.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,a){for(var n,i=1/0,o=0,s=t.length;o=0;i--)a[i]==null&&(delete t[e[i]],e.pop())}function Ap(r,e){var t=r.visual,a=[];st(t)?jl(t,function(i){a.push(i)}):t!=null&&a.push(t);var n={color:1,symbol:1};!e&&a.length===1&&!n.hasOwnProperty(r.type)&&(a[1]=a[0]),I2(r,a)}function pf(r){return{applyVisual:function(e,t,a){var n=this.mapValueToVisual(e);a("color",r(t("color"),n))},_normalizedToVisual:ay([0,1])}}function Eb(r){var e=this.option.visual;return e[Math.round(Rt(r,[0,1],[0,e.length-1],!0))]||{}}function Zs(r){return function(e,t,a){a(r,this.mapValueToVisual(e))}}function vl(r){var e=this.option.visual;return e[this.option.loop&&r!==Uv?r%e.length:r]}function ui(){return this.option.visual[0]}function ay(r){return{linear:function(e){return Rt(e,r,this.option.visual,!0)},category:vl,piecewise:function(e,t){var a=ny.call(this,t);return a==null&&(a=Rt(e,r,this.option.visual,!0)),a},fixed:ui}}function ny(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var a=d0.findPieceIndex(r,t),n=t[a];if(n&&n.visual)return n.visual[this.type]}}function I2(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=$(e,function(t){var a=Xe(t);return a||[0,0,0,1]})),e}var c$={linear:function(r){return Rt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=d0.findPieceIndex(r,e,!0);if(t!=null)return Rt(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??Uv},fixed:Qt};function df(r,e,t){return r?e<=t:e=t.length||d===t[d.depth]){var y=_$(n,l,d,g,p,a);R2(d,y,t,a)}})}}}function g$(r,e,t){var a=G({},e),n=t.designatedVisualItemStyle;return A(["color","colorAlpha","colorSaturation"],function(i){n[i]=e[i];var o=r.get(i);n[i]=null,o!=null&&(a[i]=o)}),a}function Ob(r){var e=Mp(r,"color");if(e){var t=Mp(r,"colorAlpha"),a=Mp(r,"colorSaturation");return a&&(e=gn(e,null,null,a)),t&&(e=sv(e,t)),e}}function y$(r,e){return e!=null?gn(e,null,null,r):null}function Mp(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function m$(r,e,t,a,n,i){if(!(!i||!i.length)){var o=Dp(e,"color")||n.color!=null&&n.color!=="none"&&(Dp(e,"colorAlpha")||Dp(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var f=e.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 Ae(v);return P2(h).drColorMappingBy=f,h}}}function Dp(r,e){var t=r.get(e);return W(t)&&t.length?{name:e,range:t}:null}function _$(r,e,t,a,n,i){var o=G({},e);if(n){var s=n.type,l=s==="color"&&P2(n).drColorMappingBy,u=l==="index"?a:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var Jl=Math.max,Yv=Math.min,Bb=Ce,g0=A,k2=["itemStyle","borderWidth"],S$=["itemStyle","gapWidth"],x$=["upperLabel","show"],b$=["upperLabel","height"];const w$={seriesType:"treemap",reset:function(r,e,t,a){var n=r.option,i=ce(r,t).refContainer,o=Ut(r.getBoxLayoutParams(),i),s=n.size||[],l=Y(Bb(o.width,s[0]),i.width),u=Y(Bb(o.height,s[1]),i.height),f=a&&a.type,v=["treemapZoomToNode","treemapRootToNode"],h=Kl(a,v,r),c=f==="treemapRender"||f==="treemapMove"?a.rootRect:null,p=r.getViewRoot(),d=M2(p);if(f!=="treemapMove"){var g=f==="treemapZoomToNode"?L$(r,h,p,l,u):c?[c.width,c.height]:[l,u],y=n.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var m={squareRatio:n.squareRatio,sort:y,leafDepth:n.leafDepth};p.hostTree.clearLayouts();var _={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};p.setLayout(_),E2(p,m,!1,0),_=p.getLayout(),g0(d,function(b,x){var w=(d[x+1]||p).getValue();b.setLayout(G({dataExtent:[w,w],borderWidth:0,upperHeight:0},_))})}var S=r.getData().tree.root;S.setLayout(I$(o,c,h),!0),r.setLayoutInfo(o),O2(S,new lt(-o.x,-o.y,t.getWidth(),t.getHeight()),d,p,0)}};function E2(r,e,t,a){var n,i;if(!r.isRemoved()){var o=r.getLayout();n=o.width,i=o.height;var s=r.getModel(),l=s.get(k2),u=s.get(S$)/2,f=B2(s),v=Math.max(l,f),h=l-u,c=v-u;r.setLayout({borderWidth:l,upperHeight:v,upperLabelHeight:f},!0),n=Jl(n-2*h,0),i=Jl(i-h-c,0);var p=n*i,d=T$(r,s,p,e,t,a);if(d.length){var g={x:h,y:c,width:n,height:i},y=Yv(n,i),m=1/0,_=[];_.area=0;for(var S=0,b=d.length;S=0;l--){var u=n[a==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function D$(r,e,t){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=e*e*t;return l?Jl(u*a/l,l/(u*n)):1/0}function Nb(r,e,t,a,n){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],f=e?r.area/e:0;(n||f>t[l[o]])&&(f=t[l[o]]);for(var v=0,h=r.length;vz_&&(u=z_),i=s}ua&&(a=e);var i=a%2?a+2:a+3;n=[];for(var o=0;o0&&(b[0]=-b[0],b[1]=-b[1]);var w=S[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var T=-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]+C,p=S[0]<0?"right":"left",i.originX=-y*w,i.originY=-C;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+C,p="center",i.originY=-C;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*w+v[0],i.y=v[1]+C,p=S[0]>=0?"right":"left",i.originX=y*w,i.originY=-C;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||p})}},e}(at);const S0=X$;var q$=function(){function r(e){this.group=new at,this._LineCtor=e||S0}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var a=this,n=a.group,i=a._lineData;a._lineData=e,i||n.removeAll();var o=Wb(e);e.diff(i).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(i,e,l,s,o)}).remove(function(s){n.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,a){t.updateLayout(e,a)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Wb(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function a(s){!s.isGroup&&!K$(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n0}function Wb(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:he(e)}}function $b(r){return isNaN(r[0])||isNaN(r[1])}function kp(r){return r&&!$b(r[0])&&!$b(r[1])}const x0=q$;var Ep=[],Op=[],Bp=[],xo=Se,Np=Ti,Ub=Math.abs;function Yb(r,e,t){for(var a=r[0],n=r[1],i=r[2],o=1/0,s,l=t*t,u=.1,f=.1;f<=.9;f+=.1){Ep[0]=xo(a[0],n[0],i[0],f),Ep[1]=xo(a[1],n[1],i[1],f);var v=Ub(Np(Ep,e)-l);v=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function Vp(r,e){var t=[],a=Dl,n=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),f=s.getVisual("fromSymbol"),v=s.getVisual("toSymbol");u.__original||(u.__original=[Ma(u[0]),Ma(u[1])],u[2]&&u.__original.push(Ma(u[2])));var h=u.__original;if(u[2]!=null){if(Be(n[0],h[0]),Be(n[1],h[2]),Be(n[2],h[1]),f&&f!=="none"){var c=cl(s.node1),p=Yb(n,h[0],c*e);a(n[0][0],n[1][0],n[2][0],p,t),n[0][0]=t[3],n[1][0]=t[4],a(n[0][1],n[1][1],n[2][1],p,t),n[0][1]=t[3],n[1][1]=t[4]}if(v&&v!=="none"){var c=cl(s.node2),p=Yb(n,h[1],c*e);a(n[0][0],n[1][0],n[2][0],p,t),n[1][0]=t[1],n[2][0]=t[2],a(n[0][1],n[1][1],n[2][1],p,t),n[1][1]=t[1],n[2][1]=t[2]}Be(u[0],n[0]),Be(u[1],n[2]),Be(u[2],n[1])}else{if(Be(i[0],h[0]),Be(i[1],h[1]),gi(o,i[1],i[0]),ss(o,o),f&&f!=="none"){var c=cl(s.node1);Dd(i[0],i[0],o,c*e)}if(v&&v!=="none"){var c=cl(s.node2);Dd(i[1],i[1],o,-c*e)}Be(u[0],i[0]),Be(u[1],i[1])}})}var W2=St();function j$(r){if(r)return W2(r).bridge}function Zb(r,e){r&&(W2(r).bridge=e)}function Xb(r){return r.type==="view"}var J$=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){var n=new du,i=new x0,o=this.group,s=new at;this._controller=new to(a.getZr()),this._controllerHost={target:s},s.add(n.group),s.add(i.group),o.add(s),this._symbolDraw=n,this._lineDraw=i,this._mainGroup=s,this._firstRender=!0},e.prototype.render=function(t,a,n){var i=this,o=t.coordinateSystem,s=!1;this._model=t,this._api=n,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(n);var u=this._symbolDraw,f=this._lineDraw;if(Xb(o)){var v={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(v):Dt(this._mainGroup,v,t)}Vp(t.getGraph(),hl(t));var h=t.getData();u.updateData(h);var c=t.getEdgeData();f.updateData(c),this._updateNodeAndLinkScale(),this._updateController(null,t,n),clearTimeout(this._layoutTimeout);var p=t.forceLayout,d=t.get(["force","layoutAnimation"]);p&&(s=!0,this._startForceLayoutIteration(p,n,d));var g=t.get("layout");h.graph.eachNode(function(S){var b=S.dataIndex,x=S.getGraphicEl(),w=S.getModel();if(x){x.off("drag").off("dragend");var T=w.get("draggable");T&&x.on("drag",function(M){switch(g){case"force":p.warmUp(),!i._layouting&&i._startForceLayoutIteration(p,n,d),p.setFixed(b),h.setItemLayout(b,[x.x,x.y]);break;case"circular":h.setItemLayout(b,[x.x,x.y]),S.setLayout({fixed:!0},!0),_0(t,"symbolSize",S,[M.offsetX,M.offsetY]),i.updateLayout(t);break;case"none":default:h.setItemLayout(b,[x.x,x.y]),m0(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){p&&p.setUnfixed(b)}),x.setDraggable(T,!!w.get("cursor"));var C=w.get(["emphasis","focus"]);C==="adjacency"&&(ut(x).focus=S.getAdjacentDataIndices())}}),h.graph.eachEdge(function(S){var b=S.getGraphicEl(),x=S.getModel().get(["emphasis","focus"]);b&&x==="adjacency"&&(ut(b).focus={edge:[S.dataIndex],node:[S.node1.dataIndex,S.node2.dataIndex]})});var y=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),m=h.getLayout("cx"),_=h.getLayout("cy");h.graph.eachNode(function(S){G2(S,y,m,_)}),this._firstRender=!1,s||this._renderThumbnail(t,n,this._symbolDraw,this._lineDraw)},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,a,n){var i=this,o=!1;(function s(){t.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())})})()},e.prototype._updateController=function(t,a,n){var i=this._controller,o=this._controllerHost,s=a.coordinateSystem;if(!Xb(s)){i.disable();return}i.enable(a.get("roam"),{api:n,zInfo:{component:a},triggerInfo:{roamTrigger:a.get("roamTrigger"),isInSelf:function(l,u,f){return s.containPoint([u,f])},isInClip:function(l,u,f){return!t||t.contain(u,f)}}}),o.zoomLimit=a.get("scaleLimit"),o.zoom=s.getZoom(),i.off("pan").off("zoom").on("pan",function(l){n.dispatchAction({seriesId:a.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){n.dispatchAction({seriesId:a.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},e.prototype.updateViewOnPan=function(t,a,n){this._active&&(l0(this._controllerHost,n.dx,n.dy),this._updateThumbnailWindow())},e.prototype.updateViewOnZoom=function(t,a,n){this._active&&(u0(this._controllerHost,n.zoom,n.originX,n.originY),this._updateNodeAndLinkScale(),Vp(t.getGraph(),hl(t)),this._lineDraw.updateLayout(),a.updateLabelLayout(),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,a=t.getData(),n=hl(t);a.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},e.prototype.updateLayout=function(t){this._active&&(Vp(t.getGraph(),hl(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},e.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()},e.prototype._getThumbnailInfo=function(){var t=this._model,a=t.coordinateSystem;if(a.type==="view"){var n=j$(t);if(n)return{bridge:n,coordSys:a}}},e.prototype._updateThumbnailWindow=function(){var t=this._getThumbnailInfo();t&&t.bridge.updateWindow(t.coordSys.transform,this._api)},e.prototype._renderThumbnail=function(t,a,n,i){var o=this._getThumbnailInfo();if(o){var s=new at,l=n.group.children(),u=i.group.children(),f=new at,v=new at;s.add(v),s.add(f);for(var h=0;h=0&&e.call(t,a[i],i)},r.prototype.eachEdge=function(e,t){for(var a=this.edges,n=a.length,i=0;i=0&&a[i].node1.dataIndex>=0&&a[i].node2.dataIndex>=0&&e.call(t,a[i],i)},r.prototype.breadthFirstTraverse=function(e,t,a,n){if(t instanceof fi||(t=this._nodesMap[bo(t)]),!!t){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&&!e.hasKey(p)&&(e.set(p,!0),o.push(c.node1))}for(l=0;l=0&&!e.hasKey(_)&&(e.set(_,!0),s.push(m.node2))}}}return{edge:e.keys(),node:t.keys()}},r}(),$2=function(){function r(e,t,a){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=a??-1}return r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,a=t.edgeData.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var e=j(),t=j();e.set(this.dataIndex,!0);for(var a=[this.node1],n=[this.node2],i=0;i=0&&!e.hasKey(v)&&(e.set(v,!0),a.push(f.node1))}for(i=0;i=0&&!e.hasKey(d)&&(e.set(d,!0),n.push(p.node2))}return{edge:e.keys(),node:t.keys()}},r}();function U2(r,e){return{getValue:function(t){var a=this[r][e];return a.getStore().get(a.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,a){this.dataIndex>=0&&this[r][e].setItemVisual(this.dataIndex,t,a)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,a){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,a)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}se(fi,U2("hostGraph","data"));se($2,U2("hostGraph","edgeData"));const eU=tU;function b0(r,e,t,a,n){for(var i=new eU(a),o=0;o "+h)),u++)}var c=t.get("coordinateSystem"),p;if(c==="cartesian2d"||c==="polar"||c==="matrix")p=Wa(r,t);else{var d=uu.get(c),g=d?d.dimensions||[]:[];gt(g,"value")<0&&g.concat(["value"]);var y=hu(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;p=new ze(y,t),p.initData(r)}var m=new ze(["value"],t);return m.initData(l,s),n&&n(p,m),C2({mainData:p,struct:i,structAttr:"graph",datas:{node:p,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var rU=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var a=this;function n(){return a._categoriesData}this.legendVisualProvider=new bs(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),Ei(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,a){var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&n){N$(this);var s=b0(i,n,this,!0,l);return A(s.edges,function(u){V$(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,f){u.wrapMethod("getItemModel",function(p){var d=o._categoriesModels,g=p.getShallow("category"),y=d[g];return y&&(y.parentModel=p.parentModel,p.parentModel=y),p});var v=Lt.prototype.getModel;function h(p,d){var g=v.call(this,p,d);return g.resolveParentPath=c,g}f.wrapMethod("getItemModel",function(p){return p.resolveParentPath=c,p.getModel=h,p});function c(p){if(p&&(p[0]==="label"||p[1]==="label")){var d=p.slice();return p[0]==="label"?d[0]="edgeLabel":p[1]==="label"&&(d[1]="edgeLabel"),d}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,a,n){if(n==="edge"){var i=this.getData(),o=this.getDataParams(t,n),s=i.graph.getEdgeByIndex(t),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),ie("nameValue",{name:f.join(" > "),value:o.value,noValue:o.value==null})}var v=YD({series:this,dataIndex:t,multipleSeries:a});return v},e.prototype._updateCategoriesData=function(){var t=$(this.option.categories||[],function(n){return n.value!=null?n:G({value:0},n)}),a=new ze(["value"],this);a.initData(t),this._categoriesData=a,this._categoriesModels=a.mapArray(function(n){return a.getItemModel(n)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.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:V.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:V.color.primary}}},e}(Yt);const aU=rU;function nU(r){r.registerChartView(Q$),r.registerSeriesModel(aU),r.registerProcessor(R$),r.registerVisual(k$),r.registerVisual(E$),r.registerLayout(z$),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,F$),r.registerLayout(W$),r.registerCoordinateSystem("graphView",{dimensions:eo.dimensions,create:U$}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Qt),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Qt),r.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",query:e},function(n){var i=a.getViewOfSeriesModel(n);i&&(e.dx!=null&&e.dy!=null&&i.updateViewOnPan(n,a,e),e.zoom!=null&&e.originX!=null&&e.originY!=null&&i.updateViewOnZoom(n,a,e));var o=n.coordinateSystem,s=Wh(o,e,n.get("scaleLimit"));n.setCenter&&n.setCenter(s.center),n.setZoom&&n.setZoom(s.zoom)})})}var iU=function(r){B(e,r);function e(t,a,n){var i=r.call(this)||this;ut(i).dataType="node",i.z2=2;var o=new Mt;return i.setTextContent(o),i.updateData(t,a,n,!0),i}return e.prototype.updateData=function(t,a,n,i){var o=this,s=t.graph.getNodeByIndex(a),l=t.hostModel,u=s.getModel(),f=u.getModel("emphasis"),v=t.getItemLayout(a),h=G(ia(u.getModel("itemStyle"),v,!0),v),c=this;if(isNaN(h.startAngle)){c.setShape(h);return}i?c.setShape(h):Dt(c,{shape:h},l,a);var p=G(ia(u.getModel("itemStyle"),v,!0),v);o.setShape(p),o.useStyle(t.getItemVisual(a,"style")),ve(o,u),this._updateLabel(l,u,s),t.setItemGraphicEl(a,c),ve(c,u,"itemStyle");var d=f.get("focus");$t(this,d==="adjacency"?s.getAdjacentDataIndices():d,f.get("blurScope"),f.get("disabled"))},e.prototype._updateLabel=function(t,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=he(a),h=n.getVisual("style");ye(i,v,{labelFetcher:{getFormattedLabel:function(m,_,S,b,x,w){return t.getFormattedLabel(m,_,"node",b,ar(x,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}})},e}(Fe);const qb=iU;var oU=function(r){B(e,r);function e(t,a,n,i){var o=r.call(this)||this;return ut(o).dataType="edge",o.updateData(t,a,n,i,!0),o}return e.prototype.buildPath=function(t,a){t.moveTo(a.s1[0],a.s1[1]);var n=.7,i=a.clockwise;t.arc(a.cx,a.cy,a.r,a.sStartAngle,a.sEndAngle,!i),t.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]),t.arc(a.cx,a.cy,a.r,a.tStartAngle,a.tEndAngle,!i),t.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]),t.closePath()},e.prototype.updateData=function(t,a,n,i,o){var s=t.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(ia(f.getModel("itemStyle"),u,!0),u),g=this;if(isNaN(d.sStartAngle)||isNaN(d.tStartAngle)){g.setShape(d);return}o?(g.setShape(d),Kb(g,l,t,h)):(wr(g),Kb(g,l,t,h),Dt(g,{shape:d},s,n)),$t(this,p==="adjacency"?l.getAdjacentDataIndices():p,c.get("blurScope"),c.get("disabled")),ve(g,v,"lineStyle"),a.setItemGraphicEl(l.dataIndex,g)},e}(xt);function Kb(r,e,t,a){var n=e.node1,i=e.node2,o=r.style;r.setStyle(a.getLineStyle());var s=a.get("color");switch(s){case"source":o.fill=t.getItemVisual(n.dataIndex,"style").fill,o.decal=n.getVisual("style").decal;break;case"target":o.fill=t.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"gradient":var l=t.getItemVisual(n.dataIndex,"style").fill,u=t.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 vs(v,h,c,p,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var sU=Math.PI/180,lU=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){},e.prototype.render=function(t,a,n){var i=t.getData(),o=this._data,s=this.group,l=-t.get("startAngle")*sU;if(i.diff(o).add(function(f){var v=i.getItemLayout(f);if(v){var h=new qb(i,f,l);ut(h).dataIndex=f,s.add(h)}}).update(function(f,v){var h=o.getItemGraphicEl(v),c=i.getItemLayout(f);if(!c){h&&Da(h,t,v);return}h?h.updateData(i,f,l):h=new qb(i,f,l),s.add(h)}).remove(function(f){var v=o.getItemGraphicEl(f);v&&Da(v,t,f)}).execute(),!o){var u=t.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=Y(u[0],n.getWidth()),this.group.originY=Y(u[1],n.getHeight()),Wt(this.group,{scaleX:1,scaleY:1},t)}this._data=i,this.renderEdges(t,l)},e.prototype.renderEdges=function(t,a){var n=t.getData(),i=t.getEdgeData(),o=this._edgeData,s=this.group;i.diff(o).add(function(l){var u=new oU(n,i,l,a);ut(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&&Da(u,t,l)}).execute(),this._edgeData=i},e.prototype.dispose=function(){},e.type="chord",e}(Ft);const uU=lU;var fU=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this.legendVisualProvider=new bs(X(this.getData,this),X(this.getRawData,this))},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links)},e.prototype.getInitialData=function(t,a){var n=t.edges||t.links||[],i=t.data||t.nodes||[];if(i&&n){var o=b0(i,n,this,!0,s);return o.data}function s(l,u){var f=Lt.prototype.getModel;function v(c,p){var d=f.call(this,c,p);return d.resolveParentPath=h,d}u.wrapMethod("getItemModel",function(c){return c.resolveParentPath=h,c.getModel=v,c});function h(c){if(c&&(c[0]==="label"||c[1]==="label")){var p=c.slice();return c[0]==="label"?p[0]="edgeLabel":c[1]==="label"&&(p[1]="edgeLabel"),p}return c}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,a,n){var i=this.getDataParams(t,n);if(n==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(t),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),ie("nameValue",{name:f.join(" > "),value:i.value,noValue:i.value==null})}return ie("nameValue",{name:i.name,value:i.value,noValue:i.value==null})},e.prototype.getDataParams=function(t,a){var n=r.prototype.getDataParams.call(this,t,a);if(a==="node"){var i=this.getData(),o=this.getGraph().getNodeByIndex(t);if(n.name==null&&(n.name=i.getName(t)),n.value==null){var s=o.getLayout().value;n.value=s}}return n},e.type="series.chord",e.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}}},e}(Yt);const vU=fU;var zp=Math.PI/180;function hU(r,e){r.eachSeriesByType("chord",function(t){cU(t,e)})}function cU(r,e){var t=r.getData(),a=t.graph,n=r.getEdgeData(),i=n.count();if(i){var o=uD(r,e),s=o.cx,l=o.cy,u=o.r,f=o.r0,v=Math.max((r.get("padAngle")||0)*zp,0),h=Math.max((r.get("minAngle")||0)*zp,0),c=-r.get("startAngle")*zp,p=c+Math.PI*2,d=r.get("clockwise"),g=d?1:-1,y=[c,p];xh(y,!d);var m=y[0],_=y[1],S=_-m,b=t.getSum("value")===0&&n.getSum("value")===0,x=[],w=0;a.eachEdge(function(E){var N=b?1:E.getValue("value");b&&(N>0||h)&&(w+=2);var z=E.node1.dataIndex,F=E.node2.dataIndex;x[z]=(x[z]||0)+N,x[F]=(x[F]||0)+N});var T=0;if(a.eachNode(function(E){var N=E.getValue("value");isNaN(N)||(x[E.dataIndex]=Math.max(N,x[E.dataIndex]||0)),!b&&(x[E.dataIndex]>0||h)&&w++,T+=x[E.dataIndex]||0}),!(w===0||T===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 C=(S-v*w*g)/T,M=0,D=0,I=0;a.eachNode(function(E){var N=x[E.dataIndex]||0,z=C*(T?N:1)*g;Math.abs(z)D){var P=M/D;a.eachNode(function(E){var N=E.getLayout().angle;Math.abs(N)>=h?E.setLayout({angle:N*P,ratio:P},!0):E.setLayout({angle:h,ratio:h===0?1:N/h},!0)})}else a.eachNode(function(E){if(!L){var N=E.getLayout().angle,z=Math.min(N/I,1),F=z*M;N-Fh&&h>0){var z=L?1:Math.min(N/I,1),F=N-h,H=Math.min(F,Math.min(k,M*z));k-=H,E.setLayout({angle:N-H,ratio:(N-H)/N},!0)}else h>0&&E.setLayout({angle:h,ratio:N===0?1:h/N},!0)}});var R=m,O=[];a.eachNode(function(E){var N=Math.max(E.getLayout().angle,h);E.setLayout({cx:s,cy:l,r0:f,r:u,startAngle:R,endAngle:R+N*g,clockwise:d},!0),O[E.dataIndex]=R,R+=(N+v)*g}),a.eachEdge(function(E){var N=b?1:E.getValue("value"),z=C*(T?N:1)*g,F=E.node1.dataIndex,H=O[F]||0,U=Math.abs((E.node1.getLayout().ratio||1)*z),K=H+U*g,ft=[s+f*Math.cos(H),l+f*Math.sin(H)],At=[s+f*Math.cos(K),l+f*Math.sin(K)],Ot=E.node2.dataIndex,vt=O[Ot]||0,tt=Math.abs((E.node2.getLayout().ratio||1)*z),pt=vt+tt*g,J=[s+f*Math.cos(vt),l+f*Math.sin(vt)],ht=[s+f*Math.cos(pt),l+f*Math.sin(pt)];E.setLayout({s1:ft,s2:At,sStartAngle:H,sEndAngle:K,t1:J,t2:ht,tStartAngle:vt,tEndAngle:pt,cx:s,cy:l,r:f,value:N,clockwise:d}),O[F]=K,O[Ot]=pt})}}}function pU(r){r.registerChartView(uU),r.registerSeriesModel(vU),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,hU),r.registerProcessor(Ss("chord"))}var dU=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),gU=function(r){B(e,r);function e(t){var a=r.call(this,t)||this;return a.type="pointer",a}return e.prototype.getDefaultShape=function(){return new dU},e.prototype.buildPath=function(t,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,t.moveTo(u,f),t.lineTo(a.x+n(l)*s,a.y+i(l)*s),t.lineTo(a.x+n(a.angle)*o,a.y+i(a.angle)*o),t.lineTo(a.x-n(l)*s,a.y-i(l)*s),t.lineTo(u,f)},e}(xt);const yU=gU;function mU(r,e){var t=r.get("center"),a=e.getWidth(),n=e.getHeight(),i=Math.min(a,n),o=Y(t[0],e.getWidth()),s=Y(t[1],e.getHeight()),l=Y(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function yf(r,e){var t=r==null?"":r+"";return e&&(Z(e)?t=e.replace("{value}",t):et(e)&&(t=e(r))),t}var _U=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=mU(t,n);this._renderMain(t,a,n,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,a,n,i,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,f=-t.get("endAngle")/180*Math.PI,v=t.getModel("axisLine"),h=v.get("roundCap"),c=h?zv:Fe,p=v.get("show"),d=v.getModel("lineStyle"),g=d.get("width"),y=[u,f];xh(y,!l),u=y[0],f=y[1];for(var m=f-u,_=u,S=[],b=0;p&&b=C&&(M===0?0:i[M-1][0])Math.PI/2&&(K+=Math.PI)):U==="tangential"?K=-T-Math.PI/2:wt(U)&&(K=U*Math.PI/180),K===0?v.add(new Mt({style:Gt(_,{text:N,x:F,y:H,verticalAlign:k<-.8?"top":k>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:z}),silent:!0})):v.add(new Mt({style:Gt(_,{text:N,x:F,y:H,verticalAlign:"middle",align:"center"},{inheritColor:z}),silent:!0,originX:F,originY:H,rotation:K}))}if(m.get("show")&&R!==S){var O=m.get("distance");O=O?O+f:f;for(var ft=0;ft<=b;ft++){P=Math.cos(T),k=Math.sin(T);var At=new fe({shape:{x1:P*(p-O)+h,y1:k*(p-O)+c,x2:P*(p-w-O)+h,y2:k*(p-w-O)+c},silent:!0,style:I});I.stroke==="auto"&&At.setStyle({stroke:i((R+ft/b)/S)}),v.add(At),T+=M}T-=M}else T+=C}},e.prototype._renderPointer=function(t,a,n,i,o,s,l,u,f){var v=this.group,h=this._data,c=this._progressEls,p=[],d=t.get(["pointer","show"]),g=t.getModel("progress"),y=g.get("show"),m=t.getData(),_=m.mapDimension("value"),S=+t.get("min"),b=+t.get("max"),x=[S,b],w=[s,l];function T(M,D){var I=m.getItemModel(M),L=I.getModel("pointer"),P=Y(L.get("width"),o.r),k=Y(L.get("length"),o.r),R=t.get(["pointer","icon"]),O=L.get("offsetCenter"),E=Y(O[0],o.r),N=Y(O[1],o.r),z=L.get("keepAspect"),F;return R?F=oe(R,E-P/2,N-k,P,k,null,z):F=new yU({shape:{angle:-Math.PI/2,width:P,r:k,x:E,y:N}}),F.rotation=-(D+Math.PI/2),F.x=o.cx,F.y=o.cy,F}function C(M,D){var I=g.get("roundCap"),L=I?zv:Fe,P=g.get("overlap"),k=P?g.get("width"):f/m.count(),R=P?o.r-k:o.r-(M+1)*k,O=P?o.r:o.r-M*k,E=new L({shape:{startAngle:s,endAngle:D,cx:o.cx,cy:o.cy,clockwise:u,r0:R,r:O}});return P&&(E.z2=Rt(m.get(_,M),[S,b],[100,0],!0)),E}(y||d)&&(m.diff(h).add(function(M){var D=m.get(_,M);if(d){var I=T(M,s);Wt(I,{rotation:-((isNaN(+D)?w[0]:Rt(D,x,w,!0))+Math.PI/2)},t),v.add(I),m.setItemGraphicEl(M,I)}if(y){var L=C(M,s),P=g.get("clip");Wt(L,{shape:{endAngle:Rt(D,x,w,P)}},t),v.add(L),ng(t.seriesIndex,m.dataType,M,L),p[M]=L}}).update(function(M,D){var I=m.get(_,M);if(d){var L=h.getItemGraphicEl(D),P=L?L.rotation:s,k=T(M,P);k.rotation=P,Dt(k,{rotation:-((isNaN(+I)?w[0]:Rt(I,x,w,!0))+Math.PI/2)},t),v.add(k),m.setItemGraphicEl(M,k)}if(y){var R=c[D],O=R?R.shape.endAngle:s,E=C(M,O),N=g.get("clip");Dt(E,{shape:{endAngle:Rt(I,x,w,N)}},t),v.add(E),ng(t.seriesIndex,m.dataType,M,E),p[M]=E}}).execute(),m.each(function(M){var D=m.getItemModel(M),I=D.getModel("emphasis"),L=I.get("focus"),P=I.get("blurScope"),k=I.get("disabled");if(d){var R=m.getItemGraphicEl(M),O=m.getItemVisual(M,"style"),E=O.fill;if(R instanceof Me){var N=R.style;R.useStyle(G({image:N.image,x:N.x,y:N.y,width:N.width,height:N.height},O))}else R.useStyle(O),R.type!=="pointer"&&R.setColor(E);R.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),R.style.fill==="auto"&&R.setStyle("fill",i(Rt(m.get(_,M),x,[0,1],!0))),R.z2EmphasisLift=0,ve(R,D),$t(R,L,P,k)}if(y){var z=p[M];z.useStyle(m.getItemVisual(M,"style")),z.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),z.z2EmphasisLift=0,ve(z,D),$t(z,L,P,k)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,a){var n=t.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=oe(s,a.cx-o/2+Y(l[0],a.r),a.cy-o/2+Y(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)}},e.prototype._renderTitleAndDetail=function(t,a,n,i,o){var s=this,l=t.getData(),u=l.mapDimension("value"),f=+t.get("min"),v=+t.get("max"),h=new at,c=[],p=[],d=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){c[y]=new Mt({silent:!0}),p[y]=new Mt({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 at,b=i(Rt(_,[f,v],[0,1],!0)),x=m.getModel("title");if(x.get("show")){var w=x.get("offsetCenter"),T=o.cx+Y(w[0],o.r),C=o.cy+Y(w[1],o.r),M=c[y];M.attr({z2:g?0:2,style:Gt(x,{x:T,y:C,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:b})}),S.add(M)}var D=m.getModel("detail");if(D.get("show")){var I=D.get("offsetCenter"),L=o.cx+Y(I[0],o.r),P=o.cy+Y(I[1],o.r),k=Y(D.get("width"),o.r),R=Y(D.get("height"),o.r),O=t.get(["progress","show"])?l.getItemVisual(y,"style").fill:b,M=p[y],E=D.get("formatter");M.attr({z2:g?0:2,style:Gt(D,{x:L,y:P,text:yf(_,E),width:isNaN(k)?null:k,height:isNaN(R)?null:R,align:"center",verticalAlign:"middle"},{inheritColor:O})}),HM(M,{normal:D},_,function(z){return yf(z,E)}),d&&WM(M,y,l,t,{getFormattedLabel:function(z,F,H,U,K,ft){return yf(ft?ft.interpolatedValue:_,E)}}),S.add(M)}h.add(S)}),this.group.add(h),this._titleEls=c,this._detailEls=p},e.type="gauge",e}(Ft);const SU=_U;var xU=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,a){return xs(this,["value"])},e.type="series.gauge",e.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,V.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:V.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:V.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:V.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:V.color.neutral00,borderWidth:0,borderColor:V.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:V.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:V.color.transparent,borderWidth:0,borderColor:V.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:V.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(Yt);const bU=xU;function wU(r){r.registerChartView(SU),r.registerSeriesModel(bU)}var TU=["itemStyle","opacity"],CU=function(r){B(e,r);function e(t,a){var n=r.call(this)||this,i=n,o=new Ee,s=new Mt;return i.setTextContent(s),n.setTextGuideLine(o),n.updateData(t,a,!0),n}return e.prototype.updateData=function(t,a,n){var i=this,o=t.hostModel,s=t.getItemModel(a),l=t.getItemLayout(a),u=s.getModel("emphasis"),f=s.get(TU);f=f??1,n||wr(i),i.useStyle(t.getItemVisual(a,"style")),i.style.lineJoin="round",n?(i.setShape({points:l.points}),i.style.opacity=0,Wt(i,{style:{opacity:f}},o,a)):Dt(i,{style:{opacity:f},shape:{points:l.points}},o,a),ve(i,s),this._updateLabel(t,a),$t(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,a){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),s=t.hostModel,l=t.getItemModel(a),u=t.getItemLayout(a),f=u.label,v=t.getItemVisual(a,"style"),h=v.fill;ye(o,he(l),{labelFetcher:t.hostModel,labelDataIndex:a,defaultOpacity:v.opacity,defaultText:t.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 it(g[0][0],g[0][1]):null},Dt(o,{style:{x:f.x,y:f.y}},s,a),o.attr({rotation:f.rotation,originX:f.x,originY:f.y,z2:10}),qm(n,Km(l),{stroke:h})},e}(He),AU=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new CU(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);Da(u,t,l)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Ft);const MU=AU;var DU=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new bs(X(this.getData,this),X(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,a){return xs(this,{coordDimensions:["value"],encodeDefaulter:dt(Mm,this)})},e.prototype._defaultLabelLine=function(t){Ei(t,"labelLine",["show"]);var a=t.labelLine,n=t.emphasis.labelLine;a.show=a.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var a=this.getData(),n=r.prototype.getDataParams.call(this,t),i=a.mapDimension("value"),o=a.getSum(i);return n.percent=o?+(a.get(i,t)/o*100).toFixed(2):0,n.$vars.push("percent"),n},e.type="series.funnel",e.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:V.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:V.color.primary}}},e}(Yt);const LU=DU;function IU(r,e){for(var t=r.mapDimension("value"),a=r.mapArray(t,function(l){return l}),n=[],i=e==="ascending",o=0,s=r.count();oqU)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||!Fp(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),a=t.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:a==="jump"?null:{duration:0}})}}};function Fp(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}const JU=KU;var QU=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var a=this.option;t&&yt(a,t,!0),this._initDimensions()},e.prototype.contains=function(t,a){var n=t.get("parallelIndex");return n!=null&&a.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){A(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(a){t.hasOwnProperty(a)&&(this.option[a]=t[a])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],a=this.parallelAxisIndex=[],n=kt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);A(n,function(i){t.push("dim"+i.get("dim")),a.push(i.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.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},e}(Ct);const t8=QU;var e8=function(r){B(e,r);function e(t,a,n,i,o){var s=r.call(this,t,a,n)||this;return s.type=i||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(Gr);const r8=e8;function An(r,e,t,a,n,i){r=r||0;var o=t[1]-t[0];if(n!=null&&(n=wo(n,[0,o])),i!=null&&(i=Math.max(i,n??0)),a==="all"){var s=Math.abs(e[1]-e[0]);s=wo(s,[0,o]),n=i=wo(s,[n,i]),a=0}e[0]=wo(e[0],t),e[1]=wo(e[1],t);var l=Hp(e,a);e[a]+=r;var u=n||0,f=t.slice();l.sign<0?f[0]+=u:f[1]-=u,e[a]=wo(e[a],f);var v;return v=Hp(e,a),n!=null&&(v.sign!==l.sign||v.spani&&(e[1-a]=e[a]+v.sign*i),e}function Hp(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function wo(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var Wp=A,Z2=Math.min,X2=Math.max,Qb=Math.floor,a8=Math.ceil,tw=re,n8=Math.PI,i8=function(){function r(e,t,a){this.type="parallel",this._axesMap=j(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,a)}return r.prototype._init=function(e,t,a){var n=e.dimensions,i=e.parallelAxisIndex;Wp(n,function(o,s){var l=i[s],u=t.getComponent("parallelAxis",l),f=this._axesMap.set(o,new r8(o,Vh(u),[0,0],u.get("type"),l)),v=f.type==="category";f.onBand=v&&u.get("boundaryGap"),f.inverse=u.get("inverse"),u.axis=f,f.model=u,f.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),a=t.axisBase,n=t.layoutBase,i=t.pixelDimIndex,o=e[1-i],s=e[i];return o>=a&&o<=a+t.axisLength&&s>=n&&s<=n+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(a){if(e.contains(a,t)){var n=a.getData();Wp(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(n,n.mapDimension(i)),Jo(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){var a=ce(e,t).refContainer;this._rect=Ut(e.getBoxLayoutParams(),a),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,a=["x","y"],n=["width","height"],i=e.get("layout"),o=i==="horizontal"?0:1,s=t[n[o]],l=[0,s],u=this.dimensions.length,f=mf(e.get("axisExpandWidth"),l),v=mf(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>v&&v>1&&f>0&&s>0,c=e.get("axisExpandWindow"),p;if(c)p=mf(c[1]-c[0],l),c[1]=c[0]+p;else{p=mf(f*(v-1),l);var d=e.get("axisExpandCenter")||Qb(u/2);c=[f*d-p/2],c[1]=c[0]+p}var g=(s-p)/(u-v);g<3&&(g=0);var y=[Qb(tw(c[0]/f,1))+1,a8(tw(c[1]/f,1))-1],m=g/f*c[0];return{layout:i,pixelDimIndex:o,layoutBase:t[a[o]],layoutLength:s,axisBase:t[a[1-o]],axisLength:t[n[1-o]],axisExpandable:h,axisExpandWidth:f,axisCollapseWidth:g,axisExpandWindow:c,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,a=this.dimensions,n=this._makeLayoutInfo(),i=n.layout;t.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),Wp(a,function(o,s){var l=(n.axisExpandable?s8:o8)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},f={horizontal:n8/2,vertical:0},v=[u[i].x+e.x,u[i].y+e.y],h=f[i],c=xe();Ln(c,c,h),va(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(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,a,n){a==null&&(a=0),n==null&&(n=e.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];A(o,function(g){s.push(e.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*=t.axisExpandWidth/f,l?An(l,n,o,"all"):u="none";else{var c=n[1]-n[0],p=o[1]*s/c;n=[X2(0,p-c/2)],n[1]=Z2(o[1],n[0]+c),n[0]=n[1]-c}return{axisExpandWindow:n,behavior:u}},r}();function mf(r,e){return Z2(X2(r,e[0]),e[1])}function o8(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function s8(r,e){var t=e.layoutLength,a=e.axisExpandWidth,n=e.axisCount,i=e.axisCollapseWidth,o=e.winInnerIndices,s,l=i,u=!1,f;return r=0;n--)Sr(a[n])},e.prototype.getActiveState=function(t){var a=this.activeIntervals;if(!a.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(a.length===1){var n=a[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,o=a.length;ip8}function eP(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function rP(r,e,t,a){var n=new at;return n.add(new _t({name:"main",style:A0(t),silent:!0,draggable:!0,cursor:"move",drift:dt(nw,r,e,n,["n","s","w","e"]),ondragend:dt(Hi,e,{isEnd:!0})})),A(a,function(i){n.add(new _t({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:dt(nw,r,e,n,i),ondragend:dt(Hi,e,{isEnd:!0})}))}),n}function aP(r,e,t,a){var n=a.brushStyle.lineWidth||0,i=as(n,d8),o=t[0][0],s=t[1][0],l=o-n/2,u=s-n/2,f=t[0][1],v=t[1][1],h=f-i+n/2,c=v-i+n/2,p=f-o,d=v-s,g=p+n,y=d+n;xa(r,e,"main",o,s,p,d),a.transformable&&(xa(r,e,"w",l,u,i,y),xa(r,e,"e",h,u,i,y),xa(r,e,"n",l,u,g,i),xa(r,e,"s",l,c,g,i),xa(r,e,"nw",l,u,i,i),xa(r,e,"ne",h,u,i,i),xa(r,e,"sw",l,c,i,i),xa(r,e,"se",h,c,i,i))}function uy(r,e){var t=e.__brushOption,a=t.transformable,n=e.childAt(0);n.useStyle(A0(t)),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=e.childOfName(i.join("")),s=i.length===1?fy(r,i[0]):b8(r,i);o&&o.attr({silent:!a,invisible:!a,cursor:a?y8[s]+"-resize":null})})}function xa(r,e,t,a,n,i,o){var s=e.childOfName(t);s&&s.setShape(T8(M0(r,e,[[a,n],[a+i,n+o]])))}function A0(r){return ot({strokeNoScale:!0},r.brushStyle)}function nP(r,e,t,a){var n=[tu(r,t),tu(e,a)],i=[as(r,t),as(e,a)];return[[n[0],i[0]],[n[1],i[1]]]}function x8(r){return Li(r.group)}function fy(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},n=Dh(t[e],x8(r));return a[n]}function b8(r,e){var t=[fy(r,e[0]),fy(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function nw(r,e,t,a,n,i){var o=t.__brushOption,s=r.toRectRange(o.range),l=iP(e,n,i);A(a,function(u){var f=g8[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange(nP(s[0][0],s[1][0],s[0][1],s[1][1])),w0(e,t),Hi(e,{isEnd:!1})}function w8(r,e,t,a){var n=e.__brushOption.range,i=iP(r,t,a);A(n,function(o){o[0]+=i[0],o[1]+=i[1]}),w0(r,e),Hi(r,{isEnd:!1})}function iP(r,e,t){var a=r.group,n=a.transformCoordToLocal(e,t),i=a.transformCoordToLocal(0,0);return[n[0]-i[0],n[1]-i[1]]}function M0(r,e,t){var a=tP(r,e);return a&&a!==Fi?a.clipPath(t,r._transform):rt(t)}function T8(r){var e=tu(r[0][0],r[1][0]),t=tu(r[0][1],r[1][1]),a=as(r[0][0],r[1][0]),n=as(r[0][1],r[1][1]);return{x:e,y:t,width:a-e,height:n-t}}function C8(r,e,t){if(!(!r._brushType||M8(r,e.offsetX,e.offsetY))){var a=r._zr,n=r._covers,i=C0(r,e,t);if(!r._dragging)for(var o=0;oa.getWidth()||t<0||t>a.getHeight()}var Zh={lineX:sw(0),lineY:sw(1),rect:{createCover:function(r,e){function t(a){return a}return rP({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=eP(r);return nP(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,a){aP(r,e,t,a)},updateCommon:uy,contain:hy},polygon:{createCover:function(r,e){var t=new at;return t.add(new Ee({name:"main",style:A0(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new He({name:"main",draggable:!0,drift:dt(w8,r,e),ondragend:dt(Hi,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,a){e.childAt(0).setShape({points:M0(r,e,t)})},updateCommon:uy,contain:hy}};function sw(r){return{createCover:function(e,t){return rP({toRectRange:function(a){var n=[a,[0,100]];return r&&n.reverse(),n},fromRectRange:function(a){return a[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=eP(e),a=tu(t[0][r],t[1][r]),n=as(t[0][r],t[1][r]);return[a,n]},updateCoverShape:function(e,t,a,n){var i,o=tP(e,t);if(o!==Fi&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=e._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[a,i];r&&l.reverse(),aP(e,t,l,n)},updateCommon:uy,contain:hy}}const D0=_8;function sP(r){return r=L0(r),function(e){return NM(e,r)}}function lP(r,e){return r=L0(r),function(t){var a=e??t,n=a?r.width:r.height,i=a?r.x:r.y;return[i,i+(n||0)]}}function uP(r,e,t){var a=L0(r);return function(n,i){return a.contain(i[0],i[1])&&!h2(n,e,t)}}function L0(r){return lt.create(r)}var D8=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){r.prototype.init.apply(this,arguments),(this._brushController=new D0(a.getZr())).on("brush",X(this._onBrush,this))},e.prototype.render=function(t,a,n,i){if(!L8(t,a,i)){this.axisModel=t,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new at,this.group.add(this._axisGroup),!!t.get("show")){var s=P8(t,a),l=s.coordinateSystem,u=t.getAreaSelectStyle(),f=u.width,v=t.axis.dim,h=l.getAxisLayout(v),c=G({strokeContainThreshold:f},h),p=new Va(t,n,c);p.build(),this._axisGroup.add(p.group),this._refreshBrushController(c,u,t,s,f,n),ou(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,a,n,i,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],f=Math.min(30,Math.abs(u)*.1),v=lt.create({x:l[0],y:-o/2,width:u,height:o});v.x-=f,v.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:sP(v),isTargetByCursor:uP(v,s,i),getLinearBrushOtherExtent:lP(v,0)}]).enableBrush({brushType:"lineX",brushStyle:a,removeOnClick:!0}).updateCovers(I8(n))},e.prototype._onBrush=function(t){var a=t.areas,n=this.axisModel,i=n.axis,o=$(a,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!n.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(Xt);function L8(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function I8(r){var e=r.axis;return $(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function P8(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}const R8=D8;var k8={type:"axisAreaSelect",event:"axisAreaSelected"};function E8(r){r.registerAction(k8,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(a){a.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(a){a.setAxisExpand(e)})})}var O8={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function fP(r){r.registerComponentView(JU),r.registerComponentModel(t8),r.registerCoordinateSystem("parallel",v8),r.registerPreprocessor(YU),r.registerComponentModel(ew),r.registerComponentView(R8),es(r,"parallel",ew,O8),E8(r)}function B8(r){mt(fP),r.registerChartView(VU),r.registerSeriesModel(HU),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,UU)}var N8=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}(),V8=function(r){B(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new N8},e.prototype.buildPath=function(t,a){var n=a.extent;t.moveTo(a.x1,a.y1),t.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(t.lineTo(a.x2+n,a.y2),t.bezierCurveTo(a.cpx2+n,a.cpy2,a.cpx1+n,a.cpy1,a.x1+n,a.y1)):(t.lineTo(a.x2,a.y2+n),t.bezierCurveTo(a.cpx2,a.cpy2+n,a.cpx1,a.cpy1+n,a.x1,a.y1+n)),t.closePath()},e.prototype.highlight=function(){Oa(this)},e.prototype.downplay=function(){Ba(this)},e}(xt),z8=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new at,t._focusAdjacencyDisabled=!1,t}return e.prototype.init=function(t,a){this._controller=new to(a.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,a,n){var i=this,o=t.getGraph(),s=this._mainGroup,l=t.layoutInfo,u=l.width,f=l.height,v=t.getData(),h=t.getData("edge"),c=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(t,n),c2(t,n,s,this._controller,this._controllerHost,null),o.eachEdge(function(p){var d=new V8,g=ut(d);g.dataIndex=p.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var y=p.getModel(),m=y.getModel("lineStyle"),_=m.get("curveness"),S=p.node1.getLayout(),b=p.node1.getModel(),x=b.get("localX"),w=b.get("localY"),T=p.node2.getLayout(),C=p.node2.getModel(),M=C.get("localX"),D=C.get("localY"),I=p.getLayout(),L,P,k,R,O,E,N,z;d.shape.extent=Math.max(1,I.dy),d.shape.orient=c,c==="vertical"?(L=(x!=null?x*u:S.x)+I.sy,P=(w!=null?w*f:S.y)+S.dy,k=(M!=null?M*u:T.x)+I.ty,R=D!=null?D*f:T.y,O=L,E=P*(1-_)+R*_,N=k,z=P*_+R*(1-_)):(L=(x!=null?x*u:S.x)+S.dx,P=(w!=null?w*f:S.y)+I.sy,k=M!=null?M*u:T.x,R=(D!=null?D*f:T.y)+I.ty,O=L*(1-_)+k*_,E=P,N=L*_+k*(1-_),z=R),d.setShape({x1:L,y1:P,x2:k,y2:R,cpx1:O,cpy1:E,cpx2:N,cpy2:z}),d.useStyle(m.getItemStyle()),lw(d.style,c,p);var F=""+y.get("value"),H=he(y,"edgeLabel");ye(d,H,{labelFetcher:{getFormattedLabel:function(ft,At,Ot,vt,tt,pt){return t.getFormattedLabel(ft,At,"edge",vt,ar(tt,H.normal&&H.normal.get("formatter"),F),pt)}},labelDataIndex:p.dataIndex,defaultText:F}),d.setTextConfig({position:"inside"});var U=y.getModel("emphasis");ve(d,y,"lineStyle",function(ft){var At=ft.getItemStyle();return lw(At,c,p),At}),s.add(d),h.setItemGraphicEl(p.dataIndex,d);var K=U.get("focus");$t(d,K==="adjacency"?p.getAdjacentDataIndices():K==="trajectory"?p.getTrajectoryDataIndices():K,U.get("blurScope"),U.get("disabled"))}),o.eachNode(function(p){var d=p.getLayout(),g=p.getModel(),y=g.get("localX"),m=g.get("localY"),_=g.getModel("emphasis"),S=g.get(["itemStyle","borderRadius"])||0,b=new _t({shape:{x:y!=null?y*u:d.x,y:m!=null?m*f:d.y,width:d.dx,height:d.dy,r:S},style:g.getModel("itemStyle").getItemStyle(),z2:10});ye(b,he(g),{labelFetcher:{getFormattedLabel:function(w,T){return t.getFormattedLabel(w,T,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),b.disableLabelAnimation=!0,b.setStyle("fill",p.getVisual("color")),b.setStyle("decal",p.getVisual("style").decal),ve(b,g),s.add(b),v.setItemGraphicEl(p.dataIndex,b),ut(b).dataType="node";var x=_.get("focus");$t(b,x==="adjacency"?p.getAdjacentDataIndices():x==="trajectory"?p.getTrajectoryDataIndices():x,_.get("blurScope"),_.get("disabled"))}),v.eachItemGraphicEl(function(p,d){var g=v.getItemModel(d);g.get("draggable")&&(p.drift=function(y,m){i._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:v.getRawIndex(d),localX:this.shape.x/u,localY:this.shape.y/f})},p.ondragend=function(){i._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(G8(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._updateViewCoordSys=function(t,a){var n=t.layoutInfo,i=n.width,o=n.height,s=t.coordinateSystem=new eo(null,{api:a,ecModel:t.ecModel});s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(0,0,i,o),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},e.type="sankey",e}(Ft);function lw(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var a=t.node1.getVisual("color"),n=t.node2.getVisual("color");Z(a)&&Z(n)&&(r.fill=new vs(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:a,offset:0},{color:n,offset:1}]))}}function G8(r,e,t){var a=new _t({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Wt(a,{shape:{width:r.width+20}},e,t),a}const F8=z8;var H8=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=t.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new Lt(o[l],this,a));var u=b0(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})}},e.prototype.setNodePosition=function(t,a){var n=this.option.data||this.option.nodes,i=n[t];i.localX=a[0],i.localY=a[1]},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,a,n){function i(c){return isNaN(c)||c==null}if(n==="edge"){var o=this.getDataParams(t,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return ie("nameValue",{name:u,value:l,noValue:i(l)})}else{var f=this.getGraph().getNodeByIndex(t),v=f.getLayout().value,h=this.getDataParams(t,n).data.name;return ie("nameValue",{name:h!=null?h+"":null,value:v,noValue:i(v)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,a){var n=r.prototype.getDataParams.call(this,t,a);if(n.value==null&&a==="node"){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;n.value=o}return n},e.type="series.sankey",e.layoutMode="box",e.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:V.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:V.color.primary}},animationEasing:"linear",animationDuration:1e3},e}(Yt);const W8=H8;function $8(r,e){r.eachSeriesByType("sankey",function(t){var a=t.get("nodeWidth"),n=t.get("nodeGap"),i=ce(t,e).refContainer,o=Ut(t.getBoxLayoutParams(),i);t.layoutInfo=o;var s=o.width,l=o.height,u=t.getGraph(),f=u.nodes,v=u.edges;Y8(f);var h=kt(f,function(g){return g.getLayout().value===0}),c=h.length!==0?0:t.get("layoutIterations"),p=t.get("orient"),d=t.get("nodeAlign");U8(f,v,a,n,s,l,c,p,d)})}function U8(r,e,t,a,n,i,o,s,l){Z8(r,e,t,n,i,s,l),j8(r,e,i,n,a,o,s),o6(r,s)}function Y8(r){A(r,function(e){var t=Sn(e.outEdges,Zv),a=Sn(e.inEdges,Zv),n=e.getValue()||0,i=Math.max(t,a,n);e.setLayout({value:i},!0)})}function Z8(r,e,t,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:t},!0):d.setLayout({dx:t},!0);for(var m=0;mv-1?c:v-1;o&&o!=="left"&&X8(r,o,i,w);var T=i==="vertical"?(n-t)/w:(a-t)/w;K8(r,T,i)}function vP(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function X8(r,e,t,a){if(e==="right"){for(var n=[],i=r,o=0;i.length;){for(var s=0;s0;i--)l*=.99,t6(s,l,o),$p(s,n,t,a,o),i6(s,l,o),$p(s,n,t,a,o)}function J8(r,e){var t=[],a=e==="vertical"?"y":"x",n=Qd(r,function(i){return i.getLayout()[a]});return n.keys.sort(function(i,o){return i-o}),A(n.keys,function(i){t.push(n.buckets.get(i))}),t}function Q8(r,e,t,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:(t-(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]+e;var p=n==="vertical"?a:t;if(u=f-e-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]+e-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 t6(r,e,t){A(r.slice().reverse(),function(a){A(a,function(n){if(n.outEdges.length){var i=Sn(n.outEdges,e6,t)/Sn(n.outEdges,Zv);if(isNaN(i)){var o=n.outEdges.length;i=o?Sn(n.outEdges,r6,t)/o:0}if(t==="vertical"){var s=n.getLayout().x+(i-Mn(n,t))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-Mn(n,t))*e;n.setLayout({y:l},!0)}}})})}function e6(r,e){return Mn(r.node2,e)*r.getValue()}function r6(r,e){return Mn(r.node2,e)}function a6(r,e){return Mn(r.node1,e)*r.getValue()}function n6(r,e){return Mn(r.node1,e)}function Mn(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function Zv(r){return r.getValue()}function Sn(r,e,t){for(var a=0,n=r.length,i=-1;++io&&(o=l)}),A(a,function(s){var l=new Ae({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:e.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 l6(r){r.registerChartView(F8),r.registerSeriesModel(W8),r.registerLayout($8),r.registerVisual(s6),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(a){a.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),r.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){var i=n.coordinateSystem,o=Wh(i,e,n.get("scaleLimit"));n.setCenter(o.center),n.setZoom(o.zoom)})})}var hP=function(){function r(){}return r.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},r.prototype.getInitialData=function(e,t){var a,n=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),s=i.get("type"),l;o==="category"?(e.layout="horizontal",a=n.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",a=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],f=e.layout==="horizontal"?0:1,v=this._baseAxisDim=u[f],h=u[1-f],c=[n,i],p=c[f].get("type"),d=c[1-f].get("type"),g=e.data;if(g&&l){var y=[];A(g,function(S,b){var x;W(S)?(x=S.slice(),S.unshift(b)):W(S.value)?(x=G({},S),x.value=x.value.slice(),S.value.unshift(b)):x=S,y.push(x)}),e.data=y}var m=this.defaultValueDimensions,_=[{name:v,type:Lv(p),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:Lv(d),dimsDef:m.slice()}];return xs(this,{coordDimensions:_,dimensionsCount:m.length+1,encodeDefaulter:dt(yD,_,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),cP=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:V.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:V.color.shadow}},animationDuration:800},e}(Yt);se(cP,hP,!0);const u6=cP;var f6=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var f=i.getItemLayout(u),v=uw(f,i,u,l,!0);i.setItemGraphicEl(u,v),o.add(v)}}).update(function(u,f){var v=s.getItemGraphicEl(f);if(!i.hasValue(u)){o.remove(v);return}var h=i.getItemLayout(u);v?(wr(v),pP(h,v,i,u)):v=uw(h,i,u,l),o.add(v),i.setItemGraphicEl(u,v)}).remove(function(u){var f=s.getItemGraphicEl(u);f&&o.remove(f)}).execute(),this._data=i},e.prototype.remove=function(t){var a=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(i){i&&a.remove(i)})},e.type="boxplot",e}(Ft),v6=function(){function r(){}return r}(),h6=function(r){B(e,r);function e(t){var a=r.call(this,t)||this;return a.type="boxplotBoxPath",a}return e.prototype.getDefaultShape=function(){return new v6},e.prototype.buildPath=function(t,a){var n=a.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();id){var S=[y,_];a.push(S)}}}return{boxData:t,outliers:a}}var S6={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==be){var a="";Pt(a)}var n=_6(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function x6(r){r.registerSeriesModel(u6),r.registerChartView(p6),r.registerLayout(d6),r.registerTransform(S6)}var b6=["itemStyle","borderColor"],w6=["itemStyle","borderColor0"],T6=["itemStyle","borderColorDoji"],C6=["itemStyle","color"],A6=["itemStyle","color0"];function I0(r,e){return e.get(r>0?C6:A6)}function P0(r,e){return e.get(r===0?T6:r>0?b6:w6)}var M6={seriesType:"candlestick",plan:gs(),performRawSeries:!0,reset:function(r,e){if(!e.isSeriesFiltered(r)){var t=r.pipelineContext.large;return!t&&{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=I0(s,o),l.stroke=P0(s,o)||l.fill;var u=n.ensureUniqueItemVisual(i,"style");G(u,l)}}}}}};const D6=M6;var L6=["color","borderColor"],I6=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,a,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,a,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,a):this._incrementalRenderNormal(t,a)},e.prototype.eachRendered=function(t){Pn(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var a=t.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},e.prototype._renderNormal=function(t){var a=t.getData(),n=this._data,i=this.group,o=a.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),a.diff(n).add(function(f){if(a.hasValue(f)){var v=a.getItemLayout(f);if(s&&fw(u,v))return;var h=Up(v,f,!0);Wt(h,{shape:{points:v.ends}},t,f),Yp(h,a,f,o),i.add(h),a.setItemGraphicEl(f,h)}}).update(function(f,v){var h=n.getItemGraphicEl(v);if(!a.hasValue(f)){i.remove(h);return}var c=a.getItemLayout(f);if(s&&fw(u,c)){i.remove(h);return}h?(Dt(h,{shape:{points:c.ends}},t,f),wr(h)):h=Up(c),Yp(h,a,f,o),i.add(h),a.setItemGraphicEl(f,h)}).remove(function(f){var v=n.getItemGraphicEl(f);v&&i.remove(v)}).execute(),this._data=a},e.prototype._renderLarge=function(t){this._clear(),vw(t,this.group);var a=t.get("clip",!0)?gu(t.coordinateSystem,!1,t):null;a?this.group.setClipPath(a):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,a){for(var n=a.getData(),i=n.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=n.getItemLayout(o),l=Up(s);Yp(l,n,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,a){vw(a,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(Ft),P6=function(){function r(){}return r}(),R6=function(r){B(e,r);function e(t){var a=r.call(this,t)||this;return a.type="normalCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new P6},e.prototype.buildPath=function(t,a){var n=a.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(xt);function Up(r,e,t){var a=r.ends;return new R6({shape:{points:t?k6(a,r):a},z2:100})}function fw(r,e){for(var t=!0,a=0;ab?D[i]:M[i],ends:P,brushRect:N(x,w,_)})}function O(F,H){var U=[];return U[n]=H,U[i]=F,isNaN(H)||isNaN(F)?[NaN,NaN]:e.dataToPoint(U)}function E(F,H,U){var K=H.slice(),ft=H.slice();K[n]=Uf(K[n]+a/2,1,!1),ft[n]=Uf(ft[n]-a/2,1,!0),U?F.push(K,ft):F.push(ft,K)}function N(F,H,U){var K=O(F,U),ft=O(H,U);return K[n]-=a/2,ft[n]-=a/2,{x:K[0],y:K[1],width:a,height:ft[1]-K[1]}}function z(F){return F[n]=Uf(F[n],1),F}}function p(d,g){for(var y=aa(d.count*4),m=0,_,S=[],b=[],x,w=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(x=d.next())!=null;){var C=w.get(s,x),M=w.get(u,x),D=w.get(f,x),I=w.get(v,x),L=w.get(h,x);if(isNaN(C)||isNaN(I)||isNaN(L)){y[m++]=NaN,m+=3;continue}y[m++]=hw(w,x,M,D,f,T),S[n]=C,S[i]=I,_=e.dataToPoint(S,null,b),y[m++]=_?_[0]:NaN,y[m++]=_?_[1]:NaN,S[i]=L,_=e.dataToPoint(S,null,b),y[m++]=_?_[1]:NaN}g.setLayout("largePoints",y)}}};function hw(r,e,t,a,n,i){var o;return t>a?o=-1:t0?r.get(n,e-1)<=a?1:-1:1,o}function z6(r,e){var t=r.getBaseAxis(),a,n=t.type==="category"?t.getBandWidth():(a=t.getExtent(),Math.abs(a[1]-a[0])/e.count()),i=Y(Q(r.get("barMaxWidth"),n),n),o=Y(Q(r.get("barMinWidth"),1),n),s=r.get("barWidth");return s!=null?Y(s,n):Math.max(Math.min(n/2,i),o)}const G6=V6;function F6(r){r.registerChartView(O6),r.registerSeriesModel(B6),r.registerPreprocessor(N6),r.registerVisual(D6),r.registerLayout(G6)}function cw(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(a){a.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var H6=function(r){B(e,r);function e(t,a){var n=r.call(this)||this,i=new pu(t,a),o=new at;return n.add(i),n.add(o),n.updateData(t,a),n}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var a=t.symbolType,n=t.color,i=t.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;et(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}},e.prototype._animateSymbol=function(t,a,n,i,o){if(a>0){t.__t=0;var s=this,l=t.animate("",i).when(o?a*2:a,{__t:o?2:1}).delay(n).during(function(){s._updateSymbolPosition(t)});i||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return nn(t.__p1,t.__cp1)+nn(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,a){t.__p1=a[0],t.__p2=a[1],t.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},e.prototype.updateData=function(t,a,n){this.childAt(0).updateData(t,a,n),this._updateEffectSymbol(t,a)},e.prototype._updateSymbolPosition=function(t){var a=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=Se,f=Vd;s[0]=u(a[0],i[0],n[0],o),s[1]=u(a[1],i[1],n[1],o);var v=t.__t<1?f(a[0],i[0],n[0],o):f(n[0],i[0],a[0],1-o),h=t.__t<1?f(a[1],i[1],n[1],o):f(n[1],i[1],a[1],1-o);t.rotation=-Math.atan2(h,v)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__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];t.x=v[0]*(1-f)+f*h[0],t.y=v[1]*(1-f)+f*h[1];var c=t.__t<1?h[0]-v[0]:v[0]-h[0],p=t.__t<1?h[1]-v[1]:v[1]-h[1];t.rotation=-Math.atan2(p,c)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,t.ignore=!1}},e}(gP);const J6=j6;var Q6=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),tY=function(r){B(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:V.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Q6},e.prototype.buildPath=function(t,a){var n=a.segs,i=a.curveness,o;if(a.polyline)for(o=this._off;o0){t.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;t.quadraticCurveTo(c,p,v,h)}else t.lineTo(v,h)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,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(KA(v,h,g,y,p,d,s,t,a))return l}else if(rn(v,h,p,d,s,t,a))return l;l++}return-1},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect();if(t=n[0],a=n[1],i.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){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+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}();const rY=eY;var aY={seriesType:"lines",plan:gs(),reset:function(r){var e=r.coordinateSystem;if(e){var t=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(t){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=t.get("clip",!0)&&gu(t.coordinateSystem,!1,t);v?this.group.setClipPath(v):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,n){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,a,n){this._lineDraw.incrementalUpdate(t,a.getData()),this._finished=t.end===a.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,a,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=mP.reset(t,a,n);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,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 rY:new x0(o?i?J6:yP:i?gP:S0),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var a=t.getZr(),n=a.painter.getType()==="svg";!n&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},e.prototype.dispose=function(t,a){this.remove(t,a)},e.type="lines",e}(Ft);const iY=nY;var oY=typeof Uint32Array>"u"?Array:Uint32Array,sY=typeof Float64Array>"u"?Array:Float64Array;function pw(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=$(e,function(t){var a=[t[0].coord,t[1].coord],n={coords:a};return t[0].name&&(n.fromName=t[0].name),t[1].name&&(n.toName=t[1].name),Fy([n,t[0],t[1]])}))}var lY=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],pw(t);var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(pw(t),t.data){var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var a=this._processFlatCoordsArray(t.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=Ml(this._flatCoords,a.flatCoords),this._flatCoordsOffset=Ml(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),t.data=new Float32Array(a.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var a=this.getData().getItemModel(t),n=a.option instanceof Array?a.option:a.getShallow("coords");return n},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,a){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),a=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&a>0?a+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.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}},e}(Yt);const uY=lY;function _f(r){return r instanceof Array||(r=[r,r]),r}var fY={seriesType:"lines",reset:function(r){var e=_f(r.get("symbol")),t=_f(r.get("symbolSize")),a=r.getData();a.setVisual("fromSymbol",e&&e[0]),a.setVisual("toSymbol",e&&e[1]),a.setVisual("fromSymbolSize",t&&t[0]),a.setVisual("toSymbolSize",t&&t[1]);function n(i,o){var s=i.getItemModel(o),l=_f(s.getShallow("symbol",!0)),u=_f(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}}};const vY=fY;function hY(r){r.registerChartView(iY),r.registerSeriesModel(uY),r.registerLayout(mP),r.registerVisual(vY)}var cY=256,pY=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Er.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,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=e.length;v.width=t,v.height=a;for(var p=0;p0){var I=o(_)?l:u;_>0&&(_=_*M+T),b[x++]=I[D],b[x++]=I[D+1],b[x++]=I[D+2],b[x++]=I[D+3]*_*256}else x+=4}return h.putImageData(S,0,0),v},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Er.createCanvas()),t=this.pointSize+this.blurSize,a=t*2;e.width=a,e.height=a;var n=e.getContext("2d");return n.clearRect(0,0,a,a),n.shadowOffsetX=a,n.shadowBlur=this.blurSize,n.shadowColor=V.color.neutral99,n.beginPath(),n.arc(-t,t,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),e},r.prototype._getGradient=function(e,t){for(var a=this._gradientPixels,n=a[t]||(a[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,i),n[o++]=i[0],n[o++]=i[1],n[o++]=i[2],n[o++]=i[3];return n},r}();const dY=pY;function gY(r,e,t){var a=r[1]-r[0];e=$(e,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var n=e.length,i=0;return function(o){var s;for(s=i;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s=e[0]&&a<=e[1]}}function dw(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var mY=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i;a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(t,n,0,t.getData().count()):dw(o)&&this._renderOnGeo(o,t,i,n)},e.prototype.incrementalPrepareRender=function(t,a,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,a,n,i){var o=a.coordinateSystem;o&&(dw(o)?this.render(a,n,i):(this._progressiveEls=[],this._renderOnGridLike(a,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Pn(this._progressiveEls||this.group,t)},e.prototype._renderOnGridLike=function(t,a,n,i,o){var s=t.coordinateSystem,l=Cn(s,"cartesian2d"),u=Cn(s,"matrix"),f,v,h,c;if(l){var p=s.getAxis("x"),d=s.getAxis("y");f=p.getBandWidth()+.5,v=d.getBandWidth()+.5,h=p.scale.getExtent(),c=d.scale.getExtent()}for(var g=this.group,y=t.getData(),m=t.getModel(["emphasis","itemStyle"]).getItemStyle(),_=t.getModel(["blur","itemStyle"]).getItemStyle(),S=t.getModel(["select","itemStyle"]).getItemStyle(),b=t.get(["itemStyle","borderRadius"]),x=he(t),w=t.getModel("emphasis"),T=w.get("focus"),C=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")],I=n;Ih[1]||Rc[1])continue;var O=s.dataToPoint([k,R]);L=new _t({shape:{x:O[0]-f/2,y:O[1]-v/2,width:f,height:v},style:P})}else if(u){var E=s.dataToLayout([y.get(D[0],I),y.get(D[1],I)]).rect;if(Pe(E.x))continue;L=new _t({z2:1,shape:E,style:P})}else{if(isNaN(y.get(D[1],I)))continue;var N=s.dataToLayout([y.get(D[0],I)]),E=N.contentRect||N.rect;if(Pe(E.x)||Pe(E.y))continue;L=new _t({z2:1,shape:E,style:P})}if(y.hasItemOption){var z=y.getItemModel(I),F=z.getModel("emphasis");m=F.getModel("itemStyle").getItemStyle(),_=z.getModel(["blur","itemStyle"]).getItemStyle(),S=z.getModel(["select","itemStyle"]).getItemStyle(),b=z.get(["itemStyle","borderRadius"]),T=F.get("focus"),C=F.get("blurScope"),M=F.get("disabled"),x=he(z)}L.shape.r=b;var H=t.getRawValue(I),U="-";H&&H[2]!=null&&(U=H[2]+""),ye(L,x,{labelFetcher:t,labelDataIndex:I,defaultOpacity:P.opacity,defaultText:U}),L.ensureState("emphasis").style=m,L.ensureState("blur").style=_,L.ensureState("select").style=S,$t(L,T,C,M),L.incremental=o,o&&(L.states.emphasis.hoverLayer=!0),g.add(L),y.setItemGraphicEl(I,L),this._progressiveEls&&this._progressiveEls.push(L)}},e.prototype._renderOnGeo=function(t,a,n,i){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new dY;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var f=t.getViewRect().clone(),v=t.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,T,C){var M=t.dataToPoint([w,T]);return M[0]-=h,M[1]-=c,M.push(C),M}),S=n.getExtent(),b=n.type==="visualMap.continuous"?yY(S,n.option.range):gY(S,n.getPieceList(),n.option.selected);u.update(_,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var x=new Me({style:{width:g,height:y,x:h,y:c,image:u.canvas},silent:!0});this.group.add(x)},e.type="heatmap",e}(Ft);const _Y=mY;var SY=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return Wa(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=uu.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:V.color.primary}}},e}(Yt);const xY=SY;function bY(r){r.registerChartView(_Y),r.registerSeriesModel(xY)}var wY=["itemStyle","borderWidth"],gw=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],qp=new In,TY=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),f=u.isHorizontal(),v=l.master.getRect(),h={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[v.x,v.x+v.width],[v.y,v.y+v.height]],isHorizontal:f,valueDim:gw[+f],categoryDim:gw[1-+f]};o.diff(s).add(function(p){if(o.hasValue(p)){var d=mw(o,p),g=yw(o,p,d,h),y=_w(o,h,g);o.setItemGraphicEl(p,y),i.add(y),xw(y,h,g)}}).update(function(p,d){var g=s.getItemGraphicEl(d);if(!o.hasValue(p)){i.remove(g);return}var y=mw(o,p),m=yw(o,p,y,h),_=TP(o,m);g&&_!==g.__pictorialShapeStr&&(i.remove(g),o.setItemGraphicEl(p,null),g=null),g?PY(g,h,m):g=_w(o,h,m,!0),o.setItemGraphicEl(p,g),g.__pictorialSymbolMeta=m,i.add(g),xw(g,h,m)}).remove(function(p){var d=s.getItemGraphicEl(p);d&&Sw(s,p,d.__pictorialSymbolMeta.animationModel,d)}).execute();var c=t.get("clip",!0)?gu(t.coordinateSystem,!1,t):null;return c?i.setClipPath(c):i.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,a){var n=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(o){Sw(i,ut(o).dataIndex,t,o)}):n.removeAll()},e.type="pictorialBar",e}(Ft);function yw(r,e,t,a){var n=r.getItemLayout(e),i=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,f=t.get("symbolPatternSize")||2,v=t.isAnimationEnabled(),h={dataIndex:e,layout:n,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:u,animationModel:v?t:null,hoverScale:v&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};CY(t,i,n,a,h),AY(r,e,n,i,o,h.boundingLength,h.pxSign,f,a,h),MY(t,h.symbolScale,u,a,h);var c=h.symbolSize,p=Ki(t.get("symbolOffset"),c);return DY(t,c,n,i,o,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,a,h),h}function CY(r,e,t,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-+(t[i.wh]<=0),f;if(W(o)){var v=[Kp(s,o[0])-l,Kp(s,o[1])-l];v[1]=0?1:-1:f>0?1:-1}function Kp(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function AY(r,e,t,a,n,i,o,s,l,u){var f=l.valueDim,v=l.categoryDim,h=Math.abs(t[v.wh]),c=r.getItemVisual(e,"symbolSize"),p;W(c)?p=c.slice():c==null?p=["100%","100%"]:p=[c,c],p[v.index]=Y(p[v.index],h),p[f.index]=Y(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 MY(r,e,t,a,n){var i=r.get(wY)||0;i&&(qp.attr({scaleX:e[0],scaleY:e[1],rotation:t}),qp.updateTransform(),i/=qp.getLineScale(),i*=e[a.valueDim.index]),n.valueLineWidth=i||0}function DY(r,e,t,a,n,i,o,s,l,u,f,v){var h=f.categoryDim,c=f.valueDim,p=v.pxSign,d=Math.max(e[c.index]+s,0),g=d;if(a){var y=Math.abs(l),m=Ce(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var S=Y(m,e[c.index]),b=Math.max(d+S*2,0),x=_?0:S*2,w=EA(a),T=w?a:bw((y+x)/b),C=y-T*d;S=C/2/(_?T:Math.max(T-1,1)),b=d+S*2,x=_?0:S*2,!w&&a!=="fixed"&&(T=u?bw((Math.abs(u)+x)/b):0),g=T*b-x,v.repeatTimes=T,v.symbolMargin=S}var M=p*(g/2),D=v.pathPosition=[];D[h.index]=t[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 I=v.bundlePosition=[];I[h.index]=t[h.xy],I[c.index]=t[c.xy];var L=v.barRectShape=G({},t);L[c.wh]=p*Math.max(Math.abs(t[c.wh]),Math.abs(D[c.index]+M)),L[h.wh]=t[h.wh];var P=v.clipShape={};P[h.xy]=-t[h.xy],P[h.wh]=f.ecSize[h.wh],P[c.xy]=0,P[c.wh]=t[c.wh]}function _P(r){var e=r.symbolPatternSize,t=oe(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function SP(r,e,t,a){var n=r.__pictorialBundle,i=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,f=0,v=i[e.valueDim.index]+o+t.symbolMargin*2;for(R0(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:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function xP(r,e,t,a){var n=r.__pictorialBundle,i=r.__pictorialMainPath;i?Uo(i,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,a):(i=r.__pictorialMainPath=_P(t),n.add(i),Uo(i,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,a))}function bP(r,e,t){var a=G({},e.barRectShape),n=r.__pictorialBarRect;n?Uo(n,null,{shape:a},e,t):(n=r.__pictorialBarRect=new _t({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,r.add(n))}function wP(r,e,t,a){if(t.symbolClip){var n=r.__pictorialClipPath,i=G({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(n)Dt(n,{shape:i},s,l);else{i[o.wh]=0,n=new _t({shape:i}),r.__pictorialBundle.setClipPath(n),r.__pictorialClipPath=n;var u={};u[o.wh]=t.clipShape[o.wh],Yi[a?"updateProps":"initProps"](n,{shape:u},s,l)}}}function mw(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=LY,t.isAnimationEnabled=IY,t}function LY(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function IY(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function _w(r,e,t,a){var n=new at,i=new at;return n.add(i),n.__pictorialBundle=i,i.x=t.bundlePosition[0],i.y=t.bundlePosition[1],t.symbolRepeat?SP(n,e,t):xP(n,e,t),bP(n,t,a),wP(n,e,t,a),n.__pictorialShapeStr=TP(r,t),n.__pictorialSymbolMeta=t,n}function PY(r,e,t){var a=t.animationModel,n=t.dataIndex,i=r.__pictorialBundle;Dt(i,{x:t.bundlePosition[0],y:t.bundlePosition[1]},a,n),t.symbolRepeat?SP(r,e,t,!0):xP(r,e,t,!0),bP(r,t,!0),wP(r,e,t,!0)}function Sw(r,e,t,a){var n=a.__pictorialBarRect;n&&n.removeTextContent();var i=[];R0(a,function(o){i.push(o)}),a.__pictorialMainPath&&i.push(a.__pictorialMainPath),a.__pictorialClipPath&&(t=null),A(i,function(o){bn(o,{scaleX:0,scaleY:0},t,e,function(){a.parent&&a.parent.remove(a)})}),r.setItemGraphicEl(e,null)}function TP(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function R0(r,e,t){A(r.__pictorialBundle.children(),function(a){a!==r.__pictorialBarRect&&e.call(t,a)})}function Uo(r,e,t,a,n,i){e&&r.attr(e),a.symbolClip&&!n?t&&r.attr(t):t&&Yi[n?"updateProps":"initProps"](r,t,a.animationModel,a.dataIndex,i)}function xw(r,e,t){var a=t.dataIndex,n=t.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");R0(r,function(d){if(d instanceof Me){var g=d.style;d.useStyle(G({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},t.style))}else d.useStyle(t.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=t.z2});var c=e.valueDim.posDesc[+(t.boundingLength>0)],p=r.__pictorialBarRect;p.ignoreClip=!0,ye(p,he(n),{labelFetcher:e.seriesModel,labelDataIndex:a,defaultText:ts(e.seriesModel.getData(),a),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:c}),$t(r,f,v,i.get("disabled"))}function bw(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}const RY=TY;var kY=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Rn(Vv.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:V.color.primary}}}),e}(Vv);const EY=kY;function OY(r){r.registerChartView(RY),r.registerSeriesModel(EY),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,dt(zL,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,GL("pictorialBar"))}var BY=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=i.getLayout("layoutInfo"),f=u.rect,v=u.boundaryGap;s.x=0,s.y=f.y+v[0];function h(g){return g.name}var c=new Na(this._layersSeries||[],l,h,h),p=[];c.add(X(d,this,"add")).update(X(d,this,"update")).remove(X(d,this,"remove")).execute();function d(g,y,m){var _=o._layers;if(g==="remove"){s.remove(_[y]);return}for(var S=[],b=[],x,w=l[y].indices,T=0;Ti&&(i=s),a.push(s)}for(var u=0;ui&&(i=v)}return{y0:n,max:i}}function WY(r){r.registerChartView(VY),r.registerSeriesModel(GY),r.registerLayout(FY),r.registerProcessor(Ss("themeRiver"))}var $Y=2,UY=4,YY=function(r){B(e,r);function e(t,a,n,i){var o=r.call(this)||this;o.z2=$Y,o.textConfig={inside:!0},ut(o).seriesIndex=a.seriesIndex;var s=new Mt({z2:UY,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,a,n,i),o}return e.prototype.updateData=function(t,a,n,i,o){this.node=a,a.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var s=this;ut(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=jo(c,o));var p=ia(l.getModel("itemStyle"),v,!0);G(v,p),A(Ge,function(m){var _=s.ensureState(m),S=l.getModel([m,"itemStyle"]);_.style=S.getItemStyle();var b=ia(S,v);b&&(_.shape=b)}),t?(s.setShape(v),s.shape.r=f.r0,Wt(s,{shape:{r:f.r}},n,a.dataIndex)):(Dt(s,{shape:v},n),wr(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"?Ml(a.getAncestorsIndices(),a.getDescendantIndices()):g==="ancestor"?a.getAncestorsIndices():g==="descendant"?a.getDescendantIndices():g;$t(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){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&&!Pl(R-P)&&R0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,t,a,n):(o.virtualPiece=new Tw(m,t,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)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(a){var n=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&o.piece&&o.piece===a.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var f=l.get("target",!0)||"_blank";xv(u,f)}}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:cy,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,a){var n=a.getData(),i=n.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="sunburst",e}(Ft);const KY=qY;var jY=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,a){var n={name:t.name,children:t.data};CP(n);var i=this._levelModels=$(t.levels||[],function(l){return new Lt(l,this,a)},this),o=c0.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,f){var v=o.getNodeByDataIndex(f),h=i[v.depth];return h&&(u.parentModel=h),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treePathInfo=Uh(n,this),a},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){D2(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(Yt);function CP(r){var e=0;A(r.children,function(a){CP(a);var n=a.value;W(n)&&(n=n[0]),e+=n});var t=r.value;W(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),W(r.value)?r.value[0]=t:r.value=t}const JY=jY;var Aw=Math.PI/180;function QY(r,e,t){e.eachSeriesByType(r,function(a){var n=a.get("center"),i=a.get("radius");W(i)||(i=[0,i]),W(n)||(n=[n,n]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=Y(n[0],o),f=Y(n[1],s),v=Y(i[0],l/2),h=Y(i[1],l/2),c=-a.get("startAngle")*Aw,p=a.get("minAngle")*Aw,d=a.getData().tree.root,g=a.getViewRoot(),y=g.depth,m=a.get("sort");m!=null&&AP(g,m);var _=0;A(g.children,function(R){!isNaN(R.getValue())&&_++});var S=g.getValue(),b=Math.PI/(S||_)*2,x=g.depth>0,w=g.height-(x?-1:1),T=(h-v)/(w||1),C=a.get("clockwise"),M=a.get("stillShowZeroSum"),D=C?1:-1,I=function(R,O){if(R){var E=O;if(R!==d){var N=R.getValue(),z=S===0&&M?b:N*b;z1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",e);return a.depth>1&&Z(s)&&(s=Fd(s,(a.depth-1)/(i-1)*.5)),s}r.eachSeriesByType("sunburst",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=t(o,a,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");G(u,l)})})}function r7(r){r.registerChartView(KY),r.registerSeriesModel(JY),r.registerLayout(dt(QY,"sunburst")),r.registerProcessor(dt(Ss,"sunburst")),r.registerVisual(e7),XY(r)}var Mw={color:"fill",borderColor:"stroke"},a7={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},La=St(),n7=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,a){return Wa(null,this)},e.prototype.getDataParams=function(t,a,n){var i=r.prototype.getDataParams.call(this,t,a);return n&&(i.info=La(n).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(Yt);const i7=n7;function o7(r,e){return e=e||[0,0],$(["x","y"],function(t,a){var n=this.getAxis(t),i=e[a],o=r[a]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}function s7(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:X(o7,r)}}}function l7(r,e){return e=e||[0,0],$([0,1],function(t){var a=e[t],n=r[t]/2,i=[],o=[];return i[t]=a-n,o[t]=a+n,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function u7(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:X(l7,r)}}}function f7(r,e){var t=this.getAxis(),a=e instanceof Array?e[0]:e,n=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(a-n)-t.dataToCoord(a+n))}function v7(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:X(f7,r)}}}function h7(r,e){return e=e||[0,0],$(["Radius","Angle"],function(t,a){var n="get"+t+"Axis",i=this[n](),o=e[a],s=r[a]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function c7(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),a=e.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:a[1],r0:a[0]},api:{coord:function(n){var i=e.dataToRadius(n[0]),o=t.dataToAngle(n[1]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:X(h7,r)}}}function p7(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(a,n){return r.dataToPoint(a,n)},layout:function(a,n){return r.dataToLayout(a,n)}}}}function d7(r){var e=r.getRect();return{coordSys:{type:"matrix",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t,a){return r.dataToPoint(t,a)},layout:function(t,a){return r.dataToLayout(t,a)}}}}function MP(r,e,t,a){return r&&(r.legacy||r.legacy!==!1&&!t&&!a&&e!=="tspan"&&(e==="text"||q(r,"text")))}function DP(r,e,t){var a=r,n,i,o;if(e==="text")o=a;else{o={},q(a,"text")&&(o.text=a.text),q(a,"rich")&&(o.rich=a.rich),q(a,"textFill")&&(o.fill=a.textFill),q(a,"textStroke")&&(o.stroke=a.textStroke),q(a,"fontFamily")&&(o.fontFamily=a.fontFamily),q(a,"fontSize")&&(o.fontSize=a.fontSize),q(a,"fontStyle")&&(o.fontStyle=a.fontStyle),q(a,"fontWeight")&&(o.fontWeight=a.fontWeight),i={type:"text",style:o,silent:!0},n={};var s=q(a,"textPosition");t?n.position=s?a.textPosition:"inside":s&&(n.position=a.textPosition),q(a,"textPosition")&&(n.position=a.textPosition),q(a,"textOffset")&&(n.offset=a.textOffset),q(a,"textRotation")&&(n.rotation=a.textRotation),q(a,"textDistance")&&(n.distance=a.textDistance)}return Dw(o,r),A(o.rich,function(l){Dw(l,l)}),{textConfig:n,textContent:i}}function Dw(r,e){e&&(e.font=e.textFont||e.font,q(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),q(e,"textAlign")&&(r.align=e.textAlign),q(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),q(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),q(e,"textWidth")&&(r.width=e.textWidth),q(e,"textHeight")&&(r.height=e.textHeight),q(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),q(e,"textPadding")&&(r.padding=e.textPadding),q(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),q(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),q(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),q(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),q(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),q(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),q(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function Lw(r,e,t){var a=r;a.textPosition=a.textPosition||t.position||"inside",t.offset!=null&&(a.textOffset=t.offset),t.rotation!=null&&(a.textRotation=t.rotation),t.distance!=null&&(a.textDistance=t.distance);var n=a.textPosition.indexOf("inside")>=0,i=r.fill||V.color.neutral99;Iw(a,e);var o=a.textFill==null;return n?o&&(a.textFill=t.insideFill||V.color.neutral00,!a.textStroke&&t.insideStroke&&(a.textStroke=t.insideStroke),!a.textStroke&&(a.textStroke=i),a.textStrokeWidth==null&&(a.textStrokeWidth=2)):(o&&(a.textFill=r.fill||t.outsideFill||V.color.neutral00),!a.textStroke&&t.outsideStroke&&(a.textStroke=t.outsideStroke)),a.text=e.text,a.rich=e.rich,A(e.rich,function(s){Iw(s,s)}),a}function Iw(r,e){e&&(q(e,"fill")&&(r.textFill=e.fill),q(e,"stroke")&&(r.textStroke=e.fill),q(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),q(e,"font")&&(r.font=e.font),q(e,"fontStyle")&&(r.fontStyle=e.fontStyle),q(e,"fontWeight")&&(r.fontWeight=e.fontWeight),q(e,"fontSize")&&(r.fontSize=e.fontSize),q(e,"fontFamily")&&(r.fontFamily=e.fontFamily),q(e,"align")&&(r.textAlign=e.align),q(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),q(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),q(e,"width")&&(r.textWidth=e.width),q(e,"height")&&(r.textHeight=e.height),q(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),q(e,"padding")&&(r.textPadding=e.padding),q(e,"borderColor")&&(r.textBorderColor=e.borderColor),q(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),q(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),q(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),q(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),q(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),q(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),q(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),q(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),q(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),q(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var LP={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Pw=bt(LP);fa(ha,function(r,e){return r[e]=1,r},{});ha.join(", ");var Xv=["","style","shape","extra"],ns=St();function k0(r,e,t,a,n){var i=r+"Animation",o=hs(r,a,n)||{},s=ns(e).userDuring;return o.duration>0&&(o.during=s?X(S7,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),G(o,t[i]),o}function Qf(r,e,t,a){a=a||{};var n=a.dataIndex,i=a.isInit,o=a.clearStyle,s=t.isAnimationEnabled(),l=ns(r),u=e.style;l.userDuring=e.during;var f={},v={};if(b7(r,e,v),r.type==="compound")for(var h=r.shape.paths,c=e.shape.paths,p=0;p0&&r.animateFrom(g,y)}else y7(r,e,n||0,t,f);IP(r,e),u?r.dirty():r.markRedraw()}function IP(r,e){for(var t=ns(r).leaveToProps,a=0;a0&&r.animateFrom(n,i)}}function m7(r,e){q(e,"silent")&&(r.silent=e.silent),q(e,"ignore")&&(r.ignore=e.ignore),r instanceof br&&q(e,"invisible")&&(r.invisible=e.invisible),r instanceof xt&&q(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var Xr={},_7={setTransform:function(r,e){return Xr.el[r]=e,this},getTransform:function(r){return Xr.el[r]},setShape:function(r,e){var t=Xr.el,a=t.shape||(t.shape={});return a[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=Xr.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=Xr.el,a=t.style;return a&&(a[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=Xr.el.style;if(e)return e[r]},setExtra:function(r,e){var t=Xr.el.extra||(Xr.el.extra={});return t[r]=e,this},getExtra:function(r){var e=Xr.el.extra;if(e)return e[r]}};function S7(){var r=this,e=r.el;if(e){var t=ns(e).userDuring,a=r.userDuring;if(t!==a){r.el=r.userDuring=null;return}Xr.el=e,a(_7)}}function Rw(r,e,t,a){var n=t[r];if(n){var i=e[r],o;if(i){var s=t.transition,l=n.transition;if(l)if(!o&&(o=a[r]={}),ki(l))G(o,i);else for(var u=Vt(l),f=0;f=0){!o&&(o=a[r]={});for(var c=bt(i),f=0;f=0)){var h=r.getAnimationStyleProps(),c=h?h.style:null;if(c){!i&&(i=a.style={});for(var p=bt(t),u=0;u=0?e.getStore().get(E,R):void 0}var N=e.get(O.name,R),z=O&&O.ordinalMeta;return z?z.categories[N]:N}function w(k,R){R==null&&(R=f);var O=e.getItemVisual(R,"style"),E=O&&O.fill,N=O&&O.opacity,z=_(R,hn).getItemStyle();E!=null&&(z.fill=E),N!=null&&(z.opacity=N);var F={inheritColor:Z(E)?E:V.color.neutral99},H=S(R,hn),U=Gt(H,null,F,!1,!0);U.text=H.getShallow("show")?Q(r.getFormattedLabel(R,hn),ts(e,R)):null;var K=_v(H,F,!1);return M(k,z),z=Lw(z,U,K),k&&C(z,k),z.legacy=!0,z}function T(k,R){R==null&&(R=f);var O=_(R,Ia).getItemStyle(),E=S(R,Ia),N=Gt(E,null,null,!0,!0);N.text=E.getShallow("show")?ar(r.getFormattedLabel(R,Ia),r.getFormattedLabel(R,hn),ts(e,R)):null;var z=_v(E,null,!0);return M(k,O),O=Lw(O,N,z),k&&C(O,k),O.legacy=!0,O}function C(k,R){for(var O in R)q(R,O)&&(k[O]=R[O])}function M(k,R){k&&(k.textFill&&(R.textFill=k.textFill),k.textPosition&&(R.textPosition=k.textPosition))}function D(k,R){if(R==null&&(R=f),q(Mw,k)){var O=e.getItemVisual(R,"style");return O?O[Mw[k]]:null}if(q(a7,k))return e.getItemVisual(R,k)}function I(k){if(o.type==="cartesian2d"){var R=o.getBaseAxis();return j5(ot({axis:R},k))}}function L(){return t.getCurrentSeriesIndices()}function P(k){return dm(k,t)}}function E7(r){var e={};return A(r.dimensions,function(t){var a=r.getDimensionInfo(t);if(!a.isExtraCoord){var n=a.coordDim,i=e[n]=e[n]||[];i[a.coordDimIndex]=r.getDimensionIndex(t)}}),e}function ed(r,e,t,a,n,i,o){if(!a){i.remove(e);return}var s=V0(r,e,t,a,n,i);return s&&o.setItemGraphicEl(t,s),s&&$t(s,a.focus,a.blurScope,a.emphasisDisabled),s}function V0(r,e,t,a,n,i){var o=-1,s=e;e&&EP(e,a,n)&&(o=gt(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=B0(a),s&&L7(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),a.tooltipDisabled&&(u.tooltipDisabled=!0),ur.normal.cfg=ur.normal.conOpt=ur.emphasis.cfg=ur.emphasis.conOpt=ur.blur.cfg=ur.blur.conOpt=ur.select.cfg=ur.select.conOpt=null,ur.isLegacy=!1,B7(u,t,a,n,l,ur),O7(u,t,a,n,l),N0(r,u,t,a,ur,n,l),q(a,"info")&&(La(u).info=a.info);for(var f=0;f=0?i.replaceAt(u,o):i.add(u),u}function EP(r,e,t){var a=La(r),n=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||n!=null&&n!==a.customGraphicType||n==="path"&&F7(i)&&OP(i)!==a.customPathData||n==="image"&&q(o,"image")&&o.image!==a.customImagePath}function O7(r,e,t,a,n){var i=t.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&EP(o,i,a)&&(o=null),o||(o=B0(i),r.setClipPath(o)),N0(null,o,e,i,null,a,n)}}function B7(r,e,t,a,n,i){if(!(r.isGroup||r.type==="compoundPath")){Ew(t,null,i),Ew(t,Ia,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=B0(o),r.setTextContent(f)),N0(null,f,e,o,null,a,n);for(var v=o&&o.style,h=0;h=f;c--){var p=e.childAt(c);V7(e,p,n)}}}function V7(r,e,t){e&&Xh(e,La(r).option,t)}function z7(r){new Na(r.oldChildren,r.newChildren,Ow,Ow,r).add(Bw).update(Bw).remove(G7).execute()}function Ow(r,e){var t=r&&r.name;return t??M7+e}function Bw(r,e){var t=this.context,a=r!=null?t.newChildren[r]:null,n=e!=null?t.oldChildren[e]:null;V0(t.api,n,t.dataIndex,a,t.seriesModel,t.group)}function G7(r){var e=this.context,t=e.oldChildren[r];t&&Xh(t,La(t).option,e.seriesModel)}function OP(r){return r&&(r.pathData||r.d)}function F7(r){return r&&(q(r,"pathData")||q(r,"d"))}function H7(r){r.registerChartView(P7),r.registerSeriesModel(i7)}var pi=St(),Nw=rt,rd=X,W7=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,a,n){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,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,e,t,a);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(a),this._lastGraphicKey=f;var v=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new at,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),a.getZr().add(s);else{var h=dt(Vw,t,v);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,t)}Gw(s,t,!0),this._renderHandle(i)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var a=t.get("animation"),n=e.axis,i=n.type==="category",o=t.get("snap");if(!o&&!i)return!1;if(a==="auto"||a==null){var s=this.animationThreshold;if(i&&n.getBandWidth()>s)return!0;if(o){var l=o0(e).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return a===!0},r.prototype.makeElOption=function(e,t,a,n,i){},r.prototype.createPointerEl=function(e,t,a,n){var i=t.pointer;if(i){var o=pi(e).pointerEl=new Yi[i.type](Nw(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,a,n){if(t.label){var i=pi(e).labelEl=new Mt(Nw(t.label));e.add(i),zw(i,n)}},r.prototype.updatePointerEl=function(e,t,a){var n=pi(e).pointerEl;n&&t.pointer&&(n.setStyle(t.pointer.style),a(n,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,a,n){var i=pi(e).labelEl;i&&(i.setStyle(t.label.style),a(i,{x:t.label.x,y:t.label.y}),zw(i,n))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,a=this._api.getZr(),n=this._handle,i=t.getModel("handle"),o=t.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=su(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){ka(u.event)},onmousedown:rd(this._onHandleDragMove,this,0,0),drift:rd(this._onHandleDragMove,this),ondragend:rd(this._onHandleDragEnd,this)}),a.add(n)),Gw(n,t,!1),n.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");W(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,ys(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){Vw(this._axisPointerModel,!t&&this._moveAnimation,this._handle,ad(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var a=this._handle;if(a){this._dragging=!0;var n=this.updateHandleTransform(ad(a),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=n,a.stopAnimation(),a.attr(ad(n)),pi(a).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,a=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:a.axis.dim,axisIndex:a.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),a=this._group,n=this._handle;t&&a&&(this._lastGraphicKey=null,a&&t.remove(a),n&&t.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),Gl(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,a){return a=a||0,{x:e[a],y:e[1-a],width:t[a],height:t[1-a]}},r}();function Vw(r,e,t,a){BP(pi(t).lastProp,a)||(pi(t).lastProp=a,e?Dt(t,a,r):(t.stopAnimation(),t.attr(a)))}function BP(r,e){if(st(r)&&st(e)){var t=!0;return A(e,function(a,n){t=t&&BP(r[n],a)}),!!t}else return r===e}function zw(r,e){r[e.get(["label","show"])?"show":"hide"]()}function ad(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function Gw(r,e,t){var a=e.get("z"),n=e.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(a!=null&&(i.z=a),n!=null&&(i.zlevel=n),i.silent=t)})}const G0=W7;function F0(r){var e=r.get("type"),t=r.getModel(e+"Style"),a;return e==="line"?(a=t.getLineStyle(),a.fill=null):e==="shadow"&&(a=t.getAreaStyle(),a.stroke=null),a}function NP(r,e,t,a,n){var i=t.get("value"),o=VP(i,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=lu(s.get("padding")||0),u=s.getFont(),f=gh(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),$7(v,h,c,a);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),r.label={x:v[0],y:v[1],style:Gt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function $7(r,e,t,a){var n=a.getWidth(),i=a.getHeight();r[0]=Math.min(r[0]+e,n)-e,r[1]=Math.min(r[1]+t,i)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function VP(r,e,t,a,n){r=e.scale.parse(r);var i=e.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:Iv(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};A(a,function(l){var u=t.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,v=u&&u.getDataParams(f);v&&s.seriesData.push(v)}),Z(o)?i=o.replace("{value}",i):et(o)&&(i=o(s))}return i}function H0(r,e,t){var a=xe();return Ln(a,a,t.rotation),va(a,a,t.position),Rr([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],a)}function zP(r,e,t,a,n,i){var o=Va.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=n.get(["label","margin"]),NP(e,a,n,i,{position:H0(a.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function W0(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function GP(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function Fw(r,e,t,a,n,i){return{cx:r,cy:e,r0:t,r:a,startAngle:n,endAngle:i,clockwise:!0}}var U7=function(r){B(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var s=n.axis,l=s.grid,u=i.get("type"),f=Hw(l,s).getOtherAxis(s).getGlobalExtent(),v=s.toGlobalCoord(s.dataToCoord(a,!0));if(u&&u!=="none"){var h=F0(i),c=Y7[u](s,v,f);c.style=h,t.graphicKey=c.type,t.pointer=c}var p=Fv(l.getRect(),n);zP(a,t,p,n,i,o)},e.prototype.getHandleTransform=function(t,a,n){var i=Fv(a.axis.grid.getRect(),a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=H0(a.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,n,i){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=Hw(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,v=[t.x,t.y];v[f]+=a[f],v[f]=Math.min(l[1],v[f]),v[f]=Math.max(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:t.rotation,cursorPoint:c,tooltipOption:p[f]}},e}(G0);function Hw(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var Y7={line:function(r,e,t){var a=W0([e,t[0]],[e,t[1]],Ww(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=Math.max(1,r.getBandWidth()),n=t[1]-t[0];return{type:"Rect",shape:GP([e-a/2,t[0]],[a,n],Ww(r))}}};function Ww(r){return r.dim==="x"?0:1}const Z7=U7;var X7=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:V.color.border,width:1,type:"dashed"},shadowStyle:{color:V.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:V.color.neutral00,padding:[5,7,5,7],backgroundColor:V.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:V.color.accent40,throttle:40}},e}(Ct);const q7=X7;var Aa=St(),K7=A;function FP(r,e,t){if(!It.node){var a=e.getZr();Aa(a).records||(Aa(a).records={}),j7(a,e);var n=Aa(a).records[r]||(Aa(a).records[r]={});n.handler=t}}function j7(r,e){if(Aa(r).initialized)return;Aa(r).initialized=!0,t("click",dt($w,"click")),t("mousemove",dt($w,"mousemove")),t("globalout",Q7);function t(a,n){r.on(a,function(i){var o=tZ(e);K7(Aa(r).records,function(s){s&&n(s,i,o.dispatchAction)}),J7(o.pendings,e)})}}function J7(r,e){var t=r.showTip.length,a=r.hideTip.length,n;t?n=r.showTip[t-1]:a&&(n=r.hideTip[a-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function Q7(r,e,t){r.handler("leave",null,t)}function $w(r,e,t,a){e.handler(r,t,a)}function tZ(r){var e={showTip:[],hideTip:[]},t=function(a){var n=e[a.type];n?n.push(a):(a.dispatchAction=t,r.dispatchAction(a))};return{dispatchAction:t,pendings:e}}function gy(r,e){if(!It.node){var t=e.getZr(),a=(Aa(t).records||{})[r];a&&(Aa(t).records[r]=null)}}var eZ=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=a.getComponent("tooltip"),o=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";FP("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})})},e.prototype.remove=function(t,a){gy("axisPointer",a)},e.prototype.dispose=function(t,a){gy("axisPointer",a)},e.type="axisPointer",e}(Xt);const rZ=eZ;function HP(r,e){var t=[],a=r.seriesIndex,n;if(a==null||!(n=e.getSeriesByIndex(a)))return{point:[]};var i=n.getData(),o=Oi(i,r);if(o==null||o<0||W(o))return{point:[]};var s=i.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)t=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),t=l.dataToPoint(d)||[]}else t=l.dataToPoint(i.getValues($(l.dimensions,function(y){return i.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),t=[g.x+g.width/2,g.y+g.height/2]}return{point:t,el:s}}var Uw=St();function aZ(r,e,t){var a=r.currTrigger,n=[r.x,r.y],i=r,o=r.dispatchAction||X(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){tv(n)&&(n=HP({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var l=tv(n),u=i.axesInfo,f=s.axesInfo,v=a==="leave"||tv(n),h={},c={},p={list:[],map:{}},d={showPointer:dt(iZ,c),showTooltip:dt(oZ,p)};A(s.coordSysMap,function(y,m){var _=l||y.containPoint(n);A(s.coordSysAxesInfo[m],function(S,b){var x=S.axis,w=fZ(u,S);if(!v&&_&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=x.pointToData(n)),T!=null&&Yw(S,T,d,!1,h)}})});var g={};return A(f,function(y,m){var _=y.linkGroup;_&&!c[m]&&A(_.axesInfo,function(S,b){var x=c[b];if(S!==y&&x){var w=x.value;_.mapper&&(w=y.axis.scale.parse(_.mapper(w,Zw(S),Zw(y)))),g[y.key]=w}})}),A(g,function(y,m){Yw(f[m],y,d,!0,h)}),sZ(c,f,h),lZ(p,n,r,o),uZ(f,o,t),h}}function Yw(r,e,t,a,n){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=nZ(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&G(n,s[0]),!a&&r.snap&&i.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function nZ(r,e){var t=e.axis,a=t.dim,n=r,i=[],o=Number.MAX_VALUE,s=-1;return A(e.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(a),v,h;if(l.getAxisTooltipData){var c=l.getAxisTooltipData(f,r,t);h=c.dataIndices,v=c.nestestValue}else{if(h=l.indicesOfNearest(a,f[0],r,t.type==="category"?.5:null),!h.length)return;v=l.getData().get(f[0],h[0])}if(!(v==null||!isFinite(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 iZ(r,e,t,a){r[e.key]={value:t,payloadBatch:a}}function oZ(r,e,t,a){var n=t.payloadBatch,i=e.axis,o=i.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!n.length)){var l=e.coordSys.model,u=ql(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 sZ(r,e,t){var a=t.axesInfo=[];A(e,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 lZ(r,e,t,a){if(tv(e)||!r.list.length){a({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function uZ(r,e,t){var a=t.getZr(),n="axisPointerLastHighlights",i=Uw(a)[n]||{},o=Uw(a)[n]={};A(r,function(u,f){var v=u.axisPointerModel.option;v.status==="show"&&u.triggerEmphasis&&A(v.seriesDataIndices,function(h){var c=h.seriesIndex+" | "+h.dataIndex;o[c]=h})});var s=[],l=[];A(i,function(u,f){!o[f]&&l.push(u)}),A(o,function(u,f){!i[f]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function fZ(r,e){for(var t=0;t<(r||[]).length;t++){var a=r[t];if(e.axis.dim===a.axisDim&&e.axis.model.componentIndex===a.axisIndex)return a}}function Zw(r){var e=r.axis.model,t={},a=t.axisDim=r.axis.dim;return t.axisIndex=t[a+"AxisIndex"]=e.componentIndex,t.axisName=t[a+"AxisName"]=e.name,t.axisId=t[a+"AxisId"]=e.id,t}function tv(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function _u(r){Qi.registerAxisPointerClass("CartesianAxisPointer",Z7),r.registerComponentModel(q7),r.registerComponentView(rZ),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!W(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=zH(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},aZ)}function vZ(r){mt(f2),mt(_u)}var hZ=function(r){B(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var s=n.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),f=u.getExtent(),v=s.dataToCoord(a),h=i.get("type");if(h&&h!=="none"){var c=F0(i),p=pZ[h](s,l,v,f);p.style=c,t.graphicKey=p.type,t.pointer=p}var d=i.get(["label","margin"]),g=cZ(a,n,i,l,d);NP(t,n,i,o,g)},e}(G0);function cZ(r,e,t,a,n){var i=e.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=xe();Ln(h,h,s),va(h,h,[a.cx,a.cy]),u=Rr([o,-n],h);var c=e.getModel("axisLabel").get("rotate")||0,p=Va.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 pZ={line:function(r,e,t,a){return r.dim==="angle"?{type:"Line",shape:W0(e.coordToPoint([a[0],t]),e.coordToPoint([a[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,a){var n=Math.max(1,r.getBandWidth()),i=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:Fw(e.cx,e.cy,a[0],a[1],(-t-n/2)*i,(-t+n/2)*i)}:{type:"Sector",shape:Fw(e.cx,e.cy,t-n/2,t+n/2,0,Math.PI*2)}}};const dZ=hZ;var gZ=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var a,n=this.ecModel;return n.eachComponent(t,function(i){i.getCoordSysModel()===this&&(a=i)},this),a},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Ct);const yZ=gZ;var $0=function(r){B(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",qt).models[0]},e.type="polarAxis",e}(Ct);se($0,cu);var mZ=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}($0),_Z=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}($0),U0=function(r){B(e,r);function e(t,a){return r.call(this,"radius",t,a)||this}return e.prototype.pointToData=function(t,a){return this.polar.pointToData(t,a)[this.dim==="radius"?0:1]},e}(Gr);U0.prototype.dataToRadius=Gr.prototype.dataToCoord;U0.prototype.radiusToData=Gr.prototype.coordToData;const SZ=U0;var xZ=St(),Y0=function(r){B(e,r);function e(t,a){return r.call(this,"angle",t,a||[0,360])||this}return e.prototype.pointToData=function(t,a){return this.polar.pointToData(t,a)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,a=t.getLabelModel(),n=t.scale,i=n.getExtent(),o=n.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),f=gh(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=xZ(t.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},e}(Gr);Y0.prototype.dataToAngle=Gr.prototype.dataToCoord;Y0.prototype.angleToData=Gr.prototype.coordToData;const bZ=Y0;var WP=["radius","angle"],wZ=function(){function r(e){this.dimensions=WP,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new SZ,this._angleAxis=new bZ,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],a=this._angleAxis,n=this._radiusAxis;return a.scale.type===e&&t.push(a),n.scale.type===e&&t.push(n),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t,a){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)],a)},r.prototype.pointToData=function(e,t,a){a=a||[];var n=this.pointToCoord(e);return a[0]=this._radiusAxis.radiusToData(n[0],t),a[1]=this._angleAxis.angleToData(n[1],t),a},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,a=e[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(t*t+a*a);t/=l,a/=l;for(var u=Math.atan2(-a,t)/Math.PI*180,f=us;)u+=f*360;return[l,u]},r.prototype.coordToPoint=function(e,t){t=t||[];var a=e[0],n=e[1]/180*Math.PI;return t[0]=Math.cos(n)*a+this.cx,t[1]=-Math.sin(n)*a+this.cy,t},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),a=t.getExtent().slice();a[0]>a[1]&&a.reverse();var n=e.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:e.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(e,t,a){var n=Xw(t);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var n=Xw(t);return n===this?this.pointToData(a):null},r}();function Xw(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}const TZ=wZ;function CZ(r,e,t){var a=e.get("center"),n=ce(e,t).refContainer;r.cx=Y(a[0],n.width)+n.x,r.cy=Y(a[1],n.height)+n.y;var i=r.getRadiusAxis(),o=Math.min(n.width,n.height)/2,s=e.get("radius");s==null?s=[0,"100%"]:W(s)||(s=[0,s]);var l=[Y(s[0],o),Y(s[1],o)];i.inverse?i.setExtent(l[1],l[0]):i.setExtent(l[0],l[1])}function AZ(r,e){var t=this,a=t.getAngleAxis(),n=t.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();A(Pv(l,"radius"),function(u){n.scale.unionExtentFromData(l,u)}),A(Pv(l,"angle"),function(u){a.scale.unionExtentFromData(l,u)})}}),Jo(a.scale,a.model),Jo(n.scale,n.model),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 MZ(r){return r.mainType==="angleAxis"}function qw(r,e){var t;if(r.type=e.get("type"),r.scale=Vh(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),MZ(e)){r.inverse=r.inverse!==e.get("clockwise");var a=e.get("startAngle"),n=(t=e.get("endAngle"))!==null&&t!==void 0?t:a+(r.inverse?-360:360);r.setExtent(a,n)}e.axis=r,r.model=e}var DZ={dimensions:WP,create:function(r,e){var t=[];return r.eachComponent("polar",function(a,n){var i=new TZ(n+"");i.update=AZ;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");qw(o,l),qw(s,u),CZ(i,a,e),t.push(i),a.coordinateSystem=i,i.model=a}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="polar"){var n=a.getReferringComponents("polar",qt).models[0];a.coordinateSystem=n.coordinateSystem}}),t}};const LZ=DZ;var IZ=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Sf(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var a=r.coordToPoint([e[0],t]),n=r.coordToPoint([e[1],t]);return{x1:a[0],y1:a[1],x2:n[0],y2:n[1]}}function xf(r){var e=r.getRadiusAxis();return e.inverse?0:1}function Kw(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var PZ=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,a){if(this.group.removeAll(),!!t.get("show")){var n=t.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),s=n.getTicksCoords({breakTicks:"none"}),l=n.getMinorTicksCoords(),u=$(n.getViewLabels(),function(f){f=rt(f);var v=n.scale,h=v.type==="ordinal"?v.getRawOrdinalNumber(f.tickValue):f.tickValue;return f.coord=n.dataToCoord(h),f});Kw(u),Kw(s),A(IZ,function(f){t.get([f,"show"])&&(!n.scale.isBlank()||f==="axisLine")&&RZ[f](this.group,t,i,s,l,o,u)},this)}},e.type="angleAxis",e}(Qi),RZ={axisLine:function(r,e,t,a,n,i){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),f=xf(t),v=f?0:1,h,c=Math.abs(u[1]-u[0])===360?"Circle":"Arc";i[v]===0?h=new Yi[c]({shape:{cx:t.cx,cy:t.cy,r:i[f],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):h=new Ch({shape:{cx:t.cx,cy:t.cy,r:i[f],r0:i[v]},style:o.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,r.add(h)},axisTick:function(r,e,t,a,n,i){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[xf(t)],u=$(a,function(f){return new fe({shape:Sf(t,[l,l+s],f.coord)})});r.add(yr(u,{style:ot(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,a,n,i){if(n.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[xf(t)],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 b=s[p];st(b)&&b.textStyle&&(c=new Lt(b.textStyle,l,l.ecModel))}var x=new Mt({silent:Va.isLabelSilent(e),style:Gt(c,{x:g[0],y:g[1],fill:c.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:v.formattedLabel,align:_,verticalAlign:S})});if(r.add(x),Ha({el:x,componentModel:e,itemName:v.formattedLabel,formatterParamsExtra:{isTruncated:function(){return x.isTruncated},value:v.rawLabel,tickIndex:h}}),f){var w=Va.makeAxisEventDataBase(e);w.targetType="axisLabel",w.value=v.rawLabel,ut(x).eventData=w}},this)},splitLine:function(r,e,t,a,n,i){var o=e.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",k=C;b&&(a[f][L]||(a[f][L]={p:C,n:C}),k=a[f][L][P]);var R=void 0,O=void 0,E=void 0,N=void 0;if(p.dim==="radius"){var z=p.dataToCoord(I)-C,F=l.dataToCoord(L);Math.abs(z)=N})}}})}function GZ(r){var e={};A(r,function(a,n){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=UP(o,s),u=s.getExtent(),f=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),v=e[l]||{bandWidth:f,remainedWidth:f,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=v.stacks;e[l]=v;var c=$P(a);h[c]||v.autoWidthCount++,h[c]=h[c]||{width:0,maxWidth:0};var p=Y(a.get("barWidth"),f),d=Y(a.get("barMaxWidth"),f),g=a.get("barGap"),y=a.get("barCategoryGap");p&&!h[c].width&&(p=Math.min(v.remainedWidth,p),h[c].width=p,v.remainedWidth-=p),d&&(h[c].maxWidth=d),g!=null&&(v.gap=g),y!=null&&(v.categoryGap=y)});var t={};return A(e,function(a,n){t[n]={};var i=a.stacks,o=a.bandWidth,s=Y(a.categoryGap,o),l=Y(a.gap,1),u=a.remainedWidth,f=a.autoWidthCount,v=(u-s)/(f+(f-1)*l);v=Math.max(v,0),A(i,function(d,g){var y=d.maxWidth;y&&y=t.y&&e[1]<=t.y+t.height:a.contain(a.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e,t,a){a=a||[];var n=this.getAxis();return a[0]=n.coordToData(n.toLocalCoord(e[n.orient==="horizontal"?0:1])),a},r.prototype.dataToPoint=function(e,t,a){var n=this.getAxis(),i=this.getRect();a=a||[];var o=n.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),a[o]=n.toGlobalCoord(n.dataToCoord(+e)),a[1-o]=o===0?i.y+i.height/2:i.x+i.width/2,a},r.prototype.convertToPixel=function(e,t,a){var n=jw(t);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var n=jw(t);return n===this?this.pointToData(a):null},r}();function jw(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function JZ(r,e){var t=[];return r.eachComponent("singleAxis",function(a,n){var i=new jZ(a,r,e);i.name="single_"+n,i.resize(a,e),a.coordinateSystem=i,t.push(i)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var n=a.getReferringComponents("singleAxis",qt).models[0];a.coordinateSystem=n&&n.coordinateSystem}}),t}var QZ={create:JZ,dimensions:ZP};const t9=QZ;var Jw=["x","y"],e9=["width","height"],r9=function(r){B(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var s=n.axis,l=s.coordinateSystem,u=id(l,1-jv(s)),f=l.dataToPoint(a)[0],v=i.get("type");if(v&&v!=="none"){var h=F0(i),c=a9[v](s,f,u);c.style=h,t.graphicKey=c.type,t.pointer=c}var p=yy(n);zP(a,t,p,n,i,o)},e.prototype.getHandleTransform=function(t,a,n){var i=yy(a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=H0(a.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,n,i){var o=n.axis,s=o.coordinateSystem,l=jv(o),u=id(s,l),f=[t.x,t.y];f[l]+=a[l],f[l]=Math.min(u[1],f[l]),f[l]=Math.max(u[0],f[l]);var v=id(s,1-l),h=(v[1]+v[0])/2,c=[h,h];return c[l]=f[l],{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}(G0),a9={line:function(r,e,t){var a=W0([e,t[0]],[e,t[1]],jv(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=r.getBandWidth(),n=t[1]-t[0];return{type:"Rect",shape:GP([e-a/2,t[0]],[a,n],jv(r))}}};function jv(r){return r.isHorizontal()?0:1}function id(r,e){var t=r.getRect();return[t[Jw[e]],t[Jw[e]]+t[e9[e]]]}const n9=r9;var i9=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Xt);function o9(r){mt(_u),Qi.registerAxisPointerClass("SingleAxisPointer",n9),r.registerComponentView(i9),r.registerComponentView(XZ),r.registerComponentModel(nd),es(r,"single",nd,nd.defaultOption),r.registerCoordinateSystem("single",t9)}var s9=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a,n){var i=Xi(t);r.prototype.init.apply(this,arguments),Qw(t,i)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),Qw(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.layoutMode="box",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:V.color.axisLine,width:1,type:"solid"}},itemStyle:{color:V.color.neutral00,borderWidth:1,borderColor:V.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:V.size.s,color:V.color.secondary},monthLabel:{show:!0,position:"start",margin:V.size.s,align:"center",formatter:null,color:V.color.secondary},yearLabel:{show:!0,position:null,margin:V.size.xl,formatter:null,color:V.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Ct);function Qw(r,e){var t=r.cellSize,a;W(t)?a=t:a=r.cellSize=[t,t],a.length===1&&(a[1]=a[0]);var n=$([0,1],function(i){return DN(e,i)&&(a[i]="auto"),a[i]!=null&&a[i]!=="auto"});pa(r,e,{type:"box",ignoreSize:n})}const l9=s9;var u9=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=this.group;i.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=a.getLocaleModel();this._renderDayRect(t,s,i),this._renderLines(t,s,l,i),this._renderYearText(t,s,l,i),this._renderMonthText(t,u,l,i),this._renderWeekText(t,u,s,l,i)},e.prototype._renderDayRect=function(t,a,n){for(var i=t.coordinateSystem,o=t.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 _t({shape:{x:f[0],y:f[1],width:s,height:l},cursor:"default",style:o});n.add(v)}},e.prototype._renderLines=function(t,a,n,i){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.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(t,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)},e.prototype._getEdgesPoints=function(t,a,n){var i=[t[0].slice(),t[t.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},e.prototype._drawSplitline=function(t,a,n){var i=new Ee({z2:20,shape:{points:t},style:a});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,a,n){for(var i=t.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},e.prototype._formatterLabel=function(t,a){return Z(t)&&t?bN(t,a):et(t)?t(a):a.nameMap},e.prototype._yearTextPositionControl=function(t,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]}}},e.prototype._renderYearText=function(t,a,n,i){var o=t.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 Mt({z2:30,style:Gt(o,{text:y}),silent:o.get("silent")});m.attr(this._yearTextPositionControl(m,c[l],n,l,s)),i.add(m)}},e.prototype._monthTextPositionControl=function(t,a,n,i,o){var s="left",l="top",u=t[0],f=t[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}},e.prototype._renderMonthText=function(t,a,n,i){var o=t.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=pg(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&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],a;t[0].time>t[1].time&&(a=!0,t.reverse());var n=Math.floor(t[1].time/od)-Math.floor(t[0].time/od)+1,i=new Date(t[0].time),o=i.getDate(),s=t[1].date.getDate();i.setDate(o+n-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-t[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-t[1].time)*u>0;)n-=u,i.setDate(l-u);var f=Math.floor((n+t[0].day+6)/7),v=a?-f+1:f-1;return a&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:n,weeks:f,nthWeek:v,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,a){var n=this._getRangeInfo(a);if(e>n.weeks||e===0&&tn.lweek)return null;var i=(e-1)*7-n.fweek+t,o=new Date(n.start.time);return o.setDate(+n.start.d+i),this.getDateInfo(o)},r.create=function(e,t){var a=[];return e.eachComponent("calendar",function(n){var i=new r(n,e,t);a.push(i),n.coordinateSystem=i}),e.eachComponent(function(n,i){fu({targetModel:i,coordSysType:"calendar",coordSysProvider:oD})}),a},r.dimensions=["time","value"],r}();function sd(r){var e=r.calendarModel,t=r.seriesModel,a=e?e.coordinateSystem:t?t.coordinateSystem:null;return a}const h9=v9;function c9(r){r.registerComponentModel(l9),r.registerComponentView(f9),r.registerCoordinateSystem("calendar",h9)}var Ta={level:1,leaf:2,nonLeaf:3},Pa={none:0,all:1,body:2,corner:3};function my(r,e,t){var a=e[ct[t]].getCell(r);return!a&&wt(r)&&r<0&&(a=e[ct[1-t]].getUnitLayoutInfo(t,Math.round(r))),a}function XP(r){var e=r||[];return e[0]=e[0]||[],e[1]=e[1]||[],e[0][0]=e[0][1]=e[1][0]=e[1][1]=NaN,e}function qP(r,e,t,a,n){tT(r[0],e,n,t,a,0),tT(r[1],e,n,t,a,1)}function tT(r,e,t,a,n,i){r[0]=1/0,r[1]=-1/0;var o=a[i],s=W(o)?o:[o],l=s.length,u=!!t;if(l>=1?(eT(r,e,s,u,n,i,0),l>1&&eT(r,e,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;t===Pa.body?f=Jt(0,f):t===Pa.corner&&(v=nr(-1,v)),v=e[0]&&r[0]<=e[1]}function nT(r,e){r.id.set(e[0][0],e[1][0]),r.span.set(e[0][1]-r.id.x+1,e[1][1]-r.id.y+1)}function g9(r,e){r[0][0]=e[0][0],r[0][1]=e[0][1],r[1][0]=e[1][0],r[1][1]=e[1][1]}function iT(r,e,t,a){var n=my(e[a][0],t,a),i=my(e[a][1],t,a);r[ct[a]]=r[ne[a]]=NaN,n&&i&&(r[ct[a]]=n.xy,r[ne[a]]=i.xy+i.wh-n.xy)}function Xs(r,e,t,a){return r[ct[e]]=t,r[ct[1-e]]=a,r}function y9(r){return r&&(r.type===Ta.leaf||r.type===Ta.nonLeaf)?r:null}function Jv(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var oT=function(){function r(e,t){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e==="x"?0:1,this._model=t,this._uniqueValueGen=m9(e);var a=t.get("data",!0);a!=null&&!W(a)&&(a=[]),a?this._initByDimModelData(a):this._initBySeriesData()}return r.prototype._initByDimModelData=function(e){var t=this,a=t._cells,n=t._levels,i=[],o=0;t._leavesCount=s(e,0,0),l();return;function s(u,f,v){var h=0;return u&&A(u,function(c,p){var d;Z(c)?d={value:c}:st(c)?(d=c,c.value!=null&&!Z(c.value)&&(d={value:null})):d={value:null};var g={type:Ta.nonLeaf,ordinal:NaN,level:v,firstLeafLocator:f,id:new it,span:Xs(new it,t.dimIdx,1,1),option:d,xy:NaN,wh:NaN,dim:t,rect:Jv()};o++,(i[f]||(i[f]=[])).push(g),n[v]||(n[v]={type:Ta.level,xy:NaN,wh:NaN,option:null,id:new it,dim:t});var y=s(d.children,f,v+1),m=Math.max(1,y);g.span[ct[t.dimIdx]]=m,h+=m,f+=m}),h}function l(){for(var u=[];a.length=1,_=t[ct[a]],S=i.getLocatorCount(a)-1,b=new yn;for(o.resetLayoutIterator(b,a);b.next();)x(b.item);for(i.resetLayoutIterator(b,a);b.next();)x(b.item);function x(w){Pe(w.wh)&&(w.wh=y),w.xy=_,w.id[ct[a]]===S&&!m&&(w.wh=t[ct[a]]+t[ne[a]]-w.xy),_+=w.wh}}function cT(r,e){for(var t=e[ct[r]].resetCellIterator();t.next();){var a=t.item;Qv(a.rect,r,a.id,a.span,e),Qv(a.rect,1-r,a.id,a.span,e),a.type===Ta.nonLeaf&&(a.xy=a.rect[ct[r]],a.wh=a.rect[ne[r]])}}function pT(r,e){r.travelExistingCells(function(t){var a=t.span;if(a){var n=t.spanRect,i=t.id;Qv(n,0,i,a,e),Qv(n,1,i,a,e)}})}function Qv(r,e,t,a,n){r[ne[e]]=0;var i=t[ct[e]],o=i<0?n[ct[1-e]]:n[ct[e]],s=o.getUnitLayoutInfo(e,t[ct[e]]);if(r[ct[e]]=s.xy,r[ne[e]]=s.wh,a[ct[e]]>1){var l=o.getUnitLayoutInfo(e,t[ct[e]]+a[ct[e]]-1);r[ne[e]]=l.xy+l.wh-s.xy}}function k9(r,e,t){var a=cv(r,t[ne[e]]);return Sy(a,t[ne[e]])}function Sy(r,e){return Math.max(Math.min(r,Q(e,1/0)),0)}function fd(r){var e=r.matrixModel,t=r.seriesModel,a=e?e.coordinateSystem:t?t.coordinateSystem:null;return a}var Te={inBody:1,inCorner:2,outside:3},Yr={x:null,y:null,point:[]};function dT(r,e,t,a,n){var i=t[ct[e]],o=t[ct[1-e]],s=i.getUnitLayoutInfo(e,i.getLocatorCount(e)-1),l=i.getUnitLayoutInfo(e,0),u=o.getUnitLayoutInfo(e,-o.getLocatorCount(e)),f=o.shouldShow()?o.getUnitLayoutInfo(e,-1):null,v=r.point[e]=a[e];if(!l&&!f){r[ct[e]]=Te.outside;return}if(n===Pa.body){l?(r[ct[e]]=Te.inBody,v=nr(s.xy+s.wh,Jt(l.xy,v)),r.point[e]=v):r[ct[e]]=Te.outside;return}else if(n===Pa.corner){f?(r[ct[e]]=Te.inCorner,v=nr(f.xy+f.wh,Jt(u.xy,v)),r.point[e]=v):r[ct[e]]=Te.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[e]]=Te.outside;return}v=p}r.point[e]=v,r[ct[e]]=h<=v&&v<=p?Te.inBody:c<=v&&v<=h?Te.inCorner:Te.outside}function gT(r,e,t,a){var n=1-t;if(r[ct[t]]!==Te.outside)for(a[ct[t]].resetCellIterator(ud);ud.next();){var i=ud.item;if(mT(r.point[t],i.rect,t)&&mT(r.point[n],i.rect,n)){e[t]=i.ordinal,e[n]=i.id[ct[n]];return}}}function yT(r,e,t,a){if(r[ct[t]]!==Te.outside){var n=r[ct[t]]===Te.inCorner?a[ct[1-t]]:a[ct[t]];for(n.resetLayoutIterator(Af,t);Af.next();)if(E9(r.point[t],Af.item)){e[t]=Af.item.id[ct[t]];return}}}function E9(r,e){return e.xy<=r&&r<=e.xy+e.wh}function mT(r,e,t){return e[ct[t]]<=r&&r<=e[ct[t]]+e[ne[t]]}const O9=R9;function B9(r){r.registerComponentModel(w9),r.registerComponentView(P9),r.registerCoordinateSystem("matrix",O9)}function N9(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var a=e.parentOption;a?e.parentId=a.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function _T(r,e){var t;return A(e,function(a){r[a]!=null&&r[a]!=="auto"&&(t=!0)}),t}function V9(r,e,t){var a=G({},t),n=r[e],i=t.$action||"merge";i==="merge"?n?(yt(n,a,!0),pa(n,a,{ignoreSize:!0}),vD(t,n),Mf(t,n),Mf(t,n,"shape"),Mf(t,n,"style"),Mf(t,n,"extra"),t.clipPath=n.clipPath):r[e]=a:i==="replace"?r[e]=a:i==="remove"&&n&&(r[e]=null)}var jP=["transition","enterFrom","leaveTo"],z9=jP.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Mf(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var a=t?jP:z9,n=0;n=0;f--){var v=n[f],h=ue(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=Rh(c,v,m,null,{hv:v.hv,boundingMode:v.bounding},_);if(!pr(c).isNew&&S){for(var b=v.transition,x={},w=0;w=0)?x[T]=C:c[T]=C}Dt(c,x,t,0)}else c.attr(_)}}},e.prototype._clear=function(){var t=this,a=this._elMap;a.each(function(n){ev(n,pr(n).option,a,t._lastGraphicModel)}),this._elMap=j()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Xt);function xy(r){var e=q(ST,r)?ST[r]:mv(r),t=new e({});return pr(t).type=r,t}function xT(r,e,t,a){var n=xy(t);return e.add(n),a.set(r,n),pr(n).id=r,pr(n).isNew=!0,n}function ev(r,e,t,a){var n=r&&r.parent;n&&(r.type==="group"&&r.traverse(function(i){ev(i,e,t,a)}),Xh(r,e,a),t.removeKey(pr(r).id))}function bT(r,e,t,a){r.isGroup||A([["cursor",br.prototype.cursor],["zlevel",a||0],["z",t||0],["z2",0]],function(n){var i=n[0];q(e,i)?r[i]=Q(e[i],n[1]):r[i]==null&&(r[i]=n[1])}),A(bt(e),function(n){if(n.indexOf("on")===0){var i=e[n];r[n]=et(i)?i:null}}),q(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function W9(r){return r=G({},r),A(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(sD),function(e){delete r[e]}),r}function $9(r,e,t){var a=ut(r).eventData;!r.silent&&!r.ignore&&!a&&(a=ut(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),a&&(a.info=t.info)}function U9(r){r.registerComponentModel(F9),r.registerComponentView(H9),r.registerPreprocessor(function(e){var t=e.graphic;W(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var wT=["x","y","radius","angle","single"],Y9=["cartesian2d","polar","singleAxis"];function Z9(r){var e=r.get("coordinateSystem");return gt(Y9,e)>=0}function cn(r){return r+"Axis"}function X9(r,e){var t=j(),a=[],n=j();r.eachComponent({mainType:"dataZoom",query:e},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=t.get(h);p&&p[c]&&(v=!0)}),v}function u(f){f.eachTargetAxis(function(v,h){(t.get(v)||t.set(v,[]))[h]=!0})}return a}function JP(r){var e=r.ecModel,t={infoList:[],infoMap:j()};return r.eachTargetAxis(function(a,n){var i=e.getComponent(cn(a),n);if(i){var o=i.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(i)}}}),t}var vd=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r}(),q9=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,a,n){var i=TT(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var a=TT(t);yt(this.option,t,!0),yt(this.settledOption,a,!0),this._doInit(a)},e.prototype._doInit=function(t){var a=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);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()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),a=this._targetAxisInfoMap=j(),n=this._fillSpecifiedTargetAxis(a);n?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(a,this._orient)),this._noTarget=!0,a.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var a=!1;return A(wT,function(n){var i=this.getReferringComponents(cn(n),XE);if(i.specified){a=!0;var o=new vd;A(i.models,function(s){o.add(s.componentIndex)}),t.set(n,o)}},this),a},e.prototype._fillAutoTargetAxisByOrient=function(t,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 vd;if(h.add(v.componentIndex),t.set(f,h),i=!1,f==="x"||f==="y"){var c=v.getReferringComponents("grid",qt).models[0];c&&A(u,function(p){v.componentIndex!==p.componentIndex&&c===p.getReferringComponents("grid",qt).models[0]&&h.add(p.componentIndex)})}}}i&&A(wT,function(u){if(i){var f=n.findComponents({mainType:cn(u),filter:function(h){return h.get("type",!0)==="category"}});if(f[0]){var v=new vd;v.add(f[0].componentIndex),t.set(u,v),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(a){!t&&(t=a)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var a=this.ecModel.option;this.option.throttle=a.animation&&a.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var a=this._rangePropMode,n=this.get("rangeMode");A([["start","startValue"],["end","endValue"]],function(i,o){var s=t[i[0]]!=null,l=t[i[1]]!=null;s&&!l?a[o]="percent":!s&&l?a[o]="value":n?a[o]=n[o]:s&&(a[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(a,n){t==null&&(t=this.ecModel.getComponent(cn(a),n))},this),t},e.prototype.eachTargetAxis=function(t,a){this._targetAxisInfoMap.each(function(n,i){A(n.indexList,function(o){t.call(a,i,o)})})},e.prototype.getAxisProxy=function(t,a){var n=this.getAxisModel(t,a);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,a){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[a])return this.ecModel.getComponent(cn(t),a)},e.prototype.setRawRange=function(t){var a=this.option,n=this.settledOption;A([["start","startValue"],["end","endValue"]],function(i){(t[i[0]]!=null||t[i[1]]!=null)&&(a[i[0]]=n[i[0]]=t[i[0]],a[i[1]]=n[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var a=this.option;A(["start","startValue","end","endValue"],function(n){a[n]=t[n]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,a){if(t==null&&a==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(t,a).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var a,n=this._targetAxisInfoMap.keys(),i=0;io[1];if(_&&!S&&!b)return!0;_&&(g=!0),S&&(p=!0),b&&(d=!0)}return g&&p&&d})}else Ro(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)}});Ro(f,function(c){u.setApproximateExtent(o,c)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,a=this._dataExtent;Ro(["min","max"],function(n){var i=t.get(n+"Span"),o=t.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=Rt(a[0]+o,a,[0,100],!0):i!=null&&(o=Rt(i,[0,100],a,!0)-a[0]),e[n+"Span"]=i,e[n+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,a=this._valueWindow;if(t){var n=PA(a,[0,500]);n=Math.min(n,20);var i=e.axis.scale.rawExtentInfo;t[0]!==0&&i.setDeterminedMinMax("min",+a[0].toFixed(n)),t[1]!==100&&i.setDeterminedMinMax("max",+a[1].toFixed(n)),i.freeze()}},r}();function rX(r,e,t){var a=[1/0,-1/0];Ro(t,function(o){yG(a,o.getData(),e)});var n=r.getAxisModel(),i=ZL(n.axis.scale,n,a).calculate();return[i.min,i.max]}const aX=eX;var nX={getTargetSeries:function(r){function e(n){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(cn(o),s);n(o,s,l,i)})})}e(function(n,i,o,s){o.__dzAxisProxy=null});var t=[];e(function(n,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new aX(n,i,s,r),t.push(o.__dzAxisProxy))});var a=j();return A(t,function(n){A(n.getTargetSeriesModels(),function(i){a.set(i.uid,i)})}),a},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(a,n){t.getAxisProxy(a,n).reset(t)}),t.eachTargetAxis(function(a,n){t.getAxisProxy(a,n).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var a=t.findRepresentativeAxisProxy();if(a){var n=a.getDataPercentWindow(),i=a.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}};const iX=nX;function oX(r){r.registerAction("dataZoom",function(e,t){var a=X9(t,e);A(a,function(n){n.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var AT=!1;function K0(r){AT||(AT=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,iX),oX(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function sX(r){r.registerComponentModel(j9),r.registerComponentView(tX),K0(r)}var gr=function(){function r(){}return r}(),QP={};function ko(r,e){QP[r]=e}function tR(r){return QP[r]}var lX=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;A(this.option.feature,function(a,n){var i=tR(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),yt(a,i.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:V.color.border,borderRadius:0,borderWidth:0,padding:V.size.m,itemSize:15,itemGap:V.size.s,showTitle:!0,iconStyle:{borderColor:V.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:V.color.accent50}},tooltip:{show:!1,position:"bottom"}},e}(Ct);const uX=lX;function eR(r,e){var t=lu(e.get("padding")),a=e.getItemStyle(["color","opacity"]);a.fill=e.get("backgroundColor");var n=new _t({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:a,silent:!0,z2:-1});return n}var fX=function(r){B(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n,i){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},f=this._features||(this._features={}),v=[];A(u,function(m,_){v.push(_)}),new Na(this._featureNames||[],v).add(h).update(h).remove(dt(h,null)).execute(),this._featureNames=v;function h(m,_){var S=v[m],b=v[_],x=u[S],w=new Lt(x,t,t.ecModel),T;if(i&&i.newTitle!=null&&i.featureName===S&&(x.title=i.newTitle),S&&!b){if(vX(S))T={onclick:w.option.onclick,featureName:S};else{var C=tR(S);if(!C)return;T=new C}f[S]=T}else if(T=f[b],!T)return;T.uid=ps("toolbox-feature"),T.model=w,T.ecModel=a,T.api=n;var M=T instanceof gr;if(!S&&b){M&&T.dispose&&T.dispose(a,n);return}if(!w.get("show")||M&&T.unusable){M&&T.remove&&T.remove(a,n);return}c(w,T,S),w.setIconStatus=function(D,I){var L=this.option,P=this.iconPaths;L.iconStatus=L.iconStatus||{},L.iconStatus[D]=I,P[D]&&(I==="emphasis"?Oa:Ba)(P[D])},T instanceof gr&&T.render&&T.render(w,a,n,i)}function c(m,_,S){var b=m.getModel("iconStyle"),x=m.getModel(["emphasis","iconStyle"]),w=_ instanceof gr&&_.getIcons?_.getIcons():m.get("icon"),T=m.get("title")||{},C,M;Z(w)?(C={},C[S]=w):C=w,Z(T)?(M={},M[S]=T):M=T;var D=m.iconPaths={};A(C,function(I,L){var P=su(I,{},{x:-s/2,y:-s/2,width:s,height:s});P.setStyle(b.getItemStyle());var k=P.ensureState("emphasis");k.style=x.getItemStyle();var R=new Mt({style:{text:M[L],align:x.get("textAlign"),borderRadius:x.get("textBorderRadius"),padding:x.get("textPadding"),fill:null,font:dm({fontStyle:x.get("textFontStyle"),fontFamily:x.get("textFontFamily"),fontSize:x.get("textFontSize"),fontWeight:x.get("textFontWeight")},a)},ignore:!0});P.setTextContent(R),Ha({el:P,componentModel:t,itemName:L,formatterParamsExtra:{title:M[L]}}),P.__title=M[L],P.on("mouseover",function(){var O=x.getItemStyle(),E=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";R.setStyle({fill:x.get("textFill")||O.fill||O.stroke||V.color.neutral99,backgroundColor:x.get("textBackgroundColor")}),P.setTextConfig({position:x.get("textPosition")||E}),R.ignore=!t.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){m.get(["iconStatus",L])!=="emphasis"&&n.leaveEmphasis(this),R.hide()}),(m.get(["iconStatus",L])==="emphasis"?Oa:Ba)(P),o.add(P),P.on("click",X(_.onclick,_,a,n,L)),D[L]=P})}var p=ce(t,n).refContainer,d=t.getBoxLayoutParams(),g=t.get("padding"),y=Ut(d,p,g);Ii(t.get("orient"),o,t.get("itemGap"),y.width,y.height),Rh(o,d,p,g),o.add(eR(o.getBoundingRect(),t)),l||o.eachChild(function(m){var _=m.__title,S=m.ensureState("emphasis"),b=S.textConfig||(S.textConfig={}),x=m.getTextContent(),w=x&&x.ensureState("emphasis");if(w&&!et(w)&&_){var T=w.style||(w.style={}),C=gh(_,Mt.makeFont(T)),M=m.x+o.x,D=m.y+o.y+s,I=!1;D+C.height>n.getHeight()&&(b.position="top",I=!0);var L=I?-5-C.height:s+10;M+C.width/2>n.getWidth()?(b.position=["100%",L],T.align="right"):M-C.width/2<0&&(b.position=[0,L],T.align="left")}})},e.prototype.updateView=function(t,a,n,i){A(this._features,function(o){o instanceof gr&&o.updateView&&o.updateView(o.model,a,n,i)})},e.prototype.remove=function(t,a){A(this._features,function(n){n instanceof gr&&n.remove&&n.remove(t,a)}),this.group.removeAll()},e.prototype.dispose=function(t,a){A(this._features,function(n){n instanceof gr&&n.dispose&&n.dispose(t,a)})},e.type="toolbox",e}(Xt);function vX(r){return r.indexOf("my")===0}const hX=fX;var cX=function(r){B(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){var n=this.model,i=n.get("name")||t.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)||t.get("backgroundColor")||V.color.neutral00,connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=It.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,b=S.document;b.open("image/svg+xml","replace"),b.write(p),b.close(),S.focus(),b.execCommand("SaveAs",!0,d),document.body.removeChild(_)}}else{var x=n.get("lang"),w='',T=window.open();T.document.write(w),T.document.title=i}},e.getDefaultOption=function(t){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:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:V.color.neutral00,name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return a},e}(gr);const pX=cX;var MT="__ec_magicType_stack__",dX=[["line","bar"],["stack"]],gX=function(r){B(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,a=t.get("icon"),n={};return A(t.get("type"),function(i){a[i]&&(n[i]=a[i])}),n},e.getDefaultOption=function(t){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:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return a},e.prototype.onclick=function(t,a,n){var i=this.model,o=i.get(["seriesIndex",n]);if(DT[n]){var s={series:[]},l=function(v){var h=v.subType,c=v.id,p=DT[n](h,c,v,i);p&&(ot(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,qt).models[0],S=_.componentIndex;s[m]=s[m]||[];for(var b=0;b<=S;b++)s[m][S]=s[m][S]||{};s[m][S].boundaryGap=n==="bar"}}};A(dX,function(v){gt(v,n)>=0&&A(v,function(h){i.setIconStatus(h,"normal")})}),i.setIconStatus(n,"emphasis"),t.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"})}},e}(gr),DT={line:function(r,e,t,a){if(r==="bar")return yt({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},a.get(["option","line"])||{},!0)},bar:function(r,e,t,a){if(r==="line")return yt({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},a.get(["option","bar"])||{},!0)},stack:function(r,e,t,a){var n=t.get("stack")===MT;if(r==="line"||r==="bar")return a.setIconStatus("stack",n?"normal":"emphasis"),yt({id:e,stack:n?"":MT},a.get(["option","stack"])||{},!0)}};ga({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});const yX=gX;var qh=new Array(60).join("-"),is=" ";function mX(r){var e={},t=[],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=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},a.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(n)}else t.push(n)}else t.push(n)}),{seriesGroupByCategoryAxis:e,other:t,meta:a}}function _X(r){var e=[];return A(r,function(t,a){var n=t.categoryAxis,i=t.valueAxis,o=i.dim,s=[" "].concat($(t.series,function(c){return c.name})),l=[n.model.getCategories()];A(t.series,function(c){var p=c.getRawData();l.push(c.getRawData().mapArray(p.mapDimension(o),function(d){return d}))});for(var u=[s.join(is)],f=0;f=0)return!0}var by=new RegExp("["+is+"]+","g");function wX(r){for(var e=r.split(/\n+/g),t=th(e.shift()).split(by),a=[],n=$(t,function(l){return{name:l,data:[]}}),i=0;i=0;i--){var o=t[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();t[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),t.push(e)}function IX(r){var e=j0(r),t=e[e.length-1];e.length>1&&e.pop();var a={};return rR(t,function(n,i){for(var o=e.length-1;o>=0;o--)if(n=e[o][i],n){a[i]=n;break}}),a}function PX(r){aR(r).snapshots=null}function RX(r){return j0(r).length}function j0(r){var e=aR(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var kX=function(r){B(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){PX(t),a.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){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:t.getLocaleModel().get(["toolbox","restore","title"])};return a},e}(gr);ga({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});const EX=kX;var OX=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],BX=function(){function r(e,t,a){var n=this;this._targetInfoList=[];var i=LT(t,e);A(NX,function(o,s){(!a||!a.include||gt(a.include,s)>=0)&&o(i,n._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(a,n,i){if((a.coordRanges||(a.coordRanges=[])).push(n),!a.coordRange){a.coordRange=n;var o=hd[a.brushType](0,i,n);a.__rangeOffset={offset:kT[a.brushType](o.values,a.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,a){A(e,function(n){var i=this.findTargetInfo(n,t);i&&i!==!0&&A(i.coordSyses,function(o){var s=hd[n.brushType](1,o,n.range,!0);a(n,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){A(e,function(a){var n=this.findTargetInfo(a,t);if(a.range=a.range||[],n&&n!==!0){a.panelId=n.panelId;var i=hd[a.brushType](0,n.coordSys,a.coordRange),o=a.__rangeOffset;a.range=o?kT[a.brushType](i.values,o.offset,VX(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(e,t){return $(this._targetInfoList,function(a){var n=a.getPanelRect();return{panelId:a.panelId,defaultBrushType:t?t(a):null,clipPath:sP(n),isTargetByCursor:uP(n,e,a.coordSysModel),getLinearBrushOtherExtent:lP(n)}})},r.prototype.controlSeries=function(e,t,a){var n=this.findTargetInfo(e,a);return n===!0||n&>(n.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var a=this._targetInfoList,n=LT(t,e),i=0;ir[1]&&r.reverse(),r}function LT(r,e){return Ho(r,e,{includeMainTypes:OX})}var NX={grid:function(r,e){var t=r.xAxisModels,a=r.yAxisModels,n=r.gridModels,i=j(),o={},s={};!t&&!a&&!n||(A(t,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){(gt(t,v.getAxis("x").model)>=0||gt(a,v.getAxis("y").model)>=0)&&f.push(v)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:PT.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){A(r.geoModels,function(t){var a=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:a,coordSyses:[a],getPanelRect:PT.geo})})}},IT=[function(r,e){var t=r.xAxisModel,a=r.yAxisModel,n=r.gridModel;return!n&&t&&(n=t.axis.grid.model),!n&&a&&(n=a.axis.grid.model),n&&n===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],PT={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(Li(r)),e}},hd={lineX:dt(RT,0),lineY:dt(RT,1),rect:function(r,e,t,a){var n=r?e.pointToData([t[0][0],t[1][0]],a):e.dataToPoint([t[0][0],t[1][0]],a),i=r?e.pointToData([t[0][1],t[1][1]],a):e.dataToPoint([t[0][1],t[1][1]],a),o=[wy([n[0],i[0]]),wy([n[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,a){var n=[[1/0,-1/0],[1/0,-1/0]],i=$(t,function(o){var s=r?e.pointToData(o,a):e.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 RT(r,e,t,a){var n=t.getAxis(["x","y"][r]),i=wy($([0,1],function(s){return e?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 kT={lineX:dt(ET,0),lineY:dt(ET,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return $(r,function(a,n){return[a[0]-t[0]*e[n][0],a[1]-t[1]*e[n][1]]})}};function ET(r,e,t,a){return[e[0]-a[r]*t[0],e[1]-a[r]*t[1]]}function VX(r,e){var t=OT(r),a=OT(e),n=[t[0]/a[0],t[1]/a[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function OT(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}const J0=BX;var Ty=A,zX=WE("toolbox-dataZoom_"),GX=function(r){B(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n,i){this._brushController||(this._brushController=new D0(n.getZr()),this._brushController.on("brush",X(this._onBrush,this)).mount()),WX(t,a,this,i,n),HX(t,a)},e.prototype.onclick=function(t,a,n){FX[n].call(this)},e.prototype.remove=function(t,a){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,a){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var a=t.areas;if(!t.isEnd||!a.length)return;var n={},i=this.ecModel;this._brushController.updateCovers([]);var o=new J0(Q0(this.model),i,{include:["grid"]});o.matchOutputRanges(a,i,function(u,f,v){if(v.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",v,f[0]),s("y",v,f[1])):s({lineX:"x",lineY:"y"}[h],v,f)}}),LX(i,n),this._dispatchZoomAction(n);function s(u,f,v){var h=f.getAxis(u),c=h.model,p=l(u,c,i),d=p.findRepresentativeAxisProxy(c).getMinMaxSpan();(d.minValueSpan!=null||d.maxValueSpan!=null)&&(v=An(0,v.slice(),h.scale.getExtent(),0,d.minValueSpan,d.maxValueSpan)),p&&(n[p.id]={dataZoomId:p.id,startValue:v[0],endValue:v[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}},e.prototype._dispatchZoomAction=function(t){var a=[];Ty(t,function(n,i){a.push(rt(n))}),a.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:a})},e.getDefaultOption=function(t){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:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:V.color.backgroundTint}};return a},e}(gr),FX={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(IX(this.ecModel))}};function Q0(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function HX(r,e){r.setIconStatus("back",RX(e)>1?"emphasis":"normal")}function WX(r,e,t,a,n){var i=t._isZoomActive;a&&a.type==="takeGlobalCursor"&&(i=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),t._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new J0(Q0(r),e,{include:["grid"]}),s=o.makePanelOpts(n,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}ON("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var a=e.getModel(t),n=[],i=Q0(a),o=Ho(r,i);Ty(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),Ty(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:zX+u+v};h[f]=v,n.push(h)}return n});const $X=GX;function UX(r){r.registerComponentModel(uX),r.registerComponentView(hX),ko("saveAsImage",pX),ko("magicType",yX),ko("dataView",DX),ko("dataZoom",$X),ko("restore",EX),mt(sX)}var YX=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:V.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:V.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:V.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:V.color.tertiary,fontSize:14}},e}(Ct);const ZX=YX;function nR(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function iR(r){if(It.domSupported){for(var e=document.documentElement.style,t=0,a=r.length;t-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=e+" 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 tq(r,e,t){var a="cubic-bezier(0.23,1,0.32,1)",n="",i="";return t&&(n=" "+r/2+"s "+a,i="opacity"+n+",visibility"+n),e||(n=" "+r+"s "+a,i+=(i.length?",":"")+(It.transformSupported?""+t_+n:",left"+n+",top"+n)),KX+":"+i}function BT(r,e,t){var a=r.toFixed(0)+"px",n=e.toFixed(0)+"px";if(!It.transformSupported)return t?"top:"+n+";left:"+a+";":[["top",n],["left",a]];var i=It.transform3dSupported,o="translate"+(i?"3d":"")+"("+a+","+n+(i?",0":"")+")";return t?"top:0;left:0;"+t_+":"+o+";":[["top",0],["left",0],[oR,o]]}function eq(r){var e=[],t=r.get("fontSize"),a=r.getTextColor();a&&e.push("color:"+a),e.push("font:"+r.getFont());var n=Q(r.get("lineHeight"),Math.round(t*3/2));t&&e.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&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+i),A(["decoration","align"],function(u){var f=r.get(u);f&&e.push("text-"+u+":"+f)}),e.join(";")}function rq(r,e,t,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=UD(r,"html"),c=u+"px "+f+"px "+s+"px "+l;return n.push("box-shadow:"+c),e&&i>0&&n.push(tq(i,t,a)),o&&n.push("background-color:"+o),A(["width","color","radius"],function(p){var d="border-"+p,g=rD(d),y=r.get(g);y!=null&&n.push(d+":"+y+(p==="color"?"":"px"))}),n.push(eq(v)),h!=null&&n.push("padding:"+lu(h).join("px ")+"px"),n.join(";")+";"}function NT(r,e,t,a,n){var i=e&&e.painter;if(t){var o=i&&i.getViewportRoot();o&&nk(r,o,t,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]/e.getWidth(),r[3]=r[1]/e.getHeight()}var aq=function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,It.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var n=this._zr=e.getZr(),i=t.appendTo,o=i&&(Z(i)?document.querySelector(i):Yo(i)?i:et(i)&&i(e.getDom()));NT(this._styleCoord,n,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(a),this._api=e,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();vr(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(e){if(!this._container){var t=this._api.getDom(),a=qX(t,"position"),n=t.style;n.position!=="absolute"&&a!=="absolute"&&(n.position="relative")}var i=e.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var a=this.el,n=a.style,i=this._styleCoord;a.innerHTML?n.cssText=jX+rq(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+BT(i[0],i[1],!0)+("border-color:"+Gi(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,a,n,i){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(Z(i)&&a.get("trigger")==="item"&&!nR(a)&&(s=QX(a,n,i)),Z(e))o.innerHTML=e+s;else if(e){o.innerHTML="",W(e)||(e=[e]);for(var l=0;l=0?this._tryShow(i,o):n==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,a=this._ecModel,n=this._api,i=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(t,a,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,a,n,i){if(!(i.from===this.uid||It.node||!n.getDom())){var o=GT(i,n);this._ticket="";var s=i.dataByCoordSys,l=hq(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=sq;f.x=i.x,f.y=i.y,f.update(),ut(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(t,a,n,i))return;var v=HP(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))}},e.prototype.manuallyHideTip=function(t,a,n,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(GT(i,n))},e.prototype._manuallyAxisShowTip=function(t,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=Ks([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}}},e.prototype._tryShow=function(t,a){var n=t.target,i=this._tooltipModel;if(i){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(n){var s=ut(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;xi(n,function(f){if(f.tooltipDisabled)return l=u=null,!0;l||u||(ut(f).dataIndex!=null?l=f:ut(f).tooltipConfig!=null&&(u=f))},!0),l?this._showSeriesItemTooltip(t,l,a):u?this._showComponentItemTooltip(t,u,a):this._hide(a)}else this._lastDataByCoordSys=null,this._hide(a)}},e.prototype._showOrMove=function(t,a){var n=t.get("showDelay");a=X(a,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(a,n):a()},e.prototype._showAxisTooltip=function(t,a){var n=this._ecModel,i=this._tooltipModel,o=[a.offsetX,a.offsetY],s=Ks([a.tooltipOption],i),l=this._renderMode,u=[],f=ie("section",{blocks:[],noHeader:!0}),v=[],h=new Yc;A(t,function(m){A(m.dataByAxis,function(_){var S=n.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!S||b==null)){var x=VP(b,S.axis,n,_.seriesDataIndices,_.valueLabelOpt),w=ie("section",{header:x,noHeader:!_r(x),sortBlocks:!0,blocks:[]});f.blocks.push(w),A(_.seriesDataIndices,function(T){var C=n.getSeriesByIndex(T.seriesIndex),M=T.dataIndexInside,D=C.getDataParams(M);if(!(D.dataIndex<0)){D.axisDim=_.axisDim,D.axisIndex=_.axisIndex,D.axisType=_.axisType,D.axisId=_.axisId,D.axisValue=Iv(S.axis,{value:b}),D.axisValueLabel=x,D.marker=h.makeTooltipMarker("item",Gi(D.color),l);var I=J1(C.formatTooltip(M,!0,null)),L=I.frag;if(L){var P=Ks([C],i).get("valueFormatter");w.blocks.push(P?G({valueFormatter:P},L):L)}I.text&&v.push(I.text),u.push(D)}})}})}),f.blocks.reverse(),v.reverse();var c=a.position,p=s.get("order"),d=nS(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(t,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)})},e.prototype._showSeriesItemTooltip=function(t,a,n){var i=this._ecModel,o=ut(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=t.positionDefault,d=Ks([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 Yc;y.marker=m.makeTooltipMarker("item",Gi(y.color),c);var _=J1(u.formatTooltip(f,!1,v)),S=d.get("order"),b=d.get("valueFormatter"),x=_.frag,w=x?nS(b?G({valueFormatter:b},x):x,m,c,S,i.get("useUTC"),d.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(d,function(){this._showTooltipContent(d,w,y,T,t.offsetX,t.offsetY,t.position,t.target,m)}),n({type:"showTip",dataIndexInside:f,dataIndex:h.getRawIndex(f),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,a,n){var i=this._renderMode==="html",o=ut(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=Ie(l.content));var v=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&v.push(h),v.push({formatter:l.content});var c=t.positionDefault,p=Ks(v,this._tooltipModel,c?{position:c}:null),d=p.get("content"),g=Math.random()+"",y=new Yc;this._showOrMove(p,function(){var m=rt(p.get("formatterParams")||{});this._showTooltipContent(p,d,m,g,t.offsetX,t.offsetY,t.position,a,y)}),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,a,n,i,o,s,l,u,f){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var v=this._tooltipContent;v.setEnterable(t.get("enterable"));var h=t.get("formatter");l=l||t.get("position");var c=a,p=this._getNearestPoint([o,s],n,t.get("trigger"),t.get("borderColor"),t.get("defaultBorderColor",!0)),d=p.color;if(h)if(Z(h)){var g=t.ecModel.get("useUTC"),y=W(n)?n[0]:n,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;c=h,m&&(c=Ph(y.axisValue,c,g)),c=aD(c,n,!0)}else if(et(h)){var _=X(function(S,b){S===this._ticket&&(v.setContent(b,f,t,d,l),this._updatePosition(t,l,o,s,v,n,u))},this);this._ticket=i,c=h(n,i,_)}else c=h;v.setContent(c,f,t,d,l),v.show(t,d),this._updatePosition(t,l,o,s,v,n,u)}},e.prototype._getNearestPoint=function(t,a,n,i,o){if(n==="axis"||W(a))return{color:i||o};if(!W(a))return{color:i||a.color||a.borderColor}},e.prototype._updatePosition=function(t,a,n,i,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();a=a||t.get("position");var v=o.getSize(),h=t.get("align"),c=t.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),et(a)&&(a=a([n,i],s,o.el,p,{viewSize:[u,f],contentSize:v.slice()})),W(a))n=Y(a[0],u),i=Y(a[1],f);else if(st(a)){var d=a;d.width=v[0],d.height=v[1];var g=Ut(d,{width:u,height:f});n=g.x,i=g.y,h=null,c=null}else if(Z(a)&&l){var y=vq(a,p,v,t.get("borderWidth"));n=y[0],i=y[1]}else{var y=uq(n,i,o,u,f,h?null:20,c?null:20);n=y[0],i=y[1]}if(h&&(n-=FT(h)?v[0]/2:h==="right"?v[0]:0),c&&(i-=FT(c)?v[1]/2:c==="bottom"?v[1]:0),nR(t)){var y=fq(n,i,o,u,f);n=y[0],i=y[1]}o.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,a){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===t.length;return o&&A(n,function(s,l){var u=s.dataByAxis||[],f=t[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=t,this._cbParamsList=a,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,a){It.node||!a.getDom()||(Gl(this,"_updatePosition"),this._tooltipContent.dispose(),gy("itemTooltip",a))},e.type="tooltip",e}(Xt);function Ks(r,e,t){var a=e.ecModel,n;t?(n=new Lt(t,a,a),n=new Lt(e.option,n,a)):n=e;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof Lt&&(o=o.get("tooltip",!0)),Z(o)&&(o={formatter:o}),o&&(n=new Lt(o,n,a)))}return n}function GT(r,e){return r.dispatchAction||X(e.dispatchAction,e)}function uq(r,e,t,a,n,i,o){var s=t.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>a?r-=l+i:r+=i),o!=null&&(e+u+o>n?e-=u+o:e+=o),[r,e]}function fq(r,e,t,a,n){var i=t.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,a)-o,e=Math.min(e+s,n)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function vq(r,e,t,a){var n=t[0],i=t[1],o=Math.ceil(Math.SQRT2*a)+8,s=0,l=0,u=e.width,f=e.height;switch(r){case"inside":s=e.x+u/2-n/2,l=e.y+f/2-i/2;break;case"top":s=e.x+u/2-n/2,l=e.y-i-o;break;case"bottom":s=e.x+u/2-n/2,l=e.y+f+o;break;case"left":s=e.x-n-o,l=e.y+f/2-i/2;break;case"right":s=e.x+u+o,l=e.y+f/2-i/2}return[s,l]}function FT(r){return r==="center"||r==="middle"}function hq(r,e,t){var a=Qy(r).queryOptionMap,n=a.keys()[0];if(!(!n||n==="series")){var i=us(e,n,a.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=ut(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}const cq=lq;function pq(r){mt(_u),r.registerComponentModel(ZX),r.registerComponentView(cq),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Qt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Qt)}var dq=["rect","polygon","keep","clear"];function gq(r,e){var t=Vt(r?r.brush:[]);if(t.length){var a=[];A(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var n=r&&r.toolbox;W(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),yq(s),e&&!s.length&&s.push.apply(s,dq)}}function yq(r){var e={};A(r,function(t){e[t]=1}),r.length=0,A(e,function(t,a){r.push(a)})}var HT=A;function WT(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function Cy(r,e,t){var a={};return HT(e,function(i){var o=a[i]=n();HT(r[i],function(s,l){if(Ae.isValidType(l)){var u={type:l,visual:s};t&&t(u,i),o[l]=new Ae(u),l==="opacity"&&(u=rt(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Ae(u))}})}),a;function n(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function lR(r,e,t){var a;A(t,function(n){e.hasOwnProperty(n)&&WT(e[n])&&(a=!0)}),a&&A(t,function(n){e.hasOwnProperty(n)&&WT(e[n])?r[n]=rt(e[n]):delete r[n]})}function mq(r,e,t,a,n,i){var o={};A(r,function(v){var h=Ae.prepareVisualTypes(e[v]);o[v]=h});var s;function l(v){return Nm(t,s,v)}function u(v,h){eL(t,s,v,h)}i==null?t.each(f):t.each([i],f);function f(v,h){s=i==null?v:h;var c=t.getRawDataItem(s);if(!(c&&c.visualMap===!1))for(var p=a.call(n,v),d=e[p],g=o[p],y=0,m=g.length;ye[0][1]&&(e[0][1]=i[0]),i[1]e[1][1]&&(e[1][1]=i[1])}return e&&XT(e)}};function XT(r){return new lt(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var Aq=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.ecModel=t,this.api=a,this.model,(this._brushController=new D0(a.getZr())).on("brush",X(this._onBrush,this)).mount()},e.prototype.render=function(t,a,n,i){this.model=t,this._updateController(t,a,n,i)},e.prototype.updateTransform=function(t,a,n,i){uR(a),this._updateController(t,a,n,i)},e.prototype.updateVisual=function(t,a,n,i){this.updateTransform(t,a,n,i)},e.prototype.updateView=function(t,a,n,i){this._updateController(t,a,n,i)},e.prototype._updateController=function(t,a,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var a=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:rt(n),$from:a}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:rt(n),$from:a})},e.type="brush",e}(Xt);const Mq=Aq;var Dq=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,a){var n=this.option;!a&&lR(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:this.option.defaultOutOfBrushColor},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=$(t,function(a){return qT(this.option,a)},this))},e.prototype.setBrushOption=function(t){this.brushOption=qT(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:V.color.backgroundTint,borderColor:V.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:V.color.disabled},e}(Ct);function qT(r,e){return yt({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Lt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}const Lq=Dq;var Iq=["rect","polygon","lineX","lineY","keep","clear"],Pq=function(r){B(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,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(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,a,n){this.render(t,a,n)},e.prototype.getIcons=function(){var t=this.model,a=t.get("icon",!0),n={};return A(t.get("type",!0),function(i){a[i]&&(n[i]=a[i])}),n},e.prototype.onclick=function(t,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}})},e.getDefaultOption=function(t){var a={show:!0,type:Iq.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:t.getLocaleModel().get(["toolbox","brush","title"])};return a},e}(gr);const Rq=Pq;function kq(r){r.registerComponentView(Mq),r.registerComponentModel(Lq),r.registerPreprocessor(gq),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,xq),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(a){a.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Qt),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Qt),ko("brush",Rq)}var Eq=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:V.size.m,backgroundColor:V.color.transparent,borderColor:V.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:V.color.primary},subtextStyle:{fontSize:12,color:V.color.quaternary}},e}(Ct),Oq=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){if(this.group.removeAll(),!!t.get("show")){var i=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=Q(t.get("textBaseline"),t.get("textVerticalAlign")),f=new Mt({style:Gt(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),v=f.getBoundingRect(),h=t.get("subtext"),c=new Mt({style:Gt(s,{text:h,fill:s.getTextColor(),y:v.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),d=t.get("sublink"),g=t.get("triggerEvent",!0);f.silent=!p&&!g,c.silent=!d&&!g,p&&f.on("click",function(){xv(p,"_"+t.get("target"))}),d&&c.on("click",function(){xv(d,"_"+t.get("subtarget"))}),ut(f).eventData=ut(c).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(f),h&&i.add(c);var y=i.getBoundingRect(),m=t.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=ce(t,n),S=Ut(m,_.refContainer,t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?S.x+=S.width:l==="center"&&(S.x+=S.width/2)),u||(u=t.get("top")||t.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 b={align:l,verticalAlign:u};f.setStyle(b),c.setStyle(b),y=i.getBoundingRect();var x=S.margin,w=t.getItemStyle(["color","opacity"]);w.fill=t.get("backgroundColor");var T=new _t({shape:{x:y.x-x[3],y:y.y-x[0],width:y.width+x[1]+x[3],height:y.height+x[0]+x[2],r:t.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});i.add(T)}},e.type="title",e}(Xt);function Bq(r){r.registerComponentModel(Eq),r.registerComponentView(Oq)}var Nq=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var a=this._data.count();this.option.loop?t=(t%a+a)%a:(t>=a&&(t=a-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,a=t.data||[],n=t.axisType,i=this._names=[],o;n==="category"?(o=[],A(a,function(u,f){var v=ue(ls(u),""),h;st(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)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:V.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:V.color.secondary},data:[]},e}(Ct);const KT=Nq;var fR=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=Rn(KT.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:V.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:V.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:V.color.tertiary},itemStyle:{color:V.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:V.color.accent50,borderColor:V.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:V.color.accent50,borderColor:V.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:V.color.accent60},itemStyle:{color:V.color.accent60,borderColor:V.color.accent60},controlStyle:{color:V.color.accent70,borderColor:V.color.accent70}},progress:{lineStyle:{color:V.color.accent30},itemStyle:{color:V.color.accent40}},data:[]}),e}(KT);se(fR,Eh.prototype);const Vq=fR;var zq=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(Xt);const Gq=zq;var Fq=function(r){B(e,r);function e(t,a,n,i){var o=r.call(this,t,a,n)||this;return o.type=i||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(Gr);const Hq=Fq;var pd=Math.PI,jT=St(),Wq=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.api=a},e.prototype.render=function(t,a,n){if(this.model=t,this.api=n,this.ecModel=a,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,t);t.formatTooltip=function(u){var f=l.scale.getLabel({value:u});return ie("nameValue",{noName:!0,value:f})},A(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,t)},this),this._renderAxisLabel(i,s,l,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,a){var n=t.get(["label","position"]),i=t.get("orient"),o=Uq(t,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:pd/2},v=i==="vertical"?o.height:o.width,h=t.getModel("controlStyle"),c=h.get("show",!0),p=c?h.get("itemSize"):0,d=c?h.get("itemGap"):0,g=p+d,y=t.get(["label","rotate"])||0;y=y*pd/180;var m,_,S,b=h.get("position",!0),x=c&&h.get("showPlayBtn",!0),w=c&&h.get("showPrevBtn",!0),T=c&&h.get("showNextBtn",!0),C=0,M=v;b==="left"||b==="bottom"?(x&&(m=[0,0],C+=g),w&&(_=[C,0],C+=g),T&&(S=[M-p,0],M-=g)):(x&&(m=[M-p,0],M-=g),w&&(_=[0,0],C+=g),T&&(S=[M-p,0],M-=g));var D=[C,M];return t.get("inverse")&&D.reverse(),{viewRect:o,mainLength:v,orient:i,rotation:f[i],labelRotation:y,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[i],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[i],playPosition:m,prevBtnPosition:_,nextBtnPosition:S,axisExtent:D,controlSize:p,controlGap:d}},e.prototype._position=function(t,a){var n=this._mainGroup,i=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=xe(),l=o.x,u=o.y+o.height;va(s,s,[-l,-u]),Ln(s,s,-pd/2),va(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=t.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=t.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,b,x,w,T){S[w]+=x[w][T]-b[w][T]}},e.prototype._createAxis=function(t,a){var n=a.getData(),i=a.get("axisType"),o=$q(a,i);o.getTicks=function(){return n.mapArray(["value"],function(u){return{value:u}})};var s=n.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new Hq("value",o,t.axisExtent,i);return l.model=a,l},e.prototype._createGroup=function(t){var a=this[t]=new at;return this.group.add(a),a},e.prototype._renderAxisLine=function(t,a,n,i){var o=n.getExtent();if(i.get(["lineStyle","show"])){var s=new fe({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 fe({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:ot({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});a.add(l)}},e.prototype._renderAxisTick=function(t,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:X(o._changeTimeline,o,u.value)},g=JT(v,h,a,d);g.ensureState("emphasis").style=c.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),Di(g);var y=ut(g);v.get("tooltip")?(y.dataIndex=u.value,y.dataModel=i):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,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){var v=f.tickValue,h=l.getItemModel(v),c=h.getModel("label"),p=h.getModel(["emphasis","label"]),d=h.getModel(["progress","label"]),g=n.dataToCoord(f.tickValue),y=new Mt({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:X(o._changeTimeline,o,v),silent:!1,style:Gt(c,{text:f.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=Gt(p),y.ensureState("progress").style=Gt(d),a.add(y),Di(y),jT(y).dataIndex=v,o._tickLabels.push(y)})}},e.prototype._renderControl=function(t,a,n,i){var o=t.controlSize,s=t.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),f=i.getPlayState(),v=i.get("inverse",!0);h(t.nextBtnPosition,"next",X(this._changeTimeline,this,v?"-":"+")),h(t.prevBtnPosition,"prev",X(this._changeTimeline,this,v?"+":"-")),h(t.playPosition,f?"stop":"play",X(this._handlePlayClick,this,!f),!0);function h(c,p,d,g){if(c){var y=Br(Q(i.get(["controlStyle",p+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=Yq(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(_),Di(_)}}},e.prototype._renderCurrentPointer=function(t,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=X(u._handlePointerDrag,u),v.ondragend=X(u._handlePointerDragend,u),QT(v,u._progressLine,s,n,i,!0)},onUpdate:function(v){QT(v,u._progressLine,s,n,i)}};this._currentPointer=JT(l,l,this._mainGroup,{},this._currentPointer,f)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,a,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,a){var n=this._toAxisCoord(t)[0],i=this._axis,o=Sr(i.getExtent().slice());n>o[1]&&(n=o[1]),n=0&&(s[o]=+s[o].toFixed(p)),[s,c]}var Pf={min:dt(If,"min"),max:dt(If,"max"),average:dt(If,"average"),median:dt(If,"median")};function ru(r,e){if(e){var t=r.getData(),a=r.coordinateSystem,n=a&&a.dimensions;if(!tK(e)&&!W(e.coord)&&W(n)){var i=hR(e,t,a,r);if(e=rt(e),e.type&&Pf[e.type]&&i.baseAxis&&i.valueAxis){var o=gt(n,i.baseAxis.dim),s=gt(n,i.valueAxis.dim),l=Pf[e.type](t,i.valueAxis.dim,i.baseDataDim,i.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!W(n)){e.coord=[];var u=r.getBaseAxis();if(u&&e.type&&Pf[e.type]){var f=a.getOtherAxis(u);f&&(e.value=eh(t,t.mapDimension(f.dim),e.type))}}else for(var v=e.coord,h=0;h<2;h++)Pf[v[h]]&&(v[h]=eh(t,t.mapDimension(n[h]),v[h]));return e}}function hR(r,e,t,a){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,n.valueAxis=t.getAxis(eK(a,n.valueDataDim)),n.baseAxis=t.getOtherAxis(n.valueAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim)):(n.baseAxis=a.getBaseAxis(),n.valueAxis=t.getOtherAxis(n.baseAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim),n.valueDataDim=e.mapDimension(n.valueAxis.dim)),n}function eK(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function au(r,e){return r&&r.containData&&e.coord&&!My(e)?r.containData(e.coord):!0}function rK(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!My(e)&&!My(t)?r.containZone(e.coord,t.coord):!0}function cR(r,e){return r?function(t,a,n,i){var o=i<2?t.coord&&t.coord[i]:t.value;return _n(o,e[i])}:function(t,a,n,i){return _n(t.value,e[i])}}function eh(r,e,t){if(t==="average"){var a=0,n=0;return r.each(e,function(i,o){isNaN(i)||(a+=i,n++)}),a/n}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var dd=St(),aK=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=j()},e.prototype.render=function(t,a,n){var i=this,o=this.markerGroupMap;o.each(function(s){dd(s).keep=!1}),a.eachSeries(function(s){var l=Ga.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,a,n)}),o.each(function(s){!dd(s).keep&&i.group.remove(s.group)}),nK(a,o,this.type)},e.prototype.markKeep=function(t){dd(t).keep=!0},e.prototype.toggleBlurSeries=function(t,a){var n=this;A(t,function(i){var o=Ga.getMarkerModelFromSeries(i,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(a?uM(l):sm(l))})}})},e.type="marker",e}(Xt);function nK(r,e,t){r.eachSeries(function(a){var n=Ga.getMarkerModelFromSeries(a,t),i=e.get(a.id);if(n&&i&&i.group){var o=zi(n),s=o.z,l=o.zlevel;Lh(i.group,s,l)}})}const r_=aK;function eC(r,e,t){var a=e.coordinateSystem,n=t.getWidth(),i=t.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=Y(l.get("x"),f)+h,g=Y(l.get("y"),v)+c;if(!isNaN(d)&&!isNaN(g))p=[d,g];else if(e.getMarkerPosition)p=e.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 iK=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=Ga.getMarkerModelFromSeries(i,"markPoint");o&&(eC(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new du),v=oK(o,t,a);a.setData(v),eC(a.getData(),t,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(et(p)||et(d)||et(g)||et(y)){var _=a.getRawValue(h),S=a.getDataParams(h);et(p)&&(p=p(_,S)),et(d)&&(d=d(_,S)),et(g)&&(g=g(_,S)),et(y)&&(y=y(_,S))}var b=c.getModel("itemStyle").getItemStyle(),x=c.get("z2"),w=vu(l,"color");b.fill||(b.fill=w),v.setItemVisual(h,{z2:Q(x,0),symbol:p,symbolSize:d,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:b})}),f.updateData(v),this.group.add(f.group),v.eachItemGraphicEl(function(h){h.traverse(function(c){ut(c).dataModel=a})}),this.markKeep(f),f.group.silent=a.get("silent")||t.get("silent")},e.type="markPoint",e}(r_);function oK(r,e,t){var a;r?a=$(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return G(G({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new ze(a,t),i=$(t.get("data"),dt(ru,e));r&&(i=kt(i,dt(au,r)));var o=cR(!!r,a);return n.initData(i,null,o),n}const sK=iK;function lK(r){r.registerComponentModel(Qq),r.registerComponentView(sK),r.registerPreprocessor(function(e){e_(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var uK=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markLine",e.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"},e}(Ga);const fK=uK;var Rf=St(),vK=function(r,e,t,a){var n=r.getData(),i;if(W(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=e.getAxis(a.yAxis!=null?"y":"x"),l=Ce(a.yAxis,a.xAxis);else{var u=hR(a,n,e,r);s=u.valueAxis;var f=PL(n,u.valueDataDim);l=eh(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=t.get("precision");d>=0&&wt(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=[ru(r,i[0]),ru(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 rh(r){return!isNaN(r)&&!isFinite(r)}function rC(r,e,t,a){var n=1-r,i=a.dimensions[r];return rh(e[n])&&rh(t[n])&&e[r]===t[r]&&a.getAxis(i).containData(e[r])}function hK(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,a=e[1].coord;if(t&&a&&(rC(1,t,a,r)||rC(0,t,a,r)))return!0}return au(r,e[0])&&au(r,e[1])}function gd(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),s,l=Y(o.get("x"),n.getWidth()),u=Y(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(r.getValues(r.dimensions,e));else{var f=i.dimensions,v=r.get(f[0],e),h=r.get(f[1],e);s=i.dataToPoint([v,h])}if(Cn(i,"cartesian2d")){var c=i.getAxis("x"),p=i.getAxis("y"),f=i.dimensions;rh(r.get(f[0],e))?s[0]=c.toGlobalCoord(c.getExtent()[t?0:1]):rh(r.get(f[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var cK=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=Ga.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=Rf(o).from,u=Rf(o).to;l.each(function(f){gd(l,f,!0,i,n),gd(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)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new x0);this.group.add(f.group);var v=pK(o,t,a),h=v.from,c=v.to,p=v.line;Rf(a).from=h,Rf(a).to=c,a.setData(p);var d=a.get("symbol"),g=a.get("symbolSize"),y=a.get("symbolRotate"),m=a.get("symbolOffset");W(d)||(d=[d,d]),W(g)||(g=[g,g]),W(y)||(y=[y,y]),W(m)||(m=[m,m]),v.from.each(function(S){_(h,S,!0),_(c,S,!1)}),p.each(function(S){var b=p.getItemModel(S),x=b.getModel("lineStyle").getLineStyle();p.setItemLayout(S,[h.getItemLayout(S),c.getItemLayout(S)]);var w=b.get("z2");x.stroke==null&&(x.stroke=h.getItemVisual(S,"style").fill),p.setItemVisual(S,{z2:Q(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:x})}),f.updateData(p),v.line.eachItemGraphicEl(function(S){ut(S).dataModel=a,S.traverse(function(b){ut(b).dataModel=a})});function _(S,b,x){var w=S.getItemModel(b);gd(S,b,x,t,i);var T=w.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=vu(l,"color")),S.setItemVisual(b,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:Q(w.get("symbolOffset",!0),m[x?0:1]),symbolRotate:Q(w.get("symbolRotate",!0),y[x?0:1]),symbolSize:Q(w.get("symbolSize"),g[x?0:1]),symbol:Q(w.get("symbol",!0),d[x?0:1]),style:T})}this.markKeep(f),f.group.silent=a.get("silent")||t.get("silent")},e.type="markLine",e}(r_);function pK(r,e,t){var a;r?a=$(r&&r.dimensions,function(u){var f=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return G(G({},f),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new ze(a,t),i=new ze(a,t),o=new ze([],t),s=$(t.get("data"),dt(vK,e,r,t));r&&(s=kt(s,dt(hK,r)));var l=cR(!!r,a);return n.initData($(s,function(u){return u[0]}),null,l),i.initData($(s,function(u){return u[1]}),null,l),o.initData($(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}const dK=cK;function gK(r){r.registerComponentModel(fK),r.registerComponentView(dK),r.registerPreprocessor(function(e){e_(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var yK=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Ga);const mK=yK;var kf=St(),_K=function(r,e,t,a){var n=a[0],i=a[1];if(!(!n||!i)){var o=ru(r,n),s=ru(r,i),l=o.coord,u=s.coord;l[0]=Ce(l[0],-1/0),l[1]=Ce(l[1],-1/0),u[0]=Ce(u[0],1/0),u[1]=Ce(u[1],1/0);var f=Fy([{},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 ah(r){return!isNaN(r)&&!isFinite(r)}function aC(r,e,t,a){var n=1-r;return ah(e[n])&&ah(t[n])}function SK(r,e){var t=e.coord[0],a=e.coord[1],n={coord:t,x:e.x0,y:e.y0},i={coord:a,x:e.x1,y:e.y1};return Cn(r,"cartesian2d")?t&&a&&(aC(1,t,a)||aC(0,t,a))?!0:rK(r,n,i):au(r,n)||au(r,i)}function nC(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),s,l=Y(o.get(t[0]),n.getWidth()),u=Y(o.get(t[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition){var f=r.getValues(["x0","y0"],e),v=r.getValues(["x1","y1"],e),h=i.clampData(f),c=i.clampData(v),p=[];t[0]==="x0"?p[0]=h[0]>c[0]?v[0]:f[0]:p[0]=h[0]>c[0]?f[0]:v[0],t[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,t,!0)}else{var d=r.get(t[0],e),g=r.get(t[1],e),y=[d,g];i.clampData&&i.clampData(y,y),s=i.dataToPoint(y,!0)}if(Cn(i,"cartesian2d")){var m=i.getAxis("x"),_=i.getAxis("y"),d=r.get(t[0],e),g=r.get(t[1],e);ah(d)?s[0]=m.toGlobalCoord(m.getExtent()[t[0]==="x0"?0:1]):ah(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var iC=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],xK=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=Ga.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=$(iC,function(v){return nC(s,l,v,i,n)});s.setItemLayout(l,u);var f=s.getItemGraphicEl(l);f.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,{group:new at});this.group.add(f.group),this.markKeep(f);var v=bK(o,t,a);a.setData(v),v.each(function(h){var c=$(iC,function(M){return nC(v,h,M,t,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))];Sr(m),Sr(_);var S=!(g[0]>m[1]||g[1]_[1]||y[1]<_[0]),b=!S;v.setItemLayout(h,{points:c,allClipped:b});var x=v.getItemModel(h),w=x.getModel("itemStyle").getItemStyle(),T=x.get("z2"),C=vu(l,"color");w.fill||(w.fill=C,Z(w.fill)&&(w.fill=sv(w.fill,.4))),w.stroke||(w.stroke=C),v.setItemVisual(h,"style",w),v.setItemVisual(h,"z2",Q(T,0))}),v.diff(kf(f).data).add(function(h){var c=v.getItemLayout(h),p=v.getItemVisual(h,"z2");if(!c.allClipped){var d=new He({z2:Q(p,0),shape:{points:c.points}});v.setItemGraphicEl(h,d),f.group.add(d)}}).update(function(h,c){var p=kf(f).data.getItemGraphicEl(c),d=v.getItemLayout(h),g=v.getItemVisual(h,"z2");d.allClipped?p&&f.group.remove(p):(p?Dt(p,{z2:Q(g,0),shape:{points:d.points}},a,h):p=new He({shape:{points:d.points}}),v.setItemGraphicEl(h,p),f.group.add(p))}).remove(function(h){var c=kf(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")),ye(h,he(p),{labelFetcher:a,labelDataIndex:c,defaultText:v.getName(c)||"",inheritColor:Z(d.fill)?sv(d.fill,1):V.color.neutral99}),ve(h,p),$t(h,null,null,p.get(["emphasis","disabled"])),ut(h).dataModel=a}),kf(f).data=v,f.group.silent=a.get("silent")||t.get("silent")},e.type="markArea",e}(r_);function bK(r,e,t){var a,n,i=["x0","y0","x1","y1"];if(r){var o=$(r&&r.dimensions,function(u){var f=e.getData(),v=f.getDimensionInfo(f.mapDimension(u))||{};return G(G({},v),{name:u,ordinalMeta:null})});n=$(i,function(u,f){return{name:u,type:o[f%2].type}}),a=new ze(n,t)}else n=[{name:"value",type:"float"}],a=new ze(n,t);var s=$(t.get("data"),dt(_K,e,r,t));r&&(s=kt(s,dt(SK,r)));var l=r?function(u,f,v,h){var c=u.coord[Math.floor(h/2)][h%2];return _n(c,n[h])}:function(u,f,v,h){return _n(u.value,n[h])};return a.initData(s,null,l),a.hasItemOption=!0,a}const wK=xK;function TK(r){r.registerComponentModel(mK),r.registerComponentView(wK),r.registerPreprocessor(function(e){e_(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var CK=function(r,e){if(e==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},AK=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.call(this,t,a),this._updateSelector(t)},e.prototype._updateSelector=function(t){var a=t.selector,n=this.ecModel;a===!0&&(a=t.selector=["all","inverse"]),W(a)&&A(a,function(i,o){Z(i)&&(i={type:i}),a[o]=yt(i,CK(n,i.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var a=!1,n=0;n=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:V.size.m,align:"auto",backgroundColor:V.color.transparent,borderColor:V.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:V.color.disabled,inactiveBorderColor:V.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:V.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:V.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:V.color.tertiary,borderWidth:1,borderColor:V.color.border},emphasis:{selectorLabel:{show:!0,color:V.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e}(Ct);const Dy=AK;var Ao=dt,Ly=A,Ef=at,MK=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new Ef),this.group.add(this._selectorGroup=new Ef),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,a,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,a,n,l,s,u);var f=ce(t,n).refContainer,v=t.getBoxLayoutParams(),h=t.get("padding"),c=Ut(v,f,h),p=this.layoutInner(t,o,c,i,l,u),d=Ut(ot({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=eR(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,a,n,i,o,s,l){var u=this.getContentGroup(),f=j(),v=a.get("selectedMode"),h=a.get("triggerEvent"),c=[];n.eachRawSeries(function(p){!p.get("legendHoverLink")&&c.push(p.id)}),Ly(a.getData(),function(p,d){var g=this,y=p.get("name");if(!this.newlineDisabled&&(y===""||y===` `)){var m=new Ef;m.newline=!0,u.add(m);return}var _=n.getSeriesByName(y)[0];if(!f.get(y))if(_){var S=_.getData(),b=S.getVisual("legendLineStyle")||{},x=S.getVisual("legendIcon"),w=S.getVisual("style"),T=this._createItem(_,y,d,p,a,t,b,w,x,v,i);T.on("click",Ao(oC,y,null,i,c)).on("mouseover",Ao(Iy,_.name,null,i,c)).on("mouseout",Ao(Py,_.name,null,i,c)),n.ssr&&T.eachChild(function(C){var M=ut(C);M.seriesIndex=_.seriesIndex,M.dataIndex=d,M.ssrType="legend"}),h&&T.eachChild(function(C){g.packEventData(C,a,_,d,y)}),f.set(y,!0)}else n.eachRawSeries(function(C){var M=this;if(!f.get(y)&&C.legendVisualProvider){var D=C.legendVisualProvider;if(!D.containName(y))return;var I=D.indexOfName(y),L=D.getItemVisual(I,"style"),P=D.getItemVisual(I,"legendIcon"),k=Xe(L.fill);k&&k[3]===0&&(k[3]=.2,L=G(G({},L),{fill:sa(k,"rgba")}));var R=this._createItem(C,y,d,p,a,t,{},L,P,v,i);R.on("click",Ao(oC,null,y,i,c)).on("mouseover",Ao(Iy,null,y,i,c)).on("mouseout",Ao(Py,null,y,i,c)),n.ssr&&R.eachChild(function(O){var E=ut(O);E.seriesIndex=C.seriesIndex,E.dataIndex=d,E.ssrType="legend"}),h&&R.eachChild(function(O){M.packEventData(O,a,C,d,y)}),f.set(y,!0)}},this)},this),o&&this._createSelector(o,a,i,s,l)},e.prototype.packEventData=function(t,a,n,i,o){var s={componentType:"legend",componentIndex:a.componentIndex,dataIndex:i,value:o,seriesIndex:n.seriesIndex};ut(t).eventData=s},e.prototype._createSelector=function(t,a,n,i,o){var s=this.getSelectorGroup();Ly(t,function(u){var f=u.type,v=new Mt({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"]);ye(v,{normal:h,emphasis:c},{defaultText:u.title}),Di(v)})},e.prototype._createItem=function(t,a,n,i,o,s,l,u,f,v,h){var c=t.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=DK(f,i,l,u,c,g,h),b=new Ef,x=i.getModel("textStyle");if(et(t.getLegendIcon)&&(!_||_==="inherit"))b.add(t.getLegendIcon({itemWidth:p,itemHeight:d,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var w=_==="inherit"&&t.getData().getVisual("symbol")?y==="inherit"?t.getData().getVisual("symbolRotate"):y:0;b.add(LK({itemWidth:p,itemHeight:d,icon:f,iconRotate:w,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}))}var T=s==="left"?p+5:-5,C=s,M=o.get("formatter"),D=a;Z(M)&&M?D=M.replace("{name}",a??""):et(M)&&(D=M(a));var I=g?x.getTextColor():i.get("inactiveColor");b.add(new Mt({style:Gt(x,{text:D,x:T,y:d/2,fill:I,align:C,verticalAlign:"middle"},{inheritColor:I})}));var L=new _t({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=i.getModel("tooltip");return P.get("show")&&Ha({el:L,componentModel:o,itemName:a,itemTooltipOption:P.option}),b.add(L),b.eachChild(function(k){k.silent=!0}),L.silent=!v,this.getContentGroup().add(b),Di(b),b.__legendDataIndex=n,b},e.prototype.layoutInner=function(t,a,n,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Ii(t.get("orient"),l,t.get("itemGap"),n.width,n.height);var f=l.getBoundingRect(),v=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){Ii("horizontal",u,t.get("selectorItemGap",!0));var h=u.getBoundingRect(),c=[-h.x,-h.y],p=t.get("selectorButtonGap",!0),d=t.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()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Xt);function DK(r,e,t,a,n,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),Ly(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",v=l.getShallow("decal");u.decal=!v||v==="inherit"?a.decal:jo(v,o),u.fill==="inherit"&&(u.fill=a[n]),u.stroke==="inherit"&&(u.stroke=a[f]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?a:t).opacity),s(u,a);var h=e.getModel("lineStyle"),c=h.getLineStyle();if(s(c,t),u.fill==="auto"&&(u.fill=a.fill),u.stroke==="auto"&&(u.stroke=a.fill),c.stroke==="auto"&&(c.stroke=a.fill),!i){var p=e.get("inactiveBorderWidth"),d=u[f];u.lineWidth=p==="auto"?a.lineWidth>0&&d?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),c.stroke=h.get("inactiveColor"),c.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:c}}function LK(r){var e=r.icon||"roundRect",t=oe(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill=V.color.neutral00,t.style.lineWidth=2),t}function oC(r,e,t,a){Py(r,e,t,a),t.dispatchAction({type:"legendToggleSelect",name:r??e}),Iy(r,e,t,a)}function pR(r){for(var e=r.getZr().storage.getDisplayList(),t,a=0,n=e.length;an[o],g=[-c.x,-c.y];a||(g[i]=f[u]);var y=[0,0],m=[-p.x,-p.y],_=Q(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var S=t.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 b={x:0,y:0};if(b[o]=d?n[o]:c[o],b[s]=Math.max(c[s],p[s]),b[l]=Math.min(0,p[l]+m[1-i]),v.__rectSize=n[o],d){var x={x:0,y:0};x[o]=Math.max(n[o]-p[o]-_,0),x[s]=b[s],v.setClipPath(new _t({shape:x})),v.__rectSize=x[o]}else h.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return w.pageIndex!=null&&Dt(f,{x:w.contentPosition[0],y:w.contentPosition[1]},d?t:null),this._updatePageInfoView(t,w),b},e.prototype._pageGo=function(t,a,n){var i=this._getPageInfo(a)[t];i!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:a.id})},e.prototype._updatePageInfoView=function(t,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?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),c.cursor=h?"pointer":"default")});var i=n.childOfName("pageText"),o=t.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}))},e.prototype._getPageInfo=function(t){var a=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,s=yd[o],l=md[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||_&&!b(_,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]),(!_||!b(m,_.s))&&y.i=w&&x.s<=w+i}},e.prototype._findTargetItemIndex=function(t){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===t&&(a=s)}),a??i},e.type="legend.scroll",e}(dR);const OK=EK;function BK(r){r.registerAction("legendScroll","legendscroll",function(e,t){var a=e.scrollDataIndex;a!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(n){n.setScrollDataIndex(a)})})}function NK(r){mt(gR),r.registerComponentModel(kK),r.registerComponentView(OK),BK(r)}function VK(r){mt(gR),mt(NK)}var zK=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=Rn(eu.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(eu);const GK=zK;var a_=St();function FK(r,e,t){a_(r).coordSysRecordMap.each(function(a){var n=a.dataZoomInfoMap.get(e.uid);n&&(n.getRange=t)})}function HK(r,e){for(var t=a_(r).coordSysRecordMap,a=t.keys(),n=0;ni[n+a]&&(a=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:a,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:t,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}}}function ZK(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var a=a_(t),n=a.coordSysRecordMap||(a.coordSysRecordMap=j());n.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=JP(i);A(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,WK(t,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=j());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){yR(n,i);return}var f=YK(l,i,t);o.enable(f.controlType,f.opt),ys(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var XK=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,a,n){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),FK(n,t,{pan:X(_d.pan,this),zoom:X(_d.zoom,this),scrollMove:X(_d.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){HK(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(q0),_d={zoom:function(r,e,t,a){var n=this.range,i=n.slice(),o=r.axisModels[0];if(o){var s=Sd[e](null,[a.originX,a.originY],o,t,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(An(0,i,[0,100],0,f.minSpan,f.maxSpan),this.range=i,n[0]!==i[0]||n[1]!==i[1])return i}},pan:fC(function(r,e,t,a,n,i){var o=Sd[a]([i.oldX,i.oldY],[i.newX,i.newY],e,n,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:fC(function(r,e,t,a,n,i){var o=Sd[a]([0,0],[i.scrollDelta,i.scrollDelta],e,n,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function fC(r){return function(e,t,a,n){var i=this.range,o=i.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,a,n);if(An(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var Sd={grid:function(r,e,t,a,n){var i=t.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,e,t,a,n){var i=t.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,e,t,a,n){var i=t.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};const qK=XK;function mR(r){K0(r),r.registerComponentModel(GK),r.registerComponentView(qK),ZK(r)}var KK=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Rn(eu.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:V.color.accent10,borderRadius:0,backgroundColor:V.color.transparent,dataBackground:{lineStyle:{color:V.color.accent30,width:.5},areaStyle:{color:V.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:V.color.accent40,width:.5},areaStyle:{color:V.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:V.color.neutral00,borderColor:V.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:V.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:V.color.tertiary},brushSelect:!0,brushStyle:{color:V.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:V.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),e}(eu);const jK=KK;var Qs=_t,JK=1,xd=30,QK=7,tl="horizontal",vC="vertical",tj=5,ej=["line","bar","candlestick","scatter"],rj={easing:"cubicOut",duration:100,delay:0},aj=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,a){this.api=a,this._onBrush=X(this._onBrush,this),this._onBrushEnd=X(this._onBrushEnd,this)},e.prototype.render=function(t,a,n,i){if(r.prototype.render.apply(this,arguments),ys(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Gl(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var a=this._displayables.sliderGroup=new at;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(a),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,a=this.api,n=t.get("brushSelect"),i=n?QK:0,o=ce(t,a).refContainer,s=this._findCoordRect(),l=t.get("defaultLocationEdgeGap",!0)||0,u=this._orient===tl?{right:o.width-s.x-s.width,top:o.height-xd-l-i,width:s.width,height:xd}:{right:l,top:s.y,width:xd,height:s.height},f=Xi(t.option);A(["right","top","width","height"],function(h){f[h]==="ph"&&(f[h]=u[h])});var v=Ut(f,o);this._location={x:v.x,y:v.y},this._size=[v.width,v.height],this._orient===vC&&this._size.reverse()},e.prototype._positionGroup=function(){var t=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===tl&&!o?{scaleY:l?1:-1,scaleX:1}:n===tl&&o?{scaleY:l?1:-1,scaleX:-1}:n===vC&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=a.x-u.x,t.y=a.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,a=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new Qs({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new Qs({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:X(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)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var a=this._size,n=this._shadowSize||[],i=t.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():t.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(t.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=t.thisAxis.type==="time",b=-m,x=Math.round(o.count()/a[0]),w;o.each([t.thisDim,l],function(I,L,P){if(x>0&&P%x){S||(b+=m);return}b=S?(+I-v[0])*_:b+m;var k=L==null||isNaN(L)||L==="",R=k?0:Rt(L,h,p,!0);k&&!w&&P?(g.push([g[g.length-1][0],0]),y.push([y[y.length-1][0],0])):!k&&w&&(g.push([b,0]),y.push([b,0])),k||(g.push([b,R]),y.push([b,R])),w=k}),u=this._shadowPolygonPts=g,f=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var T=this.dataZoomModel;function C(I){var L=T.getModel(I?"selectedDataBackground":"dataBackground"),P=new at,k=new He({shape:{points:u},segmentIgnoreThreshold:1,style:L.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),R=new Ee({shape:{points:f},segmentIgnoreThreshold:1,style:L.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return P.add(k),P.add(R),P}for(var M=0;M<3;M++){var D=C(M===1);this._displayables.sliderGroup.add(D),this._displayables.dataShadowSegs.push(D)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,a=t.get("showDataShadow");if(a!==!1){var n,i=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();A(l,function(u){if(!n&&!(a!==!0&>(ej,u.get("type"))<0)){var f=i.getComponent(cn(o),s).axis,v=nj(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}},e.prototype._renderHandle=function(){var t=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 Qs({silent:v,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new Qs({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:JK,fill:V.color.transparent}})),A([0,1],function(_){var S=l.get("handleIcon");!Tv[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var b=oe(S,-1,0,2,2,null,!0);b.attr({cursor:ij(this._orient),draggable:!0,drift:X(this._onDragMove,this,_),ondragend:X(this._onDragEnd,this),onmouseover:X(this._showDataInfo,this,!0),onmouseout:X(this._showDataInfo,this,!1),z2:5});var x=b.getBoundingRect(),w=l.get("handleSize");this._handleHeight=Y(w,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Di(b);var T=l.get("handleColor");T!=null&&(b.style.fill=T),o.add(n[_]=b);var C=l.getModel("textStyle"),M=l.get("handleLabel")||{},D=M.show||!1;t.add(i[_]=new Mt({silent:!0,invisible:!D,style:Gt(C,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:C.getTextColor(),font:C.getFont()}),z2:10}))},this);var c=h;if(v){var p=Y(l.get("moveHandleSize"),s[1]),d=a.moveHandle=new _t({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=oe(l.get("moveHandleIcon"),-g/2,-g/2,g,g,V.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 _t({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:"default",drift:X(this._onDragMove,this,"all"),ondragstart:X(this._showDataInfo,this,!0),ondragend:X(this._onDragEnd,this),onmouseover:X(this._showDataInfo,this,!0),onmouseout:X(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[Rt(t[0],[0,100],a,!0),Rt(t[1],[0,100],a,!0)]},e.prototype._updateInterval=function(t,a){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];An(a,i,o,n.get("zoomLock")?"all":t,s.minSpan!=null?Rt(s.minSpan,l,o,!0):null,s.maxSpan!=null?Rt(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=Sr([Rt(i[0],o,l,!0),Rt(i[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},e.prototype._updateView=function(t){var a=this._displayables,n=this._handleEnds,i=Sr(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)}},e.prototype._onBrushStart=function(t){var a=t.offsetX,n=t.offsetY;this._brushStart=new it(a,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){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();An(0,l,o,0,u.minSpan!=null?Rt(u.minSpan,s,o,!0):null,u.maxSpan!=null?Rt(u.maxSpan,s,o,!0):null),this._range=Sr([Rt(l[0],o,s,!0),Rt(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(ka(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,a){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new Qs({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(t,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]})},e.prototype._dispatchZoomAction=function(t){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?rj:null,start:a[0],end:a[1]})},e.prototype._findCoordRect=function(){var t,a=JP(this.dataZoomModel).infoList;if(!t&&a.length){var n=a[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(q0);function nj(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function ij(r){return r==="vertical"?"ns-resize":"ew-resize"}const oj=aj;function _R(r){r.registerComponentModel(jK),r.registerComponentView(oj),K0(r)}function sj(r){mt(mR),mt(_R)}var lj={get:function(r,e,t){var a=rt((uj[r]||{})[e]);return t&&W(a)?a[a.length-1]:a}},uj={color:{active:["#006edd","#e0ffff"],inactive:[V.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]}};const SR=lj;var hC=Ae.mapVisual,fj=Ae.eachVisual,vj=W,cC=A,hj=Sr,cj=Rt,pj=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,a){var n=this.option;!a&&lR(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var a=this.stateList;t=X(t,this),this.controllerVisuals=Cy(this.option.controller,a,t),this.targetVisuals=Cy(this.option.target,a,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesId,a=this.option.seriesIndex;a==null&&t==null&&(a="all");var n=us(this.ecModel,"series",{index:a,id:t},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return $(n,function(i){return i.componentIndex})},e.prototype.eachTargetSeries=function(t,a){A(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(a,i)},this)},e.prototype.isTargetSeries=function(t){var a=!1;return this.eachTargetSeries(function(n){n===t&&(a=!0)}),a},e.prototype.formatValueText=function(t,a,n){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;n=n||["<",">"],W(t)&&(t=t.slice(),u=!0);var f=a?t:u?[v(t[0]),v(t[1])]:v(t);if(Z(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(et(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?n[0]+" "+f[1]:t[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))}},e.prototype.resetExtent=function(){var t=this.option,a=hj([t.min,t.max]);this._dataExtent=a},e.prototype.getDataDimensionIndex=function(t){var a=this.option.dimension;if(a!=null)return t.getDimensionIndex(a);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var o=n[i],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=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){vj(a.color)&&!v.inRange&&(v.inRange={color:a.color.slice().reverse()}),v.inRange=v.inRange||{color:t.get("gradientColor")}}function u(v,h,c){var p=v[h],d=v[c];p&&!d&&(d=v[c]={},cC(p,function(g,y){if(Ae.isValidType(y)){var m=SR.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";cC(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=hC(_.symbol,function(x){return x==="none"?g:x});var S=_.symbolSize;if(S!=null){var b=-1/0;fj(S,function(x){x>b&&(b=x)}),_.symbolSize=hC(S,function(x){return cj(x,[0,b],[0,m[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.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:V.color.transparent,borderColor:V.color.borderTint,contentColor:V.color.theme[0],inactiveColor:V.color.disabled,borderWidth:0,padding:V.size.m,textGap:10,precision:0,textStyle:{color:V.color.secondary}},e}(Ct);const nh=pj;var pC=[20,140],dj=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=pC[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=pC[1])},e.prototype._resetRange=function(){var t=this.getExtent(),a=this.option.range;!a||a.auto?(t.auto=1,this.option.range=t):W(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],t[0]),a[1]=Math.min(a[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),A(this.stateList,function(t){var a=this.option.controller[t].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),a=Sr((this.get("range")||[]).slice());return a[0]>t[1]&&(a[0]=t[1]),a[1]>t[1]&&(a[1]=t[1]),a[0]=n[1]||t<=a[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&i.push(l)},this),a.push({seriesId:n.id,dataIndex:i})},this),a},e.prototype.getVisualMeta=function(t){var a=dC(this,"outOfRange",this.getExtent()),n=dC(this,"inRange",this.option.range.slice()),i=[];function o(c,p){i.push({value:c,color:t(c,p)})}for(var s=0,l=0,u=n.length,f=a.length;lt[1])break;i.push({color:this.getControllerVisual(l,"color",a),offset:s/n})}return i.push({color:this.getControllerVisual(t[1],"color",a),offset:1}),i},e.prototype._createBarPoints=function(t,a){var n=this.visualMapModel.itemSize;return[[n[0]-a[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-a[1],t[1]]]},e.prototype._createBarGroup=function(t){var a=this._orient,n=this.visualMapModel.get("inverse");return new at(a==="horizontal"&&!n?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&n?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!n?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,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);mj([0,1],function(v){var h=o[v];h.setStyle("fill",a.handlesColor[v]),h.y=t[v];var c=qr(t[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=Rr(n.handleLabelPoints[v],Li(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)}},e.prototype._showIndicator=function(t,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(t,"color",h),p=this.getControllerVisual(t,"symbolSize"),d=qr(t,s,u,!0),g=l[0]-p/2,y={x:v.x,y:v.y};v.y=d,v.x=g;var m=Rr(f.indicatorLabelPoint,Li(v,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",f.mainGroup),b=this._orient,x=b==="horizontal";_.setStyle({text:(n||"")+o.formatValueText(a),verticalAlign:x?S:"middle",align:x?"center":S});var w={x:g,y:d,style:{fill:c}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var C={duration:100,easing:"cubicInOut",additive:!0};v.x=y.x,v.y=y.y,v.animateTo(w,C),_.animateTo(T,C)}else v.attr(w),_.attr(T);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||_C(n))&&(c=this._hoverLinkDataIndices=n.findTargetDataIndices(v));var p=YE(h,c);this._dispatchHighDown("downplay",rv(p[0],n)),this._dispatchHighDown("highlight",rv(p[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var a;if(xi(t.target,function(l){var u=ut(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)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.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 Mj(r,e,t,a){for(var n=e.targetVisuals[a],i=Ae.prepareVisualTypes(n),o={color:vu(r.getData(),"color")},s=0,l=i.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(Tj,Cj),A(Aj,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(Dj))}function TR(r){r.registerComponentModel(gj),r.registerComponentView(wj),wR(r)}var Lj=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],Ij[this._mode].call(this,this._pieceList),this._resetSelected(t,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=$(this._pieceList,function(l){return l=rt(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,a={},n=Ae.listVisualTypes(),i=this.isCategory();A(t.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(t,f,l)||o(t.target,f,l)},this),!u&&A(this.stateList,function(f){(t[f]||(t[f]={}))[l]=SR.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)},e.prototype._resetSelected=function(t,a){var n=this.option,i=this._pieceList,o=(a?n:t).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)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=rt(t)},e.prototype.getValueState=function(t){var a=Ae.findPieceIndex(t,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){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=Ae.findPieceIndex(l,n);f===t&&o.push(u)},this),a.push({seriesId:i.id,dataIndex:o})},this),a},e.prototype.getRepresentValue=function(t){var a;if(this.isCategory())a=t.value;else if(t.value!=null)a=t.value;else{var n=t.interval||[];a=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return a},e.prototype.getVisualMeta=function(t){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=t(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}},e.type="visualMap.piecewise",e.defaultOption=Rn(nh.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}),e}(nh),Ij={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),a=this.getExtent(),n=e.splitNumber;n=Math.max(parseInt(n,10),1),e.splitNumber=n;for(var i=(a[1]-a[0])/n;+i.toFixed(t)!==i&&t<5;)t++;e.precision=t,i=+i.toFixed(t),e.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o","≥"][a[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,n)},this)}};function wC(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}const Pj=Lj;var Rj=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.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=Ce(a.get("showLabel",!0),!u),v=!a.get("selectedMode");u&&this._renderEndsText(t,u[0],s,f,o),A(l.viewPieceList,function(h){var c=h.piece,p=new at;p.onclick=X(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 Mt({style:Gt(i,{x:y==="right"?-n:s[0]+n,y:s[1]/2,text:c.text,verticalAlign:i.get("verticalAlign")||"middle",align:y,opacity:Q(i.get("opacity"),g==="outOfRange"?.5:1)}),silent:v}))}t.add(p)},this),u&&this._renderEndsText(t,u[1],s,f,o),Ii(a.get("orient"),t,a.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,a){var n=this;t.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:rv(s.findTargetDataIndices(a),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,a=t.option;if(a.orient==="vertical")return bR(t,this.api,t.itemSize);var n=a.align;return(!n||n==="auto")&&(n="left"),n},e.prototype._renderEndsText=function(t,a,n,i,o){if(a){var s=new at,l=this.visualMapModel.textStyleModel;s.add(new Mt({style:Gt(l,{x:i?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:a})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,a=$(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=t.get("text"),i=t.get("orient"),o=t.get("inverse");return(i==="horizontal"?o:!o)?a.reverse():n&&(n=n.slice().reverse()),{viewPieceList:a,endsText:n}},e.prototype._createItemSymbol=function(t,a,n,i){var o=oe(this.getControllerVisual(a,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(a,"color"));o.silent=i,t.add(o)},e.prototype._onItemClick=function(t){var a=this.visualMapModel,n=a.option,i=n.selectedMode;if(i){var o=rt(n.selected),s=a.getSelectedMapKey(t);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})}},e.type="visualMap.piecewise",e}(xR);const kj=Rj;function CR(r){r.registerComponentModel(Pj),r.registerComponentView(kj),wR(r)}function Ej(r){mt(TR),mt(CR)}var Oj=function(){function r(e){this._thumbnailModel=e}return r.prototype.reset=function(e){this._renderVersion=e.getMainProcessVersion()},r.prototype.renderContent=function(e){var t=e.api.getViewOfComponentModel(this._thumbnailModel);t&&(e.group.silent=!0,t.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:zM(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},r.prototype.updateWindow=function(e,t){var a=t.getViewOfComponentModel(this._thumbnailModel);a&&a.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},r}(),Bj=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.optionUpdated=function(t,a){this._updateBridge()},e.prototype._updateBridge=function(){var t=this._birdge=this._birdge||new Oj(this);if(this._target=null,this.ecModel.eachSeries(function(n){Zb(n,null)}),this.shouldShow()){var a=this.getTarget();Zb(a.baseMapProvider,t)}},e.prototype.shouldShow=function(){return this.getShallow("show",!0)},e.prototype.getBridge=function(){return this._birdge},e.prototype.getTarget=function(){if(this._target)return this._target;var t=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return t?t.subType!=="graph"&&(t=null):t=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:t},this._target},e.type="thumbnail",e.layoutMode="box",e.dependencies=["series","geo"],e.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:V.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:V.color.neutral30,borderColor:V.color.neutral40,opacity:.3},z:10},e}(Ct),Nj=function(r){B(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){if(this._api=n,this._model=t,this._coordSys||(this._coordSys=new eo),!this._isEnabled()){this._clear();return}this._renderVersion=n.getMainProcessVersion();var i=this.group;i.removeAll();var o=t.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=a.get("backgroundColor")||V.color.neutral00);var l=ce(t,n).refContainer,u=Ut(lD(t,!0),l),f=s.lineWidth||0,v=this._contentRect=Vi(u.clone(),f/2,!0,!0),h=new at;i.add(h),h.setClipPath(new _t({shape:v.plain()}));var c=this._targetGroup=new at;h.add(c);var p=u.plain();p.r=o.getShallow("borderRadius",!0),i.add(this._bgRect=new _t({style:s,shape:p,silent:!1,cursor:"grab"}));var d=t.getModel("windowStyle"),g=d.getShallow("borderRadius",!0);h.add(this._windowRect=new _t({shape:{x:0,y:0,width:0,height:0,r:g},style:d.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),CC(t,this)},e.prototype.renderContent=function(t){this._bridgeRendered=t,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),CC(this._model,this))},e.prototype._dealRenderContent=function(){var t=this._bridgeRendered;if(!(!t||t.renderVersion!==this._renderVersion)){var a=this._targetGroup,n=this._coordSys,i=this._contentRect;if(a.removeAll(),!!t){var o=t.group,s=o.getBoundingRect();a.add(o),this._bgRect.z2=t.z2Range.min-10,n.setBoundingRect(s.x,s.y,s.width,s.height);var l=Ut({left:"center",top:"center",aspect:s.width/s.height},i);n.setViewRect(l.x,l.y,l.width,l.height),o.attr(n.getTransformInfo().raw),this._windowRect.z2=t.z2Range.max+10,this._resetRoamController(t.roamType)}}},e.prototype.updateWindow=function(t){var a=this._bridgeRendered;a&&a.renderVersion===t.renderVersion&&(a.targetTrans=t.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},e.prototype._dealUpdateWindow=function(){var t=this._bridgeRendered;if(!(!t||t.renderVersion!==this._renderVersion)){var a=Or([],t.targetTrans),n=oa([],this._coordSys.transform,a);this._transThisToTarget=Or([],n);var i=t.viewportRect;i?i=i.clone():i=new lt(0,0,this._api.getWidth(),this._api.getHeight()),i.applyTransform(n);var o=this._windowRect,s=o.shape.r;o.setShape(ot({r:s},i))}},e.prototype._resetRoamController=function(t){var a=this,n=this._api,i=this._roamController;if(i||(i=this._roamController=new to(n.getZr())),!t||!this._isEnabled()){i.disable();return}i.enable(t,{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",X(this._onPan,this)).on("zoom",X(this._onZoom,this))},e.prototype._onPan=function(t){var a=this._transThisToTarget;if(!(!this._isEnabled()||!a)){var n=te([],[t.oldX,t.oldY],a),i=te([],[t.oldX-t.dx,t.oldY-t.dy],a);this._api.dispatchAction(TC(this._model.getTarget().baseMapProvider,{dx:i[0]-n[0],dy:i[1]-n[1]}))}},e.prototype._onZoom=function(t){var a=this._transThisToTarget;if(!(!this._isEnabled()||!a)){var n=te([],[t.originX,t.originY],a);this._api.dispatchAction(TC(this._model.getTarget().baseMapProvider,{zoom:1/t.scale,originX:n[0],originY:n[1]}))}},e.prototype._isEnabled=function(){var t=this._model;if(!t||!t.shouldShow())return!1;var a=t.getTarget().baseMapProvider;return!!a},e.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},e.prototype.remove=function(){this._clear()},e.prototype.dispose=function(){this._clear()},e.type="thumbnail",e}(Xt);function TC(r,e){var t=r.mainType==="series"?r.subType+"Roam":r.mainType+"Roam",a={type:t};return a[r.mainType+"Id"]=r.id,G(a,e),a}function CC(r,e){var t=zi(r);Lh(e.group,t.z,t.zlevel)}function Vj(r){r.registerComponentModel(Bj),r.registerComponentView(Nj)}var zj={label:{enabled:!0},decal:{show:!1}},AC=St(),Gj={};function Fj(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var a=rt(zj);yt(a.label,r.getLocaleModel().get("aria"),!1),yt(t.option,a,!1),n(),i();function n(){var u=t.getModel("decal"),f=u.get("show");if(f){var v=j();r.eachSeries(function(h){if(!h.isColorBySeries()){var c=v.get(h.type);c||(c={},v.set(h.type,c)),AC(h).scope=c}}),r.eachRawSeries(function(h){if(r.isSeriesFiltered(h))return;if(et(h.enableAriaDecal)){h.enableAriaDecal();return}var c=h.getData();if(h.isColorBySeries()){var m=Sg(h.ecModel,h.name,Gj,r.getSeriesCount()),_=c.getVisual("decal");c.setVisual("decal",S(_,m))}else{var p=h.getRawData(),d={},g=AC(h).scope;c.each(function(b){var x=c.getRawIndex(b);d[x]=b});var y=p.count();p.each(function(b){var x=d[b],w=p.getName(b)||b+"",T=Sg(h.ecModel,w,g,y),C=c.getItemVisual(x,"decal");c.setItemVisual(x,"decal",S(C,T))})}function S(b,x){var w=b?G(G({},x),b):x;return w.dirty=!0,w}})}}function i(){var u=e.getZr().dom;if(u){var f=r.getLocaleModel().get("aria"),v=t.getModel("label");if(v.option=ot(v.option,f),!!v.get("enabled")){if(u.setAttribute("role","img"),v.get("description")){u.setAttribute("aria-label",v.get("description"));return}var h=r.getSeriesCount(),c=v.get(["data","maxCount"])||10,p=v.get(["series","maxCount"])||10,d=Math.min(h,p),g;if(!(h<1)){var y=s();if(y){var m=v.get(["general","withTitle"]);g=o(m,{title:y})}else g=v.get(["general","withoutTitle"]);var _=[],S=h>1?v.get(["series","multiple","prefix"]):v.get(["series","single","prefix"]);g+=o(S,{seriesCount:h}),r.eachSeries(function(T,C){if(C1?v.get(["series","multiple",I]):v.get(["series","single",I]),M=o(M,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var L=T.getData();if(L.count()>c){var P=v.get(["data","partialData"]);M+=o(P,{displayCnt:c})}else M+=v.get(["data","allData"]);for(var k=v.get(["data","separator","middle"]),R=v.get(["data","separator","end"]),O=v.get(["data","excludeDimensionId"]),E=[],N=0;N":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},$j=function(){function r(e){var t=this._condVal=Z(e)?new RegExp(e):XR(e)?e:null;if(t==null){var a="";Pt(a)}}return r.prototype.evaluate=function(e){var t=typeof e;return Z(t)?this._condVal.test(e):wt(t)?this._condVal.test(e+""):!1},r}(),Uj=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),Yj=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&a.push(n),n=[L,P]}function f(L,P,k,R){Go(L,k)&&Go(P,R)||n.push(L,P,k,R,k,R)}function v(L,P,k,R,O,E){var N=Math.abs(P-L),z=Math.tan(N/4)*4/3,F=PT:D2&&a.push(n),a}function ky(r,e,t,a,n,i,o,s,l,u){if(Go(r,t)&&Go(e,a)&&Go(n,o)&&Go(i,s)){l.push(o,s);return}var f=2/u,v=f*f,h=o-r,c=s-e,p=Math.sqrt(h*h+c*c);h/=p,c/=p;var d=t-r,g=a-e,y=n-o,m=i-s,_=d*d+g*g,S=y*y+m*m;if(_=0&&T=0){l.push(o,s);return}var C=[],M=[];xn(r,t,n,o,.5,C),xn(e,a,i,s,.5,M),ky(C[0],M[0],C[1],M[1],C[2],M[2],C[3],M[3],l,u),ky(C[4],M[4],C[5],M[5],C[6],M[6],C[7],M[7],l,u)}function oJ(r,e){var t=Ry(r),a=[];e=e||1;for(var n=0;n0)for(var u=0;uMath.abs(u),v=MR([l,u],f?0:1,e),h=(f?s:u)/v.length,c=0;cn,o=MR([a,n],i?0:1,e),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 it(d*l+r,d*u+e)}function uJ(r,e,t){var a=new it;it.sub(a,t,e),a.normalize();var n=new it;it.sub(n,r,e);var i=n.dot(a);return i}function Do(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function fJ(r,e,t){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),fJ(e,u,f)}function ih(r,e,t,a){if(t===1)a.push(e);else{var n=Math.floor(t/2),i=r(e);ih(r,i[0],n,a),ih(r,i[1],t-n,a)}return a}function vJ(r,e){for(var t=[],a=0;a0)for(var b=a/t,x=-a/2;x<=a/2;x+=b){for(var w=Math.sin(x),T=Math.cos(x),C=0,_=0;_0;u/=2){var f=0,v=0;(r&u)>0&&(f=1),(e&u)>0&&(v=1),s+=u*u*(3*f^v),v===0&&(f===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function lh(r){var e=1/0,t=1/0,a=-1/0,n=-1/0,i=$(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 e=Math.min(f,e),t=Math.min(v,t),a=Math.max(f,a),n=Math.max(v,n),[f,v]}),o=$(i,function(s,l){return{cp:s,z:SJ(s[0],s[1],e,t,a,n),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function IR(r){return pJ(r.path,r.count)}function Ey(){return{fromIndividuals:[],toIndividuals:[],count:0}}function xJ(r,e,t){var a=[];function n(b){for(var x=0;x=0;n--)if(!t[n].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[n].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var wJ={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a0))return;var s=a.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,f;OC(r)&&(u=r,f=e),OC(e)&&(u=e,f=r);function v(y,m,_,S,b){var x=y.many,w=y.one;if(x.length===1&&!b){var T=m?x[0]:w,C=m?w:x[0];if(oh(T))v({many:[T],one:C},!0,_,S,!0);else{var M=s?ot({delay:s(_,S)},l):l;i_(T,C,M),i(T,C,T,C,M)}}else for(var D=ot({dividePath:wJ[t],individualDelay:s&&function(O,E,N,z){return s(O+_,S)}},l),I=m?xJ(x,w,D):bJ(w,x,D),L=I.fromIndividuals,P=I.toIndividuals,k=L.length,R=0;Re.length,c=u?BC(f,u):BC(h?e:r,[h?r:e]),p=0,d=0;dPR))for(var i=a.getIndices(),o=0;o0&&x.group.traverse(function(T){T instanceof xt&&!T.animators.length&&T.animateFrom({style:{opacity:0}},w)})})}function FC(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function HC(r){return W(r)?r.sort().join(","):r}function an(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function IJ(r,e){var t=j(),a=j(),n=j();return A(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=FC(i),f=HC(u);a.set(f,{dataGroupId:s,data:l}),W(u)&&A(u,function(v){n.set(v,{key:f,dataGroupId:s,data:l})})}),A(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=FC(i),u=HC(l),f=a.get(u);if(f)t.set(u,{oldSeries:[{dataGroupId:f.dataGroupId,divide:an(f.data),data:f.data}],newSeries:[{dataGroupId:o,divide:an(s),data:s}]});else if(W(l)){var v=[];A(l,function(p){var d=a.get(p);d.data&&v.push({dataGroupId:d.dataGroupId,divide:an(d.data),data:d.data})}),v.length&&t.set(u,{oldSeries:v,newSeries:[{dataGroupId:o,data:s,divide:an(s)}]})}else{var h=n.get(l);if(h){var c=t.get(h.key);c||(c={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:an(h.data)}],newSeries:[]},t.set(h.key,c)),c.newSeries.push({dataGroupId:o,data:s,divide:an(s)})}}}}),t}function WC(r,e){for(var t=0;t=0&&n.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:an(e.oldData[s]),groupIdDim:o.dimension})}),A(Vt(r.to),function(o){var s=WC(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:an(l),groupIdDim:o.dimension})}}),n.length>0&&i.length>0&&RR(n,i,a)}function RJ(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){A(Vt(a.seriesTransition),function(n){A(Vt(n.to),function(i){for(var o=a.updatedSeries,s=0;so.vmin?t+=o.vmin-a+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:t+=e-a,a=o.vmax,n=!1;break}t+=o.vmin-a+o.gapReal,a=o.vmax}return n&&(t+=e-a),t},r.prototype.unelapse=function(e){for(var t=$C,a=UC,n=!0,i=0,o=0;ol?i=s.vmin+(e-l)/(u-l)*(s.vmax-s.vmin):i=a+e-t,a=s.vmax,n=!1;break}t=u,a=s.vmax}return n&&(i=a+e-t),i},r}();function EJ(){return new kJ}var $C=0,UC=0;function OJ(r,e){var t=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"&&(t+=l.val);var u=o_(s,e);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=t*(0+(e[1]-e[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=t!==0?Math.max(o,0)*l.val/t:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function BJ(r,e,t,a,n,i){r!=="no"&&A(t,function(o){var s=o_(o,i);if(s)for(var l=e.length-1;l>=0;l--){var u=e[l],f=a(u),v=n*3/4;f>s.vmin-v&&fe[0]&&t=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:e(o.start),vmax:e(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(Z(o.gap)){var u=_r(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=e(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),t&&t.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:a.filter(function(o){return!!o})}}function s_(r,e){return By(e)===By(r)}function By(r){return r.start+"_\0_"+r.end}function VJ(r,e,t){var a=[];A(r,function(i,o){var s=e(i);s&&s.type==="vmin"&&a.push([o])}),A(r,function(i,o){var s=e(i);if(s&&s.type==="vmax"){var l=Wi(a,function(u){return s_(e(r[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var n=[];return A(a,function(i){i.length===2&&n.push(t?i:[r[i[0]],r[i[1]]])}),n}function zJ(r,e,t,a){var n,i;if(r.break){var o=r.break.parsedBreak,s=Wi(t,function(v){return s_(v.breakOption,r.break.parsedBreak.breakOption)}),l=a(Math.pow(e,o.vmin),s.vmin),u=a(Math.pow(e,o.vmax),s.vmax),f={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?re(Math.pow(e,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};n={type:r.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:f,gapReal:o.gapReal}},i=s[r.break.type]}return{brkRoundingCriterion:i,vBreak:n}}function GJ(r,e,t){var a={noNegative:!0},n=Oy(r,t,a),i=Oy(r,t,a),o=Math.log(e);return i.breaks=$(i.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,f={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:f,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:n,parsedLogged:i}}var FJ={vmin:"start",vmax:"end"};function HJ(r,e){return e&&(r=r||{},r.break={type:FJ[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),r}function WJ(){hN({createScaleBreakContext:EJ,pruneTicksByBreak:BJ,addBreaksToTicks:NJ,parseAxisBreakOption:Oy,identifyAxisBreak:s_,serializeAxisBreakIdentifier:By,retrieveAxisBreakPairs:VJ,getTicksLogTransformBreak:zJ,logarithmicParseBreaksFromOption:GJ,makeAxisLabelFormatterParamBreak:HJ})}var YC=St();function $J(r,e){var t=Wi(r,function(a){return ae().identifyAxisBreak(a.parsedBreak.breakOption,e.breakOption)});return t||r.push(t={zigzagRandomList:[],parsedBreak:e,shouldRemove:!1}),t}function UJ(r){A(r,function(e){return e.shouldRemove=!0})}function YJ(r){for(var e=r.length-1;e>=0;e--)r[e].shouldRemove&&r.splice(e,1)}function ZJ(r,e,t,a,n){var i=t.axis;if(i.scale.isBlank()||!ae())return;var o=ae().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:"only_break"}),function(C){return C.break},!1);if(!o.length)return;var s=t.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 at({ignoreModelZ:!0}),S=i.isHorizontal(),b=YC(e).visualList||(YC(e).visualList=[]);UJ(b);for(var x=function(C){var M=o[C][0].break.parsedBreak,D=[];D[0]=i.toGlobalCoord(i.dataToCoord(M.vmin,!0)),D[1]=i.toGlobalCoord(i.dataToCoord(M.vmax,!0)),D[1]=E;At&&(U=E);var Ot=[],vt=[];Ot[R]=D,vt[R]=I,!ft&&!At&&(Ot[R]+=H?-l:l,vt[R]-=H?l:-l),Ot[O]=U,vt[O]=U,z.push(Ot),F.push(vt);var tt=void 0;if(Km[1]&&m.reverse(),{coordPair:m,brkId:ae().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 it,y=new it;it.scale(g,a,-s),it.scale(y,a,1-s),zg(t[0],g),zg(t[1],y)}function KJ(r,e){var t={breaks:[]};return A(e.breaks,function(a){if(a){var n=Wi(r.get("breaks",!0),function(s){return ae().identifyAxisBreak(s,a)});if(n){var i=e.type,o={isExpanded:!!n.isExpanded};n.isExpanded=i===Fh?!0:i===qI?!1:i===KI?!n.isExpanded:n.isExpanded,t.breaks.push({start:n.start,end:n.end,isExpanded:!!n.isExpanded,old:o})}}}),t}function jJ(){iH({adjustBreakLabelPair:qJ,buildAxisBreakLine:XJ,rectCoordBuildBreakAxis:ZJ,updateModelAxisBreak:KJ})}function JJ(r){cH(r),WJ(),jJ()}function QJ(){EH(tQ)}function tQ(r,e){A(r,function(t){if(!t.model.get(["axisLabel","inside"])){var a=eQ(t);if(a){var n=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]);e[n]-=a[n]+i,t.position==="top"?e.y+=a.height+i:t.position==="left"&&(e.x+=a.width+i)}}})}function eQ(r){var e=r.model,t=r.scale;if(!e.get(["axisLabel","show"])||t.isBlank())return;var a,n,i=t.getExtent();t instanceof Ul?n=t.count():(a=t.getTicks(),n=a.length);var o=r.getLabelModel(),s=_s(r),l,u=1;n>40&&(u=Math.ceil(n/40));for(var f=0;f