import{M as jL,f as QL,a as tI,b as eI,c as rI,d as aI,s as nI,e as iI,g as oI,h as sI,i as lI,j as uI,k as fI,r as hI,_ as vI,t as cI,q as pI,p as dI}from"./lodash.a6143d7a.js";import{_ as Ml}from"./plugin-vue_export-helper.f63bf49c.js";import{g as Jt,L as zb,e as vg,o as $t,c as Ce,y as gI,H as cg,R as yI,k as Yr,i as Gb,r as fe,s as ha,j as Ht,a as ir,b as Yt,n as Wr,F as Za,q as Js,m as mI,A as js,E as Ua,I as _I,d as pg,Q as Fb,C as co,J as Hb,D as Wb,t as Ya,l as SI,S as xI,T as wI,U as bI}from"./index.51881bf4.js";const TI="/plugin/topo/assets/center.7df16192.svg",CI="/plugin/topo/assets/center_offline.29451ee7.svg";/*! ***************************************************************************** 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 Tp=function(r,e){return Tp=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])},Tp(r,e)};function O(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Tp(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var AI=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),DI=function(){function r(){this.browser=new AI,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}(),Ga=new DI;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Ga.wxa=!0,Ga.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Ga.worker=!0:!Ga.hasGlobalWindow||"Deno"in window?(Ga.node=!0,Ga.svgSupported=!0):MI(navigator.userAgent,Ga);function MI(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),e.domSupported=typeof document<"u";var s=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in s||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}const bt=Ga;var dg=12,$b="sans-serif",ln=dg+"px "+$b,LI=20,II=100,PI="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function RI(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 t}function eP(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(),h=2*u,v=f.left,c=f.top;o.push(v,c),l=l&&i&&v===i[h]&&c===i[h+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(e.srcCoords=o,e[a]=t?Em(s,o):Em(o,s))}function Jb(r){return r.nodeName.toUpperCase()==="CANVAS"}var rP=/([&<>"'])/g,aP={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ae(r){return r==null?"":(r+"").replace(rP,function(e,t){return aP[t]})}var nP=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ev=[],iP=bt.browser.firefox&&+bt.browser.version.split(".")[0]<39;function Pp(r,e,t,a){return t=t||{},a?Om(r,e,t):iP&&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):Om(r,e,t),t}function Om(r,e,t){if(bt.domSupported&&r.getBoundingClientRect){var a=e.clientX,n=e.clientY;if(Jb(r)){var i=r.getBoundingClientRect();t.zrX=a-i.left,t.zrY=n-i.top;return}else if(Ip(ev,r,a,n)){t.zrX=ev[0],t.zrY=ev[1];return}}t.zrX=t.zrY=0}function wg(r){return r||window.event}function or(r,e,t){if(e=wg(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&&Pp(r,o,e,t)}else{Pp(r,e,e,t);var i=oP(e);e.zrDelta=i?i/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&nP.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function oP(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 Rp(r,e,t,a){r.addEventListener(e,t,a)}function sP(r,e,t,a){r.removeEventListener(e,t,a)}var Sa=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function Nm(r){return r.which===2||r.which===3}var lP=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=Bm(a)/Bm(n);!isFinite(i)&&(i=1),e.pinchScale=i;var o=uP(a);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function Je(){return[1,0,0,1,0,0]}function gh(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function bg(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 da(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 ta(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 Di(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),h=Math.cos(t);return r[0]=n*h+s*f,r[1]=-n*f+s*h,r[2]=i*h+l*f,r[3]=-i*f+h*l,r[4]=h*(o-a[0])+f*(u-a[1])+a[0],r[5]=h*(u-a[1])-f*(o-a[0])+a[1],r}function Tg(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 Eo(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 fP(r){var e=Je();return bg(e,r),e}var hP=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 ht=hP;var Kl=Math.min,Jl=Math.max,xn=new ht,wn=new ht,bn=new ht,Tn=new ht,Xo=new ht,qo=new ht,vP=function(){function r(e,t,a,n){a<0&&(e=e+a,a=-a),n<0&&(t=t+n,n=-n),this.x=e,this.y=t,this.width=a,this.height=n}return r.prototype.union=function(e){var t=Kl(e.x,this.x),a=Kl(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Jl(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Jl(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=Je();return ta(i,i,[-t.x,-t.y]),Tg(i,i,[a,n]),ta(i,i,[e.x,e.y]),i},r.prototype.intersect=function(e,t){if(!e)return!1;e instanceof r||(e=r.create(e));var a=this,n=a.x,i=a.x+a.width,o=a.y,s=a.y+a.height,l=e.x,u=e.x+e.width,f=e.y,h=e.y+e.height,v=!(ip&&(p=_,dp&&(p=S,y=a.x&&e<=a.x+a.width&&t>=a.y&&t<=a.y+a.height},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){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},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}xn.x=bn.x=t.x,xn.y=Tn.y=t.y,wn.x=Tn.x=t.x+t.width,wn.y=bn.y=t.y+t.height,xn.transform(a),Tn.transform(a),wn.transform(a),bn.transform(a),e.x=Kl(xn.x,wn.x,bn.x,Tn.x),e.y=Kl(xn.y,wn.y,bn.y,Tn.y);var l=Jl(xn.x,wn.x,bn.x,Tn.x),u=Jl(xn.y,wn.y,bn.y,Tn.y);e.width=l-e.x,e.height=u-e.y},r}();const vt=vP;var jb="silent";function cP(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:pP}}function pP(){Sa(this.event)}var dP=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(yr),Ko=function(){function r(e,t){this.x=e,this.y=t}return r}(),gP=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],av=new vt(0,0,0,0),Qb=function(r){O(e,r);function e(t,a,n,i,o){var s=r.call(this)||this;return s._hovered=new Ko(0,0),s.storage=t,s.painter=a,s.painterRoot=i,s._pointerSize=o,n=n||new dP,s.proxy=null,s.setHandlerProxy(n),s._draggingMgr=new KI(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(D(gP,function(a){t.on&&t.on(a,this[a],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var a=t.zrX,n=t.zrY,i=tT(this,a,n),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=i?new Ko(a,n):this.findHover(a,n),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var a=t.zrEventControl;a!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),a!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Ko(0,0)},e.prototype.dispatch=function(t,a){var n=this[t];n&&n.call(this,a)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var a=this.proxy;a.setCursor&&a.setCursor(t)},e.prototype.dispatchToElement=function(t,a,n){t=t||{};var i=t.target;if(!(i&&i.silent)){for(var o="on"+a,s=cP(a,t,n);i&&(i[o]&&(s.cancelBubble=!!i[o].call(i,s)),i.trigger(a,s),i=i.__hostTarget?i.__hostTarget:i.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(a,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(a,s)}))}},e.prototype.findHover=function(t,a,n){var i=this.storage.getDisplayList(),o=new Ko(t,a);if(Vm(i,o,t,a,n),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,f=new vt(t-u,a-u,l,l),h=i.length-1;h>=0;h--){var v=i[h];v!==n&&!v.ignore&&!v.ignoreCoarsePointer&&(!v.parent||!v.parent.ignoreCoarsePointer)&&(av.copy(v.getBoundingRect()),v.transform&&av.applyTransform(v.transform),av.intersect(f)&&s.push(v))}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 yP(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.parent}return n?jb:!0}return!1}function Vm(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=yP(o,t,a))&&(!e.topTarget&&(e.topTarget=o),s!==jb)){e.target=o;break}}}function tT(r,e,t){var a=r.painter;return e<0||e>a.getWidth()||t<0||t>a.getHeight()}const mP=Qb;var eT=32,Jo=7;function _P(r){for(var e=0;r>=eT;)e|=r&1,r>>=1;return r+e}function zm(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 SP(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 nv(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 iv(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 xP(r,e){var t=Jo,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]=Jo||b>=Jo);if(T)break;x<0&&(x=0),x+=2}if(t=x,t<1&&(t=1),p===1){for(y=0;y=0;y--)r[w+y]=r[x+y];r[S]=o[_];return}for(var b=t;;){var T=0,C=0,A=!1;do if(e(o[_],r[m])<0){if(r[S--]=r[m--],T++,C=0,--p===0){A=!0;break}}else if(r[S--]=o[_--],C++,T=0,--g===1){A=!0;break}while((T|C)=0;y--)r[w+y]=r[x+y];if(p===0){A=!0;break}}if(r[S--]=o[_--],--g===1){A=!0;break}if(C=g-nv(r[m],o,0,g,g-1,e),C!==0){for(S-=C,_-=C,g-=C,w=S+1,x=_+1,y=0;y=Jo||C>=Jo);if(A)break;b<0&&(b=0),b+=2}if(t=b,t<1&&(t=1),g===1){for(S-=p,m-=p,w=S+1,x=m+1,y=p-1;y>=0;y--)r[w+y]=r[x+y];r[S]=o[_]}else{if(g===0)throw new Error;for(x=S-(g-1),y=0;ys&&(l=s),Gm(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 qe=1,bs=2,no=4,Fm=!1;function ov(){Fm||(Fm=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Hm(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var wP=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Hm}return r.prototype.traverse=function(e,t){for(var a=0;a0&&(f.__clipPaths=[]),isNaN(f.z)&&(ov(),f.z=0),isNaN(f.z2)&&(ov(),f.z2=0),isNaN(f.zlevel)&&(ov(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var h=e.getDecalElement&&e.getDecalElement();h&&this._updateAndAddDisplayable(h,t,a);var v=e.getTextGuideLine();v&&this._updateAndAddDisplayable(v,t,a);var c=e.getTextContent();c&&this._updateAndAddDisplayable(c,t,a)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,a=e.length;t=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 bP=wP;var rT;rT=bt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};const Ep=rT;var ef={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-ef.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?ef.bounceIn(r*2)*.5:ef.bounceOut(r*2-1)*.5+.5}};const aT=ef;var jl=Math.pow,an=Math.sqrt,Sf=1e-8,nT=1e-4,Wm=an(3),Ql=1/3,$r=Ai(),fr=Ai(),po=Ai();function Ja(r){return r>-Sf&&rSf||r<-Sf}function oe(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 $m(r,e,t,a,n){var i=1-n;return 3*(((e-r)*i+2*(t-e)*n)*i+(a-t)*n*n)}function xf(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,h=s*l-9*o*u,v=l*l-3*s*u,c=0;if(Ja(f)&&Ja(h))if(Ja(s))i[0]=0;else{var p=-l/s;p>=0&&p<=1&&(i[c++]=p)}else{var d=h*h-4*f*v;if(Ja(d)){var g=h/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=an(d),_=f*s+1.5*o*(-h+m),S=f*s+1.5*o*(-h-m);_<0?_=-jl(-_,Ql):_=jl(_,Ql),S<0?S=-jl(-S,Ql):S=jl(S,Ql);var p=(-s-(_+S))/(3*o);p>=0&&p<=1&&(i[c++]=p)}else{var x=(2*f*s-3*o*h)/(2*an(f*f*f)),w=Math.acos(x)/3,b=an(f),T=Math.cos(w),p=(-s-2*b*T)/(3*o),y=(-s+b*(T+Wm*Math.sin(w)))/(3*o),C=(-s+b*(T-Wm*Math.sin(w)))/(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 oT(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(Ja(o)){if(iT(i)){var u=-s/i;u>=0&&u<=1&&(n[l++]=u)}}else{var f=i*i-4*o*s;if(Ja(f))n[0]=-i/(2*o);else if(f>0){var h=an(f),u=(-i+h)/(2*o),v=(-i-h)/(2*o);u>=0&&u<=1&&(n[l++]=u),v>=0&&v<=1&&(n[l++]=v)}}return l}function un(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,h=(f-u)*n+u;i[0]=r,i[1]=o,i[2]=u,i[3]=h,i[4]=h,i[5]=f,i[6]=l,i[7]=a}function sT(r,e,t,a,n,i,o,s,l,u,f){var h,v=.005,c=1/0,p,d,g,y;$r[0]=l,$r[1]=u;for(var m=0;m<1;m+=.05)fr[0]=oe(r,t,n,o,m),fr[1]=oe(e,a,i,s,m),g=ui($r,fr),g=0&&g=0&&u<=1&&(n[l++]=u)}}else{var f=o*o-4*i*s;if(Ja(f)){var u=-o/(2*i);u>=0&&u<=1&&(n[l++]=u)}else if(f>0){var h=an(f),u=(-o+h)/(2*i),v=(-o-h)/(2*i);u>=0&&u<=1&&(n[l++]=u),v>=0&&v<=1&&(n[l++]=v)}}return l}function lT(r,e,t){var a=r+t-2*e;return a===0?.5:(r-e)/a}function el(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 uT(r,e,t,a,n,i,o,s,l){var u,f=.005,h=1/0;$r[0]=o,$r[1]=s;for(var v=0;v<1;v+=.05){fr[0]=he(r,t,n,v),fr[1]=he(e,a,i,v);var c=ui($r,fr);c=0&&c=1?1:xf(0,a,i,1,l,s)&&oe(0,n,o,1,s[0])}}}var MP=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||jt,this.ondestroy=e.ondestroy||jt,this.onrestart=e.onrestart||jt,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=Q(e)?e:aT[e]||Cg(e)},r}();const LP=MP;var fT=function(){function r(e){this.value=e}return r}(),IP=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new fT(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}(),PP=function(){function r(e){this._list=new IP,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 fT(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 Ll=PP;var Um={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 Lr(r){return r=Math.round(r),r<0?0:r>255?255:r}function RP(r){return r=Math.round(r),r<0?0:r>360?360:r}function rl(r){return r<0?0:r>1?1:r}function sv(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Lr(parseFloat(e)/100*255):Lr(parseInt(e,10))}function fi(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?rl(parseFloat(e)/100):rl(parseFloat(e))}function lv(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 ja(r,e,t){return r+(e-r)*t}function nr(r,e,t,a,n){return r[0]=e,r[1]=t,r[2]=a,r[3]=n,r}function Op(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var hT=new Ll(20),tu=null;function Bi(r,e){tu&&Op(tu,e),tu=hT.put(r,tu||e.slice())}function je(r,e){if(!!r){e=e||[];var t=hT.get(r);if(t)return Op(e,t);r=r+"";var a=r.replace(/ /g,"").toLowerCase();if(a in Um)return Op(e,Um[a]),Bi(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)){nr(e,0,0,0,1);return}return nr(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),Bi(r,e),e}else if(n===7||n===9){var i=parseInt(a.slice(1,7),16);if(!(i>=0&&i<=16777215)){nr(e,0,0,0,1);return}return nr(e,(i&16711680)>>16,(i&65280)>>8,i&255,n===9?parseInt(a.slice(7),16)/255:1),Bi(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?nr(e,+u[0],+u[1],+u[2],1):nr(e,0,0,0,1);f=fi(u.pop());case"rgb":if(u.length>=3)return nr(e,sv(u[0]),sv(u[1]),sv(u[2]),u.length===3?f:fi(u[3])),Bi(r,e),e;nr(e,0,0,0,1);return;case"hsla":if(u.length!==4){nr(e,0,0,0,1);return}return u[3]=fi(u[3]),Np(u,e),Bi(r,e),e;case"hsl":if(u.length!==3){nr(e,0,0,0,1);return}return Np(u,e),Bi(r,e),e;default:return}}nr(e,0,0,0,1)}}function Np(r,e){var t=(parseFloat(r[0])%360+360)%360/360,a=fi(r[1]),n=fi(r[2]),i=n<=.5?n*(a+1):n+a-n*a,o=n*2-i;return e=e||[],nr(e,Lr(lv(o,i,t+1/3)*255),Lr(lv(o,i,t)*255),Lr(lv(o,i,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function EP(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,h=((i-t)/6+o/2)/o,v=((i-a)/6+o/2)/o;e===i?l=v-h:t===i?l=1/3+f-v:a===i&&(l=2/3+h-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 Bp(r,e){var t=je(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 ga(t,t.length===4?"rgba":"rgb")}}function uv(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]=Lr(ja(o[0],s[0],l)),t[1]=Lr(ja(o[1],s[1],l)),t[2]=Lr(ja(o[2],s[2],l)),t[3]=rl(ja(o[3],s[3],l)),t}}function kP(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=je(e[n]),s=je(e[i]),l=a-n,u=ga([Lr(ja(o[0],s[0],l)),Lr(ja(o[1],s[1],l)),Lr(ja(o[2],s[2],l)),rl(ja(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:n,rightIndex:i,value:a}:u}}function Ns(r,e,t,a){var n=je(r);if(r)return n=EP(n),e!=null&&(n[0]=RP(e)),t!=null&&(n[1]=fi(t)),a!=null&&(n[2]=fi(a)),ga(Np(n),"rgba")}function wf(r,e){var t=je(r);if(t&&e!=null)return t[3]=rl(e),ga(t,"rgba")}function ga(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 bf(r,e){var t=je(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var Ym=new Ll(100);function Vp(r){if(Y(r)){var e=Ym.get(r);return e||(e=Bp(r,-.1),Ym.put(r,e)),e}else if(ph(r)){var t=z({},r);return t.colorStops=F(r.colorStops,function(a){return{offset:a.offset,color:Bp(a.color,-.1)}}),t}return r}var Tf=Math.round;function al(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=je(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e==null?1:e}}var Zm=1e-4;function Qa(r){return r-Zm}function eu(r){return Tf(r*1e3)/1e3}function zp(r){return Tf(r*1e4)/1e4}function OP(r){return"matrix("+eu(r[0])+","+eu(r[1])+","+eu(r[2])+","+eu(r[3])+","+zp(r[4])+","+zp(r[5])+")"}var NP={left:"start",right:"end",center:"middle",middle:"middle"};function BP(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function VP(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function zP(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 vT(r){return r&&!!r.image}function GP(r){return r&&!!r.svgElement}function Ag(r){return vT(r)||GP(r)}function cT(r){return r.type==="linear"}function pT(r){return r.type==="radial"}function dT(r){return r&&(r.type==="linear"||r.type==="radial")}function yh(r){return"url(#"+r+")"}function gT(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 yT(r){var e=r.x||0,t=r.y||0,a=(r.rotation||0)*Ju,n=lt(r.scaleX,1),i=lt(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("+Tf(o*Ju)+"deg, "+Tf(s*Ju)+"deg)"),l.join(" ")}var FP=function(){return bt.hasGlobalWindow&&Q(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}}(),Gp=Array.prototype.slice;function ua(r,e,t){return(e-r)*t+r}function fv(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=qm,l=t;if(De(t)){var u=UP(t);s=u,(u===1&&!Ct(t[0])||u===2&&!Ct(t[0][0]))&&(o=!0)}else if(Ct(t)&&!Qs(t))s=au;else if(Y(t))if(!isNaN(+t))s=au;else{var f=je(t);f&&(l=f,s=Ts)}else if(ph(t)){var h=z({},l);h.colorStops=F(t.colorStops,function(c){return{offset:c.offset,color:je(c.color)}}),cT(t)?s=Fp:pT(t)&&(s=Hp),l=h}i===0?this.valType=s:(s!==this.valType||s===qm)&&(o=!0),this.discrete=this.discrete||o;var v={time:e,value:l,rawValue:t,percent:0};return a&&(v.easing=a,v.easingFunc=Q(a)?a:aT[a]||Cg(a)),n.push(v),v},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=nu(n),u=Km(n),f=0;f=0&&!(o[f].percent<=t);f--);f=v(f,s-2)}else{for(f=h;ft);f++);f=v(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:v((t-c.percent)/g,1);p.easingFunc&&(y=p.easingFunc(y));var m=a?this._additiveValue:u?jo:e[l];if((nu(i)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)e[l]=y<1?c.rawValue:p.rawValue;else if(nu(i))i===af?fv(m,c[n],p[n],y):HP(m,c[n],p[n],y);else if(Km(i)){var _=c[n],S=p[n],x=i===Fp;e[l]={type:x?"linear":"radial",x:ua(_.x,S.x,y),y:ua(_.y,S.y,y),colorStops:F(_.colorStops,function(b,T){var C=S.colorStops[T];return{offset:ua(b.offset,C.offset,y),color:rf(fv([],b.color,C.color,y))}}),global:S.global},x?(e[l].x2=ua(_.x2,S.x2,y),e[l].y2=ua(_.y2,S.y2,y)):e[l].r=ua(_.r,S.r,y)}else if(u)fv(m,c[n],p[n],y),a||(e[l]=rf(m));else{var w=ua(c[n],p[n],y);a?this._additiveValue=w:e[l]=w}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===Ts?(je(e[a],jo),ru(jo,jo,n,1),e[a]=rf(jo)):t===af?ru(e[a],e[a],n,1):t===mT&&Xm(e[a],e[a],n,1)},r}(),Dg=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){mg("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,mt(t),a)},r.prototype.whenWithKeys=function(e,t,a,n){for(var i=this._tracks,o=0;o0&&l.addKeyframe(0,Bs(u),n),this._trackKeys.push(s)}l.addKeyframe(e,Bs(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 uo(){return new Date().getTime()}var ZP=function(r){O(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=uo()-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&&(Ep(a),!t._paused&&t.update())}Ep(a)},e.prototype.start=function(){this._running||(this._time=uo(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=uo(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=uo()-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 Dg(t,a.loop);return this.addAnimator(n),n},e}(yr);const XP=ZP;var qP=300,hv=bt.domSupported,vv=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=F(r,function(n){var i=n.replace("mouse","pointer");return t.hasOwnProperty(i)?i:n});return{mouse:r,touch:e,pointer:a}}(),Jm={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},jm=!1;function Wp(r){var e=r.pointerType;return e==="pen"||e==="touch"}function KP(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 cv(r){r&&(r.zrByTouch=!0)}function JP(r,e){return or(r.dom,new jP(r,e),!0)}function _T(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 jP=function(){function r(e,t){this.stopPropagation=jt,this.stopImmediatePropagation=jt,this.preventDefault=jt,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),Tr={mousedown:function(r){r=or(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=or(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=or(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=or(this.dom,r);var e=r.toElement||r.relatedTarget;_T(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){jm=!0,r=or(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){jm||(r=or(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=or(this.dom,r),cv(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Tr.mousemove.call(this,r),Tr.mousedown.call(this,r)},touchmove:function(r){r=or(this.dom,r),cv(r),this.handler.processGesture(r,"change"),Tr.mousemove.call(this,r)},touchend:function(r){r=or(this.dom,r),cv(r),this.handler.processGesture(r,"end"),Tr.mouseup.call(this,r),+new Date-+this.__lastTouchMomente0||r<-e0}var An=[],Vi=[],dv=Je(),gv=Math.abs,nR=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 Cn(this.rotation)||Cn(this.x)||Cn(this.y)||Cn(this.scaleX-1)||Cn(this.scaleY-1)||Cn(this.skewX)||Cn(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),a=this.transform;if(!(t||e)){a&&(t0(a),this.invTransform=null);return}a=a||Je(),t?this.getLocalTransform(a):t0(a),e&&(t?da(a,e,a):bg(a,e)),this.transform=a,this._resolveGlobalScaleRatio(a)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(An);var a=An[0]<0?-1:1,n=An[1]<0?-1:1,i=((An[0]-a)*t+a)/An[0]||0,o=((An[1]-n)*t+n)/An[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||Je(),Eo(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||Je(),da(Vi,e.invTransform,t),t=Vi);var a=this.originX,n=this.originY;(a||n)&&(dv[4]=a,dv[5]=n,da(Vi,t,dv),Vi[4]-=a,Vi[5]-=n,t=Vi),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&&de(a,a,n),a},r.prototype.transformCoordToGlobal=function(e,t){var a=[e,t],n=this.transform;return n&&de(a,a,n),a},r.prototype.getLineScale=function(){var e=this.transform;return e&&gv(e[0]-1)>1e-10&&gv(e[3]-1)>1e-10?Math.sqrt(gv(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){xT(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,h=e.y,v=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-v*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]=v*o,u&&Di(t,t,u),t[4]+=a+f,t[5]+=n+h,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}(),ea=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function xT(r,e){for(var t=0;t=0?parseFloat(r)/100*e:parseFloat(r):r}function Af(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",h="top";if(a instanceof Array)l+=Pr(a[0],t.width),u+=Pr(a[1],t.height),f=null,h=null;else switch(a){case"left":l-=n,u+=s,f="right",h="middle";break;case"right":l+=n+o,u+=s,h="middle";break;case"top":l+=o/2,u-=n,f="center",h="bottom";break;case"bottom":l+=o/2,u+=i+n,f="center";break;case"inside":l+=o/2,u+=s,f="center",h="middle";break;case"insideLeft":l+=n,u+=s,h="middle";break;case"insideRight":l+=o-n,u+=s,f="right",h="middle";break;case"insideTop":l+=o/2,u+=n,f="center";break;case"insideBottom":l+=o/2,u+=i-n,f="center",h="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,h="bottom";break;case"insideBottomRight":l+=o-n,u+=i-n,f="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=h,r}var yv="__zr_normal__",mv=ea.concat(["ignore"]),iR=Qr(ea,function(r,e){return r[e]=!0,r},{ignore:!1}),zi={},oR=new vt(0,0,0,0),Mg=function(){function r(e){this.id=Zb(),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;if(i.copyTransform(t),a.position!=null){var f=oR;a.layoutRect?f.copy(a.layoutRect):f.copy(this.getBoundingRect()),n||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(zi,a,f):Af(zi,a,f),i.x=zi.x,i.y=zi.y,o=zi.align,s=zi.verticalAlign;var h=a.origin;if(h&&a.rotation!=null){var v=void 0,c=void 0;h==="center"?(v=f.width*.5,c=f.height*.5):(v=Pr(h[0],f.width),c=Pr(h[1],f.height)),u=!0,i.originX=-i.x+v+(n?0:f.x),i.originY=-i.y+c+(n?0:f.y)}}a.rotation!=null&&(i.rotation=a.rotation);var p=a.offset;p&&(i.x+=p[0],i.y+=p[1],u||(i.originX=-p[0],i.originY=-p[1]));var d=a.inside==null?typeof a.position=="string"&&a.position.indexOf("inside")>=0:a.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,m=void 0,_=void 0;d&&this.canBeInsideText()?(y=a.insideFill,m=a.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(m==null||m==="auto")&&(m=this.getInsideTextStroke(y),_=!0)):(y=a.outsideFill,m=a.outsideStroke,(y==null||y==="auto")&&(y=this.getOutsideFill()),(m==null||m==="auto")&&(m=this.getOutsideStroke(y),_=!0)),y=y||"#000",(y!==g.fill||m!==g.stroke||_!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=y,g.stroke=m,g.autoStroke=_,g.align=o,g.verticalAlign=s,t.setDefaultTextStyle(g)),t.__dirty|=qe,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()?Zp:Yp},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),a=typeof t=="string"&&je(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,ga(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||{},z(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(at(e))for(var a=e,n=mt(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(yv,!1,e)},r.prototype.useState=function(e,t,a,n){var i=e===yv,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(pt(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){mg("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 h=this._textContent,v=this._textGuide;return h&&h.useState(e,t,a,f),v&&v.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&=~qe),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,v),g&&g.useStates(e,t,v),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!v&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~qe)}},r.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},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=pt(n,e),o=pt(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 v=0;v0||n.force&&!o.length){var T=void 0,C=void 0,A=void 0;if(s){C={},v&&(T={});for(var S=0;S<_;S++){var y=d[S];C[y]=t[y],v?T[y]=a[y]:t[y]=a[y]}}else if(v){A={};for(var S=0;S<_;S++){var y=d[S];A[y]=Bs(t[y]),lR(t,a,y)}}var x=new Dg(t,!1,!1,h?Mt(p,function(L){return L.targetName===e}):null);x.targetName=e,n.scope&&(x.scope=n.scope),v&&T&&x.whenWithKeys(0,T,d),A&&x.whenWithKeys(0,A,d),x.whenWithKeys(u==null?500:u,s?C:a,d).delay(f||0),r.addAnimator(x,e),o.push(x)}}const bT=Mg;var TT=function(r){O(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=pt(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=pt(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}function $(r,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return Y(r)?yR(r).match(/%$/)?parseFloat(r)/100*e:parseFloat(r):r==null?NaN:+r}function qt(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),AT),r=(+r).toFixed(e),t?r:+r}function pr(r){return r.sort(function(e,t){return e-t}),r}function Zr(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 mR(r)}function mR(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 DT(r,e){var t=Math.log,a=Math.LN10,n=Math.floor(t(r[1]-r[0])/a),i=Math.round(t(Math.abs(e[1]-e[0]))/a),o=Math.min(Math.max(-n+i,0),20);return isFinite(o)?o:20}function _R(r,e){var t=Qr(r,function(c,p){return c+(isNaN(p)?0:p)},0);if(t===0)return[];for(var a=Math.pow(10,e),n=F(r,function(c){return(isNaN(c)?0:c)/t*a*100}),i=a*100,o=F(n,function(c){return Math.floor(c)}),s=Qr(o,function(c,p){return c+p},0),l=F(n,function(c,p){return c-o[p]});su&&(u=l[h],f=h);++o[f],l[f]=0,++s}return F(o,function(c){return c/a})}function SR(r,e){var t=Math.max(Zr(r),Zr(e)),a=r+e;return t>AT?a:qt(a,t)}var o0=9007199254740991;function MT(r){var e=Math.PI*2;return(r%e+e)%e}function nl(r){return r>-i0&&r=10&&e++,e}function LT(r,e){var t=Lg(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 xv(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 s0(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,a=0;a=0||i&&pt(i,l)<0)){var u=a.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var YR=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],ZR=xi(YR),XR=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return ZR(this,e,t)},r}(),Kp=new Ll(50);function qR(r){if(typeof r=="string"){var e=Kp.get(r);return e&&e.image}else return r}function Eg(r,e,t,a,n){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var i=Kp.get(r),o={hostEl:t,cb:a,cbPayload:n};return i?(e=i.image,!Sh(e)&&i.pending.push(o)):(e=_a.loadImage(r,h0,h0),e.__zrImageSrc=r,Kp.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function h0(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=o;l++)s-=o;var u=Qe(t,e);return u>s&&(t="",u=0),s=r-u,n.ellipsis=t,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=r,n}function HT(r,e,t){var a=t.containerWidth,n=t.font,i=t.contentWidth;if(!a){r.textLine="",r.isTruncated=!1;return}var o=Qe(e,n);if(o<=a){r.textLine=e,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=t.maxIterations){e+=t.ellipsis;break}var l=s===0?JR(e,i,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(e.length*i/o):0;e=e.substr(0,l),o=Qe(e,n)}e===""&&(e=t.placeholder),r.textLine=e,r.isTruncated=!0}function JR(r,e,t,a){for(var n=0,i=0,o=r.length;ip&&u){var d=Math.floor(p/s);f=f||v.length>d,v=v.slice(0,d)}if(r&&i&&h!=null)for(var g=FT(h,n,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),y={},m=0;ms&&bv(t,r.substring(s,u),e,o),bv(t,l[2],e,o,l[1]),s=wv.lastIndex}sn){var I=t.lines.length;w>0?(_.tokens=_.tokens.slice(0,w),y(_,x,S),t.lines=t.lines.slice(0,m+1)):t.lines=t.lines.slice(0,m),t.isTruncated=t.isTruncated||t.lines.length0&&p+a.accumWidth>a.width&&(f=e.split(` `),u=!0),a.accumWidth=p}else{var d=WT(e,l,a.width,a.breakAll,a.accumWidth);a.accumWidth=d.accumWidth+c,h=d.linesWidths,f=d.lines}}else f=e.split(` `);for(var g=0;g=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var aE=Qr(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function nE(r){return rE(r)?!!aE[r]:!0}function WT(r,e,t,a,n){for(var i=[],o=[],s="",l="",u=0,f=0,h=0;ht:n+f+c>t){f?(s||l)&&(p?(s||(s=l,l="",u=0,f=u),i.push(s),o.push(f-u),l+=v,u+=c,s="",f=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(f),s=v,f=c)):p?(i.push(l),o.push(u),l=v,u=c):(i.push(v),o.push(c));continue}f+=c,p?(l+=v,u+=c):(l&&(s+=l,l="",u=0),s+=v)}return!i.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(i.push(s),o.push(f)),i.length===1&&(f+=n),{accumWidth:f,lines:i,linesWidths:o}}var Jp="__zr_style_"+Math.round(Math.random()*10),hi={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},xh={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};hi[Jp]=!0;var c0=["z","z2","invisible"],iE=["invisible"],oE=function(r){O(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var a=mt(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]=Dv(n)*t+r,iu[1]=Av(n)*a+e,ou[0]=Dv(i)*t+r,ou[1]=Av(i)*a+e,u(s,iu,ou),f(l,iu,ou),n=n%Mn,n<0&&(n=n+Mn),i=i%Mn,i<0&&(i=i+Mn),n>i&&!o?i+=Mn:nn&&(su[0]=Dv(c)*t+r,su[1]=Av(c)*a+e,u(s,su,s),f(l,su,l))}var kt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ln=[],In=[],Or=[],Pa=[],Nr=[],Br=[],Mv=Math.min,Lv=Math.max,Pn=Math.cos,Rn=Math.sin,oa=Math.abs,jp=Math.PI,Fa=jp*2,Iv=typeof Float32Array<"u",Qo=[];function Pv(r){var e=Math.round(r/jp*1e8)/1e8;return e%2*jp}function kg(r,e){var t=Pv(r[0]);t<0&&(t+=Fa);var a=t-r[0],n=r[1];n+=a,!e&&n-t>=Fa?n=t+Fa:e&&t-n>=Fa?n=t-Fa:!e&&t>n?n=t+(Fa-Pv(t-n)):e&&t0&&(this._ux=oa(a/Cf/e)||0,this._uy=oa(a/Cf/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(kt.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=oa(e-this._xi),n=oa(t-this._yi),i=a>this._ux||n>this._uy;if(this.addData(kt.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(kt.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(kt.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(),Qo[0]=n,Qo[1]=i,kg(Qo,o),n=Qo[0],i=Qo[1];var s=i-n;return this.addData(kt.A,e,t,a,a,n,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,a,n,i,o),this._xi=Pn(i)*a+e,this._yi=Rn(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(kt.R,e,t,a,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(kt.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){var t=e.length;!(this.data&&this.data.length===t)&&Iv&&(this.data=new Float32Array(t));for(var a=0;af.length&&(this._expandData(),f=this.data);for(var h=0;h0&&(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(){Or[0]=Or[1]=Nr[0]=Nr[1]=Number.MAX_VALUE,Pa[0]=Pa[1]=Br[0]=Br[1]=-Number.MAX_VALUE;var e=this.data,t=0,a=0,n=0,i=0,o;for(o=0;oa||oa(_)>n||v===t-1)&&(d=Math.sqrt(m*m+_*_),i=g,o=y);break}case kt.C:{var S=e[v++],x=e[v++],g=e[v++],y=e[v++],w=e[v++],b=e[v++];d=TP(i,o,S,x,g,y,w,b,10),i=w,o=b;break}case kt.Q:{var S=e[v++],x=e[v++],g=e[v++],y=e[v++];d=AP(i,o,S,x,g,y,10),i=g,o=y;break}case kt.A:var T=e[v++],C=e[v++],A=e[v++],M=e[v++],L=e[v++],I=e[v++],P=I+L;v+=1,p&&(s=Pn(L)*A+T,l=Rn(L)*M+C),d=Lv(A,M)*Mv(Fa,Math.abs(I)),i=Pn(P)*A+T,o=Rn(P)*M+C;break;case kt.R:{s=i=e[v++],l=o=e[v++];var R=e[v++],E=e[v++];d=R*2+E*2;break}case kt.Z:{var m=s-i,_=l-o;d=Math.sqrt(m*m+_*_),i=s,o=l;break}}d>=0&&(u[h++]=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,h,v,c=t<1,p,d,g=0,y=0,m,_=0,S,x;if(c&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,d=this._pathLen,m=t*d,!m))return;t:for(var w=0;w0&&(e.lineTo(S,x),_=0),b){case kt.M:s=u=a[w++],l=f=a[w++],e.moveTo(u,f);break;case kt.L:{h=a[w++],v=a[w++];var C=oa(h-u),A=oa(v-f);if(C>n||A>i){if(c){var M=p[y++];if(g+M>m){var L=(m-g)/M;e.lineTo(u*(1-L)+h*L,f*(1-L)+v*L);break t}g+=M}e.lineTo(h,v),u=h,f=v,_=0}else{var I=C*C+A*A;I>_&&(S=h,x=v,_=I)}break}case kt.C:{var P=a[w++],R=a[w++],E=a[w++],N=a[w++],k=a[w++],B=a[w++];if(c){var M=p[y++];if(g+M>m){var L=(m-g)/M;un(u,P,E,k,L,Ln),un(f,R,N,B,L,In),e.bezierCurveTo(Ln[1],In[1],Ln[2],In[2],Ln[3],In[3]);break t}g+=M}e.bezierCurveTo(P,R,E,N,k,B),u=k,f=B;break}case kt.Q:{var P=a[w++],R=a[w++],E=a[w++],N=a[w++];if(c){var M=p[y++];if(g+M>m){var L=(m-g)/M;el(u,P,E,L,Ln),el(f,R,N,L,In),e.quadraticCurveTo(Ln[1],In[1],Ln[2],In[2]);break t}g+=M}e.quadraticCurveTo(P,R,E,N),u=E,f=N;break}case kt.A:var V=a[w++],H=a[w++],W=a[w++],K=a[w++],Z=a[w++],tt=a[w++],Pt=a[w++],Xt=!a[w++],ct=W>K?W:K,rt=oa(W-K)>.001,dt=Z+tt,j=!1;if(c){var M=p[y++];g+M>m&&(dt=Z+tt*(m-g)/M,j=!0),g+=M}if(rt&&e.ellipse?e.ellipse(V,H,W,K,Pt,Z,dt,Xt):e.arc(V,H,ct,Z,dt,Xt),j)break t;T&&(s=Pn(Z)*W+V,l=Rn(Z)*K+H),u=Pn(dt)*W+V,f=Rn(dt)*K+H;break;case kt.R:s=u=a[w],l=f=a[w+1],h=a[w++],v=a[w++];var st=a[w++],Ot=a[w++];if(c){var M=p[y++];if(g+M>m){var It=m-g;e.moveTo(h,v),e.lineTo(h+Mv(It,st),v),It-=st,It>0&&e.lineTo(h+st,v+Mv(It,Ot)),It-=Ot,It>0&&e.lineTo(h+Lv(st-It,0),v+Ot),It-=st,It>0&&e.lineTo(h,v+Lv(Ot-It,0));break t}g+=M}e.rect(h,v,st,Ot);break;case kt.Z:if(c){var M=p[y++];if(g+M>m){var L=(m-g)/M;e.lineTo(u*(1-L)+s*L,f*(1-L)+l*L);break t}g+=M}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.CMD=kt,r.initDefaultProps=function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),r}();function Wa(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+h&&f>a+h&&f>i+h&&f>s+h||fr+h&&u>t+h&&u>n+h&&u>o+h||ue+u&&l>a+u&&l>i+u||lr+u&&s>t+u&&s>n+u||st||f+un&&(n+=ts);var v=Math.atan2(l,s);return v<0&&(v+=ts),v>=a&&v<=n||v+ts>=a&&v+ts<=n}function fa(r,e,t,a,n,i){if(i>e&&i>a||in?s:0}var Ra=aa.CMD,En=Math.PI*2,cE=1e-4;function pE(r,e){return Math.abs(r-e)e&&u>a&&u>i&&u>s||u1&&dE(),c=oe(e,a,i,s,lr[0]),v>1&&(p=oe(e,a,i,s,lr[1]))),v===2?ge&&s>a&&s>i||s=0&&u<=1){for(var f=0,h=he(e,a,i,u),v=0;vt||s<-t)return 0;var l=Math.sqrt(t*t-s*s);Re[0]=-l,Re[1]=l;var u=Math.abs(a-n);if(u<1e-4)return 0;if(u>=En-1e-4){a=0,n=En;var f=i?1:-1;return o>=Re[0]+r&&o<=Re[1]+r?f:0}if(a>n){var h=a;a=n,n=h}a<0&&(a+=En,n+=En);for(var v=0,c=0;c<2;c++){var p=Re[c];if(p+r>o){var d=Math.atan2(s,p),f=i?1:-1;d<0&&(d=En+d),(d>=a&&d<=n||d+En>=a&&d+En<=n)&&(d>Math.PI/2&&d1&&(t||(s+=fa(l,u,f,h,a,n))),g&&(l=i[p],u=i[p+1],f=l,h=u),d){case Ra.M:f=i[p++],h=i[p++],l=f,u=h;break;case Ra.L:if(t){if(Wa(l,u,i[p],i[p+1],e,a,n))return!0}else s+=fa(l,u,i[p],i[p+1],a,n)||0;l=i[p++],u=i[p++];break;case Ra.C:if(t){if(hE(l,u,i[p++],i[p++],i[p++],i[p++],i[p],i[p+1],e,a,n))return!0}else s+=gE(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 Ra.Q:if(t){if($T(l,u,i[p++],i[p++],i[p],i[p+1],e,a,n))return!0}else s+=yE(l,u,i[p++],i[p++],i[p],i[p+1],a,n)||0;l=i[p++],u=i[p++];break;case Ra.A:var y=i[p++],m=i[p++],_=i[p++],S=i[p++],x=i[p++],w=i[p++];p+=1;var b=!!(1-i[p++]);v=Math.cos(x)*_+y,c=Math.sin(x)*S+m,g?(f=v,h=c):s+=fa(l,u,v,c,a,n);var T=(a-y)*S/_+y;if(t){if(vE(y,m,S,x,x+w,b,e,T,n))return!0}else s+=mE(y,m,S,x,x+w,b,T,n);l=Math.cos(x+w)*_+y,u=Math.sin(x+w)*S+m;break;case Ra.R:f=l=i[p++],h=u=i[p++];var C=i[p++],A=i[p++];if(v=f+C,c=h+A,t){if(Wa(f,h,v,h,e,a,n)||Wa(v,h,v,c,e,a,n)||Wa(v,c,f,c,e,a,n)||Wa(f,c,f,h,e,a,n))return!0}else s+=fa(v,h,v,c,a,n),s+=fa(f,c,f,h,a,n);break;case Ra.Z:if(t){if(Wa(l,u,f,h,e,a,n))return!0}else s+=fa(l,u,f,h,a,n);l=f,u=h;break}}return!t&&!pE(u,h)&&(s+=fa(l,u,f,h,a,n)||0),s!==0}function _E(r,e,t){return UT(r,0,!1,e,t)}function SE(r,e,t,a){return UT(r,e,!0,t,a)}var Df=et({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},hi),xE={style:et({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},xh.style)},Rv=ea.concat(["invisible","culling","z","z2","zlevel","parent"]),wE=function(r){O(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?Yp:a>.2?aR:Zp}else if(t)return Zp}return Yp},e.prototype.getInsideTextStroke=function(t){var a=this.style.fill;if(Y(a)){var n=this.__zr,i=!!(n&&n.isDarkMode()),o=bf(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&no)&&(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==null?4:f)}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)),SE(s,l/u,t,a)))return!0}if(this.hasFill())return _E(s,t,a)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=no,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:z(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&no)},e.prototype.createStyle=function(t){return dh(Df,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var a=this._normalState;t.shape&&!a.shape&&(a.shape=z({},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=z({},n.shape),z(u,a.shape)):(u=z({},i?this.shape:n.shape),z(u,a.shape)):l&&(u=n.shape),u)if(o){this.shape=z({},this.shape);for(var f={},h=mt(u),v=0;v0},e.prototype.hasFill=function(){var t=this.style,a=t.fill;return a!=null&&a!=="none"},e.prototype.createStyle=function(t){return dh(bE,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var a=t.text;a!=null?a+="":a="";var n=Il(a,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initDefaultProps=function(){var t=e.prototype;t.dirtyRectTolerance=10}(),e}(gr);YT.prototype.type="tspan";const ol=YT;var TE=et({x:0,y:0},hi),CE={style:et({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},xh.style)};function AE(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var ZT=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return dh(TE,t)},e.prototype._getSize=function(t){var a=this.style,n=a[t];if(n!=null)return n;var i=AE(a.image)?a.image:this.__image;if(!i)return 0;var o=t==="width"?"height":"width",s=a[o];return s==null?i[t]:i[t]/i[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return CE},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new vt(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(gr);ZT.prototype.type="image";const Se=ZT;function DE(r,e){var t=e.x,a=e.y,n=e.width,i=e.height,o=e.r,s,l,u,f;n<0&&(t=t+n,n=-n),i<0&&(a=a+i,i=-i),typeof o=="number"?s=l=u=f=o:o instanceof Array?o.length===1?s=l=u=f=o[0]:o.length===2?(s=u=o[0],l=f=o[1]):o.length===3?(s=o[0],l=f=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],f=o[3]):s=l=u=f=0;var h;s+l>n&&(h=s+l,s*=n/h,l*=n/h),u+f>n&&(h=u+f,u*=n/h,f*=n/h),l+u>i&&(h=l+u,l*=i/h,u*=i/h),s+f>i&&(h=s+f,s*=i/h,f*=i/h),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 fo=Math.round;function XT(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&&(fo(a*2)===fo(n*2)&&(r.x1=r.x2=ri(a,s,!0)),fo(i*2)===fo(o*2)&&(r.y1=r.y2=ri(i,s,!0))),r}}function qT(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=ri(a,s,!0),r.y=ri(n,s,!0),r.width=Math.max(ri(a+i,s,!1)-r.x,i===0?0:1),r.height=Math.max(ri(n+o,s,!1)-r.y,o===0?0:1)),r}}function ri(r,e,t){if(!e)return r;var a=fo(r*2);return(a+fo(e))%2===0?a/2:(a+(t?1:-1))/2}var ME=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),LE={},KT=function(r){O(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new ME},e.prototype.buildPath=function(t,a){var n,i,o,s;if(this.subPixelOptimize){var l=qT(LE,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?DE(t,a):t.rect(n,i,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(yt);KT.prototype.type="rect";const xt=KT;var m0={fill:"#000"},_0=2,IE={style:et({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},xh.style)},JT=function(r){O(e,r);function e(t){var a=r.call(this)||this;return a.type="text",a._children=[],a._defaultStyle=m0,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,L=t.width!=null&&(t.overflow==="truncate"||t.overflow==="break"||t.overflow==="breakAll"),I=o.calculatedLineHeight,P=0;P=0&&(P=w[I],P.align==="right");)this._placeToken(P,t,T,y,L,"right",_),C-=P.width,L-=P.width,I--;for(M+=(i-(M-g)-(m-L)-C)/2;A<=I;)P=w[A],this._placeToken(P,t,T,y,M+P.width/2,"center",_),M+=P.width,A++;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,h=i+n/2;f==="top"?h=i+t.height/2:f==="bottom"&&(h=i+n-t.height/2);var v=!t.isLineHolder&&Ev(u);v&&this._renderBackground(u,a,s==="right"?o-t.width:s==="center"?o-t.width/2:o,h-t.height/2,t.width,t.height);var c=!!u.backgroundColor,p=t.textPadding;p&&(o=C0(o,s,p),h-=t.height/2-p[0]-t.innerHeight/2);var d=this._getOrCreateChild(ol),g=d.createStyle();d.useStyle(g);var y=this._defaultStyle,m=!1,_=0,S=T0("fill"in u?u.fill:"fill"in a?a.fill:(m=!0,y.fill)),x=b0("stroke"in u?u.stroke:"stroke"in a?a.stroke:!c&&!l&&(!y.autoStroke||m)?(_=_0,y.stroke):null),w=u.textShadowBlur>0||a.textShadowBlur>0;g.text=t.text,g.x=o,g.y=h,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||ln,g.opacity=Jr(u.opacity,a.opacity,1),x0(g,u),x&&(g.lineWidth=Jr(u.lineWidth,a.lineWidth,_),g.lineDash=lt(u.lineDash,a.lineDash),g.lineDashOffset=a.lineDashOffset||0,g.stroke=x),S&&(g.fill=S);var b=t.contentWidth,T=t.contentHeight;d.setBoundingRect(new vt(Cs(g.x,b,g.textAlign),io(g.y,T,g.textBaseline),b,T))},e.prototype._renderBackground=function(t,a,n,i,o,s){var l=t.backgroundColor,u=t.borderWidth,f=t.borderColor,h=l&&l.image,v=l&&!h,c=t.borderRadius,p=this,d,g;if(v||t.lineHeight||u&&f){d=this._getOrCreateChild(xt),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(v){var m=d.style;m.fill=l||null,m.fillOpacity=lt(t.fillOpacity,1)}else if(h){g=this._getOrCreateChild(Se),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=lt(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=Jr(t.opacity,a.opacity,1)},e.makeFont=function(t){var a="";return QT(t)&&(a=[t.fontStyle,t.fontWeight,jT(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),a&&Dr(a)||t.textFont||t.font},e}(gr),PE={left:!0,right:1,center:1},RE={top:1,bottom:1,middle:1},S0=["fontStyle","fontWeight","fontSize","fontFamily"];function jT(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?dg+"px":r+"px"}function x0(r,e){for(var t=0;t=0,i=!1;if(r instanceof yt){var o=tC(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(Gi(s)||Gi(l)){a=a||{};var u=a.style||{};u.fill==="inherit"?(i=!0,a=z({},a),u=z({},u),u.fill=s):!Gi(u.fill)&&Gi(s)?(i=!0,a=z({},a),u=z({},u),u.fill=Vp(s)):!Gi(u.stroke)&&Gi(l)&&(i||(a=z({},a),u=z({},u)),u.stroke=Vp(l)),a.style=u}}if(a&&a.z2==null){i||(a=z({},a));var f=r.z2EmphasisLift;a.z2=r.z2+(f!=null?f:Oo)}return a}function zE(r,e,t){if(t&&t.z2==null){t=z({},t);var a=r.z2SelectLift;t.z2=r.z2+(a!=null?a:kE)}return t}function GE(r,e,t){var a=pt(r.currentStates,e)>=0,n=r.style.opacity,i=a?null:BE(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=z({},t),o=z({opacity:a?n:i.opacity*.1},o),t.style=o),t}function kv(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return VE(this,r,e,t);if(r==="blur")return GE(this,r,t);if(r==="select")return zE(this,r,t)}return t}function wi(r){r.stateProxy=kv;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=kv),t&&(t.stateProxy=kv)}function I0(r,e){!sC(r,e)&&!r.__highByOuter&&Da(r,eC)}function P0(r,e){!sC(r,e)&&!r.__highByOuter&&Da(r,rC)}function wa(r,e){r.__highByOuter|=1<<(e||0),Da(r,eC)}function ba(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&Da(r,rC)}function nC(r){Da(r,Bg)}function Vg(r){Da(r,aC)}function iC(r){Da(r,OE)}function oC(r){Da(r,NE)}function sC(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function lC(r){var e=r.getModel(),t=[],a=[];e.eachComponent(function(n,i){var o=Og(i),s=n==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&a.push(l),o.isBlured&&(l.group.traverse(function(u){aC(u)}),s&&t.push(i)),o.isBlured=!1}),D(a,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(t,!1,e)})}function td(r,e,t,a){var n=a.getModel();t=t||"coordinateSystem";function i(u,f){for(var h=0;h0){var s={dataIndex:o,seriesIndex:t.seriesIndex};i!=null&&(s.dataType=i),e.push(s)}})}),e}function ci(r,e,t){ai(r,!0),Da(r,wi),rd(r,e,t)}function YE(r){ai(r,!1)}function Ut(r,e,t,a){a?YE(r):ci(r,e,t)}function rd(r,e,t){var a=ot(r);e!=null?(a.focus=e,a.blurScope=t):a.focus&&(a.focus=null)}var E0=["emphasis","blur","select"],ZE={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function me(r,e,t,a){t=t||"itemStyle";for(var n=0;n1&&(o*=Ov(p),s*=Ov(p));var d=(n===i?-1:1)*Ov((o*o*(s*s)-o*o*(c*c)-s*s*(v*v))/(o*o*(c*c)+s*s*(v*v)))||0,g=d*o*c/s,y=d*-s*v/o,m=(r+t)/2+uu(h)*g-lu(h)*y,_=(e+a)/2+lu(h)*g+uu(h)*y,S=B0([1,0],[(v-g)/o,(c-y)/s]),x=[(v-g)/o,(c-y)/s],w=[(-1*v-g)/o,(-1*c-y)/s],b=B0(x,w);if(nd(x,w)<=-1&&(b=es),nd(x,w)>=1&&(b=0),b<0){var T=Math.round(b/es*1e6)/1e6;b=es*2+T%2*es}f.addData(u,m,_,o,s,S,b,h,i)}var QE=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,tk=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function ek(r){var e=new aa;if(!r)return e;var t=0,a=0,n=t,i=a,o,s=aa.CMD,l=r.match(QE);if(!l)return e;for(var u=0;uP*P+R*R&&(T=A,C=M),{cx:T,cy:C,x0:-f,y0:-h,x1:T*(n/x-1),y1:C*(n/x-1)}}function lk(r){var e;if(G(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 uk(r,e){var t,a=As(e.r,0),n=As(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,h=e.cy,v=!!e.clockwise,c=z0(u-l),p=c>Nv&&c%Nv;if(p>br&&(c=p),!(a>br))r.moveTo(f,h);else if(c>Nv-br)r.moveTo(f+a*Hi(l),h+a*kn(l)),r.arc(f,h,a,l,u,!v),n>br&&(r.moveTo(f+n*Hi(u),h+n*kn(u)),r.arc(f,h,n,u,l,v));else{var d=void 0,g=void 0,y=void 0,m=void 0,_=void 0,S=void 0,x=void 0,w=void 0,b=void 0,T=void 0,C=void 0,A=void 0,M=void 0,L=void 0,I=void 0,P=void 0,R=a*Hi(l),E=a*kn(l),N=n*Hi(u),k=n*kn(u),B=c>br;if(B){var V=e.cornerRadius;V&&(t=lk(V),d=t[0],g=t[1],y=t[2],m=t[3]);var H=z0(a-n)/2;if(_=Vr(H,y),S=Vr(H,m),x=Vr(H,d),w=Vr(H,g),C=b=As(_,S),A=T=As(x,w),(b>br||T>br)&&(M=a*Hi(u),L=a*kn(u),I=n*Hi(l),P=n*kn(l),cbr){var rt=Vr(y,C),dt=Vr(m,C),j=fu(I,P,R,E,a,rt,v),st=fu(M,L,N,k,a,dt,v);r.moveTo(f+j.cx+j.x0,h+j.cy+j.y0),C0&&r.arc(f+j.cx,h+j.cy,rt,xe(j.y0,j.x0),xe(j.y1,j.x1),!v),r.arc(f,h,a,xe(j.cy+j.y1,j.cx+j.x1),xe(st.cy+st.y1,st.cx+st.x1),!v),dt>0&&r.arc(f+st.cx,h+st.cy,dt,xe(st.y1,st.x1),xe(st.y0,st.x0),!v))}else r.moveTo(f+R,h+E),r.arc(f,h,a,l,u,!v);if(!(n>br)||!B)r.lineTo(f+N,h+k);else if(A>br){var rt=Vr(d,A),dt=Vr(g,A),j=fu(N,k,M,L,n,-dt,v),st=fu(R,E,I,P,n,-rt,v);r.lineTo(f+j.cx+j.x0,h+j.cy+j.y0),A0&&r.arc(f+j.cx,h+j.cy,dt,xe(j.y0,j.x0),xe(j.y1,j.x1),!v),r.arc(f,h,n,xe(j.cy+j.y1,j.cx+j.x1),xe(st.cy+st.y1,st.cx+st.x1),v),rt>0&&r.arc(f+st.cx,h+st.cy,rt,xe(st.y1,st.x1),xe(st.y0,st.x0),!v))}else r.lineTo(f+N,h+k),r.arc(f,h,n,u,l,v)}r.closePath()}}}var fk=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}(),yC=function(r){O(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new fk},e.prototype.buildPath=function(t,a){uk(t,a)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(yt);yC.prototype.type="sector";const $e=yC;var hk=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),mC=function(r){O(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new hk},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}(yt);mC.prototype.type="ring";const Ch=mC;function vk(r,e,t,a){var n=[],i=[],o=[],s=[],l,u,f,h;if(a){f=[1/0,1/0],h=[-1/0,-1/0];for(var v=0,c=r.length;v=2){if(a){var i=vk(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,h=n.length;sNn[1]){if(s=!1,i)return s;var f=Math.abs(Nn[0]-On[1]),h=Math.abs(On[0]-Nn[1]);Math.min(f,h)>n.len()&&(f0){var h=f.duration,v=f.delay,c=f.easing,p={duration:h,delay:v||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 At(r,e,t,a,n,i){Ug("update",r,e,t,a,n,i)}function Gt(r,e,t,a,n,i){Ug("enter",r,e,t,a,n,i)}function go(r){if(!r.__zr)return!0;for(var e=0;eMath.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function H0(r){return!r.isGroup}function Rk(r){return r.shape!=null}function El(r,e,t){if(!r||!e)return;function a(o){var s={};return o.traverse(function(l){H0(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return Rk(o)&&(s.shape=z({},o.shape)),s}var i=a(r);e.traverse(function(o){if(H0(o)&&o.anid){var s=i[o.anid];if(s){var l=n(o);o.attr(n(s)),At(o,l,t,ot(o).dataIndex)}}})}function IC(r,e){return F(r,function(t){var a=t[0];a=If(a,e.x),a=Pf(a,e.x+e.width);var n=t[1];return n=If(n,e.y),n=Pf(n,e.y+e.height),[a,n]})}function Ek(r,e){var t=If(r.x,e.x),a=Pf(r.x+r.width,e.x+e.width),n=If(r.y,e.y),i=Pf(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 kl(r,e,t){var a=z({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),et(n,t),new Se(a)):Dh(r.replace("path://",""),a,t,"center")}function Ds(r,e,t,a,n){for(var i=0,o=n[n.length-1];i1)return!1;var g=Bv(c,p,f,h)/v;return!(g<0||g>1)}function Bv(r,e,t,a){return r*a-t*e}function kk(r){return r<=1e-6&&r>=-1e-6}function Mi(r){var e=r.itemTooltipOption,t=r.componentModel,a=r.itemName,n=Y(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&&D(mt(l),function(f){q(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=ot(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:a,option:et({content:a,encodeHTMLContent:!0,formatterParams:s},n)}}function W0(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function mn(r,e){if(r)if(G(r))for(var t=0;t=0&&s.push(l)}),s}}function _n(r,e){return ft(ft({},r,!0),e,!0)}const Zk={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:". "}}}},Xk={time:{month:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],dayOfWeekAbbr:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE",custom:"\u81EA\u5B9A\u4E49\u56FE\u8868",chart:"\u56FE\u8868"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}};var Ef="ZH",Xg="EN",yo=Xg,ff={},qg={},BC=bt.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||yo).toUpperCase();return r.indexOf(Ef)>-1?Ef:yo}():yo;function VC(r,e){r=r.toUpperCase(),qg[r]=new Vt(e),ff[r]=e}function qk(r){if(Y(r)){var e=ff[r.toUpperCase()]||{};return r===Ef||r===Xg?nt(e):ft(nt(e),nt(ff[yo]),!1)}else return ft(nt(r),nt(ff[yo]),!1)}function sd(r){return qg[r]}function Kk(){return qg[yo]}VC(Xg,Zk);VC(Ef,Xk);var Kg=1e3,Jg=Kg*60,Ws=Jg*60,cr=Ws*24,X0=cr*365,Ms={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},cu="{yyyy}-{MM}-{dd}",q0={year:"{yyyy}",month:"{yyyy}-{MM}",day:cu,hour:cu+" "+Ms.hour,minute:cu+" "+Ms.minute,second:cu+" "+Ms.second,millisecond:Ms.none},Gv=["year","month","day","hour","minute","second","millisecond"],zC=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Ea(r,e){return r+="","0000".substr(0,e-r.length)+r}function mo(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 Jk(r){return r===mo(r)}function jk(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Ih(r,e,t,a){var n=ra(r),i=n[jg(t)](),o=n[_o(t)]()+1,s=Math.floor((o-1)/3)+1,l=n[Ph(t)](),u=n["get"+(t?"UTC":"")+"Day"](),f=n[fl(t)](),h=(f-1)%12+1,v=n[Rh(t)](),c=n[Eh(t)](),p=n[kh(t)](),d=f>=12?"pm":"am",g=d.toUpperCase(),y=a instanceof Vt?a:sd(a||BC)||Kk(),m=y.getModel("time"),_=m.get("month"),S=m.get("monthAbbr"),x=m.get("dayOfWeek"),w=m.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,d+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,Ea(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,Ea(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Ea(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,w[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Ea(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,Ea(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,Ea(v,2)).replace(/{m}/g,v+"").replace(/{ss}/g,Ea(c,2)).replace(/{s}/g,c+"").replace(/{SSS}/g,Ea(p,3)).replace(/{S}/g,p+"")}function Qk(r,e,t,a,n){var i=null;if(Y(t))i=t;else if(Q(t))i=t(r.value,e,{level:r.level});else{var o=z({},Ms);if(r.level>0)for(var s=0;s=0;--s)if(l[u]){i=l[u];break}i=i||o.none}if(G(i)){var h=r.level==null?0:r.level>=0?r.level:i.length+r.level;h=Math.min(h,i.length-1),i=i[h]}}return Ih(new Date(r.value),i,n,a)}function GC(r,e){var t=ra(r),a=t[_o(e)]()+1,n=t[Ph(e)](),i=t[fl(e)](),o=t[Rh(e)](),s=t[Eh(e)](),l=t[kh(e)](),u=l===0,f=u&&s===0,h=f&&o===0,v=h&&i===0,c=v&&n===1,p=c&&a===1;return p?"year":c?"month":v?"day":h?"hour":f?"minute":u?"second":"millisecond"}function K0(r,e,t){var a=Ct(r)?ra(r):r;switch(e=e||GC(r,t),e){case"year":return a[jg(t)]();case"half-year":return a[_o(t)]()>=6?1:0;case"quarter":return Math.floor((a[_o(t)]()+1)/4);case"month":return a[_o(t)]();case"day":return a[Ph(t)]();case"half-day":return a[fl(t)]()/24;case"hour":return a[fl(t)]();case"minute":return a[Rh(t)]();case"second":return a[Eh(t)]();case"millisecond":return a[kh(t)]()}}function jg(r){return r?"getUTCFullYear":"getFullYear"}function _o(r){return r?"getUTCMonth":"getMonth"}function Ph(r){return r?"getUTCDate":"getDate"}function fl(r){return r?"getUTCHours":"getHours"}function Rh(r){return r?"getUTCMinutes":"getMinutes"}function Eh(r){return r?"getUTCSeconds":"getSeconds"}function kh(r){return r?"getUTCMilliseconds":"getMilliseconds"}function tO(r){return r?"setUTCFullYear":"setFullYear"}function FC(r){return r?"setUTCMonth":"setMonth"}function HC(r){return r?"setUTCDate":"setDate"}function WC(r){return r?"setUTCHours":"setHours"}function $C(r){return r?"setUTCMinutes":"setMinutes"}function UC(r){return r?"setUTCSeconds":"setSeconds"}function YC(r){return r?"setUTCMilliseconds":"setMilliseconds"}function ZC(r){if(!IT(r))return Y(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function XC(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 zo=xg;function ld(r,e,t){var a="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(f){return f&&Dr(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?ra(r):r;if(isNaN(+l)){if(s)return"-"}else return Ih(l,a,t)}if(e==="ordinal")return Cp(r)?n(r):Ct(r)&&i(r)?r+"":"-";var u=xa(r);return i(u)?ZC(u):Cp(r)?n(r):typeof r=="boolean"?r+"":"-"}var J0=["a","b","c","d","e","f","g"],Fv=function(r,e){return"{"+r+(e==null?"":e)+"}"};function qC(r,e,t){G(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 bi(r,e){return e=e||"transparent",Y(r)?r:at(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function kf(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var hf=D,KC=["left","right","top","bottom","width","height"],ni=[["width","left","right"],["height","top","bottom"]];function Qg(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(),h=e.childAt(u+1),v=h&&h.getBoundingRect(),c,p;if(r==="horizontal"){var d=f.width+(v?-v.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+(v?-v.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 di=Qg;ut(Qg,"vertical");ut(Qg,"horizontal");function aO(r,e,t){var a=e.width,n=e.height,i=$(r.left,a),o=$(r.top,n),s=$(r.right,a),l=$(r.bottom,n);return(isNaN(i)||isNaN(parseFloat(r.left)))&&(i=0),(isNaN(s)||isNaN(parseFloat(r.right)))&&(s=a),(isNaN(o)||isNaN(parseFloat(r.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=n),t=zo(t||0),{width:Math.max(s-i-t[1]-t[3],0),height:Math.max(l-o-t[0]-t[2],0)}}function ne(r,e,t){t=zo(t||0);var a=e.width,n=e.height,i=$(r.left,a),o=$(r.top,n),s=$(r.right,a),l=$(r.bottom,n),u=$(r.width,a),f=$(r.height,n),h=t[2]+t[0],v=t[1]+t[3],c=r.aspect;switch(isNaN(u)&&(u=a-s-v-i),isNaN(f)&&(f=n-l-h-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-v),isNaN(o)&&(o=n-l-f-h),r.left||r.right){case"center":i=a/2-u/2-t[3];break;case"right":i=a-u-v;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-f/2-t[0];break;case"bottom":o=n-f-h;break}i=i||0,o=o||0,isNaN(u)&&(u=a-v-i-(s||0)),isNaN(f)&&(f=n-h-o-(l||0));var p=new vt(i+t[3],o+t[0],u,f);return p.margin=t,p}function Oh(r,e,t,a,n,i){var o=!n||!n.hv||n.hv[0],s=!n||!n.hv||n.hv[1],l=n&&n.boundingMode||"all";if(i=i||r,i.x=r.x,i.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new vt(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var f=r.getLocalTransform();u=u.clone(),u.applyTransform(f)}var h=ne(et({width:u.width,height:u.height},e),t,a),v=o?h.x-u.x:0,c=s?h.y-u.y:0;return l==="raw"?(i.x=v,i.y=c):(i.x+=v,i.y+=c),i===r&&r.markRedraw(),!0}function nO(r,e){return r[ni[e][0]]!=null||r[ni[e][1]]!=null&&r[ni[e][2]]!=null}function hl(r){var e=r.layoutMode||r.constructor.layoutMode;return at(e)?e:e?{type:e}:null}function hn(r,e,t){var a=t&&t.ignoreSize;!G(a)&&(a=[a,a]);var n=o(ni[0],0),i=o(ni[1],1);u(ni[0],r,n),u(ni[1],r,i);function o(f,h){var v={},c=0,p={},d=0,g=2;if(hf(f,function(_){p[_]=r[_]}),hf(f,function(_){s(e,_)&&(v[_]=p[_]=e[_]),l(v,_)&&c++,l(p,_)&&d++}),a[h])return l(e,f[1])?p[f[2]]=null:l(e,f[2])&&(p[f[1]]=null),p;if(d===g||!c)return p;if(c>=g)return v;for(var y=0;y=0;l--)s=ft(s,n[l],!0);a.defaultOption=s}return a.defaultOption},e.prototype.getReferringComponents=function(t,a){var n=t+"Index",i=t+"Id";return Pl(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},a)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},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}(Vt);GT(Fo,Vt);_h(Fo);Uk(Fo);Yk(Fo,oO);function oO(r){var e=[];return D(Fo.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=F(e,function(t){return Xr(t).main}),r!=="dataset"&&pt(e,"dataset")<=0&&e.unshift("dataset"),e}const wt=Fo;var jC="";typeof navigator<"u"&&(jC=navigator.platform||"");var Wi="rgba(0, 0, 0, 0.2)";const sO={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Wi,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Wi,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Wi,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Wi,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Wi,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Wi,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:jC.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 QC=J(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),_r="original",Me="arrayRows",Sr="objectRows",na="keyedColumns",nn="typedArray",tA="unknown",jr="column",Ho="row",pe={Must:1,Might:2,Not:3},eA=St();function lO(r){eA(r).datasetMap=J()}function rA(r,e,t){var a={},n=ey(e);if(!n||!r)return a;var i=[],o=[],s=e.ecModel,l=eA(s).datasetMap,u=n.uid+"_"+t.seriesLayoutBy,f,h;r=r.slice(),D(r,function(d,g){var y=at(d)?d:r[g]={name:d};y.type==="ordinal"&&f==null&&(f=g,h=p(y)),a[y.name]=[]});var v=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});D(r,function(d,g){var y=d.name,m=p(d);if(f==null){var _=v.valueWayDim;c(a[y],_,m),c(o,_,m),v.valueWayDim+=m}else if(f===g)c(a[y],0,m),c(i,0,m);else{var _=v.categoryWayDim;c(a[y],_,m),c(o,_,m),v.categoryWayDim+=m}});function c(d,g,y){for(var m=0;me)return r[a];return r[t-1]}function iA(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:cO(a,o);if(f=f||t,!(!f||!f.length)){var h=f[l];return n&&(u[n]=h),s.paletteIdx=(l+1)%f.length,h}}function pO(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var pu,rs,Q0,t_="\0_ec_inner",dO=1,oA=function(r){O(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 Vt(i),this._locale=new Vt(o),this._optionManager=s},e.prototype.setOption=function(t,a,n){var i=a_(a);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,a){return this._resetOption(t,a_(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"?Q0(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&&D(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;lO(this),D(t,function(h,v){h!=null&&(wt.hasClass(v)?v&&(s.push(v),l.set(v,!0)):n[v]=n[v]==null?nt(h):ft(n[v],h,!0))}),u&&u.each(function(h,v){wt.hasClass(v)&&!l.get(v)&&(s.push(v),l.set(v,!0))}),wt.topologicalTravel(s,wt.getAllClassMainTypes(),f,this);function f(h){var v=hO(this,h,Rt(t[h])),c=i.get(h),p=c?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",d=OT(c,v,p);PR(d,h,wt),n[h]=null,i.set(h,null),o.set(h,0);var g=[],y=[],m=0,_;D(d,function(S,x){var w=S.existing,b=S.newOption;if(!b)w&&(w.mergeOption({},this),w.optionUpdated({},!1));else{var T=h==="series",C=wt.getClass(h,S.keyInfo.subType,!T);if(!C)return;if(h==="tooltip"){if(_)return;_=!0}if(w&&w.constructor===C)w.name=S.keyInfo.name,w.mergeOption(b,this),w.optionUpdated(b,!1);else{var A=z({componentIndex:x},S.keyInfo);w=new C(b,this,this,A),z(w,A),S.brandNew&&(w.__requireNewView=!0),w.init(b,this,this),w.optionUpdated(null,!0)}}w?(g.push(w.option),y.push(w),m++):(g.push(void 0),y.push(void 0))},this),n[h]=g,i.set(h,y),o.set(h,m),h==="series"&&pu(this)}this._seriesIndices||pu(this)},e.prototype.getOption=function(){var t=nt(this.option);return D(t,function(a,n){if(wt.hasClass(n)){for(var i=Rt(a),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!il(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,t[n]=i}}),delete t[t_],t},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 AO(r,e){return r.join(",")===e.join(",")}const DO=wO;var xr=D,vl=at,n_=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Wv(r){var e=r&&r.itemStyle;if(!!e)for(var t=0,a=n_.length;t=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"&&v>=0&&m>0||l==="samesign"&&v<=0&&m<0){v=SR(v,m),d=m;break}}}return a[0]=v,a[1]=d,a})})}var Nh=function(){function r(e){this.data=e.data||(e.sourceFormat===na?{}:[]),this.sourceFormat=e.sourceFormat||tA,this.seriesLayoutBy=e.seriesLayoutBy||jr,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};h_=(e={},e[Me+"_"+jr]={pure:!0,appendData:i},e[Me+"_"+Ho]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Sr]={pure:!0,appendData:i},e[na]={pure:!0,appendData:function(o){var s=this._data;D(o,function(l,u){for(var f=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)f.push(l[h])})}},e[_r]={appendData:i},e[nn]={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 bo(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,a){},r}();function d_(r){var e,t;return at(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function $s(r){return new $O(r)}var $O=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 h;(this._dirty||i==="reset")&&(this._dirty=!1,h=this._doReset(a)),this._modBy=l,this._modDataCount=u;var v=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(v!=null?this._dueIndex+v:1/0,this._dueEnd);if(!a&&(h||c1&&a>0?s:o}};return i;function o(){return e=r?null:le},gte:function(r,e){return r>=e}},YO=function(){function r(e,t){if(!Ct(t)){var a="";Dt(a)}this._opFn=mA[e],this._rvalFloat=xa(t)}return r.prototype.evaluate=function(e){return Ct(e)?this._opFn(e,this._rvalFloat):this._opFn(xa(e),this._rvalFloat)},r}(),_A=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=Ct(e)?e:xa(e),n=Ct(t)?t:xa(t),i=isNaN(a),o=isNaN(n);if(i&&(a=this._incomparable),o&&(n=this._incomparable),i&&o){var s=Y(e),l=Y(t);s&&(a=l?e:0),l&&(n=s?t:0)}return an?-this._resultLT:0},r}(),ZO=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=xa(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=xa(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function XO(r,e){return r==="eq"||r==="ne"?new ZO(r==="eq",e):q(mA,r)?new YO(r,e):null}var qO=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 on(e,t)},r}();function KO(r,e){var t=new qO,a=r.data,n=t.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==jr&&Dt(o);var s=[],l={},u=r.dimensionsDefine;if(u)D(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)&&Dt(_),l[y]=m}});else for(var f=0;f65535?nN:iN}function Ui(){return[1/0,-1/0]}function oN(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function m_(r,e,t,a,n){var i=wA[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=F(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.indicesOfNearest=function(e,t,a){var n=this._chunks,i=n[e],o=[];if(!i)return o;a==null&&(a=1/0);for(var s=1/0,l=-1,u=0,f=0,h=this.count();f=0&&l<0)&&(s=p,l=c,u=0),c===l&&(o[u++]=f))}return o.length=u,o},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=h&&m<=v||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],x=e[n[1]][1],y=0;y=h&&m<=v||isNaN(m))&&(w>=S&&w<=x||isNaN(w))&&(l[u++]=d),d++}p=!0}}if(!p)if(i===1)for(var y=0;y=h&&m<=v||isNaN(m))&&(l[u++]=b)}else for(var y=0;ye[A][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,h,v,c=new($i(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));c[s++]=u;for(var p=1;pf&&(f=h,v=S)}M>0&&Ms&&(d=s-f);for(var g=0;gp&&(p=m,c=f+g)}var _=this.getRawIndex(h),S=this.getRawIndex(c);hf-p&&(l=f-p,s.length=l);for(var d=0;dh[1]&&(h[1]=y),v[c++]=m}return i._count=c,i._indices=v,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=h)}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 on(t[i],this._dimensions[i])}Yv={arrayRows:e,objectRows:function(t,a,n,i){return on(t[a],this._dimensions[i])},keyedColumns:e,original:function(t,a,n,i){var o=t&&(t.value==null?t:t.value);return on(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(t,a,n,i){return t[i]}}}(),r}(),bA=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(du(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=We(s)?nn:_r,i=[];var h=this._getSourceMetaRawOption()||{},v=u&&u.metaRawOption||{},c=lt(h.seriesLayoutBy,v.seriesLayoutBy)||null,p=lt(h.sourceHeader,v.sourceHeader),d=lt(h.dimensions,v.dimensions),g=c!==v.seriesLayoutBy||!!p!=!!v.sourceHeader||d;n=g?[hd(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=[hd(_,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&&S_(i)}var o,s=[],l=[];return D(e,function(u){u.prepareSource();var f=u.getSource(n||0),h="";n!=null&&!f&&S_(h),s.push(f),l.push(u._getVersionSign())}),a?o=rN(a,s,{datasetIndex:t.componentIndex}):n!=null&&(o=[BO(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 D(r.blocks,function(n){var i=DA(n);i>=e&&(e=i+ +(a&&(!i||cd(n)&&!n.noHeader)))}),e}return 0}function fN(r,e,t,a){var n=e.noHeader,i=vN(DA(e)),o=[],s=e.blocks||[];Oe(!s||G(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 _A(u[l],null);s.sort(function(d,g){return f.evaluate(d.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}D(s,function(d,g){var y=e.valueFormatter,m=AA(d)(y?z(z({},r),{valueFormatter:y}):r,d,g>0?i.html:0,a);m!=null&&o.push(m)});var h=r.renderMode==="richText"?o.join(i.richText):pd(a,o.join(""),n?t:i.html);if(n)return h;var v=ld(e.header,"ordinal",r.useUTC),c=CA(a,r.renderMode).nameStyle,p=TA(a);return r.renderMode==="richText"?MA(r,v,c)+i.richText+h:pd(a,'
'+Ae(v)+"
"+h,t)}function hN(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=G(S)?S:[S],F(S,function(x,w){return ld(x,G(c)?c[w]:c,u)})};if(!(i&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",n),v=i?"":ld(l,"ordinal",u),c=e.valueType,p=o?[]:f(e.value,e.dataIndex),d=!s||!i,g=!s&&i,y=CA(a,n),m=y.nameStyle,_=y.valueStyle;return n==="richText"?(s?"":h)+(i?"":MA(r,v,m))+(o?"":dN(r,p,d,g,_)):pd(a,(s?"":h)+(i?"":cN(v,!s,m))+(o?"":pN(p,d,g,_)),t)}}function x_(r,e,t,a,n,i){if(!!r){var o=AA(r),s={useUTC:n,renderMode:t,orderMode:a,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function vN(r){return{html:lN[r],richText:uN[r]}}function pd(r,e,t){var a='
',n="margin: "+t+"px 0 0",i=TA(r);return'
'+e+a+"
"}function cN(r,e,t){var a=e?"margin-left:2px":"";return''+Ae(r)+""}function pN(r,e,t,a){var n=t?"10px":"20px",i=e?"float:right;margin-left:"+n:"";return r=G(r)?r:[r],''+F(r,function(o){return Ae(o)}).join("  ")+""}function MA(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function dN(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(G(e)?e.join(" "):e,i)}function LA(r,e){var t=r.getData().getItemVisual(e,"style"),a=t[r.visualDrawType];return bi(a)}function IA(r,e){var t=r.get("padding");return t!=null?t:e==="richText"?[8,10]:10}var Zv=function(){function r(){this.richTextStyles={},this._nextStyleNameId=PT()}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=rO({color:t,type:e,renderMode:a,markerId:n});return Y(i)?i:(this.richTextStyles[n]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(e,t){var a={};G(t)?D(t,function(i){return z(a,i)}):z(a,t);var n=this._generateStyleName();return this.richTextStyles[n]=a,"{"+n+"|"+e+"}"},r}();function PA(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=G(s),u=LA(e,t),f,h,v,c;if(o>1||l&&!o){var p=gN(s,e,t,i,u);f=p.inlineValues,h=p.inlineValueTypes,v=p.blocks,c=p.inlineValues[0]}else if(o){var d=n.getDimensionInfo(i[0]);c=f=bo(n,t,i[0]),h=d.type}else c=f=l?s[0]:s;var g=Ig(e),y=g&&e.name||"",m=n.getName(t),_=a?y:m;return ue("section",{header:y,noHeader:a||!g,sortParam:c,blocks:[ue("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Dr(_),value:f,valueType:h,dataIndex:t})].concat(v||[])})}function gN(r,e,t,a,n){var i=e.getData(),o=Qr(r,function(h,v,c){var p=i.getDimensionInfo(c);return h=h||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];a.length?D(a,function(h){f(bo(i,t,h),h)}):D(r,f);function f(h,v){var c=i.getDimensionInfo(v);!c||c.otherDims.tooltip===!1||(o?u.push(ue("nameValue",{markerType:"subItem",markerColor:n,name:c.displayName,value:h,valueType:c.type})):(s.push(h),l.push(c.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var ka=St();function gu(r,e){return r.getName(e)||r.getId(e)}var vf="__universalTransitionEnabled",zh=function(r){O(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=$s({count:mN,reset:_N}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n);var i=ka(this).sourceManager=new bA(this);i.prepareSource();var o=this.getInitialData(t,n);b_(o,this),this.dataTask.context.data=o,ka(this).dataBeforeProcessed=o,w_(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,a){var n=hl(this),i=n?Go(t):{},o=this.subType;wt.hasClass(o)&&(o+="Series"),ft(t,a.getTheme().get(this.subType)),ft(t,this.getDefaultOption()),_i(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&hn(t,i,n)},e.prototype.mergeOption=function(t,a){t=ft(this.option,t,!0),this.fillDataTextStyle(t.data);var n=hl(this);n&&hn(this.option,t,n);var i=ka(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,a);b_(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,ka(this).dataBeforeProcessed=o,w_(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!We(t))for(var a=["show"],n=0;nthis.getShallow("animationThreshold")&&(a=!1),!!a},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,a,n){var i=this.ecModel,o=ry.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[gu(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[vf])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"){at(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(t,a)}},e.registerClass=function(t){return wt.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}(wt);re(zh,Bh);re(zh,ry);GT(zh,wt);function w_(r){var e=r.name;Ig(r)||(r.name=yN(r)||e)}function yN(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),a=[];return D(t,function(n){var i=e.getDimensionInfo(n);i.displayName&&a.push(i.displayName)}),a.join(" ")}function mN(r){return r.model.getRawData().count()}function _N(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),SN}function SN(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function b_(r,e){D(tl(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,ut(xN,e))})}function xN(r,e){var t=dd(r);return t&&t.setOutputEnd((e||this).count()),e}function dd(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 Wt=zh;var sy=function(){function r(){this.group=new it,this.uid=Vo("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}();Rg(sy);_h(sy);const Zt=sy;function Wo(){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 RA=St(),wN=Wo(),ly=function(){function r(){this.group=new it,this.uid=Vo("viewChart"),this.renderTask=$s({plan:bN,reset:TN}),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||C_(i,n,"emphasis")},r.prototype.downplay=function(e,t,a,n){var i=e.getData(n&&n.dataType);!i||C_(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){mn(this.group,e)},r.markUpdateMethod=function(e,t){RA(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function T_(r,e,t){r&&ll(r)&&(e==="emphasis"?wa:ba)(r,t)}function C_(r,e,t){var a=Si(r,e),n=e&&e.highlightKey!=null?qE(e.highlightKey):null;a!=null?D(Rt(a),function(i){T_(r.getItemGraphicEl(i),t,n)}):r.eachItemGraphicEl(function(i){T_(i,t,n)})}Rg(ly);_h(ly);function bN(r){return wN(r.model)}function TN(r){var e=r.model,t=r.ecModel,a=r.api,n=r.payload,i=e.pipelineContext.progressiveRender,o=r.view,s=n&&RA(n).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,a,n),CN[l]}var CN={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 zt=ly;var Of="\0__throttleOriginMethod",A_="\0__throttleRate",D_="\0__throttleType";function uy(r,e,t){var a,n=0,i=0,o=null,s,l,u,f;e=e||0;function h(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var v=function(){for(var c=[],p=0;p=0?h():o=setTimeout(h,-s),n=a};return v.clear=function(){o&&(clearTimeout(o),o=null)},v.debounceNextCall=function(c){f=c},v}function $o(r,e,t,a){var n=r[e];if(!!n){var i=n[Of]||n,o=n[D_],s=n[A_];if(s!==t||o!==a){if(t==null||!a)return r[e]=i;n=r[e]=uy(i,t,a==="debounce"),n[Of]=i,n[D_]=a,n[A_]=t}return n}}function cl(r,e){var t=r[e];t&&t[Of]&&(t.clear&&t.clear(),r[e]=t[Of])}var M_=St(),L_={itemStyle:xi(NC,!0),lineStyle:xi(OC,!0)},AN={lineStyle:"stroke",itemStyle:"fill"};function EA(r,e){var t=r.visualStyleMapper||L_[e];return t||(console.warn("Unknown style type '"+e+"'."),L_.itemStyle)}function kA(r,e){var t=r.visualDrawType||AN[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var DN={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=r.getModel(a),i=EA(r,a),o=i(n),s=n.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=kA(r,a),u=o[l],f=Q(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||h){var v=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=v,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Q(o.fill)?v:o.fill,o.stroke=o.stroke==="auto"||Q(o.stroke)?v: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=z({},o);g[l]=f(d),c.setItemVisual(p,"style",g)}}}},ns=new Vt,MN={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=EA(r,a),i=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[a]){ns.option=l[a];var u=n(ns),f=o.ensureUniqueItemVisual(s,"style");z(f,u),ns.option.decal&&(o.setItemVisual(s,"decal",ns.option.decal),ns.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},LN={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)),M_(t).scope=i}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var a=t.getRawData(),n={},i=t.getData(),o=M_(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=kA(t,s);i.each(function(u){var f=i.getRawIndex(u);n[f]=u}),a.each(function(u){var f=n[u],h=i.getItemVisual(f,"colorFromPalette");if(h){var v=i.ensureUniqueItemVisual(f,"style"),c=a.getName(u)||u+"",p=a.count();v[l]=t.getColorFromPalette(c,o,p)}})}})}},yu=Math.PI;function IN(r,e){e=e||{},et(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new it,a=new xt({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(a);var n=new Tt({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 xt({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 Hg({shape:{startAngle:-yu/2,endAngle:-yu/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:yu*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:yu*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 PN=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;D(this._allHandlers,function(n){var i=e.get(n.uid)||e.set(n.uid,{}),o="";Oe(!(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;D(e,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),h=f.seriesTaskMap,v=f.overallTask;if(v){var c,p=v.agentStubMap;p.each(function(g){s(n,g)&&(g.dirty(),c=!0)}),c&&v.dirty(),o.updatePayload(v,a);var d=o.getPerformArgs(v,n.block);p.each(function(g){g.perform(d)}),v.perform(d)&&(i=!0)}else h&&h.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(h){var v=h.uid,c=s.set(v,o&&o.get(v)||$s({plan:NN,reset:BN,count:zN}));c.context={model:h,ecModel:a,api:n,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(h,c)}},r.prototype._createOverallStageTask=function(e,t,a,n){var i=this,o=t.overallTask=t.overallTask||$s({reset:RN});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,h=!0,v=!1,c="";Oe(!e.createOnAllSeries,c),u?a.eachRawSeriesByType(u,p):f?f(a,n).each(p):(h=!1,D(a.getSeries(),p));function p(d){var g=d.uid,y=l.set(g,s&&s.get(g)||(v=!0,$s({reset:EN,onDirty:ON})));y.context={model:d,overallProgress:h},y.agent=o,y.__block=h,i._pipe(d,y)}v&&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 Q(e)&&(e={overallReset:e,seriesType:GN(e)}),e.uid=Vo("stageHandler"),t&&(e.visualType=t),e},r}();function RN(r){r.overallReset(r.ecModel,r.api,r.payload)}function EN(r){return r.overallProgress&&kN}function kN(){this.agent.dirty(),this.getDownstream().dirty()}function ON(){this.agent&&this.agent.dirty()}function NN(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function BN(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=Rt(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?F(e,function(t,a){return OA(a)}):VN}var VN=OA(0);function OA(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-v.length){var p=u.slice(0,c);p!=="data"&&(t.mainType=p,t[v.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(h,v,c,p){return h[c]==null||v[p||c]===h[c]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),gd=["symbol","symbolSize","symbolRotate","symbolOffset"],E_=gd.concat(["symbolKeepAspect"]),$N={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&&oi(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function yd(r,e,t){for(var a=e.type==="radial"?o5(r,e,t):i5(r,e,t),n=e.colorStops,i=0;i0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:Ct(r)?[r]:G(r)?r:null}function hy(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&l5(e.lineDash,e.lineWidth),a=e.lineDashOffset;if(t){var n=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(t=F(t,function(i){return i/n}),a/=n)}return[t,a]}var u5=new aa(!0);function Vf(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function k_(r){return typeof r=="string"&&r!=="none"}function zf(r){var e=r.fill;return e!=null&&e!=="none"}function O_(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 N_(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 md(r,e,t){var a=Eg(e.image,e.__image,t);if(Sh(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)*Ju),i.scaleSelf(e.scaleX||1,e.scaleY||1),n.setTransform(i)}return n}}function f5(r,e,t,a){var n,i=Vf(t),o=zf(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var f=e.path||u5,h=e.__dirty;if(!a){var v=t.fill,c=t.stroke,p=o&&!!v.colorStops,d=i&&!!c.colorStops,g=o&&!!v.image,y=i&&!!c.image,m=void 0,_=void 0,S=void 0,x=void 0,w=void 0;(p||d)&&(w=e.getBoundingRect()),p&&(m=h?yd(r,v,w):e.__canvasFillGradient,e.__canvasFillGradient=m),d&&(_=h?yd(r,c,w):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(S=h||!e.__canvasFillPattern?md(r,v,e):e.__canvasFillPattern,e.__canvasFillPattern=S),y&&(x=h||!e.__canvasStrokePattern?md(r,c,e):e.__canvasStrokePattern,e.__canvasStrokePattern=S),p?r.fillStyle=m:g&&(S?r.fillStyle=S:o=!1),d?r.strokeStyle=_:y&&(x?r.strokeStyle=x:i=!1)}var b=e.getGlobalScale();f.setScale(b[0],b[1],e.segmentIgnoreThreshold);var T,C;r.setLineDash&&t.lineDash&&(n=hy(e),T=n[0],C=n[1]);var A=!0;(u||h&no)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),A=!1),f.reset(),e.buildPath(f,e.shape,a),f.toStatic(),e.pathUpdated()),A&&f.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=C),a||(t.strokeFirst?(i&&N_(r,t),o&&O_(r,t)):(o&&O_(r,t),i&&N_(r,t))),T&&r.setLineDash([])}function h5(r,e,t){var a=e.__image=Eg(t.image,e.__image,e,e.onload);if(!(!a||!Sh(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,h=o-u,v=s-f;r.drawImage(a,u,f,h,v,n,i,o,s)}else r.drawImage(a,n,i,o,s)}}function v5(r,e,t){var a,n=t.text;if(n!=null&&(n+=""),n){r.font=t.font||ln,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var i=void 0,o=void 0;r.setLineDash&&t.lineDash&&(a=hy(e),i=a[0],o=a[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),t.strokeFirst?(Vf(t)&&r.strokeText(n,t.x,t.y),zf(t)&&r.fillText(n,t.x,t.y)):(zf(t)&&r.fillText(n,t.x,t.y),Vf(t)&&r.strokeText(n,t.x,t.y)),i&&r.setLineDash([])}}var B_=["shadowBlur","shadowOffsetX","shadowOffsetY"],V_=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function HA(r,e,t,a,n){var i=!1;if(!a&&(t=t||{},e===t))return!1;if(a||e.opacity!==t.opacity){He(r,n),i=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?hi.opacity:o}(a||e.blend!==t.blend)&&(i||(He(r,n),i=!0),r.globalCompositeOperation=e.blend||hi.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[we]){if(this._disposed){this.id;return}var i,o,s;if(at(a)&&(n=a.lazyUpdate,i=a.silent,o=a.replaceMerge,s=a.transition,a=a.notMerge),this[we]=!0,!this._model||a){var l=new DO(this._api),u=this._theme,f=this._model=new sA;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},Sd);var h={seriesTransition:s,optionChanged:!0};if(n)this[ze]={silent:i,updateParams:h},this[we]=!1,this.getZr().wakeUp();else{try{Zi(this),Oa.update.call(this,null,h)}catch(v){throw this[ze]=null,this[we]=!1,v}this._ssr||this._zr.flush(),this[ze]=null,this[we]=!1,is.call(this,i),os.call(this,i)}}},e.prototype.setTheme=function(){},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||bt.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(){if(!!bt.svgSupported){var t=this._zr,a=t.storage.getDisplayList();return D(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;D(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 D(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(Q_[n]){var l=s,u=s,f=-s,h=-s,v=[],c=t&&t.pixelRatio||this.getDevicePixelRatio();D(Ys,function(_,S){if(_.group===n){var x=a?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(nt(t)),w=_.getDom().getBoundingClientRect();l=i(w.left,l),u=i(w.top,u),f=o(w.right,f),h=o(w.bottom,h),v.push({dom:x,left:w.left,top:w.top})}}),l*=c,u*=c,f*=c,h*=c;var p=f-l,d=h-u,g=_a.createCanvas(),y=n0(g,{renderer:a?"svg":"canvas"});if(y.resize({width:p,height:d}),a){var m="";return D(v,function(_){var S=_.left-l,x=_.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 xt({shape:{x:0,y:0,width:p,height:d},style:{fill:t.connectedBackgroundColor}})),D(v,function(_){var S=new Se({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){return jv(this,"convertToPixel",t,a)},e.prototype.convertFromPixel=function(t,a){return jv(this,"convertFromPixel",t,a)},e.prototype.containPixel=function(t,a){if(this._disposed){this.id;return}var n=this._model,i,o=zs(n,t);return D(o,function(s,l){l.indexOf("Models")>=0&&D(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)i=i||!!f.containPoint(a);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint&&(i=i||h.containPoint(a,u))}},this)},this),!!i},e.prototype.getVisual=function(t,a){var n=this._model,i=zs(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?fy(s,l,a):Nl(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;D(V5,function(a){var n=function(i){var o=t.getModel(),s=i.target,l,u=a==="globalout";if(u?l={}:s&&ii(s,function(p){var d=ot(p);if(d&&d.dataIndex!=null){var g=d.dataModel||o.getSeriesByIndex(d.seriesIndex);return l=g&&g.getDataParams(d.dataIndex,d.dataType,s)||{},!0}else if(d.eventData)return l=z({},d.eventData),!0},!0),l){var f=l.componentType,h=l.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=l.seriesIndex);var v=f&&h!=null&&o.getComponent(f,h),c=v&&t[v.mainType==="series"?"_chartsMap":"_componentsMap"][v.__viewId];l.event=i,l.type=a,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:v,view:c},t.trigger(a,l)}};n.zrEventfulCallAtLast=!0,t._zr.on(a,n,t)}),D(Us,function(a,n){t._messageCenter.on(n,function(i){this.trigger(n,i)},t)}),D(["selectchanged"],function(a){t._messageCenter.on(a,function(n){this.trigger(a,n)},t)}),YN(this._messageCenter,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&&BT(this.getDom(),py,"");var a=this,n=a._api,i=a._model;D(a._componentsViews,function(o){o.dispose(i,n)}),D(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 Ys[a.id]},e.prototype.resize=function(t){if(!this[we]){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[ze]&&(i==null&&(i=this[ze].silent),n=!0,this[ze]=null),this[we]=!0;try{n&&Zi(this),Oa.update.call(this,{type:"resize",animation:z({duration:0},t&&t.animation)})}catch(o){throw this[we]=!1,o}this[we]=!1,is.call(this,i),os.call(this,i)}}},e.prototype.showLoading=function(t,a){if(this._disposed){this.id;return}if(at(t)&&(a=t,t=""),t=t||"default",this.hideLoading(),!!xd[t]){var n=xd[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=z({},t);return a.type=Us[t.type],a},e.prototype.dispatchAction=function(t,a){if(this._disposed){this.id;return}if(at(a)||(a={silent:!!a}),!!Gf[t.type]&&!!this._model){if(this[we]){this._pendingActions.push(t);return}var n=a.silent;tc.call(this,t,n);var i=a.flush;i?this._zr.flush():i!==!1&&bt.browser.weChat&&this._throttledZrFlush(),is.call(this,n),os.call(this,n)}},e.prototype.updateLabelLayout=function(){Cr.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(){Zi=function(h){var v=h._scheduler;v.restorePipelines(h._model),v.prepareStageTasks(),Jv(h,!0),Jv(h,!1),v.plan()},Jv=function(h,v){for(var c=h._model,p=h._scheduler,d=v?h._componentsViews:h._chartsViews,g=v?h._componentsMap:h._chartsMap,y=h._zr,m=h._api,_=0;_v.get("hoverLayerThreshold")&&!bt.node&&!bt.worker&&v.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=h._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function o(h,v){var c=h.get("blendMode")||null;v.eachRendered(function(p){p.isGroup||(p.style.blend=c)})}function s(h,v){if(!h.preventAutoZ){var c=h.get("z")||0,p=h.get("zlevel")||0;v.eachRendered(function(d){return l(d,c,p,-1/0),!0})}}function l(h,v,c,p){var d=h.getTextContent(),g=h.getTextGuideLine(),y=h.isGroup;if(y)for(var m=h.childrenRef(),_=0;_0?{duration:d,delay:c.get("delay"),easing:c.get("easing")}:null;v.eachRendered(function(y){if(y.states&&y.states.emphasis){if(go(y))return;if(y instanceof yt&&KE(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&&n(y)}})}J_=function(h){return new(function(v){O(c,v);function c(){return v!==null&&v.apply(this,arguments)||this}return c.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},c.prototype.getComponentByElement=function(p){for(;p;){var d=p.__ecComponentInfo;if(d!=null)return h._model.getComponent(d.mainType,d.index);p=p.parent}},c.prototype.enterEmphasis=function(p,d){wa(p,d),tr(h)},c.prototype.leaveEmphasis=function(p,d){ba(p,d),tr(h)},c.prototype.enterBlur=function(p){nC(p),tr(h)},c.prototype.leaveBlur=function(p){Vg(p),tr(h)},c.prototype.enterSelect=function(p){iC(p),tr(h)},c.prototype.leaveSelect=function(p){oC(p),tr(h)},c.prototype.getModel=function(){return h.getModel()},c.prototype.getViewOfComponentModel=function(p){return h.getViewOfComponentModel(p)},c.prototype.getViewOfSeriesModel=function(p){return h.getViewOfSeriesModel(p)},c}(lA))(h)},aD=function(h){function v(c,p){for(var d=0;d=0)){e1.push(t);var i=VA.wrapStageHandler(t,n);i.__prio=e,i.__raw=t,r.push(i)}}function uD(r,e){xd[r]=e}function U5(r,e,t){var a=b5("registerMap");a&&a(r,e,t)}var Y5=eN;Ri(vy,DN);Ri(Gh,MN);Ri(Gh,LN);Ri(vy,$N);Ri(Gh,UN);Ri(JA,S5);sD(fA);lD(A5,OO);uD("default",IN);ia({type:vi,event:vi,update:vi},jt);ia({type:sf,event:sf,update:sf},jt);ia({type:Gs,event:Gs,update:Gs},jt);ia({type:lf,event:lf,update:lf},jt);ia({type:Fs,event:Fs,update:Fs},jt);oD("light",FN);oD("dark",HN);var r1=[],Z5={registerPreprocessor:sD,registerProcessor:lD,registerPostInit:F5,registerPostUpdate:H5,registerUpdateLifecycle:dy,registerAction:ia,registerCoordinateSystem:W5,registerLayout:$5,registerVisual:Ri,registerTransform:Y5,registerLoading:uD,registerMap:U5,registerImpl:w5,PRIORITY:O5,ComponentModel:wt,ComponentView:Zt,SeriesModel:Wt,ChartView:zt,registerComponentModel:function(r){wt.registerClass(r)},registerComponentView:function(r){Zt.registerClass(r)},registerSeriesModel:function(r){Wt.registerClass(r)},registerChartView:function(r){zt.registerClass(r)},registerSubTypeDefaulter:function(r,e){wt.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){pR(r,e)}};function gt(r){if(G(r)){D(r,function(e){gt(e)});return}pt(r1,r)>=0||(r1.push(r),Q(r)&&(r={install:r}),r.install(Z5))}function ss(r){return r==null?0:r.length||1}function a1(r){return r}var X5=function(){function r(e,t,a,n,i,o){this._old=e,this._new=t,this._oldKeyGetter=a||a1,this._newKeyGetter=n||a1,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&&v===1)this._updateManyToOne&&this._updateManyToOne(f,u),n[l]=null;else if(h===1&&v>1)this._updateOneToMany&&this._updateOneToMany(f,u),n[l]=null;else if(h===1&&v===1)this._update&&this._update(f,u),n[l]=null;else if(h>1&&v>1)this._updateManyToMany&&this._updateManyToMany(f,u),n[l]=null;else if(h>1)for(var c=0;c1)for(var s=0;s30}var ls=at,Na=F,eB=typeof Int32Array>"u"?Array:Int32Array,rB="e\0\0",n1=-1,aB=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],nB=["_approximateExtent"],i1,wu,us,fs,ac,hs,nc,iB=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;hD(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===_r;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),G(i)?i=i.slice():ls(i)&&(i=z({},i)),n[t]=i),i},r.prototype.setItemVisual=function(e,t,a){var n=this._itemVisuals[e]||{};this._itemVisuals[e]=n,ls(t)?z(n,t):n[t]=a},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){ls(e)?z(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?z(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;Qp(a,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){D(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:Na(this.dimensions,this._getDimInfo,this),this.hostModel)),ac(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var a=this[e];!Q(a)||(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var n=a.apply(this,arguments);return t.apply(this,[n].concat(Sg(arguments)))})},r.internalField=function(){i1=function(e){var t=e._invertedIndicesMap;D(t,function(a,n){var i=e._dimInfos[n],o=i.ordinalMeta,s=e._store;if(o){a=t[n]=new eB(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),n[t]=l}}}(),r}();const ke=iB;function Bl(r,e){ay(r)||(r=ny(r)),e=e||{};var t=e.coordDimensions||[],a=e.dimensionsDefine||r.dimensionsDefine||[],n=J(),i=[],o=sB(r,t,a,e.dimensionsCount),s=e.canOmitUnusedDimensions&&pD(o),l=a===r.dimensionsDefine,u=l?cD(r):vD(a),f=e.encodeDefine;!f&&e.encodeDefaulter&&(f=e.encodeDefaulter(r,o));for(var h=J(f),v=new xA(o),c=0;c0&&(a.name=n+(i-1)),i++,e.set(n,i)}}function sB(r,e,t,a){var n=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,a||0);return D(e,function(i){var o;at(i)&&(o=i.dimsDef)&&(n=Math.max(n,o.length))}),n}function lB(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 uB=function(){function r(e){this.coordSysDims=[],this.axisMap=J(),this.categoryAxisMap=J(),this.coordSysName=e}return r}();function fB(r){var e=r.get("coordinateSystem"),t=new uB(e),a=hB[e];if(a)return a(r,t,t.axisMap,t.categoryAxisMap),t}var hB={cartesian2d:function(r,e,t,a){var n=r.getReferringComponents("xAxis",te).models[0],i=r.getReferringComponents("yAxis",te).models[0];e.coordSysDims=["x","y"],t.set("x",n),t.set("y",i),Xi(n)&&(a.set("x",n),e.firstCategoryDimIndex=0),Xi(i)&&(a.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,a){var n=r.getReferringComponents("singleAxis",te).models[0];e.coordSysDims=["single"],t.set("single",n),Xi(n)&&(a.set("single",n),e.firstCategoryDimIndex=0)},polar:function(r,e,t,a){var n=r.getReferringComponents("polar",te).models[0],i=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",i),t.set("angle",o),Xi(i)&&(a.set("radius",i),e.firstCategoryDimIndex=0),Xi(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();D(i.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),f=o[l];t.set(f,u),Xi(u)&&(a.set(f,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function Xi(r){return r.get("type")==="category"}function vB(r,e,t){t=t||{};var a=t.byIndex,n=t.stackedCoordDimension,i,o,s;cB(e)?i=e:(o=e.schema,i=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,f,h,v;if(D(i,function(m,_){Y(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){h="__\0ecstackresult_"+r.id,v="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var c=f.coordDim,p=f.type,d=0;D(i,function(m){m.coordDim===c&&d++});var g={name:h,coordDim:c,coordDimIndex:d,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:v,coordDim:v,coordDimIndex:d+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(v,p),y.storeDimIndex=s.ensureCalculationDimension(h,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:v,stackResultDimension:h}}function cB(r){return!hD(r.schema)}function vn(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function dD(r,e){return vn(r,e)?r.getCalculationInfo("stackResultDimension"):e}function pB(r,e){var t=r.get("coordinateSystem"),a=Ol.get(t),n;return e&&e.coordSysDims&&(n=F(e.coordSysDims,function(i){var o={name:i},s=e.axisMap.get(i);if(s){var l=s.get("type");o.type=Hf(l)}return o})),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]),n}function dB(r,e,t){var a,n;return t&&D(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 Ma(r,e,t){t=t||{};var a=e.getSourceManager(),n,i=!1;r?(i=!0,n=ny(r)):(n=a.getSource(),i=n.sourceFormat===_r);var o=fB(e),s=pB(e,o),l=t.useEncodeDefaulter,u=Q(l)?l:l?ut(rA,s,e):null,f={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},h=Bl(n,f),v=dB(h.dimensions,t.createInvertedIndices,o),c=i?null:a.getSharedDataStore(h),p=vB(e,{schema:h,store:c}),d=new ke(h,e);d.setCalculationInfo(p);var g=v!=null&&gB(n)?function(y,m,_,S){return S===v?_:this.defaultDimValueGetter(y,m,_,S)}:null;return d.hasItemOption=!1,d.initData(i?n:c,null,g),d}function gB(r){if(r.sourceFormat===_r){var e=yB(r.data||[]);return!G(ko(e))}}function yB(r){for(var e=0;et[1]&&(t[1]=e[1])},r.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){var a=this._extent;isNaN(e)||(a[0]=e),isNaN(t)||(a[1]=t)},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}();_h(gD);const La=gD;var mB=0,_B=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++mB}return r.createByAxisModel=function(e){var t=e.option,a=t.data,n=a&&F(a,SB);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(!Y(e)&&!a)return e;if(a&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,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)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=J(this.categories))},r}();function SB(r){return at(r)&&r.value!=null?r.value:r+""}const wd=_B;function bd(r){return r.type==="interval"||r.type==="log"}function xB(r,e,t,a){var n={},i=r[1]-r[0],o=n.interval=LT(i/e,!0);t!=null&&oa&&(o=n.interval=a);var s=n.intervalPrecision=yD(o),l=n.niceTickExtent=[qt(Math.ceil(r[0]/o)*o,s),qt(Math.floor(r[1]/o)*o,s)];return wB(l,r),n}function ic(r){var e=Math.pow(10,Lg(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,qt(t*e)}function yD(r){return Zr(r)+2}function o1(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function wB(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),o1(r,0,e),o1(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function Fh(r,e){return r>=e[0]&&r<=e[1]}function Hh(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function Wh(r,e){return r*(e[1]-e[0])+e[0]}var mD=function(r){O(e,r);function e(t){var a=r.call(this,t)||this;a.type="ordinal";var n=a.getSetting("ordinalMeta");return n||(n=new wd({})),G(n)&&(n=new wd({categories:F(n,function(i){return at(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:Y(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),Fh(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),Hh(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(Wh(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],a=this._extent,n=a[0];n<=a[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var a=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,a.length);o=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(La);La.registerClass(mD);const yy=mD;var Gn=qt,_D=function(r){O(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},e.prototype.contain=function(t){return Fh(t,this._extent)},e.prototype.normalize=function(t){return Hh(t,this._extent)},e.prototype.scale=function(t){return Wh(t,this._extent)},e.prototype.setExtent=function(t,a){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(a)||(n[1]=parseFloat(a))},e.prototype.unionExtent=function(t){var a=this._extent;t[0]a[1]&&(a[1]=t[1]),this.setExtent(a[0],a[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=yD(t)},e.prototype.getTicks=function(t){var a=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=[];if(!a)return s;var l=1e4;n[0]l)return[];var f=s.length?s[s.length-1].value:i[1];return n[1]>f&&(t?s.push({value:Gn(f+a,o)}):s.push({value:n[1]})),s},e.prototype.getMinorTicks=function(t){for(var a=this.getTicks(!0),n=[],i=this.getExtent(),o=1;oi[0]&&c0&&(i=i===null?s:Math.min(i,s))}t[a]=i}}return t}function wD(r){var e=CB(r),t=[];return D(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]),h=i.scale.getExtent(),v=Math.abs(h[1]-h[0]);s=u?f/v*u:f}else{var c=a.getData();s=Math.abs(o[1]-o[0])/c.count()}var p=$(a.get("barWidth"),s),d=$(a.get("barMaxWidth"),s),g=$(a.get("barMinWidth")||(DD(a)?.5:1),s),y=a.get("barGap"),m=a.get("barCategoryGap");t.push({bandWidth:s,barWidth:p,barMaxWidth:d,barMinWidth:g,barGap:y,barCategoryGap:m,axisKey:_y(i),stackId:my(a)})}),bD(t)}function bD(r){var e={};D(r,function(a,n){var i=a.axisKey,o=a.bandWidth,s=e[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",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 h=a.barMaxWidth;h&&(l[u].maxWidth=h);var v=a.barMinWidth;v&&(l[u].minWidth=v);var c=a.barGap;c!=null&&(s.gap=c);var p=a.barCategoryGap;p!=null&&(s.categoryGap=p)});var t={};return D(e,function(a,n){t[n]={};var i=a.stacks,o=a.bandWidth,s=a.categoryGap;if(s==null){var l=mt(i).length;s=Math.max(35-l*4,15)+"%"}var u=$(s,o),f=$(a.gap,1),h=a.remainedWidth,v=a.autoWidthCount,c=(h-u)/(v+(v-1)*f);c=Math.max(c,0),D(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,h-=S+f*S,v--}else{var S=c;m&&mS&&(S=_),S!==c&&(y.width=S,h-=S+f*S,v--)}}),c=(h-u)/(v+(v-1)*f),c=Math.max(c,0);var p=0,d;D(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;D(i,function(y,m){t[n][m]=t[n][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+f)})}),t}function AB(r,e,t){if(r&&e){var a=r[_y(e)];return a!=null&&t!=null?a[my(t)]:a}}function TD(r,e){var t=xD(r,e),a=wD(t);D(t,function(n){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=my(n),u=a[_y(s)][l],f=u.offset,h=u.width;i.setLayout({bandWidth:u.bandWidth,offset:f,size:h})})}function CD(r){return{seriesType:r,plan:Wo(),reset:function(e){if(!!AD(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"),h=vn(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),v=i.isHorizontal(),c=DB(n,i),p=DD(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 x=_.count,w=p&&qr(x*3),b=p&&l&&qr(x*3),T=p&&qr(x),C=a.master.getRect(),A=v?C.width:C.height,M,L=S.getStore(),I=0;(M=_.next())!=null;){var P=L.get(h?g:o,M),R=L.get(s,M),E=c,N=void 0;h&&(N=+P-L.get(o,M));var k=void 0,B=void 0,V=void 0,H=void 0;if(v){var W=a.dataToPoint([P,R]);if(h){var K=a.dataToPoint([N,R]);E=K[0]}k=E,B=W[1]+m,V=W[0]-E,H=y,Math.abs(V)0?t:1:t))}var MB=function(r,e,t,a){for(;t>>1;r[n][1]n&&(this._approxInterval=n);var s=bu.length,l=Math.min(MB(bu,this._approxInterval,0,s),s-1);this._interval=bu[l][1],this._minLevelUnit=bu[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return Ct(t)?t:+ra(t)},e.prototype.contain=function(t){return Fh(this.parse(t),this._extent)},e.prototype.normalize=function(t){return Hh(this.parse(t),this._extent)},e.prototype.scale=function(t){return Wh(t,this._extent)},e.type="time",e}(cn),bu=[["second",Kg],["minute",Jg],["hour",Ws],["quarter-day",Ws*6],["half-day",Ws*12],["day",cr*1.2],["half-week",cr*3.5],["week",cr*7],["month",cr*31],["quarter",cr*95],["half-year",X0/2],["year",X0]];function LB(r,e,t,a){var n=ra(e),i=ra(t),o=function(p){return K0(n,p,a)===K0(i,p,a)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},f=function(){return u()&&o("hour")},h=function(){return f()&&o("minute")},v=function(){return h()&&o("second")},c=function(){return v()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return f();case"minute":return h();case"second":return v();case"millisecond":return c()}}function IB(r,e){return r/=cr,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function PB(r){var e=30*cr;return r/=e,r>6?6:r>3?3:r>2?2:1}function RB(r){return r/=Ws,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function s1(r,e){return r/=e?Jg:Kg,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function EB(r){return LT(r,!0)}function kB(r,e,t){var a=new Date(r);switch(mo(e)){case"year":case"month":a[FC(t)](0);case"day":a[HC(t)](1);case"hour":a[WC(t)](0);case"minute":a[$C(t)](0);case"second":a[UC(t)](0),a[YC(t)](0)}return a.getTime()}function OB(r,e,t,a){var n=1e4,i=zC,o=0;function s(A,M,L,I,P,R,E){for(var N=new Date(M),k=M,B=N[I]();k1&&R===0&&L.unshift({value:L[0].value-k})}}for(var R=0;R=a[0]&&m<=a[1]&&h++)}var _=(a[1]-a[0])/e;if(h>_*1.5&&v>_/1.5||(u.push(g),h>_||r===i[c]))break}f=[]}}}for(var S=Mt(F(u,function(A){return Mt(A,function(M){return M.value>=a[0]&&M.value<=a[1]&&!M.notAdd})}),function(A){return A.length>0}),x=[],w=S.length-1,c=0;c0;)i*=10;var s=[qt(VB(a[0]/i)*i),qt(BB(a[1]/i)*i)];this._interval=i,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){Zs.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=wr(t)/wr(this.base),Fh(t,this._extent)},e.prototype.normalize=function(t){return t=wr(t)/wr(this.base),Hh(t,this._extent)},e.prototype.scale=function(t){return t=Wh(t,this._extent),Tu(this.base,t)},e.type="log",e}(La),ID=Sy.prototype;ID.getMinorTicks=Zs.getMinorTicks;ID.getLabel=Zs.getLabel;function Cu(r,e){return NB(r,Zr(e))}La.registerClass(Sy);const zB=Sy;var GB=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 v=this._determinedMin,c=this._determinedMax;return v!=null&&(s=v,u=!0),c!=null&&(l=c,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:h}},r.prototype.modifyDataMinMax=function(e,t){this[HB[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var a=FB[e];this[a]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),FB={min:"_determinedMin",max:"_determinedMax"},HB={min:"_dataMin",max:"_dataMax"};function PD(r,e,t){var a=r.rawExtentInfo;return a||(a=new GB(r,e,t),r.rawExtentInfo=a,a)}function Au(r,e){return e==null?null:Qs(e)?NaN:r.parse(e)}function RD(r,e){var t=r.type,a=PD(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=xD("bar",o),l=!1;if(D(s,function(h){l=l||h.getBaseAxis()===e.axis}),l){var u=wD(s),f=WB(n,i,e,u);n=f.min,i=f.max}}return{extent:[n,i],fixMin:a.minFixed,fixMax:a.maxFixed}}function WB(r,e,t,a){var n=t.axis.getExtent(),i=Math.abs(n[1]-n[0]),o=AB(a,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;D(o,function(c){s=Math.min(c.offset,s)});var l=-1/0;D(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,h=1-(s+l)/i,v=f/h-f;return e+=v*(l/u),r-=v*(s/u),{min:r,max:e}}function Co(r,e){var t=e,a=RD(r,t),n=a.extent,i=t.get("splitNumber");r instanceof zB&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";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 $h(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new yy({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new LD({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(La.getClass(e)||cn)}}function $B(r){var e=r.scale.getExtent(),t=e[0],a=e[1];return!(t>0&&a>0||t<0&&a<0)}function Yo(r){var e=r.getLabelModel().get("formatter"),t=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(a){return function(n,i){return r.scale.getFormattedLabel(n,i,a)}}(e):Y(e)?function(a){return function(n){var i=r.scale.getLabel(n),o=a.replace("{value}",i!=null?i:"");return o}}(e):Q(e)?function(a){return function(n,i){return t!=null&&(i=n.value-t),a(xy(r,n),i,n.level!=null?{level:n.level}:null)}}(e):function(a){return r.scale.getLabel(a)}}function xy(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function UB(r){var e=r.model,t=r.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var a,n,i=t.getExtent();t instanceof yy?n=t.count():(a=t.getTicks(),n=a.length);var o=r.getLabelModel(),s=Yo(r),l,u=1;n>40&&(u=Math.ceil(n/40));for(var f=0;fr[1]&&(r[1]=n[1])})}var Vl=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}(),XB=1e-8;function u1(r,e){return Math.abs(r-e)n&&(a=o,n=l)}if(a)return KB(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 D(o,function(s){s.type==="polygon"?f1(s.exterior,n,i,t):D(s.points,function(l){f1(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 vt(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 QB(r,e){return r=jB(r),F(Mt(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 h1(o[0],o.slice(1)));break;case"MultiPolygon":D(n.coordinates,function(l){l[0]&&i.push(new h1(l[0],l.slice(1)))});break;case"LineString":i.push(new v1([n.coordinates]));break;case"MultiLineString":i.push(new v1(n.coordinates))}var s=new OD(a[e||"name"],i,a.cp);return s.properties=a,s})}var gl=St();function BD(r,e){var t=F(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 tV(r){var e=r.getLabelModel().get("customValues");if(e){var t=Yo(r),a=r.scale.getExtent(),n=BD(r,e),i=Mt(n,function(o){return o>=a[0]&&o<=a[1]});return{labels:F(i,function(o){var s={value:o};return{formattedLabel:t(s),rawLabel:r.scale.getLabel(s),tickValue:o}})}}return r.type==="category"?rV(r):nV(r)}function eV(r,e){var t=r.getTickModel().get("customValues");if(t){var a=r.scale.getExtent(),n=BD(r,t);return{ticks:Mt(n,function(i){return i>=a[0]&&i<=a[1]})}}return r.type==="category"?aV(r,e):{ticks:F(r.scale.getTicks(),function(i){return i.value})}}function rV(r){var e=r.getLabelModel(),t=VD(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function VD(r,e){var t=zD(r,"labels"),a=wy(e),n=GD(t,a);if(n)return n;var i,o;return Q(a)?i=WD(r,a):(o=a==="auto"?iV(r):a,i=HD(r,o)),FD(t,a,{labels:i,labelCategoryInterval:o})}function aV(r,e){var t=zD(r,"ticks"),a=wy(e),n=GD(t,a);if(n)return n;var i,o;if((!e.get("show")||r.scale.isBlank())&&(i=[]),Q(a))i=WD(r,a,!0);else if(a==="auto"){var s=VD(r,r.getLabelModel());o=s.labelCategoryInterval,i=F(s.labels,function(l){return l.tickValue})}else o=a,i=HD(r,o,!0);return FD(t,a,{ticks:i,tickCategoryInterval:o})}function nV(r){var e=r.scale.getTicks(),t=Yo(r);return{labels:F(e,function(a,n){return{level:a.level,formattedLabel:t(a,n),rawLabel:r.scale.getLabel(a),tickValue:a.value}})}}function zD(r,e){return gl(r)[e]||(gl(r)[e]=[])}function GD(r,e){for(var t=0;t40&&(s=Math.max(1,Math.floor(o/40)));for(var l=i[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),f=Math.abs(u*Math.cos(a)),h=Math.abs(u*Math.sin(a)),v=0,c=0;l<=i[1];l+=s){var p=0,d=0,g=Il(t({value:l}),e.font,"center","top");p=g.width*1.3,d=g.height*1.3,v=Math.max(v,p,7),c=Math.max(c,d,7)}var y=v/f,m=c/h;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(y,m))),S=gl(r.model),x=r.getExtent(),w=S.lastAutoInterval,b=S.lastTickCount;return w!=null&&b!=null&&Math.abs(w-_)<=1&&Math.abs(b-o)<=1&&w>_&&S.axisExtent0===x[0]&&S.axisExtent1===x[1]?_=w:(S.lastTickCount=o,S.lastAutoInterval=_,S.axisExtent0=x[0],S.axisExtent1=x[1]),_}function sV(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 HD(r,e,t){var a=Yo(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 h=ED(r),v=o.get("showMinLabel")||h,c=o.get("showMaxLabel")||h;v&&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})}return s}function WD(r,e,t){var a=r.scale,n=Yo(r),i=[];return D(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})}),i}var c1=[0,1],lV=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(e)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return DT(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(e),this.onBand&&n.type==="ordinal"&&(a=a.slice(),p1(a,n.count())),Lt(e,c1,a,t)},r.prototype.coordToData=function(e,t){var a=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(a=a.slice(),p1(a,n.count()));var i=Lt(e,a,c1,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=eV(this,t),n=a.ticks,i=F(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return uV(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=F(a,function(i){return F(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(){return tV(this).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(){return oV(this)},r}();function p1(r,e){var t=r[1]-r[0],a=e,n=t/a/2;r[0]+=n,r[1]-=n}function uV(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],o=e[1]={coord:i[1],tickValue:e[0].tickValue};else{var l=e[n-1].tickValue-e[0].tickValue,u=(e[n-1].coord-e[0].coord)/l;D(e,function(c){c.coord-=u/2});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},e.push(o)}var h=i[0]>i[1];v(e[0].coord,i[0])&&(a?e[0].coord=i[0]:e.shift()),a&&v(i[0],e[0].coord)&&e.unshift({coord:i[0]}),v(i[1],o.coord)&&(a?o.coord=i[1]:e.pop()),a&&v(o.coord,i[1])&&e.push({coord:i[1]});function v(c,p){return c=qt(c),p=qt(p),h?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]=h,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 $f(r,e,t,a,n,i,o,s){var l=n-r,u=i-e,f=t-r,h=a-e,v=Math.sqrt(f*f+h*h);f/=v,h/=v;var c=l*f+u*h,p=c/v;s&&(p=Math.min(Math.max(p,0),1)),p*=v;var d=o[0]=r+p*f,g=o[1]=e+p*h;return Math.sqrt((d-n)*(d-n)+(g-i)*(g-i))}function $D(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 Ar=[];function cV(r,e,t){var a=$D(e.x,e.y,e.width,e.height,r.x,r.y,Ar);return t.set(Ar[0],Ar[1]),a}function pV(r,e,t){for(var a=0,n=0,i=0,o=0,s,l,u=1/0,f=e.data,h=r.x,v=r.y,c=0;c0){e=e/180*Math.PI,Mr.fromArray(r[0]),Nt.fromArray(r[1]),Kt.fromArray(r[2]),ht.sub(Kr,Mr,Nt),ht.sub(Ur,Kt,Nt);var t=Kr.len(),a=Ur.len();if(!(t<.001||a<.001)){Kr.scale(1/t),Ur.scale(1/a);var n=Kr.dot(Ur),i=Math.cos(e);if(i1&&ht.copy(Ee,Kt),Ee.toArray(r[1])}}}}function dV(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,Mr.fromArray(r[0]),Nt.fromArray(r[1]),Kt.fromArray(r[2]),ht.sub(Kr,Nt,Mr),ht.sub(Ur,Kt,Nt);var a=Kr.len(),n=Ur.len();if(!(a<.001||n<.001)){Kr.scale(1/a),Ur.scale(1/n);var i=Kr.dot(e),o=Math.cos(t);if(i=l)ht.copy(Ee,Kt);else{Ee.scaleAndAdd(Ur,s/Math.tan(Math.PI/2-f));var h=Kt.x!==Nt.x?(Ee.x-Nt.x)/(Kt.x-Nt.x):(Ee.y-Nt.y)/(Kt.y-Nt.y);if(isNaN(h))return;h<0?ht.copy(Ee,Nt):h>1&&ht.copy(Ee,Kt)}Ee.toArray(r[1])}}}}function lc(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 gV(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=Xa(a[0],a[1]),i=Xa(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=Qu([],a[1],a[0],o/n),l=Qu([],a[1],a[2],o/i),u=Qu([],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&&i&&x(-f/o,0,o);var d=r[0],g=r[o-1],y,m;_(),y<0&&w(-y,.8),m<0&&w(m,.8),_(),S(y,m,1),S(m,y,-1),_(),y<0&&b(-y),m<0&&b(m);function _(){y=d.rect[e]-a,m=n-g.rect[e]-g.rect[t]}function S(T,C,A){if(T<0){var M=Math.min(C,-T);if(M>0){x(M*A,0,o);var L=M+T;L<0&&w(-L*A,1)}else w(-T*A,1)}}function x(T,C,A){T!==0&&(u=!0);for(var M=C;M0)for(var L=0;L0;L--){var E=A[L-1]*R;x(-E,L,o)}}}function b(T){var C=T<0?-1:1;T=Math.abs(T);for(var A=Math.ceil(T/(o-1)),M=0;M0?x(A,0,M+1):x(-A,o-M-1,o),T-=A,T<=0)return}return u}function yV(r,e,t,a){return ZD(r,"x","width",e,t,a)}function XD(r,e,t,a){return ZD(r,"y","height",e,t,a)}function qD(r){var e=[];r.sort(function(d,g){return g.priority-d.priority});var t=new vt(0,0,0,0);function a(d){if(!d.ignore){var g=d.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}d.ignore=!0}for(var n=0;n=0&&a.attr(i.oldLayoutSelect),pt(v,"emphasis")>=0&&a.attr(i.oldLayoutEmphasis)),At(a,u,t,l)}else if(a.attr(u),!Bo(a).valueAnimation){var h=lt(a.style.opacity,1);a.style.opacity=0,Gt(a,{style:{opacity:h}},t,l)}if(i.oldLayout=u,a.states.select){var c=i.oldLayoutSelect={};Du(c,u,Mu),Du(c,a.states.select,Mu)}if(a.states.emphasis){var p=i.oldLayoutEmphasis={};Du(p,u,Mu),Du(p,a.states.emphasis,Mu)}kC(a,l,f,t,t)}if(n&&!n.ignore&&!n.invisible){var i=SV(n),o=i.oldLayout,d={points:n.shape.points};o?(n.attr({shape:o}),At(n,{shape:d},t)):(n.setShape(d),n.style.strokePercent=0,Gt(n,{style:{strokePercent:1}},t)),i.oldLayout=d}},r}();const wV=xV;var fc=St();function bV(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){var n=fc(t).labelManager;n||(n=fc(t).labelManager=new wV),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,a){var n=fc(t).labelManager;a.updatedSeries.forEach(function(i){n.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}var hc=Math.sin,vc=Math.cos,KD=Math.PI,Hn=Math.PI*2,TV=180/KD,CV=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,h=Math.abs(u),v=Qa(h-Hn)||(f?u>=Hn:-u>=Hn),c=u>0?u%Hn:u%Hn+Hn,p=!1;v?p=!0:Qa(h)?p=!1:p=c>=KD==!!f;var d=e+a*vc(o),g=t+n*hc(o);this._start&&this._add("M",d,g);var y=Math.round(i*TV);if(v){var m=1/this._p,_=(f?1:-1)*(Hn-m);this._add("A",a,n,y,1,+f,e+a*vc(o+_),t+n*hc(o+_)),m>.01&&this._add("A",a,n,y,0,+f,d,g)}else{var S=e+a*vc(s),x=t+n*hc(s);this._add("A",a,n,y,+p,+f,S,x)}},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=[],h=this._p,v=1;v"}function kV(r){return""}function Cy(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 EV(o,s)+(o!=="style"?Ae(l):l||"")+(i?""+t+F(i,function(u){return a(u)}).join(t)+t:"")+kV(o)}return a(r)}function OV(r,e,t){t=t||{};var a=t.newline?` `:"",n=" {"+a,i=a+"}",o=F(mt(r),function(l){return l+n+F(mt(r[l]),function(u){return u+":"+r[l][u]+";"}).join(a)+i}).join(a),s=F(mt(e),function(l){return"@keyframes "+l+n+F(mt(e[l]),function(u){return u+n+F(mt(e[l][u]),function(f){var h=e[l][u][f];return f==="d"&&(h='path("'+h+'")'),f+":"+h+";"}).join(a)+i}).join(a)+i}).join(a);return!o&&!s?"":[""].join(a)}function Ad(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function m1(r,e,t,a){return se("svg","root",{width:r,height:e,xmlns:jD,"xmlns:xlink":QD,version:"1.1",baseProfile:"full",viewBox:a?"0 0 "+r+" "+e:!1},t)}var NV=0;function eM(){return NV++}var _1={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"},Un="transform-origin";function BV(r,e,t){var a=z({},r.shape);z(a,e),r.buildPath(t,a);var n=new JD;return n.reset(gT(r)),t.rebuildPath(n,1),n.generateStr(),n.getStr()}function VV(r,e){var t=e.originX,a=e.originY;(t||a)&&(r[Un]=t+"px "+a+"px")}var zV={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function rM(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function GV(r,e,t){var a=r.shape.paths,n={},i,o;if(D(a,function(l){var u=Ad(t.zrId);u.animation=!0,Uh(l,{},u,!0);var f=u.cssAnims,h=u.cssNodes,v=mt(f),c=v.length;if(!!c){o=v[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 h){var m=h[y].animation;m.indexOf(o)>=0&&(i=m)}}}),!!i){e.d=!1;var s=rM(n,t);return i.replace(o,s)}}function S1(r){return Y(r)?_1[r]?"cubic-bezier("+_1[r]+")":Cg(r)?r:"":""}function Uh(r,e,t,a){var n=r.animators,i=n.length,o=[];if(r instanceof Wg){var s=GV(r,e,t);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u0}).length){var Xt=rM(b,t);return Xt+" "+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-"+eM();t.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function FV(r,e,t){if(!r.ignore)if(r.isSilent()){var a={"pointer-events":"none"};x1(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=Vp(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),x1(a,e,t,!0)}}function x1(r,e,t,a){var n=JSON.stringify(r),i=t.cssStyleCache[n];i||(i=t.zrId+"-cls-"+eM(),t.cssStyleCache[n]=i,t.cssNodes["."+i+(a?":hover":"")]=r),e.class=e.class?e.class+" "+i:i}var yl=Math.round;function aM(r){return r&&Y(r.src)}function nM(r){return r&&Q(r.toDataURL)}function Ay(r,e,t,a){IV(function(n,i){var o=n==="fill"||n==="stroke";o&&dT(i)?oM(e,r,n,a):o&&Ag(i)?sM(t,r,n,a):r[n]=i,o&&a.ssr&&i==="none"&&(r["pointer-events"]="visible")},e,t,!1),XV(t,r,a)}function Dy(r,e){var t=dR(e);t&&(t.each(function(a,n){a!=null&&(r[(y1+n).toLowerCase()]=a+"")}),e.isSilent()&&(r[y1+"silent"]="true"))}function w1(r){return Qa(r[0]-1)&&Qa(r[1])&&Qa(r[2])&&Qa(r[3]-1)}function HV(r){return Qa(r[4])&&Qa(r[5])}function My(r,e,t){if(e&&!(HV(e)&&w1(e))){var a=t?10:1e4;r.transform=w1(e)?"translate("+yl(e[4]*a)/a+" "+yl(e[5]*a)/a+")":OP(e)}}function b1(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.";Oe(v,g),Oe(c,g)}else if(v==null||c==null){var y=function(A,M){if(A){var L=A.elm,I=v||M.width,P=c||M.height;A.tag==="pattern"&&(u?(P=1,I/=i.width):f&&(I=1,P/=i.height)),A.attrs.width=I,A.attrs.height=P,L&&(L.setAttribute("width",I),L.setAttribute("height",P))}},m=Eg(p,null,r,function(A){l||y(w,A),y(h,A)});m&&m.width&&m.height&&(v=v||m.width,c=c||m.height)}h=se("image","img",{href:p,width:v,height:c}),o.width=v,o.height=c}else n.svgElement&&(h=nt(n.svgElement),o.width=n.svgWidth,o.height=n.svgHeight);if(!!h){var _,S;l?_=S=1:u?(S=1,_=o.width/i.width):f?(_=1,S=o.height/i.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),S!=null&&!isNaN(S)&&(o.height=S);var x=yT(n);x&&(o.patternTransform=x);var w=se("pattern","",o,[h]),b=Cy(w),T=a.patternCache,C=T[b];C||(C=a.zrId+"-p"+a.patternIdx++,T[b]=C,o.id=C,w=a.defs[C]=se("pattern",C,o,[h])),e[t]=yh(C)}}function qV(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]=se("clipPath",i,o,[iM(r,t)])}e["clip-path"]=yh(i)}function A1(r){return document.createTextNode(r)}function jn(r,e,t){r.insertBefore(e,t)}function D1(r,e){r.removeChild(e)}function M1(r,e){r.appendChild(e)}function lM(r){return r.parentNode}function uM(r){return r.nextSibling}function cc(r,e){r.textContent=e}var L1=58,KV=120,JV=se("","");function Dd(r){return r===void 0}function Hr(r){return r!==void 0}function jV(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 Is(r,e){var t=r.key===e.key,a=r.tag===e.tag;return a&&t}function ml(r){var e,t=r.children,a=r.tag;if(Hr(a)){var n=r.elm=tM(a);if(Ly(JV,r),G(t))for(e=0;ei?(p=t[l+1]==null?null:t[l+1].elm,fM(r,p,t,n,l)):Yf(r,e,a,i))}function oo(r,e){var t=e.elm=r.elm,a=r.children,n=e.children;r!==e&&(Ly(r,e),Dd(e.text)?Hr(a)&&Hr(n)?a!==n&&QV(t,a,n):Hr(n)?(Hr(r.text)&&cc(t,""),fM(t,null,n,0,n.length-1)):Hr(a)?Yf(t,a,0,a.length-1):Hr(r.text)&&cc(t,""):r.text!==e.text&&(Hr(a)&&Yf(t,a,0,a.length-1),cc(t,e.text)))}function tz(r,e){if(Is(r,e))oo(r,e);else{var t=r.elm,a=lM(t);ml(e),a!==null&&(jn(a,e.elm,uM(t)),Yf(a,[r],0,0))}return e}var ez=0,rz=function(){function r(e,t,a){if(this.type="svg",this.refreshHover=I1(),this.configLayer=I1(),this.storage=t,this._opts=a=z({},a),this.root=e,this._id="zr"+ez++,this._oldVNode=m1(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=tM("svg");Ly(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",tz(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return C1(e,Ad(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),a=this._width,n=this._height,i=Ad(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=az(a,n,this._backgroundColor,i);s&&o.push(s);var l=e.compress?null:this._mainVNode=se("g","main",{},[]);this._paintList(t,i,l?l.children:o),l&&o.push(l);var u=F(mt(i.defs),function(v){return i.defs[v]});if(u.length&&o.push(se("defs","defs",{},u)),e.animation){var f=OV(i.cssNodes,i.cssAnims,{newline:!0});if(f){var h=se("style","stl",{},[],f);o.push(h)}}return m1(a,n,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},Cy(this.renderToVNode({animation:lt(e.cssAnimation,!0),emphasis:lt(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:lt(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&&!(v&&l&&v[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 h=this.__startIndex;h15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var A=c.dpr,M=0;M0&&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?Lu:0),this._needsManuallyCompositing),f.__builtin__||mg("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&qe&&!n.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(h,v){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__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,D(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var a=this._layerConfig;a[e]?ft(a[e],t,!0):a[e]=t;for(var n=0;n-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",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:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(Wt);const pz=cz;function Ao(r,e){var t=r.mapDimensionsAll("defaultedLabel"),a=t.length;if(a===1){var n=bo(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 dz=function(r){O(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){this.removeAll();var s=ee(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),s.drift=gz,this._symbolType=t,this.add(s)},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(){wa(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=o!==this._symbolType,f=i&&i.disableAnimation;if(u){var h=t.getItemVisual(a,"symbolKeepAspect");this._createSymbol(o,t,a,l,h)}else{var v=this.childAt(0);v.silent=!1;var c={scaleX:l[0]/2,scaleY:l[1]/2};f?v.attr(c):At(v,c,s,a),Rr(v)}if(this._updateCommon(t,a,l,n,i),u){var v=this.childAt(0);if(!f){var c={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,Gt(v,c,s,a)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,a,n,i,o){var s=this.childAt(0),l=t.hostModel,u,f,h,v,c,p,d,g,y;if(i&&(u=i.emphasisItemStyle,f=i.blurItemStyle,h=i.selectItemStyle,v=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(),h=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),v=_.get("focus"),c=_.get("blurScope"),p=_.get("disabled"),d=le(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var S=t.getItemVisual(a,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var x=Pi(t.getItemVisual(a,"symbolOffset"),n);x&&(s.x=x[0],s.y=x[1]),y&&s.attr("cursor",y);var w=t.getItemVisual(a,"style"),b=w.fill;if(s instanceof Se){var T=s.style;s.useStyle(z({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},w))}else s.__isEmptyBrush?s.useStyle(z({},w)):s.useStyle(w),s.style.decal=null,s.setColor(b,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=t.getItemVisual(a,"liftZ"),A=this._z2;C!=null?A==null&&(this._z2=s.z2,s.z2+=C):A!=null&&(s.z2=A,this._z2=null);var M=o&&o.useNameLabel;_e(s,d,{labelFetcher:l,labelDataIndex:a,defaultText:L,inheritColor:b,defaultOpacity:w.opacity});function L(R){return M?t.getName(R):Ao(t,R)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var I=s.ensureState("emphasis");I.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=f;var P=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;I.scaleX=this._sizeX*P,I.scaleY=this._sizeY*P,this.setSymbolScale(1),Ut(this,v,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=ot(this).dataIndex,s=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var l=i.getTextContent();l&&fn(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();fn(i,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,a){return Uo(t.getItemVisual(a,"symbolSize"))},e}(it);function gz(r,e){this.parent.drift(r,e)}const zl=dz;function dc(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 E1(r){return r!=null&&!at(r)&&(r={isIgnore:r}),r||{}}function k1(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:le(e),cursorStyle:e.get("cursor")}}var yz=function(){function r(e){this.group=new it,this._SymbolCtor=e||zl}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=E1(t);var a=this.group,n=e.hostModel,i=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=k1(e),u={disableAnimation:s},f=t.getSymbolPoint||function(h){return e.getItemLayout(h)};i||a.removeAll(),e.diff(i).add(function(h){var v=f(h);if(dc(e,v,h,t)){var c=new o(e,h,l,u);c.setPosition(v),e.setItemGraphicEl(h,c),a.add(c)}}).update(function(h,v){var c=i.getItemGraphicEl(v),p=f(h);if(!dc(e,p,h,t)){a.remove(c);return}var d=e.getItemVisual(h,"symbol")||"circle",g=c&&c.getSymbolType&&c.getSymbolType();if(!c||g&&g!==d)a.remove(c),c=new o(e,h,l,u),c.setPosition(p);else{c.updateData(e,h,l,u);var y={x:p[0],y:p[1]};s?c.attr(y):At(c,y,n)}a.add(c),e.setItemGraphicEl(h,c)}).remove(function(h){var v=i.getItemGraphicEl(h);v&&v.fadeOut(function(){a.remove(v)},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=k1(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,a){this._progressiveEls=[],a=E1(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 cM(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 _z(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 Sz(r,e,t,a,n,i,o,s){for(var l=_z(r,e),u=[],f=[],h=[],v=[],c=[],p=[],d=[],g=vM(n,e,o),y=r.getLayout("points")||[],m=e.getLayout("points")||[],_=0;_=n||d<0)break;if(gi(y,m)){if(l){d+=i;continue}break}if(d===t)r[i>0?"moveTo":"lineTo"](y,m),h=y,v=m;else{var _=y-u,S=m-f;if(_*_+S*S<.5){d+=i;continue}if(o>0){for(var x=d+i,w=e[x*2],b=e[x*2+1];w===y&&b===m&&g=a||gi(w,b))c=y,p=m;else{A=w-u,M=b-f;var P=y-u,R=w-y,E=m-f,N=b-m,k=void 0,B=void 0;if(s==="x"){k=Math.abs(P),B=Math.abs(R);var V=A>0?1:-1;c=y-V*k*o,p=m,L=y+V*B*o,I=m}else if(s==="y"){k=Math.abs(E),B=Math.abs(N);var H=M>0?1:-1;c=y,p=m-H*k*o,L=y,I=m+H*B*o}else k=Math.sqrt(P*P+E*E),B=Math.sqrt(R*R+N*N),C=B/(B+k),c=y-A*o*(1-C),p=m-M*o*(1-C),L=y+A*o*C,I=m+M*o*C,L=Ba(L,Va(w,y)),I=Ba(I,Va(b,m)),L=Va(L,Ba(w,y)),I=Va(I,Ba(b,m)),A=L-y,M=I-m,c=y-A*k/B,p=m-M*k/B,c=Ba(c,Va(u,y)),p=Ba(p,Va(f,m)),c=Va(c,Ba(u,y)),p=Va(p,Ba(f,m)),A=y-c,M=m-p,L=y+A*B/k,I=m+M*B/k}r.bezierCurveTo(h,v,c,p,y,m),h=L,v=I}else r.lineTo(y,m)}u=y,f=m,d+=i}return g}var pM=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),xz=function(r){O(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:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new pM},e.prototype.buildPath=function(t,a){var n=a.points,i=0,o=n.length/2;if(a.connectNulls){for(;o>0&&gi(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[h++],p=i[h++],d=i[h++],g=i[h++],y=i[h++],m=i[h++];var x=u?xf(s,c,d,y,t,f):xf(l,p,g,m,t,f);if(x>0)for(var w=0;w=0){var S=u?oe(l,p,g,m,b):oe(s,c,d,y,b);return u?[t,S]:[S,t]}}s=y,l=m;break}}},e}(yt),wz=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(pM),dM=function(r){O(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 wz},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&&gi(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 Cz(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=F(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,h=i.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),h.reverse());var v=Tz(u,n==="x"?t.getWidth():t.getHeight()),c=v.length;if(!c&&f)return u[0].coord<0?h[1]?h[1]:u[f-1].color:h[0]?h[0]:u[0].color;var p=10,d=v[0].coord-p,g=v[c-1].coord+p,y=g-d;if(y<.001)return"transparent";D(v,function(_){_.offset=(_.coord-d)/y}),v.push({offset:c?v[c-1].offset:.5,color:h[1]||"transparent"}),v.unshift({offset:c?v[0].offset:.5,color:h[0]||"transparent"});var m=new mr(0,0,0,0,v,!0);return m[n]=d,m[n+"2"]=g,m}}}function Az(r,e,t){var a=r.get("showAllSymbol"),n=a==="auto";if(!(a&&!n)){var i=t.getAxesByScale("ordinal")[0];if(!!i&&!(n&&Dz(i,e))){var o=e.mapDimension(i.dim),s={};return D(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function Dz(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 Mz(r,e){return isNaN(r)||isNaN(e)}function Lz(r){for(var e=r.length/2;e>0&&Mz(r[e*2-2],r[e*2-1]);e--);return e-1}function z1(r,e){return[r[e*2],r[e*2+1]]}function Iz(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 mM(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var B=p.getState("emphasis").style;B.lineWidth=+p.style.lineWidth+1}ot(p).seriesIndex=t.seriesIndex,Ut(p,E,N,k);var V=V1(t.get("smooth")),H=t.get("smoothMonotone");if(p.setShape({smooth:V,smoothMonotone:H,connectNulls:b}),d){var W=s.getCalculationInfo("stackedOnSeries"),K=0;d.useStyle(et(u.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),W&&(K=V1(W.get("smooth"))),d.setShape({smooth:V,stackedOnSmooth:K,smoothMonotone:H,connectNulls:b}),me(d,t,"areaStyle"),ot(d).seriesIndex=t.seriesIndex,Ut(d,E,N,k)}var Z=this._changePolyState;s.eachItemGraphicEl(function(tt){tt&&(tt.onHoverStateChange=Z)}),this._polyline.onHoverStateChange=Z,this._data=s,this._coordSys=i,this._stackedOnPoints=x,this._points=f,this._step=A,this._valueOrigin=_,t.get("triggerLineEvent")&&(this.packEventData(t,p),d&&this.packEventData(t,d))},e.prototype.packEventData=function(t,a){ot(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=Si(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],h=l[s*2+1];if(isNaN(f)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,h))return;var v=t.get("zlevel")||0,c=t.get("z")||0;u=new zl(o,s),u.x=f,u.y=h,u.setZ(v,c);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=v,p.z=c,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else zt.prototype.highlight.call(this,t,a,n,i)},e.prototype.downplay=function(t,a,n,i){var o=t.getData(),s=Si(o,i);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else zt.prototype.downplay.call(this,t,a,n,i)},e.prototype._changePolyState=function(t){var a=this._polygon;Mf(this._polyline,t),a&&Mf(a,t)},e.prototype._newPolyline=function(t){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new xz({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 dM({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");Q(f)&&(f=f(null));var h=u.get("animationDelay")||0,v=Q(h)?h(null):h;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,x=a.pointToCoord(g);i?(y=S.startAngle,m=S.endAngle,_=-x[1]/180*Math.PI):(y=S.r0,m=S.r,_=x[0])}else{var w=n;i?(y=w.x,m=w.x+w.width,_=c.x):(y=w.y+w.height,m=w.y,_=c.y)}var b=m===y?0:(_-y)/(m-y);l&&(b=1-b);var T=Q(h)?h(p):f*b+v,C=d.getSymbolPath(),A=C.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),A&&A.animateFrom({style:{opacity:0}},{duration:300,delay:T}),C.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,a,n){var i=t.getModel("endLabel");if(mM(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 Tt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=Lz(l);f>=0&&(_e(s,le(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:f,defaultText:function(h,v,c){return c!=null?hM(o,c):Ao(o,h)},enableTextSetter:!0},Pz(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 h=n.getLayout("points"),v=n.hostModel,c=v.get("connectNulls"),p=s.get("precision"),d=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=a.shape,S=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,x=(y?d:0)*(m?-1:1),w=(y?0:-d)*(m?-1:1),b=y?"x":"y",T=Iz(h,S,b),C=T.range,A=C[1]-C[0],M=void 0;if(A>=1){if(A>1&&!c){var L=z1(h,C[0]);u.attr({x:L[0]+x,y:L[1]+w}),o&&(M=v.getRawValue(C[0]))}else{var L=f.getPointOn(S,b);L&&u.attr({x:L[0]+x,y:L[1]+w});var I=v.getRawValue(C[0]),P=v.getRawValue(C[1]);o&&(M=VT(n,p,I,P,T.t))}i.lastFrameIndex=C[0]}else{var R=t===1||i.lastFrameIndex>0?C[0]:0,L=z1(h,R);o&&(M=v.getRawValue(R)),u.attr({x:L[0]+x,y:L[1]+w})}if(o){var E=Bo(u);typeof E.setLabelText=="function"&&E.setLabelText(M)}}},e.prototype._doUpdateAnimation=function(t,a,n,i,o,s,l){var u=this._polyline,f=this._polygon,h=t.hostModel,v=Sz(this._data,t,this._stackedOnPoints,a,this._coordSys,n,this._valueOrigin),c=v.current,p=v.stackedOnCurrent,d=v.next,g=v.stackedOnNext;if(o&&(p=za(v.stackedOnCurrent,v.current,n,o,l),c=za(v.current,null,n,o,l),g=za(v.stackedOnNext,v.next,n,o,l),d=za(v.next,null,n,o,l)),B1(c,d)>3e3||f&&B1(p,g)>3e3){u.stopAnimation(),u.setShape({points:d}),f&&(f.stopAnimation(),f.setShape({points:d,stackedOnPoints:g}));return}u.shape.__points=v.current,u.shape.points=c;var y={shape:{points:d}};v.current!==c&&(y.shape.__points=v.next),u.stopAnimation(),At(u,y,h),f&&(f.setShape({points:c,stackedOnPoints:p}),f.stopAnimation(),At(f,{shape:{stackedOnPoints:g}},h),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var m=[],_=v.status,S=0;S<_.length;S++){var x=_[S].cmd;if(x==="="){var w=t.getItemGraphicEl(_[S].idx1);w&&m.push({el:w,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var b=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(),h=a.getDevicePixelRatio(),v=Math.abs(f[1]-f[0])*(h||1),c=Math.round(s/v);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;Y(i)?p=kz[i]:Q(i)&&(p=i),p&&e.setData(n.downSample(n.mapDimension(u.dim),1/c,p,Oz))}}}}}function Nz(r){r.registerChartView(Ez),r.registerSeriesModel(pz),r.registerLayout(Hl("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,_M("line"))}var SM=function(r){O(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 Ma(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)D(i.getAxes(),function(v,c){if(v.type==="category"&&a!=null){var p=v.getTicksCoords(),d=v.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]=v.toGlobalCoord(v.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,S=1,x=0;xg){_=(w+m)/2;break}x===1&&(S=b-p[0].tickValue)}_==null&&(m?m&&(_=p[p.length-1].coord):_=p[0].coord),s[c]=v.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),h=i.getBaseAxis().isHorizontal()?0:1;s[h]+=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"},e}(Wt);Wt.registerClass(SM);const Zf=SM;var Bz=function(r){O(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 Ma(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=_n(Zf.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:"#212121"}},realtimeSort:!1}),e}(Zf);const Vz=Bz;var zz=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}(),Gz=function(r){O(e,r);function e(t){var a=r.call(this,t)||this;return a.type="sausage",a}return e.prototype.getDefaultShape=function(){return new zz},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,h=a.endAngle,v=a.clockwise,c=Math.PI*2,p=v?h-fMath.PI/2&&fs)return!0;s=h}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){ul(i,t,ot(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}(zt),G1={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=yc(e.x,r.x),s=mc(e.x+e.width,n),l=yc(e.y,r.y),u=mc(e.y+e.height,i),f=sn?s:o,e.y=h&&l>i?u:l,e.width=f?0:s-o,e.height=h?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height),f||h},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=mc(e.r,r.r),i=yc(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}},F1={cartesian2d:function(r,e,t,a,n,i,o,s,l){var u=new xt({shape:z({},a),z2:1});if(u.__dataIndex=t,u.name="item",i){var f=u.shape,h=n?"height":"width";f[h]=0}return u},polar:function(r,e,t,a,n,i,o,s,l){var u=!n&&l?Xf:$e,f=new u({shape:a,z2:1});f.name="item";var h=xM(n);if(f.calculateTextPosition=Fz(h,{isRoundCap:u===Xf}),i){var v=f.shape,c=n?"r":"endAngle",p={};v[c]=n?a.r0:a.startAngle,p[c]=a[c],(s?At:Gt)(f,{shape:p},i)}return f}};function Uz(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 H1(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?At:Gt)(t,{shape:l},e,n,null);var f=e?r.baseAxis.model:null;(o?At:Gt)(t,{shape:u},f,n)}function W1(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 Xz(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function xM(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 U1(r,e,t,a,n,i,o,s){var l=e.getItemVisual(t,"style");if(s){if(!i.get("roundCap")){var f=r.shape,h=li(a.getModel("itemStyle"),f,!0);z(f,h),r.setShape(f)}}else{var u=a.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var v=a.getShallow("cursor");v&&r.attr("cursor",v);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=le(a);_e(r,p,{labelFetcher:i,labelDataIndex:t,defaultText:Ao(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,Hz(r,g==="outside"?c:g,xM(o),a.get(["label","rotate"]))}EC(d,p,i.getRawValue(t),function(m){return hM(e,m)});var y=a.getModel(["emphasis"]);Ut(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),me(r,a),Xz(n)&&(r.style.fill="none",r.style.stroke="none",D(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function qz(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 Kz=function(){function r(){}return r}(),Y1=function(r){O(e,r);function e(t){var a=r.call(this,t)||this;return a.type="largeBar",a}return e.prototype.getDefaultShape=function(){return new Kz},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 Jz(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,h=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 wM(r,e,t){if(Ei(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 jz(r,e,t){var a=r.type==="polar"?$e:xt;return new a({shape:wM(e,t,r),silent:!0,z2:0})}const Qz=$z;function t3(r){r.registerChartView(Qz),r.registerSeriesModel(Vz),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ut(TD,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,CD("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,_M("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 q1=Math.PI*2,Eu=Math.PI/180;function bM(r,e){return ne(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function TM(r,e){var t=bM(r,e),a=r.get("center"),n=r.get("radius");G(n)||(n=[0,n]);var i=$(t.width,e.getWidth()),o=$(t.height,e.getHeight()),s=Math.min(i,o),l=$(n[0],s/2),u=$(n[1],s/2),f,h,v=r.coordinateSystem;if(v){var c=v.dataToPoint(a);f=c[0]||0,h=c[1]||0}else G(a)||(a=[a,a]),f=$(a[0],i)+t.x,h=$(a[1],o)+t.y;return{cx:f,cy:h,r0:l,r:u}}function e3(r,e,t){e.eachSeriesByType(r,function(a){var n=a.getData(),i=n.mapDimension("value"),o=bM(a,t),s=TM(a,t),l=s.cx,u=s.cy,f=s.r,h=s.r0,v=-a.get("startAngle")*Eu,c=a.get("endAngle"),p=a.get("padAngle")*Eu;c=c==="auto"?v-q1:-c*Eu;var d=a.get("minAngle")*Eu,g=d+p,y=0;n.each(i,function(N){!isNaN(N)&&y++});var m=n.getSum(i),_=Math.PI/(m||y)*2,S=a.get("clockwise"),x=a.get("roseType"),w=a.get("stillShowZeroSum"),b=n.getDataExtent(i);b[0]=0;var T=S?1:-1,C=[v,c],A=T*p/2;kg(C,!S),v=C[0],c=C[1];var M=CM(a);M.startAngle=v,M.endAngle=c,M.clockwise=S;var L=Math.abs(c-v),I=L,P=0,R=v;if(n.setLayout({viewRect:o,r:f}),n.each(i,function(N,k){var B;if(isNaN(N)){n.setItemLayout(k,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:l,cy:u,r0:h,r:x?NaN:f});return}x!=="area"?B=m===0&&w?_:N*_:B=L/y,BB?(H=R+T*B/2,W=H):(H=R+A,W=V-A),n.setItemLayout(k,{angle:B,startAngle:H,endAngle:W,clockwise:S,cx:l,cy:u,r0:h,r:x?Lt(N,b,[h,f]):f}),R=V}),It?y:g,x=Math.abs(_.label.y-t);if(x>=S.maxY){var w=_.label.x-e-_.len2*n,b=a+_.len,T=Math.abs(w)r.unconstrainedWidth?null:c:null;a.setStyle("width",p)}var d=a.getBoundingRect();i.width=d.width;var g=(a.style.margin||0)+2.1;i.height=d.height+g,i.y-=(i.height-h)/2}}}function _c(r){return r.position==="center"}function n3(r){var e=r.getData(),t=[],a,n,i=!1,o=(r.get("minShowLabelAngle")||0)*r3,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,f=s.x,h=s.y,v=s.height;function c(w){w.ignore=!0}function p(w){if(!w.ignore)return!0;for(var b in w.states)if(w.states[b].ignore===!1)return!0;return!1}e.each(function(w){var b=e.getItemGraphicEl(w),T=b.shape,C=b.getTextContent(),A=b.getTextGuideLine(),M=e.getItemModel(w),L=M.getModel("label"),I=L.get("position")||M.get(["emphasis","label","position"]),P=L.get("distanceToLabelLine"),R=L.get("alignTo"),E=$(L.get("edgeDistance"),u),N=L.get("bleedMargin"),k=M.getModel("labelLine"),B=k.get("length");B=$(B,u);var V=k.get("length2");if(V=$(V,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":W>0?"left":"right"}var Et=Math.PI,Ft=0,ie=L.get("rotate");if(Ct(ie))Ft=ie*(Et/180);else if(I==="center")Ft=0;else if(ie==="radial"||ie===!0){var Ze=W<0?-H+Et:-H;Ft=Ze}else if(ie==="tangential"&&I!=="outside"&&I!=="outer"){var Be=Math.atan2(W,K);Be<0&&(Be=Et*2+Be);var Sn=K>0;Sn&&(Be=Et+Be),Ft=Be-Et}if(i=!!Ft,C.x=Z,C.y=tt,C.rotation=Ft,C.setStyle({verticalAlign:"middle"}),ct){C.setStyle({align:Xt});var Qh=C.states.select;Qh&&(Qh.x+=C.x,Qh.y+=C.y)}else{var Ia=C.getBoundingRect().clone();Ia.applyTransform(C.getComputedTransform());var Lm=(C.style.margin||0)+2.1;Ia.y-=Lm/2,Ia.height+=Lm,t.push({label:C,labelLine:A,position:I,len:B,len2:V,minTurnAngle:k.get("minTurnAngle"),maxSurfaceAngle:k.get("maxSurfaceAngle"),surfaceNormal:new ht(W,K),linePoints:Pt,textAlign:Xt,labelDistance:P,labelAlignTo:R,edgeDistance:E,bleedMargin:N,rect:Ia,unconstrainedWidth:Ia.width,labelStyleWidth:C.style.width})}b.setTextConfig({inside:ct})}}),!i&&r.get("avoidLabelOverlap")&&a3(t,a,n,l,u,v,f,h);for(var d=0;d0){for(var f=o.getItemLayout(0),h=1;isNaN(f&&f.startAngle)&&h=i.r0}},e.type="pie",e}(zt);const s3=o3;function Zo(r,e,t){e=G(e)&&{coordDimensions:e}||z({encodeDefine:r.getEncode()},e);var a=r.getSource(),n=Bl(a,e).dimensions,i=new ke(n,r);return i.initData(a,t),i}var l3=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 $l=l3;var u3=St(),f3=function(r){O(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 $l(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 Zo(this,{coordDimensions:["value"],encodeDefaulter:ut(ty,this)})},e.prototype.getDataParams=function(t){var a=this.getData(),n=u3(a),i=n.seats;if(!i){var o=[];a.each(a.mapDimension("value"),function(l){o.push(l)}),i=n.seats=_R(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){_i(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,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,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}(Wt);const h3=f3;function v3(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!(Ct(o)&&!isNaN(o)&&o<0)})}}}function c3(r){r.registerChartView(s3),r.registerSeriesModel(h3),FA("pie",r.registerAction),r.registerLayout(ut(e3,"pie")),r.registerProcessor(Wl("pie")),r.registerProcessor(v3("pie"))}var p3=function(r){O(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 Ma(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?1e4:this.get("progressiveThreshold"):t},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"],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:"#212121"}},universalTransition:{divideShape:"clone"}},e}(Wt);const d3=p3;var DM=4,g3=function(){function r(){}return r}(),y3=function(r){O(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 g3},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]=0;u--){var f=u*2,h=i[f]-s/2,v=i[f+1]-l/2;if(t>=h&&a>=v&&t<=h+s&&a<=v+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,h=-1/0,v=0;v=0&&(u.dataIndex=h+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}();const _3=m3;var S3=function(r){O(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=Hl("").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 _3:new Gl,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}(zt);const x3=S3;var w3=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(wt);const b3=w3;var Ld=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",te).models[0]},e.type="cartesian2dAxis",e}(wt);re(Ld,Vl);var MM={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:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},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},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},T3=ft({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},MM),Iy=ft({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},MM),C3=ft({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Iy),A3=et({logBase:10},Iy);const LM={category:T3,value:Iy,time:C3,log:A3};var D3={value:1,category:1,time:1,log:1};function Do(r,e,t,a){D(D3,function(n,i){var o=ft(ft({},LM[i],!0),a,!0),s=function(l){O(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,h){var v=hl(this),c=v?Go(f):{},p=h.getTheme();ft(f,p.get(i+"Axis")),ft(f,this.getDefaultOption()),f.type=J1(f),v&&hn(f,c,v)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=wd.createByAxisModel(this))},u.prototype.getCategories=function(f){var h=this.option;if(h.type==="category")return f?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+i,u.defaultOption=o,u}(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",J1)}function J1(r){return r.type||(r.data?"category":"value")}var M3=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 F(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Mt(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 L3=M3;var Id=["x","y"];function j1(r){return r.type==="interval"||r.type==="time"}var I3=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=Id,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,a=this.getAxis("y").scale;if(!(!j1(t)||!j1(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,h=(s[1]-o[1])/u,v=o[0]-n[0]*f,c=o[1]-i[0]*h,p=this._transform=[f,0,0,h,v,c];this._invTransform=Eo([],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 vt(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 de(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){var n=[];if(this._invTransform)return de(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 vt(i,o,s,l)},e}(L3),P3=function(r){O(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}(kr);const R3=P3;function Pd(r,e,t){t=t||{};var a=r.coordinateSystem,n=e.axis,i={},o=n.getAxesOnZeroOf()[0],s=n.position,l=o?"onZero":s,u=n.dim,f=a.getRect(),h=[f.x,f.x+f.width,f.y,f.y+f.height],v={left:0,right:1,top:0,bottom:1,onZero:2},c=e.get("offset")||0,p=u==="x"?[h[2]-c,h[3]+c]:[h[0]-c,h[1]+c];if(o){var d=o.toGlobalCoord(o.dataToCoord(0));p[v.onZero]=Math.max(Math.min(d,p[1]),p[0])}i.position=[u==="y"?p[v[l]]:h[0],u==="x"?p[v[l]]:h[3]],i.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=g[s],i.labelOffset=o?p[v[s]]-p[v.onZero]:0,e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),ve(t.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var y=e.get(["axisLabel","rotate"]);return i.labelRotate=l==="top"?-y:y,i.z2=1,i}function Q1(r){return r.get("coordinateSystem")==="cartesian2d"}function tS(r){var e={xAxisModel:null,yAxisModel:null};return D(e,function(t,a){var n=a.replace(/Model$/,""),i=r.getReferringComponents(n,te).models[0];e[a]=i}),e}var Sc=Math.log;function IM(r,e,t){var a=cn.prototype,n=a.getTicks.call(t),i=a.getTicks.call(t,!0),o=n.length-1,s=a.getInterval.call(t),l=RD(r,e),u=l.extent,f=l.fixMin,h=l.fixMax;if(r.type==="log"){var v=Sc(r.base);u=[Sc(u[0])/v,Sc(u[1])/v]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:h});var c=a.getExtent.call(r);f&&(u[0]=c[0]),h&&(u[1]=c[1]);var p=a.getInterval.call(r),d=u[0],g=u[1];if(f&&h)p=(g-d)/o;else if(f)for(g=u[0]+p*o;gu[0]&&isFinite(d)&&isFinite(u[0]);)p=ic(p),d=u[1]-p*o;else{var y=r.getTicks().length-1;y>o&&(p=ic(p));var m=p*o;g=Math.ceil(u[1]/p)*p,d=qt(g-m),d<0&&u[0]>=0?(d=0,g=qt(m)):g>0&&u[1]<=0&&(g=0,d=-qt(m))}var _=(n[0].value-i[0].value)/s,S=(n[o].value-i[o].value)/s;a.setExtent.call(r,d+p*_,g+p*S),a.setInterval.call(r,p),(_||S)&&a.setNiceExtent.call(r,d+p,g-p)}var E3=function(){function r(e,t,a){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Id,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=mt(o),u=l.length;if(!!u){for(var f=[],h=u-1;h>=0;h--){var v=+l[h],c=o[v],p=c.model,d=c.scale;bd(d)&&p.get("alignTicks")&&p.get("interval")==null?f.push(c):(Co(d,p),bd(d)&&(s=c))}f.length&&(s||(s=f.pop(),Co(s.scale,s.model)),D(f,function(g){IM(g.scale,g.model,s.scale)}))}}n(a.x),n(a.y);var i={};D(a.x,function(o){eS(a,"y",o,i)}),D(a.y,function(o){eS(a,"x",o,i)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,a){var n=e.getBoxLayoutParams(),i=!a&&e.get("containLabel"),o=ne(n,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),i&&(D(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=UB(u);if(f){var h=u.isHorizontal()?"height":"width",v=u.model.get(["axisLabel","margin"]);o[h]-=f[h]+v,u.position==="top"?o.y+=f.height+v:u.position==="left"&&(o.x+=f.width+v)}}}),l()),D(this._coordsList,function(u){u.calcAffineTransform()});function l(){D(s,function(u){var f=u.isHorizontal(),h=f?[0,o.width]:[0,o.height],v=u.inverse?1:0;u.setExtent(h[v],h[1-v]),k3(u,f?o.x:o.y)})}},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]}at(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var n=0,i=this._coordsList;n0?"top":"bottom",i="center"):nl(n-tn)?(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}(),aS={axisLine:function(r,e,t,a){var n=e.get(["axisLine","show"]);if(n==="auto"&&r.handleAutoShown&&(n=r.handleAutoShown("axisLine")),!!n){var i=e.axis.getExtent(),o=a.transform,s=[i[0],0],l=[i[1],0],u=s[0]>l[0];o&&(de(s,s,o),de(l,l,o));var f=z({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new ce({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:f,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});wo(h.shape,h.style.lineWidth),h.anid="line",t.add(h);var v=e.get(["axisLine","symbol"]);if(v!=null){var c=e.get(["axisLine","symbolSize"]);Y(v)&&(v=[v,v]),(Y(c)||Ct(c))&&(c=[c,c]);var p=Pi(e.get(["axisLine","symbolOffset"])||0,c),d=c[0],g=c[1];D([{rotate:r.rotation+Math.PI/2,offset:p[0],r:0},{rotate:r.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(y,m){if(v[m]!=="none"&&v[m]!=null){var _=ee(v[m],-d/2,-g/2,d,g,f.stroke,!0),S=y.r+y.offset,x=u?l:s;_.attr({rotation:y.rotate,x:x[0]+S*Math.cos(r.rotation),y:x[1]-S*Math.sin(r.rotation),silent:!0,z2:11}),t.add(_)}})}}},axisTickLabel:function(r,e,t,a){var n=V3(t,a,e,r),i=G3(t,a,e,r);if(B3(e,i,n),z3(t,a,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=YD(F(i,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));qD(o)}},axisName:function(r,e,t,a){var n=ve(r.axisName,e.get("name"));if(!!n){var i=e.get("nameLocation"),o=r.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),f=u[0]>u[1]?-1:1,h=[i==="start"?u[0]-f*l:i==="end"?u[1]+f*l:(u[0]+u[1])/2,iS(i)?r.labelOffset+o*l:0],v,c=e.get("nameRotate");c!=null&&(c=c*tn/180);var p;iS(i)?v=yi.innerTextLayout(r.rotation,c!=null?c:r.rotation,o):(v=N3(r.rotation,i,c||0,u),p=r.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(v.rotation)),!isFinite(p)&&(p=null)));var d=s.getFont(),g=e.get("nameTruncate",!0)||{},y=g.ellipsis,m=ve(r.nameTruncateMaxWidth,g.maxWidth,p),_=new Tt({x:h[0],y:h[1],rotation:v.rotation,silent:yi.isLabelSilent(e),style:Bt(s,{text:n,font:d,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||v.textAlign,verticalAlign:s.get("verticalAlign")||v.textVerticalAlign}),z2:1});if(Mi({el:_,componentModel:e,itemName:n}),_.__fullText=n,_.anid="name",e.get("triggerEvent")){var S=yi.makeAxisEventDataBase(e);S.targetType="axisName",S.name=n,ot(_).eventData=S}a.add(_),_.updateTransform(),t.add(_),_.decomposeTransform()}}};function N3(r,e,t,a){var n=MT(t-r),i,o,s=a[0]>a[1],l=e==="start"&&!s||e!=="start"&&s;return nl(n-tn/2)?(o=l?"bottom":"top",i="center"):nl(n-tn*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",ntn/2?i=l?"left":"right":i=l?"right":"left"),{rotation:n,textAlign:i,textVerticalAlign:o}}function B3(r,e,t){if(!ED(r.axis)){var a=r.get(["axisLabel","showMinLabel"]),n=r.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var i=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],f=t[1],h=t[t.length-1],v=t[t.length-2];a===!1?(er(i),er(u)):nS(i,o)&&(a?(er(o),er(f)):(er(i),er(u))),n===!1?(er(s),er(h)):nS(l,s)&&(n?(er(l),er(v)):(er(s),er(h)))}}function er(r){r&&(r.ignore=!0)}function nS(r,e){var t=r&&r.getBoundingRect().clone(),a=e&&e.getBoundingRect().clone();if(!(!t||!a)){var n=gh([]);return Di(n,n,-r.rotation),t.applyTransform(da([],n,r.getLocalTransform())),a.applyTransform(da([],n,e.getLocalTransform())),t.intersect(a)}}function iS(r){return r==="middle"||r==="center"}function PM(r,e,t,a,n){for(var i=[],o=[],s=[],l=0;l=0||r===e}function Y3(r){var e=Py(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=Rd(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&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var d=l;p.color!=null&&(d=et({color:p.color},l));var g=ft(nt(p),{boundaryGap:t,splitNumber:a,scale:n,axisLine:i,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:d,triggerEvent:v},!1);if(Y(f)){var y=g.name;g.name=f.replace("{value}",y!=null?y:"")}else Q(f)&&(g.name=f(g.name,g));var m=new Vt(g,null,this.ecModel);return re(m,Vl.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:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:ft({lineStyle:{color:"#bbb"}},cs.axisLine),axisLabel:ku(cs.axisLabel,!1),axisTick:ku(cs.axisTick,!1),splitLine:ku(cs.splitLine,!0),splitArea:ku(cs.splitArea,!0),indicator:[]},e}(wt);const lG=sG;var uG=["axisLine","axisTickLabel","axisName"],fG=function(r){O(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),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var a=t.coordinateSystem,n=a.getIndicatorAxes(),i=F(n,function(o){var s=o.model.get("showName")?o.name:"",l=new Ca(o.model,{axisName:s,position:[a.cx,a.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});D(i,function(o){D(uG,o.add,o),this.group.add(o.getGroup())},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"),h=s.get("show"),v=l.get("color"),c=u.get("color"),p=G(v)?v:[v],d=G(c)?c:[c],g=[],y=[];function m(R,E,N){var k=N%E.length;return R[k]=R[k]||[],k}if(i==="circle")for(var _=n[0].getTicksCoords(),S=a.cx,x=a.cy,w=0;w<_.length;w++){if(f){var b=m(g,p,w);g[b].push(new yn({shape:{cx:S,cy:x,r:_[w].coord}}))}if(h&&w<_.length-1){var b=m(y,d,w);y[b].push(new Ch({shape:{cx:S,cy:x,r0:_[w].coord,r:_[w+1].coord}}))}}else for(var T,C=F(n,function(R,E){var N=R.getTicksCoords();return T=T==null?N.length-1:Math.min(N.length-1,T),F(N,function(k){return a.coordToPoint(k.coord,E)})}),A=[],w=0;w<=T;w++){for(var M=[],L=0;L3?1.4:o>1?1.2:1.1,f=i>0?u:1/u;bc(this,"zoom","zoomOnMouseWheel",t,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(n){var h=Math.abs(i),v=(i>0?1:-1)*(h>3?.4:h>1?.15:.05);bc(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:v,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!hS(this._zr,"globalPan")){var a=t.pinchScale>1?1.1:1/1.1;bc(this,"zoom",null,t,{scale:a,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(yr);function bc(r,e,t,a,n){r.pointerChecker&&r.pointerChecker(a,n.originX,n.originY)&&(Sa(a.event),BM(r,e,t,a,n))}function BM(r,e,t,a,n){n.isAvailableBehavior=X(pf,null,t,a),r.trigger(e,n)}function pf(r,e,t){var a=t[r];return!r||a&&(!Y(a)||e.event[a+"Key"])}const Ul=SG;function Ey(r,e,t){var a=r.target;a.x+=e,a.y+=t,a.dirty()}function ky(r,e,t,a){var n=r.target,i=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=e,i){var s=i.min||0,l=i.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,n.x-=(t-n.x)*(u-1),n.y-=(a-n.y)*(u-1),n.scaleX*=u,n.scaleY*=u,n.dirty()}var xG={axisPointer:1,tooltip:1,brush:1};function Yh(r,e,t){var a=e.getComponentByElement(r.topTarget),n=a&&a.coordinateSystem;return a&&a!==t&&!xG.hasOwnProperty(a.mainType)&&n&&n.model!==t}function VM(r){if(Y(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var Tc,qf={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},vS=mt(qf),Kf={"alignment-baseline":"textBaseline","stop-color":"stopColor"},cS=mt(Kf),wG=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var a=VM(e);this._defsUsePending=[];var n=new it;this._root=n;var i=[],o=a.getAttribute("viewBox")||"",s=parseFloat(a.getAttribute("width")||t.width),l=parseFloat(a.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),Xe(a,n,null,!0,!1);for(var u=a.firstChild;u;)this._parseNode(u,n,i,null,!1,!1),u=u.nextSibling;CG(this._defs,this._defsUsePending),this._defsUsePending=[];var f,h;if(o){var v=Zh(o);v.length>=4&&(f={x:parseFloat(v[0]||0),y:parseFloat(v[1]||0),width:parseFloat(v[2]),height:parseFloat(v[3])})}if(f&&s!=null&&l!=null&&(h=GM(f,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var c=n;n=new it,n.add(c),c.scaleX=c.scaleY=h.scale,c.x=h.x,c.y=h.y}return!t.ignoreRootClip&&s!=null&&l!=null&&n.setClipPath(new xt({shape:{x:0,y:0,width:s,height:l}})),{root:n,width:s,height:l,viewBoxRect:f,viewBoxTransform:h,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=Tc[s];if(f&&q(Tc,s)){l=f.call(this,e,t);var h=e.getAttribute("name");if(h){var v={name:h,namedFrom:null,svgNodeTagLower:s,el:l};a.push(v),s==="g"&&(u=v)}else n&&a.push({name:n.name,namedFrom:n,svgNodeTagLower:s,el:l});t.add(l)}}var c=pS[s];if(c&&q(pS,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 ol({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});rr(t,a),Xe(e,a,this._defsUsePending,!1,!1),bG(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(){Tc={g:function(e,t){var a=new it;return rr(t,a),Xe(e,a,this._defsUsePending,!1,!1),a},rect:function(e,t){var a=new xt;return rr(t,a),Xe(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 yn;return rr(t,a),Xe(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 ce;return rr(t,a),Xe(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 Fg;return rr(t,a),Xe(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=yS(a));var i=new Ue({shape:{points:n||[]},silent:!0});return rr(t,i),Xe(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var a=e.getAttribute("points"),n;a&&(n=yS(a));var i=new Ye({shape:{points:n||[]},silent:!0});return rr(t,i),Xe(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var a=new Se;return rr(t,a),Xe(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 it;return rr(t,s),Xe(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 it;return rr(t,s),Xe(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=cC(a);return rr(t,n),Xe(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}}(),r}(),pS={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 mr(e,t,a,n);return dS(r,i),gS(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 $g(e,t,a);return dS(r,n),gS(r,n),n}};function dS(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function gS(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={};zM(t,i,i);var o=i.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:n,color:o})}t=t.nextSibling}}function rr(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),et(e.__inheritedStyle,r.__inheritedStyle))}function yS(r){for(var e=Zh(r),t=[],a=0;a0;i-=2){var o=a[i],s=a[i-1],l=Zh(o);switch(n=n||Je(),s){case"translate":ta(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Tg(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Di(n,n,-parseFloat(l[0])*Cc,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Cc);da(n,[1,0,u,1,0,0],n);break;case"skewY":var f=Math.tan(parseFloat(l[0])*Cc);da(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 _S=/([^\s:;]+)\s*:\s*([^:;]+)/g;function zM(r,e,t){var a=r.getAttribute("style");if(!!a){_S.lastIndex=0;for(var n;(n=_S.exec(a))!=null;){var i=n[1],o=q(qf,i)?qf[i]:null;o&&(e[o]=n[2]);var s=q(Kf,i)?Kf[i]:null;s&&(t[s]=n[2])}}}function LG(r,e,t){for(var a=0;a0,g={api:a,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw:v};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(e,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 h(c){for(var p=[],d=!u&&l&&l.project,g=0;g=0)&&(v=n);var c=o?{normal:{align:"center",verticalAlign:"middle"}}:null;_e(e,le(a),{labelFetcher:v,labelDataIndex:h,defaultText:t},c);var p=e.getTextContent();if(p&&(FM(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 TS(r,e,t,a,n,i){r.data?r.data.setItemGraphicEl(i,e):ot(e).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:t,region:a&&a.option||{}}}function CS(r,e,t,a,n){r.data||Mi({el:e,componentModel:n,itemName:t,itemTooltipOption:a.get("tooltip")})}function AS(r,e,t,a,n){e.highDownSilentOnTouch=!!n.get("selectedMode");var i=a.getModel("emphasis"),o=i.get("focus");return Ut(e,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&XE(e,n,t),o}function DS(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(),D(r,function(l){s.lineStart();for(var u=0;u-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",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:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(Wt);const JG=KG;function jG(r,e){var t={};return D(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?(S.width=_,S.height=_/g):(S.height=_,S.width=_*g),S.y=m[1]-S.height/2,S.x=m[0]-S.width/2;else{var x=r.getBoxLayoutParams();x.aspect=g,S=ne(x,{width:p,height:d})}this.setViewRect(S.x,S.y,S.width,S.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function aF(r,e){D(e.get("geoCoord"),function(t,a){r.addGeoCoord(a,t)})}var nF=function(){function r(){this.dimensions=WM}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 PS(l+s,l,z({nameMap:o.get("nameMap")},n(o)));u.zoomLimit=o.get("scaleLimit"),a.push(u),o.coordinateSystem=u,u.model=o,u.resize=RS,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=a[l]}});var i={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),D(i,function(o,s){var l=F(o,function(f){return f.get("nameMap")}),u=new PS(s,s,z({nameMap:_g(l)},n(o[0])));u.zoomLimit=ve.apply(null,F(o,function(f){return f.get("scaleLimit")})),a.push(u),u.resize=RS,u.resize(o[0],t),D(o,function(f){f.coordinateSystem=u,aF(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 cF(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){gF(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=yF(r,n,r.parentNode.hierNode.defaultAncestor||a[0],e)}function pF(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function kS(r){return arguments.length?r:SF}function Ps(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function dF(r,e){return ne(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function gF(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 yF(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,h=s.hierNode.modifier;s=Ac(s),i=Dc(i),s&&i;){n=Ac(n),o=Dc(o),n.hierNode.ancestor=r;var v=s.hierNode.prelim+h-i.hierNode.prelim-u+a(s,i);v>0&&(_F(mF(s,r,t),r,v),u+=v,l+=v),h+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=n.hierNode.modifier,f+=o.hierNode.modifier}s&&!Ac(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=h-l),i&&!Dc(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-f,t=r)}return t}function Ac(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function Dc(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function mF(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function _F(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 SF(r,e){return r.parentNode===e.parentNode?1:2}var xF=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),wF=function(r){O(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new xF},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,h=1-f,v=$(a.forkPosition,1),c=[];c[f]=o[f],c[h]=o[h]+(l[h]-o[h])*v,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,x||(S=S-Math.PI));var b=x?"left":"right",T=s.getModel("label"),C=T.get("rotate"),A=C*(Math.PI/180),M=g.getTextContent();M&&(g.setTextConfig({position:T.get("position")||b,rotation:C==null?-S:A,origin:"center"}),M.setStyle("verticalAlign","middle"))}var L=s.get(["emphasis","focus"]),I=L==="relative"?tl(o.getAncestorsIndices(),o.getDescendantIndices()):L==="ancestor"?o.getAncestorsIndices():L==="descendant"?o.getDescendantIndices():null;I&&(ot(t).focus=I),TF(n,o,f,t,p,c,d,a),t.__edge&&(t.onHoverStateChange=function(P){if(P!=="blur"){var R=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);R&&R.hoverState===Rl||Mf(t.__edge,P)}})}function TF(r,e,t,a,n,i,o,s){var l=e.getModel(),u=r.get("edgeShape"),f=r.get("layout"),h=r.getOrient(),v=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:Od(f,h,v,n,n)})),At(d,{shape:Od(f,h,v,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(Y(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 KM(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function zy(r,e){var t=KM(r);return pt(t,e)>=0}function Xh(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 OF=function(r){O(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 Vt(n,this,this.ecModel),o=Vy.createTree(a,this,s);function s(h){h.wrapMethod("getItemModel",function(v,c){var p=o.getNodeByDataIndex(c);return p&&p.children.length&&p.isExpand||(v.parentModel=i),v})}var l=0;o.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=t.expandAndCollapse,f=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(h){var v=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=v&&v.collapsed!=null?!v.collapsed:h.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 ue("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=Xh(n,this),a.collapsed=!n.isExpand,a},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Wt);const NF=OF;function BF(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 VF(r,e){r.eachSeriesByType("tree",function(t){zF(t,e)})}function zF(r,e){var t=dF(r,e);r.layoutInfo=t;var a=r.get("layout"),n=0,i=0,o=null;a==="radial"?(n=2*Math.PI,i=Math.min(t.height,t.width)/2,o=kS(function(_,S){return(_.parentNode===S.parentNode?1:2)/_.depth})):(n=t.width,i=t.height,o=kS());var s=r.getData().tree.root,l=s.children[0];if(l){vF(s),BF(l,cF,o),s.hierNode.modifier=-l.hierNode.prelim,ds(l,pF);var u=l,f=l,h=l;ds(l,function(_){var S=_.getLayout().x;Sf.getLayout().x&&(f=_),_.depth>h.depth&&(h=_)});var v=u===f?1:o(u,f)/2,c=v-u.getLayout().x,p=0,d=0,g=0,y=0;if(a==="radial")p=n/(f.getLayout().x+v+c),d=i/(h.depth-1||1),ds(l,function(_){g=(_.getLayout().x+c)*p,y=(_.depth-1)*d;var S=Ps(g,y);_.setLayout({x:S.x,y:S.y,rawX:g,rawY:y},!0)});else{var m=r.getOrient();m==="RL"||m==="LR"?(d=i/(f.getLayout().x+v+c),p=n/(h.depth-1||1),ds(l,function(_){y=(_.getLayout().x+c)*d,g=m==="LR"?(_.depth-1)*p:n-(_.depth-1)*p,_.setLayout({x:g,y},!0)})):(m==="TB"||m==="BT")&&(p=n/(f.getLayout().x+v+c),d=i/(h.depth-1||1),ds(l,function(_){g=(_.getLayout().x+c)*p,y=m==="TB"?(_.depth-1)*d:i-(_.depth-1)*d,_.setLayout({x:g,y},!0)}))}}}function GF(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");z(s,o)})})}function FF(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=Ny(i,e,void 0,a);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}function HF(r){r.registerChartView(CF),r.registerSeriesModel(NF),r.registerLayout(VF),r.registerVisual(GF),FF(r)}var zS=["treemapZoomToNode","treemapRender","treemapMove"];function WF(r){for(var e=0;e1;)i=i.parentNode;var o=fd(r.ecModel,i.name||i.dataIndex+"",a);n.setVisual("decal",o)})}var $F=function(r){O(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};jM(n);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new Vt({itemStyle:o},this,a);i=t.levels=UF(i,a);var l=F(i||[],function(h){return new Vt(h,s,a)},this),u=Vy.createTree(n,this,f);function f(h){h.wrapMethod("getItemModel",function(v,c){var p=u.getNodeByDataIndex(c),d=p?l[p.depth]:null;return v.parentModel=d||s,v})}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 ue("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=Xh(n,this),a.treePathInfo=a.treeAncestors,a},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},z(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(){JM(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",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:"#fff",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}(Wt);function jM(r){var e=0;D(r.children,function(a){jM(a);var n=a.value;G(n)&&(n=n[0]),e+=n});var t=r.value;G(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),G(r.value)?r.value[0]=t:r.value=t}function UF(r,e){var t=Rt(e.get("color")),a=Rt(e.get(["aria","decal","decals"]));if(!!t){r=r||[];var n,i;D(r,function(s){var l=new Vt(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 YF=$F;var ZF=8,GS=8,Mc=5,XF=function(){function r(e){this.group=new it,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"]),h={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(a,h,u),this._renderContent(e,h,s,l,u,f,n),Oh(o,h.pos,h.box)}},r.prototype._prepare=function(e,t,a){for(var n=e;n;n=n.parentNode){var i=ae(n.getModel().get("name"),""),o=a.getTextRect(i),s=Math.max(o.width+ZF*2,t.emptyItemWidth);t.totalWidth+=s+GS,t.renderList.push({node:n,text:i,width:s})}},r.prototype._renderContent=function(e,t,a,n,i,o,s){for(var l=0,u=t.emptyItemWidth,f=e.get(["breadcrumb","height"]),h=aO(t.pos,t.box),v=t.totalWidth,c=t.renderList,p=n.getModel("itemStyle").getItemStyle(),d=c.length-1;d>=0;d--){var g=c[d],y=g.node,m=g.width,_=g.text;v>h.width&&(v-=m-u,m=u,_=null);var S=new Ue({shape:{points:qF(l,0,m,f,d===c.length-1,d===0)},style:et(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new Tt({style:Bt(i,{text:_})}),textConfig:{position:"inside"},z2:Oo*1e4,onclick:ut(s,y)});S.disableLabelAnimation=!0,S.getTextContent().ensureState("emphasis").style=Bt(o,{text:_}),S.ensureState("emphasis").style=p,Ut(S,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(S),KF(S,e,y),l+=m+GS}},r.prototype.remove=function(){this.group.removeAll()},r}();function qF(r,e,t,a,n,i){var o=[[n?r:r-Mc,e],[r+t,e],[r+t,e+a],[n?r:r-Mc,e+a]];return!i&&o.splice(2,0,[r+t+Mc,e+a/2]),!n&&o.push([r,e+a/2]),o}function KF(r,e,t){ot(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&&Xh(t,e)}}const JF=XF;var jF=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;nHS||Math.abs(t.dy)>HS)){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 vt(s.x,s.y,s.width,s.height),u=null,f=this._controllerHost;u=f.zoomLimit;var h=f.zoom=f.zoom||1;if(h*=i,u){var v=u.min||0,c=u.max||1/0;h=Math.max(Math.min(c,h),v)}var p=h/f.zoom;f.zoom=h;var d=this.seriesModel.layoutInfo;a-=d.x,n-=d.y;var g=Je();ta(g,g,[-a,-n]),Tg(g,g,[p,p]),ta(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&&kf(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 JF(this.group))).render(t,a,n.node,function(o){i._state!=="animating"&&(zy(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=gs(),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}(zt);function gs(){return{nodeGroup:[],background:[],content:[]}}function n4(r,e,t,a,n,i,o,s,l,u){if(!o)return;var f=o.getLayout(),h=r.getData(),v=o.getModel();if(h.setItemGraphicEl(o.dataIndex,null),!f||!f.isInView)return;var c=f.width,p=f.height,d=f.borderWidth,g=f.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,S=f.upperHeight,x=_&&_.length,w=v.getModel("itemStyle"),b=v.getModel(["emphasis","itemStyle"]),T=v.getModel(["blur","itemStyle"]),C=v.getModel(["select","itemStyle"]),A=w.get("borderRadius")||0,M=tt("nodeGroup",Nd);if(!M)return;if(l.add(M),M.x=f.x||0,M.y=f.y||0,M.markRedraw(),Jf(M).nodeWidth=c,Jf(M).nodeHeight=p,f.isAboveViewRoot)return M;var L=tt("background",FS,u,e4);L&&V(M,L,x&&f.upperLabelHeight);var I=v.getModel("emphasis"),P=I.get("focus"),R=I.get("blurScope"),E=I.get("disabled"),N=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(x)ll(M)&&ai(M,!1),L&&(ai(L,!E),h.setItemGraphicEl(o.dataIndex,L),rd(L,N,R));else{var k=tt("content",FS,u,r4);k&&H(M,k),L.disableMorphing=!0,L&&ll(L)&&ai(L,!1),ai(M,!E),h.setItemGraphicEl(o.dataIndex,M);var B=v.getShallow("cursor");B&&k.attr("cursor",B),rd(M,N,R)}return M;function V(ct,rt,dt){var j=ot(rt);if(j.dataIndex=o.dataIndex,j.seriesIndex=r.seriesIndex,rt.setShape({x:0,y:0,width:c,height:p,r:A}),g)W(rt);else{rt.invisible=!1;var st=o.getVisual("style"),Ot=st.stroke,It=US(w);It.fill=Ot;var Et=Zn(b);Et.fill=b.get("borderColor");var Ft=Zn(T);Ft.fill=T.get("borderColor");var ie=Zn(C);if(ie.fill=C.get("borderColor"),dt){var Ze=c-2*d;K(rt,Ot,st.opacity,{x:d,y:0,width:Ze,height:S})}else rt.removeTextContent();rt.setStyle(It),rt.ensureState("emphasis").style=Et,rt.ensureState("blur").style=Ft,rt.ensureState("select").style=ie,wi(rt)}ct.add(rt)}function H(ct,rt){var dt=ot(rt);dt.dataIndex=o.dataIndex,dt.seriesIndex=r.seriesIndex;var j=Math.max(c-2*d,0),st=Math.max(p-2*d,0);if(rt.culling=!0,rt.setShape({x:d,y:d,width:j,height:st,r:A}),g)W(rt);else{rt.invisible=!1;var Ot=o.getVisual("style"),It=Ot.fill,Et=US(w);Et.fill=It,Et.decal=Ot.decal;var Ft=Zn(b),ie=Zn(T),Ze=Zn(C);K(rt,It,Ot.opacity,null),rt.setStyle(Et),rt.ensureState("emphasis").style=Ft,rt.ensureState("blur").style=ie,rt.ensureState("select").style=Ze,wi(rt)}ct.add(rt)}function W(ct){!ct.invisible&&i.push(ct)}function K(ct,rt,dt,j){var st=v.getModel(j?$S:WS),Ot=ae(v.get("name"),null),It=st.getShallow("show");_e(ct,le(v,j?$S:WS),{defaultText:It?Ot:null,inheritColor:rt,defaultOpacity:dt,labelFetcher:r,labelDataIndex:o.dataIndex});var Et=ct.getTextContent();if(!!Et){var Ft=Et.style,ie=xg(Ft.padding||0);j&&(ct.setTextConfig({layoutRect:j}),Et.disableLabelLayout=!0),Et.beforeUpdate=function(){var Be=Math.max((j?j.width:ct.shape.width)-ie[1]-ie[3],0),Sn=Math.max((j?j.height:ct.shape.height)-ie[0]-ie[2],0);(Ft.width!==Be||Ft.height!==Sn)&&Et.setStyle({width:Be,height:Sn})},Ft.truncateMinChar=2,Ft.lineOverflow="truncate",Z(Ft,j,f);var Ze=Et.getState("emphasis");Z(Ze?Ze.style:null,j,f)}}function Z(ct,rt,dt){var j=ct?ct.text:null;if(!rt&&dt.isLeafRoot&&j!=null){var st=r.get("drillDownIcon",!0);ct.text=st?st+" "+j:j}}function tt(ct,rt,dt,j){var st=m!=null&&t[ct][m],Ot=n[ct];return st?(t[ct][m]=null,Pt(Ot,st)):g||(st=new rt,st instanceof gr&&(st.z2=i4(dt,j)),Xt(Ot,st)),e[ct][y]=st}function Pt(ct,rt){var dt=ct[y]={};rt instanceof Nd?(dt.oldX=rt.x,dt.oldY=rt.y):dt.oldShape=z({},rt.shape)}function Xt(ct,rt){var dt=ct[y]={},j=o.parentNode,st=rt instanceof it;if(j&&(!a||a.direction==="drillDown")){var Ot=0,It=0,Et=n.background[j.getRawIndex()];!a&&Et&&Et.oldShape&&(Ot=Et.oldShape.width,It=Et.oldShape.height),st?(dt.oldX=0,dt.oldY=It):dt.oldShape={x:Ot,y:It,width:0,height:0}}dt.fadein=!st}}function i4(r,e){return r*t4+e}const o4=a4;var xl=D,s4=at,jf=-1,Gy=function(){function r(e){var t=e.mappingMethod,a=e.type,n=this.option=nt(e);this.type=a,this.mappingMethod=t,this._normalizeData=f4[t];var i=r.visualHandlers[a];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[t],t==="piecewise"?(Lc(n),l4(n)):t==="category"?n.categories?u4(n):Lc(n,!0):(Oe(t!=="linear"||n.dataExtent),Lc(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 mt(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,a){at(e)?D(e,t,a):t.call(a,e)},r.mapVisual=function(e,t,a){var n,i=G(e)?[]:at(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&&xl(r.visualHandlers,function(n,i){e.hasOwnProperty(i)&&(t[i]=e[i],a=!0)}),a?t:null},r.prepareVisualTypes=function(e){if(G(e))e=e.slice();else if(s4(e)){var t=[];xl(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 Lc(r,e){var t=r.visual,a=[];at(t)?xl(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]),QM(r,a)}function Nu(r){return{applyVisual:function(e,t,a){var n=this.mapValueToVisual(e);a("color",r(t("color"),n))},_normalizedToVisual:Bd([0,1])}}function YS(r){var e=this.option.visual;return e[Math.round(Lt(r,[0,1],[0,e.length-1],!0))]||{}}function ys(r){return function(e,t,a){a(r,this.mapValueToVisual(e))}}function Rs(r){var e=this.option.visual;return e[this.option.loop&&r!==jf?r%e.length:r]}function Xn(){return this.option.visual[0]}function Bd(r){return{linear:function(e){return Lt(e,r,this.option.visual,!0)},category:Rs,piecewise:function(e,t){var a=Vd.call(this,t);return a==null&&(a=Lt(e,r,this.option.visual,!0)),a},fixed:Xn}}function Vd(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var a=Gy.findPieceIndex(r,t),n=t[a];if(n&&n.visual)return n.visual[this.type]}}function QM(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=F(e,function(t){var a=je(t);return a||[0,0,0,1]})),e}var f4={linear:function(r){return Lt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=Gy.findPieceIndex(r,e,!0);if(t!=null)return Lt(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e==null?jf:e},fixed:jt};function Bu(r,e,t){return r?e<=t:e=t.length||d===t[d.depth]){var y=g4(n,l,d,g,p,a);e2(d,y,t,a)}})}}}function c4(r,e,t){var a=z({},e),n=t.designatedVisualItemStyle;return D(["color","colorAlpha","colorSaturation"],function(i){n[i]=e[i];var o=r.get(i);n[i]=null,o!=null&&(a[i]=o)}),a}function ZS(r){var e=Ic(r,"color");if(e){var t=Ic(r,"colorAlpha"),a=Ic(r,"colorSaturation");return a&&(e=Ns(e,null,null,a)),t&&(e=wf(e,t)),e}}function p4(r,e){return e!=null?Ns(e,null,null,r):null}function Ic(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function d4(r,e,t,a,n,i){if(!(!i||!i.length)){var o=Pc(e,"color")||n.color!=null&&n.color!=="none"&&(Pc(e,"colorAlpha")||Pc(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"),h={type:o.name,dataExtent:u,visual:o.range};h.type==="color"&&(f==="index"||f==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var v=new ge(h);return t2(v).drColorMappingBy=f,v}}}function Pc(r,e){var t=r.get(e);return G(t)&&t.length?{name:e,range:t}:null}function g4(r,e,t,a,n,i){var o=z({},e);if(n){var s=n.type,l=s==="color"&&t2(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 wl=Math.max,Qf=Math.min,XS=ve,Fy=D,r2=["itemStyle","borderWidth"],y4=["itemStyle","gapWidth"],m4=["upperLabel","show"],_4=["upperLabel","height"];const S4={seriesType:"treemap",reset:function(r,e,t,a){var n=t.getWidth(),i=t.getHeight(),o=r.option,s=ne(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=$(XS(s.width,l[0]),n),f=$(XS(s.height,l[1]),i),h=a&&a.type,v=["treemapZoomToNode","treemapRootToNode"],c=Sl(a,v,r),p=h==="treemapRender"||h==="treemapMove"?a.rootRect:null,d=r.getViewRoot(),g=KM(d);if(h!=="treemapMove"){var y=h==="treemapZoomToNode"?A4(r,c,d,u,f):p?[p.width,p.height]:[u,f],m=o.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var _={squareRatio:o.squareRatio,sort:m,leafDepth:o.leafDepth};d.hostTree.clearLayouts();var S={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};d.setLayout(S),a2(d,_,!1,0),S=d.getLayout(),Fy(g,function(w,b){var T=(g[b+1]||d).getValue();w.setLayout(z({dataExtent:[T,T],borderWidth:0,upperHeight:0},S))})}var x=r.getData().tree.root;x.setLayout(D4(s,p,c),!0),r.setLayoutInfo(s),n2(x,new vt(-s.x,-s.y,n,i),g,d,0)}};function a2(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(r2),u=s.get(y4)/2,f=i2(s),h=Math.max(l,f),v=l-u,c=h-u;r.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:f},!0),n=wl(n-2*v,0),i=wl(i-v-c,0);var p=n*i,d=x4(r,s,p,e,t,a);if(!!d.length){var g={x:v,y:c,width:n,height:i},y=Qf(n,i),m=1/0,_=[];_.area=0;for(var S=0,x=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 C4(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?wl(u*a/l,l/(u*n)):1/0}function qS(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 h=0,v=r.length;ho0&&(u=o0),i=s}ua&&(a=e);var i=a%2?a+2:a+3;n=[];for(var o=0;o0&&(x[0]=-x[0],x[1]=-x[1]);var b=S[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var T=-Math.atan2(S[1],S[0]);h[0].8?"left":v[0]<-.8?"right":"center",d=v[1]>.8?"top":v[1]<-.8?"bottom":"middle";break;case"start":i.x=-v[0]*y+f[0],i.y=-v[1]*m+f[1],p=v[0]>.8?"right":v[0]<-.8?"left":"center",d=v[1]>.8?"bottom":v[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=y*b+f[0],i.y=f[1]+C,p=S[0]<0?"right":"left",i.originX=-y*b,i.originY=-C;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=w[0],i.y=w[1]+C,p="center",i.originY=-C;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*b+h[0],i.y=h[1]+C,p=S[0]>=0?"right":"left",i.originX=y*b,i.originY=-C;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||p})}},e}(it);const Uy=Y4;var Z4=function(){function r(e){this.group=new it,this._LineCtor=e||Uy}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=ex(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=ex(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function a(s){!s.isGroup&&!X4(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n0}function ex(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:le(e)}}function rx(r){return isNaN(r[0])||isNaN(r[1])}function Nc(r){return r&&!rx(r[0])&&!rx(r[1])}const Yy=Z4;var Bc=[],Vc=[],zc=[],Ji=he,Gc=ui,ax=Math.abs;function nx(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){Bc[0]=Ji(a[0],n[0],i[0],f),Bc[1]=Ji(a[1],n[1],i[1],f);var h=ax(Gc(Bc,e)-l);h=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function Fc(r,e){var t=[],a=el,n=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),f=s.getVisual("fromSymbol"),h=s.getVisual("toSymbol");u.__original||(u.__original=[pa(u[0]),pa(u[1])],u[2]&&u.__original.push(pa(u[2])));var v=u.__original;if(u[2]!=null){if(Pe(n[0],v[0]),Pe(n[1],v[2]),Pe(n[2],v[1]),f&&f!=="none"){var c=ks(s.node1),p=nx(n,v[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(h&&h!=="none"){var c=ks(s.node2),p=nx(n,v[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]}Pe(u[0],n[0]),Pe(u[1],n[2]),Pe(u[2],n[1])}else{if(Pe(i[0],v[0]),Pe(i[1],v[1]),ei(o,i[1],i[0]),Ro(o,o),f&&f!=="none"){var c=ks(s.node1);Ap(i[0],i[0],o,c*e)}if(h&&h!=="none"){var c=ks(s.node2);Ap(i[1],i[1],o,-c*e)}Pe(u[0],i[0]),Pe(u[1],i[1])}})}function ix(r){return r.type==="view"}var q4=function(r){O(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 Gl,i=new Yy,o=this.group;this._controller=new Ul(a.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,a,n){var i=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(ix(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(f):At(u,f,t)}Fc(t.getGraph(),Es(t));var h=t.getData();s.updateData(h);var v=t.getEdgeData();l.updateData(v),this._updateNodeAndLinkScale(),this._updateController(t,a,n),clearTimeout(this._layoutTimeout);var c=t.forceLayout,p=t.get(["force","layoutAnimation"]);c&&this._startForceLayoutIteration(c,p);var d=t.get("layout");h.graph.eachNode(function(_){var S=_.dataIndex,x=_.getGraphicEl(),w=_.getModel();if(!!x){x.off("drag").off("dragend");var b=w.get("draggable");b&&x.on("drag",function(C){switch(d){case"force":c.warmUp(),!i._layouting&&i._startForceLayoutIteration(c,p),c.setFixed(S),h.setItemLayout(S,[x.x,x.y]);break;case"circular":h.setItemLayout(S,[x.x,x.y]),_.setLayout({fixed:!0},!0),$y(t,"symbolSize",_,[C.offsetX,C.offsetY]),i.updateLayout(t);break;case"none":default:h.setItemLayout(S,[x.x,x.y]),Wy(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){c&&c.setUnfixed(S)}),x.setDraggable(b,!!w.get("cursor"));var T=w.get(["emphasis","focus"]);T==="adjacency"&&(ot(x).focus=_.getAdjacentDataIndices())}}),h.graph.eachEdge(function(_){var S=_.getGraphicEl(),x=_.getModel().get(["emphasis","focus"]);!S||x==="adjacency"&&(ot(S).focus={edge:[_.dataIndex],node:[_.node1.dataIndex,_.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),y=h.getLayout("cx"),m=h.getLayout("cy");h.graph.eachNode(function(_){u2(_,g,y,m)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,a){var n=this;(function i(){t.step(function(o){n.updateLayout(n._model),(n._layouting=!o)&&(a?n._layoutTimeout=setTimeout(i,16):i())})})()},e.prototype._updateController=function(t,a,n){var i=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,f,h){var v=l.getBoundingRect();return v.applyTransform(l.transform),v.contain(f,h)&&!Yh(u,n,t)}),!ix(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){Ey(s,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){ky(s,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(),Fc(t.getGraph(),Es(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,a=t.getData(),n=Es(t);a.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},e.prototype.updateLayout=function(t){Fc(t.getGraph(),Es(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(zt);const K4=q4;function ji(r){return"_EC_"+r}var J4=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var a=this._nodesMap;if(!a[ji(e)]){var n=new qn(e,t);return n.hostGraph=this,this.nodes.push(n),a[ji(e)]=n,n}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[ji(e)]},r.prototype.addEdge=function(e,t,a){var n=this._nodesMap,i=this._edgesMap;if(Ct(e)&&(e=this.nodes[e]),Ct(t)&&(t=this.nodes[t]),e instanceof qn||(e=n[ji(e)]),t instanceof qn||(t=n[ji(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new h2(e,t,a);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),i[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof qn&&(e=e.id),t instanceof qn&&(t=t.id);var a=this._edgesMap;return this._directed?a[e+"-"+t]:a[e+"-"+t]||a[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var a=this.nodes,n=a.length,i=0;i=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 qn||(t=this._nodesMap[ji(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&&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)}}}re(qn,v2("hostGraph","data"));re(h2,v2("hostGraph","edgeData"));const j4=J4;function c2(r,e,t,a,n){for(var i=new j4(a),o=0;o "+v)),u++)}var c=t.get("coordinateSystem"),p;if(c==="cartesian2d"||c==="polar")p=Ma(r,t);else{var d=Ol.get(c),g=d?d.dimensions||[]:[];pt(g,"value")<0&&g.concat(["value"]);var y=Bl(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;p=new ke(y,t),p.initData(r)}var m=new ke(["value"],t);return m.initData(l,s),n&&n(p,m),XM({mainData:p,struct:i,structAttr:"graph",datas:{node:p,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var Q4=function(r){O(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 $l(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),_i(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){k4(this);var s=c2(i,n,this,!0,l);return D(s.edges,function(u){O4(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 h=Vt.prototype.getModel;function v(p,d){var g=h.call(this,p,d);return g.resolveParentPath=c,g}f.wrapMethod("getItemModel",function(p){return p.resolveParentPath=c,p.getModel=v,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),ue("nameValue",{name:f.join(" > "),value:o.value,noValue:o.value==null})}var h=PA({series:this,dataIndex:t,multipleSeries:a});return h},e.prototype._updateCategoriesData=function(){var t=F(this.option.categories||[],function(n){return n.value!=null?n:z({value:0},n)}),a=new ke(["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:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Wt);const tH=Q4;var eH={type:"graphRoam",event:"graphRoam",update:"none"};function rH(r){r.registerChartView(K4),r.registerSeriesModel(tH),r.registerProcessor(L4),r.registerVisual(I4),r.registerVisual(P4),r.registerLayout(N4),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,V4),r.registerLayout(G4),r.registerCoordinateSystem("graphView",{dimensions:Yl.dimensions,create:H4}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},jt),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},jt),r.registerAction(eH,function(e,t,a){t.eachComponent({mainType:"series",query:e},function(n){var i=n.coordinateSystem,o=Ny(i,e,void 0,a);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}var aH=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),nH=function(r){O(e,r);function e(t){var a=r.call(this,t)||this;return a.type="pointer",a}return e.prototype.getDefaultShape=function(){return new aH},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}(yt);const iH=nH;function oH(r,e){var t=r.get("center"),a=e.getWidth(),n=e.getHeight(),i=Math.min(a,n),o=$(t[0],e.getWidth()),s=$(t[1],e.getHeight()),l=$(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function zu(r,e){var t=r==null?"":r+"";return e&&(Y(e)?t=e.replace("{value}",t):Q(e)&&(t=e(r))),t}var sH=function(r){O(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=oH(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,h=t.getModel("axisLine"),v=h.get("roundCap"),c=v?Xf:$e,p=h.get("show"),d=h.getModel("lineStyle"),g=d.get("width"),y=[u,f];kg(y,!l),u=y[0],f=y[1];for(var m=f-u,_=u,S=[],x=0;p&&x=C&&(A===0?0:i[A-1][0])Math.PI/2&&(Z+=Math.PI)):K==="tangential"?Z=-T-Math.PI/2:Ct(K)&&(Z=K*Math.PI/180),Z===0?h.add(new Tt({style:Bt(_,{text:B,x:H,y:W,verticalAlign:R<-.8?"top":R>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:V}),silent:!0})):h.add(new Tt({style:Bt(_,{text:B,x:H,y:W,verticalAlign:"middle",align:"center"},{inheritColor:V}),silent:!0,originX:H,originY:W,rotation:Z}))}if(m.get("show")&&E!==S){var N=m.get("distance");N=N?N+f:f;for(var tt=0;tt<=x;tt++){P=Math.cos(T),R=Math.sin(T);var Pt=new ce({shape:{x1:P*(p-N)+v,y1:R*(p-N)+c,x2:P*(p-b-N)+v,y2:R*(p-b-N)+c},silent:!0,style:L});L.stroke==="auto"&&Pt.setStyle({stroke:i((E+tt/x)/S)}),h.add(Pt),T+=A}T-=A}else T+=C}},e.prototype._renderPointer=function(t,a,n,i,o,s,l,u,f){var h=this.group,v=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"),x=+t.get("max"),w=[S,x],b=[s,l];function T(A,M){var L=m.getItemModel(A),I=L.getModel("pointer"),P=$(I.get("width"),o.r),R=$(I.get("length"),o.r),E=t.get(["pointer","icon"]),N=I.get("offsetCenter"),k=$(N[0],o.r),B=$(N[1],o.r),V=I.get("keepAspect"),H;return E?H=ee(E,k-P/2,B-R,P,R,null,V):H=new iH({shape:{angle:-Math.PI/2,width:P,r:R,x:k,y:B}}),H.rotation=-(M+Math.PI/2),H.x=o.cx,H.y=o.cy,H}function C(A,M){var L=g.get("roundCap"),I=L?Xf:$e,P=g.get("overlap"),R=P?g.get("width"):f/m.count(),E=P?o.r-R:o.r-(A+1)*R,N=P?o.r:o.r-A*R,k=new I({shape:{startAngle:s,endAngle:M,cx:o.cx,cy:o.cy,clockwise:u,r0:E,r:N}});return P&&(k.z2=Lt(m.get(_,A),[S,x],[100,0],!0)),k}(y||d)&&(m.diff(v).add(function(A){var M=m.get(_,A);if(d){var L=T(A,s);Gt(L,{rotation:-((isNaN(+M)?b[0]:Lt(M,w,b,!0))+Math.PI/2)},t),h.add(L),m.setItemGraphicEl(A,L)}if(y){var I=C(A,s),P=g.get("clip");Gt(I,{shape:{endAngle:Lt(M,w,b,P)}},t),h.add(I),Qp(t.seriesIndex,m.dataType,A,I),p[A]=I}}).update(function(A,M){var L=m.get(_,A);if(d){var I=v.getItemGraphicEl(M),P=I?I.rotation:s,R=T(A,P);R.rotation=P,At(R,{rotation:-((isNaN(+L)?b[0]:Lt(L,w,b,!0))+Math.PI/2)},t),h.add(R),m.setItemGraphicEl(A,R)}if(y){var E=c[M],N=E?E.shape.endAngle:s,k=C(A,N),B=g.get("clip");At(k,{shape:{endAngle:Lt(L,w,b,B)}},t),h.add(k),Qp(t.seriesIndex,m.dataType,A,k),p[A]=k}}).execute(),m.each(function(A){var M=m.getItemModel(A),L=M.getModel("emphasis"),I=L.get("focus"),P=L.get("blurScope"),R=L.get("disabled");if(d){var E=m.getItemGraphicEl(A),N=m.getItemVisual(A,"style"),k=N.fill;if(E instanceof Se){var B=E.style;E.useStyle(z({image:B.image,x:B.x,y:B.y,width:B.width,height:B.height},N))}else E.useStyle(N),E.type!=="pointer"&&E.setColor(k);E.setStyle(M.getModel(["pointer","itemStyle"]).getItemStyle()),E.style.fill==="auto"&&E.setStyle("fill",i(Lt(m.get(_,A),w,[0,1],!0))),E.z2EmphasisLift=0,me(E,M),Ut(E,I,P,R)}if(y){var V=p[A];V.useStyle(m.getItemVisual(A,"style")),V.setStyle(M.getModel(["progress","itemStyle"]).getItemStyle()),V.z2EmphasisLift=0,me(V,M),Ut(V,I,P,R)}}),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=ee(s,a.cx-o/2+$(l[0],a.r),a.cy-o/2+$(l[1],a.r),o,o,null,u);f.z2=n.get("showAbove")?1:0,f.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(f)}},e.prototype._renderTitleAndDetail=function(t,a,n,i,o){var s=this,l=t.getData(),u=l.mapDimension("value"),f=+t.get("min"),h=+t.get("max"),v=new it,c=[],p=[],d=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){c[y]=new Tt({silent:!0}),p[y]=new Tt({silent:!0})}).update(function(y,m){c[y]=s._titleEls[m],p[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),_=l.get(u,y),S=new it,x=i(Lt(_,[f,h],[0,1],!0)),w=m.getModel("title");if(w.get("show")){var b=w.get("offsetCenter"),T=o.cx+$(b[0],o.r),C=o.cy+$(b[1],o.r),A=c[y];A.attr({z2:g?0:2,style:Bt(w,{x:T,y:C,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:x})}),S.add(A)}var M=m.getModel("detail");if(M.get("show")){var L=M.get("offsetCenter"),I=o.cx+$(L[0],o.r),P=o.cy+$(L[1],o.r),R=$(M.get("width"),o.r),E=$(M.get("height"),o.r),N=t.get(["progress","show"])?l.getItemVisual(y,"style").fill:x,A=p[y],k=M.get("formatter");A.attr({z2:g?0:2,style:Bt(M,{x:I,y:P,text:zu(_,k),width:isNaN(R)?null:R,height:isNaN(E)?null:E,align:"center",verticalAlign:"middle"},{inheritColor:N})}),EC(A,{normal:M},_,function(V){return zu(V,k)}),d&&kC(A,y,l,t,{getFormattedLabel:function(V,H,W,K,Z,tt){return zu(tt?tt.interpolatedValue:_,k)}}),S.add(A)}v.add(S)}),this.group.add(v),this._titleEls=c,this._detailEls=p},e.type="gauge",e}(zt);const lH=sH;var uH=function(r){O(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 Zo(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,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",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:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(Wt);const fH=uH;function hH(r){r.registerChartView(lH),r.registerSeriesModel(fH)}var vH=["itemStyle","opacity"],cH=function(r){O(e,r);function e(t,a){var n=r.call(this)||this,i=n,o=new Ye,s=new Tt;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(vH);f=f==null?1:f,n||Rr(i),i.useStyle(t.getItemVisual(a,"style")),i.style.lineJoin="round",n?(i.setShape({points:l.points}),i.style.opacity=0,Gt(i,{style:{opacity:f}},o,a)):At(i,{style:{opacity:f},shape:{points:l.points}},o,a),me(i,s),this._updateLabel(t,a),Ut(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,h=t.getItemVisual(a,"style"),v=h.fill;_e(o,le(l),{labelFetcher:t.hostModel,labelDataIndex:a,defaultOpacity:h.opacity,defaultText:t.getName(a)},{normal:{align:f.textAlign,verticalAlign:f.verticalAlign}}),n.setTextConfig({local:!0,inside:!!f.inside,insideStroke:v,outsideFill:v});var c=f.linePoints;i.setShape({points:c}),n.textGuideLineConfig={anchor:c?new ht(c[0][0],c[0][1]):null},At(o,{style:{x:f.x,y:f.y}},s,a),o.attr({rotation:f.rotation,originX:f.x,originY:f.y,z2:10}),by(n,Ty(l),{stroke:v})},e}(Ue),pH=function(r){O(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 cH(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);ul(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}(zt);const dH=pH;var gH=function(r){O(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 $l(X(this.getData,this),X(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,a){return Zo(this,{coordDimensions:["value"],encodeDefaulter:ut(ty,this)})},e.prototype._defaultLabelLine=function(t){_i(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={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,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:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Wt);const yH=gH;function mH(r,e){return ne(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function _H(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();oVH)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||!Wc(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 Wc(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}const FH=zH;var HH=function(r){O(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&&ft(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){D(["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=Mt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);D(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}(wt);const WH=HH;var $H=function(r){O(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}(kr);const UH=$H;function Oi(r,e,t,a,n,i){r=r||0;var o=t[1]-t[0];if(n!=null&&(n=Qi(n,[0,o])),i!=null&&(i=Math.max(i,n!=null?n:0)),a==="all"){var s=Math.abs(e[1]-e[0]);s=Qi(s,[0,o]),n=i=Qi(s,[n,i]),a=0}e[0]=Qi(e[0],t),e[1]=Qi(e[1],t);var l=$c(e,a);e[a]+=r;var u=n||0,f=t.slice();l.sign<0?f[0]+=u:f[1]-=u,e[a]=Qi(e[a],f);var h;return h=$c(e,a),n!=null&&(h.sign!==l.sign||h.spani&&(e[1-a]=e[a]+h.sign*i),e}function $c(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 Qi(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var Uc=D,d2=Math.min,g2=Math.max,lx=Math.floor,YH=Math.ceil,ux=qt,ZH=Math.PI,XH=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;Uc(n,function(o,s){var l=i[s],u=t.getComponent("parallelAxis",l),f=this._axesMap.set(o,new UH(o,$h(u),[0,0],u.get("type"),l)),h=f.type==="category";f.onBand=h&&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();Uc(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(n,n.mapDimension(i)),Co(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=ne(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),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=Gu(e.get("axisExpandWidth"),l),h=Gu(e.get("axisExpandCount")||0,[0,u]),v=e.get("axisExpandable")&&u>3&&u>h&&h>1&&f>0&&s>0,c=e.get("axisExpandWindow"),p;if(c)p=Gu(c[1]-c[0],l),c[1]=c[0]+p;else{p=Gu(f*(h-1),l);var d=e.get("axisExpandCenter")||lx(u/2);c=[f*d-p/2],c[1]=c[0]+p}var g=(s-p)/(u-h);g<3&&(g=0);var y=[lx(ux(c[0]/f,1))+1,YH(ux(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:v,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])}),Uc(a,function(o,s){var l=(n.axisExpandable?KH:qH)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},f={horizontal:ZH/2,vertical:0},h=[u[i].x+e.x,u[i].y+e.y],v=f[i],c=Je();Di(c,c,v),ta(c,c,h),this._axesLayout[o]={position:h,rotation:v,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=[];D(o,function(g){s.push(e.mapDimension(g)),l.push(i.get(g).model)});for(var u=this.hasAxisBrushed(),f=a;fi*(1-h[0])?(u="jump",l=s-i*(1-h[2])):(l=s-i*h[1])>=0&&(l=s-i*(1-h[1]))<=0&&(l=0),l*=t.axisExpandWidth/f,l?Oi(l,n,o,"all"):u="none";else{var c=n[1]-n[0],p=o[1]*s/c;n=[g2(0,p-c/2)],n[1]=d2(o[1],n[0]+c),n[0]=n[1]-c}return{axisExpandWindow:n,behavior:u}},r}();function Gu(r,e){return d2(g2(r,e[0]),e[1])}function qH(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function KH(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--)pr(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;iaW}function b2(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function T2(r,e,t,a){var n=new it;return n.add(new xt({name:"main",style:Ky(t),silent:!0,draggable:!0,cursor:"move",drift:ut(cx,r,e,n,["n","s","w","e"]),ondragend:ut(Ci,e,{isEnd:!0})})),D(a,function(i){n.add(new xt({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:ut(cx,r,e,n,i),ondragend:ut(Ci,e,{isEnd:!0})}))}),n}function C2(r,e,t,a){var n=a.brushStyle.lineWidth||0,i=Mo(n,nW),o=t[0][0],s=t[1][0],l=o-n/2,u=s-n/2,f=t[0][1],h=t[1][1],v=f-i+n/2,c=h-i+n/2,p=f-o,d=h-s,g=p+n,y=d+n;la(r,e,"main",o,s,p,d),a.transformable&&(la(r,e,"w",l,u,i,y),la(r,e,"e",v,u,i,y),la(r,e,"n",l,u,g,i),la(r,e,"s",l,c,g,i),la(r,e,"nw",l,u,i,i),la(r,e,"ne",v,u,i,i),la(r,e,"sw",l,c,i,i),la(r,e,"se",v,c,i,i))}function Wd(r,e){var t=e.__brushOption,a=t.transformable,n=e.childAt(0);n.useStyle(Ky(t)),n.attr({silent:!a,cursor:a?"move":"default"}),D([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=e.childOfName(i.join("")),s=i.length===1?$d(r,i[0]):hW(r,i);o&&o.attr({silent:!a,invisible:!a,cursor:a?oW[s]+"-resize":null})})}function la(r,e,t,a,n,i,o){var s=e.childOfName(t);s&&s.setShape(cW(Jy(r,e,[[a,n],[a+i,n+o]])))}function Ky(r){return et({strokeNoScale:!0},r.brushStyle)}function A2(r,e,t,a){var n=[Tl(r,t),Tl(e,a)],i=[Mo(r,t),Mo(e,a)];return[[n[0],i[0]],[n[1],i[1]]]}function fW(r){return pi(r.group)}function $d(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},n=Mh(t[e],fW(r));return a[n]}function hW(r,e){var t=[$d(r,e[0]),$d(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function cx(r,e,t,a,n,i){var o=t.__brushOption,s=r.toRectRange(o.range),l=D2(e,n,i);D(a,function(u){var f=iW[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange(A2(s[0][0],s[1][0],s[0][1],s[1][1])),Zy(e,t),Ci(e,{isEnd:!1})}function vW(r,e,t,a){var n=e.__brushOption.range,i=D2(r,t,a);D(n,function(o){o[0]+=i[0],o[1]+=i[1]}),Zy(r,e),Ci(r,{isEnd:!1})}function D2(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 Jy(r,e,t){var a=w2(r,e);return a&&a!==Ti?a.clipPath(t,r._transform):nt(t)}function cW(r){var e=Tl(r[0][0],r[1][0]),t=Tl(r[0][1],r[1][1]),a=Mo(r[0][0],r[1][0]),n=Mo(r[0][1],r[1][1]);return{x:e,y:t,width:a-e,height:n-t}}function pW(r,e,t){if(!(!r._brushType||gW(r,e.offsetX,e.offsetY))){var a=r._zr,n=r._covers,i=qy(r,e,t);if(!r._dragging)for(var o=0;oa.getWidth()||t<0||t>a.getHeight()}var Kh={lineX:gx(0),lineY:gx(1),rect:{createCover:function(r,e){function t(a){return a}return T2({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=b2(r);return A2(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,a){C2(r,e,t,a)},updateCommon:Wd,contain:Yd},polygon:{createCover:function(r,e){var t=new it;return t.add(new Ye({name:"main",style:Ky(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new Ue({name:"main",draggable:!0,drift:ut(vW,r,e),ondragend:ut(Ci,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,a){e.childAt(0).setShape({points:Jy(r,e,t)})},updateCommon:Wd,contain:Yd}};function gx(r){return{createCover:function(e,t){return T2({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=b2(e),a=Tl(t[0][r],t[1][r]),n=Mo(t[0][r],t[1][r]);return[a,n]},updateCoverShape:function(e,t,a,n){var i,o=w2(e,t);if(o!==Ti&&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(),C2(e,t,l,n)},updateCommon:Wd,contain:Yd}}const jy=lW;function L2(r){return r=Qy(r),function(e){return IC(e,r)}}function I2(r,e){return r=Qy(r),function(t){var a=e!=null?e:t,n=a?r.width:r.height,i=a?r.x:r.y;return[i,i+(n||0)]}}function P2(r,e,t){var a=Qy(r);return function(n,i){return a.contain(i[0],i[1])&&!Yh(n,e,t)}}function Qy(r){return vt.create(r)}var yW=["axisLine","axisTickLabel","axisName"],mW=function(r){O(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 jy(a.getZr())).on("brush",X(this._onBrush,this))},e.prototype.render=function(t,a,n,i){if(!_W(t,a,i)){this.axisModel=t,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new it,this.group.add(this._axisGroup),!!t.get("show")){var s=xW(t,a),l=s.coordinateSystem,u=t.getAreaSelectStyle(),f=u.width,h=t.axis.dim,v=l.getAxisLayout(h),c=z({strokeContainThreshold:f},v),p=new Ca(t,c);D(yW,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(c,u,t,s,f,n),El(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),h=vt.create({x:l[0],y:-o/2,width:u,height:o});h.x-=f,h.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:L2(h),isTargetByCursor:P2(h,s,i),getLinearBrushOtherExtent:I2(h,0)}]).enableBrush({brushType:"lineX",brushStyle:a,removeOnClick:!0}).updateCovers(SW(n))},e.prototype._onBrush=function(t){var a=t.areas,n=this.axisModel,i=n.axis,o=F(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}(Zt);function _W(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function SW(r){var e=r.axis;return F(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function xW(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}const wW=mW;var bW={type:"axisAreaSelect",event:"axisAreaSelected"};function TW(r){r.registerAction(bW,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 CW={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function R2(r){r.registerComponentView(FH),r.registerComponentModel(WH),r.registerCoordinateSystem("parallel",tW),r.registerPreprocessor(OH),r.registerComponentModel(fx),r.registerComponentView(wW),Do(r,"parallel",fx,CW),TW(r)}function AW(r){gt(R2),r.registerChartView(DH),r.registerSeriesModel(PH),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,kH)}var DW=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}(),MW=function(r){O(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new DW},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(){wa(this)},e.prototype.downplay=function(){ba(this)},e}(yt),LW=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,a,n){var i=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,f=l.height,h=t.getData(),v=t.getData("edge"),c=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(p){var d=new MW,g=ot(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(),x=p.node1.getModel(),w=x.get("localX"),b=x.get("localY"),T=p.node2.getLayout(),C=p.node2.getModel(),A=C.get("localX"),M=C.get("localY"),L=p.getLayout(),I,P,R,E,N,k,B,V;d.shape.extent=Math.max(1,L.dy),d.shape.orient=c,c==="vertical"?(I=(w!=null?w*u:S.x)+L.sy,P=(b!=null?b*f:S.y)+S.dy,R=(A!=null?A*u:T.x)+L.ty,E=M!=null?M*f:T.y,N=I,k=P*(1-_)+E*_,B=R,V=P*_+E*(1-_)):(I=(w!=null?w*u:S.x)+S.dx,P=(b!=null?b*f:S.y)+L.sy,R=A!=null?A*u:T.x,E=(M!=null?M*f:T.y)+L.ty,N=I*(1-_)+R*_,k=P,B=I*_+R*(1-_),V=E),d.setShape({x1:I,y1:P,x2:R,y2:E,cpx1:N,cpy1:k,cpx2:B,cpy2:V}),d.useStyle(m.getItemStyle()),yx(d.style,c,p);var H=""+y.get("value"),W=le(y,"edgeLabel");_e(d,W,{labelFetcher:{getFormattedLabel:function(tt,Pt,Xt,ct,rt,dt){return t.getFormattedLabel(tt,Pt,"edge",ct,Jr(rt,W.normal&&W.normal.get("formatter"),H),dt)}},labelDataIndex:p.dataIndex,defaultText:H}),d.setTextConfig({position:"inside"});var K=y.getModel("emphasis");me(d,y,"lineStyle",function(tt){var Pt=tt.getItemStyle();return yx(Pt,c,p),Pt}),s.add(d),v.setItemGraphicEl(p.dataIndex,d);var Z=K.get("focus");Ut(d,Z==="adjacency"?p.getAdjacentDataIndices():Z==="trajectory"?p.getTrajectoryDataIndices():Z,K.get("blurScope"),K.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,x=new xt({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});_e(x,le(g),{labelFetcher:{getFormattedLabel:function(b,T){return t.getFormattedLabel(b,T,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),x.disableLabelAnimation=!0,x.setStyle("fill",p.getVisual("color")),x.setStyle("decal",p.getVisual("style").decal),me(x,g),s.add(x),h.setItemGraphicEl(p.dataIndex,x),ot(x).dataType="node";var w=_.get("focus");Ut(x,w==="adjacency"?p.getAdjacentDataIndices():w==="trajectory"?p.getTrajectoryDataIndices():w,_.get("blurScope"),_.get("disabled"))}),h.eachItemGraphicEl(function(p,d){var g=h.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:h.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(IW(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(zt);function yx(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");Y(a)&&Y(n)&&(r.fill=new mr(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:a,offset:0},{color:n,offset:1}]))}}function IW(r,e,t){var a=new xt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Gt(a,{shape:{width:r.width+20}},e,t),a}const PW=LW;var RW=function(r){O(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 Vt(o[l],this,a));var u=c2(i,n,this,!0,f);return u.data;function f(h,v){h.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}),v.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.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 ue("nameValue",{name:u,value:l,noValue:i(l)})}else{var f=this.getGraph().getNodeByIndex(t),h=f.getLayout().value,v=this.getDataParams(t,n).data.name;return ue("nameValue",{name:v!=null?v+"":null,value:h,noValue:i(h)})}},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.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(Wt);const EW=RW;function kW(r,e){r.eachSeriesByType("sankey",function(t){var a=t.get("nodeWidth"),n=t.get("nodeGap"),i=OW(t,e);t.layoutInfo=i;var o=i.width,s=i.height,l=t.getGraph(),u=l.nodes,f=l.edges;BW(u);var h=Mt(u,function(d){return d.getLayout().value===0}),v=h.length!==0?0:t.get("layoutIterations"),c=t.get("orient"),p=t.get("nodeAlign");NW(u,f,a,n,o,s,v,c,p)})}function OW(r,e){return ne(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function NW(r,e,t,a,n,i,o,s,l){VW(r,e,t,n,i,s,l),HW(r,e,i,n,a,o,s),JW(r,s)}function BW(r){D(r,function(e){var t=sn(e.outEdges,th),a=sn(e.inEdges,th),n=e.getValue()||0,i=Math.max(t,a,n);e.setLayout({value:i},!0)})}function VW(r,e,t,a,n,i,o){for(var s=[],l=[],u=[],f=[],h=0,v=0;v=0;y&&g.depth>c&&(c=g.depth),d.setLayout({depth:y?g.depth:h},!0),i==="vertical"?d.setLayout({dy:t},!0):d.setLayout({dx:t},!0);for(var m=0;mh-1?c:h-1;o&&o!=="left"&&zW(r,o,i,b);var T=i==="vertical"?(n-t)/b:(a-t)/b;FW(r,T,i)}function E2(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function zW(r,e,t,a){if(e==="right"){for(var n=[],i=r,o=0;i.length;){for(var s=0;s0;i--)l*=.99,UW(s,l,o),Yc(s,n,t,a,o),KW(s,l,o),Yc(s,n,t,a,o)}function WW(r,e){var t=[],a=e==="vertical"?"y":"x",n=qp(r,function(i){return i.getLayout()[a]});return n.keys.sort(function(i,o){return i-o}),D(n.keys,function(i){t.push(n.buckets.get(i))}),t}function $W(r,e,t,a,n,i){var o=1/0;D(r,function(s){var l=s.length,u=0;D(s,function(h){u+=h.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()[v]+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=h-2;c>=0;--c)l=o[c],u=l.getLayout()[i]+l.getLayout()[v]+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 UW(r,e,t){D(r.slice().reverse(),function(a){D(a,function(n){if(n.outEdges.length){var i=sn(n.outEdges,YW,t)/sn(n.outEdges,th);if(isNaN(i)){var o=n.outEdges.length;i=o?sn(n.outEdges,ZW,t)/o:0}if(t==="vertical"){var s=n.getLayout().x+(i-pn(n,t))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-pn(n,t))*e;n.setLayout({y:l},!0)}}})})}function YW(r,e){return pn(r.node2,e)*r.getValue()}function ZW(r,e){return pn(r.node2,e)}function XW(r,e){return pn(r.node1,e)*r.getValue()}function qW(r,e){return pn(r.node1,e)}function pn(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function th(r){return r.getValue()}function sn(r,e,t){for(var a=0,n=r.length,i=-1;++io&&(o=l)}),D(a,function(s){var l=new ge({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&&D(n,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function QW(r){r.registerChartView(PW),r.registerSeriesModel(EW),r.registerLayout(kW),r.registerVisual(jW),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])})})}var k2=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,h=this._baseAxisDim=u[f],v=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=[];D(g,function(S,x){var w;G(S)?(w=S.slice(),S.unshift(x)):G(S.value)?(w=z({},S),w.value=w.value.slice(),S.value.unshift(x)):w=S,y.push(w)}),e.data=y}var m=this.defaultValueDimensions,_=[{name:h,type:Hf(p),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:v,type:Hf(d),dimsDef:m.slice()}];return Zo(this,{coordDimensions:_,dimensionsCount:m.length+1,encodeDefaulter:ut(rA,_,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),O2=function(r){O(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:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(Wt);re(O2,k2,!0);const t6=O2;var e6=function(r){O(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),h=mx(f,i,u,l,!0);i.setItemGraphicEl(u,h),o.add(h)}}).update(function(u,f){var h=s.getItemGraphicEl(f);if(!i.hasValue(u)){o.remove(h);return}var v=i.getItemLayout(u);h?(Rr(h),N2(v,h,i,u)):h=mx(v,i,u,l),o.add(h),i.setItemGraphicEl(u,h)}).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}(zt),r6=function(){function r(){}return r}(),a6=function(r){O(e,r);function e(t){var a=r.call(this,t)||this;return a.type="boxplotBoxPath",a}return e.prototype.getDefaultShape=function(){return new r6},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 h6={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Me){var a="";Dt(a)}var n=f6(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function v6(r){r.registerSeriesModel(t6),r.registerChartView(i6),r.registerLayout(o6),r.registerTransform(h6)}var c6=["itemStyle","borderColor"],p6=["itemStyle","borderColor0"],d6=["itemStyle","borderColorDoji"],g6=["itemStyle","color"],y6=["itemStyle","color0"];function tm(r,e){return e.get(r>0?g6:y6)}function em(r,e){return e.get(r===0?d6:r>0?c6:p6)}var m6={seriesType:"candlestick",plan:Wo(),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=tm(s,o),l.stroke=em(s,o)||l.fill;var u=n.ensureUniqueItemVisual(i,"style");z(u,l)}}}}}};const _6=m6;var S6=["color","borderColor"],x6=function(r){O(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){mn(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 h=a.getItemLayout(f);if(s&&_x(u,h))return;var v=Zc(h,f,!0);Gt(v,{shape:{points:h.ends}},t,f),Xc(v,a,f,o),i.add(v),a.setItemGraphicEl(f,v)}}).update(function(f,h){var v=n.getItemGraphicEl(h);if(!a.hasValue(f)){i.remove(v);return}var c=a.getItemLayout(f);if(s&&_x(u,c)){i.remove(v);return}v?(At(v,{shape:{points:c.ends}},t,f),Rr(v)):v=Zc(c),Xc(v,a,f,o),i.add(v),a.setItemGraphicEl(f,v)}).remove(function(f){var h=n.getItemGraphicEl(f);h&&i.remove(h)}).execute(),this._data=a},e.prototype._renderLarge=function(t){this._clear(),Sx(t,this.group);var a=t.get("clip",!0)?Fl(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=Zc(s);Xc(l,n,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,a){Sx(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}(zt),w6=function(){function r(){}return r}(),b6=function(r){O(e,r);function e(t){var a=r.call(this,t)||this;return a.type="normalCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new w6},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}(yt);function Zc(r,e,t){var a=r.ends;return new b6({shape:{points:t?T6(a,r):a},z2:100})}function _x(r,e){for(var t=!0,a=0;ax?M[i]:A[i],ends:P,brushRect:B(w,b,_)})}function N(H,W){var K=[];return K[n]=W,K[i]=H,isNaN(W)||isNaN(H)?[NaN,NaN]:e.dataToPoint(K)}function k(H,W,K){var Z=W.slice(),tt=W.slice();Z[n]=uf(Z[n]+a/2,1,!1),tt[n]=uf(tt[n]-a/2,1,!0),K?H.push(Z,tt):H.push(tt,Z)}function B(H,W,K){var Z=N(H,K),tt=N(W,K);return Z[n]-=a/2,tt[n]-=a/2,{x:Z[0],y:Z[1],width:a,height:tt[1]-Z[1]}}function V(H){return H[n]=uf(H[n],1),H}}function p(d,g){for(var y=qr(d.count*4),m=0,_,S=[],x=[],w,b=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(w=d.next())!=null;){var C=b.get(s,w),A=b.get(u,w),M=b.get(f,w),L=b.get(h,w),I=b.get(v,w);if(isNaN(C)||isNaN(L)||isNaN(I)){y[m++]=NaN,m+=3;continue}y[m++]=xx(b,w,A,M,f,T),S[n]=C,S[i]=L,_=e.dataToPoint(S,null,x),y[m++]=_?_[0]:NaN,y[m++]=_?_[1]:NaN,S[i]=I,_=e.dataToPoint(S,null,x),y[m++]=_?_[1]:NaN}g.setLayout("largePoints",y)}}};function xx(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 I6(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=$(lt(r.get("barMaxWidth"),n),n),o=$(lt(r.get("barMinWidth"),1),n),s=r.get("barWidth");return s!=null?$(s,n):Math.max(Math.min(n/2,i),o)}const P6=L6;function R6(r){r.registerChartView(A6),r.registerSeriesModel(D6),r.registerPreprocessor(M6),r.registerVisual(_6),r.registerLayout(P6)}function bx(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 E6=function(r){O(e,r);function e(t,a){var n=r.call(this)||this,i=new zl(t,a),o=new it;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 v=void 0;Q(h)?v=h(n):v=h,i.__t>0&&(v=-s*i.__t),this._animateSymbol(i,s,v,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 Xa(t.__p1,t.__cp1)+Xa(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=he,f=kp;s[0]=u(a[0],i[0],n[0],o),s[1]=u(a[1],i[1],n[1],o);var h=t.__t<1?f(a[0],i[0],n[0],o):f(n[0],i[0],a[0],1-o),v=t.__t<1?f(a[1],i[1],n[1],o):f(n[1],i[1],a[1],1-o);t.rotation=-Math.atan2(v,h)-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]),h=n[l],v=n[l+1];t.x=h[0]*(1-f)+f*v[0],t.y=h[1]*(1-f)+f*v[1];var c=t.__t<1?v[0]-h[0]:h[0]-v[0],p=t.__t<1?v[1]-h[1]:h[1]-v[1];t.rotation=-Math.atan2(p,c)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,t.ignore=!1}},e}(V2);const W6=H6;var $6=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),U6=function(r){O(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:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new $6},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+h)/2-(f-v)*i,p=(f+v)/2-(h-u)*i;t.quadraticCurveTo(c,p,h,v)}else t.lineTo(h,v)}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 h=i[u++],v=i[u++],c=1;c0){var g=(h+p)/2-(v-d)*o,y=(v+d)/2-(p-h)*o;if($T(h,v,g,y,p,d,s,t,a))return l}else if(Wa(h,v,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 Z6=Y6;var X6={seriesType:"lines",plan:Wo(),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 h=t.get("clip",!0)&&Fl(t.coordinateSystem,!1,t);h?this.group.setClipPath(h):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=G2.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 Z6:new Yy(o?i?W6:z2:i?V2:Uy),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}(zt);const K6=q6;var J6=typeof Uint32Array>"u"?Array:Uint32Array,j6=typeof Float64Array>"u"?Array:Float64Array;function Tx(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=F(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),_g([n,t[0],t[1]])}))}var Q6=function(r){O(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||[],Tx(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(Tx(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=tl(this._flatCoords,a.flatCoords),this._flatCoordsOffset=tl(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==null?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?2e4:this.get("progressiveThreshold"):t},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}(Wt);const t$=Q6;function Fu(r){return r instanceof Array||(r=[r,r]),r}var e$={seriesType:"lines",reset:function(r){var e=Fu(r.get("symbol")),t=Fu(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=Fu(s.getShallow("symbol",!0)),u=Fu(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 r$=e$;function a$(r){r.registerChartView(K6),r.registerSeriesModel(t$),r.registerLayout(G2),r.registerVisual(r$)}var n$=256,i$=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=_a.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,h=this.canvas,v=h.getContext("2d"),c=e.length;h.width=t,h.height=a;for(var p=0;p0){var L=o(_)?l:u;_>0&&(_=_*A+T),x[w++]=L[M],x[w++]=L[M+1],x[w++]=L[M+2],x[w++]=L[M+3]*_*256}else w+=4}return v.putImageData(S,0,0),h},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=_a.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="#000",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 o$=i$;function s$(r,e,t){var a=r[1]-r[0];e=F(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 Cx(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var u$=function(r){O(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"?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):Cx(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&&(Cx(o)?this.render(a,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(a,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){mn(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,a,n,i,o){var s=t.coordinateSystem,l=Ei(s,"cartesian2d"),u,f,h,v;if(l){var c=s.getAxis("x"),p=s.getAxis("y");u=c.getBandWidth()+.5,f=p.getBandWidth()+.5,h=c.scale.getExtent(),v=p.scale.getExtent()}for(var d=this.group,g=t.getData(),y=t.getModel(["emphasis","itemStyle"]).getItemStyle(),m=t.getModel(["blur","itemStyle"]).getItemStyle(),_=t.getModel(["select","itemStyle"]).getItemStyle(),S=t.get(["itemStyle","borderRadius"]),x=le(t),w=t.getModel("emphasis"),b=w.get("focus"),T=w.get("blurScope"),C=w.get("disabled"),A=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],M=n;Mh[1]||Rv[1])continue;var E=s.dataToPoint([P,R]);L=new xt({shape:{x:E[0]-u/2,y:E[1]-f/2,width:u,height:f},style:I})}else{if(isNaN(g.get(A[1],M)))continue;L=new xt({z2:1,shape:s.dataToRect([g.get(A[0],M)]).contentShape,style:I})}if(g.hasItemOption){var N=g.getItemModel(M),k=N.getModel("emphasis");y=k.getModel("itemStyle").getItemStyle(),m=N.getModel(["blur","itemStyle"]).getItemStyle(),_=N.getModel(["select","itemStyle"]).getItemStyle(),S=N.get(["itemStyle","borderRadius"]),b=k.get("focus"),T=k.get("blurScope"),C=k.get("disabled"),x=le(N)}L.shape.r=S;var B=t.getRawValue(M),V="-";B&&B[2]!=null&&(V=B[2]+""),_e(L,x,{labelFetcher:t,labelDataIndex:M,defaultOpacity:I.opacity,defaultText:V}),L.ensureState("emphasis").style=y,L.ensureState("blur").style=m,L.ensureState("select").style=_,Ut(L,b,T,C),L.incremental=o,o&&(L.states.emphasis.hoverLayer=!0),d.add(L),g.setItemGraphicEl(M,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 o$;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(),h=t.getRoamTransform();f.applyTransform(h);var v=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-v,y=d-c,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(m,function(b,T,C){var A=t.dataToPoint([b,T]);return A[0]-=v,A[1]-=c,A.push(C),A}),S=n.getExtent(),x=n.type==="visualMap.continuous"?l$(S,n.option.range):s$(S,n.getPieceList(),n.option.selected);u.update(_,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},x);var w=new Se({style:{width:g,height:y,x:v,y:c,image:u.canvas},silent:!0});this.group.add(w)},e.type="heatmap",e}(zt);const f$=u$;var h$=function(r){O(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 Ma(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Ol.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"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(Wt);const v$=h$;function c$(r){r.registerChartView(f$),r.registerSeriesModel(v$)}var p$=["itemStyle","borderWidth"],Ax=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Jc=new yn,d$=function(r){O(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(),h=l.master.getRect(),v={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[h.x,h.x+h.width],[h.y,h.y+h.height]],isHorizontal:f,valueDim:Ax[+f],categoryDim:Ax[1-+f]};o.diff(s).add(function(p){if(!!o.hasValue(p)){var d=Mx(o,p),g=Dx(o,p,d,v),y=Lx(o,v,g);o.setItemGraphicEl(p,y),i.add(y),Px(y,v,g)}}).update(function(p,d){var g=s.getItemGraphicEl(d);if(!o.hasValue(p)){i.remove(g);return}var y=Mx(o,p),m=Dx(o,p,y,v),_=Y2(o,m);g&&_!==g.__pictorialShapeStr&&(i.remove(g),o.setItemGraphicEl(p,null),g=null),g?w$(g,v,m):g=Lx(o,v,m,!0),o.setItemGraphicEl(p,g),g.__pictorialSymbolMeta=m,i.add(g),Px(g,v,m)}).remove(function(p){var d=s.getItemGraphicEl(p);d&&Ix(s,p,d.__pictorialSymbolMeta.animationModel,d)}).execute();var c=t.get("clip",!0)?Fl(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){Ix(i,ot(o).dataIndex,t,o)}):n.removeAll()},e.type="pictorialBar",e}(zt);function Dx(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,h=t.isAnimationEnabled(),v={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:h?t:null,hoverScale:h&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};g$(t,i,n,a,v),y$(r,e,n,i,o,v.boundingLength,v.pxSign,f,a,v),m$(t,v.symbolScale,u,a,v);var c=v.symbolSize,p=Pi(t.get("symbolOffset"),c);return _$(t,c,n,i,o,p,s,v.valueLineWidth,v.boundingLength,v.repeatCutLength,a,v),v}function g$(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(G(o)){var h=[jc(s,o[0])-l,jc(s,o[1])-l];h[1]=0?1:-1:f>0?1:-1}function jc(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function y$(r,e,t,a,n,i,o,s,l,u){var f=l.valueDim,h=l.categoryDim,v=Math.abs(t[h.wh]),c=r.getItemVisual(e,"symbolSize"),p;G(c)?p=c.slice():c==null?p=["100%","100%"]:p=[c,c],p[h.index]=$(p[h.index],v),p[f.index]=$(p[f.index],a?v: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 m$(r,e,t,a,n){var i=r.get(p$)||0;i&&(Jc.attr({scaleX:e[0],scaleY:e[1],rotation:t}),Jc.updateTransform(),i/=Jc.getLineScale(),i*=e[a.valueDim.index]),n.valueLineWidth=i||0}function _$(r,e,t,a,n,i,o,s,l,u,f,h){var v=f.categoryDim,c=f.valueDim,p=h.pxSign,d=Math.max(e[c.index]+s,0),g=d;if(a){var y=Math.abs(l),m=ve(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var S=$(m,e[c.index]),x=Math.max(d+S*2,0),w=_?0:S*2,b=IT(a),T=b?a:Rx((y+w)/x),C=y-T*d;S=C/2/(_?T:Math.max(T-1,1)),x=d+S*2,w=_?0:S*2,!b&&a!=="fixed"&&(T=u?Rx((Math.abs(u)+w)/x):0),g=T*x-w,h.repeatTimes=T,h.symbolMargin=S}var A=p*(g/2),M=h.pathPosition=[];M[v.index]=t[v.wh]/2,M[c.index]=o==="start"?A:o==="end"?l-A:l/2,i&&(M[0]+=i[0],M[1]+=i[1]);var L=h.bundlePosition=[];L[v.index]=t[v.xy],L[c.index]=t[c.xy];var I=h.barRectShape=z({},t);I[c.wh]=p*Math.max(Math.abs(t[c.wh]),Math.abs(M[c.index]+A)),I[v.wh]=t[v.wh];var P=h.clipShape={};P[v.xy]=-t[v.xy],P[v.wh]=f.ecSize[v.wh],P[c.xy]=0,P[c.wh]=t[c.wh]}function F2(r){var e=r.symbolPatternSize,t=ee(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function H2(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,h=i[e.valueDim.index]+o+t.symbolMargin*2;for(rm(r,function(d){d.__pictorialAnimationIndex=f,d.__pictorialRepeatTimes=u,f0:y<0)&&(m=u-1-d),g[l.index]=h*(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 W2(r,e,t,a){var n=r.__pictorialBundle,i=r.__pictorialMainPath;i?So(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=F2(t),n.add(i),So(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 $2(r,e,t){var a=z({},e.barRectShape),n=r.__pictorialBarRect;n?So(n,null,{shape:a},e,t):(n=r.__pictorialBarRect=new xt({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,r.add(n))}function U2(r,e,t,a){if(t.symbolClip){var n=r.__pictorialClipPath,i=z({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(n)At(n,{shape:i},s,l);else{i[o.wh]=0,n=new xt({shape:i}),r.__pictorialBundle.setClipPath(n),r.__pictorialClipPath=n;var u={};u[o.wh]=t.clipShape[o.wh],Li[a?"updateProps":"initProps"](n,{shape:u},s,l)}}}function Mx(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=S$,t.isAnimationEnabled=x$,t}function S$(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function x$(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Lx(r,e,t,a){var n=new it,i=new it;return n.add(i),n.__pictorialBundle=i,i.x=t.bundlePosition[0],i.y=t.bundlePosition[1],t.symbolRepeat?H2(n,e,t):W2(n,e,t),$2(n,t,a),U2(n,e,t,a),n.__pictorialShapeStr=Y2(r,t),n.__pictorialSymbolMeta=t,n}function w$(r,e,t){var a=t.animationModel,n=t.dataIndex,i=r.__pictorialBundle;At(i,{x:t.bundlePosition[0],y:t.bundlePosition[1]},a,n),t.symbolRepeat?H2(r,e,t,!0):W2(r,e,t,!0),$2(r,t,!0),U2(r,e,t,!0)}function Ix(r,e,t,a){var n=a.__pictorialBarRect;n&&n.removeTextContent();var i=[];rm(a,function(o){i.push(o)}),a.__pictorialMainPath&&i.push(a.__pictorialMainPath),a.__pictorialClipPath&&(t=null),D(i,function(o){fn(o,{scaleX:0,scaleY:0},t,e,function(){a.parent&&a.parent.remove(a)})}),r.setItemGraphicEl(e,null)}function Y2(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function rm(r,e,t){D(r.__pictorialBundle.children(),function(a){a!==r.__pictorialBarRect&&e.call(t,a)})}function So(r,e,t,a,n,i){e&&r.attr(e),a.symbolClip&&!n?t&&r.attr(t):t&&Li[n?"updateProps":"initProps"](r,t,a.animationModel,a.dataIndex,i)}function Px(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"),h=i.get("blurScope"),v=i.get("scale");rm(r,function(d){if(d instanceof Se){var g=d.style;d.useStyle(z({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,v&&(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,_e(p,le(n),{labelFetcher:e.seriesModel,labelDataIndex:a,defaultText:Ao(e.seriesModel.getData(),a),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:c}),Ut(r,f,h,i.get("disabled"))}function Rx(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}const b$=d$;var T$=function(r){O(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=_n(Zf.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:"#212121"}}}),e}(Zf);const C$=T$;function A$(r){r.registerChartView(b$),r.registerSeriesModel(C$),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ut(TD,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,CD("pictorialBar"))}var D$=function(r){O(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,h=u.boundaryGap;s.x=0,s.y=f.y+h[0];function v(g){return g.name}var c=new Ta(this._layersSeries||[],l,v,v),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=[],x=[],w,b=l[y].indices,T=0;Ti&&(i=s),a.push(s)}for(var u=0;ui&&(i=h)}return{y0:n,max:i}}function k$(r){r.registerChartView(L$),r.registerSeriesModel(P$),r.registerLayout(R$),r.registerProcessor(Wl("themeRiver"))}var O$=2,N$=4,B$=function(r){O(e,r);function e(t,a,n,i){var o=r.call(this)||this;o.z2=O$,o.textConfig={inside:!0},ot(o).seriesIndex=a.seriesIndex;var s=new Tt({z2:N$,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;ot(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),f=a.getLayout(),h=z({},f);h.label=null;var v=a.getVisual("style");v.lineJoin="bevel";var c=a.getVisual("decal");c&&(v.decal=To(c,o));var p=li(l.getModel("itemStyle"),h,!0);z(h,p),D(Ne,function(m){var _=s.ensureState(m),S=l.getModel([m,"itemStyle"]);_.style=S.getItemStyle();var x=li(S,h);x&&(_.shape=x)}),t?(s.setShape(h),s.shape.r=f.r0,Gt(s,{shape:{r:f.r}},n,a.dataIndex)):(At(s,{shape:h},n),Rr(s)),s.useStyle(v),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"?tl(a.getAncestorsIndices(),a.getDescendantIndices()):g==="ancestor"?a.getAncestorsIndices():g==="descendant"?a.getDescendantIndices():g;Ut(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),h=this,v=h.getTextContent(),c=this.node.dataIndex,p=i.get("minAngle")/180*Math.PI,d=i.get("show")&&!(p!=null&&Math.abs(s)P&&!nl(E-P)&&E0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,t,a,n):(o.virtualPiece=new kx(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";kf(u,f)}}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Zd,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}(zt);const F$=G$;var H$=function(r){O(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};Z2(n);var i=this._levelModels=F(t.levels||[],function(l){return new Vt(l,this,a)},this),o=Vy.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,f){var h=o.getNodeByDataIndex(f),v=i[h.depth];return v&&(u.parentModel=v),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=Xh(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(){JM(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}(Wt);function Z2(r){var e=0;D(r.children,function(a){Z2(a);var n=a.value;G(n)&&(n=n[0]),e+=n});var t=r.value;G(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),G(r.value)?r.value[0]=t:r.value=t}const W$=H$;var Nx=Math.PI/180;function $$(r,e,t){e.eachSeriesByType(r,function(a){var n=a.get("center"),i=a.get("radius");G(i)||(i=[0,i]),G(n)||(n=[n,n]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=$(n[0],o),f=$(n[1],s),h=$(i[0],l/2),v=$(i[1],l/2),c=-a.get("startAngle")*Nx,p=a.get("minAngle")*Nx,d=a.getData().tree.root,g=a.getViewRoot(),y=g.depth,m=a.get("sort");m!=null&&X2(g,m);var _=0;D(g.children,function(E){!isNaN(E.getValue())&&_++});var S=g.getValue(),x=Math.PI/(S||_)*2,w=g.depth>0,b=g.height-(w?-1:1),T=(v-h)/(b||1),C=a.get("clockwise"),A=a.get("stillShowZeroSum"),M=C?1:-1,L=function(E,N){if(!!E){var k=N;if(E!==d){var B=E.getValue(),V=S===0&&A?x:B*x;V1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",e);return a.depth>1&&Y(s)&&(s=Bp(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");z(u,l)})})}function Z$(r){r.registerChartView(F$),r.registerSeriesModel(W$),r.registerLayout(ut($$,"sunburst")),r.registerProcessor(ut(Wl,"sunburst")),r.registerVisual(Y$),z$(r)}var Bx={color:"fill",borderColor:"stroke"},X$={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},ya=St(),q$=function(r){O(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 Ma(null,this)},e.prototype.getDataParams=function(t,a,n){var i=r.prototype.getDataParams.call(this,t,a);return n&&(i.info=ya(n).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(Wt);const K$=q$;function J$(r,e){return e=e||[0,0],F(["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 j$(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(J$,r)}}}function Q$(r,e){return e=e||[0,0],F([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 t8(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(Q$,r)}}}function e8(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 r8(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(e8,r)}}}function a8(r,e){return e=e||[0,0],F(["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 n8(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(a8,r)}}}function i8(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)}}}}function q2(r,e,t,a){return r&&(r.legacy||r.legacy!==!1&&!t&&!a&&e!=="tspan"&&(e==="text"||q(r,"text")))}function K2(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 Vx(o,r),D(o.rich,function(l){Vx(l,l)}),{textConfig:n,textContent:i}}function Vx(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 zx(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||"#000";Gx(a,e);var o=a.textFill==null;return n?o&&(a.textFill=t.insideFill||"#fff",!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||"#000"),!a.textStroke&&t.outsideStroke&&(a.textStroke=t.outsideStroke)),a.text=e.text,a.rich=e.rich,D(e.rich,function(s){Gx(s,s)}),a}function Gx(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 J2={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Fx=mt(J2);Qr(ea,function(r,e){return r[e]=1,r},{});ea.join(", ");var eh=["","style","shape","extra"],Lo=St();function am(r,e,t,a,n){var i=r+"Animation",o=No(r,a,n)||{},s=Lo(e).userDuring;return o.duration>0&&(o.during=s?X(f8,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),z(o,t[i]),o}function df(r,e,t,a){a=a||{};var n=a.dataIndex,i=a.isInit,o=a.clearStyle,s=t.isAnimationEnabled(),l=Lo(r),u=e.style;l.userDuring=e.during;var f={},h={};if(v8(r,e,h),Wx("shape",e,h),Wx("extra",e,h),!i&&s&&(h8(r,e,f),Hx("shape",r,e,f),Hx("extra",r,e,f),c8(r,e,u,f)),h.style=u,o8(r,h,o),l8(r,e),s)if(i){var v={};D(eh,function(p){var d=p?e[p]:e;d&&d.enterFrom&&(p&&(v[p]=v[p]||{}),z(p?v[p]:v,d.enterFrom))});var c=am("enter",r,e,t,n);c.duration>0&&r.animateFrom(v,c)}else s8(r,e,n||0,t,f);j2(r,e),u?r.dirty():r.markRedraw()}function j2(r,e){for(var t=Lo(r).leaveToProps,a=0;a0&&r.animateFrom(n,i)}}function l8(r,e){q(e,"silent")&&(r.silent=e.silent),q(e,"ignore")&&(r.ignore=e.ignore),r instanceof gr&&q(e,"invisible")&&(r.invisible=e.invisible),r instanceof yt&&q(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var Gr={},u8={setTransform:function(r,e){return Gr.el[r]=e,this},getTransform:function(r){return Gr.el[r]},setShape:function(r,e){var t=Gr.el,a=t.shape||(t.shape={});return a[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=Gr.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=Gr.el,a=t.style;return a&&(a[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=Gr.el.style;if(e)return e[r]},setExtra:function(r,e){var t=Gr.el.extra||(Gr.el.extra={});return t[r]=e,this},getExtra:function(r){var e=Gr.el.extra;if(e)return e[r]}};function f8(){var r=this,e=r.el;if(!!e){var t=Lo(e).userDuring,a=r.userDuring;if(t!==a){r.el=r.userDuring=null;return}Gr.el=e,a(u8)}}function Hx(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]={}),mi(l))z(o,i);else for(var u=Rt(l),f=0;f=0){!o&&(o=a[r]={});for(var c=mt(i),f=0;f=0)){var v=r.getAnimationStyleProps(),c=v?v.style:null;if(c){!i&&(i=a.style={});for(var p=mt(t),u=0;u=0?e.getStore().get(N,R):void 0}var k=e.get(E.name,R),B=E&&E.ordinalMeta;return B?B.categories[k]:k}function w(P,R){R==null&&(R=u);var E=e.getItemVisual(R,"style"),N=E&&E.fill,k=E&&E.opacity,B=m(R,en).getItemStyle();N!=null&&(B.fill=N),k!=null&&(B.opacity=k);var V={inheritColor:Y(N)?N:"#000"},H=_(R,en),W=Bt(H,null,V,!1,!0);W.text=H.getShallow("show")?lt(r.getFormattedLabel(R,en),Ao(e,R)):null;var K=Rf(H,V,!1);return C(P,B),B=zx(B,W,K),P&&T(B,P),B.legacy=!0,B}function b(P,R){R==null&&(R=u);var E=m(R,ma).getItemStyle(),N=_(R,ma),k=Bt(N,null,null,!0,!0);k.text=N.getShallow("show")?Jr(r.getFormattedLabel(R,ma),r.getFormattedLabel(R,en),Ao(e,R)):null;var B=Rf(N,null,!0);return C(P,E),E=zx(E,k,B),P&&T(E,P),E.legacy=!0,E}function T(P,R){for(var E in R)q(R,E)&&(P[E]=R[E])}function C(P,R){P&&(P.textFill&&(R.textFill=P.textFill),P.textPosition&&(R.textPosition=P.textPosition))}function A(P,R){if(R==null&&(R=u),q(Bx,P)){var E=e.getItemVisual(R,"style");return E?E[Bx[P]]:null}if(q(X$,P))return e.getItemVisual(R,P)}function M(P){if(i.type==="cartesian2d"){var R=i.getBaseAxis();return TB(et({axis:R},P))}}function L(){return t.getCurrentSeriesIndices()}function I(P){return Zg(P,t)}}function T8(r){var e={};return D(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 rp(r,e,t,a,n,i,o){if(!a){i.remove(e);return}var s=lm(r,e,t,a,n,i);return s&&o.setItemGraphicEl(t,s),s&&Ut(s,a.focus,a.blurScope,a.emphasisDisabled),s}function lm(r,e,t,a,n,i){var o=-1,s=e;e&&rL(e,a,n)&&(o=pt(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=om(a),s&&_8(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),ar.normal.cfg=ar.normal.conOpt=ar.emphasis.cfg=ar.emphasis.conOpt=ar.blur.cfg=ar.blur.conOpt=ar.select.cfg=ar.select.conOpt=null,ar.isLegacy=!1,A8(u,t,a,n,l,ar),C8(u,t,a,n,l),sm(r,u,t,a,ar,n,l),q(a,"info")&&(ya(u).info=a.info);for(var f=0;f=0?i.replaceAt(u,o):i.add(u),u}function rL(r,e,t){var a=ya(r),n=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||n!=null&&n!==a.customGraphicType||n==="path"&&P8(i)&&aL(i)!==a.customPathData||n==="image"&&q(o,"image")&&o.image!==a.customImagePath}function C8(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&&rL(o,i,a)&&(o=null),o||(o=om(i),r.setClipPath(o)),sm(null,o,e,i,null,a,n)}}function A8(r,e,t,a,n,i){if(!r.isGroup){Ux(t,null,i),Ux(t,ma,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=om(o),r.setTextContent(f)),sm(null,f,e,o,null,a,n);for(var h=o&&o.style,v=0;v=f;c--){var p=e.childAt(c);M8(e,p,n)}}}function M8(r,e,t){e&&Jh(e,ya(r).option,t)}function L8(r){new Ta(r.oldChildren,r.newChildren,Yx,Yx,r).add(Zx).update(Zx).remove(I8).execute()}function Yx(r,e){var t=r&&r.name;return t!=null?t:y8+e}function Zx(r,e){var t=this.context,a=r!=null?t.newChildren[r]:null,n=e!=null?t.oldChildren[e]:null;lm(t.api,n,t.dataIndex,a,t.seriesModel,t.group)}function I8(r){var e=this.context,t=e.oldChildren[r];t&&Jh(t,ya(t).option,e.seriesModel)}function aL(r){return r&&(r.pathData||r.d)}function P8(r){return r&&(q(r,"pathData")||q(r,"d"))}function R8(r){r.registerChartView(x8),r.registerSeriesModel(K$)}var Qn=St(),Xx=nt,ap=X,E8=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 h=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new it,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),a.getZr().add(s);else{var v=ut(qx,t,h);this.updatePointerEl(s,u,v),this.updateLabelEl(s,u,v,t)}Jx(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=Py(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=Qn(e).pointerEl=new Li[i.type](Xx(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,a,n){if(t.label){var i=Qn(e).labelEl=new Tt(Xx(t.label));e.add(i),Kx(i,n)}},r.prototype.updatePointerEl=function(e,t,a){var n=Qn(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=Qn(e).labelEl;i&&(i.setStyle(t.label.style),a(i,{x:t.label.x,y:t.label.y}),Kx(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=kl(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Sa(u.event)},onmousedown:ap(this._onHandleDragMove,this,0,0),drift:ap(this._onHandleDragMove,this),ondragend:ap(this._onHandleDragEnd,this)}),a.add(n)),Jx(n,t,!1),n.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");G(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,$o(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){qx(this._axisPointerModel,!t&&this._moveAnimation,this._handle,np(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(np(a),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=n,a.stopAnimation(),a.attr(np(n)),Qn(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),cl(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 qx(r,e,t,a){nL(Qn(t).lastProp,a)||(Qn(t).lastProp=a,e?At(t,a,r):(t.stopAnimation(),t.attr(a)))}function nL(r,e){if(at(r)&&at(e)){var t=!0;return D(e,function(a,n){t=t&&nL(r[n],a)}),!!t}else return r===e}function Kx(r,e){r[e.get(["label","show"])?"show":"hide"]()}function np(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function Jx(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 fm=E8;function hm(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 iL(r,e,t,a,n){var i=t.get("value"),o=oL(i,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=zo(s.get("padding")||0),u=s.getFont(),f=Il(o,u),h=n.position,v=f.width+l[1]+l[3],c=f.height+l[0]+l[2],p=n.align;p==="right"&&(h[0]-=v),p==="center"&&(h[0]-=v/2);var d=n.verticalAlign;d==="bottom"&&(h[1]-=c),d==="middle"&&(h[1]-=c/2),k8(h,v,c,a);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),r.label={x:h[0],y:h[1],style:Bt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function k8(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 oL(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:xy(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};D(a,function(l){var u=t.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,h=u&&u.getDataParams(f);h&&s.seriesData.push(h)}),Y(o)?i=o.replace("{value}",i):Q(o)&&(i=o(s))}return i}function vm(r,e,t){var a=Je();return Di(a,a,t.rotation),ta(a,a,t.position),Ir([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],a)}function sL(r,e,t,a,n,i){var o=Ca.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=n.get(["label","margin"]),iL(e,a,n,i,{position:vm(a.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function cm(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function lL(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function jx(r,e,t,a,n,i){return{cx:r,cy:e,r0:t,r:a,startAngle:n,endAngle:i,clockwise:!0}}var O8=function(r){O(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=Qx(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(a,!0));if(u&&u!=="none"){var v=hm(i),c=N8[u](s,h,f);c.style=v,t.graphicKey=c.type,t.pointer=c}var p=Pd(l.model,n);sL(a,t,p,n,i,o)},e.prototype.getHandleTransform=function(t,a,n){var i=Pd(a.axis.grid.model,a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=vm(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=Qx(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[t.x,t.y];h[f]+=a[f],h[f]=Math.min(l[1],h[f]),h[f]=Math.max(l[0],h[f]);var v=(u[1]+u[0])/2,c=[v,v];c[f]=h[f];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:c,tooltipOption:p[f]}},e}(fm);function Qx(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var N8={line:function(r,e,t){var a=cm([e,t[0]],[e,t[1]],tw(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:lL([e-a/2,t[0]],[a,n],tw(r))}}};function tw(r){return r.dim==="x"?0:1}const B8=O8;var V8=function(r){O(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:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(wt);const z8=V8;var ca=St(),G8=D;function uL(r,e,t){if(!bt.node){var a=e.getZr();ca(a).records||(ca(a).records={}),F8(a,e);var n=ca(a).records[r]||(ca(a).records[r]={});n.handler=t}}function F8(r,e){if(ca(r).initialized)return;ca(r).initialized=!0,t("click",ut(ew,"click")),t("mousemove",ut(ew,"mousemove")),t("globalout",W8);function t(a,n){r.on(a,function(i){var o=$8(e);G8(ca(r).records,function(s){s&&n(s,i,o.dispatchAction)}),H8(o.pendings,e)})}}function H8(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 W8(r,e,t){r.handler("leave",null,t)}function ew(r,e,t,a){e.handler(r,t,a)}function $8(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 Kd(r,e){if(!bt.node){var t=e.getZr(),a=(ca(t).records||{})[r];a&&(ca(t).records[r]=null)}}var U8=function(r){O(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";uL("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){Kd("axisPointer",a)},e.prototype.dispose=function(t,a){Kd("axisPointer",a)},e.type="axisPointer",e}(Zt);const Y8=U8;function fL(r,e){var t=[],a=r.seriesIndex,n;if(a==null||!(n=e.getSeriesByIndex(a)))return{point:[]};var i=n.getData(),o=Si(i,r);if(o==null||o<0||G(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),h=f.dim,v=u.dim,c=h==="x"||h==="radius"?1:0,p=i.mapDimension(v),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(F(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 rw=St();function Z8(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){gf(n)&&(n=fL({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var l=gf(n),u=i.axesInfo,f=s.axesInfo,h=a==="leave"||gf(n),v={},c={},p={list:[],map:{}},d={showPointer:ut(q8,c),showTooltip:ut(K8,p)};D(s.coordSysMap,function(y,m){var _=l||y.containPoint(n);D(s.coordSysAxesInfo[m],function(S,x){var w=S.axis,b=t7(u,S);if(!h&&_&&(!u||b)){var T=b&&b.value;T==null&&!l&&(T=w.pointToData(n)),T!=null&&aw(S,T,d,!1,v)}})});var g={};return D(f,function(y,m){var _=y.linkGroup;_&&!c[m]&&D(_.axesInfo,function(S,x){var w=c[x];if(S!==y&&w){var b=w.value;_.mapper&&(b=y.axis.scale.parse(_.mapper(b,nw(S),nw(y)))),g[y.key]=b}})}),D(g,function(y,m){aw(f[m],y,d,!0,v)}),J8(c,f,v),j8(p,n,r,o),Q8(f,o,t),v}}function aw(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=X8(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&z(n,s[0]),!a&&r.snap&&i.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function X8(r,e){var t=e.axis,a=t.dim,n=r,i=[],o=Number.MAX_VALUE,s=-1;return D(e.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(a),h,v;if(l.getAxisTooltipData){var c=l.getAxisTooltipData(f,r,t);v=c.dataIndices,h=c.nestestValue}else{if(v=l.getData().indicesOfNearest(f[0],r,t.type==="category"?.5:null),!v.length)return;h=l.getData().get(f[0],v[0])}if(!(h==null||!isFinite(h))){var p=r-h,d=Math.abs(p);d<=o&&((d=0&&s<0)&&(o=d,s=p,n=h,i.length=0),D(v,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:n}}function q8(r,e,t,a){r[e.key]={value:t,payloadBatch:a}}function K8(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=_l(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 J8(r,e,t){var a=t.axesInfo=[];D(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 j8(r,e,t,a){if(gf(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 Q8(r,e,t){var a=t.getZr(),n="axisPointerLastHighlights",i=rw(a)[n]||{},o=rw(a)[n]={};D(r,function(u,f){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&D(h.seriesDataIndices,function(v){var c=v.seriesIndex+" | "+v.dataIndex;o[c]=v})});var s=[],l=[];D(i,function(u,f){!o[f]&&l.push(u)}),D(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 t7(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 nw(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 gf(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Zl(r){ki.registerAxisPointerClass("CartesianAxisPointer",B8),r.registerComponentModel(z8),r.registerComponentView(Y8),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!G(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=F3(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Z8)}function e7(r){gt(NM),gt(Zl)}var r7=function(r){O(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(),h=s.dataToCoord(a),v=i.get("type");if(v&&v!=="none"){var c=hm(i),p=n7[v](s,l,h,f);p.style=c,t.graphicKey=p.type,t.pointer=p}var d=i.get(["label","margin"]),g=a7(a,n,i,l,d);iL(t,n,i,o,g)},e}(fm);function a7(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,h;if(i.dim==="radius"){var v=Je();Di(v,v,s),ta(v,v,[a.cx,a.cy]),u=Ir([o,-n],v);var c=e.getModel("axisLabel").get("rotate")||0,p=Ca.innerTextLayout(s,c*Math.PI/180,-1);f=p.textAlign,h=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",h=Math.abs(u[1]-y)/d<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:f,verticalAlign:h}}var n7={line:function(r,e,t,a){return r.dim==="angle"?{type:"Line",shape:cm(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:jx(e.cx,e.cy,a[0],a[1],(-t-n/2)*i,(-t+n/2)*i)}:{type:"Sector",shape:jx(e.cx,e.cy,t-n/2,t+n/2,0,Math.PI*2)}}};const i7=r7;var o7=function(r){O(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}(wt);const s7=o7;var pm=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",te).models[0]},e.type="polarAxis",e}(wt);re(pm,Vl);var l7=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(pm),u7=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(pm),dm=function(r){O(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}(kr);dm.prototype.dataToRadius=kr.prototype.dataToCoord;dm.prototype.radiusToData=kr.prototype.coordToData;const f7=dm;var h7=St(),gm=function(r){O(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=Il(s==null?"":s+"",a.getFont(),"center","top"),h=Math.max(f.height,7),v=h/u;isNaN(v)&&(v=1/0);var c=Math.max(0,Math.floor(v)),p=h7(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}(kr);gm.prototype.dataToAngle=kr.prototype.dataToCoord;gm.prototype.angleToData=kr.prototype.coordToData;const v7=gm;var hL=["radius","angle"],c7=function(){function r(e){this.dimensions=hL,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new f7,this._angleAxis=new v7,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){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},r.prototype.pointToData=function(e,t){var a=this.pointToCoord(e);return[this._radiusAxis.radiusToData(a[0],t),this._angleAxis.angleToData(a[1],t)]},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){var t=e[0],a=e[1]/180*Math.PI,n=Math.cos(a)*t+this.cx,i=-Math.sin(a)*t+this.cy;return[n,i]},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,h=u*u+f*f,v=this.r,c=this.r0;return v!==c&&h-o<=v*v&&h+o>=c*c}}},r.prototype.convertToPixel=function(e,t,a){var n=iw(t);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var n=iw(t);return n===this?this.pointToData(a):null},r}();function iw(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}const p7=c7;function d7(r,e,t){var a=e.get("center"),n=t.getWidth(),i=t.getHeight();r.cx=$(a[0],n),r.cy=$(a[1],i);var o=r.getRadiusAxis(),s=Math.min(n,i)/2,l=e.get("radius");l==null?l=[0,"100%"]:G(l)||(l=[0,l]);var u=[$(l[0],s),$(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function g7(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();D(Wf(l,"radius"),function(u){n.scale.unionExtentFromData(l,u)}),D(Wf(l,"angle"),function(u){a.scale.unionExtentFromData(l,u)})}}),Co(a.scale,a.model),Co(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 y7(r){return r.mainType==="angleAxis"}function ow(r,e){var t;if(r.type=e.get("type"),r.scale=$h(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),y7(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 m7={dimensions:hL,create:function(r,e){var t=[];return r.eachComponent("polar",function(a,n){var i=new p7(n+"");i.update=g7;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");ow(o,l),ow(s,u),d7(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",te).models[0];a.coordinateSystem=n.coordinateSystem}}),t}};const _7=m7;var S7=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Hu(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 Wu(r){var e=r.getRadiusAxis();return e.inverse?0:1}function sw(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 x7=function(r){O(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(),l=n.getMinorTicksCoords(),u=F(n.getViewLabels(),function(f){f=nt(f);var h=n.scale,v=h.type==="ordinal"?h.getRawOrdinalNumber(f.tickValue):f.tickValue;return f.coord=n.dataToCoord(v),f});sw(u),sw(s),D(S7,function(f){t.get([f,"show"])&&(!n.scale.isBlank()||f==="axisLine")&&w7[f](this.group,t,i,s,l,o,u)},this)}},e.type="angleAxis",e}(ki),w7={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=Wu(t),h=f?0:1,v,c=Math.abs(u[1]-u[0])===360?"Circle":"Arc";i[h]===0?v=new Li[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}):v=new Ch({shape:{cx:t.cx,cy:t.cy,r:i[f],r0:i[h]},style:o.getLineStyle(),z2:1,silent:!0}),v.style.fill=null,r.add(v)},axisTick:function(r,e,t,a,n,i){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[Wu(t)],u=F(a,function(f){return new ce({shape:Hu(t,[l,l+s],f.coord)})});r.add(vr(u,{style:et(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[Wu(t)],f=[],h=0;hy?"left":"right",S=Math.abs(g[1]-m)/d<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[p]){var x=s[p];at(x)&&x.textStyle&&(c=new Vt(x.textStyle,l,l.ecModel))}var w=new Tt({silent:Ca.isLabelSilent(e),style:Bt(c,{x:g[0],y:g[1],fill:c.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:_,verticalAlign:S})});if(r.add(w),f){var b=Ca.makeAxisEventDataBase(e);b.targetType="axisLabel",b.value=h.rawLabel,ot(w).eventData=b}},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=[],h=0;h=0?"p":"n",R=C;x&&(a[f][I]||(a[f][I]={p:C,n:C}),R=a[f][I][P]);var E=void 0,N=void 0,k=void 0,B=void 0;if(p.dim==="radius"){var V=p.dataToCoord(L)-C,H=l.dataToCoord(I);Math.abs(V)=B})}}})}function P7(r){var e={};D(r,function(a,n){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=cL(o,s),u=s.getExtent(),f=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),h=e[l]||{bandWidth:f,remainedWidth:f,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},v=h.stacks;e[l]=h;var c=vL(a);v[c]||h.autoWidthCount++,v[c]=v[c]||{width:0,maxWidth:0};var p=$(a.get("barWidth"),f),d=$(a.get("barMaxWidth"),f),g=a.get("barGap"),y=a.get("barCategoryGap");p&&!v[c].width&&(p=Math.min(h.remainedWidth,p),v[c].width=p,h.remainedWidth-=p),d&&(v[c].maxWidth=d),g!=null&&(h.gap=g),y!=null&&(h.categoryGap=y)});var t={};return D(e,function(a,n){t[n]={};var i=a.stacks,o=a.bandWidth,s=$(a.categoryGap,o),l=$(a.gap,1),u=a.remainedWidth,f=a.autoWidthCount,h=(u-s)/(f+(f-1)*l);h=Math.max(h,0),D(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){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),a=this.getRect(),n=[],i=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[i]=t.toGlobalCoord(t.dataToCoord(+e)),n[1-i]=i===0?a.y+a.height/2:a.x+a.width/2,n},r.prototype.convertToPixel=function(e,t,a){var n=lw(t);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var n=lw(t);return n===this?this.pointToData(a):null},r}();function lw(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function $7(r,e){var t=[];return r.eachComponent("singleAxis",function(a,n){var i=new W7(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",te).models[0];a.coordinateSystem=n&&n.coordinateSystem}}),t}var U7={create:$7,dimensions:dL};const Y7=U7;var uw=["x","y"],Z7=["width","height"],X7=function(r){O(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=op(l,1-nh(s)),f=l.dataToPoint(a)[0],h=i.get("type");if(h&&h!=="none"){var v=hm(i),c=q7[h](s,f,u);c.style=v,t.graphicKey=c.type,t.pointer=c}var p=Jd(n);sL(a,t,p,n,i,o)},e.prototype.getHandleTransform=function(t,a,n){var i=Jd(a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=vm(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=nh(o),u=op(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 h=op(s,1-l),v=(h[1]+h[0])/2,c=[v,v];return c[l]=f[l],{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}(fm),q7={line:function(r,e,t){var a=cm([e,t[0]],[e,t[1]],nh(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:lL([e-a/2,t[0]],[a,n],nh(r))}}};function nh(r){return r.isHorizontal()?0:1}function op(r,e){var t=r.getRect();return[t[uw[e]],t[uw[e]]+t[Z7[e]]]}const K7=X7;var J7=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Zt);function j7(r){gt(Zl),ki.registerAxisPointerClass("SingleAxisPointer",K7),r.registerComponentView(J7),r.registerComponentView(G7),r.registerComponentModel(ip),Do(r,"single",ip,ip.defaultOption),r.registerCoordinateSystem("single",Y7)}var Q7=function(r){O(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=Go(t);r.prototype.init.apply(this,arguments),fw(t,i)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),fw(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(wt);function fw(r,e){var t=r.cellSize,a;G(t)?a=t:a=r.cellSize=[t,t],a.length===1&&(a[1]=a[0]);var n=F([0,1],function(i){return nO(e,i)&&(a[i]="auto"),a[i]!=null&&a[i]!=="auto"});hn(r,e,{type:"box",ignoreSize:n})}const t9=Q7;var e9=function(r){O(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.dataToRect([u],!1).tl,h=new xt({shape:{x:f[0],y:f[1],width:s,height:l},cursor:"default",style:o});n.add(h)}},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 h=a.start,v=0;h.time<=a.end.time;v++){p(h.formatedDate),v===0&&(h=s.getDateInfo(a.start.y+"-"+a.start.m));var c=h.date;c.setMonth(c.getMonth()+1),h=s.getDateInfo(c)}p(s.getNextNDay(a.end.time,1).formatedDate);function p(d){o._firstDayOfMonth.push(s.getDateInfo(d)),o._firstDayPoints.push(s.dataToRect([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 Ye({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.dataToRect([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 Y(t)&&t?eO(t,a):Q(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,h=(u[0][1]+u[1][1])/2,v=n==="horizontal"?0:1,c={top:[f,u[v][1]],bottom:[f,u[1-v][1]],left:[u[1-v][0],h],right:[u[v][0],h]},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 Tt({z2:30,style:Bt(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"),h=[this._tlpoints,this._blpoints];(!s||Y(s))&&(s&&(a=sd(s)||a),s=a.get(["time","monthAbbr"])||[]);var v=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=n.start.time&&a.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/sp)-Math.floor(t[0].time/sp)+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),h=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:h,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);a.push(i),n.coordinateSystem=i}),e.eachSeries(function(n){n.get("coordinateSystem")==="calendar"&&(n.coordinateSystem=a[n.get("calendarIndex")||0])}),a},r.dimensions=["time","value"],r}();function hw(r){var e=r.calendarModel,t=r.seriesModel,a=e?e.coordinateSystem:t?t.coordinateSystem:null;return a}const n9=a9;function i9(r){r.registerComponentModel(t9),r.registerComponentView(r9),r.registerCoordinateSystem("calendar",n9)}function o9(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 vw(r,e){var t;return D(e,function(a){r[a]!=null&&r[a]!=="auto"&&(t=!0)}),t}function s9(r,e,t){var a=z({},t),n=r[e],i=t.$action||"merge";i==="merge"?n?(ft(n,a,!0),hn(n,a,{ignoreSize:!0}),JC(t,n),$u(t,n),$u(t,n,"shape"),$u(t,n,"style"),$u(t,n,"extra"),t.clipPath=n.clipPath):r[e]=a:i==="replace"?r[e]=a:i==="remove"&&n&&(r[e]=null)}var gL=["transition","enterFrom","leaveTo"],l9=gL.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function $u(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var a=t?gL:l9,n=0;n=0;f--){var h=n[f],v=ae(h.id,null),c=v!=null?o.get(v):null;if(!!c){var p=c.parent,y=ur(p),m=p===i?{width:s,height:l}:{width:y.width,height:y.height},_={},S=Oh(c,h,m,null,{hv:h.hv,boundingMode:h.bounding},_);if(!ur(c).isNew&&S){for(var x=h.transition,w={},b=0;b=0)?w[T]=C:c[T]=C}At(c,w,t,0)}else c.attr(_)}}},e.prototype._clear=function(){var t=this,a=this._elMap;a.each(function(n){yf(n,ur(n).option,a,t._lastGraphicModel)}),this._elMap=J()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Zt);function jd(r){var e=q(cw,r)?cw[r]:Yg(r),t=new e({});return ur(t).type=r,t}function pw(r,e,t,a){var n=jd(t);return e.add(n),a.set(r,n),ur(n).id=r,ur(n).isNew=!0,n}function yf(r,e,t,a){var n=r&&r.parent;n&&(r.type==="group"&&r.traverse(function(i){yf(i,e,t,a)}),Jh(r,e,a),t.removeKey(ur(r).id))}function dw(r,e,t,a){r.isGroup||D([["cursor",gr.prototype.cursor],["zlevel",a||0],["z",t||0],["z2",0]],function(n){var i=n[0];q(e,i)?r[i]=lt(e[i],n[1]):r[i]==null&&(r[i]=n[1])}),D(mt(e),function(n){if(n.indexOf("on")===0){var i=e[n];r[n]=Q(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 v9(r){return r=z({},r),D(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(KC),function(e){delete r[e]}),r}function c9(r,e,t){var a=ot(r).eventData;!r.silent&&!r.ignore&&!a&&(a=ot(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),a&&(a.info=t.info)}function p9(r){r.registerComponentModel(f9),r.registerComponentView(h9),r.registerPreprocessor(function(e){var t=e.graphic;G(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var gw=["x","y","radius","angle","single"],d9=["cartesian2d","polar","singleAxis"];function g9(r){var e=r.get("coordinateSystem");return pt(d9,e)>=0}function rn(r){return r+"Axis"}function y9(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 h=!1;return f.eachTargetAxis(function(v,c){var p=t.get(v);p&&p[c]&&(h=!0)}),h}function u(f){f.eachTargetAxis(function(h,v){(t.get(h)||t.set(h,[]))[v]=!0})}return a}function yL(r){var e=r.ecModel,t={infoList:[],infoMap:J()};return r.eachTargetAxis(function(a,n){var i=e.getComponent(rn(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 lp=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}(),m9=function(r){O(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=yw(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var a=yw(t);ft(this.option,t,!0),ft(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;D([["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 D(gw,function(n){var i=this.getReferringComponents(rn(n),OR);if(!!i.specified){a=!0;var o=new lp;D(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 h=u[0];if(!!h){var v=new lp;if(v.add(h.componentIndex),t.set(f,v),i=!1,f==="x"||f==="y"){var c=h.getReferringComponents("grid",te).models[0];c&&D(u,function(p){h.componentIndex!==p.componentIndex&&c===p.getReferringComponents("grid",te).models[0]&&v.add(p.componentIndex)})}}}i&&D(gw,function(u){if(!!i){var f=n.findComponents({mainType:rn(u),filter:function(v){return v.get("type",!0)==="category"}});if(f[0]){var h=new lp;h.add(f[0].componentIndex),t.set(u,h),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");D([["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(rn(a),n))},this),t},e.prototype.eachTargetAxis=function(t,a){this._targetAxisInfoMap.each(function(n,i){D(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(rn(t),a)},e.prototype.setRawRange=function(t){var a=this.option,n=this.settledOption;D([["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;D(["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&&!x)return!0;_&&(g=!0),S&&(p=!0),x&&(d=!0)}return g&&p&&d})}else so(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)}});so(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;so(["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=Lt(a[0]+o,a,[0,100],!0):i!=null&&(o=Lt(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=DT(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 C9(r,e,t){var a=[1/0,-1/0];so(t,function(o){ZB(a,o.getData(),e)});var n=r.getAxisModel(),i=PD(n.axis.scale,n,a).calculate();return[i.min,i.max]}const A9=T9;var D9={getTargetSeries:function(r){function e(n){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(rn(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 A9(n,i,s,r),t.push(o.__dzAxisProxy))});var a=J();return D(t,function(n){D(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 M9=D9;function L9(r){r.registerAction("dataZoom",function(e,t){var a=y9(t,e);D(a,function(n){n.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var _w=!1;function mm(r){_w||(_w=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,M9),L9(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function I9(r){r.registerComponentModel(S9),r.registerComponentView(b9),mm(r)}var hr=function(){function r(){}return r}(),mL={};function lo(r,e){mL[r]=e}function _L(r){return mL[r]}var P9=function(r){O(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;D(this.option.feature,function(a,n){var i=_L(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),ft(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:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(wt);const R9=P9;function E9(r,e,t){var a=e.getBoxLayoutParams(),n=e.get("padding"),i={width:t.getWidth(),height:t.getHeight()},o=ne(a,i,n);di(e.get("orient"),r,e.get("itemGap"),o.width,o.height),Oh(r,a,i,n)}function SL(r,e){var t=zo(e.get("padding")),a=e.getItemStyle(["color","opacity"]);return a.fill=e.get("backgroundColor"),r=new xt({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}),r}var k9=function(r){O(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={}),h=[];D(u,function(p,d){h.push(d)}),new Ta(this._featureNames||[],h).add(v).update(v).remove(ut(v,null)).execute(),this._featureNames=h;function v(p,d){var g=h[p],y=h[d],m=u[g],_=new Vt(m,t,t.ecModel),S;if(i&&i.newTitle!=null&&i.featureName===g&&(m.title=i.newTitle),g&&!y){if(O9(g))S={onclick:_.option.onclick,featureName:g};else{var x=_L(g);if(!x)return;S=new x}f[g]=S}else if(S=f[y],!S)return;S.uid=Vo("toolbox-feature"),S.model=_,S.ecModel=a,S.api=n;var w=S instanceof hr;if(!g&&y){w&&S.dispose&&S.dispose(a,n);return}if(!_.get("show")||w&&S.unusable){w&&S.remove&&S.remove(a,n);return}c(_,S,g),_.setIconStatus=function(b,T){var C=this.option,A=this.iconPaths;C.iconStatus=C.iconStatus||{},C.iconStatus[b]=T,A[b]&&(T==="emphasis"?wa:ba)(A[b])},S instanceof hr&&S.render&&S.render(_,a,n,i)}function c(p,d,g){var y=p.getModel("iconStyle"),m=p.getModel(["emphasis","iconStyle"]),_=d instanceof hr&&d.getIcons?d.getIcons():p.get("icon"),S=p.get("title")||{},x,w;Y(_)?(x={},x[g]=_):x=_,Y(S)?(w={},w[g]=S):w=S;var b=p.iconPaths={};D(x,function(T,C){var A=kl(T,{},{x:-s/2,y:-s/2,width:s,height:s});A.setStyle(y.getItemStyle());var M=A.ensureState("emphasis");M.style=m.getItemStyle();var L=new Tt({style:{text:w[C],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null,font:Zg({fontStyle:m.get("textFontStyle"),fontFamily:m.get("textFontFamily"),fontSize:m.get("textFontSize"),fontWeight:m.get("textFontWeight")},a)},ignore:!0});A.setTextContent(L),Mi({el:A,componentModel:t,itemName:C,formatterParamsExtra:{title:w[C]}}),A.__title=w[C],A.on("mouseover",function(){var I=m.getItemStyle(),P=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";L.setStyle({fill:m.get("textFill")||I.fill||I.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),A.setTextConfig({position:m.get("textPosition")||P}),L.ignore=!t.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",C])!=="emphasis"&&n.leaveEmphasis(this),L.hide()}),(p.get(["iconStatus",C])==="emphasis"?wa:ba)(A),o.add(A),A.on("click",X(d.onclick,d,a,n,C)),b[C]=A})}E9(o,t,n),o.add(SL(o.getBoundingRect(),t)),l||o.eachChild(function(p){var d=p.__title,g=p.ensureState("emphasis"),y=g.textConfig||(g.textConfig={}),m=p.getTextContent(),_=m&&m.ensureState("emphasis");if(_&&!Q(_)&&d){var S=_.style||(_.style={}),x=Il(d,Tt.makeFont(S)),w=p.x+o.x,b=p.y+o.y+s,T=!1;b+x.height>n.getHeight()&&(y.position="top",T=!0);var C=T?-5-x.height:s+10;w+x.width/2>n.getWidth()?(y.position=["100%",C],S.align="right"):w-x.width/2<0&&(y.position=[0,C],S.align="left")}})},e.prototype.updateView=function(t,a,n,i){D(this._features,function(o){o instanceof hr&&o.updateView&&o.updateView(o.model,a,n,i)})},e.prototype.remove=function(t,a){D(this._features,function(n){n instanceof hr&&n.remove&&n.remove(t,a)}),this.group.removeAll()},e.prototype.dispose=function(t,a){D(this._features,function(n){n instanceof hr&&n.dispose&&n.dispose(t,a)})},e.type="toolbox",e}(Zt);function O9(r){return r.indexOf("my")===0}const N9=k9;var B9=function(r){O(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")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=bt.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 h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var v=l.split(","),c=v[0].indexOf("base64")>-1,p=o?decodeURIComponent(v[1]):v[1];c&&(p=window.atob(p));var d=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,y=new Uint8Array(g);g--;)y[g]=p.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,d)}else{var _=document.createElement("iframe");document.body.appendChild(_);var S=_.contentWindow,x=S.document;x.open("image/svg+xml","replace"),x.write(p),x.close(),S.focus(),x.execCommand("SaveAs",!0,d),document.body.removeChild(_)}}else{var w=n.get("lang"),b='',T=window.open();T.document.write(b),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:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return a},e}(hr);const V9=B9;var Sw="__ec_magicType_stack__",z9=[["line","bar"],["stack"]],G9=function(r){O(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 D(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(!!xw[n]){var s={series:[]},l=function(h){var v=h.subType,c=h.id,p=xw[n](v,c,h,i);p&&(et(p,h.option),s.series.push(p));var d=h.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",_=h.getReferringComponents(m,te).models[0],S=_.componentIndex;s[m]=s[m]||[];for(var x=0;x<=S;x++)s[m][S]=s[m][S]||{};s[m][S].boundaryGap=n==="bar"}}};D(z9,function(h){pt(h,n)>=0&&D(h,function(v){i.setIconStatus(v,"normal")})}),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=n;n==="stack"&&(u=ft({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}(hr),xw={line:function(r,e,t,a){if(r==="bar")return ft({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 ft({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")===Sw;if(r==="line"||r==="bar")return a.setIconStatus("stack",n?"normal":"emphasis"),ft({id:e,stack:n?"":Sw},a.get(["option","stack"])||{},!0)}};ia({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});const F9=G9;var jh=new Array(60).join("-"),Io=" ";function H9(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 W9(r){var e=[];return D(r,function(t,a){var n=t.categoryAxis,i=t.valueAxis,o=i.dim,s=[" "].concat(F(t.series,function(c){return c.name})),l=[n.model.getCategories()];D(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(Io)],f=0;f=0)return!0}var Qd=new RegExp("["+Io+"]+","g");function Z9(r){for(var e=r.split(/\n+/g),t=ih(e.shift()).split(Qd),a=[],n=F(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 tU(r){var e=_m(r),t=e[e.length-1];e.length>1&&e.pop();var a={};return xL(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 eU(r){wL(r).snapshots=null}function rU(r){return _m(r).length}function _m(r){var e=wL(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var aU=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){eU(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}(hr);ia({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});const nU=aU;var iU=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],oU=function(){function r(e,t,a){var n=this;this._targetInfoList=[];var i=ww(t,e);D(sU,function(o,s){(!a||!a.include||pt(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=up[a.brushType](0,i,n);a.__rangeOffset={offset:Aw[a.brushType](o.values,a.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,a){D(e,function(n){var i=this.findTargetInfo(n,t);i&&i!==!0&&D(i.coordSyses,function(o){var s=up[n.brushType](1,o,n.range,!0);a(n,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){D(e,function(a){var n=this.findTargetInfo(a,t);if(a.range=a.range||[],n&&n!==!0){a.panelId=n.panelId;var i=up[a.brushType](0,n.coordSys,a.coordRange),o=a.__rangeOffset;a.range=o?Aw[a.brushType](i.values,o.offset,lU(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(e,t){return F(this._targetInfoList,function(a){var n=a.getPanelRect();return{panelId:a.panelId,defaultBrushType:t?t(a):null,clipPath:L2(n),isTargetByCursor:P2(n,e,a.coordSysModel),getLinearBrushOtherExtent:I2(n)}})},r.prototype.controlSeries=function(e,t,a){var n=this.findTargetInfo(e,a);return n===!0||n&&pt(n.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var a=this._targetInfoList,n=ww(t,e),i=0;ir[1]&&r.reverse(),r}function ww(r,e){return zs(r,e,{includeMainTypes:iU})}var sU={grid:function(r,e){var t=r.xAxisModels,a=r.yAxisModels,n=r.gridModels,i=J(),o={},s={};!t&&!a&&!n||(D(t,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),D(a,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),D(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=[];D(u.getCartesians(),function(h,v){(pt(t,h.getAxis("x").model)>=0||pt(a,h.getAxis("y").model)>=0)&&f.push(h)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:Tw.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){D(r.geoModels,function(t){var a=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:a,coordSyses:[a],getPanelRect:Tw.geo})})}},bw=[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}],Tw={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(pi(r)),e}},up={lineX:ut(Cw,0),lineY:ut(Cw,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=[tg([n[0],i[0]]),tg([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=F(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 Cw(r,e,t,a){var n=t.getAxis(["x","y"][r]),i=tg(F([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 Aw={lineX:ut(Dw,0),lineY:ut(Dw,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 F(r,function(a,n){return[a[0]-t[0]*e[n][0],a[1]-t[1]*e[n][1]]})}};function Dw(r,e,t,a){return[e[0]-a[r]*t[0],e[1]-a[r]*t[1]]}function lU(r,e){var t=Mw(r),a=Mw(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 Mw(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}const Sm=oU;var eg=D,uU=IR("toolbox-dataZoom_"),fU=function(r){O(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 jy(n.getZr()),this._brushController.on("brush",X(this._onBrush,this)).mount()),cU(t,a,this,i,n),vU(t,a)},e.prototype.onclick=function(t,a,n){hU[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 Sm(xm(this.model),i,{include:["grid"]});o.matchOutputRanges(a,i,function(u,f,h){if(h.type==="cartesian2d"){var v=u.brushType;v==="rect"?(s("x",h,f[0]),s("y",h,f[1])):s({lineX:"x",lineY:"y"}[v],h,f)}}),Q9(i,n),this._dispatchZoomAction(n);function s(u,f,h){var v=f.getAxis(u),c=v.model,p=l(u,c,i),d=p.findRepresentativeAxisProxy(c).getMinMaxSpan();(d.minValueSpan!=null||d.maxValueSpan!=null)&&(h=Oi(0,h.slice(),v.scale.getExtent(),0,d.minValueSpan,d.maxValueSpan)),p&&(n[p.id]={dataZoomId:p.id,startValue:h[0],endValue:h[1]})}function l(u,f,h){var v;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(c){var p=c.getAxisModel(u,f.componentIndex);p&&(v=c)}),v}},e.prototype._dispatchZoomAction=function(t){var a=[];eg(t,function(n,i){a.push(nt(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:"rgba(210,219,238,0.2)"}};return a},e}(hr),hU={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(tU(this.ecModel))}};function xm(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 vU(r,e){r.setIconStatus("back",rU(e)>1?"emphasis":"normal")}function cU(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 Sm(xm(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)}fO("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=xm(a),o=zs(r,i);eg(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),eg(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var h=l.componentIndex,v={type:"select",$fromToolbox:!0,filterMode:a.get("filterMode",!0)||"filter",id:uU+u+h};v[f]=h,n.push(v)}return n});const pU=fU;function dU(r){r.registerComponentModel(R9),r.registerComponentView(N9),lo("saveAsImage",V9),lo("magicType",F9),lo("dataView",j9),lo("dataZoom",pU),lo("restore",nU),gt(I9)}var gU=function(r){O(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,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(wt);const yU=gU;function bL(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function TL(r){if(!!bt.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,h=o+n,v=h*Math.abs(Math.cos(f))+h*Math.abs(Math.sin(f)),c=Math.round(((v-Math.SQRT2*n)/2+Math.SQRT2*n-(v-h)/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 TU(r,e){var t="cubic-bezier(0.23,1,0.32,1)",a=" "+r/2+"s "+t,n="opacity"+a+",visibility"+a;return e||(a=" "+r+"s "+t,n+=bt.transformSupported?","+wm+a:",left"+a+",top"+a),SU+":"+n}function Lw(r,e,t){var a=r.toFixed(0)+"px",n=e.toFixed(0)+"px";if(!bt.transformSupported)return t?"top:"+n+";left:"+a+";":[["top",n],["left",a]];var i=bt.transform3dSupported,o="translate"+(i?"3d":"")+"("+a+","+n+(i?",0":"")+")";return t?"top:0;left:0;"+wm+":"+o+";":[["top",0],["left",0],[CL,o]]}function CU(r){var e=[],t=r.get("fontSize"),a=r.getTextColor();a&&e.push("color:"+a),e.push("font:"+r.getFont());var n=lt(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),D(["decoration","align"],function(u){var f=r.get(u);f&&e.push("text-"+u+":"+f)}),e.join(";")}function AU(r,e,t){var a=[],n=r.get("transitionDuration"),i=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),f=r.getModel("textStyle"),h=IA(r,"html"),v=l+"px "+u+"px "+o+"px "+s;return a.push("box-shadow:"+v),e&&n&&a.push(TU(n,t)),i&&a.push("background-color:"+i),D(["width","color","radius"],function(c){var p="border-"+c,d=XC(p),g=r.get(d);g!=null&&a.push(p+":"+g+(c==="color"?"":"px"))}),a.push(CU(f)),h!=null&&a.push("padding:"+zo(h).join("px ")+"px"),a.join(";")+";"}function Iw(r,e,t,a,n){var i=e&&e.painter;if(t){var o=i&&i.getViewportRoot();o&&QI(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 DU=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,bt.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&&(Y(i)?document.querySelector(i):xo(i)?i:Q(i)&&i(e.getDom()));Iw(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();or(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=_U(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.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=xU+AU(e,!this._firstShow,this._longHide)+Lw(i[0],i[1],!0)+("border-color:"+bi(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(Y(i)&&a.get("trigger")==="item"&&!bL(a)&&(s=bU(a,n,i)),Y(e))o.innerHTML=e+s;else if(e){o.innerHTML="",G(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||bt.node||!n.getDom())){var o=Ew(i,n);this._ticket="";var s=i.dataByCoordSys,l=NU(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=PU;f.x=i.x,f.y=i.y,f.update(),ot(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 h=fL(i,a),v=h.point[0],c=h.point[1];v!=null&&c!=null&&this._tryShow({offsetX:v,offsetY:c,target:h.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(Ew(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(),h=ms([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.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=ot(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;ii(n,function(f){if(ot(f).dataIndex!=null)return l=f,!0;if(ot(f).tooltipConfig!=null)return u=f,!0},!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=ms([a.tooltipOption],i),l=this._renderMode,u=[],f=ue("section",{blocks:[],noHeader:!0}),h=[],v=new Zv;D(t,function(m){D(m.dataByAxis,function(_){var S=n.getComponent(_.axisDim+"Axis",_.axisIndex),x=_.value;if(!(!S||x==null)){var w=oL(x,S.axis,n,_.seriesDataIndices,_.valueLabelOpt),b=ue("section",{header:w,noHeader:!Dr(w),sortBlocks:!0,blocks:[]});f.blocks.push(b),D(_.seriesDataIndices,function(T){var C=n.getSeriesByIndex(T.seriesIndex),A=T.dataIndexInside,M=C.getDataParams(A);if(!(M.dataIndex<0)){M.axisDim=_.axisDim,M.axisIndex=_.axisIndex,M.axisType=_.axisType,M.axisId=_.axisId,M.axisValue=xy(S.axis,{value:x}),M.axisValueLabel=w,M.marker=v.makeTooltipMarker("item",bi(M.color),l);var L=d_(C.formatTooltip(A,!0,null)),I=L.frag;if(I){var P=ms([C],i).get("valueFormatter");b.blocks.push(P?z({valueFormatter:P},I):I)}L.text&&h.push(L.text),u.push(M)}})}})}),f.blocks.reverse(),h.reverse();var c=a.position,p=s.get("order"),d=x_(f,v,l,p,n.get("useUTC"),s.get("textStyle"));d&&h.unshift(d);var g=l==="richText"?` `:"
",y=h.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,v)})},e.prototype._showSeriesItemTooltip=function(t,a,n){var i=this._ecModel,o=ot(a),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,h=o.dataType,v=u.getData(h),c=this._renderMode,p=t.positionDefault,d=ms([v.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,h),m=new Zv;y.marker=m.makeTooltipMarker("item",bi(y.color),c);var _=d_(u.formatTooltip(f,!1,h)),S=d.get("order"),x=d.get("valueFormatter"),w=_.frag,b=w?x_(x?z({valueFormatter:x},w):w,m,c,S,i.get("useUTC"),d.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(d,function(){this._showTooltipContent(d,b,y,T,t.offsetX,t.offsetY,t.position,t.target,m)}),n({type:"showTip",dataIndexInside:f,dataIndex:v.getRawIndex(f),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,a,n){var i=this._renderMode==="html",o=ot(a),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(Y(l)){var f=l;l={content:f,formatter:f},u=!0}u&&i&&l.content&&(l=nt(l),l.content=Ae(l.content));var h=[l],v=this._ecModel.getComponent(o.componentMainType,o.componentIndex);v&&h.push(v),h.push({formatter:l.content});var c=t.positionDefault,p=ms(h,this._tooltipModel,c?{position:c}:null),d=p.get("content"),g=Math.random()+"",y=new Zv;this._showOrMove(p,function(){var m=nt(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 h=this._tooltipContent;h.setEnterable(t.get("enterable"));var v=t.get("formatter");l=l||t.get("position");var c=a,p=this._getNearestPoint([o,s],n,t.get("trigger"),t.get("borderColor")),d=p.color;if(v)if(Y(v)){var g=t.ecModel.get("useUTC"),y=G(n)?n[0]:n,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;c=v,m&&(c=Ih(y.axisValue,c,g)),c=qC(c,n,!0)}else if(Q(v)){var _=X(function(S,x){S===this._ticket&&(h.setContent(x,f,t,d,l),this._updatePosition(t,l,o,s,h,n,u))},this);this._ticket=i,c=v(n,i,_)}else c=v;h.setContent(c,f,t,d,l),h.show(t,d),this._updatePosition(t,l,o,s,h,n,u)}},e.prototype._getNearestPoint=function(t,a,n,i){if(n==="axis"||G(a))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!G(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 h=o.getSize(),v=t.get("align"),c=t.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),Q(a)&&(a=a([n,i],s,o.el,p,{viewSize:[u,f],contentSize:h.slice()})),G(a))n=$(a[0],u),i=$(a[1],f);else if(at(a)){var d=a;d.width=h[0],d.height=h[1];var g=ne(d,{width:u,height:f});n=g.x,i=g.y,v=null,c=null}else if(Y(a)&&l){var y=OU(a,p,h,t.get("borderWidth"));n=y[0],i=y[1]}else{var y=EU(n,i,o,u,f,v?null:20,c?null:20);n=y[0],i=y[1]}if(v&&(n-=kw(v)?h[0]/2:v==="right"?h[0]:0),c&&(i-=kw(c)?h[1]/2:c==="bottom"?h[1]:0),bL(t)){var y=kU(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&&D(n,function(s,l){var u=s.dataByAxis||[],f=t[l]||{},h=f.dataByAxis||[];o=o&&u.length===h.length,o&&D(u,function(v,c){var p=h[c]||{},d=v.seriesDataIndices||[],g=p.seriesDataIndices||[];o=o&&v.value===p.value&&v.axisType===p.axisType&&v.axisId===p.axisId&&d.length===g.length,o&&D(d,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),i&&D(v.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){bt.node||!a.getDom()||(cl(this,"_updatePosition"),this._tooltipContent.dispose(),Kd("itemTooltip",a))},e.type="tooltip",e}(Zt);function ms(r,e,t){var a=e.ecModel,n;t?(n=new Vt(t,a,a),n=new Vt(e.option,n,a)):n=e;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof Vt&&(o=o.get("tooltip",!0)),Y(o)&&(o={formatter:o}),o&&(n=new Vt(o,n,a)))}return n}function Ew(r,e){return r.dispatchAction||X(e.dispatchAction,e)}function EU(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 kU(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 OU(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 kw(r){return r==="center"||r==="middle"}function NU(r,e,t){var a=Pg(r).queryOptionMap,n=a.keys()[0];if(!(!n||n==="series")){var i=Pl(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=ot(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}const BU=RU;function VU(r){gt(Zl),r.registerComponentModel(yU),r.registerComponentView(BU),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},jt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},jt)}var zU=["rect","polygon","keep","clear"];function GU(r,e){var t=Rt(r?r.brush:[]);if(!!t.length){var a=[];D(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var n=r&&r.toolbox;G(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),FU(s),e&&!s.length&&s.push.apply(s,zU)}}function FU(r){var e={};D(r,function(t){e[t]=1}),r.length=0,D(e,function(t,a){r.push(a)})}var Ow=D;function Nw(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function rg(r,e,t){var a={};return Ow(e,function(i){var o=a[i]=n();Ow(r[i],function(s,l){if(!!ge.isValidType(l)){var u={type:l,visual:s};t&&t(u,i),o[l]=new ge(u),l==="opacity"&&(u=nt(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new ge(u))}})}),a;function n(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function DL(r,e,t){var a;D(t,function(n){e.hasOwnProperty(n)&&Nw(e[n])&&(a=!0)}),a&&D(t,function(n){e.hasOwnProperty(n)&&Nw(e[n])?r[n]=nt(e[n]):delete r[n]})}function HU(r,e,t,a,n,i){var o={};D(r,function(h){var v=ge.prepareVisualTypes(e[h]);o[h]=v});var s;function l(h){return fy(t,s,h)}function u(h,v){GA(t,s,h,v)}i==null?t.each(f):t.each([i],f);function f(h,v){s=i==null?h:v;var c=t.getRawDataItem(s);if(!(c&&c.visualMap===!1))for(var p=a.call(n,h),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&&Fw(e)}};function Fw(r){return new vt(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var KU=function(r){O(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 jy(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){ML(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:nt(n),$from:a}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:nt(n),$from:a})},e.type="brush",e}(Zt);const JU=KU;var jU="#ddd",QU=function(r){O(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&&DL(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:jU},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){!t||(this.areas=F(t,function(a){return Hw(this.option,a)},this))},e.prototype.setBrushOption=function(t){this.brushOption=Hw(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:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(wt);function Hw(r,e){return ft({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Vt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}const tY=QU;var eY=["rect","polygon","lineX","lineY","keep","clear"],rY=function(r){O(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,D(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 D(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:eY.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}(hr);const aY=rY;function nY(r){r.registerComponentView(JU),r.registerComponentModel(tY),r.registerPreprocessor(GU),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,UU),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"},jt),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},jt),lo("brush",aY)}var iY=function(r){O(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:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(wt),oY=function(r){O(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=lt(t.get("textBaseline"),t.get("textVerticalAlign")),f=new Tt({style:Bt(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=f.getBoundingRect(),v=t.get("subtext"),c=new Tt({style:Bt(s,{text:v,fill:s.getTextColor(),y:h.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(){kf(p,"_"+t.get("target"))}),d&&c.on("click",function(){kf(d,"_"+t.get("subtarget"))}),ot(f).eventData=ot(c).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(f),v&&i.add(c);var y=i.getBoundingRect(),m=t.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=ne(m,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),i.x=_.x,i.y=_.y,i.markRedraw();var S={align:l,verticalAlign:u};f.setStyle(S),c.setStyle(S),y=i.getBoundingRect();var x=_.margin,w=t.getItemStyle(["color","opacity"]);w.fill=t.get("backgroundColor");var b=new xt({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(b)}},e.type="title",e}(Zt);function sY(r){r.registerComponentModel(iY),r.registerComponentView(oY)}var lY=function(r){O(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=[],D(a,function(u,f){var h=ae(ko(u),""),v;at(u)?(v=nt(u),v.value=f):v=f,o.push(v),i.push(h)})):o=a;var s={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new ke([{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:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(wt);const Ww=lY;var LL=function(r){O(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=_n(Ww.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(Ww);re(LL,Bh.prototype);const uY=LL;var fY=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(Zt);const hY=fY;var vY=function(r){O(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}(kr);const cY=vY;var hp=Math.PI,$w=St(),pY=function(r){O(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 ue("nameValue",{noName:!0,value:f})},D(["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=gY(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:hp/2},h=i==="vertical"?o.height:o.width,v=t.getModel("controlStyle"),c=v.get("show",!0),p=c?v.get("itemSize"):0,d=c?v.get("itemGap"):0,g=p+d,y=t.get(["label","rotate"])||0;y=y*hp/180;var m,_,S,x=v.get("position",!0),w=c&&v.get("showPlayBtn",!0),b=c&&v.get("showPrevBtn",!0),T=c&&v.get("showNextBtn",!0),C=0,A=h;x==="left"||x==="bottom"?(w&&(m=[0,0],C+=g),b&&(_=[C,0],C+=g),T&&(S=[A-p,0],A-=g)):(w&&(m=[A-p,0],A-=g),b&&(_=[0,0],C+=g),T&&(S=[A-p,0],A-=g));var M=[C,A];return t.get("inverse")&&M.reverse(),{viewRect:o,mainLength:h,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:M,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=Je(),l=o.x,u=o.y+o.height;ta(s,s,[-l,-u]),Di(s,s,-hp/2),ta(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var f=m(o),h=m(n.getBoundingRect()),v=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||Y(d)){var g=d==="+"?0:1;_(c,h,f,1,g),_(p,v,f,1,1-g)}else{var g=d>=0?0:1;_(c,h,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,x,w,b,T){S[b]+=w[b][T]-x[b][T]}},e.prototype._createAxis=function(t,a){var n=a.getData(),i=a.get("axisType"),o=dY(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 cY("value",o,t.axisExtent,i);return l.model=a,l},e.prototype._createGroup=function(t){var a=this[t]=new it;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 ce({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:z({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});a.add(s);var l=this._progressLine=new ce({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:et({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=[],D(l,function(u){var f=n.dataToCoord(u.value),h=s.getItemModel(u.value),v=h.getModel("itemStyle"),c=h.getModel(["emphasis","itemStyle"]),p=h.getModel(["progress","itemStyle"]),d={x:f,y:0,onclick:X(o._changeTimeline,o,u.value)},g=Uw(h,v,a,d);g.ensureState("emphasis").style=c.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),ci(g);var y=ot(g);h.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=[],D(u,function(f){var h=f.tickValue,v=l.getItemModel(h),c=v.getModel("label"),p=v.getModel(["emphasis","label"]),d=v.getModel(["progress","label"]),g=n.dataToCoord(f.tickValue),y=new Tt({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:X(o._changeTimeline,o,h),silent:!1,style:Bt(c,{text:f.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=Bt(p),y.ensureState("progress").style=Bt(d),a.add(y),ci(y),$w(y).dataIndex=h,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(),h=i.get("inverse",!0);v(t.nextBtnPosition,"next",X(this._changeTimeline,this,h?"-":"+")),v(t.prevBtnPosition,"prev",X(this._changeTimeline,this,h?"+":"-")),v(t.playPosition,f?"stop":"play",X(this._handlePlayClick,this,!f),!0);function v(c,p,d,g){if(!!c){var y=Pr(lt(i.get(["controlStyle",p+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=yY(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(_),ci(_)}}},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(h){h.draggable=!0,h.drift=X(u._handlePointerDrag,u),h.ondragend=X(u._handlePointerDragend,u),Yw(h,u._progressLine,s,n,i,!0)},onUpdate:function(h){Yw(h,u._progressLine,s,n,i)}};this._currentPointer=Uw(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=pr(i.getExtent().slice());n>o[1]&&(n=o[1]),n=0&&(o[i]=+o[i].toFixed(v)),[o,h]}var vp={min:ut(Zu,"min"),max:ut(Zu,"max"),average:ut(Zu,"average"),median:ut(Zu,"median")};function Al(r,e){if(!!e){var t=r.getData(),a=r.coordinateSystem,n=a&&a.dimensions;if(!CY(e)&&!G(e.coord)&&G(n)){var i=PL(e,t,a,r);if(e=nt(e),e.type&&vp[e.type]&&i.baseAxis&&i.valueAxis){var o=pt(n,i.baseAxis.dim),s=pt(n,i.valueAxis.dim),l=vp[e.type](t,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||!G(n))e.coord=[];else for(var u=e.coord,f=0;f<2;f++)vp[u[f]]&&(u[f]=Tm(t,t.mapDimension(n[f]),u[f]));return e}}function PL(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(AY(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 AY(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function Dl(r,e){return r&&r.containData&&e.coord&&!ng(e)?r.containData(e.coord):!0}function DY(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!ng(e)&&!ng(t)?r.containZone(e.coord,t.coord):!0}function RL(r,e){return r?function(t,a,n,i){var o=i<2?t.coord&&t.coord[i]:t.value;return on(o,e[i])}:function(t,a,n,i){return on(t.value,e[i])}}function Tm(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 cp=St(),MY=function(r){O(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){cp(s).keep=!1}),a.eachSeries(function(s){var l=gn.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,a,n)}),o.each(function(s){!cp(s).keep&&i.group.remove(s.group)})},e.prototype.markKeep=function(t){cp(t).keep=!0},e.prototype.toggleBlurSeries=function(t,a){var n=this;D(t,function(i){var o=gn.getMarkerModelFromSeries(i,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(a?nC(l):Vg(l))})}})},e.type="marker",e}(Zt);const Cm=MY;function Xw(r,e,t){var a=e.coordinateSystem;r.each(function(n){var i=r.getItemModel(n),o,s=$(i.get("x"),t.getWidth()),l=$(i.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(r.getValues(r.dimensions,n));else if(a){var u=r.get(a.dimensions[0],n),f=r.get(a.dimensions[1],n);o=a.dataToPoint([u,f])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(n,o)})}var LY=function(r){O(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=gn.getMarkerModelFromSeries(i,"markPoint");o&&(Xw(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 Gl),h=IY(o,t,a);a.setData(h),Xw(a.getData(),t,i),h.each(function(v){var c=h.getItemModel(v),p=c.getShallow("symbol"),d=c.getShallow("symbolSize"),g=c.getShallow("symbolRotate"),y=c.getShallow("symbolOffset"),m=c.getShallow("symbolKeepAspect");if(Q(p)||Q(d)||Q(g)||Q(y)){var _=a.getRawValue(v),S=a.getDataParams(v);Q(p)&&(p=p(_,S)),Q(d)&&(d=d(_,S)),Q(g)&&(g=g(_,S)),Q(y)&&(y=y(_,S))}var x=c.getModel("itemStyle").getItemStyle(),w=Nl(l,"color");x.fill||(x.fill=w),h.setItemVisual(v,{symbol:p,symbolSize:d,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:x})}),f.updateData(h),this.group.add(f.group),h.eachItemGraphicEl(function(v){v.traverse(function(c){ot(c).dataModel=a})}),this.markKeep(f),f.group.silent=a.get("silent")||t.get("silent")},e.type="markPoint",e}(Cm);function IY(r,e,t){var a;r?a=F(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return z(z({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new ke(a,t),i=F(t.get("data"),ut(Al,e));r&&(i=Mt(i,ut(Dl,r)));var o=RL(!!r,a);return n.initData(i,null,o),n}const PY=LY;function RY(r){r.registerComponentModel(TY),r.registerComponentView(PY),r.registerPreprocessor(function(e){bm(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var EY=function(r){O(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}(gn);const kY=EY;var Xu=St(),OY=function(r,e,t,a){var n=r.getData(),i;if(G(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=ve(a.yAxis,a.xAxis);else{var u=PL(a,n,e,r);s=u.valueAxis;var f=dD(n,u.valueDataDim);l=Tm(n,f,o)}var h=s.dim==="x"?0:1,v=1-h,c=nt(a),p={coord:[]};c.type=null,c.coord=[],c.coord[v]=-1/0,p.coord[v]=1/0;var d=t.get("precision");d>=0&&Ct(l)&&(l=+l.toFixed(Math.min(d,20))),c.coord[h]=p.coord[h]=l,i=[c,p,{type:o,valueIndex:a.valueIndex,value:l}]}else i=[]}var g=[Al(r,i[0]),Al(r,i[1]),z({},i[2])];return g[2].type=g[2].type||null,ft(g[2],g[0]),ft(g[2],g[1]),g};function oh(r){return!isNaN(r)&&!isFinite(r)}function qw(r,e,t,a){var n=1-r,i=a.dimensions[r];return oh(e[n])&&oh(t[n])&&e[r]===t[r]&&a.getAxis(i).containData(e[r])}function NY(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,a=e[1].coord;if(t&&a&&(qw(1,t,a,r)||qw(0,t,a,r)))return!0}return Dl(r,e[0])&&Dl(r,e[1])}function pp(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),s,l=$(o.get("x"),n.getWidth()),u=$(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(r.getValues(r.dimensions,e));else{var f=i.dimensions,h=r.get(f[0],e),v=r.get(f[1],e);s=i.dataToPoint([h,v])}if(Ei(i,"cartesian2d")){var c=i.getAxis("x"),p=i.getAxis("y"),f=i.dimensions;oh(r.get(f[0],e))?s[0]=c.toGlobalCoord(c.getExtent()[t?0:1]):oh(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 BY=function(r){O(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=gn.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=Xu(o).from,u=Xu(o).to;l.each(function(f){pp(l,f,!0,i,n),pp(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 Yy);this.group.add(f.group);var h=VY(o,t,a),v=h.from,c=h.to,p=h.line;Xu(a).from=v,Xu(a).to=c,a.setData(p);var d=a.get("symbol"),g=a.get("symbolSize"),y=a.get("symbolRotate"),m=a.get("symbolOffset");G(d)||(d=[d,d]),G(g)||(g=[g,g]),G(y)||(y=[y,y]),G(m)||(m=[m,m]),h.from.each(function(S){_(v,S,!0),_(c,S,!1)}),p.each(function(S){var x=p.getItemModel(S).getModel("lineStyle").getLineStyle();p.setItemLayout(S,[v.getItemLayout(S),c.getItemLayout(S)]),x.stroke==null&&(x.stroke=v.getItemVisual(S,"style").fill),p.setItemVisual(S,{fromSymbolKeepAspect:v.getItemVisual(S,"symbolKeepAspect"),fromSymbolOffset:v.getItemVisual(S,"symbolOffset"),fromSymbolRotate:v.getItemVisual(S,"symbolRotate"),fromSymbolSize:v.getItemVisual(S,"symbolSize"),fromSymbol:v.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),h.line.eachItemGraphicEl(function(S){ot(S).dataModel=a,S.traverse(function(x){ot(x).dataModel=a})});function _(S,x,w){var b=S.getItemModel(x);pp(S,x,w,t,i);var T=b.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=Nl(l,"color")),S.setItemVisual(x,{symbolKeepAspect:b.get("symbolKeepAspect"),symbolOffset:lt(b.get("symbolOffset",!0),m[w?0:1]),symbolRotate:lt(b.get("symbolRotate",!0),y[w?0:1]),symbolSize:lt(b.get("symbolSize"),g[w?0:1]),symbol:lt(b.get("symbol",!0),d[w?0:1]),style:T})}this.markKeep(f),f.group.silent=a.get("silent")||t.get("silent")},e.type="markLine",e}(Cm);function VY(r,e,t){var a;r?a=F(r&&r.dimensions,function(u){var f=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return z(z({},f),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new ke(a,t),i=new ke(a,t),o=new ke([],t),s=F(t.get("data"),ut(OY,e,r,t));r&&(s=Mt(s,ut(NY,r)));var l=RL(!!r,a);return n.initData(F(s,function(u){return u[0]}),null,l),i.initData(F(s,function(u){return u[1]}),null,l),o.initData(F(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}const zY=BY;function GY(r){r.registerComponentModel(kY),r.registerComponentView(zY),r.registerPreprocessor(function(e){bm(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var FY=function(r){O(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}(gn);const HY=FY;var qu=St(),WY=function(r,e,t,a){var n=a[0],i=a[1];if(!(!n||!i)){var o=Al(r,n),s=Al(r,i),l=o.coord,u=s.coord;l[0]=ve(l[0],-1/0),l[1]=ve(l[1],-1/0),u[0]=ve(u[0],1/0),u[1]=ve(u[1],1/0);var f=_g([{},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 sh(r){return!isNaN(r)&&!isFinite(r)}function Kw(r,e,t,a){var n=1-r;return sh(e[n])&&sh(t[n])}function $Y(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 Ei(r,"cartesian2d")?t&&a&&(Kw(1,t,a)||Kw(0,t,a))?!0:DY(r,n,i):Dl(r,n)||Dl(r,i)}function Jw(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),s,l=$(o.get(t[0]),n.getWidth()),u=$(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),h=r.getValues(["x1","y1"],e),v=i.clampData(f),c=i.clampData(h),p=[];t[0]==="x0"?p[0]=v[0]>c[0]?h[0]:f[0]:p[0]=v[0]>c[0]?f[0]:h[0],t[1]==="y0"?p[1]=v[1]>c[1]?h[1]:f[1]:p[1]=v[1]>c[1]?f[1]:h[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(Ei(i,"cartesian2d")){var m=i.getAxis("x"),_=i.getAxis("y"),d=r.get(t[0],e),g=r.get(t[1],e);sh(d)?s[0]=m.toGlobalCoord(m.getExtent()[t[0]==="x0"?0:1]):sh(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var jw=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],UY=function(r){O(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=gn.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=F(jw,function(h){return Jw(s,l,h,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 it});this.group.add(f.group),this.markKeep(f);var h=YY(o,t,a);a.setData(h),h.each(function(v){var c=F(jw,function(T){return Jw(h,v,T,t,i)}),p=o.getAxis("x").scale,d=o.getAxis("y").scale,g=p.getExtent(),y=d.getExtent(),m=[p.parse(h.get("x0",v)),p.parse(h.get("x1",v))],_=[d.parse(h.get("y0",v)),d.parse(h.get("y1",v))];pr(m),pr(_);var S=!(g[0]>m[1]||g[1]_[1]||y[1]<_[0]),x=!S;h.setItemLayout(v,{points:c,allClipped:x});var w=h.getItemModel(v).getModel("itemStyle").getItemStyle(),b=Nl(l,"color");w.fill||(w.fill=b,Y(w.fill)&&(w.fill=wf(w.fill,.4))),w.stroke||(w.stroke=b),h.setItemVisual(v,"style",w)}),h.diff(qu(f).data).add(function(v){var c=h.getItemLayout(v);if(!c.allClipped){var p=new Ue({shape:{points:c.points}});h.setItemGraphicEl(v,p),f.group.add(p)}}).update(function(v,c){var p=qu(f).data.getItemGraphicEl(c),d=h.getItemLayout(v);d.allClipped?p&&f.group.remove(p):(p?At(p,{shape:{points:d.points}},a,v):p=new Ue({shape:{points:d.points}}),h.setItemGraphicEl(v,p),f.group.add(p))}).remove(function(v){var c=qu(f).data.getItemGraphicEl(v);f.group.remove(c)}).execute(),h.eachItemGraphicEl(function(v,c){var p=h.getItemModel(c),d=h.getItemVisual(c,"style");v.useStyle(h.getItemVisual(c,"style")),_e(v,le(p),{labelFetcher:a,labelDataIndex:c,defaultText:h.getName(c)||"",inheritColor:Y(d.fill)?wf(d.fill,1):"#000"}),me(v,p),Ut(v,null,null,p.get(["emphasis","disabled"])),ot(v).dataModel=a}),qu(f).data=h,f.group.silent=a.get("silent")||t.get("silent")},e.type="markArea",e}(Cm);function YY(r,e,t){var a,n,i=["x0","y0","x1","y1"];if(r){var o=F(r&&r.dimensions,function(u){var f=e.getData(),h=f.getDimensionInfo(f.mapDimension(u))||{};return z(z({},h),{name:u,ordinalMeta:null})});n=F(i,function(u,f){return{name:u,type:o[f%2].type}}),a=new ke(n,t)}else n=[{name:"value",type:"float"}],a=new ke(n,t);var s=F(t.get("data"),ut(WY,e,r,t));r&&(s=Mt(s,ut($Y,r)));var l=r?function(u,f,h,v){var c=u.coord[Math.floor(v/2)][v%2];return on(c,n[v])}:function(u,f,h,v){return on(u.value,n[v])};return a.initData(s,null,l),a.hasItemOption=!0,a}const ZY=UY;function XY(r){r.registerComponentModel(HY),r.registerComponentView(ZY),r.registerPreprocessor(function(e){bm(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var qY=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"])}},KY=function(r){O(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"]),G(a)&&D(a,function(i,o){Y(i)&&(i={type:i}),a[o]=ft(i,qY(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",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",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:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(wt);const ig=KY;var to=ut,og=D,Ku=it,JY=function(r){O(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 Ku),this.group.add(this._selectorGroup=new Ku),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=t.getBoxLayoutParams(),h={width:n.getWidth(),height:n.getHeight()},v=t.get("padding"),c=ne(f,h,v),p=this.layoutInner(t,o,c,i,l,u),d=ne(et({width:p.width,height:p.height},f),h,v);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=SL(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(),h=a.get("selectedMode"),v=[];n.eachRawSeries(function(c){!c.get("legendHoverLink")&&v.push(c.id)}),og(a.getData(),function(c,p){var d=c.get("name");if(!this.newlineDisabled&&(d===""||d===` `)){var g=new Ku;g.newline=!0,u.add(g);return}var y=n.getSeriesByName(d)[0];if(!f.get(d))if(y){var m=y.getData(),_=m.getVisual("legendLineStyle")||{},S=m.getVisual("legendIcon"),x=m.getVisual("style"),w=this._createItem(y,d,p,c,a,t,_,x,S,h,i);w.on("click",to(Qw,d,null,i,v)).on("mouseover",to(sg,y.name,null,i,v)).on("mouseout",to(lg,y.name,null,i,v)),n.ssr&&w.eachChild(function(b){var T=ot(b);T.seriesIndex=y.seriesIndex,T.dataIndex=p,T.ssrType="legend"}),f.set(d,!0)}else n.eachRawSeries(function(b){if(!f.get(d)&&b.legendVisualProvider){var T=b.legendVisualProvider;if(!T.containName(d))return;var C=T.indexOfName(d),A=T.getItemVisual(C,"style"),M=T.getItemVisual(C,"legendIcon"),L=je(A.fill);L&&L[3]===0&&(L[3]=.2,A=z(z({},A),{fill:ga(L,"rgba")}));var I=this._createItem(b,d,p,c,a,t,{},A,M,h,i);I.on("click",to(Qw,null,d,i,v)).on("mouseover",to(sg,null,d,i,v)).on("mouseout",to(lg,null,d,i,v)),n.ssr&&I.eachChild(function(P){var R=ot(P);R.seriesIndex=b.seriesIndex,R.dataIndex=p,R.ssrType="legend"}),f.set(d,!0)}},this)},this),o&&this._createSelector(o,a,i,s,l)},e.prototype._createSelector=function(t,a,n,i,o){var s=this.getSelectorGroup();og(t,function(u){var f=u.type,h=new Tt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:a.id})}});s.add(h);var v=a.getModel("selectorLabel"),c=a.getModel(["emphasis","selectorLabel"]);_e(h,{normal:v,emphasis:c},{defaultText:u.title}),ci(h)})},e.prototype._createItem=function(t,a,n,i,o,s,l,u,f,h,v){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=jY(f,i,l,u,c,g,v),x=new Ku,w=i.getModel("textStyle");if(Q(t.getLegendIcon)&&(!_||_==="inherit"))x.add(t.getLegendIcon({itemWidth:p,itemHeight:d,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var b=_==="inherit"&&t.getData().getVisual("symbol")?y==="inherit"?t.getData().getVisual("symbolRotate"):y:0;x.add(QY({itemWidth:p,itemHeight:d,icon:f,iconRotate:b,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}))}var T=s==="left"?p+5:-5,C=s,A=o.get("formatter"),M=a;Y(A)&&A?M=A.replace("{name}",a!=null?a:""):Q(A)&&(M=A(a));var L=g?w.getTextColor():i.get("inactiveColor");x.add(new Tt({style:Bt(w,{text:M,x:T,y:d/2,fill:L,align:C,verticalAlign:"middle"},{inheritColor:L})}));var I=new xt({shape:x.getBoundingRect(),style:{fill:"transparent"}}),P=i.getModel("tooltip");return P.get("show")&&Mi({el:I,componentModel:o,itemName:a,itemTooltipOption:P.option}),x.add(I),x.eachChild(function(R){R.silent=!0}),I.silent=!h,this.getContentGroup().add(x),ci(x),x.__legendDataIndex=n,x},e.prototype.layoutInner=function(t,a,n,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();di(t.get("orient"),l,t.get("itemGap"),n.width,n.height);var f=l.getBoundingRect(),h=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){di("horizontal",u,t.get("selectorItemGap",!0));var v=u.getBoundingRect(),c=[-v.x,-v.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:h[d]+=v[g]+p,c[1-d]+=f[y]/2-v[y]/2,u.x=c[0],u.y=c[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[g]=f[g]+p+v[g],_[y]=Math.max(f[y],v[y]),_[m]=Math.min(0,v[m]+c[1-d]),_}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Zt);function jY(r,e,t,a,n,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),og(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?a.decal:To(h,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 v=e.getModel("lineStyle"),c=v.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=v.get("inactiveColor"),c.lineWidth=v.get("inactiveWidth")}return{itemStyle:u,lineStyle:c}}function QY(r){var e=r.icon||"roundRect",t=ee(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="#fff",t.style.lineWidth=2),t}function Qw(r,e,t,a){lg(r,e,t,a),t.dispatchAction({type:"legendToggleSelect",name:r!=null?r:e}),sg(r,e,t,a)}function EL(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],_=lt(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),h.setPosition(y),v.setPosition(m);var x={x:0,y:0};if(x[o]=d?n[o]:c[o],x[s]=Math.max(c[s],p[s]),x[l]=Math.min(0,p[l]+m[1-i]),h.__rectSize=n[o],d){var w={x:0,y:0};w[o]=Math.max(n[o]-p[o]-_,0),w[s]=x[s],h.setClipPath(new xt({shape:w})),h.__rectSize=w[o]}else v.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(t);return b.pageIndex!=null&&At(f,{x:b.contentPosition[0],y:b.contentPosition[1]},d?t:null),this._updatePageInfoView(t,b),x},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;D(["pagePrev","pageNext"],function(f){var h=f+"DataIndex",v=a[h]!=null,c=n.childOfName(f);c&&(c.setStyle("fill",v?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),c.cursor=v?"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",Y(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=dp[o],l=gp[o],u=this._findTargetItemIndex(a),f=n.children(),h=f[u],v=f.length,c=v?1:0,p={contentPosition:[n.x,n.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return p;var d=S(h);p.contentPosition[o]=-d.s;for(var g=u+1,y=d,m=d,_=null;g<=v;++g)_=S(f[g]),(!_&&m.e>y.s+i||_&&!x(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),m=_;for(var g=u-1,y=d,m=d,_=null;g>=-1;--g)_=S(f[g]),(!_||!x(m,_.s))&&y.i=b&&w.s<=b+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!=null?a:i},e.type="legend.scroll",e}(kL);const iZ=nZ;function oZ(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 sZ(r){gt(OL),r.registerComponentModel(aZ),r.registerComponentView(iZ),oZ(r)}function lZ(r){gt(OL),gt(sZ)}var uZ=function(r){O(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=_n(Cl.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(Cl);const fZ=uZ;var Am=St();function hZ(r,e,t){Am(r).coordSysRecordMap.each(function(a){var n=a.dataZoomInfoMap.get(e.uid);n&&(n.getRange=t)})}function vZ(r,e){for(var t=Am(r).coordSysRecordMap,a=t.keys(),n=0;na[t+e]&&(e=s),n=n&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function yZ(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var a=Am(t),n=a.coordSysRecordMap||(a.coordSysRecordMap=J());n.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=yL(i);D(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,cZ(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){NL(n,i);return}var f=gZ(l);o.enable(f.controlType,f.opt),o.setPointerChecker(i.containsPoint),$o(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var mZ=function(r){O(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(),hZ(n,t,{pan:X(yp.pan,this),zoom:X(yp.zoom,this),scrollMove:X(yp.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){vZ(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(ym),yp={zoom:function(r,e,t,a){var n=this.range,i=n.slice(),o=r.axisModels[0];if(!!o){var s=mp[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(Oi(0,i,[0,100],0,f.minSpan,f.maxSpan),this.range=i,n[0]!==i[0]||n[1]!==i[1])return i}},pan:ab(function(r,e,t,a,n,i){var o=mp[a]([i.oldX,i.oldY],[i.newX,i.newY],e,n,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:ab(function(r,e,t,a,n,i){var o=mp[a]([0,0],[i.scrollDelta,i.scrollDelta],e,n,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function ab(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(Oi(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var mp={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 _Z=mZ;function BL(r){mm(r),r.registerComponentModel(fZ),r.registerComponentView(_Z),yZ(r)}var SZ=function(r){O(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=_n(Cl.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(Cl);const xZ=SZ;var xs=xt,nb=7,wZ=1,_p=30,bZ=7,ws="horizontal",ib="vertical",TZ=5,CZ=["line","bar","candlestick","scatter"],AZ={easing:"cubicOut",duration:100,delay:0},DZ=function(r){O(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),$o(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(){cl(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 it;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?bZ:0,o=this._findCoordRect(),s={width:a.getWidth(),height:a.getHeight()},l=this._orient===ws?{right:s.width-o.x-o.width,top:s.height-_p-nb-i,width:o.width,height:_p}:{right:nb,top:o.y,width:_p,height:o.height},u=Go(t.option);D(["right","top","width","height"],function(h){u[h]==="ph"&&(u[h]=l[h])});var f=ne(u,s);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===ib&&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===ws&&!o?{scaleY:l?1:-1,scaleX:1}:n===ws&&o?{scaleY:l?1:-1,scaleX:-1}:n===ib&&!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 xs({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new xs({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 h=o.getDataExtent(l),v=(h[1]-h[0])*.3;h=[h[0]-v,h[1]+v];var c=[0,a[1]],p=[0,a[0]],d=[[a[0],0],[0,0]],g=[],y=p[1]/(o.count()-1),m=0,_=Math.round(o.count()/a[0]),S;o.each([l],function(C,A){if(_>0&&A%_){m+=y;return}var M=C==null||isNaN(C)||C==="",L=M?0:Lt(C,h,c,!0);M&&!S&&A?(d.push([d[d.length-1][0],0]),g.push([g[g.length-1][0],0])):!M&&S&&(d.push([m,0]),g.push([m,0])),d.push([m,L]),g.push([m,L]),m+=y,S=M}),u=this._shadowPolygonPts=d,f=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var x=this.dataZoomModel;function w(C){var A=x.getModel(C?"selectedDataBackground":"dataBackground"),M=new it,L=new Ue({shape:{points:u},segmentIgnoreThreshold:1,style:A.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),I=new Ye({shape:{points:f},segmentIgnoreThreshold:1,style:A.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return M.add(L),M.add(I),M}for(var b=0;b<3;b++){var T=w(b===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},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();D(l,function(u){if(!n&&!(a!==!0&&pt(CZ,u.get("type"))<0)){var f=i.getComponent(rn(o),s).axis,h=MZ(o),v,c=u.coordinateSystem;h!=null&&c.getOtherAxis&&(v=c.getOtherAxis(f).inverse),h=u.getData().mapDimension(h),n={thisAxis:f,series:u,thisDim:o,otherDim:h,otherAxisInverse:v}}},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,h=l.get("brushSelect"),v=a.filler=new xs({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(v),o.add(new xs({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:wZ,fill:"rgba(0,0,0,0)"}})),D([0,1],function(_){var S=l.get("handleIcon");!Bf[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var x=ee(S,-1,0,2,2,null,!0);x.attr({cursor:ob(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 w=x.getBoundingRect(),b=l.get("handleSize");this._handleHeight=$(b,this._size[1]),this._handleWidth=w.width/w.height*this._handleHeight,x.setStyle(l.getModel("handleStyle").getItemStyle()),x.style.strokeNoScale=!0,x.rectHover=!0,x.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),ci(x);var T=l.get("handleColor");T!=null&&(x.style.fill=T),o.add(n[_]=x);var C=l.getModel("textStyle"),A=l.get("handleLabel")||{},M=A.show||!1;t.add(i[_]=new Tt({silent:!0,invisible:!M,style:Bt(C,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:C.getTextColor(),font:C.getFont()}),z2:10}))},this);var c=v;if(h){var p=$(l.get("moveHandleSize"),s[1]),d=a.moveHandle=new xt({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=ee(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!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 xt({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:ob(this._orient),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=[Lt(t[0],[0,100],a,!0),Lt(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];Oi(a,i,o,n.get("zoomLock")?"all":t,s.minSpan!=null?Lt(s.minSpan,l,o,!0):null,s.maxSpan!=null?Lt(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=pr([Lt(i[0],o,l,!0),Lt(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=pr(n.slice()),o=this._size;D([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 ht(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];this._range=pr([Lt(n.x,o,s,!0),Lt(n.x+n.width,o,s,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Sa(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 xs({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),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:h[1]})},e.prototype._dispatchZoomAction=function(t){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?AZ:null,start:a[0],end:a[1]})},e.prototype._findCoordRect=function(){var t,a=yL(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}(ym);function MZ(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function ob(r){return r==="vertical"?"ns-resize":"ew-resize"}const LZ=DZ;function VL(r){r.registerComponentModel(xZ),r.registerComponentView(LZ),mm(r)}function IZ(r){gt(BL),gt(VL)}var PZ={get:function(r,e,t){var a=nt((RZ[r]||{})[e]);return t&&G(a)?a[a.length-1]:a}},RZ={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},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 zL=PZ;var sb=ge.mapVisual,EZ=ge.eachVisual,kZ=G,lb=D,OZ=pr,NZ=Lt,BZ=function(r){O(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&&DL(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=rg(this.option.controller,a,t),this.targetVisuals=rg(this.option.target,a,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,a=[];return t==null||t==="all"?this.ecModel.eachSeries(function(n,i){a.push(i)}):a=Rt(t),a},e.prototype.eachTargetSeries=function(t,a){D(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||["<",">"],G(t)&&(t=t.slice(),u=!0);var f=a?t:u?[h(t[0]),h(t[1])]:h(t);if(Y(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(Q(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 h(v){return v===s[0]?"min":v===s[1]?"max":(+v).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,a=OZ([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={});ft(i,n),ft(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(h){kZ(a.color)&&!h.inRange&&(h.inRange={color:a.color.slice().reverse()}),h.inRange=h.inRange||{color:t.get("gradientColor")}}function u(h,v,c){var p=h[v],d=h[c];p&&!d&&(d=h[c]={},lb(p,function(g,y){if(!!ge.isValidType(y)){var m=zL.get(y,"inactive",s);m!=null&&(d[y]=m,y==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function f(h){var v=(h.inRange||{}).symbol||(h.outOfRange||{}).symbol,c=(h.inRange||{}).symbolSize||(h.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),d=this.getItemSymbol(),g=d||"roundRect";lb(this.stateList,function(y){var m=this.itemSize,_=h[y];_||(_=h[y]={color:s?p:[p]}),_.symbol==null&&(_.symbol=v&&nt(v)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=c&&nt(c)||(s?m[0]:[m[0],m[0]])),_.symbol=sb(_.symbol,function(w){return w==="none"?g:w});var S=_.symbolSize;if(S!=null){var x=-1/0;EZ(S,function(w){w>x&&(x=w)}),_.symbolSize=sb(S,function(w){return NZ(w,[0,x],[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,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(wt);const lh=BZ;var ub=[20,140],VZ=function(r){O(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]=ub[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=ub[1])},e.prototype._resetRange=function(){var t=this.getExtent(),a=this.option.range;!a||a.auto?(t.auto=1,this.option.range=t):G(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),D(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=pr((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=fb(this,"outOfRange",this.getExtent()),n=fb(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 it(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);FZ([0,1],function(h){var v=o[h];v.setStyle("fill",a.handlesColor[h]),v.y=t[h];var c=Fr(t[h],[0,l[1]],u,!0),p=this.getControllerVisual(c,"symbolSize");v.scaleX=v.scaleY=p/l[0],v.x=l[0]-p/2;var d=Ir(n.handleLabelPoints[h],pi(v,this.group));if(this._orient==="horizontal"){var g=f==="left"||f==="top"?(l[0]-p)/2:(l[0]-p)/-2;d[1]+=g}s[h].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[h]),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,h=f.indicator;if(!!h){h.attr("invisible",!1);var v={convertOpacityToAlpha:!0},c=this.getControllerVisual(t,"color",v),p=this.getControllerVisual(t,"symbolSize"),d=Fr(t,s,u,!0),g=l[0]-p/2,y={x:h.x,y:h.y};h.y=d,h.x=g;var m=Ir(f.indicatorLabelPoint,pi(h,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",f.mainGroup),x=this._orient,w=x==="horizontal";_.setStyle({text:(n||"")+o.formatValueText(a),verticalAlign:w?S:"middle",align:w?"center":S});var b={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};h.x=y.x,h.y=y.y,h.animateTo(b,C),_.animateTo(T,C)}else h.attr(b),_.attr(T);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var M=0;Mo[1]&&(h[1]=1/0),a&&(h[0]===-1/0?this._showIndicator(f,h[1],"< ",l):h[1]===1/0?this._showIndicator(f,h[0],"> ",l):this._showIndicator(f,f,"\u2248 ",l));var v=this._hoverLinkDataIndices,c=[];(a||pb(n))&&(c=this._hoverLinkDataIndices=n.findTargetDataIndices(h));var p=ER(v,c);this._dispatchHighDown("downplay",mf(p[0],n)),this._dispatchHighDown("highlight",mf(p[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var a;if(ii(t.target,function(l){var u=ot(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 KZ(r,e,t,a){for(var n=e.targetVisuals[a],i=ge.prepareVisualTypes(n),o={color:Nl(r.getData(),"color")},s=0,l=i.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(ZZ,XZ),D(qZ,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(JZ))}function WL(r){r.registerComponentModel(zZ),r.registerComponentView(YZ),HL(r)}var jZ=function(r){O(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=[],QZ[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=nt(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=F(this._pieceList,function(l){return l=nt(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,a={},n=ge.listVisualTypes(),i=this.isCategory();D(t.pieces,function(s){D(n,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),D(a,function(s,l){var u=!1;D(this.stateList,function(f){u=u||o(t,f,l)||o(t.target,f,l)},this),!u&&D(this.stateList,function(f){(t[f]||(t[f]={}))[l]=zL.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,D(i,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),n.selectedMode==="single"){var s=!1;D(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=nt(t)},e.prototype.getValueState=function(t){var a=ge.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=ge.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,h){var v=i.getRepresentValue({interval:f});h||(h=i.getValueState(v));var c=t(v,h);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 D(s,function(f){var h=f.interval;h&&(h[0]>u&&o([u,h[0]],"outOfRange"),o(h.slice()),u=h[1])},this),{stops:a,outerColors:n}},e.type="visualMap.piecewise",e.defaultOption=_n(lh.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}(lh),QZ={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","\u2265"][a[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,n)},this)}};function mb(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}const tX=jZ;var eX=function(r){O(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=i.getFont(),s=i.getTextColor(),l=this._getItemAlign(),u=a.itemSize,f=this._getViewData(),h=f.endsText,v=ve(a.get("showLabel",!0),!h),c=!a.get("selectedMode");h&&this._renderEndsText(t,h[0],u,v,l),D(f.viewPieceList,function(p){var d=p.piece,g=new it;g.onclick=X(this._onItemClick,this,d),this._enableHoverLink(g,p.indexInModelPieceList);var y=a.getRepresentValue(d);if(this._createItemSymbol(g,y,[0,0,u[0],u[1]],c),v){var m=this.visualMapModel.getValueState(y);g.add(new Tt({style:{x:l==="right"?-n:u[0]+n,y:u[1]/2,text:d.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:m==="outOfRange"?.5:1},silent:c}))}t.add(g)},this),h&&this._renderEndsText(t,h[1],u,v,l),di(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:mf(s.findTargetDataIndices(a),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,a=t.option;if(a.orient==="vertical")return FL(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 it,l=this.visualMapModel.textStyleModel;s.add(new Tt({style:Bt(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=F(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=ee(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=nt(n.selected),s=a.getSelectedMapKey(t);i==="single"||i===!0?(o[s]=!0,D(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}(GL);const rX=eX;function $L(r){r.registerComponentModel(tX),r.registerComponentView(rX),HL(r)}function aX(r){gt(WL),gt($L)}var nX={label:{enabled:!0},decal:{show:!1}},_b=St(),iX={};function oX(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var a=nt(nX);ft(a.label,r.getLocaleModel().get("aria"),!1),ft(t.option,a,!1),n(),i();function n(){var u=t.getModel("decal"),f=u.get("show");if(f){var h=J();r.eachSeries(function(v){if(!v.isColorBySeries()){var c=h.get(v.type);c||(c={},h.set(v.type,c)),_b(v).scope=c}}),r.eachRawSeries(function(v){if(r.isSeriesFiltered(v))return;if(Q(v.enableAriaDecal)){v.enableAriaDecal();return}var c=v.getData();if(v.isColorBySeries()){var m=fd(v.ecModel,v.name,iX,r.getSeriesCount()),_=c.getVisual("decal");c.setVisual("decal",S(_,m))}else{var p=v.getRawData(),d={},g=_b(v).scope;c.each(function(x){var w=c.getRawIndex(x);d[w]=x});var y=p.count();p.each(function(x){var w=d[x],b=p.getName(x)||x+"",T=fd(v.ecModel,b,g,y),C=c.getItemVisual(w,"decal");c.setItemVisual(w,"decal",S(C,T))})}function S(x,w){var b=x?z(z({},w),x):w;return b.dirty=!0,b}})}}function i(){var u=e.getZr().dom;if(!!u){var f=r.getLocaleModel().get("aria"),h=t.getModel("label");if(h.option=et(h.option,f),!!h.get("enabled")){if(u.setAttribute("role","img"),h.get("description")){u.setAttribute("aria-label",h.get("description"));return}var v=r.getSeriesCount(),c=h.get(["data","maxCount"])||10,p=h.get(["series","maxCount"])||10,d=Math.min(v,p),g;if(!(v<1)){var y=s();if(y){var m=h.get(["general","withTitle"]);g=o(m,{title:y})}else g=h.get(["general","withoutTitle"]);var _=[],S=v>1?h.get(["series","multiple","prefix"]):h.get(["series","single","prefix"]);g+=o(S,{seriesCount:v}),r.eachSeries(function(T,C){if(C1?h.get(["series","multiple",L]):h.get(["series","single",L]),A=o(A,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var I=T.getData();if(I.count()>c){var P=h.get(["data","partialData"]);A+=o(P,{displayCnt:c})}else A+=h.get(["data","allData"]);for(var R=h.get(["data","separator","middle"]),E=h.get(["data","separator","end"]),N=h.get(["data","excludeDimensionId"]),k=[],B=0;B":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},uX=function(){function r(e){var t=this._condVal=Y(e)?new RegExp(e):HI(e)?e:null;if(t==null){var a="";Dt(a)}}return r.prototype.evaluate=function(e){var t=typeof e;return Y(t)?this._condVal.test(e):Ct(t)?this._condVal.test(e+""):!1},r}(),fX=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),hX=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&a.push(n),n=[I,P]}function f(I,P,R,E){vo(I,R)&&vo(P,E)||n.push(I,P,R,E,R,E)}function h(I,P,R,E,N,k){var B=Math.abs(P-I),V=Math.tan(B/4)*4/3,H=PT:M2&&a.push(n),a}function fg(r,e,t,a,n,i,o,s,l,u){if(vo(r,t)&&vo(e,a)&&vo(n,o)&&vo(i,s)){l.push(o,s);return}var f=2/u,h=f*f,v=o-r,c=s-e,p=Math.sqrt(v*v+c*c);v/=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=[],A=[];un(r,t,n,o,.5,C),un(e,a,i,s,.5,A),fg(C[0],A[0],C[1],A[1],C[2],A[2],C[3],A[3],l,u),fg(C[4],A[4],C[5],A[5],C[6],A[6],C[7],A[7],l,u)}function CX(r,e){var t=ug(r),a=[];e=e||1;for(var n=0;n0)for(var u=0;uMath.abs(u),h=YL([l,u],f?0:1,e),v=(f?s:u)/h.length,c=0;cn,o=YL([a,n],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",f=i?"y":"x",h=r[s]/o.length,v=0;v1?null:new ht(d*l+r,d*u+e)}function MX(r,e,t){var a=new ht;ht.sub(a,t,e),a.normalize();var n=new ht;ht.sub(n,r,e);var i=n.dot(a);return i}function ro(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function LX(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),LX(e,u,f)}function uh(r,e,t,a){if(t===1)a.push(e);else{var n=Math.floor(t/2),i=r(e);uh(r,i[0],n,a),uh(r,i[1],t-n,a)}return a}function IX(r,e){for(var t=[],a=0;a0)for(var x=a/t,w=-a/2;w<=a/2;w+=x){for(var b=Math.sin(w),T=Math.cos(w),C=0,_=0;_0;u/=2){var f=0,h=0;(r&u)>0&&(f=1),(e&u)>0&&(h=1),s+=u*u*(3*f^h),h===0&&(f===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function vh(r){var e=1/0,t=1/0,a=-1/0,n=-1/0,i=F(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),f=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return e=Math.min(f,e),t=Math.min(h,t),a=Math.max(f,a),n=Math.max(h,n),[f,h]}),o=F(i,function(s,l){return{cp:s,z:zX(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 qL(r){return EX(r.path,r.count)}function hg(){return{fromIndividuals:[],toIndividuals:[],count:0}}function GX(r,e,t){var a=[];function n(x){for(var w=0;w=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 HX={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;Mb(r)&&(u=r,f=e),Mb(e)&&(u=e,f=r);function h(y,m,_,S,x){var w=y.many,b=y.one;if(w.length===1&&!x){var T=m?w[0]:b,C=m?b:w[0];if(fh(T))h({many:[T],one:C},!0,_,S,!0);else{var A=s?et({delay:s(_,S)},l):l;Mm(T,C,A),i(T,C,T,C,A)}}else for(var M=et({dividePath:HX[t],individualDelay:s&&function(N,k,B,V){return s(N+_,S)}},l),L=m?GX(w,b,M):FX(b,w,M),I=L.fromIndividuals,P=L.toIndividuals,R=I.length,E=0;Ee.length,c=u?Lb(f,u):Lb(v?e:r,[v?r:e]),p=0,d=0;dKL))for(var i=a.getIndices(),o=0;o0&&w.group.traverse(function(T){T instanceof yt&&!T.animators.length&&T.animateFrom({style:{opacity:0}},b)})})}function kb(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function Ob(r){return G(r)?r.sort().join(","):r}function $a(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function qX(r,e){var t=J(),a=J(),n=J();return D(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=kb(i),f=Ob(u);a.set(f,{dataGroupId:s,data:l}),G(u)&&D(u,function(h){n.set(h,{key:f,dataGroupId:s,data:l})})}),D(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=kb(i),u=Ob(l),f=a.get(u);if(f)t.set(u,{oldSeries:[{dataGroupId:f.dataGroupId,divide:$a(f.data),data:f.data}],newSeries:[{dataGroupId:o,divide:$a(s),data:s}]});else if(G(l)){var h=[];D(l,function(p){var d=a.get(p);d.data&&h.push({dataGroupId:d.dataGroupId,divide:$a(d.data),data:d.data})}),h.length&&t.set(u,{oldSeries:h,newSeries:[{dataGroupId:o,data:s,divide:$a(s)}]})}else{var v=n.get(l);if(v){var c=t.get(v.key);c||(c={oldSeries:[{dataGroupId:v.dataGroupId,data:v.data,divide:$a(v.data)}],newSeries:[]},t.set(v.key,c)),c.newSeries.push({dataGroupId:o,data:s,divide:$a(s)})}}}}),t}function Nb(r,e){for(var t=0;t=0&&n.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:$a(e.oldData[s]),groupIdDim:o.dimension})}),D(Rt(r.to),function(o){var s=Nb(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:$a(l),groupIdDim:o.dimension})}}),n.length>0&&i.length>0&&JL(n,i,a)}function JX(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){D(Rt(a.seriesTransition),function(n){D(Rt(n.to),function(i){for(var o=a.updatedSeries,s=0;s({name:n,max:t}));return{legend:{data:[]},tooltip:{trigger:"item",...Le,formatter(){return"\u7535\u538B\u504F\u5DEE\uFF1A"+e[0]+"
\u9891\u7387\u504F\u5DEE\uFF1A"+e[1]+"
\u4E09\u76F8\u4E0D\u5E73\u8861\uFF1A"+e[2]+"
\u8C10\u6CE2\uFF1A"+e[3]+"
\u8D1F\u8F7D\u7387\uFF1A"+e[4]+"
\u529F\u7387\u56E0\u6570\uFF1A"+e[5]}},radar:{axisName:{rich:{a:{fontSize:12,color:"#8ba1b3",padding:[0,0,1,0]},b:{fontSize:12,color:"#8ba1b3",padding:[0,0,0,0]}},formatter(n){const i=e[r.indexOf(n)];return`{a| ${n}} {b| ${i}}`}},indicator:a,splitNumber:5,nameGap:1,splitLine:{lineStyle:{color:["#8ba1b3"]}},splitArea:{show:!0},axisLine:{show:!0},center:["50%","50%"],radius:26},series:[{name:"\u7EFC\u5408\u6307\u6570\u5B50\u6307\u6807\u5206\u6570",type:"radar",data:[{value:e}],tooltip:{trigger:"item"},symbol:"none",itemStyle:{color:"#0096ff"},areaStyle:{opacity:.6}}]}}function lq({data:r=[{value:396,name:"\u7535\u538B\u6CE2\u52A8"},{value:396,name:"\u8D85\u8F7D\u8FD0\u884C"},{value:963,name:"\u7535\u538B\u8D8A\u9650"}],showOne:e=!1,center:t=["50%","42%"],length:a=0,length2:n=35,roseType:i=""}){return{color:["#FFA139","#5CB9FA","#1B928A","#3D66F3"],tooltip:{...Le,trigger:"item",formatter:"{b}: {d}%"},legend:{left:"center",bottom:0,itemWidth:8,itemHeight:8,itemGap:6,textStyle:{color:_t,fontSize:12},data:r},series:[{type:"pie",roseType:i,center:t,minAngle:10,radius:["35%","60%"],label:{show:!0,fontSize:12,formatter:`{b} {d}%`},labelLine:{show:!0,length:a,length2:n},data:r}]}}function uq({data:r=[{value:396,name:"\u7535\u538B\u6CE2\u52A8"},{value:396,name:"\u8D85\u8F7D\u8FD0\u884C"},{value:963,name:"\u7535\u538B\u8D8A\u9650"}],showOne:e=!1,center:t=["50%","42%"],length:a=0,length2:n=35,roseType:i=""}){return{color:["#FFA139","#5CB9FA","#1B928A","#3D66F3"],tooltip:{...Le,trigger:"item",formatter:"{b}: {d}%"},legend:{left:"center",bottom:0,itemWidth:U(12),itemHeight:U(12),itemGap:U(10),textStyle:{color:_t,fontSize:U(14)},data:r},series:[{type:"pie",roseType:i,center:t,minAngle:10,radius:["35%","60%"],label:{show:!0,fontSize:U(16),formatter:`{b} {d}%`},labelLine:{show:!0,length:U(a),length2:U(n)},data:r}]}}function fq({value:r=40}){return{title:{text:"{a|"+r+"}{c|\u5206}",x:"center",y:"center",textStyle:{rich:{a:{fontSize:U(20),color:"#fff"},c:{fontSize:U(20),color:"#ffffff"}}}},legend:{show:!1},series:[{name:"\u5916\u5C42\u7EC6\u7EBF",z:0,type:"custom",coordinateSystem:"none",renderItem(e,t){return{type:"arc",shape:{cx:t.getWidth()/2,cy:t.getHeight()/2,r:Math.min(t.getWidth(),t.getHeight())/2*.75,startAngle:0,endAngle:360},style:{stroke:"rgb(105,206,195)",fill:"transparent",lineWidth:.5},silent:!0}},data:[0]},{name:"name",type:"pie",radius:["65%","75%"],silent:!0,startAngle:90,z:1,zlevel:0,label:{normal:{position:"center"}},data:[{value:r,name:"",itemStyle:{normal:{color:"rgb(105,206,195)"}}},{value:100-r,name:"",label:{normal:{show:!1}},itemStyle:{normal:{color:"rgba(0,0,0,0)"}}}]},{name:"\u523B\u5EA6\u95F4\u9694",z:2,type:"gauge",radius:"83%",center:["50%","50%"],startAngle:0,endAngle:359.9,splitNumber:40,hoverAnimation:!0,axisTick:{show:!0,splitNumber:1,length:"14%",lineStyle:{width:2,color:"rgb(4,31,62)"}},splitLine:{show:!1},axisLabel:{show:!1},pointer:{show:!1},axisLine:{lineStyle:{opacity:0}},detail:{show:!1},data:[100]},{name:"",type:"pie",startAngle:90,radius:"64%",hoverAnimation:!1,center:["50%","50%"],itemStyle:{normal:{labelLine:{show:!1},color:new $g(.5,.5,1,[{offset:1,color:"rgba(55,70,130, 1)"},{offset:0,color:"rgba(55,70,130, 0)"}]),shadowBlur:10}},data:[{value:100}]}]}}function hq({xAxis:r=["\u7535\u538B\u8D8A\u7EBF","\u8D85\u8F7D\u8FD0\u884C","\u7535\u538B\u6CE2\u52A8"],data:e=[120,100,12],color:t="",showX:a=!0,showY:n=!0,showLable:i=!1,yLabelColor:o="",unit:s=""}){return{color:t||Xl,grid:{...ye,right:i?45:ye.right,top:i?0:ye.top},tooltip:{...Le,formatter(l){const u=l.length?l:[l];let f="";for(var h=0,v=u.length;h";return f}},xAxis:{type:"value",max:null,axisLabel:{show:a,fontSize:U(12),color:_t},splitLine:{show:!1,lineStyle:{color:_t}},axisTick:{show:!1},axisLine:{show:!0,lineStyle:{color:_t}}},yAxis:{type:"category",data:r,boundaryGap:!0,axisTick:{show:!1},splitLine:{show:!1},axisLabel:{interval:0,show:n,fontSize:U(12),color:o||_t,lineHeight:U(16),formatter(l){var u="",f=8,h=l.length,v=Math.ceil(h/f);if(v>1){for(var c=0;c({type:"line",name:r[o],data:i,smooth:n,lineStyle:{width:2}}))}}function cq({xAxis:r=["1","2","3","4","5","6","7","8","9","10","11","12"],name:e="",data:t=[120,200,150,80,70,110,130,120,200,150,80,70]}){return{grid:{...ye,top:30,left:40,right:40},color:Xl,tooltip:{trigger:"axis",top:0,...Le},xAxis:{type:"category",data:r,boundaryGap:!1,axisTick:{show:!1},splitLine:{show:!0,lineStyle:{color:"#103666"}},axisLabel:{fontSize:U(12),color:"#ffffff"},axisLine:{show:!1}},yAxis:{splitLine:{show:!1},axisLine:{show:!1},axisLabel:{show:!1}},series:[{type:"line",name:e,data:t,unit:"kW",areaStyle:{show:!0,color:"rgba(0,215,223,0.24)"},markPoint:{symbol:"circle",symbolSize:"10",data:[{type:"max",name:"\u6700\u5927\u503C",label:{show:!0,position:"top",color:"#45fdfe",formatter:function(a){return"\u6700\u5927\u503C: "+parseInt(a.value)}}}]}}]}}function pq({xAxis:r=["1","2","3","4","5","6","7","8","9","10","11","12"],name:e="\u4E07\u5143\u4EA7\u503C\u80FD\u8017",name2:t="\u4E07\u5143GDP\u80FD\u8017",data:a=[120,200,150,80,70,110,130,120,200,150,80,70],data2:n=[200,150,80,70,110,130,120,200,150,80,70,90]}){return{grid:{...ye,top:30},color:["#95C5CE","#E5C463"],tooltip:{trigger:"axis",top:0,...Le},legend:{data:[e,t],orient:"horizontal",left:"left",top:U(0),itemWidth:U(10),itemHeight:U(10),itemGap:U(16),icon:"rect",itemStyle:{borderWidth:1,borderColor:"#fff"},textStyle:{color:"#718791",fontSize:U(16)}},xAxis:{type:"category",data:r,boundaryGap:!1,axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!0,fontSize:U(14),color:"rgba(113, 135, 145, 0.7)"},axisLine:{show:!0,lineStyle:{color:"rgba(99, 134, 150, 0.4)",type:"solid"}}},yAxis:{type:"value",max:null,axisLabel:{show:!0,fontSize:U(14),color:"#718791"},splitLine:{show:!0,lineStyle:{color:"rgba(99, 134, 150, 0.4)"}},axisTick:{show:!1},axisLine:{show:!1,lineStyle:{color:"#fff"}}},series:[{type:"line",name:e,data:a,smooth:0,showSymbol:!1,lineStyle:{width:2}},{type:"line",name:t,data:n,smooth:0,showSymbol:!1,lineStyle:{width:2}}]}}function dq({xAxis:r=["1","2","3","4","5","6","7","8","9","10","11","12"],legend:e=["\u4E07\u5143\u4EA7\u503C\u80FD\u8017","\u4E07\u5143GDP\u80FD\u8017"],datas:t=[[200,150,80,70,110,130,120,200,150,80,70,90],[200,150,80,70,110,130,120,200,150,80,70,90]],gradient:a=!1,unit:n=""}){const i=e.map((o,s)=>({type:"line",name:o,data:t[s],smooth:.5,showSymbol:1,lineStyle:{width:2},unit:n,areaStyle:a?{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(57,169,223,0.7)"},{offset:1,color:"rgba(255,255,255,0)"}],global:!1}}:{}}));return{grid:{...ye,left:20,right:25,bottom:24},color:["#fed146","#45fdfe","#d954ed","#007afe","#BAF9C7","#E5C463","#B26700","#F9662D","#E5C463"],tooltip:{trigger:"axis",...Le},legend:{data:e,orient:"horizontal",left:"center",bottom:0,itemWidth:U(10),itemHeight:U(10),itemGap:U(12),itemStyle:{borderWidth:1,borderColor:"#fff"},textStyle:{color:_t,fontSize:U(12)}},xAxis:{type:"category",data:r,boundaryGap:!1,axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!0,fontSize:U(12),color:_t},axisLine:{show:!0,lineStyle:{color:_t,type:"solid"}}},yAxis:{type:"value",max:null,axisLabel:{show:!0,fontSize:U(12),color:_t},splitLine:{show:!1,lineStyle:{color:_t}},axisTick:{show:!1},axisLine:{show:!0,lineStyle:{color:_t}}},series:i}}function gq({legend:r=["\u7535\u91CF","\u7535\u8D39"],xAxis:e=["1\u6708","2\u6708","3\u6708","4\u6708"],data:t=[120,200,150,80],data2:a=[120,200,150,80]}){return{grid:{...ye,bottom:U(25)},tooltip:{trigger:"axis",...Le},legend:{data:r,orient:"horizontal",left:"center",bottom:0,itemWidth:U(8),itemHeight:U(8),itemGap:U(8),textStyle:{color:_t,fontSize:U(12)}},xAxis:{type:"category",data:e,boundaryGap:!0,axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!0,fontSize:U(12),color:_t},axisLine:{show:!0,lineStyle:{color:_t,type:"solid"}}},yAxis:{type:"value",max:null,axisLabel:{show:!0,fontSize:U(12),color:_t},splitLine:{show:!1,lineStyle:{color:_t}},axisTick:{show:!1},axisLine:{show:!0,lineStyle:{color:_t}}},series:[{type:"bar",name:r[0],data:t,showSymbol:!1,barMinWidth:U(2),barMaxWidth:U(30)},{type:"line",name:r[1],data:a,showSymbol:!0,label:{show:!1,position:"top"},lineStyle:{width:2}}]}}function yq({xAxis:r=[],type:e="line",color:t=["#FB6867","#F8C15C","#4B65B9","#89C472"],legend:a=[],showLegend:n=!0,stack:i=!1,datas:o=[[],[]],unit:s="",xName:l="",grid:u={left:10,right:20,top:35,bottom:5},gap:f=!1,avg:h=!1,markPoint:v=!1,markLine:c=[],minInterval:p=0,barMaxWidth:d=100}){const g=o.map((m,_)=>({name:a[_],type:e,stack:i?"Total":!1,areaStyle:null,connectNulls:!0,symbolSize:12,barMaxWidth:d,markLine:{data:h?[{type:"average",name:"Avg"},...c]:c},markPoint:v?{data:[{type:"max",name:"\u6700\u5927\u503C"},{type:"min",name:"\u6700\u5C0F\u503C"}]}:{},data:m,itemStyle:{borderWidth:0,borderColor:"rgba(0,0,0,0)"}}));return{tooltip:{trigger:"axis"},color:t||void 0,legend:{data:a,show:n,textStyle:{fontSize:12}},grid:{...u,containLabel:!0},xAxis:{name:l,type:"category",boundaryGap:f||e==="bar",data:r,nameTextStyle:{fontSize:12,color:"#666666"},axisLabel:{show:!0,fontSize:12,color:"#666666"},splitLine:{show:!1},axisTick:{show:!1},axisLine:{show:!0,lineStyle:{color:"#0093DF",width:2}}},yAxis:[{name:s,type:"value",scale:!0,minInterval:p,splitLine:{show:!0,lineStyle:{type:"dashed"}},axisLabel:{show:!0,fontSize:12,color:"#666666"}}],series:g}}function mq({xAxis:r=["1","2","3","4","5","6","7"],type:e="line",color:t=["#FB6867","#F8C15C","#4B65B9","#89C472"],legend:a=[],showLegend:n=!0,stack:i=!1,datas:o=[[120,132,101,134,90,230,210],[220,182,191,234,290,330,310]],unit:s="",xUnit:l="",grid:u={left:15,right:20,top:20,bottom:5},gap:f=!1,avg:h=!1,markPoint:v=!1,markLine:c=[],minInterval:p=0,barMaxWidth:d=100}){const g=o.map((m,_)=>({name:a[_],type:e,stack:i?"Total":!1,areaStyle:{color:new mr(0,0,0,1,[{offset:0,color:"rgba(42, 232, 172, 0.5)"},{offset:1,color:"rgba(255, 255, 255, 0)"}])},connectNulls:!0,symbolSize:4,barMaxWidth:d,markLine:{data:h?[{type:"average",name:"Avg"},...c]:c},markPoint:v?{data:[{type:"max",name:"\u6700\u5927\u503C"},{type:"min",name:"\u6700\u5C0F\u503C"}]}:{},data:m,itemStyle:{borderWidth:0,borderColor:"rgba(0,0,0,0)"}}));return{tooltip:{trigger:"axis"},color:t||void 0,legend:{data:a,show:n,textStyle:{fontSize:12}},grid:{...u,containLabel:!0},xAxis:{type:"category",name:l,nameTextStyle:{color:"#666666",fontSize:U(12)},boundaryGap:f||e==="bar",data:r,axisLabel:{show:!0,fontSize:11,color:"#666666"},splitLine:{show:!1},axisTick:{show:!1},axisLine:{show:!0,lineStyle:{color:"#0093DF",width:2}}},yAxis:[{name:s,type:"value",scale:!0,minInterval:p,splitLine:{show:!0,lineStyle:{type:"dashed"}},axisLabel:{show:!0,fontSize:11,color:"#666666"}}],series:g}}function _q({xAxis:r=["1\u6708","2\u6708","3\u6708","4\u6708"],data:e=[120,200,150,80],name:t="",gradient:a=!1,showY:n=!0,showLable:i=!1,xLabelColor:o="",unit:s=""}){return{grid:{...ye,top:i?20:ye.top},color:["#007afe","#ff9900"],tooltip:{trigger:"axis",...Le,formatter(l){const u=l.length?l:[l];let f="";for(var h=0,v=u.length;h";return f}},legend:{orient:"horizontal",left:"center",top:0,itemWidth:U(8),itemHeight:U(8),itemGap:U(8),textStyle:{color:_t,fontSize:U(12)}},xAxis:{type:"category",data:r,boundaryGap:!0,axisLabel:{show:!0,interval:0,rotate:-45,fontSize:U(15),color:"#666666"},splitLine:{show:!1},axisTick:{show:!1},axisLine:{show:!0,lineStyle:{color:"#0093DF",width:2}}},yAxis:{type:"value",max:null,splitNumber:4,axisLabel:{show:n,fontSize:U(15),color:"#666666"},splitLine:{show:!0,lineStyle:{type:"dashed"}},axisTick:{show:!1},axisLine:{show:!1}},series:[{type:"bar",name:t,data:e,showSymbol:!1,barMinWidth:U(10),barMaxWidth:U(12),label:{show:i,position:"top",fontSize:U(12),color:o||_t},itemStyle:{borderRadius:[10,10,0,0],color:new mr(0,1,0,0,[{offset:0,color:"#005aff"},{offset:1,color:"#00f4ff"}],!1)}}]}}function Sq({xAxis:r=["1\u6708","2\u6708","3\u6708","4\u6708"],datas:e=[[1,2,4]],legend:t=["\u6B63\u5E38\u751F\u4EA7","\u90E8\u5206\u751F\u4EA7","\u751F\u4EA7\u6269\u5927"],lineData:a=[44,11],splitNumber:n=4,showLable:i=!1,showLegend:o=!0}){const s=e.map((l,u)=>({type:"bar",name:t[0],data:e[u],showSymbol:!1,barMinWidth:U(10),barMaxWidth:U(12),label:{show:i,position:"top",fontSize:U(12),color:_t},itemStyle:{borderRadius:[10,10,0,0],color:new mr(0,1,0,0,[{offset:0,color:"#005aff"},{offset:1,color:"#00f4ff"}],!1)}}));return s.push({type:"line",name:t[t.length-1],data:a,color:["#ff9900"],showSymbol:!0,yAxisIndex:1,label:{show:!1},lineStyle:{width:2}}),{grid:{...ye,bottom:U(5),right:U(15),top:i?20:U(34)},color:["#007afe"],tooltip:{trigger:"axis",...Le},legend:{orient:"horizontal",left:"center",bottom:0,itemWidth:U(8),itemHeight:U(8),itemGap:U(8),textStyle:{color:_t,fontSize:U(12)}},xAxis:{type:"category",data:r,boundaryGap:!0,axisLabel:{show:!0,interval:0,rotate:-45,fontSize:U(15),color:"#666666"},splitLine:{show:!1},axisTick:{show:!1},axisLine:{show:!0,lineStyle:{color:"#0093DF",width:2}}},yAxis:[{name:"\u6237",type:"value",max:null,nameTextStyle:{color:"#666666",fontSize:U(12)},nameLocation:"end",splitNumber:4,axisLabel:{show:!0,fontSize:U(15),color:"#666666"},splitLine:{show:!0,lineStyle:{type:"dashed"}},axisTick:{show:!1},axisLine:{show:!1}},{type:"value",name:"kWh",nameTextStyle:{color:"#666666",fontSize:U(12)},nameLocation:"end",max:null,splitNumber:4,axisLabel:{show:!0,fontSize:U(15),color:"#666666"},splitLine:{show:!1,lineStyle:{type:"dashed"}},axisTick:{show:!1},axisLine:{show:!1}}],series:s}}function xq({xAxis:r=["1\u6708","2\u6708","3\u6708","4\u6708"],datas:e=[[1,2,4]],legend:t=["\u6B63\u5E38\u751F\u4EA7","\u90E8\u5206\u751F\u4EA7","\u751F\u4EA7\u6269\u5927"],lineData:a=[44,11],color:n=[],gradient:i=!0}){const o=e.map((s,l)=>({type:"bar",stack:"Total",name:t[l],data:s,showSymbol:!1,barMaxWidth:U(35),itemStyle:i?{color:new mr(0,1,0,0,[{offset:0,color:"#005aff"},{offset:1,color:"#00f4ff"}],!1)}:{}}));return o.push({type:"line",name:t[t.length-1],data:a,showSymbol:!0,yAxisIndex:1,label:{show:!1,position:"top"},lineStyle:{width:2}}),{color:n.length?n:Xl,grid:{...ye,bottom:23,right:10},tooltip:{trigger:"axis",...Le},legend:{data:t,orient:"horizontal",left:"center",bottom:0,itemWidth:U(10),itemHeight:U(10),itemGap:U(10),textStyle:{color:_t,fontSize:U(12)}},xAxis:{type:"category",data:r,boundaryGap:!0,axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!0,fontSize:U(12),color:_t},axisLine:{show:!0,lineStyle:{color:_t}}},yAxis:[{type:"value",max:null,axisLabel:{show:!0,fontSize:U(12),color:_t},splitLine:{show:!1,lineStyle:{color:_t}},axisTick:{show:!1},axisLine:{show:!0,lineStyle:{color:_t}}},{type:"value",max:null,axisLabel:{show:!0,fontSize:U(12),color:_t},splitLine:{show:!1,lineStyle:{color:_t}},axisTick:{show:!1},axisLine:{show:!0,lineStyle:{color:_t}}}],series:o}}function wq({xAxis:r=["1\u6708","2\u6708","3\u6708","4\u6708"],legend:e=["\u5BB9\u6539\u9700\u964D\u8D39","\u79FB\u5CF0\u586B\u8C37\u964D\u8D39"],datas:t=[[120,200,150,80],[120,200,150,80]]}){return{grid:{top:U(24),...ye},color:["#00DCFF","#0084FF","#47E6CE"],tooltip:{trigger:"axis",top:0,...Le},legend:{data:e,orient:"horizontal",left:"center",top:U(0),itemWidth:U(8),itemHeight:U(8),itemGap:U(8),textStyle:{color:"#718791",fontSize:U(12)}},xAxis:{type:"category",data:r,boundaryGap:!0,axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!0,fontSize:U(14),color:"rgba(113, 135, 145, 0.7)"},axisLine:{show:!0,lineStyle:{color:"rgba(99, 134, 150, 0.4)",type:"solid"}}},yAxis:{type:"value",max:null,splitNumber:4,axisLabel:{show:!0,fontSize:U(14),color:"#718791"},splitLine:{show:!0,lineStyle:{color:"rgba(223, 223, 223, 0.15)"}},axisTick:{show:!1},axisLine:{show:!1,lineStyle:{color:"#fff"}}},series:t.map((a,n)=>({type:"bar",stack:"Total",name:e[n],data:a,showSymbol:!1,barMaxWidth:U(20)}))}}function bq({xAxis:r=["1\u6708","2\u6708","3\u6708","4\u6708"],legend:e=["\u6C34\u80FD\u8017","\u7535\u80FD\u8017"],datas:t=[[120,200,150,80],[120,200,150,80]],splitNumber:a=5}){const n=e.map((i,o)=>({type:"bar",name:i,data:t[o],showSymbol:!1,barMinWidth:U(2),barMaxWidth:U(30)}));return{grid:{...ye,bottom:25},color:Xl,tooltip:{trigger:"axis",...Le},legend:{data:e,orient:"horizontal",left:"center",bottom:0,itemWidth:U(8),itemHeight:U(8),itemGap:U(8),textStyle:{color:_t,fontSize:U(12)}},xAxis:{type:"category",data:r,boundaryGap:!0,axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!0,fontSize:U(12),color:_t},axisLine:{show:!0,lineStyle:{color:_t,type:"solid"}}},yAxis:{type:"value",max:null,splitNumber:a,axisLabel:{show:!0,fontSize:U(12),color:_t},splitLine:{show:!1,lineStyle:{color:_t}},axisTick:{show:!1},axisLine:{show:!0,lineStyle:{color:_t}}},series:n}}function Tq({xAxis:r=["1","2","3","4","5","6","7","8","9","10","11","12"],name:e="",data:t=[120,200,150,80,70,110,130,120,200,150,80,70],color:a="#95C5CE"}){return{grid:ye,color:a,tooltip:{trigger:"axis",top:0,...Le},xAxis:{type:"category",data:r,boundaryGap:!1,axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!0,fontSize:U(14),color:"rgba(113, 135, 145, 0.7)"},axisLine:{show:!0,lineStyle:{color:"rgba(99, 134, 150, 0.4)",type:"solid"}}},yAxis:{type:"value",max:null,axisLabel:{show:!1,fontSize:12,color:"#9595A0"},splitLine:{show:!0,lineStyle:{color:"rgba(99, 134, 150, 0.4)"}},axisTick:{show:!1},axisLine:{show:!1,lineStyle:{color:"#fff"}}},series:[{type:"line",name:e,data:t,showSymbol:!1,areaStyle:{color:new mr(0,0,0,1,[{offset:0,color:"rgba(147, 195, 204, 0.25)"},{offset:1,color:"rgba(68, 92, 105, 0.25)"}])},lineStyle:{width:1}}]}}const Cq=Object.freeze(Object.defineProperty({__proto__:null,echarts_loading_config:rq,default:aq,getCityOption:nq,getGaugeOption:iq,getBarGradientOption:oq,getRadarOption:sq,getPie2Option:lq,getPieOption:uq,getGuageOption:fq,getBarRowOption:hq,getLineOption:vq,getLineAreaOption:cq,getTwoLineOption:pq,getLineMultiOption:dq,getBarLine2Option:gq,getOption:yq,getLine2Option:mq,getBarOption:_q,getBarLineOption:Sq,getBarLine3Option:xq,getBarStackOption:wq,getBarMultiOption:bq,getLineArea2Option:Tq},Symbol.toStringTag,{value:"Module"}));const Aq={__name:"index",props:{bg:Boolean,noPadding:Boolean,auto:{type:Boolean,default:!1},height:{type:String,default:"100%"},type:{type:String,default:"Bar"},option:{type:Object,default:()=>({})}},setup(r,{expose:e}){const t={maskColor:"rgba(255, 255, 255, 0)",text:"",color:"#409eff",spinnerRadius:18,lineWidth:2},a=r;let n=null;const i=Jt(null),o=u=>{n&&n.dispose(),n=t1(i.value),n.hideLoading(),n.setOption(Cq[`get${a.type}Option`]({...a.option}))},s=()=>{n.showLoading(t)};return zb(()=>a.option,()=>{o()}),vg(()=>{n=t1(i.value),a.auto&&o()}),e({draw:o,loading:s,addData:(u,f)=>{const h=n.getOption();n.setOption({xAxis:{data:h.xAxis[0].data.concat(u)},series:f.map((v,c)=>({data:[...h.series[c].data,v]}))})}}),(u,f)=>($t(),Ce("div",{class:gI(["echart",{bg:r.bg,noPadding:r.noPadding}]),style:cg({height:r.height}),ref_key:"chart",ref:i},null,6))}},Dq=Ml(Aq,[["__scopeId","data-v-084fd3aa"]]);const Mq={class:"dialog-footer"},Lq={__name:"selectPoint",props:{pointList:Array},emits:["add"],setup(r,{expose:e,emit:t}){const a=t,n=r,i=yI("pointIds"),o={},s=i.value.map(S=>{const x=S.deviceKey,w=S.propertyKey;return o[x]?o[x].push(w):o[x]=[w],x}),l=Jt([]),u=Jt([]),f=Jt(!1),h=Jt(),v={devId:"",pointId:""};Yr.deviceList().then(S=>{l.value=S.device});const c=Gb({...v}),p={devId:[{required:!0,message:"\u8BBE\u5907\u4E0D\u80FD\u4E3A\u7A7A",trigger:"change"}],pointId:[{required:!0,message:"\u6570\u636E\u9879\u4E0D\u80FD\u4E3A\u7A7A",trigger:"change"}]};function d(S){c.devId=S,c.pointId="",g(S)}function g(S){const x=l.value.find(w=>w.key===S);u.value=JSON.parse(x.product.metadata).properties}const y=async()=>{await h.value.validate();const S=JSON.stringify([{deviceKey:c.devId,propertyKey:c.pointId}]);if(n.pointList.find(w=>w.info===S))return Ua("\u5DF2\u5B58\u5728\u8BE5\u9879");f.value=!1,a("add",S)},m=async()=>{Object.assign(c,{...v}),h.value&&h.value.resetFields()};return e({open:async S=>{m(),f.value=!0,S&&_I(()=>{Object.assign(c,{...S})})}}),(S,x)=>{const w=fe("el-option"),b=fe("el-select"),T=fe("el-form-item"),C=fe("el-form"),A=fe("el-button"),M=fe("el-dialog");return $t(),ha(M,{modelValue:f.value,"onUpdate:modelValue":x[3]||(x[3]=L=>f.value=L),title:"\u9009\u62E9\u70B9\u4F4D",width:"600px","close-on-click-modal":!1,"close-on-press-escape":!1},{footer:Ht(()=>[ir("div",Mq,[Yt(A,{onClick:x[2]||(x[2]=L=>f.value=!1)},{default:Ht(()=>x[4]||(x[4]=[Wr("\u53D6\u6D88")])),_:1}),Yt(A,{type:"primary",onClick:y},{default:Ht(()=>x[5]||(x[5]=[Wr("\u4FDD\u5B58")])),_:1})])]),default:Ht(()=>[Yt(C,{ref_key:"formRef",ref:h,model:c,rules:p,"label-width":"100px"},{default:Ht(()=>[Yt(T,{label:"\u9009\u62E9\u8BBE\u5907",prop:"devId"},{default:Ht(()=>[Yt(b,{modelValue:c.devId,"onUpdate:modelValue":x[0]||(x[0]=L=>c.devId=L),onChange:d,placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907",filterable:"",style:{width:"100%"}},{default:Ht(()=>[($t(!0),Ce(Za,null,Js(l.value,L=>($t(),Ce(Za,{key:L.id},[mI(s).includes(L.key.toString())?($t(),ha(w,{key:0,label:L.name,value:L.key},null,8,["label","value"])):js("",!0)],64))),128))]),_:1},8,["modelValue"])]),_:1}),Yt(T,{label:"\u9009\u62E9\u6570\u636E\u9879",prop:"pointId"},{default:Ht(()=>[Yt(b,{modelValue:c.pointId,"onUpdate:modelValue":x[1]||(x[1]=L=>c.pointId=L),placeholder:"\u8BF7\u9009\u62E9\u6570\u636E\u9879",filterable:"",style:{width:"100%"}},{default:Ht(()=>[($t(!0),Ce(Za,null,Js(u.value,L=>($t(),Ce(Za,{key:L.key},[o[c.devId]&&o[c.devId].includes(L.key.toString())?($t(),ha(w,{key:0,label:L.name,value:L.key},null,8,["label","value"])):js("",!0)],64))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},Iq=Ml(Lq,[["__scopeId","data-v-be2c7456"]]);const Pq={class:"wrapper"},Rq={class:"point-list"},Eq={class:"index"},kq={class:"name"},Oq={class:"val"},Nq={class:"del"},Bq={class:"point"},Vq={class:"index"},zq={class:"flex1"},Gq={class:"times"},Fq=pg({__name:"viewCompare",setup(r,{expose:e}){const t=Jt(!1),a=Jt(!1),n=Jt(),i=Jt(),o=Jt([]),s=Fb(),l=Jt({}),u=Jt(5),f=[{label:"5 m",value:5},{label:"1 hr",value:60},{label:"12 hr",value:720},{label:"24 hr",value:1449}];let h={},v;vg(()=>{});const c=s.params.drawingId,p=T=>{T()},d=T=>{a.value=!0,v=T.id,u.value=5;const C=[{deviceKey:T.devId,propertyKey:T.pointId}];y().catch(()=>{g(C)}),t.value=!0,T.value=T},g=T=>{Yr.drawer.pointAdd({diagramId:c,pointId:v,info:T}).then(()=>y())},y=()=>(a.value=!0,o.value=[],h={},l.value={},new Promise((T,C)=>{Yr.drawer.getInfoByDiagramIdAndPointId({diagramId:c,pointId:v}).then(({data:A})=>{var M;A&&A.length&&((M=A.filter(L=>L.name))==null?void 0:M.length)?(o.value=A||[],A.forEach(({info:L,name:I})=>{h[JSON.stringify(L)]=I}),m(),T(!0)):C()}).catch(C)})),m=()=>{Yr.drawer.getEchartInfo({infos:o.value.map(T=>T.info),endTime:co().format("YYYY-MM-DD HH:mm:ss"),beginTime:co().subtract(u.value,"minute").format("YYYY-MM-DD HH:mm:ss")}).then(({Data:T})=>{a.value=!1;const C=T.map(L=>h[L.info]),A=T[0].echart.xAxial,M=T.map(L=>L.echart.yAxial);l.value={legend:C,xAxis:A,datas:M,type:"line",grid:{left:20,right:50,top:35,bottom:10}}})},_=T=>{SI.confirm("\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u9879\uFF1F").then(()=>{Yr.drawer.pointDel(T).then(()=>{Ua.success("\u5220\u9664\u6210\u529F"),y()})})},S=T=>{if(u.value!==5)return;const C=l.value.keys;if(!C)return;const A={};T.forEach(({Pk:L,Val:I})=>{C.includes(L)&&(A[L]=I)});const M=C.map(L=>A[L]||null);n.value&&n.value.addData(co().format("HH:mm:ss"),M)},x=T=>{u.value=T,m()},w=()=>{i.value.open()},b=T=>{g(T)};return e({toShow:d,addData:S}),(T,C)=>{const A=fe("el-button"),M=fe("el-drawer"),L=Hb("loading");return $t(),ha(M,{modelValue:t.value,"onUpdate:modelValue":C[0]||(C[0]=I=>t.value=I),title:"\u5B9E\u65F6\u6570\u636E\u7EDF\u8BA1",direction:"rtl","before-close":p,size:"780px"},{default:Ht(()=>[Wb(($t(),Ce("div",Pq,[ir("div",Rq,[($t(!0),Ce(Za,null,Js(o.value,(I,P)=>($t(),Ce("div",{class:"point",key:I.info},[ir("div",Eq,Ya(P+1),1),ir("div",kq,Ya(I.name),1),ir("div",Oq,Ya(I.val),1),ir("div",Nq,[P!==0||o.value.length>1?($t(),ha(A,{key:0,type:"danger",size:"small",onClick:R=>_(I.id)},{default:Ht(()=>C[1]||(C[1]=[Wr("\u5220\u9664")])),_:2},1032,["onClick"])):js("",!0)])]))),128)),ir("div",Bq,[ir("div",Vq,Ya(o.value.length+1),1),ir("div",zq,[Yt(A,{type:"primary",style:{width:"100%"},onClick:w},{default:Ht(()=>C[2]||(C[2]=[Wr("\u6DFB\u52A0\u70B9\u4F4D")])),_:1})])])]),Yt(Dq,{ref_key:"chart",ref:n,style:cg({height:`calc(100vh - ${(o.value.length+2)*30+200}px)`}),type:"",option:l.value},null,8,["style","option"]),ir("div",Gq,[($t(),Ce(Za,null,Js(f,I=>Yt(A,{type:u.value===I.value?"primary":"",size:"small",onClick:P=>x(I.value),key:I.value},{default:Ht(()=>[Wr(Ya(I.label),1)]),_:2},1032,["type","onClick"])),64))]),Yt(Iq,{ref_key:"selectPointRef",ref:i,pointList:o.value,onAdd:b},null,8,["pointList"])])),[[L,a.value]])]),_:1},8,["modelValue"])}}}),Hq=Ml(Fq,[["__scopeId","data-v-22d0b5bb"]]);const Wq=["src"],$q={key:0,class:"p-4"},Uq={class:"dialog-footer"},Yq=pg({__name:"view",props:{drawingId:String,data:Object},setup(r){const e=Gb({title:"",url:"",width:"",height:"",show:!1});let t,a=null,n=null,i=null,o=null;const s=Jt(""),l=Jt(!1),u=Jt(!1),f=Jt(!1),h=Jt(),v=Jt([]),c=r;let p=[];vg(()=>{a=new jL("topology"),a.register(QL()),a.registerAnchors(tI()),a.register(eI()),a.registerCanvasDraw(rI()),a.register(aI()),a.register(nI()),a.registerCanvasDraw(iI()),a.registerCanvasDraw(oI()),a.registerCanvasDraw(sI()),a.register(lI()),a.registerCanvasDraw(uI()),a.registerAnchors(fI()),hI(),!c.drawingId&&sessionStorage.data&&d(JSON.parse(sessionStorage.data))}),zb(()=>c.data,L=>{setTimeout(()=>{d(JSON.parse(JSON.stringify(L))),n?n.close():C()},300)}),window.onresize=vI.throttle(()=>{a&&M()},200);function d(L){p=L.pens.filter(I=>I.name==="combine"&&typeof I.showChild=="number"&&I.tags).map(I=>I.tags[0]),a.setOptions(L.options||{...cI}),a.open({...L,locked:1}),a.fitView(!0,30),clearInterval(t),a.setValue({tag:"time-comp",text:co().format("YYYY/MM/DD HH:mm:ss")}),t=setInterval(()=>{a.setValue({tag:"time-comp",text:co().format("YYYY/MM/DD HH:mm:ss")})},1e3),a.off("click",S),a.off("dblclick",_),a.on("click",S),a.on("dblclick",_),g()}function g(){a.store.data.pens.filter(I=>I.name==="echarts").forEach(I=>{var N,k;const[P,R]=((k=(N=I.tags)==null?void 0:N[0])==null?void 0:k.split("-"))||["",""],E=I.echartsApi;E?m(I,P,R,E):y(I,P,R)})}function y(L,I,P){Yr.echarts.get({deviceKey:I,propertyKey:P}).then(R=>{var N,k;const E=(k=(N=L.echarts.option.series)==null?void 0:N[0])==null?void 0:k.type;if(E==="gauge")a.setValue({id:L.id,"echarts.option.series.0.data.0.value":R.List[0].value});else if(["bar","line",void 0].includes(E)){const B=R.List.reverse();a.setValue({id:L.id,"echarts.option.series.0.data":B.map(V=>V.value),"echarts.option.xAxis.data":B.map(V=>co(V.ts).format("HH:mm:ss"))})}setTimeout(()=>{y(L,I,P)},5e3)}).catch(R=>{console.log(R)})}function m(L,I,P,R){const E=JSON.stringify(R.params).replaceAll("$deviceKey",I).replaceAll("$propertyKey",P);xI({url:R.url.startsWith("/api/v1")?R.url.replace("/api/v1",""):R.url,method:R.method,params:JSON.parse(E)}).then(N=>{const k=L.echarts.option;try{const B=new Function("res",R.filter)(N);a.setValue({id:L.id,"echarts.option":{...k,...B}}),setTimeout(()=>{m(L,I,P,R)},R.interval*1e3)}catch(B){console.log(B),Ua.error("\u8FC7\u6EE4\u5668\u8BED\u6CD5\u9519\u8BEF")}})}function _(L){x(L,"dblclick")}function S(L){x(L,"click")}function x(L,I){var E,N,k,B,V,H;let P=L.pen;if(!P)return;let R;if(L!=null&&L.pen&&(P=(E=L.pen)!=null&&E.events?L.pen:a.store.active[0],R=(N=P==null?void 0:P.events)==null?void 0:N[0]),(P==null?void 0:P.name)==="switch"&&(P.onClick=void 0),!R||R.type!==I){if(I==="click"&&((k=P.tags)==null?void 0:k[0])&&!pI.includes(P.tags[0])){h.value.toShow(P);return}return}if(R.action==="link"){if(!R.link.url)return;T(R,P),R.link.target==="iframe"?(Object.assign(e,R.link),e.show=!0):window.open(R.link.url,R.link.target);return}else if(R.action==="func"){if(v.value=JSON.parse(JSON.stringify(P.funcInputs||[])),R.isSwitch){const W=(H=(V=(B=v.value)==null?void 0:B[0])==null?void 0:V.valueType)==null?void 0:H.type;if(!W)return Ua.error("\u672A\u83B7\u53D6\u5230\u53C2\u6570\u7C7B\u578B");let K;P.name==="switch"?K=!P.checked:P.name==="combine"&&(K=!P.showChild),W==="string"?K=K?"1":"0":W==="int"&&(K=K?1:0),Yr.do({deviceKey:P.deviceKey,funcKey:P.funcKey,params:{[v.value[0].key]:K}}).then(()=>Ua.success("\u5F00\u5173\u72B6\u6001\u6539\u53D8\u65F6\u95F4\u4E0B\u53D1\u6210\u529F"));return}f.value=!1,s.value=P.funcName,o={deviceKey:P.deviceKey,funcKey:P.funcKey,params:{}},l.value=!0;return}}function w(L){v.value=[],o.params={},f.value=!1,l.value=!1,L&&L()}function b(){if(v.value.some(L=>L.value===null||L.value===""||L.value===void 0))return Ua("\u8BF7\u5C06\u53C2\u6570\u586B\u5199\u5B8C\u6574");v.value.forEach(({key:L,value:I,valueType:P})=>{if(P.type==="array")try{const R=JSON.parse(I);if(typeof R!="object")throw new Error;o.params[L]=R}catch(R){throw Ua.error("\u8BF7\u8F93\u5165\u6B63\u786E\u7684JSON\u6570\u7EC4\u5B57\u7B26\u4E32\u683C\u5F0F"),R}else["int","float","double"].includes(P.type)?o.params[L]=Number(I):o.params[L]=I}),f.value=!0,Yr.do(o).finally(()=>f.value=!1)}function T(L,I){var E;if(L.hasHandle||(L.hasHandle=!0,!((E=I==null?void 0:I.tags)!=null&&E[0])))return;const P=I.tags[0],R=L.link.url;if(R.includes("$pointId"))return L.link.url=R.replaceAll("$pointId",P);R.includes("?")?L.link.url+="&pointId="+P:L.link.url+="?pointId="+P}function C(){clearTimeout(i),n=new WebSocket(`${window.allEnv.topo.server}/websocket/configureDiagram/ws?Id=${c.drawingId}`),n.onopen=()=>{console.log("websocket\u5DF2\u8FDE\u63A5"),u.value=!0},n.onclose=()=>{console.log("\u8FDE\u63A5\u4E2D\u65AD\uFF01"),u.value=!1,setTimeout(()=>{C()},1e3)},n.onmessage=L=>{let I;try{I=JSON.parse(L.data)}catch{}!I||!I.length||A(I)}}function A(L){const I=new Map;L.forEach(E=>{const N=E.Pk.deviceKey+"-"+E.Pk.propertyKey;I.set(N,E.Val)});const P=Array.from(I.keys()).map(E=>({Pk:{deviceKey:E.split("-")[0],propertyKey:E.split("-")[1]},Val:I.get(E)}));if(!P.length)return;h.value&&h.value.addData(P);const R=a.store.data.pens;P.forEach(E=>{const{Pk:N,Val:k}=E,B=N.deviceKey+"-"+N.propertyKey;R.forEach(V=>{var H;if(!!((H=V.tags)!=null&&H.includes(B))&&V.name!=="echarts"){if(V!=null&&V.dataBindSwith){V.name==="switch"?a.setValue({tag:B,checked:k==="0"?!1:!!k}):V.name==="combine"?[0,1,"0","1",!0,!1].includes(k)&&a.setValue({tag:B,showChild:Number(k)}):V.name==="line"?[1,"1",!0].includes(k)?a.startAnimate(V.id):[0,"0",!1].includes(k)&&a.pauseAnimate(V.id):V.dataBindSwith==="animate"?[1,"1",!0].includes(k)?a.startAnimate(V.id):[0,"0",!1].includes(k)&&a.pauseAnimate(V.id):V.dataBindSwith==="progress"&&a.setValue({tag:B,progress:Number(k)});return}p.includes(B)?[0,1,"0","1",!0,!1].includes(k)&&a.setValue({tag:B,showChild:Number(k)}):a.setValue({tag:B,text:k})}})})}function M(){setTimeout(()=>a.fitView(!0,30),500)}return(L,I)=>{const P=fe("el-tooltip"),R=fe("el-dialog"),E=fe("el-table-column"),N=fe("el-option"),k=fe("el-select"),B=fe("el-radio"),V=fe("el-radio-group"),H=fe("el-input"),W=fe("el-table"),K=fe("el-button");return $t(),Ce(Za,null,[I[6]||(I[6]=ir("div",{id:"topology"},null,-1)),Yt(P,{content:"\u91CD\u7F6E",placement:"right",size:"small"},{default:Ht(()=>[u.value?($t(),Ce("img",{key:0,src:TI,alt:"img",class:"center",onClick:M})):($t(),Ce("img",{key:1,src:CI,alt:"img",class:"center",onClick:M}))]),_:1}),Yt(R,{modelValue:e.show,"onUpdate:modelValue":I[0]||(I[0]=Z=>e.show=Z),"custom-class":"dialog",title:e.title,width:e.width,onClose:I[1]||(I[1]=Z=>e.url="")},{default:Ht(()=>[e.url?($t(),Ce("iframe",{key:0,src:e.url,style:cg({height:e.height}),frameborder:"0"},null,12,Wq)):js("",!0)]),_:1},8,["modelValue","title","width"]),Yt(Hq,{ref_key:"viewCompareRef",ref:h},null,512),Yt(R,{modelValue:l.value,"onUpdate:modelValue":I[3]||(I[3]=Z=>l.value=Z),title:"\u89E6\u53D1\u529F\u80FD: "+s.value,width:"800px","before-close":w},{footer:Ht(()=>[ir("span",Uq,[Yt(K,{onClick:I[2]||(I[2]=Z=>w())},{default:Ht(()=>I[4]||(I[4]=[Wr("\u53D6\u6D88")])),_:1}),Yt(K,{type:"primary",loading:f.value,onClick:b},{default:Ht(()=>I[5]||(I[5]=[Wr("\u6267\u884C")])),_:1},8,["loading"])])]),default:Ht(()=>[l.value?($t(),Ce("div",$q,[Yt(W,{data:v.value||[],border:""},{default:Ht(()=>[Yt(E,{prop:"name",label:"\u53C2\u6570\u540D\u79F0"}),Yt(E,{prop:"valueType.type",label:"\u8F93\u5165\u7C7B\u578B"}),Yt(E,{prop:"name",label:"\u503C","min-width":"200"},{default:Ht(({row:Z})=>[Z.valueType.type==="enum"?($t(),ha(k,{key:0,modelValue:Z.value,"onUpdate:modelValue":tt=>Z.value=tt,clearable:"",placeholder:"\u8BF7\u9009\u62E9",style:{width:"100% !important"}},{default:Ht(()=>[($t(!0),Ce(Za,null,Js(Z.valueType.elements,tt=>($t(),ha(N,{key:tt.value,value:tt.value,label:tt.text},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):Z.valueType.type==="boolean"?($t(),ha(V,{key:1,modelValue:Z.value,"onUpdate:modelValue":tt=>Z.value=tt},{default:Ht(()=>[Yt(B,{label:!0},{default:Ht(()=>[Wr(Ya(Z.valueType.trueText||"\u662F"),1)]),_:2},1024),Yt(B,{label:!1},{default:Ht(()=>[Wr(Ya(Z.valueType.falseText||"\u5426"),1)]),_:2},1024)]),_:2},1032,["modelValue","onUpdate:modelValue"])):($t(),ha(H,{key:2,modelValue:Z.value,"onUpdate:modelValue":tt=>Z.value=tt,clearable:"",placeholder:Z.valueType.type==="array"?"JSON.stringify(arr)\u7ED3\u679C\u53BB\u6389\u5916\u5C42\u5355\u5F15\u53F7":"\u8BF7\u8F93\u5165"},wI({_:2},[Z.valueType.unit?{name:"append",fn:Ht(()=>[Wr(Ya(Z.valueType.unit),1)]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","placeholder"]))]),_:1})]),_:1},8,["data"])])):js("",!0)]),_:1},8,["modelValue","title"])],64)}}}),Zq=Ml(Yq,[["__scopeId","data-v-66a273dc"]]);const Xq={class:"page-wrapper"},qq=pg({__name:"index",setup(r){const e=Jt(!1),t=Jt(""),a=Jt({}),n=Fb(),i=Jt([]);bI("pointIds",i);const o=n.params.name;let s=n.params.drawingId==="default";s?sessionStorage.removeItem("data"):t.value=n.params.drawingId,(t.value||s||o)&&u();function l(f){s=!1,t.value=f,u()}function u(){e.value=!0,(o?Yr.topologyName:Yr.topology)(o||t.value).then(({diagram:h})=>{var c,p;const v=o?h[0]:h;if(v){s&&(t.value=v.id),i.value=((c=v==null?void 0:v.pointIds)==null?void 0:c.filter(g=>g))||[];const d=JSON.parse(dI.inflate((p=v==null?void 0:v.jsonData)!=null?p:"",{to:"string"}));localStorage.bgColor&&(d.options.background="#"+localStorage.bgColor),a.value=d,document.title=v.name||"\u56FE\u7EB8\u67E5\u770B"}else Ua.warning("\u56FE\u5F62\u4E0D\u5B58\u5728")}).finally(()=>{e.value=!1})}return(f,h)=>{const v=Hb("loading");return Wb(($t(),Ce("div",Xq,[Yt(Zq,{drawingId:t.value,data:a.value,onChangeDrawing:l},null,8,["drawingId","data"])])),[[v,e.value]])}}}),Qq=Ml(qq,[["__scopeId","data-v-68381142"]]);export{Qq as default};